Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Suggested fix for issue #158 #213

Closed
wants to merge 20 commits into from

3 participants

@IQAndreas

The FlxObject following a path will continue to move even if they run
out of path. ( see Issue #158 )
#158

This fix adds a "StopWhenFinished" option to "FlxObject::followPath",
as well as some minor changes to avoid repetitious code.

and others added some commits
@AdamAtomic added optional color map parameter to FlxTilemap.bitmapToCSV() 338f640
@AdamAtomic made flxg.log() able to split out arrays using flxu.formatarray 4ac1879
@AdamAtomic added readme file finally 85a99cd
@AdamAtomic minor readme edits 1d398b3
@AdamAtomic health was only initialized in sprite, should have been in object 289486b
@AdamAtomic added a function to trigger basic full-screen support 2c1e5dc
Gary Lake Fixed issue #193: FlxPreloader can now handle URLs with http or https 11c62d1
@IQAndreas IQAndreas Suggested fix for Issue #206
Using the following function names results in Migration Issue warning
from Flash Professional:
onKeyUp, onKeyPress, onKeyDown, onMouseDown, onMouseUp, onMouseMove
AdamAtomic#206

Replaced all occurances of those names with:
handleKeyUp, handleKeyPress, etc.
(I hope I got them all!)
2aeaa3e
Axcho (Axcho) Fix for issue #214
FlxU.formatArray() would include the first element twice:
AdamAtomic#214
6d09ea8
@IQAndreas IQAndreas Added `super.destroy()` to all overridden `destroy()` methods
Fixes GitHub issue #171
AdamAtomic#171

In some places, `super.destroy()` was not required. For instance, some
classes extended `FlxBasic` which does not have any content in the
`destroy()` method.

However, just to be safe (and in case that function gets populated at a
later date), calling super was added anyway.
3b85833
@FlixelCommunityBot FlixelCommunityBot referenced this pull request in FlixelCommunity/flixel
Closed

Suggested fix for issue #158 #19

moly and others added some commits
@moly moly fixed #11, Incorrect value for moves in FlxText, FlxTileblock and Flx…
…Tilemap
a20aca9
@moly moly Corrected documentation, FlxSound does not have a moves property. 93d3f6b
@moly moly Fix issue #191 - Fixed FlxU.round() giving incorrect results for nega…
…tive numbers

Fixed FlxU.round() giving incorrect results for negative numbers.
AdamAtomic#191
96bfd5f
@IQAndreas IQAndreas Merge pull request #79 from IQAndreas/fix_issue_191
Fix issue #191 - Fixed FlxU.round() giving incorrect results for negative numbers
adfb381
@moly moly Merge pull request #70 from moly/fix_#220
fixed #12, AdamAtomic/flixel#220 Incorrect value for moves in FlxText, FlxTileblock and FlxTilemap
2886406
@moly moly Merge pull request #71 from IQAndreas/fix_issue_193
Fix issue #38, AdamAtomic/flixel#193 - FlxPreloader.myURL should take a proper URL
dde536b
@IQAndreas IQAndreas Merge pull request #76 from IQAndreas/fix_issue_206
Fix issue #206 - Migration issues if published by Flash IDE
96087a6
@IQAndreas IQAndreas Merge pull request #73 from IQAndreas/fix_issue_171
Fix issue #171 - Added `super.destroy()` to all overridden `destroy()` methods
574ae5b
@IQAndreas IQAndreas Merge remote-tracking branch 'IQAndreas/fix_issue_214' into dev 2be8e01
@IQAndreas IQAndreas FlxObject now stops when it reaches the end of its path
Also:
 - Avoided repetitious code (and made it clearer)
 - Fixed minor typo in ASDoc
15dad8b
@IQAndreas IQAndreas closed this
@IQAndreas IQAndreas deleted the IQAndreas-testprojects:fix_issue_158 branch
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2011
Commits on Aug 22, 2011
  1. added readme file finally

    authored
  2. minor readme edits

    authored
Commits on Oct 16, 2011
Commits on Dec 15, 2011
Commits on Dec 19, 2011
  1. @IQAndreas

    Suggested fix for Issue #206

    IQAndreas authored
    Using the following function names results in Migration Issue warning
    from Flash Professional:
    onKeyUp, onKeyPress, onKeyDown, onMouseDown, onMouseUp, onMouseMove
    AdamAtomic#206
    
    Replaced all occurances of those names with:
    handleKeyUp, handleKeyPress, etc.
    (I hope I got them all!)
Commits on Dec 23, 2011
  1. @IQAndreas

    Fix for issue #214

    Axcho (Axcho) authored IQAndreas committed
    FlxU.formatArray() would include the first element twice:
    AdamAtomic#214
Commits on Jun 15, 2012
  1. @IQAndreas

    Added `super.destroy()` to all overridden `destroy()` methods

    IQAndreas authored
    Fixes GitHub issue #171
    AdamAtomic#171
    
    In some places, `super.destroy()` was not required. For instance, some
    classes extended `FlxBasic` which does not have any content in the
    `destroy()` method.
    
    However, just to be safe (and in case that function gets populated at a
    later date), calling super was added anyway.
Commits on Sep 13, 2012
  1. @moly
  2. @moly
Commits on Sep 14, 2012
  1. @moly @IQAndreas

    Fix issue #191 - Fixed FlxU.round() giving incorrect results for nega…

    moly authored IQAndreas committed
    …tive numbers
    
    Fixed FlxU.round() giving incorrect results for negative numbers.
    AdamAtomic#191
  2. @IQAndreas

    Merge pull request #79 from IQAndreas/fix_issue_191

    IQAndreas authored
    Fix issue #191 - Fixed FlxU.round() giving incorrect results for negative numbers
Commits on Sep 15, 2012
  1. @moly

    Merge pull request #70 from moly/fix_#220

    moly authored
    fixed #12, AdamAtomic/flixel#220 Incorrect value for moves in FlxText, FlxTileblock and FlxTilemap
  2. @moly

    Merge pull request #71 from IQAndreas/fix_issue_193

    moly authored
    Fix issue #38, AdamAtomic/flixel#193 - FlxPreloader.myURL should take a proper URL
Commits on Sep 16, 2012
  1. @IQAndreas

    Merge pull request #76 from IQAndreas/fix_issue_206

    IQAndreas authored
    Fix issue #206 - Migration issues if published by Flash IDE
  2. @IQAndreas

    Merge pull request #73 from IQAndreas/fix_issue_171

    IQAndreas authored
    Fix issue #171 - Added `super.destroy()` to all overridden `destroy()` methods
  3. @IQAndreas
  4. @IQAndreas

    FlxObject now stops when it reaches the end of its path

    IQAndreas authored
    Also:
     - Avoided repetitious code (and made it clearer)
     - Fixed minor typo in ASDoc
This page is out of date. Refresh to see the latest.
View
6 org/flixel/FlxButton.as
@@ -132,7 +132,7 @@ package org.flixel
override public function destroy():void
{
if(FlxG.stage != null)
- FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, onMouseUp);
+ FlxG.stage.removeEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
if(label != null)
{
label.destroy();
@@ -166,7 +166,7 @@ package org.flixel
{
if(FlxG.stage != null)
{
- FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
+ FlxG.stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
_initialized = true;
}
}
@@ -342,7 +342,7 @@ package org.flixel
/**
* Internal function for handling the actual callback call (for UI thread dependent calls like <code>FlxU.openURL()</code>).
*/
- protected function onMouseUp(event:MouseEvent):void
+ protected function handleMouseUp(event:MouseEvent):void
{
if(!exists || !visible || !active || (status != PRESSED))
return;
View
1  org/flixel/FlxCamera.as
@@ -281,6 +281,7 @@ package org.flixel
_fxShakeComplete = null;
_fxShakeOffset = null;
_fill = null;
+ super.destroy();
}
/**
View
14 org/flixel/FlxG.as
@@ -246,7 +246,7 @@ package org.flixel
static public function log(Data:Object):void
{
if((_game != null) && (_game._debugger != null))
- _game._debugger.log.add((Data == null)?"ERROR: null object":Data.toString());
+ _game._debugger.log.add((Data == null)?"ERROR: null object":((Data is Array)?FlxU.formatArray(Data as Array):Data.toString()));
}
/**
@@ -323,6 +323,18 @@ package org.flixel
}
/**
+ * Switch to full-screen display.
+ */
+ static public function fullscreen():void
+ {
+ FlxG.stage.displayState = "fullScreen";
+ var fsw:uint = FlxG.width*FlxG.camera.zoom;
+ var fsh:uint = FlxG.height*FlxG.camera.zoom;
+ FlxG.camera.x = (FlxG.stage.fullScreenWidth - fsw)/2;
+ FlxG.camera.y = (FlxG.stage.fullScreenHeight - fsh)/2;
+ }
+
+ /**
* Generates a random number. Deterministic, meaning safe
* to use if you want to record replays in random environments.
*
View
20 org/flixel/FlxGame.as
@@ -239,7 +239,7 @@ package org.flixel
*
* @param FlashEvent Flash keyboard event.
*/
- protected function onKeyUp(FlashEvent:KeyboardEvent):void
+ protected function handleKeyUp(FlashEvent:KeyboardEvent):void
{
if(_debuggerUp && _debugger.watch.editing)
return;
@@ -296,7 +296,7 @@ package org.flixel
*
* @param FlashEvent Flash keyboard event.
*/
- protected function onKeyDown(FlashEvent:KeyboardEvent):void
+ protected function handleKeyDown(FlashEvent:KeyboardEvent):void
{
if(_debuggerUp && _debugger.watch.editing)
return;
@@ -331,7 +331,7 @@ package org.flixel
*
* @param FlashEvent Flash mouse event.
*/
- protected function onMouseDown(FlashEvent:MouseEvent):void
+ protected function handleMouseDown(FlashEvent:MouseEvent):void
{
if(_debuggerUp)
{
@@ -370,7 +370,7 @@ package org.flixel
*
* @param FlashEvent Flash mouse event.
*/
- protected function onMouseUp(FlashEvent:MouseEvent):void
+ protected function handleMouseUp(FlashEvent:MouseEvent):void
{
if((_debuggerUp && _debugger.hasMouse) || _replaying)
return;
@@ -382,7 +382,7 @@ package org.flixel
*
* @param FlashEvent Flash mouse event.
*/
- protected function onMouseWheel(FlashEvent:MouseEvent):void
+ protected function handleMouseWheel(FlashEvent:MouseEvent):void
{
if((_debuggerUp && _debugger.hasMouse) || _replaying)
return;
@@ -671,11 +671,11 @@ package org.flixel
stage.frameRate = _flashFramerate;
//Add basic input event listeners and mouse container
- stage.addEventListener(MouseEvent.MOUSE_DOWN, onMouseDown);
- stage.addEventListener(MouseEvent.MOUSE_UP, onMouseUp);
- stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMouseWheel);
- stage.addEventListener(KeyboardEvent.KEY_DOWN, onKeyDown);
- stage.addEventListener(KeyboardEvent.KEY_UP, onKeyUp);
+ stage.addEventListener(MouseEvent.MOUSE_DOWN, handleMouseDown);
+ stage.addEventListener(MouseEvent.MOUSE_UP, handleMouseUp);
+ stage.addEventListener(MouseEvent.MOUSE_WHEEL, handleMouseWheel);
+ stage.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown);
+ stage.addEventListener(KeyboardEvent.KEY_UP, handleKeyUp);
addChild(_mouse);
//Let mobile devs opt out of unnecessary overlays.
View
1  org/flixel/FlxGroup.as
@@ -81,6 +81,7 @@ package org.flixel
members = null;
}
_sortIndex = null;
+ super.destroy();
}
/**
View
14 org/flixel/FlxObject.as
@@ -196,7 +196,7 @@ package org.flixel
/**
* Set this to false if you want to skip the automatic motion/movement stuff (see <code>updateMotion()</code>).
* FlxObject and FlxSprite default to true.
- * FlxText, FlxTileblock, FlxTilemap and FlxSound default to false.
+ * FlxText, FlxTileblock, and FlxTilemap default to false.
*/
public var moves:Boolean;
/**
@@ -254,7 +254,7 @@ package org.flixel
*/
protected var _pathInc:int;
/**
- * Internal flag for whether hte object's angle should be adjusted to the path angle during path follow behavior.
+ * Internal flag for whether the object's angle should be adjusted to the path angle during path follow behavior.
*/
protected var _pathRotate:Boolean;
@@ -275,6 +275,8 @@ package org.flixel
height = Height;
mass = 1.0;
elasticity = 0.0;
+
+ health = 1;
immovable = false;
moves = true;
@@ -325,6 +327,7 @@ package org.flixel
if(path != null)
path.destroy();
path = null;
+ super.destroy();
}
/**
@@ -509,6 +512,9 @@ package org.flixel
public function stopFollowingPath(DestroyPath:Boolean=false):void
{
pathSpeed = 0;
+ velocity.x = 0;
+ velocity.y = 0;
+
if(DestroyPath && (path != null))
{
path.destroy();
@@ -542,7 +548,7 @@ package org.flixel
if(_pathNodeIndex < 0)
{
_pathNodeIndex = 0;
- pathSpeed = 0;
+ stopFollowingPath(false);
}
}
else if((_pathMode & PATH_LOOP_FORWARD) > 0)
@@ -586,7 +592,7 @@ package org.flixel
if(_pathNodeIndex >= path.nodes.length)
{
_pathNodeIndex = path.nodes.length-1;
- pathSpeed = 0;
+ stopFollowingPath(false);
}
}
View
4 org/flixel/FlxSprite.as
@@ -166,8 +166,6 @@ package org.flixel
public function FlxSprite(X:Number=0,Y:Number=0,SimpleGraphic:Class=null)
{
super(X,Y);
-
- health = 1;
_flashPoint = new Point();
_flashRect = new Rectangle();
@@ -230,6 +228,8 @@ package org.flixel
_matrix = null;
_callback = null;
framePixels = null;
+
+ super.destroy();
}
/**
View
1  org/flixel/FlxText.as
@@ -64,6 +64,7 @@ package org.flixel
_regen = true;
_shadow = 0;
allowCollisions = NONE;
+ moves = false;
calcFrame();
}
View
1  org/flixel/FlxTileblock.as
@@ -25,6 +25,7 @@ package org.flixel
makeGraphic(Width,Height,0,true);
active = false;
immovable = true;
+ moves = false;
}
/**
View
8 org/flixel/FlxTilemap.as
@@ -139,6 +139,7 @@ package org.flixel
_tiles = null;
_tileObjects = null;
immovable = true;
+ moves = false;
cameras = null;
_debugTileNotSolid = null;
_debugTilePartial = null;
@@ -1361,10 +1362,11 @@ package org.flixel
* @param bitmapData A Flash <code>BitmapData</code> object, preferably black and white.
* @param Invert Load white pixels as solid instead.
* @param Scale Default is 1. Scale of 2 means each pixel forms a 2x2 block of tiles, and so on.
+ * @param ColorMap An array of color values (uint 0xAARRGGBB) in the order they're intended to be assigned as indices
*
* @return A comma-separated string containing the level data in a <code>FlxTilemap</code>-friendly format.
*/
- static public function bitmapToCSV(bitmapData:BitmapData,Invert:Boolean=false,Scale:uint=1):String
+ static public function bitmapToCSV(bitmapData:BitmapData,Invert:Boolean=false,Scale:uint=1,ColorMap:Array=null):String
{
//Import and scale image if necessary
if(Scale > 1)
@@ -1390,7 +1392,9 @@ package org.flixel
{
//Decide if this pixel/tile is solid (1) or not (0)
pixel = bitmapData.getPixel(column,row);
- if((Invert && (pixel > 0)) || (!Invert && (pixel == 0)))
+ if(ColorMap != null)
+ pixel = ColorMap.indexOf(pixel);
+ else if((Invert && (pixel > 0)) || (!Invert && (pixel == 0)))
pixel = 1;
else
pixel = 0;
View
5 org/flixel/FlxU.as 100644 → 100755
@@ -66,8 +66,7 @@ package org.flixel
*/
static public function round(Value:Number):Number
{
- var number:Number = int(Value+((Value>0)?0.5:-0.5));
- return (Value>0)?(number):((number!=Value)?(number-1):(number));
+ return int(Value+((Value>0)?0.5:-0.5));
}
/**
@@ -370,7 +369,7 @@ package org.flixel
if((AnyArray == null) || (AnyArray.length <= 0))
return "";
var string:String = AnyArray[0].toString();
- var i:uint = 0;
+ var i:uint = 1;
var l:uint = AnyArray.length;
while(i < l)
string += ", " + AnyArray[i++].toString();
View
2  org/flixel/plugin/DebugPathDisplay.as
@@ -25,9 +25,9 @@ package org.flixel.plugin
*/
override public function destroy():void
{
- super.destroy();
clear();
_paths = null;
+ super.destroy();
}
/**
View
1  org/flixel/plugin/TimerManager.as
@@ -27,6 +27,7 @@ package org.flixel.plugin
{
clear();
_timers = null;
+ super.destroy();
}
/**
View
12 org/flixel/system/FlxDebugger.as 100644 → 100755
@@ -116,8 +116,8 @@ package org.flixel.system
setLayout(FlxG.DEBUGGER_STANDARD);
//Should help with fake mouse focus type behavior
- addEventListener(MouseEvent.MOUSE_OVER,onMouseOver);
- addEventListener(MouseEvent.MOUSE_OUT,onMouseOut);
+ addEventListener(MouseEvent.MOUSE_OVER,handleMouseOver);
+ addEventListener(MouseEvent.MOUSE_OUT,handleMouseOut);
}
/**
@@ -142,8 +142,8 @@ package org.flixel.system
vis.destroy();
vis = null;
- removeEventListener(MouseEvent.MOUSE_OVER,onMouseOver);
- removeEventListener(MouseEvent.MOUSE_OUT,onMouseOut);
+ removeEventListener(MouseEvent.MOUSE_OVER,handleMouseOver);
+ removeEventListener(MouseEvent.MOUSE_OUT,handleMouseOut);
}
/**
@@ -151,7 +151,7 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseOver(E:MouseEvent=null):void
+ protected function handleMouseOver(E:MouseEvent=null):void
{
hasMouse = true;
}
@@ -161,7 +161,7 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseOut(E:MouseEvent=null):void
+ protected function handleMouseOut(E:MouseEvent=null):void
{
hasMouse = false;
}
View
3  org/flixel/system/FlxPreloader.as
@@ -133,7 +133,8 @@ package org.flixel.system
private function goToMyURL(event:MouseEvent=null):void
{
- navigateToURL(new URLRequest("http://"+myURL));
+ var prefix:String = myURL.match(/^https?:/) ? "" : "http://";
+ navigateToURL(new URLRequest(prefix+myURL));
}
private function onEnterFrame(event:Event):void
View
2  org/flixel/system/FlxTile.as
@@ -73,9 +73,9 @@ package org.flixel.system
*/
override public function destroy():void
{
- super.destroy();
callback = null;
tilemap = null;
+ super.destroy();
}
}
}
View
12 org/flixel/system/FlxWindow.as 100644 → 100755
@@ -205,9 +205,9 @@ package org.flixel.system
return;
removeEventListener(Event.ENTER_FRAME,init);
- stage.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- stage.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- stage.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ stage.addEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
+ stage.addEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown);
+ stage.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
}
/**
@@ -215,7 +215,7 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseMove(E:MouseEvent=null):void
+ protected function handleMouseMove(E:MouseEvent=null):void
{
if(_dragging) //user is moving the window around
{
@@ -246,7 +246,7 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseDown(E:MouseEvent=null):void
+ protected function handleMouseDown(E:MouseEvent=null):void
{
if(_overHeader)
{
@@ -267,7 +267,7 @@ package org.flixel.system
*
* @param E Flash mouse event.
*/
- protected function onMouseUp(E:MouseEvent=null):void
+ protected function handleMouseUp(E:MouseEvent=null):void
{
_dragging = false;
_resizing = false;
View
18 org/flixel/system/debug/VCR.as 100644 → 100755
@@ -169,9 +169,9 @@ package org.flixel.system.debug
removeChild(_step);
_step = null;
- parent.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- parent.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- parent.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.removeEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
+ parent.removeEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown);
+ parent.removeEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
}
/**
@@ -445,9 +445,9 @@ package org.flixel.system.debug
return;
removeEventListener(Event.ENTER_FRAME,init);
- parent.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- parent.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- parent.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.addEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
+ parent.addEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown);
+ parent.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
}
/**
@@ -455,7 +455,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseMove(E:MouseEvent=null):void
+ protected function handleMouseMove(E:MouseEvent=null):void
{
if(!checkOver())
unpress();
@@ -467,7 +467,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseDown(E:MouseEvent=null):void
+ protected function handleMouseDown(E:MouseEvent=null):void
{
unpress();
if(_overOpen)
@@ -488,7 +488,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseUp(E:MouseEvent=null):void
+ protected function handleMouseUp(E:MouseEvent=null):void
{
if(_overOpen && _pressingOpen)
onOpen();
View
18 org/flixel/system/debug/Vis.as 100644 → 100755
@@ -49,9 +49,9 @@ package org.flixel.system.debug
removeChild(_bounds);
_bounds = null;
- parent.removeEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- parent.removeEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- parent.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.removeEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
+ parent.removeEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown);
+ parent.removeEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
}
//***ACTUAL BUTTON BEHAVIORS***//
@@ -77,9 +77,9 @@ package org.flixel.system.debug
return;
removeEventListener(Event.ENTER_FRAME,init);
- parent.addEventListener(MouseEvent.MOUSE_MOVE,onMouseMove);
- parent.addEventListener(MouseEvent.MOUSE_DOWN,onMouseDown);
- parent.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ parent.addEventListener(MouseEvent.MOUSE_MOVE,handleMouseMove);
+ parent.addEventListener(MouseEvent.MOUSE_DOWN,handleMouseDown);
+ parent.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
}
/**
@@ -87,7 +87,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseMove(E:MouseEvent=null):void
+ protected function handleMouseMove(E:MouseEvent=null):void
{
if(!checkOver())
unpress();
@@ -99,7 +99,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseDown(E:MouseEvent=null):void
+ protected function handleMouseDown(E:MouseEvent=null):void
{
unpress();
if(_overBounds)
@@ -112,7 +112,7 @@ package org.flixel.system.debug
*
* @param E Flash mouse event.
*/
- protected function onMouseUp(E:MouseEvent=null):void
+ protected function handleMouseUp(E:MouseEvent=null):void
{
if(_overBounds && _pressingBounds)
onBounds();
View
12 org/flixel/system/debug/WatchEntry.as 100644 → 100755
@@ -81,8 +81,8 @@ package org.flixel.system.debug
valueDisplay.multiline = false;
valueDisplay.selectable = true;
valueDisplay.doubleClickEnabled = true;
- valueDisplay.addEventListener(KeyboardEvent.KEY_UP,onKeyUp);
- valueDisplay.addEventListener(MouseEvent.MOUSE_UP,onMouseUp);
+ valueDisplay.addEventListener(KeyboardEvent.KEY_UP,handleKeyUp);
+ valueDisplay.addEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
valueDisplay.background = false;
valueDisplay.backgroundColor = 0xffffff;
valueDisplay.defaultTextFormat = _whiteText;
@@ -100,8 +100,8 @@ package org.flixel.system.debug
nameDisplay = null;
field = null;
custom = null;
- valueDisplay.removeEventListener(MouseEvent.MOUSE_UP,onMouseUp);
- valueDisplay.removeEventListener(KeyboardEvent.KEY_UP,onKeyUp);
+ valueDisplay.removeEventListener(MouseEvent.MOUSE_UP,handleMouseUp);
+ valueDisplay.removeEventListener(KeyboardEvent.KEY_UP,handleKeyUp);
valueDisplay = null;
}
@@ -148,7 +148,7 @@ package org.flixel.system.debug
*
* @param FlashEvent Flash mouse event.
*/
- public function onMouseUp(FlashEvent:MouseEvent):void
+ public function handleMouseUp(FlashEvent:MouseEvent):void
{
editing = true;
oldValue = object[field];
@@ -164,7 +164,7 @@ package org.flixel.system.debug
*
* @param FlashEvent Flash keyboard event.
*/
- public function onKeyUp(FlashEvent:KeyboardEvent):void
+ public function handleKeyUp(FlashEvent:KeyboardEvent):void
{
if((FlashEvent.keyCode == 13) || (FlashEvent.keyCode == 9) || (FlashEvent.keyCode == 27)) //enter or tab or escape
{
Something went wrong with that request. Please try again.