// ActionScript file (imgView.as)
package mylib {
import flash.display.Loader;
import flash.events.Event;
import flash.net.URLRequest;
import mx.core.UIComponent;
public class imgView extends UIComponent {
//private const image_path:String = "";
private var loader:Loader;
private var request:URLRequest;
public var test:String = 'test';
//private var image_path:String;
public function imgView() {
//this.image_path = image_path;
loader=new Loader();
request = new URLRequest(img_path);
//loader.contentLoaderInfo.addEventListener(Event.INIT,onComplete);
loader.load(request);
addChild(loader);
}
/*private function onComplete(event:Event):void {
addChild(loader);
} */
}
}
</mx:Application>
|