flash on 2010-2-26

by aass
♥0 | Line 24 | Modified 2010-02-26 20:04:38 | MIT License
play

ActionScript3 source code

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

package {
    import flash.display.Sprite;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            var ball:Sprite = new Sprite();
            ball = createBall();
            addChild(ball);
            
        }
        private function createBall():Sprite{
        		//  ball を作成
        		var ball:Sprite = new Sprite();
        		var r:Number;
        		r = Math.random()*200 + 50;
        		
			ball.x = Math.random()*stage.stageWidth;
			ball.y = Math.random()*stage.stageHeight;
			ball.alpha = .5;
			//ball.blendMode = BlendMode.HARDLIGHT;
			ball.graphics.beginFill(0xFFFFFF);
			ball.graphics.drawCircle(0, 0, r);
			ball.graphics.endFill();       		
        		return ball;
        }
        private function ballFadeAway(ball:Sprite):void{
         	//ふわっと出てじんわり消える円を作りたい
       		
        }
    }
}