topical media & game development
professional-flex-code-08-ViewStates.mx
professional-flex-code-08-ViewStates.mx
[swf]
flex
<?xml version="1.0" ?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
backgroundColor="#FFFFFF">
<mx:states>
<mx:State name="Description">
<mx:AddChild relativeTo="{hbox1}" position="before">
<mx:TextArea width="200" height="180"
borderStyle="none"
text="Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. "/>
</mx:AddChild>
<mx:RemoveChild target="{descButton}"/>
<mx:AddChild relativeTo="{hbox1}" position="before">
<mx:Button label="Close Description"
click="this.currentState=''"/>
</mx:AddChild>
</mx:State>
</mx:states>
<mx:VBox id="vbox1" borderStyle="outset" paddingLeft="5" paddingBottom="5" paddingRight="5" paddingTop="5">
<mx:Label text="Product Name" fontWeight="bold" />
<mx:Button label="Open Description"
click="this.currentState='Description'"
id="descButton"/>
<mx:HBox id="hbox1">
<mx:Label text="$3.99"/>
<mx:NumericStepper id="qty" minimum="1"
maximum="10" stepSize="1"/>
<mx:Button label="Add to Cart"/>
</mx:HBox>
</mx:VBox>
</mx:Application>
(C) Æliens
04/09/2009
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.