Frame 1
function onEnterFrame() {
var _local1 = getBytesLoaded() / getBytesTotal();
bar.gotoAndStop(int(_local1 * 100));
if (_local1 == 1) {
onEnterFrame = null;
bar.play();
}
}
stop();
Frame 2
function onEnterFrame() {
while ((getTimer() - t) < 33.3333333333333) {
}
t = getTimer();
}
var t = 0;
Frame 507
onEnterFrame = null;
Frame 508
mochi.MochiServices.connect("93ad79bd7cd672ef");
var menu = new ContextMenu();
menu.hideBuiltInItems();
menu.customItems.push(new ContextMenuItem("Doomrunner", function () {
}));
var sodata = SharedObject.getLocal("doomrunner");
if (!sodata.data.score) {
sodata.data.score = 0;
}
if ((musicb == undefined) || (sfxb == undefined)) {
musicb = true;
sfxb = true;
}
Instance of Symbol 29 MovieClip in Frame 514
on (release) {
_parent.gotoAndStop("link");
}
Instance of Symbol 29 MovieClip in Frame 514
on (release) {
_parent.gotoAndStop("howto");
}
Instance of Symbol 29 MovieClip in Frame 514
on (release) {
_parent.gotoAndStop("authors");
}
Instance of Symbol 29 MovieClip in Frame 514
on (release) {
_parent.gotoAndStop("scores");
}
Instance of Symbol 15 MovieClip in Frame 514
on (release) {
getURL ("http://www.gameshed.com", "_blank");
}
Frame 519
stop();
q = ((!q) ? "MEDIUM" : (_quality));
qsel.gotoAndStop(q);
_quality = "HIGH";
var s = sodata.data.score;
s = (s ? (String(s)) : "000000");
while (s.length < 6) {
s = "0" + s;
}
topscore.text = s;
musics.gotoAndStop(musicb);
sfxs.gotoAndStop(sfxb);
new Sound(musicmc).setVolume(musicb * 100);
Instance of Symbol 29 MovieClip in Frame 523
on (release) {
_parent.gotoAndStop("menu");
}
Frame 527
mochi.MochiScores.showLeaderboard({boardID:"5bdc19c3e767e381", onClose:function () {
_root.gotoAndStop("menu");
}});
Instance of Symbol 29 MovieClip in Frame 530
on (release) {
_parent.gotoAndStop("menu");
}
Frame 534
gotoAndStop ("game");
Frame 539
function onEnterFrame() {
paused._visible = Main.self.pause;
var _local2 = Game.player;
if (_local2) {
hitpoints.text = Math.max(0, _local2.hp);
energy.text = ((_local2.energy < 10) ? ("0" + Math.floor(_local2.energy)) : (Math.round(_local2.energy))) + "%";
var _local1 = Stats.score.toString();
while (_local1.length < 6) {
_local1 = "0" + _local1;
}
score.text = _local1;
level.text = ((Game.levelnum < 9) ? "0" : "") + (Game.levelnum + 1);
} else {
hitpoints.text = "0";
energy.text = "00%";
}
}
function gameover() {
gameoverscr.play();
}
stop();
_quality = q;
Game.setup();
Instance of Symbol 15 MovieClip in Frame 539
on (release) {
getURL ("http://gameshed.com", "_blank");
}
Symbol 3 MovieClip Frame 1
stop();
Symbol 3 MovieClip Frame 110
stop();
_parent.play();
Symbol 188 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, __get__comChannelName, onError, _listenChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.43");
}
static function allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local3 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
if (urlOptions().servicesURL != undefined) {
_servicesURL = urlOptions().servicesURL;
}
allowDomains(_servicesURL);
_clip = clip.createEmptyMovieClip(_local3, 10336, false);
_listenChannelName = _listenChannelName + ((Math.floor(new Date().getTime()) + "_") + Math.floor(Math.random() * 99999));
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip((((_servicesURL + "?listenLC=") + _listenChannelName) + "&mochiad_options=") + escape(_root.mochiad_options), _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel._nextcallbackID = 0;
_listenChannel._callbacks = {};
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_listenChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_listenChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_listenChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
trace("connected!");
_connecting = false;
_connected = true;
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _listenChannel._callbacks[_local1.callbackID];
}
delete _listenChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
if ((args.options != null) && (args.options.onError != null)) {
args.options.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_listenChannel._nextcallbackID});
}
_listenChannel._callbacks[_listenChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_listenChannel._nextcallbackID++;
}
static function urlOptions() {
var _local5 = {};
if (_root.mochiad_options) {
var _local4 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2].split("=");
_local5[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local5);
}
static function addLinkEvent(url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var _local2 = new Object();
_local2.mav = getVersion();
_local2.swfv = btn.getSWFVersion() || 6;
_local2.swfurl = btn._url;
_local2.fv = System.capabilities.version;
_local2.os = System.capabilities.os;
_local2.lang = System.capabilities.language;
_local2.scres = (System.capabilities.screenResolutionX + "x") + System.capabilities.screenResolutionY;
var s = "?";
var _local3 = 0;
for (var _local6 in _local2) {
if (_local3 != 0) {
s = s + "&";
}
_local3++;
s = ((s + _local6) + "=") + escape(_local2[_local6]);
}
if (!(netupAttempted || (_connected))) {
var ping = btn.createEmptyMovieClip("ping", 777);
var _local7 = btn.createEmptyMovieClip("nettest", 778);
netupAttempted = true;
ping.loadMovie("http://x.mochiads.com/linkping.swf?t=" + getTimer());
_local7.onEnterFrame = function () {
if ((ping._totalframes > 0) && (ping._totalframes == ping._framesloaded)) {
delete this.onEnterFrame;
} else if ((getTimer() - t0) > timeout) {
delete this.onEnterFrame;
mochi.MochiServices.netup = false;
}
};
}
var _local4 = btn.createEmptyMovieClip("clk", 1001);
_local4._alpha = 0;
_local4.beginFill(1044735);
_local4.moveTo(0, 0);
_local4.lineTo(0, btn._height);
_local4.lineTo(btn._width, btn._height);
_local4.lineTo(btn._width, 0);
_local4.lineTo(0, 0);
_local4.endFill();
_local4.onRelease = function () {
if (mochi.MochiServices.netup) {
getURL (url + s, "_blank");
} else {
getURL (burl, "_blank");
}
if (onClick != undefined) {
onClick();
}
};
}
static var _servicesURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__ms_";
static var _connecting = false;
static var _connected = false;
static var netup = true;
static var netupAttempted = false;
}
Symbol 189 MovieClip [__Packages.fx.Sfx] Frame 0
class fx.Sfx
{
var clip;
function Sfx (link, source) {
var _local2 = new Sound(Main.attachempty());
_local2.attachSound(link);
_local2.start();
var _local3 = source.x - (Main.width / 2);
_local2.setPan((_local3 / 180) * 100);
_local2.setVolume(gvolume * (70 + ((Math.abs(_local3) / 500) * 50)));
data.Timer.add(new data.Event(this, remove, _local2.duration));
}
function remove() {
clip.removeMovieClip();
}
static var gvolume = 0.9;
}
Symbol 190 MovieClip [__Packages.units.Body] Frame 0
class units.Body
{
static var targeted;
var clip, link, dieanim;
function Body () {
clip = Main.attach(link);
clip._x = -100;
Main.enterframe.add(this);
if (bullet) {
Collision.bullets.add(this);
} else {
Collision.list.add(this);
}
if (target) {
targeted.add(this);
}
update();
update();
}
function is(type) {
return(this instanceof type);
}
function get exists() {
return(Boolean(clip._parent));
}
function update() {
clip._x = x;
clip._y = y;
clip._rotation = (180 / pi) * r;
x = x + vx;
y = y + vy;
r = r + vr;
move();
if ((((x < -100) || (y < -100)) || (x > (Main.width + 100))) || (y > (Main.height + 100))) {
remove();
}
return(undefined);
}
function move() {
}
function collide(body) {
}
function die() {
var _local2 = Main.attach(dieanim);
_local2._x = x;
_local2._y = y;
remove();
}
function remove() {
Main.enterframe.remove(this);
Collision.list.remove(this);
Collision.bullets.remove(this);
targeted.remove(this);
clip.removeMovieClip();
}
function time(f, delay) {
data.Timer.add(new data.Event(this, f, delay));
}
function damage(points) {
hp = hp - points;
if (hp <= 0) {
die();
}
}
function follow(obj, speed) {
var _local3 = obj.x - x;
var _local2 = obj.y - y;
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2));
_local3 = _local3 * (speed / _local4);
_local2 = _local2 * (speed / _local4);
vx = vx + _local3;
vy = vy + _local2;
}
function moveatangle(r, speed) {
vx = vx + (speed * Math.sin(r));
vy = vy + (speed * (-Math.cos(r)));
}
function angleto(body) {
return(angletovec(body.x - x, body.y - y));
}
function angletovec(x, y) {
var _local2 = Math.atan2(x, -y) - (r % pi2);
if (_local2 > pi) {
_local2 = _local2 - pi2;
}
if (_local2 < (-pi)) {
_local2 = _local2 + pi2;
}
return(_local2);
}
function randplace() {
var _local2 = random(4);
if (_local2 == 0) {
x = Math.random() * Main.width;
y = -40;
}
if (_local2 == 1) {
y = Math.random() * Main.height;
x = -40;
}
if (_local2 == 2) {
x = Math.random() * Main.width;
y = Main.height + 40;
}
if (_local2 == 3) {
y = Math.random() * Main.height;
x = Main.width + 40;
}
}
function bump(source, force) {
var _local3 = (source.x - source.vx) - (x - vx);
var _local2 = (source.y - source.vy) - (y - vy);
var _local4 = Math.sqrt((_local3 * _local3) + (_local2 * _local2)) + 0.01;
_local3 = _local3 * (force / _local4);
_local2 = _local2 * (force / _local4);
vx = vx - _local3;
vy = vy - _local2;
vr = vr - (((Math.random() - 0.5) * force) / 8);
}
var hp = 0;
var size = 10;
var bullet = false;
var target = false;
var x = 0;
var y = 0;
var r = 0;
var vx = 0;
var vy = 0;
var vr = 0;
static var pi = Math.PI;
static var pi2 = (Math.PI*2);
}
Symbol 191 MovieClip [__Packages.data.List] Frame 0
class data.List
{
var entry, type, length;
function List (type) {
entry = new data.Node();
this.type = (type ? (type) : (Object));
length = 0;
}
function add(node) {
if (!(node instanceof type)) {
throw new Error("Wrong type added: " + node);
}
var _local2 = new data.Node();
_local2.value = node;
_local2.next = entry.next;
entry.next = _local2;
length++;
}
function pop() {
if (empty) {
throw new Error("List empty");
}
var _local2 = entry.next.value;
entry.next = entry.next.next;
length--;
return(_local2);
}
function iter(obj, f) {
var _local2 = entry.next;
while (_local2) {
f.call(obj, _local2.value);
_local2 = _local2.next;
}
}
function remove(node) {
var _local2 = entry;
while (_local2) {
if (_local2.next.value == node) {
_local2.next = _local2.next.next;
length--;
return(true);
}
_local2 = _local2.next;
}
return(false);
}
function get empty() {
return(!Boolean(entry.next));
}
}
Symbol 192 MovieClip [__Packages.data.Node] Frame 0
class data.Node
{
function Node () {
}
}
Symbol 193 MovieClip [__Packages.data.BodyList] Frame 0
class data.BodyList extends data.List
{
function BodyList () {
super(units.Body);
}
}
Symbol 194 MovieClip [__Packages.Main] Frame 0
class Main extends MovieClip
{
static var self, enterframe;
var _parent, fpst, collisiont, unitst, timert, fade, createEmptyMovieClip, units;
function Main () {
super();
self = this;
Key.addListener(this);
var _local3 = _parent.createEmptyMovieClip("disp", 1);
_local3.blendMode = "invert";
fpst = _local3.createTextField("fpst", 1, 20, 20, 100, 20);
collisiont = _local3.createTextField("collisiont", 2, 20, 40, 100, 20);
unitst = _local3.createTextField("unitst", 3, 20, 60, 100, 20);
timert = _local3.createTextField("timert", 4, 20, 80, 100, 20);
fade = fx.FadeBuffer(data.Op.force(createEmptyMovieClip("fade", 0), fx.FadeBuffer, [width, height]));
units = createEmptyMovieClip("units", 1);
enterframe = new data.List();
t = getTimer();
data.Timer.init();
Stats.init();
Collision.init();
}
static function attach(movieclip) {
return(self.units.attachMovie(movieclip, random(999999999).toString(), self.units.getNextHighestDepth()));
}
static function attachempty() {
return(self.createEmptyMovieClip(random(999999999).toString(), self.getNextHighestDepth()));
}
static function attachfade() {
return(self.fade.contents.createEmptyMovieClip(random(999999999).toString(), self.fade.contents.getNextHighestDepth()));
}
function onEnterFrame() {
if (pause) {
return(undefined);
}
f++;
fade.update();
Stats.run();
var _local5 = getTimer();
data.Timer.run();
var _local4 = getTimer();
Collision.run();
var _local3 = getTimer();
enterframe.iter(this, function (n) {
n.update();
});
var _local2 = getTimer();
while (getTimer() < (t + (1000 / fps))) {
}
t = getTimer();
}
function onKeyDown() {
if (Key.getCode() == 32) {
pause = !pause;
}
}
static var fps = 28.5;
static var width = 750;
static var height = 600;
var f = 0;
var t = 0;
var pause = false;
}
Symbol 195 MovieClip [__Packages.fx.FadeBuffer] Frame 0
class fx.FadeBuffer extends MovieClip
{
var contents, createEmptyMovieClip, point, screen, buffer1, buffer2, filter, attachBitmap;
function FadeBuffer (width, height) {
super();
contents = createEmptyMovieClip("contents", -1);
contents._visible = false;
point = new flash.geom.Point(0, 0);
screen = new flash.geom.Rectangle(0, 0, width, height);
buffer1 = new flash.display.BitmapData(width, height, true, 0);
buffer2 = new flash.display.BitmapData(width, height, true, 0);
filter = new flash.filters.ColorMatrixFilter([1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0.9, 0]);
}
function update() {
buffer1.draw(contents);
buffer2.applyFilter(buffer1, screen, point, filter);
attachBitmap(buffer1, 0);
var _local2 = buffer2;
buffer2 = buffer1;
buffer1 = _local2;
}
}
Symbol 196 MovieClip [__Packages.data.Op] Frame 0
class data.Op
{
function Op () {
}
static function force(obj, type, args) {
obj.__proto__ = type.prototype;
type.apply(obj, args);
return(obj);
}
static function key(char) {
return(Key.isDown(char.toUpperCase().charCodeAt(0)));
}
static function keyc(code) {
return(Key.isDown(code));
}
}
Symbol 197 MovieClip [__Packages.data.Timer] Frame 0
class data.Timer
{
static var schedule;
function Timer () {
}
static function init() {
schedule = new data.List(data.Event);
}
static function add(event) {
var _local1 = schedule.entry;
for(;;){
if ((_local1.next.value.time > event.time) || (!_local1.next)) {
var _local2 = new data.Node();
_local2.value = event;
_local2.next = _local1.next;
_local1.next = _local2;
schedule.length++;
return(undefined);
}
_local1 = _local1.next;
};
}
static function run() {
var _local1 = schedule.entry.next.value;
if (_local1 && (_local1.time <= Main.self.t)) {
schedule.pop();
if (_local1.obj.exists != false) {
_local1.trigger();
}
run();
}
}
}
Symbol 198 MovieClip [__Packages.data.Event] Frame 0
class data.Event
{
var obj, f, time;
function Event (scope, f, delay) {
obj = scope;
this.f = f;
time = Main.self.t + (delay ? (delay) : 0);
}
function trigger() {
f.apply(obj);
}
}
Symbol 199 MovieClip [__Packages.Stats] Frame 0
class Stats
{
static var shields, energy, missile, laser, rate, score, shieldsprog, energyprog, missileprog, laserprog, rateprog;
function Stats () {
}
static function init() {
shields = (energy = (missile = (laser = (rate = (score = 0)))));
shieldsprog = (energyprog = (missileprog = (laserprog = (rateprog = 100))));
}
static function plus(stat) {
Stats[stat]++;
Stats[stat + "prog"] = 0;
}
static function run() {
if (!Game.player.__get__exists()) {
return(undefined);
}
var _local2 = 0;
while (_local2 < 5) {
var _local1 = kinds[_local2];
if (Stats[_local1] > 0) {
if (((Stats[_local1 + "prog"] = Stats[_local1 + "prog"] + (0.1 + (Stats[_local1] / 5)))) >= 100) {
if ((--Stats[_local1]) > 0) {
Stats[_local1 + "prog"] = 0;
}
}
}
_local2++;
}
}
static var kinds = ["shields", "energy", "missile", "laser", "rate"];
}
Symbol 200 MovieClip [__Packages.Game] Frame 0
class Game
{
static var level, player, levelnum;
function Game () {
}
static function setup() {
level = [{freq:2200, next:15000, f:pick(units.Fighter)}, {freq:1700, next:15000, f:pick(units.Fighter, units.Fighter, units.Fighter, units.Mine)}, {freq:1000, next:20000, f:pick(units.Fighter, units.Fighter, units.Cruiser, units.Mine)}, {freq:950, next:30000, f:pick(units.Fighter, units.Fighter, units.Cruiser, units.Mine)}, {freq:800, next:40000, f:pick(units.Fighter, units.Cruiser, units.Seeker, units.Mine)}, {freq:800, next:50000, f:pick(units.Fighter, units.Cruiser, units.Seeker)}, {freq:1050, next:60000, f:pick(units.Fighter, units.Cruiser, units.Seeker, units.Choochoo)}, {freq:1000, next:70000, f:pick(units.Fighter, units.Seeker, units.Cruiser, units.MSilo, units.Choochoo, units.Mine)}, {freq:950, next:80000, f:pick(units.Seeker, units.Choochoo, units.Cruiser, units.MSilo, units.Mine)}, {freq:900, next:80000, f:pick(units.Choochoo, units.Cruiser, units.MSilo, units.Seeker)}, {freq:850, next:90000, f:pick(units.Seeker, units.Choochoo, units.MSilo, units.Mine)}, {freq:850, next:90000, f:pick(units.Seeker, units.Choochoo, units.MSilo)}, {freq:10000, next:90000, f:pickn(10, units.Fighter, units.Fighter, units.Seeker)}, {freq:15000, next:100000, f:pickn(7, units.Seeker, units.Choochoo, units.Cruiser)}, {freq:18000, next:100000, f:pickn(7, units.Choochoo, units.Cruiser, units.MSilo)}, {freq:20000, next:80000, f:pickn(8, units.MSilo)}, {freq:1800, next:90000, f:boss(units.Fighter, units.Mine)}, {freq:1500, next:100000, f:boss(units.Fighter, units.Seeker, units.Cruiser, units.Mine)}, {freq:1500, next:110000, f:boss(units.Seeker, units.Choochoo, units.Cruiser, units.MSilo)}, {freq:1300, next:110000, f:boss(units.Seeker, units.Choochoo, units.Cruiser, units.MSilo)}, {freq:23000, next:100000, f:pickn(3, units.Mothership)}, {freq:23000, next:100000, f:pickn(5, units.Mothership)}, {freq:1000, next:120000, f:boss(units.Choochoo, units.Cruiser, units.MSilo)}];
units.Body.targeted = new data.BodyList();
player = new units.Player();
levelnum = 0;
time(nextlevel, 60000);
time(spawn, 4000);
}
static function pick() {
var array = arguments;
return(function () {
eval (null)(new array[random(array.length)]());
});
}
static function pickn(n) {
var array = arguments;
return(function () {
var _local2 = array[1 + random(array.length - 1)];
var _local1 = 0;
while (_local1 < n) {
eval (null)(new _local2[undefined]());
_local1++;
}
});
}
static function boss() {
var array = arguments;
var spawned = false;
return(function () {
if (!spawned) {
eval (null)(new units.Mothership());
spawned = true;
} else {
eval (null)(new array[random(array.length)]());
}
});
}
static function spawn() {
var _local1 = ((levelnum < level.length) ? (levelnum) : ((level.length - 1) - random(10)));
time(spawn, level[_local1].freq);
if (units.Body.targeted.length < 10) {
level[_local1].f();
}
}
static function nextlevel() {
if (levelnum >= level.length) {
return(undefined);
}
time(nextlevel, level[levelnum].next);
levelnum++;
}
static function time(f, delay) {
data.Timer.add(new data.Event(null, f, delay));
}
}
Symbol 201 MovieClip [__Packages.units.Player] Frame 0
class units.Player extends units.Body
{
var x, y, trail, r, moveatangle, vx, vy, vr, time;
function Player () {
x = 375;
y = 300;
super();
trail = new fx.Trail(this, 5263615, 8);
}
function move() {
hp = hp + Math.min(1.5, (10 + (Stats.shields * 4)) / hp);
energy = energy + ((100 - energy) * (0.01 + (Stats.energy * 0.007)));
trail.draw();
var _local4 = Number(data.Op.keyc(39) || (data.Op.key("d"))) - Number(data.Op.keyc(37) || (data.Op.key("a")));
r = r + (0.21 * _local4);
if (data.Op.keyc(38) || (data.Op.key("w"))) {
x = x + ((0.8 * speed) * Math.sin(r));
y = y + ((0.8 * speed) * (-Math.cos(r)));
moveatangle(r, speed * 0.2);
}
if (data.Op.keyc(40) || (data.Op.key("s"))) {
x = x - ((0.4 * speed) * Math.sin(r));
y = y - ((0.4 * speed) * (-Math.cos(r)));
moveatangle(r, (-speed) * 0.1);
}
vx = vx * 0.82;
vy = vy * 0.82;
vr = vr * 0.6;
if ((lloaded && (data.Op.key("z") || (data.Op.keyc(16)))) && (energy > (7 + (Stats.laser * 2)))) {
energy = energy - (7 + (Stats.laser * 2));
var _local3 = 0;
while (_local3 < (2 + Stats.laser)) {
eval (null)(new units.Laser(x, y, r));
_local3++;
}
eval (null)(new fx.Sfx("launch2_s", this));
lloaded = false;
time(function () {
this.lloaded = true;
}, 200 - (15 * Stats.rate));
}
if ((mloaded && (data.Op.key("x") || (data.Op.keyc(17)))) && (energy > (17 + (Stats.missile * 4)))) {
energy = energy - (17 + (Stats.missile * 4));
var _local2 = -0.1;
while (_local2 <= 0.1) {
eval (null)(new units.Missile(x, y, r - (_local2 * units.Body.pi)));
_local2 = _local2 + (0.2 / ((2 + Stats.missile) - 1));
}
eval (null)(new fx.Sfx("launch3_s", this));
mloaded = false;
time(function () {
this.mloaded = true;
}, 350 - (15 * Stats.rate));
}
if (x > 770) {
x = -20;
} else if (x < -20) {
x = 770;
} else if (y > 620) {
y = -20;
} else if (y < -20) {
y = 620;
} else {
return(undefined);
}
trail.reposition();
}
function damage(p) {
super.damage(p);
eval (null)(new fx.Shake(Main.self, p / 3));
eval (null)(new fx.Sfx("hit_s", this));
}
function die() {
trail.remove();
eval (null)(new fx.Sfx("boom1_s", this));
vx = (vy = 0);
super.die();
_root.gameover();
}
static var speed = 7.5;
var link = "player";
var dieanim = "boom2";
var hp = 100;
var energy = 100;
var lloaded = true;
var mloaded = true;
}
Symbol 202 MovieClip [__Packages.fx.Trail] Frame 0
class fx.Trail extends MovieClip
{
var body, color, width, clip, x, y;
function Trail (body, color, width) {
super();
this.body = body;
this.color = (color ? (color) : 0);
this.width = (width ? (width) : 0);
clip = Main.attachfade();
}
function draw() {
if (x || (y)) {
clip.clear();
clip.lineStyle(width, color, 50, false, "none", "none");
clip.moveTo(x, y);
clip.lineTo(body.x, body.y);
}
reposition();
}
function reposition() {
x = body.x;
y = body.y;
}
function remove() {
clip.removeMovieClip();
}
}
Symbol 203 MovieClip [__Packages.units.Laser] Frame 0
class units.Laser extends units.Body
{
var x, y, r, vx, vy, die;
function Laser (x, y, r) {
this.x = x;
this.y = y;
this.r = r;
vx = (speed * Math.sin(r)) + ((Math.random() - 0.5) * 5);
vy = (speed * (-Math.cos(r))) + ((Math.random() - 0.5) * 5);
super();
}
function collide(body) {
if (body.is(units.Enemy)) {
die();
body.bump(this, 3);
body.damage(hit);
}
}
var speed = 18;
var hit = 10;
var bullet = true;
var link = "laser";
var dieanim = "hit1";
}
Symbol 204 MovieClip [__Packages.units.Enemy] Frame 0
class units.Enemy extends units.Body
{
var x, y;
function Enemy () {
super();
}
function die() {
var _local3 = 0;
while (Math.random() < ((drop - _local3) * 0.85)) {
eval (null)(new units.Powerup(x, y, Stats.kinds[random(5)]));
_local3++;
}
eval (null)(new fx.Shake(Main.self, 7));
eval (null)(new fx.Sfx("boom1_s", this));
super.die();
Stats.score = Stats.score + score;
}
function collide(body) {
if (body.is(units.Bumpy)) {
body.bump(this, 2);
} else if (body.is(units.Player)) {
body.bump(this, 4);
}
}
var target = true;
var drop = 0;
var score = 0;
}
Symbol 205 MovieClip [__Packages.units.Powerup] Frame 0
class units.Powerup extends units.Body
{
var kind, link, x, y, moveatangle, vx, vy, die;
function Powerup (x, y, kind) {
this.kind = kind;
link = "bonus_" + kind;
this.x = x;
this.y = y;
super();
moveatangle(Math.random() * units.Body.pi2, 1.5);
vx = vx + ((375 - x) * 0.01);
vy = vy + ((300 - y) * 0.01);
}
function collide(body) {
if (body.is(units.Player)) {
Stats.plus(kind);
eval (null)(new fx.Sfx("beep_s", this));
var _local2 = Main.attach("pickup");
_local2._x = x;
_local2._y = y;
die();
}
}
var size = 15;
}
Symbol 206 MovieClip [__Packages.fx.Shake] Frame 0
class fx.Shake
{
var target;
function Shake (target, strength) {
if (target.__shake) {
target.__shake = target.__shake + strength;
return;
}
target.__shake = strength;
this.target = target;
Main.enterframe.add(this);
}
function update() {
target._x = target._x - offx;
target._y = target._y - offy;
var _local2 = target.__shake;
vx = vx + (((Math.random() - 0.5) * _local2) - offx);
vy = vy + (((Math.random() - 0.5) * _local2) - offy);
vx = vx * 0.7;
vy = vy * 0.7;
offx = offx + vx;
offy = offy + vy;
if (_local2 > 0) {
target.__shake = (_local2 * 0.9) - 0.25;
} else {
target.__shake = null;
Main.enterframe.remove(this);
return(undefined);
}
target._x = target._x + offx;
target._y = target._y + offy;
}
var offx = 0;
var offy = 0;
var vx = 0;
var vy = 0;
}
Symbol 207 MovieClip [__Packages.units.Bumpy] Frame 0
interface units.Bumpy
{
}
Symbol 208 MovieClip [__Packages.units.Missile] Frame 0
class units.Missile extends units.Body
{
var x, y, r, moveatangle, trail, mtarget, angleto, vr, vx, vy, time, angletovec;
function Missile (x, y, r) {
this.x = x;
this.y = y;
this.r = r;
moveatangle(r, speed);
trail = new fx.Trail(this, 4210943, 2);
super();
if (!mtarget) {
gettarget();
}
}
function die() {
trail.remove();
super.die();
}
function move() {
if (mtarget.__get__exists()) {
var _local2 = angleto(mtarget);
if (_local2 > 0) {
vr = vr + rspeed;
} else {
vr = vr - rspeed;
}
}
vr = vr + (vrand * (Math.random() - 0.5));
vr = vr * rdamp;
vx = 0;
vy = 0;
moveatangle(r, speed);
trail.draw();
if (life > 0) {
life--;
} else {
die();
return(undefined);
}
}
function gettarget() {
time(gettarget, 200 + random(200));
mtarget = null;
var _local7 = 1E100;
var _local2 = units.Body.targeted.entry.next;
while (_local2) {
var _local5 = _local2.value;
var _local4 = _local5.x - x;
var _local3 = _local5.y - y;
var _local6 = Math.abs(angletovec(_local4, _local3)) * ((_local4 * _local4) + (_local3 * _local3));
if (_local6 < _local7) {
mtarget = _local5;
_local7 = _local6;
}
_local2 = _local2.next;
}
}
function collide(body) {
if (body.is(units.Enemy)) {
eval (null)(new fx.Sfx("boom1_s", this));
body.bump(this, 6);
body.damage(hit);
die();
}
}
static var rdamp = 0.58;
static var vrand = 0.25;
var rspeed = 0.09;
var speed = 15;
var life = 150;
var hit = 17;
var size = 8;
var link = "missile";
var dieanim = "hitblue";
var bullet = true;
}
Symbol 209 MovieClip [__Packages.units.Fighter] Frame 0
class units.Fighter extends units.Enemy implements units.Bumpy
{
var randplace, r, angleto, trail, angletovec, x, y, vr, moveatangle, vx, vy;
function Fighter () {
randplace();
r = angleto(Game.player);
super();
trail = new fx.Trail(this, 2162464, 6.5);
}
function move() {
var _local2 = Game.player;
var _local3 = angletovec((_local2.x + (_local2.vx * 50)) - x, (_local2.y + (_local2.vy * 50)) - y);
vr = vr + Math.min(0.04, Math.max(-0.04, _local3 / 15));
vr = vr * 0.77;
if (Math.abs(_local3) < (0.3 * units.Body.pi)) {
acc = acc + 0.3;
}
moveatangle(r, acc * 0.1);
acc = acc * 0.9;
vx = vx * 0.95;
vy = vy * 0.95;
trail.draw();
if (Math.random() < laserfreq) {
eval (null)(new units.EnemyLaser(x, y, r));
}
}
function die() {
trail.remove();
super.die();
}
var link = "fighter";
var dieanim = "boom1";
var score = 100;
var hp = 25;
var laserfreq = 0.025;
var acc = 0;
var drop = 0.4;
}
Symbol 210 MovieClip [__Packages.units.EnemyLaser] Frame 0
class units.EnemyLaser extends units.Laser
{
var die;
function EnemyLaser (x, y, r) {
super(x, y, r);
}
function collide(body) {
if (body.is(units.Player)) {
body.damage(hit);
die();
}
}
var speed = 13;
var hit = 15;
var size = 15;
var link = "enemylaser";
}
Symbol 211 MovieClip [__Packages.units.Mine] Frame 0
class units.Mine extends units.Enemy
{
var randplace, vx, x, vy, y, vr, die;
function Mine () {
super();
randplace();
vx = ((200 + (Math.random() * 300)) - x) / 300;
vy = ((150 + (Math.random() * 300)) - y) / 300;
vr = Math.random() * 0.1;
}
function move() {
vx = Math.min(2, Math.max(-2, vx));
vy = Math.min(2, Math.max(-2, vy));
}
function collide(body) {
if (body.is(units.Player)) {
body.damage(30);
body.bump(this, 25);
drop = 0;
die();
} else if (body.is(units.Mine)) {
body.bump(this, 1);
}
}
var hp = 50;
var drop = 0.8;
var link = "mine";
var dieanim = "boom1";
var target = false;
var score = 50;
}
Symbol 212 MovieClip [__Packages.units.Cruiser] Frame 0
class units.Cruiser extends units.Fighter
{
var x, y, r;
function Cruiser () {
super();
}
function move() {
if (Math.random() < missilefreq) {
eval (null)(new units.EnemyMissile(x, y, r + 0.5));
eval (null)(new units.EnemyMissile(x, y, r - 0.5));
}
super.move();
}
var link = "cruiser";
var hp = 40;
var laserfreq = 0.018;
var missilefreq = 0.0053;
var size = 20;
var drop = 1.1;
var score = 250;
}
Symbol 213 MovieClip [__Packages.units.EnemyMissile] Frame 0
class units.EnemyMissile extends units.Missile
{
var mtarget, trail, die;
function EnemyMissile (x, y, r) {
mtarget = Game.player;
super(x, y, r);
trail.remove();
trail = new fx.Trail(this, 2162464, 2);
}
function collide(body) {
if (body.is(units.Player)) {
body.damage(hit);
die();
}
}
var hit = 20;
var rspeed = 0.1;
var speed = 14;
var link = "enemymissile";
var life = 70;
}
Symbol 214 MovieClip [__Packages.units.Seeker] Frame 0
class units.Seeker extends units.Enemy implements units.Bumpy
{
var randplace, r, angleto, trail, angletovec, x, y, vr, moveatangle, vx, vy;
function Seeker () {
randplace();
super();
r = angleto(Game.player);
trail = new fx.Trail(this, 2162464, 6.5);
}
function move() {
var _local2 = Game.player;
var _local3 = angletovec((_local2.x - (_local2.vx * 20)) - x, (_local2.y - (_local2.vy * 20)) - y);
vr = vr + Math.max(-0.02, Math.min(0.02, _local3 / 25));
moveatangle(r, 0.8);
vr = vr * 0.9;
vx = vx * 0.9;
vy = vy * 0.9;
trail.draw();
if (Math.random() < 0.01) {
eval (null)(new units.EnemyLaser(x, y, r));
}
if (Math.random() < 0.005) {
eval (null)(new units.EnemyMissile(x, y, r));
}
}
function die() {
trail.remove();
super.die();
}
var link = "seeker";
var dieanim = "boom1";
var hp = 30;
var drop = 0.7;
var size = 18;
var score = 150;
}
Symbol 215 MovieClip [__Packages.units.Choochoo] Frame 0
class units.Choochoo extends units.Enemy implements units.Bumpy
{
var randplace, r, angleto, trail, vr, moveatangle, vx, vy, x, y;
function Choochoo () {
randplace();
super();
r = angleto(Game.player);
trail = new fx.Trail(this, 2162464, 8);
}
function move() {
vr = vr + (angleto(Game.player) / 30);
moveatangle(r, 0.3);
vr = vr * 0.7;
vx = vx * 0.93;
vy = vy * 0.93;
trail.draw();
if (Math.random() < 0.01) {
var _local2 = 0;
while (_local2 < 4) {
eval (null)(new units.EnemyLaser(x, y, r));
_local2++;
}
}
if (Math.random() < 0.003) {
eval (null)(new units.EnemyMissile(x, y, r + 1));
eval (null)(new units.EnemyMissile(x, y, r - 1));
eval (null)(new units.EnemyMissile(x, y, r + 2));
eval (null)(new units.EnemyMissile(x, y, r - 2));
}
}
function die() {
trail.remove();
super.die();
}
var link = "choochoo";
var dieanim = "boom2";
var hp = 55;
var size = 20;
var drop = 1.3;
var score = 250;
}
Symbol 216 MovieClip [__Packages.units.MSilo] Frame 0
class units.MSilo extends units.Enemy implements units.Bumpy
{
var randplace, vr, time, vx, vy, x, y;
function MSilo () {
randplace();
super();
}
function move() {
if (state == "idle") {
vr = vr + 0.02;
if (Math.random() < 0.01) {
state = "spin";
time(function () {
this.clip.gotoAndPlay("fire");
}, 1250);
time(fire, 2000);
}
} else if (state == "spin") {
vr = vr + 0.09;
}
vr = vr * 0.85;
vx = vx * 0.85;
vy = vy * 0.85;
var _local2 = Game.player;
vx = vx + ((_local2.x - x) * 0.003);
vy = vy + ((_local2.y - y) * 0.003);
}
function fire() {
state = "idle";
var _local2 = -units.Body.pi;
while (_local2 < units.Body.pi) {
eval (null)(new units.EnemyMissile(x, y, _local2));
_local2 = _local2 + (units.Body.pi2 / 10);
}
eval (null)(new fx.Sfx("launch1_s", this));
}
var hp = 100;
var score = 400;
var size = 25;
var drop = 1.4;
var link = "msilo";
var dieanim = "boom2";
var state = "idle";
}
Symbol 217 MovieClip [__Packages.units.Mothership] Frame 0
class units.Mothership extends units.Enemy
{
var randplace, r, angleto, moveatangle, time, vr, vx, vy, x, y;
function Mothership () {
randplace();
r = angleto(Game.player);
moveatangle(r, 10);
super();
time(shoot, 2000);
time(shoot2, 2500);
}
function move() {
vr = vr + (angleto(Game.player) / 600);
moveatangle(r, 0.1);
vr = vr * 0.9;
vx = vx * 0.95;
vy = vy * 0.95;
}
function shoot() {
eval (null)(new units.EnemyMissile(x + ((Math.random() - 0.5) * 10), y + ((Math.random() - 0.5) * 10), Math.random() * units.Body.pi2));
time(shoot, 800 + random(1000));
}
function shoot2() {
eval (null)(new units.EnemyLaser(x, y, r + angleto(Game.player)));
eval (null)(new units.EnemyLaser(x, y, r + angleto(Game.player)));
eval (null)(new units.EnemyLaser(x, y, r + angleto(Game.player)));
time(shoot2, 1000 + random(2500));
}
function collide(body) {
if (body.is(units.Mothership)) {
body.bump(this, 3);
} else {
super.collide(body);
}
}
function bump(source, force) {
super.bump(source, force / 15);
}
var link = "mother";
var dieanim = "boom2";
var hp = 400;
var score = 2000;
var size = 30;
var drop = 10;
}
Symbol 218 MovieClip [__Packages.Collision] Frame 0
class Collision
{
static var list, bullets, last, last2;
function Collision () {
}
static function init() {
list = new data.BodyList();
bullets = new data.BodyList();
last = null;
last2 = null;
}
static function run() {
var _local5 = (last ? (last) : (bullets.entry.next));
var _local6 = iters;
while (_local6 && (_local5)) {
var _local3 = list.entry.next;
while (_local3) {
var _local2 = _local5.value;
var _local1 = _local3.value;
var _local4 = _local2.size + _local1.size;
if ((Math.abs(_local2.x - _local1.x) < _local4) && (Math.abs(_local2.y - _local1.y) < _local4)) {
_local2.collide(_local1);
}
_local3 = _local3.next;
}
_local5 = _local5.next;
_local6--;
}
last = _local5;
_local5 = (last2 ? (last2) : (list.entry.next));
_local6 = iters2;
while (_local6 && (_local5)) {
var _local3 = _local5.next;
while (_local3) {
var _local2 = _local5.value;
var _local1 = _local3.value;
var _local4 = _local2.size + _local1.size;
if ((Math.abs(_local2.x - _local1.x) < _local4) && (Math.abs(_local2.y - _local1.y) < _local4)) {
_local2.collide(_local1);
_local1.collide(_local2);
}
_local3 = _local3.next;
}
_local5 = _local5.next;
_local6--;
}
last2 = _local5;
}
static var iters = 35;
static var iters2 = 15;
}
Symbol 219 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if ((options.clip == null) || (options.clip == undefined)) {
options.clip = mochi.MochiServices.clip;
}
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else if (options.score instanceof mochi.MochiDigits) {
options.score = options.score.value;
}
var _local1 = Number(options.score);
if (isNaN(_local1)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is 'Not a Number'");
} else if ((_local1 == Number.NEGATIVE_INFINITY) || (_local1 == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + options.score) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(_local1) != _local1) {
trace(("WARNING: Submitted score '" + options.score) + "' will be truncated");
}
options.score = _local1;
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is 'Not a Number'");
} else if ((score == Number.NEGATIVE_INFINITY) || (score == Number.POSITIVE_INFINITY)) {
trace(("ERROR: Submitted score '" + String(score)) + "' will be rejected, score is an infinite");
} else {
if (Math.floor(score) != score) {
trace(("WARNING: Submitted score '" + String(score)) + "' will be truncated");
}
score = Number(score);
}
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Symbol 220 MovieClip [__Packages.mochi.MochiDigits] Frame 0
class mochi.MochiDigits
{
var Encoder, Fragment, Sibling;
function MochiDigits (digit, index) {
Encoder = 0;
setValue(digit, index);
}
function get value() {
return(Number(toString()));
}
function set value(v) {
setValue(v);
//return(value);
}
function addValue(v) {
value = value + v;
}
function setValue(digit, index) {
var _local3 = digit.toString();
if ((index == undefined) || (isNaN(index))) {
index = 0;
}
Fragment = _local3.charCodeAt(index++) ^ Encoder;
if (index < _local3.length) {
Sibling = new mochi.MochiDigits(digit, index);
} else {
Sibling = null;
}
reencode();
}
function reencode() {
var _local2 = int(2147483647 * Math.random());
Fragment = Fragment ^ (_local2 ^ Encoder);
Encoder = _local2;
}
function toString() {
var _local2 = String.fromCharCode(Fragment ^ Encoder);
return(((Sibling != null) ? (_local2.concat(Sibling.toString())) : (_local2)));
}
}
Symbol 9 Button
on (release) {
getURL ("http://www.gameshed.com", "_blank");
}
Symbol 25 MovieClip Frame 1
var xs = (random(5) + 1);
this._xscale = (this._yscale = xs * 10);
this._y = random(Stage.height);
this.onEnterFrame = function () {
this._x = this._x + (xs * 0.25);
if (this._x > Stage.width) {
this._x = 0;
this._y = random(Stage.height);
}
};
Symbol 29 MovieClip Frame 1
var hit = false;
this.onRollOver = function () {
hit = true;
};
this.onRollOut = function () {
hit = false;
};
this.onEnterFrame = function () {
if (hit == true) {
if (this._alpha < 50) {
this._alpha = this._alpha + (this._alpha * 0.5);
}
} else if (this._alpha > 20) {
this._alpha = this._alpha - (this._alpha * 0.15);
}
};
Symbol 40 Button
on (release) {
gotoAndStop((_parent.q = "HIGH"));
}
Symbol 41 Button
on (release) {
gotoAndStop((_parent.q = "MEDIUM"));
}
Symbol 42 Button
on (release) {
gotoAndStop((_parent.q = "LOW"));
}
Symbol 52 Button
on (release) {
musics.gotoAndStop((musicb = !musicb));
new Sound(musicmc).setVolume(musicb * 100);
}
Symbol 53 Button
on (release) {
sfxs.gotoAndStop((sfxb = !sfxb));
fx.Sfx.gvolume = Number(sfxb);
}
Symbol 56 MovieClip Frame 1
nextFrame();
Symbol 56 MovieClip Frame 2
stop();
Symbol 128 MovieClip Frame 1
_rotation = random(180);
_alpha = (10 + random(50));
Symbol 128 MovieClip Frame 25
stop();
Symbol 132 MovieClip Frame 1
_x = (_x + ((Math.random() - 0.5) * 10));
_y = (_y + ((Math.random() - 0.5) * 10));
Symbol 132 MovieClip Frame 8
stop();
Symbol 133 MovieClip [boom1] Frame 28
this.removeMovieClip();
Symbol 134 MovieClip [boom2] Frame 20
this.removeMovieClip();
Symbol 137 MovieClip [hit1] Frame 14
this.removeMovieClip();
Symbol 138 MovieClip [hitblue] Frame 8
this.removeMovieClip();
Symbol 141 MovieClip [msilo] Frame 10
gotoAndPlay ("spin");
Symbol 142 MovieClip [pickup] Frame 19
this.removeMovieClip();
Symbol 152 MovieClip Frame 1
_visible = false;
Symbol 153 MovieClip [main] Frame 1
#initclip 34
Object.registerClass("main", Main);
#endinitclip
Symbol 170 MovieClip Frame 1
function onEnterFrame() {
bar.gotoAndStop(int(Stats[_name + "prog"] + 1));
name.text = _name;
level.text = ((Stats[_name] > 1) ? (Stats[_name]) : "");
}
Symbol 179 Button
on (release) {
mochi.MochiScores.showLeaderboard({boardID:"5bdc19c3e767e381", score:Stats.score, onClose:back});
}
Symbol 180 Button
on (release) {
back();
}
Symbol 182 MovieClip Frame 1
stop();
Symbol 182 MovieClip Frame 18
function back() {
stopAllSounds();
_parent.gotoAndPlay("flash");
}
_parent.onEnterFrame = null;
_root.sodata.data.score = Math.max(_root.sodata.data.score, Stats.score);
_root.sodata.flush();
var tips = ["Collecting powerups faster enables you to gain higher weapon levels", "Mouse aiming is for girls", "Keep in mind that lasers are as useful as the missiles", "The higher your weapon level the more energy shooting costs", "Only 10 enemies are on screen at a time", "Shooting mines yields powerups too", "I wonder if the stereo sound effects should be more apparent"];
if (Game.levelnum >= 7) {
tipspace.text = ((Math.random() < 0.005) ? "Toast + jam" : ("TIP \n" + tips[random(tips.length)]));
}
Symbol 182 MovieClip Frame 70
stop();
Main.self.pause = true;
Symbol 187 MovieClip Frame 1
function onEnterFrame() {
_alpha = (_alpha - 4);
if (_alpha <= 0) {
onEnterFrame = null;
_visible = false;
}
}