I think that unless you set creationpolicy=all on the tab navigator, the (forms in this case) are not actually instanciated until the user clicks on the tab (or you set the tabindex or similar) in any case. So it may not be necessary to do exactly what you ask, perhaps you can just define those forms in mxml in the tabNavigators contents? But yes, to load the component with file name "yourComponent.mxml" you can just write "var yourComponentInstance:yourComponent = new yourComponent()"
-----Original Message----- From: [email protected] on behalf of rueter007 Sent: Thu 24/01/2008 19:40 To: [email protected] Subject: [flexcoders] Re: Adding children at run-time mxml is eventually converted to actionscript. So, you can instantiate this component using 'new' just like you do with an AS class. - venkat http://www.venkatj.com --- In [email protected], "markgoldin_2000" <[EMAIL PROTECTED]> wrote: > > But how do I load mxml component at the run time? > > --- In [email protected], Sherif Abdou <sherif626@> wrote: > > > > addChild() and just figure out the tabIndex that the user is on and > load the appropriate form. > > get the Index or label of the container and just add them > > <mx:TabNavigator id="myNav" change="tabChange(event)"> > > <mx:Canvas label="Flex"/> > > <mx:Canvas label="Coders"/> > > </mx:TabNavigator> > > > > > > > > ----- Original Message ---- > > From: markgoldin_2000 <markgoldin_2000@> > > To: [email protected] > > Sent: Thursday, January 24, 2008 12:22:56 PM > > Subject: [flexcoders] Adding children at run-time > > > > I have a tab navigator as a main application container. I have > designed > > mxml components (form based) for each tab. I want to load these > forms > > when a user clicks on a tab. How can I do that? > > > > Thanks > > > > > > > > > > > > > ______________________________________________________________________ > ______________ > > Looking for last minute shopping deals? > > Find them fast with Yahoo! Search. > http://tools.search.yahoo.com/newsearch/category.php?category=shopping > > > ______________________________________________________________________ This communication is from Primal Pictures Ltd., a company registered in England and Wales with registration No. 02622298 and registered office: 4th Floor, Tennyson House, 159-165 Great Portland Street, London, W1W 5PA, UK. VAT registration No. 648874577. This e-mail is confidential and may be privileged. It may be read, copied and used only by the intended recipient. If you have received it in error, please contact the sender immediately by return e-mail or by telephoning +44(0)20 7637 1010. Please then delete the e-mail and do not disclose its contents to any person. This email has been scanned for Primal Pictures by the MessageLabs Email Security System. ______________________________________________________________________
<<winmail.dat>>

