actionscript 3 - refer to variables when creating XML nodes in as3(air) -


Trying to reference a vaiable in my XML object

  var newElements: XML = new XML (); NewElements = & lt; Data & gt; & Lt; / Data & gt; Var myNode = "cell0"; NewElements.myNode.image = node_image [0]; Everything is fine: newElements.cell0.image = node_image [0]; How do I change myNode as a new node (cell0)?    

Please try the following syntax:

  Var myNode = "cell 0"; New Elements [Minor] Dimension = node_is [0];    

Comments

Popular posts from this blog

How can I add a seperate action listener to all 14 of my buttons at once that can determine player turn?(java) -

php - Sorting an multidimension array using usort fails -

Simple file compression in C -