the following would work too(though very ugly):

<code1>
        import org.foo.Bar;
        var qname:String = "org.foo.Bar";
        var x = new _global[qname]();
</code1>

anyway, if you don't do the import, you cannot instanciate the Bar class ...

OR
*just* reference the class ;) (no import....dummy dumb)
<code2>
        org.foo.Bar;
        var qname:String = "org.foo.Bar";
        var x = new _global[qname]();
</code2>

cedric ?


Hi Chris,

var qname:String = "org.foo.Bar";

var x = new qname ();

That won't work. Did you mean:

var qname:String = "org.foo.Bar";

var x = new eval(qname)();

--
Steve Webster
Head of Development

Featurecreep Ltd.
http://www.featurecreep.com
14 Orchard Street, Bristol, BS1 5EH
0117 905 5047


_______________________________________________
[email protected]
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

_______________________________________________
[email protected]
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

Reply via email to