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: flash on 2012-3-16

Get Adobe Flash player
by MMMMMonchi 16 Mar 2012
    Embed
/**
 * Copyright MMMMMonchi ( http://wonderfl.net/user/MMMMMonchi )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/bIQR
 */

// forked from MMMMMonchi's flash on 2012-3-16
package {
    import flash.display.Sprite;
    import flash.events.Event;
    import flash.events.MouseEvent;
    public class FlashTest extends Sprite {
        public var num:Number=10;
        public function FlashTest() {
            addEventListener(Event.ENTER_FRAME,draw);
            stage.addEventListener(MouseEvent.MOUSE_DOWN,change);
            
            
        }
        public function draw(e:Event):void{
            
            graphics.beginFill(0x00ff00);
            graphics.drawCircle(num,num,10);
            graphics.endFill();
            num+=10;
            
            }
        public function change(e:MouseEvent):void{
            removeEventListener(Event.ENTER_FRAME,draw);
            addEventListener(Event.ENTER_FRAME,draw2);
            
            }
             public function draw2(e:Event):void{
            
            graphics.beginFill(0x00ffff);
            graphics.drawCircle(num,num,10);
            graphics.endFill();
            num-=10;
            
            }
       
    }
}