Frame 1
function getSLok(lok, sdl) {
var _local2 = 0;
lok.diskr = 4;
if (!lok.arr) {
lok.arr = new Array();
}
if (!lok.arn) {
lok.arn = new Array();
}
var _local8 = lok.s0._x + lok._x;
var _local7 = lok.s0._y + lok._y;
lok.x0 = _local8;
lok.y0 = _local7;
var _local6 = 0;
var _local3;
while (lok["s" + _local2]) {
var _local4 = lok["s" + _local2];
if (lok.arr[_local2]) {
_local3 = lok.arr[_local2];
} else {
_local3 = new Object();
lok.arr[_local2] = _local3;
}
_local3.x = _local4._x + lok._x;
_local3.y = _local4._y + lok._y;
if (sdl) {
var _local5 = 0;
if (_local2 > 0) {
_local5 = Math.sqrt(((_local3.x - _local8) * (_local3.x - _local8)) + ((_local3.y - _local7) * (_local3.y - _local7)));
}
_local6 = _local6 + _local5;
_local3.dl = _local6;
}
_local3.shir = _local4._yscale;
_local3.ugol = _local4._rotation;
_local8 = _local4._x + lok._x;
_local7 = _local4._y + lok._y;
_local2++;
}
lok.arr[_local2 - 1].shir = 0;
if (sdl) {
lok.dlina = _local6;
lok.ndlina = Math.round(_local6 / lok.diskr);
_local2 = 0;
while (_local2 < lok.arr.length) {
lok.arr[_local2].odl = lok.arr[_local2].dl / _local6;
_local2++;
}
}
interpol(lok);
}
function interpol(lok) {
var _local5;
var _local6 = 0;
var _local2 = 0;
i = 0;
while (i < lok.ndlina) {
_local6 = i / lok.ndlina;
while ((_local2 < lok.arr.length) && (_local6 >= lok.arr[_local2].odl)) {
_local2++;
}
var _local4 = _local6 - lok.arr[_local2 - 1].odl;
var _local3 = lok.arr[_local2].odl - _local6;
var _local7 = _local4 + _local3;
_local4 = 1 - (_local4 / _local7);
_local3 = 1 - (_local3 / _local7);
if (lok.arn[i]) {
_local5 = lok.arn[i];
} else {
_local5 = new Object();
lok.arn[i] = _local5;
}
_local5.x = (lok.arr[_local2 - 1].x * _local4) + (lok.arr[_local2].x * _local3);
_local5.y = (lok.arr[_local2 - 1].y * _local4) + (lok.arr[_local2].y * _local3);
_local5.ugol = (lok.arr[_local2 - 1].ugol * _local4) + (lok.arr[_local2].ugol * _local3);
_local5.shir = (lok.arr[_local2 - 1].shir * _local4) + (lok.arr[_local2].shir * _local3);
i++;
}
if (lok.arn[lok.ndlina]) {
_local5 = lok.arn[lok.ndlina];
} else {
_local5 = new Object();
lok.arn[lok.ndlina] = _local5;
}
_local5.x = lok.arr[_local2].x;
_local5.y = lok.arr[_local2].y;
_local5.ugol = lok.arr[_local2].ugol;
_local5.shir = lok.arr[_local2].shir;
}
function drawLok(lok, gr, mult, ncolor) {
if (mult == undefined) {
mult = 1;
}
gr.moveTo(lok.arn[0].x, lok.arn[0].y);
mat.createGradientBox(600, 600, 0, lok.x0 - 300, lok.y0 - 300);
gr.beginGradientFill("radial", (ncolor ? (ncolor) : (lok.grcolor)), [100, 100], [0, 255], mat);
var dx;
var dy;
var a;
var dkach = 0.008454;
var kach = 50;
var perr;
var m = 1;
with (lok) {
var i = 0;
var di = 1;
while (i >= 0) {
if (mult < 1) {
if (i > ((ndlina * mult) * 0.5)) {
m = (mult * (1 - (i / (ndlina * mult)))) * 2;
} else {
m = mult;
}
}
perr = ((i - (faza * df)) / period) * diskr;
dy = ((((-di) * arn[i].shir) / 2) * m) + ((((((Math.sin((perr * Math.PI) * 2) + (Math.sin(((perr / period2) * Math.PI) * 2) * 0.5)) * ampl) * mult) * i) / ndlina) * thun);
dx = ((((orient * (Math.sin(((perr * Math.PI) * 4) + Math.PI) + ((di * Math.cos((perr * Math.PI) * 2)) * 0.3))) * izgib) * mult) * i) / ndlina;
a = (arn[i].ugol * Math.PI) / 180;
gr.lineTo(((arn[i].x + (((Math.sin(faza * dkach) * kach) * i) / ndlina)) + (dx * Math.cos(a))) - (dy * Math.sin(a)), (arn[i].y + (dx * Math.sin(a))) + (dy * Math.cos(a)));
i = i + di;
if (i >= Math.round(ndlina * mult)) {
di = -1;
}
}
}
}
function setPhis(lok) {
var _local2 = 1;
while (_local2 <= 3) {
lok["s" + _local2].ancX = lok["s" + _local2]._x;
lok["s" + _local2].ancY = lok["s" + _local2]._y;
lok["s" + _local2].dx = (lok["s" + _local2].dy = 0);
_local2++;
}
_local2 = 4;
while (_local2 <= 6) {
lok["s" + _local2].anc = lok["s" + (_local2 - 1)];
lok["s" + _local2].dx = (lok["s" + _local2].dy = 0);
lok["s" + _local2].ancX = lok["s" + _local2]._x - lok["s" + _local2].anc._x;
lok["s" + _local2].ancY = lok["s" + _local2]._y - lok["s" + _local2].anc._y;
_local2++;
}
}
function phisLok(lok, derzh) {
var _local4 = 32;
var _local5 = 8;
var _local1 = 3;
while (_local1 <= 6) {
var _local2 = lok["s" + _local1];
if (_local2.anc) {
_local2.uprx = (_local2.ancX - (_local2._x - _local2.anc._x)) / _local4;
_local2.upry = (_local2.ancY - (_local2._y - _local2.anc._y)) / _local4;
} else {
_local2.uprx = (_local2.ancX - _local2._x) / _local4;
_local2.upry = (_local2.ancY - _local2._y) / _local4;
}
_local2.dx = _local2.dx + _local2.uprx;
_local2.dy = _local2.dy + _local2.upry;
_local2.dx = _local2.dx * 0.95;
_local2.dy = _local2.dy * 0.95;
if ((_local1 > 3) || (!derzh)) {
_local2._x = _local2._x + (_local2.dx + (_local2.uprx * _local5));
_local2._y = _local2._y + (_local2.dy + (_local2.upry * _local5));
}
_local1++;
}
_local1 = 1;
while (_local1 <= 2) {
var _local2 = lok["s" + _local1];
_local2._x = _local2.ancX + (((lok.s3._x - lok.s3.ancX) * _local1) / 3);
_local2._y = _local2.ancY + (((lok.s3._y - lok.s3.ancY) * _local1) / 3);
_local1++;
}
}
function playsound() {
b_play._visible = false;
snd = new Sound();
snd.attachSound("Loona");
timer = setInterval(tip, 970);
time = 0;
snd.start();
}
function tip() {
time = time + 1;
switch (time) {
case 1 :
mthun = 0.7;
return;
case 8 :
mthun = 1;
return;
case 30 :
mthun = 0.7;
return;
case 37 :
mthun = 1;
return;
case 61 :
mthun = 1.5;
return;
case 88 :
mthun = 0.7;
return;
case 95 :
mthun = 1;
return;
case 120 :
mthun = 1.5;
return;
case 146 :
mthun = 0.7;
return;
case 154 :
mthun = 1.2;
return;
case 179 :
mthun = 1.5;
return;
case 204 :
mthun = 0.7;
return;
case 212 :
mthun = 1;
return;
case 227 :
mthun = 1.7;
return;
case 245 :
mthun = 1;
}
}
stop();
var faza = 0;
var derzh1 = false;
var derzh2 = false;
mat = new flash.geom.Matrix();
lok1.period = (lok2.period = 70);
lok1.period2 = (lok2.period2 = 2.681);
lok1.df = (lok2.df = 0.3);
lok1.dfper = (lok2.dfper = 0.005187);
lok1.ampl = (lok2.ampl = 30);
lok1.izgib = (lok2.izgib = 5);
lok1.orient = -1;
lok2.orient = 1;
lok1.grcolor = (lok2.grcolor = [7419644, 786551]);
lok1a.period = (lok2a.period = 70);
lok1a.period2 = (lok2a.period2 = 3.18);
lok1a.ampl = (lok2a.ampl = 20);
lok1a.df = (lok2a.df = 0.3);
lok1a.orient = -1;
lok2a.orient = 1;
lok1a.izgib = (lok2a.izgib = 4);
lok1a.grcolor = (lok2a.grcolor = [786551, 196642]);
getSLok(lok1, true);
getSLok(lok2, true);
setPhis(lok2);
setPhis(lok1);
b_drag1._alpha = (b_drag2._alpha = 0);
b_drag1.useHandCursor = (b_drag2.useHandCursor = true);
b_drag1.onRollOver = function () {
b_drag1._alpha = 20;
};
b_drag1.onRollOut = function () {
b_drag1._alpha = 0;
};
b_drag2.onRollOver = function () {
b_drag2._alpha = 20;
};
b_drag2.onRollOut = function () {
b_drag2._alpha = 0;
};
onMouseDown = function () {
bdragX = _xmouse;
bdragY = _ymouse;
if (b_drag1._alpha > 0) {
derzh1 = true;
}
if (b_drag2._alpha > 0) {
derzh2 = true;
}
};
onMouseUp = function () {
b_drag1._alpha = (b_drag2._alpha = 0);
derzh1 = (derzh2 = false);
};
onMouseMove = function () {
if (derzh1 || (derzh2)) {
var _local2 = _xmouse - bdragX;
var _local1 = _ymouse - bdragY;
var _local3 = Math.sqrt((_local2 * _local2) + (_local1 * _local1));
if (_local3 > 100) {
_local2 = _local2 * (100 / _local3);
_local1 = _local1 * (100 / _local3);
}
if (derzh1) {
lok1.s3._x = lok1.s3.ancX + _local2;
lok1.s3._y = lok1.s3.ancY + _local1;
}
if (derzh2) {
lok2.s3._x = lok2.s3.ancX + _local2;
lok2.s3._y = lok2.s3.ancY + _local1;
}
}
};
var sndLoaded = false;
var snd;
var thun = 1;
var mthun = 1;
var timer;
var time;
var bumc;
var bum = 0;
lun.onRelease = function () {
};
onEnterFrame = function () {
if (!sndLoaded) {
var _local2 = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (_local2 >= 100) {
sndLoaded = true;
gotoAndStop (2);
b_play.onRelease = playsound;
}
perc.text = ("Loading " + _local2) + " %";
}
if (thun > mthun) {
thun = thun - 0.02;
}
if (thun < mthun) {
thun = thun + 0.02;
}
out.text = thun;
faza = faza + (thun * thun);
graph.clear();
phisLok(lok2, derzh2);
phisLok(lok1, derzh1);
getSLok(lok1);
getSLok(lok2);
drawLok(lok1, graph);
drawLok(lok1, graph, 0.8, [786551, 196642]);
drawLok(lok2, graph);
drawLok(lok2, graph, 0.8, [786551, 196642]);
};
Symbol 14 MovieClip Frame 1
gotoAndPlay(Math.floor((Math.random() * 70) + 45));
Symbol 14 MovieClip Frame 93
_yscale = ((Math.random() * 40) + 60);
_xscale = ((Math.random() * 40) + 60);
rep1 = Math.floor(Math.random() * 2) + 1;
rep2 = Math.floor(Math.random() * 3) + 2;
_x = (((_parent["lok" + rep1]._x + _parent["lok" + rep1]["s" + rep2]._x) + (Math.random() * 300)) - 150);
_y = (((_parent["lok" + rep1]._y + _parent["lok" + rep1]["s" + rep2]._y) + (Math.random() * 300)) - 150);
if (!_parent.graph.hitTest(_x, _y, true)) {
gotoAndPlay (92);
}
Symbol 14 MovieClip Frame 118
gotoAndPlay(Math.floor((Math.random() * 70) + 1));
Symbol 27 MovieClip Frame 171
gotoAndPlay(Math.floor((Math.random() * 70) + 1));
Symbol 31 MovieClip Frame 1
stop();