A little background first:
I run ubuntu hardy with flash 10 and im using flex 3 sdk to compile my projects. I’m new to actionscript but not programming.
Here’s the issue. I’m working on a proggy that simply displays a picture. For some reason when i register an event handler for a loader like COMPLETE or INIT, i find that the handler is either not registered or not being triggered. Thus, I cannot add it to the display list through that method. The code is fine (see below) because I took it directly out of an Oreily book. Oddly ProgressEvents seem to work fine and i can essentially derive a “COMPLETE” event handler from that, but that is an ugly workaround.
Code:
[LEFT]package {
import flash.display.*;
import flash.net.URLRequest;
import flash.events.*;
public class Main extends Sprite {
private var loader:Loader;
public function Main() {
loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.INIT, initListener);
var urlRequest:URLRequest = new URLRequest("sunset.jpg");
loader.load(urlRequest);
}
private function initListener (e:Event):void {
addChild(loader.content); // Add Bitmap object to SunsetViewer
}
}
}[/LEFT]
Any help would be appreciated. I’m guessing it’s something wrong with my configuration/setup, but any idea as to what?
On a side note: because of some odd dependency issues i cannot run the official standalone flashplayer/debugger for linux. Are there any other replacements that can run flash 10 files? I’m currently testing using firefox and the flash 10 plugin (ugh).
Thanks again.