6 Replies Latest reply on Feb 10, 2011 10:28 AM by dataxa

    Accessing children of element created with PopUpManager

    dataxa

      My application has 2 files. First one is main application, second one is custom component (Popup) used to create popup windows. I would like to know how can i access ViewStack element (has id assigned to "vs") in popup from main application.

       

      NB! Lot of code has been removed for readability!

       

      application.mxml

      <s:Application creationComplete="init()">
           <fx:Script>
                <![CDATA[
                          public function init():void{
                               var popup:TitleWindow = PopUpManager.createPopUp(this , Popup , false) as TitleWindow;
                               trace(popup.vs , "It's not working!!");
                          }
                ]]>
           </fx:Script>
      </s:Application>
      

       

      Popup.mxml

      <s:TitleWindow>
           <mx:ViewStack id="vs">
           </mx:ViewStack>
      </s:TitleWindow>