forked from: 同じ図形の繰り返し描画:手作業
forked from 同じ図形の繰り返し描画:手作業 (diff: 19)
サンプルを参考にして、プログラムを書き換え、八個の四角形を斜め一列にならべました。 変数宣言についてちょっとわかってきました。
ActionScript3 source code
/**
* Copyright hubukihiroto189 ( http://wonderfl.net/user/hubukihiroto189 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/n3c7
*/
// forked from lenonsun's 同じ図形の繰り返し描画:手作業
// 同じ図形の繰り返し描画:手作業
package
{
import frocessing.display.F5MovieClip2D;
/**
* 8個の四角形を斜めに並べる
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
// ここに描画命令を記述します
var x: Number;
x = 0;
rect( x,0,40,40);
x = 50;
rect( x,50,40,40);
x = 100;
rect( x,100,40,40);
x = 150;
rect( x,150,40,40);
x = 200;
rect( x,200,40,40);
x = 250;
rect( x,250,40,40);
x = 300;
rect( x,300,40,40);
x = 350;
rect( x,350,40,40);
}
}
}
