diff options
Diffstat (limited to 'lib/customs/textzone.js')
-rw-r--r-- | lib/customs/textzone.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/customs/textzone.js b/lib/customs/textzone.js index 386cd47..c1a34d9 100644 --- a/lib/customs/textzone.js +++ b/lib/customs/textzone.js @@ -15,6 +15,7 @@ TextZone.prototype = { this.stage.addChild(this.text); this.stage.update(); }, + // Just call it once. addToStage: function(){ var txtZone = new createjs.Shape(); txtZone.graphics.beginFill(this.backgroundColor).drawRect( @@ -26,7 +27,7 @@ TextZone.prototype = { changeTextTo: function(newText){ this.stage.removeChild(this.text); - this.text = new createjs.Text(newText, this.fontStr, this.textColor); + this.text.text = newText; this.text.lineWidth = this.width; this.text.x = this.x; this.text.y = this.y; |