views:

113

answers:

1

Hi,

I have the following code

      TransitionManager.start(babyPreloader,{type:Fade, direction:Transition.OUT,      duration:0.5, easing:Regular.easeOut});
      var tempPreloader:DisplayObject = babyPreloader as DisplayObject; 
      this.removeChild(tempPreloader);

But since this does not wait for the transition to complete. I cannot see the transition happening. Is there a way to have a even listener for transition complete?

A: 

Use TweenMax for example:

TweenMax.to(babyPreloader, 0.5, {alpha:0, onComplete:done});

...

private function done():void
{
   removeChild(babyPreloader);
}
bitc