Frame 1
function createCS() {
cos = new Array(360);
sin = new Array(360);
var a = -180;
while (180 >= a) {
cos[a + 180] = Math.cos((a * Math.PI) / 180);
sin[a + 180] = Math.sin((a * Math.PI) / 180);
a++;
}
return(undefined);
}
function deleteAll() {
for (var a in _root) {
if (typeof(_root[a]) == "movieclip") {
_root[a].removeMovieClip();
}
dummy.jj = 0;
num = 0;
create = true;
}
}
fscommand ("allowscale", false);
var middleX = 200;
var middleY = 200;
var fov = 180;
createCS();
MovieClip.prototype.createVertex = function (jj) {
removeMovieClip(_root["v" + jj]);
removeMovieClip(_root["v_" + jj]);
_root["v" + jj].pause = false;
_root["v_" + jj].pause = false;
_root.attachMovie("vert", "v" + jj, jj);
_root["v" + jj].x = _root._xmouse;
_root["v" + jj].y = _root._ymouse;
_root["v" + jj].pz = 30;
_root["v" + jj].pause = false;
_root.attachMovie("vert", "v_" + jj, 200 + jj);
_root["v_" + jj].x = _root._xmouse + ((_root.middleX - _root._xmouse) / 7);
_root["v_" + jj].y = _root._ymouse + ((_root.middleY - _root._ymouse) / 7);
_root["v_" + jj].pz = -30;
_root["v_" + jj].pause = false;
_root.attachMovie("vert", "v" + (jj + 1), 300 + jj);
_root["v" + (jj + 1)].x = _root._xmouse;
_root["v" + (jj + 1)].y = _root._ymouse;
_root["v" + (jj + 1)].pz = 30;
_root["v" + (jj + 1)].pause = true;
_root.attachMovie("vert", "v_" + (jj + 1), 400 + jj);
_root["v_" + (jj + 1)].x = _root._xmouse + ((_root.middleX - _root._xmouse) / 7);
_root["v_" + (jj + 1)].y = _root._ymouse + ((_root.middleY - _root._ymouse) / 7);
_root["v_" + (jj + 1)].pz = -30;
_root["v_" + (jj + 1)].pause = "second";
_root.attachMovie("line", "l" + jj, 500 + jj);
_root["l" + jj].myline.r1 = _root["v" + (jj + 1)];
_root["l" + jj].myline.r2 = _root["v" + jj];
_root.attachMovie("line", "l_" + jj, 600 + jj);
_root["l_" + jj].myline.r1 = _root["v_" + jj];
_root["l_" + jj].myline.r2 = _root["v" + jj];
_root.attachMovie("line", "ll_" + jj, 700 + jj);
_root["ll_" + jj].myline.r1 = _root["v_" + (jj + 1)];
_root["ll_" + jj].myline.r2 = _root["v_" + jj];
_root["lll_" + jj].myline.r1 = _root["v" + (jj + 1)];
_root["lll_" + jj].myline.r2 = _root["v_" + (jj + 1)];
return(undefined);
};
MovieClip.prototype.closeObj = function (num) {
removeMovieClip(_root["v" + (num + 1)]);
removeMovieClip(_root["v_" + (num + 1)]);
removeMovieClip(_root["lll_" + num]);
_root["l" + num].myline.r1 = _root.v1;
_root["ll_" + num].myline.r1 = _root.v_1;
var b = 1;
while (num >= b) {
_root["v_" + b].x = _root["v" + b].x;
_root["v_" + b].y = _root["v" + b].y;
b++;
}
for (var a in _root) {
delete _root[a].pause;
_root[a].pz = _root[a].pz;
_root[a].px = (_root.middleY - _root[a].x) / 2;
_root[a].py = (_root.middleY - _root[a].y) / 2;
}
create = false;
};
Instance of Symbol 9 MovieClip "dummy" in Frame 1
onClipEvent (mouseUp) {
if (!_root.create) {
return(undefined);
}
jj++;
_root.num++;
createVertex(jj);
}
onClipEvent (load) {
var jj = 0;
_root.create = true;
}
onClipEvent (enterFrame) {
Set("../:dx", (../:middleX - _root._xmouse) / 25);
Set("../:dy", (../:middleY - _root._ymouse) / 25);
}
Instance of Symbol 2 MovieClip "vertex" in Symbol 3 MovieClip [vert] Frame 1
onClipEvent (enterFrame) {
if ((_parent.pause != false) && (_parent.pause != undefined)) {
if (_parent.pause == "second") {
setProperty("../", _x , _root._xmouse + ((_root.middleX - _root._xmouse) / 7));
setProperty("../", _y , _root._ymouse + ((_root.middleY - _root._ymouse) / 7));
} else {
setProperty("../", _x , _root._xmouse);
setProperty("../", _y , _root._ymouse);
}
return(undefined);
}
if ((_parent.pause == false) && (_parent.pause != undefined)) {
setProperty("../", _x , ../:x);
setProperty("../", _y , ../:y);
}
if (_root.create) {
return(undefined);
}
tz = ../:pz;
ty = ../:py;
rotx2 = (-int(../../:dy)) + 180;
Set("../:pz", (tz * ../../:cos[rotx2]) - (ty * ../../:sin[rotx2]));
Set("../:py", (ty * ../../:cos[rotx2]) + (tz * ../../:sin[rotx2]));
tx = ../:px;
tz = ../:pz;
roty2 = (-int(../../:dx)) + 180;
Set("../:px", (tx * ../../:cos[roty2]) - (tz * ../../:sin[roty2]));
Set("../:pz", (tz * ../../:cos[roty2]) + (tx * ../../:sin[roty2]));
k = _root.fov / (_root.fov - ../:pz);
setProperty("../", _x , ../../:middleX + (../:px * k));
setProperty("../", _y , ../../:middleY - (../:py * k));
setProperty("../", _xscale , 100 * k);
setProperty("../", _yscale , 100 * k);
}
Instance of Symbol 5 MovieClip "myline" in Symbol 6 MovieClip [line] Frame 1
onClipEvent (enterFrame) {
setProperty("../", _x , (r1 ? (r1._x) : (getProperty("../../", _xmouse))));
setProperty("../", _y , (r1 ? (r1._y) : (getProperty("../../", _ymouse))));
if (!r1) {
lx = getProperty("../../", _xmouse) - r2._x;
ly = getProperty("../../", _ymouse) - r2._y;
} else {
lx = r1._x - r2._x;
ly = r1._y - r2._y;
}
rotation = Math.atan2(lx, ly);
rotation = rotation * 57.2957795130823;
setProperty("../", _rotation , 270 - rotation);
setProperty("../", _xscale , Math.sqrt((lx * lx) + (ly * ly)));
}
Symbol 11 Button
on (keyPress "<Space>") {
closeObj(_root.num);
zd._visible = 1;
}
Symbol 17 Button
on (release) {
deleteAll();
}