PDA

View Full Version : Box colour change



cookie
June 15th, 2003, 06:03 PM
I have a box which covers part of the stage and I want this box to change colour, but not any colours just a few that I pick. I want the transition between the colours to be as smooth as possible and not too fast. Can this be done with AS?:crazy:

lostinbeta
June 15th, 2003, 06:15 PM
http://www.kirupaforum.com/forums/showthread.php?s=&threadid=22838

cookie
June 15th, 2003, 06:33 PM
Thanks for the link lost but where do i put the code?

zylum
June 15th, 2003, 06:39 PM
in the main timeline? remember to use your movie clips name rather than 'myMovieClip' or 'this'

cookie
June 20th, 2003, 05:02 PM
Ok I have created an example of the effect I want to achieve with AS! I have attached my file and I hope that someone can help me with the code so that the tweening between the colours that I have used is smooth! Perhaps the whole thing can be done without the use of several instances of the same bg symbol, as I have done now?

Thanks :tie:

zylum
June 21st, 2003, 12:26 AM
you want the color in the background to cycle?

cookie
June 22nd, 2003, 02:50 PM
YES!

lostinbeta
June 22nd, 2003, 03:16 PM
With your setup it would be easiest to just right click between each keyframe and choose "Insert Motion Tween" to create a motion tween between each one.

Considering you are using gradients you could only fade them either through tweens or via beginGradientFill() in the drawing API with Flash MX. And lemme tell ya, that beginGradientFill() isn't for beginners :hangover: