Frame 1
function nextStep() {
gotoAndStop (3);
}
com.gamezhero.api.as2.GamezheroApi.ini("dontshootme");
com.gamezhero.api.as2.GamezheroApi.preloader(this, nextStep);
stop();
Frame 3
stop();
Frame 32
function plyBtnSnd() {
BtnSnd.start(0, 1);
}
function plyBG1Snd() {
BgSnd1.start(0, 100000);
}
function stpBG1Snd() {
BgSnd1.stop();
}
function plyBG2Snd() {
BgSnd2.start(0, 1000000);
}
function stpBG2Snd() {
BgSnd2.stop();
}
function plyEneryaSnd() {
EneryaSnd.start(0, 1);
}
function plyHitSnd() {
HitSnd.start(0, 1);
}
function plyPowerUpSnd() {
PowerUpSnd.start(0, 1);
}
function plyBlastSnd() {
BlastSnd.start(0, 1);
}
function plyLsrSnd1() {
LsrSnd1.start(0, 1);
}
function plyLsrSnd2() {
LsrSnd2.start(0, 1);
}
var BtnSnd = new Sound(this);
BtnSnd.attachSound("BtnSnd");
BtnSnd.setVolume(100);
var BgSnd1 = new Sound(this);
BgSnd1.attachSound("BgSnd1a");
BgSnd1.setVolume(100);
plyBG1Snd();
var BgSnd2 = new Sound(this);
BgSnd2.attachSound("BgSnd2");
BgSnd2.setVolume(100);
var EneryaSnd = new Sound(this);
EneryaSnd.attachSound("EneryaSnd");
EneryaSnd.setVolume(100);
var HitSnd = new Sound(this);
HitSnd.attachSound("HitSnd");
HitSnd.setVolume(100);
var PowerUpSnd = new Sound(this);
PowerUpSnd.attachSound("PowerUpSnd");
PowerUpSnd.setVolume(100);
var BlastSnd = new Sound(this);
BlastSnd.attachSound("BlastSnd");
BlastSnd.setVolume(100);
var LsrSnd1 = new Sound(this);
LsrSnd1.attachSound("LsrSnd1");
PowerUpSnd.setVolume(100);
var LsrSnd2 = new Sound(this);
LsrSnd2.attachSound("LsrSnd2");
LsrSnd2.setVolume(100);
Frame 33
function animate(mc, propertyToAnimate, EasingFunction, beginPos, endPos, duration, useSeconds) {
disObj = mc;
prop = propertyToAnimate;
ef = EasingFunction;
bp = beginPos;
ep = endPos;
dur = duration;
second = useSeconds;
twn = new mx.transitions.Tween(disObj, prop, ef, bp, ep, dur, second);
}
function navBtn(mc, frame) {
gotoFrame = frame;
var origPos = mc._x;
var rOvrPos = (mc._x - 15);
mc.onRollOut = function () {
mc.gotoAndStop(1);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, rOvrPos, origPos, 1, true);
};
mc.onRollOver = function () {
plyBtnSnd();
mc.gotoAndStop(2);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, origPos, rOvrPos, 1, true);
};
mc.onRelease = function () {
mc.gotoAndStop(1);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, origPos, rOvrPos, 1, true);
_root.gotoAndStop(frame);
};
}
function gamezHeroApiBtn(mc, frame) {
gotoFrame = frame;
var origPos = mc._x;
var rOvrPos = (mc._x - 15);
mc.onRollOut = function () {
mc.gotoAndStop(1);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, rOvrPos, origPos, 1, true);
};
mc.onRollOver = function () {
plyBtnSnd();
mc.gotoAndStop(2);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, origPos, rOvrPos, 1, true);
};
mc.onRelease = function () {
if (mc == titleBtnHldr_mc.hs_btn) {
trace("hs");
com.gamezhero.api.as2.GamezheroApi.linkTopScore();
}
if (mc == titleBtnHldr_mc.mg_btn) {
trace("mg");
com.gamezhero.api.as2.GamezheroApi.linkMoreGames();
}
if (mc == titleBtnHldr_mc.stf_btn) {
trace("stf");
com.gamezhero.api.as2.GamezheroApi.linkSendToFrined();
}
mc.gotoAndStop(1);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, origPos, rOvrPos, 1, true);
};
}
stop();
var twn;
var disObj;
var prop;
var ef;
var bp;
var ep;
var dur;
var second;
animate(dst_mc, "_x", mx.transitions.easing.Strong.easeOut, dst_mc._x, 226, 0.2, true);
animate(alien_mc, "_x", mx.transitions.easing.Strong.easeOut, alien_mc._x, 596, 0.6, true);
animate(moon_mc, "_x", mx.transitions.easing.Strong.easeOut, moon_mc._x, 150, 1, true);
animate(titleBtnHldr_mc, "_x", mx.transitions.easing.Strong.easeOut, titleBtnHldr_mc._x, 580, 1.8, true);
var gotoFrame;
gamezheroBtn1.onRelease = function () {
com.gamezhero.api.as2.GamezheroApi.linkZorroLogo();
};
gamezheroBtn2.onRelease = function () {
com.gamezhero.api.as2.GamezheroApi.linkZorroLogo();
};
publishBtn.onRelease = function () {
com.gamezhero.api.as2.GamezheroApi.linkPublish();
};
twitterBtn.onRelease = function () {
com.gamezhero.api.as2.GamezheroApi.linkTwitter();
};
navBtn(titleBtnHldr_mc.strt_btn, "howTo");
gamezHeroApiBtn(titleBtnHldr_mc.hs_btn, "highscores");
gamezHeroApiBtn(titleBtnHldr_mc.mg_btn, "highscores");
gamezHeroApiBtn(titleBtnHldr_mc.stf_btn, "highscores");
Frame 34
stop();
animate(hs_dst_mc, "_x", mx.transitions.easing.Regular.easeIn, hs_dst_mc._x, -500, 0.2, true);
animate(hs_alien_mc, "_x", mx.transitions.easing.Regular.easeIn, hs_alien_mc._x, 1200, 0.6, true);
animate(hs_moon_mc, "_x", mx.transitions.easing.Regular.easeIn, hs_moon_mc._x, -500, 0.8, true);
animate(hs_titleBtnHldr_mc, "_x", mx.transitions.easing.Regular.easeIn, hs_titleBtnHldr_mc._x, 1200, 1, true);
animate(hs_bg, "_xscale", mx.transitions.easing.Regular.easeInOut, hs_bg._xscale, 150, 0.8, true);
animate(hs_bg, "_yscale", mx.transitions.easing.Regular.easeInOut, hs_bg._yscale, 150, 0.8, true);
animate(tempBack_btn, "_y", mx.transitions.easing.Regular.easeIn, tempBack_btn._y, 470, 1, true);
navBtn(tempBack_btn, "title");
Frame 35
stop();
animate(howToPanel_mc, "_y", mx.transitions.easing.Strong.easeOut, howToPanel_mc._y, 180, 0.8, true);
animate(caa_mc, "_x", mx.transitions.easing.Strong.easeOut, caa_mc._x, 500, 0.4, true);
animate(btnHldr_mc, "_y", mx.transitions.easing.Strong.easeOut, btnHldr_mc._y, 427, 1.2, true);
navBtn(btnHldr_mc.next_btn, "intro");
navBtn(btnHldr_mc.back_btn, "title");
Frame 36
function transBtn(mc) {
var origPos = mc._x;
var rOvrPos = (mc._x - 15);
mc.onRollOut = function () {
mc.gotoAndStop(1);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, rOvrPos, origPos, 1, true);
};
mc.onRollOver = function () {
mc.gotoAndStop(2);
animate(mc, "_x", mx.transitions.easing.Elastic.easeOut, origPos, rOvrPos, 1, true);
};
mc.onRelease = function () {
if (lang == "alien") {
introPnl1_mc.gotoAndStop(2);
introPnl2_mc.gotoAndStop(2);
introPnl3_mc.gotoAndStop(2);
introPnl4_mc.gotoAndStop(2);
lang = "english";
} else if (lang == "english") {
introPnl1_mc.gotoAndStop(1);
introPnl2_mc.gotoAndStop(1);
introPnl3_mc.gotoAndStop(1);
introPnl4_mc.gotoAndStop(1);
lang = "alien";
}
};
}
stop();
animate(caaintro_mc, "_x", mx.transitions.easing.Strong.easeOut, caaintro_mc._x, 162, 0.4, true);
animate(caaintro_mc, "_y", mx.transitions.easing.Strong.easeOut, caaintro_mc._y, 384, 0.4, true);
animate(introPnl1_mc, "_x", mx.transitions.easing.Strong.easeOut, introPnl1_mc._x, 125, 0.6, true);
animate(introPnl1_mc, "_y", mx.transitions.easing.Strong.easeOut, introPnl1_mc._y, 145, 0.6, true);
animate(introPnl2_mc, "_x", mx.transitions.easing.Strong.easeOut, introPnl2_mc._x, 425, 0.8, true);
animate(introPnl2_mc, "_y", mx.transitions.easing.Strong.easeOut, introPnl2_mc._y, 145, 0.8, true);
animate(introPnl3_mc, "_x", mx.transitions.easing.Strong.easeOut, introPnl3_mc._x, 554, 1, true);
animate(introPnl3_mc, "_y", mx.transitions.easing.Strong.easeOut, introPnl3_mc._y, 235, 1, true);
animate(introPnl4_mc, "_x", mx.transitions.easing.Strong.easeOut, introPnl4_mc._x, 552, 1.2, true);
animate(introPnl4_mc, "_y", mx.transitions.easing.Strong.easeOut, introPnl4_mc._y, 342, 1.2, true);
animate(introPnl5_mc, "_x", mx.transitions.easing.Strong.easeOut, introPnl5_mc._x, 492, 1.4, true);
animate(introPnl5_mc, "_y", mx.transitions.easing.Strong.easeOut, introPnl5_mc._y, 463, 1.4, true);
var lang = "alien";
transBtn(introPnl5_mc.translate_btn);
navBtn(introPnl5_mc.next_btn, "gameScreen");
navBtn(introPnl5_mc.back_btn, "howTo");
Frame 37
function postLvlScrnTrnsition() {
postLvlScrnCounter++;
if (postLvlScrnCounter == 2) {
gameState = "gameover";
gotoAndStop ("postLevelScreen");
clearInterval(postLvlInterval);
clearInterval(pwrupsSetInterval);
clearInterval(lvlSetInterval);
}
}
function init() {
stpBG1Snd();
plyBG2Snd();
uiClock_mc._alpha = 0;
depth++;
this.attachMovie("Enemy1", "Enemy1" + depth, depth, {_x:-150, _y:468});
lpr();
}
function lpr() {
this.onEnterFrame = function () {
charFollowMouse();
charMovementAnimation();
rotateEnemyTurret();
checkHit();
updateUI();
plyrShpAppearance();
shieldAnimation();
extractEnerya();
runTimeFreeze();
};
}
function shieldAnimation() {
var _local1;
if (shieldEnergy > 80) {
_local1 = Math.floor(Math.random() * 10) + 50;
shield_mc._alpha = 100;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else if (shieldEnergy > 60) {
_local1 = Math.floor(Math.random() * 10) + 40;
shield_mc._alpha = 80;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else if (shieldEnergy > 40) {
_local1 = Math.floor(Math.random() * 10) + 30;
shield_mc._alpha = 60;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else if (shieldEnergy > 20) {
_local1 = Math.floor(Math.random() * 10) + 20;
shield_mc._alpha = 40;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else if (shieldEnergy > 10) {
_local1 = Math.floor(Math.random() * 10) + 10;
shield_mc._alpha = 20;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else if (shieldEnergy > 0) {
_local1 = Math.floor(Math.random() * 9) + 1;
shield_mc._alpha = 10;
shield_mc._x = plyr_mc._x;
shield_mc._y = plyr_mc._y;
} else {
shield_mc._x = -260;
}
shieldEnergy--;
}
function attBullet(mc) {
var _local3 = 50;
var _local2 = mc.barrel._rotation;
var _local5 = mc._x + (_local3 * Math.cos((_local2 * Math.PI) / 180));
var _local4 = mc._y + (_local3 * Math.sin((_local2 * Math.PI) / 180));
depth++;
attachMovie("EnPrjctl", "EnPrjctl" + depth, depth, {_x:_local5, _y:_local4, _rotation:mc.barrel._rotation});
}
function attGdMssl(mc) {
var _local3 = 50;
var _local2 = mc.barrel._rotation;
var _local5 = mc._x + (_local3 * Math.cos((_local2 * Math.PI) / 180));
var _local4 = mc._y + (_local3 * Math.sin((_local2 * Math.PI) / 180));
depth++;
attachMovie("EnGdPrjctl", "EnGdPrjctl" + depth, depth, {_x:_local5, _y:_local4, _rotation:mc.barrel._rotation});
}
function attVerticalFireball(mc) {
var _local2 = mc._x;
var _local1 = mc._y - 30;
depth++;
attachMovie("EnPrjctlVert", "EnPrjctlVert" + depth, depth, {_x:_local2, _y:_local1});
}
function attVerticalFireball2(mc) {
var _local2 = mc._x;
var _local1 = mc._y + 20;
depth++;
attachMovie("EnPrjctlVert2", "EnPrjctlVert2" + depth, depth, {_x:_local2, _y:_local1});
}
function attEnerhiya() {
var _local3 = Math.floor(Math.random() * 580) + 50;
var _local2 = Math.floor(Math.random() * 420) + 50;
depth++;
enerhiyaAttNum++;
this.attachMovie("Enerhiya", "Enerhiya" + depth, depth, {_x:_local3, _y:_local2});
}
function attEnerhiyaStorm() {
var _local3 = Math.floor(Math.random() * 580) + 50;
var _local2 = Math.floor(Math.random() * 420) + 50;
depth++;
this.attachMovie("EneryaStorm", "EneryaStorm" + depth, depth, {_x:_local3, _y:_local2});
}
function deployPwrups() {
attPowerUps();
}
function attPowerUps() {
var _local3 = Math.floor(Math.random() * 580) + 50;
var _local2 = Math.floor(Math.random() * 420) + 50;
pwrupCode++;
if (pwrupCode == 6) {
pwrupCode = 1;
}
depth++;
if (pwrupCode == 1) {
if (plyrSpd > 1) {
this.attachMovie("pwrupBooster", "pwrupBooster" + depth, depth, {_x:_local3, _y:_local2});
} else {
this.attachMovie("pwrupRepair", "pwrupRepair" + depth, depth, {_x:_local3, _y:_local2});
}
} else if (pwrupCode == 2) {
this.attachMovie("pwrupExtractor", "pwrupExtractor" + depth, depth, {_x:_local3, _y:_local2});
} else if (pwrupCode == 3) {
this.attachMovie("pwrupShield", "pwrupShield" + depth, depth, {_x:_local3, _y:_local2});
} else if (pwrupCode == 4) {
this.attachMovie("pwrupTimeFreezer", "pwrupTimeFreezer" + depth, depth, {_x:_local3, _y:_local2});
} else if (pwrupCode == 5) {
this.attachMovie("pwrupRepair", "pwrupRepair" + depth, depth, {_x:_local3, _y:_local2});
}
}
function increaseLvl() {
lvl++;
setLevel();
}
function setLevel() {
trace("check");
depth++;
if (lvl == 0) {
this.attachMovie("Enemy1", "Enemy1" + depth, depth, {_x:-150, _y:464});
} else if (lvl == 1) {
this.attachMovie("Enemy1", "Enemy1" + depth, depth, {_x:830, _y:464});
} else if (lvl == 2) {
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:100, _y:-200});
} else if (lvl == 3) {
this.attachMovie("Enemy2", "Enemy2" + depth, depth, {_x:830, _y:468});
} else if (lvl == 4) {
deploy2para();
} else if (lvl == 5) {
} else if (lvl == 6) {
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:580, _y:-200});
} else if (lvl == 7) {
this.attachMovie("Enemy4", "Enemy4" + depth, depth, {_x:-100, _y:492});
} else if (lvl == 8) {
} else if (lvl == 9) {
this.attachMovie("Enemy4", "Enemy4" + depth, depth, {_x:780, _y:492});
} else if (lvl == 10) {
} else if (lvl == 11) {
this.attachMovie("Enemy5", "Enemy5" + depth, depth, {_x:-350, _y:12});
} else if (lvl == 12) {
deploy2para();
} else if (lvl == 13) {
} else if (lvl == 14) {
} else if (lvl == 15) {
deploy2para();
} else if (lvl == 16) {
} else if (lvl == 17) {
this.attachMovie("Enemy5", "Enemy5" + depth, depth, {_x:-350, _y:92});
} else if (lvl == 18) {
deploy3para();
} else if (lvl == 19) {
deploy3para();
} else if (lvl > 19) {
deploy3para();
}
}
function deploy2para() {
depth++;
var _local2 = Math.floor(Math.random() * 200) + -400;
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:100, _y:_local2});
depth++;
_local2 = Math.floor(Math.random() * 200) + -400;
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:580, _y:_local2});
}
function deploy3para() {
depth++;
var _local2 = Math.floor(Math.random() * 200) + -400;
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:100, _y:_local2});
depth++;
_local2 = Math.floor(Math.random() * 200) + -400;
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:580, _y:_local2});
depth++;
_local2 = Math.floor(Math.random() * 200) + -400;
this.attachMovie("Enemy3", "Enemy3" + depth, depth, {_x:340, _y:_local2});
}
function attImpact1(xPos, yPos) {
depth++;
this.attachMovie("impact1", "impact1" + depth, depth, {_x:xPos, _y:yPos});
}
function updateUI() {
function lifeChecker() {
if (life > 100) {
life = 100;
} else if (life <= 0) {
if (stplifeChecker == false) {
life = 0;
postLvlInterval = setInterval(postLvlScrnTrnsition, postLvlTransInterval);
stplifeChecker = true;
}
}
lifeNumerator = life;
uis_mc.lifeBar_mc._xscale = (lifeNumerator / lifeDenominator) * 100;
}
function enerhiyaChecker() {
uis_mc.enerhiyaCollected_txt.text = String(enerhiya);
}
lifeChecker();
enerhiyaChecker();
}
function checkHit() {
if (gameState == "running") {
var _local1 = enemyProjectiles.length - 1;
while (_local1 >= 0) {
if (enemyProjectiles[_local1].hitTest(shield_mc)) {
plyHitSnd();
enemyProjectiles[_local1].destruct("hit");
removeProjectiles(enemyProjectiles[_local1]);
break;
}
if (enemyProjectiles[_local1].hitTest(plyr_mc)) {
plyHitSnd();
life = life - 10;
attImpact1(enemyProjectiles[_local1]._x, enemyProjectiles[_local1]._y);
uiFaceAnimation();
enemyProjectiles[_local1].destruct("hit");
removeProjectiles(enemyProjectiles[_local1]);
break;
}
_local1--;
}
var _local2 = enemyProjectilesWparticles.length - 1;
while (_local2 >= 0) {
if (enemyProjectilesWparticles[_local2].hitTest(shield_mc)) {
plyHitSnd();
enemyProjectilesWparticles[_local2].destruct("hit");
removeProjectilesParticles(enemyProjectilesWparticles[_local2]);
break;
}
if (enemyProjectilesWparticles[_local2].hitTest(plyr_mc)) {
plyHitSnd();
life = life - 5;
attImpact1(enemyProjectilesWparticles[_local2]._x, enemyProjectilesWparticles[_local2]._y);
uiFaceAnimation();
enemyProjectilesWparticles[_local2].destruct("hit");
removeProjectilesParticles(enemyProjectilesWparticles[_local2]);
break;
}
_local2--;
}
}
var _local3 = enerhiyaArray.length - 1;
while (_local3 >= 0) {
if (enerhiyaArray[_local3].hitTest(plyr_mc)) {
plyEneryaSnd();
enerhiya = enerhiya + enerhiyaArray[_local3].pointsLeft;
enerhiyaArray[_local3].destruct("hit");
removeEnerhiya(enerhiyaArray[_local3]);
break;
}
_local3--;
}
}
function plyrShpAppearance() {
if (life > 80) {
plyr_mc.gotoAndStop(1);
} else if (life > 60) {
plyr_mc.gotoAndStop(2);
} else if (life > 40) {
plyr_mc.gotoAndStop(3);
} else if (life > 20) {
plyr_mc.gotoAndStop(4);
} else if (life > 0) {
plyr_mc.gotoAndStop(5);
}
}
function uiFaceAnimation() {
var _local1 = Math.floor(Math.random() * 2) + 0;
if (_local1 == 0) {
uis_mc.faceAnimation_mc.gotoAndPlay(2);
faceAnimating = true;
} else if (_local1 == 1) {
uis_mc.faceAnimation_mc.gotoAndPlay(15);
faceAnimating = true;
}
}
function removeProjectiles(mc) {
var _local1 = 0;
while (_local1 < enemyProjectiles.length) {
if (enemyProjectiles[_local1] == mc) {
enemyProjectiles.splice(_local1, 1);
break;
}
_local1++;
}
}
function removeProjectilesParticles(mc) {
var _local1 = 0;
while (_local1 < enemyProjectilesWparticles.length) {
if (enemyProjectilesWparticles[_local1] == mc) {
enemyProjectilesWparticles.splice(_local1, 1);
break;
}
_local1++;
}
}
function removeEnerhiya(mc) {
var _local1 = 0;
while (_local1 < enerhiyaArray.length) {
if (enerhiyaArray[_local1] == mc) {
enerhiyaArray.splice(_local1, 1);
break;
}
_local1++;
}
}
function charFollowMouse() {
if (life <= 0) {
if (shipDestroyed == false) {
depth++;
attachMovie("ShipExplosion", "ShipExplosion" + depth, depth, {_x:plyr_mc._x, _y:plyr_mc._y});
shipDestroyed = true;
}
plyr_mc._x = 340;
plyr_mc._y = -500;
} else {
plyr_mc._x = plyr_mc._x + ((_xmouse - plyr_mc._x) / plyrSpd);
plyr_mc._y = plyr_mc._y + ((_ymouse - plyr_mc._y) / plyrSpd);
}
tail1._x = tail1._x + ((plyr_mc._x - tail1._x) / plyrSpd);
tail1._y = tail1._y + ((plyr_mc._y - tail1._y) / plyrSpd);
tail2._x = tail2._x + ((tail1._x - tail2._x) / plyrSpd);
tail2._y = tail2._y + ((tail1._y - tail2._y) / plyrSpd);
tail1._alpha = 0;
tail2._alpha = 0;
}
function attPlyrPara(mc) {
depth++;
attachMovie("PlyrPara", "PlyrPara" + depth, depth, {_x:mc._x, _y:mc._y});
}
function charMovementAnimation() {
if (plyr_mc._x < (_xmouse - 50)) {
plyr_mc._rotation = 10;
} else if (plyr_mc._x < (_xmouse - 40)) {
plyr_mc._rotation = 8;
} else if (char_mc._x < (_xmouse - 30)) {
plyr_mc._rotation = 6;
} else if (char_mc._x < (_xmouse - 20)) {
plyr_mc._rotation = 4;
} else if (char_mc._x < (_xmouse - 10)) {
plyr_mc._rotation = 2;
}
if (char_mc._x > (_xmouse + 50)) {
plyr_mc._rotation = 350;
} else if (plyr_mc._x > (_xmouse + 40)) {
plyr_mc._rotation = 352;
} else if (plyr_mc._x > (_xmouse + 30)) {
plyr_mc._rotation = 354;
} else if (char_mc._x > (_xmouse + 20)) {
plyr_mc._rotation = 356;
} else if (char_mc._x > (_xmouse + 10)) {
plyr_mc._rotation = 358;
}
if ((plyr_mc._x > (_xmouse - 10)) && (plyr_mc._x < (_xmouse + 10))) {
plyr_mc._rotation = 0;
}
}
function addSpeed() {
plyrSpd = plyrSpd - 2;
if (plyrSpd <= 1) {
plyrSpd = 1;
}
trace("speed var updated-- current value" + plyrSpd);
}
function addHealth() {
life = life + 25;
if (life >= 100) {
life = 100;
}
trace("life var updated-- current value" + life);
}
function powerupShield() {
shieldEnergy = 100;
}
function activateExtractor() {
extractCounter = 15;
}
function extractEnerya() {
if (extractCounter > 0) {
attEnerhiyaStorm();
}
extractCounter--;
}
function timeFreeze() {
timeFreezeCounter = 0;
}
function runTimeFreeze() {
if (timeFreezeCounter < 361) {
gameState = "timeFreeze";
timeFreezeCounter = timeFreezeCounter + 6;
uiClock_mc.arm_mc._rotation = timeFreezeCounter;
uiClock_mc._alpha = 100;
} else {
gameState = "running";
timeFreezeCounter = 361;
uiClock_mc._alpha = 0;
}
}
function setNewBg() {
bgCode++;
if (bgCode > 5) {
bgCode = 1;
}
changeBackGround();
}
function changeBackGround() {
if (bgCode == 1) {
bg_holder.gotoAndPlay(41);
}
if (bgCode == 2) {
bg_holder.gotoAndPlay(2);
}
if (bgCode == 3) {
bg_holder.gotoAndPlay(11);
}
if (bgCode == 4) {
bg_holder.gotoAndPlay(21);
}
if (bgCode == 5) {
bg_holder.gotoAndPlay(31);
}
}
stop();
animate(uis_mc, "_y", mx.transitions.easing.Strong.easeOut, uis_mc._y, 21, 1.4, true);
var plyrSpd = 7;
var depth = 500;
var life = 100;
var lifeNumerator = life;
var lifeDenominator = 100;
var enerhiya = 0;
var gameState = "running";
var enemyProjectiles = new Array();
var enemyProjectilesWparticles = new Array();
var enerhiyaArray = new Array();
var shieldEnergy = 0;
var extractCounter = 0;
var eneryaYspd = 1;
var timeFreezeCounter = 361;
var lvl = 0;
var postLvlTransInterval = 2000;
var postLvlInterval;
var postLvlScrnCounter = 0;
init();
var enerhiyaAttNum = 0;
attEnerhiya();
var pwrupsAttInterval = 5000;
var pwrupsSetInterval = setInterval(deployPwrups, pwrupsAttInterval);
var pwrupCode = 0;
var lvlInterval = 15000;
var lvlSetInterval = setInterval(increaseLvl, lvlInterval);
var stplifeChecker = false;
var faceAnimating = false;
var shipDestroyed = false;
var bgCode = 1;
var bgIntTime = 10000;
var bgChangeSetInterval = setInterval(setNewBg, bgIntTime);
Frame 38
stop();
yourScore_txt.text = String(enerhiya);
stpBG2Snd();
navBtn(submitScore_btn, "submitScore");
navBtn(backToMain_btn, "title");
plyBG1Snd();
Frame 39
function submitAction() {
_root.gotoAndStop("title");
trace("205148165149223152153171163088147150158214171197160158172214160208165217161152157197211198220203139164161088146");
}
function mainMenuAction() {
_root.gotoAndStop("title");
trace("205148165149223152153171163088147150158214171197160158172214160208165217161152157197211198220203139164161088146");
}
function errorAction() {
_root.gotoAndStop("title");
trace("205148165149223152153171163088147150158214171197160158172214160208165217161152157197211198220203139164161088146");
}
stop();
var scoreSkin = {border:{width:4, color:16777215, alpha:100}, background:{topColor:10066329, bottomColor:6710886, topAlpha:100, bottomAlpha:100, cornerRadius:10}, language:"ENG"};
com.gamezhero.api.as2.GamezheroApi.score(this, "205148165149223152153171163088147150158214171197160158172214160208165217161152157197211198220203139164161088146", enerhiya, 200, 75, submitAction, mainMenuAction, errorAction, scoreSkin);
animate(postLevelScreen_mc, "_y", mx.transitions.easing.Regular.easeIn, postLevelScreen_mc._y, -1200, 0.2, true);
animate(ss_bg, "_xscale", mx.transitions.easing.Regular.easeInOut, ss_bg._xscale, 150, 0.8, true);
animate(ss_bg, "_yscale", mx.transitions.easing.Regular.easeInOut, ss_bg._yscale, 150, 0.8, true);
animate(tempBack_btn, "_y", mx.transitions.easing.Regular.easeIn, tempBack_btn._y, 470, 1, true);
navBtn(tempBack_btn, "title");
Symbol 12 MovieClip Frame 1
stop();
Symbol 12 MovieClip Frame 11
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 8
gotoAndPlay (2);
Symbol 32 MovieClip [Enemy3] Frame 1
function init() {
aimSpd = Math.floor(Math.random() * 3) + 0;
fireInterval = Math.floor(Math.random() * (maxInterval - minInterval)) + minInterval;
lpr();
}
function fire() {
if (_parent.gameState == "running") {
attBullet();
fireInterval = Math.floor(Math.random() * (maxInterval - minInterval)) + minInterval;
}
}
function attBullet() {
_parent.plyLsrSnd1();
var _local4 = 50;
var _local3 = barrel._rotation;
var _local6 = this._x + (_local4 * Math.cos((_local3 * Math.PI) / 180));
var _local5 = this._y + (_local4 * Math.sin((_local3 * Math.PI) / 180));
_parent.depth++;
_parent.attachMovie("EnPrjctlPart2", "EnPrjctlPart2" + _parent.depth, _parent.depth, {_x:_local6, _y:_local5, _rotation:barrel._rotation});
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
clearInterval(fireSetInterval);
removeMovieClip(this);
} else if (_parent.gameState == "running") {
moveDown();
setScales();
if (aimSpd == 0) {
rotateBarrel(this._parent.plyr_mc, barrel);
} else if (aimSpd == 1) {
rotateBarrel(this._parent.tail1, barrel);
} else if (aimSpd == 2) {
rotateBarrel(this._parent.tail2, barrel);
}
if (this._y >= 500) {
delete this.onEnterFrame;
clearInterval(fireSetInterval);
para_mc.gotoAndPlay(2);
body.gotoAndPlay(2);
moveAwayFromScreen();
}
}
};
}
function moveDown() {
this._y = this._y + 2;
}
function moveAwayFromScreen() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else if (_parent.gameState == "running") {
if (this._x < 340) {
this._x = this._x - 1;
} else {
this._x = this._x + 1;
}
}
};
}
function setScales() {
if (_parent.plyr_mc._x > this._x) {
body._xscale = -100;
barrel._yscale = -100;
} else {
body._xscale = 100;
barrel._yscale = 100;
}
}
function rotateBarrel(char, barrel) {
ax = char._x - (this._x + barrel._x);
ay = char._y - (this._y + barrel._y);
angle = (180 * Math.atan2(ay, ax)) / Math.PI;
barrel._rotation = angle;
}
stop();
var aimSpd;
var fireInterval;
var depth;
var maxInterval = 2000;
var minInterval = 500;
init();
var fireSetInterval = setInterval(fire, fireInterval);
Symbol 39 MovieClip [Enemy2] Frame 1
function init() {
aimSpd = Math.floor(Math.random() * 3) + 0;
enterScreen();
}
function enterScreen() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (_parent.gameState == "running") {
barrelMovement();
if (this._x < 340) {
this._x = this._x + movSpd;
if (this._x >= 320) {
beginAttack();
}
}
if (this._x > 340) {
this._x = this._x - movSpd;
if (this._x <= 360) {
beginAttack();
}
}
}
};
}
function beginAttack() {
delete this.onEnterFrame;
fireInterval = Math.floor(Math.random() * (maxInterval - minInterval)) + minInterval;
fireSetInterval = setInterval(fire, fireInterval);
lpr();
}
function fire() {
if (_parent.gameState == "running") {
attGdMssl();
fireInterval = Math.floor(Math.random() * (maxInterval - minInterval)) + minInterval;
}
}
function attGdMssl() {
_parent.attGdMssl(this);
_parent.plyBlastSnd();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
clearInterval(fireSetInterval);
removeMovieClip(this);
} else if (_parent.gameState == "running") {
if (aimSpd == 0) {
rotateBarrel(this._parent.plyr_mc, barrel);
} else if (aimSpd == 1) {
rotateBarrel(this._parent.tail1, barrel);
} else if (aimSpd == 2) {
rotateBarrel(this._parent.tail2, barrel);
}
}
};
}
function rotateBarrel(char, barrel) {
ax = char._x - (this._x + barrel._x);
ay = char._y - (this._y + barrel._y);
angle = (180 * Math.atan2(ay, ax)) / Math.PI;
barrel._rotation = angle;
}
stop();
var aimSpd;
var fireInterval;
var depth;
var fireSetInterval;
var maxInterval = 15000;
var minInterval = 10000;
var movSpd = 1;
init();
Symbol 46 MovieClip [Enemy1] Frame 1
function init() {
dirCode = 0;
aimSpd = Math.floor(Math.random() * 3) + 0;
fireInterval = Math.floor(Math.random() * 1000) + 1000;
enterScreen();
}
function enterScreen() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (_parent.gameState == "running") {
barrelMovement();
if (this._x < 340) {
this._x = this._x + movSpd;
if (this._x >= 70) {
beginAttack();
}
}
if (this._x > 340) {
this._x = this._x - movSpd;
if (this._x <= 610) {
beginAttack();
}
}
}
};
}
function beginAttack() {
delete this.onEnterFrame;
lpr();
fireSetInterval = setInterval(fire, fireInterval);
}
function fire() {
if (_parent.gameState == "running") {
attBullet();
fireInterval = Math.floor(Math.random() * 1000) + 1000;
}
}
function attBullet() {
_parent.attBullet(this);
_parent.plyBlastSnd();
}
function lpr() {
this.onEnterFrame = function () {
trace("parent gamestate-->> " + _parent.gameState);
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
clearInterval(fireSetInterval);
removeMovieClip(this);
trace("removeGrayTank");
} else if (_parent.gameState == "running") {
barrelMovement();
}
};
}
function barrelMovement() {
if (aimSpd == 0) {
rotateBarrel(this._parent.plyr_mc, barrel);
} else if (aimSpd == 1) {
rotateBarrel(this._parent.tail1, barrel);
} else if (aimSpd == 2) {
rotateBarrel(this._parent.tail2, barrel);
}
}
function rotateBarrel(char, barrel) {
ax = char._x - (this._x + barrel._x);
ay = char._y - (this._y + barrel._y);
angle = (180 * Math.atan2(ay, ax)) / Math.PI;
barrel._rotation = angle;
}
stop();
var aimSpd;
var fireInterval;
var depth;
var dirCode;
var fireSetInterval;
var movSpd = 1;
init();
Symbol 58 MovieClip [EnPrjctlPart2] Frame 1
function initBooger() {
this._parent.enemyProjectilesWparticles.push(this);
spd = Math.floor(Math.random() * 4) + 11;
grvty = 0.02;
angle = (this._rotation / 180) * Math.PI;
xSpd = Math.cos(angle) * spd;
ySpd = Math.sin(angle) * spd;
xplsnYpos = _parent.plyr_mc._y;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if ((((this._x > 680) || (this._x < 0)) || (this._y > 520)) || (this._y < 0)) {
destruct("outOfBounds");
} else {
ySpd = ySpd + grvty;
this._x = this._x + xSpd;
this._y = this._y + ySpd;
this._rotation = (Math.atan2(ySpd, xSpd) * 180) / Math.PI;
}
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectilesParticles(this);
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
initBooger();
Symbol 61 MovieClip [EnPrjctlVert2] Frame 1
function initBooger() {
this._parent.enemyProjectilesWparticles.push(this);
spd = 15;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if ((((this._x > 680) || (this._y > 520)) || (this._x < 0)) || (this._y < 0)) {
destruct("outOfBounds");
} else {
this._y = this._y + spd;
}
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectilesParticles(this);
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
initBooger();
Symbol 64 MovieClip [EnPrjctlVert] Frame 1
function initBooger() {
this._parent.enemyProjectilesWparticles.push(this);
spd = 25;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if ((((this._x > 680) || (this._y > 520)) || (this._x < 0)) || (this._y < 0)) {
destruct("outOfBounds");
} else {
this._y = this._y - spd;
}
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectilesParticles(this);
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
initBooger();
Symbol 66 MovieClip [EnPrjctlPart] Frame 1
function initBooger() {
this._parent.enemyProjectilesWparticles.push(this);
spd = Math.floor(Math.random() * 3) + 7;
grvty = 0.1;
angle = (this._rotation / 180) * Math.PI;
xSpd = Math.cos(angle) * spd;
ySpd = Math.sin(angle) * spd;
xplsnYpos = _parent.plyr_mc._y;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if (((this._x > 680) || (this._y > 520)) || (this._x < 0)) {
destruct("outOfBounds");
} else {
ySpd = ySpd + grvty;
this._x = this._x + xSpd;
this._y = this._y + ySpd;
this._rotation = (Math.atan2(ySpd, xSpd) * 180) / Math.PI;
}
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectilesParticles(this);
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
initBooger();
Symbol 72 MovieClip [EnGdPrjctl] Frame 1
function initBooger() {
this._parent.enemyProjectiles.push(this);
spd = Math.floor(Math.random() * 3) + 9;
grvty = 0.1;
angle = (this._rotation / 180) * Math.PI;
xSpd = Math.cos(angle) * spd;
ySpd = Math.sin(angle) * spd;
xplsnYpos = _parent.plyr_mc._y;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if ((((this._x > 680) || (this._y > 520)) || (this._x < 0)) || (this._y < 0)) {
destruct("outOfBounds");
} else {
followCounter++;
if (followCounter < 500) {
followPlyr(this._parent.plyr_mc);
} else {
deviateCourse();
}
}
}
function deviateCourse() {
speed = speed + power;
if (speed > 5) {
speed = 5;
}
var _local3 = Math.atan(dy / dx);
var _local2 = (_local3 * 180) / Math.PI;
if (dx < 0) {
_local2 = _local2 - 180;
}
dir = _local2;
this._rotation = _local2;
_local2 = dir;
_local3 = (_local2 / 180) * Math.PI;
dx = Math.cos(_local3);
dy = Math.sin(_local3);
dx = dx * speed;
dy = dy * speed;
this._x = this._x + dx;
this._y = this._y + dy;
}
function followPlyr(char) {
speed = speed + power;
if (speed > 5) {
speed = 5;
}
dx = char._x - this._x;
dy = char._y - this._y;
var _local3 = Math.atan(dy / dx);
var _local2 = (_local3 * 180) / Math.PI;
if (dx < 0) {
_local2 = _local2 - 180;
}
dir = _local2;
this._rotation = _local2;
_local2 = dir;
_local3 = (_local2 / 180) * Math.PI;
dx = Math.cos(_local3);
dy = Math.sin(_local3);
dx = dx * speed;
dy = dy * speed;
this._x = this._x + dx;
this._y = this._y + dy;
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectiles(this);
removeMovieClip(this);
} else if (reason == "attachPart") {
delete this.onEnterFrame;
this._parent.removeProjectiles(this);
attParticles();
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
var speed = 0;
var dx = 0;
var dy = 0;
var drag = 0.3;
var power = 0.3;
initBooger();
var followCounter = 0;
Symbol 73 MovieClip [EnPrjctl] Frame 1
function initBooger() {
this._parent.enemyProjectiles.push(this);
spd = Math.floor(Math.random() * 3) + 9;
grvty = 0.1;
angle = (this._rotation / 180) * Math.PI;
xSpd = Math.cos(angle) * spd;
ySpd = Math.sin(angle) * spd;
xplsnYpos = _parent.plyr_mc._y;
lpr();
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("outOfBounds");
} else if (_parent.gameState == "running") {
movement();
}
};
}
function movement() {
if ((this._y <= xplsnYpos) && (this._y < 410)) {
destruct("attachPart");
} else if (((this._x > 680) || (this._y > 520)) || (this._x < 0)) {
destruct("outOfBounds");
} else {
ySpd = ySpd + grvty;
this._x = this._x + xSpd;
this._y = this._y + ySpd;
this._rotation = (Math.atan2(ySpd, xSpd) * 180) / Math.PI;
}
}
function attParticles() {
_parent.plyLsrSnd2();
var _local8 = Math.floor(Math.random() * 3) + 2;
var _local4;
var _local3 = 0;
while (_local3 < _local8) {
_parent.depth++;
_local4 = Math.floor(Math.random() * 179) + -179;
_parent.attachMovie("EnPrjctlPart", "EnPrjctlPart" + _parent.depth, _parent.depth, {_x:this._x, _y:this._y, _rotation:_local4});
_local3++;
}
}
function destruct(reason) {
if (reason == "outOfBounds") {
delete this.onEnterFrame;
this._parent.removeProjectiles(this);
removeMovieClip(this);
} else if (reason == "attachPart") {
delete this.onEnterFrame;
this._parent.removeProjectiles(this);
attParticles();
removeMovieClip(this);
} else if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
}
}
var originMC;
var target;
var xSpd;
var ySpd;
var angle;
var spd;
var grvty;
var xplsnYpos;
initBooger();
Symbol 78 MovieClip [EneryaStorm] Frame 1
function init() {
this._parent.enerhiyaArray.push(this);
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("hit");
} else {
movement();
}
};
}
function movement() {
this._y = this._y - _parent.eneryaYspd;
decrementPoints();
}
function decrementPoints() {
pointsLeft--;
this._alpha = pointsLeft;
pointsLeft_txt.text = String(pointsLeft);
if (pointsLeft <= 0) {
destruct("remove");
}
}
function destruct(reason) {
if (reason == "hit") {
delete this.onEnterFrame;
removeMovieClip(this);
} else if (reason == "remove") {
delete this.onEnterFrame;
this._parent.removeEnerhiya(this);
removeMovieClip(this);
}
}
var pointsLeft = 100;
init();
Symbol 80 MovieClip [Enerhiya] Frame 1
function init() {
this._parent.enerhiyaArray.push(this);
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
destruct("gameover");
} else {
movement();
}
};
}
function movement() {
this._y = this._y - _parent.eneryaYspd;
decrementPoints();
}
function decrementPoints() {
pointsLeft--;
this._alpha = pointsLeft;
pointsLeft_txt.text = String(pointsLeft);
if (pointsLeft <= 0) {
destruct("remove");
}
if (this._y <= -25) {
destruct("remove");
}
}
function destruct(reason) {
if (reason == "hit") {
delete this.onEnterFrame;
_parent.attEnerhiya();
removeMovieClip(this);
} else if (reason == "remove") {
delete this.onEnterFrame;
_parent.attEnerhiya();
this._parent.removeEnerhiya(this);
removeMovieClip(this);
} else if (reason == "gameover") {
delete this.onEnterFrame;
this._parent.removeEnerhiya(this);
removeMovieClip(this);
}
}
var pointsLeft = 100;
init();
Symbol 84 MovieClip [pwrupExtractor] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else {
this._y = this._y + 1;
counter--;
if (counter <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (this.hitTest(_parent.plyr_mc)) {
_parent.plyPowerUpSnd();
delete this.onEnterFrame;
_parent.activateExtractor();
removeMovieClip(this);
}
}
};
}
var counter = 50;
lpr();
Symbol 87 MovieClip [pwrupShield] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else {
this._y = this._y + 1;
counter--;
if (counter <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (this.hitTest(_parent.plyr_mc)) {
_parent.plyPowerUpSnd();
delete this.onEnterFrame;
_parent.powerupShield();
removeMovieClip(this);
}
}
};
}
var counter = 50;
lpr();
Symbol 90 MovieClip [pwrupTimeFreezer] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else {
this._y = this._y + 1;
counter--;
if (counter <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (this.hitTest(_parent.plyr_mc)) {
_parent.plyPowerUpSnd();
delete this.onEnterFrame;
_parent.timeFreeze();
removeMovieClip(this);
}
}
};
}
var counter = 50;
lpr();
Symbol 93 MovieClip [pwrupRepair] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else {
this._y = this._y + 1;
counter--;
if (counter <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (this.hitTest(_parent.plyr_mc)) {
_parent.plyPowerUpSnd();
delete this.onEnterFrame;
_parent.addHealth();
removeMovieClip(this);
}
}
};
}
var counter = 50;
lpr();
Symbol 96 MovieClip [pwrupBooster] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else {
this._y = this._y + 1;
counter--;
if (counter <= 0) {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (this.hitTest(_parent.plyr_mc)) {
_parent.plyPowerUpSnd();
delete this.onEnterFrame;
_parent.addSpeed();
removeMovieClip(this);
}
}
};
}
var counter = 50;
lpr();
Symbol 98 MovieClip [impact1] Frame 6
stop();
removeMovieClip(this);
Symbol 101 MovieClip [Enemy4] Frame 1
function init() {
dirCode = 0;
aimSpd = Math.floor(Math.random() * 3) + 0;
fireInterval = Math.floor(Math.random() * 1000) + 1000;
enterScreen();
}
function enterScreen() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
}
if (_parent.gameState == "running") {
if (this._x < 340) {
this._x++;
if (this._x >= 180) {
delete this.onEnterFrame;
this._x = 180;
lpr();
}
}
if (this._x > 340) {
this._x--;
if (this._x <= 500) {
delete this.onEnterFrame;
this._x = 500;
lpr();
}
}
}
};
}
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else if (_parent.gameState == "running") {
fireWeapon();
}
};
}
function fireWeapon() {
rof++;
fireCounter++;
if (rof == 3) {
if (fireCounter < fireCounterMin) {
attVerticalFireball();
}
if (fireCounter > fireCounterMax) {
fireCounter = 0;
fireCounterMin = Math.floor(Math.random() * 30) + 40;
fireCounterMax = Math.floor(Math.random() * 40) + 90;
}
rof = 0;
}
}
function attVerticalFireball() {
_parent.plyLsrSnd1();
_parent.attVerticalFireball(this);
}
stop();
var aimSpd;
var fireInterval;
var depth;
var dirCode;
var fireSetInterval;
var movSpd = 1;
init();
var rof = 0;
var fireCounter = 0;
var fireCounterMin = (Math.floor(Math.random() * 30) + 40);
var fireCounterMax = (Math.floor(Math.random() * 40) + 90);
Symbol 104 MovieClip [Enemy5] Frame 1
function lpr() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
delete this.onEnterFrame;
removeMovieClip(this);
} else if (_parent.gameState == "timeFreeze") {
} else {
boundaryChecker();
movement();
dropProjectile();
}
};
}
function boundaryChecker() {
trace("boundaryChecker");
if (this._x < -300) {
trace("boundaryChecker-left");
moveDir = "right";
this._xscale = 100;
}
if (this._x > 980) {
moveDir = "left";
this._xscale = -100;
}
}
function movement() {
if (moveDir == "right") {
this._x = this._x + spd;
}
if (moveDir == "left") {
this._x = this._x - spd;
}
}
function dropProjectile() {
dropCounter++;
if (dropCounter == 15) {
_parent.plyLsrSnd1();
_parent.attVerticalFireball2(this);
dropCounter = 0;
}
}
var spd = 5;
var moveDir;
lpr();
var dropCounter = 0;
Symbol 133 MovieClip [ShipExplosion] Frame 30
_parent.attPlyrPara(this);
Symbol 133 MovieClip [ShipExplosion] Frame 40
removeMovieClip(this);
Symbol 139 MovieClip [PlyrPara] Frame 1
function init() {
this.onEnterFrame = function () {
if (_parent.gameState == "gameover") {
remove();
} else {
this._y = this._y + spd;
if (this._y > 520) {
delete this.onEnterFrame;
remove();
}
}
};
}
function remove() {
removeMovieClip(this);
}
var spd = 1;
init();
Symbol 390 MovieClip [__Packages.com.gamezhero.api.as2.GamezheroApi] Frame 0
class com.gamezhero.api.as2.GamezheroApi
{
static var _preloader_goal, _preloader_next_step_function, _score_goal, _score_submit_function, _score_continue_function, _score_error_function;
function GamezheroApi () {
}
static function ini(gameName) {
System.security.allowDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
System.security.allowInsecureDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
com.gamezhero.api.as2.GamezheroGlobal.setGameName(gameName);
var _local1 = new com.gamezhero.api.as2.GameParams();
_local1.gameParamsReceived = gameParamsReceived;
}
static function gameParamsReceived(prs) {
var _local1 = prs;
for (var _local2 in _local1) {
params[_local2] = _local1[_local2];
}
}
static function preloader(target, nextStep) {
_preloader_goal = target;
_preloader_next_step_function = nextStep;
if (com.gamezhero.api.as2.GamezheroGlobal.getGameName() == "unset") {
trace("Error. GamezheroApi don't ini !");
} else {
var _local1 = new com.gamezhero.api.as2.GamePreloader(_preloader_goal);
_local1.continueAction = preloaderNextStep;
}
}
static function preloaderNextStep() {
_preloader_next_step_function.apply();
}
static function score(target, gameCode, scoreValue, scoreX, scoreY, submitAction, continueAction, errorAction, scoreSkin) {
com.gamezhero.api.as2.GamezheroGlobal.setGameCode(gameCode);
_score_goal = target;
_score_submit_function = submitAction;
_score_continue_function = continueAction;
_score_error_function = errorAction;
trace(com.gamezhero.api.as2.GamezheroGlobal.getGameName());
if (com.gamezhero.api.as2.GamezheroGlobal.getGameName() == "unset") {
trace("Error. GamezheroApi don't ini !");
} else {
var _local5 = scoreValue;
var _local4 = scoreX;
var _local3 = scoreY;
var _local1 = scoreSkin;
if (_local1 == undefined) {
_local1 = {border:{width:4, color:16777215, alpha:100}, background:{topColor:10066329, bottomColor:6710886, topAlpha:100, bottomAlpha:100, cornerRadius:10}, language:"ENG"};
}
var _local2 = new com.gamezhero.api.as2.SubmitArea(_score_goal, _local4, _local3, _local5, _local1);
_local2.submitAction = scoreSubmitAction;
_local2.continueAction = scoreContinueAction;
_local2.errorAction = scoreErrorAction;
}
}
static function scoreSubmitAction() {
_score_submit_function.apply();
}
static function scoreContinueAction() {
_score_continue_function.apply();
}
static function scoreErrorAction() {
_score_error_function.apply();
}
static function linkTopScore() {
if (!params.top_score) {
com.gamezhero.api.as2.GamezheroGlobal.getURL(((((("http://www.gamezhero.com/topscore/" + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "/top100.html?utm_campaign=") + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "&utm_source=") + com.gamezhero.api.as2.GamezheroGlobal.getDomain()) + "&utm_medium=top_score", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.top_score, "_blank");
}
}
static function linkZorroLogo() {
if (!params.logo) {
com.gamezhero.api.as2.GamezheroGlobal.getURL(((("http://www.gamezhero.com/?utm_campaign=" + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "&utm_source=") + com.gamezhero.api.as2.GamezheroGlobal.getDomain()) + "&utm_medium=zorro_logo", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.logo, "_blank");
}
}
static function linkSendToFrined() {
if (!params.send_to_friends) {
com.gamezhero.api.as2.GamezheroGlobal.getURL(((((("http://www.gamezhero.com/sendtofriends/" + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "-games.html?utm_campaign=") + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "&utm_source=") + com.gamezhero.api.as2.GamezheroGlobal.getDomain()) + "&utm_medium=send_to_friend", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.send_to_friends, "_blank");
}
}
static function linkPublish() {
if (!params.embed) {
com.gamezhero.api.as2.GamezheroGlobal.getURL(((((("http://www.gamezhero.com/freewebsitegames/" + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "-games.html?utm_campaign=") + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "&utm_source=") + com.gamezhero.api.as2.GamezheroGlobal.getDomain()) + "&utm_medium=free_web_site_games", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.embed, "_blank");
}
}
static function linkMoreGames() {
if (!params.more_games) {
com.gamezhero.api.as2.GamezheroGlobal.getURL(((("http://www.gamezhero.com/?utm_campaign=" + com.gamezhero.api.as2.GamezheroGlobal.getGameName()) + "&utm_source=") + com.gamezhero.api.as2.GamezheroGlobal.getDomain()) + "&utm_medium=more_free_games", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.more_games, "_blank");
}
}
static function linkTwitter() {
if (!params.twitter) {
com.gamezhero.api.as2.GamezheroGlobal.getURL("http://twitter.com/gamezhero", "_blank");
} else {
com.gamezhero.api.as2.GamezheroGlobal.getURL(params.twitter, "_blank");
}
}
static var params = new Object();
}
Symbol 391 MovieClip [__Packages.com.gamezhero.api.as2.GamezheroGlobal] Frame 0
class com.gamezhero.api.as2.GamezheroGlobal
{
function GamezheroGlobal () {
}
static function setGameName(name) {
gameNameVar = name;
}
static function getGameName() {
return(gameNameVar);
}
static function setGameCode(id) {
gameCodeVar = id;
}
static function getGameCode(id) {
return(gameCodeVar);
}
static function getURL(link, target) {
getURL (link, target);
}
static function getDomain() {
if (host != "error") {
return(host);
}
try {
var _local2 = new com.gamezhero.api.as2.utils.URL(_root._url);
host = _local2.getHost();
if (((host == null) || (host == undefined)) || (host == "")) {
host = "local";
}
} catch(e:Error) {
host = "error";
}
return(host);
}
static function toText(arr) {
var _local3 = "";
var _local1 = 0;
while (_local1 < arr.length) {
_local3 = _local3 + String.fromCharCode(arr[_local1]);
_local1++;
}
return(_local3);
}
static function getBrowser() {
if (browser == "unset") {
if (flash.external.ExternalInterface.available) {
try {
var _local1 = String(flash.external.ExternalInterface.call("function (){ return navigator['userAgent']}"));
_local1 = _local1.toLowerCase();
if (_local1.indexOf("firefox") != -1) {
browser = FIREFOX;
} else if (_local1.indexOf("chrome") != -1) {
browser = CHROME;
} else if (_local1.indexOf("safari") != -1) {
browser = SAFARI;
} else if (_local1.indexOf("opera") != -1) {
browser = OPERA;
} else {
browser = IE;
}
} catch(e:Error) {
browser = IE;
}
} else {
browser = IE;
}
}
return(browser);
}
static function fromText(txt) {
var _local3 = new Array();
var _local1 = 0;
while (_local1 < txt.length) {
_local3.push(txt.charCodeAt(_local1));
_local1++;
}
return(_local3);
}
static var gameNameVar = "unset";
static var gameCodeVar = "unset";
static var host = "error";
static var browser = "unset";
static var IE = "ie";
static var FIREFOX = "firefox";
static var OPERA = "opera";
static var SAFARI = "safari";
static var CHROME = "chrome";
}
Symbol 392 MovieClip [__Packages.com.gamezhero.api.as2.utils.URL] Frame 0
class com.gamezhero.api.as2.utils.URL
{
var url;
function URL (url) {
if (url.length == 0) {
throw new Error(("Invalid URL: '" + url) + "'];");
}
this.url = url;
query = ((url.indexOf("?") >= 0) ? (url.substring(url.indexOf("?") + 1)) : "");
if (query.indexOf("#") >= 0) {
query = query.substring(0, query.indexOf("#"));
}
var _local4 = url.indexOf("://");
if (_local4 >= 0) {
protocol = url.substring(0, _local4).toLowerCase();
host = url.substring(_local4 + 3);
if (host.indexOf("/") >= 0) {
host = host.substring(0, host.indexOf("/"));
}
var _local5 = host.indexOf("@");
if (_local5 >= 0) {
var _local3 = host.substring(0, _local5);
var _local6 = _local3.indexOf(":");
if (_local6 >= 0) {
username = _local3.substring(0, _local6);
password = _local3.substring(_local6 + 1);
} else {
username = _local3;
}
host = host.substring(_local5 + 1);
}
var _local7 = host.indexOf(":");
if (_local7 >= 0) {
port = Number(host.substring(_local7));
host = host.substring(0, _local7);
}
file = url.substring(_local4 + 3);
file = file.substring(file.indexOf("/"));
} else {
file = url;
}
if (file.indexOf("?") >= 0) {
file = file.substring(0, file.indexOf("?"));
}
var _local8 = url.indexOf("#");
if (_local8 >= 0) {
file = file.substring(0, _local8);
reference = url.substring(_local8 + 1);
} else {
reference = "";
}
path = file;
if (query.length > 0) {
file = file + ("?" + query);
}
if (reference.length > 0) {
file = file + ("#" + reference);
}
}
function getPort() {
return(port);
}
function getQuery() {
return(query);
}
function getProtocol() {
return(protocol);
}
function getHost() {
return(host);
}
function getUserName() {
return(username);
}
function getPassword() {
return(password);
}
function getFile() {
return(file);
}
function getReference() {
return(reference);
}
function getPath() {
return(path);
}
function getArgumentValue(key) {
var _local3 = getArgumentValues();
if (_local3.length < 1) {
return("");
}
var _local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2][0] == key) {
return(_local3[_local2][1]);
}
_local2++;
}
return("");
}
function getArgumentValues() {
var _local5 = new Array();
var _local4 = query.split("&");
var _local3 = "";
if (_local4.length < 1) {
return(_local5);
}
var _local2 = 0;
while (_local2 < _local4.length) {
_local3 = _local4[_local2].split("=");
_local5[_local2] = new Array(_local3[0], ((_local3.length == 1) ? (_local3[0]) : (_local3[1])));
_local2++;
}
return(_local5);
}
function toString() {
return(url);
}
var port = -1;
var query = "";
var protocol = "";
var host = "";
var file = "";
var path = "";
var reference = "";
var username = "";
var password = "";
}
Symbol 393 MovieClip [__Packages.com.gamezhero.api.as2.GameParams] Frame 0
class com.gamezhero.api.as2.GameParams
{
var _gamezhero_code_gameparams, _recived_name_connection_gameparams, _send_name_connection_gameparams, _receive_localconnection_gameparams, _send_localconnection_gameparams, _mc, gameParamsReceived, _loader_gameparams;
function GameParams () {
_gamezhero_code_gameparams = new Date().getTime();
_recived_name_connection_gameparams = "_recived_gamezhero_gameparams_" + _gamezhero_code_gameparams;
_send_name_connection_gameparams = "_send_gamezhero_gameparams_" + _gamezhero_code_gameparams;
iniLocalConnectionsGameParams();
iniEvents();
loadGameParamsEngine();
}
function iniEvents() {
_receive_localconnection_gameparams.onStatus = onStatusReciveGameParams;
_receive_localconnection_gameparams.allowInsecureDomain = checkDomain;
_receive_localconnection_gameparams.allowDomain = checkDomain;
_send_localconnection_gameparams.onStatus = onStatusSendGameParams;
_send_localconnection_gameparams.allowInsecureDomain = checkDomain;
_send_localconnection_gameparams.allowDomain = checkDomain;
}
function clearEvents() {
delete _obj_listener_gameparams.onLoadInit;
delete _obj_listener_gameparams.onLoadError;
delete _receive_localconnection_gameparams.onStatus;
delete _receive_localconnection_gameparams.allowInsecureDomain;
delete _receive_localconnection_gameparams.allowDomain;
delete _send_localconnection_gameparams.onStatus;
delete _send_localconnection_gameparams.allowInsecureDomain;
delete _send_localconnection_gameparams.allowDomain;
_mc.removeMovieClip();
}
function iniLocalConnectionsGameParams() {
_receive_localconnection_gameparams = new LocalConnection();
_receive_localconnection_gameparams.parent = this;
_receive_localconnection_gameparams.gameparamsOk = function () {
this=this.parent;//parameter overwritten
this.parent;
this._send_localconnection_gameparams.send(this._send_name_connection_gameparams, com.gamezhero.api.as2.GamezheroGlobal.toText([103, 101, 116, 80, 97, 114, 97, 109, 115]), this.getInfo());
};
_receive_localconnection_gameparams.iniParams = function (params) {
this=this.parent;//parameter overwritten
this.parent;
this.receivedAction(params);
};
try {
_receive_localconnection_gameparams.connect(_recived_name_connection_gameparams);
} catch(e) {
receivedAction({error:1});
}
_send_localconnection_gameparams = new LocalConnection();
}
function checkDomain(sendingDomain) {
if (sendingDomain == com.gamezhero.api.as2.GamezheroGlobal.toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109])) {
return(true);
}
return(false);
}
function getInfo() {
var _local1 = new Object();
_local1.game_name = com.gamezhero.api.as2.GamezheroGlobal.getGameName();
_local1.game_domain = com.gamezhero.api.as2.GamezheroGlobal.getDomain();
return(_local1);
}
function receivedAction(obj) {
gameParamsReceived.call(null, obj);
clearEvents();
}
function loadGameParamsEngine() {
var _local3 = com.gamezhero.api.as2.GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 103, 97, 109, 101, 112, 97, 114, 97, 109, 115, 47, 103, 97, 109, 101, 112, 97, 114, 97, 109, 115, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + String(_gamezhero_code_gameparams);
_mc = _root.createEmptyMovieClip("gamezhero_gameparams", _root.getNextHighestDepth());
_obj_listener_gameparams = new Object();
_obj_listener_gameparams.parent = this;
_obj_listener_gameparams.onLoadInit = function () {
this=this.parent;//parameter overwritten
this.parent;
this.gameParamsLoaderInit();
};
_obj_listener_gameparams.onLoadError = function () {
this=this.parent;//parameter overwritten
this.parent;
this.gameParamsLoaderError();
};
_loader_gameparams = new MovieClipLoader();
_loader_gameparams.addListener(_obj_listener_gameparams);
_loader_gameparams.loadClip(_local3, _mc);
}
function gameParamsLoaderInit(target) {
try {
_send_localconnection_gameparams.send(_send_name_connection_gameparams, com.gamezhero.api.as2.GamezheroGlobal.toText([103, 97, 109, 101, 112, 97, 114, 97, 109, 115, 73, 115, 79, 107]), null);
} catch(e) {
receivedAction({error:3});
}
}
function gameParamsLoaderError() {
tries--;
if (tries == 0) {
receivedAction({error:4});
} else {
loadGameParamsEngine();
}
}
function onErrorReciveGameParams(infoObject) {
receivedAction({error:5});
}
function onStatusReciveGameParams(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
receivedAction({error:6});
}
}
function onErrorSendGameParams(infoObject) {
receivedAction({error:7});
}
function onStatusSendGameParams(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
receivedAction({error:8});
}
}
var _obj_listener_gameparams = new Object();
var tries = 2;
}
Symbol 394 MovieClip [__Packages.com.gamezhero.api.as2.GamePreloader] Frame 0
class com.gamezhero.api.as2.GamePreloader
{
var _par, _loader_preloader_skin, _bg, _indicator, _gamezhero_code_preloader, _recived_name_connection_preloader, _send_name_connection_preloader, _recive_localconnection_preloader, _send_localconnection_preloader, _in_target, parent, _scale_old, _align_old, _quality_old, _ads, _loader_preloader_skin_loader, _timer, continueAction;
function GamePreloader (par, iniObject) {
_par = par;
if (iniObject != null) {
_obj = iniObject;
}
if (_obj.debug != undefined) {
_debug_flag = _obj.debug;
} else {
_debug_flag = false;
}
_loader_preloader_skin = _par.createEmptyMovieClip("gamezhero_preloader", _par.getNextHighestDepth());
_bg = new com.gamezhero.api.as2.gui.Background(_loader_preloader_skin);
_indicator = new com.gamezhero.api.as2.gui.Indicator(_loader_preloader_skin);
_gamezhero_code_preloader = new Date().getTime();
_recived_name_connection_preloader = "_recived_gamezhero_preloader_" + _gamezhero_code_preloader;
_send_name_connection_preloader = "_send_gamezhero_preloader_" + _gamezhero_code_preloader;
iniLocalConnectionsPreloader();
iniEvents();
iniStage();
}
function iniLocalConnectionsPreloader() {
_recive_localconnection_preloader = new LocalConnection();
_recive_localconnection_preloader.parent = this;
_recive_localconnection_preloader.preloaderOk = function () {
this=this.parent;//parameter overwritten
this.parent;
this._send_localconnection_preloader.send(this._send_name_connection_preloader, com.gamezhero.api.as2.GamezheroGlobal.toText([105, 110, 105, 80, 114, 101, 108, 111, 97, 100, 101, 114]), this.getInfo());
this.beginScenario1();
};
_recive_localconnection_preloader.preloaderGetUrlAction = function (url, target) {
this=this.parent;//parameter overwritten
this.parent;
this.gotoActionIni(url, target);
};
_recive_localconnection_preloader.finishAction = function (val) {
this=this.parent;//parameter overwritten
this.parent;
this.action();
};
try {
_recive_localconnection_preloader.connect(_recived_name_connection_preloader);
} catch(e) {
beginScenario2();
}
_send_localconnection_preloader = new LocalConnection();
}
function gotoActionIni(url, target) {
_in_url = url;
_in_target = target;
gotoAction();
}
function gotoAction() {
if (parent != undefined) {
this=parent;//parameter overwritten
parent;
}
if (_in_url != "null") {
getURL (_in_url, _in_target);
_in_url = undefined;
}
}
function onErrorRecivePreloader() {
beginScenario2();
}
function onStatusRecivePreloader(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
beginScenario2();
}
}
function onErrorSendPreloader() {
beginScenario2();
}
function onStatusSendPreloader(infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
beginScenario2();
}
}
function checkDomain(sendingDomain) {
if (sendingDomain == com.gamezhero.api.as2.GamezheroGlobal.toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109])) {
return(true);
}
return(false);
}
function iniEvents() {
_obj_listener_resize = new Object();
_obj_listener_resize.parent = this;
_obj_listener_resize.onResize = resizeAction;
_recive_localconnection_preloader.onStatus = onStatusRecivePreloader;
_recive_localconnection_preloader.allowInsecureDomain = checkDomain;
_recive_localconnection_preloader.allowDomain = checkDomain;
_send_localconnection_preloader.onStatus = onStatusSendPreloader;
_send_localconnection_preloader.allowInsecureDomain = checkDomain;
_send_localconnection_preloader.allowDomain = checkDomain;
}
function clearEvents() {
Stage.removeListener(_obj_listener_resize);
delete _obj_listener_resize.onResize;
delete _recive_localconnection_preloader.onStatus;
delete _recive_localconnection_preloader.allowInsecureDomain;
delete _recive_localconnection_preloader.allowDomain;
_recive_localconnection_preloader.close();
delete _send_localconnection_preloader.onStatus;
delete _send_localconnection_preloader.allowInsecureDomain;
delete _send_localconnection_preloader.allowDomain;
}
function iniStageEvents() {
Stage.addListener(_obj_listener_resize);
resizeAction(this);
}
function clearStageEvents() {
Stage.removeListener(_obj_listener_resize);
}
function iniTopEvents() {
}
function clearTopEvents() {
}
function moveAction() {
}
function iniStage() {
getStageSettings();
iniStageSettings();
iniContextMenu();
if (_debug_flag == false) {
loadPreloaderSkin();
} else {
beginScenario2();
}
iniStageEvents();
}
function iniStageSettings() {
Stage.scaleMode = "noScale";
Stage.align = "TL";
_root._quality = "BEST";
}
function setStageSettings() {
Stage.scaleMode = _scale_old;
Stage.align = _align_old;
_root._quality = _quality_old;
}
function getStageSettings() {
_scale_old = Stage.scaleMode;
_align_old = Stage.align;
_quality_old = _root._quality;
}
function iniContextMenu() {
var _local5 = com.gamezhero.api.as2.GamezheroGlobal.getGameName();
var _local7 = com.gamezhero.api.as2.GamezheroGlobal.getDomain();
_obj.gamezhero_menu = new Object();
(_obj.gamezhero_menu["Free Online Games @ Gamezhero.com"] = ((("http://www.gamezhero.com/?utm_campaign=" + _local5) + "&utm_source=") + _local7) + "&utm_medium=context_menu");
(_obj.gamezhero_menu["Send To Friends"] = ((((("http://www.gamezhero.com/sendtofriends/" + _local5) + "-games.html?utm_campaign=") + _local5) + "&utm_source=") + _local7) + "&utm_medium=send_to_friends_context_menu");
(_obj.gamezhero_menu["Put This Game To Your Blog or Site"] = ((((("http://www.gamezhero.com/freewebsitegames/" + _local5) + "-games.html?utm_campaign=") + _local5) + "&utm_source=") + _local7) + "&utm_medium=free_web_site_games_context");
var _local4 = new ContextMenu();
_local4.builtInItems.forward_back = false;
_local4.builtInItems.loop = false;
_local4.builtInItems.play = false;
_local4.builtInItems.print = false;
_local4.builtInItems.rewind = false;
_local4.builtInItems.zoom = false;
_local4.builtInItems.save = false;
var _local3 = 0;
for (var _local6 in _obj.gamezhero_menu) {
_root["url" + _local3] = _obj.gamezhero_menu[_local6];
_local4.customItems.push(new ContextMenuItem(_local6, this["goto" + _local3]));
_local3++;
}
_root.menu = _local4;
}
function goto0() {
getURL (_root.url0, "_blank");
}
function goto1() {
getURL (_root.url1, "_blank");
}
function goto2() {
getURL (_root.url2, "_blank");
}
function loadPreloaderSkin() {
var _local2 = com.gamezhero.api.as2.GamezheroGlobal.toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 47, 112, 114, 101, 108, 111, 97, 100, 101, 114, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + String(_gamezhero_code_preloader);
_ads = _loader_preloader_skin.createEmptyMovieClip("ads", _loader_preloader_skin.getNextHighestDepth());
_loader_preloader_skin_loader = new MovieClipLoader();
_obj_listener_preloader = new Object();
_obj_listener_preloader.parent = this;
_obj_listener_preloader.onLoadInit = function (how) {
this=this.parent;//parameter overwritten
this.parent;
this.preloaderLoaderInit();
};
_obj_listener_preloader.onLoadError = function () {
this=this.parent;//parameter overwritten
this.parent;
this.tries--;
if (this.tries <= 0) {
this.beginScenario2();
} else {
this.loadPreloaderSkin();
}
};
_loader_preloader_skin_loader.addListener(_obj_listener_preloader);
_loader_preloader_skin_loader.loadClip(_local2, _ads);
}
function preloaderLoaderInit() {
try {
_send_localconnection_preloader.send(_send_name_connection_preloader, com.gamezhero.api.as2.GamezheroGlobal.toText([112, 114, 101, 108, 111, 97, 100, 101, 114, 73, 115, 79, 107]), null);
} catch(e) {
beginScenario2();
}
}
function getInfo() {
var _local2 = new com.gamezhero.api.as2.UserInfo(_par);
return(Object(_local2));
}
function clearTimers() {
clearInterval(_timer);
}
function beginScenario1() {
_preloader_active_flag = true;
clearTimers();
_timer = setInterval(this, "updatePreloader1", 100);
resizeAction(this);
}
function beginScenario2() {
_error_flag = true;
clearTimers();
_timer = setInterval(this, "updatePreloader2", 100);
}
function updatePreloader1() {
iniStageSettings();
var _local4 = _root.getBytesLoaded() / _root.getBytesTotal();
_indicator.setVal("Loading...");
var _local3 = new Object();
_local3.width = Stage.width;
_local3.height = Stage.height;
_local3.loaded = _local4;
_send_localconnection_preloader.send(_send_name_connection_preloader, com.gamezhero.api.as2.GamezheroGlobal.toText([117, 112, 100, 97, 116, 101, 80, 114, 101, 108, 111, 97, 100, 101, 114]), _local3);
updateAfterEvent();
}
function updatePreloader2() {
iniStageSettings();
var _local3 = _root.getBytesLoaded() / _root.getBytesTotal();
_indicator.setVal(Math.round(_local3 * 100) + " %");
if (_local3 >= 1) {
action();
}
var _local4 = new Object();
_local4.width = Stage.width;
_local4.height = Stage.height;
_local4.loaded = _local3;
updateAfterEvent();
}
function resizeAction(g) {
if (g != undefined) {
this=g;//parameter overwritten
} else {
this=parent;//parameter overwritten
parent;
}
var _local2 = new Object();
_local2.width = Stage.width;
_local2.height = Stage.height;
if ((_error_flag == false) && (_preloader_active_flag == true)) {
_send_localconnection_preloader.send(_send_name_connection_preloader, com.gamezhero.api.as2.GamezheroGlobal.toText([117, 112, 100, 97, 116, 101, 80, 111, 115]), _local2);
}
_indicator.update(_local2.width, _local2.height);
_bg.update(_local2.width, _local2.height);
}
function action() {
clearTimers();
_timer = setInterval(this, "actionDone", 100);
}
function actionDone() {
_loader_preloader_skin._alpha = _loader_preloader_skin._alpha - 100;
updateAfterEvent();
if (_loader_preloader_skin._alpha <= 100) {
_loader_preloader_skin._alpha = 0;
clearEvents();
clearStageEvents();
clearTopEvents();
clearTimers();
setStageSettings();
_indicator.remove();
_bg.remove();
_loader_preloader_skin.removeMovieClip();
continueAction.call(null);
}
}
var _error_flag = false;
var _preloader_active_flag = false;
var _obj = new Object();
var _urls = new Array();
static var finish = "PRELOAD_COMPLETE";
var _in_url = "null";
var _debug_flag = false;
var _obj_listener_preloader = new Object();
var _obj_listener_resize = new Object();
var _obj_listener_mouse = new Object();
var tries = 2;
}
Symbol 395 MovieClip [__Packages.com.gamezhero.api.as2.gui.Indicator] Frame 0
class com.gamezhero.api.as2.gui.Indicator
{
var _goal, _indicator, _info_text, _timer, _timer_2;
function Indicator (g) {
_goal = g;
ini();
iniEvents();
}
function ini() {
_indicator = _goal.createEmptyMovieClip("gamezhero_indicator", _goal.getNextHighestDepth());
_indicator._visible = false;
getBorder();
_arr = new Array();
var _local2 = 0;
while (_local2 < _n) {
var _local3 = getItem(_local2);
_local3._rotation = _dalpha * _local2;
_local3._alpha = 20;
_arr.push(_local3);
_local2++;
}
createInfoText();
}
function getItem(indx) {
var _local2 = _indicator.createEmptyMovieClip("gamezhero_indicator_" + indx, _indicator.getNextHighestDepth());
_local2.beginFill(16777215, 100);
_local2.lineStyle(0, 0, 0);
_local2.moveTo(32.3, -5.7);
_local2.curveTo(30, -3.3, 30, 0);
_local2.curveTo(30, 3.3, 32.3, 5.6);
_local2.curveTo(34.7, 8, 38.05, 8);
_local2.lineTo(57, 8);
_local2.curveTo(60.3, 8, 62.6, 5.6);
_local2.curveTo(65, 3.3, 65, 0);
_local2.curveTo(65, -3.3, 62.6, -5.7);
_local2.curveTo(60.3, -8, 57, -8);
_local2.lineTo(38.05, -8);
_local2.curveTo(34.7, -8, 32.3, -5.7);
_local2.endFill();
return(_local2);
}
function getBorder() {
var _local3 = 10;
var _local4 = 150;
var _local5 = 150;
var _local2 = _indicator.createEmptyMovieClip("gamezhero_indicator_bg", _indicator.getNextHighestDepth());
_local2.beginFill(3355443, 100);
_local2.moveTo(_local3, 0);
_local2.lineTo(_local4 - _local3, 0);
_local2.curveTo(_local4, 0, _local4, _local3);
_local2.lineTo(_local4, _local3);
_local2.lineTo(_local4, _local5 - _local3);
_local2.curveTo(_local4, _local5, _local4 - _local3, _local5);
_local2.lineTo(_local4 - _local3, _local5);
_local2.lineTo(_local3, _local5);
_local2.curveTo(0, _local5, 0, _local5 - _local3);
_local2.lineTo(0, _local5 - _local3);
_local2.lineTo(0, _local3);
_local2.curveTo(0, 0, _local3, 0);
_local2.lineTo(_local3, 0);
_local2.endFill();
_local2._x = (-_local4) / 2;
_local2._y = (-_local5) / 2;
return(_local2);
}
function createInfoText() {
var _local3 = _indicator.getNextHighestDepth();
_indicator.createTextField("infoText_txt", _local3, -50, -10, 100, 20);
_info_text = _indicator.infoText_txt;
_info_text.autoSize = "center";
var _local2 = new TextFormat();
_local2.color = 16777215 /* 0xFFFFFF */;
_local2.size = 11;
_local2.font = "Arial";
_info_text.setNewTextFormat(_local2);
}
function iniEvents() {
_timer = setInterval(this, "updateIndicator", 33.3333333333333);
updateIndicator();
_timer_2 = setInterval(this, "updateCurrent", 66.6666666666667);
updateCurrent();
}
function clearEvents() {
clearInterval(_timer);
clearInterval(_timer_2);
}
function remove() {
clearEvents();
_indicator.removeMovieClip();
}
function updateCurrent() {
_current++;
if (_current >= _arr.length) {
_current = 0;
}
_arr[_current]._alpha = 100;
updateAfterEvent();
}
function updateIndicator() {
var _local2 = 0;
while (_local2 < _n) {
_arr[_local2]._alpha = _arr[_local2]._alpha - 7;
if (_arr[_local2]._alpha <= 0) {
_arr[_local2]._alpha = 0;
}
_local2++;
}
updateAfterEvent();
}
function update(w, h) {
_indicator._visible = true;
_indicator._x = w / 2;
_indicator._y = h / 2;
}
function setSize(w, h) {
_indicator._visible = true;
_indicator._width = w;
_indicator._height = h;
}
function setVal(val) {
_info_text.text = val;
}
function setPos(x, y) {
_indicator._visible = true;
_indicator._x = x;
_indicator._y = y;
}
var _n = 10;
var _dalpha = 360 / com.gamezhero.api.as2.gui.Indicator.prototype._n;
var _arr = new Array();
var _current = 0;
}
Symbol 396 MovieClip [__Packages.com.gamezhero.api.as2.gui.Background] Frame 0
class com.gamezhero.api.as2.gui.Background
{
var _goal, _bg;
function Background (g) {
_goal = g;
ini();
iniEvents();
}
function ini() {
_bg = getBg();
}
function getBg() {
var _local2 = _goal.createEmptyMovieClip("gamezhero_bg", _goal.getNextHighestDepth());
_local2.beginFill(0, 100);
_local2.lineStyle(0, 0, 0);
_local2.moveTo(0, 0);
_local2.lineTo(1000, 0);
_local2.lineTo(1000, 1000);
_local2.lineTo(0, 1000);
_local2.lineTo(0, 0);
_local2.endFill();
return(_local2);
}
function iniEvents() {
}
function clearEvents() {
}
function remove() {
clearEvents();
_bg.removeMovieClip();
}
function update(w, h) {
_bg._x = 0;
_bg._y = 0;
_bg._width = w + 100;
_bg._height = h + 100;
}
}
Symbol 397 MovieClip [__Packages.com.gamezhero.api.as2.UserInfo] Frame 0
class com.gamezhero.api.as2.UserInfo
{
var ad_zone, api_version, flash_vars, capabilities, href, browser, referrer, game_name, flash_width, flash_height, flash_url, flash_domain;
function UserInfo (g) {
iniInfo();
}
function iniInfo() {
publisher = "gamezhero";
ad_zone = "preloader";
api_version = "AS2 - v3.0";
flash_vars = new Object();
capabilities = System.capabilities.serverString;
if (flash.external.ExternalInterface.available) {
try {
href = String(flash.external.ExternalInterface.call("function (){return document.location.href}"));
if (href == undefined) {
href = "-1";
}
} catch(e:Error) {
href = "-1";
}
try {
browser = String(flash.external.ExternalInterface.call("function (){var st = ''; for (i in navigator){ if (typeof(navigator[i])!='function'){ st+=i+'='+navigator[i]+'&'; }} return st}"));
if (browser == undefined) {
browser = "-1";
}
} catch(e:Error) {
browser = "-1";
}
try {
referrer = String(flash.external.ExternalInterface.call("function (){return document.referrer}"));
if (referrer == undefined) {
referrer = "-1";
}
} catch(e:Error) {
referrer = "-1";
}
} else {
href = "-1";
browser = "-1";
referrer = "-1";
}
game_name = com.gamezhero.api.as2.GamezheroGlobal.getGameName();
flash_width = Stage.width;
flash_height = Stage.height;
flash_url = _root._url;
flash_domain = com.gamezhero.api.as2.GamezheroGlobal.getDomain();
for (var _local3 in _level0) {
if (!((typeof(_level0[_local3]) == "movieclip") || (typeof(_level0[_local3]) == "function"))) {
flash_vars[_local3] = _level0[_local3];
}
}
}
var publisher = "gamezhero";
}
Symbol 398 MovieClip [__Packages.com.gamezhero.api.as2.SubmitArea] Frame 0
class com.gamezhero.api.as2.SubmitArea
{
var gamezheroCode_skin, gamezheroCode_engine, recivedNameConnection_skin, sendNameConnection_skin, recivedNameConnection_engine, sendNameConnection_engine, reciveLocalConnection_skin, sendLocalConnection_skin, reciveLocalConnection_engine, sendLocalConnection_engine, _loader, parent, continueAction, skin_mc, infoText, _indicator, submitAction, errorAction, skin, goal, engine_mc;
function SubmitArea (g, x_, y_, score_, skin_) {
System.security.allowDomain("www.gamezhero.com", "gamezhero.com", "files.gamezhero.com", "data.gamezhero.com", "*.gamezhero.com");
gamezheroCode_skin = new Date().getTime();
gamezheroCode_engine = gamezheroCode_skin;
recivedNameConnection_skin = "_send_gamezhero_skin_" + gamezheroCode_skin;
sendNameConnection_skin = "_recive_gamezhero_skin_" + gamezheroCode_skin;
recivedNameConnection_engine = "_send_gamezhero_engine_" + gamezheroCode_engine;
sendNameConnection_engine = "_recive_gamezhero_engine_" + gamezheroCode_engine;
iniEvents();
iniLocalConnectionsSkin();
iniLocalConnectionsEngine();
iniSubmitArea(g, x_, y_, score_, skin_);
}
function iniEvents() {
}
function clearEvents() {
}
function iniLocalConnectionsSkin() {
reciveLocalConnection_skin = new LocalConnection();
reciveLocalConnection_skin.parent = this;
reciveLocalConnection_skin.allowDomain = checkDomain;
reciveLocalConnection_skin.allowInsecureDomain = checkDomain;
reciveLocalConnection_skin.onStatus = function (infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Connections 'Recive From Skin'";
this.errorActionFoo();
}
};
reciveLocalConnection_skin.skinOk = function () {
this=this.parent;//parameter overwritten
this.parent;
this.loadEngine();
};
reciveLocalConnection_skin.submitAction = function (userName) {
this=this.parent;//parameter overwritten
this.parent;
this.sendLocalConnection_engine.send(this.sendNameConnection_engine, "sendScore", userName);
};
reciveLocalConnection_skin.errorInputActin = function () {
this=this.parent;//parameter overwritten
this.parent;
};
reciveLocalConnection_skin.continueAction = function () {
this=this.parent;//parameter overwritten
this.parent;
this.continueActionFoo();
};
reciveLocalConnection_skin.connect(recivedNameConnection_skin);
sendLocalConnection_skin = new LocalConnection();
sendLocalConnection_skin.parent = this;
sendLocalConnection_skin.allowInsecureDomain = checkDomain;
sendLocalConnection_skin.allowDomain = checkDomain;
sendLocalConnection_skin.onStatus = function (infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Connections 'Send To Skin'";
this.errorActionFoo();
}
};
}
function iniLocalConnectionsEngine() {
reciveLocalConnection_engine = new LocalConnection();
reciveLocalConnection_engine.allowDomain = checkDomain;
reciveLocalConnection_engine.allowInsecureDomain = checkDomain;
reciveLocalConnection_engine.onStatus = function (infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Connections 'Recive From Engine'";
this.errorActionFoo();
}
};
reciveLocalConnection_engine.parent = this;
reciveLocalConnection_engine.engineOk = function () {
this=this.parent;//parameter overwritten
this.parent;
this.sendLocalConnection_engine.send(this.sendNameConnection_engine, com.gamezhero.api.as2.GamezheroGlobal.toText([105, 110, 105, 69, 110, 103, 105, 110, 101]), this.skin);
this.infoText.text = "Engine Connections...";
};
reciveLocalConnection_engine.engineError = function () {
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Engine...";
};
reciveLocalConnection_engine.submitActionDone = function (obj) {
this=this.parent;//parameter overwritten
this.parent;
this.sendScore(obj);
};
reciveLocalConnection_engine.engineActivated = function () {
this=this.parent;//parameter overwritten
this.parent;
this.iniSkin();
};
reciveLocalConnection_engine.connect(recivedNameConnection_engine);
sendLocalConnection_engine = new LocalConnection();
sendLocalConnection_engine.parent = this;
sendLocalConnection_engine.allowDomain = checkDomain;
sendLocalConnection_engine.allowInsecureDomain = checkDomain;
sendLocalConnection_engine.onStatus = function (infoObject) {
switch (infoObject.level) {
case "status" :
break;
case "error" :
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Connections 'Send To Engine'";
this.errorActionFoo();
}
};
}
function sendScore(obj) {
_loader = new LoadVars();
_loader_url = obj.url;
for (var _local3 in obj.vars) {
_loader[_local3] = obj.vars[_local3];
}
sendScoreAction();
}
function sendScoreAction() {
if (parent != undefined) {
this=parent;//parameter overwritten
parent;
}
if (_loader_url != "null") {
_loader.send(_loader_url, "_blank", "POST");
_loader_url = "null";
_loader = new LoadVars();
submitActionFoo();
}
}
function toText(arr) {
var _local3 = "";
var _local1 = 0;
while (_local1 < arr.length) {
_local3 = _local3 + String.fromCharCode(arr[_local1]);
_local1++;
}
return(_local3);
}
function checkDomain(sendingDomain) {
if (sendingDomain == com.gamezhero.api.as2.GamezheroGlobal.toText([102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109])) {
return(true);
}
return(false);
}
function continueActionFoo() {
continueAction.call(null);
skin_mc.removeMovieClip();
infoText.removeTextField();
_indicator.remove();
clearEvents();
}
function submitActionFoo() {
submitAction.call(null);
skin_mc.removeMovieClip();
infoText.removeTextField();
_indicator.remove();
clearEvents();
}
function errorActionFoo() {
errorAction.call(null);
skin_mc.removeMovieClip();
infoText.removeTextField();
_indicator.remove();
clearEvents();
}
function iniSkin() {
skin_mc._x = x_pos;
skin_mc._y = y_pos;
infoText.removeTextField();
_indicator.remove();
trace("iniSkin");
sendLocalConnection_skin.send(sendNameConnection_skin, com.gamezhero.api.as2.GamezheroGlobal.toText([105, 110, 105, 83, 107, 105, 110]), skin);
}
function loadEngine() {
infoText.text = "Loading Engine...";
var _local5 = toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 101, 110, 103, 105, 110, 101, 47, 101, 110, 103, 105, 110, 101, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + gamezheroCode_engine;
var _local4 = goal.getNextHighestDepth();
goal.createEmptyMovieClip("engine_mc", _local4);
engine_mc = goal.engine_mc;
var _local2 = new Object();
_local2.parent = this;
_local2.onLoadInit = function () {
this=this.parent;//parameter overwritten
this.parent;
this.sendLocalConnection_engine.send(this.sendNameConnection_engine, com.gamezhero.api.as2.GamezheroGlobal.toText([101, 110, 103, 105, 110, 101, 73, 115, 79, 107]));
this.infoText.text = "Check Engine Connection...";
};
_local2.onLoadError = function () {
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Loading Engine...";
this.errorActionFoo();
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip(_local5, engine_mc);
}
function loadSkin() {
infoText.text = "Loading Skin...";
var _local5 = toText([104, 116, 116, 112, 58, 47, 47, 102, 105, 108, 101, 115, 46, 103, 97, 109, 101, 122, 104, 101, 114, 111, 46, 99, 111, 109, 47, 115, 99, 111, 114, 101, 47, 115, 107, 105, 110, 47, 115, 107, 105, 110, 95, 118, 49, 46, 115, 119, 102, 63, 103, 97, 109, 101, 122, 104, 101, 114, 111, 67, 111, 100, 101, 61]) + gamezheroCode_skin;
var _local4 = goal.getNextHighestDepth();
goal.createEmptyMovieClip("skin_mc", _local4);
skin_mc = goal.skin_mc;
var _local2 = new Object();
_local2.parent = this;
_local2.onLoadInit = function (target) {
this=this.parent;//parameter overwritten
this.parent;
this.sendLocalConnection_skin.send(this.sendNameConnection_skin, com.gamezhero.api.as2.GamezheroGlobal.toText([115, 107, 105, 110, 73, 115, 79, 107]));
this.infoText.text = "Check Skin Connection... ";
};
_local2.onLoadError = function () {
this=this.parent;//parameter overwritten
this.parent;
this.infoText.text = "Error Loading Skin...";
this.errorActionFoo();
};
var _local3 = new MovieClipLoader();
_local3.addListener(_local2);
_local3.loadClip(_local5, skin_mc);
}
function iniSubmitArea(g, x_, y_, score_, skin_) {
goal = g;
x_pos = x_;
y_pos = y_;
score_value = Math.abs(Math.round(score_));
skin = skin_;
skin.score = score_value;
skin.gameName = com.gamezhero.api.as2.GamezheroGlobal.getGameName();
skin.gameCode = com.gamezhero.api.as2.GamezheroGlobal.getGameCode();
skin.domain = com.gamezhero.api.as2.GamezheroGlobal.getDomain();
_indicator = new com.gamezhero.api.as2.gui.Indicator(goal);
_indicator.setSize(50, 50);
_indicator.setPos(30, 30);
infoText = createInfoText();
loadSkin();
}
function createInfoText() {
var _local4 = goal.getNextHighestDepth();
goal.createTextField("infoText_txt", _local4, 0, 0, 100, 100);
var _local2 = goal.infoText_txt;
_local2.autoSize = "left";
var _local3 = new TextFormat();
_local3.color = 16777215 /* 0xFFFFFF */;
_local3.size = 11;
_local3.font = "arial";
_local2.setNewTextFormat(_local3);
_local2._x = 10;
_local2._y = 10;
_local2._visible = false;
return(_local2);
}
var versionGame = "2.0";
var score_value = 0;
var x_pos = 0;
var y_pos = 0;
var _obj_listener_mouse = new Object();
var _loader_url = "null";
}
Symbol 399 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 400 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 401 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 402 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 403 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 404 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 166 MovieClip Frame 130
_parent.gotoAndPlay(4);
Symbol 190 MovieClip Frame 1
stop();
Symbol 190 MovieClip Frame 2
stop();
Symbol 195 MovieClip Frame 1
stop();
Symbol 195 MovieClip Frame 2
stop();
Symbol 200 MovieClip Frame 1
stop();
Symbol 200 MovieClip Frame 2
stop();
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 1
stop();
Symbol 236 MovieClip Frame 2
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 2
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 271 MovieClip Frame 2
stop();
Symbol 277 MovieClip Frame 1
stop();
Symbol 277 MovieClip Frame 2
stop();
Symbol 282 MovieClip Frame 1
stop();
Symbol 282 MovieClip Frame 2
stop();
Symbol 287 MovieClip Frame 1
stop();
Symbol 287 MovieClip Frame 2
stop();
Symbol 294 MovieClip Frame 1
stop();
Symbol 294 MovieClip Frame 2
stop();
Symbol 295 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 1
stop();
Symbol 316 MovieClip Frame 10
stop();
Symbol 316 MovieClip Frame 20
stop();
Symbol 316 MovieClip Frame 30
stop();
Symbol 316 MovieClip Frame 40
stop();
Symbol 316 MovieClip Frame 51
gotoAndStop (2);
Symbol 325 MovieClip Frame 1
stop();
Symbol 325 MovieClip Frame 2
stop();
Symbol 325 MovieClip Frame 3
stop();
Symbol 325 MovieClip Frame 4
stop();
Symbol 325 MovieClip Frame 5
stop();
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 14
stop();
gotoAndStop (1);
Symbol 358 MovieClip Frame 34
stop();
gotoAndStop (1);
Symbol 377 MovieClip Frame 1
stop();
Symbol 377 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 2
stop();
Symbol 386 MovieClip Frame 21
stop();