Skip to main content
DanEdmonds
Known Participant
May 21, 2009
Answered

Trigger a function when a transition is complete?

  • May 21, 2009
  • 1 reply
  • 608 views

I am creating an intro where a sequence of tweens and transitons are triggered. The problem is that I can't figure out how to get an event to happen when a transition is complete. How can I get "headTitleTm" to trigger the "sigIn" function once it is done?

Thanks!

Code:

function headTitleTransition(event:TweenEvent):void{
        var headTitleTm:TransitionManager = new TransitionManager(headTitle);
        headTitleTm.startTransition({type:Photo, direction:Transition.IN, duration:.20, easing:None.easeNone});

        headTitleTm.addEventListener(Event.COMPLETE, sigIn);

}

function sigIn(e:Event):void{

     trace('sigIn');

}

This topic has been closed for replies.
Correct answer

myTtransition.addEventListener("allTransitionsInDone", doneTrans);

what about that

1 reply

May 21, 2009

If its a tween event ...

headTitleTm.addEventListener(TweenEvent.MOTION_FINISH,signIn);

function signIn(e:TweenEvent){

}
DanEdmonds
Known Participant
May 21, 2009

Thank you for your reply.

I have tried that already and did once again just to make sure and it runs without error but is not outputting my trace. I am thinking that maybe a "TweenEvent" listener couldn't be used with a transition but there is no error.

Correct answer
May 21, 2009

myTtransition.addEventListener("allTransitionsInDone", doneTrans);

what about that