Page Transitions

transitionInHandler

public function transitionInHandler(value:Object):void
{
    if (varcentral.flebActiveID == "static")
    {
        varcentral.flebActivePage.x = -100;
        TweenLite.to(varcentral.flebActivePage,.5,{alpha:1, x:0});
    } else {
        varcentral.flebActivePage.x = 0;
        TweenLite.to(varcentral.flebActivePage,.5,{alpha:1});
    }
}

This function is called whenever you load a new page. It controls how your previous page animates in. Warning: this function does not run when you go to your home page.

transitionOutHandler

public function transitionOutHandler(value:Object):void
{
    if (varcentral.flebActiveID == "static")
    {
        TweenLite.to(varcentral.flebPreviousPage,.5,{alpha:0, x:"+100", onComplete:transitionOutCompleteHandler});
    } else {
        TweenLite.to(varcentral.flebPreviousPage,.5,{alpha:0, onComplete:transitionOutCompleteHandler});
    }
}

This function is called whenever you load a new page. It controls how your previous page animates out. Warning: this function does not run when you go to your home page and also when the previous page is home.

addressChangeHandler

The most basic function in Main.as. It controls the navigation. This function is called whenever the SWF address is changed. It is not called when a deep linking is happening. The transition there is computed inside the corresponding page.swf.

Post A Comment

Anti-Spam Quiz: