I'm very new to AS3 and I don't really know all of the basic syntax yet, even though I read through some guides every day. I am using this bitmapdata canvas to load spritesheets onto a canvas, and using a foor loop, I've tried to get the map to populate with tiles but I've had no luck.
for (var i:int = 0; i < columns; i++)
{
for (var j:int = 0; j < rows; j++)
{
smb3SpriteSheet = new SMB3(new SMB3SpriteSheet(), smb3XML.animation, 175);
smb3SpriteSheet.x = startX;
smb3SpriteSheet.y = startY;
canvas.addSprite(smb3SpriteSheet);
startX = startX + 16
}
startX = 0
startY = startY + 16
}
This code is supposed to create a new bitmap data that it'll add onto a blank background bitmap, setup the x and y coordinates and then move down a space and repeat, but when I compile, the only tile that appears is the last tile. I have looked online but there is no information that I could find about using bitmap data in this way. I am supposed to use it for the assignment.