Frame 1
Stage.scaleMode = "noScale";
total_bytes = getBytesTotal();
loaded_bytes = getBytesLoaded();
remaining_bytes = total_bytes - loaded_bytes;
percent_done = int((loaded_bytes / total_bytes) * 100);
bar.gotoAndStop(percent_done);
if (total_bytes == loaded_bytes) {
gotoAndPlay (3);
}
Frame 2
gotoAndPlay (1);
Frame 3
stop();
Frame 4
function newGame(laikas, gravitacija, trintis, galia, iks, igrik) {
_root.toa = laikas;
_root.gravity = gravitacija;
_root.friction = trintis;
_root.power = galia;
score1 = 0;
score2 = 0;
pabaiga = false;
kam = 0;
ec = 3;
fxc = 1;
trc = 1;
trcc = 1;
_root.b.f.gotoAndPlay(1);
attachMovie("p1", "b2", _root.getNextHighestDepth());
b2._x = iks;
b2._y = igrik;
attachMovie("b", "b1", _root.getNextHighestDepth());
b1._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
b1._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
setAll();
}
function newEnemy(style, iks, igrik, galia, ail) {
attachMovie("enemy" + style, "b" + _root.ec, _root.getNextHighestDepth());
_root["b" + ec]._x = iks;
_root["b" + ec]._y = igrik;
_root["b" + ec].power = galia;
_root["b" + ec].ai = ail;
_root.ec++;
}
function setAll() {
var _local1 = Math.round((Stage.height - 400) / 2);
var _local2 = Math.round((Stage.width - 550) / 2);
leftSide = -_local2;
topSide = -_local1;
rightSide = _local2 + 550;
bottomSide = _local1 + 400;
setProperty(control, _x , rightSide - 25);
setProperty(control, _y , 5 - _local1);
setProperty(bg, _x , -_local2);
setProperty(bg, _y , -_local1);
setProperty(bg, _width , (2 * _local2) + 550);
setProperty(bg, _height , (2 * _local1) + 400);
}
function ballBallReaction(b1, b2, dist, xdiff, ydiff) {
var _local12 = Math.atan2(ydiff, xdiff);
var _local4 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local5 = (_local4 * b1.xspeed) + (_local2 * b1.yspeed);
var _local9 = (_local4 * b1.yspeed) - (_local2 * b1.xspeed);
var _local6 = (_local4 * b2.xspeed) + (_local2 * b2.yspeed);
var _local8 = (_local4 * b2.yspeed) - (_local2 * b2.xspeed);
var _local14 = (_local5 * b1.mass) + (_local6 * b2.mass);
var _local13 = _local5 - _local6;
_local5 = (_local14 - (b2.mass * _local13)) / (b1.mass + b2.mass);
_local6 = _local13 + _local5;
b1.xspeed = (_local4 * _local5) - (_local2 * _local9);
b1.yspeed = (_local4 * _local9) + (_local2 * _local5);
b2.xspeed = (_local4 * _local6) - (_local2 * _local8);
b2.yspeed = (_local4 * _local8) + (_local2 * _local6);
var _local10 = (((b1._width / 2) + (b2._width / 2)) - dist) / 2;
var _local11 = _local4 * _local10;
var _local7 = _local2 * _local10;
b1._x = b1._x - _local11;
b1._y = b1._y - _local7;
b2._x = b2._x + _local11;
b2._y = b2._y + _local7;
}
function fxas(type, iks, igrik) {
if (_root.dofx) {
attachMovie("fx" + type, "fxi" + _root.fxc, _root.getNextHighestDepth());
if ((type == 0) and (soundon == true)) {
_root.attachMovie("sound-susidurimas", "sound" + _root.sc, _root.getNextHighestDepth());
_root.sc++;
}
_root["fxi" + _root.fxc]._x = iks;
_root["fxi" + _root.fxc]._y = igrik;
_root.fxc++;
}
}
function tracer() {
if ((!pabaiga) and dofx) {
_root.attachMovie("tracei", "tr" + _root.trc, _root.getNextHighestDepth());
_root["tr" + _root.trc]._x = _root.b2._x;
_root["tr" + _root.trc]._y = _root.b2._y;
trc++;
}
}
function gameOver(kas) {
if (kas == 1) {
currlevel++;
newLevel = true;
score1 = 0;
score2 = 0;
kam = 0;
} else {
newLevel = false;
}
r = 1;
while (r < ec) {
removeMovieClip(_root["b" + r]);
r++;
}
pabaiga = true;
so = SharedObject.getLocal("saltogame");
lygis = so.data.Level;
if ((currlevel > lygis) and (currlevel < 12)) {
so.data.Level = currlevel;
so.flush();
}
level(currlevel, newLevel);
}
function pauze() {
_root.attachMovie("pauzeMC", "pauzeMC", _root.getNextHighestDepth());
_root.pauzeMC._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
_root.pauzeMC._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
}
function boom() {
_root.attachMovie("sound-booom", "sound" + _root.sc, _root.getNextHighestDepth());
_root.sc++;
}
function cleanUp() {
dofx = false;
r = 1;
while (r < ec) {
removeMovieClip(_root["b" + r]);
r++;
}
removeMovieClip(_root.pauzeMC);
_root.control.s.stop();
removeMovieClip(_root.control);
removeMovieClip(_root.screenas);
}
function starter() {
dofx = true;
attachMovie("starteris", "starteris", _root.getNextHighestDepth());
starteris._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
starteris._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
}
function level(lygis, arNaujas) {
dofx = false;
if (arNaujas) {
_root.screenas._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
_root.screenas._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
_root.screenas.gotoAndPlay(lygis);
} else if (lygis == 1) {
level1();
} else if (lygis == 2) {
level2();
} else if (lygis == 3) {
level3();
} else if (lygis == 4) {
level4();
} else if (lygis == 5) {
level5();
} else if (lygis == 6) {
level6();
} else if (lygis == 7) {
level7();
} else if (lygis == 8) {
level8();
} else if (lygis == 9) {
level9();
} else if (lygis == 10) {
level10();
} else if (lygis == 11) {
level11();
}
}
function level1() {
newGame(120, 0.1, 0.99, 0.65, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 100, (Stage.height / 2) - ((Stage.height - 400) / 2));
starter();
}
function level2() {
newGame(180, 0.1, 0.99, 0.65, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 100, (Stage.height / 2) - ((Stage.height - 400) / 2));
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 100, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.35, 0.45);
starter();
}
function level3() {
newGame(240, 0.1, 0.99, 0.65, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 100, (Stage.height / 2) - ((Stage.height - 400) / 2));
newEnemy(2, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 100, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.45, 0.35);
starter();
}
function level4() {
newGame(240, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.35, 0.45);
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.35, 0.45);
starter();
}
function level5() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(3, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.25, 0.4);
newEnemy(3, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.25, 0.4);
starter();
}
function level6() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.35, 0.45);
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.35, 0.45);
newEnemy(2, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.45, 0.35);
starter();
}
function level7() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(4, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.3, 0.3);
newEnemy(4, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.3, 0.3);
starter();
}
function level8() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(1, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.35, 0.45);
newEnemy(2, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 50, ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.45, 0.35);
newEnemy(3, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 50, ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.25, 0.4);
newEnemy(4, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.3, 0.3);
starter();
}
function level9() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(5, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 1, 0.4);
newEnemy(5, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150, (Stage.height / 2) - ((Stage.height - 400) / 2), 1, 0.4);
starter();
}
function level10() {
newGame(300, 0.1, 0.99, 0.65, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 100, (Stage.height / 2) - ((Stage.height - 400) / 2));
newEnemy(6, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 100, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.6, 0.1);
starter();
}
function level11() {
newGame(300, 0.1, 0.99, 0.65, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) - 100);
newEnemy(6, ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 100, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.6, 0.1);
newEnemy(6, ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 100, (Stage.height / 2) - ((Stage.height - 400) / 2), 0.6, 0.1);
newEnemy(6, (Stage.width / 2) - ((Stage.width - 550) / 2), ((Stage.height / 2) - ((Stage.height - 400) / 2)) + 100, 0.6, 0.1);
starter();
}
stop();
rightSide = 550;
leftSide = 0;
topSide = 0;
bottomSide = 400;
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
upconstant = 0.75;
friction = 0.99;
mass = 1;
i = 1;
toa = 100;
gravity = 0.1;
melv = 0;
redv = 0;
sc = 1;
currlevel = leveltogo;
so = SharedObject.getLocal("saltogame");
so.data.Level = 2;
so.flush();
soundon = true;
dofx = true;
Stage.scaleMode = "noScale";
attachMovie("control", "control", _root.getNextHighestDepth());
control._alpha = 50;
_root.qu = 3;
attachMovie("screenas", "screenas", _root.getNextHighestDepth());
var resizeListener = new Object();
Stage.addListener(resizeListener);
resizeListener.onResize = function () {
setAll();
};
onEnterFrame = function () {
j1 = 1;
while (j1 < _root.ec) {
j2 = 1;
while (j2 < _root.ec) {
if (j1 < j2) {
var _local3 = _root["b" + j2]._x - _root["b" + j1]._x;
var _local2 = _root["b" + j2]._y - _root["b" + j1]._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local4 <= ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2))) {
ballBallReaction(_root["b" + j1], _root["b" + j2], _local4, _local3, _local2);
fxas(0, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
if (((!(kam === 1)) and (j1 == 1)) and (j2 == 2)) {
kam = 1;
score1 = 0;
score2 = 0;
fxas(1, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
}
if (((!(kam === 2)) and (j1 == 1)) and (j2 > 2)) {
kam = 2;
score1 = 0;
score2 = 0;
fxas(2, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
}
}
}
j2++;
}
j1++;
}
if ((kam == 1) and (!pabaiga)) {
_root.b1.f.gotoAndPlay(2);
score1++;
_root.b1.phase.suk((score1 * 100) / toa);
}
if ((kam == 2) and (!pabaiga)) {
_root.b1.f.gotoAndPlay(3);
score2++;
_root.b1.phase.suk((score2 * 100) / toa);
}
if (score1 > toa) {
gameOver(1);
}
if (score2 > toa) {
gameOver(2);
}
};
level(leveltogo, true);
setAll();
Frame 5
function newGame() {
_root.toa = 300;
_root.gravity = 0.1;
_root.friction = 0.99;
_root.power = 0.65;
score1 = 0;
score2 = 0;
kam = 0;
fxc = 1;
trc = 1;
trcc = 1;
_root.b.f.gotoAndPlay(1);
attachMovie("p1", "b2", _root.getNextHighestDepth());
b2._x = ((Stage.width / 2) - ((Stage.width - 550) / 2)) - 150;
b2._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
attachMovie("p2", "b3", _root.getNextHighestDepth());
b3._x = ((Stage.width / 2) - ((Stage.width - 550) / 2)) + 150;
b3._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
attachMovie("b", "b1", _root.getNextHighestDepth());
b1._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
b1._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
starter();
setAll();
}
function setAll() {
var _local1 = Math.round((Stage.height - 400) / 2);
var _local2 = Math.round((Stage.width - 550) / 2);
leftSide = -_local2;
topSide = -_local1;
rightSide = _local2 + 550;
bottomSide = _local1 + 400;
setProperty(control, _x , rightSide - 25);
setProperty(control, _y , 5 - _local1);
setProperty(bg, _x , -_local2);
setProperty(bg, _y , -_local1);
setProperty(bg, _width , (2 * _local2) + 550);
setProperty(bg, _height , (2 * _local1) + 400);
}
function ballBallReaction(b1, b2, dist, xdiff, ydiff) {
var _local12 = Math.atan2(ydiff, xdiff);
var _local4 = Math.cos(_local12);
var _local2 = Math.sin(_local12);
var _local5 = (_local4 * b1.xspeed) + (_local2 * b1.yspeed);
var _local9 = (_local4 * b1.yspeed) - (_local2 * b1.xspeed);
var _local6 = (_local4 * b2.xspeed) + (_local2 * b2.yspeed);
var _local8 = (_local4 * b2.yspeed) - (_local2 * b2.xspeed);
var _local14 = (_local5 * b1.mass) + (_local6 * b2.mass);
var _local13 = _local5 - _local6;
_local5 = (_local14 - (b2.mass * _local13)) / (b1.mass + b2.mass);
_local6 = _local13 + _local5;
b1.xspeed = (_local4 * _local5) - (_local2 * _local9);
b1.yspeed = (_local4 * _local9) + (_local2 * _local5);
b2.xspeed = (_local4 * _local6) - (_local2 * _local8);
b2.yspeed = (_local4 * _local8) + (_local2 * _local6);
var _local10 = (((b1._width / 2) + (b2._width / 2)) - dist) / 2;
var _local11 = _local4 * _local10;
var _local7 = _local2 * _local10;
b1._x = b1._x - _local11;
b1._y = b1._y - _local7;
b2._x = b2._x + _local11;
b2._y = b2._y + _local7;
}
function fxas(type, iks, igrik) {
if (_root.dofx) {
attachMovie("fx" + type, "fxi" + _root.fxc, _root.getNextHighestDepth());
if ((type == 0) and (soundon == true)) {
_root.attachMovie("sound-susidurimas", "sound" + _root.sc, _root.getNextHighestDepth());
_root.sc++;
}
_root["fxi" + _root.fxc]._x = iks;
_root["fxi" + _root.fxc]._y = igrik;
_root.fxc++;
}
}
function gameOver(kas) {
boom();
dofx = false;
if (kas == 1) {
redv++;
} else {
melv++;
}
r = 1;
while (r < ec) {
removeMovieClip(_root["b" + r]);
r++;
}
pabaiga = true;
attachMovie("scoreboard", "scoreboard", _root.getNextHighestDepth());
scoreboard._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
scoreboard._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
newGame();
}
function pauze() {
_root.attachMovie("pauzeMC", "pauzeMC", _root.getNextHighestDepth());
_root.pauzeMC._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
_root.pauzeMC._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
}
function boom() {
_root.attachMovie("sound-booom", "sound" + _root.sc, _root.getNextHighestDepth());
_root.sc++;
}
function cleanUp() {
dofx = false;
r = 1;
while (r < ec) {
removeMovieClip(_root["b" + r]);
r++;
}
removeMovieClip(_root.pauzeMC);
_root.control.s.stop();
removeMovieClip(_root.control);
}
function starter() {
dofx = true;
attachMovie("starteris", "starteris", _root.getNextHighestDepth());
starteris._x = (Stage.width / 2) - ((Stage.width - 550) / 2);
starteris._y = (Stage.height / 2) - ((Stage.height - 400) / 2);
}
stop();
rightSide = 550;
leftSide = 0;
topSide = 0;
bottomSide = 400;
yspeed = 0;
xspeed = 0;
wind = 0;
power = 0.65;
upconstant = 0.75;
friction = 0.99;
mass = 1;
i = 1;
toa = 300;
gravity = 0.1;
melv = 0;
redv = 0;
sc = 1;
ec = 4;
soundon = true;
dofx = true;
Stage.scaleMode = "noScale";
fscommand ("fullscreen", "true");
attachMovie("control", "control", _root.getNextHighestDepth());
control._alpha = 50;
_root.qu = 3;
var resizeListener = new Object();
Stage.addListener(resizeListener);
resizeListener.onResize = function () {
setAll();
};
onEnterFrame = function () {
j1 = 1;
while (j1 < _root.ec) {
j2 = 1;
while (j2 < _root.ec) {
if (j1 < j2) {
var _local3 = _root["b" + j2]._x - _root["b" + j1]._x;
var _local2 = _root["b" + j2]._y - _root["b" + j1]._y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
if (_local4 <= ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2))) {
ballBallReaction(_root["b" + j1], _root["b" + j2], _local4, _local3, _local2);
fxas(0, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
if (((!(kam === 1)) and (j1 == 1)) and (j2 == 2)) {
kam = 1;
score1 = 0;
score2 = 0;
fxas(1, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
}
if (((!(kam === 2)) and (j1 == 1)) and (j2 == 3)) {
kam = 2;
score1 = 0;
score2 = 0;
fxas(2, (_local3 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._x, (_local2 * ((_root["b" + j1]._width / 2) / ((_root["b" + j1]._width / 2) + (_root["b" + j2]._width / 2)))) + _root["b" + j1]._y);
}
}
}
j2++;
}
j1++;
}
if ((kam == 1) and (!pabaiga)) {
_root.b1.f.gotoAndPlay(2);
score1++;
_root.b1.phase.suk((score1 * 100) / toa);
}
if ((kam == 2) and (!pabaiga)) {
_root.b1.f.gotoAndPlay(3);
score2++;
_root.b1.phase.suk((score2 * 100) / toa);
}
if (score1 > toa) {
gameOver(1);
}
if (score2 > toa) {
gameOver(2);
}
};
setAll();
newGame();
Frame 6
stop();
Frame 7
stop();
i = 1;
while (i <= 11) {
_root["levelbutton" + i]._visible = false;
_root["num" + i]._visible = false;
i++;
}
so = SharedObject.getLocal("saltogame");
lygis = so.data.Level;
if (lygis == undefined) {
} else {
i = 1;
while (i <= lygis) {
_root["levelbutton" + i]._visible = true;
_root["num" + i]._visible = true;
i++;
}
}
Symbol 2 Button
on (release, keyPress "i") {
if (getProperty("/control", _currentframe) == 2) {
tellTarget ("/control") {
gotoAndPlay (3);
};
soundface.gotoAndPlay(2);
_root.soundon = false;
} else if (getProperty("/control", _currentframe) == 21) {
tellTarget ("/control") {
gotoAndPlay (21);
};
soundface.gotoAndPlay(1);
_root.soundon = true;
}
}
on (keyPress "o") {
if (_root.qu == 1) {
_root._quality = "best";
_root.qu = 3;
}
if (_root.qu == 2) {
_root._quality = "low";
_root.qu = 1;
}
if (_root.qu == 3) {
_root._quality = "medium";
_root.qu = 2;
}
}
on (keyPress "p") {
if (_root.dofx) {
_root.dofx = false;
} else {
_root.dofx = true;
}
}
on (keyPress "<Space>") {
if (_root.pabaiga) {
removeMovieClip(_root.pauzeMC);
_root.pabaiga = false;
} else {
_root.pabaiga = true;
_root.pauze();
}
}
Symbol 5 MovieClip Frame 1
stop();
Symbol 5 MovieClip Frame 2
stop();
Symbol 6 MovieClip [control] Frame 1
s = new Sound();
s.attachSound("mysound");
s.setVolume(100);
s.start(0, 50000);
Symbol 6 MovieClip [control] Frame 2
stop();
Symbol 6 MovieClip [control] Frame 3
s.setVolume(95);
Symbol 6 MovieClip [control] Frame 4
s.setVolume(90);
Symbol 6 MovieClip [control] Frame 5
s.setVolume(85);
Symbol 6 MovieClip [control] Frame 6
s.setVolume(80);
Symbol 6 MovieClip [control] Frame 7
s.setVolume(75);
Symbol 6 MovieClip [control] Frame 8
s.setVolume(70);
Symbol 6 MovieClip [control] Frame 9
s.setVolume(65);
Symbol 6 MovieClip [control] Frame 10
s.setVolume(60);
Symbol 6 MovieClip [control] Frame 11
s.setVolume(55);
Symbol 6 MovieClip [control] Frame 12
s.setVolume(50);
Symbol 6 MovieClip [control] Frame 13
s.setVolume(45);
Symbol 6 MovieClip [control] Frame 14
s.setVolume(40);
Symbol 6 MovieClip [control] Frame 15
s.setVolume(35);
Symbol 6 MovieClip [control] Frame 16
s.setVolume(20);
Symbol 6 MovieClip [control] Frame 17
s.setVolume(15);
Symbol 6 MovieClip [control] Frame 18
s.setVolume(10);
Symbol 6 MovieClip [control] Frame 19
s.setVolume(5);
Symbol 6 MovieClip [control] Frame 20
s.setVolume(0);
Symbol 6 MovieClip [control] Frame 21
stop();
Symbol 6 MovieClip [control] Frame 23
s.setVolume(5);
Symbol 6 MovieClip [control] Frame 24
s.setVolume(10);
Symbol 6 MovieClip [control] Frame 25
s.setVolume(15);
Symbol 6 MovieClip [control] Frame 26
s.setVolume(20);
Symbol 6 MovieClip [control] Frame 27
s.setVolume(35);
Symbol 6 MovieClip [control] Frame 28
s.setVolume(40);
Symbol 6 MovieClip [control] Frame 29
s.setVolume(45);
Symbol 6 MovieClip [control] Frame 30
s.setVolume(50);
Symbol 6 MovieClip [control] Frame 31
s.setVolume(55);
Symbol 6 MovieClip [control] Frame 32
s.setVolume(60);
Symbol 6 MovieClip [control] Frame 33
s.setVolume(65);
Symbol 6 MovieClip [control] Frame 34
s.setVolume(70);
Symbol 6 MovieClip [control] Frame 35
s.setVolume(75);
Symbol 6 MovieClip [control] Frame 36
s.setVolume(80);
Symbol 6 MovieClip [control] Frame 37
s.setVolume(85);
Symbol 6 MovieClip [control] Frame 38
s.setVolume(90);
Symbol 6 MovieClip [control] Frame 39
s.setVolume(95);
Symbol 6 MovieClip [control] Frame 40
s.setVolume(100);
Symbol 6 MovieClip [control] Frame 41
gotoAndStop (2);
Symbol 8 MovieClip [p2] Frame 1
stop();
yspeed = _root.yspeed;
xspeed = _root.xspeed;
wind = _root.wind;
power = _root.power;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
mass = _root.mass;
ai = _root.ai;
_root.coin._x = (Math.random() * 400) + 50;
_root.coin._y = (Math.random() * 250) + 50;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if (ai) {
if ((_x > _root.b._x) and (Math.random() > _root.ail)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b._y) and (Math.random() > _root.ail)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
} else {
if (Key.isDown(65)) {
xspeed = xspeed - power;
}
if (Key.isDown(68)) {
xspeed = xspeed + power;
}
if (Key.isDown(87)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(83)) {
yspeed = yspeed + (power * upconstant);
}
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
_rotation = (_rotation + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 10 MovieClip [p1] Frame 1
stop();
yspeed = _root.yspeed;
xspeed = _root.xspeed;
wind = _root.wind;
power = _root.power;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
mass = _root.mass;
_root.coin._x = (Math.random() * 400) + 50;
_root.coin._y = (Math.random() * 250) + 50;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if (Key.isDown(37)) {
xspeed = xspeed - power;
}
if (Key.isDown(39)) {
xspeed = xspeed + power;
}
if (Key.isDown(38)) {
yspeed = yspeed - (power * upconstant);
}
if (Key.isDown(40)) {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_rotation = (_rotation + xspeed);
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 17 MovieClip Frame 1
stop();
Symbol 21 Button
on (press) {
_root.redv = 0;
_root.melv = 0;
}
Symbol 29 MovieClip [gameOver] Frame 1
play();
Symbol 29 MovieClip [gameOver] Frame 60
_root.pabaiga = false;
removeMovieClip(this);
Symbol 33 MovieClip Frame 1
stop();
Symbol 37 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
function suk(percent) {
if (percent <= 50) {
mask2.maske._rotation = 3.6 * percent;
mask1.maske._rotation = 0;
} else {
mask2.maske._rotation = 180;
mask1.maske._rotation = 3.6 * (percent - 50);
}
}
Symbol 39 MovieClip [b] Frame 1
stop();
yspeed = _root.yspeed;
xspeed = _root.xspeed;
wind = _root.wind;
gravity = 0;
upconstant = _root.upconstant;
friction = _root.friction;
mass = _root.mass;
onEnterFrame = function () {
if (!_root.pabaiga) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 41 MovieClip [fx] Frame 1
stop();
xspeed = random(20) - 10;
yspeed = random(20) - 10;
bu = random(50) + 50;
friction = 0.99;
gravity = 0.1;
onEnterFrame = function () {
xspeed = xspeed * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
bu--;
if (bu < 10) {
removeMovieClip(this);
}
};
Symbol 43 MovieClip [fx2] Frame 1
onEnterFrame = function () {
this._x = _root.b1._x;
this._y = _root.b1._y;
};
Symbol 43 MovieClip [fx2] Frame 35
removeMovieClip(this);
Symbol 45 MovieClip [fx1] Frame 1
onEnterFrame = function () {
this._x = _root.b1._x;
this._y = _root.b1._y;
};
Symbol 45 MovieClip [fx1] Frame 35
removeMovieClip(this);
Symbol 47 MovieClip [tracei] Frame 35
removeMovieClip(this);
Symbol 48 MovieClip [fx0] Frame 35
removeMovieClip(this);
Symbol 55 Button
on (release) {
_root.gotoAndPlay(3);
_root.pabaiga = true;
_root.cleanUp();
}
Symbol 58 MovieClip [sound-booom] Frame 325
removeMovieClip(this);
Symbol 60 MovieClip [sound-susidurimas] Frame 14
removeMovieClip(this);
Symbol 68 Button
on (release) {
_root.level1();
this._x = -2000;
this._y = -2000;
}
Symbol 72 Button
on (release) {
_root.level2();
this._x = -2000;
this._y = -2000;
}
Symbol 76 Button
on (release) {
_root.level3();
this._x = -2000;
this._y = -2000;
}
Symbol 78 Button
on (release) {
_root.level4();
this._x = -2000;
this._y = -2000;
}
Symbol 81 Button
on (release) {
_root.level5();
this._x = -2000;
this._y = -2000;
}
Symbol 83 Button
on (release) {
_root.level6();
this._x = -2000;
this._y = -2000;
}
Symbol 86 Button
on (release) {
_root.level7();
this._x = -2000;
this._y = -2000;
}
Symbol 89 Button
on (release) {
_root.level8();
this._x = -2000;
this._y = -2000;
}
Symbol 92 Button
on (release) {
_root.level9();
this._x = -2000;
this._y = -2000;
}
Symbol 95 Button
on (release) {
_root.level10();
this._x = -2000;
this._y = -2000;
}
Symbol 98 Button
on (release) {
_root.level11();
this._x = -2000;
this._y = -2000;
}
Symbol 99 Button
on (release) {
_root.gotoAndPlay(3);
_root.pabaiga = true;
_root.cleanUp();
}
Symbol 101 MovieClip [screenas] Frame 1
stop();
Symbol 101 MovieClip [screenas] Frame 2
stop();
Symbol 101 MovieClip [screenas] Frame 3
stop();
Symbol 101 MovieClip [screenas] Frame 4
stop();
Symbol 101 MovieClip [screenas] Frame 5
stop();
Symbol 101 MovieClip [screenas] Frame 6
stop();
Symbol 101 MovieClip [screenas] Frame 7
stop();
Symbol 101 MovieClip [screenas] Frame 8
stop();
Symbol 101 MovieClip [screenas] Frame 9
stop();
Symbol 101 MovieClip [screenas] Frame 10
stop();
Symbol 101 MovieClip [screenas] Frame 11
stop();
Symbol 101 MovieClip [screenas] Frame 12
stop();
Symbol 108 MovieClip [starteris] Frame 1
_root.pabaiga = true;
Symbol 108 MovieClip [starteris] Frame 146
_root.pabaiga = false;
removeMovieClip(this);
Symbol 112 MovieClip [scoreboard] Frame 122
removeMovieClip(this);
Symbol 114 MovieClip [enemy6] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 116 MovieClip [enemy5] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 118 MovieClip [enemy4] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 120 MovieClip [enemy3] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 122 MovieClip [enemy2] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 124 MovieClip [enemy1] Frame 1
stop();
wind = _root.wind;
gravity = _root.gravity;
upconstant = _root.upconstant;
friction = _root.friction;
yspeed = _root.yspeed;
xspeed = _root.xspeed;
mass = _root.mass;
onEnterFrame = function () {
if (_root.pabaiga == false) {
leftSide = _root.leftSide;
rightSide = _root.rightSide;
topSide = _root.topSide;
bottomSide = _root.bottomSide;
if ((_x > _root.b1._x) and (Math.random() > ai)) {
xspeed = xspeed - power;
} else {
xspeed = xspeed + power;
}
if ((_y > _root.b1._y) and (Math.random() > ai)) {
yspeed = yspeed - (power * upconstant);
} else {
yspeed = yspeed + (power * upconstant);
}
xspeed = (xspeed + wind) * friction;
yspeed = (yspeed + gravity) * friction;
_y = (_y + yspeed);
_x = (_x + xspeed);
if ((_x + (_width / 2)) > rightSide) {
xspeed = -xspeed;
_x = (rightSide - (_width / 2));
}
if ((_x - (_width / 2)) < leftSide) {
xspeed = -xspeed;
_x = (leftSide + (_width / 2));
}
if ((_y - (_height / 2)) < topSide) {
yspeed = -yspeed;
_y = (topSide + (_width / 2));
}
if ((_y + (_height / 2)) > bottomSide) {
yspeed = -yspeed;
_y = (bottomSide - (_width / 2));
}
}
};
Symbol 127 MovieClip Frame 1
stop();
Symbol 136 Button
on (release) {
_root.leveltogo = 1;
gotoAndPlay (4);
}
Symbol 137 Button
on (release) {
gotoAndPlay (5);
}
Symbol 138 Button
on (release) {
gotoAndPlay (6);
}
Symbol 140 Button
on (release) {
gotoAndPlay (7);
}
Symbol 142 Button
on (press) {
getURL ("http://www.sniegas.net", "_blank");
}
Symbol 161 MovieClip Frame 1
stop();
Symbol 161 MovieClip Frame 2
stop();
Symbol 161 MovieClip Frame 3
stop();
Symbol 162 Button
on (rollOver) {
help.gotoAndPlay(1);
}
Symbol 163 Button
on (rollOver) {
help.gotoAndPlay(2);
}
Symbol 164 Button
on (rollOver) {
help.gotoAndPlay(3);
}
Symbol 166 Button
on (release) {
gotoAndPlay (3);
}
Symbol 167 Button
on (release) {
cleanUp();
gotoAndPlay (3);
}
Symbol 170 Button
on (release) {
_root.leveltogo = 1;
_root.gotoAndPlay(4);
}
Symbol 171 Button
on (release) {
_root.leveltogo = 2;
_root.gotoAndPlay(4);
}
Symbol 172 Button
on (release) {
_root.leveltogo = 3;
_root.gotoAndPlay(4);
}
Symbol 177 Button
on (release) {
_root.leveltogo = 4;
_root.gotoAndPlay(4);
}
Symbol 178 Button
on (release) {
_root.leveltogo = 5;
_root.gotoAndPlay(4);
}
Symbol 179 Button
on (release) {
_root.leveltogo = 6;
_root.gotoAndPlay(4);
}
Symbol 180 Button
on (release) {
_root.leveltogo = 7;
_root.gotoAndPlay(4);
}
Symbol 181 Button
on (release) {
_root.leveltogo = 8;
_root.gotoAndPlay(4);
}
Symbol 182 Button
on (release) {
_root.leveltogo = 9;
_root.gotoAndPlay(4);
}
Symbol 183 Button
on (release) {
_root.leveltogo = 10;
_root.gotoAndPlay(4);
}
Symbol 184 Button
on (release) {
_root.leveltogo = 11;
_root.gotoAndPlay(4);
}