Fade background color in new color : actionscript
Have ya ever wanted to change your background color during runtime using actionscript instead of having a timeline event? Did you by any change want to have it fade from it’s current color to the new color with the click of a button?
Well, if so today’s your lucky day. For a site I’m working on I needed to make the buttons when clicks change the background color, so I set out to do it. The first and pretty much only problem I encountered was when you changed the background it would show the stage background and not the last color showed. So if I click red and then clicked orange I would want it to fade from red to orange. Well what I was getting was red, white, then fade to orange. But after about 15 minutes or so of playing I figured out a way around it.
So anyways, it works now and you can easily change the speed of fade by changing the alpha added to itself. Here’s the link. Hope it’s of some use to ya’s ^_^