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

Java - Error: no suitable method found for add(int, java.lang.String) -

c# - passing input text from view to contoller with FacebookContext using Facebook app -

Calling a C++ function from C# by passing a string with variable size to it -