Switched app.mouseX/Y -> stage.mouseX/Y

This commit is contained in:
Nathan Dinsmore 2014-05-28 15:17:27 -04:00
parent ca09a56cbb
commit 0902bc072d
2 changed files with 6 additions and 6 deletions

View file

@ -815,8 +815,8 @@ public class Scratch extends Sprite {
public function handleTool(tool:String, evt:MouseEvent):void { }
public function showBubble(text:String, x:* = null, y:* = null, width:Number = 0):void {
if (x == null) x = mouseX;
if (y == null) y = mouseY;
if (x == null) x = stage.mouseX;
if (y == null) y = stage.mouseY;
gh.showBubble(text, Number(x), Number(y), width);
}

View file

@ -228,8 +228,8 @@ public class GestureHandler {
spr.updateBubble();
}
if (bubble) {
var dx:Number = bubbleStartX - app.mouseX;
var dy:Number = bubbleStartY - app.mouseY;
var dx:Number = bubbleStartX - stage.mouseX;
var dy:Number = bubbleStartY - stage.mouseY;
if (dx * dx + dy * dy > bubbleRange * bubbleRange) {
hideBubble();
}
@ -507,8 +507,8 @@ public class GestureHandler {
public function showBubble(text:String, x:Number, y:Number, width:Number = 0):void {
hideBubble();
bubble = new TalkBubble(text || ' ', 'say', 'result');
bubbleStartX = app.mouseX;
bubbleStartY = app.mouseY;
bubbleStartX = stage.mouseX;
bubbleStartY = stage.mouseY;
var bx:Number = x + width;
var by:Number = y - bubble.height;
if (bx + bubble.width > stage.stageWidth - bubbleMargin && x - bubble.width > bubbleMargin) {