flash on 2012-9-20

by russ
♥0 | Line 18 | Modified 2012-09-20 12:54:06 | MIT License
play

ActionScript3 source code

/**
 * Copyright russ ( http://wonderfl.net/user/russ )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/9jAd
 */

<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
               xmlns:s="library://ns.adobe.com/flex/spark"
               xmlns:mx="library://ns.adobe.com/flex/mx" >
    <fx:Declarations>
        <s:Rotate3D id="phaseOut" angleYFrom="0" angleYTo="90" duration="500" />
        <s:Rotate3D id="phaseIn" angleYFrom="-90" angleYTo="0" duration="500" startDelay="500" />
    </fx:Declarations>
    <mx:ViewStack id="viewstack1" width="200" height="200" horizontalCenter="0" verticalCenter="0">
        <s:NavigatorContent label="View 1" width="100%" height="100%" hideEffect="{phaseOut}" showEffect="{phaseIn}" >
            <s:Label id="label1" text="This is state 1" horizontalCenter="0" verticalCenter="0" transformX="50"/>
        </s:NavigatorContent>
        <s:NavigatorContent label="View 2" width="100%" height="100%"  hideEffect="{phaseOut}" showEffect="{phaseIn}">
            <s:Label id="label2" text="This is state 2" horizontalCenter="0" verticalCenter="0" transformX="50"/>
        </s:NavigatorContent>
    </mx:ViewStack>
    <s:Button label="Toggle" click="viewstack1.selectedIndex=(viewstack1.selectedIndex==0?1:0)"  horizontalCenter="0" top="10"/>
</s:Application>