package
{
import flash.display.Sprite;
import flash.display.Loader;
import flash.net.URLRequest;
import flash.events.Event;
public class Main extends Sprite
{
private var loader:Loader;
public function Main()
{
loader = new Loader();
loader.load(new URLRequest("image.jpg "));
loader.contentLoaderInfo.addEventListener(Event.COMPLETE,
contentComplete);
addChild(loader);
}
private function contentComplete(event:Event):void
{
trace(loader.content);
}
}
}
|