Hey all,
I’m a complete newbie to Flash, so please bear with my questions.
I’m currently using actionscript 3.0 to make a simple game. I’m currently working on a platforming game.
I’m at a complete loss to a lot of the draw functions, so I wanted to know if you guys could help me.
I want to know how I can DRAW A GRID. That’s it. A simple grid where I tell it, the grid is (550 X 400) pixels and each sqaure is 20X20 pixels empty.
The code that I tried didn’t work:
designGrid=new Shape();
for(var w=0;w<=roomWidth/10;w+=1)
{
for(var h=0;h<=roomHeight/10;h+=1)
{
designGrid.graphics.beginFill(0x666666);
designGrid.graphics.drawRect(w,h,20,20);
designGrid.graphics.endFill();
}
}
addChild(designGrid);
Aside from doing something along these lines, I looked on the web and someone suggestioned using a bunch of created objects. Seems like kind of a waste, however…
Thanks a bunch in advance!