When I put a trace("test"); at the entry point of my flashdevelop project and run it. The application runs fine but I do not see the trace in the output. Below is my code
package { import flash.display.Sprite; import flash.events.Event; /** * ... * @author Anthony Gordon */ public class Main extends Sprite { public function Main():void { if (stage) init(); else addEventListener(Event.ADDED_TO_STAGE, init); } private function init(e:Event = null):void { trace("test"); removeEventListener(Event.ADDED_TO_STAGE, init); // entry point var game:Game = new Game(stage); addChild(game); } } } 
removeEventListenerwill fail if the event listener was never added (in the else ofMain). Also, make sure (using a breakpoint) that init is being called in the first place. If it isn't, I have a suspicion the document class is not added to the stage. But I could be wrong!hasEventListener, but it only checks for the event type without the specific callback.