Quick qustion... after creating a Flex component using ViewStack.createChild, how do you coerce the MovieClip that is returned to be the correct type.
In the example code that was posted below, how to you get the VBox variable (vb) to actually walk and talk like a VBox? (instead of a MovieClip). thanks, ~harris --- Krzysztof Szlapinski <[EMAIL PROTECTED]> wrote: > 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 > > > > > > > > > > > > > > > > > > > > > __________________________________ Do you Yahoo!? Yahoo! Mail - You care about security. So do we. http://promotions.yahoo.com/new_mail 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/