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

こどもよう いろリスト

Get Adobe Flash player
by keno42 13 Mar 2010
    Embed
/**
 * Copyright keno42 ( http://wonderfl.net/user/keno42 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/1h82
 */

package {
    import flash.display.Sprite;
    import flash.text.*;
    public class FlashTest extends Sprite {
        private var tfArray:Array = [];
        private var txtArray:Array = [
            "赤(あか)",
            "紫色(むらさきいろ)",
            "青(あお)",
            "水色(みずいろ)",
            "緑色(みどりいろ)",
            "黄色(きいろ)",
            "橙色(だいだいいろ)",
            "茶色(ちゃいろ)",
            "灰色(はいいろ)",
            "黒(くろ)"];
        private var clrArray:Array = [
            0xFF0000,
            0xFF00FF,
            0x0000FF,
            0x00FFFF,
            0x00FF00,
            0xFFFF00,
            0xFF8800,
            0x884444,
            0x888888,
            0x0];
        public function FlashTest() {
            // write as3 code here..
            for( var i:int = 0; i < clrArray.length; i++ ) {
                var tf:TextField = new TextField();
                addChild(tf);
                tf.defaultTextFormat = new TextFormat("_typewriter",30);
                tf.autoSize = "left";
                tf.text = txtArray[i];
                tf.x = 120;
                tf.y = 10 + 40 * i - 2;
                this.graphics.beginFill(clrArray[i]);
                this.graphics.drawRect(10, 10 + 40 * i, 100, 30);
            }
                
        }
    }
}