Dyanamic Text Fields Working Funny
Hello!
I am trying to get some dyanmic text fields to work in my flash movie. I got one to work and have had trouble getting more than one. I think I kinda got it but it works but works funny. I am trying to load text in two different places. When I click on the first instance (Philosophy Section) nothing shows up. When I check the other instance (Eco_Conscience) the text shows up and then when I go back to the Philosophy Section it works. BUT it doesn't work on the first try. I am attaching code and link. Can anyone see the problem and help me fix the code?
Thanks! Sandra![]()
LINK:
http://www.sandraschmitt.com/coclico/index100.html
CODE ON FRAME 1:
//Loaded external text fields
var textLoader:URLLoader = new URLLoader();
var textReq:URLRequest;
function textLoaded(event:Event):void {
eco_txt.text = textLoader.data;
philosophy_txt.text = textLoader.data;
}
CODE ON LOCAL FRAME FOR PHILOSOPHY TEXT:
textReq = new URLRequest("text_philosophy.txt");
textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoaded);
CODE ON LOCAL FRAME FOR ECO TEXT:
textReq = new URLRequest("text_eco.txt");
textLoader.load(textReq);
textLoader.addEventListener(Event.COMPLETE, textLoaded);