Change view state : State « Effects « Flex

Home
Flex
1.Chart
2.Components
3.Container
4.Data Model
5.Development
6.Effects
7.Event
8.Graphics
9.Grid
10.Style
Flex » Effects » StateScreenshots 
Change view state
Change view state
          
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" width="400">
  <mx:states>
    <mx:State name="One">
      <mx:SetProperty target="{p1}" name="x" value="110" />
      <mx:SetProperty target="{p1}" name="y" value="0" />
      <mx:SetProperty target="{p1}" name="width" value="200" />
      <mx:SetProperty target="{p1}" name="height" value="210" />
    </mx:State>
  </mx:states>
  <mx:Canvas id="pm" width="100%" height="100%">
    <mx:Panel id="p1" title="One" x="0" y="0" width="100" height="100" click="currentState='One'">
      <mx:Label fontSize="24" text="One" />
    </mx:Panel>
    <mx:Panel id="p3" title="Three" x="110" y="0" width="200" height="210" click="currentState=''">
      <mx:Label fontSize="24" text="Three" />
    </mx:Panel>
  </mx:Canvas>
</mx:Application>

   
    
    
    
    
    
    
    
    
    
  
Related examples in the same category
1.Add child to StateAdd child to State
2.Add child before in a StateAdd child before in a State
3.Add child to position in a StateAdd child to position in a State
4.Add or remove childrenAdd or remove children
5.Using different creation policiesUsing different creation policies
6.Setting overrides on component propertiesSetting overrides on component properties
7.Change the enabled property for two Button controls, setting one false, and the other trueChange the enabled property for two Button controls, setting one false, and the other true
8.View defining two states
9.View StatesView States
10.Setting event handlers with StateSetting event handlers with State
11.Change control property in state changingChange control property in state changing
12.Remove a child in state changingRemove a child in state changing
13.Create State based on existing StateCreate State based on existing State
14.Set current state to nullSet current state to null
15.Change control color in StateChange control color in State
16.Add child relative to an existing control in StateAdd child relative to an existing control in State
17.Use two statements in click event inlineUse two statements in click event inline
18.Add child and change property when state changedAdd child and change property when state changed
19.Creating a simple view stateCreating a simple view state
20.Set Transition stateSet Transition state
21.Two statements in the click attributeTwo statements in the click attribute
22.Adding and removing components with StateAdding and removing components with State
23.Adding and removing components by changing stateAdding and removing components by changing state
24.Adding and removing components in State with RemoveChildAdding and removing components in State with RemoveChild
25.Applying statesApplying states
26.Using states to control the display of the popup component.Using states to control the display of the popup component.
27.Validate either a United States ZIP code or a Canadian postal codeValidate either a United States ZIP code or a Canadian postal code
28.Define StatesDefine States
29.States Event HandlersStates Event Handlers
30.States Includes and ExcludesStates Includes and Excludes
31.Deferred view state, and you cannot access it until after the first switch to the Deferred view stateDeferred view state, and you cannot access it until after the first switch to the Deferred view state
32.Use the Reset button to restore the collection view to its original state.Use the Reset button to restore the collection view to its original state.
java2s.com  | Contact Us | Privacy Policy
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.