Frame 1
function unlock() {
clear();
}
function rotate() {
i = 0;
while (i < _elemnum) {
xang = xangle * (Math.PI/180);
yang = yangle * (Math.PI/180);
zpos = (_element[0][i][2] * Math.cos(yang)) - (_element[0][i][0] * Math.sin(yang));
xpos = (_element[0][i][2] * Math.sin(yang)) + (_element[0][i][0] * Math.cos(yang));
ypos = (_element[0][i][1] * Math.cos(xang)) - (zpos * Math.sin(xang));
zpos = (_element[0][i][1] * Math.sin(xang)) + (zpos * Math.cos(xang));
depth = 1 / ((zpos / perspective) + 1);
_root["element_0_" add i]._x = (xpos * depth) + centerx;
_root["element_0_" add i]._y = (ypos * depth) + centery;
_root["element_0_" add i]._xscale = (_root["element_0_" add i]._yscale = (depth / 2) * 500);
_root["element_0_" add i]._alpha = depth * 100;
_root["element_0_" add i].swapDepths(depth * 500);
i++;
}
lineStyle(1, "0xFFFFFF", 50);
i = 0;
while (i < _elemnum) {
xang = xangle * (Math.PI/180);
yang = yangle * (Math.PI/180);
zpos = (_element[1][i][2] * Math.cos(yang)) - (_element[1][i][0] * Math.sin(yang));
xpos = (_element[1][i][2] * Math.sin(yang)) + (_element[1][i][0] * Math.cos(yang));
ypos = (_element[1][i][1] * Math.cos(xang)) - (zpos * Math.sin(xang));
zpos = (_element[1][i][1] * Math.sin(xang)) + (zpos * Math.cos(xang));
depth = 1 / ((zpos / perspective) + 1);
_root["element_1_" add i]._x = (xpos * depth) + centerx;
_root["element_1_" add i]._y = (ypos * depth) + centery;
moveTo(_root["element_1_" add i]._x, _root["element_1_" add i]._y);
lineTo(_root["element_0_" add i]._x, _root["element_0_" add i]._y);
_root["element_1_" add i]._xscale = (_root["element_1_" add i]._yscale = (depth / 2) * 500);
_root["element_1_" add i]._alpha = depth * 100;
_root["element_1_" add i].swapDepths(depth * 500);
i++;
}
}
_depth = 0;
_strandnum = 2;
_elemnum = 40;
_element = new Array(_strandnum);
dxpos = 0;
dypos = 0;
centerx = Stage.width / 2;
centery = Stage.height / 2;
trailx = 50;
traily = 50;
perspective = 800;
_root._quality = "LOW";
i = 0;
while (i < _strandnum) {
_element[i] = new Array(_elemnum);
j = 0;
while (j < _elemnum) {
_element[i][j] = new Array(5);
j++;
}
i++;
}
i = 0;
while (i < _elemnum) {
_element[0][i][0] = (i * (Stage.width / _elemnum)) - centerx;
_element[0][i][1] = Math.sin((i * 10) * (Math.PI/180)) * 100;
_element[0][i][2] = Math.cos((i * 10) * (Math.PI/180)) * 100;
duplicateMovieClip ("element", "element_0_" add i, _depth);
_depth++;
i++;
}
i = 0;
while (i < _elemnum) {
_element[1][i][0] = (i * (Stage.width / _elemnum)) - centerx;
_element[1][i][1] = Math.sin(((i * 10) * (Math.PI/180)) - 180) * 100;
_element[1][i][2] = Math.cos(((i * 10) * (Math.PI/180)) - 180) * 100;
duplicateMovieClip ("element2", "element_1_" add i, _depth);
_depth++;
i++;
}
Instance of Symbol 19 MovieClip "cross" in Frame 1
onClipEvent (enterFrame) {
this._x = _root["element_1_" add int(_root._elemnum / 2)]._x;
this._y = _root["element_1_" add int(_root._elemnum / 2)]._y;
}
Instance of Symbol 21 MovieClip in Frame 1
onClipEvent (load) {
this._x = 0;
}
onClipEvent (enterFrame) {
this._x = _root["element_1_" add int(_root._elemnum / 2)]._x;
}
Instance of Symbol 23 MovieClip in Frame 1
onClipEvent (load) {
this._y = 0;
}
onClipEvent (enterFrame) {
this._y = _root["element_1_" add int(_root._elemnum / 2)]._y;
}
Frame 2
if (Key.isDown(39)) {
dxpos = dxpos + 10;
} else if (Key.isDown(37)) {
dxpos = dxpos - 10;
}
if (Key.isDown(38)) {
dypos = dypos + 10;
} else if (Key.isDown(40)) {
dypos = dypos - 10;
}
dx = dxpos - trailx;
dy = dypos - traily;
addx = dx / 3;
addy = dy / 3;
trailx = trailx + addx;
traily = traily + addy;
yangle = trailx;
xangle = traily;
rotate();
Frame 3
unlock();
gotoAndPlay (2);
Symbol 27 Button
on (press) {
_root._quality = "LOW";
}
Symbol 29 Button
on (press) {
_root._quality = "HIGH";
}