Question

I am developing flex mobile project in adobe air, using flash builder 4.7, i am able to apply Transition in views, How can i apply Transition to Spark components like BorderContainer, List...

<s:BorderContainer id="Login" backgroundAlpha="0" borderStyle="inset" visible="true" >
<s:Label width="100%" height="100%" color="white" text="Logon Details"/>
<s:TextArea prompt="UserName" id="txtuser" />
<s:TextArea prompt="Password" id="txtpwd" />            
<s:CheckBox />
<s:Button id="btnlogin" color="white" fontFamily="Book Antiqua" fontWeight="bold"/>
<s:Button id="btnreset" color="white" fontFamily="Book Antiqua" fontWeight="bold"/>
</s:BorderContainer>

I would like to apply Transition for above BorderContainer, like moving BorderContainer to another location in screen on clicking a button. Thanks in Advance...

Was it helpful?

Solution

Here is a little code to show you how to use a Tween manually, without a Transition.

<fx:Declarations>
   <mx:Move id="myMove" target="{login}" xTo="200" yTo="500"/>
</fx:Declarations>

<s:Group width="100%" height="100%">
    <s:BorderContainer id="login" />
</s:Group>

<s:Button id="button" click="myMove.play(); button.enabled=false;" />

You may find, for each Tween, some code example in the reference, such as this one.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top