1 Reply Latest reply on Jan 1, 2011 8:49 AM by Gregory Lafrance

    Flex 3: How to pass Object on ViewStack children

    jack182

      Hi,

       

      I am a bit new to flex. I have this problem with ViewStack.

       

      I have a viewstack that has 3 children:

       

      <mx:Canvas>

       

      <mx:Script>

        <![CDATA[

       

       

       

        ]]>

       

      </mx:Script>

      ................................

       

      <mx:ViewStack id="bookContent">

        <mx:Canvas id="canvas1"/>

        <mx:Canvas id="canvas2"/>

        <mx:Canvas id="canvas3"/>

      </mx:ViewStack>

       

      </mx:Canvas>

       

      While I am in canvas3, when i pressed a buton it will go to canvas2, I want to pass an object to canvas2 and execute some method. Since canvas2 is not yet created and the complete event will be fired after the component is completed. I don't want to use [Bindable] annot variable to pass to canvas2 property.

       

      How can fire another event aside from complete event to pass the through custom event?

      Or is there a better way to pass around object between ViewStack children?

       

      Thanks a lot.

      Cheers.