james,

thats what i thought until yesterday when i found this:
http://livedocs.adobe.com/flex/201/langref/mx/states/Transition.html

this is straight from the documentation. it seems to be sequencing it but
there is something missing. like, if RemoveChildAction is removing something
what is it removing? if AddChildAction is adding something what is it
adding? If SetPropertyAction is setting a property does change the order
that was specified in the states tag?

       <!-- Define the transition from the base state to the Register state.-->
       <mx:Transition id="toRegister" fromState="*" toState="Register">
           <mx:Sequence targets="{[loginPanel, registerLink, confirm,
loginLink, spacer1]}">
               <mx:RemoveChildAction/>
               <mx:SetPropertyAction target="{loginPanel}" name="title"/>
               <mx:SetPropertyAction target="{loginButton}" name="label"/>
               <mx:SetStyleAction target="{loginButton}" name="color"/>
               <mx:Resize target="{loginPanel}"/>
               <mx:AddChildAction/>
           </mx:Sequence>
       </mx:Transition>

@stephen - reading now...


On 5/25/07, Stephen Gilson <[EMAIL PROTECTED]> wrote:

   You might want to take a look at the updated states doc that we just
pushed on the Flex Doc blog: http://blogs.adobe.com/flexdoc/

Stephen

 ------------------------------
*From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On
Behalf Of *jandersen1978
*Sent:* Friday, May 25, 2007 2:41 PM
*To:* flexcoders@yahoogroups.com
*Subject:* Re: [flexcoders]How do States and Transitions relate?

 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 flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "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