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

forked from: MouseEvent.CLICKの引数

Get Adobe Flash player
by mrhdms 23 Dec 2009
/**
 * Copyright mrhdms ( http://wonderfl.net/user/mrhdms )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/4IOG
 */


// forked from 9re's MouseEvent.CLICKの引数
package {
	import flash.display.MovieClip;
    import flash.display.Sprite; 
    import flash.events.MouseEvent; 
    public class MouseClick extends Sprite { 
         
        public function MouseClick() { 
            // ステージがクリックされたときのイベント・リスナーを登録 
            stage.addEventListener(MouseEvent.CLICK, onClick); 
        } 
         
        // イベント・リスナー 
		private function onClick(e:MouseEvent):void { 
			var nR:int = Math.ceil(Math.random() * 20) + 10;
			var color:int = Math.floor(Math.random() * 0xffffff);
			var oneCircle:MovieClip = new DrawCircle1(e.stageX, e.stageY, nR, color);
			addChild(oneCircle);        }
		 
    } 
} 

import flash.display.MovieClip;

class DrawCircle1 extends MovieClip {
	public function DrawCircle1(centerX:int, centerY:int, r:int, color:int){
		graphics.lineStyle(2,color);
		graphics.drawCircle(centerX,centerY,r);
	}
}