What containers do we need to use when working Flex 3 States
hi ,
my question , when mx:states defined in other container , other mx:aplication , showing compile ime error.
please check code , let me know , whats problem :
i working flex 3 states . is sample program , working absolutely fine :
as can see states defined under application container .
<mx:application
xmlns:mx="http://www.adobe.com/2006/mxml"
currentstate="bad">
<mx:states>
<mx:state name="bad">
<mx:setproperty target="{label1}" name="text" value="bad day!"/>
<mx:setproperty target="{linkbutton1}" name="label" value="go good"/>
</mx:state>
<mx:state name="vgood" >
<mx:setproperty target="{linkbutton1}" name="label" value="go good"/>
</mx:state>
</mx:states>
the code not working below :
here putting states defination under <mx:form> container .
basically want show 1 state whne displaying form tried <mx:form currentstate='bad'>
please let me know why wrong
<mx:form>
<mx:states>
<mx:state name="bad">
<mx:setproperty target="{label1}" name="text" value="bad day!"/>
<mx:setproperty target="{linkbutton1}" name="label" value="go good"/>
</mx:state>
<mx:state name="vgood" >
<mx:setproperty target="{linkbutton1}" name="label" value="go good"/>
</mx:state>
</mx:states>
<mx:form>
please tell me why isn't possible ??
hi kiran,
from flex docs says can use state class in states
property of flex components. can specify states
property @ root of application or custom control, not on child controls.
so cannot use in other child containers....so states defined component , not sub containers or sub components..
thanks,
bhasker chari
More discussions in Flex (Read Only)
adobe
Comments
Post a Comment