Frame 1
fscommand ("showmenu", false);
_root.best = 0;
_root.sunet = 1;
stop();
logo.onEnterFrame = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
this.play();
} else {
tgFrame = Math.round((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
this.progress.gotoAndStop(tgFrame);
}
};
Frame 2
stop();
_root.paused = 0;
son = new Sound();
son.attachSound("shot1");
son2 = new Sound();
son2.attachSound("shot2");
son3 = new Sound();
son3.attachSound("shot3");
Frame 3
bestTXT.text = _root.best;
_root.score = 0;
scoreTXT.text = _root.score;
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = getTimer() + 120000;
i++;
}
_root.b4.timpIni = getTimer() + 60000;
Frame 4
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 4
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 4
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 4
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b4) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 4
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 5
stop();
stop();
Frame 6
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = getTimer() + 100000;
i++;
}
_root.b4.timpIni = getTimer() + 50000;
Frame 7
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 7
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 7
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 7
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b4) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 7
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 8
stop();
stop();
Frame 9
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = getTimer() + 90000;
i++;
}
_root.b4.timpIni = getTimer() + 50000;
Frame 10
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 10
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 10
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 10
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b4) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 10
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 11
stop();
stop();
Frame 12
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = getTimer() + 80000;
i++;
}
_root.b4.timpIni = getTimer() + 10000;
Frame 13
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 13
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 13
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 13
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b4) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 13
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 14
stop();
stop();
Frame 15
i = 0;
while (i <= 8) {
_root["b" + i].timpIni = getTimer() + 70000;
i++;
}
_root.b9.timpIni = getTimer() + 40000;
Frame 16
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 16
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 16
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 16
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b9) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 16
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 17
stop();
stop();
Frame 18
i = 0;
while (i <= 8) {
_root["b" + i].timpIni = (getTimer() + 40000) + ((8 - i) * 10000);
i++;
}
_root.b9.timpIni = getTimer() + 30000;
Frame 19
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 19
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 19
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 19
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b9) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 19
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 20
stop();
stop();
Frame 21
i = 0;
while (i <= 5) {
_root["b" + i].timpIni = getTimer() + 30000;
i++;
}
i = 6;
while (i <= 8) {
_root["b" + i].timpIni = getTimer() + 40000;
i++;
}
_root.b9.timpIni = getTimer() + 50000;
Frame 22
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 22
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 22
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 22
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b9) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 22
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 23
stop();
stop();
Frame 24
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = (getTimer() + 20000) + ((9 - i) * 10000);
i++;
}
Frame 25
stop();
ballsIn = 0;
Instance of Symbol 60 MovieClip "controller" in Frame 25
onClipEvent (load) {
function getDistanceSquare(clip, clip2) {
var xp = (clip._x - clip2._x);
var yp = (clip._y - clip2._y);
return((xp * xp) + (yp * yp));
}
ballsArray = [];
var n = 0;
while (n < 11) {
ballsArray[n] = _root["b" + n];
n++;
}
holesArray = [];
var n = 1;
while (n < 7) {
holesArray[n - 1] = _root["h" + n];
n++;
}
var k = 0;
while (k < ballsArray.length) {
ballsArray[k].dx = 0;
ballsArray[k].dy = 0;
ballsArray[k].moving = false;
ballsArray[k].disabled = false;
k++;
}
diameter = _root.b10._width;
diameterSquare = diameter * diameter;
bgLeft = 48 + (diameter / 2);
bgRight = 515 - (diameter / 2);
bgTop = 55 + (diameter / 2);
bgBottom = 345 - (diameter / 2);
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (fsec > 70) {
return(undefined);
}
var k = 0;
while (k < ballsArray.length) {
clip = ballsArray[k];
if (clip.moving == false) {
} else if (clip.disabled) {
} else if (clip.bounced) {
} else {
var m = 0;
while (m < ballsArray.length) {
clip2 = ballsArray[m];
if ((m <= k) && (clip2.moving)) {
} else if (clip2.disabled) {
} else {
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
clip.moving = true;
clip2.moving = true;
_root.bouncer.bounce(clip, clip2);
}
}
m++;
}
var m = 0;
while (m < holesArray.length) {
clip2 = holesArray[m];
xoff = clip2._x - clip._x;
yoff = clip2._y - clip._y;
if (((xoff * xoff) + (yoff * yoff)) > diameterSquare) {
} else {
fireN++;
duplicateMovieClip (_root.fire, "fire" + fireN, fireN);
_root["fire" + fireN].ball = clip;
_root["fire" + fireN].hole = clip2;
}
m++;
}
}
k++;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
t1 = getTimer();
fsec = t1 - t2;
t2 = t1;
var p = 0;
while (p < ballsArray.length) {
clip3 = ballsArray[p];
if (clip3.disabled) {
} else if (clip3.moving == false) {
} else {
clip3.dx = clip3.dx - clip3.frictionX;
clip3.dy = clip3.dy - clip3.frictionY;
clip3._x = clip3._x + clip3.dx;
clip3._y = clip3._y + clip3.dy;
dx = clip3.dx;
dy = clip3.dy;
if (clip3._x < bgLeft) {
clip3.dx = Math.abs(dx);
clip3.frictionX = Math.abs(clip3.frictionX);
} else if (clip3._x > bgRight) {
clip3.dx = -Math.abs(dx);
clip3.frictionX = -Math.abs(clip3.frictionX);
}
if (clip3._y < bgTop) {
clip3.dy = Math.abs(dy);
clip3.frictionY = Math.abs(clip3.frictionY);
} else if (clip3._y > bgBottom) {
clip3.dy = -Math.abs(dy);
clip3.frictionY = -Math.abs(clip3.frictionY);
}
if (((dx * dx) + (dy * dy)) < 0.003) {
clip3.dx = 0;
clip3.dy = 0;
clip3.frictionX = 0;
clip3.frictionY = 0;
clip3.moving = false;
}
}
p++;
}
}
}
Instance of Symbol 61 MovieClip "bouncer" in Frame 25
onClipEvent (load) {
function bounce(clip, clip2) {
var angle = Math.atan2(clip._y - clip2._y, clip._x - clip2._x);
this._rotation = (angle * 180) / Math.PI;
var pt2 = {x:clip2.dx * 10, y:clip2.dy * 10};
this.globalToLocal(pt2);
var subVector2 = {x:pt2.x, y:0};
this.localToGlobal(subVector2);
var pt = {x:clip.dx * 10, y:clip.dy * 10};
this.globalToLocal(pt);
var subVector = {x:pt.x, y:0};
this.localToGlobal(subVector);
if ((pt2.x <= 0) && (pt.x >= 0)) {
return(undefined);
}
var xSub = ((subVector2.x - subVector.x) / 10);
var ySub = ((subVector2.y - subVector.y) / 10);
clip.dx = clip.dx + xSub;
clip.dy = clip.dy + ySub;
clip2.dx = clip2.dx - xSub;
clip2.dy = clip2.dy - ySub;
var ang = Math.atan2(clip.dy, clip.dx);
clip.frictionX = Math.cos(ang) / 20;
clip.frictionY = Math.sin(ang) / 20;
var ang2 = Math.atan2(clip2.dy, clip2.dx);
clip2.frictionX = Math.cos(ang2) / 20;
clip2.frictionY = Math.sin(ang2) / 20;
}
}
Instance of Symbol 60 MovieClip "fire" in Frame 25
onClipEvent (load) {
function startGoHole(clip, clip2) {
ball.disabled = true;
animate = true;
framesNeed = int(_root.b10._width / Math.sqrt((ball.dx * ball.dx) + (ball.dy * ball.dy)));
dx = (hole._x - ball._x) / framesNeed;
dy = (hole._y - ball._y) / framesNeed;
count = 0;
}
function conclude() {
animate = false;
ball.moving = false;
ball._y = -300;
if (ball == _root.b10) {
hole.gotoAndPlay(20);
} else {
_root.ballsIn++;
_root.score = _root.score + ball.timpul;
_root.scoreTXT.text = _root.score;
if (_root.score > _root.best) {
_root.best = _root.score;
}
if (ball == _root.b9) {
hole.gotoAndPlay(38);
} else {
hole.play();
}
ball._visible = false;
var balolInHole = -1;
var k = 0;
while (k < ballsArray.length) {
if (ballsArray[k] == ball) {
ballInHole = k;
break;
}
k++;
}
if (_root.ballsIn >= 11) {
_root.play();
}
if (ballInHole > -1) {
ballsArray.splice(ballInHole, 1);
}
}
removeMovieClip(this);
}
startGoHole();
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
ball._x = ball._x + dx;
ball._y = ball._y + dy;
count++;
if (count >= framesNeed) {
conclude();
}
}
}
Instance of Symbol 66 MovieClip in Frame 25
onClipEvent (load) {
function conclude() {
if (_root.sunet == 1) {
_root.son.start(0, 1);
}
animate = false;
rod._x = -(30 + (_root.b10._width / 2));
_rotation = 0;
count = 0;
_y = -100;
}
ballsArray = _root.controller.ballsArray;
orgX = _root.b10._x;
orgY = _root.b10._y;
animate = false;
conclude();
}
onClipEvent (mouseDown) {
if (_root.paused == 0) {
if (_root.b10.disabled) {
_root.b10.disabled = false;
_root.b10._x = orgX;
_root.b10._y = orgY;
OK = false;
while (!OK) {
hit = false;
var h = 0;
while (h < (ballsArray.length - 1)) {
tempClip = ballsArray[h];
if ((Math.abs(tempClip._x - _root.b10._x) < _root.b10._width) && (Math.abs(tempClip._y - _root.b10._y) < _root.b10._width)) {
hit = true;
break;
}
h++;
}
if (hit) {
_root.b10._x = _root.b10._x + 5;
} else {
OK = true;
}
}
_root.b10.dx = 0;
_root.b10.dy = 0;
_root.b10.moving = false;
return(undefined);
}
if (_root.b10.moving) {
return(undefined);
}
_x = _root.b10._x;
_y = _root.b10._y;
dragging = true;
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
onClipEvent (mouseMove) {
if (_root.paused == 0) {
if (dragging) {
angle = Math.atan2(_root._ymouse - _y, _root._xmouse - _x);
_rotation = ((angle * 180) / Math.PI);
}
}
}
onClipEvent (mouseUp) {
if (_root.paused == 0) {
if (dragging) {
dragging = false;
animate = true;
count = 0;
}
}
}
onClipEvent (enterFrame) {
if (_root.paused == 0) {
if (!animate) {
return(undefined);
}
count++;
if (count > 12) {
conclude();
}
if (count == 6) {
_root.b10.dx = 10 * Math.cos(angle);
_root.b10.dy = 10 * Math.sin(angle);
_root.b10.frictionX = _root.b10.dx / 200;
_root.b10.frictionY = _root.b10.dy / 200;
_root.b10.moving = true;
}
if (count < 6) {
rod._x = rod._x + 5;
} else {
rod._x = rod._x - 5;
}
}
}
Frame 26
stop();
fScore.text = _root.score;
stop();
Frame 27
stop();
fScore.text = _root.score;
Symbol 11 MovieClip Frame 1
stop();
Symbol 15 MovieClip Frame 63
stop();
Symbol 15 MovieClip Frame 272
_root.gotoAndStop(2);
Symbol 26 Button
on (release) {
_root.gotoAndPlay("l1");
}
Symbol 29 Button
on (release) {
if (_root.sunet == 0) {
_root.sunet = 1;
} else {
_root.sunet = 0;
}
}
Symbol 43 MovieClip Frame 1
stop();
Symbol 43 MovieClip Frame 2
if (_root.sunet == 1) {
_root.son3.start(0.7, 1);
}
Symbol 43 MovieClip Frame 12
gotoAndStop (1);
Symbol 43 MovieClip Frame 20
if (_root.sunet == 1) {
_root.son3.start(0.7, 1);
if (_root.score > 50) {
_root.score = _root.score - 50;
_root.scoreTXT.text = _root.score;
}
}
Symbol 43 MovieClip Frame 30
gotoAndStop (1);
Symbol 43 MovieClip Frame 38
if (_root.sunet == 1) {
_root.son2.start(5, 1);
}
Symbol 43 MovieClip Frame 48
gotoAndStop (1);
Symbol 46 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.paused == 0) {
timpul = Math.round((timpIni - getTimer()) / 1000);
timpTXT = Math.round(timpul / 10);
timp.text = timpTXT;
if ((timp.text == "0") && (this._visible == 1)) {
_root.gotoAndStop("gameOver");
}
}
};
Symbol 48 MovieClip Frame 1
this.onEnterFrame = function () {
if (_root.paused == 0) {
timpul = Math.round((timpIni - getTimer()) / 1000);
timpTXT = Math.round(timpul / 10);
timp.text = timpTXT;
if ((timp.text == "0") && (this._visible == 1)) {
_root.gotoAndStop("gameOver");
}
}
};
Symbol 54 Button
on (release) {
_root.gotoAndStop(2);
}
Symbol 57 Button
on (release) {
if (_root.paused == 0) {
oldTimp = getTimer();
_root.paused = 1;
} else {
timpInter = getTimer() - oldTimp;
i = 0;
while (i <= 9) {
_root["b" + i].timpIni = _root["b" + i].timpIni + timpInter;
i++;
}
_root.paused = 0;
}
}
Symbol 73 Button
on (release) {
_root.play();
}
Symbol 129 Button
on (release) {
_root.gotoAndStop(2);
}