Basically I'm reading in a XML file with
PHP Code:
"<a_storynum>13</a_storynum>"
Which it is retrieving the correct values however beacuse a_storynum this will later be used for array access it needs to be a int which Ive tried doing like so
Code:
storynum = Number(a_storynum);
however the answer is always 0 - is there a way I can parse it or something?
Code:
// This is the retrieving the XML
function getContent() {
//how_text = "Match the Latin names to the correct rooms on this plan of a Roman house. Drag a label from the list on to the room it fits. If you wish to change your mind, click on the label again to deselect it. When you have used all the labels, click on SUBMIT to find out how well you have done.";
// Retrieves the contents of the nodes and sets them as variables
node_count = 0;
var strValue;
var ndRoot = content.childNodes[0];
do {
var nd = ndRoot.childNodes[node_count];
if (nd.childNodes.length>1) {
strValue = nd.toString();
} else {
//traced += "\nhere in else="+nd.firstChild.toString();
strValue = nd.firstChild.toString();
}
set(nd.nodeName, strValue);
traced += "\n"+nd.nodeName+"="+strValue;
node_count += 1;
} while (node_count < ndRoot.childNodes.length);
}
content = new XML();
content.onLoad = getContent;
content.ignoreWhite = true;
content.mc = this;
content.load(_level0.xml_url);
// goes to the "go" position
gotoAndStop("go_1");