so here is my deal, code follows, i can get the text to load from a txt. file in the project folder but i can get it to behave the way i need it too. 1. the formating is not working 2. i cant get it to null after i navigate away from the page. I think if i can do those two things i will be done and good to go can anyone help? i have a total of 3 pages that need text to load ad be formated Oct, Nov, and Dec and there al 1,2,3 respectfuly.
var myFormatOct:TextFormat = new TextFormat();
myFormatOct.size = 13;
myFormatOct.leading = 1;
myFormatOct.align = TextFormatAlign.RIGHT;
var myTextLoaderOct1:URLLoader = new URLLoader();
var myTextField_txtOct1:TextField = new TextField();
myTextField_txtOct1.wordWrap=true;
myTextField_txtOct1.width = 325;
myTextField_txtOct1.height = 550;
myTextField_txtOct1.x = 80;
myTextField_txtOct1.y = 190;
var myTextLoaderOct2:URLLoader = new URLLoader();
var myTextField_txtOct2:TextField = new TextField();
myTextField_txtOct2.wordWrap=true;
myTextField_txtOct2.width = 325;
myTextField_txtOct2.height = 550;
myTextField_txtOct2.x = 350;
myTextField_txtOct2.y = 190;
var myTextLoaderOct3:URLLoader = new URLLoader();
var myTextField_txtOct3:TextField = new TextField();
myTextField_txtOct3.wordWrap=true;
myTextField_txtOct3.width = 325;
myTextField_txtOct3.height = 550;
myTextField_txtOct3.x = 600;
myTextField_txtOct3.y = 190;
myTextLoaderOct1.addEventListener(Event.COMPLETE, onLoadedOct1);
myTextLoaderOct2.addEventListener(Event.COMPLETE, onLoadedOct2);
myTextLoaderOct3.addEventListener(Event.COMPLETE, onLoadedOct3);
function onLoadedOct1(e:Event):void {
myTextField_txtOct1.text = e.target.data;
addChildAt(myTextField_txtOct1,5);
}
function onLoadedOct2(e:Event):void {
myTextField_txtOct2.text = e.target.data;
addChildAt(myTextField_txtOct2,5);
}
function onLoadedOct3(e:Event):void {
myTextField_txtOct3.text = e.target.data;
addChildAt(myTextField_txtOct3,5);
}
myTextLoaderOct1.load(new URLRequest("myTextOct1.txt"));
myTextLoaderOct2.load(new URLRequest("myTextOct2.txt"));
myTextLoaderOct3.load(new URLRequest("myTextOct3.txt"));