Reputation: 191
I can not find the error in this code . Please help me. I did everything according to the documentation.
var point;
var width = 10;
var height = 20;
var tilesz = 24;
var canvas = document.getElementById("board");
var stage = new createjs.Stage(canvas);
genField();
function genField () {
point = new createjs.Shape();
for (var y = 0; y < height; y++) {
for (var x = 0; x < width; x++) {
point.graphics.beginStroke("#555");
point.graphics.drawCircle(x*tilesz, y*tilesz, tilesz);
}
}
}
Upvotes: 1
Views: 50
Reputation: 1068
You're not adding points to the stage. So in for just add lines:
stage.addChild(point);
stage.update();
Does this help?
Upvotes: 1