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

160509_7

Get Adobe Flash player
by kazgo2 08 May 2016
    Embed
/**
 * Copyright kazgo2 ( http://wonderfl.net/user/kazgo2 )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/rSHV
 */

// forked from hacker_1ekeaszv's flash on 2010-3-22
package {
    import flash.display.Sprite;
    import flash.display.MovieClip;
    import flash.events.MouseEvent;
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // write as3 code here..
            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:DrawCircle = new DrawCircle(e.stageX, e.stageY, nR, color);
            
            addChild(oneCircle);                
                
        }
    }
}


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