Frame 1
_global.app = this;
app.myscreenName = "null";
app.basePath = "http://files2.17173.com";
app.userPath = "/games/common/user_name/getUserInfo.jhtml";
app.scorePath = "/common/score/Scoreboard.jhtml?msg=Q&game=sb_smoosh";
loadUser = new LoadVars();
loadUser.load(app.basePath + app.userPath);
loadUser.onLoad = function () {
returnLog = loadUser.toString();
app.rawName = this.screenName;
index = app.rawName.indexOf(newline);
if (index > -1) {
app.myscreenName = app.rawName.substr(0, index);
} else {
app.myscreenName = app.rawName;
}
if (app.myscreenName == "null") {
} else if (app.myscreenName == "undefined") {
app.myscreenName = "null";
} else if (app.myscreenName == "") {
app.myscreenName = "null";
} else if (app.myscreenName == null) {
app.myscreenName = "null";
}
scrName = app.myscreenName;
};
Instance of Symbol 293 MovieClip in Frame 1
onClipEvent (enterFrame) {
percentage = Math.ceil((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if ((percentage / 10) == 10) {
_root.gotoAndPlay(21);
} else {
_root.gotoAndStop(Math.floor(percentage / 10));
}
}
Frame 2
keyOneUp = true;
keyTwoUp = true;
someListener = new Object();
someListener.onKeyDown = function () {
if (Key.isDown(55)) {
} else {
keyOneUp = true;
}
if (Key.isDown(56)) {
} else {
keyTwoUp = true;
}
if (_root._currentframe != 51) {
return(undefined);
}
if (Key.isDown(16)) {
if (Key.isDown(55)) {
if (keyOneUp == true) {
if (_root.lives < 9) {
_root.lives++;
_root.xtralifeS.start();
_root.display.lives.updateLives();
}
keyOneUp = false;
}
}
if (Key.isDown(56)) {
if (keyTwoUp == true) {
keyTwoUp = false;
trace(_root.badTs);
q = 0;
while (q < _root.badTs.length) {
trace(_root.badTs[q]);
_root.badTs[q].kill();
q++;
}
stopAllSounds();
_root.levelEnd();
_root.fx1 = null;
}
}
}
};
Key.addListener(someListener);
Frame 21
MSGtext = "";
hi = 0;
Frame 22
hi = 0;
squishS = new Sound();
squishS.attachSound("squish");
getconchS = new Sound();
getconchS.attachSound("getconch");
gameoverS = new Sound();
gameoverS.attachSound("gameover");
gameoverS.onSoundComplete = function () {
menuloopS.start(0, 99999);
};
levelcompleteS = new Sound();
levelcompleteS.attachSound("levelcomplete");
levelcompleteS.onSoundComplete = function () {
levelstartS.start();
};
bubblewandS = new Sound();
bubblewandS.attachSound("bubblewand");
gunhitS = new Sound();
gunhitS.attachSound("gunhit");
enemyexplodesS = new Sound();
enemyexplodesS.attachSound("enemyexplodes");
hitgroundS = new Sound();
hitgroundS.attachSound("hitground");
treasureattainedS = new Sound();
treasureattainedS.attachSound("treasureattained");
highscoreS = new Sound();
highscoreS.attachSound("highscore");
highscoreS.onSoundComplete = function () {
menuloopS.start(0, 99999);
};
negselectionS = new Sound();
negselectionS.attachSound("negselection");
createEmptyMovieClip("sounds", 1);
sounds.createEmptyMovieClip("sound1", 1);
fx1 = new Sound(sounds.sound1);
fx1.attachSound("levelmusic");
levelidleS = new Sound();
levelidleS.attachSound("levelidle");
levelidleS.onSoundComplete = function () {
levelidleS.start(0);
};
levelstartS = new Sound();
levelstartS.attachSound("levelstart");
levelstartS.onSoundComplete = function () {
};
menuloopS = new Sound();
menuloopS.attachSound("menuloop");
shelldescentS = new Sound();
shelldescentS.attachSound("shelldescent");
shellenemyhitS = new Sound();
shellenemyhitS.attachSound("shellenemyhit");
shellgroundS = new Sound();
shellgroundS.attachSound("shellground");
shellgroundS.onSoundComplete = function () {
treasureappearsS.start(0, 1);
};
treasureappearsS = new Sound();
treasureappearsS.attachSound("treasureappears");
inflateS = new Sound();
inflateS.attachSound("inflate");
xtralifeS = new Sound();
xtralifeS.attachSound("xtralife");
Frame 26
menuloopS.stop("menuloop");
menuloopS.start(0, 999999);
stop();
Frame 34
stop();
Frame 35
Frame 42
stop();
Frame 43
function makePU(positionX, positionY) {
positionX = positionX + (_root.SECTOR_SIZE / 2);
PU.active = 0;
PU.myCounter = 0;
PU.my.gotoAndStop(1);
PU.positionX = positionX;
PU._x = -10000;
PU.positionY = positionY;
poweredUp = 0;
}
function rocksReset() {
a = 0;
while (a < rocks.length) {
thisRock = rocks[a];
thisRock.active = 0;
thisRock._parent._x = thisRock._parent._x - 20000;
a++;
}
rockCount = 0;
rocks = new Array();
}
function makeRock(positionX, positionY, I, anc) {
osRUNONCE = 0;
rock = eval ("rock" + rockCount);
rock = rock.rockCore;
rock.anchor = anc;
rock.my = rock._parent;
rock.ID = rockCount;
rocks.push(rock);
rock.active = 1;
rock.my.gotoAndStop(1);
rock.positionX = positionX;
rock.positionY = positionY;
rock.falling = 0;
rock.fill1 = fill1;
rock.fill2 = fill2;
rock.position = position;
rock.I = I;
rockCount++;
if (anc == 0) {
rock._parent.gotoAndStop("rock");
} else {
rock._parent.gotoAndStop("anchor");
}
rock._parent.anim.stop();
}
function badReset() {
badCount = 0;
badTs = new Array();
}
function makeBadThing(positionX, positionY, special, startLeft) {
thing = eval ("bad" + badCount);
thing = thing.core;
thing.ghostDelay = 150;
thing._visible = false;
thing.inflateCount = 0;
badTs.push(thing);
thing.active = 1;
thing.ID = badCount;
thing.my = thing._parent;
thing.my.stars._visible = false;
if (startLeft == 1) {
thing.lastMoveOK = "LEFT";
} else {
thing.lastMoveOK = "RIGHT";
}
thing.startMove = thing.lastMoveOK;
thing.special = special;
if (special == 1) {
thing.my.gotoAndStop("special");
thing.shooting = 0;
} else {
thing.my.gotoAndStop("normal");
thing.shooting = 0;
}
thing.inflateCount = 0;
thing.inflationLevel = 0;
thing.positionX = positionX;
thing.positionY = positionY;
thing.my._x = -1000;
thing.origX = thing.positionX;
thing.origY = thing.positionY;
thing.SPEED = Math.min(1.5 + (_root.level * 0.1), 3);
thing.SPEED = 1.5 + (_root.level * 0.1);
extraspeed = 0.2 * Math.floor(level / 10);
thing.SPEED = thing.SPEED + extraspeed;
thing.SPEED = Math.min(thing.SPEED, 3);
if (thing.SPEED == 2.3) {
}
trace(thing.SPEED + "!");
thing.floating = 0;
badCount++;
}
function badResetLife() {
a = 0;
while (a < badTs.length) {
if (badTs[a].active == 1) {
badTs[a].resetLife();
} else {
badTs[a].my._x = badTs[a].my._x - 10000;
}
a++;
}
}
MSGtext = "";
you.resetLife = function () {
PUflash = 0;
_root.PU.wandCount = 0;
colorObj.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
musicStarted = 0;
musicPause = 1;
moved = 0;
anchor.firstFrame = 0;
fDying = 0;
lastMoveOK = "LEFT";
positionX = origX;
positionY = origY;
newpumping = 0;
newShooting = 0;
graphicsPause = 0;
hitRock = 0;
hitMonster = 0;
if (badTotal == 1) {
fx1.attachSound("levelfrantic");
} else {
fx1.attachSound("levelmusic");
}
};
you.stopMusic = function () {
};
you.setStart = function (a, b) {
anchor.firstFrame = 0;
origX = a;
origY = b;
animFrame = 0;
};
you.resetLevel = function () {
colorObj.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
PUflash = 0;
_root.PU.wandCount = 0;
positionX = (ROWS + 1) * SECTOR_SIZE;
positionY = 2.5 * SECTOR_SIZE;
graphicsPause = 0;
musicStarted = 0;
_root.PU.rocksDropped = 0;
fx1.attachSound("levelmusic");
};
you.resetGame = function () {
_root.PU.rocksDropped = 0;
PUflash = 0;
_root.PU.wandCount = 0;
colorObj = new Color(_root.you);
colorObj.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
k = 2;
SPEED = 4;
speed = SPEED;
WIDTH = 30;
LIVES = 3;
lives = LIVES;
w = WIDTH / 2;
z = w * 0.3;
z = Math.floor(z);
z = 0;
};
bubbles = new Array();
bubbleCount = 0;
you.blowBubble = function () {
duplicateMovieClip (_root.bubble, "bubble" + bubbleCount, 1010 + (bubbleCount % 100));
thisBubble = eval ("bubble" + bubbleCount);
bubbles.push(thisBubble);
thisBubble.active = 1;
bubbleCount++;
thisBubble.positionX = positionX - (SECTOR_SIZE / 2);
thisBubble.positionY = positionY;
thisBubble.alive = 100;
thisBubble.dir = lastMoveOK;
if (lastMoveOK == "LEFT") {
thisBubble.yMove = 0;
thisBubble.xMove = -1;
}
if (lastMoveOK == "RIGHT") {
thisBubble.yMove = 0;
thisBubble.xMove = 1;
}
if (lastMoveOK == "UP") {
thisBubble.yMove = -1;
thisBubble.xMove = 0;
}
if (lastMoveOK == "DOWN") {
thisBubble.yMove = 1;
thisBubble.xMove = 0;
}
};
you.onEnterFrame = function () {
function moveX(a) {
if (newPumping == 1) {
anchor.newEndShoot();
newPumping = 0;
return(undefined);
}
checkedTile = _root.checkCurrentTile(positionX + (a * (20 + speed)), positionY);
if ((((fPaused == 0) && (checkedTile == "X")) || (checkedTile == "C")) || (checkedTile == "A")) {
return(undefined);
}
_root.dig(uTurn, positionX + (z * a), ((positionX + (z * a)) + (speed * a)) + (((_root.SECTOR_SIZE / 2) - 1) * a), "h", positionX, positionY);
positionX = positionX + (speed * a);
animFrame = animFrame + 1;
if (fPaused == 1) {
return(undefined);
}
musicPause = 0;
moved = 1;
}
function moveY(a) {
if (newPumping == 1) {
anchor.newEndShoot();
newPumping = 0;
return(undefined);
}
checkedTile = _root.checkCurrentTile(positionX, positionY + (a * (20 + speed)));
if ((((fPaused == 0) && (checkedTile == "X")) || (checkedTile == "C")) || (checkedTile == "A")) {
return(undefined);
}
_root.dig(uTurn, positionY + (z * a), ((positionY + (z * a)) + (speed * a)) + (((_root.SECTOR_SIZE / 2) - 1) * a), "v", positionY, positionX);
positionY = positionY + (speed * a);
animFrame = animFrame + 1;
if (fPaused == 1) {
return(undefined);
}
}
function newShoot() {
if ((positionY < 101) && (Key.isDown(38))) {
return(undefined);
}
if (_root.pumpPause > 0) {
return(undefined);
}
if (newShooting == 1) {
return(undefined);
}
_root.graphicsPause = 0;
if (newPumping != 1) {
newShooting = 1;
dontcheckwallsbodge = 5;
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
if (poweredUp != 1) {
you.face.anim.gotoAndStop("shootA");
you.face.anim.anim.gotoAndPlay(1);
} else {
you.face.anim.gotoAndStop("blow");
you.face.anim.anim.gotoAndPlay(1);
}
} else if (poweredUp != 1) {
you.face.facing.anim.gotoAndStop("shootA");
you.face.facing.anim.anim.gotoAndPlay(1);
} else {
you.face.facing.anim.gotoAndStop("blow");
you.face.facing.anim.anim.gotoAndPlay(1);
}
return(undefined);
}
_root.newPumpedBaddy.hit();
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
you.face.anim.gotoAndStop("pump");
you.face.anim.pumpAnim.gotoAndPlay(1);
} else {
you.face.facing.anim.gotoAndStop("pump");
you.face.facing.anim.pumpAnim.gotoAndPlay(1);
}
}
function killMe() {
if (badTotal == 1) {
fPaused = 1;
}
if (fDying == 1) {
return(undefined);
}
fDying = 1;
stopAllSounds();
_root.you.gotoAndPlay("dying");
anchor.newEndShoot();
anchor.endReverse();
}
function dead() {
lives--;
_root.you.gotoAndStop(1);
if (lives == 0) {
_root.gameOver();
} else {
_root.resetLife();
}
}
if (_root.dontcheckwallsbodge > 0) {
_root.dontcheckwallsbodge--;
}
if (_root.allPaused == 1) {
stopMusic();
return(undefined);
}
if (_root.pumpPause > 0) {
_root.pumpPause--;
}
if (_root.levelEndCounter > 0) {
_root.levelEndCounter--;
if (_root.levelEndCounter == 1) {
_root.you._x = -10000;
_root.positionX = -10000;
_root.anchor._x = -10000;
_root.anchor.gotoAndStop(0);
_root.newShooting = 0;
_root.resetLevel();
}
stopMusic();
return(undefined);
}
moved = 0;
if (_root.fBugs == 1) {
_root.fBugs = 0;
dead();
}
if (_root.hitRock == 1) {
_root.hitRock = 0;
killMe();
}
if (_root.hitMonster == 1) {
_root.hitRock = 0;
killMe();
}
if (fDying == 1) {
stopMusic();
return(undefined);
}
if (PUflash > 0) {
if ((PUflash % 8) > 4) {
colorObj.setTransform({ra:0, rb:255, ga:0, gb:255, ba:0, bb:255, aa:100, ab:0});
} else {
colorObj.setTransform({ra:0, rb:255, ga:0, gb:255, ba:0, bb:51, aa:100, ab:0});
}
PUflash--;
if (PUflash == 0) {
colorObj.setTransform({ra:100, rb:0, ga:100, gb:0, ba:100, bb:0, aa:100, ab:0});
}
}
if (graphicsPause == 1) {
return(undefined);
}
kRIGHT = 0;
kLEFT = 0;
kUP = 0;
kDOWN = 0;
oldX = positionX;
oldY = positionY;
if (fPaused == 0) {
if (!Key.isDown(32)) {
spaceUp = 1;
}
if (Key.isDown(32) && (spaceUp == 1)) {
newShoot();
spaceUp = 0;
}
if (Key.isDown(38)) {
kUP = 1;
if (lastMoveOK != "UP") {
uTurn = 0;
}
} else if (Key.isDown(40)) {
kDOWN = 1;
if (lastMoveOK != "DOWN") {
uTurn = 0;
}
} else if (Key.isDown(37)) {
kLEFT = 1;
if (lastMoveOK != "LEFT") {
uTurn = 0;
}
} else if (Key.isDown(39)) {
kRIGHT = 1;
if (lastMoveOK != "RIGHT") {
uTurn = 0;
}
}
}
if (fPaused == 1) {
if (positionX > (origX + 10)) {
speed = SPEED + 1.2;
kLEFT = 1;
} else {
kDOWN = 1;
this.face.facing.gotoAndStop("LEFT");
}
if (positionY >= (origY - speed)) {
speed = SPEED;
positionY = origY - speed;
beginingOverride = 1;
lastHorizontalMove = "LEFT";
musicPause = 1;
moved = 0;
fPaused = 0;
}
} else if (musicStarted != 1) {
createEmptyMovieClip("sounds", 1);
sounds.createEmptyMovieClip("sound1", 1);
fx1 = new Sound(sounds.sound1);
if (_root.badTotal != 1) {
fx1.attachSound("levelmusic");
} else {
fx1.attachSound("levelfrantic");
}
fx1.start(0, 9999);
musicStarted = 1;
}
if (_root.shooting == 1) {
return(undefined);
}
if (this.hitTest(PU.hitter)) {
if (PU.active != 0) {
_root.PU.collect();
return(undefined);
}
}
if ((kUP > 0) || (kDOWN > 0)) {
if (lastMoveOK == "RIGHT") {
comparison = Math.floor(((positionX + speed) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionX + (SECTOR_SIZE / 2)) < comparison) {
positionX = comparison - (_root.SECTOR_SIZE / 2);
}
} else if (lastMoveOK == "LEFT") {
comparison = Math.ceil(((positionX - speed) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionX - (SECTOR_SIZE / 2)) > (comparison - _root.SECTOR_SIZE)) {
positionX = comparison - (_root.SECTOR_SIZE / 2);
}
}
}
if ((kRIGHT > 0) || (kLEFT > 0)) {
if (lastMoveOK == "DOWN") {
comparison = Math.floor(((positionY + speed) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionY + (SECTOR_SIZE / 2)) < comparison) {
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
} else if (lastMoveOK == "UP") {
comparison = Math.ceil(((positionY - speed) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionY - (SECTOR_SIZE / 2)) > (comparison - _root.SECTOR_SIZE)) {
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
}
}
if ((positionX % _root.SECTOR_SIZE) == (_root.SECTOR_SIZE / 2)) {
yCenter = 1;
} else {
yCenter = 0;
}
if ((positionY % _root.SECTOR_SIZE) == (_root.SECTOR_SIZE / 2)) {
xCenter = 1;
} else {
xCenter = 0;
}
if ((kRIGHT > 0) || (kLEFT > 0)) {
if (xCenter == 1) {
if (kRIGHT > 0) {
if (lastMoveOK == "LEFT") {
uTurn = 1;
}
moveX(1);
lastMoveOK = "RIGHT";
}
if (kLEFT > 0) {
if (lastMoveOK == "RIGHT") {
uTurn = 1;
}
moveX(-1);
lastMoveOK = "LEFT";
}
} else if (lastMoveOK == "UP") {
moveY(-1);
} else if (lastMoveOK == "DOWN") {
moveY(1);
}
}
if ((kDOWN > 0) || (kUP > 0)) {
if (yCenter == 1) {
if (kDOWN > 0) {
if (lastMoveOK == "UP") {
if (lastHorizontalMove == "LEFT") {
lastHorizontalMove = "RIGHT";
} else {
lastHorizontalMove = "LEFT";
}
uTurn = 1;
}
moveY(1);
lastMoveOK = "DOWN";
}
if (kUP > 0) {
if (lastMoveOK == "DOWN") {
if (lastHorizontalMove == "LEFT") {
lastHorizontalMove = "RIGHT";
} else {
lastHorizontalMove = "LEFT";
}
uTurn = 1;
}
moveY(-1);
lastMoveOK = "UP";
}
} else if (lastMoveOK == "LEFT") {
moveX(-1);
} else if (lastMoveOK == "RIGHT") {
moveX(1);
}
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
lastHorizontalMove = lastMoveOK;
}
}
this._x = positionX + _root.xo;
animFrame = animFrame % 10;
if (animFrame == 0) {
animFrame = animFrame + 1;
}
this.face.gotoAndStop(lastMoveOK);
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
this.face.facing.gotoAndStop(lastHorizontalMove);
if (positionY < 101) {
this.face.gotoAndStop(lastHorizontalMove);
lastMoveOK = lastHorizontalMove;
if (poweredUp == 1) {
this.face.anim.gotoAndStop(41);
}
}
if ((newShooting != 1) && (newPumping != 1)) {
if (poweredUp == 1) {
this.face.facing.anim.gotoAndStop(animFrame + 40);
} else {
this.face.facing.anim.gotoAndStop(animFrame);
}
}
} else if ((newShooting != 1) && (newPumping != 1)) {
if (poweredUp == 0) {
this.face.anim.gotoAndStop(animFrame);
} else {
this.face.anim.gotoAndStop(animFrame + 40);
}
}
if (beginingOverride == 1) {
beginingOverride = 0;
this.face.gotoAndStop("LEFT");
lastMoveOK = "LEFT";
}
};
function mapResetGame() {
LEVELS = 9;
SECTOR_SIZE = 40;
ROWS = 16;
COLUMNS = 21;
a_map = new Array();
X = "X";
o = "o";
N = "N";
M = "M";
S = "S";
C = "C";
A = "A";
level = 0;
P = "P";
l = "l";
r = "r";
z = "z";
x = "x";
a_level_1 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, o, M, o, o, o, o, o, N, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, A, o, o, N, S, M, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, l, M, o, o, o, o, o, N, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, N, o, o, o, o, o, M, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_2 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, r, M, o, o, o, o, o, N, o, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, A, o, o, N, S, M, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, l, M, o, o, o, o, o, N, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, A, o, o, N, o, o, x, o, o, M, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_3 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, A, o, o, o, A, o, o, o, o, X, X, o, o, N, o, M, o, N, S, M, o, N, r, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, l, o, M, o, o, N, z, o, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, A, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_4 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, r, M, o, o, o, o, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, o, M, o, N, S, M, o, N, o, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, A, o, o, o, o, o, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, l, o, o, l, o, x, o, o, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_5 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, x, M, o, o, o, o, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, o, M, o, N, S, M, o, N, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, A, o, o, o, o, o, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, l, o, o, z, o, x, o, o, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, N, z, M, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_6 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, N, r, M, o, o, o, o, o, N, l, M, o, X, X, o, o, o, A, o, o, o, o, o, o, o, A, o, o, X, X, o, o, o, o, o, o, N, S, M, o, o, o, o, o, X, X, o, o, N, l, M, o, o, o, o, o, N, z, M, o, X, X, o, o, N, r, M, o, o, o, o, o, N, x, M, o, X, X, o, o, N, l, M, o, o, o, o, o, N, z, M, o, X, X, o, o, N, r, M, o, o, o, o, o, N, x, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, N, z, M, o, o, o, o, o, X, X, o, o, o, A, o, A, o, o, o, A, o, A, o, o, X, X, o, o, o, o, o, o, N, o, M, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_9 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, N, r, M, o, N, S, o, M, o, N, l, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, A, o, o, A, o, o, o, o, o, X, X, o, N, x, o, M, o, o, o, o, N, o, z, M, o, X, X, o, o, o, o, N, r, M, N, l, M, o, o, o, o, X, X, o, o, o, o, N, r, M, N, l, M, o, o, A, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_8 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, N, x, M, A, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, A, N, l, M, o, o, o, o, X, X, o, N, r, M, o, o, o, o, o, o, N, r, M, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, N, S, M, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, A, N, o, o, l, o, z, o, M, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
a_level_7 = new Array(X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, N, o, o, o, o, l, z, o, x, r, o, o, o, M, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, N, S, M, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, N, r, M, o, o, o, o, o, o, N, l, M, o, X, X, o, o, A, o, o, o, o, A, o, o, o, A, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, N, z, M, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, o, o, o, o, o, o, o, o, o, o, o, o, o, o, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X, X);
identified = 0;
}
function mapResetLevel() {
level++;
fg = level - 1;
fg = fg % 9;
fg = fg + 1;
fg = fg / 3;
fg = Math.ceil(fg);
changeLevelDisplay();
ground.gotoAndStop(fg);
sky.gotoAndStop(fg);
workingLevel = level % LEVELS;
if (workingLevel == 0) {
workingLevel = LEVELS;
}
thisMap = new Array();
thisSource = eval ("a_level_" + workingLevel);
a = 0;
while (a < thisSource.length) {
thisMap.push(thisSource[a]);
a++;
}
makeMasks();
createBackdropScenery();
createBackdropBaddies();
offsetMasks();
}
function offsetMasks() {
a = 0;
while (a < _root.ROWS) {
eval ("v" + a)._x = _root.xo;
a++;
}
a = 0;
while (a < _root.COLUMNS) {
eval ("h" + a)._x = _root.xo;
a++;
}
}
function mapResetLife() {
createBackdropScenery();
}
function makeMasks() {
vArrays = [];
hArrays = [];
thisArray = new Array();
a = 0;
while (a < ROWS) {
duplicateMovieClip (_root.mask, "v" + a, 100 + a);
tempArray = [];
vArrays.push(tempArray);
a++;
}
a = 0;
while (a < COLUMNS) {
duplicateMovieClip (_root.mask, "h" + a, 200 + a);
tempArray = [];
hArrays.push(tempArray);
a++;
}
done = 0;
a = 0;
}
function dig(uTurn, a, c, t, o, p) {
firstCh = checkEmpty2(a, t, p);
row = Math.floor(p / SECTOR_SIZE);
if (t == "v") {
thisMask = eval ("v" + row);
} else {
thisMask = eval ("h" + row);
}
if (a > c) {
if (uTurn == 1) {
newPoint = new Array(c, a);
} else {
newPoint = new Array(c, Math.ceil(a / SECTOR_SIZE) * SECTOR_SIZE);
}
} else if (c > a) {
if (uTurn == 1) {
newPoint = new Array(a, c);
} else {
newPoint = new Array(Math.floor(a / SECTOR_SIZE) * SECTOR_SIZE, c);
}
}
newPoint[1] = newPoint[1] - 1;
arrangeArray(t, row);
doFill(row, t);
co = 0;
while (co < eval (t + "Arrays")[row].length) {
identified = 0;
oldPoint = eval (t + "Arrays")[row][co];
gapA = oldPoint[0];
gapB = oldPoint[1];
sectorPointA = Math.floor(a / SECTOR_SIZE) * SECTOR_SIZE;
sectorPointB = Math.floor((a / SECTOR_SIZE) + 1) * SECTOR_SIZE;
sectorPointB = sectorPointB - 1;
if (((gapA - 2) <= sectorPointA) && ((gapB + 2) >= sectorPointB)) {
if (t == "v") {
newT = "h";
} else {
newT = "v";
}
row = Math.floor(a / SECTOR_SIZE);
targetArray = eval (t + "Arrays");
targetPointA = (Math.floor(p / SECTOR_SIZE) * SECTOR_SIZE) + 1;
targetPointB = (Math.floor((p / SECTOR_SIZE) + 1) * SECTOR_SIZE) - 1;
newPoint = new Array(targetPointA, targetPointB);
end = arrangeArray(newT, row);
doFill(row, newT);
}
co++;
}
secondCh = checkEmpty2(a, t, p);
if (((firstCh != secondCh) && (!fPaused)) && (positionY > 100)) {
increaseScore(10);
}
}
function checkEmpty2(a, love, c) {
if (love == "h") {
love = "v";
} else {
love = "h";
}
r = Math.floor(a / SECTOR_SIZE);
s = Math.floor(c / SECTOR_SIZE) * SECTOR_SIZE;
co = 0;
while (co < eval (love + "Arrays")[r].length) {
oldPoint = eval (love + "Arrays")[r][co];
gapA = oldPoint[0];
gapB = oldPoint[1];
sectorPointA = s + 10;
sectorPointB = s + 29;
if ((gapA <= sectorPointA) && (gapB >= sectorPointB)) {
return(1);
}
co++;
}
return(0);
}
function arrangeArray(t, row) {
if ((((newPoint[0] < 0) || (newPoint[1] < 0)) || (newPoint[0] == null)) || (newPoint[1] == null)) {
trace("ERROR!");
return(undefined);
}
tempArray = new Array();
thisEval = eval (t + "Arrays");
identified = 0;
red = 0;
q = 0;
while (q < eval (t + "Arrays")[row].length) {
oldPoint = thisEval[row][q];
if (((newPoint[0] >= oldPoint[0]) && (newPoint[0] <= oldPoint[1])) || ((newPoint[1] >= oldPoint[0]) && (newPoint[1] <= oldPoint[1]))) {
if (((newPoint[0] >= oldPoint[0]) && (newPoint[0] <= oldPoint[1])) && ((newPoint[1] >= oldPoint[0]) && (newPoint[1] <= oldPoint[1]))) {
tempArray.push(oldPoint);
identified = 1;
red = 1;
} else if ((newPoint[0] >= oldPoint[0]) && (newPoint[0] <= oldPoint[1])) {
tempPoint = new Array(oldPoint[0], newPoint[1]);
tempArray.push(tempPoint);
identified = 1;
red = 1;
} else if ((newPoint[1] >= oldPoint[0]) && (newPoint[1] <= oldPoint[1])) {
tempPoint = new Array(newPoint[0], oldPoint[1]);
tempArray.push(tempPoint);
identified = 1;
red = 1;
}
} else {
tempArray.push(oldPoint);
red = 1;
}
q++;
}
if (identified == 0) {
tempArray.push(newPoint);
}
thisEval[row] = sortArray(tempArray);
}
function sortArray(tempArray) {
tempTempArray = new Array();
finished = 0;
while (finished == 0) {
pnt = tempArray.pop();
pnt1 = pnt[0];
pnt2 = pnt[1];
original = 0;
cnt = 0;
xxx = 0;
while (xxx < tempArray.length) {
cnt++;
xxxPnt1 = tempArray[xxx][0];
xxxPnt2 = tempArray[xxx][1];
if ((pnt1 >= xxxPnt1) && (pnt2 <= xxxPnt2)) {
} else {
original = 1;
}
xxx++;
}
if ((original == 1) || (tempArray.length == 0)) {
tempTempArray.push(pnt);
}
if (tempArray.length == 0) {
return(tempTempArray);
}
}
}
function doFill(row, t) {
thisMask = eval (t + row);
thisMask.clear();
thisArray = eval (t + "Arrays")[row];
ix = 0;
while (ix < thisArray.length) {
thisMask.beginFill(0);
why = row * SECTOR_SIZE;
bleed = 4;
pointA = thisArray[ix][0] + bleed;
pointB = thisArray[ix][1] - bleed;
if (t == "h") {
thisMask.moveTo(pointA, why + bleed);
thisMask.lineTo(pointB, why + bleed);
thisMask.curveTo(pointB + 5, ((why + SECTOR_SIZE) - bleed) - 20, pointB, (why + SECTOR_SIZE) - bleed);
thisMask.lineTo(pointA, (why + SECTOR_SIZE) - bleed);
thisMask.curveTo(pointA - 5, (why + bleed) + 20, pointA, why + bleed);
} else {
thisMask.moveTo(why + bleed, pointA);
thisMask.lineTo(why + bleed, pointB);
thisMask.curveTo((why + (SECTOR_SIZE / 2)) - bleed, pointB + 5, (why + SECTOR_SIZE) - bleed, pointB);
thisMask.lineTo((why + SECTOR_SIZE) - bleed, pointA);
thisMask.curveTo((why + bleed) + (SECTOR_SIZE / 2), pointA - 5, why + bleed, pointA);
}
thisMask.endFill();
ix++;
}
}
function createBackdropScenery() {
filling = 0;
i = 0;
while (i < thisMap.length) {
thisOne = thisMap[i];
if (thisOne == "N") {
newPoint = new Array();
newPoint.push(((i % ROWS) * SECTOR_SIZE) + 1);
filling = 1;
}
if (filling == 1) {
nP = new Array();
nP.push(Math.ceil(i / ROWS) * SECTOR_SIZE);
nP.push((Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE - 1));
vArrays[i % ROWS].push(nP);
doFill(i % ROWS, "v");
}
if (thisOne == "M") {
filling = 0;
newPoint.push((((i % ROWS) + 1) * SECTOR_SIZE) - 1);
hArrays[Math.ceil(i / ROWS)].push(newPoint);
doFill(Math.ceil(i / ROWS), "h");
}
if (thisOne == "S") {
you.setStart(((i % ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), (Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5));
makePU(((i % ROWS) * SECTOR_SIZE) - (SECTOR_SIZE * 0.5), (Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), i);
}
i++;
}
}
function createBackdropBaddies() {
allTilez = new Array();
i = 0;
while (i < thisMap.length) {
thisOne = thisMap[i];
if ((((thisOne == "l") || (thisOne == "r")) || (thisOne == "z")) || (thisOne == "x")) {
if ((thisOne == "z") || (thisOne == "x")) {
special = 1;
} else {
special = 0;
}
if ((thisOne == "l") || (thisOne == "z")) {
startLeft = 1;
} else {
startLeft = 0;
}
makeBadThing(((i % ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), (Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), special, startLeft);
}
if (thisOne == "C") {
makeRock(((i % ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), (Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), i, 0);
}
if (thisOne == "A") {
makeRock(((i % ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), (Math.ceil(i / ROWS) * SECTOR_SIZE) + (SECTOR_SIZE * 0.5), i, 1);
}
if (thisOne == "P") {
}
i++;
}
}
function checkCurrentTile(posX, posY) {
oldPosition = position;
col = Math.floor(posX / SECTOR_SIZE);
row = Math.floor(posY / SECTOR_SIZE);
position = ((row - 1) * ROWS) + col;
tile = thisMap[((row - 1) * ROWS) + col];
return(tile);
}
function checkEmpty(a, t, b) {
r = Math.floor(a / SECTOR_SIZE);
co = 0;
while (co < eval (t + "Arrays")[r].length) {
oldPoint = eval (t + "Arrays")[r][co];
gapA = oldPoint[0];
gapB = oldPoint[1];
sectorPointA = Math.floor(b - 16);
sectorPointB = Math.floor(b + 16);
sectorPointB = sectorPointB - 1;
if ((gapA <= sectorPointA) && (gapB >= sectorPointB)) {
return(1);
}
co++;
}
return(0);
}
function changeLevelDisplay() {
stringLevel = "" + level;
display.levelDisplay.numbers._x = levelDisplayStartX;
display.levelDisplay.numbers.ones.gotoAndStop(Number(stringLevel.substr(-1, 1)) + 2);
if (level > 9) {
display.levelDisplay.numbers.tens.gotoAndStop(Number(stringLevel.substr(-2, 1)) + 2);
display.levelDisplay.numbers._x = display.levelDisplay.numbers._x + 15;
}
}
function increaseScore(inc) {
score = score + inc;
stringScore = "" + score;
display.score.numbers._x = startX;
display.score.numbers.ones.gotoAndStop(Number(stringScore.substr(-1, 1)) + 2);
if (score > 9) {
display.score.numbers.tens.gotoAndStop(Number(stringScore.substr(-2, 1)) + 2);
display.score.numbers._x = display.score.numbers._x + 18;
}
if (score > 99) {
display.score.numbers.hundreds.gotoAndStop(Number(stringScore.substr(-3, 1)) + 2);
display.score.numbers._x = display.score.numbers._x + 18;
}
if (score >= 1000) {
display.score.numbers.ks.gotoAndStop(Number(stringScore.substr(-4, 1)) + 2);
display.score.numbers.comma._visible = true;
display.score.numbers._x = display.score.numbers._x + 20.5;
} else {
display.score.numbers.comma._visible = false;
}
if (score >= 10000) {
display.score.numbers.tenKs.gotoAndStop(Number(stringScore.substr(-5, 1)) + 2);
display.score.numbers._x = display.score.numbers._x + 18;
}
if (score >= 100000) {
display.score.numbers.hundredKs.gotoAndStop(Number(stringScore.substr(-6, 1)) + 2);
display.score.numbers._x = display.score.numbers._x + 18;
}
if (livesAwarded == 0) {
if (score > 10000) {
lives++;
livesAwarded++;
xtralifeS.start();
display.lives.updateLives();
}
} else {
targetScore = 10000 + (livesAwarded * 10000);
if (score > targetScore) {
livesAwarded++;
if (lives < 9) {
lives++;
xtralifeS.start();
display.lives.updateLives();
}
}
}
}
function newGame() {
resetGame();
resetLife();
resetLevel();
display.messages.gotoAndPlay("ready_go");
levelstartS.start();
livesAwarded = 0;
}
function gameOver() {
stopAllSounds();
trace((score + " ") + hi);
if (score > hi) {
hi = score;
highscoreS.start();
} else {
gameoverS.start();
}
gotoAndPlay ("gameOver");
display.messages.gotoAndPlay("try_again");
cleanUp();
}
function resetGame() {
stopAllSounds();
rocksReset();
badReset();
mapResetGame();
you.resetGame();
score = 0;
increaseScore(0);
}
function kill() {
you.killMe();
}
function resetLife() {
freeze = 0;
you.resetLife();
mapResetLife();
badResetLife();
PU.reset();
display.lives.updateLives();
}
function resetLevel() {
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].popMe();
a++;
}
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].removeMovieClip();
a++;
}
bubbles = new Array();
freeze = 0;
rocksReset();
badReset();
mapResetLevel();
fPaused = 1;
you.resetLevel();
display.round.update();
}
function checkEnd() {
oldBadTotal = badTotal;
badTotal = 0;
a = 0;
while (a < badTs.length) {
if (badTs[a].active == 1) {
badTotal++;
}
a++;
}
if (badTotal == 1) {
if ((oldBadTotal != 1) && (freeze < 1)) {
if (fDying != 1) {
fx1.attachSound("levelfrantic");
fx1.stop();
fx1.start(0, 9999);
}
}
}
if (badTotal == 0) {
levelEnd();
fx1 = null;
}
}
function levelEnd() {
if (levelEndCounter > 0) {
return(undefined);
}
badTotal = 0;
fPaused = 1;
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].popMe();
a++;
}
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].removeMovieClip();
a++;
}
display.messages.gotoAndPlay("level_complete");
levelEndCounter = 50;
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
you.face.anim.gotoAndStop(1);
} else {
you.face.facing.anim.gotoAndStop(1);
}
stopAllSounds();
levelcompleteS.start();
}
function cleanUp() {
display.removeMovieClip();
sky.removeMovieClip();
you.removeMovieClip();
PU.removeMovieClip();
anchor.removeMovieClip();
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].popMe();
a++;
}
a = 0;
while (a < _root.bubbles.length) {
bubbles[a].removeMovieClip();
a++;
}
bubbles = new Array();
a = 0;
while (a < _root.ROWS) {
eval ("v" + a).removeMovieClip();
a++;
}
a = 0;
while (a < _root.COLUMNS) {
eval ("h" + a).removeMovieClip();
a++;
}
done = 0;
count = 0;
while (done == 0) {
thisThing = eval ("rock" + count);
if (thisThing == undefined) {
done = 1;
}
thisThing.removeMovieClip();
count++;
}
done = 0;
count = 0;
while (done == 0) {
thisThing = eval ("bad" + count);
if (thisThing == undefined) {
done = 1;
}
thisThing.resetLife();
thisThing.active = 0;
thisThing._x = thisThing._x - 90000;
thisThing.removeMovieClip();
count++;
}
}
newGame();
badTotal = 0;
startX = display.score.numbers._x;
levelDisplayStartX = display.levelDisplay.numbers._x;
xo = tL._x;
Y_OFFSET = tL._y;
OFFSET_A = Stage.height / 2;
OFFSET_B = (((COLUMNS * SECTOR_SIZE) - OFFSET_A) + Y_OFFSET) - (SECTOR_SIZE * 4);
osRUNONCE = 0;
_root.onEnterFrame = function () {
yEx = Math.min(0, _root.OFFSET_A - _root.positionY);
yEx = yEx + Math.max(_root.positionY - OFFSET_B, 0);
yEx = Math.round(yEx);
yEx = yEx + _root.Y_OFFSET;
_root.yo = yEx;
if (osRUNONCE == 0) {
osRUNONCE = 1;
a = 0;
while (a < _root.ROWS) {
eval ("v" + a)._x = xo;
a++;
}
a = 0;
while (a < _root.COLUMNS) {
eval ("h" + a)._x = _root.xo;
a++;
}
a = 0;
while (a < rocks.length) {
thisOne = rocks[a].my;
thisOne._x = thisOne.rockCore.positionX + xo;
a++;
}
}
a = 0;
while (a < ROWS) {
eval ("v" + a)._y = yEx;
a++;
}
a = 0;
while (a < COLUMNS) {
eval ("h" + a)._y = yEx;
a++;
}
you._y = _root.positionY + yEx;
sky._y = 120 + yEx;
ground._y = 60 + yEx;
PU._y = PU.positionY + yEx;
a = 0;
while (a < badTs.length) {
thisOne = badTs[a].my;
thisOne._y = thisOne.core.positionY + yEx;
a++;
}
a = 0;
while (a < bubbles.length) {
thisOne = bubbles[a];
thisOne._y = thisOne.positionY + yEx;
a++;
}
a = 0;
while (a < rocks.length) {
thisOne = rocks[a].my;
thisOne._y = thisOne.rockCore.positionY + yEx;
a++;
}
};
Instance of Symbol 351 MovieClip in Frame 43
onClipEvent (load) {
swapDepths(3000);
}
Instance of Symbol 474 MovieClip "display" in Frame 43
onClipEvent (load) {
this.swapDepths(99000);
}
Instance of Symbol 476 MovieClip "tL" in Frame 43
onClipEvent (load) {
_visible = false;
}
Instance of Symbol 286 MovieClip [You] "you" in Frame 43
onClipEvent (load) {
this.swapDepths(1000);
}
onClipEvent (enterFrame) {
sp = 0;
while (sp < _root.badTs.length) {
thisThing = _root.badTs[sp]._parent;
if (thisThing.hitter.hitTest(this.hitter)) {
if (((thisThing.core.inflationLevel == 0) && (_root.fDying == 0)) && (thisThing.core.active != 0)) {
_root.hitMonster = 1;
}
}
sp++;
}
if (this.hitter.hitTest(PU)) {
_root.PU.collect();
}
}
Instance of Symbol 485 MovieClip "sky" in Frame 43
onClipEvent (load) {
swapDepths(260);
_x = 0;
}
Instance of Symbol 501 MovieClip "anchor" in Frame 43
onClipEvent (load) {
swapDepths(270);
}
onClipEvent (enterFrame) {
if (reversing == 1) {
gotoAndStop(_currentframe - 1);
}
if (_root.newShooting == 0) {
return(undefined);
}
if (_root.newPumping == 1) {
return(undefined);
}
if (this._x < 0) {
return(undefined);
}
thisX = hitter._x + this._x;
thisY = hitter._y + this._y;
if ((dir == "RIGHT") || (dir == "LEFT")) {
thisMask = eval ("_root.h" + Math.floor((_y - _root.yo) / _root.SECTOR_SIZE));
if (thisMask.hitTest(thisX, _y, true) || (_root.positionY <= (2.5 * _root.SECTOR_SIZE))) {
} else if (_root.dontcheckwallsbodge == 0) {
stop();
newEndShoot();
reset();
}
}
if ((dir == "DOWN") || (dir == "UP")) {
thisMask = eval ("_root.v" + Math.floor((_x - _root.xo) / _root.SECTOR_SIZE));
if (thisMask.hitTest(_x, thisY, true)) {
} else if (_root.dontcheckwallsbodge == 0) {
stop();
newEndShoot();
reset();
}
}
sp = 0;
while (sp < _root.badTs.length) {
thisThing = _root.badTs[sp].my;
bX = thisThing.positionX;
bY = thisThing.positionY;
target = thisThing.hitter;
if (target.hitTest(this.hitter)) {
if (thisThing.core.active == 0) {
return(undefined);
}
thisThing.core.hit();
_root.gunhitS.start();
_root.graphicsPause = 0;
reversing = 0;
stop();
_root.newPumping = 1;
_root.newPumpedBaddy = thisThing.core;
beginPump();
_root.newShooting = 0;
return(undefined);
}
sp++;
}
}
Instance of Symbol 586 MovieClip "bubble" in Frame 43
onClipEvent (enterFrame) {
function checkD(extra) {
thisMask = eval ("_root.v" + Math.floor(positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(positionX + _root.xo, ((positionY + (_root.SECTOR_SIZE / 2)) + _root.yo) + extra, true)) {
dOK = 1;
}
}
function popMe() {
newArray = new Array();
a = 0;
while (a < _root.bubbles.length) {
compareBubble = _root.bubbles[a];
if (this == compareBubble) {
} else {
newArray.push(compareBubble);
}
a++;
}
_root.bubbles = newArray;
trace(_root.bubbles);
removeMovieClip(this);
}
if (active != 1) {
return(undefined);
}
if (_root.fPaused) {
popMe();
}
alive--;
if (alive == 0) {
popMe();
}
positionX = positionX + (xMove * 5);
positionY = positionY + (yMove * 5);
_x = positionX;
if ((dir == "RIGHT") || (dir == "LEFT")) {
thisMask = eval ("_root.h" + Math.floor(positionY / _root.SECTOR_SIZE));
trace(thisMask);
if ((thisMask == _root.h2) || (thisMask.hitTest((positionX + (_root.SECTOR_SIZE / 2)) + _root.xo, positionY + _root.yo, true))) {
} else {
popMe();
}
}
if ((dir == "DOWN") || (dir == "UP")) {
thisMask = eval ("_root.v" + Math.floor(positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(positionX, positionY + _root.yo, true)) {
} else {
popMe();
}
}
sp = 0;
while (sp < _root.badTs.length) {
thisThing = _root.badTs[sp].my;
bX = thisThing.positionX;
bY = thisThing.positionY;
if (thisThing.hitter.hitTest(this)) {
if (thisThing.core.active == 0) {
return(undefined);
}
thisThing.core.explode();
popMe();
}
sp++;
}
}
Instance of Symbol 657 MovieClip "PU" in Frame 43
onClipEvent (load) {
swapDepths(699);
wandCount = 0;
}
onClipEvent (enterFrame) {
function collect() {
if (active == 1) {
myCounter = 0;
if (rocksDropped == 1) {
_root.getconchS.start();
_root.freeze = _root.freeze + 150;
_root.fx1.stop();
_root.fx1.attachSound("chirp");
_root.fx1.start(0, 9999);
gotoAndPlay ("empty");
active = 0;
}
if (rocksDropped > 2) {
_root.treasureattainedS.start();
_root.increaseScore(1000);
gotoAndPlay ("s1000");
active = 0;
return(undefined);
}
if (rocksDropped == 2) {
_root.poweredUp = 1;
wandCount = 300;
gotoAndStop ("empty");
_root.PUflash = 16;
_root.bubblewandS.start();
}
}
}
function rockDrop() {
rocksDropped++;
if ((rocksDropped > 0) && (_root.fPaused == 0)) {
active = 1;
_x = positionX;
myCounter = 300;
if (rocksDropped > 2) {
rocksDropped = 3;
}
gotoAndStop("" + rocksDropped);
}
}
function reset() {
myCounter = 0;
active = 0;
gotoAndStop ("empty");
_root.poweredUp = 0;
}
if (_root.allPaused == 1) {
return(undefined);
}
if (_root.allPaused == 1) {
return(undefined);
}
if (_root.freeze > 0) {
if (_root.freeze == 1) {
_root.fx1.stop();
if (_root.fDying != 1) {
if (_root.badTotal == 1) {
_root.fx1.attachSound("levelfrantic");
} else {
_root.fx1.attachSound("levelmusic");
}
_root.fx1.start(0, 9999);
}
}
_root.freeze--;
}
if (wandCount > 0) {
wandCount--;
if (wandCount == 1) {
_root.PUflash = 16;
_root.poweredUp = 0;
}
}
if (myCounter > 0) {
myCounter--;
if (myCounter == 0) {
active = 0;
gotoAndStop ("gone");
}
}
}
Frame 51
stop();
Instance of Symbol 666 MovieClip in Frame 52
onClipEvent (load) {
if (app.myscreenName == "null") {
gotoAndStop (2);
} else {
gotoAndStop (1);
}
}
Instance of Symbol 692 MovieClip in Frame 53
onClipEvent (load) {
stringScore = "" + _root.score;
trace(stringScore);
ones.gotoAndStop(Number(stringScore.substr(-1, 1)) + 2);
if (_root.score > 9) {
tens.gotoAndStop(Number(stringScore.substr(-2, 1)) + 2);
_x = (_x + 20);
}
if (_root.score > 99) {
hundreds.gotoAndStop(Number(stringScore.substr(-3, 1)) + 2);
_x = (_x + 20);
}
if (_root.score >= 1000) {
ks.gotoAndStop(Number(stringScore.substr(-4, 1)) + 2);
comma._visible = true;
_x = (_x + 25);
} else {
comma._visible = false;
}
if (_root.score >= 10000) {
tenKs.gotoAndStop(Number(stringScore.substr(-5, 1)) + 2);
_x = (_x + 20);
}
if (_root.score >= 100000) {
hundredKs.gotoAndStop(Number(stringScore.substr(-6, 1)) + 2);
_x = (_x + 20);
}
}
Frame 59
stop();
Frame 60
MSGtext = "Loading...";
trace("hiscore code");
trace("submitScore flag=" + app.submitScore);
if ((app.myscreenName != "null") && (app.submitScore == true)) {
app.gameScore = score;
app.submitPath = (("/common/score/Scoreboard.jhtml?msg=S&limitEntries=true&game=sb_smoosh&name=" + app.myscreenName) + "&score=") + String(app.gameScore);
app.submitScore = false;
loadScores = new LoadVars();
trace(app.basePath + app.submitPath);
loadScores.load(app.basePath + app.submitPath);
loadScores.onLoad = function (success) {
if (success == false) {
MSGtext = "Oops, the high-score list isn\u2019t available right now!";
}
if (this.msg == "EE") {
if (this.text == "no scores available for that game (sb_smoosh)") {
MSGtext = "Sorry, the high-score list is empty!";
} else {
MSGtext = "Oops, the high-score list isn\u2019t available right now!";
}
} else {
myScoreFlag = true;
z = 0;
while (z < 100) {
nVar = eval ("this.pn" + z);
sVar = eval ("this.ps" + z);
scrollVar = eval ("scroller.contentMain.score" + (z + 1));
scrollVar.gotoAndStop(1);
if (myScoreFlag) {
if ((score == sVar) && (app.myscreenName == nVar)) {
trace("found my sub score at:" + z);
myScoreFlag = false;
scrollVar.gotoAndStop("hi");
}
}
scrollVar.placeval = z + 1;
scrollVar.nameval = nVar;
scrollVar.scoreval = sVar;
z++;
}
scroller._visible = true;
MSGtext = "";
}
};
} else {
trace("retrieving");
loadScores = new LoadVars();
loadScores.load(basePath + scorePath);
loadScores.onLoad = function (success) {
if (success == false) {
MSGtext = "Oops, the high-score list isn\u2019t available right now!";
}
if (this.msg == "EE") {
if (this.text == "no scores available for that game (sb_smoosh)") {
MSGtext = "Sorry, the high-score list is empty!";
} else {
MSGtext = "Oops, the high-score list isn\u2019t available right now!";
}
} else {
z = 0;
while (z < 100) {
nVar = eval ("this.pn" + z);
sVar = eval ("this.ps" + z);
trace("here?" + sVar);
scrollVar = eval ("scroller.contentMain.score" + (z + 1));
trace((((("var" + z) + ":") + nVar) + "...") + sVar);
scrollVar.placeval = z + 1;
scrollVar.nameval = nVar;
scrollVar.scoreval = sVar;
z++;
}
scroller._visible = true;
MSGtext = "";
}
};
}
stopAllSounds();
Instance of Symbol 726 MovieClip "scroller" in Frame 60
onClipEvent (load) {
_visible = false;
}
Frame 66
stop();
Symbol 297 Button
on (keyPress "<Left>") {
return(undefined);
}
on (keyPress "<Right>") {
return(undefined);
}
on (keyPress "<Up>") {
return(undefined);
}
on (keyPress "<Down>") {
return(undefined);
}
Symbol 23 MovieClip Frame 1
stop();
Symbol 40 MovieClip Frame 8
stop();
Symbol 41 MovieClip Frame 3
stop();
Symbol 49 MovieClip Frame 4
stop();
Symbol 53 MovieClip Frame 4
stop();
Symbol 57 MovieClip Frame 5
stop();
Symbol 70 MovieClip Frame 6
stop();
_parent._parent.core.kill(200);
Symbol 72 MovieClip Frame 11
stop();
Symbol 89 MovieClip Frame 19
_parent._parent._parent.core.graphicPause = 0;
Symbol 94 MovieClip Frame 20
stop();
_parent._parent.core.kill(300);
_parent._parent._x = _parent._parent._x - 30000;
Symbol 98 MovieClip Frame 15
stop();
Symbol 132 MovieClip Frame 20
stop();
Instance of Symbol 132 MovieClip "electric" in Symbol 139 MovieClip Frame 5
onClipEvent (enterFrame) {
if (hitter.hitTest(_root.you.hitter)) {
if (_root.fDying == 0) {
_root.hitMonster = 1;
}
}
}
Symbol 139 MovieClip Frame 24
_parent._parent._parent.core.shooting = 0;
Symbol 144 MovieClip Frame 65
_parent._parent.core.kill();
Symbol 145 MovieClip [bad] Frame 1
stop();
Symbol 145 MovieClip [bad] Frame 6
_root.anchor.newEndShoot();
_root.newPumping = 0;
_parent._parent.active = 0;
_root.newPumpedBaddy = null;
_root.pumpPause = 5;
if ((_root.lastMoveOK == "LEFT") || (_root.lastMoveOK == "RIGHT")) {
_root.you.face.anim.gotoAndStop("recoil");
} else {
_root.you.face.facing.anim.gotoAndStop("recoil");
}
Symbol 145 MovieClip [bad] Frame 8
stop();
Symbol 145 MovieClip [bad] Frame 48
Symbol 145 MovieClip [bad] Frame 75
_parent._x = _parent._x - 2000;
core.active = 0;
core.positionX = core.positionX - 2000;
Symbol 145 MovieClip [bad] Frame 86
_parent._x = _parent._x - 2000;
core.active = 0;
core.positionX = core.positionX - 2000;
Symbol 202 MovieClip Frame 1
_root.graphicsPause = 1;
Symbol 202 MovieClip Frame 5
_root.anchor._x = _root.positionX + _root.xo;
_root.anchor._y = _root.positionY + _root.yo;
_root.anchor.gotoAndPlay(_root.lastMoveOK);
_root.anchor.dir = _root.lastMoveOK;
Symbol 202 MovieClip Frame 11
stop();
Symbol 212 MovieClip Frame 6
stop();
Symbol 243 MovieClip Frame 1
_root.graphicsPause = 1;
_root.you.blowBubble();
Symbol 243 MovieClip Frame 18
_root.graphicsPause = 0;
_root.newShooting = 0;
Symbol 246 MovieClip Frame 9
stop();
_root.graphicsPause = 0;
Symbol 285 MovieClip Frame 1
_root.graphicsPause = 1;
_root.groundHasBeenHit = 0;
Instance of Symbol 284 MovieClip in Symbol 285 MovieClip Frame 25
onClipEvent (enterFrame) {
_root.dig(0, _root.positionY - 20, _root.positionY, "v", _root.positionY, _root.positionX);
thisMask = eval ("_root.v" + Math.floor(_root.positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(_root.positionX - 30, (_root.positionY + _root.yo) + 20, true)) {
_root.positionY = _root.positionY + 10;
} else if (_root.groundHasBeenHit == 0) {
_root.groundHasBeenHit = 1;
_root.hitgroundS.start();
}
}
Symbol 285 MovieClip Frame 110
stop();
_root.fBugs = 1;
Symbol 286 MovieClip [You] Frame 1
stop();
Symbol 286 MovieClip [You] Frame 4
stop();
Symbol 331 MovieClip Frame 5
stop();
Symbol 334 Button
on (release) {
gotoAndPlay ("play");
}
Symbol 335 Button
on (release) {
gotoAndPlay ("intro");
}
Symbol 336 Button
on (release) {
gotoAndPlay ("hiscore");
}
Symbol 344 Button
on (release) {
gotoAndPlay ("instructions");
}
Symbol 350 Button
on (release) {
gotoAndPlay ("play");
}
Symbol 351 MovieClip Frame 6
stop();
Symbol 377 MovieClip Frame 1
stop();
Symbol 387 Button
on (release) {
_root.allPaused = 1;
if (_root.soundOn == 1) {
_root.introPosition = _root.levelstartS.position / 1000;
_root.fx1position = _root.fx1.position / 1000;
_root.levelstartS.stop();
}
messages.gotoAndStop("intro");
if (_root.soundOn == 1) {
_root.globalSound = new Sound();
_root.globalSound.setVolume(0);
}
}
Instance of Symbol 380 MovieClip "comma" in Symbol 413 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
}
Symbol 456 Button
on (release) {
gotoAndStop ("controls");
}
Symbol 457 Button
on (release) {
gotoAndStop ("emptyFlash");
_parent.quit._y = _parent.quit._y - 1000;
_parent.sound._y = _parent.sound._y - 1000;
_parent.help._y = _parent.help._y - 1000;
_root.allPaused = 0;
if (_root.soundOn == 1) {
_root.globalSound = new Sound();
_root.globalSound.setVolume(100);
if (_root.introPosition < 3.64) {
_root.levelstartS.start(_root.introPosition);
} else if (_root.fDying != 1) {
_root.fx1.start(_root.fx1position, 1);
_root.fx1.onSoundComplete = function () {
_root.fx1.start(0, 9999);
};
}
}
}
Symbol 467 Button
on (release) {
_root.quitting = 0;
gotoAndPlay ("go");
_parent._parent.quit._y = _parent._parent.quit._y - 1000;
_parent._parent.sound._y = _parent._parent.sound._y - 1000;
_parent._parent.help._y = _parent._parent.help._y - 1000;
}
Symbol 468 Button
on (release) {
_root.quitting = 1;
gotoAndPlay ("go");
}
Symbol 469 MovieClip Frame 39
stop();
Symbol 469 MovieClip Frame 45
_root.allPaused = 0;
if (_root.soundOn == 1) {
_root.globalSound = new Sound();
_root.globalSound.setVolume(100);
}
if (_root.quitting == 0) {
if (_root.soundOn == 1) {
if (_root.introPosition < 3.64) {
_root.levelstartS.start(_root.introPosition);
} else if (_root.fDying != 1) {
_root.fx1.start(_root.fx1position, 1);
_root.fx1.onSoundComplete = function () {
_root.fx1.start(0, 9999);
};
}
}
}
if (_root.quitting == 1) {
_root.gameOver();
} else {
_parent.gotoAndStop("emptyFlash");
}
Symbol 470 MovieClip Frame 52
stop();
Symbol 470 MovieClip Frame 112
stop();
Symbol 470 MovieClip Frame 113
trace("play lc");
Symbol 470 MovieClip Frame 154
stop();
Symbol 470 MovieClip Frame 161
_parent.quit._y = _parent.quit._y + 1000;
_parent.sound._y = _parent.sound._y + 1000;
_parent.help._y = _parent.help._y + 1000;
Instance of Symbol 351 MovieClip in Symbol 470 MovieClip Frame 161
onClipEvent (load) {
swapDepths(3000);
}
Instance of Symbol 351 MovieClip in Symbol 470 MovieClip Frame 179
onClipEvent (load) {
swapDepths(3000);
}
Instance of Symbol 351 MovieClip in Symbol 470 MovieClip Frame 190
onClipEvent (load) {
swapDepths(3000);
}
Symbol 470 MovieClip Frame 202
_parent.quit._y = _parent.quit._y + 1000;
_parent.sound._y = _parent.sound._y + 1000;
_parent.help._y = _parent.help._y + 1000;
Symbol 473 Button
on (release) {
_root.allPaused = 1;
if (_root.soundOn == 1) {
_root.introPosition = _root.levelstartS.position / 1000;
_root.fx1position = _root.fx1.position / 1000;
_root.levelstartS.stop();
_root.globalSound = new Sound();
_root.globalSound.setVolume(0);
}
messages.gotoAndStop("choice");
}
Instance of Symbol 410 MovieClip "lives" in Symbol 474 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop(_root.lives + 1);
}
onClipEvent (enterFrame) {
function updateLives() {
life = _root.lives % 10;
gotoAndStop(life + 1);
}
}
Instance of Symbol 419 MovieClip "sound" in Symbol 474 MovieClip Frame 1
onClipEvent (load) {
if (_root.soundOn == null) {
_root.soundOn = 1;
}
if (_root.soundOn == 1) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
onClipEvent (mouseDown) {
if (this.hitTest(_root._xmouse, _root._ymouse)) {
if (_root.soundOn != 1) {
_root.soundOn = 1;
gotoAndStop (1);
_root.globalSound = new Sound();
_root.globalSound.setVolume(100);
} else {
_root.soundOn = 0;
gotoAndStop (2);
_root.globalSound = new Sound();
_root.globalSound.setVolume(0);
}
}
}
Symbol 501 MovieClip Frame 1
function beginPump() {
hitter._visible = false;
}
function newEndShoot() {
if (firstFrame == 1) {
endReverse();
return(undefined);
}
_root.graphicsPause = 1;
reversing = 1;
}
function endReverse() {
_root.graphicsPause = 0;
_x = (_x - 10000);
reversing = 0;
_root.newShooting = 0;
_root.newPumping = 0;
}
stop();
reversing = 0;
Symbol 501 MovieClip Frame 77
firstFrame = 1;
if (reversing == 1) {
endReverse();
}
Symbol 501 MovieClip Frame 78
firstFrame = 0;
Symbol 501 MovieClip Frame 91
newEndShoot();
Symbol 501 MovieClip Frame 124
stop();
reversing = 0;
Symbol 501 MovieClip Frame 156
firstFrame = 1;
if (reversing == 1) {
reversing = 0;
endReverse();
}
Symbol 501 MovieClip Frame 157
firstFrame = 0;
Symbol 501 MovieClip Frame 171
newEndShoot();
Symbol 501 MovieClip Frame 200
stop();
reversing = 0;
Symbol 501 MovieClip Frame 226
firstFrame = 1;
if (reversing == 1) {
endReverse();
}
Symbol 501 MovieClip Frame 227
firstFrame = 0;
Symbol 501 MovieClip Frame 240
newEndShoot();
Symbol 501 MovieClip Frame 291
stop();
reversing = 0;
Symbol 501 MovieClip Frame 334
firstFrame = 1;
if (reversing == 1) {
endReverse();
}
Symbol 501 MovieClip Frame 335
firstFrame = 0;
Symbol 501 MovieClip Frame 348
newEndShoot();
Symbol 501 MovieClip Frame 420
stop();
reversing = 0;
Symbol 525 MovieClip Frame 1
stop();
Symbol 530 MovieClip Frame 3
stop();
Symbol 536 MovieClip Frame 4
stop();
Symbol 542 MovieClip Frame 4
stop();
Symbol 548 MovieClip Frame 4
stop();
Symbol 550 MovieClip Frame 6
stop();
_parent._parent.core.kill(200);
Symbol 574 MovieClip Frame 3
stop();
Symbol 578 MovieClip Frame 1
Symbol 578 MovieClip Frame 20
stop();
_parent._parent.core.kill(300);
_parent._parent._x = _parent._parent._x - 30000;
Symbol 583 MovieClip Frame 65
_parent._parent.core.kill();
Symbol 584 MovieClip Frame 1
stop();
Symbol 584 MovieClip Frame 6
_root.anchor.newEndShoot();
_root.newPumping = 0;
_parent._parent.active = 0;
_root.newPumpedBaddy = null;
_root.pumpPause = 5;
if ((_root.lastMoveOK == "LEFT") || (_root.lastMoveOK == "RIGHT")) {
_root.you.face.anim.gotoAndStop("recoil");
} else {
_root.you.face.facing.anim.gotoAndStop("recoil");
}
Symbol 584 MovieClip Frame 8
stop();
Symbol 584 MovieClip Frame 48
Symbol 584 MovieClip Frame 80
_parent._x = _parent._x - 2000;
core.active = 0;
core.positionX = core.positionX - 2000;
Symbol 585 MovieClip Frame 1
stop();
Instance of Symbol 504 MovieClip "core" in Symbol 585 MovieClip Frame 1
onClipEvent (load) {
_parent.swapDepths(Number(_parent._name.substr(3)) + 300);
}
onClipEvent (enterFrame) {
function move() {
if (shooting == 1) {
return(undefined);
}
if (_root.badTotal == 1) {
if (positionY < (_root.SECTOR_SIZE * 3)) {
positionY = (_root.SECTOR_SIZE * 2.5) - 1;
if (floating != 0) {
unfloat();
}
moveX(-1);
if (positionX < -10) {
kill(0);
}
return(undefined);
}
}
dOK = 0;
uOK = 0;
lOK = 0;
rOK = 0;
checkR(0);
checkL(0);
checkU(0);
checkD(0);
if (floating > 0) {
if (_root.checkEmpty(positionY, "h", positionX) == 0) {
if (floating == 1) {
floating = 2;
}
} else if (floating == 2) {
comparison = Math.floor((positionY + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((Math.abs((positionY + (_root.SECTOR_SIZE / 2)) - comparison) < (SPEED + 1)) && ((lOK == 1) || (rOK == 1))) {
oldY = positionY;
positionY = comparison - (_root.SECTOR_SIZE / 2);
unfloat();
if ((positionX < _root.positionX) && (rOK == 1)) {
lastMoveOK = "RIGHT";
return(undefined);
}
if ((positionX > _root.positionX) && (lOK == 1)) {
lastMoveOK = "LEFT";
return(undefined);
}
if (rOK == 1) {
lastMoveOK = "RIGHT";
return(undefined);
}
if (lOK == 1) {
lastMoveOK = "LEFT";
return(undefined);
}
return(undefined);
}
}
if (_root.checkEmpty(positionX, "v", positionY) == 0) {
if (floating == 1) {
floating = 2;
}
} else if (floating == 2) {
comparison = Math.floor((positionX + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((Math.abs((positionX + (_root.SECTOR_SIZE / 2)) - comparison) < (SPEED + 1)) && ((uOK == 1) || (dOK == 1))) {
oldX = positionX;
positionX = comparison - (_root.SECTOR_SIZE / 2);
unfloat();
if ((positionY > _root.positionY) && (uOK == 1)) {
lastMoveOK = "UP";
return(undefined);
}
if ((positionY < _root.positionY) && (dOK == 1)) {
lastMoveOK = "DOWN";
return(undefined);
}
if (uOK == 1) {
lastMoveOK = "UP";
return(undefined);
}
if (dOK == 1) {
lastMoveOK = "DOWN";
return(undefined);
}
return(undefined);
}
}
moveGhost();
} else {
if (positionX > _root.positionX) {
targetHdir = -1;
}
if (positionX < _root.positionX) {
targetHdir = 1;
}
if (positionY > _root.positionY) {
targetVdir = -1;
}
if (positionY < _root.positionY) {
targetVdir = 1;
}
sameH = 0;
sameV = 0;
if ((lastMoveOK == "RIGHT") || (lastMoveOK == "LEFT")) {
if (_root.positionY == positionY) {
sameH = 1;
}
if (lastMoveOK == "RIGHT") {
comparison = Math.floor(((positionX + Math.max(SPEED, _root.SPEED)) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionX + (_root.SECTOR_SIZE / 2)) < comparison) {
sameV = 1;
} else {
uOK = 0;
dOK = 0;
}
} else if (lastMoveOK == "LEFT") {
comparison = Math.ceil(((positionX - Math.max(SPEED, _root.SPEED)) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionX - (_root.SECTOR_SIZE / 2)) > (comparison - _root.SECTOR_SIZE)) {
sameV = 1;
} else {
uOK = 0;
dOK = 0;
}
}
}
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
if (_root.positionX == positionX) {
sameV = 1;
}
if (lastMoveOK == "DOWN") {
comparison = Math.floor(((positionY + Math.max(SPEED, _root.SPEED)) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionY + (_root.SECTOR_SIZE / 2)) < comparison) {
sameH = 1;
} else {
rOK = 0;
lOK = 0;
}
} else if (lastMoveOK == "UP") {
comparison = Math.ceil(((positionY - Math.max(SPEED, _root.SPEED)) + (_root.SECTOR_SIZE / 2)) / _root.SECTOR_SIZE) * _root.SECTOR_SIZE;
if ((positionY - (_root.SECTOR_SIZE / 2)) > (comparison - _root.SECTOR_SIZE)) {
sameH = 1;
} else {
rOK = 0;
lOK = 0;
}
}
}
targetLeft = 0;
targetRight = 0;
targetForward = 0;
targetBack = 0;
if (_root.badTotal == 1) {
if (uOK == 1) {
moveY(-1);
return(undefined);
}
if (lOK == 1) {
moveX(-1);
return(undefined);
}
float();
return(undefined);
}
done = 0;
extra = 5;
if (lastMoveOK == "LEFT") {
forwards = lOK;
leftTurn = dOK;
rightTurn = uOK;
if (((leftTurn == 1) || (rightTurn == 1)) && (forwards == 1)) {
lOK = 0;
checkL(extra);
forwards = lOK;
}
same = sameH;
sameForwards = sameH;
sameRightAngle = sameV;
xMove = -1;
yMove = 0;
if (targetVdir == 1) {
targetLeft = 1;
targetRight = -1;
}
if (targetVdir == -1) {
targetLeft = -1;
targetRight = 1;
}
if (targetHdir == 1) {
targetForward = -1;
targetBack = 1;
}
if (targetHdir == -1) {
targetForward = 1;
targetBack = -1;
}
targetLRdir = targetVdir;
targetFBdir = targetHdir;
}
if (lastMoveOK == "RIGHT") {
forwards = rOK;
leftTurn = uOK;
rightTurn = dOK;
if (((leftTurn == 1) || (rightTurn == 1)) && (forwards == 1)) {
rOK = 0;
checkR(extra);
forwards = rOK;
}
same = sameH;
sameForwards = sameH;
sameRightAngle = sameV;
xMove = 1;
yMove = 0;
if (targetVdir == 1) {
targetLeft = -1;
targetRight = 1;
}
if (targetVdir == -1) {
targetLeft = 1;
targetRight = -1;
}
if (targetHdir == 1) {
targetForward = 1;
targetBack = -1;
}
if (targetHdir == -1) {
targetForward = -1;
targetBack = 1;
}
targetLRdir = targetVdir;
targetFBdir = targetHdir;
}
if (lastMoveOK == "UP") {
forwards = uOK;
leftTurn = lOK;
rightTurn = rOK;
if (((leftTurn == 1) || (rightTurn == 1)) && (forwards == 1)) {
uOK = 0;
checkU(extra);
forwards = uOK;
}
sameForwards = sameV;
sameRightAngle = sameH;
xMove = 0;
yMove = -1;
if (targetVdir == 1) {
targetForward = -1;
targetBack = 1;
}
if (targetVdir == -1) {
targetForward = 1;
targetBack = -1;
}
if (targetHdir == 1) {
targetLeft = -1;
targetRight = 1;
}
if (targetHdir == -1) {
targetLeft = 1;
targetRight = -1;
}
targetLRdir = targetHdir;
targetFBdir = targetVdir;
}
if (lastMoveOK == "DOWN") {
forwards = dOK;
leftTurn = rOK;
rightTurn = lOK;
if (((leftTurn == 1) || (rightTurn == 1)) && (forwards == 1)) {
dOK = 0;
checkD(extra);
forwards = dOK;
}
sameForwards = sameV;
sameRightAngle = sameH;
xMove = 0;
yMove = 1;
if (targetVdir == 1) {
targetForward = 1;
targetBack = -1;
}
if (targetVdir == -1) {
targetForward = -1;
targetBack = 1;
}
if (targetHdir == 1) {
targetLeft = 1;
targetRight = -1;
}
if (targetHdir == -1) {
targetLeft = -1;
targetRight = 1;
}
targetLRdir = targetHdir;
targetFBdir = targetVdir;
}
if (forwards == 0) {
if (((Math.random() * 10) < 1) && (ghostDelay == 0)) {
float();
return(undefined);
}
}
if (((done == 0) && (forwards == 0)) && (((leftTurn == 0) && (rightTurn == 1)) || ((leftTurn == 1) && (rightTurn == 0)))) {
if ((leftTurn == 0) && (rightTurn == 1)) {
if (xMove != 0) {
moveY(xMove);
} else {
moveX(-1 * yMove);
}
} else if (xMove != 0) {
moveY(-1 * xMove);
} else {
moveX(yMove);
}
if (xMove != 0) {
positionX = comparison - (_root.SECTOR_SIZE / 2);
} else if (yMove != 0) {
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
done = 1;
}
if ((done == 0) && ((((forwards == 1) && (leftTurn == 0)) && (rightTurn == 0)) || ((sameForwards == 1) && (forwards == 1)))) {
if (yMove == 0) {
moveX(xMove);
} else {
moveY(yMove);
}
done = 1;
}
if ((done == 0) && (((forwards == 0) && (leftTurn == 0)) && (rightTurn == 0))) {
if (yMove == 0) {
moveX(-1 * xMove);
} else {
moveY(-1 * yMove);
}
done = 1;
}
if ((done == 0) && ((((leftTurn == 1) && (targetLeft == 1)) || ((rightTurn == 1) && (targetRight == 1))) && (sameRightAngle == 1))) {
if (xMove != 0) {
moveY(targetVdir);
positionX = comparison - (_root.SECTOR_SIZE / 2);
} else if (yMove != 0) {
moveX(targetHdir);
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
done = 1;
}
if (((done == 0) && (rightTurn == 1)) && (leftTurn == 1)) {
if (targetRight == 1) {
leftTurn = 0;
}
if (targetLeft == 1) {
rightTurn = 0;
}
}
while (done == 0) {
path = Math.floor(Math.random() * 3);
if ((path == 0) && (forwards == 1)) {
if (moveX != 0) {
moveX(xMove);
} else {
moveY(yMove);
}
done = 1;
}
if ((path == 1) && (rightTurn == 1)) {
if (xMove != 0) {
moveY(xMove);
} else {
moveX(-1 * yMove);
}
done = 1;
if (xMove != 0) {
positionX = comparison - (_root.SECTOR_SIZE / 2);
} else if (yMove != 0) {
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
done = 1;
}
if ((path == 2) && (leftTurn == 1)) {
if (xMove != 0) {
moveY(-1 * xMove);
} else {
moveX(yMove);
}
done = 1;
if (xMove != 0) {
positionX = comparison - (_root.SECTOR_SIZE / 2);
} else if (yMove != 0) {
positionY = comparison - (_root.SECTOR_SIZE / 2);
}
done = 1;
}
}
}
}
function checkR(extra) {
if (Math.floor(positionX / _root.SECTOR_SIZE) > (_root.ROWS - 2)) {
rOK = 0;
return(undefined);
}
thisMask = eval ("_root.h" + Math.floor(positionY / _root.SECTOR_SIZE));
if (thisMask.hitTest(((positionX + (_root.SECTOR_SIZE / 2)) + _root.xo) + extra, positionY + _root.yo, true)) {
rOK = 1;
}
}
function checkL(extra) {
thisMask = eval ("_root.h" + Math.floor(positionY / _root.SECTOR_SIZE));
if (thisMask.hitTest(((positionX - (_root.SECTOR_SIZE / 2)) + _root.xo) - extra, positionY + _root.yo, true)) {
lOK = 1;
}
}
function checkD(extra) {
thisMask = eval ("_root.v" + Math.floor(positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(positionX + _root.xo, ((positionY + (_root.SECTOR_SIZE / 2)) + _root.yo) + extra, true)) {
dOK = 1;
}
}
function checkU(extra) {
thisMask = eval ("_root.v" + Math.floor(positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(positionX + _root.xo, ((positionY - (_root.SECTOR_SIZE / 2)) + _root.yo) - extra, true)) {
uOK = 1;
}
}
function moveX(f) {
positionX = positionX + (SPEED * f);
if (f < 0) {
lastMoveOK = "LEFT";
} else {
lastMoveOK = "RIGHT";
}
lastHorizontalMove = lastMoveOK;
}
function moveY(f) {
positionY = positionY + (SPEED * f);
if (f < 0) {
if (lastMoveOK == "DOWN") {
if (lastHorizontalMove == "LEFT") {
lastHorizontalMove = "RIGHT";
} else {
lastHorizontalMove = "LEFT";
}
}
lastMoveOK = "UP";
} else {
if (lastMoveOK == "UP") {
if (lastHorizontalMove == "LEFT") {
lastHorizontalMove = "RIGHT";
} else {
lastHorizontalMove = "LEFT";
}
}
lastMoveOK = "DOWN";
}
}
function moveGhost() {
if (_root.badTotal == 1) {
if (positionY > ((_root.COLUMNS * _root.SECTOR_SIZE) / 2)) {
tX = Math.min(positionX, 400);
} else {
tX = _root.SECTOR_SIZE * 1.5;
}
tY = _root.SECTOR_SIZE * 2.5;
distance = SPEED * 0.7;
} else {
tX = _root.positionX;
tY = _root.positionY;
distance = SPEED * 0.7;
}
if (tX < (positionX - 2)) {
positionX = positionX - distance;
my.inner.face.gotoAndStop("LEFT");
lastHorizontalMove = "LEFT";
lastMoveOK = "LEFT";
} else if (tX > (positionX + 2)) {
positionX = positionX + distance;
my.inner.face.gotoAndStop("RIGHT");
lastHorizontalMove = "RIGHT";
lastMoveOK = "RIGHT";
}
if (tY < (positionY - 2)) {
positionY = positionY - distance;
} else if (tY > (positionY + 2)) {
positionY = positionY + distance;
}
}
function hit() {
if ((inflateCount > 55) || (active != 1)) {
return(undefined);
}
graphicPause = 0;
if (_root.poweredUp == 1) {
inflating = 1;
} else {
imPumped = 1;
}
inflationLevel++;
my.inner.gotoAndStop(1 + inflationLevel);
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
my.inner.face.gotoAndStop(lastMoveOK);
}
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
my.inner.face.gotoAndStop(lastHorizontalMove);
}
if (inflationLevel == 4) {
my.inner.play();
active = 0;
return(undefined);
}
inflateCount = 60;
}
function kill(price) {
active = 0;
inflating = 0;
imPumped = 0;
my._x = my._x - 1000;
_root.checkEnd();
if (price > 0) {
_root.increaseScore(price);
}
}
function float() {
floating = 1;
graphicPause = 1;
my.inner.gotoAndStop("transform");
my.inner.face.gotoAndStop(lastHorizontalMove);
}
function unfloat() {
floating = 0;
graphicPause = 1;
my.inner.gotoAndStop("transform");
my.inner.face.gotoAndStop(lastHorizontalMove);
}
function resetLife() {
ghostDelay = 150;
my.stars._visible = false;
graphicPause = 0;
positionX = origX;
positionY = origY;
lastMoveOK = startMove;
shooting = 0;
floating = 0;
inflating = 0;
imPumped = 0;
crushed = 0;
inflationLevel = 0;
}
function explode() {
_root.shellenemyhitS.start();
active = 0;
my.inner.gotoAndStop("bubbled");
}
function breathFire() {
if ((_root.badTotal == 1) || (_root.freeze > 0)) {
return(undefined);
}
shooting = 1;
my.inner.gotoAndStop("attack");
my.inner.face.gotoAndStop(lastMoveOK);
}
if (_root.allPaused == 1) {
return(undefined);
}
if ((floating > 0) && (_root.freeze > 0)) {
my.inner.face.face.face.tail.stop();
}
if ((floating > 0) && (_root.freeze == 1)) {
my.inner.face.face.face.tail.play();
}
if (_root.freeze > 0) {
if (_root.PU.wandCount < 1) {
my.stars._visible = true;
}
if (_root.freeze == 1) {
my.stars._visible = false;
}
}
if ((scoreCounter > 0) || (inflateCount > 0)) {
scoreCounter--;
my._y = positionY + _root.yo;
}
if ((!active) == 1) {
return(undefined);
}
if (_root.fPaused == 0) {
if (ghostDelay > 0) {
ghostDelay--;
}
}
if ((floating > 0) && (inflationLevel == 0)) {
my.inner.gotoAndStop("floating");
my.inner.face.gotoAndStop(lastMoveOK);
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
my.inner.face.facing.gotoAndStop(lastHorizontalMove);
}
} else if (((floating == 0) && (inflationLevel == 0)) && (shooting == 0)) {
my.inner.gotoAndStop(1);
my.inner.face.gotoAndStop(lastMoveOK);
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
my.inner.face.facing.gotoAndStop(lastHorizontalMove);
}
if (special == 1) {
if (((((special == 1) && (shooting == 0)) && (_root.fPaused == 0)) && (_root.badTotal != 1)) && (inflationLevel == 0)) {
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
if ((Math.random() * 75) < 1) {
breathFire();
}
}
}
}
}
if (inflateCount == 1) {
shooting = 0;
inflationLevel--;
my.inner.gotoAndStop(1 + inflationLevel);
if ((lastMoveOK == "LEFT") || (lastMoveOK == "RIGHT")) {
my.inner.face.gotoAndStop(lastMoveOK);
}
if ((lastMoveOK == "UP") || (lastMoveOK == "DOWN")) {
my.inner.face.gotoAndStop(lastHorizontalMove);
}
if ((inflationLevel == 0) && (floating > 0)) {
float();
}
if (inflationLevel > 0) {
inflateCount = 40;
} else {
if (_root.newPumpedBaddy == this) {
_root.newPumpedBaddy = null;
}
if (_root.newPumping == 1) {
_root.anchor.newEndShoot();
_root.newPumping = 0;
}
}
}
if (inflateCount > 0) {
inflateCount--;
return(undefined);
}
if (((_root.fPaused == 0) && (_root.freeze == 0)) && (shooting == 0)) {
move();
} else if ((shooting == 0) && (floating == 0)) {
my.inner.gotoAndStop("WAITING");
my.inner.face.gotoAndStop(lastMoveOK);
}
my._x = positionX + _root.xo;
}
Symbol 586 MovieClip Frame 30
stop();
Symbol 607 MovieClip Frame 8
stop();
Symbol 611 MovieClip Frame 42
stop();
_parent.rockCore.destroying = 0;
stop();
Symbol 623 MovieClip Frame 27
stop();
_parent.rockCore.destroying = 0;
stop();
Symbol 624 MovieClip Frame 1
stop();
Instance of Symbol 504 MovieClip "rockCore" in Symbol 624 MovieClip Frame 1
onClipEvent (load) {
_visible = false;
my._x = positionX;
_parent.swapDepths(Number(_parent._name.substr(4)) + 600);
}
onClipEvent (enterFrame) {
function hitGround() {
_root.shellgroundS.start();
falling = -1;
destroying = 0;
_root.PU.rockDrop();
a = 0;
while (a < crushedThings.length) {
crushedThings[a].my.anim.gotoAndPlay(5);
a++;
}
if (anchor == 0) {
my.gotoAndStop("rockDestroy");
} else {
_parent.gotoAndStop("anchorDestroy");
}
}
function checkKill() {
sp = 0;
while (sp < _root.badTs.length) {
thisThing = _root.badTs[sp];
target = thisThing.my.hitter;
soundP = 0;
if (target.hitTest(_parent.anim.hitter) && (thisThing.active == 1)) {
numberHit++;
soundP = 1;
thisThing.active = 0;
amount = 1000 * numberHit;
if (numberHit == 1) {
amount = 1000;
}
if (numberHit == 2) {
amount = 1500;
}
if (numberHit == 3) {
amount = 1500;
}
if (numberHit > 3) {
amount = 2000;
}
_root.increaseScore(amount);
crushedThings.push(thisThing);
thisThing._parent.inner.gotoAndStop("crushed");
}
if (soundP == 1) {
_root.squishS.start();
}
if (_parent.anim.hitter.hitTest(_root.you.hitter)) {
_root.hitRock = 1;
}
sp++;
}
}
if (_root.levelEndCounter > 0) {
return(undefined);
}
if (_root.allPaused == 1) {
return(undefined);
}
if (active != 1) {
return(undefined);
}
if (destroying == 1) {
checkKill();
if ((positionY - droppingY) > 10) {
_root.dig(0, positionY - 20, positionY, "v", positionY, positionX);
}
}
if (falling == 0) {
if (_root.checkEmpty(positionX, "v", positionY + 40) == 1) {
droppingX = _root.positionX;
droppingY = _root.positionY;
falling = 10;
numberHit = 0;
}
}
if (falling > 1) {
if ((_root.positionY == droppingY) && (Math.abs(_root.positionX - droppingX) < 10)) {
} else {
fallDelay = 10;
_parent.anim.play();
droppingX = -1000;
falling--;
_root.thisMap[I] = "o";
crushedThings = new Array();
}
}
if (falling == 1) {
if (fallDelay > 0) {
fallDelay--;
if (fallDelay == 1) {
_parent.anim.stop();
_root.shelldescentS.start();
}
return(undefined);
}
destroying = 1;
positionY = positionY + 10;
a = 0;
while (a < crushedThings.length) {
crushedThings[a].positionY = crushedThings[a].positionY + 10;
a++;
}
thisMask = eval ("_root.v" + Math.floor(positionX / _root.SECTOR_SIZE));
if (thisMask.hitTest(positionX + _root.xo, (positionY + _root.yEx) + 15, true)) {
dOK = 1;
} else {
hitGround();
}
}
}
Symbol 654 MovieClip Frame 6
stop();
Symbol 655 MovieClip Frame 11
stop();
Symbol 656 MovieClip Frame 15
stop();
Symbol 657 MovieClip Frame 41
stop();
Symbol 662 Button
on (release) {
gotoAndPlay ("play");
}
Symbol 665 Button
on (release) {
app.submitScore = true;
_parent.gotoAndPlay("hiscore");
}
Symbol 667 Button
on (release) {
gotoAndPlay ("highscore");
}
Symbol 688 MovieClip Frame 1
stop();
Symbol 697 Button
on (release) {
gotoAndPlay ("menu");
}
Symbol 699 Button
on (release) {
gotoAndPlay ("hiscore");
}
Symbol 700 Button
on (release) {
gotoAndPlay ("instructions");
}
Symbol 710 MovieClip Frame 1
stop();
Symbol 710 MovieClip Frame 2
stop();
Symbol 726 MovieClip Frame 1
contentMain.setMask(maskedView);
Instance of Symbol 711 MovieClip "contentMain" in Symbol 726 MovieClip Frame 1
/* no clip actions */
Symbol 726 MovieClip Frame 5
scrolling = function () {
var _local5 = scrollTrack._height;
var _local2 = contentMain._height + 20;
var _local4 = scrollFace._height;
var _local3 = maskedView._height;
var initPosition = ((scrollFace._y = scrollTrack._y));
var initContentPos = (contentMain._y + 5);
var finalContentPos = ((_local3 - _local2) + initContentPos);
var left = scrollTrack._x;
var top = scrollTrack._y;
var right = scrollTrack._x;
var bottom = ((scrollTrack._height - _local4) + scrollTrack._y);
var dy = 0;
var speed = 10;
var moveVal = ((_local2 - _local3) / (_local5 - _local4));
moveVal = moveVal + 0.3;
scrollFace.onPress = function () {
var _local2 = this._y;
startDrag (this, false, left, top, right, bottom);
this.onMouseMove = function () {
dy = Math.abs(initPosition - this._y);
contentMain._y = Math.round(((dy * -1) * moveVal) + initContentPos);
};
};
scrollFace.onMouseUp = function () {
stopDrag();
delete this.onMouseMove;
};
btnUp.onPress = function () {
this.onEnterFrame = function () {
if ((contentMain._y + speed) < maskedView._y) {
if (scrollFace._y <= top) {
scrollFace._y = top;
} else {
scrollFace._y = scrollFace._y - (speed / moveVal);
}
contentMain._y = contentMain._y + speed;
} else {
scrollFace._y = top;
contentMain._y = maskedView._y;
delete this.onEnterFrame;
}
};
};
btnUp.onDragOut = function () {
delete this.onEnterFrame;
};
btnUp.onRelease = function () {
delete this.onEnterFrame;
};
btnUp.onRollOut = function () {
delete this.onEnterFrame;
};
btnDown.onPress = function () {
this.onEnterFrame = function () {
if ((contentMain._y - speed) > finalContentPos) {
if (scrollFace._y >= bottom) {
scrollFace._y = bottom;
} else {
scrollFace._y = scrollFace._y + (speed / moveVal);
}
contentMain._y = contentMain._y - speed;
} else {
scrollFace._y = bottom;
contentMain._y = finalContentPos;
delete this.onEnterFrame;
}
};
};
btnDown.onRelease = function () {
delete this.onEnterFrame;
};
btnDown.onDragOut = function () {
delete this.onEnterFrame;
};
btnDown.onRollOut = function () {
delete this.onEnterFrame;
};
if (_local2 < _local3) {
scrollFace._visible = false;
btnUp.enabled = false;
btnDown.enabled = false;
} else {
scrollFace._visible = true;
btnUp.enabled = true;
btnDown.enabled = true;
}
};
scrolling();
stop();