Combined Code
movieClip 25 PreloaderBtn {
}
movieClip 34 PreLoader {
}
movieClip 36 PreLoaderFlap {
}
movieClip 37 ScoresHandler {
#initclip
Object.registerClass('ScoresHandler', ScoresHandler);
#endinitclip
}
movieClip 38 GimmeScore {
#initclip
Object.registerClass('GimmeScore', GimmeScore);
#endinitclip
}
movieClip 49 GoContinue {
}
movieClip 50 EndScoresButton {
#initclip
Object.registerClass('EndScoresButton', EndScoresButton);
#endinitclip
}
movieClip 53 preloaderLogo {
}
movieClip 54 GameHandler {
#initclip
Object.registerClass('GameHandler', GameHandler);
#endinitclip
}
movieClip 57 playButton2 {
}
movieClip 61 {
}
movieClip 64 {
}
// unknown tag 88 length 115
movieClip 70 movLoader {
}
movieClip 72 BlackBg {
}
movieClip 78 {
}
movieClip 79 {
}
// unknown tag 88 length 96
// unknown tag 88 length 96
movieClip 87 {
}
movieClip 90 {
}
movieClip 93 {
}
// unknown tag 88 length 96
// unknown tag 88 length 96
movieClip 100 {
}
// unknown tag 88 length 96
movieClip 102 {
}
movieClip 103 {
}
movieClip 105 {
}
movieClip 108 {
}
// unknown tag 88 length 96
// unknown tag 88 length 493
// unknown tag 88 length 493
movieClip 114 {
}
movieClip 116 {
}
movieClip 117 ZattikkaHiScores {
#initclip
Object.registerClass('ZattikkaHiScores', ZattikkaHiScores);
#endinitclip
}
frame 1 {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = '__mochibot__';
mbc = 'mochibot.com';
g = _global ? _global : _level0._root;
if (g[mb + swfid]) {
return g[mb + swfid];
}
s = System.security;
x = mc._root.getSWFVersion;
fv = x ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == 'localWithFile') {
return null;
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = (fv == 5) ? /:$version : System.capabilities.version;
u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : '');
lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv);
g[mb + 'level'] = lv;
if (fv == 5) {
res = '_level' + lv;
if (!eval(res)) {
loadMovieNum(u, lv);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
__com_mochibot__('9b492227', this, 10301, true);
}
movieClip 480 __Packages.GimmeScore {
#initclip
if (!_global.GimmeScore) {
var v1 = function () {
super();
};
_global.GimmeScore = v1;
_global.GimmeScore extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 240;
};
ASSetPropFlags(_global.GimmeScore.prototype, null, 1);
}
#endinitclip
}
movieClip 481 __Packages.EndScoresButton {
#initclip
if (!_global.EndScoresButton) {
var v1 = function () {
super();
};
_global.EndScoresButton = v1;
_global.EndScoresButton extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 450;
this.active = true;
};
v2.onEnterFrame = function () {
_root.endScoresButton.endScoresBtn.onPress = function () {
_root.gameHandler.scoresDone = true;
};
};
ASSetPropFlags(_global.EndScoresButton.prototype, null, 1);
}
#endinitclip
}
movieClip 482 __Packages.GameHandler {
#initclip
if (!_global.GameHandler) {
var v1 = function () {
super();
};
_global.GameHandler = v1;
_global.GameHandler extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
_root.attachMovie('MainMenu', 'mainMenu', _root.getNextHighestDepth());
_root.backgroundMusic = new Sound();
_root.backgroundMusic.attachSound('good_game_music');
_root.mainMenuMusic = new Sound();
_root.mainMenuMusic.attachSound('long_march');
_root.mainMenuMusic.start(0, 1000);
this.woblyDone = false;
this.woblyFrame = 1;
this.score = 0;
this.scoresDone = false;
};
v2.onEnterFrame = function () {
Mouse.hide();
if (_root.mainMenu.fadeOutDone == true) {
this.startGame();
}
if (_root.game.active == false) {
this.endGame();
}
if (_root.gameOverMenu.fadeOutDone == true || this.scoresDone == true) {
this.endGameOver();
}
};
v2.endGame = function () {
_root.game.removeMovieClip();
_root.backgroundMusic.stop();
_root.attachMovie('GameOverMenu', 'gameOverMenu', _root.getNextHighestDepth(), {'scoar': this.score});
};
v2.endGameOver = function () {
_root.goHighScore.removeMovieClip();
_root.endScoresButton.removeMovieClip();
_root.fadeOutRect.removeMovieClip();
_root.mouseImage.removeMovieClip();
_root.gameOverMenu.removeMovieClip();
this.scoresDone = false;
_root.attachMovie('MainMenu', 'mainMenu', _root.getNextHighestDepth());
_root.mainMenuMusic.start(0, 1000);
_root.mainMenuMusic.setVolume(100);
};
v2.startGame = function () {
_root.fadeOutRect.removeMovieClip();
_root.mainMenu.removeMovieClip();
_root.mouseImage.removeMovieClip();
_root.attachMovie('Game', 'game', _root.getNextHighestDepth());
_root.mainMenuMusic.stop();
_root.backgroundMusic.start(0, 1000);
};
ASSetPropFlags(_global.GameHandler.prototype, null, 1);
}
#endinitclip
}
movieClip 483 __Packages.ScoresHandler {
#initclip
if (!_global.ScoresHandler) {
var v1 = function () {
super();
};
_global.ScoresHandler = v1;
_global.ScoresHandler extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {};
ASSetPropFlags(_global.ScoresHandler.prototype, null, 1);
}
#endinitclip
}
movieClip 484 __Packages.PowerBarFrame {
#initclip
if (!_global.PowerBarFrame) {
var v1 = function () {
super();
};
_global.PowerBarFrame = v1;
_global.PowerBarFrame extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 30;
};
ASSetPropFlags(_global.PowerBarFrame.prototype, null, 1);
}
#endinitclip
}
movieClip 485 __Packages.XpBar {
#initclip
if (!_global.XpBar) {
var v1 = function () {
super();
};
_global.XpBar = v1;
_global.XpBar extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 10;
this._xscale = 0;
this.xp = 0;
this.xpToLevel = 100;
this.level = 0;
};
v2.onEnterFrame = function () {
this.handleBarSize();
};
v2.handleBarSize = function () {
var v2 = this.xp / this.xpToLevel;
this._xscale = v2 * 100;
if (this._xscale >= 100) {
this.levelUp();
}
};
v2.levelUp = function () {
if (this.level < 9) {
_root.ui.clickPad.removeMovieClip();
this.xp = 0;
this.xpToLevel *= 1.5;
_root.ui.shopMenu.pointLeft = true;
_root.ui.shopMenu.active = true;
this._xscale = 0;
++this.level;
} else {
if (this.level > 8) {
this.xp = 0;
this.xpToLevel *= 1.5;
this._xscale = 0;
++this.level;
_root.ui.highScore.score += 5000;
}
}
};
ASSetPropFlags(_global.XpBar.prototype, null, 1);
}
#endinitclip
}
movieClip 486 __Packages.XpBarFrame {
#initclip
if (!_global.XpBarFrame) {
var v1 = function () {
super();
};
_global.XpBarFrame = v1;
_global.XpBarFrame extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 10;
};
ASSetPropFlags(_global.XpBarFrame.prototype, null, 1);
}
#endinitclip
}
movieClip 487 __Packages.ClickPad {
#initclip
if (!_global.ClickPad) {
var v1 = function () {
super();
};
_global.ClickPad = v1;
_global.ClickPad extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 0;
this._y = 0;
this._alpha = 0;
this.buttonDown = false;
};
v2.onEnterFrame = function () {
if (_root.game.paused == true) {
this.active = false;
} else {
this.active = true;
}
if (this.active) {
this.onPress = function () {
this.buttonDown = true;
};
this.onRelease = function () {
this.buttonDown = false;
};
if (this.buttonDown) {
_root.game.shotPower -= 2;
if (_root.game.shotPower <= 0) {
_root.game.shotPower = 0;
}
_root.ga.tool1.fire = true;
_root.ga.tool2.fire = true;
_root.ga.tool3.fire = true;
_root.ga.tool4.fire = true;
} else {
_root.game.shotPower += 2;
if (_root.game.shotPower > 100) {
_root.game.shotPower = 100;
}
_root.ga.tool1.fire = false;
_root.ga.tool2.fire = false;
_root.ga.tool3.fire = false;
_root.ga.tool4.fire = false;
}
}
};
ASSetPropFlags(_global.ClickPad.prototype, null, 1);
}
#endinitclip
}
movieClip 488 __Packages.GameOverMenu {
#initclip
if (!_global.GameOverMenu) {
var v1 = function () {
super();
};
_global.GameOverMenu = v1;
_global.GameOverMenu extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.active = true;
this.fadeInDone = false;
this.fadeOutDone = false;
this.fadeOut = false;
_root.attachMovie('HighScore', 'goHighScore', _root.getNextHighestDepth(), {'_x': 320, '_y': 290, 'score': this.scoar});
_root.attachMovie('MouseImage', 'mouseImage', _root.getNextHighestDepth());
_root.attachMovie('FadeOutRect', 'fadeOutRect', _root.getNextHighestDepth(), {'activating': false, 'deactivating': false, '_alpha': 100});
};
v2.onEnterFrame = function () {
if (this.active) {
this.handleClicks();
}
if (this.fadeOut) {
this.handleFadeOut();
}
if (!this.fadeInDone) {
this.handleFadeIn();
}
};
v2.handleClicks = function () {
_root.gameOverMenu.goCon.onPress = function () {
this.active = false;
_root.gameOverMenu.fadeOut = true;
};
_root.gameOverMenu.goSub.onPress = function () {
_root.goHighScore.removeMovieClip();
_root.mouseImage.removeMovieClip();
_root.gameOverMenu.removeMovieClip();
_root.fadeOutRect.removeMovieClip();
_root.attachMovie('EndScoresButton', 'endScoresButton', _root.getNextHighestDepth());
_root.attachMovie('MouseImage', 'mouseImage', _root.getNextHighestDepth());
_root.hiScores.setDetails(226, 0, 'planetary', 'z8PYepBKfWmhD36', false, _root.gameHandler.score, _root.gameHandler.score, 'points!');
};
_root.gameOverMenu.sponsoredButton.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
_root.gameOverMenu.goPmg.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
};
v2.handleFadeOut = function () {
_root.fadeOutRect.deactivating = false;
_root.fadeOutRect.activating = true;
if (_root.fadeOutRect._alpha > 99) {
this.fadeOutDone = true;
}
};
v2.handleFadeIn = function () {
_root.fadeOutRect.deactivating = true;
if (_root.fadeOutRect._alpha >= 0) {
this.fadeInDone = true;
}
};
ASSetPropFlags(_global.GameOverMenu.prototype, null, 1);
}
#endinitclip
}
movieClip 489 __Packages.Instructions {
#initclip
if (!_global.Instructions) {
var v1 = function () {
super();
};
_global.Instructions = v1;
_global.Instructions extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._alpha = 0;
this._x = 320;
this._y = 80;
this.frame = 1;
this.beginDone = false;
this.levelDone = false;
this.state = 0;
this.startDelay = 0;
this.textTimer = 0;
};
v2.onEnterFrame = function () {
this.gotoAndStop(this.frame);
if (this.state == 0) {
++this.startDelay;
if (this.startDelay >= 30) {
this.startDelay = 0;
this.state = 1;
}
}
if (this.state == 1) {
if (this._alpha < 99) {
this._alpha += 5;
}
if (this._alpha > 99) {
this.state = 2;
}
}
if (this.state == 2) {
++this.textTimer;
if (this.textTimer >= 90) {
this.textTimer = 0;
this.state = 3;
}
}
if (this.state == 3) {
if (this._alpha > 0) {
this._alpha -= 5;
}
if (this._alpha <= 0) {
++this.frame;
this.state = 1;
if (this.frame == 6) {
this.state = 4;
}
}
}
if (this.state == 4) {
this.removeMovieClip();
}
};
ASSetPropFlags(_global.Instructions.prototype, null, 1);
}
#endinitclip
}
movieClip 490 __Packages.Indicator {
#initclip
if (!_global.Indicator) {
var v1 = function () {
super();
};
_global.Indicator = v1;
_global.Indicator extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.state = 1;
};
v2.onEnterFrame = function () {
if (this.state > 4) {
this.state = 4;
}
this.gotoAndStop(this.state);
};
ASSetPropFlags(_global.Indicator.prototype, null, 1);
}
#endinitclip
}
movieClip 491 __Packages.Tool {
#initclip
if (!_global.Tool) {
var v1 = function () {
super();
};
_global.Tool = v1;
_global.Tool extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.centerx = 320;
this.centery = 240;
this.hypotenuse = 80;
this.xmov = 0;
this.ymov = 0;
this.radAngle = 0;
this.empTimer = 0;
this.buttonPressed = false;
this.fire = false;
this.orgNumber = this.number;
this.rotationSpeed = 4;
this.empDelay = 5;
this.weaponGrade = 1;
this.powerGrade = 8;
if (this.type == 1) {
this.name = 'a';
}
if (this.type == 2) {
this.name = 'b';
}
this.currentEmp = 0;
this.emps = [];
this.loadEmps();
};
v2.loadEmps = function () {
var v3 = 0;
while (v3 < 100) {
var v4 = _root.ga.attachMovie('Emp', 'emp' + v3 + this.name, _root.ga.getNextHighestDepth(), {'active': false, 'frame': 1});
this.emps.push(v4);
++v3;
}
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (this.type == 1) {
this.handleChassis();
} else {
this.gotoAndStop(this.frame);
}
this.handleMovement();
if (this.angle >= 360) {
this.angle -= 360;
} else {
if (this.angle < 0) {
this.angle += 360;
}
}
this._rotation = this.angle;
this.toRadians();
this.getPosition();
if (this.active) {
this._alpha = 100;
++this.number;
if (this.number == this.orgNumber + 500) {
this.number = this.orgNumber;
}
if (this.empTimer == 0) {
if (this.fire) {
this.handleFire();
}
}
if (this.empTimer > 0) {
--this.empTimer;
}
} else {
this._alpha = 0;
}
}
};
v2.handleChassis = function () {
if (this.weaponGrade == 1) {
this.gotoAndStop(3);
} else {
if (this.weaponGrade == 2) {
this.gotoAndStop(4);
} else {
if (this.weaponGrade == 3) {
this.gotoAndStop(5);
} else {
if (this.weaponGrade == 4) {
this.gotoAndStop(6);
}
}
}
}
};
v2.activate = function () {
this.active = true;
if (this.type == 3) {
this.angle = _root.ga.tool1.angle + 180;
}
if (this.type == 2) {
this.angle = _root.ga.tool1.angle + 90;
}
if (this.type == 4) {
this.angle = _root.ga.tool1.angle + 270;
}
if (this.angle >= 360) {
this.angle -= 360;
}
this._rotation = this.angle;
this.toRadians();
this.getPosition();
};
v2.toRadians = function () {
this.radAngle = this.angle * Math.PI / 180;
};
v2.getPosition = function () {
if (this.angle >= 0 && this.angle < 90) {
this.xmov = Math.sin(this.radAngle) * this.hypotenuse;
this.ymov = Math.cos(this.radAngle) * this.hypotenuse;
this._x = this.centerx + this.xmov;
this._y = this.centery - this.ymov;
} else {
if (this.angle >= 90 && this.angle < 180) {
this.xmov = Math.cos(this.radAngle - 1.570796326794897) * this.hypotenuse;
this.ymov = Math.sin(this.radAngle - 1.570796326794897) * this.hypotenuse;
this._x = this.centerx + this.xmov;
this._y = this.centery + this.ymov;
} else {
if (this.angle >= 180 && this.angle < 270) {
this.xmov = Math.sin(this.radAngle - Math.PI) * this.hypotenuse;
this.ymov = Math.cos(this.radAngle - Math.PI) * this.hypotenuse;
this._x = this.centerx - this.xmov;
this._y = this.centery + this.ymov;
} else {
if (this.angle >= 270 && this.angle < 360) {
this.xmov = Math.cos(this.radAngle - 4.71238898038469) * this.hypotenuse;
this.ymov = Math.sin(this.radAngle - 4.71238898038469) * this.hypotenuse;
this._x = this.centerx - this.xmov;
this._y = this.centery - this.ymov;
}
}
}
}
};
v2.handleMovement = function () {};
v2.handleFire = function () {
this.empTimer = this.empDelay;
if (_root.game.shotPower <= 0) {
this.empTimer = 12;
}
if (this.weaponGrade == 1) {
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].frame = 1;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
}
if (this.weaponGrade > 1) {
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle;
this.emps[this.currentEmp].frame = 2;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
}
if (this.weaponGrade == 3) {
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle + 20;
this.emps[this.currentEmp].frame = 1;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle - 20;
this.emps[this.currentEmp].frame = 1;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
}
if (this.weaponGrade == 4) {
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle + 20;
this.emps[this.currentEmp].frame = 3;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
this.emps[this.currentEmp].toolx = this._x;
this.emps[this.currentEmp].tooly = this._y;
this.emps[this.currentEmp].angle = this.angle - 20;
this.emps[this.currentEmp].frame = 3;
this.emps[this.currentEmp].active = true;
this.emps[this.currentEmp].activate();
++this.currentEmp;
if (this.currentEmp >= 99) {
this.currentEmp = 0;
}
}
};
v2.getBulletPositions = function () {};
ASSetPropFlags(_global.Tool.prototype, null, 1);
}
#endinitclip
}
movieClip 492 __Packages.Emp {
#initclip
if (!_global.Emp) {
var v1 = function () {
super();
};
_global.Emp = v1;
_global.Emp extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.frame = 1;
this.velocity = 8;
this.toRadians();
this.getSector();
this.getVectors();
this.getStartPos();
this._rotation = this.angle;
this.distance = 0;
this.active = false;
};
v2.activate = function () {
this.toRadians();
this.getSector();
this.getVectors();
this.getStartPos();
this._rotation = this.angle;
this.distance = 0;
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
this.gotoAndStop(this.frame);
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.distance += this.velocity;
this.testCollision();
this.handleMovement();
if (this._x > 640 || this._x < 0) {
this.active = false;
}
if (this._y > 480 || this._y < 0) {
this.active = false;
}
}
}
};
v2.testCollision = function () {
for (var v3 in _root.game.enemies) {
if (_root.game.enemies[v3].active == true) {
if (this.hitTest(_root.game.enemies[v3])) {
if (this.frame == 1) {
_root.game.enemies[v3].health -= 50;
} else {
if (this.frame == 2 || this.frame == 3) {
_root.game.enemies[v3].health -= 100;
}
}
_root.game.enemies[v3].hit = true;
if (_root.game.enemies[v3].health <= 0) {
_root.ui.highScore.score += 15;
_root.game.enemies[v3].alive = false;
}
this.active = false;
this._alpha = 0;
}
}
}
for (v3 in _root.game.mediums) {
if (_root.game.mediums[v3].active == true) {
if (this.hitTest(_root.game.mediums[v3])) {
if (this.frame == 1) {
_root.game.mediums[v3].health -= 50;
} else {
if (this.frame == 2 || this.frame == 3) {
_root.game.mediums[v3].health -= 100;
}
}
_root.game.mediums[v3].hit = true;
if (_root.game.mediums[v3].health <= 0) {
_root.ui.highScore.score += 45;
_root.game.mediums[v3].alive = false;
}
this.active = false;
this._alpha = 0;
}
}
}
for (v3 in _root.game.larges) {
if (_root.game.larges[v3].active == true) {
if (this.hitTest(_root.game.larges[v3])) {
if (this.frame == 1) {
_root.game.larges[v3].health -= 50;
} else {
if (this.frame == 2 || this.frame == 3) {
_root.game.larges[v3].health -= 100;
}
}
_root.game.larges[v3].hit = true;
if (_root.game.larges[v3].health <= 0) {
_root.ui.highScore.score += 110;
_root.game.larges[v3].alive = false;
}
this.active = false;
this._alpha = 0;
}
}
}
for (v3 in _root.game.mothers) {
if (_root.game.mothers[v3].active == true) {
if (this.hitTest(_root.game.mothers[v3])) {
if (this.frame == 1) {
_root.game.mothers[v3].health -= 50;
} else {
if (this.frame == 2 || this.frame == 3) {
_root.game.mothers[v3].health -= 100;
}
}
_root.game.mothers[v3].hit = true;
if (_root.game.mothers[v3].health <= 0) {
_root.ui.highScore.score += 250;
_root.game.mothers[v3].alive = false;
}
this.active = false;
this._alpha = 0;
}
}
}
for (v3 in _root.game.xps) {
if (_root.game.xps[v3].active == true) {
if (this.hitTest(_root.game.xps[v3])) {
_root.game.xps[v3].handleCollision();
this.active = false;
this._alpha = 0;
}
}
}
};
v2.getStartPos = function () {
if (this.sector == 1) {
this._x = this.toolx + this.xvel * 2;
this._y = this.tooly - this.yvel * 2;
} else {
if (this.sector == 2) {
this._x = this.toolx + this.xvel * 2;
this._y = this.tooly + this.yvel * 2;
} else {
if (this.sector == 3) {
this._x = this.toolx - this.xvel * 2;
this._y = this.tooly + this.yvel * 2;
} else {
if (this.sector == 4) {
this._x = this.toolx - this.xvel * 2;
this._y = this.tooly - this.yvel * 2;
}
}
}
}
};
v2.handleMovement = function () {
if (this.sector == 1) {
this._x += this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 2) {
this._x += this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 3) {
this._x -= this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 4) {
this._x -= this.xvel;
this._y -= this.yvel;
}
}
}
}
};
v2.toRadians = function () {
this.radAngle = this.angle * Math.PI / 180;
};
v2.getSector = function () {
if (this.angle >= 0 && this.angle < 90) {
this.sector = 1;
} else {
if (this.angle >= 90 && this.angle < 180) {
this.sector = 2;
} else {
if (this.angle >= 180 && this.angle < 270) {
this.sector = 3;
} else {
if (this.angle >= 270 && this.angle < 360) {
this.sector = 4;
}
}
}
}
};
v2.getVectors = function () {
if (this.sector == 1) {
this.xvel = Math.sin(this.radAngle) * this.velocity;
this.yvel = Math.cos(this.radAngle) * this.velocity;
} else {
if (this.sector == 2) {
this.xvel = Math.cos(this.radAngle - 1.570796326794897) * this.velocity;
this.yvel = Math.sin(this.radAngle - 1.570796326794897) * this.velocity;
} else {
if (this.sector == 3) {
this.xvel = Math.sin(this.radAngle - Math.PI) * this.velocity;
this.yvel = Math.cos(this.radAngle - Math.PI) * this.velocity;
} else {
if (this.sector == 4) {
this.xvel = Math.cos(this.radAngle - 4.71238898038469) * this.velocity;
this.yvel = Math.sin(this.radAngle - 4.71238898038469) * this.velocity;
}
}
}
}
};
ASSetPropFlags(_global.Emp.prototype, null, 1);
}
#endinitclip
}
movieClip 493 __Packages.FadeOutRect {
#initclip
if (!_global.FadeOutRect) {
var v1 = function () {
super();
};
_global.FadeOutRect = v1;
_global.FadeOutRect extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 0;
this._y = 0;
};
v2.onEnterFrame = function () {
if (this.deactivating) {
if (this._alpha > 0) {
this._alpha -= 3;
} else {
this.deactivating = false;
}
} else {
if (this.activating) {
if (this._alpha < 100) {
this._alpha += 3;
} else {
this.activating = false;
}
}
}
};
ASSetPropFlags(_global.FadeOutRect.prototype, null, 1);
}
#endinitclip
}
movieClip 494 __Packages.Game {
#initclip
if (!_global.Game) {
var v1 = function () {
super();
};
_global.Game = v1;
_global.Game extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
_root.attachMovie('Empty', 'bg', _root.getNextHighestDepth());
_root.bg.attachMovie('Background', 'background', _root.bg.getNextHighestDepth());
_root.attachMovie('Empty', 'ga', _root.getNextHighestDepth());
_root.ga.attachMovie('HitBox', 'hitBox', _root.ga.getNextHighestDepth(), {'_x': 320, '_y': 240, '_alpha': 0});
_root.ga.attachMovie('Heart', 'heart', _root.ga.getNextHighestDepth());
_root.ga.attachMovie('GreyM', 'greyM', _root.ga.getNextHighestDepth());
_root.ga.attachMovie('Tool', 'tool1', _root.ga.getNextHighestDepth(), {'_x': 240, '_y': 170, 'angle': 0, 'number': 0, 'active': true, 'type': 1, 'frame': 1});
_root.ga.attachMovie('Tool', 'tool2', _root.ga.getNextHighestDepth(), {'_x': 240, '_y': 320, 'angle': 180, 'number': 100, 'active': true, 'type': 2, 'frame': 2});
_root.attachMovie('Empty', 'ui', _root.getNextHighestDepth());
_root.ui.attachMovie('HighScore', 'highScore', _root.ui.getNextHighestDepth(), {'_x': 320, '_y': 450, 'score': 0});
_root.ui.attachMovie('PowerBarFrame', 'powerBarFrame', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('PowerBar', 'powerBar', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('XpBarFrame', 'xpBarFrame', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('XpBar', 'xpBar', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('ShopMenu', 'shopMenu', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('Instructions', 'instructions', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('ClickPad', 'clickPad', _root.ui.getNextHighestDepth());
_root.ui.attachMovie('FadeOutRect', 'fadeOutRect', _root.ui.getNextHighestDepth(), {'activating': false, 'deactivating': true, '_alpha': 100});
_root.attachMovie('Empty', 'buttonLayer', _root.getNextHighestDepth());
_root.buttonLayer.attachMovie('butMoreGames', 'butmoreGames', _root.buttonLayer.getNextHighestDepth());
_root.buttonLayer.attachMovie('MouseImage', 'mouseImage', _root.buttonLayer.getNextHighestDepth());
_root.attachMovie('MouseHandler', 'mouseHandler', _root.getNextHighestDepth());
this.nanoTimer = 0;
this.mediumTimer = 0;
this.largeTimer = 0;
this.motherTimer = 0;
this.enemies = [];
this.mediums = [];
this.larges = [];
this.mothers = [];
this.xps = [];
this.enemyIndex = 0;
this.xpIndex = 0;
this.shotPower = 100;
this.nanoDelay = 160;
this.mediumDelay = 120;
this.largeDelay = 120;
this.motherDelay = 240;
this.loadNanos();
this.loadMediums();
this.loadLarges();
this.loadMothers();
this.loadXps();
this.paused = false;
this.level = 1;
this.levelTimer = 0;
this.enemyNumber = 0;
this.active = true;
};
v2.onEnterFrame = function () {
if (!this.paused) {
this.handleLevel();
this.getNano();
if (this.level > 2) {
this.getMedium();
}
if (this.level > 4) {
this.getLarge();
}
if (this.level > 6) {
this.getMother();
}
}
};
v2.loadNanos = function () {
var v3 = 0;
while (v3 < 30) {
var v4 = _root.ga.attachMovie('Nano', 'nano' + v3, _root.ga.getNextHighestDepth(), {'active': false});
this.enemies.push(v4);
++v3;
}
};
v2.loadMediums = function () {
var v3 = 0;
while (v3 < 20) {
var v4 = _root.ga.attachMovie('Medium', 'medium' + v3, _root.ga.getNextHighestDepth(), {'active': false});
this.mediums.push(v4);
++v3;
}
};
v2.loadLarges = function () {
var v3 = 0;
while (v3 < 20) {
var v4 = _root.ga.attachMovie('Large', 'large' + v3, _root.ga.getNextHighestDepth(), {'active': false});
this.larges.push(v4);
++v3;
}
};
v2.loadMothers = function () {
var v3 = 0;
while (v3 < 5) {
var v4 = _root.ga.attachMovie('MotherShip', 'motherShip' + v3, _root.ga.getNextHighestDepth(), {'active': false});
this.mothers.push(v4);
++v3;
}
};
v2.loadXps = function () {
var v3 = 0;
while (v3 < 20) {
var v4 = _root.ga.attachMovie('XpBonus', 'xpBonus' + v3, _root.ga.getNextHighestDepth(), {'active': false});
this.xps.push(v4);
++v3;
}
};
v2.getNano = function () {
++this.nanoTimer;
if (this.nanoTimer == this.nanoDelay) {
this.nanoTimer = 0;
if (this.nanoDelay > 10) {
--this.nanoDelay;
}
if (this.enemies[this.enemyNumber].active == false) {
var v2 = Math.floor(Math.random() * 340) + 10;
this.enemies[this.enemyNumber].degAngle = v2;
this.enemies[this.enemyNumber].reset();
this.enemies[this.enemyNumber].active = true;
++this.enemyNumber;
this.enemies[this.enemyNumber].degAngle = v2 + 15;
this.enemies[this.enemyNumber].reset();
this.enemies[this.enemyNumber].active = true;
++this.enemyNumber;
this.enemies[this.enemyNumber].degAngle = v2 - 15;
this.enemies[this.enemyNumber].reset();
this.enemies[this.enemyNumber].active = true;
++this.enemyNumber;
if (this.enemyNumber > 29) {
this.enemyNumber = 0;
}
}
}
};
v2.getMedium = function () {
++this.mediumTimer;
if (this.mediumTimer == this.mediumDelay) {
this.mediumTimer = 0;
if (this.mediumDelay > 10) {
--this.mediumDelay;
}
var v2 = Math.floor(Math.random() * 19) + 1;
if (this.mediums[v2].active == false) {
this.mediums[v2].active = true;
}
}
};
v2.getLarge = function () {
++this.largeTimer;
if (this.largeTimer == this.largeDelay) {
this.largeTimer = 0;
if (this.largeDelay > 10) {
--this.largeDelay;
}
var v2 = Math.floor(Math.random() * 19) + 1;
if (this.larges[v2].active == false) {
this.larges[v2].active = true;
}
}
};
v2.getMother = function () {
++this.motherTimer;
if (this.motherTimer == this.motherDelay) {
this.motherTimer = 0;
if (this.motherDelay > 10) {
--this.motherDelay;
}
var v2 = Math.floor(Math.random() * 19) + 1;
if (this.mothers[v2].active == false) {
this.mothers[v2].active = true;
}
}
};
v2.handleTools = function () {
if (Key.isDown(65)) {
this.shotPower -= 4;
if (this.shotPower <= 0) {
this.shotPower = 0;
}
_root.ga.tool1.fire = true;
_root.ga.tool2.fire = true;
_root.ga.tool3.fire = true;
_root.ga.tool4.fire = true;
} else {
this.shotPower += 2;
if (this.shotPower > 100) {
this.shotPower = 100;
}
_root.ga.tool1.fire = false;
_root.ga.tool2.fire = false;
_root.ga.tool3.fire = false;
_root.ga.tool4.fire = false;
}
};
v2.handleLevel = function () {
++this.levelTimer;
if (this.levelTimer > 900) {
++this.level;
this.levelTimer = 0;
}
};
v2.destroyAll = function () {
_root.gameHandler.score = _root.ui.highScore.score;
var v3 = 0;
while (v3 < 30) {
_root.game.enemies[v3].removeMovieClip();
++v3;
}
v3 = 0;
while (v3 < 20) {
_root.game.mediums[v3].removeMovieClip();
++v3;
}
v3 = 0;
while (v3 < 20) {
_root.game.larges[v3].removeMovieClip();
++v3;
}
v3 = 0;
while (v3 < 5) {
_root.game.mothers[v3].removeMovieClip();
++v3;
}
v3 = 0;
while (v3 < 20) {
_root.game.xps[v3].removeMovieClip();
++v3;
}
_root.bg.background.removeMovieClip();
_root.bg.removeMovieClip();
_root.ga.hitBox.removeMovieClip();
_root.ga.heart.removeMovieClip();
_root.ga.greyM.removeMovieClip();
_root.ga.tool1.removeMovieClip();
_root.ga.tool2.removeMovieClip();
_root.ga.removeMovieClip();
_root.ui.highScore.removeMovieClip();
_root.ui.powerBarFrame.removeMovieClip();
_root.ui.powerBar.removeMovieClip();
_root.ui.xpBarFrame.removeMovieClip();
_root.ui.xpBar.removeMovieClip();
_root.uishopMenu.removeMovieClip();
_root.ui.instructions.removeMovieClip();
_root.ui.clickPad.removeMovieClip();
_root.ui.fadeOutRect.removeMovieClip();
_root.ui.removeMovieClip();
_root.buttonLayer.butmoreGames.removeMovieClip();
_root.buttonLayer.mouseImage.removeMovieClip();
_root.buttonLayer.removeMovieClip();
_root.mouseHandler.removeMovieClip();
this.active = false;
};
ASSetPropFlags(_global.Game.prototype, null, 1);
}
#endinitclip
}
movieClip 495 __Packages.GreyM {
#initclip
if (!_global.GreyM) {
var v1 = function () {
super();
};
_global.GreyM = v1;
_global.GreyM extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 240;
this._alpha = 0;
this.frame = 1;
this.done = false;
this.endTimer = 0;
this.beginEnd = false;
this.volumeLevel = 100;
};
v2.onEnterFrame = function () {
this.gotoAndStop(this.frame);
if (_root.game.paused == false) {
this._rotation += 0.1;
if (this._alpha > 99) {
if (this.done == false) {
this.explodeAll();
this.removeStuff();
}
this.explode();
}
}
if (this.beginEnd) {
++this.endTimer;
if (this.volumeLevel > 0) {
this.volumeLevel -= 2;
}
_root.backgroundMusic.setVolume(this.volumeLevel);
if (this.endTimer >= 50) {
_root.ui.fadeOutRect.removeMovieClip();
_root.game.destroyAll();
this.removeMovieClip();
}
}
};
v2.explode = function () {
++this.frame;
if (this.frame > 24) {
this._alpha = 0;
_root.ui.fadeOutRect.activating = true;
this.beginEnd = true;
}
};
v2.removeStuff = function () {
_root.ga.heart.removeMovieClip();
_root.hitBox.removeMovieClip();
_root.ga.tool1.removeMovieClip();
_root.ga.tool2.removeMovieClip();
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.ga.tool1._x, '_y': _root.ga.tool1._y});
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.ga.tool2._x, '_y': _root.ga.tool2._y});
this.done = true;
};
v2.explodeAll = function () {
var v2 = 0;
while (v2 < 30) {
if (_root.game.enemies[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.enemies[v2]._x, '_y': _root.game.enemies[v2]._y});
_root.game.enemies[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 20) {
if (_root.game.mediums[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.mediums[v2]._x, '_y': _root.game.mediums[v2]._y});
_root.game.mediums[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 20) {
if (_root.game.larges[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.larges[v2]._x, '_y': _root.game.larges[v2]._y});
_root.game.larges[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 5) {
if (_root.game.mothers[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.mothers[v2]._x, '_y': _root.game.mothers[v2]._y});
_root.game.mothers[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 20) {
if (_root.game.xps[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.xps[v2]._x, '_y': _root.game.xps[v2]._y});
_root.game.xps[v2].active = false;
}
++v2;
}
};
ASSetPropFlags(_global.GreyM.prototype, null, 1);
}
#endinitclip
}
movieClip 496 __Packages.Heart {
#initclip
if (!_global.Heart) {
var v1 = function () {
super();
};
_global.Heart = v1;
_global.Heart extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 240;
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
this.gotoAndStop(7);
this._rotation += 0.1;
}
};
ASSetPropFlags(_global.Heart.prototype, null, 1);
}
#endinitclip
}
movieClip 497 __Packages.HighScore {
#initclip
if (!_global.HighScore) {
var v1 = function () {
super();
};
_global.HighScore = v1;
_global.HighScore extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {};
v2.onEnterFrame = function () {
if (_root.game.active == true) {
_root.ui.highScore.scoreBox.text = this.score;
}
if (_root.gameOverMenu.active == true) {
_root.goHighScore.scoreBox.text = this.score;
}
};
ASSetPropFlags(_global.HighScore.prototype, null, 1);
}
#endinitclip
}
movieClip 498 __Packages.MainMenu {
#initclip
if (!_global.MainMenu) {
var v1 = function () {
super();
};
_global.MainMenu = v1;
_global.MainMenu extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.active = false;
this.fadeOutDone = false;
this.fadeOut = false;
this.fadeInDone = false;
_root.attachMovie('MouseImage', 'mouseImage', _root.getNextHighestDepth());
_root.attachMovie('FadeOutRect', 'fadeOutRect', _root.getNextHighestDepth(), {'activating': false, 'deactivating': false, '_alpha': 100});
if (_root.gameHandler.woblyDone == false) {
_root.attachMovie('WoblyWare', 'woblyWare', _root.getNextHighestDepth(), {'_x': 224, '_y': 172});
}
this.woblyFrame = 1;
};
v2.onEnterFrame = function () {
if (this.fadeInDone == true) {
this.active = true;
}
if (_root.gameHandler.woblyDone == false) {
this.handleWobly();
}
if (this.active) {
this.handleClicks();
}
if (this.fadeOut) {
this.handleFadeOut();
}
if (!this.fadeInDone) {
this.handleFadeIn();
}
};
v2.handleClicks = function () {
_root.mainMenu.startGameButton.onPress = function () {
if (_root.gameHandler.woblyDone == true) {
this.active = false;
_root.mainMenu.fadeOut = true;
}
};
_root.mainMenu.highscoresButton.onPress = function () {
this.getURL('http://www.gimme5games.com/index.jsp?id=planetary_hs', '_blank');
};
_root.mainMenu.pmgButton.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
_root.mainMenu.presentedButton.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
};
v2.handleFadeOut = function () {
_root.fadeOutRect.deactivating = false;
_root.fadeOutRect.activating = true;
if (_root.fadeOutRect._alpha > 99) {
this.fadeOutDone = true;
}
};
v2.handleFadeIn = function () {
if (_root.gameHandler.woblyDone == true) {
_root.fadeOutRect.deactivating = true;
if (_root.fadeOutRect._alpha >= 0) {
this.fadeInDone = true;
}
}
};
v2.handleWobly = function () {
_root.woblyWare.gotoAndStop(this.woblyFrame);
++this.woblyFrame;
if (this.woblyFrame >= 119) {
_root.woblyWare.removeMovieClip();
_root.gameHandler.woblyDone = true;
}
};
ASSetPropFlags(_global.MainMenu.prototype, null, 1);
}
#endinitclip
}
movieClip 499 __Packages.MouseHandler {
#initclip
if (!_global.MouseHandler) {
var v1 = function () {
super();
};
_global.MouseHandler = v1;
_global.MouseHandler extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
this.getMouseSector();
this.getXdif();
this.getYdif();
this.getAngle();
this.toDegrees();
this.getDifference();
this.getDistances();
this.moveTools();
};
v2.getMouseSector = function () {
if (_root._xmouse >= 320 && _root._ymouse < 240) {
this.mouseSector = 1;
} else {
if (_root._xmouse >= 320 && _root._ymouse >= 240) {
this.mouseSector = 2;
} else {
if (_root._xmouse < 320 && _root._ymouse >= 240) {
this.mouseSector = 3;
} else {
if (_root._xmouse < 320 && _root._ymouse < 240) {
this.mouseSector = 4;
}
}
}
}
};
v2.getXdif = function () {
if (_root._xmouse >= 320) {
this.xdif = _root._xmouse - 320;
} else {
if (_root._xmouse < 320) {
this.xdif = 320 - _root._xmouse;
}
}
};
v2.getYdif = function () {
if (_root._ymouse >= 240) {
this.ydif = _root._ymouse - 240;
} else {
if (_root._ymouse < 240) {
this.ydif = 240 - _root._ymouse;
}
}
};
v2.getAngle = function () {
if (this.mouseSector == 1) {
this.angle = Math.atan(this.xdif / this.ydif);
}
if (this.mouseSector == 2) {
this.angle = Math.atan(this.ydif / this.xdif) + 1.570796326794897;
}
if (this.mouseSector == 3) {
this.angle = Math.atan(this.xdif / this.ydif) + Math.PI;
}
if (this.mouseSector == 4) {
this.angle = Math.atan(this.ydif / this.xdif) + Math.PI + 1.570796326794897;
}
};
v2.toDegrees = function () {
this.degAngle = this.angle * 180 / Math.PI;
};
v2.getDifference = function () {
if (this.degAngle < _root.ga.tool1.angle) {
this.difference = _root.ga.tool1.angle - this.degAngle;
} else {
if (this.degAngle >= _root.ga.tool1.angle) {
this.difference = this.degAngle - _root.ga.tool1.angle;
}
}
};
v2.moveTools = function () {
if (this.leftDistance < this.rightDistance) {
if (this.difference >= _root.ga.tool1.rotationSpeed) {
_root.ga.tool1.angle -= _root.ga.tool1.rotationSpeed;
} else {
if (this.difference < _root.ga.tool1.rotationSpeed) {
_root.ga.tool1.angle = Math.floor(this.degAngle);
}
}
} else {
if (this.leftDistance > this.rightDistance) {
if (this.difference >= _root.ga.tool1.rotationSpeed) {
_root.ga.tool1.angle += _root.ga.tool1.rotationSpeed;
} else {
if (this.difference < _root.ga.tool1.rotationSpeed) {
_root.ga.tool1.angle = Math.floor(this.degAngle);
}
}
}
}
_root.ga.tool2.angle = _root.ga.tool1.angle + 180;
_root.ga.tool3.angle = _root.ga.tool1.angle + 90;
_root.ga.tool4.angle = _root.ga.tool1.angle + 270;
};
v2.getDistances = function () {
if (this.degAngle < _root.ga.tool1.angle) {
this.rightDistance = 360 - _root.ga.tool1.angle + this.degAngle;
this.leftDistance = _root.ga.tool1.angle - this.degAngle;
} else {
if (this.degAngle >= _root.ga.tool1.angle) {
this.rightDistance = this.degAngle - _root.ga.tool1.angle;
this.leftDistance = 360 - this.degAngle + _root.ga.tool1.angle;
}
}
};
ASSetPropFlags(_global.MouseHandler.prototype, null, 1);
}
#endinitclip
}
movieClip 500 __Packages.MouseImage {
#initclip
if (!_global.MouseImage) {
var v1 = function () {
super();
};
_global.MouseImage = v1;
_global.MouseImage extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.frame = 1;
};
v2.onEnterFrame = function () {
this._x = _root._xmouse;
this._y = _root._ymouse;
this.gotoAndStop(this.frame);
this.getFrame();
};
v2.getFrame = function () {
if (_root.ui.shopMenu.active == true) {
this.frame = 2;
} else {
if (_root.ui.shopMenu.active == false) {
this.frame = 1;
}
}
if (_root.mainMenu.active == true) {
this.frame = 2;
}
if (_root.gameOverMenu.active == true) {
this.frame = 2;
}
if (_root.endScoresButton.active == true) {
this.frame = 2;
}
};
ASSetPropFlags(_global.MouseImage.prototype, null, 1);
}
#endinitclip
}
movieClip 501 __Packages.Large {
#initclip
if (!_global.Large) {
var v1 = function () {
super();
};
_global.Large = v1;
_global.Large extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 1;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 1000;
this.hitTimer = 0;
this.hit = false;
};
v2.reset = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 1;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 1000;
this.hitTimer = 0;
this.hit = false;
this.transform.colorTransform = new flash.geom.ColorTransform();
};
v2.getVectors = function () {
if (this.sector == 1 || this.sector == 3) {
this.xvel = this.velocity * Math.sin(this.angle);
this.yvel = this.velocity * Math.cos(this.angle);
} else {
if (this.sector == 2 || this.sector == 4) {
this.xvel = this.velocity * Math.cos(this.angle);
this.yvel = this.velocity * Math.sin(this.angle);
}
}
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.handleMovement();
this.outOfBounds();
this.testCollision();
this.handleHit();
if (!this.alive) {
var v3 = Math.floor(Math.random() * 18);
if (_root.game.xps[v3].active == false) {
_root.game.xps[v3].xvel = this.xvel * -1;
_root.game.xps[v3].yvel = this.yvel * -1;
_root.game.xps[v3]._x = this._x;
_root.game.xps[v3]._y = this._y;
_root.game.xps[v3].active = true;
_root.game.xps[v3]._alpha = 100;
}
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.reset();
this.active = false;
}
}
}
};
v2.testCollision = function () {
if (this.hitTest(_root.ga.hitBox)) {
this.alive = false;
_root.ga.greyM._alpha += 10;
}
};
v2.outOfBounds = function () {
this.distance += this.velocity;
if (this.distance > 1000) {
this.reset();
this.active = false;
}
};
v2.randomizeAngle = function () {
this.degAngle = this.angle * 180 / Math.PI;
this.degAngle += Math.random() * 60 - 30;
this.angle = this.degAngle * Math.PI / 180;
};
v2.getAngle = function () {
if (this.sector == 1 || this.sector == 3) {
this.angle = Math.atan(this.xdif / this.ydif);
}
if (this.sector == 2 || this.sector == 4) {
this.angle = Math.atan(this.ydif / this.xdif);
}
};
v2.toDegrees = function () {
this.degAngle = this.angle * 180 / Math.PI;
};
v2.getRotation = function () {
if (this.sector == 1) {
this._rotation = this.degAngle;
} else {
if (this.sector == 2) {
this._rotation = this.degAngle + 90;
} else {
if (this.sector == 3) {
this._rotation = this.degAngle + 180;
} else {
if (this.sector == 4) {
this._rotation = this.degAngle + 270;
}
}
}
}
};
v2.getStartPos = function () {
this.type = Math.floor(Math.random() * 4) + 1;
if (this.type == 1) {
this._y = -36;
this._x = Math.floor(Math.random() * 639) + 1;
} else {
if (this.type == 2) {
this._x = 676;
this._y = Math.floor(Math.random() * 479) + 1;
} else {
if (this.type == 3) {
this._y = 516;
this._x = Math.floor(Math.random() * 639) + 1;
} else {
if (this.type == 4) {
this._x = -36;
this._y = Math.floor(Math.random() * 479) + 1;
}
}
}
}
};
v2.getSector = function () {
if (this._x >= 320 && this._y < 240) {
this.sector = 1;
} else {
if (this._x >= 320 && this._y >= 240) {
this.sector = 2;
} else {
if (this._x < 320 && this._y >= 240) {
this.sector = 3;
} else {
if (this._x < 320 && this._y < 240) {
this.sector = 4;
}
}
}
}
};
v2.getXdif = function () {
if (this._x >= 320) {
this.xdif = this._x - 320;
} else {
if (this._x < 320) {
this.xdif = 320 - this._x;
}
}
};
v2.getYdif = function () {
if (this._y >= 240) {
this.ydif = this._y - 240;
} else {
if (this._y < 240) {
this.ydif = 240 - this._y;
}
}
};
v2.handleMovement = function () {
if (this.sector == 1) {
this._x -= this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 2) {
this._x -= this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 3) {
this._x += this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 4) {
this._x += this.xvel;
this._y += this.yvel;
}
}
}
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
ASSetPropFlags(_global.Large.prototype, null, 1);
}
#endinitclip
}
movieClip 502 __Packages.Medium {
#initclip
if (!_global.Medium) {
var v1 = function () {
super();
};
_global.Medium = v1;
_global.Medium extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 4;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 150;
this.hitTimer = 0;
this.hit = false;
};
v2.reset = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 4;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 150;
this.hitTimer = 0;
this.hit = false;
this.transform.colorTransform = new flash.geom.ColorTransform();
};
v2.getVectors = function () {
if (this.sector == 1 || this.sector == 3) {
this.xvel = this.velocity * Math.sin(this.angle);
this.yvel = this.velocity * Math.cos(this.angle);
} else {
if (this.sector == 2 || this.sector == 4) {
this.xvel = this.velocity * Math.cos(this.angle);
this.yvel = this.velocity * Math.sin(this.angle);
}
}
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.handleMovement();
this.outOfBounds();
this.testCollision();
this.handleHit();
if (!this.alive) {
var v3 = Math.floor(Math.random() * 18);
if (_root.game.xps[v3].active == false) {
_root.game.xps[v3].xvel = this.xvel * -0.5;
_root.game.xps[v3].yvel = this.yvel * 0.5;
_root.game.xps[v3]._x = this._x;
_root.game.xps[v3]._y = this._y;
_root.game.xps[v3].active = true;
_root.game.xps[v3]._alpha = 100;
}
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.reset();
this.active = false;
}
}
}
};
v2.testCollision = function () {
if (this.hitTest(_root.ga.hitBox)) {
this.alive = false;
_root.ga.greyM._alpha += 10;
}
};
v2.outOfBounds = function () {
this.distance += this.velocity;
if (this.distance > 1000) {
this.reset();
this.active = false;
}
};
v2.randomizeAngle = function () {
this.degAngle = this.angle * 180 / Math.PI;
this.degAngle += Math.random() * 60 - 30;
this.angle = this.degAngle * Math.PI / 180;
};
v2.getAngle = function () {
if (this.sector == 1 || this.sector == 3) {
this.angle = Math.atan(this.xdif / this.ydif);
}
if (this.sector == 2 || this.sector == 4) {
this.angle = Math.atan(this.ydif / this.xdif);
}
};
v2.toDegrees = function () {
this.degAngle = this.angle * 180 / Math.PI;
};
v2.getRotation = function () {
if (this.sector == 1) {
this._rotation = this.degAngle;
} else {
if (this.sector == 2) {
this._rotation = this.degAngle + 90;
} else {
if (this.sector == 3) {
this._rotation = this.degAngle + 180;
} else {
if (this.sector == 4) {
this._rotation = this.degAngle + 270;
}
}
}
}
};
v2.getStartPos = function () {
this.type = Math.floor(Math.random() * 2) + 1;
if (this.type == 1) {
this._x = 676;
this._y = Math.floor(Math.random() * 479) + 1;
} else {
if (this.type == 2) {
this._x = -36;
this._y = Math.floor(Math.random() * 479) + 1;
}
}
};
v2.getSector = function () {
if (this._x >= 320 && this._y < 240) {
this.sector = 1;
} else {
if (this._x >= 320 && this._y >= 240) {
this.sector = 2;
} else {
if (this._x < 320 && this._y >= 240) {
this.sector = 3;
} else {
if (this._x < 320 && this._y < 240) {
this.sector = 4;
}
}
}
}
};
v2.getXdif = function () {
if (this._x >= 320) {
this.xdif = this._x - 320;
} else {
if (this._x < 320) {
this.xdif = 320 - this._x;
}
}
};
v2.getYdif = function () {
if (this._y >= 240) {
this.ydif = this._y - 240;
} else {
if (this._y < 240) {
this.ydif = 240 - this._y;
}
}
};
v2.handleMovement = function () {
if (this.sector == 1) {
this._x -= this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 2) {
this._x -= this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 3) {
this._x += this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 4) {
this._x += this.xvel;
this._y += this.yvel;
}
}
}
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
ASSetPropFlags(_global.Medium.prototype, null, 1);
}
#endinitclip
}
movieClip 503 __Packages.MotherShip {
#initclip
if (!_global.MotherShip) {
var v1 = function () {
super();
};
_global.MotherShip = v1;
_global.MotherShip extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 0.5;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 2000;
this.hitTimer = 0;
this.hit = false;
this.phase = 1;
};
v2.reset = function () {
this.getStartPos();
this.getSector();
this.getXdif();
this.getYdif();
this.velocity = 0.5;
this.distance = 0;
this.getAngle();
this.getVectors();
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 2000;
this.hitTimer = 0;
this.hit = false;
this.transform.colorTransform = new flash.geom.ColorTransform();
this.phase = 1;
};
v2.getVectors = function () {
if (this.sector == 1 || this.sector == 3) {
this.xvel = this.velocity * Math.sin(this.angle);
this.yvel = this.velocity * Math.cos(this.angle);
} else {
if (this.sector == 2 || this.sector == 4) {
this.xvel = this.velocity * Math.cos(this.angle);
this.yvel = this.velocity * Math.sin(this.angle);
}
}
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.handleMovement();
this.outOfBounds();
this.testCollision();
this.handleHit();
if (!this.alive) {
var v3 = Math.floor(Math.random() * 18);
if (_root.game.xps[v3].active == false) {
_root.game.xps[v3].xvel = this.xvel * -1;
_root.game.xps[v3].yvel = this.yvel * -1;
_root.game.xps[v3]._x = this._x;
_root.game.xps[v3]._y = this._y;
_root.game.xps[v3].active = true;
_root.game.xps[v3]._alpha = 100;
}
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.reset();
this.active = false;
}
}
}
};
v2.testCollision = function () {
if (this.hitTest(_root.ga.hitBox)) {
this.alive = false;
_root.ga.greyM._alpha += 10;
}
};
v2.outOfBounds = function () {
this.distance += this.velocity;
if (this.distance > 1000) {
this.reset();
this.active = false;
}
};
v2.randomizeAngle = function () {
this.degAngle = this.angle * 180 / Math.PI;
this.degAngle += Math.random() * 60 - 30;
this.angle = this.degAngle * Math.PI / 180;
};
v2.getAngle = function () {
if (this.sector == 1 || this.sector == 3) {
this.angle = Math.atan(this.xdif / this.ydif);
}
if (this.sector == 2 || this.sector == 4) {
this.angle = Math.atan(this.ydif / this.xdif);
}
};
v2.toDegrees = function () {
this.degAngle = this.angle * 180 / Math.PI;
};
v2.getRotation = function () {
if (this.sector == 1) {
this._rotation = this.degAngle;
} else {
if (this.sector == 2) {
this._rotation = this.degAngle + 90;
} else {
if (this.sector == 3) {
this._rotation = this.degAngle + 180;
} else {
if (this.sector == 4) {
this._rotation = this.degAngle + 270;
}
}
}
}
};
v2.getStartPos = function () {
this.type = Math.floor(Math.random() * 4) + 1;
if (this.type == 1) {
this._y = -36;
this._x = Math.floor(Math.random() * 639) + 1;
} else {
if (this.type == 2) {
this._x = 676;
this._y = Math.floor(Math.random() * 479) + 1;
} else {
if (this.type == 3) {
this._y = 516;
this._x = Math.floor(Math.random() * 639) + 1;
} else {
if (this.type == 4) {
this._x = -36;
this._y = Math.floor(Math.random() * 479) + 1;
}
}
}
}
};
v2.getSector = function () {
if (this._x >= 320 && this._y < 240) {
this.sector = 1;
} else {
if (this._x >= 320 && this._y >= 240) {
this.sector = 2;
} else {
if (this._x < 320 && this._y >= 240) {
this.sector = 3;
} else {
if (this._x < 320 && this._y < 240) {
this.sector = 4;
}
}
}
}
};
v2.getXdif = function () {
if (this._x >= 320) {
this.xdif = this._x - 320;
} else {
if (this._x < 320) {
this.xdif = 320 - this._x;
}
}
};
v2.getYdif = function () {
if (this._y >= 240) {
this.ydif = this._y - 240;
} else {
if (this._y < 240) {
this.ydif = 240 - this._y;
}
}
};
v2.handleMovement = function () {
if (this.sector == 1) {
this._x -= this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 2) {
this._x -= this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 3) {
this._x += this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 4) {
this._x += this.xvel;
this._y += this.yvel;
}
}
}
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
ASSetPropFlags(_global.MotherShip.prototype, null, 1);
}
#endinitclip
}
movieClip 504 __Packages.Nano {
#initclip
if (!_global.Nano) {
var v1 = function () {
super();
};
_global.Nano = v1;
_global.Nano extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.angle = 0;
this.degAngle = 0;
this.hypotenuse = 400;
this.getSector();
this.toRadians();
this.getStartPos();
this.getVectors();
this.velocity = 1;
this.distance = 0;
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 100;
this.hitTimer = 0;
this.hit = false;
};
v2.getSector = function () {
if (this.angle >= 0 && this.angle < 90) {
this.sector = 1;
} else {
if (this.angle >= 90 && this.angle < 180) {
this.sector = 2;
} else {
if (this.angle >= 180 && this.angle < 270) {
this.sector = 3;
} else {
if (this.angle >= 270 && this.angle < 360) {
this.sector = 4;
}
}
}
}
};
v2.getStartPos = function () {
if (this.sector == 1) {
this._x = this.hypotenuse * Math.sin(this.angle) + 320;
this._y = 240 - this.hypotenuse * Math.cos(this.angle);
} else {
if (this.sector == 2) {
this._x = this.hypotenuse * Math.cos(this.angle - 90) + 320;
this._y = this.hypotenuse * Math.sin(this.angle - 90) + 240;
} else {
if (this.sector == 3) {
this._x = 320 - this.hypotenuse * Math.sin(this.angle - 180);
this._y = this.hypotenuse * Math.cos(this.angle - 180) + 240;
} else {
if (this.sector == 4) {
this._x = 320 - this.hypotenuse * Math.cos(this.angle - 270);
this._y = 240 - this.hypotenuse * Math.sin(this.angle - 270);
}
}
}
}
};
v2.reset = function () {
this.getSector();
this.toRadians();
this.getStartPos();
this.getVectors();
this.velocity = 1;
this.distance = 0;
this.toDegrees();
this.getRotation();
this.alive = true;
this.active = false;
this.health = 100;
this.hitTimer = 0;
this.hit = false;
this.transform.colorTransform = new flash.geom.ColorTransform();
};
v2.getVectors = function () {
if (this.sector == 1 || this.sector == 3) {
this.xvel = this.velocity * Math.sin(this.angle);
this.yvel = this.velocity * Math.cos(this.angle);
} else {
if (this.sector == 2 || this.sector == 4) {
this.xvel = this.velocity * Math.cos(this.angle);
this.yvel = this.velocity * Math.sin(this.angle);
}
}
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.handleMovement();
this.outOfBounds();
this.testCollision();
this.handleHit();
if (!this.alive) {
var v3 = Math.floor(Math.random() * 18);
if (_root.game.xps[v3].active == false) {
_root.game.xps[v3].xvel = this.xvel * -1;
_root.game.xps[v3].yvel = this.yvel * -1;
_root.game.xps[v3]._x = this._x;
_root.game.xps[v3]._y = this._y;
_root.game.xps[v3].active = true;
_root.game.xps[v3]._alpha = 100;
}
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.reset();
this.active = false;
}
}
}
};
v2.testCollision = function () {
if (this.hitTest(_root.ga.hitBox)) {
this.alive = false;
_root.ga.greyM._alpha += 10;
}
};
v2.outOfBounds = function () {
this.distance += this.velocity;
if (this.distance > 1000) {
this.reset();
this.active = false;
}
};
v2.randomizeAngle = function () {
this.degAngle = this.angle * 180 / Math.PI;
this.degAngle += Math.random() * 40 - 20;
this.angle = this.degAngle * Math.PI / 180;
};
v2.getAngle = function () {
if (this.sector == 1 || this.sector == 3) {
this.angle = Math.atan(this.xdif / this.ydif);
}
if (this.sector == 2 || this.sector == 4) {
this.angle = Math.atan(this.ydif / this.xdif);
}
};
v2.toDegrees = function () {
this.degAngle = this.angle * 180 / Math.PI;
};
v2.toRadians = function () {
this.angle = this.degAngle / 57.29577951308232;
};
v2.getRotation = function () {
if (this.sector == 1) {
this._rotation = this.degAngle;
} else {
if (this.sector == 2) {
this._rotation = this.degAngle + 90;
} else {
if (this.sector == 3) {
this._rotation = this.degAngle + 180;
} else {
if (this.sector == 4) {
this._rotation = this.degAngle + 270;
}
}
}
}
};
v2.getXdif = function () {
if (this._x >= 320) {
this.xdif = this._x - 320;
} else {
if (this._x < 320) {
this.xdif = 320 - this._x;
}
}
};
v2.getYdif = function () {
if (this._y >= 240) {
this.ydif = this._y - 240;
} else {
if (this._y < 240) {
this.ydif = 240 - this._y;
}
}
};
v2.handleMovement = function () {
if (this.sector == 1) {
this._x -= this.xvel;
this._y += this.yvel;
} else {
if (this.sector == 2) {
this._x -= this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 3) {
this._x += this.xvel;
this._y -= this.yvel;
} else {
if (this.sector == 4) {
this._x += this.xvel;
this._y += this.yvel;
}
}
}
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
ASSetPropFlags(_global.Nano.prototype, null, 1);
}
#endinitclip
}
movieClip 505 __Packages.NanoExp {
#initclip
if (!_global.NanoExp) {
var v1 = function () {
super();
};
_global.NanoExp = v1;
_global.NanoExp extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.expTimer = 0;
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
this.play();
++this.expTimer;
if (this.expTimer == 5) {
this.removeMovieClip();
}
}
if (_root.game.paused == true) {
this.stop();
}
};
ASSetPropFlags(_global.NanoExp.prototype, null, 1);
}
#endinitclip
}
movieClip 506 __Packages.PowerUp {
#initclip
if (!_global.PowerUp) {
var v1 = function () {
super();
};
_global.PowerUp = v1;
_global.PowerUp extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 0;
this._y = 0;
this.xvel = 0;
this.yvel = 0;
this._alpha = 0;
this.active = false;
this.frame = 2;
this.health = 200;
this.hitTimer = 0;
this.hit = false;
};
v2.onEnterFrame = function () {
if (this.active) {
this.gotoAndStop(this.frame);
this.handleMovement();
this.outOfBounds();
this.handleHit();
}
};
v2.handleMovement = function () {
this._x += this.xvel / 2;
this._y += this.yvel / 2;
};
v2.handleCollision = function () {
this.hit = true;
this.health -= 50;
if (this.health <= 0) {
this.active = false;
this._alpha = 0;
this.explodeAll();
}
};
v2.explode = function () {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.active = false;
};
v2.outOfBounds = function () {
if (this._x > 660 || this._x < -20) {
this.active = false;
this._alpha = 0;
}
if (this._y > 500 || this._y < -20) {
this.active = false;
this._alpha = 0;
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
v2.explodeAll = function () {
var v2 = 0;
while (v2 < 30) {
if (_root.game.enemies[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.enemies[v2]._x, '_y': _root.game.enemies[v2]._y});
_root.game.enemies[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 20) {
if (_root.game.mediums[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.mediums[v2]._x, '_y': _root.game.mediums[v2]._y});
_root.game.mediums[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 20) {
if (_root.game.larges[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.larges[v2]._x, '_y': _root.game.larges[v2]._y});
_root.game.larges[v2].active = false;
}
++v2;
}
v2 = 0;
while (v2 < 5) {
if (_root.game.mothers[v2].active == true) {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': _root.game.mothers[v2]._x, '_y': _root.game.mothers[v2]._y});
_root.game.mothers[v2].active = false;
}
++v2;
}
};
ASSetPropFlags(_global.PowerUp.prototype, null, 1);
}
#endinitclip
}
movieClip 507 __Packages.ShopMenu {
#initclip
if (!_global.ShopMenu) {
var v1 = function () {
super();
};
_global.ShopMenu = v1;
_global.ShopMenu extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this.active = false;
this._alpha = 0;
this.pointLeft = true;
this.rotActive = true;
this.rofActive = true;
this.wepActive = true;
this.goActive = false;
this.rotFrame = 0;
this.rofFrame = 0;
this.wepFrame = 0;
this.goFrame = 0;
};
v2.onEnterFrame = function () {
if (this.active) {
this.enableButtons();
this._alpha = 100;
_root.game.paused = true;
this.handleButtons();
this.handleAnimation();
this.handleRotationSpeed();
this.handlePowerGrade();
this.handleEmpDelay();
this.handleWeaponGrade();
if (!this.pointLeft) {
_root.ui.shopMenu.goActive = true;
}
}
if (this.active == false) {
this.disableButtons();
_root.game.paused = false;
this._alpha = 0;
}
};
v2.greyUpgrades = function () {
this.rotActive = false;
this.rofActive = false;
this.wepActive = false;
};
v2.handleAnimation = function () {
if (this.rotActive) {
++this.rotFrame;
if (this.rotFrame > 16) {
this.rotFrame = 0;
}
_root.ui.shopMenu.rotUpg.gotoAndStop(this.rotFrame);
} else {
_root.ui.shopMenu.rotUpg.gotoAndStop(17);
}
if (this.rofActive) {
++this.rofFrame;
if (this.rofFrame > 16) {
this.rofFrame = 0;
}
_root.ui.shopMenu.rofUpg.gotoAndStop(this.rofFrame);
} else {
_root.ui.shopMenu.rofUpg.gotoAndStop(17);
}
if (this.wepActive) {
++this.wepFrame;
if (this.wepFrame > 16) {
this.wepFrame = 0;
}
_root.ui.shopMenu.wepUpg.gotoAndStop(this.wepFrame);
} else {
_root.ui.shopMenu.wepUpg.gotoAndStop(17);
}
if (this.goActive) {
++this.goFrame;
if (this.goFrame > 16) {
this.goFrame = 0;
}
_root.ui.shopMenu.goButton.gotoAndStop(this.goFrame);
} else {
_root.ui.shopMenu.goButton.gotoAndStop(17);
}
};
v2.disableButtons = function () {
_root.ui.shopMenu.rotUpg.enabled = false;
_root.ui.shopMenu.goButton.enabled = false;
};
v2.enableButtons = function () {
_root.ui.shopMenu.rotUpg.enabled = true;
_root.ui.shopMenu.goButton.enabled = true;
};
v2.handleButtons = function () {
_root.ui.shopMenu.rotUpg.onPress = function () {
if (_root.ui.shopMenu.pointLeft == true) {
if (_root.ui.shopMenu.rotActive == true) {
if (_root.ui.shopMenu.rotInd.state < 4) {
++_root.ui.shopMenu.rotInd.state;
_root.ui.shopMenu.greyUpgrades();
_root.ui.shopMenu.pointLeft = false;
}
}
}
};
_root.ui.shopMenu.rofUpg.onPress = function () {
if (_root.ui.shopMenu.pointLeft == true) {
if (_root.ui.shopMenu.rofActive == true) {
if (_root.ui.shopMenu.rofInd.state < 4) {
++_root.ui.shopMenu.rofInd.state;
_root.ui.shopMenu.greyUpgrades();
_root.ui.shopMenu.pointLeft = false;
}
}
}
};
_root.ui.shopMenu.wepUpg.onPress = function () {
if (_root.ui.shopMenu.pointLeft == true) {
if (_root.ui.shopMenu.wepActive == true) {
if (_root.ui.shopMenu.wepInd.state < 4) {
++_root.ui.shopMenu.wepInd.state;
_root.ui.shopMenu.greyUpgrades();
_root.ui.shopMenu.pointLeft = false;
}
}
}
};
_root.ui.shopMenu.goButton.onPress = function () {
if (_root.ui.shopMenu.goActive == true) {
_root.ui.shopMenu.resetShop();
_root.ui.shopMenu.active = false;
_root.ui.attachMovie('ClickPad', 'clickPad', _root.ui.getNextHighestDepth());
}
};
};
v2.resetShop = function () {
if (_root.ui.shopMenu.rotInd.state < 4) {
this.rotActive = true;
}
if (_root.ui.shopMenu.rofInd.state < 4) {
this.rofActive = true;
}
if (_root.ui.shopMenu.wepInd.state < 4) {
this.wepActive = true;
}
this.goActive = false;
this.rotFrame = 0;
this.rofFrame = 0;
this.wepFrame = 0;
this.goFrame = 0;
};
v2.handleRotationSpeed = function () {
if (_root.ui.shopMenu.rotInd.state == 1) {
_root.ga.tool1.rotationSpeed = 4;
}
if (_root.ui.shopMenu.rotInd.state == 2) {
_root.ga.tool1.rotationSpeed = 5;
}
if (_root.ui.shopMenu.rotInd.state == 3) {
_root.ga.tool1.rotationSpeed = 6;
}
if (_root.ui.shopMenu.rotInd.state == 4) {
_root.ga.tool1.rotationSpeed = 7;
}
};
v2.handleEmpDelay = function () {
if (_root.ui.shopMenu.rofInd.state == 1) {
_root.ga.tool1.empDelay = 5;
_root.ga.tool2.empDelay = 5;
}
if (_root.ui.shopMenu.rofInd.state == 2) {
_root.ga.tool1.empDelay = 4;
_root.ga.tool2.empDelay = 4;
}
if (_root.ui.shopMenu.rofInd.state == 3) {
_root.ga.tool1.empDelay = 3;
_root.ga.tool2.empDelay = 3;
}
if (_root.ui.shopMenu.rofInd.state == 4) {
_root.ga.tool1.empDelay = 2;
_root.ga.tool2.empDelay = 2;
}
};
v2.handlePowerGrade = function () {
if (_root.ui.shopMenu.powerInd.state == 1) {
_root.ga.tool1.powerGrade = 6;
}
if (_root.ui.shopMenu.powerInd.state == 2) {
_root.ga.tool1.powerGrade = 5;
}
if (_root.ui.shopMenu.powerInd.state == 3) {
_root.ga.tool1.powerGrade = 4;
}
if (_root.ui.shopMenu.powerInd.state == 4) {
_root.ga.tool1.powerGrade = 3;
}
};
v2.handleWeaponGrade = function () {
if (_root.ui.shopMenu.wepInd.state == 1) {
_root.ga.tool1.weaponGrade = 1;
_root.ga.tool2.weaponGrade = 1;
}
if (_root.ui.shopMenu.wepInd.state == 2) {
_root.ga.tool1.weaponGrade = 2;
_root.ga.tool2.weaponGrade = 2;
}
if (_root.ui.shopMenu.wepInd.state == 3) {
_root.ga.tool1.weaponGrade = 3;
_root.ga.tool2.weaponGrade = 3;
}
if (_root.ui.shopMenu.wepInd.state == 4) {
_root.ga.tool1.weaponGrade = 4;
_root.ga.tool2.weaponGrade = 4;
}
};
ASSetPropFlags(_global.ShopMenu.prototype, null, 1);
}
#endinitclip
}
movieClip 508 __Packages.XpBonus {
#initclip
if (!_global.XpBonus) {
var v1 = function () {
super();
};
_global.XpBonus = v1;
_global.XpBonus extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 0;
this._y = 0;
this.xvel = 0;
this.yvel = 0;
this._alpha = 0;
this.health = 100;
this.hitTimer = 0;
this.hit = false;
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
if (!this.active) {
this._alpha = 0;
}
if (this.active) {
this._alpha = 100;
this.handleMovement();
this.outOfBounds();
this.handleHit();
}
}
};
v2.handleMovement = function () {
this._x += this.xvel * 2;
this._y += this.yvel * 2;
};
v2.handleCollision = function () {
this.hit = true;
this.health -= 50;
if (this.health <= 0) {
this.explode();
_root.ui.xpBar.xp += 20;
_root.ui.highScore.score += 25;
}
};
v2.explode = function () {
_root.ga.attachMovie('NanoExp', 'nanoExp' + _root.ga.getNextHighestDepth(), _root.ga.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
this.active = false;
this.health = 100;
this.hit = false;
this.transform.colorTransform = new flash.geom.ColorTransform();
this.active = false;
this._alpha = 0;
};
v2.outOfBounds = function () {
if (this._x > 650 || this._x < -20) {
this.active = false;
this._alpha = 0;
} else {
if (this._y > 500 || this._y < -20) {
this.active = false;
this._alpha = 0;
}
}
};
v2.handleHit = function () {
this.whiteColor = new Color(this);
if (this.hit) {
++this.hitTimer;
this.whiteColor.setRGB(16777215);
}
if (this.hitTimer == 5) {
this.transform.colorTransform = new flash.geom.ColorTransform();
this.hitTimer = 0;
this.hit = false;
}
};
ASSetPropFlags(_global.XpBonus.prototype, null, 1);
}
#endinitclip
}
movieClip 509 __Packages.movSplash {
#initclip
if (!_global.movSplash) {
var v1 = function () {
super();
};
_global.movSplash = v1;
_global.movSplash extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 108;
5;
this._y = 38;
5;
this.frame = 1;
};
v2.onEnterFrame = function () {
++this.frame;
if (this.frame > 98) {
_root.gotoAndPlay(5);
this.removeMovieClip();
}
_root.movsplash.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
};
ASSetPropFlags(_global.movSplash.prototype, null, 1);
}
#endinitclip
}
movieClip 510 __Packages.butMoreGames {
#initclip
if (!_global.butMoreGames) {
var v1 = function () {
super();
};
_global.butMoreGames = v1;
_global.butMoreGames extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 460;
this._y = 5;
};
v2.onEnterFrame = function () {
_root.buttonLayer.butmoreGames.onPress = function () {
this.getURL('http://www.gimme5games.com/?ref=planetary', '_blank');
};
};
ASSetPropFlags(_global.butMoreGames.prototype, null, 1);
}
#endinitclip
}
movieClip 511 __Packages.PowerBar {
#initclip
if (!_global.PowerBar) {
var v1 = function () {
super();
};
_global.PowerBar = v1;
_global.PowerBar extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
this._x = 320;
this._y = 30;
};
v2.onEnterFrame = function () {
if (_root.game.paused == false) {
this._xscale = _root.game.shotPower;
}
};
ASSetPropFlags(_global.PowerBar.prototype, null, 1);
}
#endinitclip
}
movieClip 73 __Packages.mx.core.UIObject {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.core) {
_global.mx.core = new Object();
}
if (!_global.mx.core.UIObject) {
var v1 = function () {
super();
this.constructObject();
};
mx.core.UIObject = v1;
mx.core.UIObject extends MovieClip;
var v2 = v1.prototype;
v2.__get__width = function () {
return this._width;
};
v2.__get__height = function () {
return this._height;
};
v2.__get__left = function () {
return this._x;
};
v2.__get__x = function () {
return this._x;
};
v2.__get__top = function () {
return this._y;
};
v2.__get__y = function () {
return this._y;
};
v2.__get__right = function () {
return this._parent.width - (this._x + this.__get__width());
};
v2.__get__bottom = function () {
return this._parent.height - (this._y + this.__get__height());
};
v2.getMinHeight = function (Void) {
return this._minHeight;
};
v2.setMinHeight = function (h) {
this._minHeight = h;
};
v2.__get__minHeight = function () {
return this.getMinHeight();
};
v2.__set__minHeight = function (h) {
this.setMinHeight(h);
return this.__get__minHeight();
};
v2.getMinWidth = function (Void) {
return this._minWidth;
};
v2.setMinWidth = function (w) {
this._minWidth = w;
};
v2.__get__minWidth = function () {
return this.getMinWidth();
};
v2.__set__minWidth = function (w) {
this.setMinWidth(w);
return this.__get__minWidth();
};
v2.setVisible = function (x, noEvent) {
if (x != this._visible) {
this._visible = x;
if (noEvent != true) {
this.dispatchEvent({'type': x ? 'reveal' : 'hide'});
}
}
};
v2.__get__visible = function () {
return this._visible;
};
v2.__set__visible = function (x) {
this.setVisible(x, false);
return this.__get__visible();
};
v2.__get__scaleX = function () {
return this._xscale;
};
v2.__set__scaleX = function (x) {
this._xscale = x;
return this.__get__scaleX();
};
v2.__get__scaleY = function () {
return this._yscale;
};
v2.__set__scaleY = function (y) {
this._yscale = y;
return this.__get__scaleY();
};
v2.doLater = function (obj, fn) {
if (this.methodTable == undefined) {
this.methodTable = new Array();
}
this.methodTable.push({'obj': obj, 'fn': fn});
this.onEnterFrame = this.doLaterDispatcher;
};
v2.doLaterDispatcher = function (Void) {
delete this.onEnterFrame;
if (this.invalidateFlag) {
this.redraw();
}
var v3 = this.methodTable;
this.methodTable = new Array();
if (v3.length > 0) {
var v2;
v2 = v3.shift();
while (v2 != undefined) {
v2.obj[v2.fn]();
}
}
};
v2.cancelAllDoLaters = function (Void) {
delete this.onEnterFrame;
this.methodTable = new Array();
};
v2.invalidate = function (Void) {
this.invalidateFlag = true;
this.onEnterFrame = this.doLaterDispatcher;
};
v2.invalidateStyle = function (Void) {
this.invalidate();
};
v2.redraw = function (bAlways) {
if (this.invalidateFlag || bAlways) {
this.invalidateFlag = false;
var v2;
for (v2 in this.tfList) {
this.tfList[v2].draw();
}
this.draw();
this.dispatchEvent({'type': 'draw'});
}
};
v2.draw = function (Void) {};
v2.move = function (x, y, noEvent) {
var v3 = this._x;
var v2 = this._y;
this._x = x;
this._y = y;
if (noEvent != true) {
this.dispatchEvent({'type': 'move', 'oldX': v3, 'oldY': v2});
}
};
v2.setSize = function (w, h, noEvent) {
var v3 = this.__width;
var v2 = this.__height;
this.__width = w;
this.__height = h;
this.size();
if (noEvent != true) {
this.dispatchEvent({'type': 'resize', 'oldWidth': v3, 'oldHeight': v2});
}
};
v2.size = function (Void) {
this._width = this.__width;
this._height = this.__height;
};
v2.drawRect = function (x1, y1, x2, y2) {
this.moveTo(x1, y1);
this.lineTo(x2, y1);
this.lineTo(x2, y2);
this.lineTo(x1, y2);
this.lineTo(x1, y1);
};
v2.createLabel = function (name, depth, text) {
this.createTextField(name, depth, 0, 0, 0, 0);
var v2 = this[name];
v2._color = mx.core.UIObject.textColorList;
v2._visible = false;
v2.__text = text;
if (this.tfList == undefined) {
this.tfList = new Object();
}
this.tfList[name] = v2;
v2.invalidateStyle();
this.invalidate();
v2.styleName = this;
return v2;
};
v2.createObject = function (linkageName, id, depth, initobj) {
return this.attachMovie(linkageName, id, depth, initobj);
};
v2.createClassObject = function (className, id, depth, initobj) {
var v3 = className.symbolName == undefined;
if (v3) {
Object.registerClass(className.symbolOwner.symbolName, className);
}
var v4 = mx.core.UIObject(this.createObject(className.symbolOwner.symbolName, id, depth, initobj));
if (v3) {
Object.registerClass(className.symbolOwner.symbolName, className.symbolOwner);
}
return v4;
};
v2.createEmptyObject = function (id, depth) {
return this.createClassObject(mx.core.UIObject, id, depth);
};
v2.destroyObject = function (id) {
var v2 = this[id];
if (v2.getDepth() < 0) {
var v4 = this.buildDepthTable();
var v5 = this.findNextAvailableDepth(0, v4, 'up');
var v3 = v5;
v2.swapDepths(v3);
}
v2.removeMovieClip();
delete this[id];
};
v2.getSkinIDName = function (tag) {
return this.idNames[tag];
};
v2.setSkin = function (tag, linkageName, initObj) {
if (_global.skinRegistry[linkageName] == undefined) {
mx.skins.SkinElement.registerElement(linkageName, mx.skins.SkinElement);
}
return this.createObject(linkageName, this.getSkinIDName(tag), tag, initObj);
};
v2.createSkin = function (tag) {
var v2 = this.getSkinIDName(tag);
this.createEmptyObject(v2, tag);
return this[v2];
};
v2.createChildren = function (Void) {};
v2._createChildren = function (Void) {
this.createChildren();
this.childrenCreated = true;
};
v2.constructObject = function (Void) {
if (this._name == undefined) {
return undefined;
}
this.init();
this._createChildren();
this.createAccessibilityImplementation();
this._endInit();
if (this.validateNow) {
this.redraw(true);
} else {
this.invalidate();
}
};
v2.initFromClipParameters = function (Void) {
var v4 = false;
var v2;
for (v2 in this.clipParameters) {
if (this.hasOwnProperty(v2)) {
v4 = true;
this['def_' + v2] = this[v2];
delete this[v2];
}
}
if (v4) {
for (v2 in this.clipParameters) {
var v3 = this['def_' + v2];
if (v3 != undefined) {
this[v2] = v3;
}
}
}
};
v2.init = function (Void) {
this.__width = this._width;
this.__height = this._height;
if (this.initProperties == undefined) {
this.initFromClipParameters();
} else {
this.initProperties();
}
if (_global.cascadingStyles == true) {
this.stylecache = new Object();
}
};
v2.getClassStyleDeclaration = function (Void) {
var v4 = this;
var v3 = this.className;
while (v3 != undefined) {
if (this.ignoreClassStyleDeclaration[v3] == undefined) {
if (_global.styles[v3] != undefined) {
return _global.styles[v3];
}
}
v4 = v4.__proto__;
v3 = v4.className;
}
};
v2.setColor = function (color) {};
v2.__getTextFormat = function (tf, bAll) {
var v8 = this.stylecache.tf;
if (v8 != undefined) {
var v3;
for (v3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || mx.styles.StyleManager.TextFormatStyleProps[v3]) {
if (tf[v3] == undefined) {
tf[v3] = v8[v3];
}
}
}
return false;
}
var v6 = false;
for (v3 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || mx.styles.StyleManager.TextFormatStyleProps[v3]) {
if (tf[v3] == undefined) {
var v5 = this._tf[v3];
if (v5 != undefined) {
tf[v3] = v5;
} else {
if (v3 == 'font' && this.fontFamily != undefined) {
tf[v3] = this.fontFamily;
} else {
if (v3 == 'size' && this.fontSize != undefined) {
tf[v3] = this.fontSize;
} else {
if (v3 == 'color' && this.color != undefined) {
tf[v3] = this.color;
} else {
if (v3 == 'leftMargin' && this.marginLeft != undefined) {
tf[v3] = this.marginLeft;
} else {
if (v3 == 'rightMargin' && this.marginRight != undefined) {
tf[v3] = this.marginRight;
} else {
if (v3 == 'italic' && this.fontStyle != undefined) {
tf[v3] = this.fontStyle == v3;
} else {
if (v3 == 'bold' && this.fontWeight != undefined) {
tf[v3] = this.fontWeight == v3;
} else {
if (v3 == 'align' && this.textAlign != undefined) {
tf[v3] = this.textAlign;
} else {
if (v3 == 'indent' && this.textIndent != undefined) {
tf[v3] = this.textIndent;
} else {
if (v3 == 'underline' && this.textDecoration != undefined) {
tf[v3] = this.textDecoration == v3;
} else {
if (v3 == 'embedFonts' && this.embedFonts != undefined) {
tf[v3] = this.embedFonts;
} else {
v6 = true;
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
if (v6) {
var v9 = this.styleName;
if (v9 != undefined) {
if (typeof v9 != 'string') {
v6 = v9.__getTextFormat(tf, true, this);
} else {
if (_global.styles[v9] != undefined) {
v6 = _global.styles[v9].__getTextFormat(tf, true, this);
}
}
}
}
if (v6) {
var v10 = this.getClassStyleDeclaration();
if (v10 != undefined) {
v6 = v10.__getTextFormat(tf, true, this);
}
}
if (v6) {
if (_global.cascadingStyles) {
if (this._parent != undefined) {
v6 = this._parent.__getTextFormat(tf, false);
}
}
}
if (v6) {
v6 = _global.style.__getTextFormat(tf, true, this);
}
return v6;
};
v2._getTextFormat = function (Void) {
var v2 = this.stylecache.tf;
if (v2 != undefined) {
return v2;
}
v2 = new TextFormat();
this.__getTextFormat(v2, true);
this.stylecache.tf = v2;
if (this.enabled == false) {
var v3 = this.getStyle('disabledColor');
v2.color = v3;
}
return v2;
};
v2.getStyleName = function (Void) {
var v2 = this.styleName;
if (v2 != undefined) {
if (typeof v2 != 'string') {
return v2.getStyleName();
} else {
return v2;
}
}
if (this._parent != undefined) {
return this._parent.getStyleName();
} else {
return undefined;
}
};
v2.getStyle = function (styleProp) {
var v3;
++_global.getStyleCounter;
if (this[styleProp] != undefined) {
return this[styleProp];
}
var v6 = this.styleName;
if (v6 != undefined) {
if (typeof v6 != 'string') {
v3 = v6.getStyle(styleProp);
} else {
var v7 = _global.styles[v6];
v3 = v7.getStyle(styleProp);
}
}
if (v3 != undefined) {
return v3;
}
v7 = this.getClassStyleDeclaration();
if (v7 != undefined) {
v3 = v7[styleProp];
}
if (v3 != undefined) {
return v3;
}
if (_global.cascadingStyles) {
if (mx.styles.StyleManager.isInheritingStyle(styleProp) || mx.styles.StyleManager.isColorStyle(styleProp)) {
var v5 = this.stylecache;
if (v5 != undefined) {
if (v5[styleProp] != undefined) {
return v5[styleProp];
}
}
if (this._parent != undefined) {
v3 = this._parent.getStyle(styleProp);
} else {
v3 = _global.style[styleProp];
}
if (v5 != undefined) {
v5[styleProp] = v3;
}
return v3;
}
}
if (v3 == undefined) {
v3 = _global.style[styleProp];
}
return v3;
};
v1.mergeClipParameters = function (o, p) {
for (var v3 in p) {
o[v3] = p[v3];
}
return true;
};
v1.symbolName = 'UIObject';
v1.symbolOwner = mx.core.UIObject;
v1.version = '2.0.2.127';
v1.textColorList = {'color': 1, 'disabledColor': 1};
v2.invalidateFlag = false;
v2.lineWidth = 1;
v2.lineColor = 0;
v2.tabEnabled = false;
v2.clipParameters = {'visible': 1, 'minHeight': 1, 'minWidth': 1, 'maxHeight': 1, 'maxWidth': 1, 'preferredHeight': 1, 'preferredWidth': 1};
v2.addProperty('bottom', v2.__get__bottom, function () {});
v2.addProperty('height', v2.__get__height, function () {});
v2.addProperty('left', v2.__get__left, function () {});
v2.addProperty('minHeight', v2.__get__minHeight, v2.__set__minHeight);
v2.addProperty('minWidth', v2.__get__minWidth, v2.__set__minWidth);
v2.addProperty('right', v2.__get__right, function () {});
v2.addProperty('scaleX', v2.__get__scaleX, v2.__set__scaleX);
v2.addProperty('scaleY', v2.__get__scaleY, v2.__set__scaleY);
v2.addProperty('top', v2.__get__top, function () {});
v2.addProperty('visible', v2.__get__visible, v2.__set__visible);
v2.addProperty('width', v2.__get__width, function () {});
v2.addProperty('x', v2.__get__x, function () {});
v2.addProperty('y', v2.__get__y, function () {});
ASSetPropFlags(mx.core.UIObject.prototype, null, 1);
}
#endinitclip
}
movieClip 74 __Packages.mx.core.UIComponent {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.core) {
_global.mx.core = new Object();
}
if (!_global.mx.core.UIComponent) {
var v1 = function () {
super();
};
mx.core.UIComponent = v1;
mx.core.UIComponent extends mx.core.UIObject;
var v2 = v1.prototype;
v2.__get__width = function () {
return this.__width;
};
v2.__get__height = function () {
return this.__height;
};
v2.setVisible = function (x, noEvent) {
super.setVisible(x, noEvent);
};
v2.enabledChanged = function (id, oldValue, newValue) {
this.setEnabled(newValue);
this.invalidate();
delete this.stylecache.tf;
return newValue;
};
v2.setEnabled = function (enabled) {
this.invalidate();
};
v2.getFocus = function () {
var selFocus = Selection.getFocus();
return (selFocus === null) ? null : eval(selFocus);
};
v2.setFocus = function () {
Selection.setFocus(this);
};
v2.getFocusManager = function () {
var v2 = this;
while (v2 != undefined) {
if (v2.focusManager != undefined) {
return v2.focusManager;
}
v2 = v2._parent;
}
return undefined;
};
v2.onKillFocus = function (newFocus) {
this.removeEventListener('keyDown', this);
this.removeEventListener('keyUp', this);
this.dispatchEvent({'type': 'focusOut'});
this.drawFocus(false);
};
v2.onSetFocus = function (oldFocus) {
this.addEventListener('keyDown', this);
this.addEventListener('keyUp', this);
this.dispatchEvent({'type': 'focusIn'});
if ((this.getFocusManager()).bDrawFocus != false) {
this.drawFocus(true);
}
};
v2.findFocusInChildren = function (o) {
if (o.focusTextField != undefined) {
return o.focusTextField;
}
if (o.tabEnabled == true) {
return o;
}
return undefined;
};
v2.findFocusFromObject = function (o) {
if (o.tabEnabled != true) {
if (o._parent == undefined) {
return undefined;
}
if (o._parent.tabEnabled == true) {
o = o._parent;
return o;
}
if (o._parent.tabChildren) {
o = this.findFocusInChildren(o._parent);
return o;
}
o = this.findFocusFromObject(o._parent);
}
return o;
};
v2.pressFocus = function () {
var v3 = this.findFocusFromObject(this);
var v2 = this.getFocus();
if (v3 != v2) {
v2.drawFocus(false);
if ((this.getFocusManager()).bDrawFocus != false) {
v3.drawFocus(true);
}
}
};
v2.releaseFocus = function () {
var v2 = this.findFocusFromObject(this);
if (v2 != this.getFocus()) {
v2.setFocus();
}
};
v2.isParent = function (o) {
while (o != undefined) {
if (o == this) {
return true;
}
o = o._parent;
}
return false;
};
v2.size = function () {};
v2.init = function () {
super.init();
this._xscale = 100;
this._yscale = 100;
this._focusrect = _global.useFocusRect == false;
this.watch('enabled', this.enabledChanged);
if (this.enabled == false) {
this.setEnabled(false);
}
};
v2.dispatchValueChangedEvent = function (value) {
this.dispatchEvent({'type': 'valueChanged', 'value': value});
};
v1.symbolName = 'UIComponent';
v1.symbolOwner = mx.core.UIComponent;
v1.version = '2.0.2.127';
v1.kStretch = 5000;
v2.focusEnabled = true;
v2.tabEnabled = true;
v2.origBorderStyles = {'themeColor': 16711680};
v2.clipParameters = {};
v1.mergedClipParameters = mx.core.UIObject.mergeClipParameters(mx.core.UIComponent.prototype.clipParameters, mx.core.UIObject.prototype.clipParameters);
v2.addProperty('height', v2.__get__height, function () {});
v2.addProperty('width', v2.__get__width, function () {});
ASSetPropFlags(mx.core.UIComponent.prototype, null, 1);
}
#endinitclip
}
movieClip 75 __Packages.ZattikkaHiScores {
#initclip
if (!_global.ZattikkaHiScores) {
var v1 = function () {
super();
this.debug('[ZattikkaHiScores VERSION ' + ZattikkaHiScores.VERSION_NUM + ']');
this._visible = false;
};
_global.ZattikkaHiScores = v1;
_global.ZattikkaHiScores extends mx.core.UIComponent;
var v2 = v1.prototype;
v2.setDetails = function (gameId, levelId, gameCode, gameKey, lowIsBest, score, msg1, msg2, svrUrl) {
this.debug('[ZattikkaHiScores::setDetails], gameId = ' + gameId + ', levelId = ' + levelId + ', gameCode = ' + gameCode + ', lowIsBest = ' + lowIsBest + ', score = ' + score);
if (_root.svrUrl != null && _root.svrUrl.length > 0) {
ZattikkaHiScores.SERVER_URL = String(_root.svrUrl);
} else {
if (svrUrl != null && svrUrl.length > 0) {
ZattikkaHiScores.SERVER_URL = svrUrl;
}
}
this.debug('[ZattikkaHiScores::setDetails] SERVER_URL = ' + ZattikkaHiScores.SERVER_URL);
this.entryScreen = this.movEntryScreen;
this.infoScreen = this.movInfoScreen;
this.entryScreen._visible = false;
this.infoScreen._visible = false;
this.gameId = gameId;
this.levelId = levelId;
this.gameCode = gameCode;
this.gameKey = gameKey;
this.lowIsBest = lowIsBest;
this.score = score;
this.msg1 = msg1;
this.msg2 = msg2;
try {
this.grabG5User();
if (!this.g5UserExists) {
this.grabFacebookUser();
}
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
} else {
throw v0;
}
}
var self = this;
this.btnGFTP.onRelease = function () {
self.btn_GFTP();
};
this.entryScreen.btnSubmit.onRelease = function () {
self.btn_submitScore();
};
this.entryScreen.btnTwitter.onRelease = function () {
self.btn_twitterTweet();
};
this.entryScreen.btnFacebook.onRelease = function () {
self.btn_facebookFeed();
};
this.infoScreen.btnView.onRelease = function () {
self.btn_viewScore();
};
this.infoScreen.btnBack.onRelease = function () {
self.btn_back();
};
if (this.fbUserExists) {
this.btn_submitScore();
} else {
this.showEntryScreen();
}
this._visible = true;
};
v2.grabG5User = function () {
this.g5User = flash.external.ExternalInterface.call('getG5User');
this.g5UserExists = (this.g5User == null) ? false : !isNaN(this.g5User[0]);
if (this.testMode == ZattikkaHiScores.TEST_MODE_G5) {
this.g5User = new Array('9', 'RocketRonz');
this.g5UserExists = (this.g5User == null) ? false : !isNaN(this.g5User[0]);
}
this.debug('[ZattikkaHiScores::grabG5User] ' + (this.g5UserExists ? 'userId = ' + this.g5User[0] + ', userName = ' + this.g5User[1] : 'g5User is empty'));
};
v2.grabFacebookUser = function () {
this.fbUser = flash.external.ExternalInterface.call('getFBUser');
this.fbUserExists = (this.fbUser == null) ? false : !isNaN(this.fbUser[0]);
this.fbSessionKey = flash.external.ExternalInterface.call('getFBSessionKey');
if (this.testMode == ZattikkaHiScores.TEST_MODE_FB) {
this.fbUser = new Array('1391035054', 'Aardvark Gimme Five');
this.fbUserExists = (this.fbUser == null) ? false : !isNaN(this.fbUser[0]);
this.fbSessionKey = '2.i4LDf4C3pen65K8BunEFgg__.86400.1254996000-1340305241';
}
this.debug('[ZattikkaHiScores::grabFacebookUser] ' + (this.fbUserExists ? 'userId = ' + this.fbUser[0] + ', userName = ' + this.fbUser[1] + ', sessionKey = ' + this.fbSessionKey : 'fbUser is empty'));
};
v2.showEntryScreen = function () {
this.entryScreen.txtMsgLine1.text = this.msg1;
this.entryScreen.txtMsgLine2.text = this.msg2;
this.entryScreen.movNameAuto._visible = this.g5UserExists || this.fbUserExists;
this.entryScreen.movNameManual._visible = !this.g5UserExists && !this.fbUserExists;
this.entryScreen.movNameAuto.txtName.text = this.g5UserExists ? this.g5User[1] : (this.fbUserExists ? this.fbUser[1] : '');
this.entryScreen.movNameManual.txtName.text = '';
this.entryScreen._visible = true;
this.infoScreen._visible = false;
};
v2.showInfoMessage = function (msg, error) {
this.infoScreen.txtInfo.text = msg;
this.infoScreen.btnBack._visible = error;
this.infoScreen.btnView._visible = !error && !this.fbUserExists;
this.infoScreen._visible = true;
this.entryScreen._visible = false;
};
v2.btn_GFTP = function () {
this.getURL(ZattikkaHiScores.GFTP_URL, '_blank');
};
v2.btn_submitScore = function () {
if (this.hasHiScoreBeenBeaten()) {
if (!this.g5UserExists && !this.fbUserExists && this.entryScreen.movNameManual.txtName.text.length == 0) {
this.showInfoMessage(ZattikkaHiScores.MSG_PLEASE_ENTER_NICKNAME, true);
} else {
this.submitScore();
}
} else {
this.showInfoMessage(ZattikkaHiScores.MSG_NOT_STORED, false);
}
};
v2.btn_twitterTweet = function () {
if (!this.g5UserExists && !this.fbUserExists && this.entryScreen.movNameManual.txtName.text.length == 0) {
this.showInfoMessage(ZattikkaHiScores.MSG_PLEASE_ENTER_NICKNAME, true);
} else {
this.twitterTweet();
}
};
v2.btn_facebookFeed = function () {
if (this.fbUserExists) {
this.facebookFeed();
} else {
this.facebookFeedExternal();
}
};
v2.btn_viewScore = function () {
this.viewScore();
};
v2.btn_back = function () {
this.setDetails(this.gameId, this.levelId, this.gameCode, this.gameKey, this.lowIsBest, this.score, this.msg1, this.msg2);
};
v2.submitScore = function () {
this.showInfoMessage(ZattikkaHiScores.MSG_SUBMITTING_DETAILS, false);
this.infoScreen._visible = true;
this.entryScreen._visible = false;
var v9 = this.fbUserExists ? ZattikkaHiScores.HS_PLATFORM_FACEBOOK : ZattikkaHiScores.HS_PLATFORM_WEB;
var v7 = '';
var v6 = '';
if (this.fbUserExists) {
v6 = this.fbUser[0];
} else {
if (this.g5UserExists) {
v6 = this.g5User[0];
} else {
v7 = this.entryScreen.movNameManual.txtName.text;
}
}
var v8 = String((new Date()).getTime());
var v10 = v8.split('');
v10.reverse();
var v5 = this.xor(v10.join(''), this.gameKey, false);
var v2 = '';
v2 += this.gameId + ',';
v2 += this.levelId + ',';
v2 += v9 + ',';
v2 += this.score + ',';
v2 += v6 + ',';
v2 += this.replaceAll(v7, ',', '') + ',';
v2 += ',';
v2 += String(this.lowIsBest);
var v4 = this.xor(v2, v5, false);
this.debug('key [' + v5.length + '] = ' + v5);
this.debug('plain [' + v2.length + '] = ' + v2);
this.debug('cipher [' + v4.length + '] = ' + v4);
v4 = this.getRandomString(5) + v4 + this.getRandomString(5);
var v3 = new LoadVars();
v3.gameId = this.gameId;
v3.platformId = v9;
v3.time = v8;
v3.data = v4;
v3.returnMessage = true;
if (this.fbUserExists) {
v3.fbSessionKey = this.fbSessionKey;
}
this.hitServer(ZattikkaHiScores.HS_ACTION, ZattikkaHiScores.EVENT_SUBMIT_HI_SCORE, v3);
};
v2.twitterTweet = function () {
var v2 = ZattikkaHiScores.SERVER_URL + ZattikkaHiScores.TW_ACTION + ZattikkaHiScores.EVENT_POST_TWEET;
v2 += '&gameId=' + this.gameId;
v2 += '&score=' + this.score;
this.getURL(v2, '_blank');
this.submitScore();
};
v2.facebookFeed = function () {
var v2 = new LoadVars();
v2.gameId = this.gameId;
v2.score = this.score;
v2.sessionKey = this.fbSessionKey;
v2.returnMessage = true;
this.hitServer(ZattikkaHiScores.FB_ACTION, ZattikkaHiScores.EVENT_PUBLISH_HI_SCORE_FEED, v2);
};
v2.facebookFeedExternal = function () {
this.getURL(ZattikkaHiScores.SERVER_URL + ZattikkaHiScores.FB_ACTION + ZattikkaHiScores.EVENT_PUBLISH_HI_SCORE_FEED_EXTERNAL, '_blank');
try {
var self = this;
this.cxn = new LocalConnection();
this.cxn.allowDomain = function (sendingDomain) {
return true;
};
this.cxn.setFBUser = function (fbUserId, fbSessionKey) {
self.setFBUser(fbUserId, fbSessionKey);
};
this.cxn.connect('_cxnZattikkaHS');
}
catch (v0) {
if (Error(v0) != null) {
var err = Error(v0);
} else {
throw v0;
}
}
};
v2.hitServer = function (stripesAction, stripesEvent, vars) {
this.debug('[ZattikkaHiScores::hitServer] url = ' + ZattikkaHiScores.SERVER_URL + stripesAction + stripesEvent);
var self = this;
var v2 = new XML();
vars.addRequestHeader(['Content-Type', 'application/x-www-form-urlencoded; charset=utf-8']);
vars.sendAndLoad(ZattikkaHiScores.SERVER_URL + stripesAction + stripesEvent, v2, 'POST');
v2.onLoad = function (success) {
self.loadHandler(stripesEvent, success, this);
};
};
v2.setFBUser = function (fbUserId, fbSessionKey) {
this.debug('[ZattikkaHiScores::setFBUser] fbUserId = ' + fbUserId + ', fbSessionKey = ' + fbSessionKey);
this.fbUser = new Array(fbUserId, '');
this.fbUserExists = true;
this.fbSessionKey = fbSessionKey;
this.cxn.close();
this.facebookFeed();
};
v2.viewScore = function () {
var v2 = ZattikkaHiScores.SERVER_URL + ZattikkaHiScores.HS_ACTION + ZattikkaHiScores.EVENT_VIEW_HI_SCORE;
v2 += '&gameId=' + this.gameId;
v2 += '&levelId=' + this.levelId;
v2 += '&platformId=' + ZattikkaHiScores.HS_PLATFORM_WEB;
v2 += '&gameCode=' + this.gameCode;
if (this.g5UserExists) {
v2 += '&userId=' + this.g5User[0];
} else {
v2 += '&name=' + this.entryScreen.movNameManual.txtName.text;
}
this.getURL(v2, '_blank');
};
v2.loadHandler = function (stripesEvent, success, xml) {
this.debug('[ZattikkaHiScores::loadHandler] stripesEvent = ' + stripesEvent + ', success = ' + success + ', xml = ' + xml.toString());
if (!success) {
this.showInfoMessage(ZattikkaHiScores.MSG_SERVER_ERROR, true);
} else {
var v3 = xml.firstChild;
var v2 = v3.attributes.code;
switch (stripesEvent) {
case ZattikkaHiScores.EVENT_SUBMIT_HI_SCORE:
this.showInfoMessage(v3.attributes.msg, v2 == -1);
if (this.fbUserExists && (v2 == 1 || v2 == 2)) {
try {
flash.external.ExternalInterface.call('setFBHiScoresRefresh', true);
flash.external.ExternalInterface.call('streamPublish', this.msg1);
}
catch (stripesEvent) {
if (Error(stripesEvent) != null) {
var err = Error(stripesEvent);
} else {
throw stripesEvent;
}
}
}
break;
case ZattikkaHiScores.EVENT_PUBLISH_HI_SCORE_FEED:
this.submitScore();
}
}
};
v2.xor = function (plain, key, traceChar) {
var v7 = '';
var v4 = 0;
var v2 = 0;
while (v4 < plain.length) {
if (v2 >= key.length) {
v2 = 0;
}
var v3 = (plain.charCodeAt(v4) ^ key.charCodeAt(v2)) + 1;
if (traceChar) {
this.debug('charCode = ' + v3 + ' = ' + String.fromCharCode(v3));
}
v7 += String.fromCharCode(v3);
v4++;
v2++;
}
return v7;
};
v2.getRandom = function (min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
};
v2.getRandomString = function (len) {
var v3 = '';
var v2 = 0;
while (v2 < len) {
v3 += String.fromCharCode(this.getRandom(48, 122));
++v2;
}
return v3;
};
v2.replaceAll = function (str, toReplace, replaceWith) {
var v3 = '';
var v1 = 0;
while (v1 < str.length) {
if (str.charAt(v1) == toReplace) {
v3 += replaceWith;
} else {
v3 += str.charAt(v1);
}
++v1;
}
return v3;
};
v2.hasHiScoreBeenBeaten = function () {
var v2 = flash.external.ExternalInterface.call('getCurrHiScore');
if (v2 == null || isNaN(Number(v2))) {
return true;
} else {
if (this.lowIsBest) {
return Number(v2) > this.score;
}
return Number(v2) < this.score;
}
};
v2.debug = function (msg) {
trace(msg);
com.hexagonstar.util.debug.Debug.trace(msg);
};
v1.VERSION_NUM = '1.0.5 (AS2)';
v1.TEST_MODE_OFF = 0;
v1.TEST_MODE_G5 = 1;
v1.TEST_MODE_FB = 2;
v2.testMode = ZattikkaHiScores.TEST_MODE_OFF;
v1.HS_PLATFORM_WEB = 0;
v1.HS_PLATFORM_FACEBOOK = 1;
v1.SERVER_URL = 'http://api.zattikka.com';
v1.GFTP_URL = 'http://www.gamesfortheplanet.com';
v1.HS_ACTION = '/HiScore.action?';
v1.EVENT_SUBMIT_HI_SCORE = 'SubmitHiScore=';
v1.EVENT_VIEW_HI_SCORE = 'ViewHiScore=';
v1.FB_ACTION = '/Facebook.action?';
v1.EVENT_PUBLISH_HI_SCORE_FEED = 'PublishHiScoreFeed=';
v1.EVENT_PUBLISH_HI_SCORE_FEED_EXTERNAL = 'PublishHiScoreFeedExternal=';
v1.TW_ACTION = '/Twitter.action?';
v1.EVENT_POST_TWEET = 'PostTweet=';
v1.MSG_PLEASE_ENTER_NICKNAME = 'Please enter your nickname.';
v1.MSG_SUBMITTING_DETAILS = 'Submitting hi-score details to the server, please wait.';
v1.MSG_NOT_STORED = 'Sorry, you failed to beat your existing hi-score for this game.';
v1.MSG_SERVER_ERROR = 'Could not contact server, please try again in a few minutes.';
v2.entryScreen = null;
v2.infoScreen = null;
v1.symbolName = 'ZattikkaHiScores';
v1.symbolOwner = ZattikkaHiScores;
v2.className = 'ZattikkaHiScores';
ASSetPropFlags(_global.ZattikkaHiScores.prototype, null, 1);
}
#endinitclip
}
movieClip 118 __Packages.mx.skins.SkinElement {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.skins) {
_global.mx.skins = new Object();
}
if (!_global.mx.skins.SkinElement) {
var v1 = function () {
super();
};
mx.skins.SkinElement = v1;
mx.skins.SkinElement extends MovieClip;
var v2 = v1.prototype;
v1.registerElement = function (name, className) {
Object.registerClass(name, (className == undefined) ? mx.skins.SkinElement : className);
_global.skinRegistry[name] = true;
};
v2.__set__visible = function (visible) {
this._visible = visible;
};
v2.move = function (x, y) {
this._x = x;
this._y = y;
};
v2.setSize = function (w, h) {
this._width = w;
this._height = h;
};
ASSetPropFlags(mx.skins.SkinElement.prototype, null, 1);
}
#endinitclip
}
movieClip 119 __Packages.mx.styles.CSSTextStyles {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.styles) {
_global.mx.styles = new Object();
}
if (!_global.mx.styles.CSSTextStyles) {
var v1 = function () {};
mx.styles.CSSTextStyles = v1;
var v2 = v1.prototype;
v1.addTextStyles = function (o, bColor) {
o.addProperty('textAlign', function () {
return this._tf.align;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.align = x;
});
o.addProperty('fontWeight', function () {
return (this._tf.bold != undefined) ? (this._tf.bold ? 'bold' : 'none') : undefined;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.bold = x == 'bold';
});
if (bColor) {
o.addProperty('color', function () {
return this._tf.color;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.color = x;
});
}
o.addProperty('fontFamily', function () {
return this._tf.font;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.font = x;
});
o.addProperty('textIndent', function () {
return this._tf.indent;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.indent = x;
});
o.addProperty('fontStyle', function () {
return (this._tf.italic != undefined) ? (this._tf.italic ? 'italic' : 'none') : undefined;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.italic = x == 'italic';
});
o.addProperty('marginLeft', function () {
return this._tf.leftMargin;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.leftMargin = x;
});
o.addProperty('marginRight', function () {
return this._tf.rightMargin;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.rightMargin = x;
});
o.addProperty('fontSize', function () {
return this._tf.size;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.size = x;
});
o.addProperty('textDecoration', function () {
return (this._tf.underline != undefined) ? (this._tf.underline ? 'underline' : 'none') : undefined;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.underline = x == 'underline';
});
o.addProperty('embedFonts', function () {
return this._tf.embedFonts;
}, function (x) {
if (this._tf == undefined) {
this._tf = new TextFormat();
}
this._tf.embedFonts = x;
});
};
ASSetPropFlags(mx.styles.CSSTextStyles.prototype, null, 1);
}
#endinitclip
}
movieClip 120 __Packages.mx.styles.StyleManager {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.styles) {
_global.mx.styles = new Object();
}
if (!_global.mx.styles.StyleManager) {
var v1 = function () {};
mx.styles.StyleManager = v1;
var v2 = v1.prototype;
v1.registerInheritingStyle = function (styleName) {
mx.styles.StyleManager.inheritingStyles[styleName] = true;
};
v1.isInheritingStyle = function (styleName) {
return mx.styles.StyleManager.inheritingStyles[styleName] == true;
};
v1.registerColorStyle = function (styleName) {
mx.styles.StyleManager.colorStyles[styleName] = true;
};
v1.isColorStyle = function (styleName) {
return mx.styles.StyleManager.colorStyles[styleName] == true;
};
v1.registerColorName = function (colorName, colorValue) {
mx.styles.StyleManager.colorNames[colorName] = colorValue;
};
v1.isColorName = function (colorName) {
return mx.styles.StyleManager.colorNames[colorName] != undefined;
};
v1.getColorName = function (colorName) {
return mx.styles.StyleManager.colorNames[colorName];
};
v1.inheritingStyles = {'color': true, 'direction': true, 'fontFamily': true, 'fontSize': true, 'fontStyle': true, 'fontWeight': true, 'textAlign': true, 'textIndent': true};
v1.colorStyles = {'barColor': true, 'trackColor': true, 'borderColor': true, 'buttonColor': true, 'color': true, 'dateHeaderColor': true, 'dateRollOverColor': true, 'disabledColor': true, 'fillColor': true, 'highlightColor': true, 'scrollTrackColor': true, 'selectedDateColor': true, 'shadowColor': true, 'strokeColor': true, 'symbolBackgroundColor': true, 'symbolBackgroundDisabledColor': true, 'symbolBackgroundPressedColor': true, 'symbolColor': true, 'symbolDisabledColor': true, 'themeColor': true, 'todayIndicatorColor': true, 'shadowCapColor': true, 'borderCapColor': true, 'focusColor': true};
v1.colorNames = {'black': 0, 'white': 16777215, 'red': 16711680, 'green': 65280, 'blue': 255, 'magenta': 16711935, 'yellow': 16776960, 'cyan': 65535, 'haloGreen': 8453965, 'haloBlue': 2881013, 'haloOrange': 16761344};
v1.TextFormatStyleProps = {'font': true, 'size': true, 'color': true, 'leftMargin': false, 'rightMargin': false, 'italic': true, 'bold': true, 'align': true, 'indent': true, 'underline': false, 'embedFonts': false};
v1.TextStyleMap = {'textAlign': true, 'fontWeight': true, 'color': true, 'fontFamily': true, 'textIndent': true, 'fontStyle': true, 'lineHeight': true, 'marginLeft': true, 'marginRight': true, 'fontSize': true, 'textDecoration': true, 'embedFonts': true};
ASSetPropFlags(mx.styles.StyleManager.prototype, null, 1);
}
#endinitclip
}
movieClip 121 __Packages.mx.styles.CSSStyleDeclaration {
#initclip
if (!_global.mx) {
_global.mx = new Object();
}
if (!_global.mx.styles) {
_global.mx.styles = new Object();
}
if (!_global.mx.styles.CSSStyleDeclaration) {
var v1 = function () {};
mx.styles.CSSStyleDeclaration = v1;
var v2 = v1.prototype;
v2.__getTextFormat = function (tf, bAll) {
var v5 = false;
if (this._tf != undefined) {
var v2;
for (v2 in mx.styles.StyleManager.TextFormatStyleProps) {
if (bAll || mx.styles.StyleManager.TextFormatStyleProps[v2]) {
if (tf[v2] == undefined) {
var v3 = this._tf[v2];
if (v3 != undefined) {
tf[v2] = v3;
} else {
v5 = true;
}
}
}
}
return v5;
}
v5 = true;
return v5;
};
v2.getStyle = function (styleProp) {
var v2 = this[styleProp];
var v3 = mx.styles.StyleManager.getColorName(v2);
return (v3 == undefined) ? v2 : v3;
};
v1.classConstruct = function () {
mx.styles.CSSTextStyles.addTextStyles(mx.styles.CSSStyleDeclaration.prototype, true);
return true;
};
v1.classConstructed = mx.styles.CSSStyleDeclaration.classConstruct();
v1.CSSTextStylesDependency = mx.styles.CSSTextStyles;
ASSetPropFlags(mx.styles.CSSStyleDeclaration.prototype, null, 1);
}
#endinitclip
}
movieClip 122 __Packages.com.hexagonstar.util.debug.Debug {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.hexagonstar) {
_global.com.hexagonstar = new Object();
}
if (!_global.com.hexagonstar.util) {
_global.com.hexagonstar.util = new Object();
}
if (!_global.com.hexagonstar.util.debug) {
_global.com.hexagonstar.util.debug = new Object();
}
if (!_global.com.hexagonstar.util.debug.Debug) {
var v1 = function () {};
com.hexagonstar.util.debug.Debug = v1;
var v2 = v1.prototype;
v1.trace = function () {
var v2 = (arguments[1] != undefined) ? arguments[1] : 1;
if (v2 >= com.hexagonstar.util.debug.Debug._filterLevel && v2 < 7) {
com.hexagonstar.util.debug.Debug.send('onData', arguments[0], v2, 0);
}
};
v1.traceObj = function (obj, depth, level) {
if (!depth) {
depth = 64;
}
if (!level) {
level = 1;
}
if (level >= com.hexagonstar.util.debug.Debug._filterLevel && level < 7) {
com.hexagonstar.util.debug.Debug.send('onData', obj, level, depth);
}
};
v1.inspect = function (obj) {
com.hexagonstar.util.debug.Debug.send('onInspect', obj, 1, -1);
};
v1.hexDump = function (obj) {
com.hexagonstar.util.debug.Debug.send('onHexDump', obj, 0, 0);
};
v1.clear = function () {
com.hexagonstar.util.debug.Debug.trace('[%CLR%]', 5);
};
v1.delimiter = function () {
com.hexagonstar.util.debug.Debug.trace('[%DLT%]', 5);
};
v1.pause = function () {
com.hexagonstar.util.debug.Debug.trace('[%PSE%]', 5);
};
v1.time = function () {
com.hexagonstar.util.debug.Debug.trace('[%TME%]', 5);
};
v1.monitor = function (stage, topFPS, pollInterval) {
if (com.hexagonstar.util.debug.Debug._isPollingFPS) {
com.hexagonstar.util.debug.Debug.stop();
}
if (com.hexagonstar.util.debug.Debug._isEnabled && !com.hexagonstar.util.debug.Debug._fpsMeter) {
com.hexagonstar.util.debug.Debug._isPollingFPS = true;
com.hexagonstar.util.debug.Debug._topFPS = topFPS;
com.hexagonstar.util.debug.Debug._stage = stage;
com.hexagonstar.util.debug.Debug._fpsMeter = new com.hexagonstar.util.debug.FPSMeter(com.hexagonstar.util.debug.Debug._stage, pollInterval);
com.hexagonstar.util.debug.Debug._fpsMeter.start();
}
};
v1.mark = function (color) {
if (!color) {
color = 16711935;
}
com.hexagonstar.util.debug.Debug.send('onMarker', color, 1, -1);
};
v1.stop = function () {
if (com.hexagonstar.util.debug.Debug._fpsMeter) {
com.hexagonstar.util.debug.Debug._isPollingFPS = false;
com.hexagonstar.util.debug.Debug._fpsMeter.stop();
com.hexagonstar.util.debug.Debug._fpsMeter = null;
com.hexagonstar.util.debug.Debug._stage = null;
}
};
v1.timerStart = function (title) {
if (com.hexagonstar.util.debug.Debug._isEnabled) {
if (!com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug._stopWatch = new com.hexagonstar.util.debug.StopWatch();
}
com.hexagonstar.util.debug.Debug._stopWatch.start(title);
}
};
v1.timerStop = function () {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug._stopWatch.stop();
}
};
v1.timerReset = function () {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug._stopWatch.reset();
}
};
v1.timerInMilliSeconds = function () {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug.trace(com.hexagonstar.util.debug.Debug._stopWatch.__get__timeInMilliSeconds() + 'ms');
}
};
v1.timerInSeconds = function () {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug.trace(com.hexagonstar.util.debug.Debug._stopWatch.__get__timeInSeconds() + 's');
}
};
v1.timerToString = function () {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug.trace(com.hexagonstar.util.debug.Debug._stopWatch.toString());
}
};
v1.timerStopToString = function (reset) {
if (com.hexagonstar.util.debug.Debug._stopWatch) {
com.hexagonstar.util.debug.Debug._stopWatch.stop();
com.hexagonstar.util.debug.Debug.trace(com.hexagonstar.util.debug.Debug._stopWatch.toString());
if (reset) {
com.hexagonstar.util.debug.Debug._stopWatch.reset();
}
}
};
v1.__get__filterLevel = function () {
return com.hexagonstar.util.debug.Debug._filterLevel;
};
v1.__set__filterLevel = function (v) {
if (v >= 0 && v < 5) {
com.hexagonstar.util.debug.Debug._filterLevel = v;
}
return com.hexagonstar.util.debug.Debug.__get__filterLevel();
};
v1.__get__enabled = function () {
return com.hexagonstar.util.debug.Debug._isEnabled;
};
v1.__set__enabled = function (v) {
com.hexagonstar.util.debug.Debug._isEnabled = v;
return com.hexagonstar.util.debug.Debug.__get__enabled();
};
v1.onFPSUpdate = function () {
com.hexagonstar.util.debug.Debug.send('onFPS', com.hexagonstar.util.debug.Debug._fpsMeter.__get__fps() + ',' + com.hexagonstar.util.debug.Debug._topFPS + ',' + com.hexagonstar.util.debug.Debug._fpsMeter.__get__frt() + ',0');
};
v1.onStatus = function () {};
v1.send = function (m, d, l, r) {
if (com.hexagonstar.util.debug.Debug._isEnabled) {
if (!com.hexagonstar.util.debug.Debug._isConnected) {
com.hexagonstar.util.debug.Debug._isConnected = true;
com.hexagonstar.util.debug.Debug._connection = new LocalConnection();
}
if (r == undefined) {
r = 0;
}
var v2 = 0;
if (typeof d == 'string') {
v2 = (String(d)).length;
} else {
if (typeof d == 'object') {
}
}
if (v2 > 39000) {
com.hexagonstar.util.debug.Debug.storeDataLSO(m, d);
m = 'onLargeData';
d = null;
}
var v4 = com.hexagonstar.util.debug.Debug._connection.send('_alcon_lc', m, d, l, r, '');
if (!v4) {
com.hexagonstar.util.debug.Debug.trace('[%ERR%]');
}
}
};
v1.storeDataLSO = function (m, d) {
var v1 = SharedObject.getLocal('alcon', '/');
v1.data.alconMethod = m;
v1.data.alconData = d;
try {
var v2 = String(v1.flush());
if (v2 == 'pending') {
return undefined;
}
}
catch (v0) {
if (Error(v0) != null) {
var e = Error(v0);
} else {
throw v0;
}
}
};
v1.LEVEL_DEBUG = 0;
v1.LEVEL_INFO = 1;
v1.LEVEL_WARN = 2;
v1.LEVEL_ERROR = 3;
v1.LEVEL_FATAL = 4;
v1._filterLevel = 0;
v1._isConnected = false;
v1._isPollingFPS = false;
v1._isEnabled = true;
v1._topFPS = 25;
v1.addProperty('enabled', v1.__get__enabled, v1.__set__enabled);
v1.addProperty('filterLevel', v1.__get__filterLevel, v1.__set__filterLevel);
ASSetPropFlags(com.hexagonstar.util.debug.Debug.prototype, null, 1);
}
#endinitclip
}
movieClip 123 __Packages.com.hexagonstar.util.debug.FPSMeter {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.hexagonstar) {
_global.com.hexagonstar = new Object();
}
if (!_global.com.hexagonstar.util) {
_global.com.hexagonstar.util = new Object();
}
if (!_global.com.hexagonstar.util.debug) {
_global.com.hexagonstar.util.debug = new Object();
}
if (!_global.com.hexagonstar.util.debug.FPSMeter) {
var v1 = function (stage, pollInterval) {
this._stage = stage;
this._pollInterval = !pollInterval ? 500 : pollInterval;
this.reset();
};
com.hexagonstar.util.debug.FPSMeter = v1;
var v2 = v1.prototype;
v2.start = function () {
if (!this._isRunning) {
this._isRunning = true;
var ref = this;
this._intervalID = setInterval(function () {
com.hexagonstar.util.debug.Debug.onFPSUpdate();
}, this._pollInterval);
this._stage.onEnterFrame = function () {
var v1 = getTimer();
++ref._delay;
if (ref._delay >= ref._delayMax) {
ref._delay = 0;
ref._fps = 1000 * ref._delayMax / (v1 - ref._prev);
ref._prev = v1;
}
ref._frt = v1 - ref._ms;
ref._ms = v1;
};
}
};
v2.stop = function () {
if (this._isRunning) {
clearInterval(this._intervalID);
this.reset();
}
};
v2.reset = function () {
this._fps = 0;
this._frt = 0;
this._ms = 0;
this._isRunning = false;
};
v2.__get__fps = function () {
return this._fps;
};
v2.__get__frt = function () {
return this._frt;
};
v2._delayMax = 10;
v2.addProperty('fps', v2.__get__fps, function () {});
v2.addProperty('frt', v2.__get__frt, function () {});
ASSetPropFlags(com.hexagonstar.util.debug.FPSMeter.prototype, null, 1);
}
#endinitclip
}
movieClip 124 __Packages.com.hexagonstar.util.debug.StopWatch {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.hexagonstar) {
_global.com.hexagonstar = new Object();
}
if (!_global.com.hexagonstar.util) {
_global.com.hexagonstar.util = new Object();
}
if (!_global.com.hexagonstar.util.debug) {
_global.com.hexagonstar.util.debug = new Object();
}
if (!_global.com.hexagonstar.util.debug.StopWatch) {
var v1 = function () {
this.reset();
};
com.hexagonstar.util.debug.StopWatch = v1;
var v2 = v1.prototype;
v2.start = function (title) {
if (!this._started) {
this._title = title ? title : '';
this._started = true;
this._startTimeKeys.push(getTimer());
}
};
v2.stop = function () {
if (this._started) {
var v2 = getTimer();
this._stopTimeKeys[this._startTimeKeys.length - 1] = v2;
this._started = false;
}
};
v2.reset = function () {
this._startTimeKeys = [];
this._stopTimeKeys = [];
this._started = false;
};
v2.toString = function () {
var v5 = '\n ********************* [STOPWATCH] *********************';
if (this._title != '') {
v5 += '\n * ' + this._title;
}
var v2 = 0;
v2 = 0;
while (v2 < this._startTimeKeys.length) {
var v4 = this._startTimeKeys[v2];
var v3 = this._stopTimeKeys[v2];
v5 += '\n * started [' + this.format(v4) + 'ms] stopped [' + this.format(v3) + 'ms] time [' + this.format(v3 - v4) + 'ms]';
++v2;
}
if (v2 == 0) {
v5 += '\n * never started.';
v5 += '\n *******************************************************';
return v5;
}
v5 += '\n * total runnning time: ' + this.__get__timeInSeconds() + 's';
v5 += '\n *******************************************************';
return v5;
};
v2.__get__started = function () {
return this._started;
};
v2.__get__timeInMilliSeconds = function () {
if (this._started) {
this._stopTimeKeys[this._startTimeKeys.length - 1] = getTimer();
}
var v3 = 0;
var v2 = 0;
while (v2 < this._startTimeKeys.length) {
v3 += this._stopTimeKeys[v2] - this._startTimeKeys[v2];
++v2;
}
return v3;
};
v2.__get__timeInSeconds = function () {
return this.__get__timeInMilliSeconds() / 1000;
};
v2.format = function (v) {
var v2 = '';
var v3 = (v.toString()).length;
var v1 = 0;
while (v1 < 5 - v3) {
v2 += '0';
++v1;
}
return v2 + v;
};
v2._started = false;
v2.addProperty('started', v2.__get__started, function () {});
v2.addProperty('timeInMilliSeconds', v2.__get__timeInMilliSeconds, function () {});
v2.addProperty('timeInSeconds', v2.__get__timeInSeconds, function () {});
ASSetPropFlags(com.hexagonstar.util.debug.StopWatch.prototype, null, 1);
}
#endinitclip
}
frame 2 {
fscommand('allowscale', false);
var CPMStarContentSpotID = '1119QFB32428D';
System.security.allowDomain('server.cpmstar.com');
adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + CPMStarContentSpotID);
_root.attachMovie('preloaderLogo', 'preloaderlogo', _root.getNextHighestDepth(), {'_x': 320, '_y': 135, '_alpha': 0});
onEnterFrame = function () {
urlStart = _url.indexOf('://') + 3;
urlEnd = _url.indexOf('/', urlStart);
domain = _url.substring(urlStart, urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain != 'gimme5games.com') {
_root.preloaderlogo._alpha = 0;
} else {
_root.preloaderlogo._alpha = 100;
adBox._x = 50000;
adBox._y = 50000;
}
};
Stage.showMenu = false;
stop();
}
instance g5PreLoader of movieClip 70 movLoader {
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
var percent = Math.round((bytes_loaded / bytes) * 100);
if (bytes_loaded != bytes) {
_root.gotoAndStop(2);
this.txtPercent.text = percent + '% loaded';
}
}
}
instance of movieClip 57 playButton2 {
onClipEvent (load) {
var frame = 1;
this.enabled = false;
}
onClipEvent (enterFrame) {
var bytes = _root.getBytesTotal();
var bytes_loaded = _root.getBytesLoaded();
_alpha = 0;
this.gotoAndStop(frame);
this.onRollOver = function () {
frame = 2;
};
this.onRollOut = function () {
frame = 1;
};
if (bytes_loaded == bytes) {
_alpha = 100;
_root.g5PreLoader.txtPercent.text = '100% loaded';
this.enabled = true;
this.onPress = function () {
_root.g6PreLoader.removeMovieClip();
_root.adBox.removeMovieClip();
_root.preloaderlogo.removeMovieClip();
_root.blackbg.removeMovieClip();
_root.gotoAndPlay(4);
this.removeMovieClip();
};
}
}
}
movieClip 127 {
}
movieClip 163 PowerBar {
#initclip
Object.registerClass('PowerBar', PowerBar);
#endinitclip
}
movieClip 165 PowerBarFrame {
#initclip
Object.registerClass('PowerBarFrame', PowerBarFrame);
#endinitclip
}
movieClip 168 XpBar {
#initclip
Object.registerClass('XpBar', XpBar);
#endinitclip
}
movieClip 171 XpBarFrame {
#initclip
Object.registerClass('XpBarFrame', XpBarFrame);
#endinitclip
}
movieClip 174 Background {
}
movieClip 186 ClickPad {
#initclip
Object.registerClass('ClickPad', ClickPad);
#endinitclip
}
movieClip 199 GoSubmit {
}
movieClip 210 GoPmg {
}
movieClip 212 sponsoredBy {
}
movieClip 213 GameOverMenu {
#initclip
Object.registerClass('GameOverMenu', GameOverMenu);
#endinitclip
}
// unknown tag 88 length 69
movieClip 223 Instructions {
#initclip
Object.registerClass('Instructions', Instructions);
#endinitclip
}
movieClip 226 Ozone {
}
movieClip 242 GoButton {
}
movieClip 259 Indicator {
#initclip
Object.registerClass('Indicator', Indicator);
#endinitclip
}
movieClip 267 MainHigh {
}
movieClip 278 MainPmg {
}
movieClip 289 MainStart {
}
movieClip 303 UpgradeButton {
}
movieClip 319 Tool {
#initclip
Object.registerClass('Tool', Tool);
#endinitclip
}
movieClip 328 Emp {
#initclip
Object.registerClass('Emp', Emp);
#endinitclip
}
movieClip 331 Empty {
}
movieClip 332 FadeOutRect {
#initclip
Object.registerClass('FadeOutRect', FadeOutRect);
#endinitclip
}
movieClip 333 Game {
#initclip
Object.registerClass('Game', Game);
#endinitclip
}
movieClip 335 game_music_symbol {
frame 1 {
stop();
}
}
movieClip 361 GreyM {
#initclip
Object.registerClass('GreyM', GreyM);
#endinitclip
}
movieClip 369 Heart {
#initclip
Object.registerClass('Heart', Heart);
#endinitclip
}
// unknown tag 88 length 85
movieClip 372 HighScore {
#initclip
Object.registerClass('HighScore', HighScore);
#endinitclip
}
movieClip 374 HitBox {
}
movieClip 378 presentedBy {
}
movieClip 379 MainMenu {
#initclip
Object.registerClass('MainMenu', MainMenu);
#endinitclip
}
movieClip 381 menu_music_symbol {
frame 1 {
stop();
}
}
movieClip 385 MouseHandler {
#initclip
Object.registerClass('MouseHandler', MouseHandler);
#endinitclip
}
movieClip 388 MouseImage {
#initclip
Object.registerClass('MouseImage', MouseImage);
#endinitclip
}
movieClip 391 Large {
#initclip
Object.registerClass('Large', Large);
#endinitclip
}
movieClip 394 Medium {
#initclip
Object.registerClass('Medium', Medium);
#endinitclip
}
movieClip 397 MotherShip {
#initclip
Object.registerClass('MotherShip', MotherShip);
#endinitclip
}
movieClip 400 Nano {
#initclip
Object.registerClass('Nano', Nano);
#endinitclip
}
movieClip 414 NanoExp {
#initclip
Object.registerClass('NanoExp', NanoExp);
#endinitclip
}
movieClip 421 PowerUp {
#initclip
Object.registerClass('PowerUp', PowerUp);
#endinitclip
}
// unknown tag 88 length 85
movieClip 432 ShopMenu {
#initclip
Object.registerClass('ShopMenu', ShopMenu);
#endinitclip
}
movieClip 462 WoblyWare {
}
movieClip 464 XpBonus {
#initclip
Object.registerClass('XpBonus', XpBonus);
#endinitclip
}
movieClip 467 {
}
movieClip 471 {
}
movieClip 473 {
}
movieClip 475 {
}
movieClip 476 movSplash {
#initclip
Object.registerClass('movSplash', movSplash);
#endinitclip
}
movieClip 478 butMoreGames {
#initclip
Object.registerClass('butMoreGames', butMoreGames);
#endinitclip
}
movieClip 479 {
}
frame 4 {
_root.attachMovie('movSplash', 'movsplash', _root.getNextHighestDepth());
stop();
}
frame 5 {
this.attachMovie('GameHandler', 'gameHandler', _root.getNextHighestDepth());
stop();
}
instance hiScores of movieClip 117 ZattikkaHiScores {
onClipEvent (construct) {
enabled = true;
visible = true;
minHeight = 0;
minWidth = 0;
}
}