Symbol 164 MovieClip Frame 1
var stars = 100;
var maxSpeed = 16;
var minSpeed = 2;
var i = 0;
while (i < stars) {
var mc = this.attachMovie("star", "star" + i, i);
mc._x = random(Stage.width);
mc._y = random(Stage.height);
mc.speed = random(maxSpeed - minSpeed) + minSpeed;
var size = (random(33) + (0.6 * random(4)));
mc._width = size;
mc._height = size;
i++;
}
this.onEnterFrame = function () {
var _local3 = 0;
while (_local3 < stars) {
var _local2 = this["star" + _local3];
if (_local2._y > 0) {
_local2._y = _local2._y - _local2.speed;
} else {
_local2._y = Stage.height;
_local2.speed = random(maxSpeed - minSpeed) + minSpeed;
_local2._x = random(Stage.width);
}
_local3++;
}
};
Symbol 166 MovieClip Frame 1
circle_mc.onPress = function () {
this.startDrag();
};
circle_mc.onRelease = function () {
this.stopDrag();
};
Instance of Symbol 165 MovieClip "model_mc" in Symbol 166 MovieClip Frame 1
onClipEvent (load) {
function xy_matrix(rx, ry) {
var _local2 = Math.cos(rx);
var _local4 = Math.sin(rx);
var _local1 = Math.cos(ry);
var _local3 = Math.sin(ry);
var _local5 = {r11:_local1, r12:0, r13:_local3, r21:_local4 * _local3, r22:_local2, r23:(-_local1) * _local4, r31:(-_local2) * _local3, r32:_local4, r33:_local2 * _local1};
return(_local5);
}
function Point(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
function Camera(focal_length, zoom) {
this.f = focal_length;
this.zoom = zoom;
}
function rotateObject(model) {
var _local7 = _ymouse / 100;
var _local6 = _xmouse / 100;
var _local5 = xy_matrix(_local7, _local6);
var _local2 = 0;
while (_local2 < model.length) {
var _local3 = model[_local2].rotate(_local5);
this.cam.project(_local3, this[_local2]);
_local2++;
}
updateAfterEvent();
}
Point.prototype.rotate = function (R) {
var _local3 = {x:((R.r11 * this.x) + (R.r12 * this.y)) + (R.r13 * this.z), y:((R.r21 * this.x) + (R.r22 * this.y)) + (R.r23 * this.z), z:((R.r31 * this.x) + (R.r32 * this.y)) + (R.r33 * this.z)};
return(_local3);
};
Camera.prototype.project = function (vector, mc) {
var _local2 = (this.zoom * this.f) / (vector.z - this.f);
mc._x = _local2 * vector.x;
mc._y = _local2 * vector.y;
};
this.model = [new Point(1, 1, 1), new Point(1, 1, -1), new Point(1, -1, 1), new Point(1, -1, -1), new Point(-1, 1, 1), new Point(-1, 1, -1), new Point(-1, -1, 1), new Point(-1, -1, -1)];
var i = 0;
while (i < this.model.length) {
this.attachMovie("locator", i, i);
i++;
}
this.cam = new Camera(5, 80);
rotateObject(this.model);
}
onClipEvent (mouseMove) {
rotateObject(this.model);
}
Instance of Symbol 165 MovieClip "model_mc" in Symbol 166 MovieClip Frame 1
onClipEvent (load) {
function xy_matrix(rx, ry) {
var _local2 = Math.cos(rx);
var _local4 = Math.sin(rx);
var _local1 = Math.cos(ry);
var _local3 = Math.sin(ry);
var _local5 = {r11:_local1, r12:0, r13:_local3, r21:_local4 * _local3, r22:_local2, r23:(-_local1) * _local4, r31:(-_local2) * _local3, r32:_local4, r33:_local2 * _local1};
return(_local5);
}
function Point(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
function Camera(focal_length, zoom) {
this.f = focal_length;
this.zoom = zoom;
}
function rotateObject(model) {
var _local7 = _ymouse / 100;
var _local6 = _xmouse / 100;
var _local5 = xy_matrix(_local7, _local6);
var _local2 = 0;
while (_local2 < model.length) {
var _local3 = model[_local2].rotate(_local5);
this.cam.project(_local3, this[_local2]);
_local2++;
}
updateAfterEvent();
}
Point.prototype.rotate = function (R) {
var _local3 = {x:((R.r11 * this.x) + (R.r12 * this.y)) + (R.r13 * this.z), y:((R.r21 * this.x) + (R.r22 * this.y)) + (R.r23 * this.z), z:((R.r31 * this.x) + (R.r32 * this.y)) + (R.r33 * this.z)};
return(_local3);
};
Camera.prototype.project = function (vector, mc) {
var _local2 = (this.zoom * this.f) / (vector.z - this.f);
mc._x = _local2 * vector.x;
mc._y = _local2 * vector.y;
};
this.model = [new Point(1, 1, 1), new Point(1, 1, -1), new Point(1, -1, 1), new Point(1, -1, -1), new Point(-1, 1, 1), new Point(-1, 1, -1), new Point(-1, -1, 1), new Point(-1, -1, -1)];
var i = 0;
while (i < this.model.length) {
this.attachMovie("locator", i, i);
i++;
}
this.cam = new Camera(5, 80);
rotateObject(this.model);
}
onClipEvent (mouseMove) {
rotateObject(this.model);
}
Instance of Symbol 165 MovieClip "model_mc" in Symbol 166 MovieClip Frame 1
onClipEvent (load) {
function xy_matrix(rx, ry) {
var _local2 = Math.cos(rx);
var _local4 = Math.sin(rx);
var _local1 = Math.cos(ry);
var _local3 = Math.sin(ry);
var _local5 = {r11:_local1, r12:0, r13:_local3, r21:_local4 * _local3, r22:_local2, r23:(-_local1) * _local4, r31:(-_local2) * _local3, r32:_local4, r33:_local2 * _local1};
return(_local5);
}
function Point(x, y, z) {
this.x = x;
this.y = y;
this.z = z;
}
function Camera(focal_length, zoom) {
this.f = focal_length;
this.zoom = zoom;
}
function rotateObject(model) {
var _local7 = _ymouse / 100;
var _local6 = _xmouse / 100;
var _local5 = xy_matrix(_local7, _local6);
var _local2 = 0;
while (_local2 < model.length) {
var _local3 = model[_local2].rotate(_local5);
this.cam.project(_local3, this[_local2]);
_local2++;
}
updateAfterEvent();
}
Point.prototype.rotate = function (R) {
var _local3 = {x:((R.r11 * this.x) + (R.r12 * this.y)) + (R.r13 * this.z), y:((R.r21 * this.x) + (R.r22 * this.y)) + (R.r23 * this.z), z:((R.r31 * this.x) + (R.r32 * this.y)) + (R.r33 * this.z)};
return(_local3);
};
Camera.prototype.project = function (vector, mc) {
var _local2 = (this.zoom * this.f) / (vector.z - this.f);
mc._x = _local2 * vector.x;
mc._y = _local2 * vector.y;
};
this.model = [new Point(1, 1, 1), new Point(1, 1, -1), new Point(1, -1, 1), new Point(1, -1, -1), new Point(-1, 1, 1), new Point(-1, 1, -1), new Point(-1, -1, 1), new Point(-1, -1, -1)];
var i = 0;
while (i < this.model.length) {
this.attachMovie("locator", i, i);
i++;
}
this.cam = new Camera(5, 80);
rotateObject(this.model);
}
onClipEvent (mouseMove) {
rotateObject(this.model);
}
Symbol 168 MovieClip Frame 1
circle_mc.onPress = function () {
this.startDrag();
};
circle_mc.onRelease = function () {
this.stopDrag();
};
Symbol 170 MovieClip Frame 1
MovieClip.prototype.getAngleTo_r = function (thisX, thisY) {
var _local4 = thisX - this._x;
var _local2 = -1 * (thisY - this._y);
var _local3 = Math.round(Math.atan2(_local2, _local4) * 100) / 100;
return(_local3);
};
MovieClip.prototype.getAngleTo_d = function (thisX, thisY) {
var _local5 = thisX - this._x;
var _local3 = -1 * (thisY - this._y);
var _local4 = Math.atan2(_local3, _local5);
var _local2 = Math.round((_local4 * 180) / 3.141593);
return(_local2);
};
MovieClip.prototype.getDistanceTo = function (thisX, thisY) {
var _local3 = thisX - this._x;
var _local2 = thisY - this._y;
var _local4 = Math.round(Math.sqrt((_local3 * _local3) + (_local2 * _local2)));
return(_local4);
};
MovieClip.prototype.elasticMover = function (_tx, _ty, _tz, _k, _f, minDist) {
var _local2 = this;
_local2.tx = _tx;
_local2.ty = _ty;
_local2.tz = _tz;
_local2.ax = 0;
_local2.ay = 0;
_local2.az = 0;
_local2.vx = 0;
_local2.vy = 0;
_local2.vz = 0;
_local2.k = _k;
_local2.fric = _f;
dd = 0;
_local2.onEnterFrame = function () {
var _local2 = this;
x = _local2.x - cam.x;
y = _local2.y - cam.y;
z = _local2.z - cam.z;
_local2.ax = _tx - _local2.x;
_local2.ax = _local2.ax * _k;
_local2.vx = _local2.vx + _local2.ax;
_local2.vx = _local2.vx * _f;
_local2.x = _local2.x + _local2.vx;
_local2.ay = _ty - _local2.y;
_local2.ay = _local2.ay * _k;
_local2.vy = _local2.vy + _local2.ay;
_local2.vy = _local2.vy * _f;
_local2.y = _local2.y + _local2.vy;
_local2.az = _tz - _local2.z;
_local2.az = _local2.az * _k;
_local2.vz = _local2.vz + _local2.az;
_local2.vz = _local2.vz * _f;
_local2.z = _local2.z + _local2.vz;
var _local3 = f / (f + z);
_local2._x = x * _local3;
_local2._y = y * _local3;
_local2._xscale = (_local2._yscale = 100 * _local3);
_local2._rotation = _local2._rotation + 5;
_local2.swapDepths(-z);
if ((Math.round(_local2.x) == Math.round(_local2.tx)) && (Math.round(_local2.y) == Math.round(_local2.ty))) {
delete _local2.onEnterFrame;
}
};
};
cam = {x:0, y:0, z:0, rotation:0, upAngle:0};
f = 756;
clipArray = [];
createEmptyMovieClip("holder", 1);
effectA_1 = function () {
var _local3 = _root;
var _local4 = this;
_local4.elasticMover(_local3._xmouse + (Math.random() * 100), _local3._ymouse, random(450), 0.05 + (Math.random() * 0.5), 0.1 + (Math.random() * 0.6), 130);
var _local5 = _local4.getAngleTo_d(_local3._xmouse, _local3._ymouse);
_local4._rotation = -8 * _local5;
};
var i = 1;
while (i <= 20) {
obj = holder.attachMovie("a", "node" + i, 100 + i);
obj.x = 0;
obj.y = 0;
obj.z = 0;
obj.tx = 0;
obj.ty = 0;
obj.tz = 0;
obj.ax = 0;
obj.ay = 0;
obj.az = 0;
obj.vx = 0;
obj.vy = 0;
obj.vz = 0;
obj.k = 0.56;
obj.fric = 0.2;
obj.effectA = effectA_1;
clipArray.push(obj);
i++;
}
_root.onMouseDown = function () {
var _local1 = 0;
while (_local1 <= clipArray.length) {
clipArray[_local1].effectA();
_local1++;
}
};