0

How to get Display Object using createjs or easeljs.

Graphics Obj :

 var myShape = new createjs.Shape();
 myShape .graphics.beginStroke("#FFFFFF");
 myShape .graphics.setStrokeStyle(5);
 myShape .graphics.beginFill("#C1272D").drawRect(0, 0, gameStage.canvas.width - 10, 40);
 stage.addChild(myShape);

Text Field :

var textF = new createjs.Text("Time Left.. Do it Fast", "20px Arial", "#FFFFFF");
stage.addChild(textF);

So please tell me, how to get textF and myShape object width....???

Harish Patidar
  • 303
  • 4
  • 13
  • possible duplicate of [How to Get Graphics Object Width Using createjs Framework in Html5](http://stackoverflow.com/questions/17317799/how-to-get-graphics-object-width-using-createjs-framework-in-html5) – olsn Jun 26 '13 at 20:05

1 Answers1

0

For the TextF have a look at this EaselJS Online Docs : getMeasuredWidth Method

For Shape EaselJS Online Docs : getBounds Method