PDA

View Full Version : loading a movieclip after a transition


jlc
02-01-2009, 09:04 PM
Hi,

How do you open a movieclip after a transition.

I want the Border stuff to fade in but only after the background has faded in?

I either can't get it to load or it is loaded before the bg loads.

Can anyone lend a hand?

Thanks,
J.

import fl.transitions.*;
import fl.transitions.easing.*;

var BG:BGGraphic = new BGGraphic();
addChild(BG);
BG.x = 0;
BG.y = 0;

//Border stuff
var BottomLeft1:BottomLeft = new BottomLeft();
var BottomRight1:BottomRight = new BottomRight();
var TopLeft1:TopLeft = new TopLeft();
var TopRight1:TopRight = new TopRight();
BottomLeft1.x = 315;
BottomLeft1.y = 30;
BottomRight1.x = 145;
BottomRight1.y = 30;
TopLeft1.x = 315;
TopLeft1.y = 186;
TopRight1.x = 145;
TopRight1.y = 186;


//Transition for background to come in
var myTrans:TransitionManager = new TransitionManager(BG);
myTrans.startTransition({type:Fade,direction:Trans ition.IN,duration:2,easing:Strong.easeIn});

RefreshGFX
02-03-2009, 02:37 PM
Hey ... I've only just started learning AS 3.0 -- So, all I can offer you is a link ...

http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/fl/transitions/TransitionManager.html

Specifically -- scroll to the bottom of the page where the first comment starts and read from there. It seems to explain an undocumented feature of AS 3.0 called "allTransitionsInDone" - which is what I think you're looking for.

Good luck.