ok. I have a lot of data to be passed into flash so I decided to use xml parssed from a database using php.
I got the xml into flash with the following code:
This outputs the following:Code:var my_xml = new XML(); my_xml.ignoreWhite = true; my_xml.onLoad = function(success) { if (success) { trace(this); } }; my_xml.load("http://www.800score.com/flashdatatest.php");
my question is how do I get from there to arrays of values ieCode:<?xml version="1.0"?> <entries> <entry> <date>2010-07-29</date> <currentQuestion>1</currentQuestion> <yourans>4</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>2</currentQuestion> <yourans>2</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>3</currentQuestion> <yourans>3</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>4</currentQuestion> <yourans>3</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>5</currentQuestion> <yourans>3</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>6</currentQuestion> <yourans>3</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>7</currentQuestion> <yourans>4</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>8</currentQuestion> <yourans>5</yourans> </entry> <entry> <date>2010-07-29</date> <currentQuestion>9</currentQuestion> <yourans>2</yourans> </entry> </entries>
currentQuestion array
yourans array
date array
?
Keep in mind that the amount of xml data will increase and decrease depending on how many questions the user answers.
I will be adding more xml data to the real thing...this is only proff of concept trial.
Thanks in advance




Reply With Quote