PDA

View Full Version : Scripted fading colour changing query



SBuskell
June 30th, 2004, 11:06 AM
Does any1 know how to change a movieclip's colour value using AS? Thing is I need it to fade from 1 to another, not just flick like in all the tutorials I've found so far.

Can any1 help or point me at a tute or sumthing?

Im not gr8 at AS so the simpler the better. Thanks.

MzzM
June 30th, 2004, 11:53 AM
You can always use a motion tween on the MC and save the whole tween in a new MC which you can activate at anytime. Then if u use

_root.YourMCName.gotoAndPlay(1);

it should play a smooth tween between the two colours, depending on how many frames you use.

davidchang
June 30th, 2004, 11:58 AM
this should work

http://www.kirupa.com/developer/flash5/randomcolor.htm

SBuskell
June 30th, 2004, 12:00 PM
You can always use a motion tween on the MC and save the whole tween in a new MC which you can activate at anytime. Then if u use

_root.YourMCName.gotoAndPlay(1);

it should play a smooth tween between the two colours, depending on how many frames you use.

Thats what I have at the moment. The trouble is its pretty big and im getting nasty nasty slow down. I was hoping that using script rather than tweening mite cut down the choppiness. finger Xed.

Thanks anyway though dude. Any other ideas?

MzzM
June 30th, 2004, 12:02 PM
it seems that david has found a suitable answer for u, pretty good tut... worth a look, should solve ur problems fella.

Take it easy, hope u get sorted :s:

SBuskell
June 30th, 2004, 12:04 PM
this should work

http://www.kirupa.com/developer/flash5/randomcolor.htm

Woh! Thats way over my head! Any ideas on simplifying that? I dont know which bits i need.

I dont need any random script, just the fade from 1 colour 2 another. Help?!