What does the class definition look like?  I’m pretty sure I’ve used this 
successfully.

Alex Harui
Flex SDK Developer
Adobe Systems Inc.<http://www.adobe.com/>
Blog: http://blogs.adobe.com/aharui

From: [email protected] [mailto:[email protected]] On Behalf 
Of Sefi Ninio
Sent: Monday, March 02, 2009 5:10 AM
To: [email protected]
Subject: Re: [flexcoders] static function and getDefinitionByName

Hi Alex.

I actually tried that, it doesn't work...
On Mon, Mar 2, 2009 at 8:13 AM, Alex Harui 
<[email protected]<mailto:[email protected]>> wrote:

ClassRef[“staticFunctionName”]()



Alex Harui

Flex SDK Developer

Adobe Systems Inc.<http://www.adobe.com/>

Blog: http://blogs.adobe.com/aharui



From: [email protected]<mailto:[email protected]> 
[mailto:[email protected]<mailto:[email protected]>] On 
Behalf Of Sefi Ninio
Sent: Sunday, March 01, 2009 2:07 PM
To: [email protected]<mailto:[email protected]>
Subject: [flexcoders] static function and getDefinitionByName



Hi.

I am using getDefinitionByName from flash.utils to get a class definition / 
instance from a string:
var ClassRef:Class = getDefinitionByName(className) as Class;

That works great, I can create an instance if I want.
Problem is, I need to call a static function on that ClassRef class, and I'll 
know the function name only at runtime from XML.
Any idea on how to do this?


Reply via email to