Ok I've found a way to do it, but it's not really clean. Would there be any way
to make the code better?
So writing this :
var ClassReference:Class = getDefinitionByName("Test") as Class;
var bool:Boolean = ClassReference["parse"]("false"); // returns false
is the same as this :
var bool:Boolean = Test.parse("false"); // returns false
BLITZ | Patrick Matte - 310-551-0200 x214
-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Patrick
Matte|BLITZ
Sent: Monday, June 23, 2008 7:17 PM
To: Flash Coders List
Subject: [Flashcoders] calling public static methods on Class using
getDefinitionByName
Does anybody know if it's possible to call a static method of a reference to a
class created with getDefinitionByName without actually creating an instance of
the object?
Something like this simple example:
var ClassReference:Class = getDefinitionByName("Test") as Class;
var bool:Boolean = ClassReference.parse("false"); //would return false;
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders