flash on 2011-11-11
8個の四角形を縦一列に並べる
@author shmdmoto
/**
* Copyright sss ( http://wonderfl.net/user/sss )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/pFS9
*/
package
{
import frocessing.display.F5MovieClip2D;
/**
* 8個の四角形を縦一列に並べる
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
// ここに描画命令を記述します
var y:Number=50;
/*
rect(100, 0, 40,40);
rect(100, y, 40,40);
rect(100, y*2, 40,40);
rect(100, y*3, 40,40);
rect(100, y*4, 40,40);
rect(100, y*5, 40,40);
rect(100, y*6, 40,40);
rect(100, y*7, 40,40);
*/
/*
rect( 0, 0, 40,40);
rect( y, y, 40,40);
rect(y*2, y*2, 40,40);
rect(y*3, y*3, 40,40);
rect(y*4, y*4, 40,40);
rect(y*5, y*5, 40,40);
rect(y*6, y*6, 40,40);
rect(y*7, y*7, 40,40);
*/
var x:Number;
var y:Number;
noStroke();
fill(0,0,0);
for(x=0; x<400; x=x+50){
rect(x,100,40,40);
}
for(y=0; y<400; y=y+50){
rect(100,y,40,40);
}
for(x=0, y=0; x<400, y<400; x=x+50,y=y+50){
rect(x,y,40,40);
}
}
}
}