Combined Code
// unknown tag 88 length 68
// unknown tag 88 length 61
movieClip 16 LoadBrickPart {
frame 1 {
stop();
rot = random(40) - 20;
fallDir = (_root.levelStyle == 3) ? -0.5 : 1;
ySpeed = fallDir * (random(20) - 15) / 5;
xSpeed = (random(20) - 10) / 2;
thisX = function (offset) {
return _root.Level._x + this._x + this._parent._x + offset;
};
thisY = function (offset) {
return -_root.Level._y + this._y + this._parent._y + offset;
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 48);
brickX = int((this._x + this._parent._x + xPos) / 48);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickBounce = false;
brickStop = false;
gotoAndStop(int(_root.levelStyle / 1 + 1));
onEnterFrame = function () {
if (!_root.gamePause) {
this._x += xSpeed / (_root.slowDown + 1);
this._y += fallDir * ySpeed * 3 / (_root.slowDown + 1);
if (!brickStop) {
this._rotation += rot;
++ySpeed;
if (ySpeed > 0 && (platHit(0, fallDir * 5) || brickHit(0, fallDir * 5))) {
if (brickBounce) {
brickStop = true;
ySpeed = 0;
} else {
this._y -= fallDir * ySpeed * 2;
ySpeed = -ySpeed / 3;
brickBounce = true;
}
}
if (platHit((xSpeed / Math.abs(xSpeed)) * 5, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 5, 0)) {
xSpeed = -xSpeed;
}
} else {
xSpeed = Math.abs(xSpeed) < 1 ? 0 : xSpeed / 2;
if (!platHit(0, fallDir * 5) && !brickHit(0, fallDir * 5)) {
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
}
}
if (this._y + this._parent._y > 515) {
this.removeMovieClip();
}
if (this._x + this._parent._x + this._parent._parent._x + _root.Level._x < -15) {
this.removeMovieClip();
}
};
}
}
movieClip 18 frameRate {
}
movieClip 21 hitTestCheck {
}
movieClip 30 {
frame 1 {
stop();
}
}
movieClip 45 {
frame 1 {
stop();
}
}
movieClip 66 {
}
movieClip 68 {
}
movieClip 71 {
}
movieClip 72 {
}
movieClip 74 {
}
movieClip 76 {
}
movieClip 80 {
}
movieClip 82 {
}
movieClip 84 {
}
movieClip 86 {
}
movieClip 88 {
}
movieClip 90 {
}
movieClip 92 {
}
movieClip 94 {
}
movieClip 96 {
}
movieClip 98 {
}
movieClip 102 {
}
movieClip 103 BulletIconCreation {
instance of movieClip 102 {
onClipEvent (load) {
this.stop();
}
}
}
movieClip 117 {
}
movieClip 123 {
}
movieClip 125 {
}
movieClip 127 {
}
movieClip 129 {
}
movieClip 131 {
}
movieClip 133 {
}
movieClip 135 {
}
movieClip 137 {
}
movieClip 139 {
}
movieClip 140 AbilityIconCreation {
instance of movieClip 102 {
onClipEvent (load) {
this.stop();
}
}
}
movieClip 151 {
frame 1 {
stop();
statComplete.text = _root.statComplete;
statDeath.text = _root.statDeath;
statBricks.text = _root.statBricks;
statCoins.text = _root.statCoins;
statEnemies.text = _root.statEnemies;
statFuzzy.text = _root.statFuzzy;
statComplete.setTextFormat(_root.txtFormat);
statComplete.embedFonts = true;
statDeath.setTextFormat(_root.txtFormat);
statDeath.embedFonts = true;
statBricks.setTextFormat(_root.txtFormat);
statBricks.embedFonts = true;
statCoins.setTextFormat(_root.txtFormat);
statCoins.embedFonts = true;
statEnemies.setTextFormat(_root.txtFormat);
statEnemies.embedFonts = true;
statFuzzy.setTextFormat(_root.txtFormat);
statFuzzy.embedFonts = true;
}
frame 2 {
j = 0;
BulletTotal = 0;
i = 1;
while (i <= 15) {
j += _root.BulletUnlock[i];
BulletTotal += _root.statBullet[i];
++i;
}
BulletOrder = new Array(5);
BulletNext = 0;
h = 1;
while (h <= 5) {
BulletOrder[h] = 0;
BulletNext = 0;
i = 1;
while (i <= 15) {
if (_root.statBullet[i] > BulletNext) {
k = 1;
while (k < h) {
if (BulletOrder[k] == i) {
break;
}
++k;
}
if (k == h) {
BulletNext = _root.statBullet[i];
BulletOrder[h] = i;
}
}
++i;
}
if (!BulletNext) {
i = 1;
while (i <= 16) {
if (_root.BulletUnlock[i]) {
k = 1;
while (k < h) {
if (BulletOrder[k] == i) {
break;
}
++k;
}
if (k == h) {
BulletOrder[h] = i;
break;
}
}
++i;
}
}
++h;
}
statBulletUnlock.text = j;
statBulletUnlock.setTextFormat(_root.txtFormat);
statBulletUnlock.embedFonts = true;
i = 1;
while (i <= 5) {
if (_root.BulletUnlock[BulletOrder[i]]) {
this['statBar' + i].gotoAndStop(1 + int((_root.statBullet[BulletOrder[i]] / BulletTotal) * 100));
this['bulletPercent' + i].text = int((_root.statBullet[BulletOrder[i]] / BulletTotal) * 10000) / 100 + '%';
this['bulletName' + i].text = _root.BulletName[BulletOrder[i]];
this['bulletOrder' + i].gotoAndStop(BulletOrder[i]);
this['bulletOrder' + i]._alpha = 100;
} else {
this['statBar' + i].gotoAndStop(1);
this['bulletPercent' + i].text = '';
this['bulletName' + i].text = '';
this['bulletOrder' + i].gotoAndStop(this['BulletOrder' + i]._totalframes);
this['bulletOrder' + i]._alpha = 0;
}
this['bulletName' + i].setTextFormat(_root.txtFormat);
this['bulletName' + i].embedFonts = true;
this['bulletPercent' + i].setTextFormat(_root.txtFormat);
this['bulletPercent' + i].embedFonts = true;
++i;
}
}
frame 3 {
j = 0;
AbilityTotal = 0;
i = 1;
while (i <= 9) {
j += _root.AbilityUnlock[i];
AbilityTotal += _root.statAbility[i];
++i;
}
AbilityOrder = new Array(5);
AbilityNext = 0;
h = 1;
while (h <= 5) {
AbilityOrder[h] = 0;
AbilityNext = 0;
i = 1;
while (i <= 9) {
if (_root.statAbility[i] > AbilityNext) {
k = 1;
while (k < h) {
if (AbilityOrder[k] == i) {
break;
}
++k;
}
if (k == h) {
AbilityNext = _root.statAbility[i];
AbilityOrder[h] = i;
}
}
++i;
}
if (!AbilityNext) {
i = 1;
while (i <= 16) {
if (_root.AbilityUnlock[i]) {
k = 1;
while (k < h) {
if (AbilityOrder[k] == i) {
break;
}
++k;
}
if (k == h) {
AbilityOrder[h] = i;
break;
}
}
++i;
}
}
++h;
}
statAbilityUnlock.text = j;
statAbilityUnlock.setTextFormat(_root.txtFormat);
statAbilityUnlock.embedFonts = true;
i = 1;
while (i <= 5) {
if (_root.AbilityUnlock[AbilityOrder[i]]) {
this['statBar' + i].gotoAndStop(1 + int((_root.statAbility[AbilityOrder[i]] / AbilityTotal) * 100));
this['bulletPercent' + i].text = int((_root.statAbility[AbilityOrder[i]] / AbilityTotal) * 10000) / 100 + '%';
this['bulletName' + i].text = _root.AbilityName[AbilityOrder[i]];
this['bulletOrder' + i].gotoAndStop(AbilityOrder[i]);
this['bulletOrder' + i]._alpha = 100;
} else {
this['statBar' + i].gotoAndStop(1);
this['bulletPercent' + i].text = '';
this['bulletName' + i].text = '';
this['bulletOrder' + i].gotoAndStop(this['AbilityOrder' + i]._totalframes);
this['bulletOrder' + i]._alpha = 0;
}
this['bulletName' + i].setTextFormat(_root.txtFormat);
this['bulletName' + i].embedFonts = true;
this['bulletPercent' + i].setTextFormat(_root.txtFormat);
this['bulletPercent' + i].embedFonts = true;
++i;
}
}
}
movieClip 152 {
frame 1 {
stop();
i = 0;
while (i <= 6) {
this.attachMovie('SMBMedals', 'medalDisplay' + i, i);
this['medalDisplay' + i]._xscale = 20 * i;
this['medalDisplay' + i]._yscale = this['medalDisplay' + i]._xscale;
this['medalDisplay' + i].gotoAndStop(7 - i);
++i;
}
moveMedals = 0;
hoverMedal = 1;
startX = 98;
startY = 149;
this.attachMovie('leftRightSelection2', 'LRSel', 10);
this.LRSel._x = startX;
this.LRSel._y = startY;
this.attachMovie('medalStats', 'medalStats', 11);
this.medalStats._x = startX - 126;
this.medalStats._y = startY + 78;
this.LRSel.buttonL.onRelease = function () {
this._parent._parent.moveMedals = 1;
};
this.LRSel.buttonR.onRelease = function () {
this._parent._parent.moveMedals = -1;
};
onEnterFrame = function () {
i = 0;
while (i <= 6) {
if (moveMedals) {
this['medalDisplay' + i]._xscale = 20 * i + 20 * moveMedals;
if (!i) {
hoverMedal = (hoverMedal - moveMedals + 49) % 50 + 1;
medalStats.statReset();
}
} else {
this['medalDisplay' + i]._xscale -= (this['medalDisplay' + i]._xscale - 20 * i) / 4;
}
this['medalDisplay' + i].gotoAndStop(_root.medalGet[(5 - i + hoverMedal + 49) % 50 + 1] ? (5 - i + hoverMedal + 49) % 50 + 1 : 51);
if (this['medalDisplay' + i]._xscale >= 0) {
this['medalDisplay' + i]._alpha = 100;
} else {
this['medalDisplay' + i]._alpha = 0;
}
100;
this['medalDisplay' + i]._yscale = this['medalDisplay' + i]._xscale;
this['medalDisplay' + i]._x = startX + (25 - this['medalDisplay' + i]._xscale / 4) + (Math.pow(this['medalDisplay' + i]._xscale / 100, 2) - Math.pow(this['medalDisplay' + i]._xscale / 100, 3)) * 775;
this['medalDisplay' + i]._y = startY - 50 - Math.cos(Math.PI * this['medalDisplay' + i]._yscale / 100) * 50;
++i;
}
moveMedals = 0;
};
}
}
button 157 {
on (release) {
trace(sData.savedLevel.Background._currentframe);
_root.levelStyle = sData.savedLevel.Background._currentframe - 1;
_root.titlePosx = -750;
_root.titlePosy = 0;
}
}
button 159 {
on (release) {
_root.Level_Custom = '';
_root.pasteData = false;
_root.savedLevelData = false;
this.savedLevels.maskScale = 0;
butLetsGo._y = -500;
sLevelData._y = -1327;
_root.titlePosx = 0;
_root.titlePosy = 1000;
}
}
button 161 {
on (release) {
_root.titlePosx = -750;
_root.titlePosy = -1000;
}
}
button 163 {
on (release) {
com.newgrounds.API.loadMySite();
}
}
button 165 {
on (release) {
com.newgrounds.API.loadNewgrounds();
}
}
button 167 {
on (release) {
_root.titlePosy = -2000;
_root.titlePosx = 0;
}
}
button 169 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.titlePosx = 0;
_root.titlePosy = 0;
}
}
}
button 170 {
on (release) {
_root.titlePosx = 750;
_root.titlePosy = 0;
}
}
button 171 {
on (release) {
_root.titlePosx = 0;
_root.titlePosy = 0;
}
}
button 173 {
on (release) {
_root.titlePosx = 0;
_root.titlePosy = -1000;
}
}
button 175 {
on (release) {
_root.cheatInvincible = !_root.cheatInvincible;
}
}
button 177 {
on (release) {
_root.bulletNo = 1;
_root.abilityNo = 1;
CharAbSel.BulletIcon.gotoAndStop(_root.bulletNo);
CharAbSel.AbilityIcon.gotoAndStop(_root.abilityNo);
_root.StageNo = 1;
_root.titlePosx = -750;
_root.titlePosy = 1000;
this.CharAbSel.BulletStatDisplay.statReset();
this.CharAbSel.AbilityStatDisplay.statReset();
this.worldSel.worldBox.boxFlip = true;
}
}
button 179 {
on (release) {
if (_root.savedProgress) {
_root.tempScore = _root.savedScore;
_root.prevScore = _root.savedScore;
_root.tempAbility = _root.savedAbility;
_root.tempProgress = _root.savedProgress;
var savedData = _root.savedProgress.split('');
_root.bulletNo = savedData[0] * 10 + savedData[1] * 1;
_root.abilityNo = savedData[2];
_root.levelNo = savedData[3] + '' + savedData[4];
_root.StageNo = int(int(4 * (ord(savedData[3]) - 97) / 1) + savedData[4] / 1);
_root.gameLoaded = true;
_root.firstLevel = true;
_root.titleUnload('Game');
}
}
}
button 180 {
on (release) {
if (_root.AbilityUnlock[_root.abilityNo]) {
_root.abilityNo = 1;
}
if (_root.BulletUnlock[_root.bulletNo]) {
_root.bulletNo = 1;
}
_root.titlePosx = -750;
_root.titlePosy = 0;
this.CharAbSel.userSelect = false;
this.CharAbSel.userSelectStart = false;
this.CharAbSel.selectType = '';
}
}
movieClip 183 {
frame 1 {
onEnterFrame = function () {
this.gotoAndStop(2 - _root[this._name]);
};
}
}
button 185 {
on (release) {
_root.cheatUnlock = !_root.cheatUnlock;
if (_root.cheatUnlock) {
i = 1;
while (i <= 15) {
_root.BulletUnlock[i] = true;
++i;
}
i = 1;
while (i <= 9) {
_root.AbilityUnlock[i] = true;
++i;
}
} else {
i = 1;
while (i <= 15) {
_root.BulletUnlock[i] = _root.savefile.data.BulletUnlock[i];
++i;
}
i = 1;
while (i <= 9) {
_root.AbilityUnlock[i] = _root.savefile.data.AbilityUnlock[i];
++i;
}
}
}
}
button 187 {
on (release) {
if (!this.CharAbSel.userSelect) {
_root.tempScore = 0;
_root.tempAbility = 0;
_root.tempProgress = '011a1';
_root.gameLoaded = false;
_root.levelNo = chr(int((_root.StageNo - 1) / 4) + 97) + int((_root.StageNo - 1) % 4 + 1);
_root.abilityMeter = 0;
_root.titleUnload('Game');
_root.firstLevel = true;
}
}
}
button 189 {
on (release) {
this.gameInstructions.gotoAndStop(1);
}
}
button 191 {
on (release) {
this.gameInstructions.gotoAndStop(3);
}
}
button 193 {
on (release) {
this.gameInstructions.gotoAndStop(5);
}
}
button 195 {
on (release) {
this.gameInstructions.gotoAndStop(7);
}
}
button 197 {
on (release) {
this.gameInstructions.gotoAndStop(9);
}
}
movieClip 200 {
frame 1 {
attachMovie('BulletIcon', 'BulletIcon', 1);
BulletIcon._x = 115;
BulletIcon._y = 345;
attachMovie('AbilityIcon', 'AbilityIcon', 2);
AbilityIcon._x = 325;
AbilityIcon._y = 345;
attachMovie('leftRightSelection', 'iconSelect', 100);
iconSelect._rotation = -45;
attachMovie('BulletStatDisplay', 'BulletStatDisplay', 101);
this.BulletStatDisplay._x = 150;
this.BulletStatDisplay._y = -150;
attachMovie('AbilityStatDisplay', 'AbilityStatDisplay', 102);
this.AbilityStatDisplay._x = 150;
this.AbilityStatDisplay._y = -150;
BulletIcon.gotoAndStop(_root.bulletNo);
AbilityIcon.gotoAndStop(_root.abilityNo);
userSelect = false;
userSelectStart = false;
selectType = '';
BulletIcon.onRelease = function () {
if (_root.AbilityUnlock[_root.abilityNo]) {
if (selectType != 'Bullet') {
userSelect = true;
userSelectStart = true;
selectType = 'Bullet';
} else {
if (_root.BulletUnlock[_root.bulletNo]) {
userSelect = false;
userSelectStart = false;
selectType = '';
}
}
}
};
AbilityIcon.onRelease = function () {
if (_root.BulletUnlock[_root.bulletNo]) {
if (selectType != 'Ability') {
userSelect = true;
userSelectStart = true;
selectType = 'Ability';
} else {
if (_root.AbilityUnlock[_root.abilityNo]) {
userSelect = false;
userSelectStart = false;
selectType = '';
}
}
}
};
iconReset = function () {
this[selectType + 'Icon']._rotation = -45;
this[selectType + 'IconR']._rotation = -90;
this[selectType + 'IconL']._rotation = 0;
this[selectType + 'Icon'].gotoAndStop(_root[selectType + 'Unlock'][_root[selectType.toLowerCase() + 'No']] ? _root[selectType.toLowerCase() + 'No'] : this[selectType + 'Icon']._totalframes);
this[selectType + 'IconR'].gotoAndStop(_root[selectType + 'Unlock'][_root[selectType.toLowerCase() + 'No'] + 1] ? _root[selectType.toLowerCase() + 'No'] + 1 : this[selectType + 'IconR']._totalframes);
this[selectType + 'IconL'].gotoAndStop(_root[selectType + 'Unlock'][_root[selectType.toLowerCase() + 'No'] - 1] ? _root[selectType.toLowerCase() + 'No'] : this[selectType + 'IconL']._totalframes);
this[selectType + 'Icon']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconR']._rotation / 180);
this[selectType + 'Icon']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconR']._rotation / 180);
this[selectType + 'Icon']._yscale = 150;
this[selectType + 'Icon']._xscale = 150;
this[selectType + 'IconL']._yscale = 150;
this[selectType + 'IconL']._xscale = 150;
this[selectType + 'IconR']._yscale = 150;
this[selectType + 'IconR']._xscale = 150;
};
iconMove = function (dir) {
this.BulletStatDisplay.statReset();
this.AbilityStatDisplay.statReset();
this[selectType + 'Icon'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : this[selectType + 'Icon']._totalframes);
this[selectType + 'Icon']._rotation = -45 - 45 * dir;
this[selectType + 'IconR'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : this[selectType + 'IconR']._totalframes);
this[selectType + 'IconR']._rotation = -90 - 45 * dir;
this[selectType + 'IconL'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : this[selectType + 'IconL']._totalframes);
this[selectType + 'IconL']._rotation = -45 * dir;
this[selectType + 'Icon']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconR']._rotation / 180);
this[selectType + 'Icon']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconR']._rotation / 180);
};
iconSelect.buttonL.onRelease = function () {
if (!userSelectStart) {
_root[selectType.toLowerCase() + 'No'] = (_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1;
iconMove(-1);
}
};
iconSelect.buttonR.onRelease = function () {
if (!userSelectStart) {
_root[selectType.toLowerCase() + 'No'] = (_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1;
iconMove(1);
}
};
onEnterFrame = function () {
if (_root.titlePosx < 0) {
this._alpha = 100;
} else {
this._alpha = 0;
}
if (userSelect) {
if (userSelectStart) {
this[selectType + 'Icon']._rotation -= (this[selectType + 'Icon']._rotation + 45) / 5;
this[selectType + 'Icon']._x -= (this[selectType + 'Icon']._x - 112.1320343559642) / 5;
this[selectType + 'Icon']._y -= (this[selectType + 'Icon']._y - 112.1320343559643) / 5;
this[selectType + 'Icon']._xscale -= (this[selectType + 'Icon']._xscale - 150) / 5;
this[selectType + 'Icon']._yscale = this[selectType + 'Icon']._xscale;
if (Math.round(this[selectType + 'Icon']._y) == 112) {
attachMovie(selectType + 'Icon', selectType + 'IconL', 3);
attachMovie(selectType + 'Icon', selectType + 'IconR', 4);
iconReset();
userSelectStart = false;
}
} else {
this[selectType + 'Icon']._rotation -= (this[selectType + 'Icon']._rotation + 45) / 5;
this[selectType + 'IconL']._rotation -= this[selectType + 'IconL']._rotation / 5;
this[selectType + 'IconR']._rotation -= (this[selectType + 'IconR']._rotation + 90) / 5;
this[selectType + 'Icon']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._x = -100 - 300 * Math.sin(Math.PI * this[selectType + 'IconR']._rotation / 180);
this[selectType + 'Icon']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'Icon']._rotation / 180);
this[selectType + 'IconL']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconL']._rotation / 180);
this[selectType + 'IconR']._y = -100 + 300 * Math.cos(Math.PI * this[selectType + 'IconR']._rotation / 180);
}
}
if (selectType == '') {
this.iconSelect._y -= iconSelect._y / 5;
} else {
this.iconSelect._y -= (iconSelect._y - 100) / 5;
}
this.iconSelect._x = this.iconSelect._y;
if (selectType == 'Bullet') {
this.BulletStatDisplay._y -= this.BulletStatDisplay._y / 5;
this.AbilityStatDisplay._y -= (this.AbilityStatDisplay._y + 200) / 5;
} else {
if (selectType == 'Ability') {
this.AbilityStatDisplay._y -= this.AbilityStatDisplay._y / 5;
this.BulletStatDisplay._y -= (this.BulletStatDisplay._y + 175) / 5;
} else {
this.BulletStatDisplay._y -= (this.BulletStatDisplay._y + 175) / 5;
this.AbilityStatDisplay._y -= (this.AbilityStatDisplay._y + 200) / 5;
}
}
if (selectType != 'Bullet') {
this.BulletIcon._rotation -= this.BulletIcon._rotation / 5;
this.BulletIcon._x -= (this.BulletIcon._x - 115) / 5;
this.BulletIcon._y -= (this.BulletIcon._y - 345) / 5;
this.BulletIcon._xscale -= (this.BulletIcon._xscale - 100) / 5;
this.BulletIcon._yscale = this.BulletIcon._xscale;
}
if (selectType != 'Ability') {
this.AbilityIcon._rotation -= this.AbilityIcon._rotation / 5;
this.AbilityIcon._x -= (this.AbilityIcon._x - 325) / 5;
this.AbilityIcon._y -= (this.AbilityIcon._y - 345) / 5;
this.AbilityIcon._xscale -= (this.AbilityIcon._xscale - 100) / 5;
this.AbilityIcon._yscale = this.AbilityIcon._xscale;
}
};
}
}
movieClip 202 {
}
movieClip 203 {
}
movieClip 208 {
frame 1 {
savedInfo = function () {
if (_root.savedProgress) {
var v3 = _root.savedProgress.split('');
savedLevelTitle.gotoAndStop((ord(v3[3]) - 97) * 4 + v3[4]);
levelCode = v3[3] + '' + v3[4];
playerScore.text = _root.savedScore;
playerScore.setTextFormat(_root.txtFormat);
playerScore.embedFonts = true;
if (v3[3] == 'm') {
this._parent.gameContinue._x = 2000;
worldLevelNo.text = '';
savedLevel.attachMovie('gameCompleted', 'gameCompleted', 2);
} else {
worldLevelNo.text = 'World ' + (ord(v3[3]) < 105 ? ord(v3[3]) - 96 : chr(ord(v3[3]) - 40)) + '-' + v3[4];
worldLevelNo.setTextFormat(_root.txtFormat);
worldLevelNo.embedFonts = true;
var v4 = _root['Level_' + levelCode].split('');
_root.levelStyle = v4[0];
savedLevel.attachMovie('BackgroundSaved', 'Background', 1);
savedLevel.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
savedLevel.createEmptyMovieClip('Level', 2);
savedLevel.Level.attachMovie('Plat', 'Plat1', 2);
savedLevel.Level.Plat1._x = 24;
savedLevel.Level.Plat1._y = 192;
savedLevel.Level.attachMovie('Plat', 'Plat2', 3);
savedLevel.Level.Plat2._x = savedLevel.Level.Plat1._x + 288;
savedLevel.Level.Plat2._y = 144;
savedLevel.Level.attachMovie('BulletIcon', 'BulletIcon', 4);
savedLevel.Level.BulletIcon._y = savedLevel.Level.Plat1._y - 39;
savedLevel.Level.BulletIcon._x = savedLevel.Level.Plat1._x + savedLevel.Level.Plat1._width / 2;
savedLevel.Level.BulletIcon.gotoAndStop(v3[0] * 10 + v3[1] * 1);
savedLevel.Level.attachMovie('AbilityIcon', 'AbilityIcon', 5);
savedLevel.Level.AbilityIcon._y = savedLevel.Level.Plat2._y - 39;
savedLevel.Level.AbilityIcon._x = savedLevel.Level.Plat2._x + savedLevel.Level.Plat1._width / 2;
savedLevel.Level.AbilityIcon.gotoAndStop(v3[2]);
savedLevel._yscale = 66.66666666666667;
savedLevel._xscale = 66.66666666666667;
if (_root.levelStyle == 3) {
c = new Color(savedLevel.Level);
c.setTint(0, 35, 255, 35);
}
}
} else {
this._alpha = 0;
this._parent.gameContinue._x = 2000;
}
};
savedInfo();
}
}
button 209 {
on (release) {
if (_root.levelEdit) {
if (!this.CharAbSel.userSelect) {
_root.levelSaved = true;
_root.levelNo = 'Custom';
_root.titleUnload('Creator');
}
} else {
if (!this.CharAbSel.userSelect) {
_root.levelCreate = true;
_root.levelNo = 'Custom';
_root.StageNo = 0;
_root.titleUnload('Game');
}
}
}
}
button 211 {
on (release) {
if (!this.CharAbSel.userSelect) {
_root.pasteData = false;
_root.savedLevelData = false;
_root.Level_Custom = _root.Level_customLevel[0];
_root.customLevelNames[0] = '';
_root.levelCreateBase(_root.selectMode.sLevelData.savedLevel, _root.Level_customLevel[0], 'levelDisplay', '', 2, 1.5);
_root.selectMode.sLevelData.savedLevel.attachMovie('BackgroundSaved', 'Background', 1);
_root.selectMode.sLevelData.savedLevel.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.selectMode.sLevelData.savedLevel.Background._xscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.Background._yscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.levelDisplay._y += 5;
_root.selectMode.sLevelData.savedLevel.levelDisplay._x -= 86;
_root.selectMode.sLevelData.sLevelName.text = 'NEW LEVEL';
_root.selectMode.sLevelData.levelCodeButton._y = -331;
_root.selectMode.sLevelData.savedLevel.copiedCode.removeMovieClip();
this.savedLevels.maskScale = 0;
_root.levelEdit = true;
}
}
}
button 213 {
on (release) {
if (!this.CharAbSel.userSelect) {
_root.pasteData = false;
_root.savedLevelData = false;
_root.Level_Custom = '';
this.savedLevels.maskScale = 100;
this.pasteLevel.maskScale = 0;
_root.levelEdit = true;
}
}
}
button 219 {
on (release) {
_root.selectMode.sLevelData.savedLevel.attachMovie('copiedCode', 'copiedCode', 10);
System.setClipboard(_root.customLevelNames[0] + ': ' + _root.Level_Custom);
}
}
movieClip 220 {
frame 1 {
sLevelName.setTextFormat(_root.txtFormat);
sLevelName.embedFonts = true;
}
}
button 222 {
on (release) {
_root.cheatBombs = !_root.cheatBombs;
}
}
button 224 {
on (release) {
_root.cheatAbility = !_root.cheatAbility;
}
}
movieClip 232 {
frame 1 {
stop();
if (!_root.BulletUnlock[this._parent._currentframe + 1]) {
this._alpha = 50;
c = new Color(this);
c.setTint(0, 0, 0, 100);
} else {
this._alpha = 100;
c = new Color(this);
c.setTint(0, 0, 0, 0);
}
onEnterFrame = function () {
if (this._parent._currentframe != this._currentframe) {
this.gotoAndStop(this._parent._currentframe);
if (!_root.BulletUnlock[this._parent._currentframe + 1]) {
this._alpha = 50;
c = new Color(this);
c.setTint(0, 0, 0, 100);
} else {
this._alpha = 100;
c = new Color(this);
c.setTint(0, 0, 0, 0);
}
}
};
}
}
movieClip 234 {
frame 1 {
stop();
if (!_root.AbilityUnlock[this._parent._currentframe + 1]) {
this._alpha = 50;
c = new Color(this);
c.setTint(0, 0, 0, 100);
} else {
this._alpha = 100;
c = new Color(this);
c.setTint(0, 0, 0, 0);
}
onEnterFrame = function () {
if (this._parent._currentframe != this._currentframe) {
this.gotoAndStop(this._parent._currentframe);
if (!_root.AbilityUnlock[this._parent._currentframe + 1]) {
this._alpha = 50;
c = new Color(this);
c.setTint(0, 0, 0, 100);
} else {
this._alpha = 100;
c = new Color(this);
c.setTint(0, 0, 0, 0);
}
}
};
}
}
movieClip 241 {
frame 1 {
stop();
if (!_root.BulletUnlock[this._parent._currentframe + 8]) {
this._alpha = 0;
} else {
this._alpha = 100;
}
onEnterFrame = function () {
if (this._parent._currentframe != this._currentframe) {
this.gotoAndStop(this._parent._currentframe);
if (!_root.BulletUnlock[this._parent._currentframe + 8]) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
};
}
}
movieClip 250 {
}
movieClip 251 {
instance worldBox of movieClip 250 {
onClipEvent (load) {
stop();
boxFlip = false;
turnSpeed = 0;
}
onClipEvent (enterFrame) {
if (boxFlip) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
boxFlip = false;
this.gotoAndStop(int(_root.StageNo / 4) + 1);
this.worldChar.gotoAndStop(9);
this.worldChar2.gotoAndStop(9);
this.worldItem.gotoAndStop(9);
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
}
}
}
button 253 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.createEmptyMovieClip('deleteData', 91);
_root.deleteData._y = 1000;
_root.deleteData.attachMovie('SMB2MessageDelete', 'SMB2MessageDelete', 1);
_root.SMB2MessageUp = true;
}
}
}
button 255 {
on (release) {
_root.titlePosx = 750;
_root.titlePosy = 0;
}
}
button 257 {
on (release) {
_root.titlePosy = -2000;
_root.titlePosx = 750;
}
}
button 259 {
on (release) {
_root.titlePosx = 750;
_root.titlePosy = 1000;
this.gameMedals.hoverMedal = 1;
this.gameMedals.medalStats.statReset();
}
}
button 261 {
on (release) {
_root.titlePosx = 750;
_root.titlePosy = -1000;
}
}
button 263 {
on (release) {
this.gameStats.gotoAndStop(1);
_root.titlePosx = -750;
_root.titlePosy = -2000;
}
}
button 265 {
on (release) {
this.gameCredits.gotoAndStop(1);
}
}
button 267 {
on (release) {
this.gameCredits.gotoAndStop(3);
}
}
button 269 {
on (release) {
this.gameCredits.gotoAndStop(7);
}
}
button 271 {
on (release) {
this.gameCredits.gotoAndStop(9);
}
}
button 273 {
on (release) {
if (!this.CharAbSel.userSelect) {
_root.Level_Custom = '';
this.savedLevels.maskScale = 0;
this.pLevelData.pastedLevel.text = '';
this.pLevelData.invalidMessage.invalidLevel.removeMovieClip();
_root.pasteData = true;
_root.savedLevelData = false;
}
}
}
button 275 {
on (release) {
this.gameStats.gotoAndStop(1);
}
}
button 277 {
on (release) {
this.gameStats.gotoAndStop(2);
}
}
button 278 {
on (release) {
this.gameStats.gotoAndStop(3);
}
}
movieClip 280 {
}
button 284 {
on (release) {
nameSplit = this.pastedLevel.text.indexOf(':');
pasteName = this.pastedLevel.text.slice(0, nameSplit);
pasteLevel = this.pastedLevel.text.slice(nameSplit + 2, this.pastedLevel.text.length);
invalidMessage.invalidLevel.removeMovieClip();
if (_root.validLevelNameCheck(pasteName)) {
if (_root.validLevelCheck(pasteLevel)) {
if (_root.validLevelOverlapCheck(pasteLevel)) {
_root.pasteData = false;
_root.Level_Custom = pasteLevel;
_root.customLevelNames[0] = pasteName;
_root.selectMode.sLevelData.sLevelName.text = _root.customLevelNames[0].toUpperCase();
_root.selectMode.sLevelData.levelCodeButton._y = -331;
_root.selectMode.sLevelData.savedLevel.copiedCode.removeMovieClip();
this.savedLevels.maskScale = 0;
_root.levelCreateBase(_root.selectMode.sLevelData.savedLevel, _root.Level_Custom, 'levelDisplay', '', 2, 1.5);
_root.selectMode.sLevelData.savedLevel.attachMovie('BackgroundSaved', 'Background', 1);
_root.selectMode.sLevelData.savedLevel.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.selectMode.sLevelData.savedLevel.Background._xscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.Background._yscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.levelDisplay._y += 5;
_root.selectMode.sLevelData.savedLevel.levelDisplay._x -= 86;
} else {
invalidMessage.attachMovie('invalidLevel', 'invalidLevel', 10);
invalidMessage.invalidLevel.gotoAndStop(3);
}
} else {
invalidMessage.attachMovie('invalidLevel', 'invalidLevel', 10);
invalidMessage.invalidLevel.gotoAndStop(2);
}
} else {
invalidMessage.attachMovie('invalidLevel', 'invalidLevel', 10);
invalidMessage.invalidLevel.gotoAndStop(1);
}
}
}
movieClip 286 {
frame 1 {
pastedLevel.setTextFormat(_root.txtFormat2);
pastedLevel.embedFonts = true;
}
}
button 288 {
on (release) {
if (_root.Background.musicPlayerChange._currentframe == 1) {
_root.soundCheckPlay = true;
_root.Background.musicPlayerChange.play();
}
}
}
button 290 {
on (release) {
if (_root.Background.musicPlayerChange._currentframe == 1) {
_root.soundCheckPlay = false;
_root.Background.musicPlayerChange.play();
}
}
}
button 292 {
on (release) {
if (_root.Background.musicPlayerChange._currentframe == 1) {
if (_root.songNo != 14) {
} else {
_root.songNo = 0;
}
_root.songNo++;
_root.soundCheckPlay = true;
_root.Background.musicPlayerChange.play();
}
}
}
button 294 {
on (release) {
if (_root.Background.musicPlayerChange._currentframe == 1) {
if (_root.songNo != 0) {
} else {
_root.songNo = 14;
}
_root.songNo--;
_root.soundCheckPlay = true;
_root.Background.musicPlayerChange.play();
}
}
}
movieClip 299 {
}
movieClip 306 {
}
movieClip 307 {
}
movieClip 308 {
frame 1 {
stop();
var icon;
icon = null;
}
frame 7 {
var file;
if (!icon && file && iconContainer) {
icon = file.attachIcon(iconContainer);
}
}
}
movieClip 309 {
}
movieClip 327 {
frame 1 {
stop();
}
}
movieClip 331 {
frame 1 {
stop();
mouseChildren = false;
}
}
movieClip 336 {
frame 1 {
function setListItems(listItems) {
if (!listItems) {
_listItems = [];
} else {
_listItems = listItems.concat();
}
var v1 = 0;
while (v1 < _listItems.length) {
if (typeof _listItems[v1] == 'string') {
_listItems[v1] = {'label': _listItems[v1], 'data': _listItems[v1]};
}
++v1;
}
setSelectedIndex(0);
}
function setSelectedItem(data) {
var v1 = 0;
while (v1 < _listItems.length) {
if (_listItems[v1].data == data) {
setSelectedIndex(v1);
return undefined;
}
++v1;
}
}
function setSelectedIndex(i) {
if (i < _listItems.length) {
_selectedItem = _listItems[i];
if (currentItem && currentItem.label) {
currentItem.label.text = _selectedItem.label;
}
}
}
function hideList() {
_listDown = false;
gotoAndStop('sortUP');
}
function _onListClick() {
_listDown = !_listDown;
if (_listDown) {
gotoAndStop('sortDOWN');
} else {
gotoAndStop('sortUP');
}
}
stop();
if (listButton) {
listButton.onRelease = _onListClick;
}
if (currentItem) {
currentItem.onRelease = _onListClick;
if (currentItem.label) {
if (_selectedItem) {
currentItem.label.text = _selectedItem.label;
} else {
currentItem.label.text = '';
}
}
}
var _listItems;
var _listDown;
var _selectedItem;
if (!_listItems) {
_listItems = [];
}
}
frame 10 {
function _onItemClick() {
var v3 = MovieClip(this);
if (v3.item) {
setSelectedItem(v3.item.data);
}
if (v3 && _parent && _parent instanceof MovieClip && (MovieClip(_parent))._onListChange) {
(MovieClip(_parent))._onListChange(v3.item);
}
}
var i = 0;
var itemClip = item0;
while (itemClip) {
if (i < _listItems.length) {
itemClip.item = _listItems[i];
itemClip.label.text = _listItems[i].label;
itemClip.onRelease = _onItemClick;
} else {
itemClip._visible = false;
}
++i;
itemClip = this['item' + i];
}
}
}
movieClip 339 {
}
movieClip 340 {
}
movieClip 341 {
}
// unknown tag 88 length 296
movieClip 344 Newgrounds API Font {
}
movieClip 348 {
}
movieClip 357 SaveBrowser {
frame 1 {
function loadFiles() {
_saveGroup = com.newgrounds.API.getSaveGroup(saveGroupName);
if (!_saveGroup) {
if (!(com.newgrounds.API.__get__saveGroups())[0]) {
com.newgrounds.Logger.logError('No save group created for this movie. You can create save groups on your API Settings page at http://www.newgrounds.com/account/flashapi');
gotoAndPlay('error');
return undefined;
} else {
_saveGroup = (com.newgrounds.API.__get__saveGroups())[0];
this.saveGroupName = _saveGroup.name;
com.newgrounds.Logger.logWarning('No save group name set in the Save Browser component. Defaulting to save group "' + _saveGroup.__get__name() + '".');
}
}
if (_customQuery) {
_currentQuery = _customQuery.clone();
} else {
_currentQuery = com.newgrounds.API.createSaveQuery(saveGroupName);
}
if (!_currentQuery) {
gotoAndPlay('error');
return undefined;
}
_currentQuery.__set__resultsPerPage(_numIcons);
_currentQuery.__set__page(_page);
_currentQuery.addEventListener(com.newgrounds.APIEvent.QUERY_COMPLETE, _onQueryComplete);
if (sortField) {
_currentQuery.sortOn(sortField, sortDescending);
}
if (pageText) {
pageText.text = 'Page ' + _currentQuery.__get__page();
}
if (orderText) {
orderText.text = 'Sorted by ' + _sortLabel + ', ' + (sortDescending ? 'Descending' : 'Ascending');
}
if (orderButton) {
if (sortDescending) {
orderButton.gotoAndStop('sortDESC');
} else {
orderButton.gotoAndStop('sortASC');
}
}
_loading = true;
gotoAndStop('loading');
_clearFiles();
_currentQuery.execute();
}
function setQuery(query) {
_customQuery = query;
}
function _onQueryComplete(event) {
_loading = false;
if (listBox) {
listBox.mouseChildren = true;
}
if (event.__get__success()) {
_currentQuery.removeEventListener(com.newgrounds.APIEvent.QUERY_COMPLETE, _onQueryComplete);
if ((_currentQuery.__get__files()).length) {
gotoAndStop('files');
} else {
gotoAndPlay('noResults');
}
} else {
gotoAndPlay('error');
}
}
function _onPageClick() {
var v2 = this;
if (_saveGroup && !_loading) {
if (v2 == prevButton) {
--_page;
} else {
++_page;
}
if (_page < 1) {
_page = 1;
}
loadFiles();
}
}
function _onListChange(selection) {
if (_saveGroup) {
sortField = selection.data;
_sortLabel = selection.label;
loadFiles();
}
}
function _onOrderClick() {
sortDescending = !sortDescending;
loadFiles();
}
function _clearFiles() {
if (!iconList) {
return undefined;
}
var v2 = 0;
while (v2 < _numIcons) {
var v1 = iconList['icon' + v2];
if (v1) {
v1.gotoAndStop('empty');
v1.file = null;
v1.onRelease = null;
v1.onRollOver = null;
v1.onRollOut = null;
v1.enabled = false;
}
++v2;
}
}
var title;
var saveGroupName;
var sortField;
var customSortField;
var sortDescending;
if (!title) {
title = 'Select a file:';
}
if (customSortField) {
sortField = customSortField;
} else {
if (!sortField) {
sortField = com.newgrounds.SaveQuery.CREATED_ON;
}
}
var _sortLabel = 'Date';
var _saveGroup;
var _currentQuery;
var _customQuery;
var _loading;
var _numIcons = 12;
var _page = 1;
var _initialized;
_x = Number(_x);
_y = Number(_y);
if (titleText) {
titleText.text = title;
com.newgrounds.API.setFont(titleText, 'Pakenham');
}
if (prevButton) {
prevButton.onRelease = _onPageClick;
}
if (nextButton) {
nextButton.onRelease = _onPageClick;
}
if (orderButton) {
orderButton.onRelease = _onOrderClick;
}
gotoAndPlay('error');
loadFiles();
}
frame 2 {
if (listBox) {
listBox.hideList();
var items = [{'label': 'Date', 'data': com.newgrounds.SaveQuery.CREATED_ON}, {'label': 'Name', 'data': com.newgrounds.SaveQuery.FILE_NAME}, {'label': 'Views', 'data': com.newgrounds.SaveQuery.FILE_VIEWS}];
var i;
i = 0;
while (i < _saveGroup.keys.length) {
items.push(_saveGroup.keys[i].name);
++i;
}
i = 0;
while (i < _saveGroup.ratings.length) {
items.push(_saveGroup.ratings[i].name);
++i;
}
listBox.setListItems(items);
listBox.setSelectedItem(sortField);
}
}
frame 10 {
function _onFileOver() {
var v6 = MovieClip(this);
if (!_loading && v6) {
var v2 = com.newgrounds.SaveFile(v6.file);
v6.gotoAndStop('fileHover');
if (!_loading && infoBox && _saveGroup) {
infoBox._visible = true;
if (infoBox.filenameText) {
infoBox.filenameText.text = v2.name;
}
var v3 = 'by ' + v2.__get__authorName() + '\n';
v3 += v2.__get__description() + '\n';
var v7 = 0;
for (var v4 in v2.__get__keys()) {
v3 += v4 + ': ' + (v2.__get__keys())[v4] + '\n';
}
for (var v5 in v2.__get__ratings()) {
v3 += v5 + ': ' + (v2.__get__ratings())[v5] + '\n';
}
if (infoBox.infoText) {
infoBox.infoText.text = v3;
}
}
}
}
function _onFileOut() {
var v2 = MovieClip(this);
if (!_loading && v2) {
v2.gotoAndStop('file');
}
if (infoBox) {
infoBox._visible = false;
}
}
function _onFileClick() {
var v2 = MovieClip(this);
if (!_loading && v2 && v2.file) {
_loading = true;
v2.gotoAndStop('file');
v2.file.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, _onFileLoaded);
gotoAndStop('loading');
v2.file.load();
}
}
function _onFileLoaded(event) {
_loading = false;
gotoAndStop('files');
}
if (infoBox) {
infoBox.startDrag(true);
infoBox.enabled = false;
infoBox._visible = false;
}
if (iconList && _currentQuery) {
i = 0;
while (i < _numIcons) {
var iconClip = iconList['icon' + i];
var file = com.newgrounds.SaveFile(_currentQuery.files[i]);
if (iconClip && file && !iconClip.file) {
iconClip.file = file;
iconClip.gotoAndStop('file');
iconClip.onRollOver = _onFileOver;
iconClip.onRollOut = _onFileOut;
iconClip.onRelease = _onFileClick;
iconClip.enabled = true;
}
++i;
}
}
}
frame 20 {
function _onReloadClick() {
loadFiles();
}
if (reloadButton) {
reloadButton.onRelease = _onReloadClick;
}
}
frame 28 {
stop();
}
frame 29 {
if (reloadButton) {
reloadButton.onRelease = _onReloadClick;
}
}
frame 37 {
stop();
}
}
movieClip 358 {
instance savedLevelBrowser of movieClip 357 SaveBrowser {
onClipEvent (construct) {
saveGroupName = 'Levels';
title = 'Select a level:';
sortDescending = true;
sortField = 'createdOn';
customSortField = '';
}
}
}
button 360 {
on (release) {
if (!this.CharAbSel.userSelect) {
_root.Level_Custom = '';
this.savedLevels.maskScale = 0;
_root.pasteData = false;
_root.savedLevelData = true;
_root.levelEdit = false;
this.sNewgroundsData.savedLevelBrowser._page = 1;
this.sNewgroundsData.savedLevelBrowser.loadFiles();
}
}
}
movieClip 362 {
}
movieClip 363 {
}
movieClip 364 {
frame 1 {
this.SLData.createEmptyMovieClip('levelNames', 1);
i = 0;
while (i < 26) {
this.SLData.levelNames.attachMovie('savedDataNames', i, i);
this.SLData.levelNames[i]._x = -220;
this.SLData.levelNames[i]._y = -142 + 32 * i + 36 * int(i / 9) + 18 * int(i / 18);
this.SLData.levelNames[i].fileNo = chr(65 + i);
this.SLData.levelNames[i].levelName = _root.customLevelNames[i + 1].toUpperCase();
if (_root.Level_customLevel[i + 1].length <= 1) {
this.SLData.levelNames[i]._alpha = 40;
} else {
this.SLData.levelNames[i].onRelease = function () {
_root.Level_Custom = _root.Level_customLevel[this._name / 1 + 1];
_root.customLevelNames[0] = _root.customLevelNames[this._name / 1 + 1];
_root.levelCreateBase(_root.selectMode.sLevelData.savedLevel, _root.Level_customLevel[this._name / 1 + 1], 'levelDisplay', '', 2, 1.5);
_root.selectMode.sLevelData.savedLevel.attachMovie('BackgroundSaved', 'Background', 1);
_root.selectMode.sLevelData.savedLevel.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.selectMode.sLevelData.savedLevel.Background._xscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.Background._yscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.levelDisplay._y += 5;
_root.selectMode.sLevelData.savedLevel.levelDisplay._x -= 86;
_root.selectMode.sLevelData.sLevelName.text = _root.customLevelNames[0].toUpperCase();
_root.selectMode.sLevelData.savedLevel.copiedCode.removeMovieClip();
_root.selectMode.sLevelData.levelCodeButton._y = 331;
maskScale = 0;
_root.levelEdit = true;
};
}
++i;
}
maskScale = 0;
filePart = 0;
this.SLData.attachMovie('SMASArrow', 'SLUp', 2);
this.SLData.attachMovie('SMASArrow', 'SLDown', 3);
SLData.SLUp._y = -150;
SLData.SLDown._y = 150;
SLData.SLUp._rotation = -90;
SLData.SLDown._rotation = -90;
SLData.SLDown._xscale = -SLData.SLDown._yscale;
this.SLData.SLUp.onRelease = function () {
if (filePart) {
--filePart;
}
};
this.SLData.SLDown.onRelease = function () {
if (filePart < 2) {
++filePart;
}
};
onEnterFrame = function () {
if (int(SLmask._yscale) != maskScale) {
SLmask._yscale += (maskScale - SLmask._yscale) / 5;
} else {
if (!maskScale) {
SLmask._yscale = 0;
filePart = 0;
} else {}
}
SLData.levelNames._y += (-filePart * 324 - SLData.levelNames._y) / 5;
};
}
instance SLData of movieClip 363 {
onClipEvent (load) {
this._alpha = 95;
}
}
}
button 366 {
on (release) {
_root.publishLevel();
}
}
movieClip 371 {
}
movieClip 376 {
}
movieClip 391 {
}
movieClip 393 {
}
movieClip 395 {
}
movieClip 397 {
}
movieClip 399 {
}
movieClip 400 VoteBar {
frame 1 {
function start() {
if (saveFile) {
_rating = (saveFile.__get__group()).getRating(ratingName);
if (!ratingName) {
if (saveFile.__get__group() && ((saveFile.__get__group()).__get__ratings()).length) {
_rating = ((saveFile.__get__group()).__get__ratings())[0];
ratingName = _rating.name;
com.newgrounds.Logger.logWarning('No rating name set in Vote Bar. Defaulting to "' + ratingName + '".');
} else {
com.newgrounds.Logger.logError('The save group "' + saveFile.__get__group() + '" has no ratings to vote on. You can create ratings on you API Settings page at http://www.newgrounds.com/account/flashapi');
return undefined;
}
}
gotoAndStop('ballot');
}
}
function _onNewFile(event) {
if (event.__get__success()) {
saveFile = event.data;
start();
}
}
var title;
var fileMode;
var ratingName;
var saveFile;
var _numButtons = 6;
var _rating;
_x = Number(_x);
_y = Number(_y);
if (!title) {
title = 'Submit your vote!';
}
if (!fileMode) {
fileMode = 'Use Current File';
}
if (fileMode == 'Use Current File') {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, _onNewFile);
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_SAVED, _onNewFile);
if (com.newgrounds.SaveFile.__get__currentFile()) {
saveFile = com.newgrounds.SaveFile.currentFile;
start();
}
}
gotoAndStop('hidden');
}
frame 2 {
function _onVoteClick() {
var v3 = this;
if (!voteMenu) {
return undefined;
}
var v2 = 0;
while (v2 < _numButtons) {
if (v3 == voteMenu['voteButton' + v2]) {
break;
}
++v2;
}
if (v2 < _numButtons) {
var v4 = _rating.minimum + v2 * (_rating.maximum - _rating.minimum) / (_numButtons - 1);
saveFile.sendVote(ratingName, v4);
gotoAndStop('voting');
saveFile.addEventListener(com.newgrounds.APIEvent.VOTE_COMPLETE, _onVoteComplete);
}
}
function _onVoteComplete(event) {
if (event.__get__success()) {
gotoAndPlay('voteComplete');
} else {
gotoAndStop('hidden');
}
}
if (!saveFile) {
gotoAndStop('hidden');
}
if (titleText) {
titleText.text = title;
com.newgrounds.API.setFont(titleText, 'Pakenham');
}
if (voteMenu) {
var i = 0;
while (i < _numButtons) {
var voteButton = voteMenu['voteButton' + i];
if (voteButton) {
voteButton.onRelease = _onVoteClick;
}
++i;
}
}
}
frame 59 {
stop();
}
}
button 402 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.camMovement = !_root.camMovement;
_root.saveOptions();
}
}
}
button 404 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.abilityPity = !_root.abilityPity;
_root.saveOptions();
}
}
}
button 406 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.autoSave = !_root.autoSave;
_root.saveOptions();
}
}
}
button 408 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.gameTutorial = !_root.gameTutorial;
_root.saveOptions();
}
}
}
button 410 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.hideMouse = !_root.hideMouse;
_root.saveOptions();
}
}
}
button 412 {
on (release) {
if (!_root.SMB2MessageUp) {
_root.FPSCounter = !_root.FPSCounter;
_root.saveOptions();
}
}
}
button 414 {
on (release) {
_root.cheatBanzai = !_root.cheatBanzai;
}
}
movieClip 416 {
frame 1 {
thisY = 1;
onEnterFrame = function () {
thisY = int((_root.StageNo - 1) / 4) + 1;
};
}
}
button 418 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 1;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 420 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 5;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 422 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 9;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 424 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 13;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 426 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 17;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 428 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 21;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 430 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 25;
this.worldSel.worldBox.boxFlip = true;
}
}
}
button 432 {
on (release) {
if (!this.worldSel.worldBox.boxFlip) {
_root.StageNo = 29;
this.worldSel.worldBox.boxFlip = true;
}
}
}
movieClip 433 selectMode {
frame 1 {
savedLevelsBut._x = -65536;
publishLevel._x = -65536;
onEnterFrame = function () {
i = 1;
while (i <= 8) {
this['worldSel' + i]._x = 2755 - 2000 * _root.AbilityUnlock[i];
if (!this.CharAbSel.userSelect) {
this['worldSel' + i]._y += (-1010 + 35 * i - this['worldSel' + i]._y) / 5;
} else {
this['worldSel' + i]._y += (-1350 + 35 * i - this['worldSel' + i]._y) / 5;
}
++i;
}
this.worldSel0._y = this['worldSel' + this.worldSel0.thisY]._y + 10;
if (_root.Level_Custom) {
butLetsGo._y += (-660 - butLetsGo._y) / 5;
sLevelData._y += (-948 - sLevelData._y) / 5;
} else {
butLetsGo._y += (-410 - butLetsGo._y) / 5;
sLevelData._y += (-1359 - sLevelData._y) / 5;
}
if (_root.Level_Custom && _root.customLevelNames[0] && _root.levelEdit) {
publishLevel._y += (-950 - publishLevel._y) / 5;
} else {
publishLevel._y += (-1200 - publishLevel._y) / 5;
}
if (_root.pasteData) {
pLevelData._y += (-948 - pLevelData._y) / 5;
} else {
pLevelData._y += (-1359 - pLevelData._y) / 5;
}
if (_root.savedLevelData) {
sNewgroundsData._y += (-948 - sNewgroundsData._y) / 5;
} else {
sNewgroundsData._y += (-1359 - sNewgroundsData._y) / 5;
}
if (butLetsGo._y < -510) {
butLetsGo._alpha = 100;
} else {
butLetsGo._alpha = 0;
}
if (!this.CharAbSel.userSelect) {
butLetsGo2._y += (-660 - butLetsGo2._y) / 5;
worldSel._y += (-1000 - worldSel._y) / 5;
} else {
butLetsGo2._y += (-410 - butLetsGo2._y) / 5;
worldSel._y += (-1500 - worldSel._y) / 5;
}
if (butLetsGo2._y < -510) {
butLetsGo2._alpha = 100;
} else {
butLetsGo2._alpha = 0;
}
if (_root.soundCheckPlay == false) {
musicPlayBut._x = -745;
musicPlayBut._alpha = 100;
musicStopBut._x = -1545;
musicStopBut._alpha = 0;
} else {
musicStopBut._x = -745;
musicStopBut._alpha = 100;
musicPlayBut._x = -1545;
musicPlayBut._alpha = 0;
}
if (_root.soundCheckPlay) {
musicNext._y += (1175 - musicNext._y) / 5;
musicPrev._y += (1225 - musicPrev._y) / 5;
} else {
musicNext._y += (1500 - musicNext._y) / 5;
musicPrev._y += (1550 - musicPrev._y) / 5;
}
if (musicNext._y <= 1500) {
musicNext._alpha = 100;
musicPrev._alpha = 100;
} else {
musicNext._alpha = 0;
musicPrev._alpha = 0;
}
butLetsGo._x = 2005 - butLetsGo._alpha * 20;
butLetsGo2._x = 2755 - butLetsGo2._alpha * 20;
musicNext._x = 1255 - musicNext._alpha * 20;
musicPrev._x = 1255 - musicPrev._alpha * 20;
};
}
instance of movieClip 400 VoteBar {
onClipEvent (construct) {
title = 'Submit your vote!';
ratingName = 'Score';
fileMode = 'Manually Set File';
}
}
}
movieClip 434 BrickPart {
frame 1 {
stop();
rot = random(40) - 20;
fallDir = (_root.levelStyle == 3) ? -0.5 : 1;
ySpeed = fallDir * (random(20) - 15) / 5;
xSpeed = (random(20) - 10) / 2;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos - 3.333333333333334) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
gridPosY = 0;
gridPosX = 0;
floorType = '';
floorName = '';
brickBounce = false;
brickStop = false;
gotoAndStop(int(_root.levelStyle / 1 + 1));
onEnterFrame = function () {
if (!_root.gamePause) {
this._x += xSpeed / 3 * (_root.slowDown + 1);
this._y += fallDir * ySpeed / 0.8 * (_root.slowDown + 1);
if (!brickStop) {
this._rotation += rot;
ySpeed += !_root.gamePause / (_root.slowDown + 1);
if (brickBounce || (gridPosY != int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16) || gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16))) {
if (ySpeed > 0 && (platHit(0, fallDir * 2) || brickHit(0, fallDir * 2))) {
if (platHit((xSpeed / Math.abs(xSpeed)) * 2, 0) && !platHit((-xSpeed / Math.abs(xSpeed)) * 2, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0) && !brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0)) {
this._x -= xSpeed / 3 * (_root.slowDown + 1);
xSpeed = -xSpeed;
} else {
if (brickBounce) {
brickStop = true;
ySpeed = 0;
} else {
this._y -= fallDir * ySpeed * 2 / 3 * (_root.slowDown + 1);
ySpeed = -ySpeed / 3;
brickBounce = true;
}
}
}
if (gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16)) {
if (platHit((xSpeed / Math.abs(xSpeed)) * 2, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0)) {
xSpeed = -xSpeed;
}
}
gridPosY = int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16);
gridPosX = int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16);
}
} else {
if (xSpeed) {
xSpeed = Math.abs(xSpeed) < 1 ? 0 : xSpeed / 2;
if (!platHit(0, fallDir * 2) && !brickHit(0, fallDir * 2)) {
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
} else {
if (floorType == '') {
if (platHit(0, fallDir * 2)) {
floorType = 'Plat';
for (var v3 in _root.Level.Plat) {
if (_root.Level.Plat[v3].hitTest(thisX(0), thisY(fallDir * 2), true)) {
floorName = v3;
break;
}
}
} else {
if (brickHit(0, fallDir * 2)) {
floorType = 'Brick';
for (var v3 in _root.Level.Brick) {
if (_root.Level.Brick[v3].hitTest(thisX(0), thisY(fallDir * 2), true)) {
floorName = v3;
break;
}
}
}
}
} else {
if (!_root.Level[floorType][floorName].hitTest(thisX(0), thisY(fallDir * 2), true)) {
floorType = '';
floorName = '';
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
}
}
}
}
if (this._y + this._parent._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -15) {
this.removeMovieClip();
}
};
}
}
movieClip 436 {
}
movieClip 438 {
}
movieClip 441 {
}
movieClip 445 {
}
movieClip 448 {
}
movieClip 451 {
}
movieClip 454 {
}
movieClip 455 {
}
movieClip 457 {
}
movieClip 459 {
}
movieClip 461 {
}
movieClip 462 MedalPopup {
frame 1 {
function onMedalUnlocked(event) {
if (event.__get__success()) {
_medalQueue.push(event.__get__data());
showNextUnlock();
}
}
function showNextUnlock() {
if (_unlockedMedal) {
return undefined;
}
if (!_medalQueue.length) {
gotoAndStop('hidden');
onEnterFrame = null;
return undefined;
}
_unlockedMedal = com.newgrounds.Medal(_medalQueue.shift());
gotoAndPlay('medalUnlocked');
}
gotoAndStop('hidden');
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, onMedalUnlocked);
var alwaysOnTop;
_x = Number(_x);
_y = Number(_y);
var _unlockedMedal;
var _medalQueue = [];
var _alwaysOnTop = true;
if (alwaysOnTop) {
_alwaysOnTop = alwaysOnTop == 'true';
}
}
frame 10 {
_root.playSFX('medalGet');
}
frame 15 {
function medalPopupEnterFrame() {
if (_alwaysOnTop) {
var v1 = getNextHighestDepth();
swapDepths(v1);
}
if (_medalScrollRect) {
_medalScrollRect.offset(2.4, 0);
medalNameClip.scrollRect = _medalScrollRect;
if (_medalScrollRect.left >= medalNameClip.textField.textWidth + 10) {
_medalScrollRect = null;
play();
}
}
}
var _medalScrollRect;
medalPointsText.setTextFormat(_root.txtFormat2);
medalPointsText.embedFonts = true;
medalNameClip.textField.setTextFormat(_root.txtFormat);
medalNameClip.textField.embedFonts = true;
if (_unlockedMedal) {
if (medalNameClip && medalNameClip.textField) {
medalNameClip.textField.text = _unlockedMedal.name;
}
if (medalPointsText) {
medalPointsText.text = _unlockedMedal.value.toString();
}
if (medalNameClip.textField.textWidth > medalNameClip._width) {
_medalScrollRect = new flash.geom.Rectangle(-medalNameClip._width, 0, medalNameClip._width, medalNameClip._height);
medalNameClip.textField._width = 1000;
medalNameClip.scrollRect = _medalScrollRect;
}
onEnterFrame = medalPopupEnterFrame;
}
}
frame 23 {
if (_unlockedMedal && medalIcon) {
_unlockedMedal.attachIcon(medalIcon);
}
}
frame 84 {
if (_medalScrollRect) {
stop();
}
}
frame 94 {
_root.playSFX('medalGot');
}
frame 105 {
stop();
_unlockedMedal = null;
showNextUnlock();
}
}
movieClip 465 {
}
movieClip 466 {
}
movieClip 468 {
frame 1 {
stop();
}
}
movieClip 471 {
}
movieClip 472 {
}
movieClip 477 {
frame 1 {
stop();
}
}
movieClip 478 Preloader {
frame 1 {
function enterFrameHandler() {
var v2 = 0;
v2 = _root.getBytesLoaded() / _root.getBytesTotal();
if (loadingBar) {
loadingBar.gotoAndStop(Number(v2 * (loadingBar.totalFrames - 1)) + 1);
}
if (v2 >= 1) {
onEnterFrame = null;
gotoAndStop('loaded');
}
}
stop();
var autoPlay;
var className;
onEnterFrame = enterFrameHandler;
}
frame 10 {
function _onPlayClick() {
_root.nextFrame();
_root.play();
_parent._onLoaded();
}
if (playButton) {
playButton.onRelease = _onPlayClick;
}
if (autoPlay) {
_onPlayClick(null);
}
}
}
movieClip 483 Newgrounds API Classes {
#initclip
Object.registerClass('Newgrounds API Classes', com.newgrounds.shims.APIShim);
#endinitclip
}
movieClip 523 {
}
movieClip 530 {
}
movieClip 534 {
}
movieClip 535 {
}
movieClip 536 {
}
movieClip 537 FlashAd {
#initclip
Object.registerClass('FlashAd', com.newgrounds.components.FlashAd);
#endinitclip
}
movieClip 538 APIConnector {
frame 1 {
function _onLoaded() {
gotoAndStop('invisible');
if (_redirect) {
com.newgrounds.API.loadOfficialVersion();
}
}
function _apiConnect() {
var v2 = com.newgrounds.API;
if (v2 && !v2.connected) {
if (!apiId) {
com.newgrounds.Logger.logError('No API ID entered in the API Connector component.', 'You can create an API ID for this submission at http://newgrounds.com/account/flashapi', 'Enter your API ID into the API Connector using the Component Inspector (Window -> Component Inspector).');
return undefined;
}
switch (debugMode) {
case 'Off':
default:
v2.debugMode = v2.RELEASE_MODE;
goto 1268;
case 'Simulate Logged-in User':
//Invalid switch }
v2.debugMode = v2.DEBUG_MODE_LOGGED_IN;
goto 1268;
case 'Off':
v2.debugMode = v2.DEBUG_MODE_LOGGED_OUT;
goto 1268;
case 'Simulate Logged-in User':
v2.debugMode = v2.DEBUG_MODE_NEW_VERSION;
goto 1268;
case 'Simulate Logged-out User':
v2.debugMode = v2.DEBUG_MODE_HOST_BLOCKED;
label 1268:
v2.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, _onConnected);
v2.connect(_root, apiId, encryptionKey, movieVersion);
}
}
function _onConnected(event) {
if (redirectOnNewVersion && event.__get__success() && (event.__get__data()).newVersion) {
_redirect = true;
}
if (redirectOnHostBlocked && !event.__get__success() && event.__get__error() == com.newgrounds.APIEvent.ERROR_HOST_BLOCKED) {
_redirect = true;
}
if (_redirect) {
gotoAndStop('adPreloader');
forceAlwaysOnTop();
}
}
function forceAlwaysOnTop() {
var v2 = getNextHighestDepth();
swapDepths(v2);
if (Stage) {
_x = (Stage.width - _width) / 2;
_y = (Stage.height - _height) / 2;
_visible = true;
}
if (_root && _root instanceof MovieClip) {
(MovieClip(_root)).stop();
}
}
stop();
if (_root && _root instanceof MovieClip) {
(MovieClip(_root)).stop();
}
var apiId;
var encryptionKey;
var movieVersion;
var debugMode;
var connectorType;
var redirectOnHostBlocked;
var redirectOnNewVersion;
var _redirect;
_x = Number(_x);
_y = Number(_y);
if (!debugMode) {
debugMode = 'Simulate Logged-in User';
}
if (!connectorType) {
connectorType = 'Flash Ad + Preloader';
}
switch (connectorType) {
case 'Flash Ad + Preloader':
gotoAndStop('adPreloader');
break;
case 'Flash Ad Only':
gotoAndStop('ad');
break;
case 'Invisible':
gotoAndStop('invisible');
}
_apiConnect();
}
instance ad of movieClip 537 FlashAd {
onClipEvent (construct) {
apiId = '';
showBorder = true;
}
}
instance loader of movieClip 478 Preloader {
onClipEvent (construct) {
autoPlay = false;
mainClass = '';
}
}
}
frame 1 {
onEnterFrame = function () {
_root.bytesLoaded = _root.getBytesLoaded();
_root.bytesTotal = _root.getBytesTotal();
_root.percentLoaded = Math.round(100 * (_root.bytesLoaded / _root.bytesTotal));
if (Math.round(_root.Bullet._x / 8) < _root.percentLoaded) {
_root.Bullet._x += 8;
}
if (_root.Bullet._x >= 800) {
if (_root.playBut._currentframe == 1) {
_root.playBut.play();
}
}
};
}
frame 1 {
function doSomething() {}
stop();
_root.attachMovie('medalDisplay', 'medalDisplay', 65532);
_root.medalDisplay._x = 492;
_root.medalDisplay._y = 420;
titleFrame = 44;
gameFrame = 45;
creatorFrame = 46;
showLogos = true;
var savefile = SharedObject.getLocal('BulletBill3');
resetData = function () {
savefile.data.StatSave = true;
savefile.data.MSCVol = 10;
savefile.data.SFXVol = 10;
savefile.data.camMovement = true;
savefile.data.abilityPity = true;
savefile.data.autoSave = true;
savefile.data.hideMouse = true;
savefile.data.FPSCounter = false;
savefile.data.gameTutorial = true;
savefile.data.BulletUnlock = new Array(16);
savefile.data.AbilityUnlock = new Array(16);
i = 1;
while (i <= 16) {
savefile.data.BulletUnlock[i] = false;
savefile.data.AbilityUnlock[i] = false;
++i;
}
savefile.data.BulletUnlock[1] = true;
savefile.data.AbilityUnlock[1] = true;
savefile.data.Level_customLevel = new Array(26);
savefile.data.customLevelNames = new Array(26);
i = 0;
while (i <= 26) {
savefile.data.Level_customLevel[i] = '1';
savefile.data.customLevelNames[i] = 'BLANK LEVEL #912' + int(i / 10 % 10) + i % 10;
++i;
}
savefile.data.savedProgress = '';
savefile.data.savedScore = 0;
savefile.data.savedAbility = 0;
savefile.data.statEnemies = 0;
savefile.data.statBricks = 0;
savefile.data.statCoins = 0;
savefile.data.statDeath = 0;
savefile.data.statFuzzy = 0;
savefile.data.statComplete = 0;
savefile.data.statBullet = new Array(16);
savefile.data.statAbility = new Array(16);
i = 1;
while (i <= 16) {
savefile.data.statBullet[i] = 0;
savefile.data.statAbility[i] = 0;
++i;
}
savefile.data.medalGet = new Array(50);
i = 0;
while (i <= 50) {
savefile.data.medalGet[i] = false;
++i;
}
_root.savefile.flush();
};
loadData = function () {
_root.MSCVol = savefile.data.MSCVol;
_root.SFXVol = savefile.data.SFXVol;
_root.camMovement = savefile.data.camMovement;
_root.abilityPity = savefile.data.abilityPity;
_root.autoSave = savefile.data.autoSave;
_root.hideMouse = savefile.data.hideMouse;
_root.FPSCounter = savefile.data.FPSCounter;
_root.gameTutorial = savefile.data.gameTutorial;
_root.savedProgress = savefile.data.savedProgress;
_root.savedScore = savefile.data.savedScore;
_root.savedAbility = savefile.data.savedAbility;
i = 0;
while (i <= 26) {
_root.Level_customLevel[i] = savefile.data.Level_customLevel[i];
_root.customLevelNames[i] = savefile.data.customLevelNames[i];
++i;
}
i = 1;
while (i <= 16) {
_root.BulletUnlock[i] = savefile.data.BulletUnlock[i];
_root.AbilityUnlock[i] = savefile.data.AbilityUnlock[i];
++i;
}
_root.statEnemies = savefile.data.statEnemies;
_root.statBricks = savefile.data.statBricks;
_root.statCoins = savefile.data.statCoins;
_root.statDeath = savefile.data.statDeath;
_root.statFuzzy = savefile.data.statFuzzy;
_root.statComplete = savefile.data.statComplete;
i = 1;
while (i <= 16) {
_root.statBullet[i] = savefile.data.statBullet[i];
_root.statAbility[i] = savefile.data.statAbility[i];
++i;
}
i = 0;
while (i <= 50) {
_root.medalGet[i] = savefile.data.medalGet[i];
++i;
}
};
saveOptions = function () {
savefile.data.MSCVol = _root.MSCVol;
savefile.data.SFXVol = _root.SFXVol;
savefile.data.camMovement = _root.camMovement;
savefile.data.abilityPity = _root.abilityPity;
savefile.data.autoSave = _root.autoSave;
savefile.data.hideMouse = _root.hideMouse;
savefile.data.FPSCounter = _root.FPSCounter;
savefile.data.gameTutorial = _root.gameTutorial;
_root.savefile.flush();
};
saveUnlocks = function () {
if (!_root.cheatsOn) {
i = 1;
while (i <= 16) {
savefile.data.BulletUnlock[i] = _root.BulletUnlock[i];
savefile.data.AbilityUnlock[i] = _root.AbilityUnlock[i];
++i;
}
}
_root.savefile.flush();
};
saveLevel = function () {
j = 0;
i = 0;
while (i <= 26) {
savefile.data.Level_customLevel[i] = _root.Level_customLevel[i];
savefile.data.customLevelNames[i] = _root.customLevelNames[i];
if (_root.Level_customLevel[i].length > 1) {
++j;
}
++i;
}
if (j >= 1) {
_root.medalUnlock('MEDAL_CUSTOM_01');
}
if (j >= 13) {
_root.medalUnlock('MEDAL_CUSTOM_13');
}
if (j >= 26) {
_root.medalUnlock('MEDAL_CUSTOM_26');
}
_root.savefile.flush();
};
saveProgress = function () {
if (!_root.cheatsOn) {
savefile.data.savedProgress = _root.savedProgress;
savefile.data.savedScore = _root.savedScore;
savefile.data.savedAbility = _root.savedAbility;
}
_root.savefile.flush();
};
saveMedals = function () {
if (!_root.cheatsOn) {
i = 0;
while (i <= 50) {
savefile.data.medalGet[i] = _root.medalGet[i];
++i;
}
}
_root.savefile.flush();
};
saveStats = function () {
savefile.data.statEnemies = _root.statEnemies;
savefile.data.statBricks = _root.statBricks;
savefile.data.statCoins = _root.statCoins;
savefile.data.statDeath = _root.statDeath;
savefile.data.statFuzzy = _root.statFuzzy;
savefile.data.statComplete = _root.statComplete;
if (!_root.cheatsOn) {
i = 1;
while (i <= 16) {
savefile.data.statBullet[i] = _root.statBullet[i];
savefile.data.statAbility[i] = _root.statAbility[i];
++i;
}
}
if (_root.statBricks >= 53597) {
_root.medalUnlock('MEDAL_BLOCKS_COLLECTIVE');
}
if (_root.statEnemies >= 9999) {
_root.medalUnlock('MEDAL_ENEMIES_COLLECTIVE');
}
if (_root.statCoins >= 7750) {
_root.medalUnlock('MEDAL_COINS_COLLECTIVE');
}
if (_root.statFuzzy >= 420) {
_root.medalUnlock('MEDAL_DIZZY_COLLECTIVE');
}
if (_root.statDeath >= 1024) {
_root.medalUnlock('MEDAL_DEATH_COLLECTIVE');
}
if (_root.statComplete >= 256) {
_root.medalUnlock('MEDAL_LEVEL_COLLECTIVE');
}
_root.savefile.flush();
};
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem('');
MENU.customItems.push(Functioned);
_root.menu = MENU;
Color.prototype.setTint = function (r, g, b, amount) {
var v4 = 100 - amount;
var v2 = new Object();
v2.ba = v4;
v2.ga = v2.ba;
v2.ra = v2.ba;
var v3 = amount / 100;
v2.rb = r * v3;
v2.gb = g * v3;
v2.bb = b * v3;
this.setTransform(v2);
};
_root._quality = 'LOW';
txtFormat = new TextFormat();
txtFormat.font = 'ArcadeFont';
txtFormat2 = new TextFormat();
txtFormat2.font = 'pixelFont';
_root.cheatInvincible = false;
_root.cheatBanzai = false;
_root.cheatUnlock = false;
_root.cheatBombs = false;
_root.cheatAbility = false;
_root.cheatsOn = false;
_root.tempProgress = '011a1';
_root.tempScore = 0;
_root.tempAbility = 0;
_root.prevScore = 0;
_root.gameLoaded = false;
_root.gameStart = false;
_root.firstLevel = true;
_root.bulletNo = 1;
_root.abilityNo = 1;
_root.levelStyle = 1;
_root.levelNo = 'a1';
_root.StageNo = 1;
_root.slowDown = false;
_root.SMB2MessageUp = false;
_root.soundCheckVol = 100;
_root.soundCheckPlay = false;
_root.levelCreate = false;
_root.Level_customLevel = new Array(26);
_root.Level_Custom = '';
_root.customLevelNames = new Array(26);
_root.levelEdit = true;
if (savefile.data.StatSave != true) {
_root.resetData();
_root.logoOpt._y = -200;
} else {
_root.levelStyle = random(10);
}
_root.loadBG.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.Level_a1 = '1/7[a22b8/6[/6[//////8[a32b1/7[3b4/8[2b1///////6[/5[/4[/////2b2a23b1a34b1/5b1a16b1a27b2/////1]/3]/2]//////3]a37b6/4]/3]//////9[a28g/9[/9[6b4/9[/9[a18g/+9[/8[/7[/6[a35k///9[/9[a32b6/9[a28g/9[a28g/////1]/2]/3]6b8////////9[/8[/9[///a14b4a33g/////8[1]/7[2]/7[2]/1]8[////7[a34b1/8[3b4/7[4b1';
_root.Level_a2 = '2/8<1>5!4a28<a21>/8<1>4!4a28<a21>/8<1>5!4a28<a21>/8<1>4!4a28<a21>/////7<a27</6<a26</5<a25<////a10]/a11]a38<a35p/a11]a18<a14p/a10]/////7[a33b1/6[2b4/8[3b1////3va13va23va33v///a11]/a11)a23>/4>a23>/1)a11]//0ta20t////9[a34b1/8[3b4/7[2b1///8[/8[3i/8[/+0]/1]a35!1/0]5u4/1]5!1///a21ca31ca30ca32c/1c/7[/6[/5[a24k///9[/9[/9[8m//6<///4u1a14!2a34u1//a31>/a12>a33>/a35!4/////5^a15^a25^a35^///a38c/9c8c7ca18c/4<a23</4<a25</1b2a22b4/a23b2////0]/1]/9[1]5b4/8[0]4b4/8[/9[';
_root.Level_a3 = '3/4b8///a39(/8(a17(a28(a39(a32b2/8(a17(a12!2a28(a39(a32b1/8(2!2a17(a28(a22b2a39(/8(a17(a28(a39(////9[/8[/7[/6[/////a21>/3>6u27u2a22>/////9[3b4/8[3*1/8[a15i/8[6ia35i/8[/////1)a12)a22)a31)/a25b2/4b2a29</8<a28</7<///9[1]/8[2]6b8/8[2]/9[1]///a23b2/8[2b2/9[/+8[/8[7g/8[a37g/8[//////2)a13)a23)a32)/a19<a10t/2)a13)a23)a32)////8[/6[/7[///3b1a14b2a35b1////2]/3]8!4/1]////8[/7[2b3a32\'1/6[/6[a25k/6[a25k/////a10)a19(a21)a28(a32)a37(/8(1)a19(a10)a29(a20)a25ca24ca39(a30)a33ca36c/9(0)2c7ca19(a10)a12ca17ca29(a20)a22ca27ca39(a30)a37ca32c/0)9(7c2ca10)a19(a17ca12ca20)a29(a27ca22ca30)a39(a37ca32c/0)9(2c7ca10)a19(a13ca16ca20)a29(a24ca25ca30)a39(/1)8(a12)a17(a21)a28(a30)a39(';
_root.Level_a4 = '4/6(a16(a26(a36(/7(a18(a29(a39{/a29{/8ha19{/9{a39{/a18ha29{/a19{///3b4/4b4/5b4///1]/2]/3]/a27!4a20t/0t/3]/2]/1]/////9[/8[/7[a16h////4b3a34!2/a14b3///9[/8[/7[3u4/0]4u4/1]/2]////5b4/4b4///7<a26<a25n/6<a15na27</+4!4/5!4//a17{a26~/1z';
_root.Level_b1 = '1/6{a37{a32b3/3b11b1a26{/////a32}/a16u1a23}a27u3/a14}a18u1//////1}a26pa32}/a22}/a11}a16p//a25b4/a24b4/a23b4///a26{/a17{/8{a13ia37{/a26{////a37{a36k/a27{/a17{a26k/7{a36{/a26{a25k/a16{/6{a15h///8{a23!1a22!5a39{/a28{a23!1///a32c/1c2c3ca12c/1}a32}/a23}/a12}/a37c/7c8c6ca17c/8{a37{/a26{/a17{//a12p/3pa34p/a25p//1}a25b1a32}a36b3/a23}a27b1/a12}/+3va13va23va33v////a29<a28y/2{a33{/a24{a21b3/a15{a12b3/6{a37{///a27</7<a28<//a24b2/5b3a36b2//a31>/a12>a32>///a38[/a37[/a37[a36g/a26g///a14u2a35u2///3]/2]/3]//9[/9[7ia26i/9[5ia24i//a39[/0t//5u4/6u44u4///2]/3]///8{1}a37{a32}/a27{a22}/a18{a11}';
_root.Level_b2 = '2/8[/7[6k/7[a36k/8[////8[/8(a19<a10ta38(/8[////a33o1a32o8/3b8/a32o1////7<a26</6<a27<///4b2a25b4/a26b2////2]7p/3]7p/4]7p//////6<a26<a35m//9c8c7ca19ca18ca17ca29ca28ca27ca21b8a39ca38ca37c/a39x1/4<a24<////1b4/2b4/3b4/4o4a35o1a36o1a37o1a38o1a33o1a32o1a31o1a39o1a30o1/0[/+8<a28</7<a27</6<a26<///3u4/4!2a25!2/6u4///3>a23>/2>a22>/1>a21>////a24b2a35b2/1]8[/7[2]/7[2]/8[1]/////6<a26<a35m////9o8/a36o1a37o1a38o1/2<a26</6<a26<a25g////a26</5<a24<///2u1a12!2a32u1///7[/8[/9[a35i////1]/2)a12)a29[a20t/0ta22)a32)/1]///a27</8<a29<//a20>a25b2/1>6b2a22>a27b2/1>6b2a20>a25b2//a29</8<a27<';
_root.Level_b3 = '6/9[0}a30}/8[a20}/7[a10}a36k/7[0}a30}/7[a20}/7[6ga10}a26g/7[0}6ga26ga30}/7[6ga20}a26g/7[6ga10}a26h/////7<a26</6<a27<////1]/2]7u3a37!2/2]a17u3/1]//a28(/8(a28(/8(/a23b4/a24b4///0}a31}/a22}/a12}/6pa35p/a27p/a16p////8{a37{a33i/a27{/3ia18{////7[/a18(a38(/a17[//3b4/4b4/3b4//4,1/4b3a15b1a13b1/4b3a15b1a13b1//a13ca15ca25ca23ca34c/4ca14ca24ca3+a39{a31]/a29{a32]/8ka19{a32]/9{a39{a32]/a29{a32]/a19{a32]/9{a18ga32]a39{a38g/a18ga29{a32]a38g/a19{a18ga32]a38g/9{a18h////1>a22>a26u1a36!2/2>a16u1a21>////9[0]/8[1]/7[2]6na36n/7[2]6na36n/8[1]/9[0]///3ca13ca22ca32c/3ca13ca22ca32c///a25</4<a26<///9{a38{/a27{/a16{a15k/6{a36{/a26{a25m///2u8/a17(a16m//a25</5<//a23b2/4b2a25b2//a22>/2>';
_root.Level_b4 = '4/6(a16(a26(a36(/7(a18(a29(a30}a39{a33u4/a20}a29{a34u4/a10}a19{a35u4/0}9{a30t/////8[/7[/6[a15h///4b4//a30}/a21}/a12}/0}1ta30}/1ta22}/a11}/0}//a16^a36^///8<a26</4<a13k//9[/9[/9[a18g/9[a28g/9[3ca12ca22ca28ga33c/9[2ca13ca18ga23ca32ca38g////2]/1]/2]//a24b4/a25b4///7[/8[/7[///0}a31}/a22}/a12}a19{/2}8{a37{a32}/a27{a21}a36h/a10}a17{/7{a16ha38{/a29{////6b4/5b4//a25p/0>a21>a26p/2>a23>/+0>9<a21>a28</7{1}a16~a38<a31>/a19<a10>//4!4/3!4//8[/7[/6[/2z';
_root.Level_c1 = '5/3b8//6[3b1///2]/1]//7[/6[///3b4///6{a35{///0]//6{a37{///7[a16k//7[/////1u3a31!1/2u2a23!1a33u3///1]8[7ga25b5/1]7[////8[7g/8[7g//a23va33v/3va13v//4]/////2]7[6g/2]7[6g///4ca13ca15ca14ca23ca25ca24ca34c////a21b5/4[/5[/6[/7[/8[////8[/7[6g/8[7g///4]/+7b1a16b1a27b1a36b1/7b1a16b1a27b1a36b1/3]7b1//a26[////2]///4b4//3]7[/2]8[a37g/////4b6/7[a23b1a32b2/a24[/a13g///a12}a25b2/3}6b2////7[/7[6g//6[/////6[5ga23b5/6[/6[5g//////3]////5[/////6[0]/a27[a21]a25ca36c/6ca15c/8[2]4ca13ca23ca34c///7[a36g/7[/7[6g/////7[/2]/7[';
_root.Level_c2 = '7/6{2b6a37{/////6[a12ia33i/7[a14ia35i///4b1a13b2a34!2/a15b2a34b1///1)a12)a23)a32)/2)a13)a24)a33)/3)a14)a25)a34)/////4[3k/5[/5[a24g/3[//8ca18ca19ca17ca28ca36c/5c6c7ca16c///a14)a24u4a32u2a31y/a24)////9[a15i/8[a37h/////4>a22>/////5[a34k///7[a36k/1b3a32!2/a11b3/9[6i/9[a36i/8(////3]a37b1/4]8b4/3]7b1//2}a38(a30t/8(a10}/8(0ta18(a22}/a1+a16<a13pa37</a17<a13p////4>a23>/////8(a17(a26(/a17ca28ca39c/9ca18ca27c/a16(a27(a38(////4[3k/6[a21i/4[/5[a34k/6[a35k/7[a36k/8[a37k//a25u1a35?2/a15u1///3[////8{1}a37{a32}/a26{a22}a24p/a16(a12)a26(a22)a36{a32}/a14pa27{a22}/a11}a18{////7<a26</5<a22b2/3b1a14b1//2>a23>/4>a27b2/6b1a15b1//7<a26</5<a22b2/3b1a14b1//7<a26</5<///2]/3]/1]/a25b3/a14b3/9(a18(a27(a38(/7(a16(a25(a36(/5(a14(a23(a34(';
_root.Level_c3 = '3/8(a17(a27(a38(a30)/9(1)a12)a22)a31)a39(/0)8(a17(a27(a38(/9(4b8//8[/7[//1]/2]a26p/a35p//4pa27</8<a27<///7[/8[a10t/7[a36k//9[/9[/9[/9[a13b5a24b3a22b3a38*1a31b1a35b1//a33[/a34[//a18ca17ca28ca37ca38c/a16ca17ca26ca37ca36c///3]//4]//5]/0x1/6]/////7[/5[4ga34g/6[///3>a22>////9(a18(a27(a36(a31b1/5(2b4a15(a25(a35(/6(1b1a17(a28(a39(////1]8[a13p/1]7[//9[/9[a18n/9[a18n/9[0va18n//1>a23>/5>a2+a24b4/a25b4////5]////7[/5[//a23p/a14p/5p//3)a13)a22)a32)//9{a38{/a27{a34i/a17{a23i/7{a15ia37{/4ia28{/a19{///6[/4[///2b4/3b4/3o4a34o1a35o1a36o1a37o1a32o1a31o1a38o1a39o1/1[//3!1a13b1a24!1a34b1/5b1a15!1a26b1a36!1//4>a23>/2>a23>///8[////5]///a29</9<4ia28<///2]/1]//a39(/8(a17(a27(a30)a38(/1)9(4b1a12)a15b2a22)a39(a31)a34b1/8(0)a17(a27(a38(/9(';
_root.Level_c4 = '4/6(a16(a26(a36(/7(a18(a29(a39{/a29{/a19{a18h//4b1a14u1a24b2/4!2a24b1//7[/6[a15g/6[a15g////0}a31}a39</a17<a22}a38</a12}a18<a38</2}a19<a32}a35c/6ca17ca22}a27ca37c/6ca12}a15ca24ca33c/2}3ca13ca24ca32}a35c/6ca21}/a10}/9[/8[a17h//a20}/a11}/0ta20t/0ta20t/1}a30}///1]//3]//5]8b8//7b2a26b2//8<a28<a23i/7<a27<a24i/8<a28<a23i//a23b4/a22b4/6[/7[//8[7na37n///3b2a23!4/a23b2/a28</7<a25</+4!8/a16[/4!1a17[/a18[/a16(a15~a28[/a27[/a26[/a23z';
_root.Level_d1 = '1/8(a17(a25(a37(/8(a13b2a34b6//a15b2/1)a12)a24)a32)/1)///7[6k/8[/9[/9[a22b2/9[3b18ha13?2a33b1/9[4b2/0]9[/1]/2]/4]/a26^/6^a26^////5>a23>/2>////0}9{a31}a37{/a21}a26{a33i/a11}a17{/0}9{/4p/3p/5p/9<a29</8<a28<///8ca19ca18ca17ca28c/5[/6[/6[/6[5m///2b2a22!1a32b2/a12!1a22b2/2o13o14o15o16o18o17o1a18>a19o2a31o1a32o1a33o1a34o1a35o1a36o1a37o1a38o1/1<0o2a22o1a21o1////1]a17b2//a28[a34p///2]a17b2//a27[a34p///a13]a27b2//a36[/4pa3+a38{/a26{/a17{//a17ca16ca27ca26c//6[a11p//5[/5[a34g////2>a23>/5>//9[/8[7k/8[a37n/7[/6[/6[a35*1//4>7b1a18b2a24>a37b1/////5b1a14b3///7{a14i//6{a13i//5{a12i//4{a11i///a20)a31)/1)a12)a22)a33)/3)a14)a24)a33)/1)9[a10ta31)/2)a12)a22)a32)/1)a19(a10)a28(a37(/7(a17(a27(a38(/9(/////7{/6{/5{/7{/6{a12b3/5{1b3/7{/6{/4{a13k///9[5i/9[0>a20>a38*1/8<1>';
_root.Level_d2 = '2/1]a36b1/2]6!1a16b2a36!1/1]6b1///8<a31>a32c/2ca27<a26ca36c/a11>a12ca22c/8</a20f/8fa22f/6fa24f/2fa26f/0fa28f///2]/3)a14)a24)a33)/2]///8<7n/a26<a25n//7<6n/a24b6//0)a11)a21)a31)/0ta21)a31)/1)a10)/a25p/a24p/a23p//8[/7[a36g/7[a36g/8[//0fa12f/a16fa28f//1]/2]a23ca33c/2]3ca13c/1]///8<1>a22>a27</7<2>a27<a21>/6<0>a23b2/3!2a23b2////6[/5[4ga34g/6[//a28fa26f/0ta26fa28f//3va23v/3v//1}6u4a32)/3>7u2a24>a28u2/6>a2+a28</7<a28</7<a28</7<0>a28<a21>/2>9<a21>a36b4/2>a21>/2>9<a21>a28</0>7<a28</7<a28</7<a28</9<//a34b4/a35b4////2}/3}/4}//6p/5p/8<a29<///7[/6[/6[5m//a25<//a20fa28fa32fa36f/a28fa20fa32fa36f//a20}/a11}/0ta20x1a30t/a11}a27b2/0}6b3a35b2///8<a27</5<a26<///1]/2]6p/2]6p///9[/9[8h/9[////9<a28</7<a27</8<a20>a29</1>a23>/4>a25>a28b4/5>';
_root.Level_d3 = '6/3b8/a26(/6(a36(/a16(/6(a26(/3u2a23!4/a23u2//1)a21)/a12)a32)/a23)/3)///9<a27<a24i/8<//0}a31}/6b2a22}a27b2/a12}/2}a32}/7b2a21}a26b2/a10}/a31c/0c1c2ca11c/9<a37</a25<a22p/a15<a22p/7<a39<//a17(a37(/a26(/6(a35(/a15(/4(1b4a24(/2b2a23b2/4b1a15b1//2)a22)a30t/a13)a33)/0ta24)/4)//a29{/a18{/7{a36{a35k/a26{/a16{/6{5m/7ca18ca17ca16ca27c/6{a25ka36{/a26{/a17{/8{a39{/a29{/8ga19{a38g/a18(a38(/+7[/7ca18(a17ca27ca38(a37c/7ca17[/a14b2a25b2/2]/2ca11)a12ca22ca31)a32c/2ca12]/a35u1/5!1a15u2a34u2/a14!1a24u1/9[/8[/7[/6[/6[/a17(a37(/a26(/6(a29<a28y/8<a26</0]/1]/2]a15p/a15p/a15p///2>a23>/2>a29<a20>/7<a26</7<///8[a37m/1]/8[/1]/8[a37m/1]/8[a24i///////1}a32}/6b4a15b2a17b2a22}/a11}///8[7k/8[/8[/8[/9[a15i/9[a16i/9[a38*1/7<2>4b1a15b1a21>a28<a24b1a35b1/2>7<4b1a15b1a21>a28<a24b1a35b1/9<0>4b1a15b1///8[a24b2/3b5a18(a38(/a16[a12b2/a26(/6(a24[a23k///a29[/1>a22>a29[/4>a29[/a18h';
_root.Level_d4 = '4/6(a16(a26(a36(/7(a18(a29(a39{/a28{/a16{/3{a12m/////4]///7<a13b2a28<a32b2/8<a13b2a27</9[/9[/9[a38h/9[/9[/9[/8[a10t/6[a32c/3c2c1ca12c//4b1a14!2a34b1/5b1a15!2a35b1/9{2]a39{/3]a29{/2)a19{a10ta32)/9{3]a39{/2]a29{/a19{a28h////6<a27<a33p/a35p//3>a22>/9[/9[/9[8n/8[7n/6[5n///7<a29</7<a13u1a26<a22u4/6<a27<a23u2/0>8<4u1a21>a29</2>a24>///9{a38{/7~a29{//2]/3]/1]/5b4/4b4/7<a28</6<a12ia2+a24b2/4!4/4b2//3va13v///5]/4z';
_root.Level_e1 = '1/2b4/5{1b4a34{/a23{//1b2a22b1a33b1/a20}/a11}/3}/8[/7[6g/7[6g///7<a26<a22p/6<a22p//a20ca30c/0ca10c/1]/a23]//5]/8fa27f/5f//6</5<a24ca34c/5</6<////3{a11i//2b1a13?1a24b1a35b1//4}//a23p/a29<a22p/7<a26</6<a27<a20>/9<2>a23>/3>a22>/0>/9{a18g/a28{a37g//7{a16g/a22}//1}/9(4pa18(a20}a27(a37(/7(a18(a28(a39(/9(a19(a29(a39(/9(a19(a29(a39(/9(5?1a19(a29(a28ga39(a35b1/9(5!12b3a19(a15b1a29(a25?1a39(a35b1/9(a19(a29(a39(/9(a19(a29(a39(/7<a26</5<a24</1b3a32b1//3b3a34b1///2]/a24]/a31c/0c2c1ca11c//9<a28</6<a12ia2+a25}/a14}a28b2/7b1a16b1//a26{/a15{/6[/7[a36g//0>a21>a39[/0ta21>/0>//7[//5[///3]7b4/8b4/5]////a28<a24>///a27<a23>/a38c/9c8ca19ca18ca28c/a22>a26</a31c/0c1ca10ca11ca21c/a21>a25<////7{/6{/5{/4{a13k/9[/9[/9[2b8/9[8g/9[8g/9[8ga38*1/2>5<///2]/a24]//2]/a27b2/6b2a25b2/4b2/7[/a25[//7[///0>a22>/3>a23>/9<2>a27<a20>/6<a26<a22b4/7<a29<a21b4////4]';
_root.Level_e2 = '3/6<a25<a22b8/5<a25</5<a26<//3p/a34p///9(a18(a27(a37(/8(a19(a20)a31)/2)a12)a16u2a21)a30)a35!1/5u2a25!1a34u2//7[/7[3i/7[/7[2i//3b4/4b2a25b2//0)a11)a23)a34)/5)a15)a25)a35)/5)a14)a22)a30)///8</7</6<//0]/1]/1}a30t/a11}/1]/0]1c2ca11ca12ca21ca22ca31ca32c/2>a23>/5>///a27</8<a29</3b6/a29</8<a27<///0)a11)a22)a33)/3)a12)a21)a27b1a30)a36b1/5?1a14b1a29(a23b1a38(a32b1/7(a16(a26(a37(/8(a19(//1]/a17b6a24]//2]//a27<a23p/a26<a22p/a28<a24p//9[/9[8g/9[8g//1>a22>/3>a23>/1>9<a28</7<3b1a12b2a27<a33b1/9<a20]/a21]/a23]/a2+a29(a38(/7(a16(a25(a34(/4(a14(a24(a34(/4(a14(a25(a36(/8(a19(/4b2a25b4/a26b2/a20)a31)/3)a14)a25)a35)/5)a15)a25)a35)/5)a15)a24)a33)/2)a11)a20)///9<a28</8<4ia28</8<5ia29<///0]/2]/4]7u1a17!2a37u1////9<a28</6<a25</4<a13m///a29(a38(a30)/7(1)a16(a12)a14o8a13o1a15o1a25(a23)a35(a33)/5(3)a15(a13)a25(a23)a35(a33)/5(3)a15(a13)a14o3a25(a23)a32)a36(a33o1a35o1/0)8(a19(///a28</a17</6</3b2a24b2/5b2/1>a32>/a23>///9(a18(a26(a35(a32b6/5(a15(a25(a35(/5(a16(a28(a39(//0)a11)a23)a34)a37b6/4)a14)a24)a34)/4)a13)a21)a30)/a11ca21ca22ca31ca32c/1c2ca12c/1>a20t/3>a20t/5>a22u4a20t/0ta25>/0ta23>/0ta21>/6b2a25b2/4b4/3b2a22b2/5[/8[/7[/9[';
_root.Level_e3 = '7/5{/a12b8a27{//8{///9<4>//8<3>//9<4>///8[/7[/6[/a34b3/a25b2/6b3/a24>/5>a32ca33c/2ca12ca21ca22c/5)a10ta34)/0ta25)a30t/a14)a20t/5)/7b4/6b4a35k//9[/9[/9[6i/9[4i/1)8(/2)7(/1)8(//a17{/a15{/a14{a13k/a14{/a34{a33,1/a34{a31b4/a35{a32b4/a37{////1]/a23]//4]///5<3fa34<a32f////6(a16u6/5ga36(//3)a13u6/a33)///8[/a27[a34i//5[a21i///a15</6<a38</a13b1a24b2/5b2a26b1a31>/a23>/a14>/+1]7[//8[2]//9[3]//4]a27b8///2)a23)/2)a23)/2)/a28<a24p/8<a28</9<0t//1}a33}/a24}/a14}a18b8/0x1a21}/a13}/4}a34}//a29</8<7ka28</8<//a31>/a13>a39{/a23>/1>//9[/8[/6[/5[4ga34g///2b3a33b3/a29<a24b2/8<a20>a28</1>9<a23>/4>a24>/3>a29<a21>a35b1/8<0>4b2a27<a23b1/5<////4]////6<5ca15c/5<4ca14c/6<5ca15c//0]/a22]//4]a17^a37^/a12ca23ca22ca21ca32c///5<//5{4ka35{/a25{a24k/a16{/7{a38{/4ia27{a33i/a15{///1>a23>/4>a24>/7b4/6b2a25b1a34b1//4[/3[2k//a39{/a29{/a19{a38b1';
_root.Level_e4 = '4/6(a16(a26(a36(/7(a18(a29(a39[/a39[/a38[a30}/7ha20}a38[/a11}a27ha39[/2}//a27</5<a26<a33i/7<a26<a22i/5<a27<//2b8/9[/8[/7[/6[5g/0]7[/2]9[a23ca33c/2]9[3ca13c/8[1]/7[0]6g/1]8[a37h/0]9[///a20>/1>a23>/4>8fa24>a28f/0t8f//5b2a24b2/3b2/5[////4]/a11ca20ca21ca22ca31c//a28</6<a25</5<a14h//0}a31}/a22}/9[a12}/8[2}a32}/8[5b7a22}/8[a12}a35*1/7[3}///a24>/5>8b6a21>a22t/5>a24>/9[/9[/8[a17~/0]9[/1]/3]7b4/5]8b4////8<a27</5<2b2a24<a21b4/4<a24<////3]///8{a37{/a26{a25k/a16{a15g/6{5ga36{a35g/a26{a25g/a15{/+7[/8[3b1a13!2a33b1/7[2b1a12!2a32b1/5[1b1a11!2a31b1////1>a22>/4>a25>/5z';
_root.Level_f1 = '5/3]/4]/4]5ca15ca25ca35c/5]8b8///9{4}/a28{a23}//7{2}/a26{a21}//5{0}////1>a23>/2>a24>///9[/0}8[a31}a34u1/8[4!4a21}/8[4u1a10}/9[////9<a27</6<a26</5<a23<a32n///2]/a24]//3]//5b4/6b4//1}a33}/a24}/a14}////7[a23i////5[////4]/////7<a27</8<a28</7<6ga27<//0}a31}/a23}/a14}a17b1a27!1a37b2/4}a17!1a27b1a33}/a21}/a10}a19{/8{a36{/a25{a24k/a15{/6{a38{/a29{a35i///1>a23>/4>a24>/a12ca23ca22ca21ca32c//8[/6[/7[/+7{a22pa36</a17{///0]/2}a30t/a12}/0]/a18fa26f/a22fa30f/a18[///3>a24>/4>a23>///6{a37{/a27{/a17{a36k//4b8////1]/3]/2]6p///6{a35{/a38c/9c8c7ca18c/0]/a22]//5]/8b4/7b2a26b2//8[a37g/8[/8[7g//6<a25<//5[4k/7[/8[/8[/1>a21>/2>a22>/8{a38{/a27{a26g/a17{a16g//1]/2]//9[/7[/6[2b8/a31m/////3]///7<a28<///8[/a26[//5[a34h';
_root.Level_f2 = '2/6b4a14>a18<////3b4a11>a15<////5b4a13>a17<///8ca17ca18ca19ca28c/5[4k/6[/6[/6[a35g/7[/0}a31}/a22}/a11}/6b4/7b4/2>/4>/3>///7</5</6</a20ca30c/0ca10c/2]/4]/5]/5]/5)a14)a22)a30)//7u1a17!2a36u2/a15!2a34u2/a13!2a33u1//9(a17(a25(a34(/4[/4[/5[/7[/a29ca39c/9ca19c//8{a37(/6(a15{a21i/6[/7[/0>9[a21>/0>a20t//0]/2]/5]7p/5)7pa14)a22)a30)/a26b2/5b2a24b2/3b2/6<a26</7<a29<///0)a11}/2)a13}/9[8h/8[///3b4a15<a11>////6b4a18<a14>////7b4a19<a15>/+7[/6[2b8/5[///a21>/a12>/3>a34>/a24>/a17p/5]/4]/2u4a11y///8<a27</6<2ia27<///0]/1]a28b8/3]/6]////7b4a15>a19<////6b4a14>a18<////3b4a15<a11>////1}a32)/3)a14}/5}a34)/3)a12)a21)a30)//8<a26</5<a25<a34g////2]/3]7b4/1]6b4///9<a27</6<a25<////0>a22>/3>a24>///9[/8[/5[4k//3u4//6<a27</0>8<a21>a28</2>a22>////7[/1]/7[';
_root.Level_f3 = '3/0]/1]/3]a38b6/6]/a12ca23ca22ca21ca32c///a26<a25k/6<a27</9<a26<///0}a31}/a23}/a14}/9{3}a38{a32}/a21}a27{/a10}a16{/5{a36{/a28{/a19{///3pa34p/a25p///a21>/3>8u2a25>a28!2////9(a17(a26(a36(/7(1pa18(a28(a37(/6(a15(a24(a34(/4(a15(a26(a37(/7(a18(a28(a39(/0]/2]/3]/5]///7b4/6b2a25b2///2ca11ca12ca13ca22c/5}a35}/a24}/a12}///a27</7<a26</4<a11ia29x1/8[/7[/7[a36h/8[//a25b8///a30)/1)9<a11)a22)a29<a33)/3)8<7ka12)a21)a28<a30)////0]9[/1]8[/1]8[/2]7[/2}7{a32}a37{/a21}a26{/a10}a15{/5{a24ka36{/a28{/a19{//6p/3>a16pa23>/+6{a35{/a27{/a16{/////1>a22>/3>7b8a23>/2>a21>/1>a20>///8[/7[/5[/4[a33k///6[a22i/8[/9[/9[0>a21>/2>a23>////9(a17(a26(a36(/6(a15(a24(a20va34(a30v/5(a16(a28(a39(//0)a11)a23)a34)/5)a15)a24)a33)/3)a13)a22)a30)//9[6b1a16!2a35b1/8[4b1a13!2a33b1/8[/8[/9[//0>a21>/3>a24>/4>a22>/0>9<a28</7<a27</8<a29<///8[/6[/5[a34g/5[a34g///9<a27</6<a27</3b2a24b2/5b2a26b2/0>a22>/3>a22>///0]/1]/3]/6]////9(a18(a26(a35(/5(a15(a26(a36(/6(a17(a28(a39(//0)a11)a22)a33)/3)a13)a24)a34)/4)a13)a21)a30)';
_root.Level_f4 = '4/6(a16(a26(a36(/7(a18(a29(a39[a30}/a21}a39[/a13}a39[/4}a39[a35}/a25}a39[/a14}a39[/2}///9<a27</6<a26</6<5ha26<///6[/5[4k/5[/6[/7[/8[0]/9[1]2ca12ca22ca32c/3]a17p/4]a27p/4]/7b4/6b2a25b2//6<a20]a27</7<a26</a28ca29ca38ca39c/8c9ca18ca19c/4{2b4a35{/a25{/a16{/a18ca27ca28ca29ca38c//2]/3]/1]///6<a25</2u1a13u1a23!2/4!2a24u1a35u1/2]/3]/1]/9{8ka39{/a29{a21v/1va19{a18g/9{a39{a38g/0]a29{/2]a19{a38*1/4]/5]////8<a26</5<a25<a34~//4b2a25b2/6b2a27b2/0}a31}/a23}/a15}/9[a12ca21ca22ca23ca32c/9[/8[a17k/8[/7[a16k/7[/0t////1>a22>/2>a23>/8[/8[/7[/7[a36h/0}a31}/a21}/9<a12}a27</+1}/2}/3}/a16u2a36!2/a16u2/a22>/2>a23>/4>a27u2/6u1a16!2a36u1/5!2/6z';
_root.Level_g1 = '1/2}a37{/a22}/a17{/2}a37{/a21}/a16{/0}a35{/2b3a32?1/2b4/5[/6[a35k/6[/7[/4b4/5b4//0>a23>/5>a26>/a12ca23ca22ca21ca32c/9[/a28[//7[3i///4{/5{1p/5{/4{////3]7b4//a10ca20ca30c/0ca22>/4>a25>/5>/a28fa36f/8fa10fa22fa30f//7{6ka37{/a27{a26n/a17{a36h//2>a23>/3>a24>/4]/6]a28b3/a18u1a27u1a37b3//a22>/0ta23>/0ta24>/0ta23>/0ta22>a29[/a28[/a17h//4b4/3b4////2]/a14}/a15]/a25}/a27p/4}a39{/6pa23}/a18{//0>a32>/a24>/a15>///4]/5]/3]a29(a39(/8(a18(a27(a37(/6(a16(a12ia27(a38(/9(a19(/3b4/4b4//1]/a23]//5]/+7<5fa36<a34f/a25<a23f/a15<a13f//3b2a24b2/5b2a26b2//5]///8{a37{/a27{a26m/a18{///7o4a32o1a33o1a34o1a35o1a36o1/9]//7<a36</a25</a15<a24n//2]/7b8a22]//4]//9{a30}/a28{/a11}/7{a32}/a26{/2ca11}a12ca22ca32c/6{2ca32}/a27{/a13}/8{a34}/a29{///0]/2]/9<3]6u1a16?1a29<a26u2/8<3]5u2a28<a25?1a35u1////5[/2b4/3b4//2}a34}/a25}/a15}/0t//8<a27<a34i/8<a27<//2]/3]6b6/1]a25b2//9{a37{/a26{/a16{a35m/7{a38{/0>a21>a29{/1>a22>/2>a23>/6>///7[/a26[//5[a34g/a24[/a13g///0>a29<a22>a25p/8<3>a28<a23>/2>9<5pa20>';
_root.Level_g2 = '2/1}7b4a32)/3)6b4a12}/3)a14}///7[/6[/7{a36(/5(a14(a24(a35(////4b4a12>a16<////2b4a14<a10>////6b4a18<a14>////9[/8[/7(a16{/5(a14{a33k/a28ca38c/8ca18c/5<4ga25</5<a25<a34g/6<a27<///1]/1}a30t/a11}/1]/8<a28</7<a26<//5[a12i/5[a22i///6u4/7u4/3]/a24]//5]////a38</a27</3b4a11>a15<////7b4a19<a15>////2b4a10>a14<////1}a32)/3}a34)/5]/4]/3)a12}/9<1)a10}a28</7<0ca10ca26<a20ca30c/0]6<a26<a35k/1]/1]/8<2]a29<a35i////4]/9[8g/9[8g/8{a37(/6[/0>6[a20>/7{1>a21>a38(/9[2>a22>/+7<a36</a25</a14<///2>a33>/a24>/8b4a15>/7b4/0)a11}/2)a13}/4)a15}/4)a13)a21)a30)//9[/8[/7(2b2a16{a22!1a32b2/6[a12!1a22b2///a34b4/6<2>///a35b4/3>7<///a37b4/5>9<a20x1/5)a14)a23)a31)/0)a12)a24)a35)/5]/5}a34)/3)a12}/3]/4}a33)/2}a31)//8<a37</a27</a17</1]/2]/0]/0ta21}/a12}/3}a33}/a26b2/5b2a24b2/3b2/5</a25[//6[/a27[////a12ca23ca22ca21ca32c/a15]///8<a36</a27<//0)a12)a23)a34)/4]/3]/3}a32)/1)6b4a11)a20)a30)/5b4/a29</8<a26</4<a13m////a32o1a33o1a34o1a35o1a36o1a37o1/0[';
_root.Level_g3 = '6/7[6k/8[/7[/6[2b7/a16(a36(//0>a21>/1>a23>//9{a39{/a28{/a16{a23b2/0]4!2a25b2/1]/3]///8<2pa37</2pa27</a17<a13p/0]/a12]/a24]//9{a38{/a28{/a17{a16k/8{a37{/a16ga25{/a15{a34h//0>a31>/9[a21>/a28[///2}a33}a36u2/a16!2a23}a36u2/a12}//8<a27<///7(a12)a27(a32)/7(a12)a27(a32)/7(a12)a27(//4b1a15b1a26b1a37b1//2]/4]/3]//7b1a16b1a25b1a34b1//3]/4]/2]///a17<a15f/6<4fa35<a33f///0)a23)/4)a24)/3)a16b3a22)/5b2a24b1a34\'1/9[8ca18ca28ca38c/6[5g/5[4ga34g/6[/4[3g////1>a33>/a22>//9{a38{/a27{/a16{a15k/6{a36{/a15ma27{/a19{/0]/2]a29</3]8<5pa28<//a12)a32)/a17(a37(/a12)a32)/+0}a31}/a22}/a12}/3}a34}/a25}a28b6/a15}/a12ca23ca22ca21ca32c/9</7</8</a29{/a18{/7{a37{/a26<a35h///1]/3]/2]/0t/9{/7{/8{/3p/6(a26(/2)a22)//8<a37</a25<///0}a31}/a23}/9[8ka15}/9[/9[/9[8n/9[8n////a13}/4}a32}a33ca34c/3ca13ca23}//7<a37</a26</a16<a13b4/a14b2a35b2/1]/a22]//4]/9{a39{/a29{/a19{/9[/8[/7[/6[/0>a21>/6[/7[/8[/8[//0>a31>/a21>/a11>/9[/8[a34i///1}a35}/a23}a28b1a38!1/8b1a14}a17b1a27!1a37b1///8[/7[/6[/a16(a36(';
_root.Level_g4 = '4/6(a16(a26(a36(/7(a18(a29(a39{/a28{/a19{a20>/1>7{a22>/3>a20t/5b2a24!1a34b1/3b1a13!1a22b2/a16[/a17[/0)a11)a18[a22)a32)/1)a10)a17[/a16[a12i///a10}/1}a33}/a24}///6b4a18<a14>///4]/2]/5]//9{a38{/a27{/a16{a15k/6{a36{a35g/a26{a25g/a16{a15ga35h///a22>/a13>a18b6/5>///8[/a26[//5[a12i//0t/9{a38{/a27{a36~/a18{/9{///3>7pa22>/5>a17pa24>/a20ca21ca30ca31c/0c1ca10ca11c/0}a33}/a25}/a16}/5}a35}/a23}/a10}a17b2a36b1/5?1a14b1a23b2/9(a18(a27(a36(/6(a16(a26(a36(/6[5g/7[/5[/4[3g//0>a21>/1>a23>/a12ca22ca21ca23ca32c/8{a37{/a27{/a18{a12u3/3u2a24u1a35u1/2>a20t/1>a20t/3>/9{a38{/a28{a37n/a18{a27n/8{a39{/4b6a21>//8[/6[/5[//0>a20>/0>a21>/2>a24>/+5}a35}/a24}/a12}//9<7fa28<a26f/7<5fa26<a24f/6[2b4/6[2!4/8[3!4/6[2b4/6[/7z';
_root.Level_h1 = '1/5{2b3///5}8b3////7[/6[/4[/2b2a23?1a33b1/4b2a25b2/a22>/3>a23>/9(1c2c3c0ca19(a10ca29(a20ca38(a30c/0>7(a17(a20>a27(a37(/1>7(a17(a22>a27(a37(/2>7(a17(a14pa28(a39(////4[a33g////6{//4}//6b2a27b2//6>a25>/3>a20>/9[/8[/6[/3[2k///0>a21>/2>7u2a21>a27!2/0>///3{2ka34{/a24{/a14{a31i//5[/6[/6[a35g/4[////0>a23>/5>a26>/a12ca21ca22ca23ca32c///7[6k/8[/8[/8[0>7ha21>/8[2>a23>/2>a21>a29</0>8<a27</5<a24</3<a23<///4[/a23[a22n//4[/a27[a23b4/a24b2/2}5b1a16b1/a24}//3}/a25}//9</8</7</5<//5[a34k/a26[//6[5k/a20}a26[/a15ma21}/a22}/a23}/a26}/a1+/5[/a24[/1b6/4[/a23[///a21>/2>8[a22>/a27[a26g//0}5[4ga30}/a20}/a11}/2}a26u2a32}/7u1a17!1a23}/a15}/a21>/a11>/2>a34>/9[/9[/8[/0>6[a20>a35m/1>a21>/2>a22>/4p/a12p/3<a34</a24</a15<//5[/a14[a11b4/a12b4a25[/a36[//a12b2a33b1/4b1a15b1a26*1/0>a21>/3>a26>/6>a23>/1>a20>/9[8k/9[/9[a38g/8[/6[a35h//5{/4{/3{//a21>/a11>/2>a26[//6[/a25[//0}/1}/4}a26u3/8<a28</8<a27</6<//3{a10v////4]/8{a38{/a27{/a16{//2]/a23]//5]//a28</a17<a24i/8</3}/4}a27b4///5[//a20>/1>a23>/5>a26>/6>a25>/3>a21>/0>';
_root.Level_h2 = '7/4)a34)/5)8b4a35)/6)a36)///7{a16ma32]/a30]/a30c/0ca10ca11ca12ca25]///3>a20t/2>/1>//5(2b4a35(/4(1b4a34(/6(a36(//1]/3]///a36(/5{a36(///a21>/3>a22>a27!2/2u48b20ta28!2a20t/2>7b2a23>/1>//7[a22i/6[/5{a12ia36[/a15na37[/a26n///4)a34)/6)a36)/5)a35)//a18b1a28?1a38b4/6}///8<a37</a26<///2)a32)/4)a34)/3)a33)//4}/5}8b8/5}/5}/9[2c8ka11ca12ca13ca22c/9[a38g/8[/7[/0>5[4ga30>a34g/a20>/a11>/3>///4}/5}/5}///7(a37(/6(a36(/4(a34(a32b2/a13b2a34b2/a15b2/1]/a23]//5]/7p/a37p/5}/4}/2}/9<a28</3)7<a27<a33)/2)a32)/1)a31)/a20ca21ca30ca31c/0c1ca10ca11c/3]/5]8b1a18!2a38b1/6]/+5(1)a35(a31)/6(a36(/4(a34(/0]a33b3/a20]a24b2/5b3/1]/a23]//8{a37{/a26{/1)5ga16{a31)a35g/2)a32)/1)a31)/9[2)a32)/a18[/a27[/3b1a13!2a37[a33b2//6[/0}2pa31}/a22}/8[a13}/8[a24i/1)a31)/2)a32)/4)a34)//8<a38</a27</a15</a32b5/4{0}///a35b5/3}7{///7(a37(/6(a36(/4(a34(//a22>a39[/2>a21>a39[/0ta21>a39[/2>a22>/6p/5p/4p/3p/5(a35(/a20]a26(/a16(/1]7(a37(/a23]/a28</7<6ka27</8<a28</8<a17n/1]/3]/3]/2]/6b3a35b3/a24b2//a23<////5(a35(/4(a34(/6(a36(//1}/3}/9[4}/8[4}/8[/7[6h/7[/6[/0>5[a20>/0>a20>/1>a21>/2>a24>a27b4/4>a23>/2>a20>/6(a36(/5(a35(/4(a34(/3(a33(/a22b2/3b2a24b2//6[/2]/6[';
_root.Level_h3 = '3/5[/4[/3[1b8/4[//1>5<///6<2>///7<3>/9(a18(a27(a37(/7(a17(a27(a37(/6(a16(a25(a34(/4(a15(a27(a30)a38(/1)9(a12)a23)a33)/3)a14)a24)a39(a33)a36b4/8(2)a18(a12)a29(a23)a34)/5)a15)a25)a34)/3)a19(a11)a28(a20)a37(/7(a16(a26(a36(/6(a17(a27(a37(/7(a17(a27(a38(/9(/0]/9[1]/8[2]/7[3]a35u1/3]7[5!4/3]7[5u1/2]8[/1]9[/0]/a23>/4>a32c/3c2c1ca12c/6^a26^///4<1b4a23<///4p/a15p/a26p//a39(/7(a16(a26(a30)a37(/2)9(a13)a23)a32)/0)/2]/a23]//5]//a28</a17</7<a36</3i/1}a32}/a22}/a13}a36b1/4}7b6a34}/a23}a26b1/a11}/a26</a16</7</1]/a22]/a32]/a29(a37(/6(a16(a27(a39(a33b2/a14b2a35b2/a16b2/a24>/5>a23>a25ca24ca34ca35c///7{a36{/a25{a24k/0]a15{a34g/1]/1]//3>7<////4>8<////0>4<//a30)/2)a13)a23)a32)/8{0)5b2a24b2a37{/3b2a26{a22b2/a16{/+4}/3}/5}/4}/a28</7<a25<a32i/a18ca29ca28ca27ca38c/a30)/2)a13)a23)a32)/0)9[/7[4b4/6[3b4/7[0>a31>/a23>//a39(/7(a16(a26(a37(/9(0]/0]/1]/2]9<a27<a34p/8</4p/a14p/8{/a17{/a26{/a35{//4{a32b2/a13b2a34b2/a15b2/2>a23>////4[3k/a15[/a25[/a36[/a25g/7[0>a20>/1>a15b4a23>/a39(/7(a16(a26(a37(a30)/9(2)a13)a23)a32)/0)//4]//8<a37</a27</a18</2}3ca13ca23ca34}/a24}/a13}//0)a11)a23)a34)/5)a15)a24)a34)/4)a13)a22)a27b1a31)a36b1/9(0)5b1a18(a14*1a27(a36(/6(a16(a27(a37(/6(a14(a23(a33(/4(a15(a27(a39(/a30)/2)a13)a24)a34)/4)a14)a24)a33)/3)a12)a20)/a29(a37(/6(a16(a26(a37(/8(a10)a19(a21)a32)/3)a14)a24)a34)/4)a14)a23)a31)/0)/9(a17(a26(a36(/7(a19(/a21>/a11>/1>a32>//7[/6[5g/6[a35g/7[a30)/2)a13)a23)a32)/0)/7<a27</6<a26</1]/a12]a16b3/6!3a22]a36u2/a16b1a33]//a29(a37(/6(a16(a27(a39(a30)/2)a13)a23)a32)/0)';
_root.Level_h4 = '9/6(a16(a26(a36(/7(0>a18(a29(a21>a22ca39{a33ca32c/3>a28{a22>/0>a16{/5{a35{a34h/a26{/a18{/0]/2]/3]7b8/3]/2u40ta20t/3]/3]/2]/0]9(a18(a27(a36(/6[0}a30}/6[5~a20}/6[a10}/4<0}a27<a30}/6<a28[a20}/a10}a28[/0}a17ha30}/a20}/1ta10}/0}a11ta31}a32c/2ca12ca23}/a12}/0}a35b2/a14b2a33b2/8[a12b2/7[/6[/4[/a12p//1>a23>/9[/7[3i/6[/0}6[a30}/7[3b2a20}a23!4/7[a10}a23b2/6[0}a30}/5[4ka20}/6[a10}/0}7[a31}/9[a22}/9[a11}a38m////4[a33h/a18ca29ca28ca27ca38c//a20>/2>a23>/3>a22>/0>a29{a25b1a34b1/3b1a18{a12b1/6{a33{/////3]/a24]//5]a27p/a25]/7p//9<a38</a26</a17<a10}/1}a32}/a23}/a14}/9[8k/9[a38g/9[a38g/8[/6[/3[/a18ca29ca28ca27ca38c/a30>/a21>a26b2/7b2a13>a28b4/4>////4>a33>/a21>/9[a10>/8[/6[0ca10ca20ca30c/6[0}a30}a35h/a20}/a10}/1}a33}/a26}a28b6/a15}/+9(a18(a27(a20)a36(a31)/6[1}4b2a24!8a31}/6[a21}/6[a11}a24b2/7[0}a30}/7[a20}/8[a10}/9[/8z';
_root.Level_i1 = '1/5<//a17b4a24>///5<///6[/a25[//3[2ga32g/////3>a35>/a24>///a17{a13}a15b3////a11}a15{a13b3////2>a33>/a25>/a16>/6p/8[/7[/7[/5[a34h//1>a33>/a23>/a15>/9(a19(a28(a37(/6(a16(a27(a38(a30>/9(a11>a33>/6!2a25!1a34!1/7[/7[/7[/6[a12i/4[/a18ca29ca28ca27ca38c/1>a32>//6[/0>a30>/a21>/a13>//5{/4{/4{/3{2m//0>a21>/2>a22>//5[/a24[a23g/a35[/a24k/a11>a31>/a15{/6{a37{/a28{/4i//6[/4[/2b4/3b2a24b2//3>///4<//2]/2]/3]7b4/5]a39(/9(a19(a12ca29(a23ca22ca21ca39(a32c/8(a17(a26(a36(/6(a17(a28(a39(/0>a21>/3>a15b3/7{4b1a37{/a26{/0]a16{a35k/0]/1]a29</3]8<a28<a37g/9<a2+a27[/a24[a23k/a26[/a25[a20>/0>a14na20>/0>a21>/2>a23>/4>9[/8[a15u3/8[5!2a25u1a30)/0)a11)a22)a33)/3)a13)a24)a34)/3)a12)a21)a30)/9{a38{/a27{/a15{a34h/0>a20>/0>a20>/6[5k/7[/7[/6[/0}a31}/a23}/a14}a19<a39<a36b2/a18<a15b2a38</0]a19</1]/3]///4<//a36b4/3>/a39c/9ca19ca29c/5[/0}a31}a33p/a21}/4pa12}/9(a18(a27(a36(/5(a15(a25(a35(/6(a17(a28(a39(//a24<///a36b4/3>///a24</////6]//9{a39{/a28{/a16{a15m//9[1>5b4a22>/8[2>6b2a23>/9[/a17[///3>/4>/4>//6[/6[/6[/5[2u4/4[//a21>/a11>/2>a30c/0ca10ca20c/8{a37{/a26{a23i/0]a16{a32i/1]/1]/2]/a26</a16</5<a34<';
_root.Level_i2 = '2/4[3k/6[/5[/6[/3[2k///3b4a15<a11>///5b4a17<a13>///7b4a19<a15>///2b4a10>a14<////5{///4}//a19[/a18[/a16[/a13[/2m//0)a12)a23}/a13}/9[2)a10)/7[/5[a32i//3b4a15<a11>///7b4a19<a15>///4b4a12>a16<///7b4a15>a19<//0)a12)a23)a33)/3}a32}/a29<a21}/8<a10}a27</6<a25<a31i/7<a29</a39c/9ca19ca29c/3[/a19ca29ca39c/9c//2]a28</7<a27</6<3u2a24!4/a25u2/2}/3}/5}/6}///3</5</4<1p//0)a11)a22)a33)/4]/5]/6]/5}a34)/3)a12)a21)a30)//6<2pa36</2pa25</a13</4<//0}a32}/a23}/a15}////2b4a10>a14<///a25b4a37<a33>///a25b4a33>a37<////7b4a19<a15>/+6(a15{/4(a13{a12k/3[/4[a33h/6[/9[0>a21>/3>a25>////5[/0>a21>/2>a23>/4>a23>/2>9<a20>a27</6<a25</5<a26</7<0>a29<a22>/3>a23>/2>a21>/0>a29(a38{/a27(a36{/a25(a34{a33k/a24[/a35[//6[a35m/0>a17[a21>/1>a20>a28[/1>a17ma22>a39[/2>a21>//6[/4[/5[//1>a31>/a22>/6b4a14>a18<///4b4a16<a12>///7b4a15>a19<///2b4a14<a10>///1]/a12]a16p/a24]a36p/a36]////9(a18(a26(a35(/4[/5[/0]7[/2]9[/4]7u2a27!4/4]a27u2/4)a13)a21)a30)//8<a36</a24</a28ca29ca38ca39c/8c9ca18ca19c/3[/a13[/a24[/a35[//6[/a30>/a10>a31>/5b4a17<a13>///6b4a14>a18<///3b4a15<a11>///7b4a19<a15>';
_root.Level_i3 = '3/1)6(a12)a17(a21)a26(a32)a37(/1)6(a12)a17(a21)a26(a32)a37(/1)8(a10)a19(a25b4/a24b4//4[a33g///3}/4}/5}/6}//9(a18(a26(a35(/5(a16(a28(a39(//2>a23>////6]//7b4/6b2a25b1a34b1/8{a37{/a25{/a14{a33k//a20)a31)/2)a12)a21)a29(a30)a38(/7(a17(a28(a39(//4]///7{/6{/5{/4{a21i//a16u1a23>a26!2/6u1/7[/7[/8[1>a22>////6]/a12ca21ca22ca23ca32c///9(a18(a26(a35(/5(a15(a25(a35(/6(a17(a28(a39(//3>//6[5k/7[/8[a37g////6}8b3////5{////5<a24</a13</a14<///3]/a14]/a18u2a25]a38!2/a18u2a34]//3]//9(a18(a26(a35(/5(a15(a25(a35(/6(a17(a28(a20)a39(a31)/2)a13)a23)a34)/4)a15)a25)a35)/4)a12)a21)a30)///a14</5<1pa35</a26<a21p///3]/3]/4]5ca15ca25ca35c/6]/+6]/8b4/7b2a26b2//7<a36</a26</a15</3<///3]/a14}/5}8b3a34}/a36]///a29(a38(/6(a15(a24(a34(/4(a14(a25(a36(/8(a19(/a22>/a23>/a25>//9{a38{/a26{/a15{a14k/5{a35{/a14ga26{/a18{//a30)/1)a13)a24)a34)/3)a12)a21)a30)a39(/8(a17(a26(a35(/4(a13(a23(a33(/3(a13(a24(a36(/8(a19(a30)/1)a13)a24)a34)/4)a14)a24)a33)/2)a11)a20)a29(a38(/7(a16(a25(a35(/5(a15(a26(a38(/9(a19(a10)a21)a31)/2)a12)a22)a33)a36p/4)a14)a24)a33)a36p/1)a10)a29(a38(/6(a15(a25(a35(/5(a15(a26(a37(/8(a19(/a23]a27b4/a34]a38b4//4]/a15]/a26]/a32c/1c2c3ca12c///4[a33m////2>a33>/a23>/a14>/6>/a39(/8(a16(a25(a34(a31!4/4(a14(a24(a35(/6(a17(a28(a39(/0>a21>/0>a22>///4[a33n///a20t/3>a24>/a12ca21ca22ca23ca32c///7{/7{/6{/4{/3{/2b4/3b2a24b1a35b1//0)a11)a23)a34)/5)a15)a25)a35)/4)a13)a22)a29(a31)a38(/0)7(a16(a25(a35(/4(a14(a24(a35(/6(a18(a29(';
_root.Level_i4 = '4/6(a16(a26(a36(/7(a18(a29(a20>a39[/1>a23>/4>a26>/8b2a27b2/6b1a15b1a24b1a33b1//3{2ka33{/a23{/a14{a33h////5]/a26]//6]/a25]a28b6//7b2/9(a18(a27(a36(/6[5k/6[a20>a35g/7[1>a21>/5[////4]/a12ca23ca22ca21ca32c/9{a38{/a27{/a17{/6{a35{/a23{/2h//a24>/a15>/5>a33>/8[/a17[/a26[a22p/a35[a32p///2>a33>a38b2/a18!2a25>a38b2/a16>//9[/8[/7[0}a31}/7[4b3a21}a34,1/7[4b8a11}/7[1}a31}/8[a21}/9[a10}///6>///5</0]/2]/3]/3]/0ca10ca20ca30c/6{1>a20>a36{/0ta26{a20t/0>a16{a21>///7[1p/6[/4[3h////4>//9(a18(a27(a36(/6[3b4/5[2b4/3[///a23>/a14>/4>a35>///5[/4[3k/4[/5[0}1ca11ca21ca30}a31c/7[1ca11ca21}/8[a12}/9[3}a33}a36i/a24}/a16}/+7<3>///4{a35{a32!6/a25{/a14{/a19ca29ca39c/9c//6]/8z';
_root.Level_j1 = '1/3{a33{a31b6/a24{/a15{///5>a37b2/a16b2a35b2/a14b2/7[/a15[/a24[/a33[/2k////a26>/5>a25>/6>///4{3k/4{/5{a22i/5{/1>a21>/2>a22>//5{a24h/5{/4{/4{//0)7b7a12)a21)a33)/2)a14)a23)/1ca10ca12ca11ca21c/6[/a26[//6[/a25[a24n///2}6{//a14]/a24]/a35]//6]/8u2a27u1a37!1/6u1a16!1a25!2//5{a24m///a25>////5>a26>/6>a25>///5[/a19ca29ca39c/9c//a14}a18{a16b3////4[3k/a14[/a25[/a20)a37[a31)/1)a11)a21)a23ia30)/5b2a25?1a35b1/6b4//4}8{////4[/2p/a13p//0>a21>/3>a26>/6>a25>/4>a22>/1>9<a20>a28</7<a25</4<a23</3<a11ia24</6<a28</9<0]/a12]/a24]a27b4///a24{/a14{/5{a36{/a2+a24]/a33]//5]/a12ca21ca22ca23ca32c//5[/a16[a13b4/0>a20>a27[a24b4/1>a22>/3>a24>/4>a23>/1>a20>/7{a37{/a26{/a14{a23n///4]///3</3</4<1!2/6<//4]/a13]/a25]//9(a19(a29(a39(/8(a17(a26(a35(/5(2b1a15(a12!1a25(a22b2a35(/5(0]a16(a28(a39(/1]/2]/4]/a12ca11ca21ca22c///a14</4<a33</a23<//4{3ga35{/a23{a22g/a14{///3]/0ta24>a28b2/5>8!2a24>a28b2/0ta23]////a15</4<a33</a24<//a11}/3}a34}a38b6/a24}/a15}/6}a36}/a25}///a25[/a36[//4[a33k//2>6<a38ca39c/8c9ca18ca19ca28ca29c//3{/3{/4{/6{/0)a11)a22)a32)/3)a14)a24)a34)/3)a12)a21)a30)a39</a18<a36</a13</2b2a23b2/4b2a25b2//5]/a14]/a24]/a36]//5}7pa34}/7pa22}/a10}a28</7<a25</3<';
_root.Level_j2 = '2/4<a34</a23<a21b5/a13<//a20)a31)/3)a15)a25]/a26]/a25]/a25)a33)/1)a10)a25p/a35p//6}a35}/a24)a33)/1)a10}a19{/8(a16(a25(a34{/a23{/2m///4>a34>/a22>a27b5/a14>///5[/5(a14(a23(a33(/4[/5{a36{/a28{/a19{a20>/0>a21>/3>a24>/a17b2a36b2/a15b2a34b2/9(a18(a27(a36(/5[a34k/6(5ca17{a16ca15ca26ca25ca36ca35c/6(5ca15{a34g/4{a33{////a24>/3>//6{/5{/4{a23k//4[/5[/6[a33i///a15>/6>a35>/a22ca31ca32ca33c/2c//5[/a15{/a15(a35(a34n/a15(/3b4a11>a15<//a24b4a36<a32>///5b4a17<a13>///5[///a21>/3>a24>/4>//9(0]a19(a28(a38(/7(1]a16{a15k/6{1]a36{/1]a15ha27{/0]a19{///3<////6>//8[/7[/6[/7[/8[0>a31>/a23>/a16>/a18b2a37b1/6b1a15b1a24b1//3[/+3<a33</a33<//3<a24</6<a29</a20)a31)/3)a14)a25]/a24}/a13}/9<1}a27<a30}/5<a26</3b2a24b2/5b2a26b2//6]/a37p/a36p/a35p/9(a18(a26(a35(/0}5{a31}a36{/a22}a28{/a13}a19{/3)a12)a21)a30)//a32b4/0>4<//a24b4a36<a32>///6b4a14>a18<////9(a18(a26(a35(/4[/5[1b4///4>a25>/3>a24>/a10t/6]/5}a34)/3)a12)a21)a30)/9<a27</5<a24<////4]a29[/3}a28[a31}/a27[a20t/0ta28[a21}/a13}a29[/4]///6<a25<a31i/4<a23<///0)a11)a23)a34)/4}a33}/a29<a22}/8<a11}a27</0]6<a25<//a22b4a30>a34<////6b4a18<a14>///a22b4a30>a34<///a20)a31)a37p/3)a14)a25)a36)/6)a15)a23)a31)/0)/a26</a25<a34g///a24>/a25>/a12ca23ca22ca21ca32c/a19{/8{a37{/a20}a26{/a11}/2}a33}///5</a23>';
_root.Level_j3 = '6/5[/4[a33k/6[/4[a31i//3>a34>/a25>//8(a28(/2)4b4a22)/6(a26(//4]/a15]/a25]/a33]/a29</8<a26</5</0>a21>/3>a24>/8[7n/8[/7[/6[5n//6<2>///5[4k/6[//4>a34>/a23>/a11>/8ca17ca18ca19ca28c/3{a34{/a26{/a19{a13b2a34!1/5!1a16b2/2)a22)/5)a25)/3)a23)/9{a38{/7m/3>7<///5[/0}a31}/a22}/a13}/4}//a25</6<a25</4<//2]a26b2/3]7b2a28b2/5]9b2/4]/2]/0ta20t/a26[/a15ha26[/a15ha26[/a15ha26[//a29ca28ca39ca38c/9c8ca19ca18c/a23</a14</5<//1]/3]7u1a17!2a37u1/2]6u1a16!2a36u1///6<a25</5<a26[a30t/a26[a30t/a25</5<a26<//1)a21)/3)a23)/5)a25)/1)a21)/8(a28(/6(a26(/4(a24(/6(a26(/0}a31}/a22}/a13}/3}a33}/a22}/a10}a28</7<a25</3<a2+a25]/a34)/a14)a35]///9<a37</a26<a22p/a16<a22p/5<a22pa35</a24</a13</8ca19ca18ca17ca28c/0}a31}/a23}/a16}a18b6/6}a35}/a23}/9[a10}/8[/6[/5[//2b4a14<a10>//0}a31}/a22}/a12}/2}a32}/8[a21}/6[5ka10}/7[a36g//a16<a12>///3[///5)a25)//9{a38{/a26{/a15{a14h/5{a24ha36{/a28{/a19{/0>a30>/a29<a21>/a17<a13>///6(a26(/3[/a16(a36(///4>a25>/5>a23>/a10ca20ca30c/0c/9{/8{/6{/3{////6)a26)/a20t/0}a31}/a21}/a11}/9[2}a33}/8[6u3a23}a36!1/8[5!1a13}a15u3///3>a32>/a24>/a16>///6[/a15[a14k/a25[/a14ga34[//8ca19ca18ca17ca28c//9<5>///4[/a15(a35(/a14[///a15]/a24)/4)a25]';
_root.Level_j4 = '4/6(a16(a26(a36(/7(a18(a29(a39</a18<a10>a36<a32>//a24<a20>////5]8u4/7u4//9{/6{/4{/3{//4b4a12>a16<///9(a18(a27(a36(/6[/7[6ca16ca26ca36c/6[a35h/6(a17(a28(a39(/0}a31}a37</a15b5a20}/a11}a27</0}/5[/a15[/a34[a33k//4[a33g//1>a23>/2>a24>//9(a18(a27(a36(/6[2b2a22!1a32b1/5[1b1a11!1a21b2/3[/3(a14(a26(a38(/0}a31}/a23}/a14}/3}9<a32}a38</a21}a27</a10}a16<//2ca12ca13ca11ca22c/6]////4[//0>a20>/1>a23>/0t/a30)/1)a13)a24)a34)/4}6pa33}/5pa25}/a14}/9[0t/9[/8[/6[0>a31>/a22>/9{a37{a30}/a26{a21}a25k/a16{a11}a33i///3[/a14[/a24[/a33[////6b4a14>a18<///a16{/a14{/a13{a22k/a14{/a16{/7{0}a38{a31}/a29{a22}/8na13}/a14}/a16}/a15}/a14}//7<a36</a25</a13</a12b1a23b1a34b1/5b1/5]/+5<a35</a24</a13<////6]////9(a18(a26(a35(/5[/6[/0>8[a21>/2>9[a24>a27fa25f/8z';
_root.Level_k1 = '5/4}/8{a17k/4}//5{2b4//a25}///5{a14k//0]/1]/3]/6]//9[/8[a14i/6[/3[//3b4a15<a11>///6b4a14>a18<//7[/6[/4[/3[a11p///2}6{4b4/a20>/1>a21>/0>a21>/3>a26>///a18ca29ca28ca27ca38c/4[/a12u1a22!1a33u1/4!1a15u2/0)a11)a23)a34)/4)a12)a24)a33)/4)a13)a21)a30)//8{a17ha38{/7ha28{a37h/a18{/7{a36{/a25{a34k///8[a24i/8[a23i/8[a24i/8[/7{//6<a21)a24*1a23*1a32)/5<0)a11)a22)a30)/6<//1]/2]6b4/2]7b2/4]///7{a36{a32u1/2!1a12u1a24{a21u1a31!1/1u1a13{///1}a32}/a24}/a15}///3b4a15<a11>///6b4a14>a18<//9{a36{/a24{/a13{a32k/3{/3{a22g/a13{/a33{/a37c/6c8c7ca17c//3]/a14]/a26]a28b8/a35]//a29</8<a26</3<a2+a23]/a23]/a24]/a26]////3b4a15<a11>////5}/6}/4}/5}//0)a11)a23)a34)/3)a12)a21)a29(a30)a38(/7(a16(a25(a23pa36(/8(a19(a23p//6]///9{a38{/a26{a25ca35c/5ca13{///4b4a16<a12>///6]/4]/3]7b4/3]6b4///8{a36{/a25{/a14{a23k//1}a33}/a24}/a15}///4b4a12>a16<////7[/a27[//5[4g/a25[a24g////5]/a25]//4]/a24]/a32c/1c2c3ca12ca29</7<a25</4<a25<///0)a11)a23)a34)/5)a16)a26)a35)/3)a11)a20)//5<a36</a26</a17<//1]5u1a15!2a36u1/3]7u1a18!2a38u1/5]//9{a38{/a26{/a13{///6b4a18<a14>////3[2k/a14[/a24[a23g/a35[//8ca17ca18ca19ca28c/2}/4}/5}';
_root.Level_k2 = '7/6)a36)/6}a35}/a23}/a10}a19{/7{a36{a35g/a26{/5ga16(/6(/3b4a15<a11>///2ca13ca12ca11ca22c/5]/a14]/a26]/a35]//a19{/7{a36{/a24{a20p/a13{a21p///2)a10ta32)/4)a10ta34)/9(3)a10ta39(a33)/7(5b4a37(/8(5!3a38(a35b1/2}a34}/a25}/a15}//a27<a24f/a16<a13f/7<3fa35<a32f///4)a14ca24ca34)/9(2)a19ca12ca29ca22ca39(a32)/7(a17ca27ca37(//2]/a14]/a25]a28b3/a18!3a35]/8b3/a29</a16</5<//a24]/a36]//5]/7b4/6b2a25b2/9{a36{/a24{/a13{a12k/3{a33{/a23{a22g/a13{a12g/4{a36{/a28{a20}/a19{a11}a35i/2}a33}/a23}/a12}/1}8<a30}a37<///5]/a12ca23ca22ca21ca32c///3[/5[/6[/0>6[3pa21>/2>a22>/1>a20>//4(a34(/6(a36(/5(a35(//1}a33}/a22}/a15}////3[a32n///a26b4a38<a34>///a23b4a35<a31>////6}a35}/a23}/a10}/+5[/a23[//4[1u1a11!2a31u1///3)a13ca23ca33)/5)a15ca25ca35)/4)a14ca24ca34)///3b4a11>a15<///3}/3}/4}/6}/8b2a27b2/6b1a15b1/a24[/a11i//0>a31>/a23>/a16>///3[a32k/6[/8[/2)9[a32)/4)9[a34)/2)9[a32)a38g/4)9[a34)a38g/8[/6[/3[a32m/a18ca27ca29ca28ca38c//a25>/a15>/4>a32>/a28</a16</5<a35<///3)a33)/5)8b4a35)/4)7b4a34)/9[/7[/6[0>5ga20>/6[1>a21>a35g/2>a22>/3>a23>///4[//3{2ka34{/a26{/a19{/2)a32)//6[/a24[//3[///2}6p/4}a17p/3}//5b4a13>a17<////4[a10>/a26[a31>//5[a11>//9{a38{/a26{/a13{/a18ca29ca28ca27ca38c//2)a32)/4)9<a29<a34)/3)8<a28<a33)/7<a27</6<a26</5<a24</3<///a34)a38b5/5}a34)';
_root.Level_k3 = '3/9(a18(a26(a35(/4(a14(a24(a34(/5(a16(a27(a20)a38(a31)/8(2)a18(a13)a28(a23)a38(a34)/8(4)a18(a14)a28(a24)a33)a38(/2)8(a11)a18(a20)a28(a38(/7(a16(a24(a33(/3(a13(a23(a33(/4(a16(a28(a39(/2b4/3b4/0]4b2/1]/3]/6]///4<a13ga35</a25</a14<a23g//0}a31}/a23}/a14}/4}a33}/a22}a36b2/a11}a15b3/0}9(4b1a18(a26(a35(/4(a14(a24(a34(/5(a16(a28(a39(//a12b4a20>a24<////4]/6]/5]/a12ca23ca22ca21ca32c//a24{/a23{/2ka25{/a24{/3g///8<4>a23>a28</3>7</9[/7[/5[a11i/3[///0)a11)a23)a34)/5)a15)a25)a35)/4)7b1a13)a17?1a23)a27!1a33)a37b1/4)a15)a26)a36)/5)a13)a21)a30)///3[1p/a14[a11p/a24[/a33[///a14b4a22>a26<///a12ca23ca22ca21ca32c/5}/6}/6}/4}/1}//a24</a15</3<//a10)a22)a33)/3)a12)a19(a20)a27(a36(/6(a17(a10)a29(a22)a33)/3)a12)a20)///6]/a18b2a37b2/a16b2a35b2//a24</a15</5<a36<//3[///a26<a22>/6<1>a21>a25</+5]/a16}/5]/a16}/5]/a12ca23ca22ca21ca32c/a26</a15</4<a33<///9(a17(a25(a34(/3(a13(a23(a33(/4(a16(a28(a39(/0)a12)a24)a35)/6)a16)a26)a36)/5)a13)a21)a28b6a30)//6>a34>/a25>a27p/a13>a27p//a35[//3[/a14[/a20>a26[/1>a22>/2>//a23<a32m/a14</4<a35<//0)a12)a24)a35)/5)a15)a25)a35)/4)a12)a21)a30)/7{/4{/3{/3{a11i///5>a36>/a26>/a15>/9{2ca13ca12ca11ca22ca39{/a28{/a16{/5{4ka35{/a25{/4ga15{a34g/6{a37{/a28{/a19{a38g/6<2>a21>a26</1>5<a34b2/a15b2a36b2/a17b2a34]//6]////2b4a10>a14</0]/1]/4]/6]//a27{/a16{a15k/0>7{a20>a36{a35n/1>a22>/2>a18ca19ca21>a28ca29ca38ca39c/0>8c9c/4[3k/4[/0}5[a30}/7[a21}/8[a13}/4}9[a34}a36b5/9[a23}a38g/5b3a11}/0}/0)a11)a23)a34)/5)a15)a25)a35)/4)a14)a25)a36)/6)a15)a23)a31)/9(0)a17(a25(a34(/3(a13(a23(a33(/3(a14(a25(a36(/6(a15(a24(a33(/3(a14(a25(a36(/0)7(a10)a17(a21)a28(a31)a38(/2)9(a13)a24)a35)/5)a15)a25)a35)/4)a12)a21)a30)';
_root.Level_k4 = '8/6[/a14[a21b8/a23[///a24>//a29{/a17{a22i/5{a34{/3ma25{/a17{/9{/4>//a28(/5(a24(/3[/a14(a33[//a20}/a11}/2}5b2a25!2a32}/6!2a22}a26b2/9<a12}a38</2}a26<a32}/a16<a22}/8<a12}a13ca23ca39<a33c/3}4ca14ca24ca35}/a26}/a16}/5}a33}/a21}/a10}a28[/a35[//3[2na32n//a22)/2)a23)/3)a24)/4)a29[/a37[//8[/0}5pa31}/a15pa22}/a13}/9(a17(a28(a37(/6(a15(a27(a35(/5[/5[a14m//a24>//1]/3]a27b2/5]8b4/3]7b2/1]/7o4a33o1a38o1a36o1a35o1a34o1/9}//8[/6[a21i/5[/a18ca29ca28ca27ca38c/a21)/4)a25)/a12}/6}a35}/a21}//a15(a12b1a24<a21b2/5(2b1//2]/7<0ta23]/a28<a20t/3]/7<0ta22]///6)a26)/5)a23)/1)9(a20)a27(/5(a24(a21b5/4(a24(/5(a27(/9(/a33b4/5<1>//2ca13ca12ca11ca22c/6]/a14]/a23]/a33]/a39{/a29{/a18{a22i/6{a33{a32k/a23{/a14{/6{a39{/4i//6b4a18<a14>/+3[/a14[/a23[a22k/a35[/1p//a24>/8b2a15>a28!3/5>a18b2a36>/a19z';
_root.Level_l1 = '1/1b1a13<a10b2a31b1/4[a33h/4[/4[a33h/5[/2!2a23!1a34!1/5!1/4}/2ca13ca12ca11ca22c/a25</5<a34<a33k/a25</5<a29[/a18ga23</4<a25</7<a20t/0ta20t/6{a35{/a24{/a13{/a12b2a33b1/4b1/3>a25>/4>/a14b2a33b1/8[2b1/6[a22i/7[/a22>/a13>a38b4/5>a34>a38o5/a33o1a34o1a35o1a36o1a37o1/8>//3[2k//a14[a13k///a24}/a26}/a25}/a29[a27b4/a29[a26b2/5b2a20>a28[a21ca31c/0>1ca11ca21>a28[/3>a17n///4{a11i///a26]////9<a38</a26</a13</a17[/0)6ka11)a19[a20t/1)a10)a17[/6g//5]/a16>a36>/a15>a16ca26c/4]//a26{a22b3/a27{a23b3/a25{a22b3/a23{///a24b4a32>a36<///4[1p/3[1p//0}a32}/a25}/a16}/5}a36}/a24}/a19[a11}a12t/0}a18[/a18[/a17[/a15[a14k/a10>a30>/3b4a15<a11>/a31}/a23}/a14}/6}/a15>/6>a36>/a24>a27!2/a19<a16!2/7<a38<a32c/3c2c1ca12ca34>/a26>/a16>a3+a33[/a22k/4[/a14[/a25[/a14g/a20)a31)/3)a14)a25)a35)/5)a14)a23)a32)/1)a10)//5[/a14[/a23[/a34[a31p//1pa20>/1>a23>/6>///7{/0}6{/0}6{/1}5{///7{3}///3[/a24[//4[a21i//0)a11)a23)a34)/4)a14)a24)a34)/3)a19(a12)a28(a21)a37(a30)/6(a15(a25(a35(/5(a15(a26(a38(/9(/3[2k/4[/6[/7[a36n/1>a23>/2>///3[/4[2b4/5[3b4/7{a16ha37{/6h/a23>a38!4/4>a25>/a17p/a17p/a27b4a20t/0t/a24</5<a23<///2]9[8k/4]9[8k/9[5]/9[/9[8g/9[8ga10fa22f/9[8g4fa25f/4f/a23[/a29<a38h/9<a18h/2b4/a25(a33(/4(a13(//a25b4a37<a33>///a23[//4[/a26[//9[0}a33}/a25}/a16}///3b4a15<a11>///6b4a14>a18<';
_root.Level_l2 = '2/0)a12)a24)a35)/6]8b8/5]/4}a29<a33)/8<2)a11}a26</5<0]a25</0ca10ca20ca30c/0)a11)a22)a33)/4}/8{2c1ca11ca12ca33}/a37{/4ia20>/2>a24>/6>/a29(a38(/6(a15(a24[a23k/a25[a30>/a21>a26{/a12>a17(a29(a34p/2>a33>/a25>//9[/8(a17(a26(a35(/4(a13{/4(a16(a28(a22b2a39(/3!1a14!1a21>a25b1a36b1/3>a24>/2>a25>//9(a18(a26(a35(/5[4k/6{a37(/8(a18(a23>a29(a39(/a12>/9<0>a37</a26<a23i/a14<//0)a11)a23)a34)/5)a15)a24)a33)/2)a11)a19<a20)a37</a16<a23b4a31>a35<///a27b4a39<a35>///a24b4a32>a36<///a22b4a30>a34<///0)a11)a23)a34}/9<a23}a38</a10}a27</1]/3]/5]/6]/6)a15)a23)a30)//9(a16(a24(a33(/3[/4[a33h/5{a36{/a28{a20>/1>a19{a23>/4>a27b2/6b1a15b1a24b1a33b1/9(a18(a27(a36(/5[/6{a37{a30t/a27{a30t/a16{/5[/6(a17(a28(a39(//6b4a18<a14>//4b4a12>a16<///0)a12)a24)a35)/6]/5}a39{a34}/a29{a22}/a18{a10}/6{a34{/a13ma37c/8c7c6ca17c/a23>/a14>/6>//9(a18(a26(a34(/3{a34{/a25{/a10>a16[/1>a17(a28(a32>a39(/a17b4a24>//9(a18(a27(a36(/5[a11i/6(a18(a29(a39(/+3[a32k/5[/6[/6[a35g//2>a34>/a25>/a15>//7<a35</a24</a14<//0)a11)a23)a35)a38b1/6}8?1a18b3a35)/3)a10)a29</a17</4<a34</a26</a19</0)a13)a25)a36}/a25)a33)/1)9[a10)/8[/6[/3[2k/a14[/3ga25[/a14ga26(a37(/8(0)a19(a11)a23)a34)/4}a33}/a21}/a10}/a23>/a15>a38b1/4>8!2a28b1a36>/a22ca31ca33ca32c/2c/9(a18(a26(a35(/4[/5{a36{a33b3/a10>a28{a24b3/2>a19{a32>/a24>/a16>/5)a15)a24)a32)/1]/0]/2]/5]//a26</a15</5<a34</a15<a37</a19<a10>a32>/a14>a35>/a25>/a14>/2>7b2a26b1a30>a35b2//9(a18(a26(a35(/4{a33{/2ka34{/a35{/a37{/a20>a39{/0>5ia21>/3>a26>/6>a25>/3>a20>//5[/5(a14(a23[a22k/a23(a34(/4[/5(a16(a27[/0>a27(a22>a38(/9[a13>/8[2>a20>a37g/7(a16(a26[/a25(a34(/3[/4(a16(a28(a39(/0)a11)a23)a35)/6}a35}/a23}/9<a10}a28</6<0ca10ca27<a20ca30c/0)9<a11)a23)a29<a34)/5]9<7b1a17!3a29</5)9<7b1a14)a22)a29<a30)//9(a18(a26(a34(/3[/4(a16(a28(a39(';
_root.Level_l3 = '6/3[///6]///3(a23(//4b4a12>a16<//2b4a10>a14<//0}a33}/7pa25}/a16}a28p/6}a35}/9[a23}/9[a11}/0}8[/6[/3[//4b4a12>a16</1>a21>/9{a12>a36{/a24{/a13{a12k/4{a36{/a29{a22>/5ia13>/5>a36>/a22ca33ca32ca31c/2ca29[a36f/a37[/4f/5[a12f/a14[a21f/a26[a33f//2b4a14<a10>//0}a32}/9[8ka23}/9[a13}/8[4]///3[a30i//1)a21)/4)a24)/5)a25)/9{/8{/6{/3{//a26b4a38<a34>///4(a24(//a25)/5)a26]/a35)/a15)//a17<a13>/2)7(a22)a27(/6<2>/0]/3]/5]/6]8b3a38!3/6]a28b2/a15)a35)/a13)a33)/a27<a26h/a16</4<a33<//a21]/a23]/a24]/a26]/a32c/3c2c1ca12ca29{/a18{/6{a35{/a34[a33k//6{a37{a30t/a27{a30t/a16{//3)a23)/5)a25)//a23b4a35<a31>///5b4a13>a17</+6}a33}/a29{a21}/a10}a16{/4{a33{//a21]/a22]/a24]///a22b4a34<a30>////6]/2ca13ca12ca11ca22c//3[a32m/a20}/a11}/3}a36}/a25}/a13}/9{0}a36{/a24{/a13{/3[a32k/a14(a34(/a13[/2ga24[a21b4/a22b2a36[/a20>/2>9[a23>/5>//6)a26)/6]/5]/a13)a33)/9<a25>/9<a34>/9ca18ca19ca23>a29c/a17</6<a34</a20>a23b1a34b1/5b1a11>a16b1a27b2/3>a36>//9{/8{/6{/3{//a27b4a39<a35>///3]7[//6[2]//1]5[/a18ca29ca28ca27ca38c/a20>/a11>/3>a36>/a26>/a15>/9<3>a38<a30>/a26</a13<a11b2a31!2/3<a11b1a34</a20>a26</a11>a19</3>a36>//a14)a34)/a15)a35)a37p//7pa27(/7(a26(/6(a24[/a25[/a26[//1>a33>/a22>/a26[/a34[//5[2b4/3b1a14b1/3)a23)/5)a25)/6)a26)/a29{/a19{/8{a36{/a23{a22k/a14{/5{a36{/a20)a27{/0)a18{a21)/1)9{a23)a25i/3)a25)/5)';
_root.Level_l4 = '9/6(a16(a26(a36(/0>7(a18(a22>a29(/4>a25>/6]//7[/6[/4[/3[2ka32k//0>a21>/3>6b6a19(a24>a28(a38(/3>9(a21>/0>/6}a35}/a23}a29{/a10}a18{/6{a33{/2g//0ta20t/6]/8b3a37b2/a16b1/9(a18(a26(a35(/4[3k/4[a33g/5[/7[a11>a31>/9[a12>a33>/a15>a18!3/7!1a16!1/8(a17(a26(a35(/5[a34h/0}a32}/a24}/a16}///4b4a16<a12>/a20>/9[2>a23>/8[3>a22>/6[0>/3[1!4/8z+4b4a16<a12>//6b4a18<a14>//3b4a11>a15<//3]/5]/6]/6]/0t/9(a18(a26(a35(/4(a14{/2b2a23b1a34b1/5b1a22}/a12}/3}7pa35}/a17pa29</8<0]a27</2]/4]/5]/6]//0)a11)a23)a34)/4)a13)a21)a30)/8{a36{a35h/0>a25{a20>/1>a15{a21>//3[2k/6[/8[0]/9[3]a36i/5]/6]8!6/a27!1/a24b4a36<a32>/a29za22ca33c/4c5c6ca13ca22c/3c5c4ca12ca16ca22ca26ca33ca34ca35c/a12ca13ca14ca15ca26ca36c/5c4c3c2c/a26ca25ca24ca23ca32ca34c/2c4ca13ca14ca15ca16ca36ca35ca34ca33ca32c/2c4ca12ca14ca23ca25ca26c/6c5c4c3c2ca12ca14ca16ca22ca24ca26ca32ca36c//a16ca15ca14ca13ca22ca24ca32ca34c/3c4c5c6c/a23ca26ca32ca34ca36c/2c4c6ca12ca15ca32ca33ca34ca35c/6ca16ca25ca24ca23ca22c/6c5c4c3c2ca12ca14ca22ca24ca33c/a12ca13ca14ca15ca16ca26ca24ca22ca36ca34ca32c/6c2ca26ca25ca24ca23ca22ca32ca34c/2c4ca13ca15ca16c/a36ca35ca34ca33ca32c/2c4c6ca12ca14ca16ca23ca25c/2c3c4c5ca16ca26ca35ca34ca33ca32c/a12ca13ca14ca15ca16ca26ca36c/a12ca13ca14ca15ca16ca26ca36c/a12ca13ca14ca15ca16ca26ca24ca22ca36ca34ca32c/6c2ca22ca32c/2c3c4c5c6ca12ca22c//2c3c4c5c6ca16ca14ca12ca26ca24ca22ca35ca33c/a12ca13ca14ca15ca16ca32ca33ca34ca35ca36c/6ca16ca32ca33ca34ca35ca36c/6ca16ca36ca35ca34ca33ca32c/2c4c6ca12ca14ca16ca22ca26c/6c5c4c3c2ca12ca14ca22ca24ca33ca35ca36c//a12ca13ca14ca16ca32ca33ca34ca36c';
_root.Level_x1 = '0/4b4/0]8[//1]7[//2]6[///4b4/3b2a22b1/a36</a14<a35<//a12b4/a13b2a34b1////a12}a36b1/3]7b4/2}6b1////6[5k/6[/6[a35m////4<///1]/2]/3]/3u40ta20t/3]/2]/1]//1>a22>/3>a24>//8[/7[/6[/6<5na26<a35n/6[/7[/8[/a12]/a14]/a13]/a10z';
_root.Level_x2 = '0/6[/a26[//7[/4b1a14!1a29[a20]a25b1a35!2/a15b1a26!1a36b1/2]/a23]//3]////6<a35<a34g/a25<a34g/a17</////3]/a24]a27b4//4]7b4/a25]////7b4a19<a14>//////5[a34n///7[///1}a32}/a22}/a13}//8[/7[a36g/8[/////5b4a12>a17</////5[4k/a25[//6[2b4/3b4a18[/5i///0)a11)a23)a34)/5]/5)a24)/3)a22)/1)a20)//a19{/a16{/a17{a12b7/a15{///0]/0z';
_root.Level_x3 = '0/2)a22)/3)a23)/4)a24)/5)a25)//2]/a24]a28b8//5]a28b1////a19{/8{a37{/a26{a35g/a10}/1}a32}/a23}/a19{/8{a37{/a26{a35g//a20)/2)a23)/4]/7b4/6b2a25b2/a29</9<a28</6<a25<a24k/a34p//4p/3]////4]////6]////a30>a39</a21>a28<a25b5/a11>a18</0>9<//a29[/a38[//6[a11i/a14[/3m//9<a37</0)a28<a20)a24b3/1)a19<a15b2a21)a36b2/2)a23)/4)a24)///9[/a28[//6[/a24[a23g/a20z';
_root.Level_x4 = '0/8[/a26[a22p/a32p/5[/a27[///0>a25b3a31>/a16b3a22>/7b3a13>//9(a29(/8(a27(a23p/6(a26(a33p///2]/a27b8/a24]///3]//a25]/////5b4a12>a17<////5[/a24[/a13k/6[/a27[/a16g/0)a20)/2)a22)/1)a21)//9[/a17[/a26[a30>/a35[/0>a24m/a10>//2b8///6[/a25[/1i/5[a22i/a25[/////4}/2}/9{1}6p/9{1}5p/8{4p/6{//1]a18</a21]a38<//2]5b2a19<a26b2/a24]a39</a20z';
_root.Level_x5 = '0/1}7{/1}7{/2}8{/1}7{///0]/1]/3]/6]8b6/a27b2/6b1//a26<a35k/8<a20]a29</9</1]/a23]//9[4]/a28[//6[/a25[/////5{0}a22p/a32p//6{1}3p///7{2}///0>a21>/9<1>4b3a28<a20>a33b2/6<a12b1a25<///2]//2]//3]//5]//2)a22)/1)a29<a20)/8<a26</5<a11i//0]/a22]/a26b8/3]/a23]/a33>/a21>/a10>a29(/8(a28(/7(a26(/5(a25(/4(a24(///3]/a22]//0]9[8n/a27[//6[5m/a25</a17</4<a36</a23b2/4b2a25b2/0)a20)/1)a22)/3)a23)a30z';
_root.Level_x6 = '0/5[4k////5]8b4///3}a32}/a23}/a15}///6b4a14>a18<////3b4a15<a11>////5b4a13>a17<//8{0)7ka20)a38{/1)a29{a23)/4)a19{a24)a38g//9[/8[/6[5n/3b3a34b2/a15b1/1}a33}/a22}/a14}/9(a29(/8(a28(/0>7(a21>a27(/3>/a29{/a18{/6{a35{a32p//a21>/3>a17b4a22>/4>//7[/a28[//6[/a20)/1)a23)/4)//7[/a34[//a23[///3b4a15<a11>////6b4a14>a18<////3b4a15<a11>///0}a31}/a23}/a16}a18p/a28p//9{a38{/a26{/a13{///6[/2]/6[/0z';
_root.statBullet = new Array(16);
_root.statAbility = new Array(16);
_root.BulletUnlock = new Array(16);
_root.BulletName = new Array(16);
_root.BulletSpeed = new Array(16);
_root.BulletMass = new Array(16);
_root.BulletReaction = new Array(16);
_root.AbilityUnlock = new Array(16);
_root.AbilityName = new Array(16);
_root.AbilityDesc = new Array(16);
_root.BulletName[0] = '???';
_root.BulletSpeed[0] = 0;
_root.BulletMass[0] = 0;
_root.BulletReaction[0] = 0;
_root.BulletName[1] = 'Bullet Bill';
_root.BulletSpeed[1] = 3;
_root.BulletMass[1] = 2;
_root.BulletReaction[1] = 3;
_root.BulletName[2] = 'Thwomp #2';
_root.BulletSpeed[2] = 4;
_root.BulletMass[2] = 4;
_root.BulletReaction[2] = 2;
_root.BulletName[3] = 'Awesome Guy';
_root.BulletSpeed[3] = 1;
_root.BulletMass[3] = 3;
_root.BulletReaction[3] = 5;
_root.BulletName[4] = 'Subcon';
_root.BulletSpeed[4] = 4;
_root.BulletMass[4] = 1;
_root.BulletReaction[4] = 4;
_root.BulletName[5] = 'Super Koopa';
_root.BulletSpeed[5] = 3;
_root.BulletMass[5] = 3;
_root.BulletReaction[5] = 1;
_root.BulletName[6] = 'Chain Chomp';
_root.BulletSpeed[6] = 5;
_root.BulletMass[6] = 2;
_root.BulletReaction[6] = 4;
_root.BulletName[7] = 'Birdo';
_root.BulletSpeed[7] = 2;
_root.BulletMass[7] = 2;
_root.BulletReaction[7] = 0;
_root.BulletName[8] = 'Rocket Ship';
_root.BulletSpeed[8] = 2;
_root.BulletMass[8] = 5;
_root.BulletReaction[8] = 3;
_root.BulletName[9] = 'Pidget Bill';
_root.BulletSpeed[9] = 3;
_root.BulletMass[9] = 2;
_root.BulletReaction[9] = 2;
_root.BulletName[10] = 'Nyan Cat';
_root.BulletSpeed[10] = 3;
_root.BulletMass[10] = 3;
_root.BulletReaction[10] = 4;
_root.BulletName[11] = 'Guile';
_root.BulletSpeed[11] = 0;
_root.BulletMass[11] = 4;
_root.BulletReaction[11] = 3;
_root.BulletName[12] = 'Michael Jackson';
_root.BulletSpeed[12] = 2;
_root.BulletMass[12] = 0;
_root.BulletReaction[12] = 5;
_root.BulletName[13] = 'Rush Jet';
_root.BulletSpeed[13] = 1;
_root.BulletMass[13] = 3;
_root.BulletReaction[13] = 2;
_root.BulletName[14] = 'Kirby';
_root.BulletSpeed[14] = 5;
_root.BulletMass[14] = 4;
_root.BulletReaction[14] = 1;
_root.BulletName[15] = 'Kid';
_root.BulletSpeed[15] = 4;
_root.BulletMass[15] = 4;
_root.BulletReaction[15] = 0;
_root.AbilityName[0] = '???';
_root.AbilityDesc[0] = '???';
_root.AbilityName[1] = 'Stop Watch';
_root.AbilityDesc[1] = 'Slows time down to half speed, making those quick movements all that easier.';
_root.AbilityName[2] = 'Triple Bomb';
_root.AbilityDesc[2] = 'Three bombs surround your character and explode on impact.';
_root.AbilityName[3] = 'Fire Flower';
_root.AbilityDesc[3] = 'Shoots an array of fireballs, destroying any bricks or enemies they hit.';
_root.AbilityName[4] = 'Potion';
_root.AbilityDesc[4] = 'Rewinds time upon death.';
_root.AbilityName[5] = 'Warp Whistle';
_root.AbilityDesc[5] = 'Warps your character to the end of the level, requires a wind up time.';
_root.AbilityName[6] = 'POW Block';
_root.AbilityDesc[6] = 'Destroys all bricks and enemies on screen, even moves platforms.';
_root.AbilityName[7] = 'Boo';
_root.AbilityDesc[7] = 'Turns your character transparent, able to pass through all obstacles.';
_root.AbilityName[8] = 'Lightning';
_root.AbilityDesc[8] = 'Shrinks your character to a third size.';
_root.AbilityName[9] = 'Starman';
_root.AbilityDesc[9] = 'I\'m the Starman, Star S-Starman, I got that star I\'m hollerin\', I got that star come and try me.';
_root.musicTitle = new Array(15);
_root.musicTrack = new Array(15);
_root.musicTitle[0] = 'Title Screen\nRobotic Handbag';
_root.musicTrack[0] = 'MSC-TTL';
_root.musicTitle[1] = 'Overworld';
_root.musicTrack[1] = 'MSC-BG1';
_root.musicTitle[2] = 'Underground';
_root.musicTrack[2] = 'MSC-BG2';
_root.musicTitle[3] = 'Underwater';
_root.musicTrack[3] = 'MSC-BG3';
_root.musicTitle[4] = 'Bowser\'s Castle (SMB)';
_root.musicTrack[4] = 'MSC-BG4';
_root.musicTitle[5] = 'Overworld (Night)';
_root.musicTrack[5] = 'MSC-BG5';
_root.musicTitle[6] = 'Ghost House';
_root.musicTrack[6] = 'MSC-BG6';
_root.musicTitle[7] = 'SMB3 Desert Land';
_root.musicTrack[7] = 'MSC-BG7';
_root.musicTitle[8] = 'Wart\'s Castle';
_root.musicTrack[8] = 'MSC-BG8';
_root.musicTitle[9] = 'Bowser\'s Castle (SMB3)';
_root.musicTrack[9] = 'MSC-BG9';
_root.musicTitle[10] = 'Bonus Level';
_root.musicTrack[10] = 'MSC-BG0';
_root.musicTitle[11] = 'Level Win';
_root.musicTrack[11] = 'MSC-WIN';
_root.musicTitle[12] = 'Nyanyanyanyanyanyanya!';
_root.musicTrack[12] = 'MSC-NYA';
_root.musicTitle[13] = 'Mario Paint BGM 1';
_root.musicTrack[13] = 'MSC-PNT';
_root.musicTitle[14] = 'Super Mario 2 Ending';
_root.musicTrack[14] = 'MSC-END';
_root.musicTitle[15] = '4′33\\';
_root.musicTrack[15] = '';
_root.medalName = new Array(50);
_root.medalPoints = new Array(50);
_root.medalLocked = new Array(50);
_root.medalUnlocked = new Array(50);
_root.medalGet = new Array(50);
_root.loadData();
}
frame 1 {
objectSection = function (obType) {
if (obType == '+') {
return 'Misc';
} else {
if (obType == '~') {
return 'Misc';
} else {
if (obType == 'z') {
return 'Misc';
} else {
if (obType == 'f') {
return 'Misc';
} else {
if (obType == '^') {
return 'Misc';
} else {
if (obType == 'v') {
return 'Misc';
} else {
if (obType == 'y') {
return 'Misc';
} else {
if (obType == 'b') {
return 'Brick';
} else {
if (obType == 'u') {
return 'Brick';
} else {
if (obType == ',') {
return 'Brick';
} else {
if (obType == '\'') {
return 'Brick';
} else {
if (obType == '?') {
return 'Brick';
} else {
if (obType == '!') {
return 'Brick';
} else {
if (obType == '*') {
return 'Brick';
} else {
if (obType == 'o') {
return 'Brick';
} else {
if (obType == 'x') {
return 'Brick';
} else {
if (obType == '[') {
return 'Plat';
} else {
if (obType == ']') {
return 'Plat';
} else {
if (obType == '{') {
return 'Plat';
} else {
if (obType == '}') {
return 'Plat';
} else {
if (obType == '<') {
return 'Plat';
} else {
if (obType == '>') {
return 'Plat';
} else {
if (obType == '(') {
return 'Plat';
} else {
if (obType == ')') {
return 'Plat';
} else {
if (obType == 'g') {
return 'Enemies';
} else {
if (obType == 'k') {
return 'Enemies';
} else {
if (obType == 'p') {
return 'Enemies';
} else {
if (obType == 'm') {
return 'Enemies';
} else {
if (obType == 'i') {
return 'Enemies';
} else {
if (obType == 'n') {
return 'Enemies';
} else {
if (obType == 't') {
return 'Enemies';
} else {
if (obType == 'h') {
return 'Enemies';
} else {
if (obType == 'c') {
return 'Coins';
} else {
if (obType == 'w') {
return 'Coins';
} else {
if (obType == 'd') {
return 'Coins';
} else {
return undefined;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
};
objectName = function (obType) {
if (obType == '+') {
return 'checkpointHit';
} else {
if (obType == '~') {
return 'Key';
} else {
if (obType == 'z') {
return 'koopaKid';
} else {
if (obType == 'f') {
return 'Fuzzy';
} else {
if (obType == '^') {
return 'upArrow';
} else {
if (obType == 'v') {
return 'downArrow';
} else {
if (obType == 'y') {
return 'megaMushroom';
} else {
if (obType == 'b') {
return 'Brick';
} else {
if (obType == 'u') {
return 'usedBrick';
} else {
if (obType == ',') {
return 'PBrickB';
} else {
if (obType == '\'') {
return 'PBrickW';
} else {
if (obType == '*') {
return 'POWBrick';
} else {
if (obType == '?') {
return '?Brick';
} else {
if (obType == '!') {
return '!Brick';
} else {
if (obType == 'o') {
return 'bombBrick';
} else {
if (obType == 'x') {
return 'unlockBrick';
} else {
if (obType == '[') {
return 'Plat';
} else {
if (obType == ']') {
return 'Plat';
} else {
if (obType == '{') {
return 'SPlat';
} else {
if (obType == '}') {
return 'SPlat';
} else {
if (obType == '<') {
return 'Pipe';
} else {
if (obType == '>') {
return 'Pipe';
} else {
if (obType == '(') {
return 'TPlat';
} else {
if (obType == ')') {
return 'TPlat';
} else {
if (obType == 'g') {
return 'Goomba';
} else {
if (obType == 'k') {
return 'Koopa';
} else {
if (obType == 'p') {
return 'Parakoopa';
} else {
if (obType == 'm') {
return 'Bobomb';
} else {
if (obType == 'i') {
return 'Pokey';
} else {
if (obType == 'n') {
return 'Ninji';
} else {
if (obType == 't') {
return 'Thwomp';
} else {
if (obType == 'h') {
return 'HammerBro';
} else {
if (obType == 'c') {
return 'Coin';
} else {
if (obType == 'w') {
return 'CoinW';
} else {
if (obType == 'd') {
return 'CoinB';
} else {
if (obType == 'del') {
return 'deleteEraser';
} else {
if (obType == '&') {
return 'creationAdd';
} else {
return undefined;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
};
objectOrientation = function (obType) {
if (obType == ']' || obType == '}' || obType == '>' || obType == ')') {
return -100;
} else {
return 100;
}
};
objectGenerator = function (j, xPos, yPos, spawnAm, obType) {
obSection = objectSection(obType);
obName = objectName(obType);
obOrientation = objectOrientation(obType);
while (spawnAm) {
j[obSection].attachMovie(obName, xPos + (spawnAm - 1) + '-' + yPos, j[obSection].getNextHighestDepth());
j[obSection][xPos + (spawnAm - 1) + '-' + yPos]._y = (10 + (yPos + 0.5 - obOrientation / 200) * 48) / 3;
j[obSection][xPos + (spawnAm - 1) + '-' + yPos]._x = (xPos + (spawnAm - 1)) * 48 / 3;
j[obSection][xPos + (spawnAm - 1) + '-' + yPos]._xscale = 33.33333333333334;
j[obSection][xPos + (spawnAm - 1) + '-' + yPos]._yscale = obOrientation / 3;
--spawnAm;
}
if (obType == 'z') {
j[obSection][xPos + '-' + yPos].koopaNo = yPos;
}
};
creationObjectGenerator = function (j, xPos, yPos, spawnAm, obType) {
objectGenerator(j, xPos, yPos, spawnAm, obType);
obSection = objectSection(obType);
obName = objectName(obType);
obOrientation = objectOrientation(obType);
while (spawnAm) {
j[obSection][xPos + (spawnAm - 1) + '-' + yPos]._name = [obType + (xPos + (spawnAm - 1)) + '-' + yPos];
j[obSection][obType + (xPos + (spawnAm - 1)) + '-' + yPos].onRelease = function () {
if (_root.objectHolding == '' && onScreen && !_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
attachObject(obType);
contPlace = false;
_root.levelSaved = false;
_root.Level.offLimits[this._name].removeMovieClip();
this._x = -65536;
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].thisX(0) < 1000 && _root.Level.Enemies[v3].thisX(0) > -500) {
if (!_root.Level.Enemies[v3].floorCheck()) {
_root.Level.offLimits[v3].removeMovieClip();
_root.Level.Enemies[v3].removeMovieClip();
}
}
}
for (v3 in _root.Level.Misc) {
if (_root.Level.Misc[v3].thisX(0) < 1000 && _root.Level.Misc[v3].thisX(0) > -500) {
if (!_root.Level.Misc[v3].floorCheck()) {
_root.Level.offLimits[v3].removeMovieClip();
_root.Level.Misc[v3].removeMovieClip();
}
}
}
this.removeMovieClip();
}
};
j.offLimits.attachMovie('blackSquare', obType + (xPos + (spawnAm - 1)) + '-' + yPos, _root.Level.offLimits.getNextHighestDepth());
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._y = _root.Level[obSection][obType + (xPos + (spawnAm - 1)) + '-' + yPos]._y + obOrientation / 200;
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._x = _root.Level[obSection][obType + (xPos + (spawnAm - 1)) + '-' + yPos]._x + 1;
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._xscale = 100 * Math.round(_root.Level[obSection][obType + (xPos + (spawnAm - 1)) + '-' + yPos]._width / 16) - 8;
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._yscale = obOrientation * Math.round(_root.Level[obSection][obType + (xPos + (spawnAm - 1)) + '-' + yPos]._height / 16) - 8;
if (obType == 'y' || obType == 'k' || obType == 'p') {
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._y -= 16;
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._yscale = 192;
}
if (obType == 'h') {
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._y -= 32;
j.offLimits[obType + (xPos + (spawnAm - 1)) + '-' + yPos]._yscale = 292;
}
--spawnAm;
}
};
}
movieClip 541 BG0 {
}
movieClip 551 BG4 {
}
movieClip 564 createBackground {
}
movieClip 574 {
}
movieClip 576 {
}
movieClip 578 {
}
movieClip 580 {
}
movieClip 582 {
}
movieClip 584 {
}
movieClip 589 {
}
movieClip 590 {
frame 1 {
stop();
}
frame 9 {
stop();
}
instance of movieClip 589 {
onClipEvent (release) {
_root.play();
this._y = -65536;
}
}
}
instance of movieClip 538 APIConnector {
onClipEvent (construct) {
apiId = '17233:PBx3qBJk';
encryptionKey = '9M7XE9QqQFTfo49YywKkxxJtksuEo74k';
debugMode = 'Simulate Logged-in User';
movieVersion = '';
connectorType = 'Flash Ad Only';
redirectOnNewVersion = true;
redirectOnHostBlocked = true;
}
}
movieClip 611 {
}
movieClip 632 {
}
movieClip 633 Plat {
frame 1 {
this.platT.gotoAndStop(int(_root.levelStyle / 1 + 1));
this.platB.gotoAndStop(int(_root.levelStyle / 1 + 1));
moveBack = false;
moveTo = this._y;
POWEffect = function () {
this._y = moveTo;
moveBack = true;
moveTo = this._y + 48 * this._yscale / 100;
};
banzaiHit = function () {
POWEffect();
POWEffect();
POWEffect();
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(192) < 0) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this.platT)) {
_root.bulletDead();
}
if (_root.Bullet.BulletHit.hitTest(this.platB)) {
_root.bulletDead();
}
}
if (moveBack) {
this._y -= Math.round((this._y - moveTo) / 3);
if (Math.round(this._y) == moveTo) {
this._y = moveTo;
moveBack = false;
}
}
}
if (thisX(192) < 0) {
this.removeMovieClip();
}
}
};
}
}
movieClip 634 {
}
movieClip 635 {
}
movieClip 652 {
frame 1 {
this.gotoAndStop(int(_root.levelStyle / 1 + 1));
}
}
movieClip 653 {
frame 1 {
stop();
this.Brick.gotoAndStop(2);
onEnterFrame = function () {
if (this.hitTest(_root.Bullet.BulletHit)) {
this.gotoAndStop(2);
}
};
}
frame 2 {
i = 0;
while (i < 9) {
attachMovie('LoadBrickPart', 'BP' + i, i);
this['BP' + i]._y = int(i / 3) * 12 + 12;
this['BP' + i]._x = int(i % 3) * 12 + 12;
++i;
}
onEnterFrame = function () {};
}
}
movieClip 654 {
}
movieClip 655 {
}
movieClip 658 {
frame 1 {
onEnterFrame = function () {
if (_root.showLogos) {
this.gotoAndStop(1);
} else {
this.gotoAndStop(2);
}
};
}
frame 1 {
stop();
}
frame 2 {
stop();
}
}
button 660 {
on (release) {
_root.showLogos = !_root.showLogos;
}
}
movieClip 661 {
}
movieClip 664 Bullet1 {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause && this._parent._parent._name != 'BSlow') {
if (this._rotation < 5) {
this.nextFrame();
}
}
};
}
frame 1 {
stop();
}
frame 2 {
onEnterFrame = function () {
if (!_root.gamePause && this._parent._parent._name != 'BSlow') {
if (this._rotation > 5) {
this.prevFrame();
} else {
this.nextFrame();
}
}
};
}
frame 2 {
stop();
}
frame 3 {
onEnterFrame = function () {
if (!_root.gamePause && this._parent._parent._name != 'BSlow') {
if (this._rotation > 5) {
this.prevFrame();
}
}
};
}
frame 3 {
stop();
}
}
movieClip 665 {
}
movieClip 666 medalDisplay {
instance of movieClip 462 MedalPopup {
onClipEvent (construct) {
alwaysOnTop = 'true';
}
}
}
movieClip 490 __Packages.com.newgrounds.APIConnection {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIConnection) {
var v1 = function () {
this.reset();
};
com.newgrounds.APIConnection = v1;
var v2 = v1.prototype;
v2.__get__hostURL = function () {
return this._hostURL;
};
v2.__set__hostURL = function (value) {
this._hostURL = value;
this.hostDomain = null;
if (this._hostURL && this._hostURL.indexOf('file://') != -1 || this._hostURL == 'localhost') {
this.hostDomain = (this._hostURL.split('/'))[2];
}
if (!this.hostDomain) {
this.hostDomain = 'localhost';
}
return this.__get__hostURL();
};
v2.__get__sandboxType = function () {
return System.security.sandboxType;
};
v2.__get__isNetworkHost = function () {
switch (this.__get__sandboxType()) {
return true;
case 'localWithFile':
case 'localWithNetwork':
case 'localTrusted':
case 'application':
return false;
case 'remote':
}
return true;
};
v2.__get__hasUserSession = function () {
return this.sessionId != null && this.sessionId != '' && this.publisherId != 0;
};
v2.__get__connected = function () {
return this.connectionState == com.newgrounds.APIConnection.CONNECTED;
};
v2.reset = function () {
this.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED;
this.encryptionKey = null;
this.sessionId = null;
this.userEmail = null;
this.username = null;
this.userId = 0;
this.userpageFormat = 0;
};
v2.assertInitialized = function () {
if (!this.initialized) {
com.newgrounds.Logger.logError('You must initialized the API using API.connect() before using this command.');
return false;
}
return true;
};
v2.assertConnected = function () {
if (!this.connectionState == com.newgrounds.APIConnection.CONNECTED) {
com.newgrounds.Logger.logError('You must establish a connection using API.connect() before using this command.');
return false;
}
return true;
};
v2.sendSimpleCommand = function (command, completeHandler, parameters, secureParameters) {
if (parameters == undefined) {
parameters = null;
}
if (secureParameters == undefined) {
secureParameters = null;
}
var v2 = new com.newgrounds.APICommand(command);
v2.__set__parameters(parameters);
v2.__set__secureParameters(secureParameters);
if (completeHandler != null) {
v2.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, completeHandler);
}
v2.send(this);
};
v2.sendCommand = function (command) {
command.send(this);
};
v2.loadInBrowser = function (command, newWindow, parameters) {
if (newWindow == undefined) {
newWindow = true;
}
if (parameters == undefined) {
parameters = null;
}
var v2 = new com.newgrounds.APICommand(command);
v2.__set__parameters(parameters);
v2.loadInBrowser(this, newWindow);
};
v1.NOT_CONNECTED = 'notConnected';
v1.CONNECTING = 'connecting';
v1.CONNECTED = 'connected';
v2.connectionState = com.newgrounds.APIConnection.NOT_CONNECTED;
v2.apiURL = 'http://www.ngads.com/gateway_v2.php';
v2.addProperty('connected', v2.__get__connected, function () {});
v2.addProperty('hasUserSession', v2.__get__hasUserSession, function () {});
v2.addProperty('hostURL', v2.__get__hostURL, v2.__set__hostURL);
v2.addProperty('isNetworkHost', v2.__get__isNetworkHost, function () {});
v2.addProperty('sandboxType', v2.__get__sandboxType, function () {});
ASSetPropFlags(com.newgrounds.APIConnection.prototype, null, 1);
}
#endinitclip
}
movieClip 485 __Packages.com.newgrounds.EventDispatcher {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.EventDispatcher) {
var v1 = function () {
this._listeners = {};
};
com.newgrounds.EventDispatcher = v1;
var v2 = v1.prototype;
v2.addEventListener = function (type, listener) {
if (!this._listeners[type]) {
this._listeners[type] = [];
}
if (typeof listener == 'function') {
this._listeners[type].push({'target': null, 'func': listener});
} else {
this._listeners[type].push(listener);
}
};
v2.removeEventListener = function (type, listener) {
var v3 = this._listeners[type];
if (v3) {
var v5 = v3.length;
var v2 = 0;
while (v2 < v5) {
if (v3[v2].func == listener || v3[v2] == listener) {
v3.splice(v2, 1);
return undefined;
}
++v2;
}
}
};
v2.dispatchEvent = function (event) {
var v4 = this._listeners[event.__get__type()];
if (v4) {
var v5 = v4.length;
var v2 = 0;
while (v2 < v5) {
var v3 = v4[v2];
v3.func.call(v3.target, event);
++v2;
}
}
return true;
};
ASSetPropFlags(com.newgrounds.EventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 484 __Packages.com.newgrounds.Event {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Event) {
var v1 = function (type) {
this._type = type;
};
com.newgrounds.Event = v1;
var v2 = v1.prototype;
v2.__get__type = function () {
return this._type;
};
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.Event.prototype, null, 1);
}
#endinitclip
}
movieClip 486 __Packages.com.newgrounds.APIEventDispatcher {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEventDispatcher) {
var v1 = function () {
super();
};
com.newgrounds.APIEventDispatcher = v1;
com.newgrounds.APIEventDispatcher extends com.newgrounds.EventDispatcher;
var v2 = v1.prototype;
v1.__get__globalDispatcher = function () {
return com.newgrounds.APIEventDispatcher._globalDispatcher;
};
v1.__set__globalDispatcher = function (value) {
com.newgrounds.APIEventDispatcher._globalDispatcher = value;
return com.newgrounds.APIEventDispatcher.__get__globalDispatcher();
};
v1.initEventQueue = function () {
setInterval(com.newgrounds.APIEventDispatcher.runEventQueue, 50);
return [];
};
v2.dispatchEvent = function (event) {
com.newgrounds.APIEventDispatcher._eventQueue.push({'dispatcher': this, 'event': event});
return true;
};
v2.actualDispatchEvent = function (event) {
var v3 = super.dispatchEvent(event);
if (com.newgrounds.APIEventDispatcher._globalDispatcher && this != com.newgrounds.APIEventDispatcher._globalDispatcher) {
com.newgrounds.APIEventDispatcher._globalDispatcher.dispatchEvent(event);
}
};
v1.runEventQueue = function (event) {
var v3 = com.newgrounds.APIEventDispatcher._eventQueue.length;
if (v3) {
var v4 = com.newgrounds.APIEventDispatcher._eventQueue;
com.newgrounds.APIEventDispatcher._eventQueue = [];
var v1 = 0;
while (v1 < v3) {
var v2 = v4[v1];
v2.dispatcher.actualDispatchEvent(v2.event);
++v1;
}
}
};
v1._eventQueue = com.newgrounds.APIEventDispatcher.initEventQueue();
v1.addProperty('globalDispatcher', v1.__get__globalDispatcher, v1.__set__globalDispatcher);
ASSetPropFlags(com.newgrounds.APIEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 489 __Packages.com.newgrounds.encoders.BaseN {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.BaseN) {
var v1 = function (hash) {
if (hash) {
this._hash = hash;
} else {
this._hash = com.newgrounds.encoders.BaseN.DEFAULT_HASH;
}
this._base = this._hash.length;
this._reverseHash = new Object();
var v2 = 0;
while (v2 < this._hash.length) {
this._reverseHash[this._hash.charAt(v2)] = v2;
++v2;
}
};
com.newgrounds.encoders.BaseN = v1;
var v2 = v1.prototype;
v2.encodeUint = function (number, minimumChars) {
if (minimumChars == undefined) {
minimumChars = 1;
}
var v2 = '';
var v3 = number;
while (v3 != 0) {
v2 = this._hash.charAt(v3 % this._base) + v2;
v3 /= this._base;
v3 = int(v3);
}
while (v2.length < minimumChars) {
v2 = this._hash.charAt(0) + v2;
}
return v2;
};
v2.decodeUint = function (encodedNumber) {
var v3 = 0;
var v2 = 0;
while (v2 < encodedNumber.length) {
v3 *= this._base;
v3 += this._reverseHash[encodedNumber.charAt(v2)];
++v2;
}
return v3;
};
v1.DEFAULT_HASH = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ`~@#$%^&*()+|;/';
ASSetPropFlags(com.newgrounds.encoders.BaseN.prototype, null, 1);
}
#endinitclip
}
movieClip 494 __Packages.com.newgrounds.APICommand {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APICommand) {
var v1 = function (command) {
super();
this._command = command;
this._parameters = new Object();
this._secureParameters = new Object();
this._hasTimeout = true;
};
com.newgrounds.APICommand = v1;
com.newgrounds.APICommand extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v1.stopPendingCommands = function () {
for (var v2 in com.newgrounds.APICommand._pendingCommands) {
var v1 = com.newgrounds.APICommand._pendingCommands[v2];
v1.close();
}
com.newgrounds.APICommand._pendingCommands = [];
};
v1.onThrottleTimer = function (event) {
if (com.newgrounds.APICommand._throttleCount > 0) {
--com.newgrounds.APICommand._throttleCount;
}
if (com.newgrounds.APICommand._commandQueue.length) {
var v1 = com.newgrounds.APICommand._commandQueue.shift();
v1.command.send(v1.connection);
}
};
v1.encryptHex = function (hexValue) {
var v4 = hexValue.length % 6;
var v3 = '';
var v1 = 0;
while (v1 < hexValue.length) {
v3 += com.newgrounds.APICommand._encryptor.encodeUint(int('0x' + hexValue.substr(v1, 6)), 4);
v1 += 6;
}
return v4.toString() + v3;
};
v2.__get__command = function () {
return this._command;
};
v2.__set__command = function (value) {
this._command = value;
return this.__get__command();
};
v2.__get__hasTimeout = function () {
return this._hasTimeout;
};
v2.__set__hasTimeout = function (val) {
this._hasTimeout = val;
return this.__get__hasTimeout();
};
v2.__get__parameters = function () {
return this._parameters;
};
v2.__set__parameters = function (object) {
this._parameters = new Object();
if (object) {
for (var v3 in object) {
this._parameters[v3] = object[v3];
}
}
return this.__get__parameters();
};
v2.__get__preventCache = function () {
return this._preventCache;
};
v2.__set__preventCache = function (value) {
this._preventCache = value;
return this.__get__preventCache();
};
v2.__get__secureParameters = function () {
return this._secureParameters;
};
v2.__set__secureParameters = function (object) {
this._secureParameters = new Object();
if (object) {
for (var v3 in object) {
this._secureParameters[v3] = object[v3];
}
}
return this.__get__secureParameters();
};
v2.__get__hasSecureParameters = function () {
for (var v2 in this._secureParameters) {
return true;
}
return false;
};
v2.addFile = function (filename, data, dataField, contentType) {
if (contentType == undefined) {
contentType = 'application/octet-stream';
}
if (!this._files) {
this._files = new Object();
}
var v3 = {'filename': filename, 'data': data, 'dataField': dataField, 'contentType': contentType};
this._files[filename] = v3;
};
v2.removeFile = function (filename) {
if (this._files) {
delete this._files[filename];
}
};
v2.clearFiles = function () {
this._files = null;
};
v2.close = function () {
if (this._loader) {
clearInterval(this._timeoutTimer);
var v2 = 0;
while (v2 < com.newgrounds.APICommand._pendingCommands.length) {
if (com.newgrounds.APICommand._pendingCommands[v2] == this) {
com.newgrounds.APICommand._pendingCommands.splice(v2, 1);
break;
}
++v2;
}
this._loader = null;
}
};
v2.loadInBrowser = function (connection, newWindow) {
this._parameters.command_id = this._command;
this._parameters.tracker_id = connection.apiId ? connection.apiId : 1;
if (connection.debug) {
this._parameters.debug = 1;
}
var v3 = connection.apiURL + '?host=' + escape(connection.hostDomain);
for (var v4 in this._parameters) {
v3 += '&' + escape(v4) + '=' + escape(this._parameters[v4]);
}
var v6;
if (newWindow) {
v6 = '_blank';
} else {
v6 = '_top';
}
_root.getURL(v3, v6);
};
v2.send = function (connection) {
if (com.newgrounds.APICommand._throttleCount >= com.newgrounds.APICommand.THROTTLE_THRESHOLD) {
com.newgrounds.APICommand._commandQueue.push({'connection': connection, 'command': this});
} else {
this.sendInternal(connection);
}
};
v2.sendInternal = function (connection) {
var v4;
v4 = new LoadVars();
v4.command_id = this._command;
v4.tracker_id = connection.apiId;
if (connection.debug) {
v4.debug = 1;
}
if (this._preventCache) {
v4.seed = Math.random();
}
var v2;
var v3;
var v7;
for (v2 in this._parameters) {
v3 = this._parameters[v2];
if (v3 != null) {
if (typeof v3 == 'boolean') {
v4[v2] = int(v3);
} else {
v4[v2] = v3;
}
}
}
if (this.__get__hasSecureParameters()) {
var v6 = new Object();
for (v2 in this._secureParameters) {
v3 = this._secureParameters[v2];
if (v3 != null) {
if (typeof v3 == 'boolean') {
v6[v2] = int(v3);
} else {
v6[v2] = v3;
}
}
}
var v8 = '';
v7 = 0;
while (v7 < 16) {
v8 += com.newgrounds.APICommand.ENCRYPTOR_RADIX.charAt(int(Math.random() * com.newgrounds.APICommand.ENCRYPTOR_RADIX.length));
++v7;
}
v4.command_id = 'securePacket';
v6.command_id = this._command;
v6.as_version = 3;
v6.session_id = connection.sessionId;
v6.user_email = connection.userEmail;
v6.publisher_id = connection.publisherId;
v6.seed = v8;
var v13 = com.newgrounds.crypto.MD5.hash(v8);
var v11 = com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(v6), connection.encryptionKey);
v4.secure = com.newgrounds.APICommand.encryptHex(v13 + v11);
}
com.newgrounds.Logger.logInternal('Sending packet:', v4);
var v12;
v12 = 'application/x-www-form-urlencoded';
for (v2 in v4) {
if (typeof v4[v2] == 'object') {
v4[v2] = com.newgrounds.encoders.json.JSON.encode(v4[v2]);
}
}
if (this._files) {
for (var v10 in this._files) {
var v5 = this._files[v10];
if (typeof v5.data == 'string') {
v4[v10] = v5.data;
} else {
v4[v10] = com.newgrounds.encoders.json.JSON.encode(v5.data);
}
}
}
com.newgrounds.APICommand._pendingCommands.push(this);
++com.newgrounds.APICommand._throttleCount;
this.startLoader(connection.apiURL, v4, v12);
};
v2.startLoader = function (url, data, contentType) {
this._loader = LoadVars(data);
this._loader.onData = this.as2CompleteHandler;
this._loader.contentType = contentType;
this._loader.sendAndLoad(url, this._loader, 'POST');
if (this._hasTimeout) {
setInterval(this, this.onTimeout, com.newgrounds.APICommand.TIMEOUT_INTERVAL);
}
};
v2.as2CompleteHandler = function (data) {
var v3;
var v2 = 0;
while (v2 < com.newgrounds.APICommand._pendingCommands.length) {
if (com.newgrounds.APICommand._pendingCommands[v2]._loader == this) {
v3 = com.newgrounds.APICommand._pendingCommands[v2];
break;
}
++v2;
}
v3.onComplete(data);
};
v2.onTimeout = function (event) {
this.close();
com.newgrounds.Logger.logError('Command timed out.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_TIMED_OUT));
};
v2.onError = function (error) {
com.newgrounds.Logger.logError('Error when sending command:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_UNKNOWN));
this.close();
};
v2.onComplete = function (data) {
try {
if (!data || data == '') {
throw new Error();
}
com.newgrounds.Logger.logInternal('Received packet:', data);
var v2 = com.newgrounds.encoders.json.JSON.decode(data);
if (!v2) {
throw new Error();
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, v2, (v2 && v2.success) ? com.newgrounds.APIEvent.ERROR_NONE : com.newgrounds.APIEvent.ERROR_COMMAND_FAILED));
}
catch (v0) {
if (Error(v0) != null) {
var e = Error(v0);
com.newgrounds.Logger.logError('Invalid response returned from server: ' + data);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.COMMAND_COMPLETE, null, com.newgrounds.APIEvent.ERROR_BAD_RESPONSE));
} else {
throw v0;
}
}
this.close();
};
v1.TIMEOUT_INTERVAL = 10000;
v1.THROTTLE_INTERVAL = 5000;
v1.THROTTLE_THRESHOLD = 7;
v1._throttleCount = 0;
v1._commandQueue = [];
v1._throttleTimer = setInterval(com.newgrounds.APICommand.onThrottleTimer, com.newgrounds.APICommand.THROTTLE_INTERVAL);
v1.ENCRYPTOR_RADIX = '/g8236klvBQ#&|;Zb*7CEA59%s`Oue1wziFp$rDVY@TKxUPWytSaGHJ>dmoMR^<0~4qNLhc(I+fjn)X';
v1._encryptor = new com.newgrounds.encoders.BaseN(com.newgrounds.APICommand.ENCRYPTOR_RADIX);
v1._pendingCommands = [];
v1.CRLF = '\r\n';
v2.addProperty('command', v2.__get__command, v2.__set__command);
v2.addProperty('hasSecureParameters', v2.__get__hasSecureParameters, function () {});
v2.addProperty('hasTimeout', v2.__get__hasTimeout, v2.__set__hasTimeout);
v2.addProperty('parameters', v2.__get__parameters, v2.__set__parameters);
v2.addProperty('preventCache', v2.__get__preventCache, v2.__set__preventCache);
v2.addProperty('secureParameters', v2.__get__secureParameters, v2.__set__secureParameters);
ASSetPropFlags(com.newgrounds.APICommand.prototype, null, 1);
}
#endinitclip
}
movieClip 506 __Packages.com.newgrounds.API {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.API) {
var v1 = function () {};
com.newgrounds.API = v1;
var v2 = v1.prototype;
v1.__get__connected = function () {
return com.newgrounds.API._connection.__get__connected();
};
v1.__get__isNetworkHost = function () {
return com.newgrounds.API._connection.__get__isNetworkHost();
};
v1.__get__apiId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.apiId;
};
v1.__get__debugMode = function () {
return com.newgrounds.API._debugMode;
};
v1.__set__debugMode = function (val) {
com.newgrounds.API._debugMode = val;
return com.newgrounds.API.__get__debugMode();
};
v1.__get__publisherId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.publisherId;
};
v1.__get__sessionId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.sessionId;
};
v1.__get__hostDomain = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.hostDomain;
};
v1.__get__hostURL = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.__get__hostURL();
};
v1.__get__isNewgrounds = function () {
return com.newgrounds.API._connection.publisherId == 1;
};
v1.__get__hasUserSession = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.__get__hasUserSession();
};
v1.__get__username = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.username;
};
v1.__get__userId = function () {
com.newgrounds.API._connection.assertInitialized();
return com.newgrounds.API._connection.userId;
};
v1.assertConnected = function (eventType) {
if (eventType == undefined) {
eventType = null;
}
if (com.newgrounds.API._connection.assertConnected()) {
return true;
} else {
if (eventType) {
com.newgrounds.API.dispatchEvent(eventType, null, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED);
}
return false;
}
};
v1.__get__adsApproved = function () {
return com.newgrounds.API._adsApproved;
};
v1.__get__adFeedURL = function () {
return com.newgrounds.API._adFeedURL;
};
v1.__get__medals = function () {
return com.newgrounds.API._medalsArray;
};
v1.__get__scoreBoards = function () {
return com.newgrounds.API._scoreBoardsArray;
};
v1.__get__saveGroups = function () {
return com.newgrounds.API._saveGroupsArray;
};
v1.connect = function (_root, apiId, encryptionKey, movieVersion) {
if (encryptionKey == undefined) {
encryptionKey = null;
}
if (movieVersion == undefined) {
movieVersion = '';
}
com.newgrounds.APIEventDispatcher.__set__globalDispatcher(com.newgrounds.API._dispatcher);
if (com.newgrounds.API._connection.initialized) {
com.newgrounds.Logger.logError('Connection already in progress. Please call API.disconnect() before attempting another connection.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_NOT_CONNECTED);
return undefined;
}
if (!apiId || apiId == '') {
com.newgrounds.Logger.logError('No apiId given. Please use the API ID from your API settings page.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
com.newgrounds.Logger.logMessage('====== Newgrounds API v' + com.newgrounds.API.VERSION + ' ======');
com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTING;
_root = _root;
com.newgrounds.API._movieVersion = movieVersion;
com.newgrounds.API._connection.apiId = apiId;
var v3 = apiId.indexOf(':');
if (v3 != -1) {
com.newgrounds.API._connection.trackerId = int(apiId.substring(0, v3));
} else {
com.newgrounds.API._connection.trackerId = int(apiId);
}
if (!com.newgrounds.API._connection.trackerId) {
com.newgrounds.Logger.logError('Invalid API ID: ' + apiId);
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, false, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
com.newgrounds.API._connection.encryptionKey = encryptionKey;
com.newgrounds.API._connection.initialized = true;
com.newgrounds.API._connection.__set__hostURL(_root._url);
com.newgrounds.API.doConnect(_root);
};
v1.doConnect = function (flashVars) {
if (com.newgrounds.API.__get__isNetworkHost() && com.newgrounds.API._debugMode != com.newgrounds.API.RELEASE_MODE) {
com.newgrounds.Logger.logMessage('Live file detected, turning off debug mode.');
com.newgrounds.API._debugMode = com.newgrounds.API.RELEASE_MODE;
}
if (com.newgrounds.API._debugMode == com.newgrounds.API.RELEASE_MODE) {
if (flashVars) {
if (flashVars.NewgroundsAPI_UserName) {
com.newgrounds.API._connection.username = flashVars.NewgroundsAPI_UserName;
}
if (flashVars.NewgroundsAPI_UserID) {
com.newgrounds.API._connection.userId = flashVars.NewgroundsAPI_UserID;
}
if (flashVars.NewgroundsAPI_PublisherID) {
com.newgrounds.API._connection.publisherId = flashVars.NewgroundsAPI_PublisherID;
}
if (flashVars.NewgroundsAPI_UserpageFormat) {
com.newgrounds.API._connection.userpageFormat = flashVars.NewgroundsAPI_UserpageFormat;
}
if (flashVars.NewgroundsAPI_SessionID) {
com.newgrounds.API._connection.sessionId = flashVars.NewgroundsAPI_SessionID;
}
if (flashVars.NewgroundsAPI_SandboxID) {
com.newgrounds.API._bridge = new com.newgrounds.Bridge(flashVars.NewgroundsAPI_SandboxID);
}
}
} else {
com.newgrounds.API._connection.debug = true;
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN || com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_OUT) {
com.newgrounds.API._connection.publisherId = 1;
}
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_LOGGED_IN) {
com.newgrounds.API._connection.sessionId = 'D3bu64p1U53R';
com.newgrounds.API._connection.userId = 10;
com.newgrounds.API._connection.username = 'API-Debugger';
}
}
com.newgrounds.API._connection.sendSimpleCommand('connectMovie', com.newgrounds.API.onConnect, {'host': com.newgrounds.API._connection.hostDomain, 'movie_version': com.newgrounds.API._movieVersion});
};
v1.onConnect = function (event) {
var v1 = event.__get__data();
if (!event.__get__success()) {
com.newgrounds.Logger.logError('Unable to connect to the API.');
com.newgrounds.API._connection.reset();
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, event.__get__data(), event.__get__error());
return undefined;
}
if (com.newgrounds.API.__get__debugMode() != com.newgrounds.API.RELEASE_MODE) {
com.newgrounds.API._adFeedURL = com.newgrounds.API.TEST_AD_FEED_URL;
} else {
if (v1.ad_url) {
com.newgrounds.API._adFeedURL = unescape(v1.ad_url);
}
}
switch (v1.ad_status) {
case -1:
com.newgrounds.Logger.logWarning('Your movie is not approved to run Flash Ads.');
break;
case 0:
com.newgrounds.Logger.logWarning('Your movie is still awaiting approval to run Flash Ads.');
case 1:
com.newgrounds.Logger.logMessage('Your movie is approved to run Flash Ads!');
}
com.newgrounds.API._adsApproved = v1.ad_status == 1;
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_HOST_BLOCKED || v1.deny_host) {
com.newgrounds.Logger.logWarning(com.newgrounds.API._connection.hostDomain + ' does not have permission to host this movie!', 'Update your API configuration to allow this host.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'officialURL': unescape(v1.movie_url)}, com.newgrounds.APIEvent.ERROR_HOST_BLOCKED);
com.newgrounds.API._connection.reset();
return undefined;
}
com.newgrounds.API._movieName = v1.movieName ? v1.movieName : '';
com.newgrounds.Logger.logMessage('Connecting to the Newgrounds API Gateway...', '----- ' + v1.movie_name + ' -----');
if (com.newgrounds.API._debugMode == com.newgrounds.API.DEBUG_MODE_NEW_VERSION) {
v1.movie_version = 'Debug Mode';
}
if (v1.movie_version) {
com.newgrounds.Logger.logMessage('A new version of this movie is available.', 'Current version:\t' + com.newgrounds.API._movieVersion, 'Newest version:\t' + v1.movie_version, 'Use API.loadOfficialVersion() to link to the latest version.');
com.newgrounds.API._newVersion = true;
} else {
com.newgrounds.API._newVersion = false;
}
if (v1.request_portal_url) {
com.newgrounds.API._connection.sendSimpleCommand('setPortalID', null, {'portal_url': com.newgrounds.API._connection.__get__hostURL()});
}
com.newgrounds.API._connection.sendSimpleCommand('preloadSettings', com.newgrounds.API.onMetadataLoaded, {'publisher_id': com.newgrounds.API._connection.publisherId, 'user_id': com.newgrounds.API._connection.userId});
};
v1.onMetadataLoaded = function (event) {
var v11 = event.__get__data();
var v1;
var v7;
if (!event.__get__success()) {
com.newgrounds.Logger.logWarning('Unable to load movie metadata.');
com.newgrounds.API.disconnect();
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, null, event.__get__error());
return undefined;
}
var v10 = 0;
if (v11.medals) {
v10 = v11.medals.length;
var v17;
if (com.newgrounds.API.__get__hasUserSession()) {
v17 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
} else {
v17 = com.newgrounds.API.loadLocal('medals_unlocked');
}
v1 = 0;
while (v1 < v10) {
var v6 = v11.medals[v1];
var v14 = v6.medal_unlocked;
var v16 = v17 && v17[v6.medal_id];
var v4 = new com.newgrounds.Medal(com.newgrounds.API._connection, v6.medal_id, v6.medal_name, com.newgrounds.API.__get__hasUserSession() ? v14 : v16, v6.medal_value, v6.medal_difficulty, v6.medal_icon);
v4.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked, false, 0, true);
v4.addEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed, false, 0, true);
com.newgrounds.API._medals[v4.__get__name()] = v4;
com.newgrounds.API._medalsArray.push(v4);
com.newgrounds.Logger.logMessage(v4);
if (com.newgrounds.API.__get__hasUserSession() && v16 && !v14) {
com.newgrounds.Logger.logMessage('Server missed the "' + v4.__get__name() + '" unlock. Resending...');
v4.unlock();
}
++v1;
}
}
com.newgrounds.Logger.logMessage(v10 + ' medal' + ((v10 != 1) ? 's' : '') + ' initialized.');
v10 = 0;
if (v11.score_boards) {
v10 = v11.score_boards.length;
v1 = 0;
while (v1 < v10) {
var v15 = v11.score_boards[v1];
var v9 = new com.newgrounds.ScoreBoard(com.newgrounds.API._connection, v15.name, v15.id);
com.newgrounds.API._scoreBoards[v9.__get__name()] = v9;
com.newgrounds.API._scoreBoardsArray.push(v9);
com.newgrounds.Logger.logMessage(v9);
++v1;
}
}
com.newgrounds.Logger.logMessage(v10 + ' scoreboard' + ((v10 != 1) ? 's' : '') + ' initialized.');
v10 = 0;
if (v11.save_groups) {
v10 = v11.save_groups.length;
v1 = 0;
while (v1 < v10) {
var v2 = v11.save_groups[v1];
var v13 = [];
if (v2.keys) {
v7 = 0;
while (v7 < v2.keys.length) {
var v5 = v2.keys[v7];
v13.push(new com.newgrounds.SaveKey(v5.name, v5.id, v5.type));
++v7;
}
}
var v12 = [];
if (v2.ratings) {
v1 = 0;
while (v1 < v2.ratings.length) {
var v3 = v2.ratings[v1];
v12.push(new com.newgrounds.SaveRating(v3.name, v3.id, v3.float, v3.min, v3.max));
++v1;
}
}
var v8 = new com.newgrounds.SaveGroup(com.newgrounds.API._connection, v2.group_name, v2.group_id, v2.group_type, v13, v12);
com.newgrounds.API._saveGroups[v8.__get__name()] = v8;
com.newgrounds.API._saveGroupsArray.push(v8);
com.newgrounds.Logger.logMessage(v8);
++v1;
}
}
com.newgrounds.Logger.logMessage(v10 + ' save group' + ((v10 != 1) ? 's' : '') + ' initialized.');
if (v11.save_file_path) {
com.newgrounds.API._saveFilePath = v11.save_file_path + '/';
com.newgrounds.SaveFile._saveFilePath = com.newgrounds.API._saveFilePath;
com.newgrounds.Logger.logInternal('Save file path: ' + com.newgrounds.API._saveFilePath);
}
if (v11.image_file_path) {
com.newgrounds.API._imageFilePath = v11.image_file_path + '/';
com.newgrounds.SaveFile._imageFilePath = com.newgrounds.API._imageFilePath;
com.newgrounds.Logger.logInternal('Image file path: ' + com.newgrounds.API._imageFilePath);
}
com.newgrounds.Logger.logMessage('Connection complete!');
com.newgrounds.API._connection.connectionState = com.newgrounds.APIConnection.CONNECTED;
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.API_CONNECTED, {'movieName': com.newgrounds.API._movieName, 'newVersion': com.newgrounds.API._newVersion});
};
v1.disconnect = function () {
if (!com.newgrounds.API._connection.__get__connected()) {
com.newgrounds.Logger.logWarning('The Newgrounds API is already disconnected.');
return undefined;
}
com.newgrounds.API._connection.reset();
for (var v2 in com.newgrounds.API._medals) {
var v1 = com.newgrounds.API._medals[v2];
v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCKED, com.newgrounds.API.onMedalUnlocked);
v1.removeEventListener(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, com.newgrounds.API.onMedalUnlockConfirmed);
}
com.newgrounds.API._newVersion = false;
com.newgrounds.API._medals = new Object();
com.newgrounds.API._medalsArray = [];
com.newgrounds.API._scoreBoards = new Object();
com.newgrounds.API._scoreBoardsArray = [];
com.newgrounds.API._saveGroups = new Object();
com.newgrounds.API._saveGroupsArray = [];
com.newgrounds.API._sharedObjects = new Object();
com.newgrounds.API._imageFilePath = null;
com.newgrounds.API._saveFilePath = null;
com.newgrounds.Logger.logMessage('Disconnected from the Newgrounds API.');
};
v1.loadNewgrounds = function () {
com.newgrounds.API._connection.loadInBrowser('loadNewgrounds');
};
v1.loadOfficialVersion = function () {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadOfficialVersion', false);
}
};
v1.loadMySite = function () {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadMySite');
}
};
v1.loadCustomLink = function (linkName) {
if (com.newgrounds.API._connection.assertInitialized()) {
com.newgrounds.API._connection.loadInBrowser('loadCustomLink', true, {'link': linkName});
}
};
v1.getMedal = function (medalName) {
return com.newgrounds.API._medals[medalName];
};
v1.unlockMedal = function (medalName) {
if (!com.newgrounds.API.assertConnected()) {
return undefined;
}
var v1 = com.newgrounds.API._medals[medalName];
if (!v1) {
com.newgrounds.Logger.logError('No medal named "' + medalName + '" w.');
return undefined;
}
v1.unlock();
};
v1.onMedalUnlocked = function (event) {
if (event.__get__success()) {
var v2 = com.newgrounds.Medal(event.__get__data());
var v1;
if (com.newgrounds.API.__get__hasUserSession()) {
v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
if (!v1) {
v1 = new Object();
}
v1[v2.__get__id()] = true;
com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1);
} else {
v1 = com.newgrounds.API.loadLocal('medals_unlocked');
if (!v1) {
v1 = new Object();
}
v1[(com.newgrounds.Medal(event.__get__data())).__get__id()] = true;
com.newgrounds.API.saveLocal('medals_unlocked', v1);
com.newgrounds.Logger.logMessage('User instanceof not logged in. Medal "' + v2.__get__name() + '" unlocked locally.');
}
}
};
v1.onMedalUnlockConfirmed = function (event) {
if (com.newgrounds.API.__get__hasUserSession()) {
var v1 = com.newgrounds.API.loadLocal('medals_unlocked_' + com.newgrounds.API.__get__username());
if (!v1) {
v1 = new Object();
} else {
delete v1[(com.newgrounds.Medal(event.__get__data())).__get__id()];
}
com.newgrounds.API.saveLocal('medals_unlocked_' + com.newgrounds.API.__get__username(), v1);
}
};
v1.getScoreBoard = function (scoreBoardName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
return com.newgrounds.API._scoreBoards[scoreBoardName];
};
v1.loadScores = function (scoreBoardName, period, firstResult, numResults, tag) {
if (period == undefined) {
period = 'All-Time';
}
if (firstResult == undefined) {
firstResult = 1;
}
if (numResults == undefined) {
numResults = 10;
}
if (tag == undefined) {
tag = null;
}
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API._scoreBoards[scoreBoardName];
if (!v1) {
com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return null;
}
v1.__set__period(period);
v1.__set__firstResult(firstResult);
v1.__set__numResults(numResults);
v1.__set__tag(tag);
v1.loadScores();
return v1;
};
v1.postScore = function (scoreBoardName, numericScore, tag) {
if (tag == undefined) {
tag = null;
}
if (!com.newgrounds.API.assertConnected()) {
return undefined;
}
if (!com.newgrounds.API.__get__hasUserSession()) {
com.newgrounds.Logger.logError('The user must be logged-in to post a score.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN);
return undefined;
}
var v1 = com.newgrounds.API._scoreBoards[scoreBoardName];
if (!v1) {
com.newgrounds.Logger.logError('No scoreboard named "' + scoreBoardName + '" w.');
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.SCORES_LOADED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT);
return undefined;
}
v1.postScore(numericScore, tag);
};
v1.getSaveGroup = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
return com.newgrounds.API._saveGroups[groupName];
};
v1.getSaveGroupById = function (id) {
for (var v3 in com.newgrounds.API._saveGroups) {
var v1 = com.newgrounds.API._saveGroups[v3];
if (v1.__get__id() == id) {
return v1;
}
}
return null;
};
v1.createSaveFile = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API.getSaveGroup(groupName);
if (!v1) {
com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.');
return null;
}
return new com.newgrounds.SaveFile(v1);
};
v1.loadSaveFile = function (saveId, loadContents) {
if (loadContents == undefined) {
loadContents = true;
}
com.newgrounds.API._connection.sendSimpleCommand('loadSaveFile', com.newgrounds.API.onFileLoaded, {'save_id': saveId, 'get_contents': loadContents});
};
v1.onFileLoaded = function (event) {
if (event.__get__success()) {
var v2 = com.newgrounds.SaveFile.fromObject(com.newgrounds.API.getSaveGroupById((event.__get__data()).group_id), (event.__get__data()).file);
if ((event.__get__data()).get_contents) {
v2.load();
} else {
com.newgrounds.API.dispatchEvent(com.newgrounds.APIEvent.FILE_LOADED, v2);
}
} else {
com.newgrounds.Logger.logError('Unable to load file:', event.__get__error());
}
};
v1.createSaveQuery = function (groupName) {
if (!com.newgrounds.API.assertConnected()) {
return null;
}
var v1 = com.newgrounds.API.getSaveGroup(groupName);
if (!v1) {
com.newgrounds.Logger.logError('The save group "' + groupName + '" w found.');
return null;
}
var v2 = new com.newgrounds.SaveQuery(v1);
return v2;
};
v1.createSaveQueryByDate = function (groupName, sortDescending) {
if (sortDescending == undefined) {
sortDescending = true;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
if (!v1) {
return null;
}
v1.sortOn(com.newgrounds.SaveQuery.CREATED_ON, sortDescending);
return v1;
};
v1.createSaveQueryByName = function (groupName, filename, exactMatch, sortDescending) {
if (exactMatch == undefined) {
exactMatch = false;
}
if (sortDescending == undefined) {
sortDescending = true;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
if (!exactMatch) {
v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_CONTAINS, filename);
return v1;
}
v1.addCondition(com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.OPERATOR_EQUAL, filename);
return v1;
};
v1.createSaveQueryByRating = function (groupName, ratingName, sortDescending) {
if (sortDescending == undefined) {
sortDescending = true;
}
var v1 = com.newgrounds.API.createSaveQuery(groupName);
v1.sortOn(ratingName, sortDescending);
return v1;
};
v1.addEventListener = function (eventType, listener, useCapture, priority, useWeakReference) {
if (useCapture == undefined) {
useCapture = false;
}
if (priority == undefined) {
priority = 0;
}
if (useWeakReference == undefined) {
useWeakReference = true;
}
com.newgrounds.API._dispatcher.addEventListener(eventType, listener, useCapture, priority, useWeakReference);
};
v1.removeEventListener = function (eventType, listener, useCapture) {
if (useCapture == undefined) {
useCapture = false;
}
com.newgrounds.API._dispatcher.removeEventListener(eventType, listener);
};
v1.dispatchEvent = function (event, data, error) {
if (data == undefined) {
data = null;
}
if (error == undefined) {
error = null;
}
com.newgrounds.API._dispatcher.dispatchEvent(new com.newgrounds.APIEvent(event, data, error));
};
v1.saveLocal = function (saveId, saveData) {
try {
var v3;
var v2 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey);
if (!com.newgrounds.API._sharedObjects[saveId]) {
com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v2);
}
v3 = com.newgrounds.API._sharedObjects[saveId];
v3.data.data = com.newgrounds.API.encodeData(saveData);
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Unable to save local data.', error);
return false;
return true;
}
throw v0;
}
return true;
};
v1.loadLocal = function (saveId) {
try {
var v1;
var v3 = 'ng_ap_secure_' + com.newgrounds.API._connection.trackerId + '_' + com.newgrounds.crypto.RC4.encrypt(saveId, com.newgrounds.API._connection.encryptionKey);
if (!com.newgrounds.API._sharedObjects[saveId]) {
com.newgrounds.API._sharedObjects[saveId] = SharedObject.getLocal(v3);
}
v1 = com.newgrounds.API._sharedObjects[saveId];
if (v1 && v1.data && v1.data.data) {
return com.newgrounds.API.decodeData(v1.data.data);
}
return null;
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Unable to load local data.', error);
return null;
}
throw v0;
}
return null;
};
v1.logCustomEvent = function (eventName) {
if (com.newgrounds.API.assertConnected()) {
com.newgrounds.Logger.logMessage('Logged event: ' + eventName);
com.newgrounds.API._connection.sendSimpleCommand('logCustomEvent', null, {'event': eventName});
}
};
v1.encodeData = function (data) {
if (!com.newgrounds.API._connection.assertInitialized()) {
return null;
}
return com.newgrounds.crypto.RC4.encrypt(com.newgrounds.encoders.json.JSON.encode(data), com.newgrounds.API._connection.encryptionKey);
};
v1.decodeData = function (data) {
if (!com.newgrounds.API._connection.assertInitialized()) {
return null;
}
try {
return com.newgrounds.encoders.json.JSON.decode(com.newgrounds.crypto.RC4.decrypt(data, com.newgrounds.API._connection.encryptionKey));
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
return null;
}
throw v0;
}
return null;
};
v1.stopPendingCommands = function () {
com.newgrounds.APICommand.stopPendingCommands();
com.newgrounds.Logger.logMessage('Pending commands stopped.');
};
v1.setFont = function (textField, font) {
if (textField && font) {
var v2 = textField.getTextFormat();
var v4 = textField.embedFonts;
var v3 = new TextFormat(font);
textField.setNewTextFormat(v3);
textField.setTextFormat(v3);
textField.embedFonts = true;
if (textField.textWidth == 0) {
textField.embedFonts = v4;
textField.setTextFormat(v2);
textField.setNewTextFormat(v2);
} else {
textField.antiAliasType = 'advanced';
textField.sharpness = 120;
}
}
};
v1.VERSION = '3.0 beta 3 AS2';
v1.RELEASE_MODE = 'releaseMode';
v1.DEBUG_MODE_LOGGED_IN = 'debugModeLoggedIn';
v1.DEBUG_MODE_LOGGED_OUT = 'debugModeLoggedOut';
v1.DEBUG_MODE_NEW_VERSION = 'debugModeNewVersion';
v1.DEBUG_MODE_HOST_BLOCKED = 'debugModeHostBlocked';
v1.TEST_AD_FEED_URL = 'http://www.ngads.com/adtest.php';
v1._dispatcher = new com.newgrounds.APIEventDispatcher();
v1._connection = new com.newgrounds.APIConnection();
v1._debugMode = com.newgrounds.API.DEBUG_MODE_LOGGED_IN;
v1._adsApproved = false;
v1._medals = new Object();
v1._medalsArray = [];
v1._scoreBoards = new Object();
v1._scoreBoardsArray = [];
v1._saveGroups = new Object();
v1._saveGroupsArray = [];
v1._sharedObjects = new Object();
v1.addProperty('adFeedURL', v1.__get__adFeedURL, function () {});
v1.addProperty('adsApproved', v1.__get__adsApproved, function () {});
v1.addProperty('apiId', v1.__get__apiId, function () {});
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('debugMode', v1.__get__debugMode, v1.__set__debugMode);
v1.addProperty('hasUserSession', v1.__get__hasUserSession, function () {});
v1.addProperty('hostDomain', v1.__get__hostDomain, function () {});
v1.addProperty('hostURL', v1.__get__hostURL, function () {});
v1.addProperty('isNetworkHost', v1.__get__isNetworkHost, function () {});
v1.addProperty('isNewgrounds', v1.__get__isNewgrounds, function () {});
v1.addProperty('medals', v1.__get__medals, function () {});
v1.addProperty('publisherId', v1.__get__publisherId, function () {});
v1.addProperty('saveGroups', v1.__get__saveGroups, function () {});
v1.addProperty('scoreBoards', v1.__get__scoreBoards, function () {});
v1.addProperty('sessionId', v1.__get__sessionId, function () {});
v1.addProperty('userId', v1.__get__userId, function () {});
v1.addProperty('username', v1.__get__username, function () {});
ASSetPropFlags(com.newgrounds.API.prototype, null, 1);
}
#endinitclip
}
movieClip 495 __Packages.com.newgrounds.Bridge {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Bridge) {
var v1 = function (id) {
this._widgetId = id;
this._inConnection = new LocalConnection();
this._outConnection = new LocalConnection();
this._inConnection.receiveEvent = this.receiveEvent;
try {
this._inConnection.connect('rec_' + this._widgetId);
}
com.newgrounds.Logger.addEventListener(com.newgrounds.APIEvent.LOG, {'target': this, 'func': this.onLogMessage});
};
com.newgrounds.Bridge = v1;
var v2 = v1.prototype;
v2.onLogMessage = function (event) {
try {
this._outConnection.send(this._widgetId, 'sendEvent', event.__get__data());
}
};
v2.sendCommand = function (command, parameters) {};
v2.receiveEvent = function (event, parameters) {};
v2.onStatus = function (event) {};
ASSetPropFlags(com.newgrounds.Bridge.prototype, null, 1);
}
#endinitclip
}
movieClip 487 __Packages.com.newgrounds.APIEvent {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.APIEvent) {
var v1 = function (type, data, error) {
super(type);
if (data == undefined) {
data = null;
}
if (error == undefined) {
error = null;
}
if (!error || error == '' || error == com.newgrounds.APIEvent.ERROR_NONE) {
this._error = com.newgrounds.APIEvent.ERROR_NONE;
this._success = true;
} else {
this._error = error;
this._success = false;
}
if (data) {
this._data = data;
} else {
this._data = {};
}
};
com.newgrounds.APIEvent = v1;
com.newgrounds.APIEvent extends com.newgrounds.Event;
var v2 = v1.prototype;
v2.clone = function () {
return new com.newgrounds.APIEvent(this.__get__type(), this._data, this._error);
};
v2.__get__success = function () {
return this._success;
};
v2.__get__data = function () {
return this._data;
};
v2.__get__error = function () {
return this._error;
};
v1.COMMAND_COMPLETE = 'commandComplete';
v1.MEDAL_UNLOCK_CONFIRMED = 'medalUnlockConfirmed';
v1.ICON_LOADED = 'iconLoaded';
v1.API_CONNECTED = 'movieConnected';
v1.LOG = 'log';
v1.MEDAL_UNLOCKED = 'medalUnlocked';
v1.SCORES_LOADED = 'scoresLoaded';
v1.SCORE_POSTED = 'scorePosted';
v1.QUERY_COMPLETE = 'queryComplete';
v1.FILE_LOADED = 'fileLoaded';
v1.FILE_SAVED = 'fileSaved';
v1.VOTE_COMPLETE = 'voteComplete';
v1.ERROR_NONE = 'noError';
v1.ERROR_UNKNOWN = 'unknownError';
v1.ERROR_COMMAND_FAILED = 'commandFailed';
v1.ERROR_NOT_CONNECTED = 'notConnected';
v1.ERROR_INVALID_ARGUMENT = 'invalidArgument';
v1.ERROR_TIMED_OUT = 'timedOut';
v1.ERROR_BAD_FILE = 'badFile';
v1.ERROR_BAD_RESPONSE = 'badResponse';
v1.ERROR_SENDING_COMMAND = 'errorSendingCommand';
v1.ERROR_HOST_BLOCKED = 'hostBlocked';
v1.ERROR_ALREADY_VOTED = 'alreadyVoted';
v1.ERROR_NOT_LOGGED_IN = 'notLoggedIn';
v2.addProperty('data', v2.__get__data, function () {});
v2.addProperty('error', v2.__get__error, function () {});
v2.addProperty('success', v2.__get__success, function () {});
ASSetPropFlags(com.newgrounds.APIEvent.prototype, null, 1);
}
#endinitclip
}
movieClip 503 __Packages.com.newgrounds.encoders.ImageScanner {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.ImageScanner) {
var v1 = function (hashLength, charsPerPixel) {
if (hashLength) {
this._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH.substr(0, hashLength);
}
this._baseN = new com.newgrounds.encoders.BaseN(this._hash);
if (charsPerPixel) {
this._charsPerPixel = charsPerPixel;
}
this.__set__encodeAlpha(false);
};
com.newgrounds.encoders.ImageScanner = v1;
var v2 = v1.prototype;
v2.__get__encodeAlpha = function () {
return this._encodeAlpha;
};
v2.__set__encodeAlpha = function (v) {
this._encodeAlpha = v;
this._maxPerChannel = int(Math.pow(this._hash.length, this._charsPerPixel / (this._encodeAlpha ? 4 : 3)));
if (this._maxPerChannel > 256) {
this._maxPerChannel = 256;
}
return this.__get__encodeAlpha();
};
v2.encode = function (source, callbackFunction, callbackObject) {
var v4 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'x': 0, 'y': 0, 'output': null};
var v2 = source.width.toString();
var v3 = source.height.toString();
while (v2.length < 3) {
v2 = '0' + v2;
}
while (v3.length < 3) {
v3 = '0' + v3;
}
v4.output = v2 + v3;
var v6 = setInterval(this, 'doEncode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v4);
v4.interval = v6;
};
v2.decode = function (source, callbackFunction, callbackObject) {
var v2 = {'callbackFunction': callbackFunction, 'callbackObject': callbackObject, 'source': source, 'i': 6, 'x': 0, 'y': 0, 'output': null};
var v5 = int(source.substr(0, 3));
var v6 = int(source.substr(3, 3));
v2.output = new flash.display.BitmapData(v5, v6, this._encodeAlpha);
var v4 = setInterval(this, 'doDecode', com.newgrounds.encoders.ImageScanner.WORK_INTERVAL, v2);
v2.interval = v4;
};
v2.doEncode = function (state) {
var v3 = getTimer();
for (;;) {
if (!(state.y < state.source.height && getTimer() - v3 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break;
state.output += this.encodePixel(state.source.getPixel32(state.x, state.y));
++state.x;
if (state.x == state.source.width) {
state.x = 0;
++state.y;
}
}
if (state.y == state.source.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
};
v2.doDecode = function (state) {
var v4 = getTimer();
for (;;) {
if (!(state.y < state.output.height && getTimer() - v4 < com.newgrounds.encoders.ImageScanner.WORK_INTERVAL)) break;
var v3 = this.decodePixel(state.source.substr(state.i, this._charsPerPixel));
state.output.setPixel32(state.x, state.y, v3);
state.i += this._charsPerPixel;
++state.x;
if (state.x == state.output.width) {
state.x = 0;
++state.y;
}
}
if (state.y == state.output.height) {
clearInterval(state.interval);
state.callbackFunction.call(state.callbackObject, state.output);
}
};
v2.encodePixel = function (pixel) {
var v3 = pixel >> 24 & 255;
var v4 = pixel >> 16 & 255;
var v5 = pixel >> 8 & 255;
var v2 = pixel & 255;
v3 = int((v3 / 256) * this._maxPerChannel);
v4 = int((v4 / 256) * this._maxPerChannel);
v5 = int((v5 / 256) * this._maxPerChannel);
v2 = int((v2 / 256) * this._maxPerChannel);
var v7 = v4 * this._maxPerChannel * this._maxPerChannel + v5 * this._maxPerChannel + v2;
if (this._encodeAlpha) {
v7 += v3 * this._maxPerChannel * this._maxPerChannel * this._maxPerChannel;
}
return this._baseN.encodeUint(v7, this._charsPerPixel);
};
v2.decodePixel = function (encodedPixel) {
var v3 = 255;
var v5;
var v6;
var v4;
var v7 = 0;
var v2 = this._baseN.decodeUint(encodedPixel);
v4 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
v6 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
v5 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
if (this._encodeAlpha) {
v3 = v2 % this._maxPerChannel;
v2 /= int(this._maxPerChannel);
}
return v3 << 24 | v5 << 16 | v6 << 8 | v4;
};
v1.DEFAULT_HASH = '0123456789aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ<>?:;-_=+()!&';
v2._hash = com.newgrounds.encoders.ImageScanner.DEFAULT_HASH;
v2._charsPerPixel = 2;
v1.WORK_INTERVAL = 33.33333333333334;
v2.addProperty('encodeAlpha', v2.__get__encodeAlpha, v2.__set__encodeAlpha);
ASSetPropFlags(com.newgrounds.encoders.ImageScanner.prototype, null, 1);
}
#endinitclip
}
movieClip 504 __Packages.com.newgrounds.SaveFile {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveFile) {
var v1 = function (group) {
super();
this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.SaveFile.DEFAULT_ICON, null);
this._group = group;
};
com.newgrounds.SaveFile = v1;
com.newgrounds.SaveFile extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v1.__get__currentFile = function () {
return com.newgrounds.SaveFile._currentFile;
};
v1.fromObject = function (group, fileData) {
var v4 = new com.newgrounds.SaveFile(group);
v4._name = fileData.filename;
v4._description = fileData.description;
v4._id = fileData.save_id;
v4._authorId = fileData.user_id;
v4._authorName = fileData.user_name;
v4._createdDate = fileData.created;
v4._modifiedDate = fileData.last_update;
v4._views = fileData.views;
if (fileData.thumb && fileData.thumb != '') {
v4._iconLoader.__set__url(com.newgrounds.SaveFile._imageFilePath + fileData.thumb);
}
v4._dataURL = com.newgrounds.SaveFile._saveFilePath + fileData.file;
v4._fileSize = fileData.file_size;
v4._approved = fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED;
v4._readOnly = false;
v4._public = fileData.status != com.newgrounds.SaveFile.STATUS_PRIVATE && fileData.status != com.newgrounds.SaveFile.STATUS_UNAPPROVED;
for (var v8 in fileData.keys) {
var v6 = fileData.keys[v8];
var v2 = group.getKeyById(v6.id);
if (v2) {
v4._keys[v2.__get__name()] = v2.validateValue(v6.value);
}
}
for (var v9 in fileData.ratings) {
var v5 = fileData.ratings[v9];
var v3 = group.getRatingById(v5.id);
if (v3) {
v4._ratings[v3.__get__name()] = v3.validateValue(v5.score);
}
}
return v4;
};
v2.__get__group = function () {
return this._group;
};
v2.__get__name = function () {
return this._name;
};
v2.__set__name = function (val) {
this._name = val;
return this.__get__name();
};
v2.__get__description = function () {
return this._description;
};
v2.__set__description = function (val) {
this._description = val;
return this.__get__description();
};
v2.__get__id = function () {
return this._id;
};
v2.__get__data = function () {
return this._data;
};
v2.__set__data = function (val) {
this._data = val;
return this.__get__data();
};
v2.__get__bytesLoaded = function () {
if (this._data) {
return this.__get__bytesTotal();
} else {
if (!this._dataLoader) {
return 0;
} else {
return this._dataLoader.getBytesLoaded();
}
}
};
v2.__get__bytesTotal = function () {
return this._fileSize;
};
v2.__get__readOnly = function () {
return this._readOnly;
};
v2.__get__draft = function () {
return this._draft;
};
v2.__set__draft = function (v) {
this._draft = v;
return this.__get__draft();
};
v2.__get__authorId = function () {
return this._authorId;
};
v2.__get__authorName = function () {
return this._authorName;
};
v2.__get__keys = function () {
return this._keys;
};
v2.__get__ratings = function () {
return this._ratings;
};
v2.__get__views = function () {
return this._views;
};
v2.__get__createdDate = function () {
return this._createdDate;
};
v2.__get__updatedDate = function () {
return this._modifiedDate;
};
v2.toString = function () {
return 'Save File: ' + this._name;
};
v2.__get__icon = function () {
return this._iconLoader.__get__bitmapData();
};
v2.__set__icon = function (v) {
this.createIcon(v);
return this.__get__icon();
};
v2.__get__iconLoaded = function () {
return this._iconLoader.__get__loaded();
};
v2.createIcon = function (source) {
var v9 = new flash.display.BitmapData(com.newgrounds.SaveFile.ICON_WIDTH, com.newgrounds.SaveFile.ICON_HEIGHT, false, 0);
var v6;
var v5;
var v10 = 0;
var v8 = 0;
if (source instanceof flash.display.BitmapData) {
v6 = source.width;
v5 = source.height;
} else {
if (source instanceof MovieClip) {
v6 = source._width;
v5 = source._height;
var v7 = (MovieClip(source)).getBounds(source);
v10 = v7.xMin;
v8 = v7.yMin;
}
}
var v3 = new flash.geom.Matrix();
var v4;
v4 = Math.min(com.newgrounds.SaveFile.ICON_WIDTH / v6, com.newgrounds.SaveFile.ICON_HEIGHT / v5);
v3.translate(-v10, -v8);
v3.scale(v4, v4);
v3.translate((com.newgrounds.SaveFile.ICON_WIDTH - v6 * v4) / 2, (com.newgrounds.SaveFile.ICON_HEIGHT - v5 * v4) / 2);
v9.draw(source, v3);
this._iconLoader.__set__bitmapData(v9);
};
v2.attachIcon = function (parent) {
if (this._iconLoader) {
return this._iconLoader.attachBitmap(parent);
}
com.newgrounds.Logger.logError('No icon available for this sumbission.');
return null;
};
v2.save = function () {
if (!(this._group.__get__connection()).__get__hasUserSession()) {
com.newgrounds.Logger.logError('The user must be logged-in to save a file.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, null, com.newgrounds.APIEvent.ERROR_NOT_LOGGED_IN));
return undefined;
}
com.newgrounds.SaveFile._currentFile = this;
if (this.__get__iconLoaded()) {
com.newgrounds.SaveFile.ICON_IMAGE_SCANNER.encode(this.__get__icon(), this.onIconEncoded, this);
} else {
this.encodeData(true);
}
};
v2.onIconEncoded = function (encodedIcon) {
this._encodedIcon = encodedIcon;
this.encodeData(true);
};
v2.doSave = function () {
var v4 = new com.newgrounds.APICommand('saveFile');
(v4.__get__secureParameters()).group = this._group.id;
(v4.__get__secureParameters()).user_name = (this._group.__get__connection()).username;
(v4.__get__secureParameters()).filename = this._name;
(v4.__get__secureParameters()).description = this._description;
if (this._draft) {
(v4.__get__secureParameters()).draft = true;
}
if (this._id && !this._readOnly) {
(v4.__get__secureParameters()).overwrite = 1;
(v4.__get__secureParameters()).save_id = this._id;
}
var v8 = [];
for (var v9 in this._keys) {
var v2 = this._group.getKey(v9);
if (v2) {
v8.push({'id': v2.__get__id(), 'value': v2.validateValue(this._keys[v9])});
} else {
com.newgrounds.Logger.logError('No key named "' + v9 + '" in save group "' + this._group.__get__name() + '".');
}
}
(v4.__get__secureParameters()).keys = v8;
var v7 = [];
for (var v10 in this._ratings) {
var v3 = this._group.getRating(v10);
if (v3) {
v7.push({'id': v3.__get__id(), 'value': v3.validateValue(this._ratings[v10])});
} else {
com.newgrounds.Logger.logError('No rating named "' + v10 + '" in save group "' + this._group.__get__name() + '".');
}
}
(v4.__get__secureParameters()).ratings = v7;
if (typeof this._encodedData == 'string') {
v4.addFile('file', this._encodedData, 'file');
} else {
v4.addFile('file', com.newgrounds.encoders.json.JSON.encode(this._encodedData), 'file');
}
if (this.__get__iconLoaded()) {
v4.addFile('thumbnail', this._encodedIcon, 'thumbnail');
}
v4.addEventListener(com.newgrounds.APIEvent.COMMAND_COMPLETE, {'target': this, 'func': this.onSaveComplete});
(this._group.__get__connection()).sendCommand(v4);
};
v2.encodeData = function (encode) {
this._encoderQueue = [];
this._encoding = encode;
if (encode) {
this._encodedData = this._data;
this.preEncodeObject(this, '_encodedData');
} else {
this.preEncodeObject(this, '_data');
}
this.encodeObject();
};
v2.preEncodeObject = function (parent, property) {
var v3 = parent[property];
var v5;
try {
if (this._encoding) {
v5 = v3 instanceof flash.display.BitmapData;
} else {
v5 = v3.type == '__bitmap';
}
}
var v2 = v3;
var v8;
if (v5) {
this._encoderQueue.push({'parent': parent, 'property': property});
} else {
if (typeof v3 == 'object' && !v8) {
if (this._encoding) {
if (v3 instanceof Array) {
v2 = [];
} else {
v2 = {};
}
for (var v4 in v3) {
v2[v4] = v3[v4];
}
parent[property] = v2;
}
for (v4 in v2) {
this.preEncodeObject(v2, v4);
}
}
}
};
v2.encodeObject = function () {
if (!this._encoderQueue.length) {
if (this._encoding) {
this.doSave();
} else {
this._dataLoaded = true;
this.checkLoadComplete();
}
return undefined;
}
var v6 = this._encoderQueue.pop();
var v4 = v6.parent;
var v3 = v6.property;
var v2 = v4[v3];
var v5;
if (this._encoding) {
v5 = {'type': '__bitmap', 'width': v2.width, 'height': v2.height, 'transparent': v2.transparent};
v4[v3] = v5;
this._encodingParent = v5;
this._encodingProperty = 'data';
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent);
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.encode(flash.display.BitmapData(v2), this.encodeBitmapComplete, this);
} else {
this._encodingParent = v4;
this._encodingProperty = v3;
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.__set__encodeAlpha(v2.transparent);
com.newgrounds.SaveFile.DATA_IMAGE_SCANNER.decode(String(v2.data), this.encodeBitmapComplete, this);
}
};
v2.encodeBitmapComplete = function (data) {
this._encodingParent[this._encodingProperty] = data;
this.encodeObject();
};
v2.load = function () {
com.newgrounds.SaveFile._currentFile = this;
this._dataLoaded = false;
this._data = null;
if (!this.__get__iconLoaded()) {
this._iconLoader.addEventListener(com.newgrounds.APIEvent.ICON_LOADED, {'target': this, 'func': this.onIconLoaded});
this._iconLoader.load();
}
this._dataLoader = new LoadVars();
var file = this;
this._dataLoader.onData = function (data) {
file.onDataLoaded(data);
};
this._dataLoader.load(this._dataURL);
};
v2.onIconLoaded = function (event) {
if (!event.__get__success() && this._iconLoader.__get__url()) {
com.newgrounds.Logger.logWarning('Unable to load the icon for this save file.');
}
this._iconLoader.removeEventListener(com.newgrounds.APIEvent.ICON_LOADED, this.onIconLoaded);
this.checkLoadComplete();
};
v2.checkLoadComplete = function () {
if (this._dataLoaded && this.__get__iconLoaded()) {
com.newgrounds.Logger.logMessage('Data loaded.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this));
}
};
v2.onDataLoaded = function (data) {
try {
if (data) {
if (data.charAt(0) == '{') {
this._data = com.newgrounds.encoders.json.JSON.decode(String(data));
} else {
this._data = String(data);
}
this.encodeData(false);
}
}
catch (v0) {
if (Error(v0) != null) {
var error = Error(v0);
com.newgrounds.Logger.logError('Error while loading data:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE));
} else {
throw v0;
}
}
};
v2.onDataError = function (error) {
com.newgrounds.Logger.logError('Unable to load data:', error);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_LOADED, this, com.newgrounds.APIEvent.ERROR_BAD_FILE));
};
v2.onSaveComplete = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('File "' + this._name + '" saved!');
if (event.__get__data()) {
this._id = (event.__get__data()).save_id;
this._dataURL = unescape((event.__get__data()).file_url);
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this));
} else {
com.newgrounds.Logger.logError('Error saving file "' + this._name + '":', event.__get__error());
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.FILE_SAVED, this, event.__get__error()));
}
};
v2.sendVote = function (ratingName, vote) {
var v2 = this._group.getRating(ratingName);
if (!v2) {
com.newgrounds.Logger.logError('No save rating named "' + ratingName + '" exists for this save group.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
vote = v2.validateValue(vote);
if (isNaN(vote)) {
com.newgrounds.Logger.logError('Invalid vote (' + vote + '). ' + ratingName + ' allows a range of ' + v2.__get__minimum() + '-' + v2.__get__maximum() + '.');
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, {}, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
com.newgrounds.Logger.logMessage('Voting ' + vote + ' for ' + ratingName + ' on ' + this._name + '...');
(this._group.__get__connection()).sendSimpleCommand('rateSaveFile', {'target': this, 'func': this.onVoteComplete}, null, {'group': this._group.__get__id(), 'save_id': this._id, 'rating_id': v2.__get__id(), 'vote': vote});
};
v2.onVoteComplete = function (event) {
var v2 = event.__get__error();
if ((event.__get__data()).already_voted) {
com.newgrounds.Logger.logError('Vote failed. You\'ve already voted on this rating today.');
v2 = com.newgrounds.APIEvent.ERROR_ALREADY_VOTED;
}
if (v2 == com.newgrounds.APIEvent.ERROR_NONE) {
var v3 = this._group.getRatingById((event.__get__data()).rating_id);
if (v3) {
this._ratings[v3.__get__name()] = v3.validateValue((event.__get__data()).score);
}
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.VOTE_COMPLETE, this, v2));
};
v2.clone = function () {
var v3 = new com.newgrounds.SaveFile(this._group);
v3._data = this._data;
v3._description = this._description;
v3._draft = this._draft;
v3._fileSize = this._fileSize;
v3._iconLoader.__set__bitmapData(this._iconLoader.bitmapData);
var v2;
for (v2 in this._keys) {
v3._keys[v2] = this._keys[v2];
}
for (v2 in this._ratings) {
v3._ratings[v2] = this._ratings[v2];
}
v3._name = this._name;
return v3;
};
v1.ICON_WIDTH = 90;
v1.ICON_HEIGHT = 90;
v1.DEFAULT_ICON = flash.display.BitmapData.loadBitmap('DefaultSaveIcon');
v1.STATUS_PRIVATE = 0;
v1.STATUS_SHARED = 1;
v1.STATUS_UNAPPROVED = 2;
v1.STATUS_APPROVED = 3;
v1._imageFilePath = '';
v1._saveFilePath = '';
v1.ICON_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner();
v1.DATA_IMAGE_SCANNER = new com.newgrounds.encoders.ImageScanner(64, 6);
v2._keys = new Object();
v2._ratings = new Object();
v2.addProperty('authorId', v2.__get__authorId, function () {});
v2.addProperty('authorName', v2.__get__authorName, function () {});
v2.addProperty('bytesLoaded', v2.__get__bytesLoaded, function () {});
v2.addProperty('bytesTotal', v2.__get__bytesTotal, function () {});
v2.addProperty('createdDate', v2.__get__createdDate, function () {});
v1.addProperty('currentFile', v1.__get__currentFile, function () {});
v2.addProperty('data', v2.__get__data, v2.__set__data);
v2.addProperty('description', v2.__get__description, v2.__set__description);
v2.addProperty('draft', v2.__get__draft, v2.__set__draft);
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('icon', v2.__get__icon, v2.__set__icon);
v2.addProperty('iconLoaded', v2.__get__iconLoaded, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('keys', v2.__get__keys, function () {});
v2.addProperty('name', v2.__get__name, v2.__set__name);
v2.addProperty('ratings', v2.__get__ratings, function () {});
v2.addProperty('readOnly', v2.__get__readOnly, function () {});
v2.addProperty('updatedDate', v2.__get__updatedDate, function () {});
v2.addProperty('views', v2.__get__views, function () {});
ASSetPropFlags(com.newgrounds.SaveFile.prototype, null, 1);
}
#endinitclip
}
movieClip 502 __Packages.com.newgrounds.SaveGroup {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveGroup) {
var v1 = function (connection, name, id, type, keys, ratings) {
this._connection = connection;
this._id = id;
this._name = name;
this._type = type;
this._keysArray = keys;
this._ratingsArray = ratings;
this._keys = new Object();
this._ratings = new Object();
var v11;
for (var v7 in keys) {
var v2 = keys[v7];
this._keys[v2.__get__name()] = v2;
}
for (var v6 in ratings) {
var v3 = ratings[v6];
this._ratings[v3.__get__name()] = v3;
}
};
com.newgrounds.SaveGroup = v1;
var v2 = v1.prototype;
v2.__get__connection = function () {
return this._connection;
};
v2.__get__name = function () {
return this._name;
};
v2.__get__type = function () {
return this._type;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__keys = function () {
return this._keysArray;
};
v2.__get__ratings = function () {
return this._ratingsArray;
};
v2.getKey = function (name) {
return this._keys[name];
};
v2.getRating = function (name) {
return this._ratings[name];
};
v2.getKeyById = function (id) {
for (var v4 in this._keys) {
var v2 = this._keys[v4];
if (v2.__get__id() == id) {
return v2;
}
}
return null;
};
v2.getRatingById = function (id) {
for (var v4 in this._ratings) {
var v2 = this._ratings[v4];
if (v2.__get__id() == id) {
return v2;
}
}
return null;
};
v2.toString = function () {
return 'SaveGroup: ' + this.__get__name() + ' Keys: ' + this._keysArray + ' Ratings: ' + this._ratingsArray;
};
v1.TYPE_SYSTEM = 0;
v1.TYPE_PRIVATE = 1;
v1.TYPE_PUBLIC = 2;
v1.TYPE_MODERATED = 3;
v2.addProperty('connection', v2.__get__connection, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('keys', v2.__get__keys, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('ratings', v2.__get__ratings, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.SaveGroup.prototype, null, 1);
}
#endinitclip
}
movieClip 500 __Packages.com.newgrounds.SaveKey {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveKey) {
var v1 = function (name, id, type) {
this._name = name;
this._id = id;
this._type = type;
};
com.newgrounds.SaveKey = v1;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__type = function () {
return this._type;
};
v2.validateValue = function (value) {
switch (this._type) {
return null;
case com.newgrounds.SaveKey.TYPE_INTEGER:
value = Number(value);
if (!isNaN(value)) {
var v3 = int(value);
if (v3 != value) {
com.newgrounds.Logger.logWarning('Float value ' + value + ' given for integer key "' + this._name + '". Clamping to ' + v3 + '.');
}
return v3;
}
return null;
case com.newgrounds.SaveKey.TYPE_FLOAT:
value = Number(value);
if (!isNaN(value)) {
return isNaN(Number(value));
}
return null;
case com.newgrounds.SaveKey.TYPE_BOOLEAN:
return Boolean(value);
return null;
case com.newgrounds.SaveKey.TYPE_STRING:
return value ? value.toString() : '';
return null;
}
return null;
};
v2.toString = function () {
return this._name;
};
v1.TYPE_FLOAT = 1;
v1.TYPE_INTEGER = 2;
v1.TYPE_STRING = 3;
v1.TYPE_BOOLEAN = 4;
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('type', v2.__get__type, function () {});
ASSetPropFlags(com.newgrounds.SaveKey.prototype, null, 1);
}
#endinitclip
}
movieClip 501 __Packages.com.newgrounds.SaveRating {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveRating) {
var v1 = function (name, id, isFloat, minimum, maximum) {
this._name = name;
this._id = id;
this._isFloat = isFloat;
this._minimum = minimum;
this._maximum = maximum;
};
com.newgrounds.SaveRating = v1;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__id = function () {
return this._id;
};
v2.__get__isFloat = function () {
return this._isFloat;
};
v2.__get__minimum = function () {
return this._minimum;
};
v2.__get__maximum = function () {
return this._maximum;
};
v2.validateValue = function (value) {
var v2 = Number(value);
if (isNaN(v2)) {
com.newgrounds.Logger.logError('Invalid value for rating "' + this._name + '".');
return NaN;
}
if (v2 < this._minimum) {
com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._minimum + '.');
return this._minimum;
}
if (v2 > this._maximum) {
com.newgrounds.Logger.logWarning(v2 + ' is out of acceptable range for rating "' + this._name + '". Clamping to ' + this._maximum + '.');
return this._maximum;
}
if (!this.__get__isFloat()) {
var v3 = int(v2);
if (v3 != v2) {
com.newgrounds.Logger.logWarning('Float value ' + v2 + ' given for integer rating "' + this._name + '". Clamping to ' + v3 + '.');
}
return v3;
}
return v2;
};
v2.toString = function () {
return this._name;
};
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('isFloat', v2.__get__isFloat, function () {});
v2.addProperty('maximum', v2.__get__maximum, function () {});
v2.addProperty('minimum', v2.__get__minimum, function () {});
v2.addProperty('name', v2.__get__name, function () {});
ASSetPropFlags(com.newgrounds.SaveRating.prototype, null, 1);
}
#endinitclip
}
movieClip 496 __Packages.com.newgrounds.BitmapLoader {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.BitmapLoader) {
var v1 = function (defaultBitmap, url) {
super();
this._bitmapData = defaultBitmap;
this._url = url;
};
com.newgrounds.BitmapLoader = v1;
com.newgrounds.BitmapLoader extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__url = function () {
return this._url;
};
v2.__set__url = function (v) {
this._loaded = false;
this._url = v;
return this.__get__url();
};
v2.__get__bitmapData = function () {
return this._bitmapData;
};
v2.__set__bitmapData = function (v) {
this._bitmapData = v;
this._loaded = true;
return this.__get__bitmapData();
};
v2.__get__loaded = function () {
return this._loaded;
};
v2.disposeLoader = function () {
if (this._loader) {
if (this._loaderClip._parent == _root) {
this._loader.unloadClip(this._loaderClip.bitmap);
this._loaderClip.removeMovieClip();
}
this._loader = null;
this._loaderClip = null;
}
};
v2.load = function () {
if (!this._url || this._url == '') {
this.onLoadComplete();
return undefined;
}
this._loaded = false;
if (this._bitmapData) {
this._bitmapData.dispose();
this._bitmapData = null;
}
this.disposeLoader();
this.attachBitmap(null);
};
v2.attachBitmap = function (parent) {
if (!parent) {
parent = _root;
}
var v5 = parent.getNextHighestDepth();
var v3 = parent.createEmptyMovieClip('__bitmap' + v5, v5);
if (!this._loaded && this._url && this._url != '') {
v3.createEmptyMovieClip('bitmap', 0);
this._loader = new MovieClipLoader();
this._loaderClip = v3;
if (parent == _root) {
this._loaderClip._visible = false;
}
var thisObj = this;
this._loaderClip.onEnterFrame = function () {
thisObj.pollLoad();
};
this._loader.addListener({'onLoadError': function () {
thisObj.onLoadComplete();
}});
this._loader.loadClip(this._url, v3.bitmap);
return v3;
}
v3.attachBitmap(this._bitmapData, 0);
return v3;
};
v2.pollLoad = function () {
if (this._loaderClip._width) {
this.onLoadComplete();
}
};
v2.onLoadComplete = function () {
var v2;
if (this._loader && this._loaderClip && this._loaderClip._width) {
try {
this._loaderClip.onEnterFrame = null;
v2 = new flash.display.BitmapData(this._loaderClip._width, this._loaderClip._height, true, 0);
v2.draw(this._loaderClip);
this._bitmapData = v2;
this._loaded = true;
}
catch (error) {
if (v2) {
v2.dispose();
}
}
}
this.disposeLoader();
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.ICON_LOADED, this, this._loaded ? null : com.newgrounds.APIEvent.ERROR_BAD_FILE));
};
v2._loaded = true;
v2.addProperty('bitmapData', v2.__get__bitmapData, v2.__set__bitmapData);
v2.addProperty('loaded', v2.__get__loaded, function () {});
v2.addProperty('url', v2.__get__url, v2.__set__url);
ASSetPropFlags(com.newgrounds.BitmapLoader.prototype, null, 1);
}
#endinitclip
}
movieClip 505 __Packages.com.newgrounds.SaveQuery {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.SaveQuery) {
var v1 = function (group) {
super();
this._group = group;
this._connection = group.connection;
this.includeAllFields();
};
com.newgrounds.SaveQuery = v1;
com.newgrounds.SaveQuery extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__group = function () {
return this._group;
};
v2.__get__resultsPerPage = function () {
return this._resultsPerPage;
};
v2.__set__resultsPerPage = function (val) {
this._resultsPerPage = Math.min(Math.max(val, 1), 100);
return this.__get__resultsPerPage();
};
v2.__get__page = function () {
return this._page;
};
v2.__set__page = function (val) {
this._page = Math.max(val, 1);
return this.__get__page();
};
v2.prevPage = function () {
this.__set__page(this.__get__page() - 1);
};
v2.nextPage = function () {
this.__set__page(this.__get__page() + 1);
};
v2.__get__isRandomized = function () {
return this._isRandomized;
};
v2.__set__isRandomized = function (val) {
this._isRandomized = val;
return this.__get__isRandomized();
};
v2.__get__files = function () {
return this._files;
};
v2.reset = function () {
this._page = 1;
this._resultsPerPage = 10;
this._isRandomized = false;
this._lookupKeys = [];
this._lookupRatings = [];
this._fileConditions = [];
this._keyConditions = [];
this._ratingConditions = [];
this._files = [];
this.includeAllFields();
};
v2.clone = function () {
var v2 = new com.newgrounds.SaveQuery(this._group);
v2._page = this._page;
v2._resultsPerPage = this._resultsPerPage;
v2._isRandomized = this._isRandomized;
v2._lookupKeys = this._lookupKeys.concat();
v2._lookupRatings = this._lookupRatings.concat();
v2._fileConditions = this._fileConditions.concat();
v2._keyConditions = this._keyConditions.concat();
v2._ratingConditions = this._ratingConditions.concat();
return v2;
};
v2.includeAllFields = function () {
for (var v5 in this._group.__get__keys()) {
var v2 = (this._group.__get__keys())[v5];
this._lookupKeys.push(v2.__get__id());
}
for (var v4 in this._group.__get__ratings()) {
var v3 = (this._group.__get__ratings())[v4];
this._lookupRatings.push(v3.__get__id());
}
};
v2.addCondition = function (field, operator, value) {
var v2;
v2 = 0;
while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) {
if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) {
break;
}
++v2;
}
if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) {
v2 = -1;
}
if (v2 >= 0) {
this._fileConditions.push({'field': v2, 'operator': operator, 'value': value});
} else {
var v3 = this._group.getKey(field);
if (v3) {
value = v3.validateValue(value);
this._keyConditions.push({'key_id': v3.__get__id(), 'operator': operator, 'value': value});
return undefined;
}
var v4 = field.split('.');
var v6 = this._group.getRating(v4[0]);
if (v6) {
value = v6.validateValue(value);
this._ratingConditions.push({'rating_id': v6.__get__id(), 'operator': operator, 'value': value, 'column': v4[1] ? v4[1] : 'score'});
return undefined;
}
com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".');
}
};
v2.sortOn = function (field, sortDescending) {
if (sortDescending == undefined) {
sortDescending = false;
}
var v2;
v2 = 0;
while (v2 < com.newgrounds.SaveQuery.FILE_FIELDS.length) {
if (com.newgrounds.SaveQuery.FILE_FIELDS[v2] == field) {
break;
}
++v2;
}
if (v2 == com.newgrounds.SaveQuery.FILE_FIELDS.length) {
v2 = -1;
}
if (v2 >= 0) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_FILES, 'field': v2, 'desc': sortDescending});
} else {
var v5 = this._group.getKey(field);
if (v5) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_KEYS, 'field': v5.__get__id(), 'desc': sortDescending});
return undefined;
}
var v3 = field.split('.');
var v6 = this._group.getRating(v3[0]);
if (v6) {
this._sortFields.push({'table': com.newgrounds.SaveQuery.TABLE_RATINGS, 'field': v6.__get__id(), 'desc': sortDescending, 'extra': v3[1] ? v3[1] : 'score'});
return undefined;
}
com.newgrounds.Logger.logError('The save group "' + this._group.__get__name() + '" does not have a field named "' + field + '".');
}
};
v2.execute = function () {
var v5 = {};
v5.page = this._page;
v5.num_results = this._resultsPerPage;
if (this._isRandomized) {
v5.randomize = 1;
}
if (this._lookupKeys && this._lookupKeys.length) {
v5.lookup_keys = this._lookupKeys;
}
if (this._lookupRatings && this._lookupRatings.length) {
v5.lookup_ratings = this._lookupRatings;
}
if (this._fileConditions && this._fileConditions.length) {
v5.file_conditions = this._fileConditions;
}
if (this._keyConditions && this._keyConditions.length) {
v5.key_conditions = this._keyConditions;
}
if (this._ratingConditions && this._ratingConditions.length) {
v5.rating_conditions = this._ratingConditions;
}
if (this._sortFields && this._sortFields.length) {
v5.sort_conditions = this._sortFields;
}
this._connection.sendSimpleCommand('lookupSaveFiles', {'target': this, 'func': this.onQueryComplete}, {'publisher_id': this._connection.publisherId, 'group_id': this._group.__get__id(), 'query': v5});
};
v2.onQueryComplete = function (event) {
if (event.__get__success()) {
var v4 = event.__get__data();
this._files = [];
if (v4.files) {
var v2 = 0;
while (v2 < v4.files.length) {
var v3 = com.newgrounds.SaveFile.fromObject(this._group, v4.files[v2]);
if (v3) {
this._files.push(v3);
}
++v2;
}
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this));
} else {
com.newgrounds.Logger.logError('Query failed: ' + event.__get__error());
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.QUERY_COMPLETE, this, event.__get__error()));
}
};
v1.FILE_ID = 'fileId';
v1.AUTHOR_ID = 'authorId';
v1.AUTHOR_NAME = 'authorName';
v1.FILE_NAME = 'fileName';
v1.CREATED_ON = 'createdOn';
v1.UPDATED_ON = 'updatedOn';
v1.FILE_VIEWS = 'fileViews';
v1.FILE_STATUS = 'fileStatus';
v1.FILE_FIELDS = [com.newgrounds.SaveQuery.FILE_ID, com.newgrounds.SaveQuery.AUTHOR_ID, com.newgrounds.SaveQuery.AUTHOR_NAME, com.newgrounds.SaveQuery.FILE_NAME, com.newgrounds.SaveQuery.CREATED_ON, com.newgrounds.SaveQuery.UPDATED_ON, com.newgrounds.SaveQuery.FILE_VIEWS, com.newgrounds.SaveQuery.FILE_STATUS];
v1.OPERATOR_EQUAL = '=';
v1.OPERATOR_LESS_THAN = '<';
v1.OPERATOR_GREATER_THAN = '>';
v1.OPERATOR_NOT_EQUAL = '!=';
v1.OPERATOR_LESS_OR_EQUAL = '<=';
v1.OPERATOR_GREATER_OR_EQUAL = '>=';
v1.OPERATOR_CONTAINS = '*';
v1.OPERATOR_NOT_CONTAINS = '!*';
v1.OPERATOR_NOT_BEGINS_WITH = '!*=';
v1.OPERATOR_NOT_ENDS_WITH = '!=*';
v1.OPERATOR_BEGINS_WITH = '*=';
v1.OPERATOR_ENDS_WITH = '=*';
v1.TABLE_FILES = 1;
v1.TABLE_KEYS = 2;
v1.TABLE_RATINGS = 3;
v2._page = 1;
v2._resultsPerPage = 10;
v2._isRandomized = false;
v2._files = [];
v2._lookupKeys = [];
v2._lookupRatings = [];
v2._fileConditions = [];
v2._keyConditions = [];
v2._ratingConditions = [];
v2._sortFields = [];
v2.addProperty('files', v2.__get__files, function () {});
v2.addProperty('group', v2.__get__group, function () {});
v2.addProperty('isRandomized', v2.__get__isRandomized, v2.__set__isRandomized);
v2.addProperty('page', v2.__get__page, v2.__set__page);
v2.addProperty('resultsPerPage', v2.__get__resultsPerPage, v2.__set__resultsPerPage);
ASSetPropFlags(com.newgrounds.SaveQuery.prototype, null, 1);
}
#endinitclip
}
movieClip 497 __Packages.com.newgrounds.Medal {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Medal) {
var v1 = function (connection, id, name, unlocked, value, difficultyId, iconURL) {
super();
this._connection = connection;
this._id = id;
this._name = name;
this._unlocked = unlocked;
this._value = value;
this._difficulty = com.newgrounds.Medal.DIFFICULTIES[difficultyId];
this._iconLoader = new com.newgrounds.BitmapLoader(com.newgrounds.Medal.DEFAULT_ICON, iconURL);
this._iconLoader.load();
};
com.newgrounds.Medal = v1;
com.newgrounds.Medal extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__difficulty = function () {
return this._difficulty;
};
v2.__get__icon = function () {
return this._iconLoader.__get__bitmapData();
};
v2.__get__id = function () {
return this._id;
};
v2.__get__name = function () {
return this._name;
};
v2.__get__unlocked = function () {
return this._unlocked;
};
v2.__get__value = function () {
return this._value;
};
v2.toString = function () {
if (!this._unlocked) {
return 'Medal: ' + this._name + '\t\t(' + 'locked, ' + this._value + 'pts, ' + this._difficulty + ')';
}
return 'Medal: ' + this._name + '\t\t(' + 'unlocked, ' + this._value + 'pts, ' + this._difficulty + ')';
};
v2.attachIcon = function (parent) {
return this._iconLoader.attachBitmap(parent);
};
v2.unlock = function () {
if (!this._connection.debug && this._unlocked) {
com.newgrounds.Logger.logWarning('Medal "' + this._name + '" is already unlocked.');
return undefined;
}
com.newgrounds.Logger.logMessage('Unlocking medal "' + this.__get__name() + '"...');
this._unlocked = true;
this._connection.sendSimpleCommand('unlockMedal', {'target': this, 'func': this.onUnlockConfirmed}, null, {'medal_id': this.__get__id()});
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCKED, this));
};
v2.onUnlockConfirmed = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('Medal "' + this.__get__name() + '" unlocked.');
} else {
com.newgrounds.Logger.logError('Failed to unlock "' + this.__get__name() + '"!');
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.MEDAL_UNLOCK_CONFIRMED, this, event.__get__error()));
};
v1.ICON_WIDTH = 50;
v1.ICON_HEIGHT = 50;
v1.DEFAULT_ICON = flash.display.BitmapData.loadBitmap('DefaultMedalIcon');
v1.DIFFICULTY_EASY = 'Easy';
v1.DIFFICULTY_MODERATE = 'Moderate';
v1.DIFFICULTY_CHALLENGING = 'Challenging';
v1.DIFFICULTY_DIFFICULT = 'Difficult';
v1.DIFFICULTY_BRUTAL = 'Brutal';
v1.DIFFICULTIES = ['Unknown', com.newgrounds.Medal.DIFFICULTY_EASY, com.newgrounds.Medal.DIFFICULTY_MODERATE, com.newgrounds.Medal.DIFFICULTY_CHALLENGING, com.newgrounds.Medal.DIFFICULTY_DIFFICULT, com.newgrounds.Medal.DIFFICULTY_BRUTAL];
v2.addProperty('difficulty', v2.__get__difficulty, function () {});
v2.addProperty('icon', v2.__get__icon, function () {});
v2.addProperty('id', v2.__get__id, function () {});
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('unlocked', v2.__get__unlocked, function () {});
v2.addProperty('value', v2.__get__value, function () {});
ASSetPropFlags(com.newgrounds.Medal.prototype, null, 1);
}
#endinitclip
}
movieClip 499 __Packages.com.newgrounds.ScoreBoard {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.ScoreBoard) {
var v1 = function (connection, name, id) {
super();
this._connection = connection;
this._name = name;
this._id = id;
};
com.newgrounds.ScoreBoard = v1;
com.newgrounds.ScoreBoard extends com.newgrounds.APIEventDispatcher;
var v2 = v1.prototype;
v2.__get__name = function () {
return this._name;
};
v2.__get__scores = function () {
return this._scores;
};
v2.__get__period = function () {
return this._period;
};
v2.__set__period = function (val) {
this._period = val;
return this.__get__period();
};
v2.__get__firstResult = function () {
return this._firstResult;
};
v2.__set__firstResult = function (val) {
this._firstResult = Math.max(1, val);
return this.__get__firstResult();
};
v2.__get__numResults = function () {
return this._numResults;
};
v2.__set__numResults = function (val) {
this._numResults = val;
return this.__get__numResults();
};
v2.__get__tag = function () {
return this._tag;
};
v2.__set__tag = function (val) {
this._tag = val;
return this.__get__tag();
};
v2.__get__page = function () {
return Math.ceil((this._firstResult - 1) / this._numResults) + 1;
};
v2.prevPage = function () {
if (this.__get__firstResult() > this._numResults) {
this.firstResult -= this._numResults;
}
};
v2.nextPage = function () {
this.firstResult += this._numResults;
};
v2.loadScores = function () {
this._connection.sendSimpleCommand('loadScores', {'target': this, 'func': this.onScoresLoaded}, {'publisher_id': this._connection.publisherId, 'board': this._id, 'page': (this._firstResult - 1) / this._numResults + 1, 'num_results': this._numResults, 'period': this._period, 'tag': this._tag});
};
v2.postScore = function (numericScore, tag) {
if (tag == undefined) {
tag = null;
}
if (isNaN(numericScore)) {
com.newgrounds.Logger.logError('Cannot post invalid score: ' + numericScore);
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, null, com.newgrounds.APIEvent.ERROR_INVALID_ARGUMENT));
return undefined;
}
com.newgrounds.Logger.logMessage('Posting a score of ' + numericScore + ' by ' + this._connection.username + ' to scoreboard "' + this._name + '"...');
this._connection.sendSimpleCommand('postScore', {'target': this, 'func': this.onScorePosted}, null, {'user_name': this._connection.username, 'board': this._id, 'value': numericScore, 'tag': tag});
};
v2.onScoresLoaded = function (event) {
var v4 = event.__get__data();
this._scores = [];
var v5;
if (v4.first_result) {
v5 = v4.first_result;
} else {
v5 = this._firstResult;
}
if (v4.scores) {
var v3 = 0;
while (v3 < v4.scores.length) {
var v2 = v4.scores[v3];
if (v2) {
this._scores[v3] = new com.newgrounds.Score(v5, v2.username, v2.value, v2.numeric_value, v2.tag);
}
v3++;
v5++;
}
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORES_LOADED, this));
};
v2.onScorePosted = function (event) {
if (event.__get__success()) {
com.newgrounds.Logger.logMessage('Score posted!');
var v4 = event.__get__data();
var v2 = {};
v2.score = v4.value;
v2.scoreBoard = this;
} else {
com.newgrounds.Logger.logError('Error posting score: ' + event.__get__error());
}
this.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.SCORE_POSTED, storedv2, event.__get__error()));
};
v2.toString = function () {
return 'Scoreboard: ' + this._name;
};
v1.TODAY = 'Today';
v1.THIS_WEEK = 'This Week';
v1.THIS_MONTH = 'This Month';
v1.THIS_YEAR = 'This Year';
v1.ALL_TIME = 'All-Time';
v2._period = com.newgrounds.ScoreBoard.ALL_TIME;
v2._firstResult = 1;
v2._numResults = 10;
v2.addProperty('firstResult', v2.__get__firstResult, v2.__set__firstResult);
v2.addProperty('name', v2.__get__name, function () {});
v2.addProperty('numResults', v2.__get__numResults, v2.__set__numResults);
v2.addProperty('page', v2.__get__page, function () {});
v2.addProperty('period', v2.__get__period, v2.__set__period);
v2.addProperty('scores', v2.__get__scores, function () {});
v2.addProperty('tag', v2.__get__tag, v2.__set__tag);
ASSetPropFlags(com.newgrounds.ScoreBoard.prototype, null, 1);
}
#endinitclip
}
movieClip 488 __Packages.com.newgrounds.Logger {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Logger) {
var v1 = function () {};
com.newgrounds.Logger = v1;
var v2 = v1.prototype;
v1.logInternal = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_INTERNAL, v2);
};
v1.logMessage = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_MESSAGE, v2);
};
v1.logWarning = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_WARNING, v2);
};
v1.logError = function () {
var v2 = arguments;
com.newgrounds.Logger.log(com.newgrounds.Logger.PRIORITY_ERROR, v2);
};
v1.log = function (priority, messages) {
if (priority == undefined) {
priority = com.newgrounds.Logger.PRIORITY_MESSAGE;
}
if (messages == undefined) {
messages = null;
}
if (priority >= com.newgrounds.Logger._messageLevel) {
var v1 = 0;
while (v1 < messages.length) {
trace(com.newgrounds.Logger.HEADER + messages[v1]);
com.newgrounds.Logger._eventDispatcher.dispatchEvent(new com.newgrounds.APIEvent(com.newgrounds.APIEvent.LOG, messages[v1]));
++v1;
}
}
if (priority >= com.newgrounds.Logger._throwLevel) {
throw new Error(messages.join('\n'));
}
};
v1.addEventListener = function (event, listener) {
com.newgrounds.Logger._eventDispatcher.addEventListener(event, listener, false, 0, false);
};
v1.PRIORITY_INTERNAL = 0;
v1.PRIORITY_MESSAGE = 1;
v1.PRIORITY_WARNING = 2;
v1.PRIORITY_ERROR = 3;
v1.PRIORITY_MAX = 4;
v1.HEADER = '[Newgrounds API] :: ';
v1._eventDispatcher = new com.newgrounds.EventDispatcher();
v1._messageLevel = com.newgrounds.Logger.PRIORITY_MESSAGE;
v1._throwLevel = com.newgrounds.Logger.PRIORITY_MAX;
ASSetPropFlags(com.newgrounds.Logger.prototype, null, 1);
}
#endinitclip
}
movieClip 507 __Packages.com.newgrounds.components.FlashAd {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.components) {
_global.com.newgrounds.components = new Object();
}
if (!_global.com.newgrounds.components.FlashAd) {
var v1 = function () {
super();
try {
System.security.allowDomain('server.cpmstar.com');
System.security.allowInsecureDomain('server.cpmstar.com');
}
this._x = int(this._x);
this._y = int(this._y);
this.stop();
if (this.newgroundsButton) {
this.newgroundsButton.onRelease = this.onNGClick;
}
this.onUnload = this.removeAd;
var v4 = this;
this._adListener = {'onLoadError': function (target, error, httpStatus) {
target._parent.onAdError(target, error, httpStatus);
}};
if (com.newgrounds.API.__get__adFeedURL()) {
this.loadAdFeed();
} else {
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.API_CONNECTED, {'target': this, 'func': this.loadAdFeed});
}
};
com.newgrounds.components.FlashAd = v1;
com.newgrounds.components.FlashAd extends MovieClip;
var v2 = v1.prototype;
v2.__get__showBorder = function () {
return this._showBorder;
};
v2.__set__showBorder = function (value) {
this._showBorder = value;
if (this._showBorder) {
if (this._ad) {
var v2 = this._ad.getProgress(this.adContainer);
if (v2.bytesLoaded >= v2.bytesTotal) {
this.gotoAndStop('loaded');
} else {
this.gotoAndStop('loading');
}
} else {
this.gotoAndStop('idle');
}
} else {
this.gotoAndStop('noBorder');
}
return this.__get__showBorder();
};
v2.loadAdFeed = function (event) {
if (event == undefined) {
event = null;
}
this._adFeedLoader = new LoadVars();
var target = this;
this._adFeedLoader.onData = function (data) {
target.onAdFeedLoaded(data);
};
this._adFeedLoader.load(com.newgrounds.API.__get__adFeedURL(), this._adFeedLoader);
};
v2.onAdFeedLoaded = function (data) {
if (data && data != '') {
this.loadAd(data);
} else {
this.onAdError();
}
};
v2.loadAd = function (adURL) {
this._ad = new MovieClipLoader();
this._ad.addListener(this._adListener);
this.adContainer._lockroot = true;
this._ad.loadClip(adURL, this.adContainer);
};
v2.removeAd = function () {
this._adFeedLoader.onData = null;
this._adFeedLoader = null;
this._ad.removeListener(this._adListener);
if (this.adContainer) {
this._ad.unloadClip(this.adContainer);
}
this._ad = null;
};
v2.onAdError = function (target, error, httpStatus) {
com.newgrounds.Logger.logError('Unable to load ad.');
this.removeAd();
};
v2.onNGClick = function () {
com.newgrounds.API.loadNewgrounds();
};
v2.addProperty('showBorder', v2.__get__showBorder, v2.__set__showBorder);
ASSetPropFlags(com.newgrounds.components.FlashAd.prototype, null, 1);
}
#endinitclip
}
movieClip 479 __Packages.com.newgrounds.shims.APIShim {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.shims) {
_global.com.newgrounds.shims = new Object();
}
if (!_global.com.newgrounds.shims.APIShim) {
var v1 = function () {
super();
};
com.newgrounds.shims.APIShim = v1;
com.newgrounds.shims.APIShim extends MovieClip;
var v2 = v1.prototype;
ASSetPropFlags(com.newgrounds.shims.APIShim.prototype, null, 1);
}
#endinitclip
}
movieClip 491 __Packages.com.newgrounds.crypto.MD5 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.crypto) {
_global.com.newgrounds.crypto = new Object();
}
if (!_global.com.newgrounds.crypto.MD5) {
var v1 = function () {};
com.newgrounds.crypto.MD5 = v1;
var v2 = v1.prototype;
v1.hash = function (src) {
return com.newgrounds.crypto.MD5.hex_md5(src);
};
v1.hex_md5 = function (src) {
return com.newgrounds.crypto.MD5.binl2hex(com.newgrounds.crypto.MD5.core_md5(com.newgrounds.crypto.MD5.str2binl(src), src.length * 8));
};
v1.core_md5 = function (x, len) {
x[len >> 5] |= 128 << len % 32;
x[(len + 64 >>> 9 << 4) + 14] = len;
var v4 = 1732584193;
var v3 = -271733879;
var v2 = -1732584194;
var v1 = 271733878;
var v5 = 0;
while (v5 < x.length) {
var v10 = v4;
var v9 = v3;
var v8 = v2;
var v7 = v1;
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 0], 7, -680876936);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 1], 12, -389564586);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 2], 17, 606105819);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 3], 22, -1044525330);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 4], 7, -176418897);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 5], 12, 1200080426);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 6], 17, -1473231341);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 7], 22, -45705983);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 8], 7, 1770035416);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 9], 12, -1958414417);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 10], 17, -42063);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 11], 22, -1990404162);
v4 = com.newgrounds.crypto.MD5.md5_ff(v4, v3, v2, v1, x[v5 + 12], 7, 1804603682);
v1 = com.newgrounds.crypto.MD5.md5_ff(v1, v4, v3, v2, x[v5 + 13], 12, -40341101);
v2 = com.newgrounds.crypto.MD5.md5_ff(v2, v1, v4, v3, x[v5 + 14], 17, -1502002290);
v3 = com.newgrounds.crypto.MD5.md5_ff(v3, v2, v1, v4, x[v5 + 15], 22, 1236535329);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 1], 5, -165796510);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 6], 9, -1069501632);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 11], 14, 643717713);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 0], 20, -373897302);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 5], 5, -701558691);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 10], 9, 38016083);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 15], 14, -660478335);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 4], 20, -405537848);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 9], 5, 568446438);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 14], 9, -1019803690);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 3], 14, -187363961);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 8], 20, 1163531501);
v4 = com.newgrounds.crypto.MD5.md5_gg(v4, v3, v2, v1, x[v5 + 13], 5, -1444681467);
v1 = com.newgrounds.crypto.MD5.md5_gg(v1, v4, v3, v2, x[v5 + 2], 9, -51403784);
v2 = com.newgrounds.crypto.MD5.md5_gg(v2, v1, v4, v3, x[v5 + 7], 14, 1735328473);
v3 = com.newgrounds.crypto.MD5.md5_gg(v3, v2, v1, v4, x[v5 + 12], 20, -1926607734);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 5], 4, -378558);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 8], 11, -2022574463);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 11], 16, 1839030562);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 14], 23, -35309556);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 1], 4, -1530992060);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 4], 11, 1272893353);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 7], 16, -155497632);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 10], 23, -1094730640);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 13], 4, 681279174);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 0], 11, -358537222);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 3], 16, -722521979);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 6], 23, 76029189);
v4 = com.newgrounds.crypto.MD5.md5_hh(v4, v3, v2, v1, x[v5 + 9], 4, -640364487);
v1 = com.newgrounds.crypto.MD5.md5_hh(v1, v4, v3, v2, x[v5 + 12], 11, -421815835);
v2 = com.newgrounds.crypto.MD5.md5_hh(v2, v1, v4, v3, x[v5 + 15], 16, 530742520);
v3 = com.newgrounds.crypto.MD5.md5_hh(v3, v2, v1, v4, x[v5 + 2], 23, -995338651);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 0], 6, -198630844);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 7], 10, 1126891415);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 14], 15, -1416354905);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 5], 21, -57434055);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 12], 6, 1700485571);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 3], 10, -1894986606);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 10], 15, -1051523);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 1], 21, -2054922799);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 8], 6, 1873313359);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 15], 10, -30611744);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 6], 15, -1560198380);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 13], 21, 1309151649);
v4 = com.newgrounds.crypto.MD5.md5_ii(v4, v3, v2, v1, x[v5 + 4], 6, -145523070);
v1 = com.newgrounds.crypto.MD5.md5_ii(v1, v4, v3, v2, x[v5 + 11], 10, -1120210379);
v2 = com.newgrounds.crypto.MD5.md5_ii(v2, v1, v4, v3, x[v5 + 2], 15, 718787259);
v3 = com.newgrounds.crypto.MD5.md5_ii(v3, v2, v1, v4, x[v5 + 9], 21, -343485551);
v4 = com.newgrounds.crypto.MD5.safe_add(v4, v10);
v3 = com.newgrounds.crypto.MD5.safe_add(v3, v9);
v2 = com.newgrounds.crypto.MD5.safe_add(v2, v8);
v1 = com.newgrounds.crypto.MD5.safe_add(v1, v7);
v5 += 16;
}
return new Array(v4, v3, v2, v1);
};
v1.md5_cmn = function (q, a, b, x, s, t) {
return com.newgrounds.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.bit_rol(com.newgrounds.crypto.MD5.safe_add(com.newgrounds.crypto.MD5.safe_add(a, q), com.newgrounds.crypto.MD5.safe_add(x, t)), s), b);
};
v1.md5_ff = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b & c | ~b & d, a, b, x, s, t);
};
v1.md5_gg = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b & d | c & ~d, a, b, x, s, t);
};
v1.md5_hh = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(b ^ c ^ d, a, b, x, s, t);
};
v1.md5_ii = function (a, b, c, d, x, s, t) {
return com.newgrounds.crypto.MD5.md5_cmn(c ^ (b | ~d), a, b, x, s, t);
};
v1.bit_rol = function (num, cnt) {
return num << cnt | num >>> 32 - cnt;
};
v1.safe_add = function (x, y) {
var v1 = (x & 65535) + (y & 65535);
var v2 = (x >> 16) + (y >> 16) + (v1 >> 16);
return v2 << 16 | v1 & 65535;
};
v1.str2binl = function (str) {
var v3 = new Array();
var v4 = 255;
var v1 = 0;
while (v1 < str.length * 8) {
v3[v1 >> 5] |= (str.charCodeAt(v1 / 8) & v4) << v1 % 32;
v1 += 8;
}
return v3;
};
v1.binl2hex = function (binarray) {
var v4 = new String('');
var v3 = new String('0123456789abcdef');
var v1 = 0;
while (v1 < binarray.length * 4) {
v4 += v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 + 4 & 15) + v3.charAt(binarray[v1 >> 2] >> (v1 % 4) * 8 & 15);
++v1;
}
return v4;
};
ASSetPropFlags(com.newgrounds.crypto.MD5.prototype, null, 1);
}
#endinitclip
}
movieClip 492 __Packages.com.newgrounds.crypto.RC4 {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.crypto) {
_global.com.newgrounds.crypto = new Object();
}
if (!_global.com.newgrounds.crypto.RC4) {
var v1 = function () {};
com.newgrounds.crypto.RC4 = v1;
var v2 = v1.prototype;
v1.encrypt = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.strToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return com.newgrounds.crypto.RC4.charsToHex(v2);
};
v1.encryptbin = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.strToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return v2;
};
v1.decrypt = function (src, key) {
var v3 = com.newgrounds.crypto.RC4.hexToChars(src);
var v1 = com.newgrounds.crypto.RC4.strToChars(key);
var v2 = com.newgrounds.crypto.RC4.calculate(v3, v1);
return com.newgrounds.crypto.RC4.charsToStr(v2);
};
v1.initialize = function (pwd) {
var v2 = 0;
var v3;
var v4 = pwd.length;
var v1 = 0;
while (v1 <= 255) {
com.newgrounds.crypto.RC4.mykey[v1] = pwd[v1 % v4];
com.newgrounds.crypto.RC4.sbox[v1] = v1;
++v1;
}
v1 = 0;
while (v1 <= 255) {
v2 = (v2 + com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.mykey[v1]) % 256;
v3 = com.newgrounds.crypto.RC4.sbox[v1];
com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2];
com.newgrounds.crypto.RC4.sbox[v2] = v3;
++v1;
}
};
v1.calculate = function (plaintxt, psw) {
com.newgrounds.crypto.RC4.initialize(psw);
var v1 = 0;
var v2 = 0;
var v9 = new Array();
var v7;
var v5;
var v6;
var v3 = 0;
while (v3 < plaintxt.length) {
v1 = (v1 + 1) % 256;
v2 = (v2 + com.newgrounds.crypto.RC4.sbox[v1]) % 256;
v5 = com.newgrounds.crypto.RC4.sbox[v1];
com.newgrounds.crypto.RC4.sbox[v1] = com.newgrounds.crypto.RC4.sbox[v2];
com.newgrounds.crypto.RC4.sbox[v2] = v5;
var v4 = (com.newgrounds.crypto.RC4.sbox[v1] + com.newgrounds.crypto.RC4.sbox[v2]) % 256;
v7 = com.newgrounds.crypto.RC4.sbox[v4];
v6 = plaintxt[v3] ^ v7;
v9.push(v6);
++v3;
}
return v9;
};
v1.charsToHex = function (chars) {
var v4 = new String('');
var v3 = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'b', 'c', 'd', 'e', 'f');
var v1 = 0;
while (v1 < chars.length) {
v4 += v3[chars[v1] >> 4] + v3[chars[v1] & 15];
++v1;
}
return v4;
};
v1.hexToChars = function (hex) {
var v3 = new Array();
var v1 = (hex.substr(0, 2) == '0x') ? 2 : 0;
while (v1 < hex.length) {
v3.push(parseInt(hex.substr(v1, 2), 16));
v1 += 2;
}
return v3;
};
v1.charsToStr = function (chars) {
var v3 = new String('');
var v1 = 0;
while (v1 < chars.length) {
v3 += String.fromCharCode(chars[v1]);
++v1;
}
return v3;
};
v1.strToChars = function (str) {
var v3 = new Array();
var v1 = 0;
while (v1 < str.length) {
v3.push(str.charCodeAt(v1));
++v1;
}
return v3;
};
v1.sbox = new Array(255);
v1.mykey = new Array(255);
ASSetPropFlags(com.newgrounds.crypto.RC4.prototype, null, 1);
}
#endinitclip
}
movieClip 493 __Packages.com.newgrounds.encoders.json.JSON {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.encoders) {
_global.com.newgrounds.encoders = new Object();
}
if (!_global.com.newgrounds.encoders.json) {
_global.com.newgrounds.encoders.json = new Object();
}
if (!_global.com.newgrounds.encoders.json.JSON) {
var v1 = function () {};
com.newgrounds.encoders.json.JSON = v1;
var v2 = v1.prototype;
v1.encode = function (arg, noquotes) {
var v3;
var v2;
var v6;
var v1 = '';
var v4;
if (arg.isSServerVar()) {
var v8 = 'sservervariable';
} else {
var v8 = typeof arg;
}
switch (v8) {
return 'null';
case 'sservervariable':
return '?' + arg.getEncodedValue();
break;
case 'object':
if (arg) {
if (arg instanceof Array) {
v2 = 0;
while (v2 < arg.length) {
v4 = com.newgrounds.encoders.json.JSON.encode(arg[v2]);
if (v1) {
v1 += ',';
}
v1 += v4;
++v2;
}
return '[' + v1 + ']';
} else {
if (typeof arg.toString != 'undefined') {
for (v2 in arg) {
v4 = arg[v2];
if (typeof v4 != 'undefined' && typeof v4 != 'function') {
v4 = com.newgrounds.encoders.json.JSON.encode(v4);
if (v1) {
v1 += ',';
}
v1 += com.newgrounds.encoders.json.JSON.encode(v2) + ':' + v4;
}
}
return '{' + v1 + '}';
}
}
}
return 'null';
case 'number':
return isFinite(arg) ? String(arg) : 'null';
case 'string':
v6 = arg.length;
if (noquotes) {
var v7 = '';
} else {
var v7 = '"';
}
v1 = v7;
v2 = 0;
while (v2 < v6) {
v3 = arg.charAt(v2);
if (v3 >= ' ') {
if (v3 == '\\' || v3 == '"') {
v1 += '\\';
}
v1 += v3;
} else {
switch (v3) {
case '\b':
v1 += '\\b';
break;
case '\f':
v1 += '\\f';
break;
case '\n':
v1 += '\\n';
break;
case '\r':
v1 += '\\r';
break;
case '\t':
v1 += '\\t';
break;
default:
v3 = v3.charCodeAt();
v1 += '\\u00' + (Math.floor(v3 / 16)).toString(16) + (v3 % 16).toString(16);
}
}
v2 += 1;
}
return v1 + v7;
case 'boolean':
return String(arg);
default:
return 'null';
}
};
v1.background_encode = function (arg, callback) {
if (com.newgrounds.encoders.json.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot encode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping encode');
return false;
}
}
com.newgrounds.encoders.json.JSON.busy = true;
var v2 = new Date();
com.newgrounds.encoders.json.JSON.start = v2.getTime();
com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'complete': false, 'arg': arg, 'target': arg, 'parents': [], 'encoded': '', 'callback': callback, 'encode_chunk': function () {
com.newgrounds.encoders.json.JSON.encode_chunk();
}};
if (com.newgrounds.encoders.json.JSON.getType(arg) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded = '{';
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25);
return true;
}
if (com.newgrounds.encoders.json.JSON.getType(arg) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded = '[';
}
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'encode_chunk', 25);
return true;
};
v1.background_decode = function (arg, callback) {
if (com.newgrounds.encoders.json.JSON.busy) {
trace('[Newgrounds Encoder] :: Cannot decode a new file until the previous file is completed');
return false;
} else {
if (!callback) {
trace('[Newgrounds Encoder] :: Missing a callback function, skipping decode');
return false;
}
}
com.newgrounds.encoders.json.JSON.busy = true;
var v1 = new Date();
com.newgrounds.encoders.json.JSON.start = v1.getTime();
com.newgrounds.encoders.json.JSON.cache = {'busy': false, 'callback': callback, 'complete': false, 'arg': arg, 'pos': 0, 'parents': ['root'], 'target': null, 'scratch': '', 'decode_chunk': function () {
com.newgrounds.encoders.json.JSON.decode_chunk();
}};
com.newgrounds.encoders.json.JSON.interval = setInterval(com.newgrounds.encoders.json.JSON.cache, 'decode_chunk', 25);
return true;
};
v1.decode = function (text) {
var at = 0;
var ch = ' ';
var _value;
var _error = function (m) {
throw {'name': 'JSONError', 'message': m, 'at': at - 1, 'text': text};
};
var _next = function () {
ch = text.charAt(at);
at += 1;
return ch;
};
var _white = function () {
while (ch) {
if (ch <= ' ') {
_next();
} else {
if (ch == '/') {
switch (_next()) {
case '/':
for (;;) {
if (!(_next() && ch != '\n' && ch != '\r')) break;
}
break;
case '*':
_next();
for (;;) {
if (ch) {
if (ch == '*') {
if (_next() == '/') {
_next();
break;
}
} else {
_next();
}
continue;
}
_error('Unterminated comment');
}
break;
default:
_error('Syntax error');
}
} else {
break;
}
}
}
};
var _string = function () {
var v4;
var v1 = '';
var v3;
var v2;
var v5 = false;
if (ch == '"') {
while (_next()) {
if (ch == '"') {
_next();
return v1;
} else {
if (ch == '\\') {
switch (_next()) {
case 'b':
v1 += '\b';
break;
case 'f':
v1 += '\f';
break;
case 'n':
v1 += '\n';
break;
case 'r':
v1 += '\r';
break;
case 't':
v1 += '\t';
break;
case 'u':
v2 = 0;
v4 = 0;
while (v4 < 4) {
v3 = parseInt(_next(), 16);
if (!isFinite(v3)) {
v5 = true;
break;
}
v2 = v2 * 16 + v3;
v4 += 1;
}
if (v5) {
v5 = false;
} else {
v1 += String.fromCharCode(v2);
break;
default:
v1 += ch;
}
}
} else {
v1 += ch;
}
}
}
}
_error('Bad string');
};
var _array = function () {
var v1 = [];
if (ch == '[') {
_next();
_white();
if (ch == ']') {
_next();
return v1;
}
while (ch) {
v1.push(_value());
_white();
if (ch == ']') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad array');
};
var _object = function () {
var v2;
var v1 = {};
if (ch == '{') {
_next();
_white();
if (ch == '}') {
_next();
return v1;
}
while (ch) {
v2 = _string();
_white();
if (ch != ':') {
break;
}
_next();
v1[v2] = _value();
_white();
if (ch == '}') {
_next();
return v1;
} else {
if (ch != ',') {
break;
}
}
_next();
_white();
}
}
_error('Bad object');
};
var _number = function () {
var v1 = '';
var v2;
if (ch == '-') {
v1 = '-';
_next();
}
for (;;) {
if (!(ch >= '0' && ch <= '9')) break;
v1 += ch;
_next();
}
if (ch == '.') {
v1 += '.';
for (;;) {
if (!(_next() && ch >= '0' && ch <= '9')) break;
v1 += ch;
}
}
v2 = 1 * v1;
if (!isFinite(v2)) {
_error('Bad number');
} else {
return v2;
}
};
var _word = function () {
switch (ch) {
case 't':
if (_next() == 'r' && _next() == 'u' && _next() == 'e') {
_next();
return true;
}
break;
case 'f':
if (_next() == 'a' && _next() == 'l' && _next() == 's' && _next() == 'e') {
_next();
return false;
}
break;
case 'n':
if (_next() == 'u' && _next() == 'l' && _next() == 'l') {
_next();
return null;
}
}
_error('Syntax error');
};
_value = function () {
_white();
switch (ch) {
case '{':
return _object();
case '[':
return _array();
case '"':
return _string();
case '-':
return _number();
}
return (ch >= '0' && ch <= '9') ? _number() : _word();
};
return _value();
};
v1.getType = function (v) {
if (v instanceof Array) {
return 'array';
} else {
return typeof v;
}
};
v1.decode_chunk = function () {
if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) {
com.newgrounds.encoders.json.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.decode_chunks) {
com.newgrounds.encoders.json.JSON.chunk_decoder();
if (com.newgrounds.encoders.json.JSON.cache.complete) {
break;
}
++v1;
}
trace(Math.round((com.newgrounds.encoders.json.JSON.cache.pos / com.newgrounds.encoders.json.JSON.cache.arg.length) * 100) + '% decoded');
com.newgrounds.encoders.json.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.json.JSON.cache.complete) {
var v2 = new Date();
com.newgrounds.encoders.json.JSON.busy = false;
clearInterval(com.newgrounds.encoders.json.JSON.interval);
com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.root, v2.getTime() - com.newgrounds.encoders.json.JSON.start);
com.newgrounds.encoders.json.JSON.cache.arg = '';
}
};
v1.encode_chunk = function () {
if (!com.newgrounds.encoders.json.JSON.cache.busy && !com.newgrounds.encoders.json.JSON.cache.complete) {
com.newgrounds.encoders.json.JSON.cache.busy = true;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.encode_chunks) {
com.newgrounds.encoders.json.JSON.chunk_encoder();
if (com.newgrounds.encoders.json.JSON.cache.complete) {
break;
}
++v1;
}
com.newgrounds.encoders.json.JSON.cache.busy = false;
}
if (com.newgrounds.encoders.json.JSON.cache.complete) {
var v3 = new Date();
var v2 = v3.getTime();
com.newgrounds.encoders.json.JSON.busy = false;
clearInterval(com.newgrounds.encoders.json.JSON.interval);
com.newgrounds.encoders.json.JSON.cache.callback(com.newgrounds.encoders.json.JSON.cache.encoded, v2 - com.newgrounds.encoders.json.JSON.start);
com.newgrounds.encoders.json.JSON.cache.encoded = '';
}
};
v1.chunk_decoder = function () {
function _object() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'object';
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
_setTargetValue({});
} else {
if (v1 == ',') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != '"') {
throw 'Malformed object key in encoded string. Keys must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
} else {
if (v1 == '}') {
_useParent();
} else {
if (v1 == '"') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 != ':') {
throw 'Malformed object notation. Object keys and values must be separated by colons(:)';
}
_addParent(com.newgrounds.encoders.json.JSON.cache.scratch);
com.newgrounds.encoders.json.JSON.cache.mode = null;
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
}
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
}
}
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _array() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'array';
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
_setTargetValue([]);
if (v1 != ']') {
_addArrayKey();
} else {
_useParent();
}
return undefined;
} else {
if (v1 == ',') {
_addArrayKey();
} else {
if (v1 == ']') {
_useParent();
}
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _boolean() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 == 't') {
_setTargetValue(true);
com.newgrounds.encoders.json.JSON.cache.pos += 3;
} else {
if (v1 == 'f') {
_setTargetValue(false);
com.newgrounds.encoders.json.JSON.cache.pos += 4;
} else {
throw 'Bool values must be true or false';
}
}
_useParent();
}
function _null() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (v1 == 'n') {
_setTargetValue(null);
com.newgrounds.encoders.json.JSON.cache.pos += 2;
} else {
throw 'Null values must be null';
}
_useParent();
}
function _string() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
if (v1 != '"') {
throw 'Strings must be wrapped in quotes ("")';
}
com.newgrounds.encoders.json.JSON.cache.scratch = '';
com.newgrounds.encoders.json.JSON.cache.mode = 'string';
} else {
if (v1 == '"') {
_setTargetValue(com.newgrounds.encoders.json.JSON.cache.scratch);
_useParent();
} else {
if (v1 == '\\') {
++com.newgrounds.encoders.json.JSON.cache.pos;
v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
switch (v1) {
case 'n':
v1 = '\n';
break;
case 'r':
v1 = '\n';
break;
case 't':
v1 = '\t';
break;
case 'u':
v1 = '\\' + v1;
}
}
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
}
}
++com.newgrounds.encoders.json.JSON.cache.pos;
}
function _number() {
var v1 = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
var v2 = '01234567890.-';
if (!com.newgrounds.encoders.json.JSON.cache.mode) {
com.newgrounds.encoders.json.JSON.cache.mode = 'number';
com.newgrounds.encoders.json.JSON.cache.scratch = '';
}
if (v2.indexOf(v1) < 0) {
_setTargetValue(Number(com.newgrounds.encoders.json.JSON.cache.scratch));
_useParent();
} else {
com.newgrounds.encoders.json.JSON.cache.scratch += v1;
++com.newgrounds.encoders.json.JSON.cache.pos;
}
}
function _setTargetValue(newval) {
var v2 = (_getParent()).obj;
var v1 = com.newgrounds.encoders.json.JSON.cache.parents[com.newgrounds.encoders.json.JSON.cache.parents.length - 1];
v2[v1] = newval;
}
function _useParent() {
com.newgrounds.encoders.json.JSON.cache.mode = com.newgrounds.encoders.json.JSON.getType((_getParent()).obj);
com.newgrounds.encoders.json.JSON.cache.parents.pop();
}
function _getParent() {
var v2 = com.newgrounds.encoders.json.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length - 1) {
v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]};
}
function _getCurrent() {
var v2 = com.newgrounds.encoders.json.JSON.cache;
var v1 = 0;
while (v1 < com.newgrounds.encoders.json.JSON.cache.parents.length) {
v2 = v2[com.newgrounds.encoders.json.JSON.cache.parents[v1]];
++v1;
}
return {'obj': v2, 'name': com.newgrounds.encoders.json.JSON.cache.parents[v1]};
}
function _addParent(child) {
com.newgrounds.encoders.json.JSON.cache.parents.push(child);
}
function _addArrayKey() {
var v1 = (_getCurrent()).obj.length;
com.newgrounds.encoders.json.JSON.cache.parents.push(v1);
com.newgrounds.encoders.json.JSON.cache.mode = null;
}
if (com.newgrounds.encoders.json.JSON.cache.pos >= com.newgrounds.encoders.json.JSON.cache.arg.length) {
com.newgrounds.encoders.json.JSON.cache.complete = true;
return undefined;
} else {
if (com.newgrounds.encoders.json.JSON.cache.mode) {
('_' + com.newgrounds.encoders.json.JSON.cache.mode)();
} else {
var char = com.newgrounds.encoders.json.JSON.cache.arg.charAt(com.newgrounds.encoders.json.JSON.cache.pos);
switch (char) {
case '{':
_object();
break;
case '[':
_array();
break;
case '"':
_string();
break;
case 'n':
_null();
break;
case 't':
_boolean();
break;
case 'f':
_boolean();
break;
default:
_number();
}
}
}
};
v1.chunk_encoder = function () {
if (com.newgrounds.encoders.json.JSON.cache.complete) {
return undefined;
}
var v2 = com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target);
switch (v2) {
case 'number':
com.newgrounds.encoders.json.JSON.cache.encoded += com.newgrounds.encoders.json.JSON.cache.target;
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'string':
com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (com.newgrounds.encoders.json.JSON.cache.target.split('"')).join('\\"') + '"';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'boolean':
com.newgrounds.encoders.json.JSON.cache.encoded += (com.newgrounds.encoders.json.JSON.cache.target == true) ? 'true' : 'false';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'null':
com.newgrounds.encoders.json.JSON.cache.encoded += 'null';
com.newgrounds.encoders.json.JSON.getParent();
break;
case 'array':
if (com.newgrounds.encoders.json.JSON.cache.target.length < 1) {
com.newgrounds.encoders.json.JSON.cache.encoded += ']';
com.newgrounds.encoders.json.JSON.getParent();
} else {
com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target);
com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[0];
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded += '{';
}
}
}
break;
case 'object':
for (var v1 in com.newgrounds.encoders.json.JSON.cache.target) {
break;
}
if (v1 === undefined) {
com.newgrounds.encoders.json.JSON.cache.encoded += '}';
com.newgrounds.encoders.json.JSON.getParent();
} else {
com.newgrounds.encoders.json.JSON.cache.parents.push(com.newgrounds.encoders.json.JSON.cache.target);
com.newgrounds.encoders.json.JSON.cache.target = com.newgrounds.encoders.json.JSON.cache.target[v1];
com.newgrounds.encoders.json.JSON.cache.encoded += '"' + (v1.split('"')).join('\\"') + '":';
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'array') {
com.newgrounds.encoders.json.JSON.cache.encoded += '[';
} else {
if (com.newgrounds.encoders.json.JSON.getType(com.newgrounds.encoders.json.JSON.cache.target) == 'object') {
com.newgrounds.encoders.json.JSON.cache.encoded += '{';
}
}
}
break;
default:
com.newgrounds.encoders.json.JSON.cache.encoded += 'null';
com.newgrounds.encoders.json.JSON.getParent();
}
};
v1.getParent = function () {
if (com.newgrounds.encoders.json.JSON.cache.parents.length > 0) {
var v1 = com.newgrounds.encoders.json.JSON.cache.parents.pop();
if (com.newgrounds.encoders.json.JSON.getType(v1) == 'array') {
v1.shift();
} else {
for (var v3 in v1) {
delete v1[v3];
break;
}
}
if (com.newgrounds.encoders.json.JSON.getType(v1) == 'object' or com.newgrounds.encoders.json.JSON.getType(v1) == 'array') {
for (var v2 in v1) {
break;
}
if (v2 !== undefined) {
com.newgrounds.encoders.json.JSON.cache.encoded += ',';
}
}
com.newgrounds.encoders.json.JSON.cache.target = v1;
} else {
com.newgrounds.encoders.json.JSON.cache.complete = true;
}
};
v1.encode_chunks = 20000;
v1.decode_chunks = 20000;
v1.busy = false;
ASSetPropFlags(com.newgrounds.encoders.json.JSON.prototype, null, 1);
}
#endinitclip
}
movieClip 498 __Packages.com.newgrounds.Score {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.newgrounds) {
_global.com.newgrounds = new Object();
}
if (!_global.com.newgrounds.Score) {
var v1 = function (rank, username, score, numericValue, tag) {
this._rank = rank;
this._username = username;
this._score = score;
this._numericValue = numericValue;
this._tag = tag;
};
com.newgrounds.Score = v1;
var v2 = v1.prototype;
v2.__get__numericValue = function () {
return this._numericValue;
};
v2.__get__rank = function () {
return this._rank;
};
v2.__get__score = function () {
return this._score;
};
v2.__get__tag = function () {
return this._tag;
};
v2.__get__username = function () {
return this._username;
};
v2.toString = function () {
return this._rank + '.\t' + this._username + '\t' + this._score;
};
v2.addProperty('numericValue', v2.__get__numericValue, function () {});
v2.addProperty('rank', v2.__get__rank, function () {});
v2.addProperty('score', v2.__get__score, function () {});
v2.addProperty('tag', v2.__get__tag, function () {});
v2.addProperty('username', v2.__get__username, function () {});
ASSetPropFlags(com.newgrounds.Score.prototype, null, 1);
}
#endinitclip
}
frame 2 {
SFXList = new Array(128);
_root.createEmptyMovieClip('gameSFX', 5000);
MSCList = new Array(128);
_root.createEmptyMovieClip('gameMSC', 5001);
playSFX = function (SFXName) {
i = 0;
while (i < 128) {
if (SFXList[i] == undefined) {
SFXList[i] = SFXName;
_root.gameSFX.createEmptyMovieClip('SFX_' + SFXName, i + 1);
_root.gameSFX[SFXName] = new Sound(_root.gameSFX['SFX_' + SFXName]);
_root.gameSFX[SFXName].attachSound(SFXName);
}
if (SFXList[i] == SFXName) {
_root.gameSFX[SFXName].stop();
_root.gameSFX[SFXName].start(0, 1);
_root.gameSFX[SFXName].setVolume(_root.SFXVol * 10);
break;
}
++i;
}
};
hitSFXcheck = 8;
hitSFXnumber = 0;
playhitSFX = function (newHit) {
if (newHit == undefined) {
newHit = false;
}
if (newHit) {
stopSFX('SFXhit' + hitSFXnumber);
++hitSFXnumber;
if (hitSFXnumber > 7) {
hitSFXnumber = 7;
}
if (hitSFXnumber >= 6 && _root.StageNo) {
_root.medalUnlock('MEDAL_SIX_ENEMIES');
}
playSFX('SFXhit' + hitSFXnumber);
hitSFXcheck = 8;
} else {
if (!hitSFXcheck) {
hitSFXnumber = 0;
} else {
--hitSFXcheck;
}
}
};
playMSC = function (MSCName, loop) {
if (loop == undefined) {
loop = false;
}
i = 0;
while (i < 128) {
if (MSCList[i] == undefined) {
MSCList[i] = MSCName;
_root.gameMSC.createEmptyMovieClip('MSC_' + MSCName, i + 1);
_root.gameMSC[MSCName] = new Sound(_root.gameMSC['MSC_' + MSCName]);
_root.gameMSC[MSCName].attachSound(MSCName);
}
if (MSCList[i] == MSCName) {
_root.gameMSC[MSCName].stop();
_root.gameMSC[MSCName].start(0, 1 + 65534 * loop);
_root.gameMSC[MSCName].setVolume(_root.MSCVol * 10);
break;
}
++i;
}
if (MSCName == 'MSC-FAN') {
_root.gameMSC[MSCName].onSoundComplete = function () {
_root.playMSC('MSC-WIN', true);
};
}
};
stopSFX = function (SFXName) {
if (SFXName == undefined) {
i = 0;
while (i < 128) {
if (SFXList[i] == undefined) {
break;
} else {
_root.gameSFX[SFXList[i]].stop();
}
++i;
}
} else {
_root.gameSFX[SFXName].stop();
}
};
stopMSC = function (MSCName) {
if (MSCName == undefined) {
i = 0;
while (i < 128) {
if (MSCList[i] == undefined) {
break;
} else {
_root.gameMSC[MSCList[i]].stop();
}
++i;
}
} else {
_root.gameMSC[MSCName].stop();
}
};
volumeMSC = function (MSCVolume, MSCName) {
if (MSCName == undefined) {
i = 0;
while (i < 128) {
if (MSCList[i] == undefined) {
break;
} else {
_root.gameMSC[MSCList[i]].setVolume(MSCVolume * (_root.MSCVol / 10));
}
++i;
}
} else {
_root.gameMSC[MSCName].setVolume(MSCVolume * (_root.MSCVol / 10));
}
};
onEnterFrame = function () {};
}
frame 2 {
_root.levelCreateBase = function (j, i, levelName, levelType, levelDepth, levelScale) {
var v2 = i.split('');
_root.levelStyle = v2[0];
j.createEmptyMovieClip(levelName, levelDepth);
if (_root.levelStyle == 3) {
cLevel = new Color(j[levelName]);
cLevel.setTint(0, 35, 255, 35);
} else {
cLevel = new Color(j[levelName]);
cLevel.setTint(0, 0, 0, 0);
}
j[levelName].createEmptyMovieClip('Plat', 2);
j[levelName].createEmptyMovieClip('Brick', 3);
j[levelName].createEmptyMovieClip('Enemies', 4);
j[levelName].createEmptyMovieClip('Projectiles', 5);
j[levelName].createEmptyMovieClip('Coins', 6);
j[levelName].createEmptyMovieClip('Misc', 7);
j[levelName].createEmptyMovieClip('Particles', 8);
j[levelName].createEmptyMovieClip('offLimits', 9);
j[levelName].offLimits.attachMovie('blackSquare', '0', 1);
co = new Color(j[levelName].offLimits);
co.setTint(255, 0, 0, 100);
j[levelName].offLimits._alpha = 0;
stringPart = 1;
levelPart = 0;
spawnPlacement = 0;
spawnAmount = 0;
placementOffset = 0;
while (!false) {
if (stringPart >= v2.length) {
if (levelType != 'Creator') {
levelPart += 5;
if (levelType == 'Game') {
j[levelName].attachMovie('levelEnd', 'levelEnd', 1);
j[levelName].levelEnd._x = 64 * levelPart;
_root.attachMovie('levelEndDepth', 'levelEndDepth', 7);
if (_root.levelStyle == 3) {
cLevel = new Color(_root.levelEndDepth);
cLevel.setTint(0, 35, 255, 35);
}
_root.levelEndDepth._x = levelScale * 64 * levelPart;
} else {
j[levelName].attachMovie('levelEndSave', 'levelEnd', 12);
j[levelName].levelEnd._x = 64 * levelPart;
}
}
break;
} else {
while (!false) {
if (v2[stringPart] == '-') {
++stringPart;
levelPart += 4;
break;
} else {
if (v2[stringPart] == '/') {
++stringPart;
++levelPart;
break;
} else {
if (ord(v2[stringPart]) > 47 && ord(v2[stringPart]) < 58) {
if (!spawnPlacement) {
spawnPlacement = ord(v2[stringPart]) - 48;
}
++stringPart;
} else {
if (v2[stringPart] == 'a') {
++stringPart;
placementOffset = (ord(v2[stringPart]) - 48) % 4;
++stringPart;
} else {
if (levelType == 'Game') {
if (v2[stringPart] == '+' || v2[stringPart] == 'z') {
++levelPart;
}
}
if (levelType == 'Creator') {
creationObjectGenerator(j[levelName], 4 * levelPart + placementOffset, spawnPlacement, (objectSection(v2[stringPart]) == 'Brick') ? v2[++stringPart] : 1, v2[stringPart]);
} else {
objectGenerator(j[levelName], 4 * levelPart + placementOffset, spawnPlacement, (objectSection(v2[stringPart]) == 'Brick') ? v2[++stringPart] : 1, v2[stringPart]);
}
if (levelType != 'Game') {
if (v2[stringPart] == '+') {
levelPart += 3;
}
if (v2[stringPart] == 'z') {
levelPart += 2;
}
} else {
if (v2[stringPart] == '+' || v2[stringPart] == 'z') {
levelPart += 5;
}
}
spawnPlacement = 0;
placementOffset = 0;
}
}
}
}
if (stringPart >= v2.length) {
break;
}
}
}
}
j[levelName]._yscale = 100 * levelScale;
j[levelName]._xscale = j[levelName]._yscale;
};
validLevelNameCheck = function (i) {
if (i == '') {
return false;
}
var v1 = i.split('');
j = 0;
while (j < i.length) {
if (v1[j] != ' ' && (ord(v1[j]) < 65 || ord(v1[j]) > 90) && (ord(v1[j]) < 48 || ord(v1[j]) > 57)) {
return false;
}
++j;
}
return true;
};
validLevelCheck = function (i) {
var v1 = i.split('');
if (ord(v1[0]) < 49 || ord(v1[0]) > 57) {
trace('A');
return false;
}
j = 2;
while (j < i.length) {
prevChar = v1[j - 1];
trace(objectSection(v1[j]) + ' ' + v1[j]);
if (ord(v1[j]) < 48 || ord(v1[j]) > 57) {
if (objectSection(v1[j]) == undefined && v1[j] != 'a' && v1[j] != '/' && v1[j] != '-') {
trace('E: ' + objectSection(v1[j]) + ' ' + v1[j]);
return false;
}
}
if (objectSection(v1[j]) != undefined && v1[j] != '+') {
if (ord(prevChar) < 48 || ord(prevChar) > 57) {
trace('F: ' + objectSection(v1[j]) + ' ' + v1[j] + '~' + prevChar);
return false;
}
}
if (prevChar == '/') {
if (v1[j] != '/' && v1[j] != 'a' && v1[j] != '+' && (ord(v1[j]) < 48 || ord(v1[j]) > 57)) {
trace('B: ' + objectSection(v1[j]) + ' ' + v1[j]);
return false;
}
} else {
if (ord(prevChar) >= 48 && ord(prevChar) <= 57) {
if (ord(v1[j]) >= 48 && ord(v1[j]) <= 57) {
trace('C: ' + objectSection(v1[j]) + ' ' + v1[j]);
return false;
}
} else {
if (prevChar == 'a' || objectSection(prevChar) == 'Brick') {
if (ord(v1[j]) < 48 || ord(v1[j]) > 57) {
trace('D: ' + objectSection(v1[j]) + ' ' + v1[j]);
return false;
} else {
trace('J');
++j;
}
}
}
}
++j;
}
return true;
};
validLevelOverlapCheck = function (i) {
_root.levelCreateBase(_root, i, 'Level', 'Creator', 2048, 1);
trace('Check');
for (var v3 in _root.Level.offLimits) {
for (var v2 in _root.Level.offLimits) {
if (v3 != v2) {
if (_root.Level.offLimits[v3].hitTest(_root.Level.offLimits[v2])) {
_root.Level.removeMovieClip();
return false;
}
}
}
_root.Level.offLimits[v3].removeMovieClip();
}
_root.Level.removeMovieClip();
return true;
};
}
frame 3 {
function onFileSave(event) {
if (event.__get__success()) {
trace('File saved!');
}
}
function onFileLoaded(event) {
if (event.__get__success()) {
var v2 = com.newgrounds.SaveFile(event.__get__data());
trace('File loaded: ' + v2.__get__name());
_root.Level_Custom = v2.data;
_root.customLevelNames[0] = v2.name;
_root.levelCreateBase(_root.selectMode.sLevelData.savedLevel, v2.__get__data(), 'levelDisplay', '', 2, 1.5);
_root.selectMode.sLevelData.savedLevel.attachMovie('BackgroundSaved', 'Background', 1);
_root.selectMode.sLevelData.savedLevel.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.selectMode.sLevelData.savedLevel.Background._xscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.Background._yscale = 66.66666666666667;
_root.selectMode.sLevelData.savedLevel.levelDisplay._y += 5;
_root.selectMode.sLevelData.savedLevel.levelDisplay._x -= 86;
_root.selectMode.sLevelData.sLevelName.text = _root.customLevelNames[0].toUpperCase();
_root.selectMode.sLevelData.savedLevel.copiedCode.removeMovieClip();
_root.selectMode.sLevelData.levelCodeButton._y = 331;
_root.pasteData = false;
_root.savedLevelData = false;
_root.levelEdit = false;
}
}
publishLevel = function () {
var v2 = com.newgrounds.API.createSaveFile('Levels');
v2.__set__name(_root.selectMode.sLevelData.sLevelName.text);
v2.__set__description('Test');
v2.__set__data(_root.Level_Custom);
_root.attachMovie('NGsaveIcon', 'saveIcon', 1024);
_root.saveIcon.gotoAndStop(_root.levelStyle);
v2.createIcon(_root.saveIcon);
_root.saveIcon.removeMovieClip();
v2.save();
};
file.addEventListener(com.newgrounds.APIEvent.FILE_SAVED, onFileSaved);
com.newgrounds.API.addEventListener(com.newgrounds.APIEvent.FILE_LOADED, onFileLoaded);
}
frame 4 {
medalNumber = function (i) {
if (i == 'MEDAL_CHARACTER_02') {
return 1;
} else {
if (i == 'MEDAL_CHARACTER_03') {
return 2;
} else {
if (i == 'MEDAL_CHARACTER_04') {
return 3;
} else {
if (i == 'MEDAL_CHARACTER_05') {
return 4;
} else {
if (i == 'MEDAL_CHARACTER_06') {
return 5;
} else {
if (i == 'MEDAL_CHARACTER_07') {
return 6;
} else {
if (i == 'MEDAL_CHARACTER_08') {
return 7;
} else {
if (i == 'MEDAL_CHARACTER_09') {
return 8;
} else {
if (i == 'MEDAL_CHARACTER_10') {
return 9;
} else {
if (i == 'MEDAL_CHARACTER_11') {
return 10;
} else {
if (i == 'MEDAL_CHARACTER_12') {
return 11;
} else {
if (i == 'MEDAL_CHARACTER_13') {
return 12;
} else {
if (i == 'MEDAL_CHARACTER_14') {
return 13;
} else {
if (i == 'MEDAL_CHARACTER_15') {
return 14;
} else {
if (i == 'MEDAL_WORLD_01') {
return 15;
} else {
if (i == 'MEDAL_WORLD_02') {
return 16;
} else {
if (i == 'MEDAL_WORLD_03') {
return 17;
} else {
if (i == 'MEDAL_WORLD_04') {
return 18;
} else {
if (i == 'MEDAL_WORLD_05') {
return 19;
} else {
if (i == 'MEDAL_WORLD_06') {
return 20;
} else {
if (i == 'MEDAL_WORLD_07') {
return 21;
} else {
if (i == 'MEDAL_WORLD_08') {
return 22;
} else {
if (i == 'MEDAL_WORLD_09') {
return 23;
} else {
if (i == 'MEDAL_WORLD_10') {
return 24;
} else {
if (i == 'MEDAL_WORLD_11') {
return 25;
} else {
if (i == 'MEDAL_WORLD_12') {
return 26;
} else {
if (i == 'MEDAL_INTRO_DEATH') {
return 27;
} else {
if (i == 'MEDAL_ZERO_POINTS') {
return 28;
} else {
if (i == 'MEDAL_ALL_MULTIPLIERS') {
return 29;
} else {
if (i == 'MEDAL_SIX_ENEMIES') {
return 30;
} else {
if (i == 'MEDAL_MAGIC_WAND') {
return 31;
} else {
if (i == 'MEDAL_PHANTOS_SURVIVE') {
return 32;
} else {
if (i == 'MEDAL_WORLD_SURVIVE') {
return 33;
} else {
if (i == 'MEDAL_RIGHT_SIDE') {
return 34;
} else {
if (i == 'MEDAL_STAY_STILL') {
return 35;
} else {
if (i == 'MEDAL_DEATH_GATE') {
return 36;
} else {
if (i == 'MEDAL_CUSTOM_01') {
return 37;
} else {
if (i == 'MEDAL_CUSTOM_13') {
return 38;
} else {
if (i == 'MEDAL_CUSTOM_26') {
return 39;
} else {
if (i == 'MEDAL_LONG_LEVEL') {
return 40;
} else {
if (i == 'MEDAL_GIANT_LEVEL') {
return 41;
} else {
if (i == 'MEDAL_TEST_LEVEL') {
return 42;
} else {
if (i == 'MEDAL_NUKE_LEVEL') {
return 43;
} else {
if (i == 'MEDAL_IMPOSSIBLE_LEVEL') {
return 44;
} else {
if (i == 'MEDAL_BLOCKS_COLLECTIVE') {
return 45;
} else {
if (i == 'MEDAL_ENEMIES_COLLECTIVE') {
return 46;
} else {
if (i == 'MEDAL_COINS_COLLECTIVE') {
return 47;
} else {
if (i == 'MEDAL_DIZZY_COLLECTIVE') {
return 48;
} else {
if (i == 'MEDAL_DEATH_COLLECTIVE') {
return 49;
} else {
if (i == 'MEDAL_LEVEL_COLLECTIVE') {
return 50;
} else {
trace('Unknown Medal: ' + i);
return false;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
};
_root.medalName[0] = '???';
_root.medalPoints[0] = 0;
_root.medalLocked[0] = 'Locked medal';
_root.medalUnlocked[0] = 'Locked medal';
_root.medalName[1] = 'Questionable King';
_root.medalPoints[1] = 2;
_root.medalLocked[1] = 'This character is locked away in World 1.\nHail to the king, baby!';
_root.medalUnlocked[1] = 'The king is back and ready for action! Not even a time warp can stop him from showing up to this party!';
_root.medalName[2] = 'Shyest Guy U Know';
_root.medalPoints[2] = 2;
_root.medalLocked[2] = 'This character is locked away in World 2.\nWhy would anyone lock away such a cute shy guy?!';
_root.medalUnlocked[2] = 'Apparently causing the end of the world was just Tuesday for this adorable little shy guy.';
_root.medalName[3] = 'Subception';
_root.medalPoints[3] = 2;
_root.medalLocked[3] = 'This character is locked away in World 3.\nThough he was originally trapped in a bottle in someone\'s dream.';
_root.medalUnlocked[3] = 'So if the Subcon are here does that make this game a dream? We need to go deeper.';
_root.medalName[4] = 'Shoop Da Koopa';
_root.medalPoints[4] = 2;
_root.medalLocked[4] = 'This character is locked away in World 4.\nHe\'s a sad, false, shell-less man.';
_root.medalUnlocked[4] = 'Did somebody call for a super koopa!? No matter! A super koopa has arrived anyway!';
_root.medalName[5] = 'Chomping At The Bit';
_root.medalPoints[5] = 2;
_root.medalLocked[5] = 'This character is locked away in World 5.\nSeems like the chain wasn\'t good enough!';
_root.medalUnlocked[5] = 'You\'d be angry too if you had to guard a star that\'s already behind a metal gate.';
_root.medalName[6] = 'Egg-Based Pun';
_root.medalPoints[6] = 2;
_root.medalLocked[6] = 'This character is locked away in World 6.\n...What, were you eggspecting a pun here?';
_root.medalUnlocked[6] = 'Can\'t make an omelette without breaking a few eggs... or something.\nI\'m bad at puns.';
_root.medalName[7] = 'A Long Long Time';
_root.medalPoints[7] = 2;
_root.medalLocked[7] = 'This character is locked away in World 7.\nAt least it\'s not blasting off again.';
_root.medalUnlocked[7] = 'Gonna get you, like a space boy!\n(Woah woah woah woah) I\'m ready babe.';
_root.medalName[8] = 'Disgruntled Poultry';
_root.medalPoints[8] = 2;
_root.medalLocked[8] = 'This character is locked away in World 8.\nFunky! Gnarly! Tubular! ...Mondo!';
_root.medalUnlocked[8] = 'Orange and brown colour palatte swap not included.';
_root.medalName[9] = 'Feline Fiesta';
_root.medalPoints[9] = 2;
_root.medalLocked[9] = 'This character is hidden somewhere.\nOld people using it in commercials!!';
_root.medalUnlocked[9] = 'Nyanyanyanyanyanyanya!';
_root.medalName[10] = 'Family Man';
_root.medalPoints[10] = 2;
_root.medalLocked[10] = 'This character is hidden somewhere.\nAre you man enough to fight me?';
_root.medalUnlocked[10] = 'Like being hit by a burning dumptruck straight from hell that\'s travelling at an annoyingly slow 25MPH.';
_root.medalName[11] = 'Motown Magic';
_root.medalPoints[11] = 2;
_root.medalLocked[11] = 'This character is hidden somewhere.\nDon\'t be caught by his dance, it can be the death of you!';
_root.medalUnlocked[11] = 'This smooth criminal\'s taking time out from stopping Mr. Big to fly away, gonna stay, love today.';
_root.medalName[12] = 'Cindemega Man';
_root.medalPoints[12] = 2;
_root.medalLocked[12] = 'This character is hidden somewhere.\nRockman is my time machine so call me...';
_root.medalUnlocked[12] = 'My circuits slow, my moment has come, your speed means nothing if it’s DEATH that you’re running from.';
_root.medalName[13] = 'I\'m Gonna Get Me';
_root.medalPoints[13] = 2;
_root.medalLocked[13] = 'This character is hidden somewhere.\nFirst you draw a circle. A circle, draw a circle!';
_root.medalUnlocked[13] = 'Hey Presto! It\'s Kirby!\nIt seems that the warp star took a wrong turn somewhere.';
_root.medalName[14] = 'Bullet Bill \'n Me';
_root.medalPoints[14] = 2;
_root.medalLocked[14] = 'This character is hidden somewhere.\nLast seen at Almond Hands Park.';
_root.medalUnlocked[14] = 'This kid\'s quest to meet dad in the bad part of town has taken him to new heights.';
_root.medalName[15] = 'Dodongo Destroyer';
_root.medalPoints[15] = 1;
_root.medalLocked[15] = 'This ability is awarded at the end of World 1.\nIt\'s like a Giant Bomb waiting to blow.';
_root.medalUnlocked[15] = 'Oh boy, I can\'t wait to use a meme in my medal descriptions!';
_root.medalName[16] = 'Chicken Extra Crispy';
_root.medalPoints[16] = 1;
_root.medalLocked[16] = 'This ability is awarded at the end of World 2.\nBurn to cinders! Chaotic Flame!';
_root.medalUnlocked[16] = 'Feel the heat with a red hot burning passion that is sure to ignite fear in nearby enemies. Kirari Shiino.';
_root.medalName[17] = 'Persian Magic';
_root.medalPoints[17] = 1;
_root.medalLocked[17] = 'This ability is awarded at the end of World 3.\nUnfortunately you can run out of this time-rewinding potion.';
_root.medalUnlocked[17] = 'Everyone deserves a second chance, especially when they have a magical time-rewinding potion.';
_root.medalName[18] = 'There It Go';
_root.medalPoints[18] = 1;
_root.medalLocked[18] = 'This ability is awarded at the end of World 4.\nDamn shorty look good and I\'m thinkin\' \'bout gettin\' at her.';
_root.medalUnlocked[18] = 'Jump to the left, step to the right. Let\'s do the world warp again!';
_root.medalName[19] = 'POW, Right In The Kisser';
_root.medalPoints[19] = 1;
_root.medalLocked[19] = 'This ability is awarded at the end of World 5.\nThis packs quite the POWerful punch alright!';
_root.medalUnlocked[19] = 'No one man should have all this POWer!';
_root.medalName[20] = 'Booface Killah';
_root.medalPoints[20] = 1;
_root.medalLocked[20] = 'This ability is awarded at the end of World 6.\nYou don\'t stand a ghost of a chance!';
_root.medalUnlocked[20] = 'Egad! You turned into a ghost! Lets just hope that Luigi isn\'t around here.';
_root.medalName[21] = 'Thunderstruck';
_root.medalPoints[21] = 1;
_root.medalLocked[21] = 'This ability is awarded at the end of World 7.\nIt\'s like you hit me with lightning!';
_root.medalUnlocked[21] = 'The odds of being struck by lightning significantly increase when you use this ability!';
_root.medalName[22] = 'Hazy Cosmic Jive';
_root.medalPoints[22] = 2;
_root.medalLocked[22] = 'This ability is awarded at the end of World 8.\nWhen that rainbow\'s shining over you.\nThat\'s when your dreams will all come true.';
_root.medalUnlocked[22] = 'Reach for the starman, so if you fall you land on a lakitu.';
_root.medalName[23] = 'Alright Bullet Biller';
_root.medalPoints[23] = 3;
_root.medalLocked[23] = 'Awarded for completing a certain world.\nThey\'re not so much Lost Levels, rather Insanely Hard Levels.';
_root.medalUnlocked[23] = 'Thank you Bullet Bill! But out Princess is in another castle!';
_root.medalName[24] = 'Good Bullet Biller';
_root.medalPoints[24] = 3;
_root.medalLocked[24] = 'Awarded for completing a certain world.\nThe Star Road ain\'t got nothing on this difficulty.';
_root.medalUnlocked[24] = 'Thank you Bullet Bill! But out Princess is in another castle!';
_root.medalName[25] = 'Great Bullet Biller';
_root.medalPoints[25] = 3;
_root.medalLocked[25] = 'Awarded for completing a certain world.\nIt\'s the Pit of 100 Trials, but in Mirror Mode 150cc.';
_root.medalUnlocked[25] = 'Thank you Bullet Bill! But out Princess is in another castle!';
_root.medalName[26] = 'Super Bullet Biller';
_root.medalPoints[26] = 4;
_root.medalLocked[26] = 'Awarded for completing a certain world.\nGreen stars and purple coins be damned!';
_root.medalUnlocked[26] = 'Thank you. But our Princess is in another castle!...\nJust Kidding! Ha Ha Ha!';
_root.medalName[27] = 'False Start';
_root.medalPoints[27] = 1;
_root.medalLocked[27] = 'Some people have trouble with levels, others have trouble before the level even starts.';
_root.medalUnlocked[27] = 'You died before the level even started? How\'d you do that? I\'m not even mad, that\'s amazing.';
_root.medalName[28] = 'Missing The Point';
_root.medalPoints[28] = 2;
_root.medalLocked[28] = 'I know you\'re meant to dodge the obstacles on screen but this is just silly.';
_root.medalUnlocked[28] = 'Just like a blunt pencil you got no point!';
_root.medalName[29] = 'Perfectionist';
_root.medalPoints[29] = 2;
_root.medalLocked[29] = 'Getting to the end of a level is one thing, but this is awarded to people who do it in style.';
_root.medalUnlocked[29] = 'You pretty much blasted through that level leaving nothing but death and destruction in your wake.';
_root.medalName[30] = 'Small Geo Metro';
_root.medalPoints[30] = 1;
_root.medalLocked[30] = 'Just get your fix of a pile of enemies, stacked up like bricks.';
_root.medalUnlocked[30] = 'Yo, one time I hit 6 in a row.';
_root.medalName[31] = 'Righto, Chap';
_root.medalPoints[31] = 1;
_root.medalLocked[31] = 'Most bosses will drop a rather magical prize upon demise.';
_root.medalUnlocked[31] = 'Unfortunately you\'re not English Mario, but you still managed to get the magic wand!';
_root.medalName[32] = 'The Mask Of Golden Death';
_root.medalPoints[32] = 2;
_root.medalLocked[32] = 'You know picking up the key can only lead to trouble, just don\'t doki doki panic!';
_root.medalUnlocked[32] = 'Apparently, this floating chasing face didn\'t phase you, ace!';
_root.medalName[33] = 'Bullet Impossibill';
_root.medalPoints[33] = 3;
_root.medalLocked[33] = 'Getting through a level unscathed is no big deal, can you manage a whole world?';
_root.medalUnlocked[33] = 'Getting through a world unscathed is no big deal, can you manage the whole game?\n(Don\'t try this)';
_root.medalName[34] = 'Right Hand Man';
_root.medalPoints[34] = 2;
_root.medalLocked[34] = 'Cowering to the left of the screen is pathetic! Are you willing to live life on the edge?';
_root.medalUnlocked[34] = 'Who needs time to prepare when you have absolutely insane reflexes!';
_root.medalName[35] = 'So Still Crew';
_root.medalPoints[35] = 2;
_root.medalLocked[35] = 'BULLET BILL is paralysed!\nIt can\'t move!';
_root.medalUnlocked[35] = 'Cause if you like me let me know.\nLet me in the studio.\nI got 21 seconds before I got to go.';
_root.medalName[36] = 'The Phanto Menace';
_root.medalPoints[36] = 1;
_root.medalLocked[36] = 'Now this is just cruel, who knew masks could be so incredibly evil?';
_root.medalUnlocked[36] = 'Just when you think you\'re save, the phanto has been revealed, and he got his revenge.';
_root.medalName[37] = 'Always Remember Your First';
_root.medalPoints[37] = 1;
_root.medalLocked[37] = 'Make a level so amazing that you have no choice but to store it for future generations.';
_root.medalUnlocked[37] = 'You saved a level! Hopefully it was good and not just a giant brick dick.';
_root.medalName[38] = 'Bullet Biller\'s Dozen';
_root.medalPoints[38] = 1;
_root.medalLocked[38] = 'Make enough levels to fill 3 worlds... and then one more!';
_root.medalUnlocked[38] = 'That\'s a decent amount of levels, let\'s hope they\'re all fun to play.';
_root.medalName[39] = 'Overcompensating';
_root.medalPoints[39] = 1;
_root.medalLocked[39] = 'Make so many levels you completely fill up the arbitrary level limit!';
_root.medalUnlocked[39] = 'You either have a lot of great ideas or you\'re saving the same level over and over again.';
_root.medalName[40] = 'Long...';
_root.medalPoints[40] = 1;
_root.medalLocked[40] = 'With levels like this it may as well be an endurance run!';
_root.medalUnlocked[40] = 'Now that\'s quite the long level! Hopefully you added a few checkpoints here and there.';
_root.medalName[41] = '...And Hard';
_root.medalPoints[41] = 1;
_root.medalLocked[41] = 'Talk about bloated! How cluttered can one level get?!';
_root.medalUnlocked[41] = 'The more stuff the better! That\'s a lot of objects, I hope it doesn\'t lag that much oh god.';
_root.medalName[42] = 'My Uncle Works For Nintendo';
_root.medalPoints[42] = 1;
_root.medalLocked[42] = 'Do what the programmer of this game clearly didn\'t do and throughly test your level!';
_root.medalUnlocked[42] = 'If you test your level 256 times in under 5 minutes Mew comes out from under the truck.';
_root.medalName[43] = 'Drop A Bomb On It';
_root.medalPoints[43] = 1;
_root.medalLocked[43] = 'Sometimes the eraser tool won\'t always be with you, but there will always this more drastic option.';
_root.medalUnlocked[43] = 'Cool guys don\'t look at explosions.';
_root.medalName[44] = 'I Wanna Be The Bill';
_root.medalPoints[44] = 1;
_root.medalLocked[44] = 'Some levels are just plain hard, but some are simply impossible.';
_root.medalUnlocked[44] = 'The only people that can complete that level must be amazing! Or, you know, have cheats on.';
_root.medalName[45] = 'Block Genocidester';
_root.medalPoints[45] = 3;
_root.medalLocked[45] = 'Hit a lot of bricks! Too bad there\'s not a convenient truck in a parking lot here.';
_root.medalUnlocked[45] = 'That\'s million bricks.';
_root.medalName[46] = 'Positive KD Ratio';
_root.medalPoints[46] = 1;
_root.medalLocked[46] = 'Hit a lot of enemies! At this point it\'s full on koopa carnage!';
_root.medalUnlocked[46] = 'Hey these enemies better watch out, you know about Timed Hits!';
_root.medalName[47] = 'Money Shot';
_root.medalPoints[47] = 1;
_root.medalLocked[47] = 'Grab a lot of coins! Coins rule everything around me. Get the money, dolla dolla bill y\'all.';
_root.medalUnlocked[47] = 'With that kind of coin it\'s only a matter of time before you have a Scrooge-style money pool.';
_root.medalName[48] = 'Ground Control To Major Bill';
_root.medalPoints[48] = 1;
_root.medalLocked[48] = 'Touch fuzzy get dizzy! You\'ll be flying high in the sky for a whole different reason.';
_root.medalUnlocked[48] = 'What is it you want me to do? Ok I... wait, I... why is my monitor moving?';
_root.medalName[49] = 'Shot The Bucket';
_root.medalPoints[49] = 1;
_root.medalLocked[49] = 'Die a bunch! Really it\'s more impressive if you don\'t get this one.';
_root.medalUnlocked[49] = 'Oh what to do to die today at a minute or two to two! A thing distinctly hard to say but a harder thing to do.';
_root.medalName[50] = 'Impeccabill Survivor';
_root.medalPoints[50] = 2;
_root.medalLocked[50] = 'Don\'t die a bunch! How many levels can you be bothered to beat?';
_root.medalUnlocked[50] = 'Everybody know the game dont stop trying to make it to the top, Congrats!';
_root.medalDifficulty = new Array(5);
_root.medalDifficulty[0] = 'Undefined';
_root.medalDifficulty[1] = 'Easy';
_root.medalDifficulty[2] = 'Moderate';
_root.medalDifficulty[3] = 'Challenging';
_root.medalDifficulty[4] = 'Difficult';
_root.medalDifficulty[5] = 'Brutal';
medalCheck = function (i) {
if (!_root.cheatsOn && medalNumber(i) && !_root.medalGet[medalNumber(i)]) {
return true;
} else {
return false;
}
};
medalUnlock = function (i) {
trace(i);
if (medalCheck(i)) {
_root.medalGet[medalNumber(i)] = true;
com.newgrounds.API.unlockMedal(_root.medalName[medalNumber(i)]);
_root.saveMedals();
}
};
medalPosition = function () {
_root.medalDisplay._x = 492 - _root._x;
_root.medalDisplay._y = 420 - _root._y;
};
}
frame 5 {
leftBut = false;
var mouseListener = new Object();
mouseListener.onMouseDown = function () {
leftBut = true;
};
mouseListener.onMouseUp = function () {
leftBut = false;
};
Mouse.addListener(mouseListener);
_root.leftButtonDetect = function () {
return leftBut;
};
}
frame 40 {
if (_root.showLogos) {
_root.gotoAndStop(_root._currentframe + 2);
} else {
_root.gotoAndStop(_root.titleFrame);
}
}
movieClip 669 Bullet {
frame 1 {
this.attachMovie('Bullet' + _root.bulletNo, 'Bullet', 2);
this.attachMovie('Bullet' + _root.bulletNo, 'BulletHit', 3);
BulletHit._alpha = 0;
yChange = 0;
xChange = 0;
yMove = 0;
xMove = 0;
myDegrees = 0;
bulletDead = false;
deadRot = 20;
drawLine = function (x1, y1, x2, y2) {
k = 0;
mult = 1;
i = 0;
deltax = 0;
deltay = 0;
numpixels = 0;
d = 0;
dinc1 = 0;
dinc2 = 0;
xDif = 0;
xinc1 = 0;
xinc2 = 0;
yDif = 0;
yinc1 = 0;
yinc2 = 0;
deltax = Math.abs(x2 - x1);
deltay = Math.abs(y2 - y1);
if (deltax >= deltay) {
numpixels = int((deltax + 1) / mult);
d = 2 * deltay - deltax;
dinc1 = deltay << 1;
dinc2 = deltay - deltax << 1;
xinc1 = 1;
xinc2 = 1;
yinc1 = 0;
yinc2 = 1;
} else {
numpixels = deltay + 1;
d = 2 * deltax - deltay;
dinc1 = deltax << 1;
dinc2 = deltax - deltay << 1;
xinc1 = 0;
xinc2 = 1;
yinc1 = 1;
yinc2 = 1;
}
if (x1 > x2) {
xinc1 = -xinc1;
xinc2 = -xinc2;
}
if (y1 > y2) {
yinc1 = -yinc1;
yinc2 = -yinc2;
}
xDif = x1;
yDif = y1;
i = 1;
while (i < numpixels) {
_root.Bullet._x = xDif;
_root.Bullet._y = yDif;
if (d < 0) {
d += dinc1 * mult;
xDif += xinc1 * mult;
yDif += yinc1 * mult;
} else {
d += dinc2 * mult;
xDif += xinc2 * mult;
yDif += yinc2 * mult;
}
if (this._alpha == 100 && !_root.banzaiSwitch) {
if (!_root.timeRewind && !_root.warpZone && !(_root.abilityNo == 9 && _root.abilityUsage)) {
if (_root.Level.Plat.hitTest(_root.Bullet._x, _root.Bullet._y, true)) {
if (!_root.cheatInvincible && !_root.banzaiMode) {
break;
}
}
}
++k;
if (k > 32) {
if (this.hitTest(_root.Level.Enemies)) {
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this.Bullet)) {
_root.Level.Enemies[v3].bulletHit();
}
}
}
if (this.hitTest(_root.Level.Coins)) {
for (v3 in _root.Level.Coins) {
_root.Level.Coins[v3].coinHit(this.Bullet);
}
}
if (this.hitTest(_root.Level.Misc)) {
for (v3 in _root.Level.Misc) {
_root.Level.Misc[v3].miscHit(this.Bullet);
}
}
if (!_root.banzaiMode) {
brickY = Math.round((this._y - 10) / 48);
brickX = Math.round((this._x - _root.Level._x) / 48);
if (brickX > 0) {
k = 0;
while (k < 9) {
_root.Level.Brick[brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3))].brickHit(this.Bullet, false);
++k;
}
}
k = 0;
} else {
if (this.hitTest(_root.Level.Brick)) {
for (v3 in _root.Level.Brick) {
_root.Level.Brick[v3].brickHit(this.Bullet, false);
}
}
}
}
}
++i;
}
if (i >= numpixels) {
_root.Bullet._x = x2;
_root.Bullet._y = y2;
if (this._alpha == 100 && !_root.banzaiSwitch) {
if (this.hitTest(_root.Level.Enemies)) {
for (v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this.Bullet)) {
_root.Level.Enemies[v3].bulletHit();
}
}
}
if (this.hitTest(_root.Level.Coins)) {
for (v3 in _root.Level.Coins) {
_root.Level.Coins[v3].coinHit(this.Bullet);
}
}
if (this.hitTest(_root.Level.Misc)) {
for (v3 in _root.Level.Misc) {
_root.Level.Misc[v3].miscHit(this.Bullet);
}
}
if (!_root.banzaiMode) {
brickY = Math.round((this._y - 10) / 48);
brickX = Math.round((this._x - _root.Level._x) / 48);
if (brickX > 0) {
k = 0;
while (k < 9) {
_root.Level.Brick[brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3))].brickHit(this.Bullet, false);
++k;
}
}
k = 0;
} else {
if (this.hitTest(_root.Level.Brick)) {
for (v3 in _root.Level.Brick) {
_root.Level.Brick[v3].brickHit(this.Bullet, false);
}
}
}
}
k = 0;
}
};
onEnterFrame = function () {
if (!_root.warpZone) {
if (!_root.gamePause) {
yChange = Math.round((_root._ymouse < 0 ? 0 : (_root._ymouse > 500 ? 500 : _root._ymouse)) - this._y);
yMove = Math.round(yChange / (_root.BulletReaction[_root.bulletNo] / 3 + 2));
if (!yMove) {
yMove = yChange;
}
myDegrees = yChange;
if (myDegrees > 21) {
myDegrees = 21;
} else {
if (myDegrees < -21) {
myDegrees = -21;
}
}
this.Bullet._rotation = myDegrees;
if (!_root.prisonScene) {
xChange = Math.round((_root._xmouse < 0 ? 0 : (_root._xmouse > 750 ? 750 : _root._xmouse)) - this._x);
xMove = Math.round(xChange / (_root.BulletReaction[_root.bulletNo] / 3 + 2));
drawLine(this._x, this._y, this._x + xMove, this._y + yMove);
if (_root.StageNo && !_root.gameFinished) {
if (!(prevyMouse - (_root._ymouse < 0 ? 0 : (_root._ymouse > 500 ? 500 : _root._ymouse))) && !(prevxMouse - (_root._xmouse < 0 ? 0 : (_root._xmouse > 750 ? 750 : _root._xmouse)))) {
++_root.stayStill;
if (_root.stayStill >= 672) {
_root.medalUnlock('MEDAL_STAY_STILL');
}
} else {
_root.stayStill = 0;
}
if (this._x > 650) {
++_root.rightHand;
if (_root.rightHand >= 480) {
_root.medalUnlock('MEDAL_RIGHT_SIDE');
}
} else {
_root.rightHand = 0;
}
prevyMouse = _root._ymouse < 0 ? 0 : (_root._ymouse > 500 ? 500 : _root._ymouse);
prevxMouse = _root._xmouse < 0 ? 0 : (_root._xmouse > 750 ? 750 : _root._xmouse);
}
} else {
if (_root.prisonScene) {
this._y += yMove;
this._x += ((_root.lakituPrison == undefined) ? 1 : (_root.lakituPrison.cageLeave ? 1 : Math.cos(Math.PI * ((_root.lakituPrison._y / 400) * 90) / 180))) * (_root.BulletSpeed[_root.bulletNo] * 9 + 9);
if (this._x > 1000) {
if (_root.bulletNo == 10 || _root.bulletNo == 12) {
this.NyanNyan._alpha -= 10;
if (this.NyanNyan._alpha <= 0) {
this.removeMovieClip();
}
} else {
this.removeMovieClip();
}
}
}
}
}
} else {
this._y -= (this._y + 250) / 5;
if (this._y < -249) {
if (_root.eGB == undefined) {
_root.attachMovie('warpZoneBlackness', 'eGB', 12);
}
}
if (_root.bulletNo == 10) {
if (this._y < -150) {
this.NyanNyan._alpha = this._y + 250;
}
}
}
if (_root.bulletNo == 10 || _root.bulletNo == 12) {
for (var v3 in this.NyanNyan) {
this.NyanNyan[v3].changeY();
}
this.NyanNyan.rainbowGenerate();
}
if (_root.abilityNo == 1) {
for (v3 in this.BSlow) {
this.BSlow[v3].changePos();
}
}
if (_root.banzaiSwitch && _root.banzaiMode) {
this.bulEx.partMove();
}
};
}
}
movieClip 670 Background {
frame 1 {
this.attachMovie('BG' + _root.levelStyle, 'BG1', 2);
this.attachMovie('BG' + _root.levelStyle, 'BG2', 1);
BGSize = BG1._width - ((_root.levelStyle == 3) ? 68 : 0);
BG2._x = BGSize;
if (this._x > 0) {
this._x -= BGSize;
}
if (this._x < -BGSize) {
this._x += BGSize;
}
onEnterFrame = function () {
if (this._x > 100) {
this._x -= BGSize;
}
if (this._x < -BGSize - 100) {
this._x += BGSize;
}
};
}
}
movieClip 671 BG1 {
}
movieClip 674 Bullet2 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 678 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 680 {
}
movieClip 683 {
}
movieClip 689 {
frame 1 {
if (this._parent._alpha == 0) {
this._xscale = 1;
this._yscale = 1;
}
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 692 {
}
movieClip 696 {
frame 1 {
if (this._parent._alpha == 0) {
this._xscale = 1;
this._yscale = 1;
}
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 697 Bullet3 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 700 {
frame 1 {
stop();
this._y = 12 + random(150);
dirMove = !random(2) ? 1 : -1;
onEnterFrame = function () {
if (_root.gameStart) {
this._y += !_root.gamePause * 4 * dirMove / (_root.slowDown + 1);
if (this._y > 162 && dirMove == 1) {
dirMove = -1;
}
if (this._y < 12 && dirMove == -1) {
dirMove = 1;
}
if (this.hitTest(_root.Bullet.BulletHit)) {
this.gotoAndStop(2);
_root.stopMSC();
_root.abilityMeter += 60 * !_root.timeRewind;
_root.abilityUsage = false;
_root.score += 1000;
_root.camShake += 20;
_root.playSFX('SFXclear');
}
}
};
}
frame 2 {
stop();
_root.fireworkShow = true;
this.attachMovie('gateBreak', 'gateBreak1', 1);
this.attachMovie('gateBreak', 'gateBreak2', 2);
gateBreak1._x = 27.5;
gateBreak1._y = 10;
gateBreak2._x = 74;
gateBreak2._y = 10;
onEnterFrame = function () {};
}
}
movieClip 701 levelEnd {
frame 1 {
onEnterFrame = function () {};
}
}
movieClip 703 levelEndDepth {
}
movieClip 705 {
}
movieClip 707 PersonalScore {
}
movieClip 711 checkpointHit {
frame 1 {
if (_root.Level._xscale == 300 && this._parent._name == 'Misc' && this._x * _root.Level._xscale / 100 + _root.Level._x < 0) {
this.removeMovieClip();
}
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.Level._xscale == 300) {
this._alpha = 0;
}
if (_root.Level._xscale == 300 && this._x * _root.Level._xscale / 100 + _root.Level._x < 0) {
if (!_root.levelWarp) {
_root.checkPoint(this._x * _root.Level._xscale / 100 + 1);
}
this.removeMovieClip();
}
};
}
}
movieClip 716 BulletDead1 {
frame 8 {
_root.camShake += 100;
_root.playSFX('SFXbomb');
}
frame 24 {
stop();
}
}
movieClip 719 {
}
movieClip 736 {
}
movieClip 737 Checkpoint {
frame 5 {
_root.camShake += 5;
_root.playSFX('SFXclear');
}
frame 6 {
_root.camShake += 5;
}
frame 7 {
_root.camShake += 5;
}
frame 8 {
_root.camShake += 5;
}
frame 9 {
_root.camShake += 5;
}
frame 10 {
_root.camShake += 10;
}
frame 32 {
_root.levelScrollPause = false;
this.removeMovieClip();
}
}
movieClip 742 BulletIntro1 {
frame 25 {
_root.introAniFinish = true;
_root.playSFX('SFXcannon');
}
frame 31 {
this.removeMovieClip();
}
}
movieClip 746 {
}
movieClip 747 BulletDead2 {
frame 4 {
_root.camShake += 60;
_root.playSFX('SFXpowerdown');
}
}
movieClip 751 {
}
movieClip 752 {
}
movieClip 755 {
}
movieClip 756 {
}
movieClip 758 {
}
movieClip 760 {
}
movieClip 762 {
}
movieClip 763 {
}
movieClip 769 BulletIntro3 {
frame 31 {
_root.camShake += 30;
_root.playSFX('SFXshyguy2');
}
frame 49 {
_root.camShake += 20;
_root.playSFX('SFXhurt');
}
frame 61 {
_root.camShake += 5;
}
frame 71 {
_root.playSFX('SFXshyguy1');
}
frame 98 {
_root.camShake += 30;
_root.playSFX('SFXshyguy2');
}
frame 118 {
_root.introAniFinish = true;
}
frame 118 {
this.removeMovieClip();
}
}
movieClip 773 {
}
movieClip 795 {
}
movieClip 796 {
frame 14 {
stop();
}
}
movieClip 797 BulletIntro2 {
frame 14 {
_root.playSFX('SFXjump');
}
frame 25 {
_root.playSFX('SFXpowerup');
}
frame 30 {
_root.introAniFinish = true;
}
frame 43 {
this.removeMovieClip();
}
}
movieClip 799 BulletDead3 {
frame 7 {
_root.playSFX('SFXshyguy2');
}
}
movieClip 805 {
}
movieClip 806 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 807 BG2 {
}
movieClip 836 BulletIntro {
frame 47 {
stop();
this.removeMovieClip();
}
}
movieClip 839 whiteFlash {
frame 16 {
this.removeMovieClip();
}
}
movieClip 841 titleName {
}
movieClip 842 NG-ads {
frame 1 {
stop();
}
instance of movieClip 537 FlashAd {
onClipEvent (construct) {
apiId = '17233:PBx3qBJk';
showBorder = true;
}
}
frame 2 {
stop();
}
}
movieClip 849 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 857 {
}
movieClip 870 {
}
movieClip 890 {
}
movieClip 906 {
}
movieClip 911 {
}
movieClip 915 {
}
movieClip 918 {
}
movieClip 921 {
}
movieClip 922 {
frame 1 {
stop();
aniDir = 0;
onEnterFrame = function () {
if (_root.cheatsOn) {
aniDir = 1;
} else {
aniDir = -1;
}
this.gotoAndStop(this._currentframe + aniDir);
};
}
frame 32 {
stop();
aniDir = 0;
}
}
movieClip 927 {
}
movieClip 936 {
frame 1 {
onEnterFrame = function () {
if (_root.soundCheckPlay) {
this.play();
} else {
this.gotoAndStop(1);
}
};
}
}
movieClip 938 {
frame 1 {
onEnterFrame = function () {
if (_root.soundCheckPlay) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
}
frame 1 {
stop();
}
}
movieClip 943 {
frame 1 {
stop();
}
frame 2 {
onEnterFrame = function () {
_root.volumeMSC(100 - 11 * (this._currentframe - 1));
};
}
frame 11 {
_root.stopMSC();
if (_root.soundCheckPlay) {
_root.playMSC(_root.musicTrack[_root.songNo], true);
}
_root.volumeMSC(100);
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
onEnterFrame = function () {};
}
}
movieClip 947 {
frame 1 {
musicSel.setTextFormat(_root.txtFormat2);
musicSel.embedFonts = true;
onEnterFrame = function () {
aniPos = this._parent.musicPlayerChange._currentframe;
if (aniPos < 11) {
musicSel._x = 21;
musicSel._y = 17 + (aniPos - 1) * (aniPos - 1) / 2.5;
} else {
if (aniPos == 11) {
if (_root.soundCheckPlay) {
musicSel.text = _root.musicTitle[_root.songNo];
} else {
musicSel.text = '';
}
} else {
musicSel._x = 21 + (aniPos - 32) * (aniPos - 32);
musicSel._y = 17;
}
}
};
}
}
movieClip 960 {
frame 1 {
stop();
this.gotoAndStop(_root[this._parent._name] + 1);
this.onRelease = function () {
if (!_root.SMB2MessageUp) {
xPos = _root._xmouse - (this._parent._x + this._parent._parent._x + this._x + 3) + _root._x * !_root.gamePause;
xPos = int(xPos / 42);
this.gotoAndStop(xPos + 1);
_root[this._parent._name] = xPos;
if (!_root.gamePause) {
_root.volumeMSC(100);
}
_root.saveOptions();
}
};
}
}
movieClip 962 {
}
movieClip 965 {
}
movieClip 966 titleBackground {
}
movieClip 970 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 971 BG3 {
}
movieClip 981 {
}
movieClip 983 {
frame 1 {
stop();
}
}
movieClip 984 BulletStatDisplay {
frame 1 {
statReset = function () {
bulletName.text = _root.BulletUnlock[_root.bulletNo] ? _root.BulletName[_root.bulletNo] : _root.BulletName[0];
bulletName.setTextFormat(_root.txtFormat);
bulletName.embedFonts = true;
bulletStatSpeed.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? _root.BulletSpeed[_root.bulletNo] : _root.BulletSpeed[0]) + 1);
bulletStatSize.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? _root.BulletMass[_root.bulletNo] : _root.BulletMass[0]) + 1);
bulletStatReaction.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? 5 - _root.BulletReaction[_root.bulletNo] : _root.BulletReaction[0]) + 1);
};
statReset();
}
}
movieClip 985 BulletIcon {
frame 1 {
stop();
}
}
movieClip 986 AbilityIcon {
}
movieClip 991 leftRightSelection {
}
movieClip 1000 BackgroundSaved {
}
movieClip 1006 {
}
movieClip 1009 {
}
movieClip 1010 endLevelFireworks {
frame 1 {
stop();
stopY = this._y;
this._y += 500;
_root.playSFX('SFXfirework1');
onEnterFrame = function () {
this._y -= (this._y - (stopY - 5)) / 5;
if (Math.round(this._y) <= stopY) {
gotoAndStop(2);
}
};
}
frame 2 {
stop();
_root.camShake += 100;
_root.playSFX('SFXfirework2');
i = 0;
while (i < 200) {
this.attachMovie('fireworkExplode', 'fireworkExplode' + i, i);
++i;
}
}
}
movieClip 1011 fireworkExplode {
frame 1 {
fireSpark.gotoAndPlay(random(5) + 1);
dir = random(360) + 1;
speed = (random(50) + 1) / 15;
fallC = 10;
fallStart = random(360) + 1;
fallSpeed = 0;
onEnterFrame = function () {
if (fallC) {
this._x += fallC * speed * Math.sin(Math.PI * dir / 180);
this._y += fallC * speed * Math.cos(Math.PI * dir / 180);
--fallC;
} else {
++fallSpeed;
this._y += fallSpeed / 12;
this._x += Math.sin(Math.PI * fallStart / 180);
fallStart += 20;
if (this._xscale >= 50) {
this._yscale = 100 - fallSpeed * fallSpeed / 16;
this._xscale = this._yscale;
} else {
if (int(fallSpeed / 3) == fallSpeed / 3) {
if (int(fallSpeed / 6) == fallSpeed / 6) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
}
if (fallSpeed > 60) {
this._alpha = 0;
this.removeMovieClip();
}
}
};
}
}
movieClip 1016 gateBreak {
frame 1 {
onEnterFrame = function () {
if (!dummyVar) {
rot = random(40) - 20;
ySpeed = -random(10);
xSpeed = _root.BulletSpeed[_root.bulletNo] * 9 + 9 + random(14) - 7;
dummyVar = true;
}
this._x += !_root.gamePause * xSpeed * 1.1;
this._y += !_root.gamePause * ySpeed * 2;
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
ySpeed += !_root.gamePause;
this._rotation += !_root.gamePause * rot;
if (this._y > 600) {
this.removeMovieClip();
}
};
}
}
movieClip 1028 {
}
movieClip 1030 {
}
movieClip 1033 {
}
movieClip 1035 {
}
movieClip 1037 {
}
movieClip 1038 endStats {
frame 1 {
_root.endMultiCalc();
levelScore.text = _root.score;
levelScore.setTextFormat(_root.txtFormat);
levelScore.embedFonts = true;
Multiplier.text = _root.endMulti + 'x';
Multiplier.setTextFormat(_root.txtFormat);
Multiplier.embedFonts = true;
coinAm.text = 'x' + _root.coinCount;
coinAm.setTextFormat(_root.txtFormat);
coinAm.embedFonts = true;
newLevelScore.text = 100 * int(_root.score * _root.endMulti / 100);
newLevelScore.setTextFormat(_root.txtFormat);
newLevelScore.embedFonts = true;
totalScore.text = 100 * int(_root.score * _root.endMulti / 100) + _root.prevScore * _root.gameLoaded;
totalScore.setTextFormat(_root.txtFormat);
totalScore.embedFonts = true;
if (!_root.score && _root.StageNo) {
_root.medalUnlock('MEDAL_ZERO_POINTS');
}
if (!_root.levelCreate) {
_root.tempScore = 100 * int(_root.score * _root.endMulti / 100) + _root.prevScore * _root.gameLoaded;
_root.prevScore = _root.tempScore;
_root.tempAbility = _root.abilityMeter;
if (!(_root.StageNo % 4)) {
if (_root.prisonScene) {
_root.BulletUnlock[1 + _root.StageNo / 4] = true;
}
_root.AbilityUnlock[1 + _root.StageNo / 4] = true;
}
if (!(_root.StageNo % 4) && _root.StageNo) {
_root.medalUnlock('MEDAL_WORLD_' + int(_root.StageNo / 40) + '' + int(_root.StageNo / 4) % 10);
if (_root.StageNo < 33 && _root.prisonScene) {
_root.medalUnlock('MEDAL_CHARACTER_0' + (int(_root.StageNo / 4) + 1));
}
}
var levelNumber = _root.levelNo.split('');
_root.StageNo = int(int(4 * (ord(levelNumber[0]) - 97) / 1) + levelNumber[1] / 1);
++_root.StageNo;
_root.levelNo = chr(int((_root.StageNo - 1) / 4) + 97) + int((_root.StageNo - 1) % 4 + 1);
_root.gameLoaded = true;
_root.tempProgress = int(_root.bulletNo / 10) + '' + int(_root.bulletNo % 10) + '' + _root.abilityNo + '' + _root.levelNo;
if (!_root.cheatsOn) {
_root.saveUnlocks();
}
if (_root.autoSave) {
_root.savedScore = _root.tempScore;
_root.savedAbility = _root.tempAbility;
_root.savedProgress = _root.tempProgress;
_root.saveProgress();
}
}
++_root.statComplete;
_root.saveStats();
}
instance of movieClip 1028 {
onClipEvent (load) {
if (!_root.noDeath) {
c = new Color(this);
c.setTint(0, 0, 0, 85);
this._alpha = 50;
} else {
this._alpha = 75;
}
}
}
instance of movieClip 1030 {
onClipEvent (load) {
if (!_root.allBricks) {
c = new Color(this);
c.setTint(0, 0, 0, 85);
this._alpha = 50;
} else {
this._alpha = 75;
}
}
}
instance of movieClip 1033 {
onClipEvent (load) {
if (!_root.allEnemies) {
c = new Color(this);
c.setTint(0, 0, 0, 85);
this._alpha = 50;
} else {
this._alpha = 75;
}
}
}
instance of movieClip 1035 {
onClipEvent (load) {
if (!_root.noAbility) {
c = new Color(this);
c.setTint(0, 0, 0, 85);
this._alpha = 50;
} else {
this._alpha = 75;
}
}
}
instance of movieClip 1037 {
onClipEvent (load) {
this._alpha = 75;
}
}
}
movieClip 1040 {
}
movieClip 1042 {
}
movieClip 1044 {
}
movieClip 1046 {
}
movieClip 1049 {
}
movieClip 1050 {
frame 1 {
stop();
}
}
movieClip 1051 {
frame 1 {
statReset = function () {
bulletName.text = _root.BulletUnlock[_root.bulletNo] ? _root.BulletName[_root.bulletNo] : _root.BulletName[0];
bulletName.setTextFormat(_root.txtFormat);
bulletName.embedFonts = true;
bulletStatSpeed.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? _root.BulletSpeed[_root.bulletNo] : _root.BulletSpeed[0]) + 1);
bulletStatSize.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? _root.BulletMass[_root.bulletNo] : _root.BulletMass[0]) + 1);
bulletStatReaction.gotoAndStop((_root.BulletUnlock[_root.bulletNo] ? 5 - _root.BulletReaction[_root.bulletNo] : _root.BulletReaction[0]) + 1);
};
statReset();
}
}
movieClip 1054 {
frame 1 {
statReset = function () {
abilityName.text = _root.AbilityUnlock[_root.abilityNo] ? _root.AbilityName[_root.abilityNo] : _root.AbilityName[0];
abilityName.setTextFormat(_root.txtFormat);
abilityName.embedFonts = true;
abilityDesc.text = _root.AbilityUnlock[_root.abilityNo] ? _root.AbilityDesc[_root.abilityNo] : _root.AbilityDesc[0];
abilityDesc.setTextFormat(_root.txtFormat);
abilityDesc.embedFonts = true;
};
statReset();
}
}
movieClip 1055 {
frame 1 {
selectType = '';
pr1 = 0;
pr2 = 0;
pr3 = 0;
BulletStats._alpha = 0;
AbilityStats._alpha = 0;
portraitPos = function () {
portraitMask[selectType + 'Icon']._yscale = 100 - Math.abs(pr1);
portraitMask[selectType + 'IconU']._yscale = 100 - Math.abs(pr2);
portraitMask[selectType + 'IconD']._yscale = 100 - Math.abs(pr3);
portraitMask[selectType + 'Icon']._y = 108 * pr1 / 50;
portraitMask[selectType + 'IconU']._y = 108 * pr2 / 50;
portraitMask[selectType + 'IconD']._y = 108 * pr3 / 50;
c1 = new Color(portraitMask[selectType + 'Icon']);
c1.setTint(0, 0, 0, (100 - portraitMask[selectType + 'Icon']._yscale) / 1.5);
c2 = new Color(portraitMask[selectType + 'IconU']);
c2.setTint(0, 0, 0, (100 - portraitMask[selectType + 'IconU']._yscale) / 1.5);
c3 = new Color(portraitMask[selectType + 'IconD']);
c3.setTint(0, 0, 0, (100 - portraitMask[selectType + 'IconD']._yscale) / 1.5);
};
portraitReset = function (type) {
selectType = type;
portraitMask.attachMovie('SMB2' + type + 'Portraits', selectType + 'Icon', 1);
portraitMask.attachMovie('SMB2' + type + 'Portraits', selectType + 'IconU', 2);
portraitMask.attachMovie('SMB2' + type + 'Portraits', selectType + 'IconD', 3);
portraitMask[selectType + 'Icon'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'Icon']._totalframes);
portraitMask[selectType + 'IconU'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'IconU']._totalframes);
portraitMask[selectType + 'IconD'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'IconD']._totalframes);
pr1 = 0;
pr2 = -50;
pr3 = 50;
portraitPos();
userSelect = false;
portraitMask[selectType + 'Icon'].onRelease = function () {
if (_root[selectType + 'Unlock'][_root[selectType.toLowerCase() + 'No']]) {
selectType = '';
}
};
portraitMask[selectType + 'IconU'].onRelease = function () {};
portraitMask[selectType + 'IconD'].onRelease = function () {};
BulletStats._alpha = 0;
AbilityStats._alpha = 0;
this[selectType + 'Stats']._alpha = 100;
this[selectType + 'Stats'].statReset();
};
iconMove = function (dir) {
portraitMask[selectType + 'Icon'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 1 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'Icon']._totalframes);
portraitMask[selectType + 'IconU'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'IconU']._totalframes);
portraitMask[selectType + 'IconD'].gotoAndStop(_root[selectType + 'Unlock'][(_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1] ? (_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1 : portraitMask[selectType + 'IconD']._totalframes);
pr1 = 50 * dir;
pr2 = -50 + 50 * dir;
pr3 = 50 + 50 * dir;
portraitPos();
this[selectType + 'Stats'].statReset();
};
downArrow.onRelease = function () {
_root[selectType.toLowerCase() + 'No'] = (_root[selectType.toLowerCase() + 'No'] - 2 + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1;
iconMove(1);
};
upArrow.onRelease = function () {
_root[selectType.toLowerCase() + 'No'] = (_root[selectType.toLowerCase() + 'No'] + ((selectType == 'Bullet') ? 15 : 9)) % ((selectType == 'Bullet') ? 15 : 9) + 1;
iconMove(-1);
};
onEnterFrame = function () {
if (selectType == '') {
this._y -= (this._y + 400) / 5;
} else {
this._y -= (this._y - 78) / 5;
}
pr1 -= pr1 / 4;
pr2 -= (pr2 + 50) / 4;
pr3 -= (pr3 - 50) / 4;
portraitPos();
};
}
}
button 1058 {
on (release) {
if (!_root.SMB2MessageUp) {
if (_root.autoSave || _root.firstLevel) {
_root.quitToMenu();
} else {
this._parent.attachMovie('SMB2MessageGameSave', 'SMB2Message', 5);
_root.SMB2MessageUp = true;
}
}
}
}
button 1060 {
on (release) {
if (!_root.SMB2MessageUp) {
this._parent.attachMovie('SMB2MessageChangeCharacter', 'SMB2Message', 5);
_root.SMB2MessageUp = true;
}
}
}
button 1062 {
on (release) {
if (!_root.SMB2MessageUp) {
this._parent.attachMovie('SMB2MessageChangeAbility', 'SMB2Message', 5);
_root.SMB2MessageUp = true;
}
}
}
button 1064 {
on (release) {
this._parent.changeOptions = true;
}
}
movieClip 1065 {
}
button 1067 {
on (release) {
this._parent.changeOptions = false;
}
}
movieClip 1068 {
}
movieClip 1070 pauseMenu0 {
frame 1 {
tempBullet = _root.bulletNo;
tempAbility = _root.abilityNo;
changeOptions = false;
onEnterFrame = function () {
if (CharAbSel.selectType == '') {
if (changeOptions) {
pauseButtons._y -= (pauseButtons._y + 360) / 4;
pauseOptions._y -= (pauseOptions._y - 100) / 4;
volControls._y -= (volControls._y - 279) / 4;
} else {
pauseButtons._y -= (pauseButtons._y - 160) / 4;
pauseOptions._y -= (pauseOptions._y - 500) / 4;
volControls._y -= (volControls._y - 679) / 4;
}
} else {
pauseButtons._y -= (pauseButtons._y - 560) / 4;
}
};
}
}
movieClip 1075 Bullet11 {
frame 1 {
if (this._alpha == 0) {
stop();
}
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 1080 BulletDead11 {
}
movieClip 1087 BulletIntro11 {
frame 11 {
_root.playSFX('SFXsonicboom');
}
frame 27 {
_root.introAniFinish = true;
}
frame 36 {
this.removeMovieClip();
}
}
movieClip 1090 {
}
movieClip 1093 {
}
movieClip 1096 {
}
movieClip 1097 {
}
movieClip 1103 {
}
movieClip 1104 Goomba {
frame 1 {
stop();
this.Goomba.gotoAndStop(int(_root.levelStyle / 1 + 1));
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 4 + 6;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
if (!enemyDead) {
enemyDead = true;
this.Goomba.Goomba.stop();
onGround = false;
fallSpeed = -4;
_root.score += 100;
_root.abilityMeter += 8 * !_root.timeRewind;
_root.camShake += 15;
this.Goomba._yscale = -300;
++_root.statEnemies;
_root.playhitSFX(true);
walkDir = 1;
}
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (!enemyDead) {
this._x += !_root.gamePause * 2 * walkDir / 3 * (_root.slowDown + 1);
if (!platHit((walkDir == 1) ? 16 : 0, 17) && !brickHit((walkDir == 1) ? 16 : 0, 17)) {
walkDir = -walkDir;
}
if (_root.Level.hitTest(thisX((walkDir == 1) ? 17 : -1), thisY(8), true)) {
walkDir = -walkDir;
}
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
} else {
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
this._x += (!_root.gamePause * flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
if (onGround) {
flingSpeed ? flingSpeed-- : 0;
fallSpeed = 0;
if (!_root.Level.Plat.hitTest(thisX(8), thisY(17), true) && !_root.Level.Brick.hitTest(thisX(8), thisY(17), true)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
if (fallSpeed > 0 && (platHit(8, 17) || brickHit(8, 17))) {
this.gotoAndStop(2);
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
fallSpeed = 0;
}
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
}
}
if (_root.gamePause) {
this.Goomba.Goomba.stop();
} else {
this.Goomba.Goomba.play();
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Goomba.Goomba.stop();
}
};
}
frame 2 {
this.Goomba.gotoAndStop(int(_root.levelStyle / 1 + 1));
}
}
movieClip 1105 Brick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('BrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
++i;
}
_root.score += 100;
_root.camShake += 5;
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {
_root.Level.Coins.attachMovie('Coin', [this._name], _root.Level.Coins.getNextHighestDepth());
_root.Level.Coins[this._name]._y = this._y;
_root.Level.Coins[this._name]._x = this._x;
_root.Level.Coins[this._name]._yscale = 33.33333333333334;
_root.Level.Coins[this._name]._xscale = 33.33333333333334;
this.removeMovieClip();
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1108 {
}
movieClip 1113 {
}
movieClip 1114 Koopa {
frame 1 {
stop();
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 10;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
enemyDead = true;
this.Koopa.stop();
onGround = false;
fallSpeed = -4;
_root.score += 200;
_root.abilityMeter += 8 * !_root.timeRewind;
if (thisX(0) < 750) {
_root.camShake += 25;
} else {
_root.camShake += 5;
}
_root.Level.Projectiles.attachMovie('KoopaShell', this._name, _root.Level.Projectiles.getNextHighestDepth());
_root.Level.Projectiles[this._name]._x = this._x;
_root.Level.Projectiles[this._name]._y = this._y;
++_root.statEnemies;
_root.playhitSFX(true);
this._x = -2048;
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
this.Koopa._xscale = -300 * walkDir;
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (!enemyDead) {
this._x += !_root.gamePause * 2 * walkDir / 3 * (_root.slowDown + 1);
if (!platHit((walkDir == 1) ? 16 : 0, 17) && !brickHit((walkDir == 1) ? 16 : 0, 17)) {
walkDir = -walkDir;
}
if (_root.Level.hitTest(thisX((walkDir == 1) ? 17 : -1), thisY(8), true)) {
walkDir = -walkDir;
}
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
}
}
}
if (_root.gamePause) {
this.Koopa.stop();
} else {
this.Koopa.play();
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Koopa.stop();
}
};
}
}
movieClip 1135 {
}
movieClip 1155 {
}
movieClip 1156 SPlat {
frame 1 {
this.platT.gotoAndStop(int(_root.levelStyle / 1 + 1));
this.platB.gotoAndStop(int(_root.levelStyle / 1 + 1));
moveBack = false;
moveTo = this._y;
POWEffect = function () {
this._y = moveTo;
moveBack = true;
moveTo = this._y + 48 * this._yscale / 100;
};
banzaiHit = function () {
POWEffect();
POWEffect();
POWEffect();
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(144) < 0) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this.platT)) {
_root.bulletDead();
}
if (_root.Bullet.BulletHit.hitTest(this.platB)) {
_root.bulletDead();
}
}
if (moveBack) {
this._y -= Math.round((this._y - moveTo) / 3);
if (Math.round(this._y) == moveTo) {
this._y = moveTo;
moveBack = false;
}
}
}
if (thisX(144) < 0) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1160 {
}
movieClip 1164 {
}
movieClip 1165 Pipe {
frame 1 {
this.platT.gotoAndStop(int(_root.levelStyle / 1 + 1));
this.platB.gotoAndStop(int(_root.levelStyle / 1 + 1));
moveBack = false;
moveTo = this._y;
POWEffect = function () {
this._y = moveTo;
moveBack = true;
moveTo = this._y + 48 * this._yscale / 100;
};
banzaiHit = function () {
POWEffect();
POWEffect();
POWEffect();
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(96) < 0) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this.platT)) {
_root.bulletDead();
}
if (_root.Bullet.BulletHit.hitTest(this.platB)) {
_root.bulletDead();
}
}
if (moveBack) {
this._y -= Math.round((this._y - moveTo) / 3);
if (Math.round(this._y) == moveTo) {
this._y = moveTo;
moveBack = false;
}
}
}
if (thisX(96) < 0) {
this.removeMovieClip();
}
}
};
}
}
button 1169 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
selChange(4);
}
}
}
button 1171 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
selChange(5);
}
}
}
button 1173 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
selChange(6);
}
}
}
button 1175 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
selChange(1);
}
}
}
button 1177 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
selChange(3);
}
}
}
button 1178 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
button 1184 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
movieClip 1204 {
}
movieClip 1223 {
}
movieClip 1224 TPlat {
frame 1 {
this.platT.gotoAndStop(int(_root.levelStyle / 1 + 1));
this.platB.gotoAndStop(int(_root.levelStyle / 1 + 1));
moveBack = false;
moveTo = this._y;
POWEffect = function () {
this._y = moveTo;
moveBack = true;
moveTo = this._y + 48 * this._yscale / 100;
};
banzaiHit = function () {
POWEffect();
POWEffect();
POWEffect();
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(48) < 0) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this.platT)) {
_root.bulletDead();
}
if (_root.Bullet.BulletHit.hitTest(this.platB)) {
_root.bulletDead();
}
}
if (moveBack) {
this._y -= Math.round((this._y - moveTo) / 3);
if (Math.round(this._y) == moveTo) {
this._y = moveTo;
moveBack = false;
}
}
}
if (thisX(48) < 0) {
this.removeMovieClip();
}
}
};
}
}
button 1226 {
on (release) {
if (!_root.createOverlay) {
selChange(2);
if (_root.objectHolding == '[') {
_root.attachObject(']');
} else {
if (_root.objectHolding == ']') {
_root.attachObject('[');
} else {
if (_root.objectHolding == '(') {
_root.attachObject(')');
} else {
if (_root.objectHolding == ')') {
_root.attachObject('(');
} else {
if (_root.objectHolding == '{') {
_root.attachObject('}');
} else {
if (_root.objectHolding == '}') {
_root.attachObject('{');
} else {
if (_root.objectHolding == '<') {
_root.attachObject('>');
} else {
if (_root.objectHolding == '>') {
_root.attachObject('<');
}
}
}
}
}
}
}
}
}
}
}
button 1228 {
on (release) {
if (!_root.createOverlay) {
selChange(1);
if (_root.objectHolding == '[') {
_root.attachObject(']');
} else {
if (_root.objectHolding == ']') {
_root.attachObject('[');
} else {
if (_root.objectHolding == '(') {
_root.attachObject(')');
} else {
if (_root.objectHolding == ')') {
_root.attachObject('(');
} else {
if (_root.objectHolding == '{') {
_root.attachObject('}');
} else {
if (_root.objectHolding == '}') {
_root.attachObject('{');
} else {
if (_root.objectHolding == '<') {
_root.attachObject('>');
} else {
if (_root.objectHolding == '>') {
_root.attachObject('<');
}
}
}
}
}
}
}
}
}
}
}
button 1229 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
movieClip 1237 {
frame 1 {
this.gotoAndStop(int(_root.levelStyle / 1 + 1));
}
}
movieClip 1238 usedBrick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('uBrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
_root.Level.Particles[this._name].gotoAndStop(int(_root.levelStyle / 1 + 1));
++i;
}
_root.score += 100;
_root.camShake += 10;
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {
_root.Level.Coins.attachMovie('Coin', [this._name], _root.Level.Coins.getNextHighestDepth());
_root.Level.Coins[this._name]._y = this._y;
_root.Level.Coins[this._name]._x = this._x;
_root.Level.Coins[this._name]._yscale = 33.33333333333334;
_root.Level.Coins[this._name]._xscale = 33.33333333333334;
this.removeMovieClip();
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1241 PBrickB {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('PBrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(2);
++i;
}
_root.score += 100;
_root.camShake += 50;
i = 0;
while (i < 48) {
j = 0;
while (j < 10) {
_root.Level.Brick[int(Math.round(-_root.Level._x / 48) + i) + '-' + j].coinSpawn();
++j;
}
++i;
}
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1244 PBrickW {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('?BrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(3);
++i;
}
_root.score += 100;
_root.camShake += 50;
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].thisX(0) < 2000 && !_root.Level.Enemies[v3].enemyDead) {
_root.Level.Coins.attachMovie('CoinW', v3, _root.Level.Coins.getNextHighestDepth());
_root.Level.Coins[v3]._y = _root.Level.Enemies[v3]._y;
_root.Level.Coins[v3]._x = _root.Level.Enemies[v3]._x;
_root.Level.Coins[v3]._yscale = 33.33333333333334;
_root.Level.Coins[v3]._xscale = 33.33333333333334;
_root.Level.Enemies[v3].removeMovieClip();
}
}
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1246 {
frame 1 {
this.gotoAndStop(int(_root.levelStyle / 1 + 1));
}
}
movieClip 1247 ?Brick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('?BrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
if (_root.levelStyle == 0 || _root.levelStyle == 7 || _root.levelStyle == 9) {
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(5);
} else {
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(4);
}
++i;
}
i = 0;
while (i < 5) {
_root.Level.Coins.attachMovie('Coin', this._name + '~' + i, _root.Level.Coins.getNextHighestDepth());
_root.Level.Coins[this._name + '~' + i].fallSpeed = -6 - i * 2;
_root.Level.Coins[this._name + '~' + i].blockPop = true;
_root.Level.Coins[this._name + '~' + i]._x = this._x;
_root.Level.Coins[this._name + '~' + i]._y = this._y;
_root.Level.Coins[this._name + '~' + i]._yscale = 33.33333333333334;
_root.Level.Coins[this._name + '~' + i]._xscale = 33.33333333333334;
++i;
}
_root.score += 100;
_root.camShake += 10;
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1248 POWBrick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (!_root.POWEffect && (autoHit || this.hitTest(hitMC))) {
_root.POWEffect = true;
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 6) {
_root.Level.Particles[this._name].attachMovie('PBrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 8 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(2);
++i;
}
_root.score += 100;
_root.camShake += 100;
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].thisX(0) < 1000 && !_root.Level.Enemies[v3].enemyDead) {
_root.Level.Enemies[v3].bulletHit();
}
}
i = 0;
while (i < 24) {
k = 0;
while (k < 10) {
if (int(Math.round(-_root.Level._x / 48) + i) + '-' + k != this._name) {
_root.Level.Brick[int(Math.round(-_root.Level._x / 48) + i) + '-' + k].brickHit(this, true);
}
++k;
}
++i;
}
for (v3 in _root.Level.Plat) {
if (_root.Level.Plat[v3].thisX(0) < 1000) {
_root.Level.Plat[v3].POWEffect();
}
}
_root.POWEffect = false;
++_root.statBricks;
_root.playSFX('SFXbrick');
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
_root.playSFX('SFXspinstomp');
this.removeMovieClip();
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1251 {
frame 1 {
this.gotoAndStop(int(_root.levelStyle / 1 + 1));
}
}
movieClip 1252 !Brick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i < 9) {
_root.Level.Particles[this._name].attachMovie('?BrickPart', 'BP' + i, i);
_root.Level.Particles[this._name]['BP' + i]._y = int(i / 3) * 4 + 4;
_root.Level.Particles[this._name]['BP' + i]._x = int(i % 3) * 4 + 4;
if (_root.levelStyle == 0 || _root.levelStyle == 7 || _root.levelStyle == 9) {
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(5);
} else {
_root.Level.Particles[this._name]['BP' + i].gotoAndStop(4);
}
++i;
}
_root.score += 100;
_root.abilityMeter += 16 * !_root.timeRewind;
_root.camShake += 10;
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
movieClip 1254 bombBrick {
frame 1 {
stop();
blockBoom = false;
brickHit = function (hitMC, autoHit) {
_root.Level.Particles.attachMovie('levelExplosion', this._name, _root.Level.Particles.getNextHighestDepth());
_root.score += 100;
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
++_root.statBricks;
_root.playSFX('SFXbrick');
this.removeMovieClip();
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
_root.allBricks = false;
this.removeMovieClip();
}
}
};
}
}
button 1255 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
movieClip 1258 {
}
movieClip 1262 {
}
movieClip 1263 Bobomb {
frame 1 {
stop();
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
bobombExplode = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 12;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
if (!enemyDead) {
enemyDead = true;
this.gotoAndStop(2);
onGround = false;
fallSpeed = -8;
_root.score += 100;
_root.abilityMeter += 8 * !_root.timeRewind;
_root.camShake += 15;
walkDir = 1;
++_root.statEnemies;
_root.playhitSFX(true);
}
};
Explode = function () {
_root.Level.Particles.attachMovie('levelExplosion', this._name, _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
this.removeMovieClip();
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
_root.startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (!bobombExplode) {
this.Bobomb._xscale = -300 * walkDir;
if (!enemyDead) {
this._x += !_root.gamePause * 2 * walkDir / 3 * (_root.slowDown + 1);
if (!platHit((walkDir == 1) ? 16 : 0, 17) && !brickHit((walkDir == 1) ? 16 : 0, 17)) {
walkDir = -walkDir;
}
if (_root.Level.hitTest(thisX((walkDir == 1) ? 17 : -1), thisY(8), true)) {
walkDir = -walkDir;
}
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
} else {
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
this._x += (!_root.gamePause * flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
if (fallSpeed >= -6 && (platHit(8, 17) || brickHit(8, 17))) {
Explode();
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || platHit(8, 8)) {
Explode();
}
if (brickHit((walkDir == 1) ? 16 : 0, 8) || brickHit(8, 8)) {
Explode();
}
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this) && v3 != this._name) {
Explode();
}
}
}
} else {
if (this.Bobomb._currentframe == this.Bobomb._totalframes) {
this.removeMovieClip();
}
}
}
}
if (_root.gamePause) {
this.Bobomb.stop();
} else {
this.Bobomb.play();
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Bobomb.stop();
}
};
}
}
movieClip 1266 {
}
movieClip 1271 {
}
movieClip 1272 Parakoopa {
frame 1 {
stop();
walkDir = 1;
moveNum = 0;
fallSpeed = 0;
enemyDead = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 10;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
bulletHit = function () {
enemyDead = true;
this.Koopa.stop();
onGround = false;
fallSpeed = -4;
_root.score += 200;
_root.abilityMeter += 8 * !_root.timeRewind;
if (thisX(0) < 750) {
_root.camShake += 25;
} else {
_root.camShake += 5;
}
_root.Level.Projectiles.attachMovie('ParakoopaShell', this._name, _root.Level.Projectiles.getNextHighestDepth());
_root.Level.Projectiles[this._name]._x = this._x;
_root.Level.Projectiles[this._name]._y = this._y;
++_root.statEnemies;
_root.playhitSFX(true);
this._x = -2048;
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart) {
if (!enemyDead) {
if (thisX(0) < 1000) {
this._y += (!_root.gamePause * 2 * Math.cos(Math.PI * moveNum / 180) * walkDir / 3) * (_root.slowDown + 1);
moveNum += !_root.gamePause * 4 / (_root.slowDown + 1);
if (platHit(8, 16) || brickHit(8, 16)) {
if (2 * Math.cos(Math.PI * moveNum / 180) * walkDir > 0) {
walkDir = -walkDir;
}
}
if (platHit(24, -21) || brickHit(24, -21)) {
if (2 * Math.cos(Math.PI * moveNum / 180) * walkDir <= 0) {
walkDir = -walkDir;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
}
}
if (_root.gamePause) {
this.Koopa.stop();
} else {
this.Koopa.play();
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Koopa.stop();
}
};
}
}
movieClip 1275 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause || !_root.gameStart) {
stop();
} else {
play();
}
};
}
}
movieClip 1276 Pokey {
frame 1 {
stop();
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 10;
rotSpeed = 0;
groundY = 0;
groundY2 = 0;
partHit = 0;
prevX = Math.round((_root.heldObject._x - _root.Level._x) / 32);
prevY = (_root.heldObject._y - _root.Level._y - 7) / 32 + (_root.heldObject._yscale < 0 ? -1 : 0);
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
hitCheck = '';
if (this.hitTest(_root.Bullet.BulletHit)) {
hitCheck = '_root.Bullet.BulletHit';
}
if (this.hitTest(_root.Level.Projectiles)) {
hitCheck = '_root.Level.Projectiles';
}
if (!enemyDead) {
if (hitCheck != '') {
i = groundY;
while (i >= 0) {
if (this['Pokey' + i].hitTest(hitCheck)) {
partHit = i;
break;
}
--i;
}
} else {
partHit = -1;
}
_root.Level.Particles.createEmptyMovieClip([this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
i = 0;
while (i <= groundY) {
_root.Level.Particles[this._name].attachMovie('PokeyHit', 'Pokey' + i, i);
_root.Level.Particles[this._name]['Pokey' + i]._y = 16 * i;
_root.Level.Particles[this._name]['Pokey' + i]._x = 0;
if (i) {
_root.Level.Particles[this._name]['Pokey' + i].gotoAndStop(2);
} else {
_root.Level.Particles[this._name]['Pokey' + i].gotoAndStop(1);
}
++i;
}
_root.score += 200 + !partHit * 200;
_root.abilityMeter += 8 * !_root.timeRewind;
_root.camShake += 25;
i = 0;
while (i <= groundY) {
_root.Level.Particles[this._name]['Pokey' + i].partHit = partHit;
_root.Level.Particles[this._name]['Pokey' + i].partPokey = i;
++i;
}
++_root.statEnemies;
_root.playhitSFX(true);
enemyDead = true;
this._x = -2048;
}
};
enemyFloorFind = function () {
if ((this._y - _root.Level._y - 7) / (48 * this._xscale / 100) < 10 && (this._y - _root.Level._y - 7) / (48 * this._xscale / 100) >= 0) {
while (groundY2) {
this['Pokey' + groundY2].removeMovieClip();
--groundY2;
}
prevX = Math.round((this._x - _root.Level._x) / 32);
prevY = (this._y - _root.Level._y - 7) / 32;
groundY = 0;
for (;;) {
if (!(!_root.Level.Plat.hitTest(this._x + 18, this._y + 32 * (1 + groundY), true) && !_root.Level.Brick.hitTest(this._x + 18, this._y + 32 * (1 + groundY), true) && groundY + prevY < 9)) break;
++groundY;
}
if (groundY + prevY >= 9) {
groundY = 0;
}
groundY2 = groundY;
while (groundY) {
this.attachMovie('PokeyBody', 'Pokey' + groundY, groundY + 1);
this['Pokey' + groundY]._y = 24 + 48 * groundY;
this['Pokey' + groundY]._x = 24;
--groundY;
}
}
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
if (groundY + prevY >= 9) {
return false;
}
return !(!platHit(8, 16 * (1 + groundY)) * !brickHit(8, 16 * (1 + groundY)));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
while (groundY2) {
this['Pokey' + groundY2].removeMovieClip();
--groundY2;
}
prevX = Math.round(this._x / 16);
prevY = Math.round((this._y - 10) / 16);
groundY = 0;
for (;;) {
if (!(!platHit(8, 16 * (1 + groundY)) && !brickHit(8, 16 * (1 + groundY)) && groundY + prevY < 9)) break;
++groundY;
}
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
groundY2 = groundY;
while (groundY) {
this.attachMovie('PokeyBody', 'Pokey' + groundY, groundY + 1);
this['Pokey' + groundY]._y = 24 + 48 * groundY;
this['Pokey' + groundY]._x = 24;
this['Pokey' + groundY].stop();
--groundY;
}
groundY = groundY2;
_root.Level.offLimits[this._name]._yscale = 100 * Math.round(this._height / 16) - 5;
}
if (_parent._parent._name == 'levelDisplay') {
while (groundY2) {
this['Pokey' + groundY2].removeMovieClip();
--groundY2;
}
prevX = Math.round(this._x / 16);
prevY = Math.round((this._y - 10) / 16);
this.createEmptyMovieClip('floorChecker', 10);
groundY = 0;
point = new Object();
while (groundY + prevY < 9) {
floorChecker._x = 24;
floorChecker._y = 48 * (1 + groundY);
point.x = 0;
point.y = 0;
floorChecker.localToGlobal(point);
if (!_parent._parent.Plat.hitTest(point.x - _root._x, point.y - _root._y, true) && !_parent._parent.Brick.hitTest(point.x - _root._x, point.y - _root._y, true)) {
++groundY;
} else {
break;
}
}
floorChecker.removeMovieClip();
if (groundY + prevY >= 9) {
this.removeMovieClip();
}
groundY2 = groundY;
while (groundY) {
this.attachMovie('PokeyBody', 'Pokey' + groundY, groundY + 1);
this['Pokey' + groundY]._y = 24 + 48 * groundY;
this['Pokey' + groundY]._x = 24;
this['Pokey' + groundY].stop();
--groundY;
}
groundY = groundY2;
}
};
startCheck = false;
if ((_parent._parent._name == 'levelDisplay') ? 1 : (thisX(0) < 1000 && thisX(0) > -50) && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if ((_parent._parent._name == 'levelDisplay') ? 1 : (thisX(0) < 1000 && thisX(0) > -50) && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
i = 0;
while (i < groundY) {
this['Pokey' + i]._x = 24 + 3 * (i % 4 ? (i % 2 ? -1 : 1) : 0) * Math.sin(Math.PI * this['Pokey' + i]._currentframe * 15 / 180);
++i;
}
if (!enemyDead) {
this._x += !_root.gamePause * 2 * walkDir / 3 * (_root.slowDown + 1);
if (!platHit((walkDir == 1) ? 16 : 0, 16 * (1 + groundY) + 1) && !brickHit((walkDir == 1) ? 16 : 0, 16 * (1 + groundY) + 1)) {
walkDir = -walkDir;
}
i = 0;
while (i <= groundY) {
if (_root.Level.hitTest(thisX(((walkDir == 1) ? 17 : -1) + (this['Pokey' + i]._x - 24) / 3), thisY(8 + 16 * i), true)) {
walkDir = -walkDir;
}
++i;
}
if (onGround) {
fallSpeed = 0;
if (!platHit(8, 16 * (1 + groundY)) && !brickHit(8, 16 * (1 + groundY))) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 16 * (1 + groundY) + 1) || brickHit(8, 16 * (1 + groundY) + 1)) {
for (;;) {
if (!(platHit(8, 16 * (1 + groundY) + 1) || brickHit(8, 16 * (1 + groundY) + 1))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
i = 0;
while (i <= groundY) {
if (platHit((walkDir == 1) ? 16 : 0, 8 + 16 * i) || brickHit((walkDir == 1) ? 16 : 0, 8 + 16 * i)) {
walkDir = -walkDir;
}
++i;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
}
}
}
i = 0;
while (i <= groundY) {
if (_root.gamePause) {
this['Pokey' + i].stop();
} else {
this['Pokey' + i].play();
}
++i;
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1279 {
}
movieClip 1282 Ninji {
frame 1 {
stop();
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
jumpRoof = 0;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 4 + 6;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
if (!enemyDead) {
enemyDead = true;
this.gotoAndStop(3);
this.Ninji.stop();
onGround = false;
fallSpeed = -4;
_root.score += 100;
_root.abilityMeter += 8 * !_root.timeRewind;
_root.camShake += 15;
this.Ninji._yscale = -300;
++_root.statEnemies;
_root.playhitSFX(true);
walkDir = 1;
}
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
for (;;) {
if (!(!platHit(8, 8 - jumpRoof * 16) && !brickHit(8, 8 - jumpRoof * 16) && jumpRoof <= 5 && thisY(8) - jumpRoof * 16 > 0)) break;
++jumpRoof;
}
--jumpRoof;
}
};
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
this.Ninji.stop();
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (!enemyDead) {
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
if (jumpRoof) {
if (_root.Bullet._x > thisX(-80) && _root.Bullet._x < thisX(0)) {
fallSpeed = -int((-1.5 + Math.sqrt(2.25 + 12 * (random(jumpRoof) * 48))) / 3);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
onGround = false;
this.gotoAndStop(2);
_root.playSFX('SFXjump');
}
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
this.gotoAndStop(1);
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
} else {
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
this._x += (!_root.gamePause * flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
if (onGround) {
flingSpeed ? flingSpeed-- : 0;
fallSpeed = 0;
if (!platHit(8, 17) && !brickHit(8, 17)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
if (fallSpeed > 0 && (platHit(8, 17) || brickHit(8, 17))) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
fallSpeed = 0;
this.gotoAndStop(4);
}
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
if (_root.gamePause) {
this.Ninji.stop();
} else {
this.Ninji.play();
}
}
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Ninji.stop();
}
};
}
}
movieClip 1284 {
}
movieClip 1285 Thwomp {
frame 1 {
thwompCrush = false;
fallSpeed = _root.BulletSpeed[_root.bulletNo] * 4 + 4;
enemyMove = true;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
bulletHit = function () {
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
if (!_root.POWEffect) {
_root.bulletDead();
}
}
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (enemyMove) {
if (!thwompCrush) {
if (_root.Bullet._x > thisX(-18) && _root.Bullet._x < thisX(18)) {
thwompCrush = true;
_root.camShake += 15;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 32) || brickHit(8, 32) || platHit(24, 32) || brickHit(24, 32)) {
for (;;) {
if (!(platHit(8, 32) || brickHit(8, 32) || platHit(24, 32) || brickHit(24, 32))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16) + 3;
if (platHit(8, 32) || platHit(24, 32)) {
thwompCrush = false;
enemyMove = false;
_root.camShake += 50;
} else {
if (brickHit(8, 32) || brickHit(24, 32)) {
brickX = Math.round(this._x / 16);
brickY = int(thisY(0) / 48) + 2;
_root.Level.Brick[brickX + '-' + brickY].brickHit(this, true);
_root.Level.Brick[brickX + 1 + '-' + brickY].brickHit(this, true);
fallSpeed = int(fallSpeed / 2);
_root.camShake += 20;
}
}
_root.playSFX('SFXthwomp');
}
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
}
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1291 HammerBro {
frame 1 {
stop();
walkDir = 1;
onGround = true;
fallSpeed = 0;
enemyDead = false;
hammerJump = false;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 4 + 6;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
bulletHit = function () {
if (!enemyDead) {
enemyDead = true;
onGround = false;
fallSpeed = -4;
hammerJump = false;
_root.score += 200;
_root.abilityMeter += 8 * !_root.timeRewind;
_root.camShake += 25;
this.gotoAndStop(4);
++_root.statEnemies;
_root.playhitSFX(true);
}
};
hammerThrow = function () {
_root.Level.Plat.attachMovie('Hammer', this._name, _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name]._x = this._x + 10;
_root.Level.Plat[this._name]._y = this._y - 12;
_root.Level.Plat[this._name].ySpeed = -int((-1.5 + Math.sqrt(2.25 + 12 * random(thisY(-12)))) / 3);
_root.Level.Plat[this._name].xSpeed = _root.BulletSpeed[_root.bulletNo] * 5 + 3;
hammerJump = false;
this.gotoAndStop(2);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (!enemyDead) {
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
if (_root.Bullet._x > thisX(-35 * _root.BulletSpeed[_root.bulletNo] - 100) && _root.Bullet._x < thisX(0) && this._currentframe == 1) {
fallSpeed = -10;
fallSpeed = fallSpeed < -15 ? fallSpeed + 1 : fallSpeed;
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
onGround = false;
hammerJump = true;
}
} else {
if (fallSpeed == -2) {
hammerThrow();
}
fallSpeed += !_root.gamePause * (1 + hammerJump) / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
if (this._currentframe == 2) {
this.gotoAndStop(3);
}
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
bulletHit();
}
} else {
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
this._x += (!_root.gamePause * flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
if (onGround) {
flingSpeed ? flingSpeed-- : 0;
fallSpeed = 0;
if (!_root.Level.Plat.hitTest(thisX(8), thisY(17), true) && !_root.Level.Brick.hitTest(thisX(8), thisY(17), true)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
if (fallSpeed > 0 && (platHit(8, 17) || brickHit(8, 17))) {
this.gotoAndStop(5);
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
fallSpeed = 0;
}
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
}
}
if (this._y > 515) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) < -50) {
if (!enemyDead) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
}
};
}
}
button 1292 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
movieClip 1294 {
}
movieClip 1297 {
}
movieClip 1298 Coin {
frame 1 {
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 9 + 9 + (random(18) - 9) / 3;
rotSpeed = (random(300) + 150) / 10;
coinHit = function (hitMC) {
if (this.hitTest(hitMC) && !blockPop) {
_root.Level.Particles.attachMovie('coinEffect', [this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
++_root.coinCount;
this._x = -1000;
++_root.statCoins;
}
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause && _root.gameStart) {
this.Coin.play();
} else {
this.Coin.stop();
}
if (thisX(0) < 0) {
this.removeMovieClip();
}
if (!_root.gamePause && blockPop) {
if (fallSpeed) {
this._x += flingSpeed / 3 * (_root.slowDown + 1);
this._y += fallSpeed / 2 * (_root.slowDown + 1);
fallSpeed += 1 / (_root.slowDown + 1);
this.Coin._rotation += rotSpeed / (_root.slowDown + 1);
} else {
blockPop = false;
coinHit(this);
}
}
} else {
this.Coin.stop();
}
};
}
}
movieClip 1302 {
}
movieClip 1303 CoinW {
frame 1 {
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 9 + 9 + (random(180) - 90) / 15;
rotSpeed = (random(300) + 150) / 10;
coinHit = function (hitMC) {
if (this.hitTest(hitMC) && !blockPop) {
_root.Level.Particles.attachMovie('coinEffect', [this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
_root.coinCount += 2;
this._x = -1000;
++_root.statCoins;
}
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause && _root.gameStart) {
this.Coin.play();
} else {
this.Coin.stop();
}
if (thisX(0) < 0) {
this.removeMovieClip();
}
if (blockPop) {
if (fallSpeed) {
this._x += flingSpeed;
this._y += fallSpeed * 1.5;
++fallSpeed;
this.Coin._rotation += rotSpeed;
} else {
blockPop = false;
coinHit(this);
}
}
} else {
this.Coin.stop();
}
};
}
}
movieClip 1307 {
}
movieClip 1308 CoinB {
frame 1 {
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 9 + 9 + (random(18) - 9) / 3;
rotSpeed = (random(300) + 150) / 10;
coinHit = function (hitMC) {
if (this.hitTest(hitMC) && !blockPop) {
_root.Level.Particles.attachMovie('coinEffect', [this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
_root.coinCount += 5;
this._x = -1000;
++_root.statCoins;
}
};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause && _root.gameStart) {
this.Coin.play();
} else {
this.Coin.stop();
}
if (thisX(0) < 0) {
this.removeMovieClip();
}
if (blockPop) {
if (fallSpeed) {
this._x += flingSpeed;
this._y += fallSpeed * 1.5;
++fallSpeed;
this.Coin._rotation += rotSpeed;
} else {
blockPop = false;
coinHit(this);
}
}
} else {
this.Coin.stop();
}
};
}
}
movieClip 1314 {
}
movieClip 1315 Key {
frame 1 {
stop();
onGround = true;
fallSpeed = 0;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
miscHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
_root.score += 300;
_root.camShake += 10;
if (!_root.keyUnlock) {
_root.Bullet.attachMovie('Key', 'Key', 9);
_root.Bullet.Key._x = -48;
_root.Level.Enemies.attachMovie('Phantos', '0', _root.Level.Enemies.getNextHighestDepth());
_root.keyUnlock = true;
_root.playSFX('SFXpickup');
}
this.removeMovieClip();
}
};
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (this._name != 'keyPrison') {
if (!_root.gamePause) {
if (this._parent._name == 'Bullet') {
yPrev = _root.Bullet._y - yPar;
this._x = -48 + Math.abs(yPrev / 4);
this._y = -yPrev;
yPar = _root.Bullet._y;
} else {
if (thisX(0) < 1000) {
if (onGround) {
fallSpeed = 0;
if (!platHit(0, 16) && !brickHit(0, 16)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
miscHit();
}
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
}
}
} else {
if (this._currentframe == 1) {
this._x += (321 - this._x) / 8;
this._y += (245.5 - this._y) / 8;
}
}
if (this._currentframe == 2 && this.smoke._currentframe == this.smoke._totalframes) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1317 {
}
movieClip 1321 {
}
movieClip 1325 Fuzzy {
frame 1 {
stop();
movementAngle = random(360);
movementAmount = 8;
baseY = this._y;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
miscHit = function (hitMC, autoHit) {
if (autoHit || this.fuzzyHit.hitTest(hitMC)) {
_root.camShake += 100;
_root.getDizzy = 180;
_root.playSFX('SFXfuzzy');
++_root.statFuzzy;
this.play();
}
};
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart && !_root.gamePause) {
this._y = baseY + 3 * Math.sin(Math.PI * movementAngle / 180);
if (movementAngle <= 360) {
movementAngle += movementAmount;
} else {
movementAngle -= 360 - movementAmount;
}
movementAngle;
if (thisX(0) < -100) {
this.removeMovieClip();
}
Fuzzy.play();
} else {
Fuzzy.stop();
}
};
}
frame 2 {
onEnterFrame = function () {
if (_root.gameStart && !_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
frame 18 {
this.removeMovieClip();
}
}
movieClip 1330 {
}
movieClip 1335 {
frame 1 {
this.gotoAndStop(random(4) + 1);
}
}
movieClip 1336 upArrow {
frame 1 {
arrowSpin = false;
arrowFall = false;
arrowVelo = 0;
dirArrow.stop();
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
miscHit = function (hitMC, autoHit) {
if (autoHit || this.balloonHit.hitTest(hitMC)) {
if (!arrowFall) {
_root.playSFX('SFXpop');
arrowFall = true;
_root.camShake += 5;
this.arrowBalloon._alpha = 0;
}
}
if (autoHit || this.arrowHit.hitTest(hitMC)) {
if (!arrowSpin) {
arrowSpin = true;
_root.camShake += 5;
_root.playSFX('SFXbump');
}
}
};
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart && !_root.gamePause) {
if (arrowSpin) {
dirArrow.play();
}
if (arrowFall) {
arrowVelo += 1 / (_root.slowDown + 1);
dirArrow._y += arrowVelo * 1.5 / (_root.slowDown + 1);
dirArrow._rotation += 5 / (_root.slowDown + 1);
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
} else {
dirArrow.stop();
}
};
}
}
movieClip 1337 downArrow {
frame 1 {
arrowSpin = false;
arrowFall = false;
arrowVelo = 0;
dirArrow.stop();
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
miscHit = function (hitMC, autoHit) {
if (autoHit || this.balloonHit.hitTest(hitMC)) {
if (!arrowFall) {
_root.playSFX('SFXpop');
arrowFall = true;
_root.camShake += 5;
this.arrowBalloon._alpha = 0;
}
}
if (autoHit || this.arrowHit.hitTest(hitMC)) {
if (!arrowSpin) {
arrowSpin = true;
_root.camShake += 5;
_root.playSFX('SFXbump');
}
}
};
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart && !_root.gamePause) {
if (arrowSpin) {
dirArrow.play();
}
if (arrowFall) {
arrowVelo += 1 / (_root.slowDown + 1);
dirArrow._y += arrowVelo * 1.5 / (_root.slowDown + 1);
dirArrow._rotation -= 5 / (_root.slowDown + 1);
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
} else {
dirArrow.stop();
}
};
}
}
movieClip 1339 megaMushroom {
frame 1 {
stop();
onGround = true;
fallSpeed = 0;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHitLevel = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHit = function (xPos, yPos) {
if (_root.creationMode) {
return brickHitCreate(xPos, yPos);
} else {
return brickHitLevel(xPos, yPos);
}
};
miscHit = function (hitMC, autoHit) {
if (autoHit || this.hitTest(hitMC)) {
if (!_root.banzaiTimer) {
_root.playSFX('SFXdrum');
_root.banzaiAni();
}
_root.score += 200;
_root.camShake += 75;
this.removeMovieClip();
}
};
floorCheck = function () {
return !(!platHit(8, 16) * !brickHit(8, 16)) * !(!platHit(24, 16) * !brickHit(24, 16));
};
enemyCheck = function () {
if (_parent._parent._name == 'Level') {
if (!floorCheck()) {
_root.Level.offLimits[this._name].removeMovieClip();
this.removeMovieClip();
}
}
};
startCheck = false;
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
onEnterFrame = function () {
if (thisX(0) < 1000 && thisX(0) > -50 && !startCheck) {
enemyCheck();
startCheck = true;
}
if (_root.gameStart) {
if (!_root.gamePause) {
if (thisX(0) < 1000) {
if (onGround) {
fallSpeed = 0;
if (!platHit(8, 16) && !brickHit(8, 16) && !platHit(24, 16) && !brickHit(24, 16)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
if (platHit(8, 17) || brickHit(8, 17) || platHit(24, 17) || brickHit(24, 17)) {
for (;;) {
if (!(platHit(8, 17) || brickHit(8, 17) || platHit(24, 17) || brickHit(24, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
}
}
if (this.hitTest(_root.Bullet.BulletHit) && _root.Bullet._alpha == 100 && !_root.banzaiSwitch) {
miscHit();
}
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
}
}
};
}
}
button 1340 {
on (release) {
_root.attachObject('');
selChange(0);
}
}
button 1344 {
on (release) {
if (this._currentframe > 2) {
if (!_root.createOverlay) {
_root.levelSaved = false;
selChange(this._currentframe - 2);
}
}
}
}
button 1345 {
on (release) {
if (this._currentframe < 10) {
if (!_root.createOverlay) {
_root.levelSaved = false;
selChange(this._currentframe);
}
}
}
}
movieClip 1356 {
frame 1 {
stop();
if (!dummyVar) {
switchSel = false;
turnSpeed = 0;
switchFrame = 0;
dummyVar = true;
}
selChange = function (Op) {
switchSel = true;
if (this._currentframe != 11) {
switchFrame = 10;
_root.switchStyle(Op);
} else {
switchFrame = Op;
}
};
selChange2 = function (Op) {
switchSel = true;
switchFrame = Op;
};
gotoAndStop(int(_root.levelStyle / 1 + 1));
onEnterFrame = function () {
if (switchSel) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
switchSel = false;
this.gotoAndStop(switchFrame / 1 + 1);
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
};
}
}
button 1359 {
on (release) {
if (!_root.createOverlay) {
_root.levelOverlay.dropOverlay(6);
_root.attachObject('');
this._parent.createTools.selChange(0);
}
}
}
movieClip 1361 createTools {
frame 1 {
stop();
if (!dummyVar) {
switchSel = false;
turnSpeed = 0;
switchFrame = 0;
dummyVar = true;
}
selChange = function (Op) {
if (Op != this._currentframe - 1) {
switchSel = true;
switchFrame = Op;
}
};
onEnterFrame = function () {
if (switchSel) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
switchSel = false;
this.gotoAndStop(switchFrame + 1);
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
};
}
instance of movieClip 633 Plat {
onClipEvent (release) {
_root.attachObject('[');
}
}
instance of movieClip 1165 Pipe {
onClipEvent (release) {
_root.attachObject('<');
}
}
instance of movieClip 1156 SPlat {
onClipEvent (release) {
_root.attachObject('{');
}
}
instance of movieClip 1224 TPlat {
onClipEvent (release) {
_root.attachObject('(');
}
}
instance of movieClip 633 Plat {
onClipEvent (release) {
_root.attachObject(']');
}
}
instance of movieClip 1165 Pipe {
onClipEvent (release) {
_root.attachObject('>');
}
}
instance of movieClip 1156 SPlat {
onClipEvent (release) {
_root.attachObject('}');
}
}
instance of movieClip 1224 TPlat {
onClipEvent (release) {
_root.attachObject(')');
}
}
instance of movieClip 1105 Brick {
onClipEvent (release) {
_root.attachObject('b');
}
}
instance of movieClip 1238 usedBrick {
onClipEvent (release) {
_root.attachObject('u');
}
}
instance of movieClip 1241 PBrickB {
onClipEvent (release) {
_root.attachObject(',');
}
}
instance of movieClip 1244 PBrickW {
onClipEvent (release) {
_root.attachObject('\'');
}
}
instance of movieClip 1247 ?Brick {
onClipEvent (release) {
_root.attachObject('?');
}
}
instance of movieClip 1248 POWBrick {
onClipEvent (release) {
_root.attachObject('*');
}
}
instance of movieClip 1252 !Brick {
onClipEvent (release) {
_root.attachObject('!');
}
}
instance of movieClip 1254 bombBrick {
onClipEvent (release) {
_root.attachObject('o');
}
}
instance of movieClip 1104 Goomba {
onClipEvent (release) {
_root.attachObject('g');
}
}
instance of movieClip 1114 Koopa {
onClipEvent (release) {
_root.attachObject('k');
}
}
instance of movieClip 1263 Bobomb {
onClipEvent (release) {
_root.attachObject('m');
}
}
instance of movieClip 1272 Parakoopa {
onClipEvent (release) {
_root.attachObject('p');
}
}
instance of movieClip 1276 Pokey {
onClipEvent (release) {
_root.attachObject('i');
}
}
instance of movieClip 1282 Ninji {
onClipEvent (release) {
_root.attachObject('n');
}
}
instance of movieClip 1285 Thwomp {
onClipEvent (release) {
_root.attachObject('t');
}
}
instance of movieClip 1291 HammerBro {
onClipEvent (release) {
_root.attachObject('h');
}
}
instance of movieClip 1294 {
onClipEvent (release) {
_root.attachObject('+');
}
}
instance of movieClip 1298 Coin {
onClipEvent (release) {
_root.attachObject('c');
}
}
instance of movieClip 1303 CoinW {
onClipEvent (release) {
_root.attachObject('w');
}
}
instance of movieClip 1308 CoinB {
onClipEvent (release) {
_root.attachObject('d');
}
}
instance of movieClip 1315 Key {
onClipEvent (release) {
_root.attachObject('~');
}
}
instance of movieClip 1317 {
onClipEvent (release) {
_root.attachObject('z');
}
}
instance of movieClip 1325 Fuzzy {
onClipEvent (release) {
_root.attachObject('f');
}
}
instance of movieClip 1336 upArrow {
onClipEvent (release) {
_root.attachObject('^');
}
}
instance of movieClip 1337 downArrow {
onClipEvent (release) {
_root.attachObject('v');
}
}
instance of movieClip 1339 megaMushroom {
onClipEvent (release) {
_root.attachObject('y');
}
}
}
button 1363 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
if (_root.Level.Plat._width || _root.Level.Brick._width || _root.Level.Enemies._width || _root.Level.Coins._width || _root.Level.Misc._width) {
_root.levelOverlay.dropOverlay(2);
_root.attachObject('');
this._parent.createTools.selChange(0);
}
}
}
}
button 1365 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
if (_root.Level.Plat._width || _root.Level.Brick._width || _root.Level.Enemies._width || _root.Level.Coins._width || _root.Level.Misc._width) {
_root.levelOverlay.dropOverlay(3);
_root.attachObject('');
this._parent.createTools.selChange(0);
}
}
}
}
button 1367 {
on (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
if (_root.Level.Plat._width || _root.Level.Brick._width || _root.Level.Enemies._width || _root.Level.Coins._width || _root.Level.Misc._width) {
_root.attachObject('');
_root.createTools.selChange(0);
_root.attachMovie('SMB2MessageNuke', 'SMB2Message', 10);
_root.SMB2MessageUp = true;
}
}
}
}
movieClip 1370 {
}
movieClip 1373 {
frame 1 {
this.levelSect.setTextFormat(_root.txtFormat2);
this.levelSect.embedFonts = true;
onEnterFrame = function () {
this.levelSect.text = Math.abs((_root.levelPos - -73) / 512);
};
}
}
movieClip 1375 {
}
movieClip 1377 {
}
movieClip 1379 {
}
movieClip 1380 createTools2 {
frame 1 {
if (_root.Level.Plat._width || _root.Level.Brick._width || _root.Level.Enemies._width || _root.Level.Coins._width || _root.Level.Misc._width) {
buttonFade = false;
} else {
buttonFade = true;
}
this.testBut._alpha = 100 - buttonFade * 100;
this.saveBut._alpha = 100 - buttonFade * 100;
this.nukeBut._alpha = 100 - buttonFade * 100;
onEnterFrame = function () {
if (_root.Level.Plat._width || _root.Level.Brick._width || _root.Level.Enemies._width || _root.Level.Coins._width || _root.Level.Misc._width) {
buttonFade = false;
} else {
buttonFade = true;
}
this.testBut._alpha -= (this.testBut._alpha - 100 + buttonFade * 100) / 5;
this.saveBut._alpha -= (this.saveBut._alpha - 100 + buttonFade * 100) / 5;
this.nukeBut._alpha -= (this.nukeBut._alpha - 100 + buttonFade * 100) / 5;
};
}
instance of movieClip 1370 {
onClipEvent (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
if (_root.levelSaved || this._parent.buttonFade) {
_root.quitToMenu();
} else {
_root.attachObject('');
_root.createTools.selChange(0);
_root.attachMovie('SMB2MessageEditor', 'SMB2Message', 10);
_root.SMB2MessageUp = true;
}
}
}
onClipEvent (load) {
boxFlip = false;
turnSpeed = 0;
}
onClipEvent (enterFrame) {
if (boxFlip) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
boxFlip = false;
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
}
}
instance of movieClip 1375 {
onClipEvent (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
if (_root.objectHolding == 'del') {
_root.attachObject('');
boxFlip = true;
} else {
_root.attachObject('del');
boxFlip = true;
}
}
}
onClipEvent (load) {
boxFlip = false;
turnSpeed = 0;
}
onClipEvent (enterFrame) {
if (boxFlip) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
boxFlip = false;
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
}
}
instance of movieClip 1377 {
onClipEvent (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
_root.attachObject('&');
_root.addLevel = true;
boxFlip = true;
}
}
onClipEvent (load) {
boxFlip = false;
turnSpeed = 0;
}
onClipEvent (enterFrame) {
if (boxFlip) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
boxFlip = false;
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
}
}
instance of movieClip 1379 {
onClipEvent (release) {
if (!_root.createOverlay && !_root.SMB2MessageUp && !_root.levelNuke) {
_root.attachObject('&');
_root.addLevel = false;
boxFlip = true;
}
}
onClipEvent (load) {
boxFlip = false;
turnSpeed = 0;
}
onClipEvent (enterFrame) {
if (boxFlip) {
++turnSpeed;
this._yscale -= turnSpeed * turnSpeed;
if (this._yscale < 0) {
boxFlip = false;
}
} else {
if (turnSpeed > 0) {
this._yscale += turnSpeed * turnSpeed;
--turnSpeed;
} else {
this._yscale = 100;
}
}
}
}
}
movieClip 1382 {
}
movieClip 1383 levelGrid {
}
movieClip 1384 levelCheck {
}
movieClip 1385 blackSquare {
}
movieClip 1387 deleteEraser {
}
movieClip 1392 ?BrickPart {
frame 1 {
stop();
rot = random(40) - 20;
fallDir = (_root.levelStyle == 3) ? -0.5 : 1;
ySpeed = fallDir * (random(20) - 15) / 5;
xSpeed = (random(20) - 10) / 2;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos - 3.333333333333334) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
gridPosY = 0;
gridPosX = 0;
brickBounce = false;
brickStop = false;
onEnterFrame = function () {
if (!_root.gamePause) {
this._x += xSpeed / 3 * (_root.slowDown + 1);
this._y += fallDir * ySpeed / 0.8 * (_root.slowDown + 1);
if (!brickStop) {
this._rotation += rot;
ySpeed += !_root.gamePause / (_root.slowDown + 1);
if (brickBounce || (gridPosY != int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16) || gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16))) {
if (ySpeed > 0 && (platHit(0, fallDir * 2) || brickHit(0, fallDir * 2))) {
if (brickBounce) {
brickStop = true;
ySpeed = 0;
} else {
this._y -= fallDir * ySpeed * 2 / 3 * (_root.slowDown + 1);
ySpeed = -ySpeed / 3;
brickBounce = true;
}
}
if (gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16)) {
if (platHit((xSpeed / Math.abs(xSpeed)) * 2, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0)) {
xSpeed = -xSpeed;
}
}
gridPosY = int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16);
gridPosX = int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16);
}
} else {
xSpeed = Math.abs(xSpeed) < 1 ? 0 : xSpeed / 2;
if (!platHit(0, fallDir * 2) && !brickHit(0, fallDir * 2)) {
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
}
}
if (this._y + this._parent._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -15) {
this.removeMovieClip();
}
};
}
}
movieClip 1393 KoopaShell {
frame 1 {
stop();
walkDir = 1;
onGround = false;
fallSpeed = -4;
enemyDead = true;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 10;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos - 3.333333333333334) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
bulletHit = function () {
walkDir = 1;
};
onEnterFrame = function () {
if (_root.gameStart) {
this.Koopa._xscale = -100 * walkDir;
if (!_root.gamePause) {
this._y += !_root.gamePause * fallSpeed / (_root.slowDown + 1);
this._x += (flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
if (onGround) {
fallSpeed = 0;
if (!platHit(8, 17) && !brickHit(8, 17)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
i = 0;
while (i < 2) {
if (platHit(8 + i * 8 * walkDir, 17) || brickHit(8 + i * 8 * walkDir, 17)) {
if (!(platHit(8 + i * 8 * walkDir, fallSpeed < 0 ? 12 : 17 - fallSpeed) || brickHit(8 + i * 8 * walkDir, fallSpeed < 0 ? 12 : 17 - fallSpeed))) {
for (;;) {
if (!(platHit(8 + i * 8 * walkDir, 17) || brickHit(8 + i * 8 * walkDir, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
fallSpeed = 0;
break;
}
}
++i;
}
}
i = 0;
while (i < 3) {
if (platHit((walkDir == 1) ? 16 : 0, 6 * i + 2) || platHit(8, 6 * i + 2)) {
this._x = (Math.round((this._x + 8 * walkDir) / 16) - ((walkDir == 1) ? 1 : -1)) * 16;
this._x += 2 * walkDir / 3;
walkDir = -walkDir;
_root.playSFX('SFXbump');
break;
} else {
if (brickHit((walkDir == 1) ? 16 : 0, 6 * i + 2) || brickHit(8, 6 * i + 2)) {
this._x = (Math.round((this._x + 8 * walkDir) / 16) - ((walkDir == 1) ? 1 : -1)) * 16;
this._x += 2 * walkDir / 3;
brickX = Math.round(this._x / 16) + ((walkDir == 1) ? 1 : -1);
brickY1 = int(thisY(0) / 48);
brickY2 = Math.round(thisY(0) / 48);
this._x = _root.Level.Brick[brickX + '-' + brickY1] + ((walkDir == 1) ? -16 : 16);
_root.Level.Brick[brickX + '-' + brickY1].brickHit(this, false);
_root.Level.Brick[brickX + '-' + brickY2].brickHit(this, false);
walkDir = -walkDir;
_root.playSFX('SFXbump');
break;
}
}
if (_root.Level.Enemies.hitTest(thisX((walkDir == 1) ? 16 : 0), thisY(8 * i), true)) {
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this)) {
_root.Level.Enemies[v3].bulletHit();
break;
}
}
}
++i;
}
}
if (_root.gamePause) {
this.Koopa.stop();
} else {
this.Koopa.play();
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Koopa.stop();
}
};
}
}
movieClip 1394 ParakoopaShell {
frame 1 {
stop();
walkDir = 1;
onGround = false;
fallSpeed = -4;
enemyDead = true;
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 10 + 10;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
bulletHit = function () {
walkDir = 1;
};
onEnterFrame = function () {
if (_root.gameStart) {
this.Koopa._xscale = -100 * walkDir;
if (!_root.gamePause) {
this._y += !_root.gamePause * fallSpeed / (_root.slowDown + 1);
this._x += (flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
if (onGround) {
fallSpeed = 0;
if (!platHit(8, 17) && !brickHit(8, 17)) {
onGround = false;
}
} else {
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
i = 0;
while (i < 2) {
if (platHit(8 + i * 8 * walkDir, 17) || brickHit(8 + i * 8 * walkDir, 17)) {
if (!(platHit(8 + i * 8 * walkDir, fallSpeed < 0 ? 12 : 17 - fallSpeed) || brickHit(8 + i * 8 * walkDir, fallSpeed < 0 ? 12 : 17 - fallSpeed))) {
for (;;) {
if (!(platHit(8 + i * 8 * walkDir, 17) || brickHit(8 + i * 8 * walkDir, 17))) break;
this._y -= 4;
}
this._y = 3.333333333333334 + 16 * Math.round((this._y - 3.333333333333334) / 16);
onGround = true;
fallSpeed = 0;
break;
}
}
++i;
}
}
i = 0;
while (i < 3) {
if (platHit((walkDir == 1) ? 16 : 0, 6 * i + 2) || platHit(8, 6 * i + 2)) {
this._x = (Math.round((this._x + 8 * walkDir) / 16) - ((walkDir == 1) ? 1 : -1)) * 16;
this._x += 2 * walkDir / 3;
walkDir = -walkDir;
_root.playSFX('SFXbump');
break;
} else {
if (brickHit((walkDir == 1) ? 16 : 0, 6 * i + 2) || brickHit(8, 6 * i + 2)) {
this._x = (Math.round((this._x + 8 * walkDir) / 16) - ((walkDir == 1) ? 1 : -1)) * 16;
this._x += 2 * walkDir / 3;
brickX = Math.round(this._x / 16) + ((walkDir == 1) ? 1 : -1);
brickY1 = int(thisY(0) / 48);
brickY2 = Math.round(thisY(0) / 48);
this._x = _root.Level.Brick[brickX + '-' + brickY1] + ((walkDir == 1) ? -16 : 16);
_root.Level.Brick[brickX + '-' + brickY1].brickHit(this, false);
_root.Level.Brick[brickX + '-' + brickY2].brickHit(this, false);
walkDir = -walkDir;
_root.playSFX('SFXbump');
break;
}
}
if (_root.Level.Enemies.hitTest(thisX((walkDir == 1) ? 16 : 0), thisY(8 * i), true)) {
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this)) {
_root.Level.Enemies[v3].bulletHit();
break;
}
}
}
++i;
}
}
if (_root.gamePause) {
this.Koopa.stop();
} else {
this.Koopa.play();
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
if (thisX(0) >= 1000 && enemyDead) {
this.removeMovieClip();
}
} else {
this.Koopa.stop();
}
};
}
}
button 1395 {
on (release) {
if (!_root.SMB2MessageUp) {
this._parent.CharAbSel.portraitReset('Bullet');
}
}
}
button 1396 {
on (release) {
if (!_root.SMB2MessageUp) {
this._parent.CharAbSel.portraitReset('Ability');
}
}
}
button 1398 {
on (release) {
_root.nextLevel();
}
}
movieClip 1399 {
}
movieClip 1400 pauseMenu1 {
frame 1 {
tempBullet = _root.bulletNo;
tempAbility = _root.abilityNo;
changeOptions = false;
onEnterFrame = function () {
if (CharAbSel.selectType == '') {
if (changeOptions) {
pauseButtons._y -= (pauseButtons._y + 360) / 4;
pauseOptions._y -= (pauseOptions._y - 100) / 4;
volControls._y -= (volControls._y - 279) / 4;
} else {
pauseButtons._y -= (pauseButtons._y - 160) / 4;
pauseOptions._y -= (pauseOptions._y - 500) / 4;
volControls._y -= (volControls._y - 679) / 4;
}
} else {
pauseButtons._y -= (pauseButtons._y - 560) / 4;
}
};
}
}
movieClip 1403 PBrickPart {
frame 1 {
stop();
rot = random(40) - 20;
fallDir = (_root.levelStyle == 3) ? -0.5 : 1;
ySpeed = fallDir * (random(20) - 15) / 5;
xSpeed = (random(20) - 10) / 2;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos - 3.333333333333334) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
gridPosY = 0;
gridPosX = 0;
brickBounce = false;
brickStop = false;
onEnterFrame = function () {
if (!_root.gamePause) {
this._x += xSpeed / 3 * (_root.slowDown + 1);
this._y += fallDir * ySpeed / 0.8 * (_root.slowDown + 1);
if (!brickStop) {
this._rotation += rot;
ySpeed += !_root.gamePause / (_root.slowDown + 1);
if (brickBounce || (gridPosY != int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16) || gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16))) {
if (ySpeed > 0 && (platHit(0, fallDir * 2) || brickHit(0, fallDir * 2))) {
if (brickBounce) {
brickStop = true;
ySpeed = 0;
} else {
this._y -= fallDir * ySpeed * 2 / 3 * (_root.slowDown + 1);
ySpeed = -ySpeed / 3;
brickBounce = true;
}
}
if (gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16)) {
if (platHit((xSpeed / Math.abs(xSpeed)) * 2, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0)) {
xSpeed = -xSpeed;
}
}
gridPosY = int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16);
gridPosX = int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16);
}
} else {
xSpeed = Math.abs(xSpeed) < 1 ? 0 : xSpeed / 2;
if (!platHit(0, fallDir * 2) && !brickHit(0, fallDir * 2)) {
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
}
}
if (this._y + this._parent._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -15) {
this.removeMovieClip();
}
};
}
}
movieClip 1407 {
frame 9 {
this._parent.removeMovieClip();
}
}
movieClip 1408 coinEffect {
frame 1 {
_root.playSFX('SFXcoin');
onEnterFrame = function () {
if (!_root.gamePause) {
this.Effect.play();
} else {
this.Effect.stop();
}
};
}
}
movieClip 1411 PokeyBody {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause || !_root.gameStart) {
stop();
} else {
play();
}
};
}
}
movieClip 1412 PokeyHit {
frame 1 {
stop();
this.Pokey.stop();
walkDir = 1;
onGround = true;
fallSpeed = -4;
enemyDead = true;
if (partPokey == partHit) {
flingSpeed = _root.BulletSpeed[_root.bulletNo] * 4 + 6;
} else {
flingSpeed = random(6) - 3;
}
rotSpeed = random(15) + 12;
prevX = Math.round((_root.heldObject._x - _root.Level._x) / 32);
prevY = (_root.heldObject._y - _root.Level._y - 7) / 32 + (_root.heldObject._yscale < 0 ? -1 : 0);
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._xscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
brickHitCreate = function (xPos, yPos) {
return _root.Level.Brick.hitTest(thisX(xPos), thisY(yPos), true);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
this._y += !_root.gamePause * fallSpeed * 1.5 / 3 * (_root.slowDown + 1);
this._x += (!_root.gamePause * flingSpeed * walkDir - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
this.Pokey._rotation += rotSpeed / (_root.slowDown + 1);
fallSpeed += !_root.gamePause / (_root.slowDown + 1);
if (fallSpeed > 0 && (platHit(8, 12) || brickHit(8, 12))) {
fallSpeed = -fallSpeed / 2;
rotSpeed /= 1.3;
flingSpeed /= 1.1;
this._y -= fallDir * ySpeed * 2;
}
if (platHit((walkDir == 1) ? 16 : 0, 8) || brickHit((walkDir == 1) ? 16 : 0, 8)) {
walkDir = -walkDir;
}
}
if (this._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -50) {
this.removeMovieClip();
}
if (thisX(0) >= 1000) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1417 savedDataNames {
frame 1 {
fileText.setTextFormat(_root.txtFormat2);
fileText.embedFonts = true;
levelText.setTextFormat(_root.txtFormat2);
levelText.embedFonts = true;
}
}
movieClip 1419 SMASArrow {
}
movieClip 1420 {
}
movieClip 1422 {
}
movieClip 1423 Hammer {
frame 1 {
_root.playSFX('SFXhammer');
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(48) < 0) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (!_root.gamePause) {
this.hammer._rotation += 25 / (_root.slowDown + 1);
this._x += (xSpeed - _root.levelScrollPause * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9)) / 3 * (_root.slowDown + 1);
ySpeed += !_root.gamePause / (_root.slowDown + 1);
this._y += !_root.gamePause * ySpeed * 1.5 / 3 * (_root.slowDown + 1);
if (_root.gameStart) {
if (!_root.gamePause) {
if (_root.Bullet.BulletHit.hitTest(this.hammerCheck) && _root.Bullet._alpha == 100) {
_root.bulletDead();
}
}
if (thisX(48) < 0) {
this.removeMovieClip();
}
}
}
};
}
}
button 1424 {
on (release) {
_root.levelOverlay.overlayState = 2;
}
}
button 1427 {
on (release) {
_root.gameLoaded = false;
_root.levelCodeCalc();
_root.testLevel();
}
}
movieClip 1433 {
frame 1 {
this.bulletName.setTextFormat(_root.txtFormat);
this.bulletName.embedFonts = true;
this.abilityName.setTextFormat(_root.txtFormat);
this.abilityName.embedFonts = true;
_root.bulletNo = 1;
_root.abilityNo = 1;
j = 0;
while (j < 2) {
if (j) {
k = 'Bullet';
} else {
k = 'Ability';
}
this.createEmptyMovieClip(k, j);
i = 0;
while (i < 9) {
this[k].attachMovie(k + 'IconCreation', 'Icon' + i, i);
this[k]['Icon' + i]._x = 82 + 64 * (i % 3) - j * 300;
this[k]['Icon' + i]._y = -78 + 64 * int(i / 3);
if (_root[k + 'Unlock'][i + 1]) {
this[k]['Icon' + i].gotoAndStop(i + 1);
} else {
this[k]['Icon' + i].gotoAndStop(this[k]['Icon' + i]._totalframes);
}
this[k]['Icon' + i].onRelease = function () {
if (this._currentframe != this._totalframes) {
_root[this._parent._name.toLowerCase() + 'No'] = this._currentframe;
}
};
++i;
}
if (k == 'Bullet') {
i = 9;
while (i < 15) {
if (_root[k + 'Unlock'][i + 1]) {
this[k].attachMovie(k + 'IconCreation', 'Icon' + i, i);
this[k]['Icon' + i]._x = 82 + 64 * int(i / 3) - j * 300 - int(i / 12) * 320;
this[k]['Icon' + i]._y = -78 + 64 * (i % 3);
this[k]['Icon' + i].gotoAndStop(i + 1);
this[k]['Icon' + i].onRelease = function () {
if (this._currentframe != this._totalframes) {
_root[this._parent._name.toLowerCase() + 'No'] = this._currentframe;
}
};
}
++i;
}
}
++j;
}
onEnterFrame = function () {
j = 0;
while (j < 2) {
if (j) {
k = 'Bullet';
} else {
k = 'Ability';
}
i = 0;
while (i < 15) {
if (_root[k.toLowerCase() + 'No'] == i + 1) {
this[k]['Icon' + i]._xscale += (150 - this[k]['Icon' + i]._xscale) / 5;
this[k]['Icon' + i]._yscale += (150 - this[k]['Icon' + i]._xscale) / 5;
} else {
this[k]['Icon' + i]._xscale += (100 - this[k]['Icon' + i]._xscale) / 5;
this[k]['Icon' + i]._yscale += (100 - this[k]['Icon' + i]._xscale) / 5;
}
++i;
}
if (j) {
this[k.toLowerCase() + 'Name'].text = _root.BulletName[_root[k.toLowerCase() + 'No']];
} else {
this[k.toLowerCase() + 'Name'].text = _root.AbilityName[_root[k.toLowerCase() + 'No']];
}
++j;
}
};
}
}
movieClip 1434 {
frame 1 {
this.createEmptyMovieClip('levelNames', 1);
i = 0;
while (i < 26) {
this.levelNames.attachMovie('CsavedDataNames', i, i);
this.levelNames[i]._x = 0;
this.levelNames[i]._y = -4 + i * 37;
this.levelNames[i].fileNo.text = chr(65 + i);
this.levelNames[i].levelName.text = _root.customLevelNames[i + 1].toUpperCase();
this.levelNames[i].levelNameInput.text = _root.customLevelNames[i + 1].toUpperCase();
this.levelNames[i].fileNo.setTextFormat(_root.txtFormat2);
this.levelNames[i].fileNo.embedFonts = true;
this.levelNames[i].levelName.setTextFormat(_root.txtFormat2);
this.levelNames[i].levelName.embedFonts = true;
this.levelNames[i].levelNameInput.setTextFormat(_root.txtFormat2);
this.levelNames[i].levelNameInput.embedFonts = true;
this.levelNames[i].levelButton.onRelease = function () {
if (!levelChosen) {
trace('yay');
levelChosen = this._parent._name / 1 + 1;
_root.levelCreateBase(_root.levelOverlay.savedData.levelNames[this._parent._name / 1].levelDisplay, _root.Level_customLevel[this._parent._name / 1 + 1], 'levelDisplay', '', 1, 1);
_root.levelOverlay.savedData.levelNames[this._parent._name / 1].levelDisplay.savedBack.gotoAndStop(int(_root.levelStyle / 1 + 1));
this._parent.levelStats.levelAnalysis();
this._parent.levelNameInput.text = '';
this._parent.levelSavedSplash = false;
}
};
++i;
}
maskScale = 0;
filePart = 0;
levelChosen = 0;
this.attachMovie('SMASArrow', 'SLUp', 2);
this.attachMovie('SMASArrow', 'SLDown', 3);
SLUp._y = 15;
SLDown._y = 297;
SLDown._x = 290;
SLUp._x = 290;
SLUp._yscale = 66.66666666666667;
SLUp._xscale = 66.66666666666667;
SLDown._yscale = 66.66666666666667;
SLDown._xscale = 66.66666666666667;
SLUp._rotation = -90;
SLDown._rotation = -90;
SLDown._xscale = -SLDown._yscale;
SLUp.onRelease = function () {
if (filePart) {
--filePart;
}
};
SLDown.onRelease = function () {
if (filePart < 3) {
++filePart;
}
};
this.attachMovie('createBack', 'createBack', 4);
createBack._y = 297;
createBack._x = -306;
createBack.onRelease = function () {
if (!levelChosen) {
_root.levelStyle = _root.Level_Custom.substring(0, 1);
this._parent._parent.overlayState = 2;
} else {
filePart = int((levelChosen - 1) / 6);
if (filePart == 4) {
filePart = 3;
}
levelChosen = 0;
}
};
onEnterFrame = function () {
i = 0;
while (i <= 26) {
if (levelChosen > i) {
levelNames[i]._y += (-189 + i * 37 - levelNames[i]._y) / 5;
} else {
levelNames[i]._y += (-4 + i * 37 - levelNames[i]._y) / 5;
}
if (levelChosen == i + 1) {
levelNames[i].Underline._y += (222 - levelNames[i].Underline._y) / 5;
levelNames[i].levelMask._yscale += (100 - levelNames[i].levelMask._yscale) / 5;
levelNames[i].levelButton._y = (-300 - levelNames[i].levelButton._y) / 5;
levelNames[i].levelNameInput.text = levelNames[i].levelNameInput.text.toUpperCase();
} else {
levelNames[i].Underline._y += (37 - levelNames[i].Underline._y) / 5;
levelNames[i].levelMask._yscale += (1.081081081081081 - levelNames[i].levelMask._yscale) / 5;
levelNames[i].levelButton._y = (2 - levelNames[i].levelButton._y) / 5;
}
++i;
}
if (levelChosen) {
createBack._y += (205 - createBack._y) / 5;
} else {
createBack._y += (297 - createBack._y) / 5;
}
levelNames._y += ((levelChosen ? 185 - (levelChosen - 1) * 37 : -filePart * 222) - levelNames._y) / 5;
};
}
}
button 1438 {
on (release) {
if (_root.customLevelNames[0] == '') {
_root.customLevelNames[0] = 'Unnamed Level';
}
_root.levelOverlay.overlayState = 2;
}
}
button 1440 {
on (release) {
if (levelName.text != '') {
_root.customLevelNames[0] = levelName.text.toUpperCase();
} else {
_root.customLevelNames[0] = 'Unnamed Level';
}
_root.levelOverlay.overlayState = 2;
}
}
movieClip 1444 levelOverlay {
frame 1 {
stop();
resetVariables = function () {
dropSpeed = 26;
overlayState = -1;
};
dropOverlay = function (frame) {
if (this._currentframe != frame) {
dropSpeed = int((-1 + Math.sqrt(1 + (36 - this._y) * 8)) / 2);
overlayState = 0;
this.gotoAndStop(frame);
}
};
resetVariables();
onEnterFrame = function () {
levelName.text = levelName.text.toUpperCase();
if (!overlayState) {
this._y += dropSpeed;
--dropSpeed;
if (!dropSpeed) {
overlayState = 1;
}
} else {
if (overlayState == 1) {
switch (this._currentframe) {
case 1:
break;
case 2:
break;
break;
case 3:
case 4:
_root.Level_Custom = _root.levelStyle;
_root.levelRestart();
overlayState = 2;
break;
case 5:
_root.levelCodeCalc();
_root['Level_' + _root.levelNo] = _root.levelStyle + ((_root['Level_' + _root.levelNo].substr(1) == undefined) ? '' : _root['Level_' + _root.levelNo].substr(1));
if (_root.levelStyle == 3) {
_root.c = new Color(_root.Level);
_root.c.setTint(0, 35, 255, 35);
} else {
_root.c.setTint(0, 0, 0, 0);
}
_root.createTools.createStyle.selChange2(_root.levelStyle);
_root.levelRestart();
overlayState = 2;
}
} else {
if (overlayState == 2) {
_root.levelStyle = _root.Background._currentframe - 1;
this._y += dropSpeed;
--dropSpeed;
if (dropSpeed <= -27) {
resetVariables();
this.gotoAndStop(1);
}
}
}
}
if (overlayState == -1) {
_root.createOverlay = false;
} else {
_root.createOverlay = true;
}
};
}
frame 6 {
levelName.restrict = 'A-Z 0-9';
levelName.setTextFormat(_root.txtFormat);
levelName.embedFonts = true;
levelName.text = _root.customLevelNames[0];
}
}
button 1451 {
on (release) {
if (!_root.createOverlay) {
if (_root.levelPos - 512 < 0) {
_root.levelPos -= 512;
}
}
}
}
button 1452 {
on (release) {
if (!_root.createOverlay) {
if (_root.levelPos + 512 < 0) {
_root.levelPos += 512;
}
}
}
}
button 1455 {
on (release) {
if (!_root.createOverlay) {
i = 0;
while (i < 4) {
if (_root.levelPos - 512 < 0) {
_root.levelPos -= 512;
}
++i;
}
}
}
}
button 1456 {
on (release) {
if (!_root.createOverlay) {
i = 0;
while (i < 4) {
if (_root.levelPos + 512 < 0) {
_root.levelPos += 512;
}
++i;
}
}
}
}
button 1459 {
on (release) {
if (!_root.createOverlay) {
_root.levelPos = -73 - 512 * int((Math.round(_root.Level._width / 32) - 9) / 16);
}
}
}
button 1460 {
on (release) {
if (!_root.createOverlay) {
_root.levelPos = -73;
}
}
}
movieClip 1461 createWindow {
frame 1 {
levelName._alpha = 80;
levelName.setTextFormat(_root.txtFormat2);
levelName.embedFonts = true;
onEnterFrame = function () {
levelName.text = _root.customLevelNames[0].toUpperCase();
};
}
}
movieClip 1462 {
}
movieClip 1471 createSaveBackground {
frame 1 {
stop();
}
}
movieClip 1472 {
}
movieClip 1474 {
frame 1 {
amountNo.setTextFormat(_root.txtFormat2);
amountNo.embedFonts = true;
}
}
movieClip 1480 {
frame 1 {
levelAnalysis = function () {
k = 0;
i = 0;
for (var v3 in this._parent.levelDisplay.levelDisplay.Plat) {
++i;
}
this.platNo.amountNo.text = i;
k += i;
i = 0;
for (v3 in this._parent.levelDisplay.levelDisplay.Brick) {
++i;
}
this.brickNo.amountNo.text = i;
k += i;
i = 0;
for (v3 in this._parent.levelDisplay.levelDisplay.Enemies) {
++i;
}
this.enemiesNo.amountNo.text = i;
k += i;
i = 0;
for (v3 in this._parent.levelDisplay.levelDisplay.Coins) {
++i;
}
this.coinsNo.amountNo.text = i;
k += i;
i = 0;
for (v3 in this._parent.levelDisplay.levelDisplay.Misc) {
++i;
}
this.checkNo.amountNo.text = i;
k += i;
if (k >= 500) {
_root.medalUnlock('MEDAL_GIANT_LEVEL');
}
};
}
}
movieClip 1482 {
frame 1 {
stop();
}
}
button 1484 {
on (release) {
this.saveText.gotoAndStop(2);
_root.levelSaved = true;
_root.levelStyle = _root.Level_Custom.substring(0, 1);
_root.levelCodeCalc();
_root.levelRestart();
_root.levelImpossibleCheck();
_root.customLevelNames[this._name / 1 + 1] = _root.customLevelNames[0].toUpperCase();
_root.Level_customLevel[this._name / 1 + 1] = _root.Level_Custom;
this.levelName.text = _root.customLevelNames[this._name / 1 + 1];
_root.levelCreateBase(_root.levelOverlay.savedData.levelNames[this._name / 1].levelDisplay, _root.Level_customLevel[this._name / 1 + 1], 'levelDisplay', '', 1, 1);
_root.levelOverlay.savedData.levelNames[this._name / 1].levelDisplay.savedBack.gotoAndStop(int(_root.levelStyle / 1 + 1));
this.levelStats.levelAnalysis();
this.levelSavedSplash = true;
if (int((_root.levelOverlay.savedData.levelNames[this._name / 1].levelDisplay.levelDisplay._width - 496) / 256) >= 150) {
_root.medalUnlock('MEDAL_LONG_LEVEL');
}
_root.saveLevel();
this.saveText.gotoAndStop(1);
}
}
movieClip 1487 {
}
movieClip 1488 {
}
movieClip 1489 CsavedDataNames {
}
movieClip 1504 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 1506 BG5 {
}
movieClip 1507 {
}
movieClip 1508 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 1509 BG6 {
}
movieClip 1510 BG7 {
}
movieClip 1513 {
}
movieClip 1514 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 1515 BG8 {
}
movieClip 1516 BG9 {
}
movieClip 1520 Bullet5 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 1524 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 1525 Bullet6 {
frame 1 {
i = 0;
while (i < 5) {
this._parent.attachMovie('chompChain', i, i + 5);
if (!i) {
this.i._alpha = 0;
}
++i;
}
}
}
movieClip 1526 Bullet9 {
}
movieClip 1532 {
frame 1 {
if (this._parent._alpha != 100) {
this._yscale = 0;
this._xscale = 0;
stop();
}
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 1533 Bullet8 {
}
movieClip 1535 Bullet7 {
}
movieClip 1538 {
frame 1 {
stop();
}
}
movieClip 1539 BulletIntro6 {
frame 20 {
_root.playSFX('SFXbump');
}
frame 39 {
_root.playSFX('SFXchomp');
}
frame 81 {
_root.introAniFinish = true;
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
}
frame 85 {
this.removeMovieClip();
}
}
movieClip 1540 BulletIntro9 {
frame 25 {
_root.introAniFinish = true;
_root.playSFX('SFXcannon');
}
frame 31 {
this.removeMovieClip();
}
}
movieClip 1553 BulletIntro5 {
frame 64 {
_root.playSFX('SFXpowerup');
}
frame 69 {
_root.introAniFinish = true;
}
frame 76 {
this.removeMovieClip();
}
}
movieClip 1556 {
}
movieClip 1563 {
}
movieClip 1566 {
}
movieClip 1568 BulletIntro7 {
frame 33 {
_root.introAniFinish = true;
_root.playSFX('SFXbirdo');
}
frame 39 {
this.removeMovieClip();
}
}
movieClip 1573 {
}
movieClip 1575 BulletIntro8 {
frame 28 {
_root.playSFX('SFXhurt');
}
frame 35 {
_root.camShake += 100;
_root.playSFX('SFXbomb');
}
frame 53 {
_root.introAniFinish = true;
}
frame 54 {
this.removeMovieClip();
}
}
movieClip 1577 chompChain {
frame 1 {
stop();
this._x = -28 * (this._name / 1) - 36;
this._y = 0;
yPar = _root.Bullet._y;
yPrev = 0;
onEnterFrame = function () {
if (_root.abilityUsage) {
if (_root.abilityNo == 9) {
if (!(_root.abilityMeter % 3)) {
cs = new Color(this);
if (!(_root.abilityMeter % 9)) {
cs.setTint(0, 0, 255, 35);
} else {
if (!((_root.abilityMeter + 3) % 9)) {
cs.setTint(0, 255, 0, 35);
} else {
cs.setTint(255, 0, 0, 35);
}
}
}
if (!_root.abilityMeter) {
cs = new Color(this);
cs.setTint(0, 0, 0, 0);
}
}
} else {
if (!_root.banzaiSwitch) {
cs = new Color(this);
cs.setTint(0, 0, 0, 0);
}
}
if (!_root.gamePause) {
yPrev = _root.Bullet._y - yPar;
if (!(this._name / 1)) {
yPrev = _root.Bullet._y - yPar;
} else {
nameVal = this._name / 1 - 1;
yPrev += this._parent[nameVal].yPrev;
}
this._x = -28 * (this._name / 1) - 36 + Math.abs(yPrev / 4);
this._y = -yPrev;
yPar = _root.Bullet._y;
}
};
}
}
movieClip 1590 {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
}
movieClip 1591 {
frame 17 {
stop();
}
}
movieClip 1592 Ability2 {
frame 1 {
stop();
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
Explode = function () {
_root.Level.Particles.attachMovie('levelExplosion', this._name + '~', _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name + '~']._x = this._x;
_root.Level.Particles[this._name + '~']._y = this._y;
this.removeMovieClip();
};
onEnterFrame = function () {
if (!_root.gamePause) {
r += 15;
r %= 360;
this._x = (-_root.Level._x + _root.Bullet._x + (_root.Bullet.BulletHit._width + 8) * Math.sin(Math.PI * r / 180) + !_root.gamePause * !_root.levelScrollPause * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * 9 + 9) / (_root.slowDown + 1)) / 3;
this._y = (_root.Bullet._y + (_root.Bullet.BulletHit._height + 8) * Math.cos(Math.PI * r / 180)) / 3;
if (platHit(8, 0) || brickHit(8, 0)) {
Explode();
}
if (platHit(-8, 0) || brickHit(-8, 0)) {
Explode();
}
if (platHit(0, 8) || brickHit(0, 8)) {
Explode();
}
if (platHit(0, -8) || brickHit(0, -8)) {
Explode();
}
if (_root.gameRestart || _root.gameFinished || !_root.abilityUsage) {
Explode();
}
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this) && v3 != this._name) {
Explode();
}
}
}
};
}
}
movieClip 1600 {
}
movieClip 1601 abilityHUD {
frame 1 {
abIcon.gotoAndStop(_root.abilityNo);
abBoarder.stop();
onEnterFrame = function () {
if (_root.cheatAbility) {
abBoarder.gotoAndStop(abBoarder._totalframes);
} else {
if (_root.abilityUsage && _root.abilityNo == 5) {
abBoarder.gotoAndStop(_root.abilityTimer < 72 ? 160 - 160 * _root.abilityTimer / 72 : 1);
} else {
if (!_root.timeRewind) {
abBoarder.gotoAndStop(_root.abilityMeter ? _root.abilityMeter : 1);
} else {
abBoarder.gotoAndStop(1);
}
}
}
};
}
}
movieClip 1603 {
}
movieClip 1607 {
frame 7 {
this._parent.removeMovieClip();
}
}
movieClip 1608 Ability3 {
frame 1 {
stop();
_root.playSFX('SFXfireball');
this._x = (-_root.Level._x + _root.Bullet._x) / 3;
this._y = _root.Bullet._y / 3;
fireDir = _root.Bullet.Bullet._rotation / 3 + (random(40) - 20) / 10;
fireSpeed = _root.BulletSpeed[_root.bulletNo] * 15 + 15;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
Explode = function () {
_root.Level.Particles.attachMovie('levelExplosionFireball', this._name, _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
this.removeMovieClip();
};
onEnterFrame = function () {
if (!_root.gamePause) {
if (this._currentframe == 1) {
this._x += fireSpeed * Math.cos(Math.PI * fireDir / 180) / 3;
this._y += fireSpeed * Math.sin(Math.PI * fireDir / 180) / 3;
this.fireBall._rotation += 12;
if (platHit(4, 0) || brickHit(4, 0)) {
Explode();
}
if (platHit(-4, 0) || brickHit(-4, 0)) {
Explode();
}
if (platHit(0, 4) || brickHit(0, 4)) {
Explode();
}
if (platHit(0, -4) || brickHit(0, -4)) {
Explode();
}
if (_root.gameRestart || _root.gameFinished) {
Explode();
}
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].hitTest(this) && v3 != this._name) {
Explode();
}
}
} else {
if (this.Bobomb._currentframe == this.Bobomb._totalframes) {
this.removeMovieClip();
}
}
}
if (thisX(0) > 800) {
this.removeMovieClip();
}
if (thisY(0) > 520) {
this.removeMovieClip();
}
if (thisY(0) < -20) {
this.removeMovieClip();
}
};
}
}
movieClip 1610 BulletDead9 {
frame 8 {
_root.camShake += 100;
_root.playSFX('SFXbomb');
}
frame 24 {
stop();
}
}
movieClip 1612 BulletDead8 {
frame 1 {
_root.camShake += 100;
_root.playSFX('SFXbomb');
}
frame 26 {
stop();
}
}
movieClip 1617 starShine {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
frame 5 {
this.removeMovieClip();
}
}
movieClip 1620 {
}
movieClip 1621 {
}
movieClip 1622 BulletDead5 {
frame 1 {
_root.camShake += 30;
}
}
movieClip 1625 BulletDead6 {
}
movieClip 1626 BulletDead7 {
frame 24 {
stop();
}
}
movieClip 1631 abLightning {
frame 1 {
onEnterFrame = function () {
this._xscale = (100 / this._parent._xscale) * 100;
this._yscale = this._xscale;
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
frame 8 {
this.removeMovieClip();
}
}
movieClip 1632 BulletGhost {
frame 1 {
this.attachMovie('Bullet' + _root.bulletNo, 'Bullet', 1);
this.Bullet.gotoAndStop(_root.Bullet.Bullet._currentframe);
this._x = (-_root.Level._x + _root.Bullet._x + (random(1000) - 500) / 75) / 3;
this._y = (_root.Bullet._y + (random(1000) - 500) / 75) / 3;
this._yscale = 33.33333333333334;
this._xscale = 33.33333333333334;
this._rotation = _root.Bullet.Bullet._rotation;
this._alpha = 60;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
onEnterFrame = function () {
if (!_root.gamePause) {
this._alpha -= this._alpha / 10;
if (thisX(0) < -100) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1636 lakituPrison {
frame 1 {
cageLeave = false;
flySpeed = 0;
if (!_root.BulletUnlock[_root.StageNo / 4 + 1]) {
this.attachMovie('BulletUnlock' + (_root.StageNo / 4 + 1), 'bulletUnlock', 1);
} else {
this.attachMovie('BulletUnlock1', 'bulletUnlock', 1);
}
bulletUnlock._x = 0;
bulletUnlock._y = 277;
bulletUnlock.stop();
this.attachMovie('prisonDoor', 'prisonDoor', 2);
prisonDoor._x = 0;
prisonDoor._y = 278.5;
onEnterFrame = function () {
if (!cageLeave) {
this._y -= this._y / 5;
if (!int(this._y)) {
_root.score += 5000;
cageLeave = true;
_root.playSFX('SFXunlock');
bulletUnlock.play();
_root.keyPrison.gotoAndStop(2);
}
}
if (cageLeave) {
if (this._y > -500) {
this.prisonDoor._rotation += 5;
this.prisonDoor._y += flySpeed * 2.5;
this.bulletUnlock._y += flySpeed;
this._y -= flySpeed;
++flySpeed;
}
if (this.bulletUnlock._currentframe == this.bulletUnlock._totalframes) {
this.bulletUnlock.stop();
}
}
if (this._y < -500 && this.bulletUnlock._currentframe == this.bulletUnlock._totalframes) {
_root.keyUnlock = false;
this.removeMovieClip();
}
};
}
}
movieClip 1637 BulletUnlock1 {
frame 1 {
stop();
}
}
movieClip 1639 prisonDoor {
}
movieClip 1642 {
}
movieClip 1647 BulletUnlock2 {
frame 18 {
_root.camShake += 20;
_root.playSFX('SFXbump');
_root.playSFX('SFXsuperstomp');
}
frame 61 {
stop();
}
}
movieClip 1648 {
}
movieClip 1652 {
}
movieClip 1654 {
}
movieClip 1655 BulletUnlock3 {
frame 51 {
_root.camShake += 25;
_root.playSFX('SFXshyguy2');
}
}
movieClip 1657 Phantos {
frame 1 {
stop();
onGround = true;
attackSpeed = -11;
attackDir = 0;
this._y = random(10) * 16 + 3.333333333333334;
this._x = 252 - _root.Level._x / (_root.Level._xscale / 100);
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
bulletHit = function () {
if (this.hitTest(_root.Bullet.BulletHit)) {
if (!_root.POWEffect) {
_root.bulletDead();
}
}
};
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (_root.gameStart) {
if (this._currentframe == 1) {
if (!_root.gamePause) {
++attackSpeed;
if (attackSpeed >= 0) {
attackDir = thisY(-_root.Bullet._y / 3 + 8) / thisX(-_root.Bullet._x / 3 - 8);
if (attackDir > 0.6) {
attackDir = 0.6;
}
if (attackDir < -0.6) {
attackDir = -0.6;
}
}
this._y -= attackDir * attackSpeed * (thisX(-_root.Bullet._x / 3 - 8) > 0 ? 1 : -1) / 3;
this._x -= Math.abs(attackSpeed) / 2;
}
if (thisX(0) < -50) {
attackSpeed = -11;
attackDir = 0;
this._y = random(10) * 16 + 3.333333333333334;
this._x = 252 - _root.Level._x / (_root.Level._xscale / 100);
}
if (_root.gameFinished || !_root.keyUnlock) {
this.gotoAndStop(2);
}
} else {
if (this._currentframe == 2 && this.smoke._currentframe == this.smoke._totalframes) {
this.removeMovieClip();
}
}
}
};
}
}
movieClip 1665 BulletUnlock11 {
frame 12 {
_root.camShake += 20;
_root.playSFX('SFXgrab');
}
}
movieClip 1669 {
}
movieClip 1670 BulletUnlock5 {
}
movieClip 1675 BulletUnlock6 {
frame 24 {
_root.camShake += 30;
}
}
movieClip 1676 BulletUnlock7 {
frame 12 {
_root.camShake += 5;
_root.playSFX('SFXbump');
}
}
movieClip 1678 {
}
movieClip 1680 {
}
movieClip 1681 BulletUnlock8 {
frame 24 {
_root.camShake += 10;
}
frame 42 {
_root.camShake += 20;
}
frame 57 {
_root.camShake += 10;
}
frame 70 {
_root.camShake += 30;
}
}
movieClip 1684 BulletUnlock9 {
frame 20 {
_root.camShake += 40;
_root.playSFX('SFXcannon');
}
}
movieClip 1685 levelExplosion {
frame 1 {
_root.camShake += 100;
brickY = Math.round(this._y / 16);
brickX = Math.round(this._x / 16);
this._x = brickX * 16;
this._y = brickY * 16;
if (brickX > 0) {
k = 0;
while (k < 9) {
if (brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3)) != this._name) {
_root.Level.Brick[brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3))].brickHit(this, true);
}
++k;
}
}
for (var j in _root.Level.Enemies) {
if (_root.Level.Enemies[j].hitTest(this) && j != this._name) {
_root.Level.Enemies[j].bulletHit();
}
}
for (var j in _root.Level.Plat) {
if (_root.Level.Plat[j].hitTest(this)) {
_root.Level.Plat[j].POWEffect();
}
}
_root.playSFX('SFXbomb');
onEnterFrame = function () {
if (_root.gamePause) {
this.Bobomb.stop();
} else {
this.Bobomb.play();
}
if (this.Bobomb._currentframe == this.Bobomb._totalframes) {
this.removeMovieClip();
}
};
}
}
movieClip 1690 {
frame 1 {
onEnterFrame = function () {
if (_root.gameStart) {
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
} else {
this.stop();
}
};
}
}
movieClip 1695 {
frame 1 {
stop();
onEnterFrame = function () {
if (!_root.gamePause) {
if (!switchScale) {
switchScale = true;
} else {
switchScale = false;
this._yscale = -this._yscale;
}
}
};
}
}
movieClip 1698 {
}
movieClip 1699 bossShip {
}
movieClip 1700 koopaKid {
frame 1 {
this.attachMovie('bossShip', 'bossShip', 1);
if (koopaNo == undefined) {
koopaNo = random(7) + 1;
}
if (this._name == 'heldObject') {
this.attachMovie('koopaKidIcon', 'koopaKid', 2);
} else {
this.attachMovie('koopaKid' + koopaNo, 'koopaKid', 2);
}
if (_root.Level._xscale != 300) {
this.bossShip.shipF._x = 0;
this.bossShip.shipF._alpha = 0;
if (!koopaNo) {
koopaKid.gotoAndStop(2);
koopaKid.Koopa.stop();
}
this.koopaKid._x = 186;
this.bossShip._x = 186;
this.koopaKid._y = 250;
this.bossShip._y = 250;
this._y = 3.333333333333334;
_root.Level.offLimits[this._name]._y = this._y;
} else {
koopaKid.gotoAndStop(5);
this.koopaKid._x = 960;
this.bossShip._x = 960;
this.koopaKid._y = 348;
this.bossShip._y = 348;
this._y = 0;
}
this.koopaKid._xscale = -100;
if (_root.Level._xscale == 300 && this._parent._name == 'Misc' && this._x * _root.Level._xscale / 100 + _root.Level._x < 0) {
this.removeMovieClip();
}
health = 3;
koopaJump = false;
bowserPound = false;
ballLaunch = false;
koopaGrav = 2.5 + koopaNo / 5 - health / 2.5;
fallSpeed = 0;
i = 0;
j = 0;
bossBattle = false;
easeIn = true;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
miscHit = function () {
if (this.koopaKid.hitTest(_root.Bullet.Bullet)) {
if (!_root.POWEffect) {
if (koopaKid._currentframe < 4) {
koopaKid.gotoAndStop(4);
_root.score += 1000;
_root.camShake += 50;
--health;
_root.playhitSFX(true);
if (!health) {
_root.bossDead = true;
if (koopaNo && koopaNo < 8) {
_root.Level.Misc.attachMovie('bossWand', this._name + '~', _root.Level.Misc.getNextHighestDepth());
_root.Level.Misc[this._name + '~']._x = koopaKid._x / 3 + this._x;
_root.Level.Misc[this._name + '~']._y = koopaKid._y / 3 + this._y - 16;
_root.Level.Misc[this._name + '~'].koopaName = this._name;
}
_root.playSFX('SFXbossdefeat');
}
koopaGrav = 2.5 + koopaNo / 5 - health / 2.5;
deathJump = true;
fallSpeed = 0;
}
}
}
if (this.koopaKid.hitTest(_root.Bullet.BulletHit)) {
if (koopaKid._currentframe >= 5) {
if (!_root.POWEffect) {
_root.bulletDead();
}
}
}
if (this.bossShip.shipM.hitTest(_root.Bullet.BulletHit) || this.bossShip.shipP.hitTest(_root.Bullet.BulletHit) || this.bossShip.shipF.hitTest(_root.Bullet.BulletHit)) {
_root.bulletDead();
}
};
floorCheck = function () {
return true;
};
onEnterFrame = function () {
if (this._name != 'heldObject') {
if (_root.gameStart) {
if (!_root.gamePause) {
if (!bossBattle) {
if (_root.gameStart && this._x * _root.Level._xscale / 100 + _root.Level._x < 0) {
_root.levelScrollPause = true;
bossBattle = true;
_root.bossDead = false;
_root.Level._x = -this._x * _root.Level._xscale / 100;
}
} else {
if (easeIn) {
if (koopaKid._currentframe == 5 && koopaNo) {
if (koopaKid.Koopa._currentframe == 1) {
_root.playSFX('SFXbossspin');
}
}
bossShip._x += (585 - this.bossShip._x) / 5 * (1 + _root.slowDown);
koopaKid._x = bossShip._x;
if (bossShip._x == 585) {
easeIn = false;
if (koopaNo == 8 || koopaNo == 9) {
bowserPound = true;
koopaKid.gotoAndStop(5);
} else {
koopaKid.gotoAndStop(3);
if ((koopaKid._xscale / 100) * koopaKid._x > (koopaKid._xscale / 100) * _root.Bullet._x) {
koopaKid._xscale = -koopaKid._xscale;
}
xBul = _root.Bullet._x;
yBul = _root.Bullet._y;
}
}
}
if (!easeIn) {
if (health) {
if (koopaKid._currentframe == 1) {
i += 1 / (_root.slowDown + 1);
if (i >= 37 - koopaNo * 5 + health * 2) {
if (random(2) && koopaNo || koopaNo == 3) {
if (random(2) && (koopaNo == 8 || koopaNo == 9)) {
bowserPound = true;
} else {
bowserPound = false;
}
koopaKid.gotoAndStop(5);
} else {
koopaKid.gotoAndStop(2);
}
i = 0;
}
}
if (koopaKid._currentframe == 2) {
if (koopaNo) {
i += 1 / (_root.slowDown + 1);
if (i >= 23 - koopaNo * 2.5 + health) {
koopaKid.gotoAndStop(3);
xBul = _root.Bullet._x;
yBul = _root.Bullet._y;
i = 0;
}
} else {
if (koopaKid.Koopa._currentframe == koopaKid.Koopa._totalframes) {
koopaKid.gotoAndStop(5);
}
}
}
if (koopaKid._currentframe == 3) {
if (koopaNo) {
if (koopaNo == 8) {
if (i == 3) {
_root.Level.Plat.attachMovie('bowserFire', this._name + (_root.Level.Plat.getNextHighestDepth() + 1), _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._x = this._x + (koopaKid._x + koopaKid._xscale / 2.2) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._y = this._y + (koopaKid._y - 65) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].xBul = _root.Bullet._x;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].yBul = _root.Bullet._y;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._xscale = koopaKid._xscale;
_root.playSFX('SFXflames');
}
} else {
if (koopaNo == 9) {
if (i == 3) {
_root.Level.Plat.attachMovie('wartBubble', this._name + (_root.Level.Plat.getNextHighestDepth() + 1), _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._x = this._x + (koopaKid._x + koopaKid._xscale / 2.2) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._y = this._y + (koopaKid._y - 65) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].xBul = _root.Bullet._x;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].yBul = _root.Bullet._y;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].koopaGrav = koopaGrav;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._xscale = koopaKid._xscale;
_root.playSFX('SFXwart');
}
} else {
if (koopaNo == 3) {
if (!i) {
_root.Level.Plat.attachMovie('wendyRing', this._name + (_root.Level.Plat.getNextHighestDepth() + 1), _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._x = this._x + (koopaKid._x + koopaKid._xscale / 1.5) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._y = this._y + (koopaKid._y - 40) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].xBul = xBul;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].yBul = yBul;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].bossName = this._name;
_root.playSFX('SFXbossmagic');
}
} else {
if (koopaNo == 6) {
if (!i) {
_root.Level.Plat.attachMovie('lemmyBall', this._name + (_root.Level.Plat.getNextHighestDepth() + 1), _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._x = this._x + (koopaKid._x + koopaKid._xscale / 1.5) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._y = this._y + (koopaKid._y - 40) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].xBul = xBul;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].yBul = yBul;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].koopaGrav = koopaGrav;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._xscale = koopaKid._xscale;
_root.playSFX('SFXbossmagic');
}
} else {
if (!(i % 3)) {
_root.Level.Plat.attachMovie('wandAttack', this._name + (_root.Level.Plat.getNextHighestDepth() + 1), _root.Level.Plat.getNextHighestDepth());
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._x = this._x + (koopaKid._x + koopaKid._xscale / 1.5) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()]._y = this._y + (koopaKid._y - 40) / 3;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].xBul = xBul;
_root.Level.Plat[this._name + _root.Level.Plat.getNextHighestDepth()].yBul = yBul;
_root.playSFX('SFXbossmagic');
}
}
}
}
}
i += 1 / (_root.slowDown + 1);
if (i == 8) {
koopaKid.gotoAndStop(1);
i = 0;
}
} else {
if (koopaKid.Koopa._currentframe == koopaKid.Koopa._totalframes) {
koopaKid.gotoAndStop(1);
i = 0;
}
}
}
if (koopaKid._currentframe == 4) {
if (koopaNo) {
koopaKid.Koopa._rotation += 3 / (_root.slowDown + 1);
}
koopaKid._y += (fallSpeed * 1.5 - 22) / (_root.slowDown + 1);
fallSpeed += 1 / (_root.slowDown + 1);
if (koopaKid._y > bossShip._y) {
_root.camShake += 20;
_root.playSFX('SFXthwomp');
koopaKid._y = bossShip._y;
koopaKid.gotoAndStop(5);
}
}
if (koopaKid._currentframe >= 5) {
if (koopaKid._currentframe == 5 && koopaNo) {
if (koopaKid.Koopa._currentframe == 1) {
_root.playSFX('SFXbossspin');
}
}
if (!bowserPound) {
if (!koopaJump) {
i += 1 / (_root.slowDown + 1);
if (i >= 30 - koopaNo * 4 + health * 2) {
koopaJump = true;
_root.playSFX('SFXjump');
xDif = koopaKid._x - (_root.Bullet._x > 30 ? (_root.Bullet._x < 720 ? _root.Bullet._x : 720) : 30);
yHit = _root.Bullet._y > 24 ? _root.Bullet._y : 24;
yDif = koopaKid._y - 24 - yHit;
fallSpeed = -int((-koopaGrav + Math.sqrt(koopaGrav * koopaGrav + 8 * koopaGrav * (koopaKid._y - 24))) / 2 * koopaGrav);
launchSpeed = Math.abs(fallSpeed * koopaGrav);
t = (launchSpeed + Math.sqrt(Math.abs(launchSpeed * launchSpeed - 2 * koopaGrav * yDif))) / koopaGrav;
flingSpeed = -xDif / t;
shipPos = koopaKid._x - bossShip._x;
dir = 1;
k = 0;
while (k <= Math.abs(-2 * (fallSpeed - 1))) {
shipPos += dir * flingSpeed;
if (bossShip._x + shipPos < 30 && dir * flingSpeed < 0 || bossShip._x + shipPos > 720 && dir * flingSpeed > 0) {
dir = -dir;
}
++k;
}
if (bossShip._x + shipPos < 165) {
shipPos += 165 - (bossShip._x + shipPos);
}
if (bossShip._x + shipPos > 585) {
shipPos -= bossShip._x + shipPos - 585;
}
if (shipPos < 0) {
this.bossShip.shipF.gotoAndStop(3);
} else {
this.bossShip.shipF.gotoAndStop(1);
}
cosGraph = fallSpeed;
shipSpeed = 0;
k = cosGraph;
while (k < -cosGraph) {
shipSpeed += Math.cos(Math.PI * ((k / cosGraph) * 90) / 180);
++k;
}
}
} else {
koopaKid._y += fallSpeed * koopaGrav / (_root.slowDown + 1);
koopaKid._x += flingSpeed / (_root.slowDown + 1);
bossShip._x += shipPos * Math.cos(Math.PI * ((-fallSpeed / cosGraph) * 90) / 180) / shipSpeed / (_root.slowDown + 1);
if (koopaKid._x < 30 && flingSpeed < 0 || koopaKid._x > 720 && flingSpeed > 0) {
flingSpeed = -flingSpeed;
}
i += Math.cos(Math.PI * ((-fallSpeed / cosGraph) * 90) / 180);
fallSpeed += 1 / (_root.slowDown + 1);
if (koopaKid._y > bossShip._y) {
_root.camShake += 20;
_root.playSFX('SFXthwomp');
koopaKid._y = bossShip._y;
koopaJump = false;
++j;
fallSpeed = 0;
this.bossShip.shipF.gotoAndStop(2);
if (j == deathJump ? ((koopaNo == 8 || koopaNo == 9) ? 2 : 3) : 1) {
j = 0;
i = 0;
if (koopaNo == 8 || koopaNo == 9) {
bowserPound = true;
koopaKid.gotoAndStop(5);
} else {
if (koopaNo == 3 && !deathJump) {
koopaKid.gotoAndStop(1);
if ((koopaKid._xscale / 100) * koopaKid._x > (koopaKid._xscale / 100) * _root.Bullet._x) {
koopaKid._xscale = -koopaKid._xscale;
}
} else {
koopaKid.gotoAndStop(3);
if ((koopaKid._xscale / 100) * koopaKid._x > (koopaKid._xscale / 100) * _root.Bullet._x) {
koopaKid._xscale = -koopaKid._xscale;
}
xBul = _root.Bullet._x;
yBul = _root.Bullet._y;
}
}
deathJump = false;
}
}
}
} else {
if (!koopaJump) {
i += 1 / (_root.slowDown + 1);
if (i >= 30 - koopaNo * 4 + health * 2) {
koopaJump = true;
_root.playSFX('SFXjump');
xDif = koopaKid._x - (_root.Bullet._x > 30 ? (_root.Bullet._x < 720 ? _root.Bullet._x : 720) : 30);
yHit = _root.Bullet._y > 24 ? _root.Bullet._y : 24;
yDif = koopaKid._y - 24 - yHit;
fallSpeed = -int((-koopaGrav + Math.sqrt(koopaGrav * koopaGrav + 8 * koopaGrav * (koopaKid._y - 24))) / 2 * koopaGrav);
t = -fallSpeed;
flingSpeed = -xDif / t;
shipPos = koopaKid._x - bossShip._x;
dir = 1;
k = 0;
while (k <= Math.abs(-fallSpeed)) {
shipPos += dir * flingSpeed;
if (bossShip._x + shipPos < 30 && dir * flingSpeed < 0 || bossShip._x + shipPos > 720 && dir * flingSpeed > 0) {
dir = -dir;
}
++k;
}
if (bossShip._x + shipPos < 165) {
shipPos += 165 - (bossShip._x + shipPos);
}
if (bossShip._x + shipPos > 585) {
shipPos -= bossShip._x + shipPos - 585;
}
if (shipPos < 0) {
this.bossShip.shipF.gotoAndStop(3);
} else {
this.bossShip.shipF.gotoAndStop(1);
}
cosGraph = fallSpeed;
shipSpeed = 0;
k = cosGraph;
while (k < -cosGraph) {
shipSpeed += Math.cos(Math.PI * ((k / cosGraph) * 90) / 180);
++k;
}
}
} else {
koopaKid._y += fallSpeed * koopaGrav / (_root.slowDown + 1);
koopaKid._x += flingSpeed / (_root.slowDown + 1);
bossShip._x += 2 * (shipPos * Math.cos(Math.PI * ((-fallSpeed / cosGraph) * 90) / 180) / shipSpeed) / (_root.slowDown + 1);
if (koopaKid._x < 30 && flingSpeed < 0 || koopaKid._x > 720 && flingSpeed > 0) {
flingSpeed = -flingSpeed;
}
i += Math.cos(Math.PI * ((-fallSpeed / cosGraph) * 90) / 180);
fallSpeed += 1 / (_root.slowDown + 1);
if (!fallSpeed) {
shipPos = 0;
this.bossShip.shipF.gotoAndStop(2);
flingSpeed = 0;
fallSpeed = 14 - health;
koopaKid.gotoAndStop(6);
}
if (koopaKid._y > bossShip._y) {
_root.camShake += 100;
_root.playSFX('SFXthwomp');
koopaKid._y = bossShip._y;
koopaJump = false;
bowserPound = false;
i = 0;
j = 0;
fallSpeed = 0;
this.bossShip.shipF.gotoAndStop(2);
koopaKid.gotoAndStop(1);
}
}
}
}
if (koopaKid._currentframe < 3) {
if ((koopaKid._xscale / 100) * koopaKid._x > (koopaKid._xscale / 100) * _root.Bullet._x) {
koopaKid._xscale = -koopaKid._xscale;
}
}
} else {
koopaKid.Koopa._rotation += 1.5;
koopaKid._y += (fallSpeed * 1.5 - 10) / (_root.slowDown + 1);
bossShip._y += fallSpeed * 1.5 / (_root.slowDown + 1);
fallSpeed += 1 / (_root.slowDown + 1);
if (koopaKid._y > 600) {
if (_root.Level.Misc[this._name + '~'] == undefined) {
_root.levelScrollPause = false;
}
this.removeMovieClip();
}
}
}
}
}
if (thisX(0) < -500) {
if (health) {
_root.allEnemies = false;
}
this.removeMovieClip();
}
if (!_root.gamePause && _root.gameStart) {
this.koopaKid.Koopa.play();
} else {
this.koopaKid.Koopa.stop();
}
}
} else {
koopaKid.gotoAndStop((int((_root._ymouse - (_root.levelGrid._y + 1)) / 32) * 32 + 49 - 16 * (_root.heldObject._yscale * 3 / 2 / 100) - _root.Level._y - 7) / 32 + (_root.heldObject._yscale < 0 ? -1 : 0) + 1);
}
};
}
}
movieClip 1704 {
frame 1 {
onEnterFrame = function () {
if (this._currentframe < 8) {
if (_root.gamePause) {
this.play();
} else {
this.stop();
}
} else {
this.stop();
}
};
}
}
movieClip 1705 wandAttack {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
attackDir = Math.atan2(thisY(-yBul / 3), thisX(-xBul / 3));
baseSpeed = 22;
ySpeed = -Math.sin(attackDir) * baseSpeed;
xSpeed = -Math.cos(attackDir) * baseSpeed;
onEnterFrame = function () {
if (Magic._currentframe < 8) {
if (!_root.gamePause) {
Magic.play();
} else {
Magic.stop();
}
} else {
Magic.stop();
}
if (!_root.gamePause) {
this._y += ySpeed / 3 * (_root.slowDown + 1);
this._x += xSpeed / 3 * (_root.slowDown + 1);
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this)) {
_root.bulletDead();
}
}
if (thisX(0) < -100 || thisX(0) > 850 || thisY(0) < -100 || thisY(0) > 600) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1708 {
}
movieClip 1710 {
}
movieClip 1712 {
}
movieClip 1714 {
}
movieClip 1716 {
}
movieClip 1718 {
}
movieClip 1720 {
}
movieClip 1722 {
}
movieClip 1724 {
}
movieClip 1725 koopaKidIcon {
}
movieClip 1736 {
}
movieClip 1738 {
}
movieClip 1739 {
}
movieClip 1745 {
}
movieClip 1747 {
}
movieClip 1748 koopaKid0 {
frame 1 {
stop();
}
}
movieClip 1753 {
}
movieClip 1758 {
}
movieClip 1767 {
}
movieClip 1774 {
}
movieClip 1775 koopaKid1 {
frame 1 {
stop();
}
}
movieClip 1780 {
}
movieClip 1785 {
}
movieClip 1794 {
}
movieClip 1801 {
}
movieClip 1802 koopaKid2 {
frame 1 {
stop();
}
}
movieClip 1807 {
}
movieClip 1812 {
}
movieClip 1821 {
}
movieClip 1828 {
}
movieClip 1829 koopaKid3 {
frame 1 {
stop();
}
}
movieClip 1834 {
}
movieClip 1839 {
}
movieClip 1848 {
}
movieClip 1855 {
}
movieClip 1856 koopaKid4 {
frame 1 {
stop();
}
}
movieClip 1861 {
}
movieClip 1866 {
}
movieClip 1875 {
}
movieClip 1882 {
}
movieClip 1883 koopaKid5 {
frame 1 {
stop();
}
}
movieClip 1885 {
}
movieClip 1887 {
}
movieClip 1896 {
}
movieClip 1904 {
}
movieClip 1905 koopaKid6 {
frame 1 {
stop();
}
}
movieClip 1910 {
}
movieClip 1915 {
}
movieClip 1916 {
}
movieClip 1917 {
}
movieClip 1918 koopaKid7 {
frame 1 {
stop();
}
}
movieClip 1921 {
}
movieClip 1924 {
}
movieClip 1933 {
}
movieClip 1940 {
}
movieClip 1942 {
}
movieClip 1943 koopaKid8 {
frame 1 {
stop();
}
}
movieClip 1947 {
}
movieClip 1948 bowserFire {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
attackDir = Math.atan2(thisY(-yBul / 3), thisX(-xBul / 3));
this._rotation = 180 * attackDir / Math.PI + 90 + this._xscale * 0.9;
if (this._xscale == -100) {
if (this._rotation < -20) {
this._rotation = -20;
}
if (this._rotation > 30) {
this._rotation = 30;
}
} else {
if (this._rotation < -30) {
this._rotation = -30;
}
if (this._rotation > 20) {
this._rotation = 20;
}
}
attackDir = Math.PI * (this._rotation - (90 + this._xscale * 0.9)) / 180;
flameHit._rotation = -this._rotation;
baseSpeed = 22;
ySpeed = -Math.sin(attackDir) * baseSpeed;
xSpeed = -Math.cos(attackDir) * baseSpeed;
onEnterFrame = function () {
if (Magic._currentframe < 8) {
if (!_root.gamePause) {
Magic.play();
} else {
Magic.stop();
}
} else {
Magic.stop();
}
if (!_root.gamePause) {
this._y += ySpeed / 3 * (_root.slowDown + 1);
this._x += xSpeed / 3 * (_root.slowDown + 1);
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this.flameHit)) {
_root.bulletDead();
}
}
if (thisX(0) < -100 || thisX(0) > 850 || thisY(0) < -100 || thisY(0) > 600) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1951 creationAdd {
frame 1 {
stop();
onEnterFrame = function () {
if (!_root.leftButtonDetect()) {
i = 0;
this.gotoAndStop(2 - _root.addLevel);
} else {
!i ? i : i--;
if (!i) {
this.gotoAndStop(2 - _root.addLevel);
i = 4;
}
}
};
}
}
movieClip 1953 {
}
movieClip 1955 SMB2Message {
frame 1 {
messageTint._alpha = 0;
onEnterFrame = function () {
messageTint._alpha = this._parent._y / 2.5;
this._parent._y += (250 - this._parent._y) / 5;
};
}
}
button 1964 {
on (release) {
_root.savedProgress = _root.tempProgress;
_root.savedScore = _root.tempScore;
_root.savedAbility = _root.tempAbility;
_root.saveProgress();
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
button 1965 {
on (release) {
_root.savedProgress = _root.tempProgress;
_root.savedScore = _root.tempScore;
_root.savedAbility = _root.tempAbility;
_root.saveProgress();
_root.quitToMenu();
}
}
button 1966 {
on (release) {
_root.quitToMenu();
}
}
movieClip 1967 SMB2MessageGameSave {
frame 1 {
stop();
levelNo.text = (int((_root.StageNo + 3) / 4) < 9 ? int((_root.StageNo + 3) / 4) : chr(int((_root.StageNo + 3) / 4) + 56)) + '-' + (_root.StageNo % 4 ? _root.StageNo % 4 : 4);
this.levelNo.setTextFormat(_root.txtFormat2);
this.levelNo.embedFonts = true;
this._x = 375;
this._y = -100;
}
}
button 1970 {
on (release) {
_root.levelOverlay.dropOverlay(3);
_root.attachObject('');
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
movieClip 1971 SMB2MessageEditor {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
button 1975 {
on (release) {
_root.attachObject('');
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
button 1976 {
on (release) {
_root.startNuke();
_root.attachObject('');
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
movieClip 1977 SMB2MessageNuke {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
movieClip 1980 {
}
movieClip 1981 wendyRing {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
attackDir = Math.atan2(thisY(-yBul / 3), thisX(-xBul / 3));
baseSpeed = 16;
ySpeed = -Math.sin(attackDir) * baseSpeed;
xSpeed = -Math.cos(attackDir) * baseSpeed;
stop();
onEnterFrame = function () {
if (!_root.gamePause) {
Magic.play();
} else {
Magic.stop();
}
if (this._currentframe == 1) {
if (!_root.gamePause) {
this._y += ySpeed / 3 * (_root.slowDown + 1);
this._x += xSpeed / 3 * (_root.slowDown + 1);
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this)) {
_root.bulletDead();
}
}
if (thisX(0) < 24 && xSpeed < 0) {
xSpeed = -xSpeed;
}
if (thisX(0) > 726 && xSpeed > 0) {
xSpeed = -xSpeed;
}
if (thisY(0) < 24 && ySpeed < 0) {
ySpeed = -ySpeed;
}
if (thisY(0) > 476 && ySpeed > 0) {
ySpeed = -ySpeed;
}
if (!_root.Level.Misc[bossName].health) {
this.gotoAndStop(2);
}
}
} else {
if (Magic._currentframe == Magic._totalframes) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1986 {
}
movieClip 1987 lemmyBall {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
xDif = -thisX(-_root.Bullet._x / 3);
yDif = -thisY(-_root.Bullet._y / 3);
baseSpeed = 44;
throwDir = thisX(0) < _root.Bullet._x ? -1 : 1;
trigA = 1;
trigB = -2 * baseSpeed * baseSpeed / xDif * koopaGrav;
trigC = 1 - 2 * baseSpeed * baseSpeed * yDif / xDif * xDif * koopaGrav;
trigP = Math.atan(((-trigB + throwDir * Math.sqrt(Math.abs(trigB * trigB - 4 * trigA * trigC))) / 2) * trigA);
trace(180 * trigP / Math.PI);
xSpeed = -throwDir * Math.cos(trigP) * baseSpeed;
ySpeed = throwDir * Math.sin(trigP) * baseSpeed;
onEnterFrame = function () {
if (!_root.gamePause) {
Magic.play();
} else {
Magic.stop();
}
if (!_root.gamePause) {
this._y += ySpeed / 3 * (_root.slowDown + 1);
this._x += xSpeed / 3 * (_root.slowDown + 1);
ySpeed += koopaGrav / (_root.slowDown + 1);
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this)) {
_root.bulletDead();
}
}
if (thisX(0) < -100 || thisX(0) > 850 || thisY(0) < -100 || thisY(0) > 600) {
this.removeMovieClip();
}
}
};
}
}
movieClip 1988 BulletSlow {
frame 1 {
this.attachMovie('Bullet' + _root.bulletNo, 'Bullet', 1);
stop();
this._x = 0;
this._y = 0;
yPar = _root.Bullet._y;
yPrev = 0;
xPar = _root.Bullet._x;
xPrev = 0;
this._alpha = 100 - (this._name / 1 + 1) * 10;
this.Bullet.gotoAndStop(_root.Bullet.Bullet._currentframe);
this._rotation = _root.Bullet.Bullet._rotation;
changePos = function () {
if (!_root.gamePause) {
yPrev = _root.Bullet._y - yPar;
xPrev = _root.Bullet._x - xPar;
if (!(this._name / 1)) {
yPrev = _root.Bullet._y - yPar;
xPrev = _root.Bullet._x - xPar;
} else {
nameVal = this._name / 1 - 1;
yPrev += this._parent[nameVal].yPrev;
xPrev += this._parent[nameVal].xPrev;
}
this._x = -xPrev;
this._y = -yPrev;
yPar = _root.Bullet._y;
xPar = _root.Bullet._x;
if (!(this._name / 1)) {
this.Bullet.gotoAndStop(_root.Bullet.Bullet._currentframe);
this._rotation = _root.Bullet.Bullet._rotation;
} else {
this.Bullet.gotoAndStop(_root.Bullet.BSlow[this._name / 1 - 1].Bullet._currentframe);
this._rotation = _root.Bullet.BSlow[this._name / 1 - 1]._rotation;
}
}
};
onEnterFrame = function () {
if (!_root.slowDown) {
this._alpha -= 5;
if (this._alpha <= 0) {
if (!(this._name / 1)) {
_root.Bullet.BSlow.removeMovieClip();
}
this.removeMovieClip();
}
}
};
}
}
movieClip 1992 AbilityStatDisplay {
frame 1 {
statReset = function () {
abilityName.text = _root.AbilityUnlock[_root.abilityNo] ? _root.AbilityName[_root.abilityNo] : _root.AbilityName[0];
abilityName.setTextFormat(_root.txtFormat);
abilityName.embedFonts = true;
abilityDesc.text = _root.AbilityUnlock[_root.abilityNo] ? _root.AbilityDesc[_root.abilityNo] : _root.AbilityDesc[0];
abilityDesc.setTextFormat(_root.txtFormat);
abilityDesc.embedFonts = true;
};
statReset();
}
}
movieClip 1999 bulletTutorial {
frame 1 {
stop();
_root.BulletIntro.stop();
this._y = -500;
this._x = 0;
this.gotoAndStop(_root.StageNo);
onEnterFrame = function () {
this._y += (12 - this._y) / 5;
if (_root.leftButtonDetect() && !_root.LeftButtonDown) {
if (_root.StageNo == 4) {
_root.gameTutorial = false;
_root.saveOptions();
}
_root.BulletIntro.play();
if (_root.hideMouse) {
Mouse.hide();
}
this.removeMovieClip();
}
};
}
}
button 2001 {
on (release) {
_root.SMB2MessageUp = false;
this._parent.removeMovieClip();
}
}
button 2002 {
on (release) {
_root.resetData();
_root.loadData();
_root.resetTitle();
_root.SMB2MessageUp = false;
this._parent.removeMovieClip();
}
}
movieClip 2003 SMB2MessageDelete {
frame 1 {
stop();
this._x = 375 - _root._x;
this._y = -100;
}
}
movieClip 2005 HUDlevelNo {
frame 1 {
levelNoT.setTextFormat(_root.txtFormat);
levelNoT.embedFonts = true;
}
}
movieClip 2008 copiedCode {
frame 1 {
this._y = 255;
onEnterFrame = function () {
this._y += (225 - this._y) / 5;
};
}
}
movieClip 2010 endGameBlackness {
frame 1 {
this._x = 800;
fadeOut = false;
onEnterFrame = function () {
this._x -= this._x / 5;
if (!int(this._x) && this._alpha == 100) {
_root.restartVariables();
_root.unLoadAssets();
_root.attachMovie('endGameAni', 'endGameAni', 3);
fadeOut = true;
_root.stopMSC();
_root.playMSC('MSC-END', true);
_root.volumeMSC(0);
}
if (fadeOut) {
this._alpha -= 5;
_root.volumeMSC(100 - this._alpha);
if (this._alpha <= 0) {
this.removeMovieClip();
}
} else {
_root.volumeMSC(this._x / 8);
}
};
}
}
movieClip 2016 {
}
movieClip 2021 {
frame 1 {
stop();
_root.camShake += 100;
_root.playSFX('SFXfirework2');
i = 0;
while (i < 200) {
this.attachMovie('fireworkExplode', 'fireworkExplode' + i, i);
++i;
}
}
}
movieClip 2052 {
}
movieClip 2068 {
}
movieClip 2069 {
frame 1 {
stop();
_root.camShake += 100;
_root.playSFX('SFXfirework2');
bulletFirework.gotoAndStop(_root.bulletNo);
bulletFaint.gotoAndStop(_root.bulletNo);
bulletFirework._alpha = 0;
bulletFaint._alpha = 0;
j = 0;
i = 0;
while (i < 200) {
this.attachMovie('fireworkExplode2', 'fireworkExplode' + i, i);
this['fireworkExplode' + i].dir = random(360) + 1;
while (!false) {
this['fireworkExplode' + i].speed = (random(500) + 1) / 150;
if (this.bulletFirework.hitTest(this._x + 78 * this['fireworkExplode' + i].speed * Math.sin(Math.PI * this['fireworkExplode' + i].dir / 180), this._y + 78 * this['fireworkExplode' + i].speed * Math.cos(Math.PI * this['fireworkExplode' + i].dir / 180), true)) {
break;
}
++j;
}
++i;
}
trace(j);
}
}
movieClip 2071 endGameAni {
frame 1 {
if (_root.bulletNo == undefined) {
_root.bulletNo = 1;
}
}
frame 64 {
_root.playSFX('SFXfirework1');
}
frame 140 {
_root.playSFX('SFXfirework1');
}
frame 198 {
_root.playSFX('SFXfirework1');
}
frame 273 {
stop();
_root.attachMovie('endGameMessage', 'endGameMessage', 4);
}
}
movieClip 2072 endGameMessage {
frame 1 {
this._x = 775;
onEnterFrame = function () {
this._x += (540 - this._x) / 5;
if (Math.round(this._x) == 540 && _root.leftButtonDetect() && !_root.SMB2MessageUp) {
if (_root.autoSave) {
_root.eGB.removeMovieClip();
_root.endGameAni.removeMovieClip();
_root.quitToMenu();
_root.endGameMessage.removeMovieClip();
} else {
_root.attachMovie('SMB2MessageEnd', 'SMB2Message', 5);
_root.SMB2MessageUp = true;
}
}
};
}
}
movieClip 2073 fireworkExplode2 {
frame 1 {
fireSpark.gotoAndPlay(random(5) + 1);
fallStart = random(360) + 1;
fallC = 12;
fallSpeed = 0;
faintShow = 35;
onEnterFrame = function () {
if (this._name == 'fireworkExplode0') {
this._parent.bulletFaint._alpha = fallC ? faintShow * (1 - fallC / 12) : faintShow;
}
if (fallC) {
this._x += fallC * speed * Math.sin(Math.PI * dir / 180);
this._y += fallC * speed * Math.cos(Math.PI * dir / 180);
--fallC;
} else {
++fallSpeed;
this._y += fallSpeed / 12;
this._x += Math.sin(Math.PI * fallStart / 180);
fallStart += 20;
if (this._xscale >= 50) {
this._yscale = 100 - fallSpeed * fallSpeed / 16;
this._xscale = this._yscale;
} else {
if (int(fallSpeed / 3) == fallSpeed / 3) {
if (int(fallSpeed / 6) == fallSpeed / 6) {
this._alpha = 0;
} else {
this._alpha = 100;
}
}
}
if (fallSpeed > 60) {
this._alpha = 0;
this.removeMovieClip();
}
}
};
}
}
movieClip 2076 gameCompleted {
}
movieClip 2082 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 2083 Bullet10 {
frame 1 {
if (this._parent._alpha == 100) {
this._parent.attachMovie('NyanNyan', 'NyanNyan', 1);
}
this._parent.NyanNyan._x = -24;
this._parent.NyanNyan._y = -3;
}
}
button 2084 {
on (release) {
_root.savedProgress = _root.tempProgress;
_root.savedScore = _root.tempScore;
_root.savedAbility = _root.tempAbility;
_root.saveProgress();
_root.eGB.removeMovieClip();
_root.endGameAni.removeMovieClip();
_root.quitToMenu();
_root.endGameMessage.removeMovieClip();
_root.SMB2Message.removeMovieClip();
}
}
button 2085 {
on (release) {
_root.eGB.removeMovieClip();
_root.endGameAni.removeMovieClip();
_root.quitToMenu();
_root.endGameMessage.removeMovieClip();
_root.SMB2Message.removeMovieClip();
}
}
movieClip 2087 SMB2MessageEnd {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
movieClip 2089 {
}
movieClip 2090 NyanRainbow {
frame 1 {
stop();
thisX = function (offset) {
return _root.Bullet._x + this._x * _root.Bullet._yscale / 100 + this._parent._x + offset;
};
thisY = function (offset) {
return _root.Bullet._y + this._y + this._parent._y + offset;
};
yPar = _root.Bullet._y;
yPrev = 0;
yPrev2 = 0;
yStart = this._y;
xPar = _root.Bullet._x;
xPrev = 0;
xPrev2 = 0;
xStart = this._x;
xScaleStart = this._xscale;
yScaleStart = _root.Bullet._yscale;
yScalePar = _root.Bullet._yscale;
changeY = function () {
yPrev = (_root.Bullet._y - yPar) * 100 / _root.Bullet._yscale;
yPrev2 = -(this._y - yStart) - yPrev;
this._y += yPrev2;
this._x -= (_root.prisonScene ? !_root.lakituPrison.cageLeave * -Math.sin(Math.PI * ((_root.lakituPrison._y / 400) * 90) / 180) : 1) * ((_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9) / (_root.slowDown + 1)) * 100 / _root.Bullet._yscale;
xPrev = (_root.Bullet._x - xPar) * 100 / _root.Bullet._yscale;
this._x -= xPrev;
xPar = _root.Bullet._x;
this._yscale = 100 * yScaleStart / _root.Bullet._yscale;
};
lightningStrike = function () {
this._x = this._x * yScalePar / _root.Bullet._yscale;
this._y = this._y * yScalePar / _root.Bullet._yscale;
this._xscale = this._xscale * yScalePar / _root.Bullet._yscale;
yScalePar = _root.Bullet._yscale;
};
onEnterFrame = function () {
if (!_root.gamePause) {
if (thisX(0) < -500) {
this.removeMovieClip();
}
}
};
}
}
movieClip 2095 BulletIntro10 {
frame 19 {
_root.playSFX('SFXgothit');
}
frame 21 {
_root.introAniFinish = true;
_root.camShake += 50;
}
frame 29 {
this.removeMovieClip();
}
}
movieClip 2096 NyanNyan {
frame 1 {
i = 1;
xPrev = _root.Bullet._x;
rainbowGenerate = function () {
if (!_root.gamePause) {
this.attachMovie('NyanRainbow', 'Nyan' + i, i);
xDis = (_root.Bullet._x - xPrev + (_root.prisonScene ? !_root.lakituPrison.cageLeave * -Math.sin(Math.PI * ((_root.lakituPrison._y / 400) * 90) / 180) : 1) * ((_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9) / (_root.slowDown + 1))) * 100 / _root.Bullet._yscale;
this['Nyan' + i]._x = 12;
this['Nyan' + i]._y = 3 * (int(i / 3) % 2) - _root.Bullet.Bullet._rotation / 2;
this['Nyan' + i]._xscale = 100 * (xDis > 0 ? Math.ceil(xDis) : Math.floor(xDis)) / 30;
++i;
xPrev = _root.Bullet._x;
}
};
}
}
movieClip 2099 Bullet4 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 2104 BulletDead4 {
}
movieClip 2105 BulletDead10 {
frame 1 {
_root.camShake += 50;
}
}
movieClip 2107 {
}
movieClip 2111 BulletIntro4 {
frame 13 {
_root.playSFX('SFXbump');
}
frame 15 {
_root.playSFX('SFXbump');
}
frame 17 {
_root.playSFX('SFXbump');
}
frame 19 {
_root.playSFX('SFXbump');
}
frame 21 {
_root.playSFX('SFXbump');
}
frame 23 {
_root.playSFX('SFXbump');
}
frame 25 {
_root.playSFX('SFXbump');
_root.playSFX('SFXsubcon');
}
frame 48 {
_root.introAniFinish = true;
}
frame 55 {
this.removeMovieClip();
}
}
movieClip 2113 {
}
movieClip 2115 BulletUnlock4 {
frame 11 {
_root.playSFX('SFXbump');
}
frame 25 {
_root.playSFX('SFXbump');
}
frame 38 {
_root.playSFX('SFXbump');
_root.playSFX('SFXgrab');
}
frame 56 {
_root.playSFX('SFXsubcon');
}
frame 70 {
stop();
}
}
movieClip 2122 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause) {
stop();
} else {
play();
}
};
}
}
movieClip 2123 Bullet12 {
frame 1 {
if (this._parent._alpha == 100) {
this._parent.attachMovie('hatPart', 'NyanNyan', 1);
}
this._parent.hatPart._x = -9;
this._parent.hatPart._y = 0;
}
}
movieClip 2127 {
}
movieClip 2128 BulletDead12 {
frame 1 {
_root.camShake += 40;
}
}
movieClip 2141 BulletIntro12 {
frame 14 {
_root.playSFX('SFXmjspin');
}
frame 30 {
_root.introAniFinish = true;
_root.playSFX('SFXmjthrow');
}
frame 39 {
this.removeMovieClip();
}
}
movieClip 2146 hatSparkle {
frame 1 {
stop();
this.gotoAndStop(random(4) + 1);
thisX = function (offset) {
return _root.Bullet._x + this._x * _root.Bullet._yscale / 100 + this._parent._x + offset;
};
thisY = function (offset) {
return _root.Bullet._y + this._y + this._parent._y + offset;
};
yPar = _root.Bullet._y;
yPrev = 0;
yPrev2 = 0;
yStart = this._y;
xPar = _root.Bullet._x;
xPrev = 0;
xPrev2 = 0;
xStart = this._x;
xScaleStart = this._xscale;
yScaleStart = _root.Bullet._yscale;
yScalePar = _root.Bullet._yscale;
changeY = function () {
yPrev = (_root.Bullet._y - yPar) * 100 / _root.Bullet._yscale;
yPrev2 = -(this._y - yStart) - yPrev;
this._y += yPrev2;
this._x -= (_root.prisonScene ? !_root.lakituPrison.cageLeave * -Math.sin(Math.PI * ((_root.lakituPrison._y / 400) * 90) / 180) : 1) * ((_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9) / (_root.slowDown + 1)) * 100 / _root.Bullet._yscale / (this._xscale / 50);
xPrev = (_root.Bullet._x - xPar) * 100 / _root.Bullet._yscale;
this._x -= xPrev;
xPar = _root.Bullet._x;
};
onEnterFrame = function () {
if (!_root.gamePause) {
if (thisX(0) < -500) {
this.removeMovieClip();
}
this._xscale -= 5;
this._yscale = this._xscale;
if (this._xscale <= 0) {
this.removeMovieClip();
}
}
};
}
}
movieClip 2147 hatPart {
frame 1 {
i = 1;
rainbowGenerate = function () {
if (!_root.gamePause) {
this.attachMovie('hatSparkle', 'Nyan' + i, i);
this['Nyan' + i]._x = 0;
this['Nyan' + i]._y = 3 * (random(5) - 3);
++i;
}
};
}
}
movieClip 2151 {
frame 1 {
onEnterFrame = function () {
if (_root.gamePause || !_root.gameStart) {
stop();
} else {
play();
}
};
}
}
movieClip 2152 unlockBrick {
frame 1 {
stop();
brickHit = function (hitMC, autoHit) {
if (!_root.warpZone) {
if (!_root.POWEffect) {
if (autoHit || this.hitTest(hitMC)) {
_root.camShake += 75;
_root.playSFX('SFXspring');
_root.warpZone = true;
_root.levelScrollPause = true;
_root.gamePause = false;
_root.Bullet._yscale = 100;
_root.Bullet._xscale = 100;
_root.Bullet._alpha = 100;
_root.slowDown = false;
_root.abilityUsage = false;
_root.timeRewind = false;
_root.Starman = false;
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 0);
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
c2 = new Color(_root);
c2.setTint(0, 0, 0, 0);
_root.getDizzy = 0;
_root.Bullet.Key.gotoAndStop(2);
_root.keyUnlock = false;
}
}
}
};
coinSpawn = function () {};
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
if (!_root.creationMode && thisX(0) < -50) {
this.removeMovieClip();
}
if (!_root.StageNo || _root.BulletUnlock[9 + int((_root.StageNo - 1) / 4)]) {
this.removeMovieClip();
}
onEnterFrame = function () {
if (_root.gameStart) {
if (thisX(0) < -50) {
this.removeMovieClip();
}
}
};
}
}
movieClip 2153 warpZoneBlackness {
frame 1 {
this._x = 800;
fadeOut = false;
onEnterFrame = function () {
this._x -= this._x / 5;
if (!int(this._x) && this._alpha == 100) {
_root.restartVariables();
_root.unLoadAssets();
if (_root.levelCreate) {
if (_root.hideMouse) {
Mouse.show();
}
_root.gotoAndStop(_root.creatorFrame);
} else {
_root.secretLevel = true;
_root.levelNo = 'x' + int((_root.StageNo - 1) / 4);
_root.loadLevel();
}
fadeOut = true;
_root.stopMSC();
_root.playMSC('MSC-BG0', true);
_root.volumeMSC(0);
}
if (fadeOut) {
this._alpha -= 10;
_root.volumeMSC(100 - this._alpha);
if (this._alpha <= 0) {
this.removeMovieClip();
}
} else {
_root.volumeMSC(this._x / 8);
}
};
}
}
movieClip 2157 invalidLevel {
frame 1 {
stop();
this._y = 255;
onEnterFrame = function () {
this._y += (225 - this._y) / 5;
};
}
frame 2 {
stop();
this._y = 255;
onEnterFrame = function () {
this._y += (225 - this._y) / 5;
};
}
frame 3 {
stop();
this._y = 255;
onEnterFrame = function () {
this._y += (225 - this._y) / 5;
};
}
}
movieClip 2161 {
}
movieClip 2164 {
}
movieClip 2166 {
}
movieClip 2168 {
}
movieClip 2169 {
}
movieClip 2171 {
}
movieClip 2173 {
}
movieClip 2174 {
}
movieClip 2175 {
}
movieClip 2177 {
}
movieClip 2178 {
}
movieClip 2180 {
}
movieClip 2181 {
}
movieClip 2183 {
}
movieClip 2185 {
}
movieClip 2187 {
}
movieClip 2189 {
}
movieClip 2192 {
}
movieClip 2194 {
}
movieClip 2195 {
}
movieClip 2197 {
}
movieClip 2199 {
}
movieClip 2201 {
}
movieClip 2203 {
}
movieClip 2205 {
}
movieClip 2207 {
}
movieClip 2208 {
}
movieClip 2210 {
}
movieClip 2216 {
}
movieClip 2225 {
}
movieClip 2227 {
}
movieClip 2229 {
}
movieClip 2230 {
}
movieClip 2232 {
}
movieClip 2234 {
}
movieClip 2236 {
}
movieClip 2238 {
}
movieClip 2240 {
}
movieClip 2241 {
}
movieClip 2242 {
}
movieClip 2244 {
}
movieClip 2245 {
}
movieClip 2246 SMBMedals {
}
movieClip 2247 leftRightSelection2 {
}
movieClip 2252 medalStats {
frame 1 {
statReset = function () {
medalName.text = _root.medalGet[this._parent.hoverMedal] ? _root.medalName[this._parent.hoverMedal] : _root.medalName[0];
medalChallenge.text = _root.medalDifficulty[_root.medalPoints[this._parent.hoverMedal]];
medalDescription.text = _root.medalGet[this._parent.hoverMedal] ? _root.medalUnlocked[this._parent.hoverMedal] : _root.medalLocked[this._parent.hoverMedal];
};
statReset();
medalName.setTextFormat(_root.txtFormat);
medalName.embedFonts = true;
medalChallenge.setTextFormat(_root.txtFormat);
medalChallenge.embedFonts = true;
medalDescription.setTextFormat(_root.txtFormat);
medalDescription.embedFonts = true;
}
}
movieClip 2256 {
frame 1 {
if (this._parent._alpha != 100) {
this._yscale = 0;
this._xscale = 0;
stop();
}
onEnterFrame = function () {
if (this._parent._alpha != 100) {
stop();
} else {
if (_root.gamePause) {
stop();
} else {
play();
}
}
};
}
}
movieClip 2257 Bullet13 {
}
movieClip 2265 {
}
movieClip 2274 {
}
movieClip 2282 BulletIntro13 {
frame 1 {
_root.playSFX('MMjump');
}
frame 25 {
_root.camShake += 10;
}
frame 30 {
_root.playSFX('MMrush');
}
frame 41 {
_root.camShake += 40;
_root.playSFX('MMdamage');
}
frame 54 {
_root.introAniFinish = true;
}
frame 54 {
this.removeMovieClip();
}
}
movieClip 2288 {
frame 1 {
onEnterFrame = function () {
if (this._parent._alpha != 100) {
stop();
} else {
if (_root.gamePause) {
stop();
} else {
play();
}
}
};
}
}
movieClip 2289 Bullet14 {
frame 1 {
onEnterFrame = function () {
if (this._alpha != 0) {
if (!_root.gamePause) {
if (this._parent.kSpark == undefined) {
if (!random(2)) {
this._parent.attachMovie('kirbySpark', 'kSpark', 5);
this._parent.kSpark._x = 30;
if (!_root.banzaiMode && _root.banzaiSwitch) {
if (_root.banzaiTimer >= 0 && _root.banzaiTimer <= 5) {
c = new Color(this._parent.kSpark);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
} else {
if (_root.banzaiTimer <= 9) {
c = new Color(this._parent.kSpark);
c.setTint(0, 0, 0, 100);
}
}
}
}
}
if (this._parent.kFlash == undefined) {
if (!random(3)) {
this._parent.attachMovie('kirbyFlash', 'kFlash', 6);
this._parent.kFlash._x = 30 - random(100);
this._parent.kFlash._y = random(50) - 25;
if (!_root.banzaiMode && _root.banzaiSwitch) {
if (_root.banzaiTimer >= 0 && _root.banzaiTimer <= 5) {
c = new Color(this._parent.kFlash);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
} else {
if (_root.banzaiTimer <= 9) {
c = new Color(this._parent.kFlash);
c.setTint(0, 0, 0, 100);
}
}
}
}
}
}
}
};
}
}
movieClip 2297 BulletIntro14 {
frame 6 {
_root.camShake += 100;
_root.playSFX('kirbystarland');
_root.playSFX('kirbyhit');
}
frame 29 {
_root.camShake += 10;
_root.playSFX('kirbyshield');
}
frame 34 {
_root.camShake += 100;
_root.playSFX('kirbyfire');
}
frame 35 {
_root.introAniFinish = true;
}
frame 38 {
this.removeMovieClip();
}
}
movieClip 2300 kirbyFlash {
frame 1 {
onEnterFrame = function () {
if (this._parent._alpha != 100) {
stop();
} else {
if (_root.gamePause) {
stop();
} else {
play();
}
}
};
}
frame 4 {
this.removeMovieClip();
}
}
movieClip 2303 kirbySpark {
frame 1 {
onEnterFrame = function () {
if (this._parent._alpha != 100) {
stop();
} else {
if (_root.gamePause) {
stop();
} else {
play();
}
}
};
}
frame 5 {
this.removeMovieClip();
}
}
movieClip 2305 {
}
movieClip 2306 nukeMask {
}
movieClip 2308 levelEndSave {
frame 1 {
onEnterFrame = function () {};
}
}
movieClip 2314 BulletDead13 {
frame 11 {
_root.playSFX('MMdeath');
}
}
movieClip 2320 BulletDead14 {
frame 1 {
_root.camShake += 70;
}
}
movieClip 2330 NGsaveIcon {
frame 1 {
stop();
}
}
movieClip 2331 levelVote {
frame 1 {
onEnterFrame = function () {
trace(this._y);
this._y -= (this._y - 400) / 5;
if (this.voteBallot._currentframe == this.voteBallot._totalframes) {
_root.attachMovie('endStats', 'endStats', 11);
this.removeMovieClip();
}
};
}
instance voteBallot of movieClip 400 VoteBar {
onClipEvent (construct) {
title = 'Submit your vote!';
ratingName = 'Score';
fileMode = 'Use Current File';
}
}
}
movieClip 2337 Bullet15 {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause && this._parent._parent._name != 'BSlow') {
if (this._alpha == 0) {
this.gotoAndStop(1);
} else {
if (this._rotation >= 12) {
this.gotoAndStop(1);
} else {
if (this._rotation >= 5) {
this.gotoAndStop(2);
} else {
if (this._rotation >= -5) {
this.gotoAndStop(3);
} else {
if (this._rotation >= -12) {
this.gotoAndStop(4);
} else {
this.gotoAndStop(5);
}
}
}
}
}
}
};
}
}
movieClip 2345 BulletIntro15 {
frame 35 {
_root.playSFX('SFXpop');
_root.camShake += 10;
}
frame 50 {
_root.playSFX('SFXthunder');
_root.camShake += 100;
}
frame 71 {
_root.introAniFinish = true;
}
frame 71 {
this.removeMovieClip();
}
}
movieClip 2352 BulletDead15 {
frame 1 {
_root.camShake += 40;
}
frame 12 {
_root.camShake += 100;
_root.playSFX('SFXbomb');
}
}
movieClip 2356 uBrickPart {
frame 1 {
stop();
rot = random(40) - 20;
fallDir = (_root.levelStyle == 3) ? -0.5 : 1;
ySpeed = fallDir * (random(20) - 15) / 5;
xSpeed = (random(20) - 10) / 2;
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
platHit = function (xPos, yPos) {
return _root.Level.Plat.hitTest(thisX(xPos), thisY(yPos), true);
};
brickHit = function (xPos, yPos) {
brickY = int((this._y + this._parent._y + yPos - 3.333333333333334) / 16);
brickX = int((this._x + this._parent._x + xPos) / 16);
return (_root.Level.Brick[brickX + '-' + brickY] == undefined) ? false : true;
};
gridPosY = 0;
gridPosX = 0;
brickBounce = false;
brickStop = false;
gotoAndStop(int(_root.levelStyle / 1 + 1));
onEnterFrame = function () {
if (!_root.gamePause) {
this._x += xSpeed / 3 * (_root.slowDown + 1);
this._y += fallDir * ySpeed / 0.8 * (_root.slowDown + 1);
if (!brickStop) {
this._rotation += rot;
ySpeed += !_root.gamePause / (_root.slowDown + 1);
if (brickBounce || (gridPosY != int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16) || gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16))) {
if (ySpeed > 0 && (platHit(0, fallDir * 2) || brickHit(0, fallDir * 2))) {
if (brickBounce) {
brickStop = true;
ySpeed = 0;
} else {
this._y -= fallDir * ySpeed * 2 / 3 * (_root.slowDown + 1);
ySpeed = -ySpeed / 3;
brickBounce = true;
}
}
if (gridPosX != int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16)) {
if (platHit((xSpeed / Math.abs(xSpeed)) * 2, 0) || brickHit((xSpeed / Math.abs(xSpeed)) * 2, 0)) {
xSpeed = -xSpeed;
}
}
gridPosY = int((this._y + this._parent._y + fallDir * 2 - 3.333333333333334) / 16);
gridPosX = int((this._x + this._parent._x + (xSpeed / Math.abs(xSpeed)) * 2) / 16);
}
} else {
xSpeed = Math.abs(xSpeed) < 1 ? 0 : xSpeed / 2;
if (!platHit(0, fallDir * 2) && !brickHit(0, fallDir * 2)) {
brickStop = false;
brickBounce = false;
ySpeed = (random(20) - 10) / 5;
}
}
}
if (this._y + this._parent._y > 515) {
this.removeMovieClip();
}
if (thisX(0) < -15) {
this.removeMovieClip();
}
};
}
}
movieClip 2358 bossWand {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
stopCatch = 5;
koopaGrav = 3;
xDif = thisX(0) - (_root.Bullet._x > 30 ? (_root.Bullet._x < 720 ? _root.Bullet._x : 720) : 30);
yHit = _root.Bullet._y > 24 ? _root.Bullet._y : 24;
yDif = thisY(0) - yHit;
fallSpeed = -int((-koopaGrav + Math.sqrt(koopaGrav * koopaGrav + 8 * koopaGrav * (thisY(0) - 24))) / 2 * koopaGrav);
launchSpeed = Math.abs(fallSpeed * koopaGrav);
t = (launchSpeed + Math.sqrt(Math.abs(launchSpeed * launchSpeed - 2 * koopaGrav * yDif))) / koopaGrav;
flingSpeed = -xDif / t;
dir = 1;
miscHit = function (hitMC, autoHit) {
if ((autoHit || this.hitTest(hitMC)) && !stopCatch) {
_root.playSFX('SFXwand');
_root.camShake += 20;
_root.score += 1000;
_root.abilityMeter = 160;
if (_root.Level.Misc[koopaName] == undefined) {
_root.levelScrollPause = false;
}
_root.Level.Particles.attachMovie('coinEffect', [this._name], _root.Level.Particles.getNextHighestDepth());
_root.Level.Particles[this._name]._x = this._x;
_root.Level.Particles[this._name]._y = this._y;
_root.medalUnlock('MEDAL_MAGIC_WAND');
this.removeMovieClip();
}
};
onEnterFrame = function () {
if (stopCatch) {
--stopCatch;
}
this._y += fallSpeed * koopaGrav / 3 * (_root.slowDown + 1);
this._x += flingSpeed / 3 * (_root.slowDown + 1);
fallSpeed += 1 / (_root.slowDown + 1);
this._rotation -= 30;
_root.levelScrollPause = true;
if (thisX(0) < 100 || thisY(0) > 550) {
if (_root.Level.Misc[koopaName] == undefined) {
_root.levelScrollPause = false;
}
this.removeMovieClip();
}
};
}
}
button 2360 {
on (release) {
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
button 2361 {
on (release) {
this._parent.CharAbSel.portraitReset('Ability');
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
movieClip 2362 SMB2MessageChangeAbility {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
button 2364 {
on (release) {
this._parent.CharAbSel.portraitReset('Bullet');
_root.SMB2MessageUp = false;
this.removeMovieClip();
}
}
movieClip 2365 SMB2MessageChangeCharacter {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
movieClip 2376 SMB2AbilityPortraits {
}
movieClip 2394 SMB2BulletPortraits {
}
movieClip 2396 frameRateMC {
frame 1 {
frameRateT.setTextFormat(_root.txtFormat);
frameRateT.embedFonts = true;
}
}
movieClip 2397 levelImpossibleCheck {
}
movieClip 2404 {
}
movieClip 2405 secretEndStats {
frame 1 {
charMessage.gotoAndStop(int((_root.StageNo - 1) / 4));
if (!_root.levelCreate) {
_root.BulletUnlock[9 + int((_root.StageNo - 1) / 4)] = true;
_root.medalUnlock('MEDAL_CHARACTER_' + (9 + int((_root.StageNo - 1) / 4)));
if (!_root.cheatsOn) {
_root.saveUnlocks();
}
}
}
}
button 2406 {
on (release) {
_root.savedProgress = _root.tempProgress;
_root.savedScore = _root.tempScore;
_root.savedAbility = _root.tempAbility;
_root.saveProgress();
_root.quitToMenu();
_root.SMB2Message.removeMovieClip();
}
}
button 2407 {
on (release) {
_root.quitToMenu();
_root.SMB2Message.removeMovieClip();
}
}
movieClip 2409 SMB2MessageSecret {
frame 1 {
stop();
this._x = 375;
this._y = -100;
}
}
movieClip 2411 lakituBonus {
frame 1 {
cageLeave = false;
flySpeed = 0;
this.attachMovie('lakituBonusAni', 'bonusAni', 3);
bonusAni._y = 157;
bonusAni.stop();
onEnterFrame = function () {
if (!cageLeave) {
this._y -= this._y / 5;
if (!int(this._y)) {
bonusAni.play();
if (bonusAni._currentframe == 20) {
this.attachMovie('blackSquare', 'blackSquare', 1);
blackSquare._x = -48;
blackSquare._y = 205;
blackSquare._xscale = 600;
blackSquare._yscale = 1200;
this.attachMovie('BulletUnlock' + int(int((_root.StageNo - 1) / 4) + 9), 'bulletUnlock', 2);
bulletUnlock._x = 0;
bulletUnlock._y = 325;
bulletUnlock.stop();
}
if (bonusAni._currentframe == 37) {
this.bulletUnlock.swapDepths(this.bonusAni);
}
if (bonusAni._currentframe >= 22 && bonusAni._currentframe <= 42) {
c = new Color(this.bulletUnlock);
c.setTint(0, 0, 0, (42 - bonusAni._currentframe) * 5);
}
if (bonusAni._currentframe == 42) {
this.bulletUnlock.play();
}
if (bonusAni._currentframe == bonusAni._totalframes) {
bonusAni.stop();
cageLeave = true;
}
}
}
if (cageLeave) {
if (this._y > -500) {
this._y -= flySpeed;
this.bulletUnlock._y += flySpeed;
++flySpeed;
}
if (this.bulletUnlock._currentframe == this.bulletUnlock._totalframes) {
this.bulletUnlock.stop();
}
}
if (this._y < -500 && this.bulletUnlock._currentframe == this.bulletUnlock._totalframes) {
_root.keyUnlock = false;
this.removeMovieClip();
}
};
}
}
movieClip 2426 lakituBonusAni {
}
movieClip 2430 BulletUnlock10 {
frame 6 {
_root.playSFX('SFXnya');
}
frame 7 {
_root.playSFX('SFXjump');
_root.camShake += 15;
}
}
movieClip 2438 {
}
movieClip 2451 {
}
movieClip 2452 BulletUnlock12 {
frame 3 {
_root.playSFX('SFXmjspin');
}
frame 17 {
_root.playSFX('SFXmjdoor');
_root.camShake += 20;
}
frame 29 {
_root.playSFX('SFXmjooh');
_root.camShake += 15;
}
}
movieClip 2456 BulletUnlock13 {
}
movieClip 2466 BulletUnlock14 {
frame 12 {
_root.playSFX('kirbyhit');
_root.camShake += 15;
}
frame 31 {
_root.playSFX('kirbyjump');
}
frame 39 {
_root.playSFX('kirbyjump');
}
frame 47 {
_root.playSFX('kirbyjump');
}
frame 55 {
_root.playSFX('kirbyjump');
}
frame 63 {
_root.playSFX('kirbyjump');
}
frame 71 {
_root.playSFX('kirbyjump');
}
}
movieClip 2473 BulletUnlock15 {
frame 10 {
_root.playSFX('SFXjump');
_root.camShake += 20;
}
}
movieClip 2474 bulletPartExplode {
frame 1 {
i = 0;
while (i < 200) {
this.attachMovie('bulletPart', i, i);
++i;
}
explode = function () {
i = 0;
while (i < 200) {
this[i].explode = true;
++i;
}
};
}
}
movieClip 2475 bulletPart {
frame 1 {
dir = random(360);
speed = random(12) + 3;
spindis = (speed * speed + speed) / 2;
mousePosx = _root._xmouse;
mousePosy = _root._ymouse;
mouseOffx = 0;
mouseOffy = 0;
dis = 0;
explode = false;
flyOff = true;
onEnterFrame = function () {
if (!_root.gamePause) {
this._x -= mouseOffx;
this._y -= mouseOffy;
if (!explode) {
if (flyOff) {
this._x += Math.sin(Math.PI * dir / 180) * speed;
this._y += Math.cos(Math.PI * dir / 180) * speed;
if (speed) {
--speed;
} else {
flyOff = false;
}
} else {
++speed;
dir += speed;
this._x = Math.sin(Math.PI * dir / 180) * spindis;
this._y = Math.cos(Math.PI * dir / 180) * spindis;
if (speed > 25) {
spindis += Math.tan(Math.PI * (speed - 25) / 45);
}
}
dis = Math.sqrt(this._x * this._x + this._y * this._y);
mouseOffx = dis * (mousePosx - _root.Bullet._x) / 40;
mouseOffy = dis * (mousePosy - _root.Bullet._y) / 40;
this._x += mouseOffx;
this._y += mouseOffy;
mousePosx = _root.Bullet._x;
mousePosy = _root.Bullet._y;
} else {
this._x += Math.sin(Math.PI * dir / 180) * speed;
this._y += Math.cos(Math.PI * dir / 180) * speed;
speed += 4;
}
}
};
}
}
movieClip 2477 BulletBanzai1 {
}
movieClip 2480 {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
frame 33 {
onEnterFrame = function () {
this.stop();
};
}
frame 33 {
stop();
}
}
movieClip 2485 {
frame 1 {
onEnterFrame = function () {
if (!_root.gamePause) {
this.play();
} else {
this.stop();
}
};
}
frame 33 {
onEnterFrame = function () {
this.stop();
};
}
frame 33 {
stop();
}
}
movieClip 2489 {
frame 1 {
if (this._parent._alpha == 0) {
this._xscale = 1;
this._yscale = 1;
}
onEnterFrame = function () {
if (_root.gamePause) {
this.stop();
} else {
this.play();
}
};
}
}
movieClip 2504 BulletBanzai8 {
}
movieClip 2509 BulletBanzai10 {
}
movieClip 2520 BulletBanzai15 {
}
movieClip 2522 banzaiAppear {
}
movieClip 2523 bulletPartExplode2 {
frame 1 {
i = 0;
while (i < 200) {
this.attachMovie('bulletPart2', i, i);
++i;
}
mousePosx = _root.Bullet._x;
mousePosy = _root.Bullet._y;
mouseOffx = 0;
mouseOffy = 0;
partMove = function () {
i = 0;
while (i < 200) {
this[i]._x -= mouseOffx;
this[i]._y -= mouseOffy;
++i;
}
mouseOffx = mousePosx - _root.Bullet._x;
mouseOffy = mousePosy - _root.Bullet._y;
i = 0;
while (i < 200) {
this[i]._x += mouseOffx;
this[i]._y += mouseOffy;
++i;
}
};
}
}
movieClip 2529 BulletBanzai2 {
}
movieClip 2532 BulletBanzai12 {
}
movieClip 2534 BulletBanzai7 {
}
movieClip 2540 BulletBanzai3 {
}
movieClip 2546 BulletBanzai5 {
}
movieClip 2547 BulletBanzai11 {
}
movieClip 2550 BulletBanzai6 {
}
movieClip 2551 BulletBanzai14 {
}
movieClip 2554 {
}
movieClip 2557 {
}
movieClip 2566 {
}
movieClip 2579 {
}
movieClip 2581 {
}
movieClip 2582 koopaKid9 {
frame 1 {
stop();
}
}
movieClip 2585 {
}
movieClip 2586 wartBubble {
frame 1 {
thisX = function (offset) {
return _root.Level._x + (this._x + this._parent._x + offset) * (_root.Level._xscale / 100);
};
thisY = function (offset) {
return _root.Level._y + (this._y + this._parent._y + offset) * (_root.Level._yscale / 100);
};
xDif = -thisX(-_root.Bullet._x / 3);
yDif = -thisY(-_root.Bullet._y / 3);
baseSpeed = 44;
throwDir = thisX(0) < _root.Bullet._x ? -1 : 1;
trigA = 1;
trigB = -2 * baseSpeed * baseSpeed / xDif * koopaGrav;
trigC = 1 - 2 * baseSpeed * baseSpeed * yDif / xDif * xDif * koopaGrav;
trigP = Math.atan(((-trigB + throwDir * Math.sqrt(Math.abs(trigB * trigB - 4 * trigA * trigC))) / 2) * trigA);
xSpeed = -throwDir * Math.cos(trigP) * baseSpeed;
ySpeed = throwDir * Math.sin(trigP) * baseSpeed;
onEnterFrame = function () {
if (!_root.gamePause) {
Magic.play();
} else {
Magic.stop();
}
if (!_root.gamePause) {
this._y += ySpeed / 3 * (_root.slowDown + 1);
this._x += xSpeed / 3 * (_root.slowDown + 1);
ySpeed += koopaGrav / (_root.slowDown + 1);
if (_root.Bullet._alpha == 100) {
if (_root.Bullet.BulletHit.hitTest(this)) {
_root.bulletDead();
}
}
if (thisX(0) < -100 || thisX(0) > 850 || thisY(0) < -100 || thisY(0) > 600) {
this.removeMovieClip();
}
}
};
}
}
movieClip 2588 BulletBanzai13 {
}
movieClip 2658 {
frame 1 {
stop();
}
}
movieClip 2677 {
frame 1 {
stop();
}
}
movieClip 2678 levelExplosionFireball {
frame 1 {
_root.camShake += 10;
brickY = Math.round(this._y / 16);
brickX = Math.round(this._x / 16);
this._x = brickX * 16;
this._y = brickY * 16;
if (brickX > 0) {
k = 0;
while (k < 9) {
if (brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3)) != this._name) {
_root.Level.Brick[brickX - 1 + int(k / 3) + '-' + (brickY - 1 + int(k % 3))].brickHit(this, true);
}
++k;
}
}
for (var j in _root.Level.Enemies) {
if (_root.Level.Enemies[j].hitTest(this) && j != this._name) {
_root.Level.Enemies[j].bulletHit();
}
}
onEnterFrame = function () {
if (_root.gamePause) {
this.Bobomb.stop();
} else {
this.Bobomb.play();
}
if (this.Bobomb._currentframe == this.Bobomb._totalframes) {
this.removeMovieClip();
}
};
}
}
movieClip 2679 bulletPart2 {
frame 1 {
dir = random(360);
speed = random(12) + 3;
spindis = (speed * speed + speed) / 2;
dis = 0;
flyOff = true;
onEnterFrame = function () {
if (!_root.gamePause) {
if (flyOff) {
this._x += Math.sin(Math.PI * dir / 180) * speed;
this._y += Math.cos(Math.PI * dir / 180) * speed;
if (speed) {
--speed;
} else {
flyOff = false;
}
} else {
++speed;
this._y -= speed;
}
}
};
}
}
movieClip 2680 BulletBanzai9 {
}
movieClip 2681 BulletBanzai4 {
}
movieClip 2684 {
}
movieClip 2685 {
}
movieClip 2689 {
frame 1 {
function camControl() {
parentColor.setTransform(camColor.getTransform());
var v4 = sX / this._width;
var v3 = sY / this._height;
_parent._x = cX - this._x * v4;
_parent._y = cY - this._y * v3;
_parent._xscale = 100 * v4;
_parent._yscale = 100 * v3;
}
function resetStage() {
var v2 = {'ra': 100, 'rb': 0, 'ga': 100, 'gb': 0, 'ba': 100, 'bb': 0, 'aa': 100, 'ab': 0};
parentColor.setTransform(v2);
_parent._xscale = 100;
_parent._yscale = 100;
_parent._x = 0;
_parent._y = 0;
}
this._visible = false;
var oldMode = Stage.scaleMode;
Stage.scaleMode = 'exactFit';
var cX = Stage.width / 2;
var cY = Stage.height / 2;
var sX = Stage.width;
var sY = Stage.height;
Stage.scaleMode = oldMode;
var camColor = new Color(this);
var parentColor = new Color(_parent);
this.onEnterFrame = camControl;
camControl();
this.onUnload = resetStage;
}
}
movieClip 2693 {
}
movieClip 2701 {
}
movieClip 2702 {
}
movieClip 2705 {
}
movieClip 2711 {
}
movieClip 2717 {
}
movieClip 2746 {
}
movieClip 2754 {
}
movieClip 2756 {
}
movieClip 2763 {
}
movieClip 2766 {
}
movieClip 2768 {
}
movieClip 2769 {
}
movieClip 2771 {
}
movieClip 2772 {
}
movieClip 2773 {
}
movieClip 2774 {
}
movieClip 2789 {
frame 19 {
_root.bike.gotoAndStop('still');
}
}
movieClip 2798 {
}
movieClip 2801 {
instance of movieClip 2798 {
onClipEvent (enterFrame) {
this.gotoAndStop(_root.chompballface);
}
}
}
movieClip 2809 {
}
movieClip 2817 {
}
movieClip 2827 {
}
movieClip 2835 {
}
movieClip 2865 {
}
movieClip 2907 {
}
movieClip 2915 {
}
movieClip 2923 {
}
movieClip 2941 {
}
movieClip 2946 {
}
movieClip 2950 {
}
movieClip 2958 {
}
movieClip 2995 {
frame 1 {
_quality = 'LOW';
_root.stop();
}
instance of movieClip 2689 {
onClipEvent (enterFrame) {
_root.subtitle._x = this._x - 3.6 * this._xscale;
_root.subtitle._y = this._y + 1.6 * this._yscale;
_root.subtitle._xscale = this._xscale;
_root.subtitle._yscale = this._yscale;
}
}
frame 518 {
_root.play();
}
}
movieClip 2998 {
frame 20 {
stop();
}
}
movieClip 2999 {
frame 25 {
stop();
}
}
movieClip 3001 {
}
movieClip 3002 {
}
movieClip 3005 {
}
movieClip 3029 {
}
movieClip 3031 {
}
movieClip 3033 {
}
movieClip 3035 {
}
movieClip 3037 {
}
movieClip 3038 {
frame 1 {
_root.stop();
}
frame 280 {
_root.play();
}
}
frame 44 {
titleOffsetX = 2000;
titleOffsetY = 0;
titleLoad = function () {
_root.attachMovie('titleBackground', 'Background', 1);
_root.Background._x = titleOffsetX;
_root.Background._y = titleOffsetY;
_root.songNo = 0;
_root.secretLevel = false;
_root.noDeathChain = 0;
_root.testLevelChain = 0;
_root.Background.musicPlayerSelection.musicSel.text = _root.musicTitle[_root.songNo];
_root.soundCheckPlay = true;
_root.titleStart = true;
_root.attachMovie('titleName', 'titleName', 90);
_root.titleName._x = titleOffsetX + 140;
_root.titleName._y = titleOffsetY + 30;
_root.attachMovie('selectMode', 'selectMode', 89);
_root.NGAd._x = titleOffsetX + 25;
_root.NGAd._y = titleOffsetY + 200;
_root.selectMode._x = _root.titleName._x + 400;
_root.attachMovie('whiteFlash', 'whiteFlash', 99);
_root.whiteFlash._x = titleOffsetX;
_root.whiteFlash._y = titleOffsetY;
};
titleUnload = function (dest) {
_root.Background.removeMovieClip();
_root.titleName.removeMovieClip();
_root.selectMode.removeMovieClip();
_root.NGAd.removeMovieClip();
_root._x = 0;
_root._y = 0;
stopMSC();
_root.titlePosx = 0;
_root.titlePosy = 0;
if (dest == 'Game') {
_root.gotoAndStop(_root.gameFrame);
}
if (dest == 'Creator') {
_root.gotoAndStop(_root.creatorFrame);
}
};
resetTitle = function () {
titleUnload();
stop();
_root.BGM_Title.stop();
_root.songNo = 0;
volumeMSC(100);
playMSC('MSC-TTL', true);
_root.attachMovie('BulletIntro', 'BulletIntro', 100);
_root.BulletIntro._x = 340 + titleOffsetX;
_root.BulletIntro._y = 270 + titleOffsetY;
_root._x = -titleOffsetX;
_root._y = -titleOffsetY;
titleStart = false;
titleMove = false;
_root.levelCreate = false;
_root.gameStart = false;
_root.SMB2MessageUp = false;
titlePosx = 0;
titlePosy = 0;
};
resetTitle();
onEnterFrame = function () {
if (_root.cheatInvincible || _root.cheatUnlock || _root.cheatBombs || _root.cheatAbility || _root.cheatBanzai) {
_root.cheatsOn = true;
} else {
if (_root.cheatsOn) {
loadData();
_root.selectMode.sData.savedInfo();
}
_root.cheatsOn = false;
}
if (_root.BulletIntro._currentframe == 33) {
titleLoad();
}
if (titleMove) {
_root._x -= (_root._x - (titlePosx - titleOffsetX)) / 10;
_root._y -= (_root._y - (titlePosy - titleOffsetY)) / 10;
}
if (Math.round(_root._x) == titlePosx - titleOffsetX && Math.round(_root._y) == titlePosy - titleOffsetY) {
titleMove = false;
} else {
titleMove = true;
}
medalPosition();
};
}
frame 45 {
stop();
_root.createEmptyMovieClip('Test', 65534);
_root.createEmptyMovieClip('movFrameRate', 65535);
k = 0;
_root.movFrameRate.onEnterFrame = function () {
this.t = getTimer();
++k;
if (k == 7) {
_root.frameRate2 = 0;
}
_root.frameRate2 += Math.round(1000 / (this.t - this.o));
if (k > 10) {
k = 1;
}
if (k == 6) {
_root.frameRate = _root.frameRate2 / 10;
if (_root.FPSCounter) {
_root.HUD.frameRateMC.frameRateT.text = _root.frameRate;
} else {
_root.HUD.frameRateMC.frameRateT.text = '';
}
}
this.o = this.t;
};
createLevel = function (levelCode) {
_root.levelCreateBase(_root, _root['Level_' + levelCode], 'Level', 'Game', 3, 3);
for (var v2 in _root.Level.Enemies) {
}
if (!_root.Level.Enemies._width) {
allEnemies = false;
}
if (!_root.Level.Brick._width) {
allBricks = false;
}
};
restartVariables = function () {
_root.Bullet.removeMovieClip();
_root.score = _root.checkpointScore;
_root.coinCount = _root.coinCountCheckpoint;
_root.allBricks = _root.allBricksCheckpoint;
_root.allEnemies = _root.allEnemiesCheckpoint;
_root.abilityMeterCheckpoint += 8 * _root.abilityPity;
_root.abilityMeter = _root.abilityMeterCheckpoint;
_root.abilityTimer = 0;
_root.noDeath = false;
_root.gamePlay = true;
_root.gameStart = false;
_root.gamePause = false;
_root.gameRestart = false;
_root.gameFinished = false;
_root.POWEffect = false;
_root.camShake = 0;
_root.introAniFinish = false;
_root.endStatShow = false;
_root.levelScrollPause = false;
_root.warpZone = false;
_root.slowDown = false;
_root.Starman = false;
_root.getDizzy = 0;
_root.abilityUsage = false;
_root.timeRewind = false;
_root.levelWarp = false;
_root.keyUnlock = false;
_root.keyRewind = false;
_root.prisonScene = false;
_root.switchCharAb = false;
_root.banzaiSwitch = false;
_root.banzaiMode = false;
_root.banzaiTimer = 0;
_root.HUD.abHUD.abIcon.gotoAndStop(_root.abilityNo);
_root._x = 0;
_root._y = 0;
_root.totakaSong = 0;
createLevel(_root.levelNo);
_root.Level._x = _root.checkPointPos;
if (_root.eGB == undefined) {
_root.attachMovie('BulletIntro' + _root.bulletNo, 'BulletIntro', 6);
c = new Color(_root.BulletIntro);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
_root.BulletIntro._x = 90;
_root.BulletIntro._y = 230;
} else {
if (_root.secretLevel) {
_root.introAniFinish = true;
gameStart = true;
_root.attachMovie('Bullet', 'Bullet', 5);
c = new Color(_root.Bullet);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
_root.Bullet._x = 90;
_root.Bullet._y = 550;
}
}
_root.attachMovie('Background', 'Background', 1);
_root.Background._x = 100 + (_root.Level._x - 1200) / 19.75;
_root.stayStill = 0;
_root.rightHand = 0;
};
loadLevel = function () {
_root.createEmptyMovieClip('HUD', 10);
_root.HUD.attachMovie('PersonalScore', 'pScore', 2);
_root.HUD.frameRateMC._x = 750;
_root.HUD.frameRateMC.frameRateT.setTextFormat(_root.txtFormat);
_root.HUD.frameRateMC.frameRateT.embedFonts = true;
_root.HUD.attachMovie('abilityHUD', 'abHUD', 4);
_root.HUD.abHUD._x = 375;
_root.HUD.abHUD._y = 4;
_root.HUD.abHUD._alpha = 50;
_root.HUD.attachMovie('HUDlevelNo', 'levelMC', 5);
_root.HUD.levelMC._x = 750;
_root.HUD.levelMC._alpha = 60;
if (!_root.StageNo) {
_root.HUD.levelMC.levelNoT.text = _root.customLevelNames[0].toUpperCase();
} else {
_root.HUD.levelMC.levelNoT.text = 'WORLD ' + (int((_root.StageNo + 3) / 4) < 9 ? int((_root.StageNo + 3) / 4) : chr(int((_root.StageNo + 3) / 4) + 56)) + '-' + (_root.StageNo % 4 ? _root.StageNo % 4 : 4);
}
_root.HUD.attachMovie('frameRateMC', 'frameRateMC', 6);
_root.HUD.frameRateMC._x = 750;
_root.HUD.frameRateMC._y = 30;
_root.HUD.frameRateMC._alpha = 60;
_root.creationMode = false;
_root.checkpointScore = 0;
_root.coinCountCheckpoint = 0;
_root.coinCount = _root.coinCountCheckpoint;
_root.checkPointPos = 1200;
_root.levelScrollPause = false;
_root.fireworkShow = false;
_root.fireworkCount = 0;
_root.endMulti = 1;
_root.noAbility = true;
_root.abilityMeterCheckpoint = _root.gameLoaded * _root.tempAbility - 8 * _root.abilityPity;
_root.abilityMeter = _root.abilityMeterCheckpoint;
_root.allBricks = true;
_root.allEnemies = true;
_root.allBricksCheckpoint = true;
_root.allEnemiesCheckpoint = true;
_root.EnterButtonDown = false;
restartVariables();
if (_root.gameTutorial && _root.StageNo < 5 && _root.StageNo) {
_root.HUD.attachMovie('bulletTutorial', 'bulTut', 8);
if (_root.hideMouse) {
Mouse.show();
}
} else {
if (_root.hideMouse) {
Mouse.hide();
}
}
_root.noDeath = true;
if (_root.bulletNo != 10) {
_root.playMSC('MSC-BG' + _root.levelStyle, true);
} else {
_root.playMSC('MSC-NYA', true);
}
};
endMultiCalc = function () {
_root.endMulti = 0.4 + _root.BulletSpeed[_root.bulletNo] / 5 + _root.allBricks / 1 + _root.allEnemies / 1 + _root.noDeath / 1 + _root.noAbility / 1 + _root.coinCount / 10;
if (_root.StageNo) {
if (_root.allBricks && _root.allEnemies && _root.noDeath && _root.noAbility) {
_root.medalUnlock('MEDAL_ALL_MULTIPLIERS');
}
if (_root.prisonScene && _root.noDeath) {
_root.medalUnlock('MEDAL_PHANTOS_SURVIVE');
}
if (_root.noDeath) {
++_root.noDeathChain;
if (!(_root.StageNo % 4) && _root.StageNo) {
if (_root.noDeathChain >= 4) {
_root.medalUnlock('MEDAL_WORLD_SURVIVE');
}
}
} else {
_root.noDeathChain = 0;
}
trace(_root.noDeathChain);
}
};
unLoadAssets = function () {
_root.stopMSC();
HUD.removeMovieClip();
Bullet.removeMovieClip();
Level.removeMovieClip();
Background.removeMovieClip();
endStats.removeMovieClip();
levelEndDepth.removeMovieClip();
pauseMenu.removeMovieClip();
Fireworks.removeMovieClip();
};
quitToMenu = function () {
_root.saveStats();
unLoadAssets();
_root.gamePause = false;
if (_root.hideMouse) {
Mouse.show();
}
c2 = new Color(_root);
c2.setTint(0, 0, 0, 0);
_root._x = 0;
_root._y = 0;
_root.gotoAndStop(_root.titleFrame);
};
nextLevel = function () {
++_root.statBullet[_root.bulletNo];
++_root.statAbility[_root.abilityNo];
_root.firstLevel = false;
if (_root.eGB == undefined) {
if (_root.levelCreate) {
if (!_root.levelEdit) {
quitToMenu();
} else {
restartVariables();
unLoadAssets();
if (_root.hideMouse) {
Mouse.show();
}
_root.gotoAndStop(_root.creatorFrame);
c2 = new Color(_root);
c2.setTint(0, 0, 0, 0);
}
} else {
if (_root.StageNo == 33 || _root.StageNo == 49) {
_root.attachMovie('endGameBlackness', 'eGB', 12);
} else {
restartVariables();
unLoadAssets();
loadLevel();
}
}
}
};
checkPoint = function (xPos) {
if (!(_root.abilityUsage && _root.abilityNo == 5) && !_root.keyUnlock) {
_root.levelScrollPause = true;
_root.gamePause = false;
_root.checkpointScore = _root.score;
_root.coinCountCheckpoint = _root.coinCount;
_root.allBricksCheckpoint = _root.allBricks;
_root.allEnemiesCheckpoint = _root.allEnemies;
_root.abilityMeterCheckpoint = !_root.abilityUsage * _root.abilityMeter;
_root.HUD.attachMovie('Checkpoint', 'Checkpoint', 10);
if (_root.banzaiMode && !_root.cheatBanzai) {
_root.banzaiSwitch = true;
_root.HUD.Checkpoint.stop();
}
_root.checkPointPos = -xPos;
_root.Level._x = _root.checkPointPos;
}
};
loadLevel();
bulletDead = function () {
if (_root.switchCharAb || !_root.cheatInvincible && !_root.gameFinished && !_root.Starman && !_root.timeRewind && !_root.warpZone && !_root.banzaiSwitch && !_root.banzaiMode) {
xTemp = _root.Bullet._x;
yTemp = _root.Bullet._y;
_root.Bullet.removeMovieClip();
_root.banzaiSwitch = false;
_root.banzaiTimer = 0;
_root.banzaiMode = false;
if (_root.switchCharAb) {
_root.timeRewind = false;
_root.checkpointScore = 0;
_root.coinCountCheckpoint = 0;
_root.coinCount = _root.coinCountCheckpoint;
_root.checkPointPos = 1200;
_root.allBricks = true;
_root.allEnemies = true;
_root.allBricksCheckpoint = true;
_root.allEnemiesCheckpoint = true;
_root.abilityMeterCheckpoint = _root.gameLoaded * _root.tempAbility - 8 * _root.abilityPity;
_root.abilityMeter = _root.abilityMeterCheckpoint;
_root.attachMovie('BulletDead' + _root.pauseMenu.tempBullet, 'Bullet', 5);
if (!_root.secretLevel) {
if (_root.pauseMenu.tempBullet == 10 && _root.bulletNo != 10) {
_root.stopMSC();
_root.playMSC('MSC-BG' + _root.levelStyle, true);
} else {
if (_root.pauseMenu.tempBullet != 10 && _root.bulletNo == 10) {
_root.stopMSC();
_root.playMSC('MSC-NYA', true);
}
}
}
} else {
_root.attachMovie('BulletDead' + _root.bulletNo, 'Bullet', 5);
}
c = new Color(_root.Bullet);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
_root.Bullet._x = xTemp;
_root.Bullet._y = yTemp;
_root.gameRestart = true;
_root.camShake += 20;
if (_root.keyUnlock) {
_root.keyRewind = true;
}
_root.keyUnlock = false;
_root.gamePause = false;
if (_root.StageNo) {
if (_root.BulletIntro != undefined) {
_root.medalUnlock('MEDAL_INTRO_DEATH');
}
if (_root.levelEndDepth._x < _root.Bullet._x) {
_root.medalUnlock('MEDAL_DEATH_GATE');
}
}
_root.pauseMenu.removeMovieClip();
++_root.statDeath;
_root.playSFX('SFXhurt');
_root.saveStats();
}
if (_root.Starman) {
_root.camShake += 5;
}
if (_root.banzaiMode) {
_root.camShake += 20;
for (var v2 in _root.Level.Plat) {
if (_root.Level.Plat[v2].hitTest(_root.Bullet)) {
_root.Level.Plat[v2].banzaiHit();
}
}
}
};
banzaiAni = function () {
if (!_root.banzaiSwitch) {
if (_root.banzaiMode) {
} else {}
_root.abilityTimer = 0;
_root.Bullet._alpha = 100;
_root.slowDown = false;
_root.abilityUsage = false;
_root.timeRewind = false;
_root.Starman = false;
_root.timeRewind = false;
_root.keyUnlock = false;
_root.Bullet.Key.gotoAndStop(2);
_root.gamePause = false;
_root.pauseMenu.removeMovieClip();
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 0);
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
_root.banzaiSwitch = true;
} else {
_root.banzaiTimer += _root.banzaiMode ? -1 : 1;
if (!_root.banzaiMode) {
if (_root.banzaiTimer >= 0 && _root.banzaiTimer <= 5) {
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
if (_root.bulletNo == 6) {
i = 0;
while (i < 5) {
c = new Color(_root.Bullet[i]);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
++i;
}
}
if (_root.bulletNo == 14) {
c = new Color(_root.Bullet.kSpark);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
c = new Color(_root.Bullet.kFlash);
c.setTint(0, 0, 0, 20 * _root.banzaiTimer);
}
} else {
if (_root.banzaiTimer <= 9) {
_root.Bullet._yscale = 100 - (_root.banzaiTimer - 5) * 20;
_root.Bullet._xscale = _root.Bullet._yscale;
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 100);
if (_root.bulletNo == 6) {
i = 0;
while (i < 5) {
c = new Color(_root.Bullet[i]);
c.setTint(0, 0, 0, 100);
++i;
}
}
if (_root.bulletNo == 14) {
c = new Color(_root.Bullet.kSpark);
c.setTint(0, 0, 0, 100);
c = new Color(_root.Bullet.kFlash);
c.setTint(0, 0, 0, 100);
}
} else {
if (_root.banzaiTimer == 10) {
if (_root.bulletNo == 10 || _root.bulletNo == 12) {
_root.Bullet.NyanNyan.removeMovieClip();
}
if (_root.bulletNo == 6) {
i = 0;
while (i < 5) {
_root.Bullet[i].removeMovieClip();
++i;
}
}
_root.camShake += 100;
_root.Bullet.attachMovie('bulletPartExplode', 'bulEx', 2);
_root.Bullet._yscale = 100;
_root.Bullet._xscale = 100;
_root.playSFX('SFXbomb');
_root.playSFX('SFXthunder');
} else {
if (_root.banzaiTimer == 40) {
_root.Bullet.attachMovie('banzaiAppear', 'BulletTrans', 1);
_root.Bullet.BulletTrans.gotoAndStop(_root.bulletNo);
} else {
if (_root.banzaiTimer == 64) {
_root.POWEffect = true;
_root.camShake += 100;
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].thisX(0) < 1000 && !_root.Level.Enemies[v3].enemyDead) {
_root.Level.Enemies[v3].bulletHit();
}
}
i = 0;
while (i < 21) {
k = 0;
while (k < 10) {
_root.Level.Brick[int(Math.round(-_root.Level._x / 48 + i)) + '-' + k].brickHit(this, true);
++k;
}
++i;
}
for (v3 in _root.Level.Plat) {
if (_root.Level.Plat[v3].thisX(0) < 1000) {
_root.Level.Plat[v3].POWEffect();
_root.Level.Plat[v3].POWEffect();
_root.Level.Plat[v3].POWEffect();
}
}
_root.POWEffect = false;
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
_root.playSFX('SFXspinstomp');
_root.Bullet.bulEx.explode();
} else {
if (_root.banzaiTimer >= 70 && _root.banzaiTimer < 75) {
_root.Bullet.bulEx._alpha = 100 - (_root.banzaiTimer - 70) * 20;
} else {
if (_root.banzaiTimer == 75) {
_root.Bullet.BulletTrans.removeMovieClip();
_root.Bullet.attachMovie('BulletBanzai' + _root.bulletNo, 'Bullet', 2);
_root.Bullet.attachMovie('BulletBanzai' + _root.bulletNo, 'BulletHit', 3);
_root.Bullet.BulletHit._alpha = 0;
}
}
}
}
}
}
}
} else {
if (_root.banzaiTimer == 0) {
_root.Bullet.attachMovie('Bullet' + _root.bulletNo, 'BulletHit', 3);
_root.Bullet.BulletHit._alpha = 0;
} else {
if (_root.banzaiTimer <= 5) {
_root.Bullet.bulEx._alpha = _root.banzaiTimer * 20;
} else {
if (_root.banzaiTimer >= 65 && _root.banzaiTimer < 70) {
_root.Bullet._yscale = 100 - (_root.banzaiTimer - 65) * 20;
_root.Bullet._xscale = _root.Bullet._yscale;
} else {
if (_root.banzaiTimer == 70) {
_root.camShake += 100;
_root.Bullet.attachMovie('Bullet' + _root.bulletNo, 'Bullet', 2);
_root.Bullet._yscale = 1;
_root.Bullet._xscale = 1;
_root.Bullet.attachMovie('bulletPartExplode2', 'bulEx', 3);
_root.playSFX('SFXbomb');
_root.playSFX('SFXthunder');
} else {
if (_root.banzaiTimer > 70 && _root.banzaiTimer < 75) {
_root.Bullet._yscale = (_root.banzaiTimer - 70) * 20;
_root.Bullet._xscale = _root.Bullet._yscale;
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 100);
} else {
if (_root.banzaiTimer >= 75) {
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 100 - 20 * (_root.banzaiTimer - 75));
}
}
}
}
}
}
}
if (_root.banzaiTimer == 80 || _root.banzaiTimer == 0) {
_root.banzaiMode = !_root.banzaiMode;
_root.banzaiSwitch = false;
_root.Bullet.bulEx.removeMovieClip();
if (_root.levelScrollPause) {
_root.HUD.Checkpoint.play();
}
}
}
};
startAbility = function () {
_root.noAbility = false;
_root.abilityUsage = true;
if (abilityNo == 1) {
_root.slowDown = true;
_root.Bullet.createEmptyMovieClip('BSlow', 4);
i = 0;
while (i < 10) {
_root.Bullet.BSlow.attachMovie('BulletSlow', i, i);
++i;
}
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 40);
_root.playSFX('SFXslowtime');
}
if (abilityNo == 2) {
_root.Level.Projectiles.createEmptyMovieClip('Bombs', _root.Level.Projectiles.getNextHighestDepth());
}
if (abilityNo == 6) {
_root.POWEffect = true;
_root.camShake += 100;
for (var v3 in _root.Level.Enemies) {
if (_root.Level.Enemies[v3].thisX(0) < 1000 && !_root.Level.Enemies[v3].enemyDead) {
_root.Level.Enemies[v3].bulletHit();
}
}
i = 0;
while (i < 21) {
k = 0;
while (k < 10) {
_root.Level.Brick[int(Math.round(-_root.Level._x / 48 + i)) + '-' + k].brickHit(this, true);
++k;
}
++i;
}
for (v3 in _root.Level.Plat) {
if (_root.Level.Plat[v3].thisX(0) < 1000) {
_root.Level.Plat[v3].POWEffect();
_root.Level.Plat[v3].POWEffect();
_root.Level.Plat[v3].POWEffect();
}
}
_root.POWEffect = false;
_root.playSFX('SFXsuperstomp');
_root.playSFX('SFXbump');
_root.playSFX('SFXspinstomp');
_root.abilityMeter = 0;
useAbility();
}
if (abilityNo == 7) {
_root.Bullet._alpha = 40;
_root.playSFX('SFXboo');
}
if (abilityNo == 8) {
_root.Bullet.attachMovie('abLightning', 'abLightning', 15);
_root.Bullet.abLightning._yscale = 300;
_root.Bullet.abLightning._xscale = 300;
_root.camShake += 100;
_root.Bullet._yscale = 33.33333333333334;
_root.Bullet._xscale = 33.33333333333334;
if (_root.bulletNo == 10) {
for (v3 in _root.Bullet.NyanNyan) {
_root.Bullet.NyanNyan[v3].lightningStrike();
}
_root.Bullet.NyanNyan.rainbowGenerate();
}
_root.playSFX('SFXthunder');
}
if (abilityNo == 9) {
_root.Bullet.createEmptyMovieClip('starSparkle', 100);
_root.Starman = true;
}
};
useAbility = function () {
if (!abilityMeter) {
_root.abilityTimer = 0;
_root.Bullet._alpha = 100;
_root.slowDown = false;
_root.abilityUsage = false;
_root.timeRewind = false;
_root.Starman = false;
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 0);
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
if (abilityNo == 5) {
_root.playSFX('SFXgothit');
_root.levelScrollPause = false;
_root.levelWarp = true;
_root.camShake += 100;
_root.Level.Misc.removeMovieClip();
_root.Level._x = -_root.Level.levelEnd._x * _root.Level._xscale / 100 + 760;
_root.Bullet.Key.gotoAndStop(2);
_root.keyUnlock = false;
if (_root.bulletNo == 10 || _root.bulletNo == 12) {
for (var v2 in _root.Bullet.NyanNyan) {
_root.Bullet.NyanNyan[v2].removeMovieClip();
}
}
}
} else {
if (abilityNo == 2) {
if (!(_root.abilityTimer % 8) || _root.cheatBombs) {
bombPlace = true;
for (var v2 in _root.Level.Projectiles.Bombs) {
if (_root.Level.Projectiles.Bombs[v2].r == 0) {
bombPlace = false;
break;
}
}
if (bombPlace) {
_root.Level.Projectiles.Bombs.attachMovie('Ability2', _root.abilityTimer, _root.Level.Projectiles.Bombs.getNextHighestDepth());
_root.Level.Projectiles.Bombs[_root.abilityTimer].r = 0;
_root.Level.Projectiles.Bombs[_root.abilityTimer]._y = -100;
}
}
}
if (abilityNo == 3) {
if (!(_root.abilityTimer % 3)) {
_root.Level.Projectiles.attachMovie('Ability3', _root.abilityTimer, _root.Level.Projectiles.getNextHighestDepth());
_root.Level.Projectiles[_root.abilityMeter]._y = -100;
}
}
if (abilityNo == 5) {
if (abilityTimer >= 72) {
_root.abilityMeter = 0;
} else {
if (!(_root.abilityTimer % 24)) {
_root.playSFX('SFXitemreel');
}
}
if (!_root.cheatAbility) {
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 90 * _root.abilityTimer / 72);
}
}
if (abilityNo == 7) {
_root.Level.Particles.attachMovie('BulletGhost', _root.abilityTimer, _root.Level.Particles.getNextHighestDepth());
}
if (abilityNo == 8) {
if (_root.abilityTimer < 20) {
if (!(_root.abilityTimer % 3)) {
cs = new Color(_root.Background);
if (!(_root.abilityTimer % 6)) {
cs.setTint(0, 0, 128, 55);
} else {
if (!((_root.abilityTimer + 2) % 6)) {
cs.setTint(0, 128, 0, 55);
} else {
cs.setTint(128, 0, 0, 55);
}
}
}
} else {
if (_root.abilityTimer < 60) {
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 60 - _root.abilityTimer);
} else {
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
}
}
}
if (abilityNo == 9) {
if (!(_root.abilityTimer % 2)) {
_root.Bullet.starSparkle.attachMovie('starShine', _root.abilityTimer, _root.abilityTimer);
_root.Bullet.starSparkle[_root.abilityTimer]._x = random(_root.Bullet.BulletHit._width) - _root.Bullet.BulletHit._width / 2;
_root.Bullet.starSparkle[_root.abilityTimer]._y = random(_root.Bullet.BulletHit._height) - _root.Bullet.BulletHit._height / 2;
}
if (!(_root.abilityTimer % 3)) {
cs = new Color(_root.Bullet.Bullet);
if (!(_root.abilityTimer % 9)) {
cs.setTint(0, 0, 255, 35);
} else {
if (!((_root.abilityTimer + 3) % 9)) {
cs.setTint(0, 255, 0, 35);
} else {
cs.setTint(255, 0, 0, 35);
}
}
}
}
if (abilityNo != 5) {
--_root.abilityMeter;
}
++_root.abilityTimer;
if (_root.abilityMeter < 0) {
_root.abilityMeter = 0;
}
}
};
onEnterFrame = function () {
if (!stillCam && !_root.gamePause) {
if (camShake) {
if (camShake > 100) {
camShake = 100;
}
shakeCamx = random(camShake) - camShake / 2;
shakeCamy = random(camShake) - camShake / 2;
camShake = int(camShake / 1.2);
} else {
if (!camMovement) {
stillCam = true;
}
}
_root._x = shakeCamx;
_root._y = shakeCamy;
if (!_root.gameFinished || _root.fireworkShow || _root.banzaiSwitch) {
_root.HUD._x = -_root._x;
_root.HUD._y = -_root._y;
}
}
if (camMovement && stillCam) {
camShake = 0;
stillCam = false;
}
if (!_root.switchCharAb) {
_root.HUD.pScore.score.text = _root.score + _root.prevScore * _root.gameLoaded;
}
if (gameStart) {
if (gamePlay) {
_root.Background._x -= (1 + _root.banzaiMode * 2) * (_root.prisonScene ? !_root.lakituPrison.cageLeave * -Math.sin(Math.PI * ((_root.lakituPrison._y / 400) * 90) / 180) : 1) * (_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * (!_root.banzaiSwitch ? 1 : (!_root.banzaiMode ? (_root.banzaiTimer >= 75 ? ((_root.banzaiTimer - 75) / 5) * 3 : 0) : (40 + _root.banzaiTimer) / 120)) * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] / 2 + 0.5) / (_root.slowDown + 1);
_root.Level._x -= (1 + _root.banzaiMode * 2) * (_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * (!_root.banzaiSwitch ? 1 : (_root.gameFinished ? 1 : (_root.banzaiTimer >= 75 ? ((_root.banzaiTimer - 75) / 5) * 3 : 0))) * !_root.levelScrollPause * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9) / (_root.slowDown + 1);
if (_root.keyUnlock) {
_root.Level.Enemies.0._x += (1 + _root.banzaiMode * 2) * (_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1) * !_root.gamePause * (!_root.banzaiSwitch ? 1 : (_root.gameFinished ? 1 : 0)) * !_root.levelScrollPause * !_root.warpZone * !_root.gameRestart * (_root.BulletSpeed[_root.bulletNo] * (9 + _root.Starman * 5) + 9) / 3 * (_root.slowDown + 1);
}
_root.levelEndDepth._x = _root.Level.levelEnd._x * (_root.Level._xscale / 100) + _root.Level._x;
if (!_root.abilityUsage) {
if (!gamePause) {
_root.Bullet._xscale += (100 - _root.Bullet._xscale) / 5;
_root.Bullet._yscale = _root.Bullet._xscale;
if (_root.bulletNo == 10) {
for (var v2 in _root.Bullet.NyanNyan) {
_root.Bullet.NyanNyan[v2].lightningStrike();
}
}
}
}
if (!gameFinished) {
if (!gamePause) {
if (_root.gameRestart && _root.Bullet._currentframe == _root.Bullet._totalframes) {
if (_root.abilityMeter >= 160 && abilityNo == 4 && !_root.switchCharAb) {
_root.timeRewind = true;
_root.abilityUsage = true;
_root.noAbility = false;
_root.playSFX('SFXfeather');
} else {
restartVariables();
}
}
if (_root.HUD.Checkpoint == undefined && _root.BulletIntro == undefined && !_root.gameRestart && (Key.isDown(13) || Key.isDown(4) || Key.isDown(27) || Key.isDown(32)) && !EnterButtonDown && _root.levelEndDepth._x > _root.Bullet._x && !_root.warpZone) {
gamePause = true;
if (_root.hideMouse) {
Mouse.show();
}
_root.playSFX('SFXpause');
_root.attachMovie('pauseMenu' + _root.levelCreate / 1, 'pauseMenu', 11);
_root.pauseMenu._y = -250 - _root._y;
_root.pauseMenu._x = 250 - _root._x;
_root.Bullet.Bullet.stop();
}
if (!_root.gameRestart) {
if (_root.abilityUsage) {
if (_root.leftButtonDetect() && _root.cheatAbility && !LeftButtonDown && !_root.warpZone) {
_root.abilityMeter = 0;
}
useAbility();
} else {
if (_root.abilityMeter >= 160 && _root.abilityNo != 4 && !_root.warpZone && !_root.banzaiSwitch && !_root.banzaiMode) {
if (_root.leftButtonDetect() && !LeftButtonDown) {
startAbility();
}
} else {}
}
if (!_root.timeRewind && (_root.abilityMeter > 160 || _root.cheatAbility)) {
_root.abilityMeter = 160;
}
if (_root.getDizzy) {
_root.camShake += _root.getDizzy < 10 ? _root.getDizzy / 5 : 2;
if (_root.getDizzy < 10 && !_root.timeRewind) {
_root.getDizzy -= _root.getDizzy / 10;
} else {
_root.getDizzy -= (1 / (1 + _root.slowDown)) * (_root.timeRewind ? Math.cos(Math.PI * _root.abilityMeter / 30) : 1);
}
if (_root.getDizzy < 0.1) {
_root.getDizzy = 0;
}
c2 = new Color(_root);
c2.setTint(64 * (1 + Math.sin(Math.PI * (_root.getDizzy * 18) / 180)), 64 * (1 - Math.cos(Math.PI * (_root.getDizzy * 18) / 180)), 64 * (1 + Math.cos(Math.PI * (_root.getDizzy * 18) / 180)), _root.getDizzy < 10 ? _root.getDizzy * 5 : 48);
} else {
c2 = new Color(_root);
c2.setTint(0, 0, 0, 0);
}
_root.Level._y = 16 * Math.sin(Math.PI * (_root.getDizzy * 18) / 180);
playhitSFX();
} else {
if (_root.timeRewind) {
if (_root.Bullet._currentframe == 1) {
_root.gameRestart = false;
_root.xTemp = _root.Bullet._x;
_root.yTemp = _root.Bullet._y;
_root.attachMovie('Bullet', 'Bullet', 5);
c = new Color(_root.Bullet);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
_root.Bullet._x = _root.xTemp;
_root.Bullet._y = _root.yTemp;
if (_root.keyRewind) {
_root.Bullet.attachMovie('Key', 'Key', 9);
_root.Bullet.Key._x = -48;
_root.Level.Enemies.attachMovie('Phantos', '0', _root.Level.Enemies.getNextHighestDepth());
_root.keyUnlock = true;
_root.keyRewind = false;
}
_root.abilityMeter = 30;
_root.camShake += 20;
} else {
_root.Bullet.gotoAndStop(_root.Bullet._currentframe - 1);
}
}
}
} else {
_root.pauseMenu._y -= (_root.pauseMenu._y + _root._y) / 4;
_root.pauseMenu._x -= (_root.pauseMenu._x + _root._x) / 4;
_root.volumeMSC(10 + 90 * (_root.pauseMenu._x / 250));
if ((Key.isDown(13) || Key.isDown(4) || Key.isDown(27) || Key.isDown(32)) && !EnterButtonDown && !_root.SMB2MessageUp && !_root.warpZone && _root.pauseMenu.CharAbSel.selectType == '') {
gamePause = false;
if (_root.hideMouse) {
Mouse.hide();
}
_root.volumeMSC(100);
_root.Bullet.Bullet.play();
if (_root.bulletNo != _root.pauseMenu.tempBullet) {
_root.prevScore -= int(_root.prevScore / 200) * 100;
if (int(prevScore / 100) == int((prevScore + 1) / 100)) {
++_root.prevScore;
}
}
if (_root.abilityNo != _root.pauseMenu.tempAbility) {
_root.prevScore -= int(_root.prevScore / 300) * 100;
if (int(prevScore / 100) == int((prevScore + 1) / 100)) {
++_root.prevScore;
}
}
if (_root.bulletNo != _root.pauseMenu.tempBullet || _root.abilityNo != _root.pauseMenu.tempAbility) {
_root.switchCharAb = true;
bulletDead();
}
_root.pauseMenu.removeMovieClip();
}
}
if (_root.levelEndDepth._x < -250 || _root.fireworkShow) {
_root.gameFinished = true;
if (_root.secretLevel) {
_root.keyUnlock = true;
}
_root.gamePause = false;
_root.createEmptyMovieClip('Fireworks', 2);
if (_root.levelStyle == 3) {
c = new Color(_root.Fireworks);
c.setTint(0, 35, 255, 35);
}
}
} else {
_root.Bullet._yscale = 100;
_root.Bullet._xscale = 100;
_root.Bullet._alpha = 100;
_root.slowDown = false;
_root.abilityUsage = false;
_root.timeRewind = false;
_root.Starman = false;
if (_root.banzaiMode) {
_root.banzaiSwitch = true;
}
c = new Color(_root.Bullet.Bullet);
c.setTint(0, 0, 0, 0);
cs = new Color(_root.Background);
cs.setTint(0, 0, 0, 0);
c2 = new Color(_root);
c2.setTint(0, 0, 0, 0);
if (!_root.endStatShow) {
if (_root.fireworkShow) {
if (fireworkCount / 50 == int(fireworkCount / 50)) {
_root.Fireworks.attachMovie('endLevelFireworks', 'endLevelFireworks' + fireworkCount / 50, int(fireworkCount / 50));
_root.Fireworks['endLevelFireworks' + fireworkCount / 50]._y = random(300) + 100;
_root.Fireworks['endLevelFireworks' + fireworkCount / 50]._x = random(550) + 100;
}
if (fireworkCount == 0) {
_root.playMSC('MSC-FAN', false);
}
++fireworkCount;
if (fireworkCount >= 110) {
_root.totakaSong = 0;
_root.fireworkShow = false;
}
} else {
if (!_root.banzaiSwitch) {
if (!_root.keyUnlock) {
_root.HUD._y -= 1 - _root.HUD._y;
_root.HUD._y = -Math.abs(_root.HUD._y);
if (!fireworkCount) {
_root.volumeMSC(100 + 100 * _root.HUD._y / _root.HUD._height);
}
if (_root.HUD._y <= -_root.HUD._height) {
_root.HUD.removeMovieClip();
_root.endStatShow = true;
if (_root.levelCreate && !_root.levelEdit) {
_root.attachMovie('levelVote', 'levelVote', 11);
_root.levelVote._x = 375;
_root.levelVote._y = 520;
} else {
if (!_root.secretLevel) {
_root.attachMovie('endStats', 'endStats', 11);
} else {
_root.attachMovie('secretEndStats', 'endStats', 11);
}
_root.endStats._x = 775;
if (!fireworkCount) {
_root.stopMSC();
_root.playMSC('MSC-WIN', true);
_root.volumeMSC(0);
}
}
}
} else {
if (!_root.prisonScene) {
if (_root.secretLevel) {
_root.attachMovie('lakituBonus', 'lakituPrison', 4);
} else {
_root.attachMovie('lakituPrison', 'lakituPrison', 4);
_root.Bullet.Key.removeMovieClip();
_root.attachMovie('Key', 'keyPrison', 6);
_root.keyPrison._x = _root.Bullet._x - 48;
_root.keyPrison._y = _root.Bullet._y;
c = new Color(_root.keyPrison);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
}
_root.lakituPrison._x = 375;
_root.lakituPrison._y = -400;
c = new Color(_root.lakituPrison);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
_root.prisonScene = true;
}
}
}
}
} else {
if (_root.levelVote == undefined) {
if (_root.lakituBonus == undefined) {
endStats._x -= (endStats._x - 540) / 5;
}
if (!fireworkCount) {
_root.volumeMSC(100 * (775 - endStats._x) / 235);
}
if (Math.round(endStats._x) == 540) {
if (fireworkCount && _root.prisonScene) {
++_root.totakaSong;
if (_root.totakaSong == 5312) {
_root.fireworkCount = 0;
_root.totakaSong = 0;
_root.volumeMSC(100);
} else {
if (_root.totakaSong > 5248) {
_root.volumeMSC(100 * (_root.totakaSong - 5248) / 64);
} else {
if (_root.totakaSong == 5248) {
_root.stopMSC();
_root.playMSC('MSC-WIN', true);
_root.volumeMSC(0);
} else {
if (_root.totakaSong == 4864) {
_root.stopMSC();
_root.playMSC('BB3-TTK', false);
_root.volumeMSC(100);
} else {
if (_root.totakaSong >= 4800 && _root.totakaSong < 4864) {
_root.volumeMSC(100 * (4864 - _root.totakaSong) / 64);
}
}
}
}
}
}
if (_root.leftButtonDetect() && !_root.SMB2MessageUp) {
if (!_root.secretLevel) {
nextLevel();
} else {
if (_root.autoSave || _root.firstLevel) {
_root.quitToMenu();
} else {
_root.attachMovie('SMB2MessageSecret', 'SMB2Message', 12);
_root.SMB2MessageUp = true;
}
}
}
}
}
}
}
if (_root.banzaiSwitch && !_root.gamePause) {
_root.banzaiAni();
}
}
} else {
if (_root.introAniFinish) {
gameStart = true;
_root.attachMovie('Bullet', 'Bullet', 5);
if (_root.cheatBanzai) {
_root.banzaiAni();
}
c = new Color(_root.Bullet);
if (_root.levelStyle == 3) {
c.setTint(0, 35, 255, 35);
}
_root.Bullet._x = 90;
_root.Bullet._y = 230;
}
}
if (Key.isDown(13) || Key.isDown(4) || Key.isDown(27) || Key.isDown(32)) {
EnterButtonDown = true;
} else {
EnterButtonDown = false;
}
if (_root.leftButtonDetect()) {
LeftButtonDown = true;
} else {
LeftButtonDown = false;
}
medalPosition();
};
}
frame 46 {
stop();
_root.levelCreate = true;
_root.gameStart = false;
_root.createOverlay = false;
_root.levelStyle = 1;
_root.levelNuke = false;
_root.levelPos = -73;
objectHolding = '';
contPlace = true;
onScreen = false;
addingOb = false;
creationMode = true;
addLevel = false;
_root.stopMSC();
_root.playMSC('MSC-PNT', true);
_root.volumeMSC(100);
createLevelCreate = function (levelCode) {
_root.levelCreateBase(_root, _root['Level_' + levelCode], 'Level', 'Creator', 2, 2);
};
levelRestart = function () {
createLevelCreate(_root.levelNo);
_root.Level._x = _root.levelPos;
_root.Level._y = 26;
_root.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
};
levelStart = function () {
_root.attachMovie('createBackground', 'Background', 1);
_root.Background._x = 55;
_root.Background._y = 25;
_root.Background._yscale = 66.66666666666666;
_root.Background._xscale = 66.66666666666666;
_root.attachMovie('levelGrid', 'levelGrid', 4);
_root.levelGrid._y = 32;
_root.levelGrid._x = 55;
_root.levelGrid._alpha = 0;
_root.levelGrid._yscale = 66.66666666666666;
_root.levelGrid._xscale = 66.66666666666666;
_root.attachMovie('levelOverlay', 'levelOverlay', 5);
_root.levelOverlay._y = -319;
_root.levelOverlay._x = 55;
_root.attachMovie('createWindow', 'createWindow', 6);
_root.attachMovie('createTools', 'createTools', 7);
_root.createTools._x = 55;
_root.createTools._y = 400;
_root.attachMovie('createTools2', 'createTools2', 8);
_root.createTools2._x = 55;
_root.createTools2._y = 460;
levelRestart();
};
addToLevel = function () {
moveLevel = _root.addLevel ? 1 : -1;
_root.levelSaved = false;
if (objectHolding == '&') {
if (_root.heldObject._currentframe == 2 - _root.addLevel) {
_root.heldObject.gotoAndStop(1 + _root.addLevel);
xPos = Math.round((_root.heldObject._x - _root.Level._x) / 32);
for (var v4 in _root.Level.Plat) {
var v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (_root.Level.Plat[v4].hitTest(_root.heldObject.delCheck)) {
if (_root.addLevel) {
if (obXpos < xPos) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Plat[v4].removeMovieClip();
plat1Width = 0;
plat2Width = 0;
if (obType == '[' || obType == ']') {
plat1Width = 4;
} else {
if (obType == '{' || obType == '}') {
plat1Width = 3;
} else {
if (obType == '<' || obType == '>') {
plat1Width = 2;
} else {
if (obType == '(' || obType == ')') {
plat1Width = 1;
}
}
}
}
plat2Width = plat1Width - (xPos - obXpos);
plat1Width -= plat2Width;
obType1 = '';
obType2 = '';
i = 1;
while (i < 3) {
if (this['plat' + i + 'Width'] == 4) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '[';
} else {
this['obType' + i] = ']';
}
} else {
if (this['plat' + i + 'Width'] == 3) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '{';
} else {
this['obType' + i] = '}';
}
} else {
if (this['plat' + i + 'Width'] == 2) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '<';
} else {
this['obType' + i] = '>';
}
} else {
if (this['plat' + i + 'Width'] == 1) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '(';
} else {
this['obType' + i] = ')';
}
}
}
}
}
++i;
}
creationObjectGenerator(_root.Level, obXpos / 1, obYpos / 1, 1, obType1);
creationObjectGenerator(_root.Level, plat1Width + obXpos / 1, obYpos / 1, 1, obType2);
}
} else {
if (obXpos <= xPos) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Plat[v4].removeMovieClip();
plat1Width = 0;
if (obType == '[' || obType == ']') {
plat1Width = 4;
} else {
if (obType == '{' || obType == '}') {
plat1Width = 3;
} else {
if (obType == '<' || obType == '>') {
plat1Width = 2;
} else {
if (obType == '(' || obType == ')') {
plat1Width = 1;
}
}
}
}
--plat1Width;
obType1 = '';
i = 1;
while (i < 2) {
if (this['plat' + i + 'Width'] == 4) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '[';
} else {
this['obType' + i] = ']';
}
} else {
if (this['plat' + i + 'Width'] == 3) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '{';
} else {
this['obType' + i] = '}';
}
} else {
if (this['plat' + i + 'Width'] == 2) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '<';
} else {
this['obType' + i] = '>';
}
} else {
if (this['plat' + i + 'Width'] == 1) {
if (objectOrientation(obType) > 0) {
this['obType' + i] = '(';
} else {
this['obType' + i] = ')';
}
}
}
}
}
++i;
}
creationObjectGenerator(_root.Level, (obXpos == xPos) ? obXpos / 1 + 1 : obXpos / 1, obYpos / 1, 1, obType1);
}
}
}
}
for (v4 in _root.Level.Plat) {
v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (!_root.addLevel && _root.Level.Plat[v4].hitTest(_root.heldObject.delCheck)) {
} else {
if (obXpos >= xPos) {
obXpos = int(obXpos / 1 + moveLevel);
_root.Level.offLimits[v4]._x += 16 * moveLevel;
_root.Level.offLimits[v4]._name = obType + '' + obXpos + '-' + obYpos;
_root.Level.Plat[v4]._x += 16 * moveLevel;
_root.Level.Plat[v4]._name = obType + '' + obXpos + '-' + obYpos;
}
}
}
for (v4 in _root.Level.Coins) {
v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (!_root.addLevel && _root.Level.Coins[v4].hitTest(_root.heldObject.delCheck)) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Coins[v4].removeMovieClip();
} else {
if (obXpos >= xPos) {
obXpos = int(obXpos / 1 + moveLevel);
_root.Level.offLimits[v4]._x += 16 * moveLevel;
_root.Level.offLimits[v4]._name = obType + '' + obXpos + '-' + obYpos;
_root.Level.Coins[v4]._x += 16 * moveLevel;
_root.Level.Coins[v4]._name = obType + '' + obXpos + '-' + obYpos;
}
}
}
for (v4 in _root.Level.Brick) {
v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (!_root.addLevel && _root.Level.Brick[v4].hitTest(_root.heldObject.delCheck)) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Brick[v4].removeMovieClip();
} else {
if (obXpos >= xPos) {
obXpos = int(obXpos / 1 + moveLevel);
_root.Level.offLimits[v4]._x += 16 * moveLevel;
_root.Level.offLimits[v4]._name = obType + '' + obXpos + '-' + obYpos;
_root.Level.Brick[v4]._x += 16 * moveLevel;
_root.Level.Brick[v4]._name = obType + '' + obXpos + '-' + obYpos;
}
}
}
for (v4 in _root.Level.Enemies) {
v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (!_root.addLevel && _root.Level.Enemies[v4].hitTest(_root.heldObject.delCheck)) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Enemies[v4].removeMovieClip();
} else {
if (obXpos >= xPos) {
obXpos = int(obXpos / 1 + moveLevel);
_root.Level.offLimits[v4]._x += 16 * moveLevel;
_root.Level.offLimits[v4]._name = obType + '' + obXpos + '-' + obYpos;
_root.Level.Enemies[v4]._x += 16 * moveLevel;
_root.Level.Enemies[v4]._name = obType + '' + obXpos + '-' + obYpos;
}
}
}
for (v4 in _root.Level.Misc) {
v3 = v4.split('');
obXpos = '';
i = 1;
while (i < v3.length - 2) {
obXpos = obXpos + '' + v3[i];
++i;
}
obYpos = v3[v3.length - 1];
obType = v3[0];
if (!_root.addLevel && _root.Level.Misc[v4].hitTest(_root.heldObject.delCheck)) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Misc[v4].removeMovieClip();
} else {
if (obXpos >= xPos) {
obXpos = int(obXpos / 1 + moveLevel);
_root.Level.offLimits[v4]._x += 16 * moveLevel;
_root.Level.offLimits[v4]._name = obType + '' + obXpos + '-' + obYpos;
_root.Level.Misc[v4]._x += 16 * moveLevel;
_root.Level.Misc[v4]._name = obType + '' + obXpos + '-' + obYpos;
}
}
}
}
} else {
if (objectHolding != 'del') {
obPlace = true;
for (var v4 in _root.Level.offLimits) {
if (_root.heldObject.hitTest(_root.Level.offLimits[v4])) {
obPlace = false;
}
}
if (obPlace) {
xPos = Math.round((_root.heldObject._x - _root.Level._x) / 32);
if (objectHolding != 'z') {
yPos = (_root.heldObject._y - _root.Level._y - 7) / 32 + (_root.heldObject._yscale < 0 ? -1 : 0);
} else {
yPos = (int((_root._ymouse - (_root.levelGrid._y + 1)) / 32) * 32 + 49 - 16 * (_root.heldObject._yscale * 3 / 2 / 100) - _root.Level._y - 7) / 32 + (_root.heldObject._yscale < 0 ? -1 : 0);
}
creationObjectGenerator(_root.Level, xPos, yPos, 1, objectHolding);
if (!contPlace) {
addingOb = false;
contPlace = true;
attachObject('');
}
}
} else {
for (var v4 in _root.Level.offLimits) {
if (_root.heldObject.hitTest(_root.Level.offLimits[v4])) {
var v3 = v4.split('');
_root.Level.offLimits[v4].removeMovieClip();
_root.Level[objectSection(v3[0])][v4].removeMovieClip();
obPlace = false;
}
}
for (v4 in _root.Level.Enemies) {
if (_root.Level.Enemies[v4].thisX(0) < 1000 && _root.Level.Enemies[v4].thisX(0) > -500) {
if (!_root.Level.Enemies[v4].floorCheck()) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Enemies[v4].removeMovieClip();
}
}
}
for (v4 in _root.Level.Misc) {
if (_root.Level.Misc[v4].thisX(0) < 1000 && _root.Level.Misc[v4].thisX(0) > -500) {
if (!_root.Level.Misc[v4].floorCheck()) {
_root.Level.offLimits[v4].removeMovieClip();
_root.Level.Misc[v4].removeMovieClip();
}
}
}
}
}
};
attachObject = function (Ob) {
contPlace = true;
objectHolding = Ob;
if (Ob == '') {
_root.heldObject.removeMovieClip();
} else {
_root.attachMovie(objectName(Ob), 'heldObject', 3);
_root.heldObject._xscale = 66.66666666666666;
_root.heldObject._yscale = 0.6666666666666666 * objectOrientation(Ob);
}
_root.heldObject._alpha = 0;
_root.heldObject.onPress = function () {
_root.addingOb = true;
};
_root.heldObject.onRelease = function () {
_root.addingOb = false;
};
};
unLoadAssets = function () {
_root.stopMSC();
heldObject.removeMovieClip();
Level.removeMovieClip();
Background.removeMovieClip();
levelGrid.removeMovieClip();
levelOverlay.removeMovieClip();
createWindow.removeMovieClip();
createTools.removeMovieClip();
createTools2.removeMovieClip();
SMB2Message.removeMovieClip();
};
switchStyle = function (Ls) {
_root.levelStyle = Ls;
_root.levelOverlay.dropOverlay(5);
};
levelImpossibleCheck = function () {
if (_root.medalCheck('MEDAL_IMPOSSIBLE_LEVEL')) {
_root.levelCreateBase(_root, _root['Level_' + _root.levelNo], 'iC', 'Creator', 9001, 1);
iCWidth = _root.iC._width;
_root.iC.offLimits.removeMovieClip();
_root.iC.attachMovie('levelImpossibleCheck', 'liC', 9);
_root.iC.liC._x = 0;
while (_root.iC.liC._x < iCWidth) {
_root.iC.liC._y = 3.333333333333334;
while (_root.iC.liC._y < 150) {
if (_root.iC.Plat.hitTest(_root.iC.liC)) {
platHit = false;
for (var v2 in _root.iC.Plat) {
if (_root.iC.Plat[v2].hitTest(_root.iC.liC)) {
platHit = true;
break;
}
}
if (!platHit) {
break;
}
} else {
break;
}
_root.iC.liC._y += 16;
}
if (_root.iC.liC._y >= 150) {
_root.medalUnlock('MEDAL_IMPOSSIBLE_LEVEL');
break;
}
_root.iC.liC._x += 16;
}
_root.iC.removeMovieClip();
}
};
levelCodeCalc = function () {
_root.Level.offLimits.removeMovieClip();
_root['Level_' + _root.levelNo] = _root.levelStyle;
levelSect = 0;
finishCheck = false;
while (!finishCheck) {
++levelSect;
_root.Level.attachMovie('levelCheck', 'levelCheck', 9);
_root.Level.levelCheck._x = levelSect * 16;
if (!(levelSect % 4) && !prevStop) {
_root['Level_' + _root.levelNo] += '/';
}
prevStop = false;
if (_root.Level.Plat.hitTest(_root.Level.levelCheck)) {
for (var v3 in _root.Level.Plat) {
var v2 = v3.split('');
obXpos = '';
i = 1;
while (i < v2.length - 2) {
obXpos = obXpos + '' + v2[i];
++i;
}
obYpos = v2[v2.length - 1];
obType = v2[0];
if (obXpos == levelSect) {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obYpos + '' + obType;
_root.Level.Plat[v3].removeMovieClip();
}
}
}
if (_root.Level.Coins.hitTest(_root.Level.levelCheck)) {
for (v3 in _root.Level.Coins) {
v2 = v3.split('');
obXpos = '';
i = 1;
while (i < v2.length - 2) {
obXpos = obXpos + '' + v2[i];
++i;
}
obYpos = v2[v2.length - 1];
obType = v2[0];
if (obXpos == levelSect) {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obYpos + '' + obType;
_root.Level.Coins[v3].removeMovieClip();
}
}
}
if (_root.Level.Brick.hitTest(_root.Level.levelCheck)) {
for (v3 in _root.Level.Brick) {
v2 = v3.split('');
obXpos = '';
i = 1;
while (i < v2.length - 2) {
obXpos = obXpos + '' + v2[i];
++i;
}
obYpos = v2[v2.length - 1];
obType = v2[0];
if (obXpos == levelSect) {
brickAmount = 1;
for (;;) {
if (!(_root.Level.Brick[obType + (obXpos * 1 + brickAmount - 1) + '-' + obYpos] && brickAmount < 9)) break;
_root.Level.Brick[obType + (obXpos * 1 + brickAmount - 1) + '-' + obYpos].removeMovieClip();
++brickAmount;
}
--brickAmount;
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obYpos + '' + obType + '' + brickAmount;
}
}
}
if (_root.Level.Enemies.hitTest(_root.Level.levelCheck)) {
for (v3 in _root.Level.Enemies) {
v2 = v3.split('');
obXpos = '';
i = 1;
while (i < v2.length - 2) {
obXpos = obXpos + '' + v2[i];
++i;
}
obYpos = v2[v2.length - 1];
obType = v2[0];
if (obXpos == levelSect) {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obYpos + '' + obType;
_root.Level.Enemies[v3].removeMovieClip();
}
}
}
if (_root.Level.Misc.hitTest(_root.Level.levelCheck)) {
for (v3 in _root.Level.Misc) {
v2 = v3.split('');
obXpos = '';
i = 1;
while (i < v2.length - 2) {
obXpos = obXpos + '' + v2[i];
++i;
}
obYpos = v2[v2.length - 1];
obType = v2[0];
if (obXpos == levelSect) {
if (obType == '+') {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obType;
levelSect += 11;
prevStop = true;
} else {
if (obType == 'z') {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + _root.Level.Misc[v3].koopaNo + '' + obType;
levelSect += 7;
prevStop = true;
} else {
_root['Level_' + _root.levelNo] += (!(levelSect % 4) ? '' : 'a' + levelSect % 4) + obYpos + '' + obType;
}
}
_root.Level.Misc[v3].removeMovieClip();
}
}
}
_root.Level.levelCheck.removeMovieClip();
if (!_root.Level._width) {
finishCheck = true;
}
}
};
testLevel = function () {
++_root.testLevelChain;
if (_root.testLevelChain >= 10) {
_root.medalUnlock('MEDAL_TEST_LEVEL');
}
_root.unLoadAssets();
_root.StageNo = 0;
_root.gotoAndStop(_root.gameFrame);
};
quitToMenu = function () {
_root.unLoadAssets();
_root._x = 0;
_root._y = 0;
_root.gotoAndStop(_root.titleFrame);
};
startNuke = function () {
levelPosTemp = _root.Level._x;
_root.levelCodeCalc();
_root.levelNuke = true;
attachObject('');
_root.attachMovie('nukeMask', 'nukeMask', 3);
_root.nukeMask._x = 62;
_root.nukeMask._y = 32;
_root.nukeMask.maskanGaems.attachMovie('createBackground', 'Background', 1);
_root.nukeMask.maskanGaems.Background._yscale = 66.66666666666666;
_root.nukeMask.maskanGaems.Background._xscale = 66.66666666666666;
_root.nukeMask.maskanGaems.Background.gotoAndStop(int(_root.levelStyle / 1 + 1));
_root.levelCreateBase(_root.nukeMask.maskanGaems, _root.Level_Custom, 'levelDisplay', 'Creator', 2, 2);
_root.nukeMask.maskanGaems.levelDisplay._x = -55 + levelPosTemp;
_root.nukeMask.maskanGaems.levelDisplay._y = 1;
_root.Level.removeMovieClip();
_root.Level_Custom = _root.levelStyle;
_root.levelSaved = true;
_root.levelRestart();
_root.levelPos = -73;
_root.medalUnlock('MEDAL_NUKE_LEVEL');
};
levelStart();
attachObject('');
onEnterFrame = function () {
if (_root.customLevelNames[0] == '') {
_root.levelOverlay.dropOverlay(6);
}
_root.Level._x -= (_root.Level._x - _root.levelPos) / 5;
_root.levelGrid._x = 55 - (-9 - _root.Level._x) % 32;
if (_root.levelNuke) {
_root.nukeMask._y += (_root.nukeMask._y - 31) / 5;
if (_root.nukeMask._y > 500) {
_root.nukeMask.removeMovieClip();
_root.levelNuke = false;
}
} else {
if (_root._xmouse > 55 && _root._xmouse < 695 && _root._ymouse > 25 && _root._ymouse < 350) {
onScreen = true;
_root.heldObject._alpha = 100;
_root.heldObject._x = int((_root._xmouse - _root.levelGrid._x) / 32) * 32 + _root.levelGrid._x;
if (objectHolding != '+' && objectHolding != 'z' && objectHolding != '&') {
_root.heldObject._y = int((_root._ymouse - (_root.levelGrid._y + 1)) / 32) * 32 + 49 - 16 * (_root.heldObject._yscale * 3 / 2 / 100);
} else {
_root.heldObject._y = int((32 - (_root.levelGrid._y + 1)) / 32) * 32 + 49 - 16 * (_root.heldObject._yscale * 3 / 2 / 100);
}
_root.heldObject.enemyFloorFind();
} else {
onScreen = false;
_root.addingOb = false;
_root.heldObject._alpha = 0;
_root.heldObject._x = 1000;
_root.heldObject._y = 1000;
if (_root.leftButtonDetect() && _root.levelOverlay._currentframe != 5) {
if (_root.levelOverlay.overlayState == 1 && _root.customLevelNames[0] != '') {
_root.levelOverlay.overlayState = 2;
}
}
}
if (onScreen && objectHolding) {
if (!_root.leftButtonDetect()) {
_root.addingOb = false;
}
if (_root.addingOb) {
addToLevel();
}
if (_root.leftButtonDetect()) {
_root.addingOb = true;
}
if (Key.isDown(4)) {
attachObject('');
}
_root.Level.offLimits._alpha -= (_root.Level.offLimits._alpha - 35) / 5;
_root.levelGrid._alpha -= (_root.levelGrid._alpha - 50) / 5;
} else {
_root.Level.offLimits._alpha -= _root.Level.offLimits._alpha / 5;
_root.levelGrid._alpha -= _root.levelGrid._alpha / 5;
}
}
medalPosition();
};
}