Johnny Walker
2008-10-24 10:26:20 UTC
Hi,
I want to place a movieclip in the stage but I want it to appear
transparent (alpha=0) and then fade it to opaque (alpha=1) to make it
appear slowly.
The problem is when I place the movieclip in the stage, the object is
visible for a brief moment before the next sentence that makes it
transparent is executed.
Here is part of the code:
addChild(_myMovieClip); //add my clip to the stage
_myMovieClip.alpha = 0; //make it transparent
TweenLite.to(_myMovieClip, 5, {alpha:1}); //fade it in
(TweenLite is a tweening engine that in this case changes the alpha
property of _myMovieClip from 0 to 1 in 5 seconds, but this I suppose is
irrelevant to the problem)
How can I solve this?
I want to place a movieclip in the stage but I want it to appear
transparent (alpha=0) and then fade it to opaque (alpha=1) to make it
appear slowly.
The problem is when I place the movieclip in the stage, the object is
visible for a brief moment before the next sentence that makes it
transparent is executed.
Here is part of the code:
addChild(_myMovieClip); //add my clip to the stage
_myMovieClip.alpha = 0; //make it transparent
TweenLite.to(_myMovieClip, 5, {alpha:1}); //fade it in
(TweenLite is a tweening engine that in this case changes the alpha
property of _myMovieClip from 0 to 1 in 5 seconds, but this I suppose is
irrelevant to the problem)
How can I solve this?