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

Block4

Get Adobe Flash player
by Maeda_addevent 28 Jul 2012
/**
 * Copyright Maeda_addevent ( http://wonderfl.net/user/Maeda_addevent )
 * MIT License ( http://www.opensource.org/licenses/mit-license.php )
 * Downloaded from: http://wonderfl.net/c/kvvT
 */

package {
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    import flash.events.Event;
    import flash.geom.Point;
    [SWF(width=465,height=465,backgroundColor=0xFFFFFF,frameRate=60)]

    public class FB00008 extends Sprite {
        public var sw:Number=stage.stageWidth;
        public var sh:Number=stage.stageHeight;
        public var r:Number;;
        public var _mySprite:mySprite;

        public function FB00008() {
            
            stage.addEventListener(MouseEvent.MOUSE_DOWN,xDown);
        }
        public function xDown(e:MouseEvent):void {
            r = Math.random() * 30 + 5;
            _mySprite = new mySprite(r);
            _mySprite.x = mouseX;
            _mySprite.y = mouseY;
            addChild(_mySprite);
            _mySprite.addEventListener(Event.ENTER_FRAME,xEnter);
        
        }
        public function xEnter(e:Event):void {
            
            e.target.y += 0.5;
            if (e.target.y > sh) {
                e.target.graphics.clear();
                e.target.removeEventListener(Event.ENTER_FRAME,xEnter);
            }
            
        }

    }
}

import flash.display.Sprite;
import flash.events.Event;
import flash.events.MouseEvent;

class mySprite extends Sprite {
    
    public var color:Number = Math.random() * 0xFFFFFF;
    
    public function mySprite(r:Number) {
        var g=this.graphics;
        g.lineStyle(0.5,0x000000,0,false,"none");
        g.beginFill(color,0.6);
        g.moveTo(0,0);
        g.lineTo(r*0.865,r/2);
        g.lineTo(0,r);
        g.lineTo(-r*0.865,r/2);
        g.lineTo(0,0);
        g.endFill();
        
        g.lineStyle(0.5,0x000000,0,false,"none");
        g.beginFill(color,0.8);
        g.moveTo(-r*0.865,r/2);
        g.lineTo(0,r);
        g.lineTo(0,r*2);
        g.lineTo(-r*0.865,r*1.505);
        g.lineTo(-r*0.865,r/2);
        g.endFill();

        g.lineStyle(0.5,0x000000,0,false,"none");
        g.beginFill(color,1);
        g.moveTo(0,r);
        g.lineTo(r*0.865,r/2);
        g.lineTo(r*0.865,r*1.505);
        g.lineTo(0,r*2);
        g.lineTo(0,r);
        
        g.endFill();
    }
}