如何使用createjs或easeljs获取显示对象。
图形对象:
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);
文字字段:
var textF = new createjs.Text("Time Left.. Do it Fast", "20px Arial", "#FFFFFF");
stage.addChild(textF);
所以请告诉我,如何获得textF和myShape对象的宽度.... ???
答案 0 :(得分:0)