suganya's Blog

Just another WordPress.com weblog

A simple transition

<?xml version=”1.0″?>
<mx:Application xmlns:mx=”http://www.adobe.com/2006/mxml”>
<mx:Panel title=”Sign In” id=”signinPanel” fontSize=”12″
backgroundAlpha=”0.0″>
<mx:Form id=”loginForm” backgroundAlpha=”0.0″>
<mx:FormItem label=”Email:”
id=”emailItem”
backgroundAlpha=”0.0″>
<mx:TextInput id=”emailText”/>
</mx:FormItem>
<mx:FormItem label=”Password:”
id=”passwordItem”>
<mx:TextInput id=”passwordText”
displayAsPassword=”true”/>
</mx:FormItem>
</mx:Form>
<mx:ControlBar>
<mx:LinkButton id=”forgotPasswordLink”
label=”Forgot password?”
click=”currentState=’RequestPassword’” />
<mx:Spacer width=”100%” id=”spacer”/>
<mx:Button label=”Sign in” id=”signinButton”/>
</mx:ControlBar>
</mx:Panel>

<mx:states>
<mx:State name=”RequestPassword”>
<mx:SetProperty target=”{signinPanel}” name=”title”
value=”Request New Password”/>
<mx:SetProperty target=”{signinButton}” name=”label”
value=”Submit”/>
<mx:RemoveChild target=”{forgotPasswordLink}”/>
<mx:AddChild relativeTo=”{spacer}” position=”before”>
<mx:target>
<mx:LinkButton id=”signInLink”
label=”Return to Sign In” click=”currentState=””/>
</mx:target>
</mx:AddChild>
<mx:RemoveChild target=”{passwordItem}”/>
</mx:State>
</mx:states>

<mx:transitions>
<mx:Transition fromState=”*” toState=”*”>
<mx:Parallel id=”t1″ targets=”{[signinPanel,loginForm,passwordItem]}”>
<mx:WipeLeft />
</mx:Parallel>
</mx:Transition>
</mx:transitions>
</mx:Application>

June 9, 2009 Posted by | States and Transitions | Leave a Comment

   

Follow

Get every new post delivered to your Inbox.