Frame 1
System.security.allowDomain("www.timezero.ru", "localhost");
fscommand ("showmenu", false);
fscommand ("trapallkeys", true);
Frame 2
function Init() {
play();
}
stop();
Frame 3
player.status_ = "stop";
i = 0;
soundvar = "on";
score = 0;
blink = 0;
points = 0;
player.health = 3;
stop();
stich_jump = new Sound();
stich_jump.attachSound("stich_jump");
gold_sound = new Sound();
gold_sound.attachSound("gold_sound");
dead_ergo = new Sound();
dead_ergo.attachSound("dead_ergo");
scream = new Sound();
scream.attachSound("scream");
rat_stomped = new Sound();
rat_stomped.attachSound("rat_stomped");
ouch = new Sound();
ouch.attachSound("ouch");
spitting = new Sound();
spitting.attachSound("spitting");
tada = new Sound();
tada.attachSound("tada");
level1 = new Sound();
level1.attachSound("level1");
level1.start();
level1.onSoundComplete = function () {
level1.start();
};
level2 = new Sound();
level2.attachSound("level2");
level2.onSoundComplete = function () {
level2.start();
};
level3 = new Sound();
level3.attachSound("level3");
level3.onSoundComplete = function () {
level3.start();
};
Instance of Symbol 71 MovieClip "bcg1" in Frame 3
onClipEvent (enterFrame) {
if ((_root.bcg1.mode_ == 1) and (_root.score > 5)) {
stopAllSounds();
_root.level2.start();
_root.bcg1.gotoAndStop("level2");
}
if ((_root.bcg1.mode_ == 2) and (_root.score > 12)) {
stopAllSounds();
_root.level3.start();
_root.bcg1.gotoAndStop("level3");
}
if ((_root.bcg1.mode_ == 3) and (_root.score > 21)) {
_root.gotoAndStop("victory");
}
flag = false;
if ((((!_root.rat1) and (!_root.rat2)) and (!_root.rat3)) and (random(12) == 6)) {
flag = true;
_root.i = 0;
}
if (((_root.rat1 and (!_root.rat2)) and (!_root.rat3)) and (random(60) == 6)) {
flag = true;
}
if (((_root.rat1 and _root.rat2) and (!_root.rat3)) and (random(100) == 6)) {
flag = true;
}
if ((_root.rat1 and _root.rat2) and _root.rat3) {
flag = false;
_root.i = 3;
}
if (_root.i > 3) {
_root.i = 3;
}
if (flag) {
_root.i++;
_root.attachMovie("rat", "rat" + _root.i, _root.i + 10);
_root["rat" + _root.i]._x = 370;
_root["rat" + _root.i]._y = 170;
}
_root.j = 0;
while (_root.j <= _root.i) {
if (_root["rat" + _root.j].status_ != "dead") {
_root["rat" + _root.j]._x = _root["rat" + _root.j]._x - 2;
}
if (_root.player.status_ == "run") {
_root["rat" + _root.j]._x = _root["rat" + _root.j]._x - 4;
}
if (_root["rat" + _root.j]._x < -10) {
removeMovieClip(_root["rat" + _root.j]);
}
if (_root.player.hitarea.hitTest(_root["rat" + _root.j].hitarea)) {
_root["rat" + _root.j].gotoAndPlay("death");
}
if (_root.player.damagearea.hitTest(_root["rat" + _root.j].hitarea) and (_root.player.blink <= 0)) {
_root.player.blink = 50;
_root.ouch.start();
_root.player.health--;
}
_root.j++;
}
if ((!_root.gold) and (random(70) == 5)) {
_root.attachMovie("gold", "gold", 9);
_root.gold._x = 370;
_root.gold._y = 175;
if (_root.bcg1.mode_ == 2) {
_root.gold.gotoAndStop(2);
}
if (_root.bcg1.mode_ == 3) {
_root.gold.gotoAndStop(3);
}
}
if (_root.gold) {
if (_root.gold._x < -10) {
removeMovieClip(_root.gold);
}
if (_root.player.status_ == "run") {
_root.gold._x = _root.gold._x - 4;
}
if (_root.player.hitTest(_root.gold)) {
_root.score = _root.score + 1;
_root.points = _root.points + (_root.bcg1.mode_ * 10);
removeMovieClip(_root.gold);
if (_root.soundvar == "on") {
_root.gold_sound.start();
}
}
}
if ((!_root.jelly) and (random(150) == 5)) {
_root.attachMovie("witch_jelly", "jelly", 8);
_root.jelly._x = 370;
_root.jelly._y = 180;
}
if (_root.jelly) {
_root.jelly._x = _root.jelly._x - 1;
if (_root.player.status_ == "run") {
_root.jelly._x = _root.jelly._x - 4;
}
if (_root.jelly._x < -10) {
removeMovieClip(_root.jelly);
}
}
if ((!_root.ergo) and (random(200) == 5)) {
_root.attachMovie("ergo", "ergo", 120);
_root.ergo._x = 370;
_root.ergo._y = 50;
}
if (_root.ergo) {
_root.ergo._x = _root.ergo._x - 2;
if (_root.player.status_ == "run") {
_root.ergo._x = _root.ergo._x - 4;
}
if (_root.ergo._x < -10) {
removeMovieClip(_root.ergo);
}
if (_root.ergo.hitTest(_root.spit)) {
_root.points = _root.points + 5;
removeMovieClip(_root.ergo);
removeMovieClip(_root.spit);
if (_root.soundvar == "on") {
_root.dead_ergo.start();
}
}
}
if (_root.player.status_ == "run") {
_root.bcg1._x = _root.bcg1._x - 4;
}
if (_root.bcg1._x < -1095) {
_root.bcg1._x = 0;
}
}
Instance of Symbol 99 MovieClip "player" in Frame 3
onClipEvent (load) {
_root.player.c_y = _root.player._y;
}
onClipEvent (enterFrame) {
if (Key.isDown(32) and (!_root.spit)) {
_root.player.head.gotoAndPlay("spit");
_root.attachMovie("spit", "spit", 10);
_root.spit._x = _root.player._x;
_root.spit._y = _root.player._y;
if (_root.soundvar == "on") {
_root.spitting.start();
}
}
if (_root.spit) {
_root.spit._x = _root.spit._x + 12;
if (_root.player.status_ == "run") {
_root.spit._x = _root.spit._x - 3;
}
if (_root.spit._x > 380) {
removeMovieClip(_root.spit);
}
}
if (Key.isDown(39)) {
if (_root.player.status_ == "stop") {
if (!_root.player.jump_flag) {
_root.player.gotoAndPlay("begin_run");
}
_root.player.status_ = "run";
}
}
if ((!Key.isDown(39)) and (!_root.player.jump_flag)) {
if ((!_root.player.jump_flag) and (_root.player._y >= _root.player.c_y)) {
_root.player.gotoAndStop("stop");
}
_root.player.status_ = "stop";
}
if (Key.isDown(38) and (!_root.go_down)) {
if (!_root.player.jump_flag) {
_root.player.gotoAndPlay("begin_jump");
_root.player.jump_flag = true;
_root.go_down = false;
if (_root.soundvar == "on") {
_root.stich_jump.start();
}
}
if (_root.player._y > (_root.player.c_y - 50)) {
_root.player.jump_flag = true;
}
}
if ((!Key.isDown(38)) or (_root.player._y < (_root.player.c_y - 50))) {
jump_flag = false;
}
if (_root.player.jump_flag) {
_root.player._y = _root.player._y - 3;
}
if ((!_root.player.jump_flag) and (_root.player._y < _root.player.c_y)) {
_root.go_down = true;
}
if (_root.go_down) {
_root.player._y = _root.player._y + 5;
}
if ((_root.player._y >= _root.player.c_y) and _root.go_down) {
_root.go_down = false;
_root.player.jump_flag = false;
_root.player._y = _root.player.c_y;
_root.player.gotoAndPlay("begin_run");
}
if ((_root.player.hitTest(_root.jelly) or _root.player.hitTest(_root.ergo)) and (_root.player.blink <= 0)) {
_root.player.health--;
_root.player.blink = 50;
_root.ouch.start();
}
if (_root.player.blink > 0) {
_root.player.blink--;
if ((_root.player.blink % 2) == 0) {
_root.player._alpha = 0;
} else {
_root.player._alpha = 100;
}
} else {
_root.player._alpha = 100;
_root.player.blink = 0;
}
if (_root.player.health <= 0) {
_root.gotoAndStop("gameover");
}
}
Frame 4
removeMovieClip(gold);
removeMovieClip(ergo);
removeMovieClip(jelly);
removeMovieClip(spit);
i = 0;
while (i < 20) {
removeMovieClip(_root["rat" + i]);
i++;
}
stopAllSounds();
if (_root.soundvar == "on") {
scream.start();
}
stop();
Frame 5
removeMovieClip(gold);
removeMovieClip(ergo);
removeMovieClip(jelly);
removeMovieClip(spit);
i = 0;
while (i < 20) {
removeMovieClip(_root["rat" + i]);
i++;
}
stopAllSounds();
if (_root.soundvar == "on") {
tada.start();
}
stop();
Symbol 17 MovieClip [gold] Frame 1
stop();
Symbol 17 MovieClip [gold] Frame 2
stop();
Symbol 17 MovieClip [gold] Frame 3
stop();
Symbol 36 MovieClip [rat] Frame 1
death = false;
Symbol 36 MovieClip [rat] Frame 5
gotoAndPlay (1);
Symbol 36 MovieClip [rat] Frame 7
death = true;
status_ = "dead";
_root.points = _root.points + 2;
if (_root.soundvar == "on") {
_root.rat_stomped.start();
}
Symbol 36 MovieClip [rat] Frame 11
stop();
Symbol 40 MovieClip [witch_jelly] Frame 30
gotoAndPlay (1);
Symbol 60 Button
on (press) {
gotoAndStop ("main");
}
Symbol 71 MovieClip Frame 1
stop();
mode_ = 1;
Symbol 71 MovieClip Frame 2
stop();
mode_ = 2;
Symbol 71 MovieClip Frame 3
stop();
mode_ = 3;
Symbol 98 MovieClip Frame 1
stop();
Symbol 98 MovieClip Frame 4
_root.attachMovie("ss", "ss", 1);
_root.ss._x = _root.stich._x - 50;
_root.ss._y = _root.stich.head._y + 318;
Symbol 98 MovieClip Frame 6
gotoAndStop (1);
Symbol 99 MovieClip Frame 1
stop();
Symbol 99 MovieClip Frame 25
gotoAndPlay ("run");
Symbol 99 MovieClip Frame 39
stop();
Symbol 102 Button
on (press) {
if (_root.soundvar == "on") {
stopAllSounds();
_root.soundvar = "off";
} else {
_root.soundvar = "on";
}
}