0 Replies Latest reply on Sep 18, 2015 1:41 AM by giacomo.c

    Referring .mxml tag from (not included) actionscript file

    giacomo.c

      Hi guys and thanks in advance. I have a little problem that I summarize as follow:

      Clicking on a button a big popup for inserting data appear, I used this code:

       

      home.as

      ..

      var insertPop:InsertPopUp = InsertPopUp(PopUpManager.createPopUp((this.parentApplication as DisplayObject), InsertPopUp, true));

      PopUpManager.centerPopUp(insertPop);

      ..

       

      Then the PopUp is the follows:

       

      InsertPopUp.mxml

      <?xml version="1.0" encoding="utf-8"?>

      <mx:TitleWindow xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init()" close="close()">

       

      <mx:Script source="InsertPopUp_src.as"/>

       

      <mx:Label id="lblage" text="Age:"/>

      <mx:TextInput id="txtAge" editable="true"/> // I want this data

       

      <mx:TabNavigator id="insertTab" width="100%" height="85%">

              <mx:VBox id="vbx1" width="100%" height="100%"  label="Car Data">

                  <mx:ModuleLoader id="mdlCatData" url="modules/Cat.swf" height="100%" width="100%" />

              </mx:VBox>

              <mx:VBox id="vbx2" width="100%" height="100%" label="Van Data">

                  <mx:ModuleLoader id="mdlDogData" url="modules/Dog.swf" height="100%" width="100%"/>

              </mx:VBox>

      </mx:TabNavigator>

      </mx:TitleWindow>

       

      Then I have:

       

      Cat.mxml

      <?xml version="1.0" encoding="utf-8"?>

      <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init();">

       

      <mx:Script source="CatData_src.as" />

       

      // other forms..

       

      </mx:Module>

       

      and:

       

      Dog.mxml

      <mx:Module xmlns:mx="http://www.adobe.com/2006/mxml" initialize="init();">

       

      <mx:Script source="DogData_src.as" />

       

      // other forms..

       

      </mx:Module>

       

       

      Then I want to retrieve data of txtAge textInput from both CatData_src.as and DogData_src.as,

      I made this "graphic configuration" because some data are common to Cat and Dog.. (obviously is just an example). Obviously I even need to retrieve Cat.mxml information from DogData_src.as and Dog.mxml information from CatData_src.as. I hope there is a way to do it!!

       

      If there is a solution please write a code example because ActionScript is not my language.. I'm learning on the way and your help represent 60/70 % of my resources (I have already posted here, one month ago for the adding responder to the async call problem).

       

      Please help me I must resolve this issue as soon as possible..

       

      Thanks a lot