Why can't I catch mouse events with the stage? I verified that the
stage object exists before attaching the event listener, yet the event
handler never executes.
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
width="1000" height="500">
<mx:Script>
import mx.controls.Alert;
import flash.events.MouseEvent;
public function go():void {
stage.addEventListener ( MouseEvent.MOUSE_MOVE,
yeahbaby );
}
public function yeahbaby():void {
Alert.show ("Yeah, baby!");
}
</mx:Script>
<mx:Button id="go_btn" x="10" y="10" label="Go!" width="100"
click="go()" />
</mx:Application>