Lets you know if you are off the flash movie. Handy for when games lose focus so you can pause it. Please note that this doesn't work in all browsers properly.
- stage.addEventListener(Event.ACTIVATE, flashActive);
- stage.addEventListener(Event.DEACTIVATE, flashDeactive);
- private function flashActive (event:Event):void
- trace("flash gained focus");
- private function flashDeactive (event:Event):void
- trace("flash lost focus");
CommentsSubscribe to comments
You need to login to post a comment.