Creating an staggered tween assistance
I was trying to create a tween that would fade objects in one after another. Ideally when one movieclip fades in at about 90% it would trigger the next movieclip to fade in, and the next would do the same and so on. I figured I could use the onMotionChanged with if statements to trigger them at 90% and then start the next tween, but Im not getting the expected results. the code I have appears to work, until it wants to goto the next function. All the other animations appear slow and choppy
I think its because the onMotionChanged is simular to onEVENT that calls the actions every second that the tween is moving, I thought I had set up the if statements to limit that, but it still isint working. Here is the code Im using that is creating the problem. Hopefully from my description and code, someone can tell me whats wrong (what am I doing wrong) and how I can fix it.)
Thanks
function starter ()
{
clearTimeout(holdit)
var fadeout:Tween = new Tween (starter_mc,"_alpha",Strong.easeOut,100,0,2,true);
fadeout.onMotionChanged = function ()
{
if (starter_mc._alpha > 0 && starter_mc._alpha < 10)
{
var fadeiname:Tween = new Tween (name_mc,"_alpha",Strong.easeOut, name_mc._alpha,100,2,true);
fadeiname.onMotionChanged = function ()
{
if (name_mc._alpha >90 && name_mc._alpha <95)
{
var fadeinaddress:Tween = new Tween (location_mc,"_alpha",Strong.easeOut,location_mc._alpha,100, 3,true);
}
if (name_mc._alpha >97 && name_mc._alpha < 100 )
{
var fadeintop:Tween = new Tween (accessible_mc,"_alpha",Strong.easeOut,accessible_mc._alpha, 100, 4,true);
fadeintop.onMotionFinished = function ()
{
var holdit = setTimeout (stagetwo, 3000)
}
}
}
}
}
}
