forked from: coolball

by Dorara forked from coolball (diff: 11)
FITC参加記念 "coolball"
2009.11.28 13:30
♥0 | Line 29 | Modified 2009-11-30 19:56:57 | MIT License
play

ActionScript3 source code

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

// forked from Dorara's coolball
//
// FITC参加記念 "coolball"
//           2009.11.28 13:30
//
package {
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.Event;

	[SWF(backgroundColor=0x000000)]
	public class coolball extends Sprite
	{
		private var ボール:Sprite;
		
		public function coolball()
		{
			this.stage.scaleMode = StageScaleMode.NO_SCALE;
			this.stage.align = StageAlign.TOP_LEFT;
			
			this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
			
			ボール = new Sprite();
            ボール.graphics.beginFill(0x00ee00);
            ボール.graphics.drawCircle(0, 0, 50);
            ボール.graphics.endFill();
            ボール.x = 200;
            ボール.y = 100;
            this.addChild(ボール);        
		}
		
		public function onEnterFrame(e:Event):void
		{
			ボール.y += 10;
			if(ボール.y > 300) ボール.y = 100;
		}
	}
}