Are you using Haxe, or something like OpenFL?
OpenFL might give the closest experience to what you expect from AS3, with a "document class" that has "stage" predefined, you can add a listener to this class as normal, and move on.
Using Haxe directly, "Lib.current" is the "actual" document class. This is the entry point for the application, it's an empty MovieClip. You can add things to it (which is generally recommended) or you can add things to the stage instead. If you add directly to the stage, listening to Lib.current will never mouse events, because is inside the empty clip.
I hope this helps! Please feel free to post any more questions, or let me know if this is still not clear.
Have a great day!
PS, here are a couple code samples that may help:
In OpenFL...
package;
import flash.display.Sprite;
import flash.events.MouseEvent;
class Main extends Sprite {
public function new () {
super ();
graphics.beginFill (0xFF0000);
graphics.drawRect (0, 0, 100, 100);
stage.addEventListener (MouseEvent.CLICK, onClick);
}
private function onClick (event:MouseEvent):Void {
trace ("Click");
}
}
In traditional Haxe/Flash...
package;
import flash.display.Sprite;
import flash.events.MouseEvent;
class Main extends Sprite {
public function new () {
super ();
graphics.beginFill (0xFF0000);
graphics.drawRect (0, 0, 100, 100);
Lib.current.stage.addEventListener (MouseEvent.CLICK, onClick);
}
private function onClick (event:MouseEvent):Void {
trace ("Click");
}
private static function main ():Void {
Lib.current.addChild (new Main ();
}
}
...and in AS3 (if I'm not too rusty)
package {
import flash.display.Sprite;
import flash.events.MouseEvent;
public class Main extends Sprite {
public function Main () {
super ();
graphics.beginFill (0xFF0000);
graphics.drawRect (0, 0, 100, 100);
stage.addEventListener (MouseEvent.CLICK, onClick);
}
private function onClick (event:MouseEvent):void {
trace ("Click");
}
}
}