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

配列の初期化の練習2

8個の縦横の大きさの異なる長方形を横一列に並べる
@author shmdmoto
Get Adobe Flash player
by aaaaaz025 16 Oct 2010
/**
 * Copyright aaaaaz025 ( http://wonderfl.net/user/aaaaaz025 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/odP8
 */

// forked from shmdmoto's 縦横のサイズが異なる長方形を並べる
package 
{
    import frocessing.display.F5MovieClip2D;
    /**
     * 8個の縦横の大きさの異なる長方形を横一列に並べる
     * @author shmdmoto
     */
    public class GraphicExample extends F5MovieClip2D
    {
        public function setup() : void
        {
            // ここに描画命令を記述します
            var ellipseWidth : Array = new Array( 10, 20, 30, 40, 50, 60, 70, 80);
            var ellipseHeight : Array = new Array( 20, 30, 40, 50, 60, 70, 80, 90);
            var i:int;
            for( i = 1 ; i <= 8 ; i ++ ) {
                ellipse( 50 * i, 100, ellipseWidth[i-1], ellipseHeight[i-1]);
            }
        }
    }
}