In case Flash no longer exists; a copy of this site is included in the Flashpoint archive's "ultimate" collection.

Dead Code Preservation :: Archived AS3 works from wonderfl.net

flash on 2012-5-30

Get Adobe Flash player
by Yuji.Arai 30 May 2012
    Embed
/**
 * Copyright Yuji.Arai ( http://wonderfl.net/user/Yuji.Arai )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/s9QA
 */

package {
    import flash.events.MouseEvent;
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
 //           [SWF(width = 465, height = 465]

       public function FlashTest(){
            var rows:uint=8;//横の個数
            var lines:uint=12;//縦の個数
            var d:Number=5;//四角の間隔
            var w:Number=(stage.stageWidth-d)/rows-d;//四角形の幅
            var h:Number=(stage.stageWidth-d)/lines-d;//四角形の高さ            
        for (var i:int=0; i<lines; i++){
        for (var j:int=0; j<rows; j++){
        var fillColor:uint=0xFFFFFF*Math.random();
        var tile_sp:Sprite=new Sprite();
        tile_sp.graphics.beginFill(fillColor);
        tile_sp.graphics.drawRect(0,0,w,h);
        tile_sp.graphics.endFill();

        tile_sp.x=d+(w+d)*j;
        tile_sp.y=d+(h+d)*i;

        addChild(tile_sp);
        }
    }
        }
    }
}