Demo

by shapevent
♥0 | Line 30 | Modified 2010-12-09 01:46:22 | MIT License
play

ActionScript3 source code

/**
 * Copyright shapevent ( http://wonderfl.net/user/shapevent )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/u7Bh
 */

package {
import flash.display.*;

    public class Plethora extends MovieClip {

        public function Plethora(): void {
        var m:uint=200;
        var n:uint=200;
        var boardArray:Array = [[0, 1, 0], [0, 1, 0], [1, 0, 1]];
        for (var i:uint=0; i < 3; i++) {
            for (var j:uint=0; j <3; j++) {
                if (boardArray[i][j] == 1){
                    var thisBlock: Block = new Block();
                    thisBlock.stop();
                    thisBlock.x = m;
                    thisBlock.y = n;
                    addChild(thisBlock);
                }
                m -= 10;
            }
            n -= 10;
        }
    }
        }
        
     
  }
  
     import flash.display.*;
        class Block extends MovieClip{
          public function Block(){
            graphics.beginFill(0);
            graphics.drawRect(0,0,20,20);
                
          }    
        }