2 Replies Latest reply on Feb 4, 2010 1:17 AM by chandler124

    Carousel in a state

    chandler124

      Hello,

       

      I tried to put a carousel in a state but it doesn't work. Does anyone know why ?

       

       

      <mx:State name="MetzPromo">
           <mx:RemoveChild target="{image1}"/>
           <mx:RemoveChild target="{button1}"/>
           <mx:RemoveChild target="{button2}"/>
           <mx:RemoveChild target="{image2}"/>
           <mx:RemoveChild target="{button3}"/>
           <mx:RemoveChild target="{button4}"/>
           <mx:AddChild position="lastChild">
                <mx:Canvas width="842" height="435" x="153" y="392">
                     <mx:Button x="804" y="232" label="right" id="right" click="moveRight(),goBack()"/>
                     <mx:Button x="582" y="232" label="left"  id="left"  click="moveLeft(),goBack()" />
                </mx:Canvas>
           </mx:AddChild>
           <mx:AddChild position="lastChild">
                <mx:Canvas id="pv3dCanvas" y="262" width="630" height="303" borderColor="#110101" backgroundColor="#841414" alpha="1.0" backgroundAlpha="0.57" horizontalCenter="0">  
                </mx:Canvas>
           </mx:AddChild>
      </mx:State>
      
      

       

       

      Well , I have that screen :

       

      2.png

      And when i put the carousel in my main state ( '' ) it works properly :

       

      3.png

      And I wonder why ... The code is the same ....

       

      Thank You !