You can create children with CreateChild method In the example below when clicking on the button you create a label inside of a VBox which is a child of a ViewStack
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml"> <mx:Script> <![CDATA[ function generateChildren(){ var vs=mx.core.Application.application.vs01; var vb = vs.createChild(mx.containers.VBox,undefined,{id:"vb01"}); vb.createChild(mx.containers.Label,undefined,{text:"Hello"}); } ]]> </mx:Script> <mx:Panel> <mx:ViewStack id="vs01" > </mx:ViewStack> <mx:Button click="generateChildren()"> </mx:Panel> </mx:Application> > > Does any1 know how i do that? > > > Greetz Erik > > > > Yahoo! Groups Links > > > > > > > > > Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

