I don’t even think I worded the title correctly, but here’s what I’m running into:
I have an XML file that contains, among other things, a node called <image> which contains a string that refers to the relevant Library asset.
(I changed the linkage base class to flash.display.Sprite).
Now, when the user does whatever that gets them to a point where I need to load the image referenced in the <img> node…how do I do it?
Here’s how it looks if I hard code the class name:
var newImage:Sprite=new ImgPowerExec() as Sprite;
imgcon.addChild(newImage)
But the thing is, I don’t want to have to write a giant switch statement that checks for every possible image: I’m sure there has to be a way to dynamically change “ImgPowerExec()” to whatever the value of, say, timeline.milestone[0].image happens to be?
I would greatly appreciate any advice! Thanks!!!