Skip to main content
barpos
Known Participant
May 4, 2011
Answered

allTransitionsOutDone problem

  • May 4, 2011
  • 1 reply
  • 1495 views

Can anyone explain why the following code doesn't work completely?

var industriesTM:TransitionManager = new TransitionManager(IndustriesTxt);
var usifabTM:TransitionManager = new TransitionManager(UsifabTxt);
var rawdonTM:TransitionManager = new TransitionManager(RawdonTxt);

industriesTM.startTransition({type:Blinds, direction:Transition.OUT,  duration:3, easing:None.easeIn, numStrips:25, dimension:0});
usifabTM.startTransition({type:Blinds, direction:Transition.OUT, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
rawdonTM.startTransition({type:Blinds, direction:Transition.OUT, duration:3, easing:None.easeIn, numStrips:25, dimension:0});

industriesTM.addEventListener("allTransitionsOutDone", doneTrans);
function doneTrans(event:Event):void
{
industriesTM.startTransition({type:Blinds, direction:Transition.IN,  duration:3, easing:None.easeIn, numStrips:25, dimension:0});
usifabTM.startTransition({type:Blinds, direction:Transition.IN, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
rawdonTM.startTransition({type:Blinds, direction:Transition.IN, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
}

The industriesTM.startTransition() line within the listener does not  execute.  If I change the industriesTM.addEventListener to  usifabTM.addEventListener instead, then usifabTM.startTransition() and  industriesTM.startTransition() lines do not execute.

Why?

Regards,

Ron

This topic has been closed for replies.
Correct answer relaxatraja

Sent!  Let me know what you find ...


In your "Main AS3" layer Move your first keyframe with cod to 18th frame it works. The problem is on the tween to confirm that

1 reply

relaxatraja
Inspiring
May 5, 2011
barpos
barposAuthor
Known Participant
May 5, 2011

Yes, I learned it there, but there's no mention on how to reset things.

Here's a sample from that link:

import fl.transitions.*;
import fl.transitions.easing.*;
var myTM:TransitionManager = new TransitionManager(my_mc);
myTM.startTransition({type:Zoom, direction:Transition.IN, duration:7, easing:Strong.easeOut});
myTM.startTransition({type:Rotate, direction:Transition.IN, duration:7.5, easing:Bounce.easeOut});
myTM.startTransition({type:PixelDissolve, direction:Transition.IN, duration:5, easing:Strong.easeOut});
myTM.startTransition({type:Fly, direction:Transition.IN, duration:4, easing:Strong.easeOut});

By adding multiple .startTransition() lines, you are combining them together as opposed to sequentially executing one by one.

In my case, one line is Transition.IN and the next Transition.OUT, therefore they conflict.

Regards,

Ron

relaxatraja
Inspiring
May 6, 2011

The code given by you is working fine:

import fl.transitions.*;
import fl.transitions.easing.*;
var industriesTM:TransitionManager = new TransitionManager(IndustriesTxt);
var usifabTM:TransitionManager = new TransitionManager(UsifabTxt);
var rawdonTM:TransitionManager = new TransitionManager(RawdonTxt);

industriesTM.startTransition({type:Blinds, direction:Transition.OUT,  duration:3, easing:None.easeIn, numStrips:25, dimension:0});
usifabTM.startTransition({type:Blinds, direction:Transition.OUT, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
rawdonTM.startTransition({type:Blinds, direction:Transition.OUT, duration:3, easing:None.easeIn, numStrips:25, dimension:0});

industriesTM.addEventListener("allTransitionsOutDone", doneTrans);
function doneTrans(event:Event):void
{
industriesTM.startTransition({type:Blinds, direction:Transition.IN,  duration:3, easing:None.easeIn, numStrips:25, dimension:0});
usifabTM.startTransition({type:Blinds, direction:Transition.IN, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
rawdonTM.startTransition({type:Blinds, direction:Transition.IN, duration:3, easing:None.easeIn, numStrips:25, dimension:0});
}

Note: IndustriesTxt should be a movieclip