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

forked from: 色の異なる正方形を並べる

Get Adobe Flash player
by ganyan 02 Apr 2011
    Embed
/**
 * Copyright ganyan ( http://wonderfl.net/user/ganyan )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/qmQA
 */

// forked from shmdmoto's 縦横のサイズが異なる長方形を並べる
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * 8個の縦横の大きさの異なる長方形を横一列に並べる
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            // ここに描画命令を記述します
            var fillR : Array = new Array( 0, 255,    0, 128,   0,  255,   255);
            var fillG : Array = new Array( 0,   0,  255,   0, 255,    0,   255);
            var fillB : Array = new Array( 0,   0,  255,   0,   0,  255,   255);
            var i:int;

            for( i = 1 ; i <= 7 ; i ++ ) {
                fill(fillR[i-1],fillG[i-1],fillB[i-1]);
                rect( 50 * i, 100, 40, 40);
            }
        }
    }
}