getDefinitionByName

 

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of learner
Sent: Monday, September 17, 2007 11:28 PM
To: flexcoders@yahoogroups.com
Subject: [flexcoders] Dynamic class name

 

Hi all,
How can we instantiate the object of the class when class name is
dynamic.

What I am trying to implement is something like this:

var classArr= ["mxmlcomp1", "mxmlcomp2" ...] // array of class name 

(for var i:int=0;i<classArr.length;i++)
{
 var compObj = new classArr[i]   // something like this. I am not sure,
is this the way we can do it?
}

suggestions would be great help.

Regards
PS

 

Reply via email to