Frame 1
NewgroundsAPI.connectMovie(5874);
Frame 2
_root.scoreHiscore = 0;
_root.scoreHiscoreB = 0;
_root.scoreMostRecent = 0;
_root.boolModeA = true;
_root.flagSoundOn = true;
_root.flagDead = false;
Frame 7
function updateTime() {
dateNow = new Date();
if (dateNow.getHours() > 12) {
_root.textHours.text = dateNow.getHours() - 12;
} else if (dateNow.getHours() <= 12) {
_root.textHours.text = dateNow.getHours();
}
if (dateNow.getMinutes() > 9) {
_root.textMinutes.text = dateNow.getMinutes();
} else if (dateNow.getMinutes() <= 9) {
_root.textMinutes.text = "0" + dateNow.getMinutes();
}
}
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Instance of Symbol 123 MovieClip "spriteHit" in Frame 7
/* no clip actions */
Frame 19
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 31
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 43
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
_root.spriteDodgeman.gotoAndStop(2);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 55
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
_root.spriteDodgeman.gotoAndStop(1);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 67
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 79
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
_root.spriteDodgeman.gotoAndStop(2);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 91
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 103
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
_root.spriteDodgeman.gotoAndStop(1);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 115
updateTime();
_root.textHiScore.text = _root.scoreHiscore;
_root.spriteDodgeman.gotoAndStop(1);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 127
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
_root.spriteDodgeman.gotoAndStop(1);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 139
updateTime();
_root.textHiScore.text = _root.scoreHiscoreB;
_root.spriteDodgeman.gotoAndStop(1);
if (_root.flagSoundOn) {
_root.iconSound._visible = true;
} else if (!_root.flagSoundOn) {
_root.iconSound._visible = false;
}
Frame 151
gotoAndPlay ("clockLoop");
Frame 152
stop();
if (boolModeA) {
textGameA._visible = true;
textGameB._visible = false;
} else if (!boolModeA) {
textGameA._visible = false;
textGameB._visible = true;
}
if (_root.flagSoundOn) {
_root.soundStart = new Sound();
_root.soundStart.attachSound("soundStart");
_root.soundStart.start(0, 1);
} else if (!_root.flagSoundOn) {
_root.soundStart = new Sound();
_root.soundStart.attachSound("soundStart");
_root.soundStart.start(1.724, 1);
}
soundStart.onSoundComplete = function () {
if (boolModeA) {
gotoAndPlay (153);
} else if (!boolModeA) {
gotoAndPlay (154);
}
};
Frame 153
function hitRecovering() {
if (_root.flagDead == true) {
countHit--;
if (countHit == 0) {
spriteFish13._visible = false;
spriteSoupcan13._visible = false;
spriteFish23._visible = false;
spriteSoupcan23._visible = false;
switch (locHit) {
case "column0" :
spriteDodgeman._visible = true;
break;
case "column1" :
spriteDodgeman2._visible = true;
break;
case "column2" :
spriteDodgeman3._visible = true;
break;
case "column3" :
spriteDodgeman4._visible = true;
}
_root.flagDead = false;
countHit = 20;
if (hitCount == 3) {
hitCount = 4;
_root.flagDead = true;
soundDodgemanMove.stop();
delete soundDodgemanMove;
soundEnemiesMove.stop();
delete soundEnemiesMove;
soundHit.stop();
delete soundHit;
soundStart.stop();
delete soundStart;
if (countScore > _root.scoreHiscore) {
_root.scoreHiscore = countScore;
}
_root.scoreMostRecent = countScore;
gotoAndPlay (155);
}
} else if (countHit > 0) {
countEnemy1 = -3;
countEnemy2 = -2;
countEnemy3 = -4;
countEnemy4 = -1;
i = 0;
while (i < arrayFishSpritesLeft.length) {
arrayFishSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesLeft.length) {
arrayCanSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayFishSpritesRight.length) {
arrayFishSpritesRight[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesRight.length) {
arrayCanSpritesRight[i]._visible = false;
i++;
}
if (locHit == "column0") {
if (boolVisOn) {
spriteDodgeman._visible = true;
spriteFish13._visible = true;
} else if (!boolVisOn) {
spriteDodgeman._visible = false;
spriteFish13._visible = false;
}
} else if (locHit == "column1") {
if (boolVisOn) {
spriteDodgeman2._visible = true;
spriteSoupcan13._visible = true;
} else if (!boolVisOn) {
spriteDodgeman2._visible = false;
spriteSoupCan13._visible = false;
}
} else if (locHit == "column2") {
if (boolVisOn) {
spriteDodgeman3._visible = true;
spriteFish23._visible = true;
} else if (!boolVisOn) {
spriteDodgeman3._visible = false;
spriteFish23._visible = false;
}
} else if (locHit == "column3") {
if (boolVisOn) {
spriteDodgeman4._visible = true;
spriteSoupcan23._visible = true;
} else if (!boolVisOn) {
spriteDodgeman4._visible = false;
spriteSoupCan23._visible = false;
}
}
if (boolVisOn) {
boolVisOn = false;
} else if (!boolVisOn) {
boolVisOn = true;
}
}
}
}
function checkCollisions() {
if ((spriteCurrent == 0) & (countEnemy1 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column0";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 1) & (countEnemy2 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column1";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 2) & (countEnemy3 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column2";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 3) & (countEnemy4 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column3";
hitCount++;
hitRecovering();
}
}
function handleInput() {
var _local1 = com.wiicade.Wii.getRemote(0);
if (_local1.isDown(com.wiicade.WiiRemote.BUTTON_LEFT)) {
if ((spriteCurrent > 0) & (countPressSafety == 0)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent--;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
countPressSafety = 3;
}
}
if (_local1.isDown(com.wiicade.WiiRemote.BUTTON_RIGHT)) {
if ((spriteCurrent < 3) & (countPressSafety == 0)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent++;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
countPressSafety = 3;
}
}
if (countPressSafety > 0) {
countPressSafety--;
}
}
function moveObjects() {
timerMovement--;
if (timerMovement == 0) {
soundEnemiesMove.start(0, 1);
if ((countEnemy1 > -1) & (countEnemy1 < 4)) {
arrayFishSpritesLeft[countEnemy1]._visible = false;
}
countEnemy1++;
if ((countEnemy1 > -1) & (countEnemy1 < 4)) {
arrayFishSpritesLeft[countEnemy1]._visible = true;
}
if ((countEnemy2 > -1) & (countEnemy2 < 4)) {
arrayCanSpritesLeft[countEnemy2]._visible = false;
}
countEnemy2++;
if ((countEnemy2 > -1) & (countEnemy2 < 4)) {
arrayCanSpritesLeft[countEnemy2]._visible = true;
}
if ((countEnemy3 > -1) & (countEnemy3 < 4)) {
arrayFishSpritesRight[countEnemy3]._visible = false;
}
countEnemy3++;
if ((countEnemy3 > -1) & (countEnemy3 < 4)) {
arrayFishSpritesRight[countEnemy3]._visible = true;
}
if ((countEnemy4 > -1) & (countEnemy4 < 4)) {
arrayCanSpritesRight[countEnemy4]._visible = false;
}
countEnemy4++;
if ((countEnemy4 > -1) & (countEnemy4 < 4)) {
arrayCanSpritesRight[countEnemy4]._visible = true;
}
checkCollisions();
if (countEnemy1 == 3) {
countEnemy1 = -countGoneFor1;
countScore++;
textScore.text = countScore;
}
if (countEnemy2 == 3) {
countEnemy2 = -countGoneFor2;
countScore++;
textScore.text = countScore;
}
if (countEnemy3 == 3) {
countEnemy3 = -countGoneFor3;
countScore++;
textScore.text = countScore;
}
if (countEnemy4 == 3) {
countEnemy4 = -countGoneFor4;
countScore++;
textScore.text = countScore;
}
timerMovement = speedMovement;
if (countScore == 20) {
speedMovement = 6;
}
if (countScore == 70) {
speedMovement = 3;
}
if (countScore == 200) {
speedMovement = 2;
}
}
}
function adjustLifeBar() {
if (hitCount == 1) {
iconLife1._visible = true;
}
if (hitCount == 2) {
iconLife2._visible = true;
}
if (hitCount == 3) {
iconLife3._visible = true;
}
}
com.wiicade.Wii.getRemote(1).setRotated(true);
com.wiicade.Wii.getRemote(0).setRotated(true);
boolInThisScene = true;
arrayDMSprites = [spriteDodgeman, spriteDodgeman2, spriteDodgeman3, spriteDodgeman4];
arrayFishSpritesLeft = [spriteFish11, spriteFish12, spriteFish13];
arrayCanSpritesLeft = [spriteSoupcan11, spriteSoupcan12, spriteSoupcan13];
arrayFishSpritesRight = [spriteFish21, spriteFish22, spriteFish23];
arrayCanSpritesRight = [spriteSoupcan21, spriteSoupcan22, spriteSoupcan23];
arrayLifeBar = [iconLife1, iconLife2, iconLife3];
spriteCurrent = 0;
timerMovement = 12;
speedMovement = 12;
arrayDMSprites[1]._visible = false;
arrayDMSprites[2]._visible = false;
arrayDMSprites[3]._visible = false;
i = 0;
while (i < arrayFishSpritesLeft.length) {
arrayFishSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesLeft.length) {
arrayCanSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayFishSpritesRight.length) {
arrayFishSpritesRight[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesRight.length) {
arrayCanSpritesRight[i]._visible = false;
i++;
}
iconLife1._visible = false;
iconLife2._visible = false;
iconLife3._visible = false;
countPressSafety = 0;
countScore = 0;
countEnemy1 = -3;
countEnemy2 = -2;
countEnemy3 = -4;
countEnemy4 = -1;
countGoneFor1 = 2;
countGoneFor2 = 3;
countGoneFor3 = 4;
countGoneFor4 = 1;
countHit = 20;
locHit = "null";
boolVisOn = true;
hitCount = 0;
if (_root.flagSoundOn == true) {
soundDodgemanMove = new Sound();
soundDodgemanMove.attachSound("soundDodgemanMove");
soundEnemiesMove = new Sound();
soundEnemiesMove.attachSound("soundEnemiesMove");
soundHit = new Sound();
soundHit.attachSound("soundHit");
}
onEnterFrame = function () {
if (boolInThisScene) {
adjustLifeBar();
hitRecovering();
if (_root.flagDead == false) {
handleInput();
moveObjects();
incrementScore();
}
}
};
stop();
Frame 154
function hitRecovering() {
if (_root.flagDead == true) {
countHit--;
if (countHit == 0) {
spriteFish13._visible = false;
spriteSoupcan13._visible = false;
spriteFish23._visible = false;
spriteSoupcan23._visible = false;
switch (locHit) {
case "column0" :
spriteDodgeman._visible = true;
break;
case "column1" :
spriteDodgeman2._visible = true;
break;
case "column2" :
spriteDodgeman3._visible = true;
break;
case "column3" :
spriteDodgeman4._visible = true;
}
_root.flagDead = false;
countHit = 20;
if (hitCount == 3) {
hitCount = 4;
_root.flagDead = true;
soundDodgemanMove.stop();
delete soundDodgemanMove;
soundEnemiesMove.stop();
delete soundEnemiesMove;
soundHit.stop();
delete soundHit;
soundStart.stop();
delete soundStart;
if (countScore > _root.scoreHiscoreB) {
_root.scoreHiscoreB = countScore;
}
_root.scoreMostRecent = countScore;
gotoAndPlay (155);
}
} else if (countHit > 0) {
countEnemy1 = -2;
countEnemy2 = -3;
countEnemy3 = -1;
countEnemy4 = -4;
i = 0;
while (i < arrayFishSpritesLeft.length) {
arrayFishSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesLeft.length) {
arrayCanSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayFishSpritesRight.length) {
arrayFishSpritesRight[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesRight.length) {
arrayCanSpritesRight[i]._visible = false;
i++;
}
if (locHit == "column0") {
if (boolVisOn) {
spriteDodgeman._visible = true;
spriteFish13._visible = true;
} else if (!boolVisOn) {
spriteDodgeman._visible = false;
spriteFish13._visible = false;
}
} else if (locHit == "column1") {
if (boolVisOn) {
spriteDodgeman2._visible = true;
spriteSoupcan13._visible = true;
} else if (!boolVisOn) {
spriteDodgeman2._visible = false;
spriteSoupCan13._visible = false;
}
} else if (locHit == "column2") {
if (boolVisOn) {
spriteDodgeman3._visible = true;
spriteFish23._visible = true;
} else if (!boolVisOn) {
spriteDodgeman3._visible = false;
spriteFish23._visible = false;
}
} else if (locHit == "column3") {
if (boolVisOn) {
spriteDodgeman4._visible = true;
spriteSoupcan23._visible = true;
} else if (!boolVisOn) {
spriteDodgeman4._visible = false;
spriteSoupCan23._visible = false;
}
}
if (boolVisOn) {
boolVisOn = false;
} else if (!boolVisOn) {
boolVisOn = true;
}
}
}
}
function checkCollisions() {
if ((spriteCurrent == 0) & (countEnemy1 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column0";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 1) & (countEnemy2 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column1";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 2) & (countEnemy3 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column2";
hitCount++;
hitRecovering();
}
if ((spriteCurrent == 3) & (countEnemy4 == 3)) {
_root.flagDead = true;
soundHit.start(0, 3);
locHit = "column3";
hitCount++;
hitRecovering();
}
}
function handleInput() {
var _local1 = com.wiicade.Wii.getRemote(0);
if (_local1.isDown(com.wiicade.WiiRemote.BUTTON_LEFT)) {
if ((spriteCurrent > 0) & (countPressSafety == 0)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent--;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
countPressSafety = 3;
}
}
if (_local1.isDown(com.wiicade.WiiRemote.BUTTON_RIGHT)) {
if ((spriteCurrent < 3) & (countPressSafety == 0)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent++;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
countPressSafety = 3;
}
}
if (countPressSafety > 0) {
countPressSafety--;
}
}
function moveObjects() {
timerMovement--;
if (timerMovement == 0) {
soundEnemiesMove.start(0, 1);
if ((countEnemy1 > -1) & (countEnemy1 < 4)) {
arrayFishSpritesLeft[countEnemy1]._visible = false;
}
countEnemy1++;
if ((countEnemy1 > -1) & (countEnemy1 < 4)) {
arrayFishSpritesLeft[countEnemy1]._visible = true;
}
if ((countEnemy2 > -1) & (countEnemy2 < 4)) {
arrayCanSpritesLeft[countEnemy2]._visible = false;
}
countEnemy2++;
if ((countEnemy2 > -1) & (countEnemy2 < 4)) {
arrayCanSpritesLeft[countEnemy2]._visible = true;
}
if ((countEnemy3 > -1) & (countEnemy3 < 4)) {
arrayFishSpritesRight[countEnemy3]._visible = false;
}
countEnemy3++;
if ((countEnemy3 > -1) & (countEnemy3 < 4)) {
arrayFishSpritesRight[countEnemy3]._visible = true;
}
if ((countEnemy4 > -1) & (countEnemy4 < 4)) {
arrayCanSpritesRight[countEnemy4]._visible = false;
}
countEnemy4++;
if ((countEnemy4 > -1) & (countEnemy4 < 4)) {
arrayCanSpritesRight[countEnemy4]._visible = true;
}
checkCollisions();
if (countEnemy1 == 3) {
countEnemy1 = -countGoneFor1;
countScore++;
textScore.text = countScore;
}
if (countEnemy2 == 3) {
countEnemy2 = -countGoneFor2;
countScore++;
textScore.text = countScore;
}
if (countEnemy3 == 3) {
countEnemy3 = -countGoneFor3;
countScore++;
textScore.text = countScore;
}
if (countEnemy4 == 3) {
countEnemy4 = -countGoneFor4;
countScore++;
textScore.text = countScore;
}
timerMovement = speedMovement;
if (countScore == 20) {
speedMovement = 3;
}
if (countScore == 70) {
speedMovement = 2;
}
}
}
function adjustLifeBar() {
if (hitCount == 1) {
iconLife1._visible = true;
}
if (hitCount == 2) {
iconLife2._visible = true;
}
if (hitCount == 3) {
iconLife3._visible = true;
}
}
com.wiicade.Wii.getRemote(1).setRotated(true);
com.wiicade.Wii.getRemote(0).setRotated(true);
boolInThatScene = true;
arrayDMSprites = [spriteDodgeman, spriteDodgeman2, spriteDodgeman3, spriteDodgeman4];
arrayFishSpritesLeft = [spriteFish11, spriteFish12, spriteFish13];
arrayCanSpritesLeft = [spriteSoupcan11, spriteSoupcan12, spriteSoupcan13];
arrayFishSpritesRight = [spriteFish21, spriteFish22, spriteFish23];
arrayCanSpritesRight = [spriteSoupcan21, spriteSoupcan22, spriteSoupcan23];
arrayLifeBar = [iconLife1, iconLife2, iconLife3];
spriteCurrent = 0;
timerMovement = 6;
speedMovement = 6;
arrayDMSprites[1]._visible = false;
arrayDMSprites[2]._visible = false;
arrayDMSprites[3]._visible = false;
i = 0;
while (i < arrayFishSpritesLeft.length) {
arrayFishSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesLeft.length) {
arrayCanSpritesLeft[i]._visible = false;
i++;
}
i = 0;
while (i < arrayFishSpritesRight.length) {
arrayFishSpritesRight[i]._visible = false;
i++;
}
i = 0;
while (i < arrayCanSpritesRight.length) {
arrayCanSpritesRight[i]._visible = false;
i++;
}
iconLife1._visible = false;
iconLife2._visible = false;
iconLife3._visible = false;
countPressSafety = 0;
countScore = 0;
countEnemy1 = -2;
countEnemy2 = -3;
countEnemy3 = -1;
countEnemy4 = -4;
countGoneFor1 = 3;
countGoneFor2 = 2;
countGoneFor3 = 1;
countGoneFor4 = 4;
countHit = 20;
locHit = "null";
boolVisOn = true;
hitCount = 0;
if (_root.flagSoundOn == true) {
soundDodgemanMove = new Sound();
soundDodgemanMove.attachSound("soundDodgemanMove");
soundEnemiesMove = new Sound();
soundEnemiesMove.attachSound("soundEnemiesMove");
soundHit = new Sound();
soundHit.attachSound("soundHit");
}
onEnterFrame = function () {
if (boolInThatScene) {
adjustLifeBar();
hitRecovering();
if (_root.flagDead == false) {
handleInput();
moveObjects();
incrementScore();
}
}
};
stop();
Frame 155
stop();
_root.textScore.text = _root.scoreMostRecent;
if (_root.flagSoundOn) {
_root.soundOver = new Sound();
_root.soundOver.attachSound("soundOver");
_root.soundOver.start(0, 1);
} else if (!_root.flagSoundOn) {
_root.soundOver = new Sound();
_root.soundOver.attachSound("soundOver");
_root.soundOver.start(1.7375, 1);
}
soundOver.onSoundComplete = function () {
gotoAndPlay (7);
};
Frame 156
stop();
textSubmitScore.text = _root.scoreHiscore;
textSubmitScoreB.text = _root.scoreHiscoreB;
Symbol 19 MovieClip Frame 40
stop();
Symbol 33 Button
on (press) {
tellTarget (_root) {
nextFrame();
};
}
Symbol 34 Button
on (press) {
gotoAndStop ("end");
_root.play();
}
Instance of Symbol 9 MovieClip in Symbol 35 MovieClip Frame 1
onClipEvent (load) {
_root.stop();
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndStop("lastframe");
}
}
onClipEvent (enterFrame) {
PercentLoaded = int((_root.getBytesLoaded() / _root.getBytesTotal()) * 100);
if (PercentLoaded != 100) {
_parent.gotoAndStop(PercentLoaded);
} else {
_parent.gotoAndPlay("loaded");
}
}
Symbol 35 MovieClip Frame 101
play();
Symbol 35 MovieClip Frame 165
stop();
Symbol 41 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 47 Button
on (release) {
NewgroundsAPI.loadNewgrounds();
}
Symbol 49 MovieClip Frame 1
function startAd(ngad_url) {
trace("opening " + ngad_url);
System.security.allowDomain("70.87.128.99");
System.security.allowInsecureDomain("70.87.128.99");
System.security.allowDomain("ads.shizmoo.com");
System.security.allowInsecureDomain("ads.shizmoo.com");
System.security.allowDomain("www.cpmstar.com");
System.security.allowInsecureDomain("www.cpmstar.com");
System.security.allowDomain("server.cpmstar.com");
System.security.allowInsecureDomain("server.cpmstar.com");
var ngads_redirect = new XML();
ngads_redirect.ignoreWhite = true;
ngads_redirect.onLoad = function (success) {
trace("[NEWGROUNDS FLASH ADS] :: You may get a 'Security Sandbox Violation' ... this is normal, do not freak out!");
if (success) {
ng_ad.loadMovie(ngads_redirect.toString(), "GET");
}
};
ngads_redirect.load(ngad_url);
}
if (NewgroundsAPI.getAdURL()) {
startAd(NewgroundsAPI.getAdURL());
}
NewgroundsAPI.onAdsApproved = function (ad_url) {
startAd(ad_url);
};
stop();
Symbol 227 MovieClip [__Packages.NewgroundsAPI] Frame 0
class NewgroundsAPI
{
static var tracker_id, host, version, debug, error_format, header_format, normal_format, link_format;
function NewgroundsAPI () {
}
static function connectMovie(id) {
if (!id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.connectMovie(id:Number)");
} else if (!tracker_id) {
SendMessage("Connecting to API gateway...");
tracker_id = id;
host = _url.split("/")[2].toLowerCase();
if (host.length < 1) {
host = "localhost";
}
var _local2 = new Object();
SendEvent(MOVIE_VIEWS);
}
}
static function setMovieVersion(movie_version) {
if (!movie_version) {
SendError("Missing required 'version' in NewgroundsAPI.setMovieVersion(version:String)");
} else {
version = movie_version;
}
}
static function debugMode() {
debug = true;
}
static function addCustomEvent(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else if (!stat_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.AddCustomEvent(id:Number, event_name:String)");
} else {
custom_events[stat_name] = CUSTOM_STATS + stat_id;
SendMessage("Created custom event: " + stat_name);
}
}
static function addCustomLink(stat_id, stat_name) {
if (!stat_id) {
SendError("Missing required 'id' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else if (!stat_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.AddCustomLink(id:Number, link_name:String)");
} else {
custom_links[stat_name] = CUSTOM_STATS + stat_id;
SendMessage((("Created custom link " + stat_id) + ": ") + stat_name);
}
}
static function loadMySite() {
SendLink(AUTHOR_SITE);
}
static function loadNewgrounds(special) {
if (special) {
var _local1 = {page:special};
}
SendLink(NEWGROUNDS, _local1);
}
static function logCustomEvent(event_name) {
if (!event_name) {
SendError("Missing required 'event_name' parameter in NewgroundsAPI.logCustomEvent(event_name:String)");
} else if (!custom_events[event_name]) {
SendError("Attempted to log undefined custom event: " + event_name);
} else {
SendEvent(custom_events[event_name]);
}
}
static function loadCustomLink(link_name) {
if (!link_name) {
SendError("Missing required 'link_name' parameter in NewgroundsAPI.loadCustomLink(link_name:String)");
} else if (!custom_links[link_name]) {
SendError("Attempted to open undefined custom link: " + link_name);
} else {
SendLink(custom_links[link_name]);
}
}
static function getAdURL() {
return(movie_options.ad_url);
}
static function getMovieURL() {
if (movie_options.movie_url) {
return(movie_options.movie_url);
}
return("Newgrounds.com");
}
static function getNewVersionURL() {
return((((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + NEW_VERSION);
}
static function SendEvent(id) {
SendStat(id, false);
}
static function SendLink(id, extra) {
SendStat(id, true, extra);
}
static function ReadGatewayData(params) {
for (var _local2 in params) {
params[_local2] = unescape(params[_local2]);
movie_options[_local2] = params[_local2];
}
if (params.settings_loaded) {
SendMessage("You have successfully connected to the Newgrounds API gateway!");
SendMessage(("Movie Identified as '" + movie_options.movie_name) + "'");
if (movie_options.message) {
SendMessage(movie_options.message);
}
if (movie_options.ad_url) {
SendMessage("Your movie has been approved to run Flash Ads");
onAdsApproved(movie_options.ad_url);
}
if (movie_options.movie_version and (movie_options.movie_version.toString() != version.toString())) {
SendMessage("WARNING: The movie version configured in your API settings does not match this movie's version!");
onNewVersionAvailable(movie_options.movie_version, getMovieURL(), getNewVersionURL());
}
if (movie_options.deny_host) {
SendMessage("You have blocked 'localHost' in your API settings.");
SendMessage("If you wish to test your movie you will need to remove this block.");
onDenyHost(host, getMovieURL(), getNewVersionURL());
}
if (movie_options.request_portal_url == 1) {
var _local4 = (((GATEWAY_URL + "?&id=") + tracker_id) + "&portal_url=") + escape(_url);
var _local3 = new XML();
_local3.ignoreWhite = true;
_local3.load(_local4);
}
} else if (!movie_options.settings_loaded) {
SendError("Could not establish connection to the API gateway.");
}
}
static function SendStat(stat_id, open_in_browser, extra) {
if (!tracker_id) {
SendError("API calls cannot be made without a valid movie id.");
SendError("Did you remember to add the \"NewgroundsAPI.connectMovie()\" code?");
} else {
var _local7 = (((((GATEWAY_URL + "?&id=") + tracker_id) + "&host=") + escape(host)) + "&stat=") + stat_id;
for (var _local9 in extra) {
_local7 = _local7 + ((("&" + escape(_local9)) + "=") + escape(extra[_local9]));
}
trace(_local7);
if (debug) {
_local7 = _local7 + "&debug=1";
}
if (open_in_browser) {
getURL (_local7, "_blank");
} else {
var _local10 = new XML();
_local10.ignoreWhite = true;
_local10.onLoad = function (success) {
var _local6 = new Object();
var _local3 = 0;
while (_local3 < this.firstChild.childNodes.length) {
var _local4 = this.firstChild.childNodes[_local3];
var _local5 = _local4.nodeName;
var _local2 = _local4.attributes.value;
if (_local2 == Number(_local2)) {
_local2 = Number(_local2);
}
_local6[_local5] = _local2;
_local3++;
}
NewgroundsAPI.ReadGatewayData(_local6);
};
_local10.load(_local7);
}
}
}
static function SendError(msg) {
trace("[NEWGROUNDS API ERROR] :: " + msg);
}
static function SendMessage(msg) {
trace("[NEWGROUNDS API] :: " + msg);
}
static function InitTextFormats() {
if (!error_format) {
error_format = new TextFormat();
error_format.font = "Arial Black";
error_format.size = 48;
error_format.color = 16711680 /* 0xFF0000 */;
}
if (!header_format) {
header_format = new TextFormat();
header_format.font = "Arial Black";
header_format.size = 24;
header_format.color = 16777215 /* 0xFFFFFF */;
}
if (!normal_format) {
normal_format = new TextFormat();
normal_format.font = "Arial";
normal_format.bold = true;
normal_format.size = 12;
normal_format.color = 16777215 /* 0xFFFFFF */;
}
if (!link_format) {
link_format = new TextFormat();
link_format.color = 16776960 /* 0xFFFF00 */;
link_format.underline = true;
}
}
static function onNewVersionAvailable(version, movie_url, redirect_url) {
InitTextFormats();
var _local2 = new Object();
_local2.x = Stage.width / 2;
_local2.y = Stage.height / 2;
_root.createEmptyMovieClip("NGAPI_new_version_overlay", _root.getNextHighestDepth());
_root.NGAPI_new_version_overlay.lineStyle(1, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(0, 70);
_root.NGAPI_new_version_overlay.moveTo(-10, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, 1000);
_root.NGAPI_new_version_overlay.lineTo(1000, -10);
_root.NGAPI_new_version_overlay.lineTo(-10, -10);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.lineStyle(10, 0, 100);
_root.NGAPI_new_version_overlay.beginFill(51);
_root.NGAPI_new_version_overlay.moveTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.lineTo(_local2.x + 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y + 80);
_root.NGAPI_new_version_overlay.lineTo(_local2.x - 240, _local2.y - 120);
_root.NGAPI_new_version_overlay.endFill();
_root.NGAPI_new_version_overlay.createEmptyMovieClip("exit", 1000);
_root.NGAPI_new_version_overlay.exit.lineStyle(2, 39423, 100);
_root.NGAPI_new_version_overlay.exit.beginFill(0, 50);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 230, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 90);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 210, _local2.y - 110);
_root.NGAPI_new_version_overlay.exit.endFill();
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 214, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 226, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.moveTo(_local2.x + 226, _local2.y - 106);
_root.NGAPI_new_version_overlay.exit.lineTo(_local2.x + 214, _local2.y - 94);
_root.NGAPI_new_version_overlay.exit.onMouseUp = function () {
if (_root.NGAPI_new_version_overlay.exit.hitTest(_root._xmouse, _root._ymouse)) {
_root.NGAPI_new_version_overlay.removeMovieClip();
}
};
var _local3 = (("Version " + version) + " is now available at:") + newline;
var _local5 = _local3.length;
_local3 = _local3 + movie_url;
var _local4 = _local3.length;
_root.NGAPI_new_version_overlay.createTextField("mouseblocker", 99, -10, -10, 1000, 1000);
_root.NGAPI_new_version_overlay.createTextField("newversion", 100, _local2.x - 210, _local2.y - 90, 400, 80);
_root.NGAPI_new_version_overlay.newversion.text = "New Version Available!";
_root.NGAPI_new_version_overlay.newversion.setTextFormat(header_format);
_root.NGAPI_new_version_overlay.createTextField("message", 101, (Stage.width - 400) / 2, Stage.height / 2, 400, 40);
_root.NGAPI_new_version_overlay.message.text = _local3;
_root.NGAPI_new_version_overlay.message.multiline = true;
_root.NGAPI_new_version_overlay.message.wordWrap = true;
_root.NGAPI_new_version_overlay.message.html = true;
_root.NGAPI_new_version_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_new_version_overlay.message.setTextFormat(_local5, _local4, link_format);
}
static function onDenyHost(hostname, movie_url, redirect_url) {
InitTextFormats();
_root.createEmptyMovieClip("NGAPI_deny_host_overlay", _root.getNextHighestDepth());
_root.NGAPI_deny_host_overlay.lineStyle(20, 0, 100);
_root.NGAPI_deny_host_overlay.beginFill(6684672);
_root.NGAPI_deny_host_overlay.moveTo(0, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, 0);
_root.NGAPI_deny_host_overlay.lineTo(Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, Stage.height);
_root.NGAPI_deny_host_overlay.lineTo(0, 0);
_root.NGAPI_deny_host_overlay.endFill();
var _local2 = ("This movie has not been approved for use on " + hostname) + ".";
_local2 = _local2 + "\r\rFor an aproved copy, please visit:\r";
var _local4 = _local2.length;
_local2 = _local2 + movie_url;
var _local3 = _local2.length;
_root.NGAPI_deny_host_overlay.createTextField("mousekill", 100, 0, 0, Stage.width, Stage.height);
_root.NGAPI_deny_host_overlay.createTextField("error", 101, (Stage.width - 400) / 2, (Stage.height / 2) - 100, 400, 200);
_root.NGAPI_deny_host_overlay.error.text = "ERROR!";
_root.NGAPI_deny_host_overlay.error.setTextFormat(error_format);
_root.NGAPI_deny_host_overlay.createTextField("message", 102, (Stage.width - 400) / 2, Stage.height / 2, 400, 200);
_root.NGAPI_deny_host_overlay.message.text = _local2;
_root.NGAPI_deny_host_overlay.message.multiline = true;
_root.NGAPI_deny_host_overlay.message.wordWrap = true;
_root.NGAPI_deny_host_overlay.message.html = true;
_root.NGAPI_deny_host_overlay.message.setTextFormat(normal_format);
link_format.url = redirect_url;
_root.NGAPI_deny_host_overlay.message.setTextFormat(_local4, _local3, link_format);
}
static function isInstalled() {
return(true);
}
static function onAdsApproved(ad_url) {
}
static var movie_options = new Object();
static var custom_events = new Object();
static var custom_links = new Object();
static var MOVIE_VIEWS = 1;
static var AUTHOR_SITE = 2;
static var NEWGROUNDS = 3;
static var NEW_VERSION = 4;
static var CUSTOM_STATS = 50;
static var GATEWAY_URL = "http://www.ngads.com/gateway.php";
}
Symbol 228 MovieClip [__Packages.com.wiicade.Wii] Frame 0
class com.wiicade.Wii
{
static var instance;
var keyboard, lc;
function Wii () {
if (!_global.Wii) {
_global.Wii = this;
} else {
return;
}
wii = System.capabilities.os == "Nintendo Wii";
com.wiicade.WiiRemote.init();
com.wiicade.KeyboardController.init();
com.wiicade.Browser.init();
var _local3 = 0;
while (_local3 < 4) {
remotes[_local3] = new com.wiicade.WiiRemote(_local3);
_local3++;
}
if (!isWii()) {
keyboard = new com.wiicade.KeyboardController(wiicommand);
}
lc = new LocalConnection();
lc.connect("wii");
lc.wiicommand = function (packet) {
_global.Wii.wiicommand(packet);
};
if (isWii()) {
getURL (((("javascript:initializeWiiCadeAPI(20, " + Stage.width) + ", ") + Stage.height) + ");");
}
}
static function getInstance() {
if (!_global.Wii) {
instance = new com.wiicade.Wii();
}
return(_global.Wii);
}
static function init() {
_global.Wii = null;
instance = new com.wiicade.Wii();
}
static function isWii() {
var _local1 = getInstance();
return(_local1.wii || (_local1.virtualized));
}
function wiicommand(packet) {
var _local4 = getInstance();
var _local2 = (4294901760 & packet) >> 16;
var _local3 = packet & 65535;
if (_local2 < 5) {
_local4.remotes[_local2 - 1].buttonsUpdated(_local3);
} else if (_local2 < 9) {
_local4.remotes[_local2 - 5].twistUpdated(_local3);
} else if (_local2 < 13) {
_local4.remotes[_local2 - 9].distanceUpdated(_local3);
} else if (_local2 == 13) {
parseFlags(_local3);
} else if (_local2 < 18) {
parseAttachment(_local3, _local2 - 14);
} else if (_local2 < 22) {
_local4.remotes[_local2 - 18].cursorXUpdated(_local3);
} else if (_local2 < 32) {
_local4.remotes[_local2 - 22].cursorYUpdated(_local3);
}
}
function parseFlags(flags) {
var _local7 = primary;
var _local3;
var _local4;
var _local5 = 8;
primary = flags & 3;
if (primary != _local7) {
getRemote(_local7).updatePrimary(false);
getRemote(primary).updatePrimary(true);
}
virtualized = (4 & _local5) > 0;
var _local2 = 0;
while (_local2 < 4) {
_local3 = getRemote(_local2);
_local4 = (_local5 & flags) > 0;
if (_local3.isConnected() != _local4) {
_local3.connectedUpdated(_local4);
}
_local5 = _local5 << 1;
_local2++;
}
}
function parseAttachment(data, remote) {
var _local4 = getRemote(remote);
var _local3 = _local4.getAttachment();
var _local2;
var _local1;
if ((data & 256) == 0) {
if (!(_local3 instanceof com.wiicade.Nunchuk)) {
_local3 = new com.wiicade.Nunchuk(_local4);
_local4.updateAttachment(_local3);
}
_local3.updateButtons(data & 3);
_local2 = (data & 28) >>> 2;
_local1 = (data & 224) >>> 5;
if ((_local2 & 4) > 0) {
_local2 = _local2 | 65528;
}
if ((_local1 & 4) > 0) {
_local1 = _local1 | 65528;
}
_local2 = Math.floor((_local2 * 128) / 3);
_local1 = Math.floor((_local1 * 128) / 3);
_local3.updateStick(_local2, _local1);
}
}
static function getRemote(identity) {
var _local1 = getInstance();
if ((!_local1.activated[identity]) && (_local1.isWii())) {
getURL (("javascript:activateWiiRemoteFeature(" + identity) + ", null, true);");
_local1.activated[identity] = true;
}
return(_local1.remotes[identity]);
}
static function getPrimaryRemote() {
var _local1 = getInstance();
return(_local1.remotes[_local1.primary]);
}
static var COMMAND_BUTTONS = 1;
static var COMMAND_TWIST = 5;
static var COMMAND_DISTANCE = 9;
static var COMMAND_FLAGS = 13;
static var COMMAND_ATTACH = 14;
static var COMMAND_CURSORX = 18;
static var COMMAND_CURSORY = 22;
var remotes = new Array();
var activated = new Array();
var primary = 0;
var virtualized = false;
var wii = true;
}
Symbol 229 MovieClip [__Packages.com.wiicade.KeyboardController] Frame 0
class com.wiicade.KeyboardController
{
static var keyCodes, buttonCodes;
var callback;
function KeyboardController (callback) {
this.callback = callback;
Key.addListener(this);
Mouse.addListener(this);
if (!keyCodes) {
init();
}
}
static function init() {
keyCodes = new Array();
buttonCodes = new Array();
keyCodes[37] = com.wiicade.WiiRemote.BUTTON_LEFT;
keyCodes[38] = com.wiicade.WiiRemote.BUTTON_UP;
keyCodes[39] = com.wiicade.WiiRemote.BUTTON_RIGHT;
keyCodes[40] = com.wiicade.WiiRemote.BUTTON_DOWN;
keyCodes[65] = com.wiicade.WiiRemote.BUTTON_1;
keyCodes[83] = com.wiicade.WiiRemote.BUTTON_2;
keyCodes[68] = com.wiicade.WiiRemote.BUTTON_A;
keyCodes[32] = com.wiicade.WiiRemote.BUTTON_B;
keyCodes[187] = com.wiicade.WiiRemote.BUTTON_PLUS;
keyCodes[189] = com.wiicade.WiiRemote.BUTTON_MINUS;
buttonCodes[com.wiicade.WiiRemote.BUTTON_LEFT] = 37;
buttonCodes[com.wiicade.WiiRemote.BUTTON_UP] = 38;
buttonCodes[com.wiicade.WiiRemote.BUTTON_RIGHT] = 39;
buttonCodes[com.wiicade.WiiRemote.BUTTON_DOWN] = 40;
buttonCodes[com.wiicade.WiiRemote.BUTTON_1] = 65;
buttonCodes[com.wiicade.WiiRemote.BUTTON_2] = 83;
buttonCodes[com.wiicade.WiiRemote.BUTTON_A] = 68;
buttonCodes[com.wiicade.WiiRemote.BUTTON_B] = 32;
buttonCodes[com.wiicade.WiiRemote.BUTTON_PLUS] = 187;
buttonCodes[com.wiicade.WiiRemote.BUTTON_MINUS] = 189;
}
function onKeyDown() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap | keyCodes[_local2];
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onKeyUp() {
var _local2 = Key.getCode();
if (keyCodes[_local2]) {
bitmap = bitmap & (~keyCodes[_local2]);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
}
function onMouseDown() {
bitmap = bitmap | com.wiicade.WiiRemote.BUTTON_A;
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseUp() {
bitmap = bitmap & (~com.wiicade.WiiRemote.BUTTON_A);
callback((com.wiicade.Wii.COMMAND_BUTTONS << 16) | bitmap);
}
function onMouseMove() {
callback((com.wiicade.Wii.COMMAND_CURSORX << 16) | _xmouse);
callback((com.wiicade.Wii.COMMAND_CURSORY << 16) | _ymouse);
}
static function getButtonMappingForKey(keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(keyCodes[keyCode]);
}
static function getKeyMappingForButton(buttonCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
return(buttonCodes[buttonCode]);
}
static function setKeyMapping(buttonCode, keyCode) {
if (!keyCodes) {
com.wiicade.Wii.isWii();
}
var _local1 = buttonCodes[buttonCode];
var _local2 = keyCodes[keyCode];
if (_local1) {
keyCodes[_local1] = null;
}
if (_local2) {
buttonCodes[_local2] = null;
}
keyCodes[keyCode] = buttonCode;
buttonCodes[buttonCode] = keyCode;
}
var bitmap = 0;
}
Symbol 230 MovieClip [__Packages.com.wiicade.WiiRemote] Frame 0
class com.wiicade.WiiRemote
{
var identity, attachment, activated, dispatchEvent, oldcursorx, oldcursory;
function WiiRemote (identity) {
this.identity = identity;
allowRotate = com.wiicade.Wii.isWii();
attachment = new com.wiicade.Nunchuk(this);
activated = new Array();
if (this.identity == 0) {
primary = true;
connected = true;
}
mx.events.EventDispatcher.initialize(this);
}
static function init() {
}
function getIdentity() {
return(identity);
}
function isPrimary() {
return(primary);
}
function isConnected() {
return(connected);
}
function isRotated() {
return(rotated);
}
function setRotated(rotate) {
rotated = rotate;
}
function getTwistAngle() {
if ((!activated[com.wiicade.Wii.COMMAND_TWIST]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_TWIST + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_TWIST] = true;
}
return(twistAngle);
}
function getDistance() {
if ((!activated[com.wiicade.Wii.COMMAND_DISTANCE]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_DISTANCE + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_DISTANCE] = true;
}
return(distance);
}
function getCursorX() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursorx);
}
function getCursorY() {
if ((!activated[com.wiicade.Wii.COMMAND_CURSORX]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_CURSORX + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_CURSORX] = true;
}
return(cursory);
}
function isFacingScreen() {
return((cursorx > 0) || (cursory > 0));
}
function isDown(buttonCode) {
if (rotated && (allowRotate)) {
if (buttonCode == BUTTON_UP) {
buttonCode = BUTTON_RIGHT;
} else if (buttonCode == BUTTON_RIGHT) {
buttonCode = BUTTON_DOWN;
} else if (buttonCode == BUTTON_DOWN) {
buttonCode = BUTTON_LEFT;
} else if (buttonCode == BUTTON_LEFT) {
buttonCode = BUTTON_UP;
}
}
return((pressed & buttonCode) > 0);
}
function getAttachment() {
if ((!activated[com.wiicade.Wii.COMMAND_ATTACH]) && (com.wiicade.Wii.isWii())) {
getURL (((("javascript:activateWiiRemoteFeature(" + identity) + ", ") + (com.wiicade.Wii.COMMAND_ATTACH + identity)) + ", true);");
activated[com.wiicade.Wii.COMMAND_ATTACH] = true;
}
return(attachment);
}
function buttonsUpdated(bitmap) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = bitmap;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:identity});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:identity});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function twistUpdated(angle) {
var _local2 = twistAngle;
twistAngle = angle;
if (twistAngle != _local2) {
dispatchEvent({type:"twist", angle:angle, identity:identity});
}
}
function distanceUpdated(distance) {
var _local2 = this.distance;
this.distance = distance;
if (this.distance != _local2) {
dispatchEvent({type:"distance", distance:distance, identity:identity});
}
}
function connectedUpdated(connected) {
var _local2 = this.connected;
this.connected = connected;
if (this.connected != _local2) {
if (connected) {
dispatchEvent({type:"connected", identity:identity});
} else {
dispatchEvent({type:"disconnected", identity:identity});
}
}
}
function cursorXUpdated(cursorx) {
oldcursorx = this.cursorx;
this.cursorx = cursorx;
}
function cursorYUpdated(cursory) {
oldcursory = this.cursory;
this.cursory = cursory;
if ((cursorx != oldcursorx) || (this.cursory != oldcursory)) {
dispatchEvent({type:"pointer", cursorx:cursorx, cursory:this.cursory, identity:identity});
}
}
function updatePrimary(primary) {
this.primary = primary;
}
function updateAttachment(attachment) {
this.attachment = attachment;
}
static var BUTTON_UP = 8;
static var BUTTON_DOWN = 4;
static var BUTTON_RIGHT = 2;
static var BUTTON_LEFT = 1;
static var BUTTON_1 = 64;
static var BUTTON_2 = 32;
static var BUTTON_A = 256;
static var BUTTON_B = 128;
static var BUTTON_PLUS = 16;
static var BUTTON_MINUS = 512;
var primary = false;
var connected = false;
var rotated = false;
var allowRotate = true;
var twistAngle = 0;
var distance = 0;
var cursorx = 0;
var cursory = 0;
var pressed = 0;
}
Symbol 231 MovieClip [__Packages.com.wiicade.Nunchuk] Frame 0
class com.wiicade.Nunchuk
{
var parent, dispatchEvent;
function Nunchuk (parent) {
this.parent = parent;
mx.events.EventDispatcher.initialize(this);
}
function isDown(buttonCode) {
return((pressed & buttonCode) > 0);
}
function getStickX() {
return(stickx);
}
function getStickY() {
return(sticky);
}
function updateButtons(buttons) {
var _local2 = 1;
var _local8 = pressed;
var _local7;
pressed = buttons;
_local7 = pressed ^ _local8;
var _local3 = 0;
while (_local3 < 10) {
if ((_local7 & _local2) > 0) {
if ((pressed & _local2) > 0) {
dispatchEvent({type:"buttondown", buttonCode:_local2, identity:parent.getIdentity()});
} else {
dispatchEvent({type:"buttonup", buttonCode:_local2, identity:parent.getIdentity()});
}
}
_local2 = _local2 << 1;
_local3++;
}
}
function updateStick(x, y) {
stickx = x;
sticky = y;
}
static var BUTTON_C = 2;
static var BUTTON_Z = 1;
var pressed = 0;
var stickx = 0;
var sticky = 0;
}
Symbol 232 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 233 MovieClip [__Packages.com.wiicade.Browser] Frame 0
class com.wiicade.Browser
{
static var buttonEnabled;
function Browser () {
}
static function init() {
buttonEnabled = new Array();
buttonEnabled[com.wiicade.WiiRemote.BUTTON_LEFT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_UP] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_RIGHT] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_DOWN] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_1] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_2] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_A] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_B] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_PLUS] = false;
buttonEnabled[com.wiicade.WiiRemote.BUTTON_MINUS] = false;
}
static function isDefaultEnabled(buttonCode) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
return(buttonEnabled[buttonCode]);
}
static function setDefaultEnabled(buttonCode, enabled) {
if (!buttonEnabled) {
com.wiicade.Wii.isWii();
}
buttonEnabled[buttonCode] = enabled;
if (com.wiicade.Wii.isWii()) {
getURL (((("javascript:enableWiiButton(" + buttonCode) + ",") + enabled) + ");");
}
}
static function enableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, true);
}
static function disableZooming() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_PLUS, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_MINUS, false);
}
static function enableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, true);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, true);
}
static function disableScrolling() {
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_LEFT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_RIGHT, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_UP, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_DOWN, false);
setDefaultEnabled(com.wiicade.WiiRemote.BUTTON_B, false);
}
static function setBackgroundColor(color) {
if (com.wiicade.Wii.isWii()) {
getURL (("javascript:setBackgroundColor(" + color) + ");");
}
}
}
Symbol 234 MovieClip [__Packages.ab3.rankz.Armor_Bot_30_En_AS1] Frame 0
class ab3.rankz.Armor_Bot_30_En_AS1 extends Object
{
static var _CharsReverseLookup;
var _Armor_Bot_30_En_AS1Str, _Armor_Bot_30_En_AS1Count;
function Armor_Bot_30_En_AS1 () {
super();
}
static function Encode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.encodeArmor_Bot_30_En_AS1(str));
}
static function Decode(str) {
var _local1 = new ab3.rankz.Armor_Bot_30_En_AS1();
return(_local1.decodeArmor_Bot_30_En_AS1(str));
}
static function StringReplaceAll(source, find, replacement) {
return(source.split(find).join(replacement));
}
static function InitReverseChars() {
_CharsReverseLookup = new Array();
var _local1 = 0;
while (_local1 < _Chars.length) {
_CharsReverseLookup[_Chars[_local1]] = _local1;
_local1++;
}
return(true);
}
static function UrlDecode(str) {
str = StringReplaceAll(str, "\\", " ");
str = unescape(str);
return(str);
}
static function UrlEncode(str) {
str = escape(str);
str = StringReplaceAll(str, "\\", "%2B");
str = StringReplaceAll(str, "%20", "+");
return(str);
}
function setArmor_Bot_30_En_AS1Str(str) {
_Armor_Bot_30_En_AS1Str = str;
_Armor_Bot_30_En_AS1Count = 0;
}
function readArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charCodeAt(_Armor_Bot_30_En_AS1Count) & 255;
_Armor_Bot_30_En_AS1Count++;
return(_local2);
}
function encodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(3);
var _local5 = 0;
var _local4 = false;
while ((!_local4) && (((_local2[0] = readArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[1] = readArmor_Bot_30_En_AS1();
_local2[2] = readArmor_Bot_30_En_AS1();
_local3 = _local3 + _Chars[_local2[0] >> 2];
if (_local2[1] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[0] << 4) & 48) | (_local2[1] >> 4)];
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + _Chars[((_local2[1] << 2) & 60) | (_local2[2] >> 6)];
_local3 = _local3 + _Chars[_local2[2] & 63];
} else {
_local3 = _local3 + _Chars[(_local2[1] << 2) & 60];
_local3 = _local3 + "=";
_local4 = true;
}
} else {
_local3 = _local3 + _Chars[(_local2[0] << 4) & 48];
_local3 = _local3 + "=";
_local3 = _local3 + "=";
_local4 = true;
}
_local5 = _local5 + 4;
if (_local5 >= 76) {
_local3 = _local3 + newline;
_local5 = 0;
}
}
return(_local3);
}
function readReverseArmor_Bot_30_En_AS1() {
if (!_Armor_Bot_30_En_AS1Str) {
return(_EndOfInput);
}
while (true) {
if (_Armor_Bot_30_En_AS1Count >= _Armor_Bot_30_En_AS1Str.length) {
return(_EndOfInput);
}
var _local2 = _Armor_Bot_30_En_AS1Str.charAt(_Armor_Bot_30_En_AS1Count);
_Armor_Bot_30_En_AS1Count++;
if (_CharsReverseLookup[_local2]) {
return(_CharsReverseLookup[_local2]);
}
if (_local2 == "A") {
return(0);
}
}
}
function ntos(n) {
var _local1 = n.toString(16);
if (_local1.length == 1) {
_local1 = "0" + _local1;
}
_local1 = "%" + _local1;
return(unescape(_local1));
}
function decodeArmor_Bot_30_En_AS1(str) {
setArmor_Bot_30_En_AS1Str(str);
var _local3 = "";
var _local2 = new Array(4);
var _local4 = false;
while (((!_local4) && (((_local2[0] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) && (((_local2[1] = readReverseArmor_Bot_30_En_AS1())) != _EndOfInput)) {
_local2[2] = readReverseArmor_Bot_30_En_AS1();
_local2[3] = readReverseArmor_Bot_30_En_AS1();
_local3 = _local3 + ntos(((_local2[0] << 2) & 255) | (_local2[1] >> 4));
if (_local2[2] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[1] << 4) & 255) | (_local2[2] >> 2));
if (_local2[3] != _EndOfInput) {
_local3 = _local3 + ntos(((_local2[2] << 6) & 255) | _local2[3]);
} else {
_local4 = true;
}
} else {
_local4 = true;
}
}
return(_local3);
}
function toHex(n) {
var _local4 = "";
var _local3 = true;
var _local1 = 32;
while (_local1 > 0) {
_local1 = _local1 - 4;
var _local2 = (n >> _local1) & 15;
if ((!_local3) || (_local2 != 0)) {
_local3 = false;
_local4 = _local4 + _Digits[_local2];
}
}
return(((_local4 == "") ? "0" : (_local4)));
}
function pad(str, len, pad) {
var _local2 = str;
var _local1 = str.length;
while (_local1 < len) {
_local2 = pad + _local2;
_local1++;
}
return(_local2);
}
function encodeHex(str) {
var _local4 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local4 = _local4 + pad(toHex(str.charCodeAt(_local2) & 255), 2, "0");
_local2++;
}
return(_local4);
}
function decodeHex(str) {
var _local5 = "";
var _local3 = "";
var _local2 = 0;
while (_local2 < str.length) {
_local3 = _local3 + str.charAt(_local2);
if (_local3.length == 2) {
_local5 = _local5 + ntos(parseInt("0x" + _local3));
_local3 = "";
}
_local2++;
}
return(_local5);
}
static var _EndOfInput = -1;
static var _Chars = new Array("A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P", "Q", "R", "S", "T", "U", "V", "W", "X", "Y", "Z", "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z", "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "+", "/");
static var _CharsReverseLookupInited = InitReverseChars();
static var _Digits = new Array("0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "a", "b", "c", "d", "e", "f");
}
Symbol 66 MovieClip Frame 1
stop();
Symbol 66 MovieClip Frame 2
stop();
Symbol 67 MovieClip Frame 1
stop();
Symbol 73 Button
on (press) {
if (spriteCurrent < 3) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent++;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
}
}
Symbol 74 Button
on (press) {
if (spriteCurrent > 0) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent--;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
}
}
Symbol 75 Button
on (press) {
boolInThisScene = false;
soundDodgemanMove.stop();
delete soundDodgemanMove;
soundEnemiesMove.stop();
delete soundEnemiesMove;
soundHit.stop();
delete soundHit;
soundStart.stop();
delete soundStart;
gotoAndPlay (7);
}
Symbol 86 MovieClip Frame 13
this.gotoAndPlay(1);
Symbol 127 Button
on (press) {
_root.boolModeA = true;
gotoAndPlay (152);
}
Symbol 128 Button
on (press) {
_root.boolModeA = false;
gotoAndPlay (152);
}
Symbol 129 Button
on (press) {
if (_root.flagSoundOn) {
_root.flagSoundOn = false;
_root.iconSound._visible = false;
} else if (!_root.flagSoundOn) {
_root.flagSoundOn = true;
_root.iconSound._visible = true;
}
}
Symbol 131 Button
on (press) {
gotoAndPlay (156);
}
Symbol 132 Button
on (press) {
getURL ("http://rankz.armorbot.com/GWDodgeman/", "_blank");
getURL ("http://rankz.armorbot.com/GWDodgemanB/", "_blank");
}
Symbol 206 Button
on (press) {
if ((spriteCurrent < 3) & (_root.flagDead == false)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent++;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
}
}
Symbol 207 Button
on (press) {
if ((spriteCurrent > 0) & (_root.flagDead == false)) {
arrayDMSprites[spriteCurrent]._visible = false;
spriteCurrent--;
arrayDMSprites[spriteCurrent]._visible = true;
soundDodgemanMove.start(0, 1);
}
}
Symbol 211 Button
on (press) {
boolInThatScene = false;
soundDodgemanMove.stop();
delete soundDodgemanMove;
soundEnemiesMove.stop();
delete soundEnemiesMove;
soundHit.stop();
delete soundHit;
soundStart.stop();
delete soundStart;
gotoAndPlay (7);
}
Symbol 224 Button
on (press) {
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
function __rankz_send__(par1, par2, par3, par4) {
par227 = new LoadVars();
par228 = new LoadVars();
par227.flashkey = par2;
par227.SU0249 = par1;
par227.bmFtZTE = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par3);
par227.c2NvcmUx = ab3.rankz.Armor_Bot_30_En_AS1.Encode(par4 + "j%e%a%n%s");
par227.flashkey = par227.flashkey.split("=").join("");
par227.SU0249 = par227.SU0249.split("=").join("");
par228.onLoad = function (success) {
if (success) {
trace(par228.msg);
} else {
trace(par228.loaded);
}
};
par227.sendAndLoad("http://rankz.armorbot.com/submit/", par228, "POST");
}
bXlnYW1lX25hbWVfdmFyaWFibGU = textSubmitName.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = textSubmitScore.text;
if (_root.scoreHiscore > 0) {
__rankz_send__("MzM2OWolZSVhJW4lcw==", "bWhzaFBnUVA=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
_root.scoreHiscore = 0;
}
bXlnYW1lX25hbWVfdmFyaWFibGU = textSubmitName.text;
bXlnYW1lX3Njb3JlX3ZhcmlhYmxl = textSubmitScoreB.text;
if (_root.scoreHiscoreB > 0) {
__rankz_send__("MzM3MWolZSVhJW4lcw==", "aHhzSnVYVGw=", bXlnYW1lX25hbWVfdmFyaWFibGU, bXlnYW1lX3Njb3JlX3ZhcmlhYmxl);
_root.scoreHiscoreB = 0;
}
gotoAndPlay (7);
}