円の配置位置を制限する1の練習4
forked from 円の配置位置を制限する1の練習3 (diff: 3)
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/xrf3
*/
// forked from aaaaaz025's 円の配置位置を制限する1の練習3
// forked from aaaaaz025's 円の配置位置を制限する1の練習2
// forked from aaaaaz025's 円の配置位置を制限する1の練習1
// forked from shmdmoto's キャンバスの左半分にランダムに円を配置
package
{
import frocessing.display.F5MovieClip2D;
/**
* 円をキャンバスの左半分にランダムに配置する
* @author shmdmoto
*/
public class GraphicExample extends F5MovieClip2D
{
public function setup() : void
{
var i:int;
var x:Number;
var y:Number;
for( i = 1 ; i <=1000 ; i++ ) {
x = random( 465 );
y = random( 465 );
if( y <= 465 ) {
if( x >= y)
ellipse( x, y, 20, 20);
}
}
}
}
}
