Posted By


brewsie on 04/16/10

Tagged


Statistics


Viewed 454 times
Favorited by 1 user(s)

flash focus detection


/ Published in: ActionScript 3
Save to your folder(s)



Copy this code and paste it in your HTML
  1. function main():void
  2. {
  3. stage.addEventListener(Event.DEACTIVATE, windowNotActive);
  4. stage.addEventListener(Event.ACTIVATE, windowActive);
  5. }
  6. main();
  7.  
  8. function windowNotActive(e:Event):void
  9. {
  10. trace("NOT ACTIVE");
  11. }
  12.  
  13. function windowActive(e:Event):void
  14. {
  15. trace("ACTIVE");
  16. }

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.