I am not sure how to import multiple classes into an AS3 class. Also I am bit confused on how “package” works now.
This is currently what I have and its wrong:
package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.Event;
class LoadImage {
public function LoadImage() {
var container:Sprite = new Sprite();
addChild(container);
var pictLdr:Loader = new Loader();
var pictURL:String = "catfishSMv.jpg"
var pictURLReq:URLRequest = new URLRequest(pictURL);
pictLdr.load(pictURLReq);
pictLdr.contentLoaderInfo.addEventListener(Event.COMPLETE, imgLoaded);
function imgLoaded(e:Event):void {
container.addChild(pictLdr.content);
}
}
}
}
How should I actually do this?
Thanks