coolball
FITC参加記念 "coolball"
2009.11.28 13:30
♥0 |
Line 29 |
Modified 2009-11-29 00:05:55 |
MIT License
archived:2017-03-20 05:00:11
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/umqF
*/
//
// 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 ball:Sprite;
public function coolball()
{
this.stage.scaleMode = StageScaleMode.NO_SCALE;
this.stage.align = StageAlign.TOP_LEFT;
this.addEventListener(Event.ENTER_FRAME, onEnterFrame);
ball = new Sprite();
ball.graphics.beginFill(0x00ee00);
ball.graphics.drawCircle(0, 0, 50);
ball.graphics.endFill();
ball.x = 200;
ball.y = 100;
this.addChild(ball);
}
public function onEnterFrame(e:Event):void
{
ball.y += 10;
if(ball.y > 300) ball.y = 100;
}
}
}