-
setRGB
Hi there
Ive got a moviclip in the Library = Myfill
How can set the color in main timeline 1. frame with AS3
Regards
flemming
-
Product Designer
DisplayObject.transform.ColorTransform;
Look this up in the ActionScript documentation.
Remember that you may not apply changes to a transform object.
You must first create a new one (or copy the original one), apply changes to that, and then apply the transform object to your target object.
Altruism does not exist. Sustainability must be made profitable.
-
thanks yeah
import flash.geom.ColorTransform;
var color_transf:ColorTransform = mc.transform.colorTransform;
color_transf.color = 0xff0000;
Btn_fill.transform.colorTransform = color_transf;
BUT how can I change colors of more Moveclips in my Library
You see my clips are placed around in many other clips - So is there a way to change the color Global without thinking of wich movieclip its inside
Eg: _root.scroll.arrow.Btn_fill
:-)
-
Product Designer
Well I don't know of any built-in feature for that.
But you could design a class for that, a controller.
Basically you could register your movieclips with such controller (which would store pointers in an array), so you just call a method on the controller and leave the task of setting the color for all registered movieclips to it.
Or the opposite way around, you could use the controller to dispatch a "colorChange" event throughout the whole movie, and register an event handler within each movieclip which will take care of changing the color for it's referring movieclip whenever the event is dispatched.
Altruism does not exist. Sustainability must be made profitable.
-
Well if you don't need to give them unique color changes can't you just apply the change to the thing that contains them all?
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
|