1 Reply Latest reply on Jul 18, 2009 10:08 AM by chris.huston.t10

    one interesting question.. :)

    Phoenix_Guru Level 1

      Look at the following code:

       

      <mx:viewStack>

           <view:myView1 />

           <view:myView2 />

      </mx:viewStack>

       

      myView1:

           <mx:VBox

                xmlns:mx="http://www.adobe.com/2006/mxml"

                creationComplete="initValues()"

           >

      <mx:Script>

           <![CDATA[

                     private function initValues():void

                     {

                          //---------do stuff here-------------------//

                     }

           ]]>

      <------------------some controls here------------------------->

       

      </mx:VBox>

       

      The question is... I want the initValues function to be called whenever the viewstack has the myView1 as the selected item. i.e. whenever the myView1 gets displayed in the viewstack. Right now it only gets called for the first time...

       

       

      Please help me....

       

       

      Thank, Guruji..