/@function CreateLines(amount) { var data=new Object(); var g=app.newwindow_graphics(300,300); //window.makedocking(g.properties.hwnd).dock(2); function RGB(red,green,blue) { return red+(green<<8)+(blue<<16); } function timer(data) { var g=data.g; for(iline=0;ilineg.width) line.dx1=-line.dx1; line.y1+=line.dy1; if(line.y1<0 || line.y1>g.height) line.dy1=-line.dy1; line.x2+=line.dx2; if(line.x2<0 || line.x2>g.width) line.dx2=-line.dx2; line.y2+=line.dy2; if(line.y2<0 || line.y2>g.height) line.dy2=-line.dy2; g.SetPen(line.color); g.MoveTo(line.x1, line.y1); g.LineTo(line.x2, line.y2); line.hx1[line.history]=line.x1; line.hy1[line.history]=line.y1; line.hx2[line.history]=line.x2; line.hy2[line.history]=line.y2; if(++line.history==data.history) line.history=0; } } function InitializeLine(line, data) { line.color=RGB(Math.random()*128+128, Math.random()*128+128, Math.random()*128+128); line.history=0; line.dx1=Math.random()*10-5; line.dy1=Math.random()*10-5; line.dx2=Math.random()*10-5; line.dy2=Math.random()*10-5; line.x1=Math.random()*data.g.width; line.y1=Math.random()*data.g.height; line.x2=Math.random()*data.g.width; line.y2=Math.random()*data.g.height; line.hx1=new Array(); line.hy1=new Array(); line.hx2=new Array(); line.hy2=new Array(); for(j=0;j