Tilemap doesn’t display images?
var json = Json.parse(Assets.getText(“assets/ro.json”));
var tileset = new Tileset(Assets.getBitmapData(“assets/ro.png”));
tilemap = new Tilemap(stage.stageWidth, stage.stageHeight, tileset);
var arr = json.frames;
var rect = [];
var reg = [];
for (i in 0...arr.length) {
rect.push(new Rectangle(arr[i][0], arr[i][1], arr[i][2], arr[i][3]));
reg.push(new Point(arr[i][5], arr[i][6]));
}
tilemap.addTile(new Tile(0, rect[0].x, rect[0].y));
addChild(tilemap);
I need help using this animation
[x,y,width,height,frame,regX,regY]
frames":[
[890, 2, 93, 116, 0, 61, 105],
[987, 2, 94, 116, 0, 62, 104],
[451, 2, 106, 118, 0, 64, 114],
I’ve been doing it myself for a few hours, but it still doesn’t work. I need help
I worked all night and the images came out, but why did so many images come out? Do I just need to display one animated image at the same time?
Just use one of engines → HaxePunk or HaxeFlixel (see examples)