Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
_root.ver = "1.01";
__com_mochibot__("808d75e7", this, 10301, true);
stop();
MochiAd.showPreloaderAd({id:"0e1adff895b506c1", res:"711x400"});
Frame 2
version_txt.text = "version: " + _root.ver;
this._lockroot = true;
_quality = "MEDIUM";
var sound_ocean = new Sound(this);
sound_ocean.attachSound("ocean.wav");
sound_ocean.start(0, 100000000);
var debug = true;
var okToPlay = true;
var utility = new Utility();
var baseURL = "/";
var baseRootURL = "/";
siteURL = "http://www.blackbeardsisland.com";
siteURL2 = "http://blackbeardsisland.com";
siteURL3 = "http://70.103.140.117/~blackbe1";
okToPlay = true;
baseURL = "http://blackbeardsisland.com/webservices/";
baseRootURL = "http://blackbeardsisland.com/";
if (!okToPlay) {
gotoAndStop (1);
} else {
var serverPass = "mrjim";
_root.stageStart = 0;
_root.levelStart = 0;
_root.testerMode = false;
_root.easyMode = false;
stop();
this.onMouseDown = function () {
};
Mouse.show();
start_btn.onRelease = function () {
sound_ocean.stop();
gotoAndStop ("LogIn");
};
credits_btn.onRelease = function () {
utility.EnableButtons(this._parent, false);
var _local3 = _root.attachMovie("Credits", "Credits" + this.getNextHighestDepth(), this.getNextHighestDepth());
_local3.onUnload = function () {
var _local2 = new Utility();
_local2.EnableButtons(this._parent, true);
_local2.killMovieClip(this);
};
};
bt_dotcom.onRelease = function () {
getURL ("http://www.blackbeardsisland.com", "_self");
};
}
String.prototype.isEmail = function () {
var _local6 = arguments.callee;
if (this.indexOf("@") == -1) {
return(false);
}
if (!isNaN(this.charAt(0))) {
return(false);
}
var _local11;
var _local10;
var _local9;
var _local7;
var _local8;
_local11 = this.split("@");
if (_local11.length == 2) {
_local9 = _local11[1];
if (_local9.split(".").pop().length > 3) {
return(false);
}
if (_local9.split(".").length < 2) {
return(false);
}
_local10 = _local11[0];
if (_local10.indexOf(".") && (_local9.indexOf("."))) {
if (_local9.lastIndexOf(".") > (_local9.length - 3)) {
return(false);
}
var _local3;
var _local5;
_local7 = _local10.split(".");
var _local4 = _local7.length;
while (_local4--) {
_local3 = _local7[_local4];
_local5 = !_local6.$_text.call(_local3, "-", ".", "_");
if (_local5 || (!isNaN(_local3))) {
return(false);
}
}
_local8 = _local9.split(".");
_local4 = _local8.length;
while (_local4--) {
_local3 = _local8[_local4];
_local5 = !_local6.$_text.call(_local3, "-", ".");
if (_local5 || (!isNaN(_local3))) {
return(false);
}
}
// unexpected jump
}
return(false);
} else {
return(false);
}
return(true);
};
String.prototype.isEmail.$_punctuation = function () {
if (this == "") {
return(false);
}
var _local3 = arguments.length;
while (_local3--) {
if (this.indexOf(arguments[_local3]) == 0) {
return(false);
}
if (this.indexOf(arguments[_local3]) == (this.length - 1)) {
return(false);
}
}
return(true);
};
String.prototype.isEmail.$_text = function () {
var _local8 = arguments.caller;
if (!_local8.$_punctuation.apply(this, arguments)) {
return(false);
}
var others = arguments;
var _local7 = function (str) {
var _local1 = others.length;
while (_local1--) {
if (str == others[_local1]) {
return(true);
}
}
return(false);
};
var _local3;
var _local6;
var _local5;
var _local4 = this.length;
while (_local4--) {
_local3 = this.charAt(_local4).toLowerCase();
_local6 = (_local3 <= "z") && (_local3 >= "a");
_local5 = (_local3 <= "9") && (_local3 >= "0");
if (((!_local6) && (!_local5)) && (!_local7(_local3))) {
return(false);
}
}
return(true);
};
ASSetPropFlags(String.prototype, "isEmail", 1);
MovieClip.prototype.killMovieClip = function () {
this.swapDepths(1048000);
this.removeMovieClip();
};
ASSetPropFlags(MovieClip.prototype, "killMovieClip", 1);
Frame 10
function startGame() {
_root.JustStarted = true;
if (_root.topLevel >= 3) {
} else {
_root.stageStart = 0;
}
gotoAndStop ("playgame");
}
stop();
var logIn = _root.attachMovie("Profile", "Profile_mc" + this.getNextHighestDepth(), this.getNextHighestDepth());
logIn.onUnload = function () {
this.removeMovieClip();
if (!_root.isRegistered) {
var _local3 = _root.attachMovie("Tutorial", "Tutorial" + this.getNextHighestDepth(), this.getNextHighestDepth());
_local3.onUnload = function () {
startGame();
};
} else {
startGame();
}
};
Frame 30
function PlayBackgroundMusic(reset) {
_root.music_mc.gotoAndPlay(1);
}
function StopBackgroundMusic() {
_root.music_mc.stop();
}
function PlayNextSong() {
songIndex++;
if (songIndex >= songs.length) {
songIndex = 0;
}
_root.music_mc.removeMovieClip();
_root.attachMovie(songs[songIndex], "music_mc", _root.getNextHighestDepth());
var _local2 = new Sound(_root.music_mc);
_local2.setVolume(_root.musicVolume);
_root.music_mc.gotoAndPlay(1);
}
function PlayPreviousSong() {
songIndex--;
if (songIndex < 0) {
songIndex = songs.length - 1;
}
_root.music_mc.removeMovieClip();
_root.attachMovie(songs[songIndex], "music_mc", _root.getNextHighestDepth());
var _local2 = new Sound(_root.music_mc);
_local2.setVolume(_root.musicVolume);
_root.music_mc.gotoAndPlay(1);
}
function PlayComboSound(combo) {
switch (combo) {
case 1 :
_root.sound_remove.start();
break;
case 2 :
_root.sound_combo1.start();
break;
case 3 :
_root.sound_combo2.start();
break;
case 4 :
_root.sound_combo3.start();
break;
default :
_root.sound_combo4.start();
}
}
function ShowMenu() {
ui_header.menu_btn.enabled = false;
_root.ShowCustomCursor(false);
Key.removeListener(keyListener);
Pause();
var _local3 = _root.attachMovie("Menu", "menu_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3.onUnload = function () {
_root.ui_header.menu_btn.enabled = true;
Key.addListener(keyListener);
_root.UnPause();
_root.ShowCustomCursor(true);
this.killMovieClip();
};
}
function Pause() {
ShowCustomCursor(false);
_root.music_mc.stop();
_root.sound_beepbeep.stop("beepbeep.mp3");
menu_btn.enabled = false;
for (var _local2 in level.cannons) {
level.cannons[_local2].enabled = false;
}
_root.isPaused = true;
_root.stopWatch.Pause();
}
function UnPause() {
ShowCustomCursor(true);
_root.music_mc.play();
if (_root.level.dangerOn) {
_root.sound_beepbeep.start(0, 1000000);
}
menu_btn.enabled = true;
for (var _local2 in level.cannons) {
level.cannons[_local2].enabled = true;
}
_root.isPaused = false;
_root.stopWatch.Start();
}
function ShowCustomCursor(enable) {
if (!enable) {
target_cursor_mc._visible = false;
Mouse.show();
} else {
target_cursor_mc._visible = true;
Mouse.hide();
}
}
function ResetGame() {
_root.lives = 1;
level = new Level(this);
stopWatch = new StopWatch();
level.Init(_root.stageStart, _root.levelStart);
}
function RenderNumLives() {
_root.ui_header.life1_mc._visible = false;
_root.ui_header.life2_mc._visible = false;
_root.ui_header.life3_mc._visible = false;
if (_root.lives <= 3) {
_root.ui_header.life_txt._visible = false;
i = 1;
while (i <= _root.lives) {
eval (("_root.ui_header.life" + i) + "_mc")._visible = true;
i++;
}
} else {
_root.ui_header.life1_mc._visible = true;
_root.ui_header.life2_mc._visible = false;
_root.ui_header.life3_mc._visible = false;
_root.ui_header.life_txt._visible = true;
_root.ui_header.life_txt.text = "x " + _root.lives;
}
}
function GiveExtraLife() {
_root.level.extraLifePointCounter = 0;
_root.lives = Number(_root.lives) + 1;
if (_root.lives <= 3) {
blink_mc = eval (("_root.ui_header.life" + i) + "_mc");
} else {
blink_mc = _root.ui_header.life1_mc;
}
RenderNumLives();
blinkLifeIntervalId = setInterval(_root, "BlinkLife", 300);
}
function BlinkLife() {
if (blink_mc._visible) {
blink_mc._visible = false;
} else {
_root.sound_dingdingding.start();
blink_mc._visible = true;
}
if (blinkCount > 4) {
clearInterval(blinkLifeIntervalId);
blinkCount = 0;
return(undefined);
}
blinkCount++;
}
_root.xmin = 0;
_root.ymax = 400;
_root.ymin = 0;
_root.xmax = 711;
_root.maxBallCount = 200;
_root.ballRadius = 15;
_root.speedMultiplier = 1;
_root.lives = 3;
_root.isPaused = false;
_root.musicVolume = 25;
_root.soundEffectsVolume = 80;
_root.startFadeOutMapMusic = false;
var utility = new Utility();
var level = new Level(this);
stopWatch = new StopWatch();
_root.attachMovie("UI_Header", "ui_header", _root.getNextHighestDepth());
ui_header.cacheAsBitmap = true;
_root.attachMovie("target_cursor", "target_cursor_mc", _root.getNextHighestDepth());
target_cursor_mc.cacheAsBitmap = true;
this.createEmptyMovieClip("soundEffectsHolder_mc", _root.getNextHighestDepth());
this.createEmptyMovieClip("mapMusicHolder_mc", _root.getNextHighestDepth());
var sound_overworldmap = new Sound(mapMusicHolder_mc);
sound_overworldmap.attachSound("overworldmap_music.wav");
sound_overworldmap.setVolume(_root.musicVolume);
var sound_push_hit = new Sound(soundEffectsHolder_mc);
sound_push_hit.attachSound("push_hit.mp3");
var sound_remove = new Sound(soundEffectsHolder_mc);
sound_remove.attachSound("remove.mp3");
var sound_little_hit = new Sound(soundEffectsHolder_mc);
sound_little_hit.attachSound("little_hit.mp3");
var sound_cannon_fire = new Sound(soundEffectsHolder_mc);
sound_cannon_fire.attachSound("cannon_fire.mp3");
var sound_combo1 = new Sound(soundEffectsHolder_mc);
sound_combo1.attachSound("combo1.mp3");
var sound_combo2 = new Sound(soundEffectsHolder_mc);
sound_combo2.attachSound("combo2.mp3");
var sound_combo3 = new Sound(soundEffectsHolder_mc);
sound_combo3.attachSound("combo3.mp3");
var sound_combo4 = new Sound(soundEffectsHolder_mc);
sound_combo4.attachSound("combo4.mp3");
var sound_rolling = new Sound(soundEffectsHolder_mc);
sound_rolling.attachSound("rolling.mp3");
var little_boom = new Sound(soundEffectsHolder_mc);
little_boom.attachSound("little_boom.mp3");
var sound_flame_on = new Sound(soundEffectsHolder_mc);
sound_flame_on.attachSound("flame_on.mp3");
var sound_boom_ball = new Sound(soundEffectsHolder_mc);
sound_boom_ball.attachSound("boom_ball.mp3");
var sound_kerching = new Sound(soundEffectsHolder_mc);
sound_kerching.attachSound("kerching.mp3");
var sound_coin_arrive = new Sound(soundEffectsHolder_mc);
sound_coin_arrive.attachSound("coinarrive.wav");
var sound_coinTimeout = new Sound(soundEffectsHolder_mc);
sound_coinTimeout.attachSound("coinTimeout.wav");
var arrgh_sound = new Sound(soundEffectsHolder_mc);
arrgh_sound.attachSound("arrgh.mp3");
var sound_beepbeep = new Sound(soundEffectsHolder_mc);
sound_beepbeep.attachSound("beepbeep.mp3");
var sound_dingdingding = new Sound(soundEffectsHolder_mc);
sound_dingdingding.attachSound("dingdingding.mp3");
var sound_whoosh = new Sound(soundEffectsHolder_mc);
sound_whoosh.attachSound("whoosh.mp3");
var sound_slowdown = new Sound(soundEffectsHolder_mc);
sound_slowdown.attachSound("slowdown.mp3");
var sound_chainbonus = new Sound(soundEffectsHolder_mc);
sound_chainbonus.attachSound("chainbonus.mp3");
_root.attachMovie("rum", "music_mc", _root.getNextHighestDepth());
var music_slow = new Sound(_root.music_mc);
music_slow.setVolume(_root.musicVolume);
var sound_levelComplete = new Sound(_root.music_mc);
sound_levelComplete.attachSound("levelComplete.mp3");
var effects = new Sound(soundEffectsHolder_mc);
effects.setVolume(_root.soundEffectsVolume);
var songs = new Array("rum", "scandy set", "Dunse Dings A");
var songIndex = utility.randRange(0, songs.length - 1);
Key.removeListener(keyListener);
keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.getCode() == 39) {
_root.PlayNextSong();
} else if (Key.getCode() == 37) {
_root.PlayPreviousSong();
} else if (Key.getCode() == 32) {
_root.level.SwitchCannon(1);
} else if (Key.getCode() == 80) {
_root.level.ballLines[0].AddPowerUp();
}
};
Key.addListener(keyListener);
this.onMouseDown = function () {
target_cursor_mc.gotoAndStop(2);
if ((!_root.isPaused) && (!ui_header.menuhotzone_mc.hitTest(_root._xmouse, _root._ymouse, true))) {
for (var c in level.cannons) {
var cannon = level.cannons[c];
if (cannon.hitTest(_root._xmouse, _root._ymouse, true) && (cannon.active == false)) {
return(undefined);
}
}
if (((!level.activeCannon.out) && (!level.loseLevel)) && (!level.youWin)) {
_root.sound_cannon_fire.start();
level.activeCannon.out = true;
level.activeCannon.angle = utility.GetAngle(level.activeCannon._x, level.activeCannon._y, _root._xmouse, _root._ymouse);
level.activeCannon.ball.fireAngle = level.activeCannon.angle;
level.activeCannon.ball._rotation = 0;
level.activeCannon.ball.gotoAndStop("face");
var smoke = eval ("_root.cannon_smoke_mc" + level.activeCannon.cannonIndex);
smoke.smoke_raw_mc.gotoAndPlay("Start");
smoke._x = level.activeCannon.ball._x;
smoke._y = level.activeCannon.ball._y;
smoke._rotation = level.activeCannon.angle;
smoke.swapDepths(level.activeCannon);
level.activeCannon.gotoAndPlay(1);
level.activeCannon.cannonTop.gotoAndPlay(1);
}
}
};
this.onMouseUp = function () {
target_cursor_mc.gotoAndStop(1);
};
var scrollDelta = 0;
mouseListener = new Object();
mouseListener.onMouseWheel = function (delta) {
if (!_root.isPaused) {
scrollDelta = scrollDelta + delta;
if (Math.abs(scrollDelta) >= 6) {
level.SwitchCannon(scrollDelta);
scrollDelta = 0;
}
}
};
Mouse.addListener(mouseListener);
ui_header.menu_btn.onRollOver = function () {
ShowCustomCursor(false);
};
ui_header.menu_btn.onRollOut = function () {
if (!_root.isPaused) {
ShowCustomCursor(true);
}
};
ui_header.menu_btn.onRelease = function () {
ShowMenu();
};
this.onEnterFrame = function () {
frameCount++;
if (_root.startFadeOutMapMusic == true) {
var _local5 = new Sound(_root.mapMusicHolder_mc);
var _local3 = _local5.getVolume();
if ((_local3 == undefined) || (_local3 > _root.musicVolume)) {
_local3 = _root.musicVolume;
_local5.setVolume(_local3);
}
if (_local3 > 0) {
_local5.setVolume(_local3 - 5);
} else {
_local5.setVolume(0);
_root.sound_overworldmap.stop();
_root.startFadeOutMapMusic = false;
}
}
if ((level.levelLoaded && (!_root.isPaused)) && (level.youWin != true)) {
level.EnterFrame();
}
if (level.youWin || (level.loseLevel)) {
ShowCustomCursor(false);
}
target_cursor_mc._x = _root._xmouse;
target_cursor_mc._y = _root._ymouse;
utility.TransformColor(target_cursor_mc.fill, level.activeCannon.ball.ballColor);
if (((!_root.isPaused) && (level.youWin != true)) && (level.loseLevel != true)) {
var _local6 = _root.ui_header.getDepth();
var _local9 = _root.getNextHighestDepth();
if (_local6 != (_local9 - 1)) {
tmp1_mc.removeMovieClip();
tmp2_mc.removeMovieClip();
var _local8 = _root.createEmptyMovieClip("tmp1_mc", _root.getNextHighestDepth());
var _local7 = _root.createEmptyMovieClip("tmp2_mc", _root.getNextHighestDepth());
target_cursor_mc.swapDepths(_local8);
_root.ui_header.swapDepths(_local7);
}
for (var _local4 in level.cannons) {
var _local2 = level.cannons[_local4];
if (_local2.cannonTop.getDepth() > _local2.ball.getDepth()) {
_local2.cannonTop.swapDepths(_local2.ball);
}
}
}
};
var blinkLifeIntervalId;
var blinkCount = 0;
var blink_mc;
var overworld_mc = _root.attachMovie("overworld", "overworld_mc", _root.getNextHighestDepth());
if (_root.topLevel < 4) {
overworld_mc.mapMode = "display";
overworld_mc.highLevel = "1-1";
_root.stageStart = 0;
_root.levelStart = 0;
} else {
overworld_mc.mapMode = "selection";
}
Pause();
Symbol 40 MovieClip Frame 1
gotoAndPlay (30);
Symbol 40 MovieClip Frame 120
gotoAndPlay (30);
Symbol 41 MovieClip [fireAndSmoke] Frame 48
if (this.stopMe == true) {
play();
} else {
gotoAndPlay ("burn");
}
Symbol 41 MovieClip [fireAndSmoke] Frame 78
this.removeMovieClip();
Symbol 43 MovieClip Frame 1
attachMovie("flag_" + _root.userPirateFlag, ("flag_" + _root.userPirateFlag) + "_mc", this.getNextHighestDepth());
Symbol 45 MovieClip [RaiseFlag] Frame 60
stop();
Symbol 47 MovieClip Frame 15
stop();
this._parent.removeMovieClip();
Symbol 48 MovieClip [little_explode] Frame 1
var colorTransform;
if (ballColor == undefined) {
ballColor = _root.level.utility.randRange(1, 4);
}
switch (ballColor) {
case 1 :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 255, 0);
break;
case 2 :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 255, 0, 0, 0);
break;
case 3 :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 246, 226, 5, 0);
break;
case 4 :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 217, 12, 248, 0);
}
var trans = (new flash.geom.Transform(isk1));
trans.colorTransform = colorTransform;
isk1._visible = false;
i = 2;
while (Number(i) < 50) {
duplicateMovieClip ("isk1", "isk" + i, i);
setProperty("isk" + i, _rotation , random(360));
scalefactor = 20 + Number(random(100));
setProperty("isk" + i, _xscale , scalefactor);
setProperty("isk" + i, _yscale , scalefactor);
i = Number(i) + 1;
}
Symbol 49 MovieClip [explode] Frame 1
var colorTransform;
switch (ballColor) {
case "Blue" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 255, 0);
break;
case "Red" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 255, 0, 0, 0);
break;
case "Yellow" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 246, 226, 5, 0);
break;
case "Purple" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 217, 12, 248, 0);
break;
case "Black" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 0, 0);
break;
case "Green" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 36, 110, 69, 0);
break;
case "White" :
colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, 255, 255, 255, 0);
}
var trans = (new flash.geom.Transform(isk1));
trans.colorTransform = colorTransform;
isk1._visible = false;
i = 2;
while (Number(i) < 25) {
duplicateMovieClip ("isk1", "isk" + i, i);
setProperty("isk" + i, _rotation , random(360));
scalefactor = 20 + Number(random(100));
setProperty("isk" + i, _xscale , scalefactor);
setProperty("isk" + i, _yscale , scalefactor);
i = Number(i) + 1;
}
Symbol 149 MovieClip [Green] Frame 1
stop();
Symbol 149 MovieClip [Green] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 149 MovieClip [Green] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 246 MovieClip [Yellow] Frame 1
stop();
Symbol 246 MovieClip [Yellow] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 246 MovieClip [Yellow] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 343 MovieClip [Red] Frame 1
stop();
Symbol 343 MovieClip [Red] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 343 MovieClip [Red] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 360 MovieClip [BoomEffect] Frame 1
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = "Black";
Symbol 360 MovieClip [BoomEffect] Frame 2
this.onEnterFrame = function () {
for (var _local6 in _root.level.ballLines) {
var _local5 = _root.level.ballLines[_local6];
var _local4 = _local5.balls.length - 1;
while (_local4 >= 0) {
var _local3 = _local5.balls[_local4];
if (_root.level.utility.md(_local3._x, _local3._y, this._x, this._y) < ((this._width / 2) + 15)) {
if (_local3._currentframe <= 47) {
_local3.gotoAndPlay("pop");
}
_root.level.AddPoints(10);
_root.level.ShowEarnedPoints(_local3._x, _local3._y, "+10", _local3.ballColor);
_local5.balls.splice(_local4, 1);
}
_local4--;
}
}
};
Symbol 360 MovieClip [BoomEffect] Frame 17
for (var b in _root.level.ballLines) {
_root.level.ballLines[b].CheckSnap();
}
unloadMovie (this);
Symbol 457 MovieClip [White] Frame 1
stop();
Symbol 457 MovieClip [White] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 457 MovieClip [White] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 554 MovieClip [Black] Frame 1
stop();
Symbol 554 MovieClip [Black] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 554 MovieClip [Black] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 651 MovieClip [Blue] Frame 1
stop();
Symbol 651 MovieClip [Blue] Frame 50
play();
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 651 MovieClip [Blue] Frame 56
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 652 MovieClip [EarnPoints] Frame 1
function TransformMyColor(displayColor, movieClip_mc) {
var _local1;
switch (displayColor) {
case "Blue" :
_local1 = new flash.geom.ColorTransform(0, 0, 1, 1, 0, 0, 0, 0);
break;
case "Red" :
_local1 = new flash.geom.ColorTransform(1, 0, 0, 1, 0, 0, 0, 0);
break;
case "Yellow" :
_local1 = new flash.geom.ColorTransform(1, 0.8, 0.23, 1, 0, 0, 0, 0);
break;
case "Purple" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 0, 0);
break;
case "Black" :
_local1 = new flash.geom.ColorTransform(0.66, 0.66, 0.66, 1, 0, 0, 0, 0);
break;
case "Green" :
_local1 = new flash.geom.ColorTransform(0.24, 0.78, 0.28, 1, 0, 0, 0, 0);
}
if (displayColor != "White") {
var _local2 = new flash.geom.Transform(movieClip_mc);
_local2.colorTransform = _local1;
}
}
stop();
var textholder_mc = this.createEmptyMovieClip("textholder_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var previousEndX = 0;
var previousEndY = 0;
var lines = displayText.split("\r");
l = 0;
while (l < lines.length) {
var line = lines[l];
previousEndX = 0;
var lineHolder = textholder_mc.createEmptyMovieClip("line_holder" + _root.getNextHighestDepth(), textholder_mc.getNextHighestDepth());
var i = 0;
while (i < line.length) {
var thechar = line.charCodeAt(i);
if ((thechar != 13) && (thechar != 32)) {
var myChr_mc = lineHolder.attachMovie("code_" + thechar, ("number_" + i) + _root.getNextHighestDepth(), lineHolder.getNextHighestDepth());
myChr_mc._x = previousEndX;
myChr_mc._Y = previousEndY;
previousEndX = (myChr_mc._x + myChr_mc._width) - 1;
TransformMyColor(displayColor, myChr_mc);
} else if (thechar == 32) {
previousEndX = previousEndX + 8;
}
i++;
}
lineHolder._x = -(lineHolder._width / 2);
previousEndY = previousEndY + 20;
l++;
}
var tween = (new mx.transitions.Tween(textholder_mc, "_y", mx.transitions.easing.None.easeInOut, -26, -120, 2, true));
tween.onMotionFinished = function () {
this.obj.killMovieClip();
};
Symbol 655 MovieClip Frame 21
stop();
Symbol 682 MovieClip [LoadLevel] Frame 1
function LoadLevelData() {
var _local2 = new LoadVars();
var _local4 = new Utility();
var _local3 = _local4.GetLevelDataClass(_root.level.backgroundScreen);
_local2.decode(_local3.getLevelText());
InitLevel(_local2);
}
function Failed() {
var _local3 = new Utility();
var _local2 = _root.attachMovie("Alert", "Alert_mc", _root.getNextHighestDepth());
_local3.CenterMovieClip(_local2);
_local2.alert = "\nCould not connect to blackbeardsisland.com. Please make sure you are connected to the internet and click continue.";
_local2.onUnload = function () {
LoadLevelData();
};
}
function InitLevel(load_lv) {
var _local8 = new Array();
var _local12 = new Object();
var _local13 = load_lv.paths.split("|");
var _local5 = 0;
while (_local5 < _local13.length) {
var _local3 = _local13[_local5].split(",");
var _local6 = Number(_local3[0]);
if (!isNaN(_local3[2])) {
if (_local12[_local6] == undefined) {
var _local15 = new Path();
_local12[_local6] = 1;
_local8.push(_local15);
}
var _local10 = _local8[_local6];
_local10.AddPoint((_local3[1] + ",") + _local3[2]);
}
_local5++;
}
for (var _local15 in _local8) {
_root.level.ballLines[Number(_local15)].path = _local8[_local15];
_root.level.ballLines[Number(_local15)].CalculatePoints();
}
cannons = load_lv.cannons.split("|");
var _local9 = new Array(cannons.length);
var _local14 = 0;
while (_local14 < cannons.length) {
var _local4 = cannons[_local14].split(",");
if (!isNaN(_local4[2])) {
_local9[_local4[3]] = cannons[_local14];
}
_local14++;
}
_local14 = 0;
while (_local14 < _local9.length) {
var _local4 = _local9[_local14].split(",");
if (!isNaN(_local4[2])) {
_root.level.AddCannon(_local4[0], _local4[1], _local4[2]);
}
_local14++;
}
var _local11 = load_lv.coins.split("|");
for (_local14 in _local11) {
var _local7 = _local11[_local14].split(",");
if (!isNaN(_local7[_local14])) {
_root.level.AddCoinLocation(_local7[0], _local7[1]);
}
}
_root.level.SwitchToCannon(0);
unloadMovie (this);
}
var levelId;
_root.level.cannons = new Array();
_root.level.coinLocations = new Array();
LoadLevelData();
Symbol 696 MovieClip [Alert] Frame 1
btn_lose_ok.onRelease = function () {
this._parent.unloadMovie();
};
Symbol 711 MovieClip [GameOver] Frame 1
function SendSuccess(totalRank, prevTotalRank) {
this.scorePerGameRank = totalRank;
this.previousScorePerGameRank = prevTotalRank;
gotoAndStop (30);
}
function Failed() {
var _local3 = new Utility();
var _local2 = _root.attachMovie("Alert", "Alert_mc", _root.getNextHighestDepth());
_local3.CenterMovieClip(_local2);
_local2.alert = "\nCould not connect to blackbeardsisland.com. Please make sure you are connected to the internet and click continue.";
_local2.onUnload = function () {
SendResults();
};
}
function SendResults() {
hourGlassOn = true;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
hourGlassOn = false;
if (success) {
SendSuccess(result_lv.sgr, result_lv.psgr);
} else {
Failed();
}
};
var _local3 = new LoadVars();
_local3.info = utility.clean((((((((((((_root.serverPass + ",") + _root.sessionId) + ",") + _root.gamePoints) + ",") + _root.level.levelId) + ",") + this.maxChain) + ",") + this.maxCombo) + ",") + this.combos);
_local3.sendAndLoad((_root.baseURL + "lose_results.php?ck=") + new Date().getTime(), result_lv, "POST");
}
stop();
var utility = new Utility();
if (_root.isRegistered) {
SendResults();
} else {
gotoAndStop (45);
}
Symbol 711 MovieClip [GameOver] Frame 30
stop();
mainMenu_btn.onRelease = function () {
_root.level.GameOverDialogClosed_EndGame();
this._parent.removeMovieClip();
};
continue_btn.onRelease = function () {
_root.level.GameOverDialogClosed_ContinueGame();
this._parent.removeMovieClip();
};
var utility = new Utility();
totalPoints_txt.text = _root.gamePoints;
totalRank_txt.text = "#" + String(this.scorePerGameRank);
totalRank_txt.autoSize = true;
totalRank_txt._x = 310 - totalRank_txt._width;
gpRankUp_txt._visible = false;
if (this.scorePerGameRank > this.previousScorePerGameRank) {
gpRankUp_txt._x = totalRank_txt._x + totalRank_txt._width;
gpRankUp_txt._visible = true;
}
Symbol 711 MovieClip [GameOver] Frame 45
totalPoints_txt.text = _root.gamePoints;
mainMenu_btn.onRelease = function () {
_root.level.GameOverDialogClosed_EndGame();
this._parent.removeMovieClip();
};
continue_btn.onRelease = function () {
_root.level.GameOverDialogClosed_ContinueGame();
this._parent.removeMovieClip();
};
Symbol 714 MovieClip [YouLose] Frame 1
if (_root.lives > 1) {
livesLeft_txt.text = _root.lives + " Lives Left!";
} else {
livesLeft_txt.text = "Last Life!";
}
btn_lose_ok.onRelease = function () {
this._parent.unloadMovie();
};
Symbol 755 MovieClip [Profile] Frame 1
function LoginSuccess(sessionId, userName, email, pirateFlag, topLevel, isGold) {
_root.sessionId = sessionId;
_root.userName = userName;
_root.userPirateFlag = pirateFlag;
_root.isRegistered = true;
_root.isGold = ((isGold == "1") ? true : false);
_root.topLevel = topLevel;
_root.email = email;
if (chk_Remember.checked == true) {
blackbeardData.data.Name = txt_userName.text;
blackbeardData.data.Password = txt_password.text;
} else {
blackbeardData.data.Name = "";
blackbeardData.data.Password = "";
}
unloadMovie (this);
}
function LoginFailed(reason) {
txt_LoginName.text = reason;
}
function ConnectFailed() {
var _local3 = this.attachMovie("Alert", "Alert_mc", _root.getNextHighestDepth());
utility.CenterMovieClip(_local3);
_local3.alert = "\nCould not connect to blackbeardsisland.com. Please make sure you are connected to the internet and click continue.";
_local3.onUnload = function () {
Login(txt_userName.text, txt_password.text);
};
}
function Login(userName, pass) {
hourGlassOn = true;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
hourGlassOn = false;
if (success) {
if (result_lv.login == "true") {
LoginSuccess(result_lv.sessionId, result_lv.userName, result_lv.email, result_lv.pirateFlag, Number(result_lv.topLevel), result_lv.isGold);
} else {
LoginFailed("Login failed. Please check your username and password.");
}
} else {
ConnectFailed();
}
};
var _local2 = new LoadVars();
_local2.info = utility.clean((((_root.serverPass + ",") + userName) + ",") + pass);
_local2.sendAndLoad((_root.baseURL + "login.php?ck=") + new Date().getTime(), result_lv, "POST");
}
var utility = new Utility();
var blackbeardData = SharedObject.getLocal("blackbeardData");
txt_userName.text = blackbeardData.data.Name;
txt_password.text = blackbeardData.data.Password;
chk_Remember.check_x_mc._visible = true;
chk_Remember.checked = true;
if (blackbeardData.data.AnimateBalls == undefined) {
_root.AnimateBalls = false;
} else {
_root.AnimateBalls = Boolean(blackbeardData.data.AnimateBalls);
}
if (blackbeardData.data.TopLevel == undefined) {
_root.topLevel = 0;
} else {
_root.topLevel = Number(blackbeardData.data.TopLevel);
}
if (blackbeardData.data.UserPirateFlag == undefined) {
_root.userPirateFlag = "calicojack";
} else {
_root.userPirateFlag = String(blackbeardData.data.UserPirateFlag);
}
selectedFlag_mc.flagName = "calicojack";
var hourGlassOn = false;
calicojack.onRelease = (blackbeard.onRelease = (bonnet.onRelease = (condent.onRelease = (dulaien.onRelease = (england.onRelease = (every.onRelease = (low.onRelease = (tewdey.onRelease = (worleys.onRelease = function () {
selectedFlag_mc._x = this._x - 3;
selectedFlag_mc._y = this._y - 3;
selectedFlag_mc.flagName = this._name;
})))))))));
this.onEnterFrame = function () {
if (hourGlassOn == true) {
hourglass_mc._visible = true;
hourglass_mc._x = _xmouse - 4;
hourglass_mc._y = _ymouse - 8;
} else {
hourglass_mc._visible = false;
}
};
start_btn.onRelease = function () {
_root.sessionId = sessionId;
_root.userName = "Guest";
_root.userPirateFlag = selectedFlag_mc.flagName;
_root.isRegistered = false;
_root.isGold = false;
_root.topLevel = 0;
_root.email = "";
unloadMovie (this._parent);
};
logIn_btn.onRelease = function () {
Login(txt_userName.text, txt_password.text);
};
forgot_btn.onRelease = function () {
utility.ToggleEnabled(this._parent, false);
var _local3 = this._parent.attachMovie("ForgotPassword", "forgot_password_mc", _root.getNextHighestDepth());
utility.CenterMovieClip(_local3);
_local3.onUnload = function () {
utility.ToggleEnabled(this._parent, true);
};
};
Symbol 775 MovieClip [LevelCompleteNotRegistered] Frame 1
var utility = new Utility();
ok_complete_btn.onRelease = function () {
_root.level.LevelCompleteDialogClosed();
this._parent.removeMovieClip();
};
buyNow_btn.onRelease = function () {
getURL (_root.baseRootURL + "buynow.php", "_self");
};
register_btn.onRelease = function () {
utility.EnableButtons(this._parent, false);
var _local4 = _root.attachMovie("Register", "Register_mc", _root.getNextHighestDepth());
_local4.onUnload = function () {
var _local2 = _root.attachMovie("LevelComplete", "LevelComplete2_mc", _root.getNextHighestDepth());
_local2._x = 0;
_local2._y = 0;
_local2.totalTime = totalTime;
_local2.levelTime = levelTime;
_local2.levelPoints = levelPoints;
_local2.maxChain = maxChain;
_local2.maxCombo = maxCombo;
_local2.combos = combos;
_local2.coins = coins;
_local2.onUnload = function () {
unloadMovie (_root.LevelComplete_mc);
};
};
};
levelName_txt.text = "Level " + _root.level.levelName;
levelTime_txt.text = utility.FormatTime(this.levelTime);
levelPoints_txt.text = this.levelPoints;
totalPoints_txt.text = _root.gamePoints;
maxChain_txt.text = this.maxChain;
maxCombo_txt.text = this.maxCombo;
combos_txt.text = this.combos;
coins_txt.text = this.coins;
levelTime_txt.autoSize = true;
levelPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
maxChain_txt.autoSize = true;
maxCombo_txt.autoSize = true;
combos_txt.autoSize = true;
blackbeardSays_txt.text = _root.level.BlackbeardSays();
Symbol 827 MovieClip [LevelComplete] Frame 1
function SendSuccess(totalRank, levelRank, levelTimeRank, prevTotalRank, prevLevelRank, prevLevelTimeRank, bestGP, bestLP, bestLT) {
this.scorePerLevelRank = levelRank;
this.scorePerGameRank = totalRank;
this.timePerLevelRank = levelTimeRank;
this.previousScorePerLevelRank = prevLevelRank;
this.previousScorePerGameRank = prevTotalRank;
this.previousTimePerLevelRank = prevLevelTimeRank;
this.bestGP = bestGP;
this.bestLP = bestLP;
this.bestLT = bestLT;
if (_root.isGold) {
gotoAndStop ("Gold");
} else {
gotoAndStop ("NotGold");
}
}
function SendFail() {
var _local3 = this.attachMovie("Alert", "Alert_mc", _root.getNextHighestDepth());
utility.CenterMovieClip(_local3);
_local3.alert = "\nCould not connect to blackbeardsisland.com. Please make sure you are connected to the internet and click continue.";
_local3.onUnload = function () {
SendResults();
};
}
function SendResults() {
hourGlassOn = true;
var result_lv = new LoadVars();
result_lv.onLoad = function (success) {
hourGlassOn = false;
if (success) {
SendSuccess(result_lv.sgr, result_lv.slr, result_lv.tlr, result_lv.psgr, result_lv.pslr, result_lv.ptlr, result_lv.bGP, result_lv.bLP, result_lv.bLT);
} else {
SendFail("Could not connect to server, please try again later");
}
};
var _local3 = new LoadVars();
_local3.info = utility.clean((((((((((((((((((_root.serverPass + ",") + _root.sessionId) + ",") + _root.gamePoints) + ",") + this.totalTime) + ",") + _root.level.levelId) + ",") + this.levelTime) + ",") + this.levelPoints) + ",") + this.maxChain) + ",") + this.maxCombo) + ",") + this.combos);
_local3.sendAndLoad((_root.baseURL + "results.php?ck=") + new Date().getTime(), result_lv, "POST");
}
var utility = new Utility();
SendResults();
stop();
Symbol 827 MovieClip [LevelComplete] Frame 30
btn_ok_complete.onRelease = function () {
_root.level.LevelCompleteDialogClosed();
this._parent.removeMovieClip();
};
var utility = new Utility();
blackbeardSays_txt.text = _root.level.BlackbeardSays();
levelName_txt.text = "Level " + _root.level.levelName;
levelTime_txt.text = utility.FormatTime(this.levelTime);
levelPoints_txt.text = this.levelPoints;
totalPoints_txt.text = _root.gamePoints;
maxChain_txt.text = this.maxChain;
maxCombo_txt.text = this.maxCombo;
combos_txt.text = this.combos;
coins_txt.text = this.coins;
bestTotalPoints_txt.text = this.bestGP;
bestLevelPoints_txt.text = this.bestLP;
bestLevelTime_txt.text = utility.FormatTime(this.bestLT);
levelRank_txt.text = "# " + String(this.scorePerLevelRank);
totalRank_txt.text = "#" + String(this.scorePerGameRank);
levelTimeRank_txt.text = "# " + String(this.timePerLevelRank);
levelTime_txt.autoSize = true;
levelPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
maxChain_txt.autoSize = true;
maxCombo_txt.autoSize = true;
combos_txt.autoSize = true;
levelRank_txt.autoSize = true;
totalRank_txt.autoSize = true;
levelTimeRank_txt.autoSize = true;
totalRank_txt._x = 355.5 - totalRank_txt._width;
newGPPB_txt._visible = false;
newLPPB_txt._visible = false;
newLTPB_txt._visible = false;
gpRankUp_txt._visible = false;
lpRankUp_txt._visible = false;
ltRankUp_txt._visible = false;
if (this.bestGP == _root.gamePoints) {
newGPPB_txt._x = totalPoints_txt._x + totalPoints_txt._width;
newGPPB_txt._visible = true;
}
if (this.bestLP == this.levelPoints) {
newLPPB_txt._x = levelPoints_txt._x + levelPoints_txt._width;
newLPPB_txt._visible = true;
}
if (this.bestLT == this.levelTime) {
newLTPB_txt._x = levelTime_txt._x + levelTime_txt._width;
newLTPB_txt._visible = true;
}
if (this.scorePerGameRank > this.previousScorePerGameRank) {
gpRankUp_txt._x = totalRank_txt._x + totalRank_txt._width;
gpRankUp_txt._visible = true;
}
if (this.scorePerLevelRank > this.previousScorePerLevelRank) {
lpRankUp_txt._x = levelRank_txt._x + levelRank_txt._width;
lpRankUp_txt._visible = true;
}
if (this.previousTimePerLevelRank > this.timePerLevelRank) {
ltRankUp_txt._x = levelTimeRank_txt._x + levelTimeRank_txt._width;
ltRankUp_txt._visible = true;
}
Symbol 827 MovieClip [LevelComplete] Frame 60
btn_ok_complete.onRelease = function () {
_root.level.LevelCompleteDialogClosed();
this._parent.removeMovieClip();
};
buyNow_btn.onRelease = function () {
getURL (_root.baseRootURL + "buynow.php", "_self");
};
var utility = new Utility();
blackbeardSays_txt.text = _root.level.BlackbeardSays();
levelName_txt.text = "Level " + _root.level.levelName;
levelTime_txt.text = utility.FormatTime(this.levelTime);
levelPoints_txt.text = this.levelPoints;
totalPoints_txt.text = _root.gamePoints;
maxChain_txt.text = this.maxChain;
maxCombo_txt.text = this.maxCombo;
combos_txt.text = this.combos;
coins_txt.text = this.coins;
levelRank_txt.text = "# " + String(this.scorePerLevelRank);
totalRank_txt.text = "#" + String(this.scorePerGameRank);
levelTimeRank_txt.text = "# " + String(this.timePerLevelRank);
levelTime_txt.autoSize = true;
levelPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
totalPoints_txt.autoSize = true;
maxChain_txt.autoSize = true;
maxCombo_txt.autoSize = true;
combos_txt.autoSize = true;
levelRank_txt.autoSize = true;
totalRank_txt.autoSize = true;
levelTimeRank_txt.autoSize = true;
newGPPB_txt._visible = false;
newLPPB_txt._visible = false;
newLTPB_txt._visible = false;
gpRankUp_txt._visible = false;
lpRankUp_txt._visible = false;
ltRankUp_txt._visible = false;
if (this.bestGP == _root.gamePoints) {
newGPPB_txt._x = totalPoints_txt._x + totalPoints_txt._width;
newGPPB_txt._visible = true;
}
if (this.bestLP == this.levelPoints) {
newLPPB_txt._x = levelPoints_txt._x + levelPoints_txt._width;
newLPPB_txt._visible = true;
}
if (this.bestLT == this.levelTime) {
newLTPB_txt._x = levelTime_txt._x + levelTime_txt._width;
newLTPB_txt._visible = true;
}
if (this.scorePerGameRank > this.previousScorePerGameRank) {
gpRankUp_txt._x = totalRank_txt._x + totalRank_txt._width;
gpRankUp_txt._visible = true;
}
if (this.scorePerLevelRank > this.previousScorePerLevelRank) {
lpRankUp_txt._x = levelRank_txt._x + levelRank_txt._width;
lpRankUp_txt._visible = true;
}
if (this.previousTimePerLevelRank > this.timePerLevelRank) {
ltRankUp_txt._x = levelTimeRank_txt._x + levelTimeRank_txt._width;
ltRankUp_txt._visible = true;
}
Symbol 885 MovieClip [BoomBall] Frame 1
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 15
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 30
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 45
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 100
if (this.goAway == undefined) {
this.gotoAndPlay("flash");
} else {
this.gotoAndPlay("disappear");
}
Symbol 885 MovieClip [BoomBall] Frame 101
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 115
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 130
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 145
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 160
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 174
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 189
_root.level.SaturateBall(this._parent);
Symbol 885 MovieClip [BoomBall] Frame 204
this._parent.filters = new Array();
Symbol 885 MovieClip [BoomBall] Frame 218
this._parent.powerUp = undefined;
this.removeMovieClip();
Symbol 898 MovieClip [SlowDownBall] Frame 1
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 15
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 30
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 45
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 100
if (this.goAway == undefined) {
this.gotoAndPlay("flash");
} else {
this.gotoAndPlay("disappear");
}
Symbol 898 MovieClip [SlowDownBall] Frame 101
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 115
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 130
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 145
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 159
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 173
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 188
_root.level.SaturateBall(this._parent);
Symbol 898 MovieClip [SlowDownBall] Frame 203
this._parent.filters = new Array();
Symbol 898 MovieClip [SlowDownBall] Frame 217
this._parent.powerUp = undefined;
this.removeMovieClip();
Symbol 909 MovieClip [BackwardsBall] Frame 1
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 15
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 30
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 45
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 100
if (this.goAway == undefined) {
this.gotoAndPlay("flash");
} else {
this.gotoAndPlay("disappear");
}
Symbol 909 MovieClip [BackwardsBall] Frame 101
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 115
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 130
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 145
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 159
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 173
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 188
_root.level.SaturateBall(this._parent);
Symbol 909 MovieClip [BackwardsBall] Frame 203
this._parent.filters = new Array();
Symbol 909 MovieClip [BackwardsBall] Frame 217
this._parent.powerUp = undefined;
this.removeMovieClip();
Symbol 1202 MovieClip Frame 1
function Check() {
if (checked == false) {
checked = true;
check_x_mc._visible = true;
} else {
checked = false;
check_x_mc._visible = false;
}
}
chk_box_mc.onRelease = function () {
Check();
};
stop();
Symbol 1208 MovieClip [SliderH] Frame 1
function setTheValue(val) {
trace(val);
trace(max);
trace(min);
if (val != undefined) {
box_mc._x = max - ((max - min) / val);
}
}
var val = 0;
var max = 0;
var min = 0;
box_mc.onPress = function () {
startDrag (this, false, 1, -1, 200, -1);
};
box_mc.onRelease = (box_mc.onReleaseOutside = function () {
stopDrag();
});
this.onEnterFrame = function () {
var _local3 = box_mc._x / 2;
var _local2 = val;
val = box_mc._x;
if (_local2 != val) {
this._parent.ChangeSlider(this);
}
};
line_mc.onPress = function () {
trace("hi");
box_mc._x = this._xmouse;
this._parent.ChangeSlider(this);
};
Symbol 1209 MovieClip [Menu] Frame 1
function ChangeSlider(slider_mc) {
switch (slider_mc._name) {
case "slider_music" :
_root.musicVolume = slider_mc.box_mc._x / 2;
var _local3 = new Sound(_root.music_mc);
_local3.setVolume(_root.musicVolume);
break;
case "slider_soundEffects" :
_root.soundEffectsVolume = slider_mc.box_mc._x / 2;
var _local4 = new Sound(_root.soundEffectsHolder_mc);
_local4.setVolume(_root.soundEffectsVolume);
break;
case "slider_Quality" :
UpdateQuality(slider_mc.box_mc._x / 2);
}
}
function QualityAsNumber() {
switch (_root._quality.toLowerCase()) {
case "low" :
return(1);
case "medium" :
return(2);
case "high" :
return(3);
}
}
function UpdateQuality(i) {
trace(i);
if (i < 25) {
_root._quality = "LOW";
} else if (i < 75) {
_root._quality = "MEDIUM";
} else {
_root._quality = "HIGH";
}
}
var utility = new Utility();
trace("onload");
if (!_root.isRegistered) {
yourAccount_btn._visible = false;
howtoplay_btn._x = quitgame_btn._x;
}
slider_music.val = _root.musicVolume;
slider_music.box_mc._x = _root.musicVolume * 2;
slider_soundEffects.val = _root.musicVolume;
slider_soundEffects.box_mc._x = _root.soundEffectsVolume * 2;
switch (QualityAsNumber()) {
case 1 :
slider_Quality.val = 0;
slider_Quality.box_mc._x = 0;
break;
case 2 :
slider_Quality.val = 100;
slider_Quality.box_mc._x = 100;
break;
case 3 :
slider_Quality.val = 200;
slider_Quality.box_mc._x = 200;
}
slider_Quality.changeHandler = function () {
UpdateQuality(Math.round(slider_Quality.value));
};
if (_root.AnimateBalls == true) {
chk_Animate.check_x_mc._visible = true;
chk_Animate.checked = true;
} else {
chk_Animate.check_x_mc._visible = false;
chk_Animate.checked = false;
}
x_btn.onRelease = (returntogame_btn.onRelease = function () {
_root.AnimateBalls = chk_Animate.checked;
var _local4 = SharedObject.getLocal("blackbeardData");
_local4.data.AnimateBalls = _root.AnimateBalls;
if (!_root.AnimateBalls) {
for (line in _root.level.ballLines) {
var _local3 = _root.level.ballLines[line];
for (ball in _local3.balls) {
_local3.balls[ball].gotoAndStop("face");
}
}
}
unloadMovie (this._parent);
});
this.onEnterFrame = function () {
if (!isNaN(slider_music.value)) {
var _local2 = new Sound(_root.music_mc);
_root.musicVolume = slider_music.value;
_local2.setVolume(_root.musicVolume);
}
if (!isNaN(slider_soundEffects.value)) {
var _local3 = new Sound(_root.soundEffectsHolder_mc);
_root.soundEffectsVolume = slider_soundEffects.value;
_local3.setVolume(_root.soundEffectsVolume);
}
};
quitgame_btn.onRelease = function () {
_root.level.EndGame();
_root.level = new Level();
_root.gotoAndStop("titleScreen");
removeMovieClip(this._parent);
};
howtoplay_btn.onRelease = function () {
utility.EnableButtons(this._parent, false);
var _local2 = this._parent.attachMovie("Tutorial", "Tutorial" + this._parent.getNextHighestDepth(), this._parent.getNextHighestDepth());
_local2.onUnload = function () {
utility.EnableButtons(this._parent, true);
this.removeMovieClip();
};
};
yourAccount_btn.onRelease = function () {
utility.EnableButtons(this._parent, false);
var _local2 = this._parent.attachMovie("EditProfile", "EditProfile" + this._parent.getNextHighestDepth(), this._parent.getNextHighestDepth());
_local2.onUnload = function () {
utility.EnableButtons(this._parent, true);
this.removeMovieClip();
};
};
Symbol 1213 MovieClip [cannon] Frame 1
stop();
Symbol 1213 MovieClip [cannon] Frame 20
gotoAndStop (1);
Symbol 1217 MovieClip [cannon_top] Frame 1
stop();
Symbol 1217 MovieClip [cannon_top] Frame 20
gotoAndStop (1);
Symbol 1222 MovieClip [Purple] Frame 1
stop();
Symbol 1222 MovieClip [Purple] Frame 2
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 1222 MovieClip [Purple] Frame 8
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 1229 MovieClip Frame 1
stop();
Symbol 1229 MovieClip Frame 2
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 1229 MovieClip Frame 8
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 1234 MovieClip Frame 1
stop();
Symbol 1234 MovieClip Frame 2
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 1234 MovieClip Frame 8
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 1238 MovieClip Frame 1
stop();
Symbol 1238 MovieClip Frame 2
var explosion = _root.attachMovie("explode", "explode" + this._name, _root.getNextHighestDepth());
explosion._x = this._x;
explosion._y = this._y;
explosion.ballColor = this.ballColor;
Symbol 1238 MovieClip Frame 8
if ((this.snapMe == true) || (!isNaN(this.newPoints))) {
_root.level.ExplodeBall(this.snapMe, this.ballLineIndex, this.newPoints, this.pointsDisplay, this.ballColor, this._x, this._y);
}
this.removeMovieClip();
Symbol 1244 MovieClip [target_cursor] Frame 1
stop();
Symbol 1244 MovieClip [target_cursor] Frame 2
stop();
Symbol 1254 MovieClip [Tutorial] Frame 1
function AddBallToCannon(cannon, ballColor) {
cannon.ball = this.attachMovie(ballColor, "ball_mc" + this.getNextHighestDepth(), this.getNextHighestDepth());
cannon.out = false;
cannon.ball._x = cannon._x;
cannon.ball._y = cannon._y;
cannon.swapDepths(cannon.ball);
cannon.ball.ballColor = ballColor;
}
var utility = new Utility();
if (red1_mc == undefined) {
var red1 = this.attachMovie("Red", "red1_mc", this.getNextHighestDepth());
var red2 = this.attachMovie("Red", "red2_mc", this.getNextHighestDepth());
red1.ballColor = "Red";
red2.ballColor = "Red";
}
this.onEnterFrame = function () {
if (cannon1_mc.ball == undefined) {
AddBallToCannon(cannon1_mc, "Red");
}
if (cannon2_mc.ball == undefined) {
AddBallToCannon(cannon2_mc, "Yellow");
}
var _local3 = utility.GetAngle(cannon1_mc._x, cannon1_mc._y, cursor_mc._x, cursor_mc._y);
cannon1_mc._rotation = _local3;
cannon1_top_mc._rotation = _local3;
if (cannon1_mc.ball && (!cannon1_mc.out)) {
var _local2 = {x:-30.5 + (_root.ballRadius * 2), y:-22};
cannon1_mc.localToGlobal(_local2);
cannon1_mc.ball._x = _local2.x;
cannon1_mc.ball._y = _local2.y;
cannon1_mc.ball._rotation = cannon1_mc._rotation;
}
if (cannon2_mc.ball && (!cannon2_mc.out)) {
var _local2 = {x:-30.5 + (_root.ballRadius * 2), y:-22};
cannon2_mc.localToGlobal(_local2);
cannon2_mc.ball._x = _local2.x;
cannon2_mc.ball._y = _local2.y;
cannon2_mc.ball._rotation = cannon2_mc._rotation;
}
};
ok_btn.onRelease = function () {
unloadMovie (this._parent);
};
Symbol 1254 MovieClip [Tutorial] Frame 56
cannon1_mc.play();
cannon1_top_mc.play();
unloadMovie (cannon1_mc.ball);
Symbol 1254 MovieClip [Tutorial] Frame 90
AddBallToCannon(cannon1_mc, "Red");
Symbol 1254 MovieClip [Tutorial] Frame 107
red1_mc.play();
red2_mc.play();
fireball1_mc.play();
Symbol 1254 MovieClip [Tutorial] Frame 248
this.onEnterFrame = function () {
var _local3 = utility.GetAngle(cannon2_mc._x, cannon2_mc._y, cursor_mc._x, cursor_mc._y);
cannon2_mc._rotation = _local3;
cannon2_top_mc._rotation = _local3;
if (cannon2_mc.ball && (!cannon2_mc.out)) {
var _local2 = {x:-30.5 + (_root.ballRadius * 2), y:-22};
cannon2_mc.localToGlobal(_local2);
cannon2_mc.ball._x = _local2.x;
cannon2_mc.ball._y = _local2.y;
cannon2_mc.ball._rotation = cannon2_mc._rotation;
}
};
Symbol 1254 MovieClip [Tutorial] Frame 364
unloadMovie (cannon2_mc.ball);
cannon2_mc.play();
cannon2_top_mc.play();
Symbol 1254 MovieClip [Tutorial] Frame 392
AddBallToCannon(cannon2_mc, "Yellow");
Symbol 1254 MovieClip [Tutorial] Frame 402
yellowboom1_mc.play();
yellowboom2_mc.play();
yellowboom3_mc.play();
Symbol 1254 MovieClip [Tutorial] Frame 459
removeMovieClip(cannon2_mc.ball);
removeMovieClip(cannon1_mc.ball);
removeMovieClip(cannon1_mc);
removeMovieClip(cannon1_top_mc);
removeMovieClip(cannon2_mc);
removeMovieClip(cannon2_top_mc);
Symbol 1286 MovieClip [piratecoin_mc] Frame 15
stop();
Symbol 1286 MovieClip [piratecoin_mc] Frame 30
this.addTime = undefined;
this.removeMovieClip();
Symbol 1286 MovieClip [piratecoin_mc] Frame 45
this.addTime = undefined;
this.removeMovieClip();
Symbol 1365 MovieClip Frame 92
stop();
Symbol 1366 MovieClip [StageComplete] Frame 1
stop();
this.onEnterFrame = function () {
if (sc_mc._currentframe == sc_mc._totalframes) {
play();
}
};
Symbol 1366 MovieClip [StageComplete] Frame 60
_root.level.ShowLevelCompleteDialog();
this.removeMovieClip();
Symbol 1443 MovieClip [PreviewLevel] Frame 1
stop();
Symbol 1453 MovieClip [overworld] Frame 1
trace(highLevel);
if (highLevel != "1-1") {
stop();
MochiAd.showTimedAd({id:"0e1adff895b506c1", res:"711x400", clip:this, ad_msec:5000});
}
Symbol 1453 MovieClip [overworld] Frame 2
function DimMovieClip(movieClip_mc) {
var _local4 = -1;
var _local1 = new Array();
_local1 = _local1.concat([1, 0, 0, 0, -150]);
_local1 = _local1.concat([0, 1, 0, 0, -150]);
_local1 = _local1.concat([0, 0, 1, 0, -150]);
_local1 = _local1.concat([0, 0, 0, 1, 0]);
var _local3 = new flash.filters.ColorMatrixFilter(_local1);
movieClip_mc.filters = new Array(_local3);
movieClip_mc.dimmed = true;
movieClip_mc.enabled = false;
}
function GlowMovieClip(movieClip_mc) {
var _local4 = 3394815 /* 0x33CCFF */;
var _local10 = 0.8;
var _local7 = 25;
var _local6 = 25;
var _local8 = 4;
var _local2 = 1;
var _local5 = false;
var _local9 = false;
var _local3 = new flash.filters.GlowFilter(_local4, _local10, _local7, _local6, _local8, _local2, _local5, _local9);
var _local1 = new Array();
_local1.push(_local3);
movieClip_mc.filters = _local1;
}
function NoFilters(movieClip_mc) {
var _local1 = new Array();
movieClip_mc.filters = _local1;
}
function SetSubHeaderText(s) {
levelSubHeader_txt.text = s;
levelSubHeader2_txt.text = s;
}
function SetHeaderText(s) {
levelName_txt.text = s;
levelName2_txt.text = s;
}
function ShowLevelPreview(levelName) {
if (levelName != _root.overWorldLvlName) {
_root.overWorldLvlName = levelName;
var _local4 = new mx.transitions.Tween(previewLevel2_mc.preview_mc, "_alpha", mx.transitions.easing.Regular.easeInOut, 100, 10, 0.25, true);
new mx.transitions.Tween(previewLevel_mc.preview_mc, "_alpha", mx.transitions.easing.Regular.easeInOut, 100, 10, 0.25, true);
if (_root.level == undefined) {
_root.level = new Level(_root);
}
var _local2 = _root.overWorldLvlName.split("-");
_root.level.stageIndex = Number(_local2[0]) - 1;
_root.level.levelIndex = Number(_local2[1]) - 1;
_local4.onMotionFinished = function () {
var _local2 = new Utility();
levels.InitLevel(_root.level);
var _local7 = previewLevel_mc.attachMovie(_root.level.backgroundScreen, "preview_mc", previewLevel_mc.preview_mc.getDepth(), {_x:previewLevel_mc.preview_mc._x, _y:previewLevel_mc.preview_mc._y, _width:previewLevel_mc.preview_mc._width, _height:previewLevel_mc.preview_mc._height});
previewLevel_mc.banner_txt.text = _local2.replace(_root.level.backgroundScreen, "_", " ");
previewLevel_mc.banner_txt.autoSize = "center";
if (previewLevel_mc.banner_txt._height < 20) {
previewLevel_mc.banner_txt._y = -240.75;
} else {
previewLevel_mc.banner_txt._y = -252.75;
}
new mx.transitions.Tween(previewLevel_mc.preview_mc, "_alpha", mx.transitions.easing.Regular.easeInOut, 10, 100, 0.25, true);
var _local3 = previewLevel2_mc.attachMovie(_root.level.backgroundScreen, "preview_mc", previewLevel2_mc.preview_mc.getDepth(), {_x:previewLevel2_mc.preview_mc._x, _y:previewLevel2_mc.preview_mc._y, _width:previewLevel2_mc.preview_mc._width, _height:previewLevel2_mc.preview_mc._height});
previewLevel2_mc.banner_txt.text = _local2.replace(_root.level.backgroundScreen, "_", " ");
previewLevel2_mc.banner_txt.autoSize = "center";
if (previewLevel2_mc.banner_txt._height < 20) {
previewLevel2_mc.banner_txt._y = -123.75;
} else {
previewLevel2_mc.banner_txt._y = -133.75;
}
new mx.transitions.Tween(previewLevel2_mc.preview_mc, "_alpha", mx.transitions.easing.Regular.easeInOut, 10, 100, 0.25, true);
};
}
}
function DoCloud1(startHalfway) {
var _local2 = new Utility();
this.clouds_mc._width = _local2.randRange(400, 1112);
var _local5;
var _local3;
if (startHalfway) {
_local3 = _local2.randRange(15, 30);
_local5 = (1422 - this.clouds_mc._width) / 2;
} else {
_local3 = _local2.randRange(30, 60);
_local5 = -this.clouds_mc._width;
}
var _local4 = _local2.randRange(-70, 104);
var _local7 = 1422;
var _local6 = _local2.randRange(-200, _local4);
var _local8 = new mx.transitions.Tween(this.clouds_mc, "_x", mx.transitions.easing.None.easeInOut, _local5, _local7, _local3, true);
var _local9 = new mx.transitions.Tween(this.clouds_mc, "_y", mx.transitions.easing.None.easeInOut, _local4, _local6, _local3, true);
_local8.onMotionFinished = function () {
DoCloud1(false);
};
}
function DoCloud2() {
var _local2 = new Utility();
this.clouds_mc._width = _local2.randRange(400, 1112);
var _local7;
var _local3;
_local3 = _local2.randRange(30, 60);
_local7 = -this.clouds_mc._width;
var _local4 = _local2.randRange(-70, 104);
var _local6 = 1422;
var _local5 = _local2.randRange(-200, _local4);
var _local8 = new mx.transitions.Tween(this.clouds2_mc, "_x", mx.transitions.easing.None.easeInOut, _local7, _local6, _local3, true);
var _local9 = new mx.transitions.Tween(this.clouds2_mc, "_y", mx.transitions.easing.None.easeInOut, _local4, _local5, _local3, true);
_local8.onMotionFinished = function () {
DoCloud2();
};
}
function DoCloud3() {
var _local2 = new Utility();
this.clouds_mc._width = _local2.randRange(400, 1112);
var _local7;
var _local3;
_local3 = _local2.randRange(60, 90);
_local7 = -this.clouds_mc._width;
var _local4 = _local2.randRange(-70, 104);
var _local6 = 1422;
var _local5 = _local2.randRange(-200, _local4);
var _local8 = new mx.transitions.Tween(this.clouds3_mc, "_x", mx.transitions.easing.None.easeInOut, _local7, _local6, _local3, true);
var _local9 = new mx.transitions.Tween(this.clouds3_mc, "_y", mx.transitions.easing.None.easeInOut, _local4, _local5, _local3, true);
_local8.onMotionFinished = function () {
DoCloud3();
};
}
function DoClouds() {
DoCloud1(true);
DoCloud2();
DoCloud3();
}
DoClouds();
var so = new Sound(_root.mapMusicHolder_mc);
so.setVolume(_root.musicVolume);
_root.sound_overworldmap.start(0, 1000);
var utility = new Utility();
var levels = new Levels(_root);
var allAvailable = false;
var highLevel_renamed = utility.replace(highLevel, "-", "_");
SetSubHeaderText("");
var topStage = 0;
if (mapMode == "selection") {
var nextHighest = Number(_root.topLevel + 1);
if (nextHighest == levels.levelList.length) {
nextHighest = Number(_root.topLevel);
allAvailable = true;
}
var levelName = levels.levelList[nextHighest];
topStage = Number(levelName.split("-")[0]);
SetHeaderText("Choose Starting Level");
if ((topStage > 9) && (levelName != "10-1")) {
this._x = -711;
} else if (levelName == "10-1") {
new mx.transitions.Tween(this, "_x", mx.transitions.easing.Regular.easeInOut, 0, -711, 1, true);
} else {
this._x = 0;
}
} else {
left_btn._visible = false;
right_btn._visible = false;
topStage = Number(highLevel.split("-")[0]);
if ((topStage > 9) && (highLevel != "10-1")) {
this._x = -711;
} else if (highLevel == "10-1") {
new mx.transitions.Tween(this, "_x", mx.transitions.easing.Regular.easeInOut, 0, -711, 1, true);
} else {
this._x = 0;
}
SetHeaderText(("Level " + highLevel) + " ");
ShowLevelPreview(highLevel);
_root.ui_header._visible = false;
}
var foundLevel = false;
var i = 0;
while (i < levels.levelList.length) {
var lvlName = utility.replace(levels.levelList[i], "-", "_");
var movieClip_mc = eval ("this.lvl_" + lvlName);
if (mapMode == "display") {
if (lvlName == highLevel_renamed) {
foundLevel = true;
GlowMovieClip(movieClip_mc);
movieClip_mc.blink = true;
} else if (foundLevel) {
DimMovieClip(movieClip_mc);
}
movieClip_mc.enabled = false;
} else {
var spl = levels.levelList[i].split("-");
if (((Number(spl[0]) < topStage) || ((Number(spl[0]) == topStage) && (Number(spl[1]) == 1))) || (allAvailable)) {
} else {
movieClip_mc.enabled = false;
DimMovieClip(movieClip_mc);
}
}
i++;
}
if ((!_root.isGold) && (mapMode == "selection")) {
var i = 8;
while (i < levels.levelList.length) {
var lvlName = utility.replace(levels.levelList[i], "-", "_");
var movieClip_mc = eval ("this.lvl_" + lvlName);
movieClip_mc.enabled = false;
DimMovieClip(movieClip_mc);
i++;
}
}
var movieClip_mc = this.11;
DimMovieClip(movieClip_mc);
var callCnt = 0;
this.onEnterFrame = function () {
var _local4 = 150;
if (highLevel_renamed == "10-1") {
_local4 = _local4 + 60;
}
if (mapMode == "display") {
for (var _local3 in this) {
if ((this[_local3].blink == true) && ((callCnt % 15) == 0)) {
if (this[_local3]._visible == true) {
this[_local3]._visible = false;
} else {
this[_local3]._visible = true;
}
}
}
if (callCnt > _local4) {
_root.ui_header._visible = true;
_root.UnPause();
_root.startFadeOutMapMusic = true;
_root.level.OverworldMapClosed();
this.removeMovieClip();
}
callCnt++;
}
};
lvl_1_1.onRollOver = function () {
if (mapMode == "selection") {
var _local2 = utility.replace(utility.replace(this._name, "_", "-"), "lvl-", "");
SetSubHeaderText(_local2);
GlowMovieClip(this);
previewLevel_mc.stop();
previewLevel_mc.gotoAndPlay(2);
ShowLevelPreview(_local2);
}
};
lvl_1_1.onRollOut = function () {
if (mapMode == "selection") {
SetSubHeaderText("");
NoFilters(this);
}
};
lvl_1_1.onRelease = function () {
if (mapMode == "selection") {
_root.ui_header._visible = true;
var _local7 = new Utility();
var _local4 = _local7.replace(this._name, "lvl_", "");
var _local3 = _local4.split("_");
var _local6 = Number(_local3[0]);
var _local5 = Number(_local3[1]);
_root.stageStart = _local6 - 1;
_root.levelStart = _local5 - 1;
_root.UnPause();
_root.startFadeOutMapMusic = true;
_root.level.OverworldMapClosed();
unloadMovie (this._parent);
}
};
var i = 1;
while (i < levels.levelList.length) {
var lvlName = utility.replace(levels.levelList[i], "-", "_");
var lvlButton = eval ("lvl_" + lvlName);
lvlButton.onRollOver = lvl_1_1.onRollOver;
lvlButton.onRelease = lvl_1_1.onRelease;
lvlButton.onRollOut = lvl_1_1.onRollOut;
i++;
}
right_btn.onRelease = function () {
new mx.transitions.Tween(this._parent, "_x", mx.transitions.easing.Regular.easeInOut, 0, -711, 1, true);
};
left_btn.onRelease = function () {
new mx.transitions.Tween(this._parent, "_x", mx.transitions.easing.Regular.easeInOut, -711, 0, 1, true);
};
stop();
Symbol 1459 MovieClip [BuyMe] Frame 1
buyNow_btn.onRelease = function () {
getURL ("http://www.blackbeardsisland.com", "_self");
};
Symbol 1467 MovieClip [Gauge] Frame 1
this.onEnterFrame = function () {
if (_root.level.gaugePct < 1) {
gauge_bar_full_mc._visible = false;
var _local3 = int(120 * _root.level.gaugePct);
if (bar_mc._width < _local3) {
bar_mc._width++;
} else if (bar_mc._width > _local3) {
var _local2 = bar_mc._width - 2;
if (_local2 < 0) {
_local2 = 0;
}
bar_mc._width = _local2;
}
} else if (gauge_bar_full_mc._visible != true) {
gauge_bar_full_mc._visible = true;
bar_mc._width = 120;
_root.level.SaturateBalls();
play();
}
};
stop();
Symbol 1467 MovieClip [Gauge] Frame 25
for (var l in _root.level.ballLines) {
var ballLine = _root.level.ballLines[l];
for (var b in ballLine.balls) {
var ball = ballLine.balls[b];
ball.filters = new Array();
}
}
Symbol 1485 MovieClip [Credits] Frame 1
x_btn.onRelease = function () {
unloadMovie (this._parent);
};
Symbol 1599 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 1600 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 1601 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 1602 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 1603 MovieClip [__Packages.Utility] Frame 0
class Utility
{
function Utility () {
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function clean(s) {
return(escape(encrypt(s)));
}
function encrypt(tMsg, tKey) {
tKey = "<']+)*$?&#~";
tMsg = unescape(tMsg);
var _local5 = "";
var _local2 = 0;
var _local1 = 0;
while (_local1 < tMsg.length) {
_local5 = _local5 + chr(tMsg.charCodeAt(_local1) ^ tKey.charCodeAt(_local2));
_local2++;
if (_local2 == tKey.length) {
_local2 = 0;
}
_local1++;
}
return(_local5);
}
function GetAngle(xstart, ystart, xtarget, ytarget) {
var _local7 = mabs(xstart - xtarget);
var _local8 = mabs(ystart - ytarget);
var _local2 = matan(_local8 / _local7);
_local2 = _local2 * (180 / mp);
if ((xtarget >= xstart) && (ytarget <= ystart)) {
_local2 = 90 - _local2;
}
if ((xtarget < xstart) && (ytarget < ystart)) {
_local2 = _local2 + -90;
}
if ((xtarget <= xstart) && (ytarget >= ystart)) {
_local2 = (90 - _local2) + 180;
}
if ((xtarget > xstart) && (ytarget > ystart)) {
_local2 = _local2 + -270;
}
return(_local2);
}
function md(x1, y1, x2, y2) {
return(msr(mpow(x1 - x2, 2) + mpow(y1 - y2, 2)));
}
function GetGlowFilter() {
var _local3 = 3394815 /* 0x33CCFF */;
var _local9 = 0.8;
var _local6 = 5;
var _local5 = 5;
var _local7 = 2;
var _local1 = 3;
var _local4 = false;
var _local8 = false;
var _local2 = new flash.filters.GlowFilter(_local3, _local9, _local6, _local5, _local7, _local1, _local4, _local8);
return(_local2);
}
function FormatTime(elapsedTime) {
var _local6 = "";
var _local2 = Math.floor(elapsedTime / 3600000);
var _local1 = elapsedTime - (_local2 * 3600000);
var _local4 = Math.floor(_local1 / 60000);
_local1 = _local1 - (_local4 * 60000);
var _local3 = Math.floor(_local1 / 1000);
_local1 = _local1 - (_local3 * 1000);
var _local5 = Math.floor(_local1 / 10);
var _local10;
var _local8;
var _local7;
var _local9;
if (_local2 < 10) {
_local10 = "0" + _local2.toString();
} else {
_local10 = _local2.toString();
}
if (_local4 < 10) {
_local8 = "0" + _local4.toString();
} else {
_local8 = _local4.toString();
}
if (_local3 < 10) {
_local7 = "0" + _local3.toString();
} else {
_local7 = _local3.toString();
}
if (_local5 < 10) {
_local9 = "0" + _local5.toString();
} else {
_local9 = _local5.toString();
}
_local2 = 0;
if (_local2) {
_local6 = _local6 + (_local2 + ":");
}
_local6 = _local6 + ((_local8 + ":") + _local7);
return(_local6);
}
function EnableButtons(movieClip, enable) {
for (var _local2 in movieClip) {
if ((substring(_local2, _local2.length - 3, 4)) == "_btn") {
movieClip[_local2].enabled = enable;
}
}
}
function killMovieClip(movieClip) {
movieClip.swapDepths(1048000);
movieClip.removeMovieClip();
}
function ToggleEnabled(movieClip, enable) {
for (var _local2 in movieClip) {
movieClip[_local2].enabled = enable;
}
}
function CenterMovieClip(movie_mc) {
var _local3 = (movie_mc._parent._width / 2) - (movie_mc._width / 2);
var _local2 = (movie_mc._parent._height / 2) - (movie_mc._height / 2);
movie_mc._x = _local3;
movie_mc._y = _local2;
}
function replace(_allText, _searchfor, _replacement) {
var _local2 = _allText.split(_searchfor);
var _local1 = _local2.join(_replacement);
return(_local1);
}
function TransformColor(movieClip, color) {
if (color != undefined) {
var _local1;
switch (color) {
case "Blue" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 16, 44, 203, 0);
break;
case "Red" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 251, 53, 51, 0);
break;
case "Yellow" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 241, 209, 58, 0);
break;
case "Purple" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 237, 16, 184, 0);
break;
case "Green" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 36, 110, 69, 0);
break;
case "White" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 218, 216, 216, 0);
break;
case "Black" :
_local1 = new flash.geom.ColorTransform(0, 0, 0, 1, 92, 87, 88, 0);
}
var _local2 = new flash.geom.Transform(movieClip);
_local2.colorTransform = _local1;
}
}
function isEmptyString(s, min_chars) {
s = this;
if (s == "") {
return(false);
}
if (s.length < min_chars) {
return(false);
}
return(true);
}
function isAlphaNumeric(s) {
var _local2 = 0;
while (_local2 < s.length) {
var _local1 = s.charCodeAt(_local2);
if (((((_local1 >= 48) && (_local1 <= 57)) || ((_local1 >= 65) && (_local1 <= 90))) || ((_local1 >= 97) && (_local1 <= 122))) || (_local1 == 95)) {
} else {
return(false);
}
_local2++;
}
return(true);
}
function hasBadWords(s) {
var _local3 = s.toLowerCase();
s = filterBadWord(s, "fuck");
s = filterBadWord(s, "shit");
s = filterBadWord(s, "ass");
s = filterBadWord(s, "cock");
s = filterBadWord(s, "penis");
s = filterBadWord(s, "pussy");
s = filterBadWord(s, "cunt");
s = filterBadWord(s, "whore");
s = filterBadWord(s, "bitch");
s = filterBadWord(s, "vagina");
s = s.toLowerCase();
if (_local3 == s) {
return(false);
}
return(true);
}
function filterBadWord(s, badWord) {
s = s.toLowerCase();
var _local2 = s.indexOf(badWord);
if (_local2 != -1) {
return((s.substring(0, _local2) + "****") + s.substring(_local2 + badWord.length, s.length));
}
return(s);
}
function GetLevelDataClass(levelName) {
switch (levelName) {
case "Brethren_Of_The_Coast" :
return(new levels.Brethren_Of_The_Coast());
case "crossbones" :
return(new levels.crossbones());
case "hands_of_doom" :
return(new levels.hands_of_doom());
case "high_seas" :
return(new levels.high_seas());
case "scurvy_serpent" :
return(new levels.scurvy_serpent());
case "shipping_lanes" :
return(new levels.shipping_lanes());
case "whirlpools" :
return(new levels.whirlpools());
case "ye_death_spiral" :
return(new levels.ye_death_spiral());
}
}
var mr = Math.random;
var mf = Math.floor;
var mp = Math.PI;
var mpow = Math.pow;
var msr = Math.sqrt;
var matan = Math.atan;
var masin = Math.asin;
var matan2 = Math.atan2;
var mabs = Math.abs;
var mround = Math.round;
}
Symbol 1604 MovieClip [__Packages.levels.Brethren_Of_The_Coast] Frame 0
class levels.Brethren_Of_The_Coast
{
function Brethren_Of_The_Coast () {
}
function getLevelText() {
return("paths=0,91.1,417.5|0,105.75,414.8|0,119.95,412.05|0,133.8,409.35|0,147.5,406.65|0,161.05,404|0,174.5,401.3|0,187.9,398.6|0,201.25,395.9|0,214.5,393.2|0,227.75,390.55|0,241.1,387.8|0,254.7,384.9|0,268.3,381.95|0,281.75,379|0,295.05,376|0,308.3,373|0,321.5,370|0,334.6,367|0,347.55,364|0,360.3,361|0,373.05,357.9|0,385.8,354.75|0,398.55,351.55|0,411.3,348.3|0,424.05,344.9|0,436.8,341.5|0,449.55,337.95|0,462.25,334.35|0,474.9,330.6|0,487.65,326.8|0,500.3,322.85|0,512.9,318.8|0,525.55,314.6|0,538.1,310.2|0,550.65,305.7|0,563.2,300.95|0,575.65,296.05|0,587.95,290.95|0,599.7,285.75|0,611.35,280.3|0,622.9,274.5|0,634.25,268.35|0,645.3,261.7|0,656,254.5|0,666.3,246.5|0,675.8,237.6|0,684.05,227.35|0,690.1,215.6|0,692.4,202.5|0,690.35,189.2|0,684.45,176.45|0,675.7,165.25|0,665.45,155.7|0,654.25,147.45|0,642.55,140.15|0,630.5,133.65|0,618.25,127.8|0,605.8,122.4|0,593.25,117.4|0,580.3,112.7|0,567.1,108.25|0,553.9,104.05|0,540.65,100.15|0,527.4,96.5|0,514.1,93|0,500.85,89.75|0,487.55,86.6|0,474.3,83.65|0,460.95,80.85|0,447.7,78.15|0,434.4,75.55|0,421.1,73.1|0,407.85,70.75|0,394.55,68.5|0,381.25,66.3|0,367.9,64.2|0,354.5,62.15|0,341.1,60.2|0,327.75,58.3|0,314.3,56.5|0,300.9,54.8|0,287.5,53.1|0,274.1,51.55|0,260.7,50|0,247.35,48.55|0,233.9,47.15|0,220.5,45.85|0,207.1,44.55|0,193.7,43.35|0,180.3,42.25|0,166.95,41.15|0,154.05,40.15|0,141.25,39.25|0,128.45,38.35|0,115.65,37.55|0,102.75,36.85|0,89.8,36.3|0,76.85,36|0,63.85,36.1|0,50.75,37.85|0,38.45,43.1|0,29.1,52.3|0,29.3,65.15|0,39.5,74.15|0,52.15,79.4|0,65.45,82.8|0,78.8,84.95|0,92.1,86.5|0,105.15,88.1|0,118.2,89.65|0,131.25,91.25|0,144.3,92.9|0,157.4,94.55|0,170.5,96.2|0,183.6,97.85|0,196.65,99.55|0,209.75,101.3|0,222.9,103.05|0,236.05,104.8|0,249.15,106.6|0,262.3,108.45|0,275.45,110.3|0,288.6,112.2|0,301.75,114.1|0,314.95,116.1|0,328.1,118.1|0,341.3,120.15|0,354.5,122.25|0,367.7,124.35|0,381,126.6|0,394.15,128.8|0,406.75,131.05|0,419.25,133.3|0,431.75,135.65|0,444.2,138.05|0,456.7,140.6|0,469.15,143.2|0,481.6,145.95|0,493.95,148.85|0,506.3,151.85|0,518.65,155.05|0,531,158.5|0,543.25,162.25|0,555.35,166.3|0,567.3,170.8|0,579.1,175.9|0,590.45,182|0,600.8,189.75|0,607.7,200.7|0,603.6,213.6|0,591.5,223.85|0,578.55,231.6|0,565.6,238.15|0,552.65,244|0,539.7,249.35|0,526.75,254.4|0,513.85,259.15|0,500.9,263.75|0,488,268.15|0,475.15,272.4|0,462.25,276.55|0,449.4,280.55|0,436.55,284.5|0,423.6,288.4|0,410.65,292.15|0,397.7,295.85|0,384.7,299.45|0,371.75,303|0,358.7,306.45|0,345.65,309.85|0,332.6,313.1|0,319.75,316.3|0,307.15,319.3|0,294.55,322.2|0,281.8,324.95|0,269,327.5|0,255.75,326.6|&cannons=256.5,213.8,90,1|81.5,230.65,90,0|&coins=625.05,348|631.05,59|&name=Brethren of the Coast");
}
}
Symbol 1605 MovieClip [__Packages.levels.crossbones] Frame 0
class levels.crossbones
{
function crossbones () {
}
function getLevelText() {
return("paths=0,545.45,439.65|0,537.1,431.65|0,528.85,423.5|0,520.75,415.35|0,512.75,407.05|0,504.85,398.7|0,497.1,390.3|0,487.95,382.55|0,479.85,374.45|0,472.85,366.05|0,466.8,356.35|0,460.15,347.1|0,452.9,338.25|0,445.1,329.85|0,436.65,322.05|0,427.65,314.85|0,418.2,308.3|0,411.3,314.35|0,404.95,323.3|0,397.05,331.9|0,390.4,340.95|0,378.6,343.4|0,366.9,344.35|0,355.65,344.75|0,344.55,344.4|0,333.55,342.05|0,324.35,334.75|0,319.5,324.65|0,311,316.45|0,303.45,309.35|0,292.7,313.3|0,283.6,320.55|0,276.05,329.55|0,269.25,339.3|0,262.85,349.05|0,256.65,358.55|0,250.1,367.6|0,242.6,376|0,233.45,382.65|0,222.6,385.8|0,211.25,384.65|0,200.9,379.75|0,192.05,372|0,182.5,369.15|0,170.95,368|0,160.05,366.6|0,152.2,359.4|0,147.15,349.45|0,149.35,338.5|0,157.7,330.4|0,168.35,324.85|0,179.7,320.6|0,190.9,316.95|0,202.05,313.7|0,213.4,310.95|0,224.85,309.15|0,235.6,306.05|0,245.9,301.05|0,255.6,295|0,264.65,287.95|0,273.3,280.15|0,282.6,272.65|0,291.85,265.65|0,299.55,257.85|0,293.9,250.8|0,284,245.95|0,276.8,237.9|0,280.35,227.25|0,281.6,217.25|0,277.4,206.75|0,275.3,195.45|0,275.8,183.95|0,267.2,177.65|0,256.9,171.25|0,246.95,164.8|0,237.25,158.35|0,227.8,152.1|0,218.5,146.1|0,209,140.35|0,199.2,134.95|0,189.2,129.8|0,178.85,125.4|0,167.7,123.45|0,157.25,119.4|0,149.1,111.55|0,145.95,100.65|0,147.9,89.3|0,153.3,79.25|0,161.4,71.3|0,171.75,66.8|0,183.15,67.2|0,190.9,60.8|0,199.8,53.7|0,210.8,50.25|0,222.25,50|0,233.6,52.2|0,241.85,59.8|0,247,70.25|0,250.6,81.35|0,254.3,92.2|0,259.6,102.3|0,266.35,111.7|0,273.9,120.6|0,281.8,129.25|0,289.55,130.7|0,297.7,122.65|0,306.8,115.65|0,316.65,109.8|0,327.15,105.1|0,338.05,101.65|0,349.35,99.5|0,360.8,98.6|0,372.2,99|0,383.45,100.75|0,394.5,103.9|0,404.95,108.5|0,414.7,114.5|0,423.5,121.8|0,431.15,130.35|0,439.05,129.85|0,447.85,122.25|0,455.6,113.55|0,462.4,104.2|0,468.45,94.35|0,474.05,83.95|0,479.2,73.35|0,484.1,62.8|0,489.4,53|0,500.85,50.95|0,513,50.9|0,523.2,54.9|0,531,62.95|0,539.6,65.95|0,550.7,67.95|0,560.9,73.15|0,569.05,81.15|0,574.25,91.3|0,575.5,102.6|0,570.5,112.85|0,561.6,120.25|0,551.7,125.8|0,541.05,129.6|0,530.55,133.85|0,520.2,138.4|0,509.95,143.2|0,499.85,148.35|0,489.9,153.9|0,480.15,159.9|0,470.8,166.7|0,461.95,173.55|0,452.2,179.25|0,447.5,186.05|0,446.5,197.5|0,441.85,208.05|0,435.25,217.6|0,437.35,225.7|0,440.3,235.95|0,433.4,245.6|0,425.85,253.9|0,433.25,263.25|0,442.1,270.85|0,451.35,277.9|0,460.75,284.55|0,470.3,290.85|0,480,296.95|0,489.85,302.65|0,499.75,307.9|0,510.05,312.05|0,521.65,314.2|0,532.8,316.35|0,544.35,319.15|0,556.45,320.55|0,568.35,321.4|0,580,321.95|0,591.55,322.3|0,603.2,322.45|0,614.85,322.5|0,626.4,321.45|&cannons=64,222,0,0|637.7,222,0,1|&coins=392.45,201.95|392.45,201.95|&name=cross bones");
}
}
Symbol 1606 MovieClip [__Packages.levels.hands_of_doom] Frame 0
class levels.hands_of_doom
{
function hands_of_doom () {
}
function getLevelText() {
return("paths=0,215.35,-36.85|1,474.15,438.05|0,222.1,-28.45|1,467.65,429.65|0,228.9,-19.95|1,461.3,421.15|0,235.65,-11.5|1,455.05,412.6|0,242.25,-3.2|1,448.85,403.95|0,248.85,5.4|1,442.8,395.2|0,255.35,14.1|1,436.9,386.3|0,261.75,22.85|1,431.15,377.3|0,268.1,31.7|1,425.65,368.25|0,274.25,40.65|1,420.45,359.15|0,280.3,49.75|1,415.45,349.95|0,286.15,59|1,410.7,340.55|0,291.7,68.2|1,406.3,331|0,297,77.6|1,402.2,321.25|0,302.05,87.05|1,398.45,311.35|0,306.85,96.7|1,395.2,301.3|0,311.3,106.55|1,392.4,291.05|0,315.35,116.5|1,390.15,280.65|0,319.05,126.7|1,388.55,270.1|0,322.25,137.1|1,387.65,259.4|0,324.95,147.6|1,387.55,248.7|0,327,158.3|1,388.1,238|0,328.35,169.15|1,389.3,227.35|0,328.95,180.1|1,391.2,216.75|0,328.75,191.05|1,393.75,206.3|0,327.85,202|1,396.95,196|0,326.3,212.9|1,400.7,185.95|0,324,223.65|1,405,176.1|0,321.05,234.25|1,409.85,166.5|0,317.5,244.65|1,415.15,157.2|0,313.3,254.85|1,420.95,148.15|0,308.55,264.75|1,427.2,139.4|0,303.3,274.4|1,433.9,131|0,297.55,283.75|1,441,122.9|0,291.3,292.8|1,448.45,115.2|0,284.6,301.5|1,456.3,107.85|0,277.4,309.9|1,464.45,100.85|0,269.85,317.85|1,472.9,94.25|0,261.95,325.5|1,481.6,88.05|0,253.65,332.7|1,490.6,82.2|0,245.1,339.55|1,499.85,76.8|0,236.2,345.95|1,509.4,71.8|0,227.05,352|1,519.15,67.3|0,217.6,357.55|1,529.05,63.2|0,207.9,362.7|1,539.15,59.6|0,197.95,367.35|1,549.4,56.45|0,187.8,371.55|1,559.75,53.75|0,177.45,375.3|1,570.25,51.6|0,167,378.5|1,580.8,49.9|0,156.4,381.25|1,591.45,48.75|0,145.7,383.45|1,602.15,48.1|0,134.85,385.15|1,612.9,48.05|0,123.9,386.3|1,623.65,48.45|0,112.95,386.9|1,634.35,49.45|0,102,386.9|1,644.75,51.9|0,91.05,386.35|1,654.4,56.75|0,80.1,385.25|1,662.85,63.3|0,69.55,382.2|1,669.85,71.25|0,59.95,376.75|1,674.85,80.7|0,51.6,369.7|1,676.6,91.05|0,44.9,361.15|1,672.3,100.65|0,40.6,351.15|1,663.1,106.2|0,40.5,340.5|1,652.3,108.3|0,47.05,331.8|1,641.4,108.4|0,57.4,327.6|1,630.45,108.35|0,68.55,326.45|1,619.5,108.8|0,79.6,326.65|1,608.65,109.5|0,90.8,326.45|1,597.95,110.45|0,101.95,325.9|1,587.5,111.35|0,113,325.05|1,577.15,112.2|0,123.8,324.05|1,566.75,112.85|0,134.45,323.15|1,556.25,113.2|0,145.1,322.4|1,545.65,113.6|0,155.8,321.85|1,535.15,114.6|0,166.6,321.6|1,524.7,116.3|0,177.45,320.8|1,514.35,118.85|0,188.15,319.3|1,504.3,122.25|0,198.75,317|1,494.5,126.55|0,209.15,313.85|1,485.2,131.85|0,219.25,309.7|1,476.5,138.05|0,228.95,304.55|1,468.45,145.2|0,238,298.35|1,461.2,153.15|0,246.35,291.25|1,454.75,161.9|0,253.95,283.3|1,449.1,171.2|0,260.7,274.5|1,444.35,180.95|0,266.6,265.05|1,440.4,191.05|0,271.6,255.1|1,437.1,201.4|0,275.75,244.8|1,434.55,211.9|0,279.1,234.25|1,432.55,222.45|0,281.8,223.5|1,431.1,233.1|0,283.85,212.7|1,430.7,243.8|0,285.3,201.8|1,431.5,254.6|0,285.7,190.85|1,433.45,265.15|0,284.85,179.85|1,436.45,275.5|0,282.8,169.05|1,440.45,285.5|0,279.6,158.5|1,445.25,295.1|0,275.45,148.3|1,450.85,304.3|0,270.4,138.5|1,457.15,313.05|0,264.55,129.15|1,464.05,321.35|0,258,120.3|1,471.45,329.15|0,250.85,111.9|1,479.35,336.45|0,243.15,104.05|1,487.6,343.25|0,234.95,96.7|1,496.25,349.55|0,226.4,89.85|1,505.3,355.35|0,217.4,83.55|1,514.65,360.6|0,208.1,77.8|1,524.3,365.3|0,198.4,72.65|1,534.2,369.4|0,188.4,68.05|1,544.25,372.9|0,178.2,64.05|1,554.55,375.75|0,167.85,60.75|1,565,377.8|0,157.25,58.2|1,575.6,379.1|0,146.45,56.4|1,586.3,379.55|0,135.55,55.5|1,597.05,379.4|0,124.6,55.5|1,607.75,379.35|0,113.75,55.55|1,618.5,379.3|0,103.05,55.6|1,629.1,379.15|0,92.2,55.7|1,639.6,378.6|0,81.4,56.05|1,650.15,377.55|0,70.7,56.9|1,660.35,375.45|0,60,58.55|1,670.1,371.8|0,49.85,61.55|1,678.4,365.45|0,40.65,66.9|1,683.1,355.95|0,34.25,75.65|1,682.8,345.25|0,32.9,86.55|1,675.6,336.35|0,38.15,96.3|1,665.1,330.25|0,48.55,103.35|1,654.25,326|0,59.7,108.05|1,643.4,322.7|0,70.8,111.6|1,632.55,320|0,81.85,114.45|1,621.8,317.75|0,92.9,116.85|1,611,315.75|0,103.95,118.95|1,600.25,314|0,114.95,120.75|1,589.55,312.45|0,125.9,122.35|1,578.85,311.1|0,136.85,123.75|1,568.15,310.65|0,147.75,124.3|1,557.5,310.25|0,158.7,124.65|1,546.9,308.7|0,169.55,126.25|1,536.55,305.95|0,180.15,129.05|1,526.55,302.05|0,190.35,133.1|1,517,297.1|0,200.05,138.2|1,508.15,291.2|0,209.05,144.35|1,500.05,284.25|0,217.3,151.55|1,492.85,276.3|0,224.5,159.8|1,486.8,267.45|0,230.5,169|1,482,257.9|0,235.2,178.85|1,478.65,247.8|0,238.35,189.25|1,476.95,237.25|0,239.65,200.1|1,477.1,226.55|0,239,211.1|1,479.15,216|0,236.45,221.8|1,482.85,205.95|0,232.15,231.9|1,488.2,196.5|0,226.25,241.3|1,494.85,187.95|0,219.05,249.75|1,502.5,180.3|0,210.9,257.25|1,510.95,173.55|0,202.05,263.8|1,519.95,167.65|0,192.6,269.5|1,529.55,162.55|0,182.6,274.35|1,539.5,158.3|0,172.3,278.4|1,549.65,154.7|0,161.85,281.8|1,559.95,151.65|0,151.2,284.65|1,570.45,149.1|0,140.45,287|1,581,147.1|0,129.6,288.75|1,591.6,145.55|0,118.7,290.05|1,602.25,144.55|0,107.8,290.8|1,612.9,144|0,96.9,291|1,623.6,144|0,85.95,290.65|1,634.3,144.55|0,75.05,289.65|1,644.9,145.8|0,64.3,287.9|1,655.35,147.7|0,53.75,285.4|1,665.6,150.5|0,43.5,281.8|1,675.55,154.25|0,33.65,277|1,684.9,159.35|0,25.9,269.6|1,691.6,167.45|0,23.5,259.05|1,692.75,178|0,26.55,248.5|1,689,188.1|0,32.9,239.45|1,682.5,196.7|0,40.9,232.05|1,674.45,203.7|0,50.4,226.4|1,665.15,209.05|0,60.45,221.55|1,655.75,213.65|0,71,220|1,645.5,215.45|&cannons=154.3,201.9,0,0|569.3,224.4,0,1|&coins=358,210.95|&name=hands of doom");
}
}
Symbol 1607 MovieClip [__Packages.levels.high_seas] Frame 0
class levels.high_seas
{
function high_seas () {
}
function getLevelText() {
return("paths=0,742,186.9|0,734.85,177.7|0,727.7,168.4|0,720.55,159.2|0,713.4,149.95|0,706.3,140.7|0,699.15,131.45|0,692,122.25|0,684.85,112.95|0,677.7,103.75|0,670.55,94.5|0,663.45,85.25|0,656.2,76.1|0,647.75,67.95|0,638.7,60.5|0,629.2,53.65|0,619.35,47.55|0,609.25,42.3|0,598.65,38.2|0,587.45,35.65|0,575.9,35.45|0,564.6,38.2|0,554.55,43.7|0,546.7,52.05|0,543.35,63.25|0,544.95,75.05|0,549.45,85.9|0,555.6,95.9|0,562.95,105|0,571.05,113.15|0,580.55,119.9|0,590.1,126.8|0,599.45,134.05|0,608.5,141.5|0,617.35,149.25|0,626,157.15|0,634.45,165.3|0,642.55,173.45|0,650.2,181.75|0,657.5,190.35|0,664.35,199.35|0,670.7,208.8|0,676.25,218.8|0,680.65,229.4|0,683.45,240.6|0,683.95,252.2|0,682.65,263.85|0,680,275.4|0,676.25,286.5|0,671.6,297.2|0,666.05,307.5|0,659.75,317.35|0,652.7,326.7|0,645,335.5|0,636.7,343.7|0,627.9,351.35|0,618.55,358.4|0,608.7,364.75|0,598.4,370.5|0,587.75,375.45|0,576.8,379.75|0,565.55,383.3|0,554.15,386.15|0,542.6,388.35|0,530.95,389.95|0,519.3,390.95|0,507.6,391.4|0,495.95,391.35|0,484.4,390.75|0,472.85,389.65|0,461.4,387.95|0,450,385.7|0,438.7,382.75|0,427.6,379.2|0,416.7,375|0,406.05,370.2|0,395.7,364.75|0,385.7,358.7|0,376.05,352.1|0,366.8,344.95|0,357.9,337.3|0,349.45,329.25|0,341.6,320.75|0,334.25,311.65|0,327.55,302.15|0,321.5,292.15|0,316.3,281.8|0,312,271.15|0,308.95,260|0,307.55,248.5|0,308.1,236.85|0,310.5,225.25|0,314.6,214.1|0,320.1,203.55|0,326.65,193.7|0,334,184.5|0,342,175.9|0,350.45,167.8|0,359.25,160.25|0,368.5,153.2|0,378.15,146.7|0,388.25,140.85|0,398.7,135.6|0,409.5,131.1|0,420.55,127.3|0,431.75,124.2|0,442.6,120.95|0,453.2,117.15|0,463.55,112.55|0,473.3,106.7|0,481.8,99|0,487.15,88.95|0,485.9,77.55|0,478.1,68.4|0,468.05,61.95|0,456.65,57.5|0,444.9,54.1|0,433.3,51.3|0,421.75,48.8|0,410.35,46.6|0,399.05,44.55|0,387.8,42.65|0,376.4,41.05|0,364.9,39.75|0,353.45,38.65|0,342.15,37.7|0,330.9,36.85|0,319.6,36.1|0,308.3,35.45|0,297,34.9|0,285.65,34.45|0,274.3,34.2|0,262.95,34.05|0,251.55,34.05|0,240.15,34.25|0,228.75,34.7|0,217.3,35.3|0,205.9,36.2|0,194.5,37.35|0,183.1,38.85|0,171.7,40.75|0,160.35,43.1|0,149.1,45.95|0,138,49.45|0,127.25,53.7|0,116.8,58.8|0,106.9,64.8|0,97.75,71.95|0,89.5,79.8|0,81.1,87.35|0,72.9,96|0,66.75,106.7|0,61.7,117.7|0,57.35,128.75|0,53.45,139.8|0,49.9,150.85|0,46.7,162|0,43.95,173.25|0,41.6,184.7|0,39.75,196.15|0,38.35,207.75|0,37.45,219.35|0,37.05,230.95|0,37.3,242.4|0,38.2,253.9|0,39.9,265.25|0,42.6,276.45|0,46.35,287.4|0,51.3,297.95|0,57.55,307.8|0,65.05,316.7|0,73.65,324.5|0,83.35,331|0,93.95,335.95|0,105.2,339.45|0,116.85,341.75|0,128.6,342.95|0,140.3,342.3|&cannons=198.85,137.2,0,1|504.8,241.2,0,0|&coins=610.25,78.75|&name=high seas");
}
}
Symbol 1608 MovieClip [__Packages.levels.scurvy_serpent] Frame 0
class levels.scurvy_serpent
{
function scurvy_serpent () {
}
function getLevelText() {
return("paths=0,32.75,426.25|0,32.5,412.55|0,32.25,398.8|0,32,385.05|0,31.75,371.3|0,31.5,357.6|0,31.25,343.85|0,31,330.15|0,30.75,316.35|0,30.5,302.65|0,30.25,288.9|0,30,275.2|0,29.75,261.45|0,29.55,247.7|0,29.3,233.95|0,29.05,220.25|0,28.8,206.5|0,28.55,192.75|0,28.3,179.05|0,28.05,165.3|0,27.8,151.55|0,27.55,137.8|0,27.3,124.1|0,27.05,110.35|0,28.6,96.8|0,30.95,83.3|0,34.65,70.2|0,40.3,58.05|0,48.9,47.75|0,60.95,41.35|0,74.6,40.2|0,87.4,44.65|0,96.95,54.75|0,102.75,67.4|0,106.1,80.9|0,108.15,94.6|0,109.75,108.5|0,110.4,122.8|0,109.75,137.15|0,108.75,151.05|0,107.3,166.35|0,105.9,181.4|0,104.55,195.55|0,103.25,209.4|0,101.95,223.05|0,100.75,236.3|0,99.7,249.4|0,98.7,262.6|0,97.85,275.7|0,97.15,288.95|0,96.65,302.1|0,96.55,315.4|0,96.95,328.8|0,98.55,342.2|0,102.05,355.15|0,109.35,366.4|0,121.6,372.6|0,135.4,374|0,148.8,372.1|0,160.6,365.55|0,167.9,353.95|0,170.8,340.3|0,171.25,325.7|0,170.85,310.65|0,170.25,296.2|0,169.55,282.05|0,168.75,268.05|0,167.9,254.2|0,167.05,240.45|0,166.15,226.95|0,165.2,213.8|0,164.25,200.7|0,163.2,187.5|0,162.1,174.35|0,160.85,161.15|0,159.4,147.85|0,157.45,134.5|0,156.1,121.05|0,156.2,107.55|0,158.4,94.1|0,163.25,81.45|0,171.95,71.15|0,184.55,65.65|0,198.15,65.35|0,211.05,69.3|0,221.1,78.55|0,226.6,91.35|0,229.05,105.2|0,230.05,119.05|0,229.95,133.15|0,229.25,147.2|0,228.15,161.1|0,226.75,175.7|0,225.2,190.35|0,223.7,204.4|0,222.2,218.2|0,220.8,231.65|0,219.5,245.05|0,218.4,258.4|0,217.65,271.95|0,217.5,285.35|0,218.65,298.6|0,222.75,311.4|0,228.45,323.55|0,237.15,333.7|0,250.3,336.7|0,263.1,332.35|0,272.15,321.95|0,277.95,309.1|0,280.85,294.9|0,281.7,280.15|0,281.65,265.85|0,281.15,251.8|0,280.35,237.95|0,279.3,224.2|0,278.15,210.8|0,277.05,197.55|0,275.9,184.2|0,274.8,170.75|0,273.8,157.35|0,273.1,144|0,273.35,130.5|0,276.5,117.35|0,283.95,106|0,295.6,99.1|0,309.25,98.75|0,321.5,104.85|0,330.5,115.25|0,335.95,127.85|0,340.05,140.65|0,343.3,153.8|0,344.5,167.6|0,344.2,181.75|0,343.7,195.45|0,343.3,209.05|0,343,222.7|0,342.5,236.65|0,341.5,250.6|0,340.2,264.4|0,339.8,278.05|0,341.1,291.7|0,345.35,304.7|0,354.15,315|0,366.85,318.95|0,380,315.4|0,390.7,306.9|0,397.6,294.95|0,401.1,281.65|0,401.7,267.85|0,400.25,253.6|0,398.4,239.7|0,396.3,226.05|0,393.85,212.45|0,391.2,199.25|0,388.85,186.35|0,388.2,172.6|0,389.6,158.85|0,393.05,145.6|0,400.3,133.9|0,410.45,124.75|0,422.7,119.3|0,435.8,122.3|0,445.35,132.2|0,450.9,144.7|0,452.65,158.55|0,452.3,172.55|0,451,186.3|0,450.15,199.75|0,450.85,213.15|0,454.55,226.3|0,461.3,238.15|0,471.1,247.35|0,484.25,247.2|0,495.15,239.05|0,501.9,227.15|0,504,213.45|0,504,199.75|0,504,186|&cannons=568.9,375.3,-60.0001220703125,2|669.6,200.65,-90,1|554.85,43.65,-104.999740600586,0|&coins=68.5,87|135.1,328.45|&name=scurvy serpent");
}
}
Symbol 1609 MovieClip [__Packages.levels.shipping_lanes] Frame 0
class levels.shipping_lanes
{
function shipping_lanes () {
}
function getLevelText() {
return("paths=0,606.8,411.6|0,598.95,393.65|0,580.45,385.9|0,560.3,385.6|0,540.25,385.6|0,520.2,385.6|0,500.1,385.6|0,480.05,385.6|0,459.9,385.6|0,439.85,385.6|0,419.8,385.6|0,399.75,385.7|0,381.1,379.35|0,370.3,362.9|0,371.35,343.1|0,385.5,329.3|0,405,324.6|0,425,323.55|0,445,321.75|0,465.05,319.95|0,485,318.1|0,505,316.3|0,525,314.5|0,544.95,312.7|0,564.95,310.85|0,585,309.05|0,604.95,307.25|0,624.95,305.45|0,644.95,303.65|0,664.75,301|0,679.95,288.35|0,685.95,268.9|0,686.3,248.65|0,685.75,228.45|0,685.1,208.25|0,684.25,188.2|0,678.8,169.25|0,663.7,157.25|0,644.85,162.45|0,633.3,178.85|0,628.25,198.45|0,627.1,218.55|0,620.15,236.95|0,604.5,249.35|0,585.05,253.8|0,565.15,256.5|0,545.25,259.25|0,525.35,261.95|0,505.45,264.65|0,485.6,267.35|0,465.7,270.05|0,445.75,272.75|0,425.85,275.45|0,405.95,278.15|0,386.15,281.25|0,366.15,281|0,347.5,275.1|0,334.55,260.15|0,331.4,240.15|0,331.15,220.45|0,330.9,201.05|0,330.65,181.5|0,330.5,161.9|0,330.65,142.1|0,340.15,124.8|0,358.4,115.15|0,378.15,110.55|0,398.1,108.5|0,418.15,108.6|0,438.25,108.6|0,458.35,108.6|0,478.4,108.6|0,498.45,108.6|0,518.55,108.6|0,538.6,108.6|0,558.7,108.6|0,578.8,108.6|0,598.85,108.6|0,618.9,108.6|0,639,108.6|0,659.1,108.6|0,676.85,100.55|0,684.95,82.35|0,683.85,62.55|0,671.5,47.55|0,651.85,44.6|0,631.75,44.6|0,611.7,44.6|0,591.6,44.6|0,571.55,44.6|0,551.5,44.6|0,531.35,44.6|0,511.3,44.6|0,491.25,44.6|0,471.15,44.6|0,451.1,44.6|0,431.05,44.6|0,410.9,44.6|0,390.85,44.6|0,370.8,44.6|0,350.7,44.6|0,330.65,44.6|0,310.55,44.6|0,290.45,44.6|0,270.4,44.6|0,250.35,44.6|0,230.25,44.6|0,210.2,44.6|0,190.1,44.6|0,170,44.6|0,149.95,44.6|0,129.9,44.6|0,109.8,44.6|0,89.75,44.6|0,69.65,44.6|0,49.6,44.55|0,31.25,51.6|0,22.65,69.35|0,22.45,89.5|0,22.45,109.6|0,22.45,129.7|0,22.45,149.75|0,22.45,169.8|0,22.45,189.9|0,22.45,209.95|0,22.5,230.05|0,22.55,250.15|0,22.55,270.25|0,22.55,290.3|0,22.55,310.4|0,22.55,330.5|0,22.55,350.55|0,23.4,370.55|0,36.15,384.7|0,55.6,383.4|0,66.55,367.4|0,67,347.15|0,67,327.1|0,67,307|0,67,286.9|0,66.95,266.85|0,66.95,246.7|0,66.95,226.65|0,66.95,206.6|0,66.95,186.5|0,66.95,166.45|0,66.95,146.4|0,66.9,126.25|0,73.3,107.7|0,91.05,99.1|0,110.1,103.15|0,119.2,120.6|0,119.45,140.7|0,119.45,160.8|0,119.45,180.85|0,119.4,200.9|0,119.4,221|0,119.4,241.05|0,119.4,261.15|0,119.4,281.25|0,119.4,301.3|0,119.35,321.35|0,119.35,341.45|0,119.35,361.5|0,126.1,379.8|0,144.65,387|0,164.1,383.9|0,177.95,369.85|0,181.45,350.3|0,181.45,330.2|0,181.45,310.1|0,181.45,290.05|0,181.45,270|0,181.45,249.9|0,181.45,229.85|0,181.45,209.75|0,181.45,189.65|0,181.45,169.6|&cannons=431.8,191.2,0,1|266.3,324.45,0,0|&coins=427.5,350|165.55,91|&name=shipping lanes");
}
}
Symbol 1610 MovieClip [__Packages.levels.whirlpools] Frame 0
class levels.whirlpools
{
function whirlpools () {
}
function getLevelText() {
return("paths=0,24.35,-24.55|1,376.4,-25.55|0,24.35,-13.15|1,376.4,-14.1|0,24.35,-1.65|1,376.4,-2.6|0,24.35,9.75|1,376.4,8.85|0,24.35,21.2|1,376.4,20.3|0,24.35,32.65|1,376.4,31.75|0,24.35,44.05|1,376.4,43.2|0,24.35,55.5|1,376.4,54.65|0,24.35,66.95|1,376.4,66.15|0,24.35,78.4|1,376.4,77.6|0,24.35,89.85|1,376.35,89.05|0,24.35,101.25|1,376.35,100.5|0,24.35,112.7|1,376.35,111.95|0,24.35,124.15|1,376.35,123.45|0,24.35,135.6|1,376.35,134.9|0,24.35,147.05|1,376.35,146.35|0,24.35,158.5|1,376.35,157.8|0,24.35,169.9|1,376.35,169.25|0,24.35,181.35|1,376.35,180.75|0,24.35,192.8|1,376.35,192.2|0,24.35,204.25|1,376.35,203.65|0,24.8,215.65|1,376.85,215.1|0,25.9,227|1,377.95,226.45|0,27.7,238.3|1,379.8,237.75|0,30.15,249.45|1,382.25,248.95|0,33.25,260.5|1,385.45,260|0,37.05,271.3|1,389.25,270.8|0,41.45,281.8|1,393.7,281.35|0,46.5,292.05|1,398.75,291.6|0,52.15,301.95|1,404.45,301.5|0,58.45,311.55|1,410.85,311.05|0,65.35,320.65|1,417.8,320.15|0,72.8,329.3|1,425.3,328.85|0,80.8,337.45|1,433.3,336.95|0,89.3,345.05|1,441.85,344.55|0,98.3,352.05|1,450.95,351.5|0,107.85,358.45|1,460.5,357.85|0,117.8,364.1|1,470.5,363.45|0,128.1,369.05|1,480.8,368.4|0,138.7,373.25|1,491.45,372.55|0,149.6,376.65|1,502.4,375.9|0,160.75,379.25|1,513.6,378.45|0,172.05,381|1,524.95,380.1|0,183.45,381.85|1,536.4,380.9|0,194.9,381.9|1,547.85,380.9|0,206.25,381.05|1,559.2,379.95|0,217.55,379.3|1,570.55,378.1|0,228.7,376.55|1,581.7,375.3|0,239.6,372.95|1,592.55,371.6|0,250.1,368.5|1,603.05,367.05|0,260.25,363.25|1,613.2,361.7|0,270,357.2|1,622.9,355.6|0,279.25,350.45|1,632.1,348.7|0,287.95,343|1,640.75,341.2|0,296.1,334.9|1,648.85,333.05|0,303.6,326.35|1,656.35,324.45|0,310.55,317.25|1,663.25,315.25|0,316.8,307.65|1,669.45,305.65|0,322.45,297.65|1,675,295.55|0,327.35,287.3|1,679.85,285.15|0,331.55,276.7|1,684,274.5|0,335.1,265.8|1,687.45,263.55|0,337.9,254.75|1,690.15,252.45|0,339.95,243.45|1,692.15,241.1|0,341.3,232.05|1,693.4,229.7|0,341.9,220.65|1,693.95,218.25|0,341.8,209.2|1,693.75,206.85|0,340.95,197.85|1,692.8,195.45|0,339.3,186.55|1,691.05,184.15|0,336.85,175.35|1,688.45,172.95|0,333.6,164.4|1,685.1,162|0,329.6,153.7|1,681,151.3|0,324.85,143.3|1,676.2,140.95|0,319.35,133.3|1,670.6,130.95|0,313.1,123.7|1,664.25,121.45|0,306.15,114.6|1,657.2,112.4|0,298.55,106.1|1,649.45,103.95|0,290.35,98.2|1,641.15,96.1|0,281.5,90.95|1,632.2,89|0,272.1,84.45|1,622.7,82.6|0,262.15,78.75|1,612.65,77.05|0,251.8,73.95|1,602.25,72.35|0,241.1,70|1,591.45,68.55|0,230.05,67.05|1,580.35,65.7|0,218.8,65.05|1,569.05,63.85|0,207.35,64.1|1,557.65,63.05|0,195.9,64.15|1,546.15,63.25|0,184.55,65.25|1,534.8,64.5|0,173.35,67.45|1,523.6,66.9|0,162.35,70.75|1,512.65,70.35|0,151.75,75.05|1,502.1,74.8|0,141.6,80.3|1,492,80.25|0,131.95,86.45|1,482.45,86.55|0,122.9,93.5|1,473.45,93.75|0,114.55,101.3|1,465.2,101.65|0,106.85,109.75|1,457.6,110.25|0,99.85,118.75|1,450.7,119.4|0,93.6,128.4|1,444.6,129.1|0,88.15,138.5|1,439.3,139.3|0,83.55,148.95|1,434.85,149.85|0,79.8,159.75|1,431.2,160.7|0,76.85,170.8|1,428.4,171.8|0,74.75,182.05|1,426.45,183.15|0,73.5,193.45|1,425.4,194.55|0,73.15,204.9|1,425.2,206|0,73.65,216.3|1,425.85,217.4|0,75.05,227.6|1,427.45,228.7|0,77.45,238.8|1,430,239.9|0,80.75,249.75|1,433.5,250.85|0,84.95,260.4|1,437.85,261.4|0,90,270.6|1,443.1,271.55|0,96,280.35|1,449.25,281.2|0,102.8,289.55|1,456.25,290.3|0,110.4,298.05|1,464,298.7|0,118.7,305.9|1,472.5,306.35|0,127.75,312.85|1,481.7,313.15|0,137.45,318.9|1,491.5,319.05|0,147.7,324|1,501.85,323.9|0,158.35,328|1,512.65,327.7|0,169.45,330.9|1,523.8,330.35|0,180.75,332.6|1,535.2,331.85|0,192.2,333.15|1,546.6,332.1|0,203.55,332.45|1,558,331.15|0,214.8,330.5|1,569.25,328.9|0,225.8,327.2|1,580.15,325.35|0,236.35,322.75|1,590.6,320.6|0,246.35,317.15|1,600.45,314.8|0,255.65,310.55|1,609.7,307.95|0,264.3,303|1,618.1,300.2|0,272.05,294.65|1,625.7,291.65|0,279,285.55|1,632.5,282.35|0,285.05,275.8|1,638.3,272.45|0,290.15,265.55|1,643.15,262.1|0,294.25,254.85|1,647.05,251.3|0,297.35,243.85|1,649.95,240.25|0,299.45,232.6|1,651.8,228.9|0,300.55,221.2|1,652.65,217.45|0,300.6,209.75|1,652.45,206|0,299.65,198.4|1,651.2,194.65|0,297.55,187.15|1,648.85,183.45|0,294.35,176.2|1,645.35,172.55|0,290.1,165.55|1,640.85,162|0,284.8,155.45|1,635.3,152|0,278.5,145.95|1,628.7,142.65|0,271.2,137.15|1,621.15,134.05|0,263,129.2|1,612.8,126.3|0,254,122.2|1,603.55,119.55|0,244.2,116.3|1,593.5,113.95|0,233.8,111.55|1,583,109.5|0,222.9,108.1|1,571.95,106.4|0,211.65,106|1,560.65,104.7|0,200.25,105.35|1,549.2,104.4|0,188.85,106.1|1,537.8,105.6|0,177.65,108.4|1,526.65,108.3|0,166.85,112.2|1,515.95,112.45|0,156.65,117.3|1,505.9,117.95|0,147.15,123.7|1,496.65,124.7|0,138.55,131.25|1,488.25,132.55|0,130.85,139.75|1,480.85,141.3|0,124.2,149.05|1,474.5,150.85|0,118.65,159.05|1,469.25,161.05|0,114.25,169.6|1,465.2,171.75|0,111,180.55|1,462.3,182.8|0,108.95,191.85|1,460.6,194.15|0,108.15,203.25|1,460.1,205.65|0,108.5,214.7|1,460.85,217.05|0,110.1,225.95|1,462.85,228.3|0,113.05,237|1,466.2,239.25|0,117.3,247.65|1,470.8,249.7|0,122.75,257.7|1,476.6,259.6|0,129.4,267|1,483.65,268.65|0,137.15,275.35|1,491.7,276.7|0,145.9,282.65|1,500.75,283.7|0,155.55,288.75|1,510.7,289.3|0,166.2,293.2|1,521.75,293.05|0,177.55,295.7|1,533.25,295.15|0,188.9,297.1|1,544.6,296.45|0,200.3,295.55|1,555.95,297|&cannons=205.3,192.4,0,0|554.3,192.4,0,1|&coins=33.85,346.5|&name=whirlpools");
}
}
Symbol 1611 MovieClip [__Packages.levels.ye_death_spiral] Frame 0
class levels.ye_death_spiral
{
function ye_death_spiral () {
}
function getLevelText() {
return("paths=0,-64.5,324.6|0,-53.45,311.7|0,-42.45,298.8|0,-31.4,285.9|0,-20.4,273|0,-9.4,260.15|0,1.65,247.25|0,5.65,231.6|0,8.7,214.8|0,14.2,198.7|0,21.85,183.45|0,31.2,169.25|0,42,156.05|0,54.05,143.8|0,67,132.6|0,80.7,122.4|0,94.95,113.05|0,109.7,104.6|0,124.9,96.85|0,140.5,89.75|0,156.3,83.4|0,172.35,77.7|0,188.6,72.65|0,205,68.15|0,221.5,64.25|0,238.2,60.8|0,254.95,57.95|0,271.8,55.6|0,288.7,53.75|0,305.6,52.4|0,322.6,51.5|0,339.6,51.15|0,356.5,51.2|0,373.4,51.8|0,390.25,52.9|0,407.1,54.55|0,423.9,56.75|0,440.6,59.5|0,457.25,62.85|0,473.7,66.75|0,489.9,71.25|0,506,76.4|0,521.8,82.2|0,537.4,88.7|0,552.65,96|0,567.5,104.1|0,581.75,112.95|0,595.45,122.7|0,608.35,133.5|0,620.35,145.35|0,631.1,158.4|0,640.3,172.45|0,647.6,187.65|0,652.55,203.75|0,654.8,220.55|0,654.2,237.45|0,650.5,254.05|0,643.95,269.8|0,635.1,284.4|0,624.45,297.7|0,612.35,309.8|0,599.15,320.75|0,585.15,330.5|0,570.5,339.2|0,555.35,347|0,539.75,353.95|0,523.85,360.05|0,507.65,365.4|0,491.3,370|0,474.75,374|0,458.1,377.3|0,441.3,379.95|0,424.4,382|0,407.5,383.45|0,390.55,384.3|0,373.55,384.55|0,356.6,384.25|0,339.75,383.3|0,322.9,381.75|0,306.15,379.5|0,289.4,376.6|0,272.85,372.95|0,256.55,368.65|0,240.55,363.55|0,224.75,357.65|0,209.3,350.85|0,194.2,343.1|0,179.8,334.4|0,166.15,324.7|0,153.4,313.7|0,141.85,301.4|0,132,287.7|0,124.3,272.75|0,119.45,256.6|0,117.85,239.75|0,119.8,222.95|0,125.35,206.85|0,133.95,192.05|0,144.7,178.9|0,157.15,167.1|0,170.8,156.8|0,185.25,147.8|0,200.35,139.9|0,216,133.05|0,232,127.2|0,248.3,122.25|0,264.75,118.15|0,281.4,114.8|0,298.3,112.25|0,315.15,110.45|0,332.1,109.35|0,349.1,109|0,366,109.3|0,382.85,110.35|0,399.7,112.25|0,416.45,114.95|0,433,118.45|0,449.3,122.85|0,465.25,128.1|0,480.95,134.45|0,496.15,141.9|0,510.6,150.5|0,524.2,160.35|0,536.55,171.75|0,547.25,184.8|0,555.55,199.45|0,560.55,215.55|0,561.6,232.35|0,558.25,249|0,550.85,264.35|0,540.5,277.9|0,528.05,289.6|0,514.2,299.65|0,499.5,308.15|0,484.05,315.35|0,468.1,321.4|0,451.75,326.3|0,435.2,330.2|0,418.5,333.15|0,401.6,335.2|0,384.65,336.35|0,367.65,336.65|0,350.75,336.1|0,333.95,334.65|0,317.2,332.2|0,300.6,328.7|0,284.35,324.2|0,268.45,318.5|0,253.1,311.55|0,238.4,303.2|0,224.85,293.35|0,212.75,281.6|0,203,267.9|0,196.65,252.3|0,194.95,235.5|0,198.5,218.95|0,206.7,204.1|0,218.1,191.4|0,231.55,180.8|0,246.2,172.1|0,261.7,165|0,277.75,159.35|0,294.2,155|0,310.85,151.75|0,327.75,149.65|0,344.75,148.6|0,361.65,148.6|0,378.55,149.65|0,395.3,151.9|0,411.9,155.4|0,428.1,160.1|0,443.75,166.3|0,458.75,174.15|0,472.55,183.75|0,484.5,195.55|0,492.55,210.65|0,496.45,227.3|0,498.05,244|&cannons=663.7,64.95,-135,1|367.6,241.45,0,0|&coins=158,375|595.95,375|&name=ye death spiral");
}
}
Symbol 1612 MovieClip [__Packages.Path] Frame 0
class Path
{
var points;
function Path () {
points = new Array();
}
function AddPoint(xy) {
points.push(xy);
}
}
Symbol 1613 MovieClip [__Packages.Level] Frame 0
class Level
{
var rootMovie, utility, activeCannonIndex, cannonBallSpeed, loseLevel, coin, gaugePct, shownLevelCompleteDialog, shownYouLoseDialog, levelTimeStat, combosStat, maxCombosStat, maxChainStat, coinsHitStat, levelName, backgroundScreen, ballLines, numBallColors, allColorsInLine, cannons, activeCannon, coinLocations;
function Level (_rootMovie) {
rootMovie = _rootMovie;
utility = new Utility();
activeCannonIndex = 0;
cannonBallSpeed = 25 * rootMovie.speedMultiplier;
}
function Init(_stageIndex, _levelIndex) {
levelLoaded = false;
_root.sound_beepbeep.stop("beepbeep.mp3");
stageIndex = _stageIndex;
levelIndex = _levelIndex;
levelPoints = 0;
loseLevel = false;
reachedScoreStop = false;
coin = undefined;
dangerOn = false;
dangerPrevious = false;
youWin = false;
gaugePct = 0;
shownLevelCompleteDialog = false;
shownYouLoseDialog = false;
activeCannonIndex = 0;
endLevelAnimationFrameCnt = 0;
endLevelAnimationFrameTimer = 0;
endLevelAnimationDone = false;
allIntrosDone = false;
loseLevelTimer = 0;
endLevelAnimationCalled = false;
chainBonus = 0;
startTime = 0;
levelTimeStat = 0;
combosStat = 0;
maxCombosStat = 0;
maxChainStat = 0;
coinsHitStat = 0;
var _local5 = new Levels(_root);
_local5.InitLevel(this);
levelId = _local5.GetLevelId((Number(stageIndex + 1) + "-") + Number(levelIndex + 1));
_root.levelName = levelName;
_root.activeCannonIndicator_mc._visible = false;
_root.attachMovie(backgroundScreen, "background_mc", _root.background_mc.getDepth());
_root.background_mc.cacheAsBitmap = true;
_root.background_mc.opaqueBackground = true;
var _local6 = _root.attachMovie("LoadLevel", "LoadLevel_mc", _root.getNextHighestDepth());
utility.CenterMovieClip(_local6);
_local6.onUnload = function () {
_root.activeCannonIndicator_mc._visible = true;
var _local3 = 0;
while (_local3 < _root.level.cannons.length) {
var _local2 = _root.level.cannons[_local3];
_local2.out = false;
_local2.xbase = _local2._x;
_local2.ybase = _local2._y;
if (_local3 == 0) {
_local2.active = true;
_root.level.activeCannon = _local2;
_root.activeCannonIndicator_mc._x = _root.level.activeCannon._x;
_root.activeCannonIndicator_mc._y = _root.level.activeCannon._y;
} else {
_local2.active = false;
}
_local3++;
}
_root.RenderNumLives();
_root.level.levelLoaded = true;
};
_root.ShowCustomCursor(true);
}
function ClearGame() {
for (var _local2 in rootMovie) {
if (typeof(rootMovie[_local2]) == "movieclip") {
switch (_local2) {
case "LevelComplete_mc" :
case "activeCannonIndicator_mc" :
case "YouLose_mc" :
case "GameOver_mc" :
case "gauge_mc" :
case "music_mc" :
case "soundEffectsHolder_mc" :
case "mapMusicHolder_mc" :
case "ui_header" :
case "target_cursor_mc" :
break;
default :
rootMovie[_local2].removeMovieClip();
}
}
}
}
function GetTotalBallCount() {
var _local2 = 0;
for (var _local3 in ballLines) {
_local2 = _local2 + ballLines[_local3].balls.length;
}
return(_local2);
}
function EndGame() {
for (var _local2 in rootMovie) {
if (typeof(rootMovie[_local2]) == "movieclip") {
switch (_local2) {
case "GameOver_mc" :
break;
default :
rootMovie[_local2].removeMovieClip();
}
}
}
}
function GetColor() {
var _local4;
if (!reachedScoreStop) {
var _local6 = utility.randRange(1, numBallColors);
if (_local6 == 1) {
_local4 = "Blue";
} else if (_local6 == 2) {
_local4 = "Green";
} else if (_local6 == 3) {
_local4 = "Yellow";
} else if (_local6 == 4) {
_local4 = "Red";
} else if (_local6 == 5) {
_local4 = "Black";
} else if (_local6 == 6) {
_local4 = "White";
}
} else {
var _local3 = 0;
var _local2 = new Array();
for (var _local5 in allColorsInLine) {
_local2.push(_local5);
_local3++;
}
var _local6 = utility.randRange(0, _local3 - 1);
_local4 = _local2[_local6];
}
return(_local4);
}
function AddBallToCannon(cannon, ballColor) {
if (ballColor == "") {
ballColor = GetColor();
}
cannon.ball = rootMovie.attachMovie(ballColor, "ball_mc" + rootMovie.getNextHighestDepth(), rootMovie.getNextHighestDepth());
cannon.ball.gotoAndStop("face");
cannon.out = false;
cannon.ball._x = cannon._x;
cannon.ball._y = cannon._y;
cannon.swapDepths(cannon.ball);
cannon.ball.ballColor = ballColor;
cannon.ball.waypoint = 1;
cannon.ball.speed = 0;
cannon.ball.cacheAsBitmap = bitmapCacheOn;
}
function CheckCannonColors() {
if (reachedScoreStop) {
for (var _local3 in cannons) {
var _local2 = cannons[_local3];
if ((_local2.ball != undefined) && (_local2.ball != false)) {
if ((allColorsInLine[_local2.ball.ballColor] == undefined) && (_local2.ball.ballColor != "Destroyer")) {
_local2.ball.removeMovieClip();
AddBallToCannon(_local2, "");
}
}
}
}
}
function SwitchCannon(dir) {
if (dir > 0) {
if (activeCannonIndex >= (cannons.length - 1)) {
activeCannonIndex = 0;
} else {
activeCannonIndex++;
}
} else if (activeCannonIndex == 0) {
activeCannonIndex = cannons.length - 1;
} else {
activeCannonIndex--;
}
SwitchToCannon(activeCannonIndex);
}
function SwitchToCannon(cannonIndex) {
activeCannon.active = false;
activeCannonIndex = cannonIndex;
activeCannon = cannons[cannonIndex];
activeCannon.active = true;
rootMovie.activeCannonIndicator_mc._x = activeCannon._x;
rootMovie.activeCannonIndicator_mc._y = activeCannon._y;
}
function ShowEarnedPoints(xpos, ypos, points, ballColor) {
var _local2 = 255;
var _local12 = 1;
var _local9 = 1;
var _local8 = 1;
var _local10 = 128;
var _local5 = 2;
var _local7 = false;
var _local11 = false;
switch (ballColor) {
case "Blue" :
_local2 = 2179565 /* 0x2141ED */;
break;
case "Red" :
_local2 = 14291730 /* 0xDA1312 */;
break;
case "Yellow" :
_local2 = 16179717 /* 0xF6E205 */;
break;
case "Green" :
_local2 = 2387525 /* 0x246E45 */;
break;
case "Black" :
_local2 = 6182999 /* 0x5E5857 */;
break;
case "White" :
default :
_local2 = 15592684 /* 0xEDECEC */;
}
var _local13 = new flash.filters.GlowFilter(0, _local12, _local9, _local8, _local10, _local5, _local7, _local11);
if ((xpos - 65) < rootMovie.xmin) {
xpos = rootMovie.xmin + 75;
}
if ((xpos + 65) > rootMovie.xmax) {
xpos = rootMovie.xmax - 75;
}
if ((ypos - 65) < rootMovie.ymin) {
ypos = rootMovie.ymin + 75;
}
var _local4 = rootMovie.attachMovie("EarnPoints", "EarnPoints_" + rootMovie.getNextHighestDepth(), rootMovie.getNextHighestDepth(), {_x:xpos, _y:ypos});
_local4.displayColor = ballColor;
_local4.displayText = points;
}
function LabelBalls() {
var _local2 = 0;
while (_local2 < ballLines.length) {
ballLines[_local2].LabelBalls();
_local2++;
}
}
function EnterFrame() {
for (var _local18 in cannons) {
var _local3 = cannons[_local18];
if (((_local3.ball._x != undefined) && ((((_local3.ball._x <= _root.xmin) || (_local3.ball._x >= _root.xmax)) || (_local3.ball._y <= _root.ymin)) || (_local3.ball._y >= _root.ymax))) && (_local3.out)) {
_local3.ball.removeMovieClip();
_local3.ball = false;
_local3.out = false;
chainBonus = 0;
}
if (_local3.active && (!loseLevel)) {
_local3._rotation = utility.GetAngle(_local3._x, _local3._y, _root._xmouse, _root._ymouse);
_local3.cannonTop._rotation = _local3._rotation;
}
if (_local3.ball._x == undefined) {
AddBallToCannon(_local3, "");
}
if ((!_local3.out) && (_local3.active)) {
_local3.cannonTop._rotation = _local3._rotation;
} else if (_local3.out == true) {
if ((coin != undefined) && (MyHitTest(_local3.ball, coin))) {
coinsHitStat++;
if (_local3.ball._currentframe <= 47) {
_local3.ball.gotoAndPlay("pop");
}
coin.gotoAndPlay("hitCoin");
_local3.ball = false;
_local3.out = false;
_root.sound_kerching.start();
AddPoints(500);
ShowEarnedPoints(coin._x, coin._y, "+500\rPirate Coin Bonus", "Yellow");
} else {
var _local5 = 0;
while (_local5 < ballLines.length) {
var _local15 = ballLines[_local5].balls.length;
while (_local15 >= 0) {
var _local4 = ballLines[_local5].balls[_local15];
if (_local4.waypoint < 0) {
_local4._visible = false;
} else {
_local4._visible = true;
}
if (MyHitTest(_local3.ball, _local4)) {
_root.sound_push_hit.start();
_local3.ball._rotation = 0;
_local3.ball.waypoint = _local4.waypoint;
_local3.ball.travelAngle = utility.GetAngle(_local3.ball._x, _local3.ball._y, _local3.xbase, _local3.ybase);
_local3.ball.ballToCannon = utility.GetAngle(_local4._x, _local4._y, _local3.xbase, _local3.ybase);
var _local9 = Math.round(_local4.waypoint + 30);
var _local12 = Math.round(_local4.waypoint - 30);
var _local8 = ballLines[_local5].points[_local9].split(",");
var _local7 = ballLines[_local5].points[_local12].split(",");
var _local11 = utility.md(_local3.ball._x, _local3.ball._y, _local8[0], _local8[1]);
var _local10 = utility.md(_local3.ball._x, _local3.ball._y, _local7[0], _local7[1]);
if (_local11 < _local10) {
_local3.ball.closeToFront = true;
} else {
_local3.ball.closeToFront = false;
}
ballLines[_local5].pushBalls.push(new Array(_local3.ball, _local15, "", 0));
_local3.ball = false;
_local3.out = false;
_local3.play();
break;
}
_local15--;
}
_local5++;
}
}
_local3.ball._y = _local3.ball._y + ((-cannonBallSpeed) * Math.cos((utility.mp / 180) * _local3.angle));
_local3.ball._x = _local3.ball._x + (cannonBallSpeed * Math.sin((utility.mp / 180) * _local3.angle));
}
if (_local3.ball && (!_local3.out)) {
var _local13 = {x:-30.5 + (_root.ballRadius * 2), y:-28};
_local3.localToGlobal(_local13);
_local3.ball._x = _local13.x;
_local3.ball._y = _local13.y;
_local3.ball._rotation = _local3._rotation;
}
}
if (Number(_root.ui_header.gamePoints_txt.text) < gamePoints) {
_root.ui_header.gamePoints_txt.text = Number(_root.ui_header.gamePoints_txt.text) + 10;
} else if (Number(_root.ui_header.gamePoints_txt.text) > gamePoints) {
_root.ui_header.gamePoints_txt.text = gamePoints;
}
rootMovie.gamePoints = gamePoints;
gaugePct = levelPoints / stopScore;
if ((gaugePct >= 1) && (!reachedScoreStop)) {
reachedScoreStop = true;
}
allColorsInLine = new Object();
var _local21 = 0;
var _local22 = true;
dangerOn = false;
var _local15 = 0;
while (_local15 < ballLines.length) {
var _local6 = ballLines[_local15];
if (!_local6.isIntroDone) {
_local22 = false;
}
if (_local6.dangerOn) {
dangerOn = true;
if (!dangerPrevious) {
_root.sound_beepbeep.start(0, 1000000);
dangerPrevious = true;
}
}
if (reachedScoreStop && (!_local6.sentScoreStopBackup)) {
_local6.BackupBalls();
}
if (utility.randRange(1, 1800) == 88) {
_local6.AddPowerUp();
}
if ((((!reachedScoreStop) && (utility.randRange(1, 1800) == 88)) && (!loseLevel)) && (!youWin)) {
AddCoin();
}
TimeoutCoin();
_local6.EnterFrame();
var _local17 = _local6.balls.length;
_local21 = _local21 + _local17;
if ((((!loseLevel) && (reachedScoreStop == true)) && (_local17 == 0)) && (_local6.raiseFlag == false)) {
var _local14 = _root.attachMovie("RaiseFlag", "RaiseFlag_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local16 = _local6.points[_local6.points.length - 1].split(",");
_local14.cacheAsBitmap = true;
_local14._x = _local16[0];
_local14._y = _local16[1];
_local6.raiseFlag = true;
}
for (var _local18 in _local6.colorsInLine) {
if (allColorsInLine[_local6.colorsInLine[_local18]] == undefined) {
allColorsInLine[_local18] = 1;
}
}
_local15++;
}
if (dangerPrevious && (!dangerOn)) {
_root.sound_beepbeep.stop("beepbeep.mp3");
dangerPrevious = false;
}
if ((!allIntrosDone) && (_local22)) {
allIntrosDone = _local22;
_root.stopWatch.Start();
}
CheckCannonColors();
if ((((reachedScoreStop && (_local21 == 0)) && (youWin == false)) && (loseLevel != true)) && (!shownLevelCompleteDialog)) {
_root.stopWatch.Stop();
if (!endLevelAnimationCalled) {
_root.StopBackgroundMusic();
_root.sound_levelComplete.start();
}
if (EndLevelBonusAnimation()) {
if (Number(_root.ui_header.gamePoints_txt.text) < gamePoints) {
_root.ui_header.gamePoints_txt.text = gamePoints;
}
youWin = true;
shownLevelCompleteDialog = true;
var _local25 = _root.level.levelIndex + 1;
var _local24 = _root.level.stageIndex;
var _local27 = new Levels(_root);
if (_local25 >= _local27.stageList[_root.level.stageIndex].split(",").length) {
_local25 = 0;
_local24++;
}
if (_local24 > stageIndex) {
var _local28 = _root.attachMovie("StageComplete", "StageComplete_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
utility.CenterMovieClip(_local28);
} else {
ShowLevelCompleteDialog();
}
}
}
if ((((_local21 == 0) && (loseLevel)) && (!shownYouLoseDialog)) && ((getTimer() - loseLevelTimer) > 2500)) {
shownYouLoseDialog = true;
_root.PlayInsult();
_root.lives--;
_root.RenderNumLives();
if (_root.lives > 0) {
var _local23 = rootMovie.attachMovie("YouLose", "YouLose_mc" + rootMovie.getNextHighestDepth(), rootMovie.getNextHighestDepth());
_local23._x = 355.5 - (_local23._width / 2);
_local23._y = 200 - (_local23._height / 2);
_local23.onUnload = function () {
_root.level.ClearGame();
_root.PlayBackgroundMusic(true);
_root.level.Init(_root.level.stageIndex, _root.level.levelIndex);
this.removeMovieClip();
};
} else {
var _local26 = rootMovie.attachMovie("GameOver", "GameOver_mc" + rootMovie.getNextHighestDepth(), rootMovie.getNextHighestDepth());
_local26._x = 55.5;
_local26._y = 25;
}
}
}
function ExplodeBall(snapMe, ballLineIndex, newPoints, pointsDisplay, ballColor, xCoord, yCoord) {
if (snapMe == true) {
_root.level.ballLines[ballLineIndex].CheckSnap();
}
if (!isNaN(newPoints)) {
_root.level.AddPoints(newPoints);
_root.level.ShowEarnedPoints(xCoord, yCoord, pointsDisplay, ballColor);
}
}
function LoseLevel() {
if (loseLevel == false) {
var _local3 = 0;
_root.sound_beepbeep.stop("beepbeep.mp3");
_root.StopBackgroundMusic();
_root.arrgh_sound.start();
loseLevelTimer = getTimer();
loseLevel = true;
}
}
function AddPoints(newpoints) {
levelPoints = levelPoints + newpoints;
gamePoints = gamePoints + newpoints;
extraLifePointCounter = extraLifePointCounter + newpoints;
if (extraLifePointCounter >= extraLifeAt) {
_root.GiveExtraLife();
}
}
function MyHitTest(shape1, shape2) {
var _local2 = false;
var _local3 = utility.md(shape2._x, shape2._y, shape1._x, shape1._y);
if ((!isNaN(_local3)) && (_local3 <= 30)) {
_local2 = true;
}
return(_local2);
}
function EndLevelBonusAnimation() {
endLevelAnimationCalled = true;
if (endLevelAnimationDone && ((getTimer() - endLevelAnimationFrameTimer) > 3000)) {
return(true);
}
if (endLevelAnimationDone) {
return(false);
}
endLevelAnimationFrameCnt++;
if ((endLevelAnimationFrameCnt % 2) == 0) {
var _local6 = true;
for (var _local7 in ballLines) {
var _local3 = ballLines[_local7];
if (_local3.lastRemovedWaypoint < _local3.points.length) {
var _local4 = _local3.points[int(_local3.lastRemovedWaypoint)].split(",");
_local6 = false;
var _local5 = _root.attachMovie("little_explode", "little_explode_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local5._x = _local4[0];
_local5._y = _local4[1];
AddPoints(100);
ShowEarnedPoints(_local4[0], _local4[1], "+100", "Yellow");
_root.sound_remove.start();
}
_local3.lastRemovedWaypoint = _local3.lastRemovedWaypoint + 100;
}
if (_local6 && (endLevelAnimationFrameTimer == 0)) {
endLevelAnimationFrameTimer = getTimer();
endLevelAnimationDone = true;
_local6 = false;
}
return(_local6);
}
return(false);
}
function ShowLevelCompleteDialog() {
var _local3;
if (_root.isRegistered) {
_local3 = rootMovie.attachMovie("LevelComplete", "LevelComplete_mc", rootMovie.getNextHighestDepth());
} else {
_local3 = rootMovie.attachMovie("LevelCompleteNotRegistered", "LevelComplete_mc", rootMovie.getNextHighestDepth());
}
_local3._x = 0;
_local3._y = 0;
levelTimeStat = _root.stopWatch.elapsedTime;
totalTimeStat = totalTimeStat + levelTimeStat;
_local3.totalTime = totalTimeStat;
_local3.levelTime = levelTimeStat;
_local3.levelPoints = levelPoints;
_local3.maxChain = maxChainStat;
_local3.maxCombo = maxCombosStat;
_local3.combos = combosStat;
_local3.coins = coinsHitStat;
}
function GameOverDialogClosed_EndGame() {
gameOver = true;
_root.level.EndGame();
_root.level = new Level();
_root.gotoAndStop("titleScreen");
}
function GameOverDialogClosed_ContinueGame() {
_root.lives = 3;
levelLoaded = false;
levelPoints = 0;
gamePoints = 0;
extraLifePointCounter = 0;
var _local3 = _root.attachMovie("overworld", "overworld_mc", _root.getNextHighestDepth());
_local3.mapMode = "selection";
}
function LevelCompleteDialogClosed() {
if ((levelName == "2-4") && (_root.isGold != true)) {
var _local8 = rootMovie.attachMovie("BuyMe", "BuyMe_mc", _root.getNextHighestDepth());
return(undefined);
}
if (levelName == "15-7") {
var _local7 = rootMovie.attachMovie("FinishGame", "FinishGame_mc", _root.getNextHighestDepth());
return(undefined);
}
var _local3 = _root.level.levelIndex + 1;
var _local5 = _root.level.stageIndex;
var _local6 = new Levels(_root);
if (_local3 >= _local6.stageList[_root.level.stageIndex].split(",").length) {
_local3 = 0;
_local5++;
}
var _local4 = _root.attachMovie("overworld", "overworld_mc", _root.getNextHighestDepth());
_local4.highLevel = ((_local5 + 1) + "-") + (_local3 + 1);
_local4.mapMode = "display";
}
function OverworldMapClosed() {
_root.level.ClearGame();
_root.PlayNextSong();
var _local2 = _root.level.levelIndex + 1;
var _local3 = _root.level.stageIndex;
var _local4 = new Levels(_root);
if (_local2 >= _local4.stageList[_root.level.stageIndex].split(",").length) {
_local2 = 0;
_local3++;
}
_root.level.Init(_root.level.stageIndex, _root.level.levelIndex);
}
function SaturateBalls() {
var _local8 = 1.5;
var _local6 = new Array();
_local6 = _local6.concat([_local8, 0, 0, 0, 0]);
_local6 = _local6.concat([0, _local8, 0, 0, 0]);
_local6 = _local6.concat([0, 0, _local8, 0, 0]);
_local6 = _local6.concat([0, 0, 0, 1, 0]);
var _local4 = new flash.filters.ColorMatrixFilter(_local6);
for (var _local7 in ballLines) {
var _local3 = ballLines[_local7];
for (var _local5 in _local3.balls) {
var _local2 = _local3.balls[_local5];
_local2.filters = new Array(_local4);
}
}
}
function SaturateBall(ball) {
var _local2 = 1.5;
var _local1 = new Array();
_local1 = _local1.concat([_local2, 0, 0, 0, 0]);
_local1 = _local1.concat([0, _local2, 0, 0, 0]);
_local1 = _local1.concat([0, 0, _local2, 0, 0]);
_local1 = _local1.concat([0, 0, 0, 1, 0]);
var _local3 = new flash.filters.ColorMatrixFilter(_local1);
ball.filters = new Array(_local3);
}
function BitmapCacheBalls(cacheOn) {
trace(bitmapCacheOn);
bitmapCacheOn = cacheOn;
for (var _local6 in ballLines) {
var _local2 = ballLines[_local6];
for (var _local5 in _local2.balls) {
var _local3 = (_local2.balls[_local5].cacheAsBitmap = cacheOn);
}
}
}
function AddCoin() {
if (((coinLocations.length > 0) && (_root.stopWatch.elapsedTime != undefined)) && (coin.addTime == undefined)) {
_root.sound_coin_arrive.start();
var _local4 = utility.randRange(0, coinLocations.length - 1);
coin = _root.attachMovie("piratecoin_mc", "piratecoin_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
var _local3 = coinLocations[_local4].split(",");
coin._x = Number(_local3[0]);
coin._y = Number(_local3[1]);
coin.addTime = _root.stopWatch.elapsedTime;
}
}
function AddDestroyer() {
activeCannon.ball.removeMovieClip();
AddBallToCannon(activeCannon, "Destroyer");
}
function TimeoutCoin() {
if (coin.addTime != undefined) {
var _local3 = _root.stopWatch.elapsedTime - coin.addTime;
if ((coin._currentframe == 15) && (_local3 > 30000)) {
_root.sound_coinTimeout.start();
coin.gotoAndPlay("coinTimeout");
}
}
}
function AddCannon(x, y, rotation) {
var _local4 = _root.attachMovie("cannon_top", ("cannon_mc" + _root.getNextHighestDepth()) + "_top", _root.getNextHighestDepth());
var _local3 = _root.attachMovie("cannon", "cannon_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3._x = x;
_local3._y = y;
_local3._rotation = rotation;
_local4._x = x;
_local4._y = y;
_local4._rotation = rotation;
_local3.cannonTop = _local4;
_local3.cannonIndex = cannons.length;
_local3.onPress = function () {
_root.level.SwitchToCannon(this.cannonIndex);
};
_local3.onRollOver = function () {
_root.target_cursor_mc._visible = false;
Mouse.show();
};
_local3.onRollOut = function () {
_root.target_cursor_mc._visible = true;
Mouse.hide();
};
var _local5 = _root.attachMovie("smoke", "cannon_smoke_mc" + _local3.cannonIndex, _root.getNextHighestDepth());
_local5.smoke_raw_mc.gotoAndStop("End");
cannons.push(_local3);
return(_local3);
}
function AddBallLine(ballLine) {
ballLines.push(ballLine);
}
function AddCoinLocation(x, y) {
coinLocations.push((x + ",") + y);
}
function BlackbeardSays() {
var _local2 = utility.randRange(0, 7);
switch (_local2) {
case 0 :
return("Fill ye blue bar of power to stop more cannonballs from coming out");
case 1 :
return("Shoot the pirate coin for a 500 point bonus or I'll devour yer parrot!");
case 2 :
return("Keep yer chain bonus to rack up huge points, ye bilge rat!");
case 3 :
return("If yer cannonball has no match, fire it off into the unknown...ya sea dog!");
case 4 :
return("Earn a new life every 30,000 points, ya salty swine!");
case 5 :
return("Blast the blinking balls for extra help, ya cabin boy");
case 6 :
return("Well, shiver me timbers! Ye can also use yer mouse scroll wheel to change cannons!");
case 7 :
return("Close a gap by placing the same color cannonball on each end, matey!");
case 8 :
return("Changes your song with the arrow keys. Yo ho ho!");
}
}
var stageIndex = 0;
var levelIndex = 0;
var levelId = 0;
var ballLineControlIndex = 0;
var levelPoints = 0;
var gamePoints = 0;
var chainBonus = 0;
var levelSpeed = 1;
var gameOver = false;
var allIntrosDone = false;
var dangerOn = false;
var dangerPrevious = false;
var stopScore = 0;
var reachedScoreStop = false;
var youWin = false;
var levelLoaded = false;
var endLevelAnimationFrameCnt = 0;
var endLevelAnimationFrameTimer = 0;
var endLevelAnimationDone = false;
var loseLevelTimer = 0;
var startTime = 0;
var totalTimeStat = 0;
var extraLifeAt = 30000;
var extraLifePointCounter = 0;
var bitmapCacheOn = false;
var endLevelAnimationCalled = false;
}
Symbol 1614 MovieClip [__Packages.Levels] Frame 0
class Levels
{
var rootMovie;
function Levels (_rootMovie) {
rootMovie = _rootMovie;
stageList.push("1,2,3,4");
stageList.push("1,2,3,4");
}
function GetLevelId(levelName) {
var _local2 = 0;
while (_local2 < levelList.length) {
if (levelList[_local2] == levelName) {
return(_local2);
}
_local2++;
}
}
function GetLevelBackground(levelName) {
}
function GetDefaultLevelInit(level) {
switch (level.backgroundScreen) {
case "ye_death_spiral" :
var _local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "Brethren_Of_The_Coast" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "crossbones" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "hands_of_doom" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
var _local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 3;
level.scoreStopBackupDistancePct = 0.75;
break;
case "shipping_lanes" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "scurvy_serpent" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 1000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "high_seas" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "whirlpools" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
_local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "raid_of_terror" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1.25;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "dead_reckoning" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1.25;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 10;
level.scoreStopBackupDistancePct = 0.25;
break;
case "bermuda_triangle" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1.25;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "come_about" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1.25;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "Shiver_Me_Timbers" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
_local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.7;
break;
case "treasure_hunt" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "hold_the_line" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 8;
level.scoreStopBackupDistancePct = 0.5;
break;
case "behind_these_pirate_eyes" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "treacherous_reef" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "sea_monster" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.7;
break;
case "Isthmus_of_Panama" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
_local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local4);
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.5;
break;
case "trade_winds" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 1800;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "sands_of_time" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "slimey_pete" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "landfall" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "plunder_path" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
_local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 8;
level.scoreStopBackupDistancePct = 0.7;
break;
case "powder_monkey" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
level.ballLines[0].numBallsStartPct = 0.5;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.25;
break;
case "shipwreck_cove" :
_local4 = new BallLine(_root);
_local4.myIndex = 0;
level.AddBallLine(_local4);
_local3 = new BallLine(_root);
_local3.myIndex = 1;
level.AddBallLine(_local3);
level.ballLines[0].numBallsStartPct = 0.25;
level.ballLines[1].numBallsStartPct = 0.25;
level.levelSpeed = 1;
level.levelMaxSpeed = 1;
level.levelMinSpeed = 0.5;
level.stopScore = 2000;
level.numBallColors = 4;
level.repeatOdds = 6;
level.scoreStopBackupDistancePct = 0.7;
}
}
function InitLevel(level) {
level.levelName = ((level.stageIndex + 1) + "-") + (level.levelIndex + 1);
_root.level.ballLines = new Array();
level.backgroundScreen = GetLevelBackground(level.levelName);
switch (level.levelName) {
case "1-1" :
level.backgroundScreen = "ye_death_spiral";
GetDefaultLevelInit(level);
break;
case "1-2" :
level.backgroundScreen = "Brethren_Of_The_Coast";
GetDefaultLevelInit(level);
break;
case "1-3" :
level.backgroundScreen = "crossbones";
GetDefaultLevelInit(level);
break;
case "1-4" :
level.backgroundScreen = "hands_of_doom";
GetDefaultLevelInit(level);
break;
case "2-1" :
level.backgroundScreen = "shipping_lanes";
GetDefaultLevelInit(level);
break;
case "2-2" :
level.backgroundScreen = "scurvy_serpent";
GetDefaultLevelInit(level);
break;
case "2-3" :
level.backgroundScreen = "high_seas";
GetDefaultLevelInit(level);
break;
case "2-4" :
level.backgroundScreen = "whirlpools";
GetDefaultLevelInit(level);
}
if (_root.easyMode == true) {
level.stopScore = 30;
level.numBallColors = 2;
for (var _local4 in level.ballLines) {
level.ballLines[_local4].numBallsStart = 5;
}
}
}
var stageList = new Array();
var levelList = new Array("1-1", "1-2", "1-3", "1-4", "2-1", "2-2", "2-3", "2-4");
}
Symbol 1615 MovieClip [__Packages.BallLine] Frame 0
class BallLine
{
var rootMovie, utility, points, snapBalls, pushBalls, knockbackBalls, combo, balls, myIndex, pushSpeed, snapSpeed, arrows, introFrameCnt, dangerOn, raiseFlag, numBallsStart, dangerZone, colorsInLine, path, lastRemovedWaypoint, introArrowIndex, numBallsStartPct, fireburn;
function BallLine (_rootMovie) {
rootMovie = _rootMovie;
utility = new Utility();
points = new Array();
snapBalls = new Array();
pushBalls = new Array();
knockbackBalls = new Array();
combo = 1;
balls = new Array();
myIndex = 0;
pushSpeed = 6 * _root.speedMultiplier;
snapSpeed = 15 * _root.speedMultiplier;
arrows = new Array();
introFrameCnt = 0;
dangerOn = false;
raiseFlag = false;
sentScoreStopBackup = false;
pushForwardCount = -1;
pushForwardFound = false;
slowDownBallEffectOn = false;
slowDownBallEffectEndTime = 0;
isIntroDone = false;
}
function EnterFrame() {
if ((!isIntroDone) && (!_root.level.allIntrosDone)) {
DoIntro();
return(undefined);
}
DoDanger();
var _local13 = balls.length;
var _local22 = _root.level.GetTotalBallCount();
if (numBallsStartAdded <= numBallsStart) {
var _local20 = "";
if ((_local13 > 0) && (utility.randRange(1, _root.level.repeatOdds) == 1)) {
_local20 = balls[_local13 - 1].ballColor;
}
AddBall(_local20);
numBallsStartAdded++;
if ((balls.length % 3) == 0) {
_root.sound_little_hit.start();
}
} else if (((((_local13 == 0) || (balls[_local13 - 1].waypoint >= 30)) && (rootMovie.level.loseLevel == false)) && (_root.level.reachedScoreStop == false)) && (_local22 < _root.maxBallCount)) {
var _local20 = "";
if ((_local13 > 0) && (utility.randRange(1, _root.level.repeatOdds) == 1)) {
_local20 = balls[_local13 - 1].ballColor;
}
AddBall(_local20);
}
var _local12 = balls[balls.length - 1];
var _local14 = balls[0];
var _local21;
var _local19;
var _local17;
var _local18;
if (backupBalls && (!backupBallsWaypointReached)) {
if (_local14.waypoint < backupBallsToWaypoint) {
backupBallsWaypointReached = true;
backupBalls = false;
}
}
if (rootMovie.level.loseLevel) {
_local21 = _local12;
_local12.speed = loseBallSpeed * rootMovie.speedMultiplier;
_local17 = _local12.waypoint + _local12.speed;
_local18 = 1;
_local19 = balls.length - 1;
} else if (backupBalls && (!backupBallsWaypointReached)) {
_local21 = _local14;
_local14.speed = backupBallSpeed * rootMovie.speedMultiplier;
_local18 = -1;
_local17 = _local14.waypoint - _local14.speed;
_local19 = 0;
} else {
var _local15 = _root.level.levelMaxSpeed * rootMovie.speedMultiplier;
if (pushForwardCount > 0) {
var _local23 = balls[balls.length - pushForwardCount];
if (_local23.waypoint > dangerZone) {
_local15 = _root.level.levelMinSpeed * rootMovie.speedMultiplier;
}
}
if ((balls.length == 1) && (balls[0].waypoint > dangerZone)) {
_local15 = _root.level.levelMinSpeed * rootMovie.speedMultiplier;
}
if (slowDownBallEffectOn == true) {
_local15 = 0.25;
if (slowDownBallEffectEndTime < getTimer()) {
slowDownBallEffectOn = false;
}
}
_local12.speed = _local15;
_local21 = _local12;
_local17 = _local12.waypoint + _local12.speed;
_local18 = 1;
_local19 = balls.length - 1;
}
pushForwardFound = false;
pushForwardCount = -1;
MoveBall(_local19, _local17, _local18, "EnterFrame");
SnapBalls();
colorsInLine = new Object();
for (var _local16 in balls) {
var _local3 = balls[_local16];
if (((_root.AnimateBalls == true) && (!isNaN(_local3.waypoint))) && (_local3._currentframe <= 47)) {
var _local7 = int(_local3.waypoint);
var _local5 = int((_local7 % 94) / 2);
if (_local5 > 47) {
_local5 = 47;
} else if (_local5 == 0) {
_local5 = 1;
}
_local3.gotoAndStop(_local5);
var _local6 = points[_local7 + 1].split(",");
if (_local6 != undefined) {
var _local11 = int(utility.GetAngle(_local3._x, _local3._y, _local6[0], _local6[1])) - 90;
_local3._rotation = _local11;
}
}
colorsInLine[_local3.ballColor] = 1;
if (_local3.waypoint <= (points.length - 15)) {
var _local4 = utility.mround(_local3.waypoint);
if (_local4 < 0) {
_local4 = 0;
}
var _local8 = points[_local4].split(",");
var _local9 = Number(_local8[0]);
var _local10 = Number(_local8[1]);
_local3._x = _local9;
_local3._y = _local10;
if ((_local3.powerUp != undefined) && (_local4 > 30)) {
if ((_root.stopWatch.elapsedTime - _local3.powerUp.addTime) >= 20000) {
_local3.powerUp.goAway = true;
} else if (!_root.AnimateBalls) {
var _local6 = points[_local4 - 30].split(",");
var _local11 = utility.GetAngle(_local3._x, _local3._y, _local6[0], _local6[1]);
_local3.powerUp._rotation = _local11 + 90;
}
}
} else {
rootMovie.level.LoseLevel();
balls.splice(int(_local16), 1);
if (_local3._currentframe <= 47) {
_local3.gotoAndPlay("pop");
}
}
}
PushBalls();
}
function AddBall(ballColor, waypoint) {
if (balls.length > 0) {
balls[balls.length - 1].speed = 0;
}
if (waypoint == undefined) {
waypoint = 0;
}
if (ballColor == "") {
ballColor = _root.level.GetColor();
}
var _local3 = rootMovie.attachMovie(ballColor, "ball_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3.ballColor = ballColor;
_local3._x = path[0].split(",")[0];
_local3._y = path[0].split(",")[1];
_local3.waypoint = waypoint;
_local3.speed = 0;
_local3.cacheAsBitmap = _root.level.bitmapCacheOn;
_local3.gotoAndStop("face");
balls.push(_local3);
}
function CheckSnap() {
var _local14 = new Array();
var _local12 = false;
var _local10 = "";
var _local13 = "";
var _local15 = false;
var _local7 = 0;
var _local9 = 0;
var _local11 = 0;
var _local8 = balls[balls.length - 1];
var _local3 = balls.length - 2;
while (_local3 >= 0) {
_local7 = 0;
var _local6 = balls[_local3];
_local8 = balls[_local3 + 1];
if (((_local6.waypoint - _local8.waypoint) > 31) && (_local6.ballColor == _local8.ballColor)) {
_local9 = _local3 + 1;
_local7 = _local3;
var _local5 = _local6;
var _local2 = _local3 - 1;
while (_local2 >= 0) {
var _local4 = balls[_local2];
if ((_local4.waypoint - _local5.waypoint) > 31) {
_local3 = _local2;
break;
}
_local7 = _local2;
_local5 = _local4;
_local2--;
}
_local3 = _local2;
snapBalls.push(new Array(_local7, _local9, balls[_local9].waypoint + (rootMovie.ballRadius * 2)));
}
_local8 = _local6;
_local3--;
}
}
function SnapBalls() {
if (snapBalls.length > 0) {
var _local4 = 0;
var _local9 = Number(snapBalls[_local4][0]);
var _local8 = Number(snapBalls[_local4][1]);
var _local7 = Number(snapBalls[_local4][2]);
var _local3 = balls[_local9];
var _local5 = balls[_local8 - 1];
var _local10 = balls[_local8];
_local3.speed = -snapSpeed;
var _local6;
if (combo > 1) {
_local6 = (_local7 + 30) - (combo * 30);
} else {
_local6 = _local7;
}
if (_local5.waypoint > _local6) {
MoveBall(_local9, _local3.waypoint + _local3.speed, -1, "SnapBalls");
} else {
_root.sound_little_hit.start();
_local3.speed = 0;
snapBalls.splice(_local4, 1);
CheckRemove(_local5);
}
}
}
function PushBalls() {
for (var _local22 in pushBalls) {
combo = 1;
var _local10 = Number(pushBalls[_local22][2]);
var _local20 = pushBalls[_local22][3];
pushBalls[_local22][3]++;
var _local2 = MovieClip(pushBalls[_local22][0]);
var _local5;
var _local6 = Number(pushBalls[_local22][1]);
var _local11 = true;
var _local12 = true;
if (_local2.closeToFront) {
_local5 = _local6 - 1;
} else {
_local5 = _local6;
}
if (_local5 < 0) {
_local12 = false;
}
if ((_local5 + 1) >= balls.length) {
_local11 = false;
}
var _local3 = MovieClip(balls[_local5]);
var _local16 = MovieClip(balls[_local5 + 1]);
var _local7;
var _local4;
_local7 = balls[_local6];
if (_local2.closeToFront) {
_local4 = _local7.waypoint + (rootMovie.ballRadius * 2);
} else {
_local4 = (_local7.waypoint - (rootMovie.ballRadius * 2)) + 15;
}
var _local8 = points[Math.round(_local4)].split(",");
var _local18 = Number(_local8[0]);
var _local17 = Number(_local8[1]);
var _local9 = utility.md(_local2._x, _local2._y, _local18, _local17);
var _local13 = false;
if (!isNaN(_local10)) {
var _local19 = _local10 - _local9;
if ((_local10 < _local9) && (_local19 < 0)) {
_local13 = true;
}
}
if ((_local9 < 5) || (_local13)) {
_local2._visible = true;
_local3.speed = 0;
if (_local2.closeToFront) {
_local2.waypoint = _local7.waypoint + 30;
balls.splice(_local6, 0, _local2);
} else {
_local2.waypoint = _local7.waypoint - 30;
balls.splice(_local6 + 1, 0, _local2);
}
pushBalls.splice(int(_local22), 1);
var _local21 = CheckRemove(_local2, "PushBalls");
} else {
pushBalls[_local22][2] = _local9;
if (_local2.closeToFront) {
if (_local12 && ((_local4 - _local3.waypoint) < 30)) {
_local3.speed = pushSpeed;
var _local14 = _local3.waypoint + _local3.speed;
if ((_local14 - _local4) <= 30) {
MoveBall(_local5, _local14, 1, "PushBalls");
}
}
} else if (_local11 && ((_local4 - _local16.waypoint) < 30)) {
_local3.speed = pushSpeed;
var _local14 = _local3.waypoint + _local3.speed;
if ((_local14 - _local4) <= 30) {
MoveBall(_local5, _local14, 1, "PushBalls");
}
}
_local2.waypoint = _local4;
var _local15 = utility.GetAngle(_local2._x, _local2._y, _local8[0], _local8[1]);
_local2._x = _local2._x + (pushSpeed * Math.sin((utility.mp / 180) * _local15));
_local2._y = _local2._y + ((-pushSpeed) * Math.cos((utility.mp / 180) * _local15));
}
}
}
function CheckRemove(ball, caller) {
var _local5 = new Array();
var _local12 = false;
var _local15 = false;
var _local4 = 0;
while (_local4 < balls.length) {
var _local3 = balls[_local4];
var _local8 = balls[_local4 - 1];
var _local7 = _local8.waypoint - _local3.waypoint;
var _local6 = (rootMovie.ballRadius * 2) + 7.5;
if (_local4 == 0) {
_local7 = _local6 - 5;
}
if ((_local3.ballColor == ball.ballColor) && ((_local7 <= _local6) || (_local8.ballColor != ball.ballColor))) {
if (_local3 == ball) {
_local12 = true;
}
_local5.push(_local4);
} else {
if (_local12) {
break;
}
_local5 = new Array();
}
_local4++;
}
if (_local5.length >= 3) {
_local15 = true;
var _local17 = _local5[0] - 1;
var _local13 = _local5.length * 10;
var _local14;
if (caller == "PushBalls") {
rootMovie.level.chainBonus++;
if (rootMovie.level.chainBonus >= 5) {
_local13 = _local13 * rootMovie.level.chainBonus;
}
_local14 = "+" + String(_local13);
if (_root.level.maxChainStat < _root.level.chainBonus) {
_root.level.maxChainStat = _root.level.chainBonus;
}
if (rootMovie.level.chainBonus >= 5) {
_root.sound_chainbonus.start();
_local14 = _local14 + ("\rChain Bonus x" + String(rootMovie.level.chainBonus));
}
} else {
caller = "SnapBalls";
if (caller) {
combo++;
if (combo >= 1) {
_local13 = _local13 * (combo + 1);
}
_local14 = "+" + String(_local13);
if (combo > 1) {
_root.level.combosStat++;
if (_root.level.maxCombosStat < combo) {
_root.level.maxCombosStat = combo;
}
_local14 = _local14 + ("\rCombo Bonus x" + String(combo));
}
}
}
_local4 = _local5.length - 1;
while (_local4 >= 0) {
var _local9 = _local5[_local4];
var _local3 = balls[_local9];
if (_local4 == 0) {
_local3.snapMe = true;
}
if (_local4 == Math.round((_local5.length - 1) / 2)) {
_local3.newPoints = _local13;
_local3.pointsDisplay = _local14;
}
if (_local3._currentframe <= 47) {
_local3.gotoAndStop("pop");
}
_local3.ballLineIndex = myIndex;
var _local10 = Number(_local5[_local4]);
if (_local3.powerUp != undefined) {
if (_local3.powerUp.Type == "BackwardsBall") {
backupBallsToWaypoint = balls[0].waypoint - 400;
if (backupBallsToWaypoint < 0) {
backupBallsToWaypoint = 0;
}
backupBallsWaypointReached = false;
backupBalls = true;
_root.sound_whoosh.start();
_root.level.ShowEarnedPoints(_local3._x, _local3._y - 60, "Riptide!", _local3.ballColor);
} else if (_local3.powerUp.Type == "BoomBall") {
var boomEffect = _root.attachMovie("BoomEffect", "BoomEffect_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
boomEffect._x = _local3._x;
boomEffect._y = _local3._y;
boomEffect.play();
boomEffect.onUnload = function () {
_root.level.ballLines[this.ballLineIndex].CheckSnap();
boomEffect.removeMovieClip();
};
_root.sound_boom_ball.start();
} else if (_local3.powerUp.Type == "SlowDownBall") {
_root.sound_slowdown.start();
slowDownBallEffectOn = true;
slowDownBallEffectEndTime = getTimer() + 8000;
_root.level.ShowEarnedPoints(_local3._x, _local3._y - 60, "Dead Calm", _local3.ballColor);
}
}
lastRemovedWaypoint = _local3.waypoint;
balls.splice(_local10, 1);
_local4--;
}
} else {
_local15 = false;
if (caller == "PushBalls") {
rootMovie.level.chainBonus = 0;
}
combo = 0;
_root.level.ballLines[myIndex].CheckSnap();
}
if (_local15) {
_root.PlayComboSound(combo);
}
return(_local15);
}
function MoveBall(ballIndex, newwaypoint, dir, origCaller) {
var _local3;
var _local5 = true;
if (ballIndex >= 0) {
var _local9 = balls[ballIndex];
if (dir > 0) {
var _local10 = balls[ballIndex - 1];
var _local6 = _local10.waypoint;
if (_local6 > (newwaypoint + 30)) {
_local3 = _local6;
_local5 = false;
pushForwardFound = true;
} else {
_local3 = newwaypoint + 30;
}
if ((origCaller == "EnterFrame") && (pushForwardFound == false)) {
pushForwardCount++;
}
} else {
var _local10 = balls[ballIndex + 1];
var _local6 = _local10.waypoint;
if ((_local6 + 30) <= newwaypoint) {
_local5 = false;
_local3 = _local6;
} else {
_local3 = newwaypoint - 30;
}
}
_local9.waypoint = newwaypoint;
if (dir > 0) {
if (ballIndex > 0) {
MoveBall(ballIndex - 1, _local3, dir, origCaller);
}
} else if (ballIndex < (balls.length - 1)) {
MoveBall(ballIndex + 1, _local3, dir, origCaller);
}
}
return(undefined);
}
function LabelBalls() {
var _local2 = 0;
while (_local2 < balls.length) {
balls[_local2].myindex = String(_local2);
_local2++;
}
}
function BackupBalls() {
var _local2 = balls[0];
sentScoreStopBackup = true;
backupBallsWaypointReached = false;
backupBallsToWaypoint = dangerZone - 240;
if (backupBallsToWaypoint < 0) {
backupBallsToWaypoint = 0;
}
backupBalls = true;
}
function CalculatePoints() {
var _local18 = Number(path.points[0].split(",")[0]);
var _local17 = Number(path.points[0].split(",")[1]);
var _local28 = 1;
var _local26 = path.points[1].split(",")[0];
var _local27 = path.points[1].split(",")[1];
var _local29 = utility.GetAngle(_local18, _local17, _local26, _local27);
var _local24 = 0;
while (_local24 < 100000000) {
var _local33 = utility.md(_local18, _local17, _local26, _local27);
if (_local33 <= 1) {
if (_local28 < (path.points.length - 1)) {
_local28++;
var _local22 = path.points[_local28].split(",");
_local26 = Number(_local22[0]);
_local27 = Number(_local22[1]);
_local29 = utility.GetAngle(_local18, _local17, _local26, _local27);
} else {
break;
}
}
_local18 = _local18 + (1 * Math.sin((utility.mp / 180) * _local29));
_local17 = _local17 + (-1 * Math.cos((utility.mp / 180) * _local29));
points.push((_local18 + ",") + _local17);
_local24++;
}
var _local13 = points.length - 16;
while (_local13 >= 50) {
var _local12 = new Array();
_local12.push(_local13);
var _local19 = points[_local13 - 30].split(",");
var _local25 = points[_local13].split(",");
var _local30 = Number(_local19[0]);
var _local32 = Number(_local19[1]);
var _local21 = Number(_local25[0]);
var _local20 = Number(_local25[1]);
var _local31 = utility.GetAngle(_local30, _local32, _local21, _local20);
var _local11 = _root.attachMovie("arrow" + utility.randRange(1, 3), "arrow_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local11._x = _local21;
_local11._y = _local20;
_local11._rotation = _local31;
_local11.cacheAsBitmap = true;
_local11._visible = false;
_local12.push(_local11);
var _local7 = _local13 - 2;
var _local3 = _root.createEmptyMovieClip("draw_mc" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local3.lineStyle(2, 0, 100);
var _local8 = 1;
while (_local8 < 4) {
var _local16 = utility.randRange(5, 8);
var _local15 = utility.randRange(2, 6);
var _local9 = _local7;
var _local4 = _local7 - _local15;
var _local14 = Math.round((_local9 + _local4) / 2);
_local7 = _local4 - _local16;
var _local5 = points[_local9].split(",");
var _local10 = points[_local14].split(",");
var _local6 = points[_local4].split(",");
_local3.moveTo(_local5[0], _local5[1]);
_local3.curveTo(_local10[0], _local10[1], _local6[0], _local6[1]);
_local3._visible = false;
_local3.cacheAsBitmap = true;
_local12.push(_local3);
_local8++;
}
arrows.push(_local12);
_local13 = _local13 - 50;
}
introArrowIndex = arrows.length - 1;
dangerZone = points.length - 540;
numBallsStart = Math.floor((points.length * numBallsStartPct) / 30);
_local24 = 0;
while (_local24 < 10) {
var _local23 = _root.createEmptyMovieClip("buffer_mc_" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
_local23._x = 0;
_local23._y = 0;
_local24++;
}
}
function DoIntro() {
if (introArrowIndex >= 0) {
introFrameCnt++;
if ((introFrameCnt % 1) == 0) {
var _local2 = arrows[introArrowIndex];
_local2[1]._visible = true;
_local2[2]._visible = true;
_local2[3]._visible = true;
_local2[4]._visible = true;
introArrowIndex--;
}
return(false);
}
isIntroDone = true;
return(true);
}
function AddPowerUp() {
var _local3 = balls[utility.randRange(0, balls.length - 1)];
if (_local3.powerUp == undefined) {
var _local5 = utility.randRange(0, 2);
switch (_local5) {
case 0 :
var _local4 = _local3.attachMovie("BackwardsBall", _local3._name + "_BackwardsBall", _root.getNextHighestDepth());
_local3.powerUp = _local4;
_local3.powerUp.Type = "BackwardsBall";
_local3.powerUp.addTime = _root.stopWatch.elapsedTime;
break;
case 1 :
_local4 = _local3.attachMovie("BoomBall", _local3._name + "_BoomBall", _root.getNextHighestDepth());
_local3.powerUp = _local4;
_local3.powerUp.Type = "BoomBall";
_local3.powerUp.addTime = _root.stopWatch.elapsedTime;
break;
case 2 :
_local4 = _local3.attachMovie("SlowDownBall", _local3._name + "_SlowDownBall", _root.getNextHighestDepth());
_local3.powerUp = _local4;
_local3.powerUp.Type = "SlowDownBall";
_local3.powerUp.addTime = _root.stopWatch.elapsedTime;
}
}
}
function DoDanger() {
if (balls.length > 0) {
var _local4 = balls[0];
if ((_local4.waypoint > dangerZone) && (dangerOn == false)) {
dangerOn = true;
_root.sound_flame_on.start();
var _local3 = points[points.length - 1].split(",");
fireburn = _root.attachMovie("fireAndSmoke", "fire_burn" + _root.getNextHighestDepth(), _root.getNextHighestDepth());
fireburn.stopMe = false;
fireburn._x = _local3[0];
fireburn._y = _local3[1];
} else if (_local4.waypoint < dangerZone) {
if (dangerOn == true) {
fireburn.stopMe = true;
}
dangerOn = false;
}
} else if (!_root.level.loseLevel) {
fireburn.stopMe = true;
dangerOn = false;
}
}
function LastBallPushingNumberOfBalls() {
var _local5 = 1;
if (balls.length == 1) {
return(1);
}
var _local4 = balls[balls.length - 1];
var _local2 = balls.length - 2;
while (_local2 >= 0) {
var _local3 = balls[_local2];
if ((_local3.waypoint - _local4.waypoint) > 30) {
break;
}
_local4 = _local3;
_local5++;
_local2--;
}
return(_local5);
}
var numBallsStartAdded = 0;
var backupBalls = false;
var backupBallsWaypointReached = false;
var backupBallsToWaypoint = 0;
var loseBallSpeed = 40;
var knockbackBallSpeed = 30;
var backupBallSpeed = 8;
var sentScoreStopBackup = false;
var pushForwardCount = -1;
var pushForwardFound = false;
var isIntroDone = false;
var slowDownBallEffectOn = true;
var slowDownBallEffectEndTime = 0;
}
Symbol 1616 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.0");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 1617 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1618 MovieClip [__Packages.StopWatch] Frame 0
class StopWatch
{
var startTime, intervalId, elapsedHours, remaining, elapsedM, elapsedS, elapsedH, hours, minutes, seconds, hundredths, timer_txt;
function StopWatch () {
elapsedTime = 0;
}
function Start() {
if (!timing) {
if (isPaused) {
startTime = getTimer() - elapsedTime;
} else {
intervalId = setInterval(this, "tick", 100);
startTime = getTimer();
}
isPaused = false;
timing = true;
}
}
function Stop() {
timing = false;
isPaused = false;
clearInterval(intervalId);
}
function Pause() {
if (timing) {
timing = false;
isPaused = true;
}
}
function tick() {
if (timing) {
elapsedTime = getTimer() - startTime;
elapsedHours = Math.floor(elapsedTime / 3600000);
remaining = elapsedTime - (elapsedHours * 3600000);
elapsedM = Math.floor(remaining / 60000);
remaining = remaining - (elapsedM * 60000);
elapsedS = Math.floor(remaining / 1000);
remaining = remaining - (elapsedS * 1000);
elapsedH = Math.floor(remaining / 10);
if (elapsedHours < 10) {
hours = "0" + elapsedHours.toString();
} else {
hours = elapsedHours.toString();
}
if (elapsedM < 10) {
minutes = "0" + elapsedM.toString();
} else {
minutes = elapsedM.toString();
}
if (elapsedS < 10) {
seconds = "0" + elapsedS.toString();
} else {
seconds = elapsedS.toString();
}
if (elapsedH < 10) {
hundredths = "0" + elapsedH.toString();
} else {
hundredths = elapsedH.toString();
}
timer_txt = (((((hours + ":") + minutes) + ":") + seconds) + ":") + hundredths;
}
}
var timing = false;
var isPaused = false;
var elapsedTime = 0;
}