Frame 1
MochiAd.showPreGameAd({id:"96323b8693f525df", res:"550x400", color:13158, background:26265, outline:19093});
function sitelock(url_to_lock) {
domain_parts = _url.split("://");
real_domain = domain_parts[1].split("/");
domain_text = real_domain[0];
if (real_domain[0] != url_to_lock) {
_root._alpha = 0;
_root.stop();
}
}
function checkHitPegs(mc) {
i = 0;
while (i < _root.pegs.length) {
xDist = pegs[i]._x - mc._x;
yDist = pegs[i]._y - mc._y;
totalDist = Math.sqrt((xDist * xDist) + (yDist * yDist));
if (totalDist < ((mc._width / 2) + (pegs[i]._width / 2))) {
lastXDist = pegs[i]._x - last_ball_x;
lastYDist = pegs[i]._y - last_ball_y;
lastTotalDist = Math.sqrt((lastXDist * lastXDist) + (lastYDist * lastYDist));
if (lastTotalDist < ((mc._width / 2) + (pegs[i]._width / 2))) {
stuck_here++;
if (stuck_here > 30) {
mc._x = mc._x + 4;
mc._y = mc._y - 30;
ball_vel_y = -5;
ball_vel_x = 2;
} else {
mc._x = last_last_ball_x;
mc._y = last_last_ball_y;
}
} else {
angleFromPeg = Math.atan2(lastXDist, lastYDist);
yMod = Math.cos(angleFromPeg);
xMod = Math.sin(angleFromPeg);
total_vel = Math.sqrt((ball_vel_y * ball_vel_y) + (ball_vel_x * ball_vel_x));
if ((total_vel >= (-energy_lost_from_peg)) && (total_vel <= energy_lost_from_peg)) {
total_vel = energy_lost_from_peg * 2;
} else {
total_vel = total_vel - pegs_bounce[i];
}
angle = Math.atan2(last_ball_y - pegs[i]._y, last_ball_x - pegs[i]._x);
if (_root.ball_type == 4) {
mc._width = mc._width + 2;
mc._height = mc._height + 2;
wall_left = WallLeft._x + (mc._width / 2);
wall_right = WallRight._x - (mc._width / 2);
wall_bottom = WallBottom._y - (mc._height / 2);
wall_top = WallTop._y + (mc._height / 2);
}
mc._x = pegs[i]._x + (Math.cos(angle) * ((mc._width / 2) + (pegs[i]._width / 2)));
mc._y = pegs[i]._y + (Math.sin(angle) * ((mc._height / 2) + (pegs[i]._height / 2)));
duplicateMovieClip (spark, "newspark", 999999);
setProperty("newspark", _x , pegs[i]._x + (Math.cos(angle) * (pegs[i]._width / 2)));
setProperty("newspark", _y , pegs[i]._y + (Math.sin(angle) * (pegs[i]._height / 2)));
stuck_here = 0;
pegs[i].play();
}
ball_vel_y = total_vel * (-yMod);
ball_vel_x = total_vel * (-xMod);
if ((ball_vel_x > -10) && (ball_vel_x < 0)) {
ball_vel_x = -10;
} else if ((ball_vel_x < 10) && (ball_vel_x >= 0)) {
ball_vel_x = 10;
}
if ((ball_vel_y > -10) && (ball_vel_y < 0)) {
ball_vel_y = -10;
} else if ((ball_vel_y < 10) && (ball_vel_y >= 0)) {
ball_vel_y = 10;
}
return(true);
}
i++;
}
last_last_ball_x = mc._x;
last_last_ball_y = mc._y;
stuck_here = 0;
return(false);
}
function checkSquareHit(mc, last_x, last_y) {
var _local12 = false;
i = 0;
while (i < _root.squares.length) {
xDistance = (squares[i]._width / 2) + (mc._width / 2);
yDistance = (squares[i]._height / 2) + (mc._height / 2);
if ((((mc._x >= (squares[i]._x - xDistance)) && (mc._x <= (squares[i]._x + xDistance))) && (mc._y >= (squares[i]._y - yDistance))) && (mc._y <= (squares[i]._y + yDistance))) {
_local12 = true;
var _local10 = (squares[i]._x - (squares[i]._width / 2)) - (mc._width / 2);
var _local9 = (squares[i]._x + (squares[i]._width / 2)) + (mc._width / 2);
var _local6 = (squares[i]._y - (squares[i]._height / 2)) - (mc._height / 2);
var _local5 = (squares[i]._y + (squares[i]._height / 2)) + (mc._height / 2);
var _local7 = false;
var _local4 = false;
var _local3 = 1;
if (last_x < _local10) {
_local7 = true;
mc._x = _local10 - _local3;
if (last_y < _local6) {
_local4 = true;
mc._y = _local6 - _local3;
} else if (last_y > _local5) {
_local4 = true;
mc._y = _local5 + _local3;
}
} else if (last_x > _local9) {
_local7 = true;
mc._x = _local9 + _local3;
if (last_y < _local6) {
_local4 = true;
mc._y = _local6 - _local3;
} else if (last_y > _local5) {
_local4 = true;
mc._y = _local5 + _local3;
}
} else if (last_y < _local6) {
_local4 = true;
mc._y = _local6 - _local3;
} else if (last_y > _local5) {
_local4 = true;
mc._y = _local5 + _local3;
} else if (last_x <= 0) {
_local7 = true;
mc._x = _local9 + _local3;
} else if (ball_vel_x >= 0) {
_local7 = true;
mc._x = _local10 - _local3;
} else if (last_y <= squares[i]._y) {
_local4 = true;
mc._y = _local6 - _local3;
} else {
_local4 = true;
mc._y = _local5 + _local3;
}
if (_local4) {
_root.ball_vel_y = -_root.ball_vel_y;
if (_root.ball_vel_y <= (-energy_lost_from_square)) {
_root.ball_vel_y = _root.ball_vel_y + energy_lost_from_square;
} else if (_root.ball_vel_y >= energy_lost_from_square) {
_root.ball_vel_y = _root.ball_vel_y - energy_lost_from_square;
} else {
_root.ball_vel_y = 0;
}
}
if (_local7) {
_root.ball_vel_x = -_root.ball_vel_x;
if (_root.ball_vel_x <= (-energy_lost_from_square)) {
_root.ball_vel_x = _root.ball_vel_x + energy_lost_from_square;
} else if (_root.ball_vel_x >= energy_lost_from_square) {
_root.ball_vel_x = _root.ball_vel_x - energy_lost_from_square;
} else {
_root.ball_vel_x = 0;
}
}
}
i++;
}
return(_local12);
}
function checkHitArrow(mc) {
i = 0;
while (i < _root.arrows.length) {
if (_root.arrows[i].hitTest(mc._x, mc._y, true)) {
_root.ball_vel_x = _root.ball_vel_x - (_root.arrows_force[i] * Math.cos(_root.arrows[i]._rotation * (Math.PI/180)));
_root.ball_vel_y = _root.ball_vel_y - (_root.arrows_force[i] * Math.sin(_root.arrows[i]._rotation * (Math.PI/180)));
}
i++;
}
}
function checkHitTrap(mc) {
i = 0;
while (i < _root.traps.length) {
xDist = traps[i]._x - mc._x;
yDist = traps[i]._y - mc._y;
totalDist = Math.sqrt((xDist * xDist) + (yDist * yDist));
if (totalDist < traps_dist[i]) {
angleFromPeg = Math.atan2(xDist, yDist);
applyForce = traps_pull[i] / (totalDist * totalDist);
xForce = Math.sin(angleFromPeg) * applyForce;
yForce = Math.cos(angleFromPeg) * applyForce;
ball_vel_x = ball_vel_x + xForce;
ball_vel_y = ball_vel_y + yForce;
}
if (totalDist < ((mc._width / 2) + (traps[i]._width / 2))) {
return(true);
}
i++;
}
return(false);
}
function setPegsBounce(bounce) {
_root.peg_bounce_factor = bounce;
}
function addPeg(peg) {
_root.pegs.push(peg);
_root.pegs_bounce.push(peg_bounce_factor);
}
function addSquare(square) {
_root.squares.push(square);
}
function addTriangle(triangle) {
_root.triangles.push(triangle);
}
function addArrow(arrowmc, force) {
_root.arrows.push(arrowmc);
_root.arrows_force.push(force);
}
function addBucket(points) {
_root.buckets.push(points);
}
function createBuckets() {
return(map_width / buckets.length);
}
function addTrap(trapmc, pull, distance) {
_root.traps.push(trapmc);
_root.traps_pull.push(pull);
_root.traps_dist.push(distance);
}
function updateGravityAndAir() {
ball_vel_y = ball_vel_y + gravity;
if (ball_vel_x >= air_resistance) {
ball_vel_x = ball_vel_x - air_resistance;
} else if (ball_vel_x <= (-air_resistance)) {
ball_vel_x = ball_vel_x + air_resistance;
} else {
ball_vel_x = 0;
}
}
function moveBallByVelocity() {
ball._x = ball._x + (ball_vel_x / fps);
ball._y = ball._y + (ball_vel_y / fps);
}
function capVelocity() {
if (ball_vel_y > terminal_velocity) {
ball_vel_y = terminal_velocity;
} else if (ball_vel_y < (-terminal_velocity)) {
ball_vel_y = -terminal_velocity;
}
if (ball_vel_x > terminal_velocity) {
ball_vel_x = terminal_velocity;
} else if (ball_vel_x < (-terminal_velocity)) {
ball_vel_x = -terminal_velocity;
}
}
function hitWallTest() {
if (electro_right_on) {
ball._x = ball._x + 1.1;
ball_vel_x = ball_vel_x + electro_force;
electro_right = electro_right + electro_overheat;
if (electro_right > 100) {
electro_right = 200;
electro_right_on = false;
mag_right.gotoAndStop("overheat");
}
}
if (electro_left_on) {
ball._x = ball._x - 1.1;
ball_vel_x = ball_vel_x - electro_force;
electro_left = electro_left + electro_overheat;
if (electro_left > 100) {
electro_left = 200;
electro_left_on = false;
mag_left.gotoAndStop("overheat");
}
}
if (ball._x > wall_right) {
ball_vel_x = -ball_vel_x;
if (ball_vel_x < energy_lost_from_side_wall) {
ball_vel_x = ball_vel_x + energy_lost_from_side_wall;
} else {
ball_vel_x = 0;
}
ball._x = wall_right - 1;
}
if (ball._x < wall_left) {
ball_vel_x = -ball_vel_x;
ball._x = wall_left;
if (ball_vel_x > energy_lost_from_side_wall) {
ball_vel_x = ball_vel_x - energy_lost_from_side_wall;
} else {
ball_vel_x = 0;
}
ball._x = wall_left + 1;
}
if (ball._y > wall_bottom) {
ball._y = wall_bottom - 1;
if (ball_vel_y < stopped_velocity) {
ball_vel_y = 0;
i = 0;
while (i < buckets.length) {
startBucketX = (i * bucket_length) + WallLeft._x;
endBucketX = ((i + 1) * bucket_length) + WallLeft._x;
if ((ball._x >= startBucketX) && (ball._x <= endBucketX)) {
_global.total_score = _global.total_score + buckets[i];
return(buckets[i]);
}
i++;
}
} else if (ball_vel_y > energy_lost_from_wall) {
ball_vel_y = (-ball_vel_y) + energy_lost_from_wall;
} else {
ball_vel_y = 0;
}
}
if (ball._y < wall_top) {
ball_vel_y = -ball_vel_y;
ball._y = wall_top;
if (ball_vel_y > energy_lost_from_side_wall) {
ball_vel_y = ball_vel_y - energy_lost_from_side_wall;
} else {
ball_vel_y = 0;
}
ball._y = wall_top + 1;
}
}
function spawnEffects() {
randomNumber = random(10);
newEffectName = "effect" + randomNumber;
duplicateMovieClip (effects, newEffectName, 1001 + randomNumber);
setProperty(newEffectName, _x , ball._x);
setProperty(newEffectName, _y , ball._y);
}
function resetWorld() {
_global.map_score = 0;
ball_vel_x = 0;
ball_vel_y = 0;
_root.ball._xscale = 74.8;
_root.ball._yscale = 74.8;
_root.levelOver = false;
removeMovieClip(_root.ball);
}
function defaultSettings() {
wall_left = WallLeft._x + (ball._width / 2);
wall_right = WallRight._x - (ball._width / 2);
wall_bottom = WallBottom._y - (ball._height / 2);
wall_top = WallTop._y + (ball._height / 2);
map_width = WallRight._x - WallLeft._x;
screen_top = 125;
screen_bottom = 325;
energy_lost_from_wall = 70;
energy_lost_from_side_wall = 40;
energy_lost_from_peg = 20;
energy_lost_from_square = 40;
energy_lost_from_triangle = 40;
electro_right_on = false;
electro_left_on = false;
electro_right = 0;
electro_left = 0;
electro_cooldown_speed = 3;
gravity = 20;
air_resistance = 1;
terminal_velocity = 500;
stopped_velocity = 350;
fps = 25;
electro_right_on = false;
electro_left_on = false;
electro_right = 0;
electro_left = 0;
electro_force = 10;
electro_overheat = 10;
electro_disabled = false;
mag_left._visible = true;
mag_right._visible = true;
ball_type = _global.ball_type;
max_ball_size = 300;
}
function disableMagnets() {
electro_disabled = true;
mag_left._visible = false;
mag_right._visible = false;
}
function startingSettings() {
americastate = false;
ukstate = true;
antarcticastate = true;
africastate = true;
chinastate = true;
spacestate = true;
centerofearthstate = true;
australiastate = true;
}
function updateTotalScore() {
_root.total_score = int(((((((((((((((((((((((((((((((((((((((((((((((_root.level11 + _root.level12) + _root.level13) + _root.level14) + _root.level15) + _root.level16) + _root.level21) + _root.level22) + _root.level23) + _root.level24) + _root.level25) + _root.level26) + _root.level31) + _root.level32) + _root.level33) + _root.level34) + _root.level35) + _root.level36) + _root.level41) + _root.level42) + _root.level43) + _root.level44) + _root.level45) + _root.level46) + _root.level51) + _root.level52) + _root.level53) + _root.level54) + _root.level55) + _root.level56) + _root.level61) + _root.level62) + _root.level63) + _root.level64) + _root.level65) + _root.level66) + _root.level71) + _root.level72) + _root.level73) + _root.level74) + _root.level75) + _root.level76) + _root.level81) + _root.level82) + _root.level83) + _root.level84) + _root.level85) + _root.level86);
if (_root.total_score == "") {
_root.total_score = 0;
}
}
function tickerUpdate() {
updateTotalScore();
if ((total_score >= 0) && (!americastate)) {
tickerText = "Welcome to Ping Ball. Please make your way to America from the map room for an interactive tutorial to the game. Enjoy your balls";
}
if ((total_score >= 500) && (!ukstate)) {
tickerText = "It looks like you made it so far! The UK is now open for Ping Ball business. Go show the queen how good you are with your balls";
}
if ((total_score >= 2000) && (!chinastate)) {
tickerText = "China is now available to you. What a lucky person you are! Enjoy the ping pong balls";
}
if ((total_score >= 4000) && (!africastate)) {
tickerText = "You can now play with your balls in Africa. Look out for the lions and bears!";
}
if ((total_score >= 8000) && (!australiastate)) {
tickerText = "You can now go down under. Why not go play with your balls in the bush? (That's australia by the way)";
}
if ((total_score >= 10000) && (!antarcticastate)) {
tickerText = "Antarctica is now available to you. Don' be afraid to get a bit cold.";
}
if ((total_score >= 15000) && (!spacestate)) {
tickerText = "Congratulations, you conquered the Ping Ball arenas on Earth! Now you can head into Space!";
}
if ((total_score >= 25000) && (!centerofearthstate)) {
tickerText = "Congratulations Ping Ball Champion, you've unlocked The Center Of The Earth. It won't be fun from here on out. Here is where it gets serious.";
}
}
function menuNavigate(frame) {
menuFader.play();
_global.frame_to_go_to = frame;
}
function randomSound(soundArrays) {
numberOfSounds = 0;
i = 0;
while (i < soundArrays.length) {
j = 0;
while (j < soundArrays[i].length) {
numberOfSounds++;
j++;
}
i++;
}
do {
chosenSound = random(numberOfSounds);
} while (chosenSound == lastSoundPlayed);
lastSoundPlayed = chosenSound;
numberOfSounds = 0;
i = 0;
while (i < soundArrays.length) {
j = 0;
while (j < soundArrays[i].length) {
if (numberOfSounds == chosenSound) {
return(soundArrays[i][j]);
}
numberOfSounds++;
j++;
}
i++;
}
}
Stage.showMenu = false;
var nudgeListener = new Object();
nudgeListener.onKeyDown = function () {
if (electro_disabled == false) {
if (electro_left <= 100) {
if (Key.isDown(37) && (_root.released)) {
electro_left_on = true;
}
}
if (electro_right <= 100) {
if (Key.isDown(39) && (_root.released)) {
electro_right_on = true;
}
}
}
};
nudgeListener.onKeyUp = function () {
if (!Key.isDown(39)) {
electro_right_on = false;
}
if (!Key.isDown(37)) {
electro_left_on = false;
}
};
Key.addListener(nudgeListener);
resetWorld();
if (americastate == undefined) {
startingSettings();
}
_global.level_on = null;
_global.retry_level = false;
_root.voice_mute = false;
var americaSounds = new Array("USAeat", "USAgo", "USAhigh", "USAlikes", "USAlookout", "USArad", "USAstoked", "USAsostoked", "USAsweet", "USAup", "USAwild");
var ukSounds = new Array("UKqueenimpressed", "UKqueentea", "UKdarling", "UKdouche", "UKhide", "UKhighnob", "UKtea");
var chinaSounds = new Array("CHINAchopsticks", "CHINAamericanballs", "CHINAbounce", "CHINAhardchop", "CHINAlove", "CHINAolympics", "CHINArice");
var africaSounds = new Array("AFRICAlions", "AFRICAfact", "AFRICAfire", "AFRICAgiraffe", "AFRICAlionslove", "AFRICAlookout", "AFRICAnoidea", "AFRICAsaw", "AFRICAsohot");
var antarcticaSounds = new Array("ANTballsfreeze", "ANTfreezedont", "ANTpolarbears", "ANTbig", "ANTbigger", "ANTcold", "ANThelp", "ANTrub");
var coeSounds = new Array("COEburn");
var australiaSounds = new Array("AUSkangaroo", "AUSboom", "AUScall", "AUSdangle", "AUSupsidedown", "AUSwhy");
var spaceSounds = new Array("SPACEballsinspace", "SPACEace", "SPACEintro", "SPACElost", "SPACEnoone", "SPACEoff", "SPACEspace", "SPACEsuck");
var failSounds = new Array("FAILno", "FAILseriously", "FAILsmeg", "FAILfail", "FAILsuck", "FAILblerg", "FAILcain", "FAILballs");
var winSounds = new Array("WINblammy", "WINdoyoulike", "WINfever", "WINhowdoyoulike", "WINilove", "WINbigger", "WINskills", "WINhandling", "WINchallenge", "WINhands");
var gameSounds = new Array("GAMEdoucheonface", "GAMEdowhat", "GAMEfever", "GAMEguycalleddouche", "GAMElovedouche", "GAMEmumsobad", "GAMEonface", "GAMEsuckypingballs", "GAMEwuah", "GAMEtobehonest", "GAMEface", "GAMEdouchecrap", "GAMEidiot", "GAMEtouch", "GAMEstopplaying", "GAMEplaying", "GAMEsuckpingballs", "GAMEseriously", "GAMEbetterping", "GAMEcollection", "GAMEfave", "GAMEleastnotdouche");
lastSoundPlayed = 0;
this.createEmptyMovieClip("backgroundMusicMc", getNextHighestDepth());
backgroundMusic = new Sound(backgroundMusicMc);
backgroundMusic.attachSound("canonMusic");
_root.voiceVolume = 40;
_root.backgroundVolume = 50;
_root.sfxVolume = 30;
var saveFile = SharedObject.getLocal("pingball2008");
Frame 99
if (saveFile.data.voiceVolume == undefined) {
saveFile.data.voiceVolume = _root.voiceVolume;
} else {
_root.voiceVolume = saveFile.data.voiceVolume;
}
if (saveFile.data.backgroundVolume == undefined) {
saveFile.data.backgroundVolume = _root.backgroundVolume;
} else {
_root.backgroundVolume = saveFile.data.backgroundVolume;
}
if (saveFile.data.sfxVolume == undefined) {
saveFile.data.sfxVolume = _root.sfxVolume;
} else {
_root.sfxVolume = saveFile.data.sfxVolume;
}
saveFile.flush();
backgroundMusic.setVolume(_root.backgroundVolume);
backgroundMusic.stop();
backgroundMusic.start(0, 9999);
mochi.MochiServices.connect("96323b8693f525df");
stop();
Frame 100
stop();
Frame 101
stop();
Frame 102
stop();
Frame 103
saveFile.clear();
saveFile.data.level11 = 0;
saveFile.data.level12 = 0;
saveFile.data.level13 = 0;
saveFile.data.level14 = 0;
saveFile.data.level15 = 0;
saveFile.data.level16 = 0;
saveFile.data.level21 = 0;
saveFile.data.level22 = 0;
saveFile.data.level23 = 0;
saveFile.data.level24 = 0;
saveFile.data.level25 = 0;
saveFile.data.level26 = 0;
saveFile.data.level31 = 0;
saveFile.data.level32 = 0;
saveFile.data.level33 = 0;
saveFile.data.level34 = 0;
saveFile.data.level35 = 0;
saveFile.data.level36 = 0;
saveFile.data.level41 = 0;
saveFile.data.level42 = 0;
saveFile.data.level43 = 0;
saveFile.data.level44 = 0;
saveFile.data.level45 = 0;
saveFile.data.level46 = 0;
saveFile.data.level51 = 0;
saveFile.data.level52 = 0;
saveFile.data.level53 = 0;
saveFile.data.level54 = 0;
saveFile.data.level55 = 0;
saveFile.data.level56 = 0;
saveFile.data.level61 = 0;
saveFile.data.level62 = 0;
saveFile.data.level63 = 0;
saveFile.data.level64 = 0;
saveFile.data.level65 = 0;
saveFile.data.level66 = 0;
saveFile.data.level71 = 0;
saveFile.data.level72 = 0;
saveFile.data.level73 = 0;
saveFile.data.level74 = 0;
saveFile.data.level75 = 0;
saveFile.data.level76 = 0;
saveFile.data.level81 = 0;
saveFile.data.level82 = 0;
saveFile.data.level83 = 0;
saveFile.data.level84 = 0;
saveFile.data.level85 = 0;
saveFile.data.level86 = 0;
saveFile.data.americastate = false;
saveFile.data.ukstate = false;
saveFile.data.antarcticastate = false;
saveFile.data.africastate = false;
saveFile.data.chinastate = false;
saveFile.data.spacestate = false;
saveFile.data.centerofearthstate = false;
saveFile.data.australiastate = false;
saveFile.data.voiceVolume = _root.voiceVolume;
saveFile.data.backgroundVolume = _root.backgroundVolume;
saveFile.data.sfxVolume = _root.sfxVolume;
saveFile.flush();
backgroundMusic.setVolume(_root.backgroundVolume);
stop();
Frame 104
_root.level11 = saveFile.data.level11;
_root.level12 = saveFile.data.level12;
_root.level13 = saveFile.data.level13;
_root.level14 = saveFile.data.level14;
_root.level15 = saveFile.data.level15;
_root.level16 = saveFile.data.level16;
_root.level21 = saveFile.data.level21;
_root.level22 = saveFile.data.level22;
_root.level23 = saveFile.data.level23;
_root.level24 = saveFile.data.level24;
_root.level25 = saveFile.data.level25;
_root.level26 = saveFile.data.level26;
_root.level31 = saveFile.data.level31;
_root.level32 = saveFile.data.level32;
_root.level33 = saveFile.data.level33;
_root.level34 = saveFile.data.level34;
_root.level35 = saveFile.data.level35;
_root.level36 = saveFile.data.level36;
_root.level41 = saveFile.data.level41;
_root.level42 = saveFile.data.level42;
_root.level43 = saveFile.data.level43;
_root.level44 = saveFile.data.level44;
_root.level45 = saveFile.data.level45;
_root.level46 = saveFile.data.level46;
_root.level51 = saveFile.data.level51;
_root.level52 = saveFile.data.level52;
_root.level53 = saveFile.data.level53;
_root.level54 = saveFile.data.level54;
_root.level55 = saveFile.data.level55;
_root.level56 = saveFile.data.level56;
_root.level61 = saveFile.data.level61;
_root.level62 = saveFile.data.level62;
_root.level63 = saveFile.data.level63;
_root.level64 = saveFile.data.level64;
_root.level65 = saveFile.data.level65;
_root.level66 = saveFile.data.level66;
_root.level71 = saveFile.data.level71;
_root.level72 = saveFile.data.level72;
_root.level73 = saveFile.data.level73;
_root.level74 = saveFile.data.level74;
_root.level75 = saveFile.data.level75;
_root.level76 = saveFile.data.level76;
_root.level81 = saveFile.data.level81;
_root.level82 = saveFile.data.level82;
_root.level83 = saveFile.data.level83;
_root.level84 = saveFile.data.level84;
_root.level85 = saveFile.data.level85;
_root.level86 = saveFile.data.level86;
americastate = saveFile.data.americastate;
ukstate = saveFile.data.ukstate;
antarcticastate = saveFile.data.antarcticastate;
africastate = saveFile.data.africastate;
chinastate = saveFile.data.chinastate;
spacestate = saveFile.data.spacestate;
centerofearthstate = saveFile.data.centerofearthstate;
australiastate = saveFile.data.australiastate;
_root.voiceVolume = saveFile.data.voiceVolume;
_root.backgroundVolume = saveFile.data.backgroundVolume;
_root.sfxVolume = saveFile.data.sfxVolume;
_root.player_name = saveFile.data.player_name;
backgroundMusic.setVolume(_root.backgroundVolume);
tickerText = "Welcome back to Ping Ball. Feel free to resume your conquest for Ping Ball Fever! Head for the stars! The sky is the limit!";
if (saveFile.data.player_name == undefined) {
gotoAndPlay ("newGame");
}
Frame 105
tickerUpdate();
introSound = new Sound(this);
if ((total_score >= 0) && (!americastate)) {
americastate = true;
introSound.attachSound("INTROamerica");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 500) && (!ukstate)) {
ukstate = true;
introSound.attachSound("INTROuk");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 2000) && (!chinastate)) {
chinastate = true;
introSound.attachSound("INTROchina");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 4000) && (!africastate)) {
africastate = true;
introSound.attachSound("INTROafrica");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 8000) && (!australiastate)) {
australiastate = true;
introSound.attachSound("INTROaus");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 10000) && (!antarcticastate)) {
antarcticastate = true;
introSound.attachSound("INTROant");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 15000) && (!spacestate)) {
spacestate = true;
introSound.attachSound("INTROspace");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
if ((total_score >= 25000) && (!centerofearthstate)) {
centerofearthstate = true;
introSound.attachSound("INTROcoe");
introSound.volume(_root.voiceVolume);
introSound.start(0, 1);
}
saveFile.data.americastate = americastate;
saveFile.data.ukstate = ukstate;
saveFile.data.antarcticastate = antarcticastate;
saveFile.data.africastate = africastate;
saveFile.data.chinastate = chinastate;
saveFile.data.spacestate = spacestate;
saveFile.data.centerofearthstate = centerofearthstate;
saveFile.data.australiastate = australiastate;
saveFile.flush();
if (americastate) {
america._visible = true;
} else {
america._visible = false;
}
if (ukstate) {
uk._visible = true;
ukNumber = "";
} else {
uk._visible = false;
ukNumber = 500;
}
if (africastate) {
africa._visible = true;
africaNumber = "";
} else {
africa._visible = false;
africaNumber = 4000;
}
if (australiastate) {
australia._visible = true;
ausNumber = "";
} else {
australia._visible = false;
ausNumber = 8000;
}
if (chinastate) {
china._visible = true;
chinaNumber = "";
} else {
china._visible = false;
chinaNumber = 2000;
}
if (antarcticastate) {
antarctica._visible = true;
antNumber = "";
} else {
antarctica._visible = false;
antNumber = 10000;
}
if (spacestate) {
space._visible = true;
spaceNumber = "";
} else {
space._visible = false;
spaceNumber = 15000;
}
if (centerofearthstate) {
centerofearth._visible = true;
coeNumber = "";
} else {
centerofearth._visible = false;
coeNumber = 25000;
}
_global.level_on = null;
fadeAlpha = 40;
leaderboardBtn.onRelease = function () {
leaderboardPressed = true;
gotoAndStop (114);
};
submitScoreBtn.onRelease = function () {
submitScorePressed = true;
gotoAndStop (114);
};
stop();
Frame 106
if ((level11 == 0) || (level12 == 0)) {
level14b._alpha = fadeAlpha;
level14b.enabled = false;
}
if ((level12 == 0) || (level13 == 0)) {
level15b._alpha = fadeAlpha;
level15b.enabled = false;
}
if ((level14 == 0) || (level15 == 0)) {
level16b._alpha = fadeAlpha;
level16b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 499 MovieClip in Frame 106
onClipEvent (load) {
if ((_global.chosen_world == "World1Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 107
if ((level21 == 0) || (level22 == 0)) {
level24b._alpha = fadeAlpha;
level24b.enabled = false;
}
if ((level22 == 0) || (level23 == 0)) {
level25b._alpha = fadeAlpha;
level25b.enabled = false;
}
if ((level24 == 0) || (level25 == 0)) {
level26b._alpha = fadeAlpha;
level26b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 518 MovieClip in Frame 107
onClipEvent (load) {
if ((_global.chosen_world == "World2Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 108
if ((level41 == 0) || (level42 == 0)) {
level44b._alpha = fadeAlpha;
level44b.enabled = false;
}
if ((level42 == 0) || (level43 == 0)) {
level45b._alpha = fadeAlpha;
level45b.enabled = false;
}
if ((level44 == 0) || (level45 == 0)) {
level46b._alpha = fadeAlpha;
level46b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 533 MovieClip in Frame 108
onClipEvent (load) {
if ((_global.chosen_world == "World3Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 109
if ((level61 == 0) || (level62 == 0)) {
level64b._alpha = fadeAlpha;
level64b.enabled = false;
}
if ((level62 == 0) || (level63 == 0)) {
level65b._alpha = fadeAlpha;
level65b.enabled = false;
}
if ((level64 == 0) || (level65 == 0)) {
level66b._alpha = fadeAlpha;
level66b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 548 MovieClip in Frame 109
onClipEvent (load) {
if ((_global.chosen_world == "World4Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 110
if ((level31 == 0) || (level32 == 0)) {
level34b._alpha = fadeAlpha;
level34b.enabled = false;
}
if ((level32 == 0) || (level33 == 0)) {
level35b._alpha = fadeAlpha;
level35b.enabled = false;
}
if ((level34 == 0) || (level35 == 0)) {
level36b._alpha = fadeAlpha;
level36b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 563 MovieClip in Frame 110
onClipEvent (load) {
if ((_global.chosen_world == "World5Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 111
if ((level51 == 0) || (level52 == 0)) {
level54b._alpha = fadeAlpha;
level54b.enabled = false;
}
if ((level52 == 0) || (level53 == 0)) {
level55b._alpha = fadeAlpha;
level55b.enabled = false;
}
if ((level54 == 0) || (level55 == 0)) {
level56b._alpha = fadeAlpha;
level56b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 580 MovieClip in Frame 111
onClipEvent (load) {
if ((_global.chosen_world == "World6Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 112
if ((level71 == 0) || (level72 == 0)) {
level74b._alpha = fadeAlpha;
level74b.enabled = false;
}
if ((level72 == 0) || (level73 == 0)) {
level75b._alpha = fadeAlpha;
level75b.enabled = false;
}
if ((level74 == 0) || (level75 == 0)) {
level76b._alpha = fadeAlpha;
level76b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 609 MovieClip in Frame 112
onClipEvent (load) {
if ((_global.chosen_world == "World7Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 113
if ((level81 == 0) || (level82 == 0)) {
level84b._alpha = fadeAlpha;
level84b.enabled = false;
}
if ((level82 == 0) || (level83 == 0)) {
level85b._alpha = fadeAlpha;
level85b.enabled = false;
}
if ((level84 == 0) || (level85 == 0)) {
level86b._alpha = fadeAlpha;
level86b.enabled = false;
}
tickerUpdate();
stop();
Instance of Symbol 628 MovieClip in Frame 113
onClipEvent (load) {
if ((_global.chosen_world == "World8Menu") && (_global.level_on != null)) {
this._visible = false;
this.stop();
}
}
Frame 114
if (leaderboardPressed) {
lbMC.gotoAndStop(2);
mochi.MochiScores.showLeaderboard({boardID:"828789c7a177b490", clip:lbMC, onClose:function () {
_root.gotoAndStop("world_select");
leaderboardPressed = false;
}, onError:function () {
_root.gotoAndStop("world_select");
leaderboardPressed = false;
}});
} else if (submitScorePressed) {
lbMC.gotoAndStop(3);
mochi.MochiScores.showLeaderboard({boardID:"828789c7a177b490", score:total_score, clip:lbMC, name:player_name, onClose:function () {
_root.gotoAndStop("world_select");
submitScorePressed = false;
}, onError:function () {
_root.gotoAndStop("world_select");
submitScorePressed = false;
}});
}
Frame 115
defaultSettings();
disableMagnets();
screen_bottom = 312;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(50);
addBucket(100);
addBucket(50);
bucket_length = createBuckets();
stop();
Instance of Symbol 664 MovieClip "effects" in Frame 115
onClipEvent (enterFrame) {
if (lifespan < maxlife) {
this._y = this._y - yvel;
this._x = this._x + xdir;
this._alpha = 100 - lifespan;
lifespan = lifespan + lifeskip;
} else {
removeMovieClip(this);
}
}
onClipEvent (load) {
switch (_root.ball_type) {
case 1 :
this.gotoAndStop(1);
xdir = random(3) - 1;
yvel = random(3) - 1;
lifeskip = 10;
lifespan = 0;
maxlife = 100;
break;
case 2 :
this.gotoAndStop(2);
xdir = random(11) - 5;
yvel = random(3) + 1;
lifeskip = 7;
lifespan = 0;
maxlife = 100;
break;
case 3 :
this.gotoAndStop(3);
xdir = random(3) - 1;
yvel = random(3) - 1;
lifeskip = 10;
lifespan = 0;
maxlife = 100;
break;
case 4 :
this.gotoAndStop(4);
xdir = 0;
yvel = 0;
lifeskip = 2;
lifespan = 0;
maxlife = 100;
this._xscale = _root.ball._xscale;
this._yscale = _root.ball._yscale;
_root.spark._alpha = 20;
break;
case 5 :
this.gotoAndStop(5);
xdir = Math.random() - 0.5;
yvel = Math.random() - 0.2;
lifeskip = 0.5;
if (random(10) < 2) {
lifespan = 30;
} else {
lifespan = 100;
}
maxlife = 100;
break;
default :
removeMovieClip(this);
}
}
Instance of Symbol 683 MovieClip "mag_left" in Frame 115
onClipEvent (enterFrame) {
if (_root.electro_disabled != true) {
if (_root.electro_left < 100) {
_y = (_y + ((_root.ball._y - _y) / 5));
if (_y < _root.screen_top) {
_y = _root.screen_top;
}
if (_y > _root.screen_bottom) {
_y = _root.screen_bottom;
}
}
if (_root.electro_left_on) {
gotoAndStop ("on");
}
if ((!_root.electro_left_on) && (_root.electro_left > 0)) {
_root.electro_left = _root.electro_left - _root.electro_cooldown_speed;
}
}
}
Instance of Symbol 683 MovieClip "mag_right" in Frame 115
onClipEvent (enterFrame) {
if (_root.electro_disabled != true) {
if (_root.electro_right < 100) {
_y = (_y + ((_root.ball._y - _y) / 5));
if (_y < _root.screen_top) {
_y = _root.screen_top;
}
if (_y > _root.screen_bottom) {
_y = _root.screen_bottom;
}
}
if (_root.electro_right_on) {
gotoAndStop ("on");
}
if ((!_root.electro_right_on) && (_root.electro_right > 0)) {
_root.electro_right = _root.electro_right - _root.electro_cooldown_speed;
}
}
}
Instance of Symbol 741 MovieClip "ball" in Frame 115
onClipEvent (mouseDown) {
if (!_root.scrolling_menu) {
_root.scrolling_menu = true;
} else if (!_root.levelOver) {
_root.released = true;
}
}
onClipEvent (keyDown) {
if (Key.isDown(32)) {
if (!_root.scrolling_menu) {
_root.scrolling_menu = true;
} else {
_root.released = true;
}
} else if (Key.isDown(40)) {
if (!_root.released) {
_root.scrolling_menu = false;
}
} else if (Key.isDown(38)) {
if (!_root.released) {
_root.scrolling_menu = false;
}
} else if (Key.isDown(39)) {
if (!_root.released) {
this._x = this._x + 1;
}
} else if (Key.isDown(37)) {
if (!_root.released) {
this._x = this._x - 1;
}
}
}
onClipEvent (mouseMove) {
if (!_root.released) {
this._x = _root._xmouse;
_root.hitWallTest();
}
}
onClipEvent (load) {
finished = false;
_root.released = false;
_root.scrolling_menu = false;
score = undefined;
_root.vcam._y = _root.screen_bottom;
if (_global.ball_type >= 2) {
this.gotoAndStop((_global.ball_type * 2) - 1);
} else if (_global.ball_type == 1) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(1);
}
number_hits = 0;
start_timer = 0;
pingSound = new Sound(this);
pingSound.attachSound("ping");
pingSound.setVolume(_root.sfxVolume);
}
onClipEvent (enterFrame) {
_root.backgroundMusic.getVolume();
if (_global.retry_level) {
finished = false;
_root.released = false;
score = undefined;
_global.retry_level = false;
if (_root.ball_type >= 2) {
this.gotoAndStop((_root.ball_type * 2) - 1);
} else if (_root.ball_type == 1) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(1);
}
}
if (!_root.released) {
_y = -10;
_root.ball_vel_x = 0;
_root.ball_vel_y = 0;
_root.hitWallTest();
} else if (!finished) {
_root.updateGravityAndAir();
_root.moveBallByVelocity();
_root.checkHitArrow(this);
if (_root.checkHitTrap(this)) {
finished = true;
_root.destroyed = true;
_root.map_score = 0;
_root.statusMessage = "You crashed! Try again.";
}
hitCheck = _root.checkHitPegs(this);
if (hitCheck) {
start_timer = 0;
number_hits++;
pingSound.start(0, 0);
}
if (!hitCheck) {
hitCheck = _root.checkSquareHit(this, _root.last_ball_x, _root.last_ball_y);
}
score = _root.hitWallTest();
_root.capVelocity();
_root.last_ball_x = this._x;
_root.last_ball_y = this._y;
_root.spawnEffects();
if (score != undefined) {
finished = true;
_root.map_score = score;
if (score == 0) {
_root.statusMessage = "You made it. Unfortunatly you landed in the wrong bucket!";
} else {
_root.statusMessage = "Well done! You got points!";
}
}
if ((_root.ball_type == 4) && (this._xscale >= _root.max_ball_size)) {
finished = true;
_root.map_score = 0;
_root.statusMessage = "The ball got too big and reached critical mass. Better luck next time";
}
if (finished) {
this.gotoAndStop(this.nextFrame());
_root.levelOver = true;
_root.scoreSummary.play();
} else if (start_timer >= 0) {
start_timer++;
if (number_hits == 20) {
_root.multi_peg = true;
number_hits++;
} else if (number_hits == 40) {
_root.balleriffic = true;
number_hits++;
} else if (number_hits > 100) {
this._y = this._y - 20;
}
if (start_timer > (0.5 * _root.fps)) {
start_timer = -1;
number_hits = 0;
}
}
}
}
Instance of Symbol 746 MovieClip in Frame 115
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.americaSounds);
}
Frame 116
defaultSettings();
disableMagnets();
screen_bottom = 312;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 40);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(30);
addBucket(60);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 117
defaultSettings();
screen_top = 125;
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 20;
electro_overheat = 5;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 20);
addArrow(arrow2, 30);
addArrow(arrow3, 40);
addArrow(arrow4, 50);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(50);
addBucket(20);
bucket_length = createBuckets();
stop();
Frame 118
defaultSettings();
screen_top = 125;
screen_bottom = 979;
electro_cooldown_speed = 7;
electro_force = 20;
electro_overheat = 3;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
addSquare(square4);
addSquare(square5);
addSquare(square6);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 20);
addArrow(arrow2, 30);
addArrow(arrow3, 40);
addArrow(arrow4, 50);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(200);
addBucket(100);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 119
defaultSettings();
screen_top = 125;
screen_bottom = 979;
electro_cooldown_speed = 7;
electro_force = 20;
electro_overheat = 3;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square6);
var arrows = new Array();
var arrows_force = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 8000, 300);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var buckets = new Array();
addBucket(50);
addBucket(100);
addBucket(200);
bucket_length = createBuckets();
stop();
Frame 120
defaultSettings();
screen_top = 125;
screen_bottom = 979;
disableMagnets();
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var buckets = new Array();
addBucket(100);
addBucket(300);
addBucket(200);
bucket_length = createBuckets();
stop();
Frame 121
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 6;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
addSquare(square4);
var arrows = new Array();
var arrows_force = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(50);
addBucket(200);
addBucket(50);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 121
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.ukSounds);
}
Frame 122
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 15;
electro_overheat = 5;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 30);
addArrow(arrow2, 30);
addArrow(arrow3, 30);
addArrow(arrow4, 30);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(200);
bucket_length = createBuckets();
stop();
Frame 123
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 10;
electro_overheat = 6;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 30);
addArrow(arrow2, 40);
addArrow(arrow3, 50);
addArrow(arrow4, 40);
addArrow(arrow5, 50);
addArrow(arrow6, 10);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(50);
addBucket(200);
addBucket(50);
bucket_length = createBuckets();
stop();
Frame 124
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 10;
electro_overheat = 6;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 30);
addArrow(arrow2, 40);
addArrow(arrow3, 50);
addArrow(arrow4, 40);
addArrow(arrow5, 50);
addArrow(arrow6, 10);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(400);
addBucket(200);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 125
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 10;
electro_force = 30;
electro_overheat = 2;
gravity = 10;
terminal_velocity = 500;
energy_lost_from_peg = 40;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(50);
addBucket(400);
addBucket(50);
bucket_length = createBuckets();
stop();
Frame 126
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 10;
electro_force = 30;
electro_overheat = 2;
energy_lost_from_peg = 40;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square5);
addSquare(square6);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 30);
addArrow(arrow2, 30);
addArrow(arrow3, 30);
addArrow(arrow4, 30);
addArrow(arrow5, 30);
addArrow(arrow6, 10);
addArrow(arrow7, 40);
addArrow(arrow8, 40);
addArrow(arrow9, 40);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(600);
addBucket(200);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 127
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 10;
electro_overheat = 6;
terminal_velocity = 700;
energy_lost_from_peg = -100;
energy_lost_from_square = 0;
energy_lost_from_side_wall = 0;
energy_lost_from_wall = 70;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(300);
addBucket(100);
addBucket(0);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 127
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.chinaSounds);
}
Frame 128
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 10;
electro_overheat = 6;
terminal_velocity = 600;
energy_lost_from_peg = -60;
energy_lost_from_square = -20;
energy_lost_from_side_wall = 20;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 8000, 300);
addTrap(trap2, 8000, 300);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(600);
addBucket(200);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 129
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 10;
electro_force = 50;
electro_overheat = 2;
terminal_velocity = 400;
energy_lost_from_peg = -50;
energy_lost_from_side_wall = -10;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(900);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 130
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 30;
electro_overheat = 5;
terminal_velocity = 400;
energy_lost_from_peg = -70;
energy_lost_from_side_wall = -10;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(300);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 131
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 30;
electro_overheat = 5;
terminal_velocity = 400;
energy_lost_from_peg = -70;
energy_lost_from_side_wall = -10;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 30);
addArrow(arrow2, 30);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(600);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 132
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 30;
electro_overheat = 5;
terminal_velocity = 500;
energy_lost_from_peg = -70;
energy_lost_from_side_wall = -10;
air_resistance = 0.2;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(100);
addBucket(300);
bucket_length = createBuckets();
stop();
Frame 133
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 6;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(200);
addBucket(400);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 133
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.africaSounds);
}
Frame 134
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 6;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(200);
addBucket(400);
addBucket(200);
bucket_length = createBuckets();
stop();
Frame 135
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 8;
electro_force = 20;
electro_overheat = 2;
gravity = 20;
terminal_velocity = 300;
energy_lost_from_square = 70;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
addSquare(square4);
addSquare(square5);
addSquare(square6);
addSquare(square7);
addSquare(square8);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(400);
addBucket(0);
addBucket(400);
bucket_length = createBuckets();
stop();
Frame 136
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 8;
electro_force = 15;
electro_overheat = 3;
gravity = 20;
terminal_velocity = 300;
energy_lost_from_square = 70;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
addSquare(square4);
addSquare(square5);
addSquare(square6);
addSquare(square7);
addSquare(square8);
addSquare(square9);
addSquare(square10);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(800);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 137
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 5;
gravity = 10;
terminal_velocity = 250;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(800);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 138
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 5;
gravity = 10;
terminal_velocity = 250;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
addTrap(trap7, 0, 0);
addTrap(trap8, 0, 0);
addTrap(trap9, 0, 0);
addTrap(trap10, 0, 0);
addTrap(trap11, 0, 0);
addTrap(trap12, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(1200);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 139
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 5;
electro_overheat = 5;
gravity = 10;
terminal_velocity = 400;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(500);
addBucket(100);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 139
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.australiaSounds);
}
Frame 140
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 3;
electro_overheat = 4;
gravity = 15;
terminal_velocity = 400;
energy_lost_from_peg = 10;
energy_lost_from_square = 50;
energy_lost_from_side_wall = 50;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(500);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 141
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 3;
electro_overheat = 4;
gravity = 15;
terminal_velocity = 400;
energy_lost_from_peg = 10;
energy_lost_from_square = 50;
energy_lost_from_side_wall = 50;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(1000);
addBucket(0);
addBucket(1000);
bucket_length = createBuckets();
stop();
Frame 142
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 2;
electro_force = 3;
electro_overheat = 4;
gravity = 15;
terminal_velocity = 400;
energy_lost_from_peg = 30;
var squares = new Array();
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(500);
bucket_length = createBuckets();
stop();
Frame 143
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 1;
gravity = 10;
terminal_velocity = 300;
energy_lost_from_peg = 50;
energy_lost_from_wall = 500;
energy_lost_from_square = 80;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 10);
addArrow(arrow2, 10);
addArrow(arrow3, 10);
addArrow(arrow4, 10);
addArrow(arrow5, 4);
addArrow(arrow6, 10);
addArrow(arrow7, 10);
addArrow(arrow8, 10);
addArrow(arrow9, 10);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(1000);
addBucket(0);
addBucket(1000);
bucket_length = createBuckets();
stop();
Frame 144
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 1;
gravity = 10;
terminal_velocity = 300;
energy_lost_from_peg = 50;
energy_lost_from_wall = 500;
energy_lost_from_square = 80;
var squares = new Array();
addSquare(square1);
addSquare(square2);
addSquare(square3);
var arrows = new Array();
var arrows_force = new Array();
addArrow(arrow1, 20);
addArrow(arrow2, 20);
addArrow(arrow3, 20);
addArrow(arrow4, 20);
addArrow(arrow5, 15);
addArrow(arrow6, 20);
addArrow(arrow7, 20);
addArrow(arrow8, 20);
addArrow(arrow9, 20);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(1500);
addBucket(100);
addBucket(50);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 145
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 6;
gravity = 5;
terminal_velocity = 400;
energy_lost_from_wall = 500;
energy_lost_from_side_wall = 50;
energy_lost_from_peg = 40;
energy_lost_from_square = 100;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(600);
addBucket(100);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 145
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.antarcticaSounds);
}
Frame 146
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 6;
gravity = 3;
terminal_velocity = 400;
max_ball_size = 200;
energy_lost_from_wall = 500;
energy_lost_from_side_wall = 50;
energy_lost_from_peg = 40;
energy_lost_from_square = 100;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(600);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 147
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 6;
electro_overheat = 6;
gravity = 3;
terminal_velocity = 400;
max_ball_size = 200;
energy_lost_from_wall = 500;
energy_lost_from_side_wall = 50;
energy_lost_from_peg = 40;
energy_lost_from_square = 100;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(100);
addBucket(600);
addBucket(100);
bucket_length = createBuckets();
stop();
Frame 148
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 6;
gravity = 5;
terminal_velocity = 400;
max_ball_size = 200;
energy_lost_from_wall = 500;
energy_lost_from_side_wall = 50;
energy_lost_from_peg = 40;
energy_lost_from_square = 100;
var squares = new Array();
addSquare(square2);
addSquare(square3);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(1200);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 149
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 10;
electro_overheat = 3;
gravity = 3;
terminal_velocity = 400;
max_ball_size = 150;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = -20;
energy_lost_from_peg = 30;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(1200);
bucket_length = createBuckets();
stop();
Frame 150
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 2;
electro_overheat = 2;
gravity = 4;
terminal_velocity = 400;
max_ball_size = 150;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = -20;
energy_lost_from_peg = 30;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(1800);
bucket_length = createBuckets();
stop();
Frame 151
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 2;
electro_overheat = 6;
air_resistance = 0.1;
gravity = 0.05;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 0;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 10000, 500);
addTrap(trap2, 5000, 300);
addTrap(trap3, 7000, 350);
addTrap(trap4, 20000, 1000);
addTrap(trap5, 5000, 300);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(700);
addBucket(0);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 151
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.spaceSounds);
}
Frame 152
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 2;
electro_overheat = 6;
air_resistance = 0.1;
gravity = 0.05;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 0;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 10000, 500);
addTrap(trap2, 5000, 400);
addTrap(trap3, 7000, 400);
addTrap(trap4, 100000, 5000);
addTrap(trap5, 4000, 300);
addTrap(trap6, 4000, 300);
addTrap(trap7, 4000, 300);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(700);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 153
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 2;
air_resistance = 0;
gravity = 0.1;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 200;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 100000, 400);
addTrap(trap2, 8000, 300);
addTrap(trap3, 5000, 400);
addTrap(trap4, 6000, 300);
addTrap(trap5, 6000, 300);
addTrap(trap6, 5000, 200);
addTrap(trap7, 8000, 400);
addTrap(trap8, 8000, 400);
addTrap(trap9, 4000, 200);
addTrap(trap10, 6000, 300);
addTrap(trap11, 5000, 200);
addTrap(trap12, 5000, 200);
addTrap(trap13, 8000, 400);
addTrap(trap14, 4000, 200);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(700);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 154
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 5;
electro_overheat = 2;
air_resistance = 0;
gravity = 0.1;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 200;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 500000, 100);
addTrap(trap2, 500000, 100);
addTrap(trap3, 500000, 100);
addTrap(trap4, 500000, 100);
addTrap(trap5, 10000, 900);
addTrap(trap6, 7000, 500);
addTrap(trap7, 7000, 500);
addTrap(trap8, 8000, 500);
addTrap(trap9, 6000, 400);
addTrap(trap10, 9000, 500);
addTrap(trap11, 6000, 400);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(1400);
bucket_length = createBuckets();
stop();
Frame 155
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 6;
electro_overheat = 2;
air_resistance = 0;
gravity = 0.1;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 200;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 500000, 85);
addTrap(trap2, 500000, 85);
addTrap(trap3, 500000, 85);
addTrap(trap4, 30000, 5000);
addTrap(trap5, 500000, 85);
addTrap(trap6, 500000, 85);
addTrap(trap7, 500000, 85);
addTrap(trap8, 500000, 85);
addTrap(trap9, 500000, 85);
addTrap(trap10, 500000, 85);
addTrap(trap11, 500000, 85);
addTrap(trap12, 500000, 85);
addTrap(trap13, 500000, 85);
addTrap(trap14, 500000, 85);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(1400);
bucket_length = createBuckets();
stop();
Frame 156
defaultSettings();
screen_bottom = 979;
electro_cooldown_speed = 5;
electro_force = 6;
electro_overheat = 2;
air_resistance = 0;
gravity = 0.1;
terminal_velocity = 500;
energy_lost_from_wall = 300;
energy_lost_from_side_wall = 200;
energy_lost_from_peg = 0;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 10000, 700);
addTrap(trap2, 10000, 700);
addTrap(trap3, 10000, 700);
addTrap(trap4, 10000, 700);
addTrap(trap5, 10000, 700);
addTrap(trap6, 4000, 200);
addTrap(trap7, 4000, 200);
addTrap(trap8, 4000, 200);
addTrap(trap9, 4000, 200);
addTrap(trap10, 7000, 400);
addTrap(trap11, 7000, 400);
addTrap(trap12, 7000, 400);
addTrap(trap13, 7000, 400);
addTrap(trap14, 7000, 400);
addTrap(trap15, 7000, 400);
addTrap(trap16, 4000, 200);
addTrap(trap17, 6000, 300);
addTrap(trap18, 6000, 300);
addTrap(trap19, 6000, 300);
addTrap(trap20, 500000, 85);
addTrap(trap21, 500000, 85);
addTrap(trap22, 500000, 85);
addTrap(trap23, 500000, 85);
addTrap(trap24, 500000, 85);
addTrap(trap25, 500000, 85);
addTrap(trap26, 500000, 85);
addTrap(trap27, 500000, 85);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(2100);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 157
defaultSettings();
screen_top = 125;
screen_bottom = 979;
disableMagnets();
energy_lost_from_peg = 30;
energy_lost_from_side_wall = 20;
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
addTrap(trap7, 0, 0);
addTrap(trap8, 0, 0);
var buckets = new Array();
addBucket(100);
addBucket(800);
addBucket(100);
bucket_length = createBuckets();
stop();
Instance of Symbol 746 MovieClip in Frame 157
onClipEvent (load) {
backgroundSound = new Sound(this);
var soundsToPlay = new Array(_root.gameSounds, _root.coeSounds);
}
Frame 158
defaultSettings();
screen_bottom = 979;
disableMagnets();
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(200);
addBucket(800);
addBucket(200);
bucket_length = createBuckets();
stop();
Frame 159
defaultSettings();
screen_bottom = 979;
disableMagnets();
var squares = new Array();
addSquare(square1);
addSquare(square2);
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(300);
addBucket(800);
addBucket(300);
bucket_length = createBuckets();
stop();
Frame 160
defaultSettings();
screen_bottom = 979;
energy_lost_from_wall = 10;
stopped_velocity = 200;
var squares = new Array();
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 0, 0);
addTrap(trap2, 0, 0);
addTrap(trap3, 0, 0);
addTrap(trap4, 0, 0);
addTrap(trap5, 0, 0);
addTrap(trap6, 0, 0);
addTrap(trap7, 0, 0);
addTrap(trap8, 0, 0);
addTrap(trap9, 0, 0);
addTrap(trap10, 0, 0);
addTrap(trap11, 0, 0);
addTrap(trap12, 0, 0);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(0);
addBucket(2400);
addBucket(0);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 161
defaultSettings();
screen_bottom = 979;
energy_lost_from_wall = 10;
stopped_velocity = 300;
var squares = new Array();
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 500000, 100);
addTrap(trap2, 500000, 100);
addTrap(trap3, 500000, 100);
addTrap(trap4, 500000, 100);
addTrap(trap5, 500000, 100);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(1600);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Frame 162
defaultSettings();
screen_bottom = 979;
energy_lost_from_wall = 10;
stopped_velocity = 300;
var squares = new Array();
var arrows = new Array();
var arrows_force = new Array();
var traps = new Array();
var traps_pull = new Array();
var traps_dist = new Array();
addTrap(trap1, 500000, 200);
addTrap(trap2, 500000, 200);
addTrap(trap3, 500000, 200);
addTrap(trap4, 500000, 200);
var pegs = new Array();
var pegs_bounce = new Array();
setPegsBounce(energy_lost_from_peg);
var buckets = new Array();
addBucket(0);
addBucket(0);
addBucket(1600);
addBucket(0);
addBucket(0);
bucket_length = createBuckets();
stop();
Symbol 1108 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.7");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
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 _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.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 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_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 _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
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.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_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 showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
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")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
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();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
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_failed();
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 = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
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) {
options.ad_failed();
_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 showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(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 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);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
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++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 1109 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.43");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 1110 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 1111 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 139 MovieClip Frame 21
stop();
Symbol 146 Button
on (release) {
_root.menuNavigate("newGame");
}
Symbol 151 Button
on (release) {
_root.menuNavigate("resumeGame");
}
Symbol 156 Button
on (release) {
_root.menuNavigate("credits");
}
Symbol 160 Button
on (release) {
_root.menuNavigate("optionsGame");
}
Symbol 168 Button
on (release) {
getURL ("http://www.partytuesday.co.uk", "_blank");
}
Symbol 173 Button
on (release) {
getURL ("http://www.andrewdaniel.co.uk", "_blank");
}
Symbol 177 MovieClip Frame 1
if (_global.frame_to_go_to == "") {
stop();
} else {
gotoAndPlay (11);
}
Symbol 177 MovieClip Frame 12
_root.gotoAndPlay(_global.frame_to_go_to);
Symbol 177 MovieClip Frame 23
_global.frame_to_go_to = "";
Symbol 179 MovieClip Frame 21
stop();
Symbol 200 Button
on (release) {
getURL ("http://www.partytuesday.co.uk", "_blank");
}
Symbol 206 Button
on (release) {
getURL ("http://www.andrewdaniel.co.uk", "_blank");
}
Symbol 212 Button
on (release) {
menuNavigate("mainMenu");
}
Symbol 219 Button
on (release) {
_root._quality = "LOW";
}
Symbol 224 Button
on (release) {
_root._quality = "MEDIUM";
}
Symbol 229 Button
on (release) {
_root._quality = "HIGH";
}
Instance of Symbol 231 MovieClip in Symbol 232 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_level0._xmouse, _level0._ymouse)) {
followMouse = true;
}
}
onClipEvent (enterFrame) {
if (followMouse) {
this._x = _level0._xmouse - _parent._x;
if (this._x < lineStart) {
this._x = lineStart;
} else if (this._x > lineEnd) {
this._x = lineEnd;
}
}
}
onClipEvent (mouseUp) {
followMouse = false;
_root.backgroundVolume = (this._x - lineStart) / lineRatio;
if (_root.backgroundVolume < 0) {
_root.backgroundVolume = 0;
} else if (_root.backgroundVolume > 100) {
_root.backgroundVolume = 100;
}
_root.backgroundMusic.setVolume(_root.backgroundVolume);
}
onClipEvent (load) {
lineStart = -148.2;
lineEnd = 51.9;
lineLength = lineEnd - lineStart;
lineRatio = lineLength / 100;
this._x = (_root.backgroundVolume * lineRatio) + lineStart;
followMouse = false;
}
Instance of Symbol 231 MovieClip in Symbol 232 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_level0._xmouse, _level0._ymouse)) {
followMouse = true;
}
}
onClipEvent (enterFrame) {
if (followMouse) {
this._x = _level0._xmouse - _parent._x;
if (this._x < lineStart) {
this._x = lineStart;
} else if (this._x > lineEnd) {
this._x = lineEnd;
}
}
}
onClipEvent (mouseUp) {
followMouse = false;
_root.voiceVolume = (this._x - lineStart) / lineRatio;
if (_root.voiceVolume < 0) {
_root.voiceVolume = 0;
} else if (_root.voiceVolume > 100) {
_root.voiceVolume = 100;
}
}
onClipEvent (load) {
lineStart = -148.2;
lineEnd = 51.9;
lineLength = lineEnd - lineStart;
lineRatio = lineLength / 100;
this._x = (_root.voiceVolume * lineRatio) + lineStart;
followMouse = false;
}
Instance of Symbol 231 MovieClip in Symbol 232 MovieClip Frame 1
onClipEvent (mouseDown) {
if (this.hitTest(_level0._xmouse, _level0._ymouse)) {
followMouse = true;
}
}
onClipEvent (enterFrame) {
if (followMouse) {
this._x = _level0._xmouse - _parent._x;
if (this._x < lineStart) {
this._x = lineStart;
} else if (this._x > lineEnd) {
this._x = lineEnd;
}
}
}
onClipEvent (mouseUp) {
followMouse = false;
_root.sfxVolume = (this._x - lineStart) / lineRatio;
if (_root.sfxVolume < 0) {
_root.sfxVolume = 0;
} else if (_root.sfxVolume > 100) {
_root.sfxVolume = 100;
}
}
onClipEvent (load) {
lineStart = -148.2;
lineEnd = 51.9;
lineLength = lineEnd - lineStart;
lineRatio = lineLength / 100;
this._x = (_root.sfxVolume * lineRatio) + lineStart;
followMouse = false;
}
Symbol 233 Button
on (release) {
_root.saveFile.data.voiceVolume = _root.voiceVolume;
_root.saveFile.data.backgroundVolume = _root.backgroundVolume;
_root.saveFile.data.sfxVolume = _root.sfxVolume;
saveFile.flush();
menuNavigate("mainMenu");
}
Symbol 239 Button
on (release) {
_root.menuNavigate("newGameData");
}
Symbol 243 Button
on (release) {
_root.menuNavigate("mainMenu");
}
Symbol 257 Button
on (release) {
this.gotoAndPlay(162);
}
Symbol 282 Button
on (release) {
if ((_root.player_name != "") && (_root.player_name != "Enter a name")) {
play();
} else {
_root.player_name = "Enter a name";
}
}
Symbol 283 Button
on (release) {
if ((_root.player_name != "") && (_root.player_name != "Enter a name")) {
this.play();
} else {
_root.player_name = "Enter a name";
}
}
Symbol 285 Button
on (release) {
this.gotoAndPlay(701);
}
Symbol 308 Button
on (release) {
play();
}
Symbol 362 MovieClip Frame 1
_root.player_name = "";
Symbol 362 MovieClip Frame 171
stop();
Symbol 362 MovieClip Frame 296
stop();
Symbol 362 MovieClip Frame 701
_root.saveFile.data.player_name = _root.player_name;
_root.saveFile.flush();
_root.play();
Symbol 372 Button
on (release) {
_global.ball_type = 3;
_global.chosen_world = "World2Menu";
gotoAndStop ("World2Menu");
}
Symbol 380 Button
on (release) {
_global.chosen_world = "World4Menu";
gotoAndStop ("World4Menu");
}
Symbol 388 Button
on (release) {
_global.chosen_world = "World6Menu";
gotoAndStop ("World6Menu");
}
Symbol 396 Button
on (release) {
_global.chosen_world = "World5Menu";
gotoAndStop ("World5Menu");
}
Symbol 404 Button
on (release) {
_global.chosen_world = "World3Menu";
gotoAndStop ("World3Menu");
}
Symbol 411 Button
on (release) {
_global.chosen_world = "World7Menu";
gotoAndStop ("World7Menu");
}
Symbol 419 Button
on (release) {
_global.chosen_world = "World1Menu";
gotoAndStop ("World1Menu");
}
Symbol 427 Button
on (release) {
_global.chosen_world = "World8Menu";
gotoAndStop ("World8Menu");
}
Symbol 445 Button
on (release) {
menuNavigate("mainMenu");
}
Symbol 463 MovieClip Frame 1
varName = _parent._name.slice(0, length(_parent._name) - 1);
scoreVar = _root[varName];
if (scoreVar == 0) {
scoreVar = "";
}
if (_parent.locked) {
scoreVar = "lock";
}
stop();
Symbol 466 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-1";
gotoAndStop ("level1-1");
}
Symbol 467 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-2";
gotoAndStop ("level1-2");
}
Symbol 468 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-3";
gotoAndStop ("level1-3");
}
Symbol 469 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-4";
gotoAndStop ("level1-4");
}
Symbol 470 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-5";
gotoAndStop ("level1-5");
}
Symbol 471 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level1-6";
gotoAndStop ("level1-6");
}
Symbol 473 Button
on (release) {
menuNavigate("world_select");
}
Symbol 492 MovieClip Frame 1
num = Math.random() * 10;
if (num > 8.5) {
gotoAndPlay (3);
}
Symbol 492 MovieClip Frame 2
gotoAndPlay (1);
Symbol 492 MovieClip Frame 18
stop();
Symbol 498 Button
on (release) {
play();
}
Symbol 499 MovieClip Frame 35
stop();
Symbol 499 MovieClip Frame 66
stop();
Symbol 502 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-1";
gotoAndStop ("level2-1");
}
Symbol 503 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-2";
gotoAndStop ("level2-2");
}
Symbol 504 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-3";
gotoAndStop ("level2-3");
}
Symbol 505 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-4";
gotoAndStop ("level2-4");
}
Symbol 506 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-5";
gotoAndStop ("level2-5");
}
Symbol 507 Button
on (release) {
_global.ball_type = 3;
_global.level_on = "level2-6";
gotoAndStop ("level2-6");
}
Symbol 518 MovieClip Frame 60
stop();
Symbol 518 MovieClip Frame 97
stop();
Symbol 521 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-1";
gotoAndStop ("level4-1");
}
Symbol 522 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-2";
gotoAndStop ("level4-2");
}
Symbol 523 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-3";
gotoAndStop ("level4-3");
}
Symbol 524 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-4";
gotoAndStop ("level4-4");
}
Symbol 525 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-5";
gotoAndStop ("level4-5");
}
Symbol 526 Button
on (release) {
_global.ball_type = 2;
_global.level_on = "level4-6";
gotoAndStop ("level4-6");
}
Symbol 533 MovieClip Frame 40
stop();
Symbol 533 MovieClip Frame 81
stop();
Symbol 536 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-1";
gotoAndStop ("level6-1");
}
Symbol 537 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-2";
gotoAndStop ("level6-2");
}
Symbol 538 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-3";
gotoAndStop ("level6-3");
}
Symbol 539 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-4";
gotoAndStop ("level6-4");
}
Symbol 540 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-5";
gotoAndStop ("level6-5");
}
Symbol 541 Button
on (release) {
_global.ball_type = 4;
_global.level_on = "level6-6";
gotoAndStop ("level6-6");
}
Symbol 548 MovieClip Frame 40
stop();
Symbol 548 MovieClip Frame 75
stop();
Symbol 551 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-1";
gotoAndStop ("level3-1");
}
Symbol 552 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-2";
gotoAndStop ("level3-2");
}
Symbol 553 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-3";
gotoAndStop ("level3-3");
}
Symbol 554 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-4";
gotoAndStop ("level3-4");
}
Symbol 555 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-5";
gotoAndStop ("level3-5");
}
Symbol 556 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level3-6";
gotoAndStop ("level3-6");
}
Symbol 563 MovieClip Frame 44
stop();
Symbol 563 MovieClip Frame 70
stop();
Symbol 566 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-1";
gotoAndStop ("level5-1");
}
Symbol 567 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-2";
gotoAndStop ("level5-2");
}
Symbol 568 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-3";
gotoAndStop ("level5-3");
}
Symbol 569 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-4";
gotoAndStop ("level5-4");
}
Symbol 570 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-5";
gotoAndStop ("level5-5");
}
Symbol 571 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level5-6";
gotoAndStop ("level5-6");
}
Symbol 580 MovieClip Frame 58
stop();
Symbol 580 MovieClip Frame 100
stop();
Symbol 584 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-1";
gotoAndStop ("level7-1");
}
Symbol 585 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-2";
gotoAndStop ("level7-2");
}
Symbol 586 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-3";
gotoAndStop ("level7-3");
}
Symbol 587 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-4";
gotoAndStop ("level7-4");
}
Symbol 588 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-5";
gotoAndStop ("level7-5");
}
Symbol 589 Button
on (release) {
_global.ball_type = 5;
_global.level_on = "level7-6";
gotoAndStop ("level7-6");
}
Symbol 606 MovieClip Frame 1
num = Math.random() * 10;
if (num > 8) {
gotoAndPlay (3);
}
Symbol 606 MovieClip Frame 2
gotoAndPlay (1);
Symbol 606 MovieClip Frame 10
num = Math.random() + 2;
this._height = (this._width = 3 + num);
stop();
Symbol 608 MovieClip Frame 1
num = Math.random() * 10;
if (num > 7.5) {
gotoAndPlay (3);
}
Symbol 608 MovieClip Frame 2
gotoAndPlay (1);
Symbol 608 MovieClip Frame 12
stop();
Symbol 609 MovieClip Frame 36
stop();
Symbol 609 MovieClip Frame 73
stop();
Symbol 617 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-1";
gotoAndStop ("level8-1");
}
Symbol 618 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-2";
gotoAndStop ("level8-2");
}
Symbol 619 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-3";
gotoAndStop ("level8-3");
}
Symbol 620 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-4";
gotoAndStop ("level8-4");
}
Symbol 621 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-5";
gotoAndStop ("level8-5");
}
Symbol 622 Button
on (release) {
_global.ball_type = 1;
_global.level_on = "level8-6";
gotoAndStop ("level8-6");
}
Symbol 628 MovieClip Frame 34
stop();
Symbol 628 MovieClip Frame 58
stop();
Symbol 632 MovieClip Frame 1
stop();
Symbol 632 MovieClip Frame 2
stop();
Symbol 632 MovieClip Frame 3
stop();
Symbol 643 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 643 MovieClip Frame 3
stop();
Symbol 643 MovieClip Frame 14
gotoAndStop (3);
Symbol 664 MovieClip Frame 1
stop();
Symbol 664 MovieClip Frame 2
stop();
Symbol 664 MovieClip Frame 3
stop();
Symbol 664 MovieClip Frame 4
stop();
Symbol 664 MovieClip Frame 5
stop();
Symbol 680 MovieClip Frame 14
_parent.gotoAndStop(1);
Symbol 682 MovieClip Frame 47
_parent.gotoAndStop("off");
Symbol 683 MovieClip Frame 1
stop();
Symbol 702 MovieClip Frame 21
stop();
Symbol 718 MovieClip Frame 15
stop();
Symbol 726 MovieClip Frame 20
stop();
Symbol 737 MovieClip Frame 15
stop();
Symbol 740 MovieClip Frame 20
stop();
Symbol 741 MovieClip Frame 1
stop();
Symbol 741 MovieClip Frame 2
stop();
Symbol 741 MovieClip Frame 3
stop();
Symbol 741 MovieClip Frame 4
stop();
Symbol 741 MovieClip Frame 5
stop();
Symbol 741 MovieClip Frame 6
stop();
Symbol 741 MovieClip Frame 7
stop();
Symbol 741 MovieClip Frame 8
stop();
Symbol 741 MovieClip Frame 9
stop();
Symbol 741 MovieClip Frame 10
stop();
Symbol 741 MovieClip Frame 11
stop();
Symbol 741 MovieClip Frame 12
stop();
Symbol 744 MovieClip Frame 10
removeMovieClip(this);
Symbol 746 MovieClip Frame 1
if (!_root.voice_mute) {
if (_root.multi_peg) {
backgroundSound.attachSound("GAMEmultipeg");
backgroundSound.volume(_root.voiceVolume);
backgroundSound.start(0, 1);
_root.multi_peg = false;
} else if (_root.balleriffic) {
backgroundSound.attachSound("GAMEballer");
backgroundSound.volume(_root.voiceVolume);
backgroundSound.start(0, 1);
_root.balleriffic = false;
} else if (((random(100) < 2) && (!_root.levelOver)) && (backgroundSound.position == backgroundSound.duration)) {
soundToPlay = _root.randomSound(soundsToPlay);
backgroundSound.attachSound(soundToPlay);
backgroundSound.volume(_root.voiceVolume);
backgroundSound.start(0, 1);
}
if (_root.levelOver) {
backgroundSound.stop();
}
}
Symbol 750 MovieClip Frame 1
function camControl() {
parentColor.setTransform(camColor.getTransform());
var _local5 = sX / this._width;
var _local4 = sY / this._height;
_parent._x = cX - (this._x * _local5);
_parent._y = cY - (this._y * _local4);
_parent._xscale = 100 * _local5;
_parent._yscale = 100 * _local4;
if (_global.chosen_world == "World6Menu") {
_parent._rotation = 180;
_parent._x = cX + (this._x * _local5);
_parent._y = cY + (this._y * _local4);
}
}
function resetStage() {
var _local2 = {ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0};
parentColor.setTransform(_local2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._rotation = 0;
_parent._x = 0;
_parent._y = 0;
}
parentColor.setTransform(camColor.getTransform());
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = "exactFit";
var cX = (Stage.width / 2);
var cY = (Stage.height / 2);
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
this._y = _root.WallBottom._y - cY;
starting_time = 0;
Symbol 750 MovieClip Frame 2
if (_root.scrolling_menu) {
this._y = this._y + ((_root.ball._y - this._y) / 5);
} else if (Key.isDown(38)) {
starting_time = 0;
this._y = this._y - 10;
} else if (Key.isDown(40)) {
starting_time = 0;
this._y = this._y + 10;
} else if (starting_time > 70) {
if (this._y > _root.screen_top) {
this._y = this._y - 5;
} else {
_root.scrolling_menu = true;
this._y = _root.screen_top;
}
} else {
starting_time++;
}
if (this._y < _root.screen_top) {
this._y = _root.screen_top;
}
if (this._y > _root.screen_bottom) {
this._y = _root.screen_bottom;
}
Symbol 750 MovieClip Frame 3
gotoAndPlay (2);
Symbol 754 MovieClip Frame 1
_root.voice_mute = false;
_root.backgroundMusic.setVolume(_root.backgroundVolume);
stop();
Symbol 754 MovieClip Frame 2
_root.voice_mute = true;
_root.backgroundMusic.setVolume(0);
stop();
Symbol 756 Button
on (release, keyPress "m") {
voiceToggle.play();
}
Symbol 761 Button
on (release) {
_root.map_score = 0;
_root.resetWorld();
_root.levelOver = true;
_global.retry_level = true;
_root.statusMessage = ("What's wrong " + _root.player_name) + "? Are you ok?";
play();
}
Symbol 765 Button
on (release) {
_root.map_score = 0;
_root.resetWorld();
_root.levelOver = true;
play();
}
Symbol 766 Button
on (release) {
_root.map_score = 0;
_root.resetWorld();
_root.levelOver = true;
_global.retry_level = true;
_root.statusMessage = "What's wrong? Are you ok?";
play();
}
Symbol 775 Button
on (release, keyPress "<Enter>") {
action_at_end = 2;
play();
}
Symbol 780 Button
on (release, keyPress "<Space>") {
action_at_end = 3;
_global.retry_level = true;
gotoAndPlay (33);
}
Symbol 781 MovieClip Frame 1
stop();
Instance of Symbol 754 MovieClip "voiceToggle" in Symbol 781 MovieClip Frame 1
onClipEvent (load) {
if (_root.voice_mute == false) {
gotoAndPlay (1);
} else {
gotoAndPlay (2);
}
}
Instance of Symbol 763 MovieClip in Symbol 781 MovieClip Frame 1
onClipEvent (enterFrame) {
_parent._y = _root.vcam._y;
}
Symbol 781 MovieClip Frame 2
score = _root.map_score;
statusMessage = _root.statusMessage;
Symbol 781 MovieClip Frame 22
if (!_root.voice_mute) {
finalSound = new Sound(this);
if (score == 0) {
soundToPlay = _root.failSounds[random(_root.failSounds.length)];
} else {
soundToPlay = _root.winSounds[random(_root.winSounds.length)];
}
finalSound.attachSound(soundToPlay);
finalSound.setVolume(_root.voiceVolume);
finalSound.start(0, 1);
}
removeMovieClip(_root.ball);
levelString = _global.level_on;
baseString = levelString.slice(0, levelString.length - 2);
levelNumberString = levelString.slice(levelString.length - 1, levelString.length);
levelModify = baseString.concat(levelNumberString);
if ((score > _root[levelModify]) || (_root[levelModify] == "")) {
_root[levelModify] = score;
_root.saveFile.data[levelModify] = score;
_root.saveFile.flush();
}
if (score == 0) {
stop();
} else {
retryLevelSpace._visible = false;
retryLevelSpace._alpha = 0;
levelSelectEnter._visible = false;
levelSelectEnter._alpha = 0;
action_at_end = 2;
}
Symbol 781 MovieClip Frame 35
removeMovieClip(_root.ball);
_root.resetWorld();
if (action_at_end == 2) {
_root.gotoAndStop(_global.chosen_world);
} else if (action_at_end == 3) {
} else {
_root.gotoAndPlay("world_select");
}
Symbol 783 MovieClip Frame 15
stop();
Symbol 893 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 893 MovieClip Frame 3
stop();
Symbol 893 MovieClip Frame 14
gotoAndStop (3);
Symbol 895 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 895 MovieClip Frame 3
stop();
Symbol 895 MovieClip Frame 14
gotoAndStop (3);
Symbol 916 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 916 MovieClip Frame 3
stop();
Symbol 916 MovieClip Frame 14
gotoAndStop (3);
Symbol 926 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 926 MovieClip Frame 3
stop();
Symbol 926 MovieClip Frame 14
gotoAndStop (3);
Symbol 957 MovieClip Frame 1
direction_of_travel = true;
speed = 5;
Symbol 957 MovieClip Frame 2
if (direction_of_travel) {
this._x = this._x - speed;
} else {
this._x = this._x + speed;
}
if (this._x <= (_root.WallLeft._x + this._width)) {
this._x = this._x + speed;
direction_of_travel = !direction_of_travel;
}
if (this._x >= (_root.WallRight._x - this._width)) {
this._x = this._x - speed;
direction_of_travel = !direction_of_travel;
}
Symbol 957 MovieClip Frame 3
gotoAndPlay (2);
Symbol 960 MovieClip Frame 1
max_speed = 5;
x_vel = (Math.random() * (max_speed * 2)) - max_speed;
y_vel = (Math.random() * (max_speed * 2)) - max_speed;
Symbol 960 MovieClip Frame 2
this._x = this._x + x_vel;
this._y = this._y + y_vel;
if ((this._x <= _root.wall_left) || (this._x >= _root.wall_right)) {
this._x = this._x - x_vel;
x_vel = -x_vel;
}
if ((this._y <= (_root.wall_top + 50)) || (this._y >= (_root.wall_bottom - 200))) {
this._y = this._y - y_vel;
y_vel = -y_vel;
}
if (Math.random() < 0.1) {
x_vel = x_vel + ((Math.random() * 2) - 1);
y_vel = y_vel + ((Math.random() * 2) - 1);
if (x_vel > max_speed) {
x_vel = max_speed;
} else if (x_vel < (-max_speed)) {
x_vel = -max_speed;
}
if (y_vel > max_speed) {
y_vel = max_speed;
} else if (y_vel < (-max_speed)) {
y_vel = -max_speed;
}
}
Symbol 960 MovieClip Frame 3
gotoAndPlay (2);
Symbol 961 MovieClip Frame 1
speed = 3;
Symbol 961 MovieClip Frame 2
dist_x = _root.ball._x - this._x;
dist_y = _root.ball._y - this._y;
angle_to_ball = Math.atan2(dist_y, dist_x);
this._x = this._x + (Math.cos(angle_to_ball) * speed);
this._y = this._y + (Math.sin(angle_to_ball) * speed);
if (this._y < (_root.wall_top + 100)) {
this._y = _root.wall_top + 100;
} else if (this._y >= (_root.wall_bottom - 200)) {
this._y = _root.wall_bottom - 200;
}
Symbol 961 MovieClip Frame 3
gotoAndPlay (2);
Symbol 972 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 972 MovieClip Frame 3
stop();
Symbol 972 MovieClip Frame 14
gotoAndStop (3);
Symbol 979 MovieClip Frame 1
direction_of_travel = true;
speed = 5;
Symbol 979 MovieClip Frame 2
if (direction_of_travel) {
this._x = this._x - speed;
} else {
this._x = this._x + speed;
}
if (this._x <= (_root.WallLeft._x + this._width)) {
this._x = this._x + speed;
direction_of_travel = !direction_of_travel;
}
if (this._x >= (_root.WallRight._x - this._width)) {
this._x = this._x - speed;
direction_of_travel = !direction_of_travel;
}
Symbol 979 MovieClip Frame 3
gotoAndPlay (2);
Symbol 994 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 994 MovieClip Frame 3
stop();
Symbol 994 MovieClip Frame 14
gotoAndStop (3);
Symbol 1073 MovieClip Frame 54
if (random(20) < 3) {
gotoAndPlay (1);
}
Symbol 1073 MovieClip Frame 115
gotoAndPlay (54);
Symbol 1080 MovieClip Frame 1
direction_of_travel = true;
speed = 1;
Symbol 1080 MovieClip Frame 2
if (direction_of_travel) {
this._x = this._x - speed;
} else {
this._x = this._x + speed;
}
if (this._x <= (_root.WallLeft._x + this._width)) {
this._x = this._x + speed;
direction_of_travel = !direction_of_travel;
}
if (this._x >= (_root.WallRight._x - this._width)) {
this._x = this._x - speed;
direction_of_travel = !direction_of_travel;
}
Symbol 1080 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1089 MovieClip Frame 2
_root.setPegsBounce(_root.energy_lost_from_peg);
_root.addPeg(this);
Symbol 1089 MovieClip Frame 3
stop();
Symbol 1089 MovieClip Frame 14
gotoAndStop (3);
Symbol 1093 MovieClip Frame 55
if (random(10) < 2) {
play();
} else {
gotoAndPlay (1);
}
Symbol 1098 MovieClip Frame 1
max_speed = 5;
x_vel = (Math.random() * (max_speed * 2)) - max_speed;
y_vel = (Math.random() * (max_speed * 2)) - max_speed;
Symbol 1098 MovieClip Frame 2
this._x = this._x + x_vel;
this._y = this._y + y_vel;
if ((this._x <= _root.wall_left) || (this._x >= _root.wall_right)) {
this._x = this._x - x_vel;
x_vel = -x_vel;
}
if ((this._y <= (_root.wall_top + 50)) || (this._y >= (_root.wall_bottom - 10))) {
this._y = this._y - y_vel;
y_vel = -y_vel;
}
if (Math.random() < 0.1) {
x_vel = x_vel + ((Math.random() * 2) - 1);
y_vel = y_vel + ((Math.random() * 2) - 1);
if (x_vel > max_speed) {
x_vel = max_speed;
} else if (x_vel < (-max_speed)) {
x_vel = -max_speed;
}
if (y_vel > max_speed) {
y_vel = max_speed;
} else if (y_vel < (-max_speed)) {
y_vel = -max_speed;
}
}
Symbol 1098 MovieClip Frame 3
gotoAndPlay (2);
Symbol 1100 MovieClip Frame 1
if (_root.speed_taken == undefined) {
speed = 3;
_root.speed_taken = 1;
} else if (_root.speed_taken == 1) {
speed = 5;
_root.speed_taken = 2;
} else if (_root.speed_taken == 2) {
speed = 7;
delete _root.speed_taken;
}
Symbol 1100 MovieClip Frame 2
if (!_root.levelOver) {
dist_x = _root.ball._x - this._x;
dist_y = _root.ball._y - this._y;
angle_to_ball = Math.atan2(dist_y, dist_x);
this._x = this._x + (Math.cos(angle_to_ball) * speed);
this._y = this._y + (Math.sin(angle_to_ball) * speed);
if (this._y < (_root.wall_top + 100)) {
this._y = _root.wall_top + 100;
} else if (this._y > (_root.wall_bottom - 200)) {
this._y = _root.wall_bottom - 200;
}
}
Symbol 1100 MovieClip Frame 3
gotoAndPlay (2);