0

I've main.mxml which has login button. It looks like below -

            <mx:Script>
    <![CDATA[
        private function onSuccessfulLogin(event):void {
            // How to call second mxml application*/
                }

    ]]>
</mx:Script> 
<mx:Panel x="414" y="145" width="355" height="200" layout="absolute"
          title="Enter Your Login Information">
    <mx:TextInput id="textInputName" x="147" y="12"/>
    <mx:TextInput id="textInputPassword" x="147" y="57"/>
    <mx:Button x="142" y="115" label="Login" id="callToServer" 
    <mx:Label x="37" y="14" text="User Name"/>
    <mx:Label x="41" y="59" text="Password"/>
</mx:Panel>

Now on successful login I want to call another mxml application, for example second.mxml. It looks like -

     <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" 
            xmlns="*" creationComplete="iFrame.visible=true"  
      viewSourceURL="srcview/index.html"> 
      <mx:HBox width="100%" height="100%">
     <mx:Panel title="/ Company Home" width="200" height="100%" >
         <mx:Tree id="tree" width="100%" height="100%" dataProvider="{treeData}"
                 labelField="@label" showRoot="false"
                 change="iFrame.source = 
      (Tree(event.target).selectedItem.attribute('path').toString());"  />
      </mx:Panel>
      <mx:Panel width="100%" height="100%" title="Ticket Details" >
        <IFrame id="iFrame" source="some url" width="100%" height="100%"  />
       </mx:Panel>

       </mx:HBox>
       </mx:Application>

Please let me know how will I do it. Thanks for your help!

Sam
  • 244
  • 2
  • 5
  • 20

1 Answers1

-1

One simple way to let 2 Applications communicate would be LocalConnectionDocumentation here

codingbuddha
  • 707
  • 5
  • 16