IDE :: Changing Colors Of Two Instances In A Single Click?
Apr 8, 2009
Can i change the colors of two mc's if i just click one of them? i tried to put the other mc (btn02) inside the function but only btn01 changes color when i click it.
here's the code;
var controlcolor:Color = new Color(btn01);
var controlcolor2:Color = new Color(btn02);
btn01.onPress = function(){
controlcolor.setRGB(0x000000);
btn02.controlcolor2.setRGB(0x000000);
}
I followed the Changing Colors Using ActionScript and understand how it works, but I want to have the color stay changed until I click on another button. I also want to have one set of buttons for one shape and another set for a 2nd shape and a 3rd set for a 3rd shape. Do I just recopy the script substituting different shape names?
I tried using several text fields to show headlines in different colors, but when i post them online they get all messed up. Is there a way to switch between 2 colors within a single text field?
Ive been editing a template for a photography website (in flash) but she wanted the font changed through out the site and the colour of this font changed to. Ive been playing around with it and managed to chage the font but only for some of it, but what ever im doing is having a knock on affect with other parts of the site.I have a index page and various other files and folders but dont know if im looking in the correct place.When i look at the libary of contents its not very clear what is what and cant see anything reffrencing the text.
I want to change the color of many text fields at once. I created an array, then a for each loop where I datatype the var to a TextField. For some reason, Flash reads this variable as a String, so I can't change the text field's color.
i have this code which used to work if all movie clips were on the same layer, when i put them on different layers it stopped working. i have created a blank layer to carry thew action scripting. what do i need to do to make this work?
var colorend = color1; var awaycolorend = color2; circGK.onMouseMove = function ()
I need to build a series of blocks, (red, orange, yellow, green, purple). When the user clicks a block, that block changes color). (and each block color on is stored as a boolean, isClicked = TRUE/FALSE).
What is the best way to accomplish this in a "block" class? Below is my code.
I want to add a Single Clcik event and Double click event both on the same movie clip in as3 , its working but call both the event same time so how to fix it
I wanna make a test movie for lets say... a circle dragged by the mouse and changing colors of the circle to certain colors when like on the right top of the stage the circle would be 100% alpha with a color of like blue, on the bottom left it would be 0% alpha with a color of like green or something like that.
I have a doubt: When you open various flash pages in tabs, for example in Firefox, all those pages share the same Flash instance or each one use an instance of flash??
I am needing to have the three distinct areas to be different colors of text. Can I do it in this line only? These elemnts are being pulled in from the first part of my file and I want them all the same unitl I pull the the info into "feedback.htmlText".
when i run this code.. all is good and everything is read from the file trees.txt
var myLoader:URLLoader = new URLLoader() myLoader.dataFormat = URLLoaderDataFormat.VARIABLES myLoader.load(new URLRequest("trees.txt")) myLoader.addEventListener(Event.COMPLETE, onDataLoad)
[code]...
now what i am trying to do, and i am almost certain i am going the wrong way with this, is to add on rollover a button that corrosponds to the text the text will change color from black to red. meaning... if i rollover button_0 the text of tcname_0 with change to red , and if i rollover button_1 text in tcname_1 would change.. and so on. so here is what i did:
var myLoader:URLLoader = new URLLoader() myLoader.dataFormat = URLLoaderDataFormat.VARIABLES myLoader.load(new URLRequest("trees.txt"))
[code]...
2- if the loop works and doesnt break, i still have a problem of how to exactly pass the name of the text field that should be changed. right now i am hard coding it as tcname_2 to see if this even works but i would like it to somehow pass the button_x (x being the number) and use that x to change the corrosponding text i.e (tcname_x) .. is this even doable?
When using a ColumnChart created in Flex 3, how can I to change the fill color of columns that meet a certain criteria?
Example: I have 8 columns representing agreement percentages between groups of people and want to change the fill color (or otherwise highlight) of all the columns that have over 80% agreement.
I'm trying to change the colors of a blur filter. But I want the the colors to be constantly changing without any user interaction. So far i've set up a color matrix filter
What is the actionscript equivalent of Left$, Right$ and Mid$
how can I change the fill color of a graphic in code. I want to dynamically change the fill colour of a circle depending on the status of the user. At present the graphic is a circle with grey border and red fill in Graphic format.
I've been skinning some components and am having trouble changing the colours of the button in media playback component and the white and grey border round the listbox (I've included a closeup of this in the image to illustrate and highlighted the problems in red).
So I know how to target a specific instance using MovieClip(root).objectName which I think is nasty way of referring to it anyways, but right now I'm trying to make a fighting stick-figure game and I can only refer my code to one NPC right now using an "enemy" class but I would like it if I could spawn multiple NPC's at once using the enemy class and instead target the enemy class instead of the instance itself while still having the NPC instances being unique so when I hit one they don't all get hit.
Is there a way to group a bunch of movie clip instances into a single variable? Reason is, I have a lot of movie clips acting as buttons that I have added to event listeners. All of the movie clips with do the same functions and I have a few different functions created.
I was just wondering if there is a way to simplify this code. I have 3 identical movie clips and I use actionscript to alter the color to the same color. Right now I use 3 different colorTransform variables. Could I just use one since its all the same color? How would it look like.
So far, naming all the movie clips the same instance name did not work. Is there a better way?
I'm trying to make a custom PDF viewer in flash. Currently I've found a freeware server side script that will convert the PDF into a single Flash AS3 SWF file with each page from the PDF on a new frame. Loading this is no problem. I can navigate through the pages with a simple gotoAndStop(frame); call.
Here's my problem: I want to display more then one page at a time. I want to be able to scroll through the pages and see one page going off the top of the screen while the next is coming up from below. So, how can I put multiple instances of this SWF on the stage? Do I have to load it with a loader and URLRequest multiple times? or can I make copies of the one I've already got somehow?
I still have to load PDF in flash, but if I could find a better way to create an SWF out of the PDF. I'm currently using pdf2swf and it's great and all. Maybe there is some functionality to that program that I'm missing. Some other way to organize the PDF pages in the SWF.
I LOVE this actionscript, it will be so useful to me. [URL] However I one question; Is there anyway to have a pattern(image) show with the mouse over rather than a color?
make a similar menu like this site: [URL] look on the left side, when you click it it goes down and the other items just close and what my boss wants is that when you click something the link changes colors so it will be determined that your on that page my menu consists of a main menu then a sub menu then a sub sub menu
I am working is CS3 and am experiencing problems changing the first frame on a graphic symbol. When I type in a new number it jumps back to the old one. When I try to change play once/loop/single frame setting it jumps back to the previous setting. I am trying to simply modify this on a keyframe in the symbol's layer on the main stage. I've experienced this on multiple occasions, but can't get the workaround this time. I know I can do what I am attempting. In fact, I do it at a couple of spots earlier in this symbol's instance without problems.
I'm trying to create a listing of thumbnails using the TileList component, and so far it's working great. Is there a way to change the appearance of a single ImageCell within the component.I'm bringing in the thumbnail data as XML, and I have an attribute for whether it's a "new" image or not. I would like it to display a small badge over the individual thumbnail in my application.
I should note that I made a subclass of the ImageCell class (implementing ICellRenderer) to set my custom skins, but when I tried adding conditional code here (checking for the "new" parameter I set, It simply doesn't work (no error messages).
1) I'm trying to change the position of two different MovieClips instances to the same .x position. It works individually, but as soon as I put this code in, it says that it cannot assign it to a non reference value:
2) I have a whole load of variables which are all going to different .x positions at the same event trigger - something similar to this, but there's around 30 of them:
I have several instances of a movieclip which I placed on stage dynamically out of the library. Inside these movieclips I have a textfield. Is there a way that I can change the text of each instance independently?
Code: var backing1:mcBacking = new mcBacking ; backing1.x = 94;