I would like to add an image to the flash stage dynamically using a textfile. Using the URLLoader and URLRequest classes to access the textfile named textPic.txt. Currently I have loaded the textfile using this script:
public class imgLoader extends MovieClip
{
private var myTextloader:URLLoader=new URLLoader();
var fl_TextURLRequest:URLRequest = new URLRequest("textPic.txt");
public function imgLoader()
{
myTextloader.addEventListener(Event.COMPLETE,onloaded);
//myTextloader.load(new URLLoader("textPic.txt"));
myTextloader.load(fl_TextURLRequest);
}
private function onloaded(e:Event):void
{
trace(e.target.data);
}
images.json: