package
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class MyClass extends MovieClip
{
public function MyClass()
{
var loader:URLLoader = new URLLoader(new URLRequest("text.txt"));
loader.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void
{
var loadedText:URLLoader = URLLoader(event.target);
myText_txt.text = loadedText.data;
}
}
}
}
{
import flash.display.*;
import flash.events.*;
import flash.net.*;
public class MyClass extends MovieClip
{
public function MyClass()
{
var loader:URLLoader = new URLLoader(new URLRequest("text.txt"));
loader.addEventListener(Event.COMPLETE, completeHandler);
function completeHandler(event:Event):void
{
var loadedText:URLLoader = URLLoader(event.target);
myText_txt.text = loadedText.data;
}
}
}
}
No comments:
Post a Comment