flash on 2010-11-14
♥0 |
Line 24 |
Modified 2010-11-14 19:17:24 |
MIT License
archived:2017-03-20 06:32:33
ActionScript3 source code
/**
* Copyright stenpel ( http://wonderfl.net/user/stenpel )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/9kVm
*/
package {
import flash.display.Sprite;
public class FlashTest extends Sprite {
private const N_w:int = 6;
private const N_h:int = 4;
private const W:Number = stage.stageWidth;
private const H:Number = stage.stageHeight;
public function FlashTest() {
// write as3 code here..
var i:int; var j:int;
for(i = 0; i < N_h; i++) {
for(j = 0; j < N_w; j++) {
var sp:Sprite = new Sprite();
addChild(sp);
//sp.graphics.lineStyle();
sp.graphics.beginFill(0xFFFFFF*Math.random());
sp.graphics.drawRoundRect(0,0,W/6,H/4,10);
sp.graphics.endFill();
addChild(sp);
sp.x = W/N_w*j;
sp.y = H/N_h*i;
}
}
}
}
}