Hi, I'm new to ActionScript 3 (without any experience with Flash development) and I was wondering how I would go about adding an mouse event listener to a bitmap? The code works with a sprite, just not with a bitmap. Here is a shortened version of the code I'm trying to run, I hope it makes sense!
var fsImageRequest:URLRequest = new URLRequest("img/fullscreen.png");
var fsImageLoader:Loader = new Loader();
fsImageLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, fsImageLoaded);
fsImageLoader.load(fsImageRequest);
addChild(fsImageLoader);
function fsImageLoaded(e:Event):void {
var fsImageLoader:Loader = Loader(e.target.loader);
fsImage = Bitmap(fsImageLoader.content);
fsImage.addEventListener(MouseEvent.CLICK, fullScreenClick)
}
Thanks in advance.