Hi, This is the sample code of what we are using in my project The way which we are using to apply effect when using removeAllchildren from viewstack
Requirement is when i click on second button the canvas which i was created dynamically has to remove with wipe up effect <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" initialize="initApp(event)"> <mx:Script> <![CDATA[ import mx.messaging.AbstractConsumer; import mx.controls.Alert; import mx.controls.Label; import mx.containers.Canvas; public function initApp(event:Event):void{ var canvas:Canvas = new Canvas(); canvas.setStyle("addedEffect",moveIn); canvas.setStyle("removedEffect",moveOut); var label:Label = new Label(); label.text =event.currentTarget.id.toString(); canvas.addChild(label); //myViewStack.removeAllChildren(); myViewStack.addChild(canvas); } ]]> </mx:Script> <mx:Move id="moveIn" duration="2000" xFrom="{-width}" xTo="0"/> <mx:Move id="moveOut" xFrom="0" xTo="{width}"/> <mx:Panel title="ViewStack Container Example" height="95%" width="95%" paddingTop="10" paddingLeft="10" paddingRight="10" paddingBottom="10"> <mx:Text width="100%" color="blue" text="Use the Button controls to change panels of the ViewStack container."/> <mx:HBox borderStyle="solid" width="100%" paddingTop="5" paddingLeft="5" paddingRight="5" paddingBottom="5"> <mx:Button id="searchButton" label="Search Panel" click="initApp(event)"/> <mx:Button id="cInfoButton" label="Customer Info Panel" click="initApp(event)"/> <mx:Button id="aInfoButton" label="Account Panel" click="initApp(event)"/> </mx:HBox> <!-- Define the ViewStack and the three child containers and have it resize up to the size of the container for the buttons. --> <mx:ViewStack id="myViewStack" borderStyle="solid" width="100%" height="80%"> </mx:ViewStack> </mx:Panel> </mx:Application> Guys,please let me know how can i put effect with using removeAllChildren method Thanks for any advanced help Regards, Pradeep -- You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/flex_india?hl=en.

