Frame 1
ifFrameLoaded (4) {
gotoAndStop (3);
}
Frame 2
gotoAndPlay (1);
Frame 4
movie_width = 500;
movie_height = 300;
loadMovieNum ("music.swf", 10);
Out = new Sound();
Left_s = new Sound();
Right_s = new Sound();
Left_s.attachSound("left");
Right_s.attachSound("right");
Out.attachSound("Out");
stop();
Instance of Symbol 25 MovieClip "ball" in Frame 4
onClipEvent (load) {
function Begin() {
rot_filter = 45;
max_shift = 15;
speed = 10;
sign_ran = random(2);
dir_ran = random(2);
if (sign_ran == 1) {
sign_ran = 1;
} else {
sign_ran = -1;
}
if (dir_ran == 1) {
dir_ran = 1;
} else {
dir_ran = -1;
}
init_ang = ((random(45) * math.pi) / 180) * sign_ran;
xmov = (speed * math.cos(init_ang)) * dir_ran;
ymov = speed * math.sin(init_ang);
}
}
onClipEvent (enterFrame) {
function trajectory() {
angle = (Math.atan(ymov / xmov) * 180) / math.pi;
if ((ymov >= 0) and (xmov >= 0)) {
trajectory = Number(angle);
quad = 1;
} else if ((ymov >= 0) and (xmov < 0)) {
quad = 2;
trajectory = 180 + Number(angle);
} else if ((ymov < 0) and (xmov < 0)) {
trajectory = 180 + Number(angle);
quad = 3;
} else if ((ymov < 0) and (xmov >= 0)) {
trajectory = 360 + Number(angle);
quad = 4;
}
}
if (this._parent.go == "yes") {
if (this._parent.movie_height < (this._y + (this._height / 2))) {
_y = (this._parent.movie_height - (this._height / 2));
updateAfterEvent();
ymov = -ymov;
} else if ((this._y - (this._height / 2)) < 0) {
_y = (this._height / 2);
updateAfterEvent();
ymov = -ymov;
}
if (this._parent.left.hitTest(this) or this._parent.right.hitTest(this)) {
if (this._parent.left.hitTest(this)) {
paddle = "left";
_root.Left_s.start();
_x = ((this._parent.left._x + (this._parent.left._width / 2)) + (this._width / 2));
updateAfterEvent();
} else if (this._parent.right.hitTest(this)) {
paddle = "right";
_root.Right_s.start();
_x = ((this._parent.right._x - (this._parent.right._width / 2)) - (this._width / 2));
updateAfterEvent();
}
if (this._parent.level == "one") {
factor = 0.1;
} else if (this._parent.level == "two") {
factor = 0.2;
} else if (this._parent.level == "three") {
factor = 0.4;
}
current_speed = math.sqrt((xmov * xmov) + (ymov * ymov)) + factor;
if (_root.filter < current_speed) {
current_speed = _root.filter;
}
trajectory();
if (paddle == "right") {
shift = ((-max_shift) * (this._parent.right._y - this._y)) / (this._parent.right._height / 2);
} else if (paddle == "left") {
shift = (max_shift * (this._parent.left._y - this._y)) / (this._parent.left._height / 2);
}
trajectory = trajectory + shift;
if (((rot_filter < (trajectory + shift)) and ((trajectory + shift) < (180 - rot_filter))) or (((rot_filter + 180) < (trajectory + shift)) and ((trajectory + shift) < (360 - rot_filter)))) {
if ((0 < trajectory) and (trajectory < 90)) {
trajectory = rot_filter;
} else if ((90 < trajectory) and (trajectory < 180)) {
trajectory = 180 - rot_filter;
} else if ((180 < trajectory) and (trajectory < 270)) {
trajectory = 180 + rot_filter;
} else if ((270 < trajectory) and (trajectory < 360)) {
trajectory = 360 - rot_filter;
}
}
angle = (trajectory * math.pi) / 180;
xmov = current_speed * math.cos(angle);
ymov = current_speed * math.sin(angle);
xmov = -xmov;
}
_y = (this._y + ymov);
_x = (this._x + xmov);
ball_shift = 0;
if (this._x < -20) {
_root.Out.start();
_y = 150;
_x = 300;
setProperty("_root.popup", _visible , 1);
if (_root.level == "one") {
_root.popup.gotoAndStop(3);
} else if (_root.level == "two") {
_root.popup.gotoAndStop(4);
} else if (_root.level == "three") {
_root.popup.gotoAndStop(5);
}
xmov = 0;
ymov = 0;
} else if ((this._parent.movie_width + 20) < this._x) {
_root.Out.start();
_y = 150;
_x = 300;
setProperty("_root.popup", _visible , 1);
_root.popup.gotoAndStop(2);
xmov = 0;
ymov = 0;
}
}
}
Instance of Symbol 36 MovieClip "left" in Frame 4
onClipEvent (enterFrame) {
if (this._parent.go == "yes") {
endy = this._parent.ball._y;
ymov = (endy - this._y) * k;
if (this._parent.ball._x < (this._parent.movie_width / 2)) {
_y = (this._y + ymov);
}
}
}
Instance of Symbol 37 MovieClip "right" in Frame 4
onClipEvent (mouseMove) {
if (this._parent.go == "yes") {
_y = this._parent._ymouse;
updateAfterEvent();
}
}
Symbol 15 Button
on (release) {
getURL ("http://www.ultimatearcade.com");
}
Symbol 21 Button
on (release) {
gotoAndStop (4);
}
Symbol 33 Button
on (release) {
if (tunes != "off") {
unloadMovieNum (10);
tunes = "off";
} else if (tunes == "off") {
loadMovieNum ("music.swf", 10);
tunes = "";
}
}
Symbol 41 Button
on (release) {
this._parent.left.k = 0.12;
this._parent.level = "one";
this._parent.filter = 15;
this._parent.go = "yes";
_root.ball.Begin();
_visible = 0;
}
Symbol 45 Button
on (release) {
this._parent.left.k = 0.2;
this._parent.go = "yes";
this._parent.level = "two";
this._parent.filter = 23;
_root.ball.Begin();
_visible = 0;
}
Symbol 49 Button
on (release) {
this._parent.left.k = 0.5;
this._parent.go = "yes";
this._parent.level = "three";
this._parent.filter = 28;
_root.ball.Begin();
_visible = 0;
}
Symbol 54 MovieClip Frame 1
stop();
Symbol 54 MovieClip Frame 2
stop();
Symbol 54 MovieClip Frame 3
stop();
Symbol 54 MovieClip Frame 4
stop();
Symbol 54 MovieClip Frame 5
stop();