|
-
Alpha tween fade in and out AS3
Hello! I'm trying to find the most easiest way to fade in and out a movieclip in AS3. What I did is this:
import fl.transitions.Tween;
import fl.transitions.easing.*;
import fl.transitions.TweenEvent;
var myTween:Tween;
TweenOut();
function TweenOut():void
{
myTween = new Tween(text_mc, "alpha", Strong.easeIn, text_mc.alpha, 0, 3, true); myTween.addEventListener(TweenEvent.MOTION_FINISH, tweenFinishedHandler);
}
function tweenFinishedHandler(event:TweenEvent):void { myTween = new Tween(text_mc, "alpha", Strong.easeIn, text_mc.alpha, 1, 2, true);
}
But it doesn't give me the result I'm after (it is reversed and starts highlighted then fades out and back highlighted again, should be the other way around. Also I would like to set the number of seconds it stays highlighted before fading out again).
Any ideas?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|