画方格线

import flash.display.Sprite;



var lands:Sprite = new Sprite  ;

lands.graphics.beginFill(0xff0000);

lands.graphics.lineStyle(1);

lands.graphics.drawRect(0,0,500,500);

addChild(lands);



for (var i:int = 1; i <50; i ++)

{

	lands.graphics.moveTo(10 * i,0);

	lands.graphics.lineTo(10 * i,500);

	lands.graphics.endFill();



	lands.graphics.moveTo(0,10 * i);

	lands.graphics.lineTo(500,10 * i);

	lands.graphics.endFill();

}





你可能感兴趣的:(画方格线)