Advertisement
player_03

Stage focus fix

Nov 21st, 2013
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(stage.focus != stage) {
  2.     var obj:DisplayObject = stage.focus;
  3.     while(obj != stage) {
  4.         if(obj == null || !obj.visible) {
  5.             stage.focus = stage;
  6.             break;
  7.         } else {
  8.             obj = obj.parent;
  9.         }
  10.     }
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement