Flex 4 animation question

Posted by Jerry on Stack Overflow See other posts from Stack Overflow or by Jerry
Published on 2010-06-18T04:14:30Z Indexed on 2010/06/18 4:23 UTC
Read the original article Hit count: 296

Filed under:
|
|

Hello.. I am trying to do the move vertically animation on a button nested in the vertical layout. I am not sure if the Hgroup restricts the button moving vertically. Are there ways to go around it? Thanks for the helps.

<s:states>
<s:State name="default"/>
<s:State name="addRecommend"/>
<s:State name="seeOther"/>
</s:states>


AS:

protected function add_clickHandler(event:MouseEvent):void
{
currentState="addRecommend";
addRecommendMove.play();
}





<s:transitions>
<s:Transition fromState="default" toState="addRecommend">
<s:Sequence id="addRecommendMove">
<s:Move yTo="50" target="{add}"/>  // add button doesn't move at all
</s:Sequence>
</s:Transition>
<s:Transition fromState="addRecommend" toState="seeOther">
<s:Sequence>
<s:Move yBy="50" target="{seeOthers}"/>
</s:Sequence>
</s:Transition>
</s:transitions>




<s:layout>
<s:VerticalLayout paddingTop="15" paddingRight="10" paddingLeft="7"/>
</s:layout>


<button id="add" click=add_clickHandler(event)/>
<button id="seeOthers"/>

© Stack Overflow or respective owner

Related posts about flex

Related posts about animation