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.
XML文件包含对象名称和类:示例如下:
<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();
我是被这件事弄糊涂了,还是只是暂时无知**