Frame 1
var link = "";
var adrenalineUnlocked = false;
var adrenalineRocketUnlocked = false;
_global.gameMode = "normal";
_global.playerScore = 0;
_global.wavesCompleted = 0;
_global.submitScoreMode = false;
_global.gamePaused = false;
_global.saved = new sharedData();
if (_global.saved.adrenalineRocketUnlocked) {
adrenalineRocketUnlocked = true;
}
if (_global.saved.adrenalineUnlocked) {
adrenalineUnlocked = true;
}
var localDomainLC = new LocalConnection();
var myDomainName = localDomainLC.domain();
if (myDomainName == "www.glowingeyegames.com") {
adrenalineUnlocked = true;
}
var heroSet = new Object();
var bigAstSet = new Object();
var mediumAstSet = new Object();
var smallAstSet = new Object();
var rocketSet = new Object();
var deathStarSet = new Object();
var bigUfoSet = new Object();
var smallUfoSet = new Object();
var mineSet = new Object();
var gemSet = new Object();
var NLPoints = new Array();
var nNLPoints = 0;
var ratingLimit = new Array();
var nRatingLimit = 0;
var enemyMix = new Array();
var nEnemyMix = 0;
heroSet.rotationSpeed = 6.5;
heroSet.bulletSpeed = 16;
heroSet.bulletLength = 25;
heroSet.shieldTime = 3;
heroSet.shootAngle = 45;
heroSet.initialWaveInterval = 4.5;
heroSet.nextWaveIncrement = 0.14;
NLPoints[0] = 10000;
NLPoints[1] = 100000 /* 0x0186A0 */;
NLPoints[2] = 1000000 /* 0x0F4240 */;
nNLPoints = 3;
ratingLimit[0] = 100000 /* 0x0186A0 */;
ratingLimit[1] = 250000 /* 0x03D090 */;
ratingLimit[2] = 500000 /* 0x07A120 */;
ratingLimit[3] = 1000000 /* 0x0F4240 */;
nRatingLimit = 4;
bigAstSet.speed = 2.5;
bigAstSet.points = 50;
mediumAstSet.speed = 3.5;
mediumAstSet.points = 100;
smallAstSet.speed = 4.5;
smallAstSet.points = 150;
rocketSet.speed = 8;
rocketSet.points = 1000;
deathStarSet.speed = 4;
deathStarSet.shootTime = 70;
deathStarSet.shootSpeed = 7;
deathStarSet.points = 1500;
bigUfoSet.speed = 5;
bigUfoSet.shootTime = 65;
bigUfoSet.shootSpeed = 10;
bigUfoSet.shootDelay = 1000;
bigUfoSet.points = 2000;
smallUfoSet.speed = 6;
smallUfoSet.shootTime = 60;
smallUfoSet.shootSpeed = 10.5;
smallUfoSet.shootDelay = 1100;
smallUfoSet.points = 3000;
gemSet.timeBeforeFade = 115;
gemSet.fadeSpeed = 12;
gemSet.penalty = 0;
mineSet.points = 250;
enemyMix[0] = "11";
enemyMix[1] = "111";
enemyMix[2] = "112";
enemyMix[3] = "1122";
enemyMix[4] = "112222";
enemyMix[5] = "222222333";
enemyMix[6] = "111111333";
enemyMix[7] = "2222223344";
enemyMix[8] = "11223";
enemyMix[9] = "111222222222333333";
enemyMix[10] = "1111";
enemyMix[11] = "1122222";
enemyMix[12] = "11222222333333";
enemyMix[13] = "1122222233";
enemyMix[14] = "1222222233";
enemyMix[15] = "1111222233333333";
enemyMix[16] = "222222222222222";
enemyMix[17] = "2222222222222222222";
enemyMix[18] = "112222333334";
enemyMix[19] = "222233333344";
enemyMix[20] = "222233333344";
enemyMix[21] = "111111";
enemyMix[22] = "3333333333";
enemyMix[23] = "1112222333333";
enemyMix[24] = "11222233333455";
enemyMix[25] = "111222233334";
enemyMix[26] = "11122223333444";
enemyMix[27] = "33333333333333333";
enemyMix[28] = "333333333333333333355";
enemyMix[29] = "222233334445";
enemyMix[30] = "222233333344455";
enemyMix[31] = "222233334444";
enemyMix[32] = "2222222222222222222222";
enemyMix[33] = "3333333344445";
enemyMix[34] = "222222333344444455";
enemyMix[35] = "111122223333444455";
enemyMix[36] = "33333333334444555";
enemyMix[37] = "112222233334444555";
enemyMix[38] = "1122222333344445555";
enemyMix[39] = "112222222333344445555";
enemyMix[40] = "444444444444444444";
enemyMix[41] = "33333333333333333333333";
enemyMix[42] = "44444444444444444444";
enemyMix[43] = "222222223333445";
enemyMix[44] = "22222222334455";
enemyMix[45] = "2222223333333444555";
enemyMix[46] = "222222333333334444555";
enemyMix[47] = "2222223333334444455555";
enemyMix[48] = "22223333334444444555555";
enemyMix[49] = "222222333334444445555555";
nEnemyMix = 50;
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (success) {
if (success) {
trace("loaded XML succes");
nEnemyMix = 0;
nRatingLimit = 0;
nNLPoints = 0;
var _local1 = 0;
while (_local1 < myXML.firstChild.childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "starHero") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "rotationSpeed") {
heroSet.rotationSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "bulletSpeed") {
heroSet.bulletSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "bulletLength") {
heroSet.bulletLength = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shieldTime") {
heroSet.shieldTime = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootAngle") {
heroSet.shootAngle = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "initialWaveInterval") {
heroSet.initialWaveInterval = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "nextWaveIncrement") {
heroSet.nextWaveIncrement = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "newLifePoints") {
var _local2 = 0;
while (_local2 < myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.type) == "limit") {
NLPoints[nNLPoints] = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.value);
nNLPoints++;
}
_local2++;
}
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "rating") {
var _local2 = 0;
while (_local2 < myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.type) == "limit") {
ratingLimit[nRatingLimit] = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.value);
nRatingLimit++;
}
_local2++;
}
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "bigAsteroid") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
bigAstSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
bigAstSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "mediumAsteroid") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
mediumAstSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
mediumAstSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "smallAsteroid") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
smallAstSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
smallAstSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "rocket") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
rocketSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
rocketSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "deathStar") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
deathStarSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootTime") {
deathStarSet.shootTime = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootSpeed") {
deathStarSet.shootSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
deathStarSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "bigUFO") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
bigUfoSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootTime") {
bigUfoSet.shootTime = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootSpeed") {
bigUfoSet.shootSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "lightsOnInterval") {
bigUfoSet.shootDelay = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
bigUfoSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "smallUFO") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
smallUfoSet.speed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootTime") {
smallUfoSet.shootTime = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootSpeed") {
smallUfoSet.shootSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "lightsOnInterval") {
smallUfoSet.shootDelay = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
smallUfoSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "gem") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "timeBeforeFade") {
gemSet.timeBeforeFade = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "fadeSpeed") {
gemSet.fadeSpeed = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "penaltyPoints") {
gemSet.penalty = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "mine") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
mineSet.points = Number(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML.firstChild.childNodes[_local1].attributes.type) == "enemyMix") {
var _local3 = 0;
while (_local3 < myXML.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "wave") {
enemyMix[nEnemyMix] = String(myXML.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
nEnemyMix++;
}
_local3++;
}
}
_local1++;
}
}
};
myXML.load(com.communitymx.CacheManager.uncacheURL("settings.XML"));
var heroRSet = new Object();
var rocketRSet = new Object();
var gemRSet = new Object();
var NLRPoints = new Array();
var nNLRPoints = 0;
var ratingRLimit = new Array();
var nRatingRLimit = 0;
var enemyRMix = new Array();
var nEnemyRMix = 0;
heroRSet.rotationSpeed = 6.5;
heroRSet.bulletSpeed = 16;
heroRSet.bulletLength = 25;
heroRSet.shieldTime = 3;
heroRSet.shootAngle = 45;
heroRSet.initialWaveInterval = 1;
heroRSet.nextWaveIncrement = 0;
NLRPoints[0] = 10000;
NLRPoints[1] = 100000 /* 0x0186A0 */;
NLRPoints[2] = 280000 /* 0x0445C0 */;
nNLRPoints = 3;
ratingRLimit[0] = 100000 /* 0x0186A0 */;
ratingRLimit[1] = 250000 /* 0x03D090 */;
ratingRLimit[2] = 500000 /* 0x07A120 */;
ratingRLimit[3] = 1000000 /* 0x0F4240 */;
nRatingRLimit = 4;
rocketRSet.speed = 8;
rocketRSet.points = 1000;
gemRSet.timeBeforeFade = 30;
gemRSet.fadeSpeed = 5;
gemRSet.penalty = 0;
enemyRMix[0] = "2";
enemyRMix[1] = "22";
enemyRMix[2] = "22222";
enemyRMix[3] = "22";
enemyRMix[4] = "22";
enemyRMix[5] = "222";
enemyRMix[6] = "2222222";
enemyRMix[7] = "222";
enemyRMix[8] = "222";
enemyRMix[9] = "222";
enemyRMix[10] = "22222222";
enemyRMix[11] = "2222";
enemyRMix[12] = "2222";
enemyRMix[13] = "2222";
enemyRMix[14] = "2222";
enemyRMix[15] = "22222222";
enemyRMix[16] = "22222";
enemyRMix[17] = "22222";
enemyRMix[18] = "22222";
enemyRMix[19] = "22222";
enemyRMix[20] = "222222";
enemyRMix[21] = "222222";
enemyRMix[22] = "222222";
enemyRMix[23] = "222222";
enemyRMix[24] = "222222";
enemyRMix[25] = "2222222";
enemyRMix[26] = "2222222";
enemyRMix[27] = "2222222";
enemyRMix[28] = "2222222";
enemyRMix[29] = "2222222";
enemyRMix[30] = "22222222";
enemyRMix[31] = "22222222";
enemyRMix[32] = "22222222";
enemyRMix[33] = "22222222";
enemyRMix[34] = "22222222";
enemyRMix[35] = "22222222";
enemyRMix[36] = "222222222";
enemyRMix[37] = "222222222";
enemyRMix[38] = "222222222";
enemyRMix[39] = "22222222";
enemyRMix[40] = "222222222";
enemyRMix[41] = "222222222";
enemyRMix[42] = "222222222";
enemyRMix[43] = "222222222";
enemyRMix[44] = "2222222222";
enemyRMix[45] = "2222222222";
enemyRMix[46] = "2222222222";
enemyRMix[47] = "2222222222";
enemyRMix[48] = "22222222222";
enemyRMix[49] = "22222222222";
nEnemyRMix = 50;
myXML2 = new XML();
myXML2.ignoreWhite = true;
myXML2.onLoad = function (success) {
if (success) {
trace("loaded XML succes");
nEnemyRMix = 0;
nRatingRLimit = 0;
nNLRPoints = 0;
var _local1 = 0;
while (_local1 < myXML2.firstChild.childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].attributes.type) == "starHero") {
var _local3 = 0;
while (_local3 < myXML2.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "rotationSpeed") {
heroRSet.rotationSpeed = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "bulletSpeed") {
heroRSet.bulletSpeed = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "bulletLength") {
heroRSet.bulletLength = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shieldTime") {
heroRSet.shieldTime = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "shootAngle") {
heroRSet.shootAngle = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "initialWaveInterval") {
heroRSet.initialWaveInterval = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "nextWaveIncrement") {
heroRSet.nextWaveIncrement = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "newLifePoints") {
var _local2 = 0;
while (_local2 < myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.type) == "limit") {
NLRPoints[nNLRPoints] = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.value);
nNLRPoints++;
}
_local2++;
}
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "rating") {
var _local2 = 0;
while (_local2 < myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.type) == "limit") {
ratingRLimit[nRatingRLimit] = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].childNodes[_local2].attributes.value);
nRatingRLimit++;
}
_local2++;
}
}
_local3++;
}
}
if (String(myXML2.firstChild.childNodes[_local1].attributes.type) == "rocket") {
var _local3 = 0;
while (_local3 < myXML2.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "speed") {
rocketRSet.speed = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "points") {
rocketRSet.points = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML2.firstChild.childNodes[_local1].attributes.type) == "gem") {
var _local3 = 0;
while (_local3 < myXML2.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "timeBeforeFade") {
gemRSet.timeBeforeFade = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "fadeSpeed") {
gemRSet.fadeSpeed = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "penaltyPoints") {
gemRSet.penalty = Number(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
}
_local3++;
}
}
if (String(myXML2.firstChild.childNodes[_local1].attributes.type) == "enemyMix") {
var _local3 = 0;
while (_local3 < myXML2.firstChild.childNodes[_local1].childNodes.length) {
if (String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.type) == "wave") {
enemyRMix[nEnemyRMix] = String(myXML2.firstChild.childNodes[_local1].childNodes[_local3].attributes.value);
nEnemyRMix++;
}
_local3++;
}
}
_local1++;
}
}
};
myXML2.load(com.communitymx.CacheManager.uncacheURL("rocket_challenge.XML"));
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
var adShown = false;
loadingField._visible = false;
__com_mochibot__("05fce95c", this, 10301, true);
mochi.MochiServices.connect("2524a9ba6ad4d783");
MochiAd.showPreGameAd({id:"2524a9ba6ad4d783", res:"700x525", background:0, color:16711680, outline:16777215, no_bg:false, ad_finished:function () {
adShown = true;
}});
this.onEnterFrame = function () {
if (adShown) {
if (_root.getBytesLoaded() == _root.getBytesTotal()) {
this.onEnterFrame = null;
_root.link = "logo";
_root.fader.play();
} else {
loadingField._visible = true;
loadingField.text = ("Loading... " + String(_root.getBytesLoaded())) + "%";
}
}
};
Instance of Symbol 320 MovieClip in Frame 20
onClipEvent (enterFrame) {
if (_global.saved.getMusic()) {
musicTxt.text = "Music On";
} else {
musicTxt.text = "Music Off";
}
}
on (release) {
_global.saved.toggleMusic2();
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
var filter1 = (new flash.filters.GlowFilter(65280, 0.8, 10, 10, 2.5, 3, false, false));
var filterArray1 = new Array();
filterArray1.push(filter1);
musicTxt.filters = filterArray1;
_root.jukeBoxMC.playSound("mouseOver");
}
on (rollOut) {
musicTxt.filters = [];
}
Instance of Symbol 322 MovieClip in Frame 20
on (release) {
_global.saved.toggleSound();
_root.jukeBoxMC.playSound("mouseClick");
}
onClipEvent (enterFrame) {
if (_global.saved.getSound()) {
musicTxt.text = "Sound On";
} else {
musicTxt.text = "Sound Off";
}
}
on (rollOver) {
var filter1 = (new flash.filters.GlowFilter(65280, 0.8, 10, 10, 2.5, 3, false, false));
var filterArray1 = new Array();
filterArray1.push(filter1);
musicTxt.filters = filterArray1;
_root.jukeBoxMC.playSound("mouseOver");
}
on (rollOut) {
musicTxt.filters = [];
}
Instance of Symbol 327 MovieClip in Frame 20
onClipEvent (enterFrame) {
if (_global.saved.instrOn) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
_global.saved.toggleInstr();
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
var filter1 = (new flash.filters.GlowFilter(65280, 0.8, 10, 10, 2.5, 3, false, false));
var filterArray1 = new Array();
filterArray1.push(filter1);
this.filters = filterArray1;
_root.jukeBoxMC.playSound("mouseOver");
}
on (rollOut) {
this.filters = [];
}
Frame 30
_global.gamePaused = false;
adrenalineButton.enabled = true;
adrenalineButton._alpha = 100;
adrenalineRocketButton.enabled = true;
adrenalineRocketButton._alpha = 100;
Frame 40
if (_global.saved.instrOn == false) {
_root.gotoAndStop("Game");
}
Instance of Symbol 327 MovieClip in Frame 40
onClipEvent (enterFrame) {
if (_global.saved.instrOn) {
gotoAndStop (1);
} else {
gotoAndStop (2);
}
}
on (release) {
_global.saved.toggleInstr();
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
var filter1 = (new flash.filters.GlowFilter(65280, 0.8, 10, 10, 2.5, 3, false, false));
var filterArray1 = new Array();
filterArray1.push(filter1);
this.filters = filterArray1;
_root.jukeBoxMC.playSound("mouseOver");
}
on (rollOut) {
this.filters = [];
}
Frame 60
scoreField.text = _global.playerScore;
playerRating.scor = _global.playerScore;
winSubmit.nameField.text = _global.saved.getPlayerName();
Mouse.show();
trace("game mode=" + _global.gameMode);
var isHS_sant;
if (_global.gameMode == "normal") {
isHS_sant = _global.saved.isNormalHS(_global.playerScore);
}
if (_global.gameMode == "adrenaline") {
isHS_sant = _global.saved.isAdrenalineHS(_global.playerScore);
}
if (isHS_sant) {
messageField.text = "Congratulations! You have a high score!";
winSubmit._visible = true;
goMainMenuButton._visible = false;
goPlayAgainButton._visible = false;
trace("selecting........................");
Selection.setFocus(this.winSubmit.nameField);
Selection.setSelection(0, this.winSubmit.nameField.length);
} else {
messageField.text = "Unfortunatly you did not get a high score. Keep trying...";
winSubmit._visible = false;
goMainMenuButton._visible = true;
goPlayAgainButton._visible = true;
}
goPlayAgainButton.onRelease = function () {
_root.link = "PlayAgainDetour";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
goMainMenuButton.onRelease = function () {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
goPlayAgainButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
goMainMenuButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
Frame 70
function mochiSubmitCallBack(args) {
if (args.scores != null) {
trace("Scores received!");
var _local1 = mochi.MochiScores.scoresArrayToObjects(args.scores);
onlineStatWin.rank1Field.text = _local1.places.daily;
onlineStatWin.rank2Field.text = _local1.counts.daily;
onlineStatWin._visible = true;
}
}
onlineStatWin._visible = false;
var selectat;
selectat = new TextFormat();
selectat.font = "Comic Sans MS";
selectat.color = 16711680 /* 0xFF0000 */;
selectat.size = 14;
var defFormat;
defFormat = new TextFormat();
defFormat.font = "Comic Sans MS";
defFormat.color = 16777215 /* 0xFFFFFF */;
defFormat.size = 14;
var h = new Array();
var i = 0;
while (i < 20) {
h[i] = new Array();
i++;
}
h[0][0] = nn1;
h[0][1] = ns1;
h[1][0] = nn2;
h[1][1] = ns2;
h[2][0] = nn3;
h[2][1] = ns3;
h[3][0] = nn4;
h[3][1] = ns4;
h[4][0] = nn5;
h[4][1] = ns5;
h[5][0] = nn6;
h[5][1] = ns6;
h[6][0] = nn7;
h[6][1] = ns7;
h[7][0] = nn8;
h[7][1] = ns8;
h[8][0] = nn9;
h[8][1] = ns9;
h[9][0] = nn10;
h[9][1] = ns10;
h[10][0] = an1;
h[10][1] = as1;
h[11][0] = an2;
h[11][1] = as2;
h[12][0] = an3;
h[12][1] = as3;
h[13][0] = an4;
h[13][1] = as4;
h[14][0] = an5;
h[14][1] = as5;
h[15][0] = an6;
h[15][1] = as6;
h[16][0] = an7;
h[16][1] = as7;
h[17][0] = an8;
h[17][1] = as8;
h[18][0] = an9;
h[18][1] = as9;
h[19][0] = an10;
h[19][1] = as10;
var i = 0;
while (i < 20) {
h[i][0].text = "";
h[i][0].setNewTextFormat(defFormat);
h[i][1].text = "";
h[i][1].setNewTextFormat(defFormat);
i++;
}
if (_global.submitScoreMode) {
mainMenuBt._x = 215;
playAgainBt._x = 503;
if (_global.gameMode == "normal") {
_global.saved.setNormalHS(_global.saved.getPlayerName(), _global.playerScore);
mochi.MochiScores.setBoardID("620b8bae7120dce5");
mochi.MochiScores.submit(_global.playerScore, _global.saved.getPlayerName(), this, "mochiSubmitCallBack");
}
if (_global.gameMode == "adrenaline") {
_global.saved.setAdrenalineHS(_global.saved.getPlayerName(), _global.playerScore);
mochi.MochiScores.setBoardID("df306850dac8454f");
mochi.MochiScores.submit(_global.playerScore, _global.saved.getPlayerName(), this, "mochiSubmitCallBack");
}
} else {
onlineStatWin._visible = false;
mainMenuBt._x = 350;
playAgainBt._x = 1000;
}
_global.saved.normalHS.sortOn("score", Array.DESCENDING | Array.NUMERIC);
var i = 0;
while (i < 10) {
if (_global.saved.normalHS[i].name != undefined) {
h[i][0].text = _global.saved.normalHS[i].name;
h[i][1].text = _global.saved.normalHS[i].score;
}
i++;
}
_global.saved.adrenalineHS.sortOn("score", Array.DESCENDING | Array.NUMERIC);
var i = 0;
while (i < 10) {
if (_global.saved.adrenalineHS[i].name != undefined) {
h[10 + i][0].text = _global.saved.adrenalineHS[i].name;
h[10 + i][1].text = _global.saved.adrenalineHS[i].score;
}
i++;
}
var i = 0;
while (i < 20) {
if (((h[i][0].text == _global.saved.getPlayerName()) && (Number(h[i][1].text) == _global.playerScore)) && (_global.submitScoreMode)) {
trace("found " + i);
h[i][0].setNewTextFormat(selectat);
h[i][1].setNewTextFormat(selectat);
h[i][0].text = _global.saved.getPlayerName();
h[i][1].text = _global.playerScore;
break;
}
i++;
}
_global.submitScoreMode = false;
mainMenuBt.onRelease = function () {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
playAgainBt.onRelease = function () {
_root.link = "PlayAgainDetour";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
playAgainBt.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
mainMenuBt.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
Frame 100
scoreField.text = _global.playerScore;
playerRating.scor = _global.playerScore;
winSubmit.nameField.text = _global.saved.getPlayerName();
Mouse.show();
var isHS_sant;
if (_global.gameMode == "normal") {
isHS_sant = _global.saved.isNormalHS(_global.playerScore);
}
if (_global.gameMode == "adrenaline") {
isHS_sant = _global.saved.isAdrenalineHS(_global.playerScore);
}
if (isHS_sant) {
messageField.text = "Congratulations! You have a high score!";
winSubmit._visible = true;
vPlayAgainButton._visible = false;
vMainMenuButton._visible = false;
trace("selecting........................");
Selection.setFocus(this.winSubmit.nameField);
Selection.setSelection(0, this.winSubmit.nameField.length);
} else {
messageField.text = "Unfortunatly you did not get a high score. Keep trying...";
winSubmit._visible = false;
vPlayAgainButton._visible = true;
vMainMenuButton._visible = true;
}
vPlayAgainButton.onRelease = function () {
_root.link = "PlayAgainDetour";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
vMainMenuButton.onRelease = function () {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
vPlayAgainButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
vMainMenuButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
Frame 110
_global.playerScore = 0;
_global.submitScoreMode = false;
_root.gotoAndStop("GameMode");
Frame 124
Mouse.show();
nWavesTextField.text = _global.wavesCompleted;
playerRating2.setStarRating(_global.wavesCompleted);
goPlayAgainButton.onRelease = function () {
_root.link = "PlayAgainDetour";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
goMainMenuButton.onRelease = function () {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
goPlayAgainButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
goMainMenuButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
Frame 135
Mouse.show();
adrUnlockField._visible = false;
if (_global.gameMode == "rocket") {
adrUnlockField._visible = true;
_global.saved.setAdrenalineRocketMode(true);
}
vPlayAgainButton.onRelease = function () {
_root.link = "PlayAgainDetour";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
vMainMenuButton.onRelease = function () {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
};
vPlayAgainButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
vMainMenuButton.onRollOver = function () {
_root.jukeBoxMC.playSound("mouseOver");
};
Frame 191
var link = "";
var adrenalineUnlocked = false;
var gameMode = "normal";
_global.playerScore = 0;
_global.submitScoreMode = false;
_global.saved = new sharedData();
if (_global.saved.adrenalineUnlocked) {
adrenalineUnlocked = true;
}
Symbol 18 MovieClip [heroBullet] Frame 1
#initclip 42
Object.registerClass("heroBullet", heroBullet);
#endinitclip
Symbol 22 MovieClip [bigAsteroidMC] Frame 1
#initclip 23
Object.registerClass("bigAsteroidMC", bigAsteroidMC);
#endinitclip
stop();
Symbol 22 MovieClip [bigAsteroidMC] Frame 5
stop();
_global.playerScore = _global.playerScore + _root.bigAstSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
dead = true;
Symbol 26 MovieClip [mediumAsteroidMC] Frame 1
#initclip 24
Object.registerClass("mediumAsteroidMC", mediumAsteroidMC);
#endinitclip
stop();
Symbol 26 MovieClip [mediumAsteroidMC] Frame 6
stop();
_global.playerScore = _global.playerScore + _root.mediumAstSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 62 MovieClip Frame 16
stop();
_parent.gotoAndPlay("die");
Symbol 63 MovieClip [deathStarMC] Frame 1
#initclip 25
Object.registerClass("deathStarMC", deathStarMC);
#endinitclip
stop();
Symbol 63 MovieClip [deathStarMC] Frame 10
stop();
addGem();
Symbol 63 MovieClip [deathStarMC] Frame 20
stop();
_global.playerScore = _global.playerScore + _root.deathStarSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 114 MovieClip Frame 33
stop();
_parent.gotoAndPlay("die");
Symbol 115 MovieClip [rocketMC] Frame 1
#initclip 26
Object.registerClass("rocketMC", rocketMC);
#endinitclip
stop();
Symbol 115 MovieClip [rocketMC] Frame 10
stop();
if ((_global.gameMode == "normal") || (_global.gameMode == "adrenaline")) {
addGem();
}
Symbol 115 MovieClip [rocketMC] Frame 20
stop();
if ((_global.gameMode == "normal") || (_global.gameMode == "adrenaline")) {
_global.playerScore = _global.playerScore + _root.rocketSet.points;
_parent._parent.updateGUI();
}
_parent._parent.removeEnemy(ID);
Symbol 135 MovieClip Frame 17
stop();
_parent.gotoAndPlay("die");
Symbol 136 MovieClip [smallAsteroidMC] Frame 1
#initclip 27
Object.registerClass("smallAsteroidMC", smallAsteroidMC);
#endinitclip
stop();
Symbol 136 MovieClip [smallAsteroidMC] Frame 5
stop();
Symbol 136 MovieClip [smallAsteroidMC] Frame 15
stop();
_global.playerScore = _global.playerScore + _root.smallAstSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
dead = true;
Symbol 140 MovieClip Frame 1
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 140 MovieClip Frame 4
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 140 MovieClip Frame 7
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 140 MovieClip Frame 11
lMC._visible = true;
Symbol 140 MovieClip Frame 13
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 140 MovieClip Frame 16
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 140 MovieClip Frame 19
if (!_parent.shooting) {
lMC._visible = false;
} else {
lMC._visible = true;
}
Symbol 158 MovieClip Frame 33
stop();
_parent.gotoAndPlay("die");
Symbol 159 MovieClip [smallUfoMC] Frame 1
#initclip 28
Object.registerClass("smallUfoMC", smallUfoMC);
#endinitclip
stop();
Symbol 159 MovieClip [smallUfoMC] Frame 10
stop();
addGem();
Symbol 159 MovieClip [smallUfoMC] Frame 20
stop();
_global.playerScore = _global.playerScore + _root.smallUfoSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 163 MovieClip Frame 1
if (!_parent.shooting) {
lMC._visible = false;
}
Symbol 163 MovieClip Frame 10
lMC._visible = true;
Symbol 164 MovieClip [bigUfoMC] Frame 1
#initclip 29
Object.registerClass("bigUfoMC", bigUfoMC);
#endinitclip
stop();
Symbol 164 MovieClip [bigUfoMC] Frame 10
stop();
addGem();
Symbol 164 MovieClip [bigUfoMC] Frame 20
stop();
_global.playerScore = _global.playerScore + _root.bigUfoSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 167 MovieClip [smallUfoBullet] Frame 1
#initclip 30
Object.registerClass("smallUfoBullet", smallUfoBullet);
#endinitclip
Symbol 178 MovieClip Frame 20
stop();
Symbol 179 MovieClip [deathStarBullet] Frame 1
#initclip 31
Object.registerClass("deathStarBullet", deathStarBullet);
#endinitclip
stop();
Symbol 179 MovieClip [deathStarBullet] Frame 25
stop();
_global.playerScore = _global.playerScore + 10;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 182 MovieClip [bigUfoBullet] Frame 1
#initclip 32
Object.registerClass("bigUfoBullet", bigUfoBullet);
#endinitclip
Symbol 189 MovieClip [bigUfoGemMC] Frame 1
#initclip 33
Object.registerClass("bigUfoGemMC", gemMC);
#endinitclip
stop();
Symbol 189 MovieClip [bigUfoGemMC] Frame 50
stop();
_global.playerScore = _global.playerScore + _root.bigUfoSet.points;
_parent._parent.updateGUI();
_parent._parent.removeGem(ID);
Symbol 195 MovieClip [deathStarGemMC] Frame 1
#initclip 34
Object.registerClass("deathStarGemMC", gemMC);
#endinitclip
stop();
Symbol 195 MovieClip [deathStarGemMC] Frame 50
stop();
_global.playerScore = _global.playerScore + _root.deathStarSet.points;
_parent._parent.updateGUI();
_parent._parent.removeGem(ID);
Symbol 201 MovieClip [smallUfoGemMC] Frame 1
#initclip 35
Object.registerClass("smallUfoGemMC", gemMC);
#endinitclip
stop();
Symbol 201 MovieClip [smallUfoGemMC] Frame 50
stop();
_global.playerScore = _global.playerScore + _root.smallUfoSet.points;
_parent._parent.updateGUI();
_parent._parent.removeGem(ID);
Symbol 207 MovieClip [rocketGemMC] Frame 1
#initclip 36
Object.registerClass("rocketGemMC", gemMC);
#endinitclip
stop();
Symbol 207 MovieClip [rocketGemMC] Frame 50
stop();
_global.playerScore = _global.playerScore + _root.rocketSet.points;
_parent._parent.updateGUI();
_parent._parent.removeGem(ID);
Symbol 211 MovieClip [mineMC] Frame 1
#initclip 37
Object.registerClass("mineMC", mineMC);
#endinitclip
stop();
Symbol 211 MovieClip [mineMC] Frame 11
stop();
Symbol 211 MovieClip [mineMC] Frame 21
stop();
_global.playerScore = _global.playerScore + _root.mineSet.points;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
Symbol 220 MovieClip [ratings] Frame 1
#initclip 38
Object.registerClass("ratings", ratings);
#endinitclip
Symbol 234 MovieClip [hero] Frame 1
#initclip 39
Object.registerClass("hero", hero);
#endinitclip
stop();
Symbol 234 MovieClip [hero] Frame 22
destroyRangeEnemy();
Symbol 234 MovieClip [hero] Frame 85
setImune();
dead = false;
Symbol 241 MovieClip Frame 1
function updateCounter() {
fpsField = fpsCounter;
fpsCounter = 0;
}
var fpsCounter = 0;
var intv = setInterval(updateCounter, 1000);
this.onEnterFrame = function () {
fpsCounter++;
};
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 4
this._x = 170;
Symbol 244 MovieClip Frame 55
this._x = 1000;
Symbol 266 Button
on (release) {
this._x = -500;
_global.gamePaused = false;
Mouse.hide();
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 270 Button
on (release) {
_parent.clearListeners();
_root.link = "MainMenu";
_root.jukeBoxMC.stopMusic();
_root.fader.play();
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 274 Button
on (release) {
this._x = -1000;
_root.instrMC._x = 0;
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 276 Button
on (release) {
_global.saved.toggleSound();
if (stext.text == "Sound On") {
stext.text = "Sound Off";
} else {
stext.text = "Sound On";
}
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 278 Button
on (release) {
_global.saved.toggleMusic();
if (mtext.text == "Music On") {
mtext.text = "Music Off";
} else {
mtext.text = "Music On";
}
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 282 MovieClip [GameDirectorMC] Frame 1
#initclip 40
Object.registerClass("GameDirectorMC", GameDirectorMC);
#endinitclip
Symbol 284 MovieClip [jukeboxMC] Frame 1
#initclip 41
Object.registerClass("jukeboxMC", jukeboxMC);
#endinitclip
Symbol 289 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 24
_root.gotoAndStop(_root.link);
Symbol 291 MovieClip Frame 1
var gameLoop = new Sound();
gameLoop.attachSound("gameLoopSound");
Symbol 499 MovieClip [__Packages.com.communitymx.CacheManager] Frame 0
class com.communitymx.CacheManager
{
function CacheManager () {
}
static function uncacheURL(url) {
if (_cmInstance == undefined) {
_cmInstance = new com.communitymx.CacheManager();
}
return(_cmInstance.formatString(url));
}
function formatString(url) {
if (isLocalPlayback()) {
return(url);
}
var _local2 = "×tamp=" + new Date().getTime();
return(((url + "?cachebuster=") + Math.random()) + _local2);
}
function isLocalPlayback() {
return(_url.indexOf("file") == 0);
}
static var _cmInstance = undefined;
}
Symbol 500 MovieClip [__Packages.sharedData] Frame 0
class sharedData
{
var normalHS, adrenalineHS, sd;
function sharedData () {
normalHS = new Array();
adrenalineHS = new Array();
sd = SharedObject.getLocal("shooting_star");
if (sd.data.playerName == undefined) {
sd.data.playerName = "Player";
playerName = "Player";
} else {
playerName = sd.data.playerName;
}
if (sd.data.soundOn == undefined) {
sd.data.soundOn = true;
soundOn = true;
} else {
soundOn = sd.data.soundOn;
}
if (sd.data.musicOn == undefined) {
sd.data.musicOn = true;
musicOn = true;
} else {
musicOn = sd.data.musicOn;
}
if (sd.data.instrOn == undefined) {
sd.data.instrOn = true;
instrOn = true;
} else {
instrOn = sd.data.instrOn;
}
if (sd.data.adrenalineUnlocked == undefined) {
sd.data.adrenalineUnlocked = false;
adrenalineUnlocked = false;
} else {
adrenalineUnlocked = sd.data.adrenalineUnlocked;
}
if (sd.data.adrenalineRocketUnlocked == undefined) {
sd.data.adrenalineRocketUnlocked = false;
adrenalineRocketUnlocked = false;
} else {
adrenalineRocketUnlocked = sd.data.adrenalineRocketUnlocked;
}
if (sd.data.normalHS == undefined) {
sd.data.normalHS = new Array();
sd.data.nNormalHS = 0;
} else {
normalHS = sd.data.normalHS;
nNormalHS = sd.data.nNormalHS;
}
if (sd.data.adrenalineHS == undefined) {
sd.data.adrenalineHS = new Array();
sd.data.nAdrenalineHS = 0;
} else {
adrenalineHS = sd.data.adrenalineHS;
nAdrenalineHS = sd.data.nAdrenalineHS;
}
sd.flush();
}
function setPlayerName(player) {
sd.data.playerName = player;
playerName = player;
sd.flush();
}
function getPlayerName() {
return(playerName);
}
function setSound(snd) {
sd.data.soundOn = snd;
soundOn = snd;
sd.flush();
}
function getSound() {
return(soundOn);
}
function setMusic(mus) {
sd.data.musicOn = mus;
musicOn = mus;
sd.flush();
}
function getMusic() {
return(musicOn);
}
function setAdrenalineMode(mod) {
sd.data.adrenalineUnlocked = mod;
adrenalineUnlocked = mod;
sd.flush();
}
function setAdrenalineRocketMode(mod) {
sd.data.adrenalineRocketUnlocked = mod;
adrenalineRocketUnlocked = mod;
sd.flush();
}
function toggleInstr() {
instrOn = !instrOn;
sd.data.instrOn = instrOn;
sd.flush();
}
function toggleMusic() {
setMusic(!getMusic());
if (getMusic()) {
_root.jukeBoxMC.playLoop();
} else {
_root.jukeBoxMC.stopMusic();
}
}
function toggleMusic2() {
setMusic(!getMusic());
}
function toggleSound() {
if (getSound()) {
_root.jukeBoxMC.stopSound();
}
setSound(!getSound());
}
function isNormalHS(scor) {
if ((sd.data.normalHS.length < 10) || (sd.data.normalHS[9].score < scor)) {
return(true);
}
return(false);
}
function isAdrenalineHS(scor) {
trace("Adrenaline length:" + sd.data.adrenalineHS.length);
trace("Adrenaline[9]: " + sd.data.adrenalineHS[9].score);
trace("Score to submit: " + scor);
if ((sd.data.adrenalineHS.length < 10) || (sd.data.adrenalineHS[9].score < scor)) {
return(true);
}
return(false);
}
function getNormalHS(nr) {
if (nNormalHS > nr) {
return(normalHS[nr]);
}
return({name:"", score:0});
}
function setNormalHS(playerName, playerScore) {
normalHS.push({name:playerName, score:playerScore});
normalHS.sortOn("score", Array.DESCENDING | Array.NUMERIC);
sd.data.normalHS = [];
trace("before array=" + sd.data.normalHS);
var _local2 = 0;
while (_local2 < 10) {
if (normalHS.length <= _local2) {
break;
}
sd.data.normalHS[_local2] = normalHS[_local2];
_local2++;
}
trace("after array=" + sd.data.normalHS);
sd.flush();
}
function getAdrenalineHS(nr, index) {
if (nAdrenalineHS > nr) {
return(adrenalineHS[nr][index]);
}
return("");
}
function setAdrenalineHS(playerName, playerScore) {
adrenalineHS.push({name:playerName, score:playerScore});
adrenalineHS.sortOn("score", Array.DESCENDING | Array.NUMERIC);
sd.data.adrenalineHS = [];
var _local2 = 0;
while (_local2 < 10) {
if (adrenalineHS.length <= _local2) {
break;
}
sd.data.adrenalineHS[_local2] = adrenalineHS[_local2];
_local2++;
}
sd.flush();
}
var playerName = "";
var soundOn = true;
var musicOn = true;
var instrOn = true;
var adrenalineUnlocked = false;
var adrenalineRocketUnlocked = false;
var nNormalHS = 0;
var nAdrenalineHS = 0;
}
Symbol 501 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.32");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 502 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.5");
}
static function showPreGameAd(options) {
var _local26 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}, ad_progress:function (percent) {
}};
options = _parseOptions(options, _local26);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def") {
options.ad_started();
options.ad_finished();
return(undefined);
}
var clip = options.clip;
var _local22 = 11000;
var _local25 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local6 = chk.createEmptyMovieClip("_mochiad_bar", 4);
if (options.no_progress_bar) {
_local6._visible = false;
delete options.no_progress_bar;
} else {
_local6._x = 10;
_local6._y = _local13 - 20;
}
var _local21 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local23 = options.outline;
delete options.outline;
var _local5 = _local6.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local6.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local21);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local7 = _local6.createEmptyMovieClip("_outline", 3);
_local7.lineStyle(0, _local23, 100);
_local7.moveTo(0, 0);
_local7.lineTo(_local4 - 20, 0);
_local7.lineTo(_local4 - 20, 10);
_local7.lineTo(0, 10);
_local7.lineTo(0, 0);
chk.ad_msec = _local22;
chk.ad_timeout = _local25;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local11 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local2 = (100 * _local8) / _local4;
var _local10 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local13 = Math.min(100, Math.min(_local2 || 0, _local10));
_local13 = Math.max(this.last_pcnt, _local13);
this.last_pcnt = _local13;
_local9._xscale = _local13;
options.ad_progress(_local13);
if (sendHostProgress) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local2});
if (_local2 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var _local7 = _local11.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if ((_local5 > chk.ad_timeout) && (_local2 == 100)) {
options.ad_failed();
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showClickAwayAd(options) {
var _local9 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function () {
}, ad_finished:function () {
}, ad_loaded:function (width, height) {
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local9);
var clip = options.clip;
var _local8 = options.ad_timeout;
delete options.ad_timeout;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local4 = _getRes(options);
var _local10 = _local4[0];
var _local7 = _local4[1];
mc._x = _local10 * 0.5;
mc._y = _local7 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_timeout = _local8;
chk.started = getTimer();
chk.showing = false;
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
var _local20 = false;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
_local2 = true;
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local2) {
delete this.onEnterFrame;
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}, ad_failed:function () {
trace("[MochiAd] Couldn't load an ad, make sure that your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_loaded:function (width, height) {
}, ad_skipped:function () {
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_failed();
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace("[MOCHIAD rpcTestFn] " + s);
return(s);
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
options.ad_failed();
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showPreloaderAd(options) {
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
showPreGameAd(options);
}
static function showTimedAd(options) {
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
showInterLevelAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
if (clip._mochiad._containerLCName != undefined) {
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"unload"});
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
static function rpc(clip, callbackID, arg) {
switch (arg.id) {
case "setValue" :
setValue(clip, arg.objectName, arg.value);
break;
case "getValue" :
var _local4 = getValue(clip, arg.objectName);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local4);
break;
case "runMethod" :
var _local3 = runMethod(clip, arg.method, arg.args);
clip._mochiad.lc.send(clip._mochiad._containerLCName, "rpcResult", callbackID, _local3);
break;
default :
trace("[mochiads rpc] unknown rpc id: " + arg.id);
}
}
static function setValue(base, objectName, value) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
base[_local2[_local1]] = value;
}
static function getValue(base, objectName) {
var _local2 = objectName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
return(base[_local2[_local1]]);
}
static function runMethod(base, methodName, argsArray) {
var _local2 = methodName.split(".");
var _local1;
_local1 = 0;
while (_local1 < (_local2.length - 1)) {
if ((base[_local2[_local1]] == undefined) || (base[_local2[_local1]] == null)) {
return(undefined);
}
base = base[_local2[_local1]];
_local1++;
}
if (typeof(base[_local2[_local1]]) == "function") {
return(base[_local2[_local1]].apply(base, argsArray));
}
return(undefined);
}
}
Symbol 503 MovieClip [__Packages.bigAsteroidMC] Frame 0
class bigAsteroidMC extends MovieClip
{
var rotAngle, speed, dir, gotoAndPlay, _parent, _y, _x, asteroidMC;
function bigAsteroidMC () {
super();
}
function onLoad() {
rotAngle = 1;
speed = _root.bigAstSet.speed;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
rotAngle = rotAngle * 1.5;
}
getDirection();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getDirection() {
dir = 0;
while (((dir % 90) < 25) || ((dir % 90) > 65)) {
dir = randRange(0, 359);
}
dir = (dir * 3.14) / 180;
}
function hitFunction() {
(gotoAndPlay("explode"));// not popped
dead = true;
_root.jukeBoxMC.playSound("bigAsteroidExplode");
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent._parent.enemyLayer.attachMovie("mediumAsteroidMC", "mediumAsteroid" + String(_parent._parent.enemyID), _parent._parent.enemyLayer.getNextHighestDepth(), {_x:_x - 5, _y:_y, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent._parent.enemyLayer.attachMovie("mediumAsteroidMC", "mediumAsteroid" + String(_parent._parent.enemyID), _parent._parent.enemyLayer.getNextHighestDepth(), {_x:_x + 5, _y:_y, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (_x < -50) {
_x = 750;
}
if (_x > 750) {
_x = -50;
}
if (_y < -50) {
_y = 575;
}
if (_y > 575) {
_y = -50;
}
asteroidMC._rotation = asteroidMC._rotation + rotAngle;
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
}
var dead = false;
var radius = 28;
}
Symbol 504 MovieClip [__Packages.mediumAsteroidMC] Frame 0
class mediumAsteroidMC extends MovieClip
{
var rotAngle, speed, dir, gotoAndPlay, _parent, _y, _x, asteroidMC;
function mediumAsteroidMC () {
super();
}
function onLoad() {
rotAngle = 2;
speed = _root.mediumAstSet.speed;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
rotAngle = rotAngle * 1.5;
}
getDirection();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getDirection() {
dir = 0;
while (((dir % 90) < 25) || ((dir % 90) > 65)) {
dir = randRange(0, 359);
}
dir = (dir * 3.14) / 180;
}
function hitFunction() {
(gotoAndPlay("explode"));// not popped
dead = true;
_root.jukeBoxMC.playSound("mediumAsteroidExplode");
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent._parent.enemyLayer.attachMovie("smallAsteroidMC", "smallAsteroidMC" + String(_parent._parent.enemyID), _parent._parent.enemyLayer.getNextHighestDepth(), {_x:_x - 5, _y:_y - 5, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent._parent.enemyLayer.attachMovie("smallAsteroidMC", "smallAsteroidMC" + String(_parent._parent.enemyID), _parent._parent.enemyLayer.getNextHighestDepth(), {_x:_x + 5, _y:_y - 5, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent._parent.enemyLayer.attachMovie("smallAsteroidMC", "smallAsteroidMC" + String(_parent._parent.enemyID), _parent._parent.enemyLayer.getNextHighestDepth(), {_x:_x, _y:_y + 5, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (_x < -50) {
_x = 750;
}
if (_x > 750) {
_x = -50;
}
if (_y < -50) {
_y = 575;
}
if (_y > 575) {
_y = -50;
}
asteroidMC._rotation = asteroidMC._rotation + rotAngle;
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
}
var dead = false;
var radius = 16;
}
Symbol 505 MovieClip [__Packages.deathStarMC] Frame 0
class deathStarMC extends MovieClip
{
var glowMC, rotationAngle, speed, shootSpeed, shootDelayParam, contor, dirChangeContor, dir, gotoAndStop, _parent, _y, _x, _rotation, swapDepths, intervalID;
function deathStarMC () {
super();
}
function onLoad() {
glowMC._visible = false;
rotationAngle = randRange(0, 999);
if ((rotationAngle % 2) == 0) {
rotationAngle = 1;
} else {
rotationAngle = -1;
}
speed = _root.deathStarSet.speed;
shootSpeed = _root.deathStarSet.shootTime;
shootDelayParam = 1300;
contor = -randRange(0, shootSpeed);
dirChangeContor = 0;
getDirection();
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
shootSpeed = shootSpeed / 1.5;
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getDirection() {
dir = 0;
while (((dir % 90) < 25) || ((dir % 90) > 65)) {
dir = randRange(0, 359);
}
dir = (dir * 3.14) / 180;
}
function getNewValidDirection(n) {
if (n == 1) {
dir = randRange(270, 450);
if (dir > 360) {
dir = dir - 360;
}
dir = (dir * 3.14) / 180;
}
if (n == 2) {
dir = randRange(90, 270);
dir = (dir * 3.14) / 180;
}
if (n == 3) {
dir = randRange(0, 180);
dir = (dir * 3.14) / 180;
}
if (n == 4) {
dir = randRange(180, 360);
dir = (dir * 3.14) / 180;
}
}
function hitFunction() {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("deathStarExplode");
}
function dropMine() {
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent.attachMovie("mineMC", "mineMC" + String(_parent._parent.enemyID), _parent.getNextHighestDepth(), {_x:_x + 10, _y:_y - 10, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function shootBullet(angle) {
var _local2 = _rotation - 55;
_local2 = (_local2 * 3.14) / 180;
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent.attachMovie("deathStarBullet", "deathStarBullet" + String(_parent._parent.enemyID), _parent.getNextHighestDepth(), {_x:_x + (20 * Math.cos(_local2)), _y:_y + (20 * Math.sin(_local2)), angle:angle, bulletLength:15, bulletThick:2, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function addGem() {
_parent._parent.gemArray[_parent._parent.nGems] = _parent._parent.gemLayer.attachMovie("deathStarGemMC", "deathStarGemMC" + String(_parent._parent.enemyID), _parent._parent.gemLayer.getNextHighestDepth(), {_x:_x, _y:_y, ID:_parent._parent.enemyID});
swapDepths(_parent._parent.gemArray[_parent._parent.nGems]);
_parent._parent.nGems++;
_parent._parent.enemyID++;
}
function shootDelay() {
shooting = true;
glowMC._visible = true;
intervalID = setInterval(this, "shootNow", shootDelayParam);
trace("seting Interval");
}
function shootNow() {
shooting = false;
glowMC._visible = false;
clearInterval(intervalID);
if (dead) {
return(undefined);
}
_root.jukeBoxMC.playSound("shoot3");
shootBullet(Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x));
dropMine(Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x));
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (dirChangeContor < 150) {
dirChangeContor++;
}
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
if (dirChangeContor >= 150) {
if ((_x < 35) && (_x > 25)) {
if ((randRange(0, 100) % 2) == 1) {
getNewValidDirection(1);
}
dirChangeContor = 0;
}
if ((_x > 665) && (_x < 675)) {
if ((randRange(0, 100) % 2) == 1) {
getNewValidDirection(2);
}
dirChangeContor = 0;
}
if ((_y < 35) && (_y > 25)) {
if ((randRange(0, 100) % 2) == 1) {
getNewValidDirection(3);
}
dirChangeContor = 0;
}
if ((_y > 490) && (_y < 500)) {
if ((randRange(0, 100) % 2) == 1) {
getNewValidDirection(4);
}
dirChangeContor = 0;
}
}
if (_x < -50) {
_x = 750;
}
if (_x > 750) {
_x = -50;
}
if (_y < -50) {
_y = 575;
}
if (_y > 575) {
_y = -50;
}
_rotation = _rotation + rotationAngle;
contor++;
if (contor >= shootSpeed) {
if ((((_x > 35) && (_x < 665)) && (_y > 35)) && (_y < 490)) {
contor = 0;
shootDelay();
}
}
}
var shooting = false;
var dead = false;
var radius = 25;
}
Symbol 506 MovieClip [__Packages.rocketMC] Frame 0
class rocketMC extends MovieClip
{
var speed, dir, _y, _parent, _x, angle, _rotation, dx_dir, gotoAndStop, swapDepths, new_dir;
function rocketMC () {
super();
}
function onLoad() {
speed = _root.rocketSet.speed;
if (_global.gameMode == "rocket") {
speed = _root.rocketRSet.speed;
}
dir = Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x);
angle = (dir * 180) / 3.14;
_rotation = angle;
dx_dir = 0.02;
if ((_global.gameMode == "adrenaline") || (_global.gameMode == "adrenalineRocket")) {
speed = speed * 1.5;
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function hitFunction() {
(gotoAndStop("explode"));// not popped
dead = true;
_root.jukeBoxMC.playSound("rocketExplode");
}
function addGem() {
_parent._parent.gemArray[_parent._parent.nGems] = _parent._parent.gemLayer.attachMovie("rocketGemMC", "rocketGemMC" + String(_parent._parent.enemyID), _parent._parent.gemLayer.getNextHighestDepth(), {_x:_x, _y:_y, ID:_parent._parent.enemyID});
swapDepths(_parent._parent.gemArray[_parent._parent.nGems]);
_parent._parent.nGems++;
_parent._parent.enemyID++;
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (_x < -5) {
_x = 705;
}
if (_x > 705) {
_x = -5;
}
if (_y < -5) {
_y = 530;
}
if (_y > 530) {
_y = -5;
}
if (!dead) {
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
}
new_dir = Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x);
if (new_dir > dir) {
dir = dir + dx_dir;
} else if (new_dir < dir) {
dir = dir - dx_dir;
}
angle = (dir * 180) / 3.14;
_rotation = angle;
}
var dead = false;
var radius = 13;
}
Symbol 507 MovieClip [__Packages.smallAsteroidMC] Frame 0
class smallAsteroidMC extends MovieClip
{
var rotAngle, speed, dir, gotoAndPlay, _x, _y, asteroidMC;
function smallAsteroidMC () {
super();
}
function onLoad() {
rotAngle = 3;
speed = _root.smallAstSet.speed;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
rotAngle = rotAngle * 1.5;
}
getDirection();
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getDirection() {
dir = 0;
while (((dir % 90) < 25) || ((dir % 90) > 65)) {
dir = randRange(0, 359);
}
dir = (dir * 3.14) / 180;
}
function hitFunction() {
(gotoAndPlay("explode"));// not popped
dead = true;
_root.jukeBoxMC.playSound("smallAsteroidExplode");
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (_x < -5) {
_x = 705;
}
if (_x > 705) {
_x = -5;
}
if (_y < -5) {
_y = 530;
}
if (_y > 530) {
_y = -5;
}
asteroidMC._rotation = asteroidMC._rotation + rotAngle;
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
}
var dead = false;
var radius = 9;
}
Symbol 508 MovieClip [__Packages.smallUfoMC] Frame 0
class smallUfoMC extends MovieClip
{
var speed, shootSpeed, shootDelayParam, px, py, dir, _y, _x, gotoAndStop, _parent, swapDepths, intervalID;
function smallUfoMC () {
super();
}
function onLoad() {
speed = _root.bigUfoSet.speed;
shootSpeed = _root.bigUfoSet.shootTime;
shootDelayParam = _root.smallUfoSet.shootDelay;
px = randRange(150, 550);
py = randRange(150, 375);
dir = Math.atan2(py - _y, px - _x);
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
shootSpeed = shootSpeed / 1.5;
}
inPlaceContor = 0;
contor = -randRange(0, shootSpeed);
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function hitFunction() {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("smallUfoExplode");
}
function shootBullet(angle) {
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent.attachMovie("smallUfoBullet", "smallUfoBulet" + String(_parent._parent.enemyID), _parent.getNextHighestDepth(), {_x:_x, _y:_y, angle:angle, bulletLength:15, bulletThick:2, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function addGem() {
_parent._parent.gemArray[_parent._parent.nGems] = _parent._parent.gemLayer.attachMovie("smallUfoGemMC", "smallUfoGemMC" + String(_parent._parent.enemyID), _parent._parent.gemLayer.getNextHighestDepth(), {_x:_x, _y:_y, ID:_parent._parent.enemyID});
swapDepths(_parent._parent.gemArray[_parent._parent.nGems]);
_parent._parent.nGems++;
_parent._parent.enemyID++;
}
function shootDelay() {
shooting = true;
intervalID = setInterval(this, "shootNow", shootDelayParam);
}
function shootNow() {
shooting = false;
clearInterval(intervalID);
if (dead) {
return(undefined);
}
_root.jukeBoxMC.playSound("smallUfoShoot");
shootBullet(Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x));
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (!inPlace) {
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
if ((Math.abs(_x - px) < 25) && (Math.abs(_y - py) < 25)) {
inPlace = true;
}
} else {
inPlaceContor++;
}
if (inPlaceContor > 85) {
px = randRange(50, 650);
py = randRange(50, 450);
dir = Math.atan2(py - _y, px - _x);
inPlace = false;
inPlaceContor = 0;
}
contor++;
if (contor >= shootSpeed) {
contor = 0;
shootDelay();
}
}
var shooting = false;
var dead = false;
var inPlace = false;
var contor = 0;
var radius = 17;
var inPlaceContor = 0;
}
Symbol 509 MovieClip [__Packages.bigUfoMC] Frame 0
class bigUfoMC extends MovieClip
{
var speed, shootSpeed, shootDelayParam, px, py, dir, _y, _x, gotoAndStop, _parent, swapDepths, intervalID;
function bigUfoMC () {
super();
}
function onLoad() {
speed = _root.bigUfoSet.speed;
shootSpeed = _root.bigUfoSet.shootTime;
shootDelayParam = _root.bigUfoSet.shootDelay;
px = randRange(150, 550);
py = randRange(150, 375);
dir = Math.atan2(py - _y, px - _x);
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
shootSpeed = shootSpeed / 1.5;
}
contor = -randRange(0, shootSpeed);
inPlaceContor = 0;
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function hitFunction() {
dead = true;
(gotoAndStop("explode"));// not popped
_root.jukeBoxMC.playSound("bigUfoExplode");
}
function shootBullet(angle) {
_parent._parent.enemyArray[_parent._parent.nEnemy] = _parent.attachMovie("bigUfoBullet", "bigUfoBulet" + String(_parent._parent.enemyID), _parent.getNextHighestDepth(), {_x:_x, _y:_y, angle:angle, bulletLength:15, bulletThick:2, ID:_parent._parent.enemyID});
_parent._parent.nEnemy++;
_parent._parent.enemyID++;
}
function addGem() {
_parent._parent.gemArray[_parent._parent.nGems] = _parent._parent.gemLayer.attachMovie("bigUfoGemMC", "bigUfoGemMC" + String(_parent._parent.enemyID), _parent._parent.gemLayer.getNextHighestDepth(), {_x:_x, _y:_y, ID:_parent._parent.enemyID});
swapDepths(_parent._parent.gemArray[_parent._parent.nGems]);
_parent._parent.nGems++;
_parent._parent.enemyID++;
}
function shootDelay() {
shooting = true;
intervalID = setInterval(this, "shootNow", shootDelayParam);
trace("seting Interval");
}
function shootNow() {
shooting = false;
clearInterval(intervalID);
if (dead) {
return(undefined);
}
_root.jukeBoxMC.playSound("bigUfoShoot");
shootBullet(Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x));
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if (!inPlace) {
_x = _x + (speed * Math.cos(dir));
_y = _y + (speed * Math.sin(dir));
if ((Math.abs(_x - px) < 25) && (Math.abs(_y - py) < 25)) {
inPlace = true;
}
} else {
inPlaceContor++;
}
if (inPlaceContor > 75) {
px = randRange(50, 650);
py = randRange(50, 450);
dir = Math.atan2(py - _y, px - _x);
inPlace = false;
inPlaceContor = 0;
}
contor++;
if (contor >= shootSpeed) {
contor = 0;
shootDelay();
}
}
var shooting = false;
var dead = false;
var inPlace = false;
var contor = 0;
var radius = 23;
var inPlaceContor = 0;
}
Symbol 510 MovieClip [__Packages.smallUfoBullet] Frame 0
class smallUfoBullet extends MovieClip
{
var speed, radAngle, angle, dx, dy, _rotation, _x, _y, _width, _height, _parent, ID;
function smallUfoBullet () {
super();
}
function onLoad() {
speed = _root.smallUfoSet.shootSpeed;
radAngle = angle;
angle = (angle * 180) / 3.1457;
dx = Math.cos(radAngle) * speed;
dy = Math.sin(radAngle) * speed;
_rotation = angle;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
}
}
function distanceTest(mc) {
var _local4 = Math.abs(_x - mc._x);
var _local3 = Math.abs(_y - mc._y);
if (((_local4 + 3) < ((_width + mc._width) / 2)) && ((_local3 + 3) < ((_height + mc._height) / 2))) {
return(true);
}
return(false);
}
function hitFunction() {
_global.playerScore = _global.playerScore + 20;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
_x = _x + dx;
_y = _y + dy;
if ((((_x < 12) || (_x > 688)) || (_y < 12)) || (_y > 513)) {
_parent._parent.removeEnemy(ID);
}
}
var radius = 5;
}
Symbol 511 MovieClip [__Packages.deathStarBullet] Frame 0
class deathStarBullet extends MovieClip
{
var radAngle, angle, dx_angle, _rotation, gotoAndPlay, new_angle, _y, _parent, _x, ID;
function deathStarBullet () {
super();
}
function onLoad() {
speed = _root.deathStarSet.shootSpeed;
radAngle = angle;
angle = (angle * 180) / 3.1457;
dx_angle = 0.01;
_rotation = angle;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
}
}
function hitFunction() {
dead = true;
(gotoAndPlay("explode"));// not popped
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
new_angle = Math.atan2(_parent._parent.heroMC._y - _y, _parent._parent.heroMC._x - _x);
if (new_angle > radAngle) {
radAngle = radAngle + dx_angle;
} else if (new_angle < radAngle) {
radAngle = radAngle - dx_angle;
}
_x = _x + (speed * Math.cos(radAngle));
_y = _y + (speed * Math.sin(radAngle));
angle = (radAngle * 180) / 3.14;
_rotation = angle;
if ((((_x < 12) || (_x > 688)) || (_y < 12)) || (_y > 513)) {
_parent._parent.removeEnemy(ID);
}
}
var speed = 8;
var radius = 6;
var dead = false;
}
Symbol 512 MovieClip [__Packages.bigUfoBullet] Frame 0
class bigUfoBullet extends MovieClip
{
var speed, radAngle, angle, dx, dy, _rotation, _parent, ID, _x, _y;
function bigUfoBullet () {
super();
}
function onLoad() {
speed = _root.bigUfoSet.shootSpeed;
radAngle = angle;
angle = (angle * 180) / 3.1457;
dx = Math.cos(radAngle) * speed;
dy = Math.sin(radAngle) * speed;
_rotation = angle;
if (_global.gameMode == "adrenaline") {
speed = speed * 1.5;
}
}
function hitFunction() {
dead = true;
_global.playerScore = _global.playerScore + 10;
_parent._parent.updateGUI();
_parent._parent.removeEnemy(ID);
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
_x = _x + dx;
_y = _y + dy;
if ((((_x < 12) || (_x > 688)) || (_y < 12)) || (_y > 513)) {
_parent._parent.removeEnemy(ID);
}
}
var dead = false;
var radius = 7;
}
Symbol 513 MovieClip [__Packages.gemMC] Frame 0
class gemMC extends MovieClip
{
var rotAngle, beforeFade, fadeSpeed, penalty, gotoAndPlay, _alpha, _rotation, _parent, ID;
function gemMC () {
super();
}
function onLoad() {
rotAngle = 1.3;
beforeFade = _root.gemSet.timeBeforeFade;
fadeSpeed = _root.gemSet.fadeSpeed;
penalty = _root.gemSet.penalty;
if (_global.gameMode == "rocket") {
beforeFade = _root.gemRSet.timeBeforeFade;
fadeSpeed = _root.gemRSet.fadeSpeed;
penalty = _root.gemRSet.penalty;
}
}
function hitFunction() {
dead = true;
gotoAndPlay("explode");
_alpha = 100;
_rotation = 0;
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (!dead) {
_rotation = _rotation + rotAngle;
contor++;
if (contor >= beforeFade) {
startFade = true;
}
}
if (startFade && (_alpha > 0)) {
_alpha = _alpha - fadeSpeed;
}
if ((_alpha <= 0) && (!dead)) {
dead = true;
_global.playerScore = _global.playerScore - penalty;
_parent._parent.updateGUI();
_parent._parent.removeGem(ID);
}
}
var dead = false;
var startFade = false;
var contor = 0;
var radius = 10;
}
Symbol 514 MovieClip [__Packages.mineMC] Frame 0
class mineMC extends MovieClip
{
var rotAngle, gotoAndStop, _x, _y, _rotation;
function mineMC () {
super();
}
function onLoad() {
rotAngle = 1;
}
function hitFunction() {
dead = true;
(gotoAndStop("explode"));// not popped
}
function onEnterFrame() {
if (!once) {
once = true;
if (_x < 12) {
_x = 20;
}
if (_x > 688) {
_x = 680;
}
if (_y < 12) {
_y = 20;
}
if (_y > 513) {
_y = 505;
}
}
if (_global.gamePaused) {
return(undefined);
}
_rotation = _rotation + rotAngle;
}
var radius = 10;
var dead = false;
var once = false;
}
Symbol 515 MovieClip [__Packages.ratings] Frame 0
class ratings extends MovieClip
{
var adrUnlockField, l1, l2, l3, l4, g1, g2, g3, g4, g5, scor, ratingTextField;
function ratings () {
super();
}
function onLoad() {
adrUnlockField._visible = false;
if (_global.gameMode == "rocket") {
l1 = _root.ratingRLimit[0];
l2 = _root.ratingRLimit[1];
l3 = _root.ratingRLimit[2];
l4 = _root.ratingRLimit[3];
trace((((((("rocket ratings:" + l1) + " - ") + l2) + " - ") + l3) + " - ") + l4);
} else {
l1 = _root.ratingLimit[0];
l2 = _root.ratingLimit[1];
l3 = _root.ratingLimit[2];
l4 = _root.ratingLimit[3];
}
}
function setStars() {
g1._visible = false;
g2._visible = false;
g3._visible = false;
g4._visible = false;
g5._visible = false;
if (scor >= 0) {
g1._visible = true;
ratingTextField.text = "Beginner";
}
if (scor > l1) {
g2._visible = true;
ratingTextField.text = "Average";
}
if (scor > l2) {
g3._visible = true;
ratingTextField.text = "Skilled";
}
if (scor > l3) {
g4._visible = true;
ratingTextField.text = "Expert";
}
if (scor > l4) {
g5._visible = true;
ratingTextField.text = "Super Star";
if (_global.saved.adrenalineUnlocked == false) {
adrUnlockField._visible = true;
_global.saved.setAdrenalineMode(true);
}
}
scor = -1;
}
function setStarRating(nw) {
g1._visible = false;
g2._visible = false;
g3._visible = false;
g4._visible = false;
g5._visible = false;
trace("nw==" + nw);
if (nw > 0) {
g1._visible = true;
ratingTextField.text = "Beginner";
}
if (nw > 12) {
g2._visible = true;
ratingTextField.text = "Average";
}
if (nw > 24) {
g3._visible = true;
ratingTextField.text = "Skilled";
}
if (nw > 36) {
g4._visible = true;
ratingTextField.text = "Expert";
}
scor = -1;
}
function onEnterFrame() {
if (scor >= 0) {
setStars();
}
}
}
Symbol 516 MovieClip [__Packages.hero] Frame 0
class hero extends MovieClip
{
var rotationSpeed, shieldTime, shootAngle, hitMC, movingSpeed, _x, _y, imuneInterval, _parent, gotoAndPlay, _rotation, shieldMC;
function hero () {
super();
}
function onLoad() {
rotationSpeed = _root.heroSet.rotationSpeed;
shieldTime = _root.heroSet.shieldTime;
shootAngle = _root.heroSet.shootAngle;
if (_global.gameMode == "rocket") {
rotationSpeed = _root.heroRSet.rotationSpeed;
shieldTime = _root.heroRSet.shieldTime;
shootAngle = _root.heroRSet.shootAngle;
}
hitMC._visible = false;
if ((_global.gameMode == "adrenaline") || (_global.gameMode == "adrenalineRocket")) {
rotationSpeed = rotationSpeed * 1.5;
}
movingSpeed = 100;
_x = _root._xmouse;
_y = _root._ymouse;
setImune();
}
function setImune() {
imune = true;
imuneInterval = setInterval(this, "resetImune", shieldTime * 1000);
}
function resetImune() {
clearInterval(imuneInterval);
imune = false;
}
function shootBullet(angle) {
_parent.bulletArray[_parent.nBullets] = _parent.enemyLayer.attachMovie("heroBullet", "bulet" + String(_parent.nBullets), _parent.enemyLayer.getNextHighestDepth(), {_x:_x + (Math.cos((angle * 3.14) / 180) * 25), _y:_y + (Math.sin((angle * 3.14) / 180) * 25), angle:angle});
_parent.nBullets++;
}
function distanceTest(mc) {
var _local4 = Math.abs(_x - mc._x);
var _local3 = Math.abs(_y - mc._y);
if ((_local4 <= (10 + mc.radius)) && (_local3 <= (10 + mc.radius))) {
return(true);
}
return(false);
}
function destroyRangeEnemy() {
var _local5;
var _local4;
var _local7;
var _local6 = new Array();
var _local3 = 0;
var _local2 = 0;
while (_local2 < _parent.nEnemy) {
_local5 = Math.abs((_x + hitMC._x) - _parent.enemyArray[_local2]._x);
_local4 = Math.abs((_y + hitMC._y) - _parent.enemyArray[_local2]._y);
_local7 = Math.sqrt((_local5 * _local5) + (_local4 * _local4));
if (_local7 < 165) {
_local6[_local3] = _parent.enemyArray[_local2];
_local3++;
}
_local2++;
}
_local2 = 0;
while (_local2 < _local3) {
_local6[_local2].hitFunction();
_local2++;
}
}
function testHitEnemy() {
var _local3 = 0;
while (_local3 < _parent.nEnemy) {
if (distanceTest(_parent.enemyArray[_local3]) && (!_parent.enemyArray[_local3].dead)) {
_parent.enemyArray[_local3].hitFunction();
_parent.waveContor = _parent.waveContor - 60;
dead = true;
_parent.playerLives--;
_parent.updateLives();
(gotoAndPlay("explode"));// not popped
_root.jukeBoxMC.playSound("heroExplode");
break;
}
_local3++;
}
}
function testHitGems() {
var _local3 = 0;
while (_local3 < _parent.nGems) {
if (distanceTest(_parent.gemArray[_local3]) && (!_parent.gemArray[_local3].dead)) {
_parent.gemArray[_local3].hitFunction();
_root.jukeBoxMC.playSound("collectGem");
}
_local3++;
}
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
if (dead) {
return(undefined);
}
if ((_root._xmouse > 25) && (_root._xmouse < 675)) {
_x = _root._xmouse;
}
if ((_root._ymouse > 25) && (_root._ymouse < 500)) {
_y = _root._ymouse;
}
var _local4 = 0;
while (_local4 < rotationSpeed) {
_rotation = (_rotation + 0.5) % 360;
if ((_rotation % shootAngle) == 0) {
_root.jukeBoxMC.playSound("heroShoot");
shootBullet(_rotation);
shootBullet((_rotation + 90) % 360);
shootBullet((_rotation + 180) % 360);
shootBullet((_rotation + 270) % 360);
}
_local4++;
}
if (!imune) {
testHitEnemy();
if (shieldMC._alpha > 0) {
shieldMC._alpha = shieldMC._alpha - 4;
}
}
testHitGems();
}
var imune = false;
var dead = false;
}
Symbol 517 MovieClip [__Packages.GameDirectorMC] Frame 0
class GameDirectorMC extends MovieClip
{
var nextWaveIn, waveInc, scoreTextField, ScoreStringField, enemyArray, nEnemy, gemArray, nGems, bulletArray, nBullets, waveArray, curentWave, newLifeLimit, keyListener, pauseWinMC, nWaves, lv1, lv2, lv3, lv4, lv5, lv6, coordX, coordY, enemyLayer, waveTextField, showExtraLifeMC;
function GameDirectorMC () {
super();
}
function onLoad() {
var b = this;
nextWaveIn = _root.heroSet.initialWaveInterval;
waveInc = _root.heroSet.nextWaveIncrement;
if ((_global.gameMode == "rocket") || (_global.gameMode == "adrenalineRocket")) {
nextWaveIn = _root.heroRSet.initialWaveInterval;
waveInc = _root.heroRSet.nextWaveIncrement;
scoreTextField._visible = false;
ScoreStringField._visible = false;
} else {
scoreTextField._visible = true;
ScoreStringField._visible = true;
}
enemyArray = new Array();
nEnemy = 0;
enemyID = 0;
gemArray = new Array();
nGems = 0;
bulletArray = new Array();
nBullets = 0;
waveArray = new Array();
var _local4 = 0;
while (_local4 < 50) {
waveArray[_local4] = new Array();
_local4++;
}
curentWave = 0;
populateWaves();
_global.playerScore = 0;
playerLives = 3;
updateLives();
newLifeLimit = new Array();
newLifeIndex = 0;
_local4 = 0;
while (_local4 < _root.nNLPoints) {
newLifeLimit[_local4] = _root.NLPoints[_local4];
_local4++;
}
newLifeLimit[_root.nNLPoints] = 100000000 /* 0x5F5E100 */;
if (_global.gameMode == "rocket") {
_local4 = 0;
while (_local4 < _root.nNLRPoints) {
newLifeLimit[_local4] = _root.NLRPoints[_local4];
_local4++;
}
newLifeLimit[_root.nNLRPoints] = 100000000 /* 0x5F5E100 */;
}
Mouse.hide();
addWave();
keyListener = new Object();
keyListener.onKeyDown = function () {
switch (chr(Key.getAscii())) {
case "p" :
b.pPressed();
return;
case "m" :
b.mPressed();
return;
case "s" :
b.sPressed();
}
};
Key.addListener(keyListener);
_root.jukeBoxMC.playLoop();
if (_global.saved.getMusic()) {
pauseWinMC.mtext.text = "Music On";
} else {
pauseWinMC.mtext.text = "Music Off";
}
if (_global.saved.getSound()) {
pauseWinMC.stext.text = "Sound On";
} else {
pauseWinMC.stext.text = "Sound Off";
}
}
function clearListeners() {
trace("clearing listeners...");
Key.removeListener(keyListener);
keyListener = null;
}
function pPressed() {
if (pauseWinMC._x != 365) {
pauseWinMC._x = 365;
_global.gamePaused = true;
Mouse.show();
} else {
pauseWinMC._x = -500;
_global.gamePaused = false;
Mouse.hide();
}
}
function mPressed() {
_global.saved.toggleMusic();
if (_global.saved.getMusic()) {
pauseWinMC.mtext.text = "Music On";
} else {
pauseWinMC.mtext.text = "Music Off";
}
}
function sPressed() {
_global.saved.toggleSound();
if (_global.saved.getSound()) {
pauseWinMC.stext.text = "Sound On";
} else {
pauseWinMC.stext.text = "Sound Off";
}
}
function populateWaves() {
if ((_global.gameMode == "rocket") || (_global.gameMode == "adrenalineRocket")) {
nWaves = _root.nEnemyRMix;
var _local4 = 0;
while (_local4 < _root.nEnemyRMix) {
waveArray[_local4][0] = 0;
waveArray[_local4][1] = _root.enemyRMix[_local4].length;
var _local5 = 0;
while (_local5 < _root.enemyRMix[_local4].length) {
switch (_root.enemyRMix[_local4].charAt(_local5)) {
case "1" :
waveArray[_local4][2 + _local5] = "bigAsteroidMC";
break;
case "2" :
waveArray[_local4][2 + _local5] = "rocketMC";
break;
case "3" :
waveArray[_local4][2 + _local5] = "deathStarMC";
break;
case "4" :
waveArray[_local4][2 + _local5] = "bigUfoMC";
break;
case "5" :
waveArray[_local4][2 + _local5] = "smallUfoMC";
}
_local5++;
}
_local4++;
}
return(undefined);
}
nWaves = _root.nEnemyMix;
var _local4 = 0;
while (_local4 < _root.nEnemyMix) {
waveArray[_local4][0] = 0;
waveArray[_local4][1] = _root.enemyMix[_local4].length;
var _local5 = 0;
while (_local5 < _root.enemyMix[_local4].length) {
switch (_root.enemyMix[_local4].charAt(_local5)) {
case "1" :
waveArray[_local4][2 + _local5] = "bigAsteroidMC";
break;
case "2" :
waveArray[_local4][2 + _local5] = "rocketMC";
break;
case "3" :
waveArray[_local4][2 + _local5] = "deathStarMC";
break;
case "4" :
waveArray[_local4][2 + _local5] = "bigUfoMC";
break;
case "5" :
waveArray[_local4][2 + _local5] = "smallUfoMC";
}
_local5++;
}
_local4++;
}
}
function updateLives() {
if (playerLives == 6) {
lv1._visible = true;
lv2._visible = true;
lv3._visible = true;
lv4._visible = true;
lv5._visible = true;
lv6._visible = true;
}
if (playerLives == 5) {
lv1._visible = true;
lv2._visible = true;
lv3._visible = true;
lv4._visible = true;
lv5._visible = true;
lv6._visible = false;
}
if (playerLives == 4) {
lv1._visible = true;
lv2._visible = true;
lv3._visible = true;
lv4._visible = true;
lv5._visible = false;
lv6._visible = false;
}
if (playerLives == 3) {
lv1._visible = true;
lv2._visible = true;
lv3._visible = true;
lv4._visible = false;
lv5._visible = false;
lv6._visible = false;
}
if (playerLives == 2) {
lv1._visible = true;
lv2._visible = true;
lv3._visible = false;
lv4._visible = false;
lv5._visible = false;
lv6._visible = false;
}
if (playerLives == 1) {
lv1._visible = true;
lv2._visible = false;
lv3._visible = false;
lv4._visible = false;
lv5._visible = false;
lv6._visible = false;
}
if (playerLives == 0) {
lv1._visible = false;
lv2._visible = false;
lv3._visible = false;
lv4._visible = false;
lv5._visible = false;
lv6._visible = false;
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function getRandomCoord() {
var _local2 = randRange(1, 4);
switch (_local2) {
case 1 :
coordX = 0;
coordY = randRange(0, 525);
break;
case 2 :
coordX = randRange(0, 700);
coordY = 0;
break;
case 3 :
coordX = 700;
coordY = randRange(0, 525);
break;
case 4 :
coordX = randRange(0, 700);
coordY = 525;
}
}
function addWave() {
var _local7;
var _local3 = 0;
while (_local3 < waveArray[curentWave][1]) {
getRandomCoord();
enemyArray[nEnemy] = enemyLayer.attachMovie(waveArray[curentWave][_local3 + 2], waveArray[curentWave][_local3 + 2] + String(enemyID), enemyLayer.getNextHighestDepth(), {_x:coordX, _y:coordY, ID:enemyID});
nEnemy++;
enemyID++;
_local3++;
}
curentWave++;
waveTextField.text = String(nWaves - curentWave);
_root.jukeBoxMC.playSound("newWave");
}
function isTimeForNewWave() {
var _local6 = 0;
var _local5 = 0;
if ((nWaves - curentWave) <= 0) {
if (nEnemy <= 0) {
if ((_global.gameMode == "normal") || (_global.gameMode == "adrenaline")) {
_root.link = "Victory";
}
if ((_global.gameMode == "rocket") || (_global.gameMode == "adrenalineRocket")) {
_root.link = "Victory2";
}
clearListeners();
_root.fader.play();
_root.jukeBoxMC.stopMusic();
}
return(false);
}
if (waveContor == Math.floor(nextWaveIn * 30)) {
return(true);
}
_local5 = 0;
_local6 = _local5;
var _local4 = 0;
while (_local4 < nEnemy) {
if (enemyArray[_local4] instanceof bigAsteroidMC) {
_local6 = _local6 + 6;
} else if (enemyArray[_local4] instanceof mediumAsteroidMC) {
_local6 = _local6 + 4;
} else {
_local6++;
}
_local4++;
}
_local4 = 0;
while (_local4 < waveArray[curentWave - 1][1]) {
if (waveArray[curentWave - 1][_local4 + 2] == "bigAsteroidMC") {
_local5 = _local5 + 6;
} else if (waveArray[curentWave - 1][_local4 + 2] == "mediumAsteroidMC") {
_local5 = _local5 + 4;
} else {
_local5++;
}
_local4++;
}
if ((_local6 / _local5) <= 0.5) {
trace("80%");
return(true);
}
return(false);
}
function removeEnemy(eID) {
var _local2 = 0;
_local2 = 0;
while (_local2 < nEnemy) {
if (enemyArray[_local2].ID == eID) {
enemyArray[_local2].removeMovieClip();
break;
}
_local2++;
}
if (_local2 < nEnemy) {
while (_local2 < (nEnemy - 1)) {
enemyArray[_local2] = enemyArray[_local2 + 1];
_local2++;
}
enemyArray[nEnemy - 1] = null;
nEnemy--;
}
}
function removeGem(eID) {
var _local2 = 0;
_local2 = 0;
while (_local2 < nGems) {
if (gemArray[_local2].ID == eID) {
gemArray[_local2].removeMovieClip();
break;
}
_local2++;
}
if (_local2 < nGems) {
while (_local2 < (nGems - 1)) {
gemArray[_local2] = gemArray[_local2 + 1];
_local2++;
}
gemArray[nGems - 1] = null;
nGems--;
}
}
function updateGUI() {
scoreTextField.text = _global.playerScore;
if (_global.playerScore > newLifeLimit[newLifeIndex]) {
newLifeIndex++;
playerLives++;
updateLives();
showExtraLifeMC.gotoAndPlay("show");
_root.jukeBoxMC.playSound("playerNewLife");
}
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
waveContor++;
if (isTimeForNewWave()) {
addWave();
waveContor = 0;
nextWaveIn = nextWaveIn + waveInc;
}
if (playerLives <= 0) {
endGameDelay++;
if ((_global.gameMode == "normal") || (_global.gameMode == "adrenaline")) {
_root.link = "GameOver";
}
if ((_global.gameMode == "rocket") || (_global.gameMode == "adrenalineRocket")) {
_root.link = "GameOver2";
}
if (endGameDelay > 30) {
clearListeners();
_global.wavesCompleted = curentWave - 1;
_root.fader.play();
_root.jukeBoxMC.stopMusic();
}
}
}
var enemyID = 0;
var newLifeIndex = 0;
var playerLives = 3;
var waveContor = 0;
var endGameDelay = 0;
}
Symbol 518 MovieClip [__Packages.jukeboxMC] Frame 0
class jukeboxMC extends MovieClip
{
var sndArray;
function jukeboxMC () {
super();
}
function onLoad() {
sndArray = new Array();
sndArray[0] = new Sound();
sndArray[0].attachSound("bigUfoShoot.wav");
sndArray[1] = new Sound();
sndArray[1].attachSound("smallUfoShoot.wav");
sndArray[10] = new Sound();
sndArray[10].attachSound("smallAsteroidExplode.mp3");
sndArray[11] = new Sound();
sndArray[11].attachSound("mediumAsteroidExplode.mp3");
sndArray[12] = new Sound();
sndArray[12].attachSound("bigAsteroidExplode.mp3");
sndArray[13] = new Sound();
sndArray[13].attachSound("rocketExplode.mp3");
sndArray[14] = new Sound();
sndArray[14].attachSound("deathStarExplode.mp3");
sndArray[15] = new Sound();
sndArray[15].attachSound("bigUfoExplode.mp3");
sndArray[16] = new Sound();
sndArray[16].attachSound("smallUfoExplode.mp3");
sndArray[20] = new Sound();
sndArray[20].attachSound("playerNewLife.mp3");
sndArray[21] = new Sound();
sndArray[21].attachSound("heroExplode.wav");
sndArray[23] = new Sound();
sndArray[23].attachSound("CollectGem.mp3");
sndArray[24] = new Sound();
sndArray[24].attachSound("New_Wave.wav");
sndArray[40] = new Sound();
sndArray[40].attachSound("deathStarShoot.wav");
sndArray[50] = new Sound();
sndArray[50].attachSound("MouseOverMenuItem.wav");
sndArray[51] = new Sound();
sndArray[51].attachSound("MouseClickMenuItem.wav");
}
function stopMusic() {
_root.loopMC.gameLoop.stop("gameLoopSound");
}
function stopSound() {
sndArray[0].stop("bigUfoShoot.wav");
sndArray[1].stop("smallUfoShoot.wav");
sndArray[10].stop("smallAsteroidExplode.mp3");
sndArray[11].stop("mediumAsteroidExplode.mp3");
sndArray[12].stop("bigAsteroidExplode.mp3");
sndArray[13].stop("rocketExplode.mp3");
sndArray[14].stop("deathStarExplode.mp3");
sndArray[15].stop("bigUfoExplode.mp3");
sndArray[16].stop("smallUfoExplode.mp3");
sndArray[20].stop("playerNewLife.mp3");
sndArray[21].stop("heroExplode.wav");
sndArray[23].stop("CollectGem.mp3");
sndArray[23].stop("New_Wave.wav");
sndArray[40].stop("deathStarShoot.wav");
sndArray[50].stop("MouseOverMenuItem.wav");
sndArray[51].stop("MouseClickMenuItem.wav");
}
function playLoop() {
if (!_global.saved.getMusic()) {
return(undefined);
}
_root.loopMC.gameLoop.stop("gameLoopSound");
_root.loopMC.gameLoop.start(0, 1000);
}
function playSound(sunet) {
if (!_global.saved.getSound()) {
return(undefined);
}
switch (sunet) {
case "bigUfoShoot" :
sndArray[0].start();
break;
case "smallUfoShoot" :
sndArray[1].start();
break;
case "smallAsteroidExplode" :
sndArray[10].start();
break;
case "mediumAsteroidExplode" :
sndArray[11].start();
break;
case "bigAsteroidExplode" :
sndArray[12].start();
break;
case "rocketExplode" :
sndArray[13].start();
break;
case "deathStarExplode" :
sndArray[14].start();
break;
case "bigUfoExplode" :
sndArray[15].start();
break;
case "smallUfoExplode" :
sndArray[16].start();
break;
case "playerNewLife" :
sndArray[20].start();
break;
case "heroExplode" :
sndArray[21].start();
break;
case "collectGem" :
sndArray[23].start();
break;
case "newWave" :
sndArray[24].start();
break;
case "shoot3" :
sndArray[40].start();
break;
case "mouseOver" :
sndArray[50].stop("MouseOverMenuItem.wav");
sndArray[50].start();
break;
case "mouseClick" :
sndArray[51].start();
}
}
}
Symbol 519 MovieClip [__Packages.heroBullet] Frame 0
class heroBullet extends MovieClip
{
var speed, bulletLength, radAngle, angle, dx, dy, _rotation, clear, lineStyle, moveTo, lineTo, _x, _y, _width, _height, _parent, removeMovieClip;
function heroBullet () {
super();
}
function onLoad() {
speed = _root.heroSet.bulletSpeed;
bulletLength = _root.heroSet.bulletLength;
if (_global.gameMode == "rocket") {
speed = _root.heroRSet.bulletSpeed;
bulletLength = _root.heroRSet.bulletLength;
}
if ((_global.gameMode == "adrenaline") || (_global.gameMode == "adrenalineRocket")) {
speed = speed * 1.5;
}
radAngle = (angle * 3.14) / 180;
dx = Math.cos(radAngle) * speed;
dy = Math.sin(radAngle) * speed;
_rotation = angle;
clear();
lineStyle(bulletThick, 16777215, 100);
moveTo((-bulletLength) / 2, 0);
lineTo(bulletLength / 2, 0);
}
function distanceTest(mc) {
var _local4 = Math.abs(_x - mc._x);
var _local3 = Math.abs(_y - mc._y);
if (((_local4 + 3) < ((_width + mc._width) / 2)) && ((_local3 + 3) < ((_height + mc._height) / 2))) {
return(true);
}
return(false);
}
function testHitEnemy() {
var _local2 = 0;
while (_local2 < _parent._parent.nEnemy) {
if (!(((_parent._parent.enemyArray[_local2] instanceof smallUfoBullet) || (_parent._parent.enemyArray[_local2] instanceof bigUfoBullet)) || (_parent._parent.enemyArray[_local2] instanceof deathStarBullet))) {
if (distanceTest(_parent._parent.enemyArray[_local2]) && (!_parent._parent.enemyArray[_local2].dead)) {
_parent._parent.enemyArray[_local2].hitFunction();
removeMovieClip();
break;
}
}
_local2++;
}
}
function onEnterFrame() {
if (_global.gamePaused) {
return(undefined);
}
_x = _x + dx;
_y = _y + dy;
testHitEnemy();
if ((((_x < 12) || (_x > 688)) || (_y < 12)) || (_y > 513)) {
removeMovieClip();
}
}
var bulletThick = 2;
}
Symbol 520 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 297 MovieClip Frame 120
stop();
_root.link = "MainMenu";
_root.fader.play();
Symbol 305 Button
on (release) {
_root.link = "GameMode";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 308 Button
on (release) {
_root.link = "HighScores";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 311 Button
on (release) {
_root.link = "Instructions";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 314 Button
on (release) {
_root.link = "Credits";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 317 Button
on (release) {
getURL ("http://www.aceshootinggames.com/", "_top");
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 332 Button
on (release) {
_global.gameMode = "normal";
_root.link = "BasicInstr";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 335 Button
on (release) {
_global.gameMode = "adrenaline";
_root.link = "BasicInstr";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 339 Button
on (release) {
_global.gameMode = "rocket";
_root.link = "BasicInstr";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 342 Button
on (release) {
_global.gameMode = "adrenalineRocket";
_root.link = "BasicInstr";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 345 Button
on (release) {
_root.link = "Game";
_root.fader.play();
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 368 Button
on (release) {
_root.instrMC._x = 1500;
_root.gameMC.pauseWinMC._x = 365;
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 385 Button
on (release) {
if (nameField.text != "") {
_global.saved.setPlayerName(nameField.text);
_global.submitScoreMode = true;
_root.link = "HighScores";
_root.fader.gotoAndPlay(2);
}
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 386 MovieClip Frame 1
function setSel() {
trace("selecting........................");
Selection.setSelection(nameField);
Selection.setSelection(0, 3);
}
Symbol 404 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"620b8bae7120dce5", onClose:function () {
}});
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 407 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"df306850dac8454f", onClose:function () {
}});
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}
Symbol 467 Button
on (release) {
_root.link = "MainMenu";
_root.fader.gotoAndPlay(2);
_root.jukeBoxMC.playSound("mouseClick");
}
on (rollOver) {
_root.jukeBoxMC.playSound("mouseOver");
}