Hey Julian, With your example, this should work (I've just tested a similar class instantiation in one of my classes):
var anObject = new eval("org").eval("foo").eval("Bar")(); You can pass parameters in the final set of braces as usual. HTH Adrian P. On 4/12/06, Julian 'Julik' Tarkhanov <[EMAIL PROTECTED]> wrote: > > Hello flashcoders. > A simple question perhaps but couldn't figure it out by myself. > How can I instantiate a class having it's qname? Say I know that I > need an instance of "org.foo.Bar", how can I summon it? > > I tried doing: > > var anObject = new (eval("org.foo.Bar")); > > but I get undefined in return. Maybe there is someobscure method like > Class.instantiate(aQname) that I overlooked? > > TIA > > -- > Julian 'Julik' Tarkhanov > me at julik.nl > > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > To change your subscription options or search the archive: > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders > > Brought to you by Fig Leaf Software > Premier Authorized Adobe Consulting and Training > http://www.figleaf.com > http://training.figleaf.com > _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com