I’ve set up an XML file with names of objects that will be contained in a fla/swf library. I wish to position the objects on the stage using an XML file that can be quickly modified without having to recompile the fla/swf file. Of course, positioning can only be accomplished when the objects are instantiaed and added to the stage. The problem is passing the parsed XML file name/class paring data into the var creation programatically.
The XML file contains the object names and class: example follows:
<objects> <object name='myBall' class='Ball'/> </objects>
The XML file parses correctly and I’ve set up a …for…each loop to assign the name/class to each object. The problem is with the proper syntax to input the name/class paring, something similar to the following:
var object.@name:object.@class = new object.@class();
Am I off my rocker with this or just temporarily ignorant???**
Just a quick follow up, there’s a quite straight forward way to keep it flexible :