0 Replies Latest reply on Dec 20, 2006 1:33 PM by m_hartnett

    Code Structure

    m_hartnett Level 3
      Is it possible to break the State code out of an application and into their own component objects. I understand how to break components out such as Canvas, HBox etc but cannot figure out if I can put the actual State code out.

      For example I would like to extract all the code below the State homeView into its own object.
      <mx:State name="homeView">
      <mx:SetStyle target="{lbHome}" name="color" value="#cc0000"/>
      <mx:AddChild relativeTo="{detailPanel}" position="lastChild">
      <v:HomeStateAC1 id="HomeStateAc1" width="100%"/>
      </mx:AddChild>
      </mx:State>

      It seems like eclipse/flex needs the actual State tag in the application component.
      Is there a wrapper tag that can be put around everything after the state tag so the code can be broken into their own components?
      Are there any design patterns that are usually used?

      I am fairy new to Flex and appreciate any help.