ref: your private message -- for the good of all, please keep posts on the forum.
ref: your question on randomising the content of your xml file -
PHP Code:arr = []; // array to hold the xml data
_xml = new XML();
_xml.ignoreWhite = true;
_xml.load("test.xml");
_xml.onLoad = function(){
cNodes = this.firstChild.childNodes;
len = cNodes.length;
for(var n=0;n!=len;n++){
obj = {}; // create an object
obj.theWord = cNodes[n].attributes['theWord'];
obj.theSynonym = cNodes[n].attributes['theSynonym'];
arr.push(obj); // add the object to the array
}
randArray();
};
function randArray(){
arr.sort(function(){return Math.floor(Math.random()*3)-1}); // randomise the array
for(var n=0;n!=arr.length;n++){
trace("arr["+n+"].theWord = "+arr[n].theWord);
trace("arr["+n+"].theSynonym = "+arr[n].theSynonym+newline);
}
};
/* - in test.xml -
<?xml version="1.0" encoding="UTF-8"?>
<rNode>
<cNode theWord="A" theSynonym="a" />
<cNode theWord="B" theSynonym="b" />
<cNode theWord="C" theSynonym="c" />
<cNode theWord="D" theSynonym="d" />
<cNode theWord="E" theSynonym="e" />
</rNode>
*/
