flash on 2013-7-17
/**
* Copyright wwbeyondww1 ( http://wonderfl.net/user/wwbeyondww1 )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/p6f7
*/
package {
import frocessing.display.F5MovieClip2DBmp;
public class aaa extends F5MovieClip2DBmp{
private var vx:Number;
private var vy:Number;
private var xx:Number;
private var yy:Number;
private var ac:Number;
private var at:Number;
private var wd:Number;
public function setup():void {
size(465,465);
background(0);
colorMode(HSV,1);
vx=vy=0;
xx=mouseX;
yy=mouseY;
ac=0.2;
at=0.9;
wd=0.15;
// write as3 code here..
}
public function draw():void
{
if(isMousePressed)
{
background(0);
}
drawing(mouseX,mouseY);
}
public function drawing(x:Number,y:Number):void
{
var px:Number=xx;
var py:Number=yy;
xx+=vx+=(x-xx)*ac;
yy+=vy+=(y-yy)*ac;
var len:Number=mag(vx,vy);
strokeWeight(len*wd);
stroke(random(0.9,1),random(0.5,1),random(0.8,1));
line(px,py,xx,yy);
vx*=at;
vy*=at;
}
}
}