Permalink
Browse files

fixed bug where mouse clicks were handled even when debugger was not …

…shown
  • Loading branch information...
1 parent 13cad14 commit 2e9ebf7307f825aadb54b8b4e7837097ca3ed70e @AdamAtomic committed May 31, 2011
Showing with 17 additions and 14 deletions.
  1. +4 −1 org/flixel/system/FlxDebugger.as
  2. +7 −7 org/flixel/system/debug/VCR.as
  3. +6 −6 org/flixel/system/debug/Vis.as
@@ -161,7 +161,10 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseOut(E:MouseEvent=null):void { hasMouse = false; }
+ protected function onMouseOut(E:MouseEvent=null):void
+ {
+ hasMouse = false;
+ }
/**
* Rearrange the debugger windows using one of the constants specified in FlxG.
@@ -169,9 +169,9 @@ package org.flixel.system.debug
removeChild(_step);
_step = null;
- stage.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- stage.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- stage.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
+ parent.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
+ parent.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
}
/**
@@ -444,10 +444,10 @@ package org.flixel.system.debug
if(root == null)
return;
removeEventListener(Event.ENTER_FRAME,init);
-
- stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- stage.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- stage.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+
+ parent.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
+ parent.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
+ parent.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
}
/**
@@ -49,9 +49,9 @@ package org.flixel.system.debug
removeChild(_bounds);
_bounds = null;
- stage.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- stage.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- stage.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
+ parent.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
+ parent.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
}
//***ACTUAL BUTTON BEHAVIORS***//
@@ -77,9 +77,9 @@ package org.flixel.system.debug
return;
removeEventListener(Event.ENTER_FRAME,init);
- stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- stage.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- stage.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
+ parent.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
+ parent.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
}
/**

0 comments on commit 2e9ebf7

Please sign in to comment.