Switched to a nicer way of computing scaled width

Thanks, Shane.
This commit is contained in:
Nathan Dinsmore 2014-06-02 19:19:35 -04:00
parent 3a6bce1efc
commit 542311b1da
2 changed files with 1 additions and 11 deletions

View file

@ -308,16 +308,6 @@ public class Block extends Sprite {
if (filters && (filters.length > 0)) filters = [];
}
public function getScaledWidth():Number {
var x:DisplayObject = this;
var w:Number = width;
do {
w *= x.scaleX;
x = x.parent;
} while (x != stage);
return w;
}
private function runFeedbackFilters():Array {
// filters for showing that a stack is running
var f:GlowFilter = new GlowFilter(0xfeffa0);

View file

@ -120,7 +120,7 @@ public class Interpreter {
var oldThread:Thread = activeThread;
activeThread = new Thread(b, targetObj);
var p:Point = b.localToGlobal(new Point(0, 0));
app.showBubble(String(evalCmd(b)), p.x, p.y, b.getScaledWidth());
app.showBubble(String(evalCmd(b)), p.x, p.y, b.getRect(app.stage).width);
activeThread = oldThread;
return;
}