I have a Android Air project written in AS3, when the project starts I am loading the music and loading the XML file to be parsed. In the first frame I call my classes to parse the XML and set the nodes at strings, and to play the audio, these both work fine. Also in my first frame I am declaring some textfields to input the data from the XML file so that when the user enters frame 3 the user is able to see this data from the XML file. This also works fine. The problem I am having is going between frame 4 and back to frame 3, the data in the textfields disapears? I trace the strings from the XML class that are holding the data and these values appear everytime, but going from frame 3 to frame 4 and back to frame 3 wipes out the textfield display? Can anyone point me in the right direction? thanks Scientific
Ok here is some code from frame one where I am declaring the textfields
var name1TextField:TextField = new TextField();
var name2TextField:TextField = new TextField();
var format:TextFormat = new TextFormat();
format.font = "_sans";
format.color = 0xF8FBF8;
format.size = 36;
//set the names format to the textfields
name1TextField.defaultTextFormat = format;
name2TextField.defaultTextFormat = format;
highScore1.addChild(name1TextField);
highScore2.addChild(name2TextField);
Here is the code calling the XML parsing class and setting the text to the nodes
var network:networkScores = new networkScores();
addChild(network);
var timer4:Timer = new Timer(600);
timer4.addEventListener(TimerEvent.TIMER, scoresDis);
timer4.start();
function scoresDis(e:TimerEvent):void
{
name1TextField.text = network.name1;
name2TextField.text = network.name2;
//trace(name1TextField.text);
//trace(name2TextField.text);
name1TextField.width = 230;
name2TextField.width = 230;
timer4.stop();
}
Previously above I had stated that I am calling the audio class and the xml class from the first frame, declaring the text fields and moving on from there. Now I have decided that since this XML file is a list of scores and coded be always changing, I thought it would be good to load and parse this file everytime I enter frame 3. The same thing is still happening, I have my scores display and then when I go to frame 4 and back to frame three, the scores do not display, but when I trace the data from the class, it displays properly. Thanks Scientific