关键代码部分:
// Action script…
// [Action in Frame 1]
Stage.scaleMode = “noScale”;// [Action in Frame 218]
stop ();
p = new Array();
count = 0;
p[count] = {x: _xmouse, y: _ymouse, w: 0, col: 0};
++count;
rand = Math.random;
sin = Math.sin;
r = 255;
g = 127;
b = 0;
w = 0;
ri = 2.000000E-002;
gi = 1.500000E-002;
bi = 2.500000E-002;
this.onEnterFrame = function ()
{
vx = _xmouse - oldx + rand() * 2 - 1;
vy = _ymouse - oldy + rand() * 2 - 1;
oldx = _xmouse;
oldy = _ymouse;
p[count] = {x: _xmouse, y: _ymouse, vx: vx * 5.000000E-001, vy: vy * 5.000000E-001, w: sin(w = w + 2.000000E-001) * 5 + 5, col: sin(r = r + ri) * 128 + 127 << 16 | sin(g = g + gi) * 128 + 127 << 8 | sin(b = b + bi) * 128 + 127};
++count;
clear();
moveTo(_xmouse, _ymouse);
for (var i in p)
{
lineStyle(p[i].w, p[i].col);
p[i].x = p[i].x + p[i].vx;
p[i].y = p[i].y + p[i].vy;
if (p[i].y > 380)
{
p[i].y = 380;
p[i].vy = p[i].vy * -5.000000E-001;
p[i].vx = p[i].vx * 9.500000E-001;
} // end if
if (i)
{
curveTo(p[i].x, p[i].y, (Number(p[i].x) + Number(p[i - 1].x)) / 2, (Number(p[i].y) + Number(p[i - 1].y)) / 2);
} // end if
if (p.length > 50)
{
p.splice(0, 1);
–count;
} // end if
} // end of for…in
};