-
Flash Gurus:
Is it possible to adjust the RGB (color) settings for a movie-clip or button symbol? Everything I've read seems to indicate that setRGB only works for an actual movie clip, not a simple symbol...
What I'd like to be able to do is have an onclick event that dynamically changes the colors of some symbols. I know the _alpha property seems to work for these symbols, and that gets me close to where I'd like to be, but just not all the way.
Are there commands or functions that I am missing? Is there another way I could do this without creating multiple symbols for each color I want to have? Any help you may be able to provide is greatly appreciated!
Thanks,
Sean
-
just drag a symbol to stage and convert it into movieclip ... i think there is no other thing is there to chang RGB dynamically .... yeah u can chage RGB of it at designing stage ...
-
the indian
in flash MX i think all symbols like buttons and textfields have instance names , cant we use these instance names in setRGB to change RGB at runtime?
-
never tried ... i'll try if i got a time or u also try ..
-
hi guys,
You can always change the color of buttons and dynamic text field at run time.
i will explain of you about button :
just make the button and put it on the stage give the instant name "bt" to it now put the following code on the main frame of root where you put the button.
Code:
myColor = new Color(_root.bt);
myColor.setRGB(0xff1933);
this will definately change the color of button..and about the dynamic text field there are lots of function for the text field.
textfield.backgroundcolor will change the back ground color of it.
-
let's see if i remember the code correct...
when you set the rgb of a symbol it will be easier to use bitshift than writing hex numbers...
so instead of:
Code:
myColor = new Color(_root.bt);
myColor.setRGB(0xff1933);
use:
Code:
myColor = new Color(_root.bt);
myColor.setRGB(255<<16||255<<8||255); //this is RGB white...
.b
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|