Hollow WF
/**
* Copyright founderx ( http://wonderfl.net/user/founderx )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/vP0P
*/
package {
import flash.display.Sprite;
import flash.display.Bitmap
import flash.filters.GlowFilter;
import flash.geom.Point;
import flash.events.Event;
import flash.display.Shape;
import flash.events.MouseEvent;
import flash.display.Sprite;
[SWF(width = "465", height = "465", frameRate = "60", backgroundColor = "000000")]
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
trace("LZY")
init();
}
private function init():void
{
stage.addEventListener(MouseEvent.MOUSE_DOWN,mouseDownHandler);
}
private function mouseDownHandler(e:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
stage.addEventListener(MouseEvent.MOUSE_UP,mouseUpHandler);
}
private function mouseUpHandler(e:MouseEvent):void
{
stage.removeEventListener(MouseEvent.MOUSE_MOVE,mouseMoveHandler);
stage.removeEventListener(MouseEvent.MOUSE_UP,mouseUpHandler);
}
private function mouseMoveHandler(e:MouseEvent):void
{
drawLines(mouseX,mouseY);
}
private function drawLines(startX:Number,startY:Number):void
{
var line:Shape = new Shape();
var col:uint = Math.random() * 0xFFFFFF;
var count:Number = 0;
addChild(line);
line.x = startX;
line.y = startY;
line.graphics.lineStyle(1,col);
line.graphics.moveTo(20,0);
line.addEventListener(Event.ENTER_FRAME,
function():void{
count+= 0.1;
var px:Number = 20 * (Math.cos(count) + count * Math.sin(count));
var py:Number = 20 * (Math.sin(count) - count * Math.cos(count));
line.graphics.lineTo(px,py);
line.alpha -= 0.005;
if(count > 10){
removeChild(line);
line.removeEventListener(Event.ENTER_FRAME,arguments.callee);
}
});
}
}
}