If you're new here, you may want to subscribe to my RSS feed. Thanks for visiting!
I previous of flash there was no way to detect when the users mouse had left the flash movie.
Actionscript 3 now allows you to detect when the users mouse has left the movie using the mouseLeave event.
Lets take a look:
package {
import flash.events.Event;
import flash.events.MouseEvent;
public class mouseLeaveTest extends Sprite {
public function mouseLeaveTest() {
stage.addEventListener(Event.MOUSE_LEAVE, mouseHasLeft);
}
public function mouseHasLeft)(e:Event):void {
trace('Mouse have left the stage');
}
}
}
Found this useful? How about buying me a coffee - simply click here.



odd, this doesn’t seem to work during dragging…
I will look into a solution for this