Thanks Navneet. I do it like this but it's an horrible hack ;) Shame on you OOP guy !
Le 1 déc. 05, à 18:48, Navneet Behal a écrit :
Sure, you can use this: ----------------------- function createInstance(clazz:Function, args:Array) { if (!clazz) return null; var result:Object = new Object; result.__proto__ = clazz.prototype; result.__constructor__ = clazz; clazz.apply(result, args); return result; } -----------------------
----------- erixtekila http://blog.v-i-a.net/ _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders