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 2010-3-23

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

package {
    import flash.display.Sprite;
    import flash.display.Bitmap;
    import flash.display.BitmapData;
    public class FlashTest extends Sprite {
    		public var gomokuform:GomokuForm;
        public function FlashTest() {
            // write as3 code here..
			this.gomokuform = new GomokuForm();
			addChild(this.gomokuform);
        }
    }
}


import flash.display.Graphics;
import flash.display.Sprite;
import flash.text.TextField;
	
class GomokuForm extends Sprite{
	public var tf_desc:TextField;
	public var squares:Array = new Array();
	
	public function GomokuForm(){
		this.createBoard();		
	}
	public function createBoard():void{
		this.tf_desc = new TextField;
		this.tf_desc.text = "あなたの番";
		this.addChild(this.tf_desc);
		var x:int;y:int;
		for(y = 0;y < 11; y++){
			var ar:Array = new Array;
			this.squares.push(ar);
			for(x = 0; x < 11; x++){
				var sq:Square = new Square();
				ar.push(sq);
				this.addChild(sq);
				sq.x = x * 30;
				sq.y = y * 30 + 20;
				sq.xpos = x;
				sq.ypos = y;		
			}
		}	
	}
}

import flash.display.Graphics;
import flash.display.Shape;
import flash.display.Sprite;
import flash.display.GradientType;
import flash.geom.Matrix;
class Square extends Sprite{
	public var xpos:int;
	public var ypos:int;
	public var status:String = "BLANK";

	public function Square(){
		var g:Graphics = this.graphics;
		g.beginFill(0xFFFFEE);
		g.lineStyle(1,0);
		g.drawRect(0,0,30,30);
		g.endFill();
	}
}