1 Reply Latest reply on Jun 12, 2009 1:47 PM by Flex harUI

    How to load applications from another application

    Raghuvasa Level 1

      Hi All,

       

               I have three Application in my Flex Project.

       

               site1.mxml

               site2.mxml

               site3.mxml     these are the Applications not modules.

       

         this is my Main.mxml application in that what i am doing is.

       

             <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute" currentState="Demo">
          <mx:states>
               <mx:State name="Demo" id="defalutId">
                  <mx:AddChild position="lastChild" >
                      <mx:SWFLoader source=" site1.swf" width="100%" height="100%"/>
                  </mx:AddChild>
              </mx:State>
         
               <mx:State name="Registration" >
                  <mx:AddChild position="lastChild" >
                      <mx:SWFLoader source="site2.swf" width="100%" height="100%"/>
                  </mx:AddChild>
              </mx:State>
          </mx:states>
         
      </mx:Application>

       

      initially i set currentState is Demo then it will load site1.swf

      then now i am in site1.mxml

       

      if i click a button in site1.mxml then i want come out of this and have to load site2.swf application

      means i want to set currentState as Registration in Main.mxml

       

      but i am not able to do that. how can i do it .

       

      Can any one help me.

       

       

      Thanks

      Raghu