Sometimes you make discoveries that change your world…
I made one tonight. Working on my new Flash portfolio, I’ve got a moving background on which they were small menus.
Each menu were triggered by a button. When clicking on them, the menu changed from alpha : 0 to alpha : 100.
My discovery is the following :
The Flash engine make a MAJOR difference between an object with an _alpha == 0 and an object _visible == false.
If an object has an alpha not equal to 100, the engine calculate thru a graphic routine what has to be shown. In the case of an object hidden, he don’t take it in consideration.
Check these two examples. Each swf has the same FPS (12) - I swear ! Oh and btw, this is only an example, my portfolio is not completed.
http://www.bellesfessescity.com/dump_laurent/portfolio/portfolio_alpha.html
Slow, specially on a low-end computer.
http://www.bellesfessescity.com/dump_laurent/portfolio/portfolio_visible.html
Look at the difference !
Morale : instead of putting your object at alpha 0, put them hidden.