Frame 1
function CN_Game_Object() {
var _local1 = this;
_local1.timedScreenArray = new Array();
_local1.depth_i = 0;
_local1.offScreenOffset = 700;
_local1.curScreen = null;
}
function CN_Timer(screen, parent, endTime) {
var _local1 = this;
_local1.screen = screen;
_local1.mc = screen.mc.timer;
_local1.parent = parent;
_local1.mc.caller = _local1;
_local1.endTime = endTime * 1000;
_local1.active = false;
}
CN_Game_Object.prototype.Continue = function () {
var _local1 = this;
if (_local1.curScreen != null) {
_local1.RemoveScreen(_local1.curScreen);
}
if (_local1.timedScreenArray.length == 0) {
gotoAndStop (7);
} else {
_local1.curScreen = _local1.timedScreenArray.shift();
_local1.ShowScreen(_local1.curScreen);
gotoAndStop (6);
}
};
CN_Game_Object.prototype.ExternalGraphicsAreLoaded = function () {
var _local2 = this;
var _local3 = true;
var _local1 = 0;
while (_local1 < _local2.timedScreenArray.length) {
if (!_local2.timedScreenArray[_local1].isLoaded) {
_local3 = false;
break;
}
_local1++;
}
return(_local3);
};
CN_Game_Object.prototype.GetExternalParameters = function () {
var _local1 = this;
var _local2 = _root;
if (_local2.sw1 != null) {
_local1.timedScreenArray[0] = new Object();
_local1.timedScreenArray[0].path = _local2.sw1;
_local1.timedScreenArray[0].duration = _local2.sw2;
_local1.timedScreenArray[0].link = _local2.sw4;
}
if (_local2.sw5 == 1) {
var _local3 = _local1.timedScreenArray.length;
_local1.timedScreenArray[_local3] = new Object();
if (_local2.sw5 != 1) {
_local1.timedScreenArray[_local3].path = _local2.sw5;
} else {
_local1.timedScreenArray[_local3].path = "orbitPowered/orbitPowered.swf";
}
if (_local2.sw6 != null) {
_local1.timedScreenArray[_local3].duration = _local2.sw6;
} else {
_local1.timedScreenArray[_local3].duration = "3";
}
if (_local2.sw7 != null) {
_local1.timedScreenArray[_local3].link = _local2.sw7;
} else {
_local1.timedScreenArray[_local3].link = null;
}
}
var _local3 = _local1.timedScreenArray.length;
var next_i = 8;
while (_local2["sw" + next_i] != null) {
_local1.timedScreenArray[_local3] = new Object();
_local1.timedScreenArray[_local3].path = _local2["sw" + next_i];
if (_local2.sw6 != null) {
_local1.timedScreenArray[_local3].duration = _local2["sw" + (++next_i)];
} else {
_local1.timedScreenArray[_local3].duration = "5";
}
if (_local2.sw7 != null) {
_local1.timedScreenArray[_local3].link = _local2["sw" + (++next_i)];
} else {
_local1.timedScreenArray[_local3].link = null;
}
_local3++;
next_i++;
}
};
CN_Game_Object.prototype.LaunchOrbitPopup = function () {
if (_root.sw5 == 1) {
getURL ("javascript:popupOrbitCode( )");
}
};
CN_Game_Object.prototype.LoadExternalGraphic = function (screen, depth) {
var _local1 = screen;
var _local2 = depth;
_root.attachMovie("externalFileHolder", "holder" + _local2, _local2);
_local1.mc = _root["holder" + _local2];
_local1.mc.caller = _local1;
_local1.mc.slot.loadMovie(_local1.path);
};
CN_Game_Object.prototype.MainMovieIsLoaded = function () {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
return(true);
}
return(false);
};
CN_Game_Object.prototype.PreloadExternalGraphics = function () {
var _local2 = this;
var _local1 = 0;
while (_local1 < _local2.timedScreenArray.length) {
_local2.LoadExternalGraphic(_local2.timedScreenArray[_local1], _local1 + 1);
_local2.timedScreenArray[_local1].mc._x = _local2.offScreenOffset;
_local1++;
}
};
CN_Game_Object.prototype.RemoveScreen = function (screen) {
var _local1 = screen;
_local1.mc.slot.unloadMovie();
_local1.mc.removeMovieClip();
};
CN_Game_Object.prototype.ShowScreen = function (screen) {
var _local1 = screen;
_local1.mc._x = 0;
_local1.mc._y = 0;
_local1.timer = new CN_Timer(_local1, this, _local1.duration);
_local1.timer.Start();
};
CN_Game_Object.prototype.toString = function () {
return("CN_Game_Object");
};
CN_Timer.prototype.Start = function () {
this.active = true;
this.startTime = getTimer();
};
CN_Timer.prototype.Tick = function () {
var _local1 = this;
if ((getTimer() - _local1.startTime) >= _local1.endTime) {
_root.EndTimerAdapter(_local1.parent);
_local1.active = false;
}
};
CN_Timer.prototype.toString = function () {
return("CN_Timer");
};
EndTimerAdapter = function (parent) {
parent.Continue();
};
myGameObject = new CN_Game_Object();
Frame 2
play();
Frame 3
gPercentage = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
MLoader.gotoAndStop(gPercentage);
vPercentage = gPercentage + "%";
if (myGameObject.MainMovieIsLoaded()) {
myGameObject.GetExternalParameters();
myGameObject.PreloadExternalGraphics();
play();
} else {
prevFrame();
}
Frame 4
play();
Frame 5
if (myGameObject.ExternalGraphicsAreLoaded()) {
_root.myGameObject.Continue();
} else {
prevFrame();
}
Frame 7
stop();
Frame 8
stop();
Frame 9
function initGame() {
pausa = 0;
rotVal = 2;
level = 1;
score = 0;
contador = 0;
_root.freezeBall = 0;
_root.flyKamikaze = 0;
origBallx = 80 + random(80);
origBally = 190;
vidas = 3;
backMusic = new Sound();
backMusic.attachSound("jingle");
initLevel();
}
function initLevel() {
var _local1 = _root;
_local1.MLevelName.banner = "Level " + level;
if (level < 10) {
_local1.MLevelName._visible = true;
} else {
_local1.MLevelName._visible = false;
}
_local1.freezeBall = 1;
i = 0;
amount = level + 4;
if (level == 1) {
amount = 4;
}
if (level == 2) {
amount = 3;
}
if (level == 3) {
amount = 2;
}
if (level == 4) {
amount = 5;
}
if (level == 5) {
amount = 3;
}
if (level == 6) {
amount = 2;
}
if (level == 7) {
amount = 3;
}
if (level == 8) {
amount = 5;
}
if (level == 9) {
amount = 3;
}
if (level == 10) {
gotoAndPlay (33);
}
_local1.scripts.BirdsAlive = amount;
BoxesAlive = _local1.scripts.BirdsAlive;
displayBall1stTime();
displayWall();
if (musica != 1) {
BackGroundMusic(1);
}
levelPause();
}
function levelPause() {
_root.MLevelName.banner = "Level " + level;
_root.pausa = 3;
}
function check4levelPause2() {
if (_root.pausa == 3) {
levelPause2();
}
}
function levelPause2() {
var _local1 = _root;
_local1.contador++;
if (_local1.contador > 20) {
_local1.pausa = 0;
_local1.contador = 1;
_local1.MLevelName.banner = "";
_local1.freezeBall = 0;
}
}
function displayBall1stTime() {
bola._x = origBallx;
bola._y = origBally;
}
function BackGroundMusic(flag) {
if (flag == 1) {
backMusic.start(0, 9999);
Musica = 1;
}
if (flag == 0) {
Musica = 0;
backMusic.stop();
}
}
function DisplayWall() {
var _local1 = _root;
basex = 40;
while (_local1.amount > 0) {
_local1.ladrillo.duplicateMovieClip("block" + i, i + 42);
setProperty("_root.block" + i, _x , (basex + (i * 70)) + 40);
setProperty("_root.block" + i, _y , random(100) + 60);
i++;
_local1.amount--;
}
}
stop();
Instance of Symbol 85 MovieClip "barca" in Frame 9
onClipEvent (load) {
rotVal = 1;
this._x = 150;
this._y = 310;
}
onClipEvent (enterFrame) {
function limitBarca() {
var _local1 = this;
if (_local1._x <= -120) {
_local1._x = -120;
}
if (_local1._x >= 400) {
_local1._x = 400;
}
}
function MoveLeft() {
this._x = this._x + speedBarca;
limitBarca();
}
function MoveRight() {
this._x = this._x - speedBarca;
limitBarca();
}
function ShakeBoat() {
var _local1 = this;
if (_local1._rotation >= 3) {
rotVal = -rotVal;
}
if (_local1._rotation <= -3) {
rotVal = -rotVal;
}
_local1._rotation = _local1._rotation + (rotVal / 3);
_local1._y = _local1._y + (rotVal / 5);
}
function CheckHitBoat() {
var _local1 = _root;
if (this.hitTest(_local1.bola._x + (_local1.bola.reboteX * _local1.bola.speedBola), (_local1.bola._y + (_local1.bola.reboteY * _local1.bola.speedBola)) + (_local1.bola._height / 2), 1) and (_local1.bola._y < this._y)) {
_local1.bola.reboteY = -_local1.bola.reboteY;
}
}
speedBarca = 10;
this._y = 310;
if (Key.isDown(39)) {
MoveLeft();
}
if (Key.isDown(37)) {
moveRight();
}
CheckHitBoat();
ShakeBoat();
}
Instance of Symbol 87 MovieClip "bola" in Frame 9
onClipEvent (load) {
reboteX = 1;
reboteY = 1;
speedBola = 7.5;
}
onClipEvent (enterFrame) {
function checkBoundaries() {
var _local1 = this;
if ((_local1._x <= 8) and (_local1._x > -50)) {
reboteX = -reboteX;
}
if (_local1._x >= 420) {
reboteX = -reboteX;
}
if (_local1._y <= 40) {
reboteY = -reboteY;
}
}
function moveBall() {
var _local1 = this;
if ((_local1._x != -50) and (_root.pausa != 1)) {
if (_root.freezeBall == 0) {
_local1._rotation = _local1._rotation + 25;
_local1._x = _local1._x + (reboteX * speedBola);
_local1._y = _local1._y + (reboteY * speedBola);
}
}
}
function BallSinks() {
var _local1 = _root;
var _local2 = this;
if ((_local2._y >= 300) and (_local2._x != -50)) {
_local1.wetMike.duplicateMovieClip("wetMike2", 159);
_local1.locSink = _local2._x;
if (_local1.vidas > 0) {
_local1.salpicon.duplicateMovieClip("salpicaCoco", 120);
_local1.salpicaCoco._x = _local1.locSink;
_local1.salpicaCoco._y = 302;
}
_local2._x = -50;
_local2._y = 299;
_local1.vidas--;
_local1.scripts.PlaySound1();
_local1.pausa = 1;
_local1.bola.removeMovieClip();
}
}
checkBoundaries();
moveBall();
BallSinks();
}
Instance of Symbol 99 MovieClip "ladrillo" in Frame 9
onClipEvent (load) {
contador = 20;
BirdDirection = 0.1;
FallSpeed = 5;
}
onClipEvent (enterFrame) {
function HitBoat() {
var _local1 = _root;
if ((this.hitTest(_local1.barca) and (IamDead == 1)) and (BoatTouched != 1)) {
BoatTouched = 1;
_local1.scripts.increaseScore(50);
_local1.BoxesAlive = _local1.BoxesAlive - 1;
_local1.scripts.PlaySound2();
this.removeMovieClip();
}
}
function MoveBird() {
var _local1 = this;
while ((contador > 1) and (IamDead != 1)) {
_local1._y = _local1._y + BirdDirection;
contador--;
}
if (contador <= 1) {
BirdDirection = -BirdDirection;
contador = 20;
}
}
function Fall() {
var _local1 = this;
var _local2 = _root;
if (IamDead == 1) {
_local1._y = _local1._y + FallSpeed;
}
if (_local1._y > 300) {
_local2.salpicon.duplicateMovieClip("salpicaCoco" + BoxesAlive, 120 + BoxesAlive);
setProperty("_root.salpicaCoco" + BoxesAlive, _x , _local1._x);
setProperty("_root.salpicaCoco" + BoxesAlive, _y , 302);
_local2.BoxesAlive = _local2.BoxesAlive - 1;
_local1.removeMovieClip();
}
}
function DeadBird() {
var _local1 = _root;
var _local2 = this;
if (_local1.flyKamikaze == 1) {
_local2.removeMovieClip();
_local1.flyKamikaze = 0;
}
if (_local2.hitTest(_local1.bola) and (IamDead != 1)) {
_local1.scripts.increaseScore(10);
_local1.scripts.PlaySound3();
_local2.gotoAndPlay(2);
IamDead = 1;
_local1.scripts.BirdsAlive = _local1.scripts.BirdsAlive - 1;
_local1.bola.reboteY = -_local1.bola.reboteY;
}
}
MoveBird();
DeadBird();
HitBoat();
Fall();
}
Instance of Symbol 101 MovieClip "scripts" in Frame 9
onClipEvent (load) {
_root.initGame();
}
onClipEvent (enterFrame) {
function checkForPause() {
if (_root.pausa == 1) {
tryAgain();
}
}
function displayVidas() {
var _local1 = _root;
if (_local1.vidas == 2) {
_local1.lives.gotoAndPlay(2);
}
if (_local1.vidas == 1) {
_local1.lives.gotoAndPlay(3);
}
if (_local1.vidas == 0) {
_local1.lives.gotoAndPlay(4);
}
if (_local1.vidas < 0) {
endGame();
}
}
function endGame() {
killBirdsEnd();
_root.BackGroundMusic(0);
_root.gotoAndPlay(20);
}
function killBirdsEnd() {
_root.flyKamikaze = 1;
}
function increaseScore(puntos) {
_root.score = _root.score + puntos;
}
function nextLevel() {
var _local1 = _root;
if (_local1.BoxesAlive <= 0) {
_local1.level = _local1.level + 1;
_local1.initLevel();
}
}
function displayCharacter() {
var _local1 = _root;
_local1.character._x = _local1.barca._x + 0;
_local1.character._y = _local1.barca._y - 7;
_local1.character._rotation = _local1.barca._rotation;
}
function limitBarca() {
var _local1 = _root;
if (_local1.barca._x <= 40) {
_local1.barca._x = 40;
}
if (_local1.barca._x >= 400) {
_local1.barca._x = 400;
}
}
function MoveBoat() {
if (Key.isDown(39)) {
MoveLeft();
}
if (Key.isDown(37)) {
moveRight();
}
}
function MoveLeft() {
_root.barca._x = _root.barca._x + speedBarca;
limitBarca();
}
function MoveRight() {
_root.barca._x = _root.barca._x - speedBarca;
limitBarca();
}
function ShakeBoat() {
var _local1 = _root;
if (_local1.barca._rotation >= 10) {
rotVal = -rotVal;
}
if (_local1.barca._rotation <= -10) {
rotVal = -rotVal;
}
_local1.barca._rotation = _local1.barca._rotation + rotVal;
_local1.barca._y = _local1.barca._y + rotVal;
}
function PlaySound1() {
pim = new Sound();
pim.attachSound("sound1");
pim.start(0, 1);
}
function PlaySound2() {
pom = new Sound();
pom.attachSound("sound2");
pom.start(0, 1);
}
function PlaySound3() {
pom = new Sound();
pom.attachSound("ping");
pom.start(0, 1);
}
function tryAgain() {
var _local1 = _root;
_local1.contador++;
if ((_local1.contador > 8) and (_local1.contador < 10)) {
_local1.wetMike2.gotoAndPlay(2);
removeBoat();
}
if ((_local1.contador > 10) and (_local1.contador < 15)) {
}
if (_local1.contador > 20) {
restoreBoat();
_local1.pausa = 0;
_local1.contador = 1;
_local1.bola._y = 50;
_local1.bola._x = 50;
}
}
function removeBoat() {
_root.barca._y = -50;
}
function restoreBoat() {
_root.barca._y = 300;
}
function CheckHitBoat() {
var _local1 = _root;
if (_local1.barca.hitTest(_local1.bola._x + (_local1.bola.reboteX * _local1.bola.speedBola), (_local1.bola._y + (_local1.bola.reboteY * _local1.bola.speedBola)) + (_local1.bola._height / 2), 1) and (_local1.bola._y < _local1.barca._y)) {
_local1.bola.reboteY = -_local1.bola.reboteY;
}
}
speedBarca = 10;
MoveBoat();
CheckHitBoat();
ShakeBoat();
displayCharacter();
nextLevel();
displayVidas();
checkForPause();
_root.check4levelPause2();
}
Instance of Symbol 132 MovieClip "MLevelName" in Frame 9
onClipEvent (load) {
this.swapDepths(500);
}
Instance of Symbol 135 MovieClip in Frame 9
onClipEvent (load) {
this.holder.loadMovie((_root.trackerPath + "?id=") + new Date().valueOf());
}
Instance of Symbol 139 MovieClip in Frame 9
onClipEvent (load) {
this.pPrevTime = 0;
this.pFPS = 9;
this.pFrameCount = this.pFPS;
}
onClipEvent (enterFrame) {
this.pFrameCount--;
if (!this.pFrameCount) {
this.pFrameCount = this.pFPS;
var currtime = getTimer();
var timepassed = ((currtime - this.pPrevTime) / 1000);
this.pPrevTime = currtime;
this.VFPS = Math.floor(this.pFPS / timepassed);
}
}
Frame 20
stop();
Frame 33
if (level < 10) {
_root.MLevelName._visible = true;
} else {
_root.MLevelName._visible = false;
}
stop();
Frame 34
stop();
Frame 35
stop();
Symbol 7 MovieClip [externalFileHolder] Frame 1
stop();
Instance of Symbol 5 MovieClip "slot" in Symbol 7 MovieClip [externalFileHolder] Frame 1
onClipEvent (data) {
_parent.caller.isLoaded = true;
}
onClipEvent (mouseUp) {
if ((_parent.caller.link != null) && (this.hitTest(_xmouse, _ymouse, false))) {
getURL (_parent.caller.link, "_blank");
}
}
Instance of Symbol 6 MovieClip "timer" in Symbol 7 MovieClip [externalFileHolder] Frame 1
onClipEvent (enterFrame) {
if (caller.active) {
caller.Tick();
}
}
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 100
stop();
Symbol 35 Button
on (release) {
gotoAndPlay (8);
}
Symbol 40 Button
on (release) {
gotoAndPlay (9);
}
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 4
stop();
Symbol 99 MovieClip Frame 13
_parent.removeMovieClip();
stop();
Symbol 107 MovieClip Frame 9
this.removeMovieClip();
Symbol 114 MovieClip Frame 1
stop();
Symbol 114 MovieClip Frame 12
stop();
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
Symbol 124 MovieClip Frame 3
stop();
Symbol 124 MovieClip Frame 4
stop();
Symbol 130 MovieClip Frame 1
stop();
Symbol 130 MovieClip Frame 18
this.removeMovieClip();
Symbol 152 Button
on (release) {
gotoAndPlay (9);
}