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) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
trace("MochiBot");
__com_mochibot__("ad62f717", this, 10301, true);
Frame 2
function round2(num) {
return(Math.round(num * 100) / 100);
}
copyright = "Copyright (c) 2009 by Enkord";
System.security.allowDomain("www.enkord.com");
if (bannerURL == undefined) {
bannerURL = "http://www.enkord.com/games/gunrox/banner.swf";
}
lang = "en";
stop();
_focusrect = false;
Stage.showMenu = false;
Stage.width = 480;
Stage.height = 360;
Stage.scaleMode = "noScale";
percent_mc._xscale = 0;
var to = _root.getBytesTotal();
var prevLo = 0;
total_txt.text = round2(to / 1024).toString() + " KB";
var loadListener = new Object();
loadListener.onLoadError = function (target_mc, errorCode) {
preload_logo_mc._visible = true;
loaded_txt._visible = true;
total_txt._visible = true;
percent_mc._visible = true;
percent_txt._visible = true;
frame_mc._visible = true;
preload_logo_mc.onPress = function () {
getURL ("http://www.enkord.com/", "_blank");
};
};
if (downloadURL == undefined) {
preload_logo_mc._visible = false;
loaded_txt._visible = false;
total_txt._visible = false;
percent_mc._visible = false;
percent_txt._visible = false;
frame_mc._visible = false;
var mcLoader = new MovieClipLoader();
mcLoader.addListener(loadListener);
var mc = this.createEmptyMovieClip("bannerstub", this.getNextHighestDepth());
mcLoader.loadClip(bannerURL, mc);
}
ii = setInterval(function () {
var _local2 = _root.getBytesLoaded();
var _local4 = round2((_local2 - prevLo) / 64);
speed_txt.text = _local4.toString() + " Kb/s";
loaded_txt.text = Math.round(_local2 / 1024).toString() + " KB";
var _local3 = Math.round((_local2 / to) * 100);
percent_txt.text = _local3 + " %";
percent_mc._xscale = _local3;
prevLo = _local2;
if ((_local2 == to) && (preload_logo_mc._visible)) {
clearInterval(ii);
gotoAndPlay ("load");
}
}, 500);
Frame 7
function getEncodedValue(v, key) {
var _local1 = (v ^ key).toString();
var _local4 = new Array();
_local4.push(key);
var _local2 = new Array();
i = 0;
while (i < _local1.length) {
_local2.push(_local1.charCodeAt(i) ^ key);
i++;
}
_local4.push(_local2.length ^ key);
_local4 = _local4.concat(_local2);
return(_local4.join(","));
}
function getScoreEncoded() {
var _local5 = random(16777215);
var _local4 = random(16777215);
while (_local4 == _local5) {
_local4 = random(16777215);
}
var _local3 = random(16777215);
while ((_local3 == _local5) || (_local3 == _local4)) {
_local3 = random(16777215);
}
var _local2 = random(16777215);
while (((_local2 == _local5) || (_local2 == _local4)) || (_local2 == _local3)) {
_local2 = random(16777215);
}
var _local6 = _root.numberofLevel;
return(new Array(getEncodedValue(_root.score, _local5), getEncodedValue(_local6, _local4), getEncodedValue(_root.score, _local3), getEncodedValue(_local6, _local2)));
}
stop();
preloadcontainer._visible = false;
var rootURL = "http://www.enkord.com/";
if (moreGamesURL == undefined) {
moreGamesURL = "http://www.enkord.com/?from=gunroxrushweb";
}
if (addToWebsiteURL == undefined) {
addToWebsiteURL = "http://www.enkord.com/games/gunroxrush/online/webmaster/";
}
if (downloadURL == undefined) {
is_downloadURL_undefined = true;
downloadURL = "http://www.gunrox.com/?ref=yy_fl_rush";
}
if (is_downloadURL_undefined == undefined) {
greatgames._visible = false;
greatgames_btn.enabled = false;
enkordgames._visible = false;
enkordgames_btn.enabled = false;
puttoweb_btn._visible = false;
not_our_site = true;
}
if (hiscoreURL == undefined) {
hiscoreURL = rootURL + (not_our_site ? "games/gunroxrush/online/hiscore-nolinks.php" : "games/gunroxrush/online/hiscore.php");
}
Frame 13
this.stop();
Frame 19
function GoToMain() {
_root.gotoAndPlay("FinalScreen");
}
stop();
var closebtn = this.closebtn;
closebtn.onPress = function () {
gui.TransitionScreen.getInstance().Execute(GoToMain);
};
Frame 26
stop();
Symbol 5 MovieClip Frame 1
this.onPress = function () {
this.useHandCursor = false;
};
Symbol 32 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Symbol 56 MovieClip [Aim] Frame 1
function onEnterFrame() {
this._rotation = this._rotation + 1;
if (this._xscale > 100) {
this._xscale = this._xscale - 5;
}
if (this._yscale > 100) {
this._yscale = this._yscale - 5;
}
}
stop();
Symbol 56 MovieClip [Aim] Frame 2
stop();
delete onEnterFrame;
this._rotation = 0;
this._xscale = 100;
this._yscale = 100;
Symbol 56 MovieClip [Aim] Frame 3
stop();
delete onEnterFrame;
this._rotation = 0;
this._xscale = 100;
this._yscale = 100;
Symbol 56 MovieClip [Aim] Frame 4
play();
delete onEnterFrame;
this._rotation = 0;
this._xscale = 100;
this._yscale = 100;
Symbol 56 MovieClip [Aim] Frame 63
gotoAndStop ("aim");
Symbol 578 MovieClip [__Packages.gui.MouseCursor] Frame 0
class gui.MouseCursor
{
function MouseCursor () {
}
static function Create() {
if (initialized) {
return(undefined);
}
initialized = true;
if (_root.mousecursor == undefined) {
_root.attachMovie("Aim", "mousecursor", 10000);
_root.mousehandler = new Object();
_root.mousehandler.onMouseMove = function () {
_root.mousecursor._x = _root._xmouse;
_root.mousecursor._y = _root._ymouse;
};
Mouse.addListener(_root.mousehandler);
Set(ARROW);
}
}
static function Set(cursortype) {
Create();
Mouse.hide();
if (cursortype == SHOOT) {
cursortype = AIM;
_root.mousecursor._xscale = 130;
_root.mousecursor._yscale = 130;
}
if (currentcursor != cursortype) {
currentcursor = cursortype;
_root.mousecursor.gotoAndPlay(cursortype);
}
}
static function Get() {
return(currentcursor);
}
static var ARROW = "arrow";
static var AIM = "aim";
static var HAND = "hand";
static var RELOAD = "reload";
static var SHOOT = "shoot";
static var currentcursor = "";
static var initialized = false;
}
Symbol 579 MovieClip [__Packages.as.screen.TitleScreen] Frame 0
class as.screen.TitleScreen extends MovieClip
{
var _quality, playbtn;
function TitleScreen () {
super();
_root.stop();
_quality = "HIGH";
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
gui.SoundManager.getInstance().SwitchMusic("music_title");
var _local4 = playbtn;
_local4.onPress = mx.utils.Delegate.create(this, Click_GoToIntro);
}
function Click_GoToIntro() {
gui.TransitionScreen.getInstance().Execute(mx.utils.Delegate.create(this, GoToIntro));
}
function GoToIntro() {
_root.gotoAndStop("Battle");
}
}
Symbol 580 MovieClip [__Packages.gui.SoundManager] Frame 0
class gui.SoundManager
{
var musicroot, mainmusic, sound, lastmusicname, _music;
function SoundManager () {
musicroot = _root.createEmptyMovieClip("musicroot", _root.getNextHighestDepth());
mainmusic = new Sound(musicroot);
mainmusic.onSoundComplete = function () {
this.start();
};
sound = ((_root.sound_trig != undefined) ? false : true);
music = (((_root.music_trig != undefined) ? false : true));
lastmusicname = "";
}
static function getInstance() {
if (_instance == null) {
_instance = new gui.SoundManager();
}
return(_instance);
}
function get music() {
return(_music);
}
function set music(value) {
_music = value;
mainmusic.setVolume((_music ? (MUSICVOLUME) : 0));
//return(music);
}
function PlaySound(soundname) {
if (sound) {
var sound = new Sound();
sound.attachSound(soundname);
sound.setVolume(SOUNDVOLUME);
sound.start();
}
}
function SwitchMusic(musicname) {
if (lastmusicname != musicname) {
lastmusicname = musicname;
mainmusic.stop();
mainmusic.attachSound(musicname);
mainmusic.start();
music = (music);
}
}
static var SOUNDVOLUME = 100;
static var MUSICVOLUME = 100;
static var _instance = null;
}
Symbol 581 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 582 MovieClip [__Packages.gui.TransitionScreen] Frame 0
class gui.TransitionScreen
{
var fade, is_hintenabled, interval_id, callback;
function TransitionScreen () {
trace("TransitionScreen created");
fade = _root.createEmptyMovieClip("fade", TRANSITION_DEPTH);
fade._visible = false;
fade.beginFill(0, 100);
fade.moveTo(0, 0);
fade.lineTo(480, 0);
fade.lineTo(480, 360);
fade.lineTo(0, 360);
fade.endFill();
}
static function getInstance() {
if (_instance == null) {
_instance = new gui.TransitionScreen();
}
return(_instance);
}
function Execute(callbackfunc) {
if (!callbackfunc) {
return(undefined);
}
is_hintenabled = gui.HintManager.getInstance().IsEnabled();
gui.HintManager.getInstance().SetEnable(false);
if (interval_id) {
clearInterval(interval_id);
}
callback = callbackfunc;
fade._visible = true;
fade._alpha = 0;
fade.onPress = function () {
};
interval_id = setInterval(mx.utils.Delegate.create(this, UpdateFading), TRANSITION_DURATION / (100 / TRANSITION_STEP));
}
function UpdateFading() {
if (callback) {
fade._alpha = fade._alpha + TRANSITION_STEP;
if (fade._alpha >= 100) {
callback();
callback = undefined;
gui.HintManager.getInstance().SetEnable(true);
}
} else {
fade._alpha = fade._alpha - TRANSITION_STEP;
if (fade._alpha <= 0) {
clearInterval(interval_id);
delete fade.onPress;
}
}
}
static var TRANSITION_DEPTH = 1001;
static var TRANSITION_DURATION = 300;
static var TRANSITION_STEP = 4;
static var _instance = null;
}
Symbol 583 MovieClip [__Packages.gui.HintManager] Frame 0
class gui.HintManager
{
var isenabled, hintupdated, hint, current_hint;
function HintManager () {
trace("HintManager created");
_root.onMouseMove = mx.utils.Delegate.create(this, onMouseMove);
SetEnable(true);
}
static function getInstance() {
if (_instance == null) {
_instance = new gui.HintManager();
}
return(_instance);
}
function SetEnable(state) {
isenabled = state;
UpdateHint();
}
function IsEnabled() {
return(isenabled);
}
function onMouseMove() {
if (!hintupdated) {
hint.removeMovieClip();
hint = undefined;
}
UpdateHint();
hintupdated = false;
}
function UpdateHint() {
if (!hint) {
return(undefined);
}
hint._visible = isenabled;
var _local3 = hint._parent._xmouse + 15;
var _local2 = hint._parent._ymouse + 15;
if ((_local3 + hint._width) > Stage.width) {
_local3 = Stage.width - hint._width;
}
if ((_local2 + hint._height) > Stage.height) {
_local2 = Stage.height - hint._height;
}
hint._x = _local3;
hint._y = _local2;
}
function SetHint(htmltext) {
hintupdated = true;
if (current_hint == htmltext) {
return(undefined);
}
if (current_hint == "") {
hint.removeMovieClip();
}
hint = _root.createEmptyMovieClip("hint", HINT_DEPTH);
if (htmltext == "") {
return(undefined);
}
var _local3 = hint.createEmptyMovieClip("bg", hint.getNextHighestDepth());
var _local7 = _local3.attachMovie("HintProto", "mcHintProto", _local3.getNextHighestDepth());
var _local6 = TextField(_local7.tfTitle);
_local6.selectable = false;
_local6.autoSize = true;
_local6.html = true;
_local6.htmlText = htmltext;
var _local4 = hint.getBounds(_local6);
_local3.beginFill(0, 50);
var _local5 = 0;
_local3.moveTo(_local4.xMin - _local5, _local4.yMin - _local5);
_local3.lineTo(_local4.xMax + _local5, _local4.yMin - _local5);
_local3.lineTo(_local4.xMax + _local5, _local4.yMax + _local5);
_local3.lineTo(_local4.xMin - _local5, _local4.yMax + _local5);
_local3.endFill();
UpdateHint();
}
static var HINT_DEPTH = 5000;
static var _instance = null;
}
Symbol 584 MovieClip [__Packages.as.FlyingEffect] Frame 0
class as.FlyingEffect extends MovieClip
{
var icon;
function FlyingEffect () {
super();
}
function SetEffect(effectname, value) {
var _local2 = icon;
_local2.gotoAndStop(effectname);
var _local4 = _local2.caption;
_local4.text = value;
var _local3 = _local2.captionshadow;
_local3.text = value;
}
}
Symbol 585 MovieClip [__Packages.as.Bullet] Frame 0
class as.Bullet extends MovieClip
{
var exploded, delta_t, startpos, G, damage, _x, _y, _rotation, angle, velocity, _parent;
function Bullet () {
super();
exploded = false;
delta_t = 0;
startpos = null;
G = 4.9;
damage = 1;
}
function Update() {
if (exploded) {
return(undefined);
}
if ((((_x < 0) || (_x > 480)) || (_y > 360)) || (_y < 0)) {
exploded = true;
} else {
if (!startpos) {
startpos = new flash.geom.Point(_x, _y);
_rotation = ((-angle) / Math.PI) * 180;
}
delta_t = delta_t + as.Settings.FRAME_DELTA_T;
var _local2 = delta_t * 0.01;
var _local4 = _x;
var _local3 = _y;
_x = startpos.x + ((velocity * _local2) * Math.cos(angle));
_y = startpos.y - (((velocity * _local2) * Math.sin(angle)) - (((G / 2) * _local2) * _local2));
}
}
function DoExplode() {
if (exploded) {
return(undefined);
}
exploded = true;
var _local2 = _parent.attachMovie("Explosion", "explode", _parent.getNextHighestDepth());
_local2._x = _x;
_local2._y = _y;
_local2._xscale = 10 + damage;
_local2._yscale = _local2._xscale;
}
}
Symbol 586 MovieClip [__Packages.as.Enemy] Frame 0
class as.Enemy extends MovieClip
{
var angle_target, ground_y, _x, delta_t, interval_flash, type, params, gotoAndStop, hp, routetype, _y, flow_pos, _rotation, _visible, transform;
function Enemy () {
super();
angle_target = 0;
ground_y = 300;
_x = 580;
delta_t = 0;
interval_flash = 0;
}
function SetType(t) {
type = t;
params = as.Settings.ENEMY[type];
gotoAndStop(params[as.Settings.EP_FACE]);
hp = params[as.Settings.EP_HP];
routetype = params[as.Settings.EP_ROUTE];
if ((routetype == ROUTE_FLY_LINE) || (routetype == ROUTE_FLY_WAVE)) {
_y = 100 + random(100);
}
flow_pos = _y;
}
function IsNear(x, y, distance) {
return((Math.abs(_x - x) <= distance) && (Math.abs(_y - y) <= distance));
}
function Update() {
_x = _x - (as.Settings.GROUND_SCROLL_STEP + params[as.Settings.EP_SPEED]);
switch (params[as.Settings.EP_ROUTE]) {
case ROUTE_DRIVE :
var _local4 = angle_target - _rotation;
if (_local4 > 2) {
_rotation = _rotation + 2;
} else if (_local4 < -2) {
_rotation = _rotation - 2;
}
_y = ground_y;
break;
case ROUTE_JUMP :
if (delta_t) {
delta_t = delta_t + as.Settings.FRAME_DELTA_T;
var _local2 = delta_t * 0.01;
var _local3 = flow_pos - ((JUMP_VEL * _local2) - (((JUMP_G / 2) * _local2) * _local2));
if (_local3 >= ground_y) {
_local3 = ground_y;
delta_t = 0;
}
_y = _local3;
} else {
_y = ground_y;
flow_pos = _y;
delta_t = 1;
}
break;
case ROUTE_FLY_LINE :
break;
case ROUTE_FLY_WAVE :
delta_t = delta_t + as.Settings.FRAME_DELTA_T;
_y = flow_pos + (Math.sin(delta_t * 0.002) * 35);
}
}
function SetDamage(value) {
hp = hp - value;
if (!_visible) {
return(0);
}
gui.SoundManager.getInstance().PlaySound("armorbroken.wav");
var _local4 = hp <= 0;
var _local5 = (_local4 ? 4 : 1);
var _local3 = 0;
while (_local3 < _local5) {
var _local2 = as.Piece(as.Battle.groundroot.attachMovie("Piece", "f" + random(10000), as.Battle.groundroot.getNextHighestDepth()));
if (_local4) {
_local2.gotoAndStop(((type + 1) + "-") + (_local3 + 1));
} else {
_local2.gotoAndStop(1 + random(5));
}
_local2._x = _x;
_local2._y = _y - 15;
_local3++;
}
if (interval_flash) {
clearInterval(interval_flash);
}
transform.colorTransform = new flash.geom.ColorTransform(5, 1, 1, 1, 0, 0, 0, 0);
interval_flash = setInterval(mx.utils.Delegate.create(this, _ClearFlash), 80);
if (_local4) {
_visible = false;
if (routetype == ROUTE_DRIVE) {
as.Battle.ShakePlayfield(200);
}
gui.SoundManager.getInstance().PlaySound("explose_sensor.wav");
var _local6 = as.Battle.groundroot.attachMovie("Explosion", "explode" + random(10000), as.Battle.groundroot.getNextHighestDepth());
_local6._x = _x;
_local6._y = _y - 30;
_local6._xscale = 150;
_local6._yscale = 150;
return(params[as.Settings.EP_SCORE]);
}
return(0);
}
function _ClearFlash() {
clearInterval(interval_flash);
interval_flash = 0;
transform.colorTransform = new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
function GetTouchDamage() {
return(params[as.Settings.EP_TOUCHDAMAGE]);
}
static var ROUTE_DRIVE = 0;
static var ROUTE_JUMP = 1;
static var ROUTE_FLY_LINE = 2;
static var ROUTE_FLY_WAVE = 3;
static var SPAWN_COOLDOWN = 1000;
static var JUMP_G = 4.9;
static var JUMP_VEL = 30;
}
Symbol 587 MovieClip [__Packages.as.FlyingObject] Frame 0
class as.FlyingObject extends MovieClip
{
var onFrame, lifetime, maxlifetime, startpos, velocity, angle, _x, _y, prev_x, prev_y, removeMovieClip;
function FlyingObject () {
super();
onFrame = null;
lifetime = 0;
maxlifetime = 0;
startpos = null;
velocity = 5 + (Math.random() * 10);
angle = Math.random() * Math.PI;
}
function onEnterFrame() {
if (!startpos) {
startpos = new flash.geom.Point(_x, _y);
}
lifetime = lifetime + as.Settings.FRAME_DELTA_T;
if ((maxlifetime > 0) && (lifetime < maxlifetime)) {
var _local2 = lifetime * 0.01;
prev_x = _x;
prev_y = _y;
_x = startpos.x + ((velocity * _local2) * Math.cos(angle));
_y = startpos.y - (((velocity * _local2) * Math.sin(angle)) - (((G / 2) * _local2) * _local2));
if (onFrame) {
onFrame();
}
} else {
removeMovieClip();
}
}
var G = 2.45;
}
Symbol 588 MovieClip [__Packages.as.Piece] Frame 0
class as.Piece extends as.FlyingObject
{
var lastcloudpos, G, maxlifetime, _rotation, angle, velocity, onFrame, rotstep, _y, _x, removeMovieClip, _parent, prev_x, prev_y;
function Piece () {
super();
lastcloudpos = new flash.geom.Point(0, 0);
G = 6.53333333333333;
maxlifetime = 2000;
_rotation = random(360);
angle = (Math.PI/4) + ((Math.random() * Math.PI) / 2);
velocity = 30 + random(10);
onFrame = Update;
rotstep = (random(2) ? 5 : -5);
}
function Update() {
if (((_y > 360) || (_x < 0)) || (_x > 480)) {
removeMovieClip();
}
if ((Math.abs(lastcloudpos.x - _x) > CLOUD_STEP) || (Math.abs(lastcloudpos.y - _y) > CLOUD_STEP)) {
lastcloudpos.x = _x;
lastcloudpos.y = _y;
var _local2 = _parent.attachMovie("Cloud", "cloud" + random(10000), _parent.getNextHighestDepth());
_local2._x = prev_x;
_local2._y = prev_y;
}
_rotation = _rotation + rotstep;
}
static var CLOUD_STEP = 15;
}
Symbol 589 MovieClip [__Packages.as.Battle] Frame 0
class as.Battle
{
static var lastenemyindex, groundroot, SHAKETILL;
var root, unit, ground, enemy_spawn_cooldown, bonus_spawn_cooldown, gameover, bullets, enemy, bonus, bonusquery, flashclip;
function Battle (r, u) {
lastenemyindex = 0;
root = r;
unit = u;
groundroot = unit._parent.createEmptyMovieClip("groundroot", unit.getDepth() + 1);
ground = new as.GroundManager(groundroot);
enemy_spawn_cooldown = 0;
bonus_spawn_cooldown = 0;
SHAKETILL = 0;
gameover = false;
bullets = [];
enemy = [];
bonus = [];
bonusquery = null;
flashclip = null;
}
function Update(gametime, shoot) {
var _local8 = 0;
as.Ground.TYPE = Math.floor(gametime / 180000) % as.Ground.TYPENAME.length;
ground.Update(-as.Settings.GROUND_SCROLL_STEP);
var _local7 = ground.GetGroundByX(unit._x);
unit.ground_y = _local7[0];
unit.Update();
if (shoot) {
var _local10 = unit.TryShoot();
if (_local10) {
Shoot(_local10[0], _local10[1], _local10[2]);
if ((unit.weapontype != as.Settings.WEAPON_PISTOL) && (unit.weaponammo[unit.weapontype] <= 0)) {
var _local5 = as.Settings.WEAPON_TOTAL - 1;
while (_local5 >= 0) {
if ((_local5 == as.Settings.WEAPON_PISTOL) || (unit.weaponammo[_local5] > 0)) {
unit.SetWeapon(_local5);
break;
}
_local5--;
}
}
}
}
var _local5 = 0;
while (_local5 < bullets.length) {
var _local2 = as.Bullet(bullets[_local5]);
if (_local2 && (!_local2.exploded)) {
var _local3 = GetTargetAt(_local2);
if (_local3) {
var _local6 = _local3.SetDamage(_local2.damage);
_local8 = _local8 + _local6;
_local2.DoExplode();
if ((_local6 > 0) && (!random(5))) {
DoSpawnBonus(gametime, _local3._x, _local3._y - 30);
}
}
}
if ((!_local2.exploded) && (ground.hitTest(_local2._x, _local2._y))) {
_local2.DoExplode();
}
if ((!_local2) || (_local2.exploded)) {
_local2.removeMovieClip();
bullets.splice(_local5, 1);
} else {
_local2.Update();
_local5++;
}
}
_local5 = 0;
while (_local5 < bonus.length) {
var _local4 = as.Bonus(bonus[_local5]);
if (_local4.IsActive() && (unit.hitTest(_local4._x, _local4._y, true))) {
_local8 = _local8 + unit.ApplyBonus(_local4);
}
if (_local4.IsDead()) {
_local4.removeMovieClip();
bonus.splice(_local5, 1);
} else {
_local4.Update(-as.Settings.GROUND_SCROLL_STEP);
_local5++;
}
}
DoSpawnBonus(gametime);
_local5 = 0;
while (_local5 < enemy.length) {
var _local3 = as.Enemy(enemy[_local5]);
if ((_local3.hp <= 0) || (_local3._x < -100)) {
_local3.removeMovieClip();
enemy.splice(_local5, 1);
} else {
_local5++;
}
}
_local5 = 0;
while (_local5 < enemy.length) {
var _local3 = as.Enemy(enemy[_local5]);
if ((_local3.routetype == as.Enemy.ROUTE_DRIVE) || (_local3.routetype == as.Enemy.ROUTE_JUMP)) {
_local7 = ground.GetGroundByX(_local3._x);
_local3.ground_y = _local7[0];
_local3.angle_target = _local7[1];
}
_local3.Update();
if ((_local3.hitTest(unit._x, unit._y, true) || (_local3.hitTest(unit._x, unit._y - 36, true))) || (_local3.hitTest(unit._x, unit._y - 72, true))) {
if (!unit.IsInvulnerable()) {
DoFlash(255, 50, 50);
}
unit.SetDamage(_local3.GetTouchDamage());
}
_local5++;
}
DoSpawnEnemy(gametime);
if (SHAKETILL) {
if (SHAKETILL > getTimer()) {
groundroot._x = 2 - (4 * Math.random());
groundroot._y = 2 - (4 * Math.random());
} else {
groundroot._x = 0;
groundroot._y = 0;
}
}
if (flashclip) {
if (flashclip._alpha <= 0) {
flashclip.removeMovieClip();
} else {
flashclip._alpha = flashclip._alpha - 10;
}
}
SCORE = SCORE + Math.round(_local8);
return(_local8);
}
function DoSpawnEnemy(gametime) {
if (enemy_spawn_cooldown > 0) {
enemy_spawn_cooldown = enemy_spawn_cooldown - as.Settings.FRAME_DELTA_T;
return(undefined);
}
var _local2 = 6;
if (as.Unit.LEVEL < 4) {
_local2 = 2;
} else if (as.Unit.LEVEL < 8) {
_local2 = 3;
} else if (as.Unit.LEVEL < 15) {
_local2 = 4;
} else if (as.Unit.LEVEL < 20) {
_local2 = 5;
}
if (enemy.length < _local2) {
var _local4 = Math.min(as.Unit.LEVEL - 1, as.Settings.SPAWN.length - 1);
lastenemyindex = (lastenemyindex + 1) % as.Settings.SPAWN[_local4].length;
var _local5 = as.Settings.SPAWN[_local4][lastenemyindex];
var _local3 = as.Enemy(root.attachMovie("Enemy", "enemy" + random(100000), root.getNextHighestDepth()));
_local3.SetType(_local5);
enemy.push(_local3);
enemy_spawn_cooldown = as.Enemy.SPAWN_COOLDOWN;
}
}
function DoSpawnBonus(gametime, x, y) {
if ((x != undefined) && (y != undefined)) {
var _local2 = as.Bonus(groundroot.attachMovie("Bonus", "bonus" + random(100000), groundroot.getNextHighestDepth()));
var _local3 = GetRandomBonus();
_local2.kind = _local3[0];
_local2.level = _local3[1];
_local2._x = x;
_local2._y = y;
bonus.push(_local2);
return(undefined);
}
if (bonus_spawn_cooldown > 0) {
bonus_spawn_cooldown = bonus_spawn_cooldown - as.Settings.FRAME_DELTA_T;
} else if (bonusquery) {
bonus_spawn_cooldown = as.Bonus.SPAWN_COOLDOWN;
if (random(1 + Math.round(as.Unit.LEVEL / 4)) > 0) {
return(undefined);
}
var _local2 = as.Bonus(root.attachMovie("Bonus", "bonus" + random(100000), root.getNextHighestDepth()));
_local2.kind = bonusquery[0];
_local2.level = bonusquery[1];
_local2._x = 500;
var _local4 = ground.GetGroundByX(_local2._x);
y = Math.min(bonusquery[3], _local4[0] - 30);
_local2._y = Math.max(y, _local4[0] - (100 + (as.Unit.LEVEL * 2)));
bonusquery[2]--;
if (bonusquery[2] <= 0) {
bonusquery = null;
}
bonus.push(_local2);
}
if ((!bonusquery) && (!bonus.length)) {
bonusquery = GetRandomBonus();
bonusquery.push(80 + random(150));
}
}
function GetRandomBonus(gametime) {
var _local3 = [[0, 0], [0, 0], [0, 0], [0, 0], [0, 0], [0, 0]];
var _local9 = as.Settings.BONUS[as.Settings.BONUS_SCORE][as.Settings.B_LEVELS];
var _local8 = Math.min(1 + Math.floor(as.Unit.LEVEL / 5), _local9);
_local3[as.Settings.BONUS_SCORE][0] = _local8;
_local3[as.Settings.BONUS_SCORE][1] = _local8;
if (as.Unit.HP < as.Unit.MAXHP) {
_local9 = as.Settings.BONUS[as.Settings.BONUS_HP][as.Settings.B_LEVELS];
_local8 = Math.min(1 + Math.floor(as.Unit.LEVEL / 5), _local9);
_local3[as.Settings.BONUS_HP][0] = 1;
_local3[as.Settings.BONUS_HP][1] = _local8;
}
if (as.Unit.LEVEL > 3) {
_local9 = as.Settings.BONUS[as.Settings.BONUS_PISTOL][as.Settings.B_LEVELS];
_local8 = Math.min(1 + Math.floor(as.Unit.LEVEL / 3), _local9);
if (_local8 > unit.weaponlevel[as.Settings.WEAPON_PISTOL]) {
_local3[as.Settings.BONUS_PISTOL][0] = _local8;
_local3[as.Settings.BONUS_PISTOL][1] = _local8;
}
}
if (as.Unit.LEVEL >= 3) {
_local9 = as.Settings.BONUS[as.Settings.BONUS_SHOTGUN][as.Settings.B_LEVELS];
_local8 = Math.min(1 + Math.floor((as.Unit.LEVEL - 3) / 5), _local9);
if ((_local8 > unit.weaponlevel[as.Settings.WEAPON_SHOTGUN]) || (unit.weaponammo[as.Settings.WEAPON_SHOTGUN] < as.Unit.GetStat_MaxAmmo(as.Settings.WEAPON_SHOTGUN))) {
_local3[as.Settings.BONUS_SHOTGUN][0] = _local8;
_local3[as.Settings.BONUS_SHOTGUN][1] = _local8;
}
}
if (as.Unit.LEVEL >= 4) {
_local9 = as.Settings.BONUS[as.Settings.BONUS_ASSAULT][as.Settings.B_LEVELS];
_local8 = Math.min(1 + Math.floor((as.Unit.LEVEL - 4) / 5), _local9);
if ((_local8 > unit.weaponlevel[as.Settings.WEAPON_ASSAULT]) || (unit.weaponammo[as.Settings.WEAPON_ASSAULT] < as.Unit.GetStat_MaxAmmo(as.Settings.WEAPON_ASSAULT))) {
_local3[as.Settings.BONUS_ASSAULT][0] = _local8;
_local3[as.Settings.BONUS_ASSAULT][1] = _local8;
}
}
if (as.Unit.LEVEL >= 8) {
_local9 = as.Settings.BONUS[as.Settings.BONUS_RPG][as.Settings.B_LEVELS];
_local8 = Math.min(1 + Math.floor((as.Unit.LEVEL - 8) / 10), _local9);
if ((_local8 > unit.weaponlevel[as.Settings.WEAPON_RPG]) || (unit.weaponammo[as.Settings.WEAPON_RPG] < as.Unit.GetStat_MaxAmmo(as.Settings.WEAPON_RPG))) {
_local3[as.Settings.BONUS_RPG][0] = _local8;
_local3[as.Settings.BONUS_RPG][1] = _local8;
}
}
var _local7 = as.Settings.BONUS_SCORE;
var _local6 = _local3[_local7][0];
var _local4 = 0;
while (_local4 < 5) {
var _local5 = random(_local3.length);
var _local2 = _local3[_local5];
if (_local2[0] > 0) {
_local7 = _local5;
_local6 = _local2[0];
if (_local2[1] > _local2[0]) {
_local6 = _local6 + random((1 + _local2[1]) - _local2[0]);
}
break;
}
_local4++;
}
var _local10 = ((_local7 == as.Settings.BONUS_SCORE) ? (1 + random(5)) : 1);
return([_local7, _local6, _local10]);
}
function GetTargetAt(b) {
var _local3 = 0;
while (_local3 < enemy.length) {
var _local2 = as.Enemy(enemy[_local3]);
if ((_local2.hp > 0) && (_local2.hitTest(b._x, b._y, true))) {
return(_local2);
}
_local3++;
}
return(null);
}
function Shoot(count, damage, speed) {
gui.MouseCursor.Set(gui.MouseCursor.SHOOT);
var _local6 = unit.GetShotStartOffset();
var _local8 = ((-unit.weaponangle) / 180) * Math.PI;
var _local9 = 0.326666666666667;
var _local7 = 0.3;
var _local10 = unit.attachMovie("ShotFlash", "shot" + random(10000), unit.getNextHighestDepth());
_local10._x = _local6[0] - unit._x;
_local10._y = _local6[1] - unit._y;
_local10._xscale = 200;
_local10._yscale = 200;
var _local3 = 0;
while (_local3 < count) {
var _local2 = as.Bullet(groundroot.attachMovie("Bullet", "b" + random(10000), groundroot.getNextHighestDepth()));
var _local5 = as.Settings.WEAPONCLASS[unit.weapontype][as.Settings.WC_NAME] + unit.weaponlevel[unit.weapontype];
_local2.gotoAndStop(_local5);
_local2._x = _local6[0];
_local2._y = _local6[1];
_local2.angle = _local8;
_local2.damage = damage;
if (count > 1) {
_local2.angle = _local2.angle + (((_local3 * _local7) / count) - (_local7 / 2));
}
_local2.G = _local9;
_local2.velocity = speed;
bullets.push(_local2);
_local3++;
}
var _local13 = as.Settings.WEAPONCLASS[unit.weapontype];
gui.SoundManager.getInstance().PlaySound(_local13[as.Settings.WC_SOUNDSHOT]);
}
static function ShakePlayfield(duration) {
SHAKETILL = getTimer() + duration;
}
function DoFlash(r, g, b) {
if (flashclip) {
flashclip.removeMovieClip();
}
flashclip = root.attachMovie("WhiteBox", "flash_mc", root.getNextHighestDepth());
flashclip._width = 480;
flashclip._height = 360;
flashclip.transform.colorTransform = new flash.geom.ColorTransform(0, 0, 0, 1, r, g, b, 0);
}
static var LOST = false;
static var SCORE = 0;
}
Symbol 590 MovieClip [__Packages.as.Unit] Frame 0
class as.Unit extends MovieClip
{
static var MAXHP, HP;
var stop, weapon, clip_weapon, legs, clip_legs, immortal_cooldown, shoot_cooldown, regen_cooldown, jump_y, jump_time, jump_counter, ground_y, weaponlevel, weaponammo, transform, weaponangle, _xmouse, _ymouse, _y, weapontype;
function Unit () {
super();
stop();
weapon = clip_weapon;
weapon.stop();
legs = clip_legs;
LEVEL = 1;
PERK = [];
var _local3 = 0;
while (_local3 < as.Settings.PERK_TOTAL) {
PERK.push(0);
_local3++;
}
immortal_cooldown = 0;
shoot_cooldown = 0;
regen_cooldown = 0;
MAXHP = as.Settings.UNIT_HP;
HP = MAXHP;
jump_y = undefined;
jump_time = 0;
jump_counter = 0;
ground_y = 300;
weaponlevel = [1, 0, 0, 0];
weaponammo = [0, 0, 0, 0];
SetWeapon(as.Settings.WEAPON_PISTOL);
}
function onCreate() {
}
function Update() {
if (immortal_cooldown > 0) {
immortal_cooldown = immortal_cooldown - as.Settings.FRAME_DELTA_T;
var _local5 = Math.round(immortal_cooldown / (IMMORTAL_DURATION / 10));
transform.colorTransform = (((immortal_cooldown <= 0) || (_local5 % 2)) ? (new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0)) : (new flash.geom.ColorTransform(5, 2, 2, 1, 0, 0, 0, 0)));
}
if (shoot_cooldown > 0) {
shoot_cooldown = shoot_cooldown - as.Settings.FRAME_DELTA_T;
}
if (regen_cooldown > 0) {
regen_cooldown = regen_cooldown - as.Settings.FRAME_DELTA_T;
} else if (HP < MAXHP) {
HP++;
regen_cooldown = GetStat_RegenCooldown();
}
weaponangle = (helper.MyMath.GetAngleByVector(_xmouse - weapon._x, _ymouse - weapon._y) / Math.PI) * 180;
if (weaponangle < MIN_WEAPON_ANGLE) {
weaponangle = MIN_WEAPON_ANGLE;
}
if (weaponangle > MAX_WEAPON_ANGLE) {
weaponangle = MAX_WEAPON_ANGLE;
}
weapon._rotation = weaponangle;
if (jump_y != undefined) {
var _local4 = ((jump_counter == 1) ? 26 : (GetStat_JumpVelocity()));
jump_time = jump_time + as.Settings.FRAME_DELTA_T;
var _local2 = jump_time * 0.01;
var _local3 = jump_y - ((_local4 * _local2) - (((G / 2) * _local2) * _local2));
if (_local3 > ground_y) {
_local3 = ground_y;
jump_y = undefined;
jump_counter = 0;
legs.gotoAndPlay("armor0");
}
_y = _local3;
} else {
_y = ground_y;
}
}
function IsInvulnerable() {
return(immortal_cooldown > 0);
}
function Jump() {
if (jump_counter >= 2) {
return(undefined);
}
jump_y = _y;
jump_time = 0;
jump_counter++;
legs.gotoAndStop("fly");
}
function SetWeapon(wptype) {
if ((weaponlevel[wptype] <= 0) || ((weaponammo[wptype] <= 0) && (as.Settings.WEAPONCLASS[wptype][as.Settings.WC_MAXAMMO] > 0))) {
return(false);
}
weapontype = wptype;
RefreshWeapon();
return(true);
}
function RefreshWeapon() {
var _local2 = as.Settings.WEAPONCLASS[weapontype];
weapon.gotoAndStop(_local2[as.Settings.WC_NAME] + weaponlevel[weapontype]);
}
function GetShotStartOffset() {
var _local3 = weapon.shotstart;
var _local2 = {x:_local3._x, y:_local3._y};
weapon.localToGlobal(_local2);
return([_local2.x, _local2.y]);
}
function TryShoot() {
var _local2 = as.Settings.WEAPONCLASS[weapontype];
var _local3 = weaponlevel[weapontype];
if (shoot_cooldown > 0) {
return(null);
}
shoot_cooldown = _local2[as.Settings.WC_COOLDOWN_BASE] + (_local2[as.Settings.WC_COOLDOWN_ADD] * (_local3 - 1));
var _local4 = _local2[as.Settings.WC_BULLET_BASE] + (_local2[as.Settings.WC_BULLET_ADD] * (_local3 - 1));
var _local5 = Math.round((_local2[as.Settings.WC_DAMAGE_BASE] + (_local2[as.Settings.WC_DAMAGE_ADD] * (_local3 - 1))) * GetStat_BulletDamageFactor());
if (_local2[as.Settings.WC_MAXAMMO] > 0) {
weaponammo[weapontype] = weaponammo[weapontype] - 1;
if (weaponammo[weapontype] < 0) {
weaponammo[weapontype] = 0;
}
}
return([_local4, _local5, GetStat_BulletSpeed()]);
}
function ApplyBonus(b) {
b.PickUp();
switch (b.kind) {
case as.Settings.BONUS_SCORE :
gui.SoundManager.getInstance().PlaySound("counter.wav");
return(b.level * 15);
case as.Settings.BONUS_HP :
AddHP(b.level * 10);
return(0);
case as.Settings.BONUS_PISTOL :
if (b.level > weaponlevel[as.Settings.WEAPON_PISTOL]) {
weaponlevel[as.Settings.WEAPON_PISTOL] = b.level;
RefreshWeapon();
}
gui.SoundManager.getInstance().PlaySound("equip.wav");
return(0);
case as.Settings.BONUS_SHOTGUN :
AddAmmo(as.Settings.WEAPON_SHOTGUN, 8);
if (b.level > weaponlevel[as.Settings.WEAPON_SHOTGUN]) {
weaponlevel[as.Settings.WEAPON_SHOTGUN] = b.level;
RefreshWeapon();
}
gui.SoundManager.getInstance().PlaySound("equip.wav");
return(0);
case as.Settings.BONUS_ASSAULT :
AddAmmo(as.Settings.WEAPON_ASSAULT, 30);
if (b.level > weaponlevel[as.Settings.WEAPON_ASSAULT]) {
weaponlevel[as.Settings.WEAPON_ASSAULT] = b.level;
RefreshWeapon();
}
gui.SoundManager.getInstance().PlaySound("equip.wav");
return(0);
case as.Settings.BONUS_RPG :
AddAmmo(as.Settings.WEAPON_RPG, 10);
if (b.level > weaponlevel[as.Settings.WEAPON_RPG]) {
weaponlevel[as.Settings.WEAPON_RPG] = b.level;
RefreshWeapon();
}
gui.SoundManager.getInstance().PlaySound("equip.wav");
return(0);
}
}
function AddAmmo(weapontype, ammocount) {
if ((weapontype < as.Settings.WEAPON_SHOTGUN) || (weapontype > as.Settings.WEAPON_RPG)) {
return(undefined);
}
if (weaponlevel[weapontype] == 0) {
weaponlevel[weapontype] = 1;
}
weaponammo[weapontype] = weaponammo[weapontype] + ammocount;
var _local3 = GetStat_MaxAmmo(weapontype);
if (weaponammo[weapontype] > _local3) {
weaponammo[weapontype] = _local3;
}
if (this.weapontype == as.Settings.WEAPON_PISTOL) {
SetWeapon(weapontype);
}
}
function AddHP(amount) {
gui.SoundManager.getInstance().PlaySound("usemedikit.wav");
if (HP >= MAXHP) {
return(undefined);
}
HP = HP + amount;
if (HP > MAXHP) {
HP = MAXHP;
}
}
function SetDamage(value) {
if (IsInvulnerable()) {
return(undefined);
}
HP = HP - value;
immortal_cooldown = IMMORTAL_DURATION;
gui.SoundManager.getInstance().PlaySound("melee_cut.wav");
}
static function GetMinExpForLevel(level) {
var _local2 = 180;
var _local3 = 1.35;
return(((level <= 1) ? 0 : (Math.round((_local2 * (level - 1)) * (1 + (((level - 2) * _local3) * 0.5))))));
}
static function GetStat_JumpVelocity() {
var _local1 = as.Settings.PERK[as.Settings.PERK_JUMP];
return(as.Settings.UNIT_JUMPVEL * (1 + (PERK[as.Settings.PERK_JUMP] * _local1[as.Settings.PK_VALUE])));
}
static function GetStat_RegenCooldown() {
var _local1 = as.Settings.PERK[as.Settings.PERK_REGEN];
return(as.Settings.UNIT_REGENCOOLDOWN * (1 - (PERK[as.Settings.PERK_REGEN] * _local1[as.Settings.PK_VALUE])));
}
static function GetStat_BulletSpeed() {
var _local1 = as.Settings.PERK[as.Settings.PERK_BULLETSPEED];
return(Math.round(40 * (1 + (PERK[as.Settings.PERK_BULLETSPEED] * _local1[as.Settings.PK_VALUE]))));
}
static function GetStat_MaxAmmo(weapontype) {
var _local1 = as.Settings.PERK[as.Settings.PERK_CLIPSIZE];
var _local2 = as.Settings.WEAPONCLASS[weapontype];
return(Math.round(_local2[as.Settings.WC_MAXAMMO] * (1 + (PERK[as.Settings.PERK_CLIPSIZE] * _local1[as.Settings.PK_VALUE]))));
}
static function GetStat_BulletDamageFactor() {
var _local1 = as.Settings.PERK[as.Settings.PERK_BULLETDAMAGE];
return(1 + (PERK[as.Settings.PERK_BULLETDAMAGE] * _local1[as.Settings.PK_VALUE]));
}
static var LEVEL = 1;
static var PERK = [];
static var MIN_WEAPON_ANGLE = -60;
static var MAX_WEAPON_ANGLE = 60;
static var IMMORTAL_DURATION = 1000;
static var G = 3.26666666666667;
}
Symbol 591 MovieClip [__Packages.helper.MyMath] Frame 0
class helper.MyMath
{
function MyMath () {
}
static function GetAngleByVector(ofsx, ofsy) {
var _local1 = (ofsx ? (Math.atan(Math.abs(ofsy) / Math.abs(ofsx))) : (Math.PI/2));
if ((ofsx < 0) && (ofsy >= 0)) {
_local1 = Math.PI - _local1;
} else if ((ofsx > 0) && (ofsy < 0)) {
_local1 = -_local1;
}
if ((ofsx < 0) && (ofsy < 0)) {
_local1 = -(Math.PI - _local1);
}
return(_local1);
}
}
Symbol 592 MovieClip [__Packages.as.Bonus] Frame 0
class as.Bonus extends MovieClip
{
var kind, level, delta_t, starty, _visible, _y, gotoAndStop, isactive, _x, _alpha, transform, _parent;
function Bonus () {
super();
kind = as.Settings.BONUS_SCORE;
level = 1;
delta_t = 0;
starty = undefined;
_visible = false;
}
function Update(moveby) {
if (starty == undefined) {
starty = _y;
var _local5 = as.Settings.BONUS[kind];
gotoAndStop(_local5[as.Settings.B_NAME] + level);
_visible = true;
isactive = true;
}
delta_t = delta_t + as.Settings.FRAME_DELTA_T;
_x = _x + moveby;
if (!isactive) {
_y = _y - 2;
_alpha = 0;
} else {
var _local4 = Math.sin(delta_t * 0.005);
_y = starty + (_local4 * 10);
var _local2 = 1 + (Math.abs(_local4) * 1.2);
transform.colorTransform = new flash.geom.ColorTransform(_local2, _local2, _local2, 1, 0, 0, 0, 0);
if (random(15) == 0) {
var _local3 = _parent.attachMovie("Star", "star" + random(10000), _parent.getNextHighestDepth());
_local3._x = (_x + random(18)) - 9;
_local3._y = (_y + random(18)) - 9;
}
}
}
function PickUp() {
isactive = false;
var _local3 = 0;
while (_local3 < 5) {
var _local2 = _parent.attachMovie("Star", "star" + random(10000), _parent.getNextHighestDepth());
_local2._x = (_x + random(20)) - 10;
_local2._y = (_y + random(20)) - 10;
_local2._xscale = 200;
_local2._yscale = 200;
_local3++;
}
}
function IsDead() {
return((_x < -60) || (_alpha < 10));
}
function IsActive() {
return(isactive);
}
static var SPAWN_COOLDOWN = 1000;
}
Symbol 593 MovieClip [__Packages.as.GroundManager] Frame 0
class as.GroundManager
{
var root, lasty, groundquery;
function GroundManager (r) {
root = r;
lasty = (MAX_Y + MIN_Y) / 2;
groundquery = [];
}
function Update(movestep) {
if (movestep) {
var _local6 = 0;
while (_local6 < groundquery.length) {
groundquery[_local6]._x = groundquery[_local6]._x + movestep;
_local6++;
}
}
while (groundquery.length && (groundquery[0]._x < ((-as.Ground.WIDTH) / 2))) {
groundquery[0].removeMovieClip();
groundquery.splice(0, 1);
}
var _local7 = (groundquery.length ? (groundquery[groundquery.length - 1]._x + as.Ground.WIDTH) : (as.Ground.WIDTH / 2));
while (_local7 < (480 + as.Ground.WIDTH)) {
var _local4 = Math.floor((lasty - MIN_Y) / SEGMENT_STEP_HEIGHT);
var _local5 = Math.floor((MAX_Y - lasty) / SEGMENT_STEP_HEIGHT);
if (_local4 > SEGMENT_STEP_MAX) {
_local4 = SEGMENT_STEP_MAX;
}
if (_local5 > SEGMENT_STEP_MAX) {
_local5 = SEGMENT_STEP_MAX;
}
var _local3 = (-(_local4 - random(_local4 + _local5))) * SEGMENT_STEP_HEIGHT;
var _local2 = as.Ground(root.attachMovie("Ground", "g" + random(10000), root.getNextHighestDepth()));
_local2.SetFace(_local3);
if (_local3 < 0) {
_local2._y = lasty;
} else {
_local2._y = lasty + _local3;
}
_local2._x = _local7;
groundquery.push(_local2);
_local7 = _local7 + as.Ground.WIDTH;
lasty = lasty + _local3;
}
}
function GetGroundByX(x) {
var _local2 = 0;
while (_local2 < groundquery.length) {
var _local3 = groundquery[_local2];
if (_local3.HasX(x)) {
return([_local3.GetYbyX(x), _local3.GetAngle()]);
}
_local2++;
}
return([300, 0]);
}
function hitTest(x, y) {
var _local2 = 0;
while (_local2 < groundquery.length) {
var _local3 = groundquery[_local2];
if (_local3.HasX(x)) {
return(_local3.GetYbyX(x) < y);
}
_local2++;
}
return(false);
}
static var SEGMENT_STEP_MAX = 6;
static var SEGMENT_STEP_HEIGHT = 10;
static var MIN_Y = 230;
static var MAX_Y = 360;
}
Symbol 594 MovieClip [__Packages.as.Ground] Frame 0
class as.Ground extends MovieClip
{
var h, gotoAndStop, _xscale, _x, _y;
function Ground () {
super();
}
function SetFace(faceheight) {
h = faceheight;
gotoAndStop(TYPENAME[TYPE] + Math.abs(h));
if (h < 0) {
_xscale = -100;
}
}
function HasX(x) {
return((x >= (_x - (WIDTH / 2))) && (x <= (_x + (WIDTH / 2))));
}
function GetAngle() {
var _local2 = Math.atan(Math.abs(h) / WIDTH);
if (h < 0) {
_local2 = -_local2;
}
return((_local2 / Math.PI) * 180);
}
function GetYbyX(x) {
var _local5 = _x - (WIDTH / 2);
var _local4 = _x + (WIDTH / 2);
var _local3 = ((h > 0) ? (_y - h) : (_y));
var _local2 = ((h > 0) ? (_y) : (_y + h));
var _local6 = Math.round((((_local4 * _local3) - (_local5 * _local2)) - (x * (_local3 - _local2))) / WIDTH);
return(_local6);
}
static var WIDTH = 100;
static var TYPENAME = ["grass", "junk", "snow"];
static var TYPE = 0;
}
Symbol 595 MovieClip [__Packages.as.Settings] Frame 0
class as.Settings
{
function Settings () {
}
static var FRAME_DELTA_T = 33.3333333333333;
static var GAME_QUALITY = "LOW";
static var PAUSED = false;
static var FIRST_START = true;
static var UNIT_HP = 100;
static var UNIT_REGENCOOLDOWN = 4000;
static var UNIT_JUMPVEL = 16;
static var COOLDOWN = 1000;
static var GROUND_SCROLL_STEP = 2;
static var EP_FACE = 0;
static var EP_SCORE = 1;
static var EP_SPEED = 2;
static var EP_HP = 3;
static var EP_TOUCHDAMAGE = 4;
static var EP_ROUTE = 5;
static var ENEMY = [["enemy1", 15, 2, 15, 15, as.Enemy.ROUTE_DRIVE], ["enemy2", 30, 3, 30, 20, as.Enemy.ROUTE_DRIVE], ["enemy3", 40, 3, 40, 25, as.Enemy.ROUTE_DRIVE], ["enemy4", 50, 3, 60, 30, as.Enemy.ROUTE_DRIVE], ["enemy5", 80, 2, 90, 35, as.Enemy.ROUTE_DRIVE], ["enemy6", 20, 2, 20, 15, as.Enemy.ROUTE_JUMP], ["enemy7", 30, 2, 30, 20, as.Enemy.ROUTE_JUMP], ["enemy8", 50, 2, 60, 25, as.Enemy.ROUTE_JUMP], ["enemy9", 80, 3, 80, 30, as.Enemy.ROUTE_JUMP], ["enemy10", 110, 3, 110, 35, as.Enemy.ROUTE_JUMP], ["enemy11", 24, 2, 24, 15, as.Enemy.ROUTE_FLY_LINE], ["enemy12", 32, 3, 32, 20, as.Enemy.ROUTE_FLY_LINE], ["enemy13", 60, 2, 70, 25, as.Enemy.ROUTE_FLY_WAVE], ["enemy14", 90, 3, 95, 30, as.Enemy.ROUTE_FLY_WAVE], ["enemy15", 120, 3, 125, 35, as.Enemy.ROUTE_FLY_WAVE]];
static var SPAWN = [[0], [0, 10], [5, 10], [5, 12], [1, 5, 11], [2, 6], [2, 6, 12], [3, 6, 12], [6, 7, 13], [4, 7], [4, 7, 11], [7, 11, 12], [11, 12], [5, 6, 7], [2, 8, 12], [3, 8, 12], [4, 8, 12], [9, 12], [9, 12, 13], [10, 12, 13], [7, 13], [7, 8, 13], [8, 9, 1], [9, 13, 2], [6, 7, 8, 9], [2, 8, 14], [0, 1, 14], [1, 11, 12, 14], [9, 13, 14], [4, 8, 9, 13, 14]];
static var WEAPON_PISTOL = 0;
static var WEAPON_SHOTGUN = 1;
static var WEAPON_ASSAULT = 2;
static var WEAPON_RPG = 3;
static var WEAPON_TOTAL = 4;
static var WC_NAME = 0;
static var WC_MAXLEVEL = 1;
static var WC_BULLET_BASE = 2;
static var WC_BULLET_ADD = 3;
static var WC_DAMAGE_BASE = 4;
static var WC_DAMAGE_ADD = 5;
static var WC_COOLDOWN_BASE = 6;
static var WC_COOLDOWN_ADD = 7;
static var WC_MAXAMMO = 8;
static var WC_SOUNDSHOT = 9;
static var WEAPONCLASS = [["pistol", 4, 1, 0, 8, 2, 500, -30, 0, "pistol.wav"], ["shotgun", 4, 3, 1, 10, 0, 400, -30, 20, "shotgun.wav"], ["assault", 4, 1, 0, 12, 2, 200, -20, 50, "ak.wav"], ["rpg", 2, 1, 0, 70, 10, 700, -100, 15, "grenadelauncher.wav"]];
static var PERK_MAX_LEVEL = 5;
static var PERK_HP = 0;
static var PERK_REGEN = 1;
static var PERK_JUMP = 2;
static var PERK_BULLETSPEED = 3;
static var PERK_BULLETDAMAGE = 4;
static var PERK_CLIPSIZE = 5;
static var PERK_TOTAL = 6;
static var PK_TITLE = 0;
static var PK_DESCRIPTION = 1;
static var PK_VALUE = 2;
static var PERK = [["Extra HP", "Increase \u043Caximum HP by 10%", 0.1], ["HP Regeneration", "Increase HP regeneration speed by 10%", 0.1], ["Jump power", "Increase power of second jump by 10%", 0.1], ["Bullet Speed", "Increase bullet speed by 10%", 0.1], ["Extra Damage", "Increase damage by 10%", 0.1], ["Clip Size", "Increase clip size by 10%", 0.1]];
static var BONUS_SCORE = 0;
static var BONUS_HP = 1;
static var BONUS_PISTOL = 2;
static var BONUS_SHOTGUN = 3;
static var BONUS_ASSAULT = 4;
static var BONUS_RPG = 5;
static var BONUS_TOTAL = 6;
static var B_NAME = 0;
static var B_LEVELS = 1;
static var BONUS = [["score", 4], ["hp", 3], ["pistol", 4], ["shotgun", 4], ["assault", 4], ["rpg", 2]];
}
Symbol 596 MovieClip [__Packages.as.PerkPopup] Frame 0
class as.PerkPopup extends MovieClip
{
var _visible, selected, perkpanel, perk1, perk2, closebtn, onEnterFrame, perkchoise, flash, _parent, removeMovieClip, _quality;
function PerkPopup () {
super();
as.Settings.PAUSED = true;
_visible = false;
selected = -1;
perkpanel = [perk1, perk2];
closebtn = closebtn;
closebtn.onPress = mx.utils.Delegate.create(this, ContinueGame);
onEnterFrame = onCreate;
}
function onCreate() {
delete onEnterFrame;
var _local3 = [];
var _local2 = 0;
while (_local2 < as.Settings.PERK_TOTAL) {
if (as.Unit.PERK[_local2] < as.Settings.PERK_MAX_LEVEL) {
_local3.push(_local2);
}
_local2++;
}
if (_local3.length == 0) {
ContinueGame();
return(undefined);
}
perkchoise = [];
perkpanel[0].onPress = mx.utils.Delegate.create(this, Select1);
perkpanel[1].onPress = mx.utils.Delegate.create(this, Select2);
_local2 = 0;
while (_local2 < perkpanel.length) {
perkpanel[_local2].gotoAndStop(1);
perkpanel[_local2]._visible = _local3.length > 0;
if (!_local3.length) {
break;
}
var _local4 = random(_local3.length);
var _local5 = _local3[_local4];
perkchoise.push(_local5);
_local3.splice(_local4, 1);
InitPerkPanel(perkpanel[_local2], _local5);
_local2++;
}
if (perkchoise.length == 1) {
perkpanel[0]._x = 240;
}
Select1();
flash = _parent.attachMovie("WhiteBox", "wb", _parent.getNextHighestDepth());
flash._width = 480;
flash._height = 360;
_visible = true;
onEnterFrame = StartEffect;
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
trace("PerkScreen created");
}
function StartEffect() {
if (flash._alpha <= 0) {
flash.removeMovieClip();
delete onEnterFrame;
} else {
flash._alpha = flash._alpha - 5;
}
}
function Select1() {
selected = 0;
perkpanel[0].gotoAndStop(2);
perkpanel[1].gotoAndStop(1);
gui.SoundManager.getInstance().PlaySound("misfire.wav");
}
function Select2() {
selected = 1;
perkpanel[0].gotoAndStop(1);
perkpanel[1].gotoAndStop(2);
gui.SoundManager.getInstance().PlaySound("misfire.wav");
}
function InitPerkPanel(perkpanel, perktype) {
var _local1 = as.Settings.PERK[perktype];
var _local2 = perkpanel.icon;
var _local6 = perkpanel.title;
var _local4 = perkpanel.description;
var _local5 = as.Unit.PERK[perktype] + 1;
_local2.gotoAndStop(perktype + 1);
_local6.text = (("LEVEL " + _local5) + newline) + _local1[as.Settings.PK_TITLE];
_local4.text = _local1[as.Settings.PK_DESCRIPTION];
}
function ContinueGame() {
if (selected >= 0) {
as.Unit.PERK[perkchoise[selected]]++;
if (perkchoise[selected] == as.Settings.PERK_HP) {
var _local3 = Math.round(as.Settings.UNIT_HP * as.Settings.PERK[as.Settings.PERK_HP][as.Settings.PK_VALUE]);
as.Unit.MAXHP = as.Unit.MAXHP + _local3;
as.Unit.HP = as.Unit.HP + _local3;
}
gui.SoundManager.getInstance().PlaySound("startround.wav");
}
flash.removeMovieClip();
removeMovieClip();
as.screen.GameScreen.PRESSED_MOUSE = false;
if ((as.Unit.LEVEL % 3) == 0) {
_root.attachMovie("BannerPopup", "popup", 9001);
} else {
as.Settings.PAUSED = false;
_quality = as.Settings.GAME_QUALITY;
}
}
}
Symbol 597 MovieClip [__Packages.as.screen.GameScreen] Frame 0
class as.screen.GameScreen extends MovieClip
{
static var PRESSED_MOUSE;
var _quality, lastbtnupdate, doublejumbpenabled, PRESSED_UP, PRESSED_LEFT, PRESSED_RIGHT, gametime, explodetime, _parent, stop, onEnterFrame, pausemsg, score, scoremsg, score_bar, scorebar, hp_bar, hpbar, bg, gamebg, bgblend, playfield, unit, battle, cooldown, score_max, onMouseDown, onMouseUp, weaponbtn, wbtn1, wbtn2, wbtn3, wbtn4, score_min;
function GameScreen () {
super();
_quality = as.Settings.GAME_QUALITY;
lastbtnupdate = 0;
doublejumbpenabled = true;
PRESSED_UP = false;
PRESSED_LEFT = false;
PRESSED_RIGHT = false;
PRESSED_MOUSE = false;
gametime = 0;
explodetime = 0;
_parent.stop();
stop();
as.Battle.LOST = false;
as.Battle.SCORE = 0;
onEnterFrame = onCreate;
Key.addListener(this);
}
function onCreate() {
delete onEnterFrame;
pausemsg = pausemsg;
pausemsg._visible = false;
pausemsg.closebtn.onPress = mx.utils.Delegate.create(this, DoPauseOff);
score = scoremsg;
score_bar = scorebar;
hp_bar = hpbar;
bg = gamebg;
bg.gotoAndStop(as.Ground.TYPENAME[as.Ground.TYPE]);
bgblend = bg.attachMovie("GameBG", "gamebgblend", bg.getNextHighestDepth());
bgblend.stop();
bgblend._alpha = 0;
playfield = bg.createEmptyMovieClip("playfield", bg.getNextHighestDepth());
unit = unit;
battle = new as.Battle(playfield, unit);
gui.SoundManager.getInstance().SwitchMusic("music_game");
onFrame();
SetPaused(as.Settings.FIRST_START);
as.Settings.FIRST_START = false;
cooldown = 0;
score_max = -1;
as.Unit.LEVEL = 0;
RedrawScore();
onMouseDown = mx.utils.Delegate.create(this, onMousePress);
onMouseUp = mx.utils.Delegate.create(this, onMouseRelease);
onEnterFrame = onFrame;
weaponbtn = [wbtn1, wbtn2, wbtn3, wbtn4];
UpdateWeaponButtons();
trace("GameScreen created");
}
function onFrame() {
if (as.Settings.PAUSED) {
return(undefined);
}
gui.MouseCursor.Set(gui.MouseCursor.AIM);
gametime = gametime + as.Settings.FRAME_DELTA_T;
if (PRESSED_LEFT && (unit._x > 20)) {
unit._x = unit._x - 3;
} else if (PRESSED_RIGHT && (unit._x < 460)) {
unit._x = unit._x + 3;
}
if (PRESSED_UP && ((unit.jump_counter == 0) || (doublejumbpenabled && (unit.jump_counter == 1)))) {
unit.Jump();
doublejumbpenabled = false;
}
var _local3 = as.Ground.TYPE;
if (battle.Update(gametime, PRESSED_MOUSE)) {
RedrawScore();
}
if (as.Ground.TYPE != _local3) {
bgblend._alpha = 1;
bgblend.gotoAndStop(as.Ground.TYPENAME[as.Ground.TYPE]);
}
if ((bgblend._alpha > 0) && (bgblend._alpha < 100)) {
bgblend._alpha = bgblend._alpha + 1;
if (bgblend._alpha >= 100) {
bg.gotoAndStop(as.Ground.TYPENAME[as.Ground.TYPE]);
bgblend._alpha = 0;
}
}
var _local2 = getTimer();
if ((lastbtnupdate + 500) < _local2) {
lastbtnupdate = _local2;
UpdateWeaponButtons();
hp_bar.SetPercent(as.Unit.HP / as.Unit.MAXHP);
hp_bar.title.text = (("HP: " + as.Unit.HP) + "/") + as.Unit.MAXHP;
}
if (as.Unit.HP <= 0) {
delete onKeyDown;
delete onKeyUp;
delete onMouseDown;
delete onMouseUp;
delete RedrawScore;
onEnterFrame = GoTo_FinalScreen;
}
}
function DoPauseOff() {
SetPaused(false);
}
function onKeyDown() {
var _local3 = Key.getCode();
switch (_local3) {
case 32 :
case 80 :
if (!_root.popup) {
SetPaused(!as.Settings.PAUSED);
}
break;
case 65 :
case 37 :
PRESSED_LEFT = true;
break;
case 68 :
case 39 :
PRESSED_RIGHT = true;
break;
case 87 :
case 38 :
PRESSED_UP = true;
break;
case 49 :
case 50 :
case 51 :
case 52 :
if (!unit.SetWeapon(_local3 - 49)) {
break;
}
UpdateWeaponButtons();
}
}
function onKeyUp() {
var _local2 = Key.getCode();
switch (_local2) {
case 65 :
case 37 :
PRESSED_LEFT = false;
break;
case 68 :
case 39 :
PRESSED_RIGHT = false;
break;
case 87 :
case 38 :
PRESSED_UP = false;
doublejumbpenabled = true;
}
}
function onMousePress() {
PRESSED_MOUSE = true;
}
function onMouseRelease() {
PRESSED_MOUSE = false;
}
function SetPaused(paused) {
as.Settings.PAUSED = paused;
pausemsg._visible = paused;
if (as.Settings.PAUSED) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
}
function RedrawScore() {
if (as.Battle.SCORE > score_max) {
as.Unit.LEVEL++;
score_bar.title.text = ("level " + as.Unit.LEVEL) + " progress";
score_min = as.Unit.GetMinExpForLevel(as.Unit.LEVEL);
score_max = as.Unit.GetMinExpForLevel(as.Unit.LEVEL + 1);
if (as.Unit.LEVEL > 1) {
_root.attachMovie("PerkPopup", "popup", 9000);
gui.SoundManager.getInstance().PlaySound("damage_blind.wav");
}
}
var _local3 = String(as.Battle.SCORE);
while (_local3.length < 6) {
_local3 = "0" + _local3;
}
score.text = _local3;
score_bar.SetPercent((as.Battle.SCORE - score_min) / (score_max - score_min));
}
function UpdateWeaponButtons() {
var _local2 = 0;
while (_local2 < as.Settings.WEAPON_TOTAL) {
var _local4 = 1;
if (unit.weapontype == _local2) {
_local4 = 2;
} else if ((_local2 > 0) && (unit.weaponammo[_local2] <= 0)) {
_local4 = 3;
}
weaponbtn[_local2].gotoAndStop(_local4);
var _local7 = as.Settings.WEAPONCLASS[_local2];
var _local5 = weaponbtn[_local2].icon;
var _local6 = weaponbtn[_local2].ammocount;
var _local3 = unit.weaponlevel[_local2];
_local5.gotoAndStop(_local7[as.Settings.WC_NAME] + _local3);
_local5.transform.colorTransform = ((_local3 > 0) ? (new flash.geom.ColorTransform(1, 1, 1, 1, 0, 0, 0, 0)) : (new flash.geom.ColorTransform(0.1, 0.1, 0.1, 1, 0, 0, 0, 0)));
_local6.text = (((_local2 == 0) || (_local3 == 0)) ? "" : (String(unit.weaponammo[_local2])));
_local2++;
}
}
function GoTo_FinalScreen() {
delete onEnterFrame;
gui.SoundManager.getInstance().SwitchMusic("music_menu");
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
gui.TransitionScreen.getInstance().Execute(mx.utils.Delegate.create(this, GoTo_EndScreen));
}
function GoTo_EndScreen() {
_root.gotoAndStop("Banner");
}
}
Symbol 598 MovieClip [__Packages.gui.ProgressBar] Frame 0
class gui.ProgressBar extends MovieClip
{
var line, progressline, basescale_x;
function ProgressBar () {
super();
line = progressline;
basescale_x = line._xscale;
}
function SetPercent(percent) {
var _local2 = percent * basescale_x;
if (_local2 < 0) {
_local2 = 0;
}
line._xscale = _local2;
}
}
Symbol 599 MovieClip [__Packages.as.screen.BannerPopup] Frame 0
class as.screen.BannerPopup extends MovieClip
{
var closebtn, flash, attachMovie, getNextHighestDepth, onEnterFrame, removeMovieClip;
function BannerPopup () {
super();
as.Settings.PAUSED = true;
closebtn.onPress = mx.utils.Delegate.create(this, ContinueGame);
flash = attachMovie("WhiteBox", "wb", getNextHighestDepth());
flash._width = 480;
flash._height = 360;
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
onEnterFrame = DoEffect;
}
function DoEffect() {
if (flash._alpha <= 0) {
flash.removeMovieClip();
delete onEnterFrame;
} else {
flash._alpha = flash._alpha - 5;
}
}
function ContinueGame() {
removeMovieClip();
as.Settings.PAUSED = false;
}
}
Symbol 600 MovieClip [__Packages.gui.MusicPanel] Frame 0
class gui.MusicPanel extends MovieClip
{
var s, musicbtn, soundbtn, music_off, sound_off;
function MusicPanel () {
super();
s = gui.SoundManager.getInstance();
musicbtn = musicbtn;
soundbtn = soundbtn;
music_off = music_off;
sound_off = sound_off;
musicbtn.onPress = mx.utils.Delegate.create(this, SwitchMusic);
soundbtn.onPress = mx.utils.Delegate.create(this, SwitchSound);
Refresh();
}
function Refresh() {
music_off._visible = !s.__get__music();
sound_off._visible = !s.sound;
}
function SwitchMusic() {
s.__set__music(!s.__get__music());
Refresh();
}
function SwitchSound() {
s.sound = !s.sound;
Refresh();
}
}
Symbol 601 MovieClip [__Packages.as.screen.FinalScreen] Frame 0
class as.screen.FinalScreen extends MovieClip
{
var _quality, flashroot, _parent, closebtn, bg, submit;
function FinalScreen () {
super();
_quality = "HIGH";
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
flashroot = _parent;
flashroot.stop();
closebtn = closebtn;
gui.SoundManager.getInstance().SwitchMusic("music_title");
bg = bg;
bg.gotoAndStop(2);
closebtn.onPress = mx.utils.Delegate.create(this, Click_GoToStart);
submit = submit;
_root.score = Math.round(as.Battle.SCORE);
_root.numberofLevel = as.Unit.LEVEL;
trace((_root.score + " ") + _root.numberofLevel);
submit.valScore.text = _root.score;
submit._visible = true;
submit.sub.enabled = false;
Selection.setFocus(submit.playerName);
}
function Click_GoToStart() {
gui.TransitionScreen.getInstance().Execute(mx.utils.Delegate.create(this, Click_GoTo));
}
function Click_GoTo() {
flashroot.gotoAndPlay("title");
}
}
Symbol 75 Button
on (rollOver) {
if (gui.MouseCursor.Get() != gui.MouseCursor.AIM) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
}
on (rollOut) {
if (gui.MouseCursor.Get() != gui.MouseCursor.AIM) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
}
Symbol 78 Button
on (rollOver) {
if (gui.MouseCursor.Get() != gui.MouseCursor.AIM) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
}
on (rollOut) {
if (gui.MouseCursor.Get() != gui.MouseCursor.AIM) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
}
Symbol 81 MovieClip [MusicPanel] Frame 1
#initclip 34
Object.registerClass("MusicPanel", gui.MusicPanel);
#endinitclip
Symbol 82 MovieClip [TitleScreen] Frame 1
#initclip 25
Object.registerClass("TitleScreen", as.screen.TitleScreen);
#endinitclip
Symbol 91 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
on (release) {
getURL (_root.downloadURL, "_blank");
}
Symbol 97 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
on (release) {
playSound("shop_simple_click");
getURL (moreGamesURL, "_blank");
}
Symbol 100 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
on (release) {
getURL (_root.addToWebsiteURL, "_blank");
}
Symbol 126 MovieClip [EffectIcon] Frame 1
stop();
Symbol 126 MovieClip [EffectIcon] Frame 18
stop();
Symbol 126 MovieClip [EffectIcon] Frame 27
stop();
Symbol 127 MovieClip [FlyingEffect] Frame 1
#initclip 26
Object.registerClass("FlyingEffect", as.FlyingEffect);
#endinitclip
Symbol 127 MovieClip [FlyingEffect] Frame 40
this.removeMovieClip();
Symbol 150 MovieClip [SoundStorage] Frame 1
stop();
Symbol 171 MovieClip [Bullet] Frame 1
#initclip 27
Object.registerClass("Bullet", as.Bullet);
#endinitclip
Symbol 285 MovieClip [Enemy] Frame 1
#initclip 28
Object.registerClass("Enemy", as.Enemy);
#endinitclip
Symbol 290 MovieClip [Explosion] Frame 12
this.removeMovieClip();
Symbol 331 MovieClip [Piece] Frame 1
#initclip 29
Object.registerClass("Piece", as.Piece);
#endinitclip
Symbol 381 MovieClip [Ground] Frame 1
#initclip 30
Object.registerClass("Ground", as.Ground);
#endinitclip
Symbol 406 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Symbol 408 MovieClip [PerkPopup] Frame 1
#initclip 31
Object.registerClass("PerkPopup", as.PerkPopup);
#endinitclip
Instance of Symbol 400 MovieClip "perk1" in Symbol 408 MovieClip [PerkPopup] Frame 1
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Instance of Symbol 400 MovieClip "perk2" in Symbol 408 MovieClip [PerkPopup] Frame 1
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Symbol 419 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Symbol 420 MovieClip [BannerPopup] Frame 1
#initclip 32
Object.registerClass("BannerPopup", as.screen.BannerPopup);
#endinitclip
Symbol 461 MovieClip [Bonus] Frame 1
#initclip 33
Object.registerClass("Bonus", as.Bonus);
#endinitclip
Symbol 464 MovieClip [Star] Frame 31
this.removeMovieClip();
Symbol 467 MovieClip [ShotFlash] Frame 8
this.removeMovieClip();
Symbol 470 MovieClip [Cloud] Frame 1
this.onEnterFrame = function () {
if (this._alpha == 100) {
this._rotation = random(360);
this._alpha = 70;
} else {
this._rotation = this._rotation + 2;
}
this._xscale = this._xscale + 30;
this._yscale = this._yscale + 30;
this._alpha = this._alpha - 10;
if (this._alpha <= 10) {
this.removeMovieClip();
}
};
Symbol 475 Button
on (release) {
getURL (moreGamesURL, "_blank");
}
Symbol 510 MovieClip [UnitLegs] Frame 15
gotoAndPlay ("armor0");
Symbol 510 MovieClip [UnitLegs] Frame 47
gotoAndPlay ("armor1");
Symbol 510 MovieClip [UnitLegs] Frame 80
gotoAndPlay ("armor2");
Symbol 510 MovieClip [UnitLegs] Frame 113
gotoAndPlay ("armor3");
Symbol 510 MovieClip [UnitLegs] Frame 146
gotoAndPlay ("armor4");
Symbol 510 MovieClip [UnitLegs] Frame 179
gotoAndPlay ("armor5");
Symbol 510 MovieClip [UnitLegs] Frame 212
gotoAndPlay ("armor6");
Symbol 510 MovieClip [UnitLegs] Frame 245
gotoAndPlay ("armor7");
Symbol 510 MovieClip [UnitLegs] Frame 278
gotoAndPlay ("armor8");
Symbol 513 MovieClip [Unit] Frame 1
#initclip 38
Object.registerClass("Unit", as.Unit);
#endinitclip
Symbol 515 Button
on (release) {
getURL (_root.downloadURL, "_blank");
}
Symbol 524 MovieClip [ScoreBar] Frame 1
#initclip 35
Object.registerClass("ScoreBar", gui.ProgressBar);
#endinitclip
stop();
Symbol 524 MovieClip [ScoreBar] Frame 2
stop();
Symbol 527 MovieClip [HPBar] Frame 1
#initclip 36
Object.registerClass("HPBar", gui.ProgressBar);
#endinitclip
stop();
Symbol 554 MovieClip [GameScreen] Frame 1
#initclip 37
Object.registerClass("GameScreen", as.screen.GameScreen);
#endinitclip
Symbol 563 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
on (release) {
_parent.submit._visible = false;
_root.submited = true;
var name = _root.playername;
_root._r = _root.getScoreEncoded();
var d1;
var d2;
var d3;
var d4;
d1 = _root._r[0].toString();
d2 = _root._r[1].toString();
d3 = _root._r[2].toString();
d4 = _root._r[3].toString();
var my_lv = new LoadVars();
my_lv.name = _root.playername;
my_lv.d1 = d1;
my_lv.d2 = d2;
my_lv.d3 = d3;
my_lv.d4 = d4;
my_lv.send(_root.hiscoreURL, "_blank", "POST");
}
Symbol 571 MovieClip Frame 1
if ((!flag) && (playerName.text.length)) {
sub.enabled = true;
flag = true;
}
Symbol 576 Button
on (rollOver) {
gui.MouseCursor.Set(gui.MouseCursor.HAND);
}
on (rollOut) {
gui.MouseCursor.Set(gui.MouseCursor.ARROW);
}
Symbol 577 MovieClip [FinalScreen] Frame 1
#initclip 39
Object.registerClass("FinalScreen", as.screen.FinalScreen);
#endinitclip