Frame 1
function gameInit() {
gameState = "inPlay";
life = 0;
if (popup._currentframe != 1) {
popup.play();
}
states = new Array();
if (enteredLevelCode != "") {
targetMC.loadMovie((((loadPath + webLink) + "soapbubble2_") + enteredLevelCode) + ".swf");
currentLevel = enteredLevelCode;
pauseFrame.gotoAndPlay("in");
userPause = false;
} else {
targetMC.loadMovie((loadPath + webLink) + "soapbubble2_0.swf");
currentLevel = 0;
}
trace("gameInit: Level " + currentLevel);
enteredLevelCode = "";
_quality = kvalitet;
gotoAndStop (3);
}
function gameExit() {
trace("gameExit");
gameState = "";
if (popup._currentframe != 1) {
popup.play();
}
if (gx_endgame._currentframe != 1) {
gx_endgame.play();
}
popup.gotoAndStop(1);
pause = true;
userPause = false;
states = new Array();
sound_fadeDown(sound1);
unloadMovie ("targetMC");
if (pauseFrame._currentframe != 1) {
pauseFrame.gotoAndPlay("out");
}
gotoAndStop (2);
_quality = "HIGH";
}
function gamePause() {
if ((bubble.state == "intact") or (bubble.state == "submerged")) {
if (userPause == false) {
if (popup._currentframe != 1) {
popup.play();
}
pause = true;
userPause = true;
pauseFrame.gotoAndStop("paused");
} else {
pause = false;
userPause = false;
pauseFrame.gotoAndStop("game");
}
}
}
function looseLife() {
wipeAction = "";
trace("looseLife");
life++;
bubble._y = -200;
bubble._x = -200;
bubble._alpha = 100;
bubble.xSpeed = 0;
bubble.ySpeed = 0;
if ((gameState == "over") or (timeBar.bar._visible == false)) {
gameover.play();
} else {
if (arrowColorVar != targetMC.blue) {
arrowColorVar = targetMC.red;
}
beginSlideX = lifeMC1._x;
beginSlideY = lifeMC1._y;
endSlideX = arrowColorVar._x;
endSlideY = arrowColorVar._y;
if (levelReset == true) {
targetMC.hinder.gotoAndStop(1);
}
targetMC.resetLevel();
slider.MCobject = lifeMC1;
initializeNewLocation();
}
}
function initiateNewLife() {
trace("initiateNewLife");
lifeMC1._visible = true;
lifeMC1._x = lifeMC1X;
lifeMC1._y = lifeMC1Y;
lifeMC1._xscale = 100;
lifeMC1._yscale = 100;
lifeMC1._alpha = 100;
lifeMC1.gotoAndStop(1);
lifeLoss.play();
bubble._y = arrowColorVar._y;
bubble._x = arrowColorVar._x;
bubble.state = "intact";
bubble.gotoAndStop(1);
bubble.Yspeed = 0;
bubble.Xspeed = 0;
}
function addScore() {
pointsLeft = timeBar.bar._xscale * 10;
if (pointsLeft > 0) {
score = score + Math.floor(pointsLeft);
}
}
function enterCode(levelcode) {
uppercasedCode = levelcode.toUpperCase();
trace("Entered code: " + uppercasedCode);
s = 0;
while (s < codesUpperCase.length) {
checkedCode = codesUpperCase[s];
if (checkedCode == uppercasedCode) {
if (popup._currentframe != 1) {
popup.play();
}
enteredLevelCode = s + 1;
score = 0;
wipeAction = "start";
wipe.play();
break;
}
s++;
}
if ((s == codesUpperCase.length) and (enteredLevelCode == "")) {
message("", "The code you entered doesn't seem to be valid.");
}
}
function saveGame() {
if ((popup._currentframe == 1) and (gameState == "inPlay")) {
if ((bubble.state == "intact") or (bubble.state == "submerged")) {
trace("saveGame");
saveGameInfo.data.gameSaved = true;
saveGameInfo.data.kvalitet = kvalitet;
saveGameInfo.data.highestLevel = highestLevel;
saveGameInfo.data.userSound = userSound;
saveGameInfo.data.currentLevel = currentLevel;
saveGameInfo.data.playerXpos = bubble._x;
saveGameInfo.data.playerYpos = bubble._y;
saveGameInfo.data.currentLevelFrame = targetMC.hinder._currentframe;
saveGameInfo.data.arrowColorVar = arrowColorVar;
saveGameInfo.data.savedStates = new Array();
saveGameInfo.data.SaveStatesNum = 1;
while (saveGameInfo.data.SaveStatesNum < (states.length + 1)) {
saveGameInfo.data.savedStates.push(states[saveGameInfo.data.SaveStatesNum - 1]);
saveGameInfo.data.SaveStatesNum++;
}
saveGameInfo.flush();
message("", "The game was saved. Press SPACE to continue.");
}
}
}
function loadGame() {
if (saveGameInfo.data.gameSaved == true) {
pauseFrame.gotoAndPlay("in");
gotoAndStop (3);
life = 0;
kvalitet = saveGameInfo.data.kvalitet;
highestLevel = saveGameInfo.data.highestLevel;
userSound = saveGameInfo.data.userSound;
currentLevel = saveGameInfo.data.currentLevel;
trace("loadGame: Level " + currentLevel);
targetMC.loadMovie((((loadPath + webLink) + "soapbubble2_") + currentLevel) + ".swf");
sound_fadeUp(currentSound, 50, 50);
bubble._x = saveGameInfo.data.playerXpos;
bubble._y = saveGameInfo.data.playerYpos;
arrowColorVar = saveGameInfo.data.arrowColorVar;
states = new Array();
statesNum = 1;
_quality = kvalitet;
while (statesNum < (saveGameInfo.data.savedStates.length + 1)) {
states.push(saveGameInfo.data.savedStates[statesNum - 1]);
statesNum++;
}
} else {
message("", "No game has been saved. Press S to save.");
}
}
function addState(item) {
var _local1 = item;
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == _local1) {
trace("state already exists: " + _local1);
break;
}
s++;
}
if ((s == states.length) and (checkedState != _local1)) {
states.push(_local1);
trace("state added: " + _local1);
}
}
function checkState(item) {
var _local1 = item;
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == _local1) {
return(true);
}
s++;
}
return(undefined);
}
function removeState(item) {
var _local1 = item;
checkedState = "";
s = 0;
while (s < states.length) {
checkedState = states[s];
if (checkedState == _local1) {
states.splice(s, 1);
trace("state removed: " + _local1);
break;
}
s++;
}
if ((s == states.length) and (checkedState != _local1)) {
trace("state NOT removed: " + _local1);
}
}
function TransportToNext(arrowColor) {
if ((bubble.state == "intact") or (bubble.state == "submerged")) {
gameState = "loading";
trace("TransportToNext");
arrowColorVar = targetMC.red;
if (pause == false) {
currentLevel++;
wipeAction = "transport";
wipe.gotoAndPlay("in");
bubble._y = -200;
bubble._x = -200;
if (currentLevel > highestLevel) {
addScore();
}
}
}
}
function TransportToPrevious(arrowColor) {
if ((bubble.state == "intact") or (bubble.state == "submerged")) {
gameState = "loading";
trace("TransportToPrevious");
arrowColorVar = targetMC.blue;
if (pause == false) {
currentLevel--;
wipeAction = "transport";
wipe.gotoAndPlay("in");
bubble._y = -200;
bubble._x = -200;
}
}
}
function transport() {
targetMC.loadMovie((((loadPath + webLink) + "soapbubble2_") + currentLevel) + ".swf");
}
function initializeNewLocation() {
gameState = "inPlay";
currentLevelCode = codesUpperCase[currentLevel - 1];
if (wipeAction == "start") {
if (levelReset == true) {
targetMC.hinder.gotoAndPlay(1);
}
bubble.xSpeed = 0;
bubble.ySpeed = 0;
bubble._x = targetMC.red._x;
bubble._y = targetMC.red._y;
arrowColorVar = targetMC.red;
} else if (wipeAction == "load") {
arrowColorVar = saveGameInfo.data.arrowColorVar;
bubble.xSpeed = 0;
bubble.ySpeed = 0;
targetMC.hinder.gotoAndStop(saveGameInfo.data.currentLevelFrame);
} else if (bubble.state == "popped") {
slider.play();
} else {
bubble._y = arrowColorVar._y;
bubble._x = arrowColorVar._x;
if (currentLevel > highestLevel) {
lifeMC1.gotoAndStop(11);
}
if (currentLevel > highestLevel) {
timeBar.bar._xscale = 100;
timeBar.bar._visible = true;
highestLevel = currentLevel;
}
}
if (((currentLevel == 16) or (currentLevel == 17)) or (currentLevel == 18)) {
currentSound = sound3;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
} else if ((((((currentLevel == 6) or (currentLevel == 7)) or (currentLevel == 8)) or (currentLevel == 9)) or (currentLevel == 10)) or (currentLevel == 11)) {
currentSound = sound2;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
} else if ((((((currentLevel == 20) or (currentLevel == 21)) or (currentLevel == 22)) or (currentLevel == 23)) or (currentLevel == 24)) or (currentLevel == 25)) {
currentSound = sound4;
if (soundState != "playing") {
sound_fadeUp(currentSound, 25, 25);
}
} else if (currentLevel == 0) {
currentSound = sound5;
if (soundState != "playing") {
sound_fadeUp(currentSound, 75, 75);
}
} else if (currentLevel == 29) {
currentSound = sound6;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
} else {
currentSound = sound1;
if (soundState != "playing") {
sound_fadeUp(currentSound, 50, 50);
}
}
}
function launchGameOver() {
bubble._visible = false;
pause = true;
lifeMC1._visible = false;
pausBN._visible = false;
pausBN.enabled = false;
menuBN._visible = false;
menuBN.enabled = false;
saveBN._visible = false;
saveBN.enabled = false;
bn_music._visible = false;
bn_toggle._visible = false;
timeBar._visible = false;
if (userSound == "on") {
if (soundState == "playing") {
sound_fadeDown(currentSound, 0, 25);
}
}
}
function launchCutsceneMovie() {
bubble._visible = false;
pause = true;
levelCodeDisplay._visible = false;
lifeMC1._visible = false;
if (pauseFrame._currentframe != 1) {
pauseFrame.gotoAndPlay("out");
}
pausBN._visible = false;
menuBN._visible = false;
bn_music._visible = false;
bn_toggle._visible = false;
scoreDisplay._visible = false;
timeBar._visible = false;
}
function launchFirstMovie() {
bubble._visible = true;
bubble._x = targetMC.red._x;
bubble._y = targetMC.red._y;
levelCodeDisplay._visible = true;
lifeMC1._visible = true;
pauseFrame.gotoAndPlay("in");
pausBN._visible = true;
menuBN._visible = true;
bn_music._visible = true;
bn_toggle._visible = true;
timeBar.bar._xscale = 100;
score = 0;
}
function message(sender, descriptionText) {
if (gx_endgame._currentframe != 1) {
gx_endgame.play();
}
if (popup._currentframe == 1) {
popup.gotoAndPlay("in");
txt = descriptionText;
activeInventory = "";
pressed = "";
if (i >= (sender.description.length - 1)) {
i = 0;
} else {
i++;
}
}
}
function userTrace(traceMessage) {
var _local1 = traceMessage;
if (previousTraceMessage != _local1) {
trace(_local1);
previousTraceMessage = _local1;
}
}
function sound_init(soundName) {
var _local1 = soundName;
currentSound = _local1;
_local1.start(0, 999);
_local1.setVolume(0);
if (currentVolume != "") {
sound_fadeUp(_local1, currentVolume, 10);
} else {
sound_fadeUp(_local1, 25, 10);
}
soundState = "playing";
}
function sound_exit(soundName) {
soundState = "stopped";
currentSound = soundName;
sound_fadeDown(soundName, 0, 10);
}
function sound_fadeUp(soundName, targetVolume, steps) {
var _local1 = soundName;
sound_exit(currentSound);
currentSound = _local1;
currentVolume = targetVolume;
if (userSound == "on") {
userTrace("sound_fadeUp: " + _local1);
targetVolumeNum = targetVolume;
stepNum = steps;
_local1.setVolume(0);
_local1.start(0, 999);
soundState = "playing";
soundFader.gotoAndPlay("fade");
}
}
function sound_fadeDown(soundName, targetVolume, steps) {
currentSound = soundName;
if (userSound == "on") {
userTrace("sound_fadeDown: " + soundName);
targetVolumeNum = targetVolume;
stepNum = steps;
soundFader.gotoAndPlay("fade");
soundState = "stopped";
}
}
function sound_mix(soundName) {
oldSound = currentSound;
}
function toggleSound() {
if (soundState == "playing") {
sound_exit(currentSound);
bn_music.gotoAndStop(2);
soundState = "stopped";
userSound = "off";
} else {
userSound = "on";
sound_init(currentSound);
bn_music.gotoAndStop(1);
}
}
function writeCookie() {
cookie = SharedObject.getLocal(cookieName);
cookie.data.name1 = "Unknown";
cookie.data.name2 = "Unknown";
cookie.data.name3 = "Unknown";
cookie.data.name4 = "Unknown";
cookie.data.name5 = "Unknown";
cookie.data.name6 = "Unknown";
cookie.data.name7 = "Unknown";
cookie.data.name8 = "Unknown";
cookie.data.name9 = "Unknown";
cookie.data.name10 = "Unknown";
cookie.data.score1 = 0;
cookie.data.score2 = 0;
cookie.data.score3 = 0;
cookie.data.score4 = 0;
cookie.data.score5 = 0;
cookie.data.score6 = 0;
cookie.data.score7 = 0;
cookie.data.score8 = 0;
cookie.data.score9 = 0;
cookie.data.score10 = 0;
cookie.data.cookieState = "written";
cookie.flush();
}
function useCookie() {
cookie = SharedObject.getLocal(cookieName);
name1 = cookie.data.name1;
name2 = cookie.data.name2;
name3 = cookie.data.name3;
name4 = cookie.data.name4;
name5 = cookie.data.name5;
name6 = cookie.data.name6;
name7 = cookie.data.name7;
name8 = cookie.data.name8;
name9 = cookie.data.name9;
name10 = cookie.data.name10;
score1 = cookie.data.score1;
score2 = cookie.data.score2;
score3 = cookie.data.score3;
score4 = cookie.data.score4;
score5 = cookie.data.score5;
score6 = cookie.data.score6;
score7 = cookie.data.score7;
score8 = cookie.data.score8;
score9 = cookie.data.score9;
score10 = cookie.data.score10;
}
function updateCookie() {
cookie = SharedObject.getLocal(cookieName);
cookie.data.name1 = name1;
cookie.data.name2 = name2;
cookie.data.name3 = name3;
cookie.data.name4 = name4;
cookie.data.name5 = name5;
cookie.data.name6 = name6;
cookie.data.name7 = name7;
cookie.data.name8 = name8;
cookie.data.name9 = name9;
cookie.data.name10 = name10;
cookie.data.score1 = score1;
cookie.data.score2 = score2;
cookie.data.score3 = score3;
cookie.data.score4 = score4;
cookie.data.score5 = score5;
cookie.data.score6 = score6;
cookie.data.score7 = score7;
cookie.data.score8 = score8;
cookie.data.score9 = score9;
cookie.data.score10 = score10;
cookie.data.cookieState = "written";
cookie.flush();
}
fscommand ("allowscale", false);
fscommand ("showmenu", false);
_global.soapbubble2MainTimeline = this;
lastLevel = false;
cookieName = "soapbubble2Cookie1";
saveGameInfo = SharedObject.getLocal(cookieName);
codesUpperCase = new Array("XDKD", "KLDC", "CMPD", "BKGL", "XPPJ", "FXLC", "KFFK", "KLFB", "MBHK", "BRXD", "ZFBB", "MXHF", "CKJL", "LFCK", "XJFF", "XPFK", "QLFX", "LBXK", "RXXD", "DKXD", "CDLK", "DPMC", "LGKB", "JPPX", "CLXF", "KFKX", "BFLB", "CJFF");
s = 0;
pause = true;
userPause = false;
gameState = "";
enteredLevelCode = "";
kvalitet = "HIGH";
userSound = "on";
levelReset = false;
score = 0;
highestLevel = 1;
webLink = "http://uploads.ungrounded.net/userassets/295000/295497/";
if (_level0.viewingThrough == "cockroach") {
loadPath = "./soapbubble_2/";
} else {
loadPath = "";
}
sound1 = new Sound(this);
sound1.attachSound("loop2");
sound2 = new Sound(this);
sound2.attachSound("fabrik");
sound3 = new Sound(this);
sound3.attachSound("sound3");
sound4 = new Sound(this);
sound4.attachSound("sound4");
sound5 = new Sound(this);
sound5.attachSound("wind");
sound6 = new Sound(this);
sound6.attachSound("night");
cookieName = "soap2Cookie";
cookie = SharedObject.getLocal(cookieName);
cookieState = cookie.data.cookieState;
if (cookieState == "written") {
useCookie();
} else {
writeCookie();
}
stop();
Instance of Symbol 27 MovieClip in Frame 1
onClipEvent (enterFrame) {
percent = Math.floor((_parent.getBytesLoaded() / _parent.getBytesTotal()) * 100);
_parent.percent_txt = percent + " %";
_parent.bar._xscale = percent;
if (percent == 100) {
_parent.gotoAndStop(2);
} else {
_parent.stop();
}
}
Frame 2
if (newGame != "Done") {
wipe.gotoAndPlay("out");
newGame = "Done";
}
lastLevel = false;
score = 0;
gameState = "";
highestLevel = 1;
if ((!currUrl.indexOf("cockroach.se")) <= 0) {
roach._visible = false;
roach._x = -200;
roach._y = -200;
}
stop();
Frame 3
stop();
targetMC._visible = true;
Instance of Symbol 274 MovieClip "scoreDisplay" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 279 MovieClip "levelCodeDisplay" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 282 MovieClip "lifeMC1" in Frame 3
onClipEvent (load) {
_visible = false;
gotoAndStop (11);
soapbubble2MainTimeline.lifeMC1X = _x;
soapbubble2MainTimeline.lifeMC1Y = _y;
}
Instance of Symbol 286 MovieClip "timeBar" in Frame 3
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 291 MovieClip "instructions" in Frame 3
onClipEvent (keyDown) {
if (_currentframe == 35) {
soapbubble2MainTimeline.pause = false;
play();
}
}
Instance of Symbol 300 MovieClip "bubble" in Frame 3
onClipEvent (load) {
Yspeed = 0;
Xspeed = 0;
speedLimit = 13;
movementSpeed = 0.7;
state = "intact";
gravity = 0.1;
}
onClipEvent (enterFrame) {
if (Yspeed > speedLimit) {
Yspeed = speedLimit;
}
if (Yspeed < (-speedLimit)) {
Yspeed = -speedLimit;
}
if (Xspeed > speedLimit) {
Xspeed = speedLimit;
}
if (Xspeed < (-speedLimit)) {
Xspeed = -speedLimit;
}
if (soapbubble2MainTimeline.pause == false) {
if (soapbubble2MainTimeline.lastLevel == false) {
if (!soapbubble2MainTimeline.targetMC.hinder.hitTest(_x, _y, true)) {
nonsens = 0;
} else {
state = "popped";
Yspeed = 0;
Xspeed = 0;
play();
}
if (Key.isDown(37)) {
Xspeed = Xspeed - movementSpeed;
}
if (Key.isDown(39)) {
Xspeed = Xspeed + movementSpeed;
}
if (Key.isDown(38)) {
Yspeed = Yspeed - movementSpeed;
} else {
Yspeed = Yspeed + gravity;
}
if (Key.isDown(40)) {
Yspeed = Yspeed + movementSpeed;
}
_y = (_y + Yspeed);
_x = (_x + Xspeed);
this.bubble.play();
} else {
if (((!soapbubble2MainTimeline.targetMC.hinder.walls.hitTest(_x, _y, true)) and (!soapbubble2MainTimeline.targetMC.hinder.v2.hitTest(_x, _y, true))) and (!soapbubble2MainTimeline.targetMC.hinder.caps.hitTest(_x, _y, true))) {
nonsens = 0;
} else {
state = "popped";
Yspeed = 0;
Xspeed = 0;
play();
}
if (Key.isDown(37)) {
Xspeed = Xspeed - movementSpeed;
}
if (Key.isDown(39)) {
Xspeed = Xspeed + movementSpeed;
}
if (Key.isDown(38)) {
Yspeed = Yspeed - movementSpeed;
} else {
Yspeed = Yspeed + gravity;
}
if (Key.isDown(40)) {
Yspeed = Yspeed + movementSpeed;
}
_y = (_y + Yspeed);
_x = (_x + Xspeed);
this.bubble.play();
}
} else {
this.bubble.stop();
_y = (_y + 0);
_x = (_x + 0);
}
if (state == "submerged") {
gravity = -0.18;
movementSpeed = 0.4;
speedLimit = 3;
} else {
gravity = 0.1;
movementSpeed = 0.7;
speedLimit = 13;
}
}
Instance of Symbol 303 MovieClip "bn_music" in Frame 3
onClipEvent (load) {
_alpha = 30;
if (soapbubble2MainTimeline.userSound == "off") {
soapbubble2MainTimeline.sound_exit(currentSound);
soapbubble2MainTimeline.bn_music.gotoAndStop(2);
soapbubble2MainTimeline.soundState = "stopped";
}
}
Symbol 19 MovieClip Frame 1
stop();
Symbol 19 MovieClip Frame 2
_parent.lifeMC1._visible = true;
_parent.levelCodeDisplay._visible = true;
_parent.scoreDisplay._visible = true;
_parent.timeBar._visible = true;
Symbol 19 MovieClip Frame 7
_parent.lifeMC1._visible = true;
_parent.levelCodeDisplay._visible = true;
_parent.scoreDisplay._visible = true;
_parent.timeBar._visible = true;
stop();
Symbol 19 MovieClip Frame 13
gotoAndStop (1);
Symbol 19 MovieClip Frame 14
stop();
Symbol 26 Button
on (release) {
getURL ("http://www.newgrounds.com", "blank");
}
Symbol 35 MovieClip Frame 1
function soundFade() {
if (i < soapbubble2MainTimeline.stepNum) {
currentVolume = soapbubble2MainTimeline.currentSound.getVolume();
soapbubble2MainTimeline.currentSound.setVolume(currentVolume + incrementSize);
soapbubble2MainTimeline.test = soapbubble2MainTimeline.currentSound.getVolume();
i++;
} else {
userTrace("fade complete");
soapbubble2MainTimeline.currentSound.setVolume(soapbubble2MainTimeline.targetVolumeNum);
if (soapbubble2MainTimeline.targetVolumeNum == 0) {
soapbubble2MainTimeline.currentSound.stop();
}
gotoAndStop (1);
}
}
incrementSize = (soapbubble2MainTimeline.targetVolumeNum - startVolume) / soapbubble2MainTimeline.stepNum;
stop();
Symbol 35 MovieClip Frame 2
i = 0;
startVolume = soapbubble2MainTimeline.currentSound.getVolume();
incrementSize = (soapbubble2MainTimeline.targetVolumeNum - startVolume) / soapbubble2MainTimeline.stepNum;
soundFade();
Symbol 35 MovieClip Frame 3
soundFade();
Symbol 35 MovieClip Frame 4
soundFade();
gotoAndPlay (3);
Symbol 46 Button
on (release, keyPress "n") {
_parent.play();
}
Symbol 50 Button
on (release, keyPress "y") {
if (soapbubble2MainTimeline.wipe._currentframe == 1) {
soapbubble2MainTimeline.wipeAction = "end";
soapbubble2MainTimeline.wipe.play();
_parent.gotoAndPlay("out");
} else {
soapbubble2MainTimeline.wipeAction = "end";
soapbubble2MainTimeline.wipe.gotoAndPlay("action");
_parent.gotoAndPlay("out");
}
}
Symbol 55 MovieClip Frame 1
if (_parent.wipeAction == "end") {
soapbubble2MainTimeline.pause = true;
soapbubble2MainTimeline.userPause = true;
} else if (soapbubble2MainTimeline.userPause == true) {
soapbubble2MainTimeline.pause = true;
soapbubble2MainTimeline.userPause = true;
} else {
soapbubble2MainTimeline.pause = false;
soapbubble2MainTimeline.userPause = false;
}
stop();
Symbol 55 MovieClip Frame 2
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 3
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 4
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 5
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 6
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 7
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 8
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 9
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 10
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 11
soapbubble2MainTimeline.pause = true;
stop();
Instance of Symbol 54 MovieClip in Symbol 55 MovieClip Frame 11
onClipEvent (keyDown) {
if (Key.isDown(32)) {
_parent.gotoAndPlay("out");
}
}
onClipEvent (enterFrame) {
soapbubble2MainTimeline.pause = true;
}
Symbol 55 MovieClip Frame 12
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 13
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 14
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 15
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 16
soapbubble2MainTimeline.pause = true;
Symbol 55 MovieClip Frame 17
soapbubble2MainTimeline.pause = true;
Symbol 72 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 2
soapbubble2MainTimeline.pause = true;
if (soapbubble2MainTimeline.userSound == "on") {
if (soapbubble2MainTimeline.soundState == "playing") {
soapbubble2MainTimeline.sound_fadeDown(soapbubble2MainTimeline.currentSound, 0, 25);
}
}
play();
Symbol 72 MovieClip Frame 20
soapbubble2MainTimeline.pause = true;
if (_parent.wipeAction == "start") {
_parent.gameInit();
_parent.wipeAction == "";
nextFrame();
} else if (_parent.wipeAction == "end") {
_parent.gameExit();
_parent.wipeAction == "";
gotoAndPlay ("out");
} else if (_parent.wipeAction == "load") {
_parent.loadGame();
nextFrame();
} else {
soapbubble2MainTimeline.percent_txt = "0 %";
_parent.transport(_parent.travellingDirectionVar);
_parent.wipeAction == "";
nextFrame();
}
Symbol 72 MovieClip Frame 21
soapbubble2MainTimeline.pause = true;
stop();
Symbol 72 MovieClip Frame 22
soapbubble2MainTimeline.pause = true;
play();
Symbol 72 MovieClip Frame 37
if (_parent.wipeAction == "load") {
_parent.message("", "The game was loaded. Press SPACE to continue.");
_parent.wipeAction == "";
}
Symbol 72 MovieClip Frame 40
if ((soapbubble2MainTimeline.userPause == false) and (soapbubble2MainTimeline.pause == true)) {
soapbubble2MainTimeline.pause = false;
}
Symbol 97 Button
on (release) {
gotoAndPlay ("toHighscore");
}
Symbol 98 Button
on (release) {
play();
}
on (keyPress "M") {
play();
}
on (keyPress "m") {
play();
}
Symbol 99 Button
on (release) {
play();
}
Symbol 100 Button
on (release) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
} else if (soapbubble2MainTimeline.saveGameInfo.data.gameSaved == true) {
soapbubble2MainTimeline.wipeAction = "load";
soapbubble2MainTimeline.wipe.play();
} else {
soapbubble2MainTimeline.message("", "No game has been saved. Press S in-game to save.");
}
}
Symbol 101 Button
on (release) {
gotoAndPlay ("outToHighscore");
}
Symbol 102 Button
on (release) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
}
soapbubble2MainTimeline.wipeAction = "start";
soapbubble2MainTimeline.wipe.gotoAndPlay("in");
}
Symbol 103 Button
on (release) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
} else if (soapbubble2MainTimeline.saveGameInfo.data.gameSaved == true) {
soapbubble2MainTimeline.wipeAction = "load";
soapbubble2MainTimeline.wipe.play();
} else {
soapbubble2MainTimeline.message("", "No game has been saved. Press S in-game to save.");
}
}
Symbol 108 Button
on (release, keyPress "<Enter>") {
if (_parent.nameTXT == "") {
_parent.nameTXT = "Unknown";
} else {
_parent.nameTXT = nameTXT;
}
_parent.play();
}
Symbol 139 Button
on (release) {
play();
}
on (keyPress "M") {
play();
}
on (keyPress "m") {
play();
}
Symbol 140 MovieClip Frame 1
soapbubble2MainTimeline.pause = false;
stop();
Symbol 140 MovieClip Frame 2
soapbubble2MainTimeline.pause = true;
soapbubble2MainTimeline.launchGameOver();
play();
Symbol 140 MovieClip Frame 3
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 4
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 5
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 6
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 7
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 8
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 9
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 10
soapbubble2MainTimeline.pause = true;
Symbol 140 MovieClip Frame 16
currentLevelCode = soapbubble2MainTimeline.currentLevelCode;
Symbol 140 MovieClip Frame 43
stop();
Symbol 140 MovieClip Frame 44
soapbubble2MainTimeline.pause = true;
soapbubble2MainTimeline.wipeAction = "end";
soapbubble2MainTimeline.wipe.play();
Symbol 140 MovieClip Frame 45
play();
Symbol 140 MovieClip Frame 55
gotoAndStop (1);
Symbol 140 MovieClip Frame 56
play();
Symbol 140 MovieClip Frame 69
Selection.setFocus("MCenterCode.nameTXT");
stop();
Symbol 140 MovieClip Frame 70
play();
Symbol 140 MovieClip Frame 85
i = 1;
while (i <= 10) {
if (soapbubble2MainTimeline.score >= soapbubble2MainTimeline["score" + i]) {
j = 10;
while (j > i) {
soapbubble2MainTimeline["score" + j] = soapbubble2MainTimeline["score" + (j - 1)];
soapbubble2MainTimeline["name" + j] = soapbubble2MainTimeline["name" + (j - 1)];
j--;
}
soapbubble2MainTimeline["score" + i] = soapbubble2MainTimeline.score;
soapbubble2MainTimeline["name" + i] = nameTXT;
break;
}
i++;
}
stop();
Symbol 140 MovieClip Frame 86
soapbubble2MainTimeline.pause = true;
soapbubble2MainTimeline.wipeAction = "end";
soapbubble2MainTimeline.wipe.play();
Symbol 140 MovieClip Frame 100
soapbubble2MainTimeline.updateCookie();
Symbol 146 Button
on (release) {
getURL ("http://cockroach.se", "_blank");
}
Symbol 154 MovieClip Frame 1
if (soapbubble2MainTimeline.userPause == true) {
soapbubble2MainTimeline.pause = true;
} else {
soapbubble2MainTimeline.pause = false;
}
stop();
stop();
Symbol 154 MovieClip Frame 2
soapbubble2MainTimeline.pause = true;
play();
Symbol 154 MovieClip Frame 3
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 4
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 5
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 6
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 7
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 8
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 9
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 10
soapbubble2MainTimeline.pause = true;
Symbol 154 MovieClip Frame 11
soapbubble2MainTimeline.pause = true;
stop();
Instance of Symbol 54 MovieClip in Symbol 154 MovieClip Frame 11
onClipEvent (keyDown) {
if (Key.isDown(32)) {
_parent.gotoAndPlay("out");
}
}
Symbol 154 MovieClip Frame 12
play();
Symbol 159 MovieClip Frame 1
if (soapbubble2MainTimeline.kvalitet == "HIGH") {
gotoAndStop (4);
} else if (soapbubble2MainTimeline.kvalitet == "MEDIUM") {
gotoAndStop (2);
} else if (soapbubble2MainTimeline.kvalitet == "LOW") {
gotoAndStop (3);
}
stop();
Symbol 159 MovieClip Frame 2
stop();
Symbol 159 MovieClip Frame 3
stop();
Symbol 159 MovieClip Frame 4
stop();
Symbol 163 Button
on (release) {
soapbubble2MainTimeline.kvalitet = "LOW";
q_bock.gotoAndStop(3);
}
Symbol 165 Button
on (release) {
soapbubble2MainTimeline.kvalitet = "MEDIUM";
q_bock.gotoAndStop(2);
}
Symbol 167 Button
on (release) {
soapbubble2MainTimeline.kvalitet = "HIGH";
q_bock.gotoAndStop(4);
}
Symbol 171 Button
on (release) {
_parent.gotoAndPlay("out");
}
Symbol 175 Button
on (release) {
nextFrame();
}
Symbol 177 MovieClip Frame 1
if (soapbubble2MainTimeline.userSound == "off") {
gotoAndStop (2);
} else {
stop();
}
stop();
Symbol 177 MovieClip Frame 2
stop();
Symbol 177 MovieClip Frame 3
stop();
Symbol 179 Button
on (release) {
soapbubble2MainTimeline.userSound = "on";
s_bock.gotoAndStop(3);
}
Symbol 181 Button
on (release) {
soapbubble2MainTimeline.userSound = "off";
s_bock.gotoAndStop(2);
}
Symbol 187 Button
on (release) {
prevFrame();
}
Symbol 202 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 2
stop();
Symbol 202 MovieClip Frame 3
stop();
Symbol 202 MovieClip Frame 4
stop();
Symbol 202 MovieClip Frame 5
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 19
stop();
Symbol 207 Button
on (release) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
} else if (soapbubble2MainTimeline.saveGameInfo.data.gameSaved == true) {
soapbubble2MainTimeline.wipeAction = "load";
soapbubble2MainTimeline.wipe.play();
} else {
soapbubble2MainTimeline.message("", "No game has been saved. Press S in-game to save.");
}
}
Symbol 216 Button
on (release, keyPress "<Enter>") {
if (soapbubble2MainTimeline.popup._currentframe == 1) {
soapbubble2MainTimeline.enterCode(levelcodeTXT);
}
}
Instance of Symbol 220 MovieClip in Symbol 223 MovieClip Frame 1
onClipEvent (mouseDown) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
}
}
onClipEvent (keyDown) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
}
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 224 MovieClip Frame 8
Selection.setFocus("MCenterCode.levelcodeTXT");
stop();
Symbol 228 Button
on (release) {
if (soapbubble2MainTimeline.popup._currentframe != 1) {
soapbubble2MainTimeline.popup.play();
}
soapbubble2MainTimeline.wipeAction = "start";
soapbubble2MainTimeline.wipe.gotoAndPlay("in");
}
Symbol 232 Button
on (release) {
soapbubble2MainTimeline.options.play();
}
Symbol 236 Button
on (release) {
soapbubble2MainTimeline.code.play();
}
Symbol 271 MovieClip Frame 1
function lifeDetract() {
var _local1 = _parent;
if (begunXscale > 10) {
_local1.lifeMC1.nextFrame();
}
if (_local1.timeBar.bar._xscale > 0) {
_local1.timeBar.bar._xscale = _local1.timeBar.bar._xscale - 1;
} else {
_local1.timeBar.bar._visible = false;
soapbubble2MainTimeline.gameState = "over";
gotoAndStop (2);
}
}
_parent.lifeMC1.gotoAndStop(11);
Symbol 271 MovieClip Frame 2
stop();
Symbol 271 MovieClip Frame 3
begunXscale = _parent.timeBar.bar._xscale;
lifeDetract();
Symbol 271 MovieClip Frame 4
lifeDetract();
Symbol 271 MovieClip Frame 5
lifeDetract();
Symbol 271 MovieClip Frame 6
lifeDetract();
Symbol 271 MovieClip Frame 7
lifeDetract();
Symbol 271 MovieClip Frame 8
lifeDetract();
Symbol 271 MovieClip Frame 9
lifeDetract();
Symbol 271 MovieClip Frame 10
lifeDetract();
Symbol 271 MovieClip Frame 11
_parent.lifeMC1.gotoAndStop(11);
gotoAndStop (2);
Symbol 276 MovieClip Frame 1
i = 0;
positions = new Array(0.015625, 0.03125, 0.0625, 0.125, 0.25, 0.5, 0.75, 0.875, 0.9375, 0.96875, 0.984375, 0.99);
stop();
Symbol 276 MovieClip Frame 2
function SlideNext() {
MCobject._alpha = (MCobject._alpha = MCobject._alpha * AlphaFactor);
xPos = Math.floor(distNumX * positions[i]);
yPos = Math.floor(distNumY * positions[i]);
MCobject._x = beginSlideX - xPos;
MCobject._y = beginSlideY - yPos;
i++;
}
tempScale1 = 130 - _parent.bubble._xscale;
tempScale2 = tempScale1 / 11;
scaleFactor = (100 - tempScale2) * 0.01;
tempAlpha1 = 100 - _parent.bubble._alpha;
tempAlpha2 = tempAlpha1 / 11;
AlphaFactor = (100 - tempAlpha2) * 0.01;
_parent.pause = true;
Symbol 276 MovieClip Frame 3
beginSlideX = _parent.beginSlideX;
beginSlideY = _parent.beginSlideY;
endSlideX = _parent.endSlideX;
endSlideY = _parent.endSlideY;
distNumX = beginSlideX - endSlideX;
distNumY = beginSlideY - endSlideY;
SlideNext();
Symbol 276 MovieClip Frame 4
SlideNext();
Symbol 276 MovieClip Frame 5
SlideNext();
Symbol 276 MovieClip Frame 6
SlideNext();
Symbol 276 MovieClip Frame 7
SlideNext();
Symbol 276 MovieClip Frame 8
SlideNext();
Symbol 276 MovieClip Frame 9
SlideNext();
Symbol 276 MovieClip Frame 10
SlideNext();
Symbol 276 MovieClip Frame 11
SlideNext();
Symbol 276 MovieClip Frame 12
SlideNext();
Symbol 276 MovieClip Frame 13
SlideNext();
Symbol 276 MovieClip Frame 14
MCobject._x = _parent.endSlideX;
MCobject._y = _parent.endSlideY;
Symbol 276 MovieClip Frame 15
_parent.pause = false;
soapbubble2MainTimeline.initiateNewLife();
Symbol 282 MovieClip Frame 11
stop();
Instance of Symbol 284 MovieClip "bar" in Symbol 286 MovieClip Frame 1
onClipEvent (load) {
_xscale = 100;
}
onClipEvent (enterFrame) {
if (soapbubble2MainTimeline.pause != true) {
if (_xscale > 0) {
_xscale = (_xscale - 0.01);
}
}
}
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 3
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 4
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 5
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 6
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 7
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 8
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 9
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 10
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 11
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 12
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 13
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 14
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 15
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 16
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 17
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 18
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 19
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 20
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 21
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 22
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 23
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 24
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 25
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 26
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 27
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 28
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 29
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 30
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 31
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 32
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 33
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 34
soapbubble2MainTimeline.pause = true;
Symbol 291 MovieClip Frame 35
soapbubble2MainTimeline.pause = true;
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 295 MovieClip Frame 28
gotoAndPlay (1);
Symbol 300 MovieClip Frame 1
stop();
Symbol 300 MovieClip Frame 2
_parent.state = "popped";
Symbol 300 MovieClip Frame 5
soapbubble2MainTimeline.looseLife();
stop();
Symbol 303 MovieClip Frame 1
stop();
Symbol 307 Button
on (release) {
if (gameState != "over") {
soapbubble2MainTimeline.toggleSound();
}
}
on (rollOver) {
bn_music._alpha = 100;
}
on (rollOut, releaseOutside) {
bn_music._alpha = 30;
}
Symbol 313 Button
on (release) {
if (gameState != "over") {
if (popup._currentframe != 1) {
popup.play();
}
if (gameState != "") {
gx_endgame.play();
}
}
}
on (keyPress "M") {
if (gameState != "over") {
if (popup._currentframe != 1) {
popup.play();
}
if (gameState != "") {
gx_endgame.play();
}
}
}
on (keyPress "m") {
if (gameState != "over") {
if (popup._currentframe != 1) {
popup.play();
}
if (gameState != "") {
gx_endgame.play();
}
}
}
Symbol 318 Button
on (release) {
if (gameState != "over") {
gamePause();
}
}
on (keyPress "P") {
if (gameState != "over") {
gamePause();
}
}
on (keyPress "p") {
if (gameState != "over") {
gamePause();
}
}
Symbol 322 Button
on (release) {
if (gameState != "over") {
saveGame();
}
}
on (keyPress "S") {
if (gameState != "over") {
saveGame();
}
}
on (keyPress "s") {
if (gameState != "over") {
saveGame();
}
}
on (keyPress "L") {
if (gameState != "over") {
loadGame();
}
}
on (keyPress "l") {
if (gameState != "over") {
loadGame();
}
}