Advertisement
Guest User

Untitled

a guest
Jul 13th, 2014
229
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.67 KB | None | 0 0
  1. var closed:Boolean = true;
  2. var dummy:BitmapData;
  3. dummy = new BitmapData(1, 1);
  4.  
  5. try
  6. {
  7. // Try to capture the stage: triggers a Security error when the settings dialog box is open
  8. dummy.draw(stage);
  9. }
  10. catch (error:Error)
  11. {
  12. closed = false;
  13. }
  14.  
  15. dummy.dispose();
  16. dummy = null;
  17.  
  18. // WHEN PRIVACY PANEL IS ON MOUSE EVENTS ARE DISABLED
  19. stage.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
  20. function onMouseOver(e:Event):void {
  21. trace("privacy panel closed");
  22. //REMOVE THE LISTENER ON FIRST TIME
  23. stage.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
  24. //doStuff
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement