Copy link to clipboard
Copied
The attached Ai file contains several parts (states) each of which needs to be imported to Flash as an individual movie clip; and then be able to color each of the states individually. At some later stage actionscript 3 needs to change each state's color. How to achieve each of these steps?
Copy link to clipboard
Copied
Each movieclip has a colorTransform property that you can change using the properties and methods of the ColorTransform class.
myClip.transform.colorTransform=new ColorTransform(1,1,1,1,255,0,0,0);
That will make myClip red. There are a lot of ways to use it.
Copy link to clipboard
Copied
Thanks for your reply.
I tried your suggestion (see file attached to this email) with no success,
ie it changes the fill to a very pale pink and the boundary (stroke) to red.
What I really want to do is be able to change the color of the fill quite
independently of the color of the boundary. For example in the attached how
can I just change the color of the fill whilst leaving the boundary black?
And how can I change the color of the boundary while leaving the fill color
the same?
I have tried various filters but all I want is to just keep that boundary
constant except for changing the color.
I don't have any problem in setting up say a rectangle as a graphic and
changing the fill and the stroke independently. This approach doesnt work
for the attached file where the display object was imported from Ai and
converted to a movie clip.
Copy link to clipboard
Copied
If the fill is a pale color, it suggests you have the alpha less than 100%. As for changing the fill vs the border - you can see how TweenLite takes a movieClip as it's first parameter... you will need to split out the border and fill into separate clips.
Copy link to clipboard
Copied
I would suggest TweenLite, it makes it real easy to color clips. This will color the mc clip cyan in one second:
TweenLite.to(mc, 1, {tint:0x3399ff});
Copy link to clipboard
Copied
Don't seem to have TweenLite in my Flash CS3 Professional system. Is it in a
later version of Flash?
Copy link to clipboard
Copied
it's a public class made by greensock: http://blog.greensock.com/tweenliteas3/
Get ready! An upgraded Adobe Community experience is coming in January.
Learn more