I have a long list string to graphic class mappings that are contained within a
gigantic switch statement:
case "icon_1":
selectedIcon = icon_1;
break;
case "icon_2":
selectedIcon = icon_2;
break;
I'm looking for a way to get an instance of an Class reference based on a
string. I'm not looking to create a NEW instance, however.
For example, I'm NOT looking to do this:
var icon_1:Class = getDefinitionByName("icon_1") as Class;
selectedIcon = new icon_1();
I've tried some simple things like, but without results:
selectedIcon = Class("icon_1");
Any suggestions for the syntactical shortcut that I'm looking for?
Thanks