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

flash on 2015-1-29

Get Adobe Flash player
by makc3d 29 Jan 2015

    Talk

    O_MEG_A at 29 Jan 2015 10:12
    Amazing
    Embed
package {
    import flash.display.Shape;
    import flash.display.Sprite;
    import flash.events.MouseEvent;
    [SWF(backgroundColor=0)]
    public class FlashTest extends Sprite {
        public function FlashTest() {
            // code by Nig 13 from http://board.flashkit.com/board/showthread.php?833851-Paint-Splatter-Writing
var mc:Shape = new Shape();
addChild(mc);

var X1:Number = mouseX;
var Y1:Number = mouseY;

stage.addEventListener(MouseEvent.MOUSE_MOVE, drawTrail);

function drawTrail(e:MouseEvent):void {
    
    var X2:Number = mouseX;
    var Y2:Number = mouseY;
    
    var diffX:Number = X2 - X1;
    var diffY:Number = Y2 - Y1;
    
    var diff:Number = Math.sqrt((diffX*diffX)+(diffY*diffY));
    
    mc.graphics.lineStyle(100/diff, 0xFFFFFF, .5);
    mc.graphics.moveTo(X1, Y1);
    mc.graphics.lineTo(X2, Y2);
    
    X1 = X2;
    Y1 = Y2;
    
}
        }
    }
}