変数を使った図形の描画の練習2
forked from 変数を使った図形の描画の練習1 (diff: 11)
ActionScript3 source code
/**
* Copyright aaaaaz025 ( http://wonderfl.net/user/aaaaaz025 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/mvtO
*/
// forked from aaaaaz025's 変数を使った図形の描画の練習1
// forked from aaaaaz025's 変数を使った図形の描画の練習3
// forked from aaaaaz025's 変数を使った図形の描画の練習
// forked from shmdmoto's 変数を使って直線を描く
package
{
import frocessing.display.F5MovieClip2D;
/**
* 変数を使った直線の描画:
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function draw() : void
{
// ここに描画命令を記述します.
// (x,y) : 直線の始点
var x:Number = 100;
var y:Number = 100;
var w:Number = 300;
line(x,y,x,y+w);
// 始点を50ピクセル移動
x = x + 50;
line(x,y,x,y+w);
// 始点を50ピクセル移動
x = x + 50;
line(x,y,x,y+w);
// 始点を50ピクセル移動
x = x + 50;
line(x,y,x,y+w);
x = x + 50;
line(x,y,x,y+w);
}
}
}
