var theConstructor = eval(theString); var theInstance = new theConstructor();
Cheers, r. jim wrote: > Hey guys, > > Bit off topic but does anyone know if you can get an object reference > from a string? So if I pass into my function the string > "org.somwhere.SomeClass" can I convert that to a reference to the class > org.somwhere.SomeClass? > > I need to do this as I am passing in a reference from an XML file to > stop me having to recompile every time I change something. > > Jim > > > _______________________________________________ > osflash mailing list > [email protected] > http://osflash.org/mailman/listinfo/osflash_osflash.org _______________________________________________ osflash mailing list [email protected] http://osflash.org/mailman/listinfo/osflash_osflash.org
