【发布时间】:2017-01-07 12:57:14
【问题描述】:
我正在使用 Adobe Animate CC(以前称为 Flash Professional CC),我正在尝试调整以下代码 sn-p 以便它创建多个矩形。
var shape = new createjs.Shape(new createjs.Graphics().beginFill("#ff0000").drawRect(5,5,100,100));
this.addChild(shape);
然后我对此进行了调整并将其放入我认为可以复制对象的 for 循环中。下面的代码只创建一个矩形?
for (i = 0; i < 10; i++) {
var i = new createjs.Shape(new createjs.Graphics().beginFill("#ff0000").drawRect(5,5,30,30));
this.addChild(i);
// Move object so that they don't lie on top of each other
this.x += 50;
}
【问题讨论】:
标签: canvas html5-canvas jquery-animate adobe easeljs