Frame 1
stop();
Game = function () {
var _local1 = this;
_local1.timeline = _root;
_local1.left = 0;
_local1.right = 500;
_local1.up = 0;
_local1.down = 690;
_local1.barLevel = 680;
_local1.lives = 9;
l.text = _local1.lives;
_local1.speed = 17;
_local1.isPlaying = false;
_local1.MouseListener = {};
_local1.MouseListener.Game = _local1;
Mouse.addListener(_local1.MouseListener);
};
Game.prototype.init = function () {
var _local1 = this;
_local1.drawArena();
_local1.initBar();
_local1.MouseListener.onMouseDown = function () {
var _local1 = this;
if (!_local1.Game.isPlaying) {
ball.move(_local1.Game);
_local1.Game.isPlaying = true;
}
};
};
Game.prototype.drawArena = function () {
var _local1 = this;
var _local2 = _local1.timeline.createEmptyMovieClip("Arena", 0);
_local2.lineStyle(0, 0, 100);
_local2.moveTo(_local1.left, _local1.up);
_local2.lineTo(_local1.right, _local1.up);
_local2.lineTo(_local1.right, _local1.down);
_local2.lineTo(_local1.left, _local1.down);
_local2.lineTo(_local1.left, _local1.up);
};
Game.prototype.initBar = function () {
var _local1 = this;
bar.StartDrag(true, _local1.left + (bar._width / 2), _local1.barLevel, _local1.right - (bar._width / 2), _local1.barLevel);
ball.followBar();
};
Game.prototype.loseLife = function () {
var _local1 = this;
_local1.lives--;
l.text = _local1.lives;
_local1.isPlaying = false;
if (_local1.lives >= 0) {
ball.followBar();
} else {
gotoAndStop (3);
}
};
Game.prototype.endGame = function () {
bar.stopDrag();
delete ball.onEnterFrame;
};
MovieClip.prototype.followBar = function () {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1._x = bar._x;
_local1._y = bar._y - (_local1._height / 2);
};
};
MovieClip.prototype.move = function (pGame) {
var _local1 = this;
_local1.vx = pGame.speed * Math.SQRT1_2;
_local1.vy = pGame.speed * -0.707106781186547;
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.x = _local1.x + _local1.vx;
_local1.y = _local1.y + _local1.vy;
_local1.checkWalls(pGame);
_local1._x = _local1.x;
_local1._y = _local1.y;
};
};
MovieClip.prototype.checkWalls = function (pGame) {
var _local1 = this;
var _local2 = pGame;
if (_local1.x < (_local2.left + (_local1._width / 2))) {
_local1.x = _local2.left + (_local1._width / 2);
_local1.vx = _local1.vx * -1;
} else if (_local1.x > (_local2.right - (_local1._width / 2))) {
_local1.x = _local2.right - (_local1._width / 2);
_local1.vx = _local1.vx * -1;
}
if (_local1.y < (_local2.up + (_local1._height / 2))) {
_local1.y = _local2.up + (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else if (_local1.y > (_local2.barLevel - (_local1._height / 2))) {
var l = (bar._x - (bar._width / 2));
var _local3 = bar._x + (bar._width / 2);
if ((_local1.x > l) && (_local1.x < _local3)) {
_local1.y = _local2.barLevel - (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else {
_local2.loseLife();
}
}
};
Pong = new Game();
Pong.init();
Instance of Symbol 9 MovieClip "ball" in Frame 1
onClipEvent (enterFrame) {
if (_root.b1.hitTest(_x, _y, true)) {
_root.b1._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b2.hitTest(_x, _y, true)) {
_root.b2._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b3.hitTest(_x, _y, true)) {
_root.b3._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b4.hitTest(_x, _y, true)) {
_root.b4._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b5.hitTest(_x, _y, true)) {
_root.b5._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b6.hitTest(_x, _y, true)) {
_root.b6._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b7.hitTest(_x, _y, true)) {
_root.b7._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b8.hitTest(_x, _y, true)) {
_root.b8._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b9.hitTest(_x, _y, true)) {
_root.b9._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b10.hitTest(_x, _y, true)) {
_root.b10._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b11.hitTest(_x, _y, true)) {
_root.b11._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b12.hitTest(_x, _y, true)) {
_root.b12._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b13.hitTest(_x, _y, true)) {
_root.b13._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b14.hitTest(_x, _y, true)) {
_root.b14._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b15.hitTest(_x, _y, true)) {
_root.b15._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b16.hitTest(_x, _y, true)) {
_root.b16._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b17.hitTest(_x, _y, true)) {
_root.b17._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b18.hitTest(_x, _y, true)) {
_root.b18._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b19.hitTest(_x, _y, true)) {
_root.b19._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b20.hitTest(_x, _y, true)) {
_root.b20._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b21.hitTest(_x, _y, true)) {
_root.b21._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b22.hitTest(_x, _y, true)) {
_root.b22._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b23.hitTest(_x, _y, true)) {
_root.b23._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b24.hitTest(_x, _y, true)) {
_root.b24._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b25.hitTest(_x, _y, true)) {
_root.b25._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b26.hitTest(_x, _y, true)) {
_root.b26._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b27.hitTest(_x, _y, true)) {
_root.b27._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b28.hitTest(_x, _y, true)) {
_root.b28._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b29.hitTest(_x, _y, true)) {
_root.b29._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b30.hitTest(_x, _y, true)) {
_root.b30._x = -100;
_root.piezas.pi--;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b31.hitTest(_x, _y, true)) {
_root.b31._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b32.hitTest(_x, _y, true)) {
_root.b32._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b33.hitTest(_x, _y, true)) {
_root.b33._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b34.hitTest(_x, _y, true)) {
_root.b34._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b35.hitTest(_x, _y, true)) {
_root.b35._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b36.hitTest(_x, _y, true)) {
_root.b36._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b37.hitTest(_x, _y, true)) {
_root.b37._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b38.hitTest(_x, _y, true)) {
_root.b38._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b39.hitTest(_x, _y, true)) {
_root.b39._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b40.hitTest(_x, _y, true)) {
_root.b40._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b41.hitTest(_x, _y, true)) {
_root.b41._x = -100;
_root.piezas.pi--;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b42.hitTest(_x, _y, true)) {
_root.b42._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b43.hitTest(_x, _y, true)) {
_root.b43._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b44.hitTest(_x, _y, true)) {
_root.b44._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b45.hitTest(_x, _y, true)) {
_root.b45._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b46.hitTest(_x, _y, true)) {
_root.b46._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b47.hitTest(_x, _y, true)) {
_root.b47._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b48.hitTest(_x, _y, true)) {
_root.b48._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b49.hitTest(_x, _y, true)) {
_root.b49._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b50.hitTest(_x, _y, true)) {
_root.b50._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b51.hitTest(_x, _y, true)) {
_root.b51._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b52.hitTest(_x, _y, true)) {
_root.b52._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b53.hitTest(_x, _y, true)) {
_root.b53._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b54.hitTest(_x, _y, true)) {
_root.b54._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b55.hitTest(_x, _y, true)) {
_root.b55._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b56.hitTest(_x, _y, true)) {
_root.b56._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b57.hitTest(_x, _y, true)) {
_root.b57._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b58.hitTest(_x, _y, true)) {
_root.b58._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b59.hitTest(_x, _y, true)) {
_root.b59._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b60.hitTest(_x, _y, true)) {
_root.b60._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b61.hitTest(_x, _y, true)) {
_root.b61._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b62.hitTest(_x, _y, true)) {
_root.b62._x = -100;
_root.piezas.pi--;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b63.hitTest(_x, _y, true)) {
_root.b63._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b64.hitTest(_x, _y, true)) {
_root.b64._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b65.hitTest(_x, _y, true)) {
_root.b65._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b66.hitTest(_x, _y, true)) {
_root.b66._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b67.hitTest(_x, _y, true)) {
_root.b67._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b68.hitTest(_x, _y, true)) {
_root.b68._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b69.hitTest(_x, _y, true)) {
_root.b69._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b70.hitTest(_x, _y, true)) {
_root.b70._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b71.hitTest(_x, _y, true)) {
_root.b71._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b72.hitTest(_x, _y, true)) {
_root.b72._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b73.hitTest(_x, _y, true)) {
_root.b73._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b74.hitTest(_x, _y, true)) {
_root.b74._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b75.hitTest(_x, _y, true)) {
_root.b75._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b76.hitTest(_x, _y, true)) {
_root.b76._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b77.hitTest(_x, _y, true)) {
_root.b77._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b78.hitTest(_x, _y, true)) {
_root.b78._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b79.hitTest(_x, _y, true)) {
_root.b79._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b80.hitTest(_x, _y, true)) {
_root.b80._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b81.hitTest(_x, _y, true)) {
_root.b81._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b82.hitTest(_x, _y, true)) {
_root.b82._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b83.hitTest(_x, _y, true)) {
_root.b83._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b84.hitTest(_x, _y, true)) {
_root.b84._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b85.hitTest(_x, _y, true)) {
_root.b85._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b86.hitTest(_x, _y, true)) {
_root.b86._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b87.hitTest(_x, _y, true)) {
_root.b87._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b88.hitTest(_x, _y, true)) {
_root.b88._x = -100;
_root.piezas.pi--;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b89.hitTest(_x, _y, true)) {
_root.b89._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b90.hitTest(_x, _y, true)) {
_root.b90._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b91.hitTest(_x, _y, true)) {
_root.b91._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b92.hitTest(_x, _y, true)) {
_root.b92._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b93.hitTest(_x, _y, true)) {
_root.b93._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b94.hitTest(_x, _y, true)) {
_root.b94._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b95.hitTest(_x, _y, true)) {
_root.b95._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b96.hitTest(_x, _y, true)) {
_root.b96._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b97.hitTest(_x, _y, true)) {
_root.b97._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b98.hitTest(_x, _y, true)) {
_root.b98._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b99.hitTest(_x, _y, true)) {
_root.b99._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b100.hitTest(_x, _y, true)) {
_root.b100._x = -100;
_root.piezas.pi--;
this.vx = this.vx * -1;
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b103.hitTest(_x, _y, true)) {
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b105.hitTest(_x, _y, true)) {
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b106.hitTest(_x, _y, true)) {
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b107.hitTest(_x, _y, true)) {
this.vy = this.vy * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b103a.hitTest(_x, _y, true)) {
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.b103b.hitTest(_x, _y, true)) {
this.vx = this.vx * -1;
}
}
Instance of Symbol 13 MovieClip "piezas" in Frame 1
onClipEvent (load) {
this.pi = 98;
}
Instance of Symbol 226 MovieClip "ro" in Frame 1
onClipEvent (load) {
this._visible = false;
}
Frame 4
gotoAndPlay (1);
Frame 5
stop();
Frame 6
stop();
Game = function () {
var _local1 = this;
_local1.timeline = _root;
_local1.left = 0;
_local1.right = 500;
_local1.up = 0;
_local1.down = 690;
_local1.barLevel = 680;
_local1.lives = 9;
l.text = _local1.lives;
_local1.speed = 18;
_local1.isPlaying = false;
_local1.MouseListener = {};
_local1.MouseListener.Game = _local1;
Mouse.addListener(_local1.MouseListener);
};
Game.prototype.init = function () {
var _local1 = this;
_local1.drawArena();
_local1.initBar();
_local1.MouseListener.onMouseDown = function () {
var _local1 = this;
if (!_local1.Game.isPlaying) {
ball.move(_local1.Game);
_local1.Game.isPlaying = true;
}
};
};
Game.prototype.drawArena = function () {
var _local1 = this;
var _local2 = _local1.timeline.createEmptyMovieClip("Arena", 0);
_local2.lineStyle(0, 0, 100);
_local2.moveTo(_local1.left, _local1.up);
_local2.lineTo(_local1.right, _local1.up);
_local2.lineTo(_local1.right, _local1.down);
_local2.lineTo(_local1.left, _local1.down);
_local2.lineTo(_local1.left, _local1.up);
};
Game.prototype.initBar = function () {
var _local1 = this;
bar.StartDrag(true, _local1.left + (bar._width / 2), _local1.barLevel, _local1.right - (bar._width / 2), _local1.barLevel);
ball.followBar();
};
Game.prototype.loseLife = function () {
var _local1 = this;
_local1.lives--;
l.text = _local1.lives;
_local1.isPlaying = false;
if (_local1.lives >= 0) {
ball.followBar();
} else {
gotoAndStop (7);
}
};
Game.prototype.endGame = function () {
bar.stopDrag();
delete ball.onEnterFrame;
};
MovieClip.prototype.followBar = function () {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1._x = bar._x;
_local1._y = bar._y - (_local1._height / 2);
};
};
MovieClip.prototype.move = function (pGame) {
var _local1 = this;
_local1.vx = pGame.speed * Math.SQRT1_2;
_local1.vy = pGame.speed * -0.707106781186547;
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.x = _local1.x + _local1.vx;
_local1.y = _local1.y + _local1.vy;
_local1.checkWalls(pGame);
_local1._x = _local1.x;
_local1._y = _local1.y;
};
};
MovieClip.prototype.checkWalls = function (pGame) {
var _local1 = this;
var _local2 = pGame;
if (_local1.x < (_local2.left + (_local1._width / 2))) {
_local1.x = _local2.left + (_local1._width / 2);
_local1.vx = _local1.vx * -1;
} else if (_local1.x > (_local2.right - (_local1._width / 2))) {
_local1.x = _local2.right - (_local1._width / 2);
_local1.vx = _local1.vx * -1;
}
if (_local1.y < (_local2.up + (_local1._height / 2))) {
_local1.y = _local2.up + (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else if (_local1.y > (_local2.barLevel - (_local1._height / 2))) {
var l = (bar._x - (bar._width / 2));
var _local3 = bar._x + (bar._width / 2);
if ((_local1.x > l) && (_local1.x < _local3)) {
_local1.y = _local2.barLevel - (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else {
_local2.loseLife();
}
}
};
Pong = new Game();
Pong.init();
Instance of Symbol 9 MovieClip "ball" in Frame 6
onClipEvent (enterFrame) {
if (_root.d1.hitTest(_x, _y, true)) {
_root.p1.gotoAndPlay("in");
_root.piezas2.pi--;
this.vy = this.vy * -1;
_root.body.h.ojos.play();
}
}
onClipEvent (enterFrame) {
if (_root.bar1.hitTest(_x, _y, true)) {
this.vx = this.vx * -1;
}
}
onClipEvent (enterFrame) {
if (_root.bar2.hitTest(_x, _y, true)) {
this.vx = this.vx * -1;
}
}
Instance of Symbol 350 MovieClip "piezas2" in Frame 6
onClipEvent (load) {
this.pi = 22;
}
Frame 8
gotoAndPlay (1);
Frame 9
stop();
Frame 10
stop();
Game = function () {
var _local1 = this;
_local1.timeline = _root;
_local1.left = 0;
_local1.right = 500;
_local1.up = 0;
_local1.down = 690;
_local1.barLevel = 680;
_local1.lives = 4;
l.text = _local1.lives;
_local1.speed = 21;
_local1.isPlaying = false;
_local1.MouseListener = {};
_local1.MouseListener.Game = _local1;
Mouse.addListener(_local1.MouseListener);
};
Game.prototype.init = function () {
var _local1 = this;
_local1.drawArena();
_local1.initBar();
_local1.MouseListener.onMouseDown = function () {
var _local1 = this;
if (!_local1.Game.isPlaying) {
ball.move(_local1.Game);
_local1.Game.isPlaying = true;
}
};
};
Game.prototype.drawArena = function () {
var _local1 = this;
var _local2 = _local1.timeline.createEmptyMovieClip("Arena", 0);
_local2.lineStyle(0, 0, 100);
_local2.moveTo(_local1.left, _local1.up);
_local2.lineTo(_local1.right, _local1.up);
_local2.lineTo(_local1.right, _local1.down);
_local2.lineTo(_local1.left, _local1.down);
_local2.lineTo(_local1.left, _local1.up);
};
Game.prototype.initBar = function () {
var _local1 = this;
bar.StartDrag(true, _local1.left + (bar._width / 2), _local1.barLevel, _local1.right - (bar._width / 2), _local1.barLevel);
ball.followBar();
};
Game.prototype.loseLife = function () {
var _local1 = this;
_local1.lives--;
l.text = _local1.lives;
_local1.isPlaying = false;
if (_local1.lives >= 1) {
ball.followBar();
} else {
gotoAndStop (11);
}
};
Game.prototype.endGame = function () {
bar.stopDrag();
delete ball.onEnterFrame;
};
MovieClip.prototype.followBar = function () {
var _local1 = this;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1._x = bar._x;
_local1._y = bar._y - (_local1._height / 2);
};
};
MovieClip.prototype.move = function (pGame) {
var _local1 = this;
_local1.vx = pGame.speed * Math.SQRT1_2;
_local1.vy = pGame.speed * -0.707106781186547;
_local1.x = _local1._x;
_local1.y = _local1._y;
_local1.onEnterFrame = function () {
var _local1 = this;
_local1.x = _local1.x + _local1.vx;
_local1.y = _local1.y + _local1.vy;
_local1.checkWalls(pGame);
_local1._x = _local1.x;
_local1._y = _local1.y;
};
};
MovieClip.prototype.checkWalls = function (pGame) {
var _local1 = this;
var _local2 = pGame;
if (_local1.x < (_local2.left + (_local1._width / 2))) {
_local1.x = _local2.left + (_local1._width / 2);
_local1.vx = _local1.vx * -1;
} else if (_local1.x > (_local2.right - (_local1._width / 2))) {
_local1.x = _local2.right - (_local1._width / 2);
_local1.vx = _local1.vx * -1;
}
if (_local1.y < (_local2.up + (_local1._height / 2))) {
_local1.y = _local2.up + (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else if (_local1.y > (_local2.barLevel - (_local1._height / 2))) {
var l = (bar._x - (bar._width / 2));
var _local3 = bar._x + (bar._width / 2);
if ((_local1.x > l) && (_local1.x < _local3)) {
_local1.y = _local2.barLevel - (_local1._height / 2);
_local1.vy = _local1.vy * -1;
} else {
_local2.loseLife();
}
}
};
Pong = new Game();
Pong.init();
Instance of Symbol 9 MovieClip "ball" in Frame 10
onClipEvent (enterFrame) {
if (_root.c1.hitTest(_x, _y, true)) {
_root.c1.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c2.hitTest(_x, _y, true)) {
_root.c2.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c3.hitTest(_x, _y, true)) {
_root.c3.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c4.hitTest(_x, _y, true)) {
_root.c4.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c5.hitTest(_x, _y, true)) {
_root.c5.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c6.hitTest(_x, _y, true)) {
_root.c6.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c7.hitTest(_x, _y, true)) {
_root.c7.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c8.hitTest(_x, _y, true)) {
_root.c8.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c9.hitTest(_x, _y, true)) {
_root.c9.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c10.hitTest(_x, _y, true)) {
_root.c10.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c11.hitTest(_x, _y, true)) {
_root.c11.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c12.hitTest(_x, _y, true)) {
_root.c12.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c13.hitTest(_x, _y, true)) {
_root.c13.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
if (_root.c14.hitTest(_x, _y, true)) {
_root.c14.play();
_root.piezas3.pi--;
this.vy = this.vy * -1;
this.vx = this.vx * -1;
}
}
Instance of Symbol 356 MovieClip "piezas3" in Frame 10
onClipEvent (load) {
this.pi = 12;
}
Frame 12
stop();
Symbol 1 MovieClip [brick] Frame 1
stop();
Symbol 1 MovieClip [brick] Frame 6
stop();
Symbol 13 MovieClip Frame 1
n.text = pi;
Symbol 13 MovieClip Frame 2
if (n.text <= 10) {
_root.gotoAndStop(5);
}
if (n.text <= 60) {
_root.ro._visible = true;
}
Symbol 19 MovieClip Frame 1
stop();
Symbol 22 MovieClip Frame 1
stop();
Symbol 234 Button
on (release) {
gotoAndPlay (13);
}
Symbol 237 MovieClip Frame 50
stop();
Symbol 244 MovieClip Frame 173
_root.play();
Symbol 265 MovieClip Frame 1
stop();
Symbol 265 MovieClip Frame 50
gotoAndStop (1);
Symbol 265 MovieClip Frame 65
stop();
Symbol 318 MovieClip Frame 60
stop();
Symbol 320 MovieClip Frame 1
stop();
Symbol 320 MovieClip Frame 17
_parent._parent.cu2.play();
Symbol 320 MovieClip Frame 155
stop();
Symbol 339 MovieClip Frame 1
stop();
Symbol 339 MovieClip Frame 30
stop();
Symbol 339 MovieClip Frame 62
stop();
Symbol 339 MovieClip Frame 88
stop();
Symbol 339 MovieClip Frame 114
stop();
Symbol 343 MovieClip Frame 1
stop();
Symbol 343 MovieClip Frame 105
stop();
Symbol 344 MovieClip Frame 11
stop();
Symbol 344 MovieClip Frame 18
gotoAndStop (11);
Symbol 350 MovieClip Frame 1
n.text = pi;
Symbol 350 MovieClip Frame 2
if (n.text == 18) {
_root.p1.cu.play();
pi--;
}
if (n.text == 14) {
_root.p1.cu.play();
pi--;
}
if (n.text == 10) {
_root.p1.cu.play();
pi--;
}
if (n.text == 5) {
_root.p1.cu.play();
pi--;
}
if (n.text == 1) {
_root.p1.p.pc.play();
pi--;
_root.body.h.ojos.gotoAndPlay("f");
_root.gotoAndStop(12);
}
Symbol 354 MovieClip Frame 200
_root.play();
Symbol 356 MovieClip Frame 1
n.text = pi;
Symbol 356 MovieClip Frame 2
if (n.text <= 1) {
_root.gotoAndStop(12);
}
Symbol 362 Button
on (release) {
getURL ("http://ezmi.sakura.ne.jp/");
}
Symbol 365 Button
on (release) {
getURL ("http://yaoi.y-gallery.net/user/blodiax123/");
}
Symbol 367 MovieClip Frame 135
stop();