I'm no expert in states and transitions but as I understand it you 
define states if you want to add or remove children from a 
component, change properties etc.  The transitions define any 
animations that take place going from one state to another.

Just taking a quick look at your MXML below I'm not sure you want 
the AddChild, RemoveChild and SetProperty tags in your sequence 
tag.  I believe only effect tags should go there...  Might want to 
have another look at the documentation

http://livedocs.adobe.com/flex/201/html/wwhelp/wwhimpl/common/html/ww
help.htm?context=LiveDocs_Book_Parts&file=tutorial_states_022_6.html

--- In [email protected], "dorkie dork from dorktown" 
<[EMAIL PROTECTED]> wrote:
>
> Hi All,
> 
> I'm trying to understand how transitions relate to states and I 
don't really
> get it. I've been through the docs but it still is not clear to 
me. For
> example, what does the "Action" mean? Are transitions supposed to 
be some
> sort of ordering mechanism? I have taken some code from the 
documentation
> and modified it here:
> 
>     <mx:states>
>         <mx:State name="menuTop">
>             <mx:SetProperty target="{linkBarNav}" name="visible"
> value="false"/>
>             <mx:SetProperty target="{menu}" name="y" value="43"/>
>             <mx:SetProperty target="{linkBarNav}" name="y" value="-
1"/>
>         </mx:State>
>     </mx:states>
> 
>     <mx:transitions>
>         <!-- Define the transition from the base state to the 
menuTop
> state.-->
>         <!-- I want to move menu and link bar up and then reveal 
linkbar.
> menu is visible all the time.-->
>         <mx:Transition id="menuTopTransition" fromState="*"
> toState="menuTop">
>             <mx:Sequence targets="{[menu, linkBarNav]}">
>                 <mx:RemoveChildAction/>
>                 <mx:SetPropertyAction target="{menu}" 
name="visible"/>
>                 <mx:Move duration="300" targets="{[menu, 
linkBarNav]}"/>
>                 <mx:WipeRight duration="200" 
target="{linkBarNav}"/>
>                 <mx:AddChildAction/>
>             </mx:Sequence>
>         </mx:Transition>
>     </mx:transitions>
>


Reply via email to