Preload Text from an External Site
I am using this actionscript multiple times within a document:
var loader1:URLLoader = new URLLoader(new URLRequest("http://www.url.com/example.txt"));
loader1.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void {
var loadedText1:URLLoader = URLLoader(event.target);
Box.text = loadedText1.data;
}
Unfortunately, there tends to be a significant lag in terms of this text appearing. How can I get flash to cache these text files before it called upon to display them? -- kinda like a pre loader for text files.
