Extraction
// forked from lun's maneuver
package {
import flash.display.Sprite;
import flash.display.Shape;
import flash.events.*;
public class FlashTest extends Sprite {
public function FlashTest() {
// write as3 code here..
var myLine:Shape = new Shape();
var ax:Array = [];
var ay:Array = [];
var at:Array = [];
var ao:Array = [];
var f1:int=0;
var rectangle:Shape = new Shape;
rectangle.graphics.beginFill(0x000000);
rectangle.graphics.drawRect(0, 0, 500,500);
rectangle.graphics.endFill();
addChild(rectangle);
addChild(myLine);
for(var i:int=0;i<250;i++){
ax.push(Math.sin(i/250)*500);
at.push(Math.random()*1+2);
ao.push(Math.random()*1+0.1);
}
for(var ii:int=252;ii>0;ii--){
ay.push(Math.sin(ii*2)*500);
}
addEventListener(Event.ENTER_FRAME, ef);
function ef(e:Event):void{
myLine.graphics.clear();
f1++;
for(var i:int=0;i<250;i++){
myLine.graphics.lineStyle(at[i],0xFFFFFF,ao[i]);
myLine.graphics.moveTo(ax[i]+Math.sin(f1/5*i/200)*15,0);
myLine.graphics.lineTo(ay[i]+Math.sin(f1/10*i/200)*10,Math.sin(f1/i/100)*50+550);
}
}
}
}
}