Frame 1
stop();
Symbol 17 MovieClip Frame 1
var num_BytesTotal = _root.getBytesTotal();
trace("num_BytesTotal=" + num_BytesTotal);
this.onEnterFrame = function () {
this.mc_1._x = this.mc_1._x + 3;
this.mc_2._x = this.mc_2._x + 3;
this.mc_3._x = this.mc_3._x + 3;
this.mc_4._x = this.mc_4._x + 3;
if (this.mc_1._x >= 400) {
this.mc_1._x = 100;
}
if (this.mc_2._x >= 400) {
this.mc_2._x = 100;
}
if (this.mc_3._x >= 400) {
this.mc_3._x = 100;
}
if (this.mc_4._x >= 400) {
this.mc_4._x = 100;
}
trace("BytesLoaded=" + _root.getBytesLoaded());
if (this.num_BytesTotal == _root.getBytesLoaded()) {
_root.gotoAndStop(2);
delete this.onEnterFrame;
}
};
Symbol 22 MovieClip [BG] Frame 1
#initclip 27
Object.registerClass("BG", BG);
#endinitclip
Symbol 29 MovieClip [me] Frame 1
#initclip 16
Object.registerClass("me", Me);
#endinitclip
Symbol 46 MovieClip Frame 1
stop();
Symbol 78 MovieClip Frame 1
stop();
this.onRelease = function () {
getURL ("http://www.gamefalls.com", "_blank");
};
this.onRollOver = function () {
this.gotoAndStop(2);
};
this.onRollOut = function () {
this.gotoAndStop(1);
};
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 12
gotoAndStop (1);
Symbol 83 MovieClip [WarField] Frame 1
#initclip 17
Object.registerClass("WarField", WarField);
#endinitclip
Symbol 86 MovieClip [FinishDialog] Frame 1
#initclip 18
Object.registerClass("FinishDialog", FinishDialog);
#endinitclip
Symbol 104 MovieClip [SoundCheckBox] Frame 1
#initclip 19
Object.registerClass("SoundCheckBox", CheckBox_);
#endinitclip
Symbol 128 MovieClip [help] Frame 1
#initclip 20
Object.registerClass("help", Help);
#endinitclip
Symbol 131 MovieClip [HightScore] Frame 1
#initclip 21
Object.registerClass("HightScore", HightScore);
#endinitclip
Symbol 132 MovieClip [StartDialog] Frame 1
#initclip 22
Object.registerClass("StartDialog", StartDialog);
#endinitclip
Symbol 133 MovieClip [Controller] Frame 1
#initclip 23
Object.registerClass("Controller", Controller);
#endinitclip
Symbol 134 MovieClip [bgItem] Frame 1
#initclip 24
Object.registerClass("bgItem", BgItem);
#endinitclip
Symbol 147 MovieClip [vodorosl] Frame 1
#initclip 25
Object.registerClass("vodorosl", Vodorosl);
#endinitclip
Symbol 220 MovieClip [bonusExpl1] Frame 1
stop();
Symbol 220 MovieClip [bonusExpl1] Frame 22
this.removeMovieClip();
this.unloadMovie();
Symbol 222 MovieClip [BonusExpl2] Frame 1
stop();
Symbol 222 MovieClip [BonusExpl2] Frame 22
this.removeMovieClip();
this.unloadMovie();
Symbol 224 MovieClip [BonusExpl3] Frame 1
stop();
Symbol 224 MovieClip [BonusExpl3] Frame 22
this.removeMovieClip();
this.unloadMovie();
Symbol 274 MovieClip [Expl] Frame 1
stop();
Symbol 274 MovieClip [Expl] Frame 21
this.removeMovieClip();
this.unloadMovie();
Symbol 284 MovieClip [death1] Frame 1
stop();
Symbol 284 MovieClip [death1] Frame 10
this.removeMovieClip();
Symbol 302 MovieClip [death2] Frame 1
stop();
Symbol 302 MovieClip [death2] Frame 18
this.removeMovieClip();
Symbol 316 MovieClip [bubble] Frame 1
#initclip 26
Object.registerClass("bubble", Bubble);
#endinitclip
Symbol 318 MovieClip Frame 1
stop();
Symbol 319 MovieClip [__Packages.Me] Frame 0
class Me extends MovieClip
{
var gotoAndStop, minX, minY, maxX, _width, maxY, _height, _parent, hp, _x, _y, xSpeed, ySpeed, expl, onEnterFrame, _visible, idsi_Speed;
function Me () {
super();
gotoAndStop(3);
minX = 0;
minY = 0;
maxX = 550 - _width;
maxY = 400 - _height;
_parent.setHP(hp);
}
function getHp() {
return(hp);
}
function putBubble(probability) {
var _local4 = Math.random();
if (_local4 < probability) {
var _local3 = _parent.getNextHighestDepth();
var _local2 = _parent.attachMovie("bubble", "bubble" + String(_local3), _local3);
_local2.setSpeed(_parent.getSpeed());
_local2._x = _x - 10;
_local2._y = _y + 10;
}
}
function changeXSpeed(a) {
trace("a=" + a);
if ((xSpeed + a) < (-maxSpeed)) {
xSpeed = -maxSpeed;
} else if ((xSpeed + a) > maxSpeed) {
xSpeed = maxSpeed;
} else if (((xSpeed / (xSpeed + a)) < 0) and (xSpeed != 0)) {
xSpeed = 0;
} else {
xSpeed = xSpeed + a;
}
}
function changeYSpeed(a) {
trace("a=" + a);
if ((ySpeed + a) < (-maxSpeed)) {
ySpeed = -maxSpeed;
} else if ((ySpeed + a) > maxSpeed) {
ySpeed = maxSpeed;
} else if (((ySpeed / (ySpeed + a)) < 0) and (ySpeed != 0)) {
ySpeed = 0;
} else {
ySpeed = ySpeed + a;
}
}
function checkMove() {
if (Key.isDown(39)) {
changeXSpeed(2 * a_);
if (((_x + xSpeed) > minX) and ((_x + xSpeed) < maxX)) {
_x = _x + xSpeed;
expl._x = expl._x + xSpeed;
} else {
if ((_x + xSpeed) < minX) {
var _local3 = _x - minX;
_x = _x - _local3;
expl._x = expl._x - xSpeed;
} else if ((_x + xSpeed) > maxX) {
var _local3 = maxX - _x;
_x = _x + _local3;
expl._x = expl._x + xSpeed;
}
xSpeed = 0;
}
} else if (Key.isDown(37)) {
changeXSpeed((-a_) * 2);
if (((_x + xSpeed) > minX) and ((_x + xSpeed) < maxX)) {
_x = _x + xSpeed;
expl._x = expl._x + xSpeed;
} else {
if ((_x + xSpeed) < minX) {
var _local3 = _x - minX;
_x = _x - _local3;
expl._x = expl._x - xSpeed;
} else if ((_x + xSpeed) > maxX) {
var _local3 = maxX - _x;
_x = _x + _local3;
expl._x = expl._x + xSpeed;
}
xSpeed = 0;
}
} else if (Math.abs(xSpeed) > 0) {
if (((_x + xSpeed) > minX) and ((_x + xSpeed) < maxX)) {
changeXSpeed((a_ * ((-xSpeed) / Math.abs(xSpeed))) / 2);
_x = _x + xSpeed;
expl._x = expl._x + xSpeed;
} else {
if ((_x + xSpeed) < minX) {
var _local3 = _x - minX;
_x = _x - _local3;
expl._x = expl._x - xSpeed;
} else if ((_x + xSpeed) > maxX) {
var _local3 = maxX - _x;
_x = _x + _local3;
expl._x = expl._x + xSpeed;
}
xSpeed = 0;
}
}
if (Key.isDown(40)) {
changeYSpeed(a_ * 2);
if (((_y + ySpeed) > minY) and ((_y + ySpeed) < maxY)) {
_y = _y + ySpeed;
expl._y = expl._y + ySpeed;
} else {
if ((_y + ySpeed) < minY) {
var _local2 = _y - minY;
_y = _y - _local2;
expl._y = expl._y - ySpeed;
} else if ((_y + ySpeed) > maxY) {
var _local2 = maxY - _y;
_y = _y + _local2;
expl._y = expl._y + ySpeed;
}
ySpeed = 0;
}
} else if (Key.isDown(38)) {
changeYSpeed((-a_) * 2);
if (((_y + ySpeed) > minY) and ((_y + ySpeed) < maxY)) {
_y = _y + ySpeed;
expl._y = expl._y + ySpeed;
} else {
if ((_y + ySpeed) < minY) {
var _local2 = _y - minY;
_y = _y - _local2;
expl._y = expl._y - ySpeed;
} else if ((_y + ySpeed) > maxY) {
var _local2 = maxY - _y;
_y = _y + _local2;
expl._y = expl._y + ySpeed;
}
ySpeed = 0;
}
} else if (Math.abs(ySpeed) > 0) {
if (((_y + ySpeed) > minY) and ((_y + ySpeed) < maxY)) {
changeYSpeed((a_ * ((-ySpeed) / Math.abs(ySpeed))) / 2);
_y = _y + ySpeed;
expl._y = expl._y + ySpeed;
} else {
if ((_y + ySpeed) < minY) {
var _local2 = _y - minY;
_y = _y - _local2;
expl._y = expl._y - ySpeed;
} else if ((_y + ySpeed) > maxY) {
var _local2 = maxY - _y;
_y = _y + _local2;
expl._y = expl._y + ySpeed;
}
ySpeed = 0;
}
}
checkPosition();
}
function checkPosition() {
currentPos = Math.round((20 * ySpeed) / maxSpeed);
trace("currentPos=" + currentPos);
if (currentPos == 0) {
gotoAndStop(3);
} else if ((currentPos > 0) and (currentPos <= 10)) {
gotoAndStop(2);
} else if (currentPos > 10) {
gotoAndStop(1);
} else if ((currentPos < 0) and (currentPos >= -10)) {
gotoAndStop(4);
} else if (currentPos < -10) {
gotoAndStop(5);
}
}
function strike() {
hp--;
_parent.redBlink();
_parent.setHP(hp);
if (hp == 0) {
explode();
}
}
function explode() {
delete onEnterFrame;
BubbleProbability = 0;
_parent.endGame();
expl._visible = true;
expl.play();
_visible = false;
trace("ship has been destroyed");
}
function getBonus(bonusType) {
if (bonusType == 1) {
trace("get score");
score = score + 100;
} else if (bonusType == 2) {
trace("get speed");
maxSpeed = 15;
a_ = startA * 3;
BubbleProbability = 0.5;
clearInterval(idsi_Speed);
idsi_Speed = setInterval(this, "resetSpeed", 10000);
} else if (bonusType == 3) {
trace("get health");
if ((hp + 1) <= 10) {
hp++;
_parent.setHP(hp);
}
}
}
function resetSpeed() {
BubbleProbability = 0.1;
maxSpeed = startMaxSpeed;
a_ = startA;
}
function resetParam() {
onEnterFrame = function () {
this.checkMove();
this.putBubble(this.BubbleProbability);
this.score = this.score + 0.1;
this._parent.showScore(this.score);
};
if (expl != undefined) {
expl.removeMovieClip();
}
expl = _parent.attachMovie("Expl", "ship_expl", _parent.getNextHighestDepth());
expl._x = _x - (_width * 0.7);
expl._y = _y - (_height * 0.7);
expl._width = _width * 2.4;
expl._height = _height * 2.4;
expl._visible = false;
xSpeed = 0;
ySpeed = 0;
a_ = startA;
maxSpeed = startMaxSpeed;
hp = startHp;
_parent.setHP(hp);
BubbleProbability = 0.1;
score = 0;
_parent.setScore(score);
}
var currentPos = 0;
var maxCurPos = 6;
var startMaxSpeed = 6;
var maxSpeed = Me.prototype.startMaxSpeed;
var startA = 0.5;
var a_ = Me.prototype.startA;
var BubbleProbability = 0.1;
var score = 0;
var startHp = 10;
}
Symbol 320 MovieClip [__Packages.WarField] Frame 0
class WarField extends MovieClip
{
var arr_Enemys, btnMenu, getNextHighestDepth, speed, mc_Me, lvl, startTime, onEnterFrame, tf_Score, mc_Health, _parent, mc_redBlink;
function WarField () {
super();
arr_Enemys = new Array();
btnMenu.onRelease = function () {
this._parent.menu_();
};
}
function putEnemy(probability) {
if (enemysCounter < 10) {
var _local4 = Math.random();
if (_local4 < probability) {
var _local2 = String(getNextHighestDepth());
var _local3 = new Enemy(this, _local2);
_local3.setSpeedX(speed);
arr_Enemys[_local2] = _local3;
enemysCounter++;
}
}
}
function putMegaEnemy(probability) {
if (enemysCounter < 10) {
var _local4 = Math.random();
if (_local4 < probability) {
var _local2 = String(getNextHighestDepth());
var _local3 = new MegaEnemy(this, _local2, speed);
_local3.setDirection(mc_Me._x, mc_Me._y);
arr_Enemys[_local2] = _local3;
enemysCounter++;
}
}
}
function putRandomBonus(probability) {
var _local2 = Math.random();
if (_local2 < probability) {
var _local4 = String(getNextHighestDepth());
var _local3 = new Bonus(this, mc_Me);
}
}
function setLvl(lvl) {
this.lvl = lvl;
speed = 3 + (lvl * 2);
}
function deleteEnemy(id) {
delete arr_Enemys[id];
enemysCounter--;
}
function start_() {
mc_Me._x = 10;
mc_Me._y = 50;
mc_Me._visible = true;
mc_Me.resetParam();
enemyProbability = startEnemyProbability;
megaEnemyProbability = startMegaEnemyProbability;
bonusProbability = startBonusProbability;
startTime = getTimer();
var ths = this;
onEnterFrame = function () {
ths.putEnemy(this.enemyProbability);
ths.putMegaEnemy(this.megaEnemyProbability);
ths.putRandomBonus(this.bonusProbability);
ths.checkStrikes();
ths.enemyProbability = ths.enemyProbability + 1E-5;
ths.megaEnemyProbability = ths.megaEnemyProbability + 1E-5;
ths.speed = ths.speed + 0.002;
};
}
function stop_() {
delete onEnterFrame;
}
function checkStrikes() {
flagForCheck = !flagForCheck;
if (flagForCheck) {
for (var _local2 in arr_Enemys) {
if (arr_Enemys[_local2].hitTest_(mc_Me)) {
mc_Me.strike();
}
}
}
}
function getBonus(bonusType) {
mc_Me.getBonus(bonusType);
}
function showScore(val) {
score = val;
val = Math.round(val);
tf_Score.text = String(val);
}
function setHP(val) {
mc_Health.gotoAndStop(val + 1);
}
function getSpeed() {
return(speed);
}
function menu_() {
stop_();
enemyProbability = 0;
megaEnemyProbability = 0;
bonusProbability = 0;
_parent.menu_();
}
function endGame() {
stop_();
enemyProbability = 0;
megaEnemyProbability = 0;
bonusProbability = 0;
_parent.endGame();
}
function getScore() {
return(Number(tf_Score.text));
}
function redBlink() {
mc_redBlink.gotoAndPlay(2);
}
var score = 0;
var startEnemyProbability = 0.005;
var startMegaEnemyProbability = 0.009;
var startBonusProbability = 0.01;
var enemyProbability = WarField.prototype.startEnemyProbability;
var megaEnemyProbability = WarField.prototype.startMegaEnemyProbability;
var bonusProbability = WarField.prototype.startBonusProbability;
var enemysCounter = 0;
var flagForCheck = false;
}
Symbol 321 MovieClip [__Packages.Enemy] Frame 0
class Enemy extends MovieClip
{
var container, id, mc, mc_Destr;
function Enemy (container, id) {
super();
this.container = container;
this.id = id;
if (number > 1) {
var _local5 = Math.round(Math.random() * (number - 1)) + 1;
} else {
var _local5 = 1;
}
var _local4 = "Enemy" + String(_local5);
mc = container.attachMovie(_local4, (_local4 + "-") + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc.cacheAsBitmap = true;
mc._x = 550;
mc._y = (Math.random() * 370) - 20;
_local4 = "Expl";
mc_Destr = container.attachMovie(_local4, (_local4 + "-") + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc_Destr._visible = false;
mc_Destr._x = mc._x - (0.6 * mc._width);
mc_Destr._y = mc._y - (0.6 * mc._height);
mc_Destr._width = mc._width * 2.2;
mc_Destr._height = mc._height * 2.2;
var ths = this;
mc.onEnterFrame = function () {
this._x = this._x - ths.speedX;
if (this._x <= (-this._width)) {
ths.deleteThis();
}
};
mc_Destr.onEnterFrame = function () {
this._x = this._x - ths.speedX;
};
}
function getMc() {
return(mc);
}
function deleteThis() {
removeMc();
container.deleteEnemy(id);
}
function setSpeedX(val) {
speedX = val;
}
function removeMc() {
mc.removeMovieClip();
mc_Destr.removeMovieClip();
}
function hitTest_(mc_) {
if (alive) {
if (mc.mc_HitRect.hitTest(mc_) and (mc_.getHp() > 0)) {
explode();
alive = false;
return(true);
}
}
return(false);
}
function explode() {
mc._visible = false;
mc_Destr._visible = true;
mc_Destr.play();
}
var speedX = 0;
var number = 2;
var alive = true;
}
Symbol 322 MovieClip [__Packages.MegaEnemy] Frame 0
class MegaEnemy extends MovieClip
{
var container, id, mc, mc_Destr;
function MegaEnemy (container, id, speed) {
super();
this.speed = speed * 1.5;
this.container = container;
this.id = id;
if (number > 1) {
var _local4 = Math.round(Math.random() * (number - 1)) + 1;
} else {
var _local4 = 1;
}
var _local5 = "MegaEnemy" + String(_local4);
var _local6 = (("MegaEnemy" + String(_local4)) + "-") + String(container.getNextHighestDepth());
mc = container.attachMovie(_local5, _local6, container.getNextHighestDepth());
mc.cacheAsBitmap = true;
mc._x = 550;
mc._y = (Math.random() * 370) - 20;
_local5 = "death" + String(_local4);
_local6 = (_local5 + "-") + String(container.getNextHighestDepth());
mc_Destr = container.attachMovie(_local5, _local6, container.getNextHighestDepth());
mc_Destr._visible = false;
mc_Destr._x = mc._x;
mc_Destr._y = mc._y;
mc_Destr._width = mc._width;
mc_Destr._height = mc._height;
var ths = this;
mc.onEnterFrame = function () {
this._x = this._x - ths.speedX;
this._y = this._y + ths.speedY;
if (this._x <= (-this._width)) {
ths.deleteThis();
}
ths.putBubble(0.2);
};
mc_Destr.onEnterFrame = function () {
this._x = this._x - ths.speedX;
this._y = this._y + ths.speedY;
};
}
function putBubble(probability) {
var _local4 = Math.random();
if (_local4 < probability) {
var _local3 = container.getNextHighestDepth();
var _local2 = container.attachMovie("bubble", "bubble" + String(_local3), _local3);
_local2._x = mc._x - 10;
_local2._y = mc._y + 10;
_local2.setSpeed(container.getSpeed());
}
}
function getMc() {
return(mc);
}
function deleteThis() {
removeMc();
container.deleteEnemy(id);
}
function setDirection(x2, y2) {
var _local3 = mc._x;
var _local2 = mc._y;
var _local5 = Math.sqrt(((x2 - _local3) * (x2 - _local3)) + ((y2 - _local2) * (y2 - _local2)));
var _local8 = (x2 - _local3) / _local5;
var _local4 = (y2 - _local2) / _local5;
speedX = (-speed) * _local8;
speedY = speed * _local4;
mc._rotation = ((Math.acos(_local4) * 180) / 3.14) - 90;
mc_Destr._rotation = ((Math.acos(_local4) * 180) / 3.14) - 90;
}
function removeMc() {
mc.removeMovieClip();
mc_Destr.removeMovieClip();
}
function hitTest_(mc_) {
if (alive) {
if (mc.mc_HitRect.hitTest(mc_) and (mc_.getHp() > 0)) {
explode();
alive = false;
return(true);
}
}
return(false);
}
function explode() {
mc._visible = false;
mc_Destr._visible = true;
mc_Destr.play();
}
var speed = 10;
var speedX = 0;
var speedY = 0;
var number = 2;
var alive = true;
}
Symbol 323 MovieClip [__Packages.Bonus] Frame 0
class Bonus extends MovieClip
{
var ship, container, bonusType, mc, mc_Destr;
function Bonus (container, ship) {
super();
this.ship = ship;
this.container = container;
if (number > 1) {
var _local4 = Math.round(Math.random() * (number - 1)) + 1;
} else {
var _local4 = 1;
}
bonusType = _local4;
var _local5 = "Bonus" + String(_local4);
mc = container.attachMovie(_local5, (_local5 + "-") + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc.cacheAsBitmap = true;
mc._x = (Math.random() * 400) + 200;
mc._y = 450;
_local5 = "bonusExpl" + String(_local4);
mc_Destr = container.attachMovie(_local5, (_local5 + "-") + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc_Destr._visible = false;
mc_Destr._width = mc._width * 2;
mc_Destr._yscale = mc_Destr._xscale;
var ths = this;
mc.onEnterFrame = function () {
ths.doMove();
ths.hitTest_(ths.ship);
};
}
function doMove() {
xSpeed = xSpeed + (1 - random(3));
if (Math.abs(xSpeed) > XSPEED) {
xSpeed = 0;
}
var _local2 = XSPEED + xSpeed;
mc._x = mc._x - _local2;
mc._y = mc._y - YSPEED;
mc_Destr._x = mc_Destr._x - _local2;
mc_Destr._y = mc_Destr._y - YSPEED;
if (mc._y < -50) {
deleteThis();
}
}
function deleteThis() {
removeMc();
}
function removeMc() {
mc.removeMovieClip();
mc_Destr.removeMovieClip();
}
function hitTest_(mc_) {
if (alive) {
if (mc.hitTest(mc_) and (mc_.getHp() > 0)) {
explode();
alive = false;
container.getBonus(bonusType);
return(true);
}
}
return(false);
}
function explode() {
mc._visible = false;
mc_Destr._x = mc._x;
mc_Destr._y = mc._y - (mc_Destr._height - mc._height);
mc_Destr._visible = true;
mc_Destr.play();
}
static var XSPEED = 4;
static var YSPEED = 4;
var xSpeed = 0;
var number = 3;
var alive = true;
}
Symbol 324 MovieClip [__Packages.FinishDialog] Frame 0
class FinishDialog extends MovieClip
{
var onMouseDown, _parent;
function FinishDialog () {
super();
}
function init() {
onMouseDown = mouseDown_;
}
function mouseDown_() {
_parent.addScore();
delete onMouseDown;
}
}
Symbol 325 MovieClip [__Packages.CheckBox_] Frame 0
class CheckBox_ extends MovieClip
{
var onRelease, bool_selected, gotoAndStop, _parent;
function CheckBox_ () {
super();
onRelease = function () {
this.click_();
};
}
function onLoad() {
choose();
}
function click_() {
if (bool_selected) {
unchoose();
} else {
choose();
}
}
function choose() {
bool_selected = true;
gotoAndStop(1);
_parent.soundOn();
}
function unchoose() {
bool_selected = false;
gotoAndStop(2);
trace("this=" + this);
trace("this._parent=" + _parent);
_parent.soundOff();
}
function getChoosen() {
return(bool_selected);
}
}
Symbol 326 MovieClip [__Packages.Help] Frame 0
class Help
{
var btnLock, btn_Close, btnRules, btnEnemys, btnBonuses, mc_Bonuses, mc_Enemys, mc_Rules;
function Help () {
btnLock.useHandCursor = false;
showRules();
var ths = this;
btn_Close.onRelease = function () {
ths._visible = false;
};
btnRules.onRelease = function () {
ths.showRules();
};
btnEnemys.onRelease = function () {
ths.showEnemys();
};
btnBonuses.onRelease = function () {
ths.showBonuses();
};
}
function showBonuses() {
mc_Bonuses._visible = true;
mc_Enemys._visible = false;
mc_Rules._visible = false;
}
function showEnemys() {
mc_Bonuses._visible = false;
mc_Enemys._visible = true;
mc_Rules._visible = false;
}
function showRules() {
mc_Bonuses._visible = false;
mc_Enemys._visible = false;
mc_Rules._visible = true;
}
}
Symbol 327 MovieClip [__Packages.HightScore] Frame 0
class HightScore extends MovieClip
{
var btnLock, arrRows, btn_Close, attachMovie, getNextHighestDepth;
function HightScore () {
super();
btnLock.useHandCursor = false;
arrRows = new Array();
btn_Close.onRelease = function () {
this._parent._visible = false;
this._parent.removeAllRows();
};
}
function sortScore(arrScore) {
var _local3 = 0;
while (_local3 < (arrScore.length - 1)) {
var _local2 = _local3 + 1;
while (_local2 < arrScore.length) {
if (arrScore[_local3].score_ < arrScore[_local2].score_) {
var _local4 = arrScore[_local3].score_;
var _local5 = arrScore[_local3].name_;
arrScore[_local3].score_ = arrScore[_local2].score_;
arrScore[_local3].name_ = arrScore[_local2].name_;
arrScore[_local2].score_ = _local4;
arrScore[_local2].name_ = _local5;
}
_local2++;
}
_local3++;
}
}
function addScore(score_) {
trace("HighScores=" + score_);
var _local3 = getScoreArray();
var _local2 = 0;
_local2 = 0;
while (_local2 < _local3.length) {
if (_local3[_local2].score_ < score_) {
showScoreWithInputDialog(_local2, score_, _local3);
return(undefined);
}
_local2++;
}
showScoreWithInputDialog(_local2, score_, _local3);
return(undefined);
}
function showScoreWithInputDialog(place, score, arrScore) {
trace("place=" + place);
var _local2 = 0;
while (_local2 < (arrScore.length + 1)) {
trace("this.arrRows.length=" + arrRows.length);
trace("i=" + _local2);
trace("place=" + place);
if (arrRows.length < 10) {
if (_local2 == place) {
trace("i=0");
var _local3 = new MovieClip();
_local3 = attachMovie("inputDialog", "inputDialog" + String(getNextHighestDepth()), getNextHighestDepth());
_local3._x = 80;
_local3._y = (100 + (arrRows.length * 23)) - 8.4;
_local3.tf_Number.text = String(arrRows.length + 1) + ".";
_local3.tf_Score.text = score;
_local3.tf_Name.onSetFocus = function () {
this.text = "";
};
var ths = this;
_local3.btnSubmit.onRelease = function () {
ths.submitScore(place, score, this._parent.tf_Name.text, arrScore);
};
arrRows.push(_local3);
}
trace("arrScore[i].score_=" + arrScore[_local2].score_);
trace("arrScore[i].name_=" + arrScore[_local2].name_);
if ((arrRows.length < 10) and (arrScore[_local2] != undefined)) {
var _local3 = new MovieClip();
_local3 = attachMovie("ScoreRow", "ScoreRow" + String(getNextHighestDepth()), getNextHighestDepth());
_local3._x = 80;
_local3._y = 100 + (arrRows.length * 23);
_local3.tf_Number.text = String(arrRows.length + 1) + ".";
_local3.tf_Name.text = arrScore[_local2].name_;
_local3.tf_Score.text = arrScore[_local2].score_;
arrRows.push(_local3);
}
}
_local2++;
}
}
function removeAllRows() {
var _local2 = 0;
while (_local2 < arrRows.length) {
arrRows[_local2].removeMovieClip();
_local2++;
}
arrRows.length = 0;
}
function submitScore(place, score, name_, arrScore) {
trace("submit");
var _local3 = new Array();
var _local2 = 0;
while (_local2 < (arrScore.length + 1)) {
if (_local2 == place) {
if (_local3.length < 10) {
var _local5 = new Object();
_local5.score_ = score;
_local5.name_ = name_;
_local3.push(_local5);
}
if ((_local3.length < 10) and (arrScore[_local2] != undefined)) {
_local3.push(arrScore[_local2]);
}
} else if ((_local3.length < 10) and (arrScore[_local2] != undefined)) {
_local3.push(arrScore[_local2]);
}
_local2++;
}
var _local9 = SharedObject.getLocal("micro");
traceArr(_local3);
_local9.data.arrScore = _local3;
_local9.flush();
removeAllRows();
showScore();
}
function traceArr(arr) {
var _local1 = 0;
while (_local1 < arr.length) {
trace((("name=" + arr[_local1].name_) + " score=") + arr[_local1].score_);
_local1++;
}
}
function getScoreArray() {
var _local1 = SharedObject.getLocal("micro");
if (_local1.data.arrScore == undefined) {
_local1.data.arrScore = new Array();
}
return(_local1.data.arrScore);
}
function showScore() {
var _local4 = getScoreArray();
sortScore(_local4);
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = attachMovie("ScoreRow", "ScoreRow" + String(_local2), getNextHighestDepth());
_local3._x = 80;
_local3._y = 100 + (_local2 * 23);
_local3.tf_Number.text = String(_local2 + 1) + ".";
_local3.tf_Name.text = _local4[_local2].name_;
_local3.tf_Score.text = _local4[_local2].score_;
arrRows.push(_local3);
_local2++;
}
}
}
Symbol 328 MovieClip [__Packages.StartDialog] Frame 0
class StartDialog extends MovieClip
{
var mcScore, mcHelp, btnStart, btnHelp, btnScore, _parent;
function StartDialog () {
super();
mcScore._visible = false;
mcHelp._visible = false;
var ths = this;
btnStart.onRelease = function () {
ths._parent.startGame();
};
btnHelp.onRelease = function () {
ths.showHelp();
};
btnScore.onRelease = function () {
ths.showHighScores();
};
}
function showHighScores() {
mcScore._visible = true;
mcScore.showScore();
}
function showHelp() {
mcHelp._visible = true;
}
function addScore(score) {
mcScore._visible = true;
mcScore.addScore(score);
}
function soundOff() {
_parent.soundOff();
}
function soundOn() {
_parent.soundOn();
}
}
Symbol 329 MovieClip [__Packages.Controller] Frame 0
class Controller extends MovieClip
{
var mc_WarField, mc_FinishDialog, mc_StartDialog, mc_BG, playSound, lvl;
function Controller () {
super();
mc_WarField._visible = false;
mc_FinishDialog._visible = false;
mc_StartDialog._visible = false;
mc_BG._visible = false;
}
function onLoad() {
playSound = new Sound();
playSound.attachSound("menuSound");
playSound.setVolume(20);
playSound.start();
showStartDialog();
}
function showStartDialog() {
mc_WarField._visible = false;
mc_FinishDialog._visible = false;
mc_BG._visible = false;
mc_StartDialog._visible = true;
}
function startGame() {
var _local2 = 1;
mc_WarField._visible = true;
mc_FinishDialog._visible = false;
mc_StartDialog._visible = false;
lvl = _local2;
mc_BG.setLvl_(lvl);
mc_BG.show_(_local2 * 2);
mc_WarField.setLvl(lvl);
mc_WarField.start_();
playSound.stop();
playSound.start();
}
function menu_() {
showStartDialog();
playSound.stop();
playSound.start();
}
function endGame(score) {
showFinishDialog();
playSound.stop();
playSound.start();
}
function showFinishDialog(score) {
mc_FinishDialog._visible = true;
mc_FinishDialog.init();
}
function addScore() {
showStartDialog();
trace("Controller=" + mc_WarField.getScore());
mc_StartDialog.addScore(mc_WarField.getScore());
}
function soundOff() {
trace("soundOf");
playSound.setVolume(0);
}
function soundOn() {
trace("soundOn");
playSound.setVolume(20);
}
}
Symbol 330 MovieClip [__Packages.BgItem] Frame 0
class BgItem extends MovieClip
{
var id, mc;
function BgItem (container, id) {
super();
this.id = id;
if (number > 1) {
var _local4 = Math.round(Math.random() * (number - 1)) + 1;
} else {
var _local4 = 1;
}
var _local3 = "bgItem" + String(_local4);
mc = container.attachMovie(_local3, _local3 + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc._alpha = (Math.random() * 20) + 20;
mc.cacheAsBitmap = true;
mc._x = 550;
mc._y = (Math.random() * 370) - 20;
mc._xscale = (random * 70) + 30;
mc._yscale = mc._xscale;
var ths = this;
mc.onEnterFrame = function () {
this._x = this._x - ths.speed;
if (this._x <= (-this._width)) {
ths.removeMc();
ths.container.deleteItem(ths.id);
}
};
}
function setSpeed(val) {
speed = val;
}
function removeMc() {
mc.removeMovieClip();
}
var speed = 0;
var number = 4;
}
Symbol 331 MovieClip [__Packages.Vodorosl] Frame 0
class Vodorosl extends MovieClip
{
var id, mc;
function Vodorosl (container, id) {
super();
this.id = id;
if (number > 1) {
var _local4 = Math.round(Math.random() * (number - 1)) + 1;
} else {
var _local4 = 1;
}
var _local3 = "vodorosl" + String(_local4);
mc = container.attachMovie(_local3, _local3 + String(container.getNextHighestDepth()), container.getNextHighestDepth());
mc.cacheAsBitmap = true;
mc._x = 550;
mc._y = (Math.random() * 95) + 355;
mc._xscale = (random * 70) + 30;
mc._yscale = mc._xscale;
var ths = this;
mc.onEnterFrame = function () {
this._x = this._x - ths.speed;
if (this._x <= (-this._width)) {
ths.removeMc();
ths.container.deleteItem(ths.id);
}
};
}
function setSpeed(val) {
speed = val;
}
function removeMc() {
mc.removeMovieClip();
}
var speed = 0;
var number = 4;
}
Symbol 332 MovieClip [__Packages.Bubble] Frame 0
class Bubble extends MovieClip
{
var num_XSpeed, num_YSpeed, _width, _height, onEnterFrame;
function Bubble () {
super();
num_XSpeed = 0;
num_YSpeed = 4 - random(2);
_width = 10 + random(10);
_height = _width;
onEnterFrame = function () {
this.num_XSpeed = this.num_XSpeed + (1 - random(2));
if ((this.num_XSpeed > 5) or (this.num_XSpeed < -5)) {
this.num_XSpeed = 0;
}
this._x = this._x - (this.averageXSpeed + this.num_XSpeed);
this._y = this._y - this.num_YSpeed;
if (this._y < (-this._height)) {
delete this.onEnterFrame;
this.removeMovieClip();
}
};
}
function setSpeed(val) {
averageXSpeed = val / 3;
}
var averageXSpeed = 0;
}
Symbol 333 MovieClip [__Packages.BG] Frame 0
class BG extends MovieClip
{
var arr_Items, mc_BG1, mc_BG2, onEnterFrame, _visible;
function BG () {
super();
arr_Items = new Array();
}
function setLvl_(lvl) {
stop_();
if (mc_BG1 != null) {
mc_BG1._y = -1000;
mc_BG2._y = -1000;
}
mc_BG1 = getBGForLvl(lvl, "a");
mc_BG2 = getBGForLvl(lvl, "b");
mc_BG1._y = 0;
mc_BG2._y = 0;
mc_BG1._x = 0;
mc_BG2._x = mc_BG1._width;
speed = lvl * 2;
move_(speed);
}
function move_(speed) {
this.speed = speed;
setItemsSpeed();
onEnterFrame = function () {
this.doMove();
this.speed = this.speed + 0.002;
};
}
function doMove() {
mc_BG1._x = mc_BG1._x - speed;
mc_BG2._x = mc_BG2._x - speed;
if (mc_BG2._x <= (-mc_BG2._width)) {
mc_BG2._x = mc_BG1._x + mc_BG1._width;
}
if (mc_BG1._x <= (-mc_BG1._width)) {
mc_BG1._x = mc_BG2._x + mc_BG2._width;
}
putItem(0.01);
putVodorosl(0.01);
}
function putVodorosl(probability) {
var _local3 = Math.random();
if (_local3 < probability) {
var _local2 = new Vodorosl(this, arr_Items.length);
_local2.setSpeed(speed);
arr_Items.push(_local2);
}
}
function setItemsSpeed() {
var _local2 = 0;
while (_local2 < arr_Items.length) {
arr_Items.setSpeed(speed + (speed / 3));
_local2++;
}
}
function stop_() {
delete onEnterFrame;
}
function getBGForLvl(lvl, str) {
return(this[("mc_BGLvl" + String(lvl)) + str]);
}
function show_(speed) {
this.speed = speed;
move_(this.speed);
_visible = true;
}
function hide_() {
stop_();
_visible = false;
}
function deleteItem(id) {
delete arr_Items[id];
arr_Items.splice(id, 1);
}
function putItem(probability) {
var _local3 = Math.random();
if (_local3 < probability) {
var _local2 = new BgItem(this, arr_Items.length);
_local2.setSpeed(speed + (speed / 3));
_local2.cacheAsBitmap = true;
arr_Items.push(_local2);
}
}
var speed = 0;
}