Combined Code
movieClip 2 {
}
movieClip 3 bullet {
}
movieClip 5 {
}
movieClip 7 {
}
movieClip 9 {
}
movieClip 11 {
frame 1 {
_alpha = 0;
}
}
movieClip 12 {
frame 1 {
stop();
malo = 20;
}
frame 3 {
_parent._alpha = malo;
}
frame 5 {
_parent._alpha = 100;
}
frame 7 {
_parent._alpha = malo;
}
frame 9 {
_parent._alpha = 100;
}
frame 11 {
_parent._alpha = malo;
}
frame 13 {
_parent._alpha = 100;
}
frame 15 {
_parent._alpha = malo;
}
frame 17 {
_parent._alpha = 100;
}
frame 19 {
_parent._alpha = malo;
}
frame 21 {
_parent._alpha = 100;
}
frame 23 {
_parent._alpha = malo;
}
frame 25 {
_parent._alpha = 100;
}
frame 27 {
_parent._alpha = malo;
}
frame 29 {
_parent._alpha = 100;
}
frame 31 {
_parent._alpha = malo;
}
frame 33 {
_parent._alpha = 100;
}
}
movieClip 13 hero {
frame 1 {
stop();
}
frame 3 {
root.fire();
}
}
movieClip 15 boom_1 {
frame 16 {
root.remove(_name);
}
}
frame 1 {
var soundList = new Array('loseSnd', 'laserSnd', 'bossShootSnd', 'healthSnd', 'hitBossSnd', 'hurtSnd', 'btnSnd', 'amb1', 'amb2', 'amb3', 'boomSnd', 'bossSnd', 'dieSnd', 'shootSnd', 'upSnd');
goLive = true;
mochiAdID = 'aa7360beb20b9ce1';
mochibotID = '438f6bc0';
mochi.as2.MochiAd.showPreGameAd({'id': 'aa7360beb20b9ce1', 'res': '600x600', 'background': 16777161, 'color': 16747008, 'outline': 13994812, 'no_bg': true});
mochi.as2.MochiServices.connect(mochiAdID);
}
frame 1 {
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = '__mochibot__';
mbc = 'mochibot.com';
g = _global ? _global : _level0._root;
if (g[mb + swfid]) {
return g[mb + swfid];
}
s = System.security;
x = mc._root.getSWFVersion;
fv = x ? mc.getSWFVersion() : (_global ? 6 : 5);
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == 'localWithFile') {
return null;
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = (fv == 5) ? /:$version : System.capabilities.version;
u = 'http://' + mbc + '/my/core.swf?mv=8&fv=' + fv + '&v=' + escape(pv) + '&swfid=' + escape(swfid) + '&l=' + lv + '&f=' + mc + (sb ? '&sb=' + sb : '') + (trk ? '&t=1' : '');
lv = fv > 6 ? mc.getNextHighestDepth() : (g[mb + 'level'] ? g[mb + 'level'] + 1 : lv);
g[mb + 'level'] = lv;
if (fv == 5) {
res = '_level' + lv;
if (!eval(res)) {
loadMovieNum(u, lv);
}
return res;
}
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
return res;
}
stop();
gameName = 'mr. MothBall 5';
authorInfo = '© Mateusz Skutnik';
miesiac = '1';
rok = '2012';
wersja = '1.0.0';
gameWidth = 600;
gameHeight = 600;
footerRGB = 6710886;
authorLink = 'http://www.pastelstories.com';
commentLink = 'http://www.pastelportal.com/stories/mr-mothball-5-under-the-cherry-tree/';
moreGamesLink = 'http://www.pastelportal.com/promo.html';
twitterLink = 'http://twitter.com/MateuszSkutnik';
tweetLink = 'http://twitter.com/home?status=check out new game by Mateusz Skutnik: ' + commentLink;
facebookLink = 'https://www.facebook.com/pastelstories';
shareLink = 'http://www.facebook.com/share.php?u=' + commentLink;
Stage.scaleMode = 'noScale';
fscommand('trapallkeys', true);
Stage.showMenu = false;
fscommand('showmenu', 'false');
Button.prototype.tabEnabled = false;
MovieClip.prototype.tabEnabled = false;
_global.root = this;
_quality = 'BEST';
przechodzimy = false;
zaczynamy = true;
musicOn = true;
sfxOn = true;
saveFile = SharedObject.getLocal('save');
saveFile.clear();
_global.s = saveFile.data;
_global.sfx = function (co) {
if (sfxOn) {
root[co].start();
}
};
_global.amb = function (ktory) {
if (musicOn && ktoryAmbient != eval(ktory)) {
stopAllSounds();
(eval(ktory)).start();
}
ktoryAmbient = eval(ktory);
ktoryAmbient.onSoundComplete = function () {
this.start();
};
s.currentAmbient = ktory;
};
_global.rem = function (ktoryObiekt, nr) {
s.done = true;
point = {'x': _x, 'y': _y};
ktoryObiekt.localToGlobal(point);
ktorySave = 'obiekt_' + _currentframe + '_' + Math.round(point.x) + '_' + Math.round(point.y);
trace(ktorySave);
if (nr == undefined) {
if (s[ktorySave] != undefined) {
ktoryObiekt.gotoAndStop(s[ktorySave]);
}
} else {
if (nr == 't') {
s[ktorySave] = ktoryObiekt._totalframes;
} else {
if (nr == 'c') {
s[ktorySave] = ktoryObiekt._currentframe;
} else {
s[ktorySave] = nr;
}
}
}
};
link = function (jakiLink) {
if (goLive) {
sfx('btnSnd');
getURL(jakiLink, '_blank');
}
};
attachSounds = function () {
i = 0;
while (i < soundList.length) {
this[soundList[i]] = new Sound(this);
this[soundList[i]].attachSound(soundList[i]);
++i;
}
};
toggleMusic = function () {
if (go) {
if (musicOn) {
stopAllSounds();
musicOn = false;
} else {
ktoryAmbient.start();
musicOn = true;
}
createFooter();
}
};
toggleSfx = function () {
if (go) {
if (sfxOn) {
sfxOn = false;
} else {
sfxOn = true;
}
createFooter();
}
};
createFooter = function () {
if (musicOn) {
musicTXT = 'on';
} else {
musicTXT = 'off';
}
if (sfxOn) {
sfxTXT = 'on';
} else {
sfxTXT = 'off';
}
footer = '<p align=\'center\'>' + gameName + ' | ' + miesiac + '.' + rok + 'v' + wersja + ' | <a href=\'' + authorLink + '\' target=\'_blank\'>' + authorInfo + '</a></p>';
optionsFooter = ' | <a href=\'' + commentLink + '\' target=\'_blank\'>comment</a> | <a href=\'asFunction:endGame\'>quit</a> | <a href=\'asFunction:pauseGame\'>pause</a> | <a href=\'asFunction:toggleMusic\'>music: ' + musicTXT + '</a> | <a href=\'asFunction:toggleSfx\'>sound fx: ' + sfxTXT + '</a>';
versionTXT.removeTextField();
this.createTextField('footerTXT', 2, 0, gameHeight - 20, gameWidth, 20);
footerTXT.selectable = false;
footerTXT.html = true;
if (go) {
footerTXT.htmlText = footer + optionsFooter;
} else {
footerTXT.htmlText = footer;
}
var v2 = new TextFormat();
v2.color = footerRGB;
v2.align = 'center';
v2.font = 'Arial';
v2.size = 10;
footerTXT.setTextFormat(v2);
};
MovieClip.prototype.drawRectangle = function (w, h, alfa) {
var v2 = this.createEmptyMovieClip('s1', 1);
v2.beginFill(0, alfa);
v2.moveTo(0, 0);
v2.lineTo(w, 0);
v2.lineTo(w, h);
v2.lineTo(0, h);
v2.endFill();
};
przejscie = function (gdzie) {
przejscieDest = gdzie;
if (!przechodzimy) {
przechodzimy = true;
this.createEmptyMovieClip('przejscieMC', this.getNextHighestDepth());
przejscieMC.drawRectangle(gameWidth, gameHeight, 100);
przejscieMC._alpha = 1;
przejscieMC.dissolve = false;
przejscieMC.onEnterFrame = przejscieEF;
}
};
przejscieEF = function () {
if (!this.dissolve) {
this._alpha += 15;
} else {
this._alpha -= 15;
}
if (this._alpha >= 140) {
if (pauseMC._visible) {
removeMovieClip(pauseMC);
pauseActive = false;
}
root.gotoAndStop(root.przejscieDest);
this.dissolve = true;
}
if (this._alpha <= 0) {
root.przechodzimy = false;
delete this.onEnterFrame;
removeMovieClip(this);
}
};
if (goLive && mochibotID != undefined) {
__com_mochibot__(mochibotID, this, 10301, true);
}
}
movieClip 211 __Packages.mochi.as2.MochiAd {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiAd) {
var v1 = function () {};
mochi.as2.MochiAd = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showPreGameAd = function (options) {
var v27 = {'clip': _root, 'ad_timeout': 3000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showPreloaderAd', 'color': 16747008, 'background': 16777161, 'outline': 13994812, 'no_progress_bar': false, 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}, 'ad_progress': function (percent) {}};
options = mochi.as2.MochiAd._parseOptions(options, v27);
if ('c862232051e0a94e1c3609b3916ddb17'.substr(0) == 'dfeada81ac97cde83665f81c12da7def') {
options.ad_started();
options.ad_finished();
return undefined;
}
var clip = options.clip;
var v24 = 11000;
var v19 = options.ad_timeout;
if (options.skip) {
v19 = 0;
}
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v15 = mochi.as2.MochiAd._getRes(options);
var v5 = v15[0];
var v14 = v15[1];
mc._x = v5 * 0.5;
mc._y = v14 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk._x = v5 * -0.5;
chk._y = v14 * -0.5;
var v7 = chk.createEmptyMovieClip('_mochiad_bar', 4);
if (options.no_progress_bar) {
v7._visible = false;
delete options.no_progress_bar;
} else {
v7._x = 10;
v7._y = v14 - 20;
}
var v23 = options.color;
delete options.color;
var v21 = options.background;
delete options.background;
var v25 = options.outline;
delete options.outline;
var v6 = v7.createEmptyMovieClip('_outline', 1);
v6.beginFill(v21);
v6.moveTo(0, 0);
v6.lineTo(v5 - 20, 0);
v6.lineTo(v5 - 20, 10);
v6.lineTo(0, 10);
v6.lineTo(0, 0);
v6.endFill();
var v4 = v7.createEmptyMovieClip('_inside', 2);
v4.beginFill(v23);
v4.moveTo(0, 0);
v4.lineTo(v5 - 20, 0);
v4.lineTo(v5 - 20, 10);
v4.lineTo(0, 10);
v4.lineTo(0, 0);
v4.endFill();
v4._xscale = 0;
var v8 = v7.createEmptyMovieClip('_outline', 3);
v8.lineStyle(0, v25, 100);
v8.moveTo(0, 0);
v8.lineTo(v5 - 20, 0);
v8.lineTo(v5 - 20, 10);
v8.lineTo(0, 10);
v8.lineTo(0, 0);
chk.ad_msec = v24;
chk.ad_timeout = v19;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
var sendHostProgress = false;
mc.lc.sendHostLoadProgress = function (lc_name) {
sendHostProgress = true;
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v10 = this._parent._parent;
var v3 = v10;
for (;;) {
if (!(!v3.getBytesTotal() && v3)) break;
v3 = v3._parent;
}
if (!v3) {
v3 = _root;
}
var v13 = this._parent._mochiad_ctr;
var v7 = getTimer() - this.started;
var v5 = false;
var v6 = v3.getBytesTotal();
var v9 = v3.getBytesLoaded();
var v4 = 100 * v9 / v6;
var v12 = 100 * v7 / chk.ad_msec;
var v11 = this._mochiad_bar._inside;
var v15 = Math.min(100, Math.min(v4 || 0, v12));
v15 = Math.max(this.last_pcnt, v15);
this.last_pcnt = v15;
v11._xscale = v15;
options.ad_progress(v15);
if (sendHostProgress) {
mochi.as2.MochiAd.containerNotify(clip, {'id': 'hostLoadPcnt', 'pcnt': v4}, clip._mochiad._containerLCName);
if (v4 == 100) {
sendHostProgress = false;
}
}
if (!chk.showing) {
var v8 = v13.getBytesTotal();
if (v8 > 0 || typeof v8 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v7 > chk.ad_timeout && v4 == 100) {
options.ad_failed();
v5 = true;
}
}
}
if (v7 > chk.ad_msec) {
v5 = true;
}
if (v6 > 0 && v9 >= v6 && v5) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
};
v1.showClickAwayAd = function (options) {
var v10 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showClickAwayAd', 'res': '300x250', 'no_bg': true, 'ad_started': function () {}, 'ad_finished': function () {}, 'ad_loaded': function (width, height) {}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v10);
var clip = options.clip;
var v9 = options.ad_timeout;
delete options.ad_timeout;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var v3 = clip._mochiad;
v3.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v11 = v5[0];
var v8 = v5[1];
v3._x = v11 * 0.5;
v3._y = v8 * 0.5;
var chk = v3.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_timeout = v9;
chk.started = getTimer();
chk.showing = false;
v3.lc.adLoaded = options.ad_loaded;
v3.lc.adSkipped = options.ad_skipped;
v3.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
v3.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
var v21 = false;
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
v2 = true;
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v2) {
delete this.onEnterFrame;
}
};
};
v1.showInterLevelAd = function (options) {
var v13 = {'clip': _root, 'ad_timeout': 2000, 'fadeout_time': 250, 'regpt': 'o', 'method': 'showTimedAd', 'ad_started': function () {
this.clip.stop();
}, 'ad_finished': function () {
this.clip.play();
}, 'ad_failed': function () {
trace('[MochiAd] Couldn\'t load an ad, make sure that your game\'s local security sandbox is configured for Access Network Only and that you are not using ad blocking software');
}, 'ad_loaded': function (width, height) {}, 'ad_skipped': function () {}};
options = mochi.as2.MochiAd._parseOptions(options, v13);
var clip = options.clip;
var v10 = 11000;
var v12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!mochi.as2.MochiAd.load(options)) {
options.ad_failed();
options.ad_finished();
return undefined;
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var v5 = mochi.as2.MochiAd._getRes(options);
var v14 = v5[0];
var v11 = v5[1];
mc._x = v14 * 0.5;
mc._y = v11 * 0.5;
var chk = mc.createEmptyMovieClip('_mochiad_wait', 3);
chk.ad_msec = v10;
chk.ad_timeout = v12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var v2 = 100 * (1 - (getTimer() - this.fadeout_start) / this.fadeout_time);
if (v2 > 0) {
this._parent._alpha = v2;
} else {
var v3 = this._parent._parent;
mochi.as2.MochiAd.unload(v3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = options.ad_loaded;
mc.lc.adSkipped = options.ad_skipped;
mc.lc.adjustProgress = function (msec) {
var v2 = this.mc._mochiad_wait;
v2.server_control = true;
v2.started = getTimer();
v2.ad_msec = msec - 250;
};
mc.lc.rpc = function (callbackID, arg) {
mochi.as2.MochiAd.rpc(clip, callbackID, arg);
};
mc.rpcTestFn = function (s) {
trace('[MOCHIAD rpcTestFn] ' + s);
return s;
};
chk.onEnterFrame = function () {
var v5 = this._parent._mochiad_ctr;
var v4 = getTimer() - this.started;
var v2 = false;
if (!chk.showing) {
var v3 = v5.getBytesTotal();
if (v3 > 0 || typeof v3 == 'undefined') {
chk.showing = true;
chk.started = getTimer();
} else {
if (v4 > chk.ad_timeout) {
options.ad_failed();
v2 = true;
}
}
}
if (v4 > chk.ad_msec) {
v2 = true;
}
if (v2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
};
v1.showPreloaderAd = function (options) {
trace('[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0');
mochi.as2.MochiAd.showPreGameAd(options);
};
v1.showTimedAd = function (options) {
trace('[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0');
mochi.as2.MochiAd.showInterLevelAd(options);
};
v1._allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.load = function (options) {
var v12 = {'clip': _root, 'server': 'http://x.mochiads.com/srv/1/', 'method': 'load', 'depth': 10333, 'id': '_UNKNOWN_'};
options = mochi.as2.MochiAd._parseOptions(options, v12);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = mochi.as2.MochiAd.getVersion();
var v6 = options.clip;
if (!mochi.as2.MochiAd._isNetworkAvailable()) {
return null;
}
if (v6._mochiad_loaded) {
return null;
}
var v11 = options.depth;
delete options.depth;
var mc = v6.createEmptyMovieClip('_mochiad', v11);
var v10 = mochi.as2.MochiAd._getRes(options);
options.res = v10[0] + 'x' + v10[1];
options.server += options.id;
delete options.id;
v6._mochiad_loaded = true;
if (v6._url.indexOf('http') != 0) {
trace('[MochiAd] NOTE: Security Sandbox Violation errors below are normal');
}
var v4 = mc.createEmptyMovieClip('_mochiad_ctr', 1);
for (var v7 in options) {
v4[v7] = options[v7];
}
var v9 = v4.server;
delete v4.server;
var v13 = mochi.as2.MochiAd._allowDomains(v9);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
mochi.as2.MochiAd.unload(this._parent);
}
};
}
};
var v5 = new Object();
var v8 = ['', Math.floor((new Date()).getTime()), random(999999)].join('_');
v5.mc = mc;
v5.name = v8;
v5.hostname = v13;
v5.allowDomain = function (d) {
return true;
};
v5.allowInsecureDomain = v5.allowDomain;
v5.connect(v8);
mc.lc = v5;
mc.lc.regContLC = function (lc_name) {
mc._containerLCName = lc_name;
};
v4.lc = v8;
v4.st = getTimer();
if (!options.skip) {
v4.loadMovie(v9 + '.swf', 'POST');
}
return mc;
};
v1.unload = function (clip) {
if (typeof clip == 'undefined') {
clip = _root;
}
if (clip.clip && clip.clip._mochiad) {
clip = clip.clip;
}
if (!clip._mochiad) {
return false;
}
mochi.as2.MochiAd.containerNotify(clip, {'id': 'unload'}, clip._mochiad._containerLCName);
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return true;
};
v1._isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1._getRes = function (options) {
var v3 = options.clip.getBounds();
var v2 = 0;
var v1 = 0;
if (typeof options.res != 'undefined') {
var v4 = options.res.split('x');
v2 = parseFloat(v4[0]);
v1 = parseFloat(v4[1]);
} else {
v2 = v3.xMax - v3.xMin;
v1 = v3.yMax - v3.yMin;
}
if (v2 == 0 || v1 == 0) {
v2 = Stage.width;
v1 = Stage.height;
}
return [v2, v1];
};
v1._parseOptions = function (options, defaults) {
var v4 = {};
for (var v8 in defaults) {
v4[v8] = defaults[v8];
}
if (options) {
for (v8 in options) {
v4[v8] = options[v8];
}
}
if (_root.mochiad_options) {
var v5 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v5.length) {
var v3 = v5[v2].split('=');
v4[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
if (v4.id == 'test') {
trace('[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!');
}
return v4;
};
v1.rpc = function (clip, callbackID, arg) {
switch (arg.id) {
case 'setValue':
mochi.as2.MochiAd.setValue(clip, arg.objectName, arg.value);
break;
case 'getValue':
var v4 = mochi.as2.MochiAd.getValue(clip, arg.objectName);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v4, clip._mochiad._containerLCName);
break;
case 'runMethod':
var v3 = mochi.as2.MochiAd.runMethod(clip, arg.method, arg.args);
mochi.as2.MochiAd.containerRpcResult(clip, callbackID, v3, clip._mochiad._containerLCName);
break;
default:
trace('[mochiads rpc] unknown rpc id: ' + arg.id);
}
};
v1.setValue = function (base, objectName, value) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
base[v2[v1]] = value;
};
v1.getValue = function (base, objectName) {
var v2 = objectName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
return base[v2[v1]];
};
v1.runMethod = function (base, methodName, argsArray) {
var v2 = methodName.split('.');
var v1;
v1 = 0;
while (v1 < v2.length - 1) {
if (base[v2[v1]] == undefined || base[v2[v1]] == null) {
return undefined;
}
base = base[v2[v1]];
++v1;
}
if (typeof base[v2[v1]] == 'function') {
return base[v2[v1]].apply(base, argsArray);
} else {
return undefined;
}
};
v1.containerNotify = function (clip, args, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.notify) {
v1.notify(args);
} else {
(new LocalConnection()).send(lcName, 'notify', args);
}
};
v1.containerRpcResult = function (clip, callbackID, val, lcName) {
var v1 = clip._mochiad._mochiad_ctr.ad.app;
if (v1.rpcResult) {
v1.rpcResult(callbackID, val);
} else {
(new LocalConnection()).send(lcName, 'rpcResult', callbackID, val);
}
};
ASSetPropFlags(mochi.as2.MochiAd.prototype, null, 1);
}
#endinitclip
}
movieClip 212 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 213 __Packages.mochi.as2.MochiServices {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiServices) {
var v1 = function () {};
mochi.as2.MochiServices = v1;
var v2 = v1.prototype;
v1.__get__id = function () {
return mochi.as2.MochiServices._id;
};
v1.__get__clip = function () {
return mochi.as2.MochiServices._container;
};
v1.__get__childClip = function () {
return mochi.as2.MochiServices._clip;
};
v1.getVersion = function () {
return '3.9.5 as2';
};
v1.allowDomains = function (server) {
var v1 = ((server.split('/'))[2].split(':'))[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain('*');
System.security.allowDomain(v1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain('*');
System.security.allowInsecureDomain(v1);
}
}
return v1;
};
v1.__get__isNetworkAvailable = function () {
if (System.security) {
var v1 = System.security;
if (v1.sandboxType == 'localWithFile') {
return false;
}
}
return true;
};
v1.__set__comChannelName = function (val) {
if (val != undefined) {
if (val.length > 3) {
mochi.as2.MochiServices._sendChannelName = val + '_fromgame';
mochi.as2.MochiServices.initComChannels();
}
}
return mochi.as2.MochiServices.__get__comChannelName();
};
v1.__get__connected = function () {
return mochi.as2.MochiServices._connected;
};
v1.connect = function (id, clip, onError) {
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
mochi.as2.MochiServices.warnID(id, false);
if (!mochi.as2.MochiServices._connected && mochi.as2.MochiServices._clip == undefined) {
trace('MochiServices Connecting...');
mochi.as2.MochiServices._connecting = true;
mochi.as2.MochiServices.init(id, clip);
}
};
v1.disconnect = function () {
if (mochi.as2.MochiServices._connected || mochi.as2.MochiServices._connecting) {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._connecting = mochi.as2.MochiServices._connected;
mochi.as2.MochiServices.flush(true);
if (mochi.as2.MochiServices._clip != undefined) {
mochi.as2.MochiServices._clip.removeMovieClip();
delete mochi.as2.MochiServices._clip;
}
mochi.as2.MochiServices._listenChannel.close();
}
};
v1.init = function (id, clip) {
mochi.as2.MochiServices._id = id;
if (clip != undefined) {
mochi.as2.MochiServices._container = clip;
} else {
mochi.as2.MochiServices._container = _root;
}
mochi.as2.MochiServices.loadCommunicator(id, mochi.as2.MochiServices._container);
};
v1.loadCommunicator = function (id, clip) {
var v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
mochi.as2.MochiServices.onError('NotConnected');
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError('IOError');
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError(errorCode);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'services':
mochi.as2.MochiServices.triggerEvent(pkg.event, pkg.args);
break;
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiCoins.triggerEvent(pkg.event, pkg.args);
break;
case 'social':
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError('IOError');
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.flush = function (error) {
var v1;
var v2;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
v1 = mochi.as2.MochiServices._sendChannel._queue.shift();
false;
if (v1.callbackID != null) {
v2 = mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
}
delete mochi.as2.MochiServices._listenChannel._callbacks[v1.callbackID];
if (error) {
mochi.as2.MochiServices.handleError(v1.args, v2.callbackObject, v2.callbackMethod);
}
}
};
v1.handleError = function (args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError('NotConnected');
}
if (args.options != null && args.options.onError != null) {
args.options.onError('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);
}
}
}
};
v1.send = function (methodName, args, callbackObject, callbackMethod) {
if (mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
} else {
if (mochi.as2.MochiServices._clip == undefined || !mochi.as2.MochiServices._connecting) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
break;
case 'b':
case 'c':
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://link.mochiads.com/linkping.swf?t=' + getTimer());
v7.onEnterFrame = function () {
if (ping._totalframes > 0 && ping._totalframes == ping._framesloaded) {
delete this.onEnterFrame;
} else {
if (getTimer() - t0 > timeout) {
delete this.onEnterFrame;
mochi.as2.MochiServices.netup = false;
}
}
};
}
var v4 = btn.createEmptyMovieClip('clk', 1001);
v4._alpha = 0;
v4.beginFill(1044735);
v4.moveTo(0, 0);
v4.lineTo(0, btn._height);
v4.lineTo(btn._width, btn._height);
v4.lineTo(btn._width, 0);
v4.lineTo(0, 0);
v4.endFill();
v4.onRelease = function () {
if (mochi.as2.MochiServices.netup) {
getURL(url + s, '_blank');
} else {
getURL(burl, '_blank');
}
if (onClick != undefined) {
onClick();
}
};
};
v1.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiServices._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiServices._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiServices._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.CONNECTED = 'onConnected';
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
v1.addProperty('childClip', v1.__get__childClip, function () {});
v1.addProperty('clip', v1.__get__clip, function () {});
v1.addProperty('comChannelName', function () {}, v1.__set__comChannelName);
v1.addProperty('connected', v1.__get__connected, function () {});
v1.addProperty('id', v1.__get__id, function () {});
v1.addProperty('isNetworkAvailable', v1.__get__isNetworkAvailable, function () {});
ASSetPropFlags(mochi.as2.MochiServices.prototype, null, 1);
}
#endinitclip
}
movieClip 214 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.getAchievements = function (properties) {
mochi.as2.MochiServices.send('events_getAchievements', properties);
};
v1.unlockAchievement = function (properties) {
mochi.as2.MochiServices.send('events_unlockAchievement', properties);
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.showAwards = function (options) {
mochi.as2.MochiServices.send('events_showAwards', options, null, null);
};
v1.setNotifications = function (style) {
mochi.as2.MochiServices.send('events_setNotifications', style, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startPlay = function (tag) {
if (tag == undefined) {
tag = 'gameplay';
}
mochi.as2.MochiServices.send('events_setRoundID', {'tag': String(tag)}, null, null);
};
v1.endPlay = function () {
mochi.as2.MochiServices.send('events_clearRoundID', null, null, null);
};
v1.trackEvent = function (tag, value) {
mochi.as2.MochiServices.send('events_trackEvent', {'tag': tag, 'value': value}, null, null);
};
v1.ACHIEVEMENTS_OWNED = 'AchievementOwned';
v1.ACHIEVEMENT_NEW = 'AchievementReceived';
v1.GAME_ACHIEVEMENTS = 'GameAchievements';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.IO_PENDING = 'IOPending';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1.FORMAT_NONE = 'NoForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 215 __Packages.mochi.as2.MochiCoins {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiCoins) {
var v1 = function () {};
mochi.as2.MochiCoins = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showStore = function (options) {
mochi.as2.MochiServices.send('coins_showStore', {'options': options}, null, null);
};
v1.showItem = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showItem call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showItem', {'options': options}, null, null);
};
v1.showVideo = function (options) {
if (options == undefined || typeof options.item != 'string') {
trace('ERROR: showVideo call must pass an Object with an item key');
return undefined;
}
mochi.as2.MochiServices.send('coins_showVideo', {'options': options}, null, null);
};
v1.getStoreItems = function () {
mochi.as2.MochiServices.send('coins_getStoreItems');
};
v1.requestFunding = function (properties) {
mochi.as2.MochiServices.send('social_requestFunding', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiCoins._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiCoins._dispatcher.removeEventListener(eventType, delegate);
};
v1.STORE_SHOW = 'StoreShow';
v1.STORE_HIDE = 'StoreHide';
v1.ITEM_OWNED = 'ItemOwned';
v1.ITEM_NEW = 'ItemNew';
v1.STORE_ITEMS = 'StoreItems';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiCoins.prototype, null, 1);
}
#endinitclip
}
movieClip 216 __Packages.mochi.as2.MochiSocial {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSocial) {
var v1 = function () {};
mochi.as2.MochiSocial = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('social_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('social_hideLoginWidget');
};
v1.requestLogin = function (properties) {
mochi.as2.MochiServices.send('social_requestLogin', properties);
};
v1.getFriendsList = function (properties) {
mochi.as2.MochiServices.send('social_getFriendsList', properties);
};
v1.showProfile = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('social_showProfile', options);
};
v1.postToStream = function (properties) {
mochi.as2.MochiServices.send('social_postToStream', properties);
};
v1.inviteFriends = function (properties) {
mochi.as2.MochiServices.send('social_inviteFriends', properties);
};
v1.requestFan = function (properties) {
mochi.as2.MochiServices.send('social_requestFan', properties);
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('social_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.LOGIN_SHOWN = 'LoginShown';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.FRIEND_LIST = 'FriendsList';
v1.PROFILE_DATA = 'ProfileData';
v1.GAMEPLAY_DATA = 'GameplayData';
v1.ACTION_CANCELED = 'onCancel';
v1.ACTION_COMPLETE = 'onComplete';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1);
}
#endinitclip
}
movieClip 217 __Packages.mochi.as2.MochiScores {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiScores) {
var v1 = function () {};
mochi.as2.MochiScores = v1;
var v2 = v1.prototype;
v1.setBoardID = function (boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send('scores_setBoardID', {'boardID': boardID});
};
v1.showLeaderboard = function (options) {
options.clip = mochi.as2.MochiServices.clip;
if (options.clip != mochi.as2.MochiServices.__get__clip() || (mochi.as2.MochiServices.__get__childClip())._target == undefined) {
mochi.as2.MochiServices.disconnect();
trace('WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!');
trace('make sure MochiServices.connect is called as early in the application runtime as possible.');
mochi.as2.MochiServices.connect(mochi.as2.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.as2.MochiDigits) {
options.score = options.score.value;
}
}
var v1 = Number(options.score);
if (isNaN(v1)) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is \'Not a Number\'');
} else {
if (v1 == Number.NEGATIVE_INFINITY || v1 == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(v1) != v1) {
trace('WARNING: Submitted score \'' + options.score + '\' will be truncated');
}
options.score = v1;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
(mochi.as2.MochiServices.__get__clip()).stop();
}
if (options.onClose != null) {
mochi.as2.MochiScores.onClose = options.onClose;
} else {
mochi.as2.MochiScores.onClose = function () {
(mochi.as2.MochiServices.__get__clip()).play();
};
}
if (options.onError != null) {
mochi.as2.MochiScores.onError = options.onError;
} else {
mochi.as2.MochiScores.onError = mochi.as2.MochiScores.onClose;
}
if (options.boardID == null) {
if (mochi.as2.MochiScores.boardID != null) {
options.boardID = mochi.as2.MochiScores.boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace('[MochiScores] NOTE: Security Sandbox Violation errors below are normal');
mochi.as2.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.as2.MochiScores.doClose);
};
v1.closeLeaderboard = function () {
mochi.as2.MochiServices.send('scores_closeLeaderboard');
};
v1.getPlayerInfo = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod);
};
v1.submit = function (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.as2.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod);
};
v1.requestList = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod);
};
v1.scoresArrayToObjects = function (scores) {
var v5 = {};
var v1;
var v4;
var v2;
var v6;
for (var v8 in scores) {
if (typeof scores[v8] == 'object') {
if (scores[v8].cols != null && scores[v8].rows != null) {
v5[v8] = [];
v2 = scores[v8];
v4 = 0;
while (v4 < v2.rows.length) {
v6 = {};
v1 = 0;
while (v1 < v2.cols.length) {
v6[v2.cols[v1]] = v2.rows[v4][v1];
++v1;
}
v5[v8].push(v6);
++v4;
}
} else {
v5[v8] = {};
for (var v7 in scores[v8]) {
v5[v8][v7] = scores[v8][v7];
}
}
} else {
v5[v8] = scores[v8];
}
}
return v5;
};
v1.doClose = function (args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = 'IOError';
}
mochi.as2.MochiScores.onError.apply(null, [args.errorCode]);
} else {
mochi.as2.MochiScores.onClose.apply();
}
};
ASSetPropFlags(mochi.as2.MochiScores.prototype, null, 1);
}
#endinitclip
}
movieClip 218 __Packages.mochi.as2.MochiDigits {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiDigits) {
var v1 = function (digit, index) {
this.Encoder = 0;
this.setValue(digit, index);
};
mochi.as2.MochiDigits = v1;
var v2 = v1.prototype;
v2.__get__value = function () {
return Number(this.toString());
};
v2.__set__value = function (v) {
this.setValue(v);
return this.__get__value();
};
v2.addValue = function (v) {
this.value += v;
};
v2.setValue = function (digit, index) {
var v3 = digit.toString();
if (index == undefined || isNaN(index)) {
index = 0;
}
this.Fragment = v3.charCodeAt(index++) ^ this.Encoder;
if (index < v3.length) {
this.Sibling = new mochi.as2.MochiDigits(digit, index);
} else {
this.Sibling = null;
}
this.reencode();
};
v2.reencode = function () {
var v2 = int(2147483647 * Math.random());
this.Fragment ^= v2 ^ this.Encoder;
this.Encoder = v2;
};
v2.toString = function () {
var v2 = String.fromCharCode(this.Fragment ^ this.Encoder);
return (this.Sibling != null) ? v2.concat(this.Sibling.toString()) : v2;
};
v2.addProperty('value', v2.__get__value, v2.__set__value);
ASSetPropFlags(mochi.as2.MochiDigits.prototype, null, 1);
}
#endinitclip
}
frame 3 {
stop();
if (goLive) {
przejscie('logo');
} else {
przejscie('menu');
}
}
// unknown tag 88 length 55
movieClip 22 {
}
movieClip 23 pauseMC {
frame 15 {
stop();
onMouseDown = function () {
play();
};
}
frame 30 {
root.endPause();
removeMovieClip(this);
}
}
movieClip 26 {
}
movieClip 28 {
frame 22 {
stop();
}
}
movieClip 29 {
frame 1 {
stop();
}
}
movieClip 31 {
frame 1 {
stop();
}
}
movieClip 33 {
}
movieClip 34 boss_1 {
frame 1 {
setDest = function () {
A = root.hero._x;
B = root.hero._y;
trace('dest');
};
setDest();
boss_pause = 5000;
boss_interval = setInterval(setDest, boss_pause);
ramie1_strength = 5;
ramie2_strength = 3;
onEnterFrame = function () {
if (root.go) {
bullet_array = root.bullet_array;
_x = _x + (A - _x) * 0.05;
_y = _y + (B - _y) * 0.05;
ramie1._rotation -= 5;
ramie2._rotation += 5;
if (_x >= root.hero._x) {
body._xscale = 100;
} else {
body._xscale = -100;
}
if (ramie1.tester.hitTest(root.hero.tester)) {
root.damageHero(15);
}
if (ramie2.tester.hitTest(root.hero.tester)) {
root.damageHero(15);
}
if (tester.hitTest(root.hero.tester)) {
root.damageHero(15);
}
i = 0;
while (i < bullet_array.length) {
if (ramie1.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 15 * (body._xscale / 100);
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 5;
--ramie1_strength;
if (ramie1_strength == 0) {
ramie1.nextFrame();
}
}
if (ramie2.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 15 * (body._xscale / 100);
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 5;
--ramie2_strength;
if (ramie2_strength == 0) {
ramie2.nextFrame();
}
}
if (ramie1._currentframe == 2 && ramie2._currentframe == 2) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 15 * (body._xscale / 100);
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 5;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
}
}
++i;
}
}
};
}
}
movieClip 36 enemy_1 {
}
movieClip 38 enemy_2 {
}
movieClip 40 enemy_3 {
}
movieClip 42 enemy_4 {
}
movieClip 44 enemy_5 {
}
movieClip 45 bullet_1 {
}
movieClip 46 boom_2 {
frame 16 {
this.removeMovieClip();
}
}
movieClip 49 {
}
movieClip 51 {
}
movieClip 53 {
}
movieClip 55 {
}
movieClip 57 {
}
movieClip 58 {
frame 1 {
onEnterFrame = function () {
if (this.hitTest(root.hero.tester)) {
root.damageHero(15);
}
};
}
}
movieClip 60 {
}
movieClip 61 {
frame 41 {
sfx('laserSnd');
}
frame 47 {
_parent.szczelam = true;
}
frame 143 {
_parent.szczelam = false;
}
}
movieClip 62 boss_2 {
frame 1 {
A = 100;
szczelam = false;
setDest = function () {
B = root.hero._y;
};
setDest();
boss_pause = 5000;
boss_interval = setInterval(setDest, boss_pause);
onEnterFrame = function () {
if (root.go) {
if (root.hero._x < 100) {
A = 500;
}
if (root.hero._x > 500) {
A = 100;
}
bullet_array = root.bullet_array;
_x = _x + (A - _x) * 0.2;
_y = _y + (B - _y) * 0.2;
if (_x >= root.hero._x) {
_xscale = 100;
} else {
_xscale = -100;
}
if (tester.hitTest(root.hero.tester)) {
root.damageHero(15);
}
if (!szczelam) {
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 15 * (_xscale / 100);
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 4;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
}
++i;
}
}
}
};
}
}
movieClip 63 boom_3 {
frame 62 {
stop();
root.set_new_wave();
root.remove(_name);
}
}
movieClip 65 boss_3 {
frame 1 {
_y = 150;
onEnterFrame = function () {
if (root.go) {
bullet_array = root.bullet_array;
_x = _x + (root.hero._x - _x) * 0.05;
if (tester.hitTest(root.hero.tester)) {
root.damageHero(30);
}
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
if (_x <= root.hero._x) {
_x = _x - 5;
} else {
_x = _x + 5;
}
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 3;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
}
++i;
}
}
};
boss_3_shoot = function () {
boss_place = random(3);
root.boss_shoot2(_x - 20 + boss_place * 20);
};
boss_pause = 300;
boss_interval = setInterval(boss_3_shoot, boss_pause);
}
}
movieClip 69 {
frame 7 {
root.boss_shoot(_parent._x + _x, _parent._y + _y, _rotation);
}
}
movieClip 70 boss_4 {
frame 1 {
A = 100;
B = 400;
onEnterFrame = function () {
if (root.go) {
if (root.hero._x <= 100) {
A = 500;
}
if (root.hero._x >= 500) {
A = 100;
}
if (root.hero._y >= 300 && root.hero._y <= 500) {
B = 200;
}
if (root.hero._y >= 100 && root.hero._y < 300) {
B = 400;
}
bullet_array = root.bullet_array;
_x = _x + (A - _x) * 0.2;
_y = _y + (B - _y) * 0.2;
if (_x >= root.hero._x) {
_xscale = 100;
} else {
_xscale = -100;
}
if (tester.hitTest(root.hero.tester)) {
root.damageHero(15);
}
if (!szczelam) {
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 15 * (_xscale / 100);
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 2;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
}
++i;
}
}
}
};
}
instance of movieClip 69 {
onClipEvent (enterFrame) {
if (root.go) {
radians = Math.atan2(_root.hero._y - _parent._y + _y, _root.hero._x - _parent._x + _x);
if (_parent._xscale == 100) {
_rotation = radians * 180 / Math.PI;
} else {
_rotation = -radians * 180 / Math.PI + 180;
}
}
}
}
}
movieClip 74 {
}
movieClip 78 {
frame 34 {
stop();
}
}
movieClip 79 {
frame 1 {
onEnterFrame = function () {
if (root.go) {
bullet_array = root.bullet_array;
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
energia -= 15;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
if (energia <= 0) {
gotoAndStop('distro');
delete onEnterFrame;
}
}
++i;
}
}
};
}
frame 3 {
root.final_boss_shoot(_parent._x + _x - 50, _parent._y + _y);
}
frame 32 {
gotoAndPlay(1);
}
frame 48 {
--_parent.turets;
}
}
movieClip 83 {
frame 1 {
onEnterFrame = function () {
if (root.go) {
bullet_array = root.bullet_array;
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
energia -= 15;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
if (energia <= 0) {
gotoAndStop('distro');
delete onEnterFrame;
}
}
++i;
}
}
};
}
frame 3 {
root.final_boss_shoot(_parent._x + _x - 50, _parent._y + _y);
}
frame 32 {
gotoAndPlay(1);
}
frame 48 {
--_parent.turets;
}
}
movieClip 84 boss_5 {
frame 1 {
turets = 5;
onEnterFrame = function () {
if (root.go) {
_x = _x - 1;
bullet_array = root.bullet_array;
if (tester.hitTest(root.hero.tester)) {
root.damageHero(50);
}
if (turets <= 0) {
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(eval('root.' + [bullet_array[i]]))) {
sfx('hitBossSnd');
_x = _x + 1;
root.atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), (eval('root.' + [bullet_array[i]]))._x, (eval('root.' + [bullet_array[i]]))._y);
root.remove(eval('root.' + [bullet_array[i]]));
root.boss_energia -= 1;
i = 0;
while (i < root.bullet_array.length) {
if (root.bullet_array[i].toString() == this._name) {
root.bullet_array.splice(i, 1);
}
++i;
}
}
++i;
}
}
}
};
}
instance of movieClip 79 {
onClipEvent (load) {
energia = 100;
gotoAndPlay(random(30));
}
}
instance of movieClip 79 {
onClipEvent (load) {
energia = 100;
gotoAndPlay(random(30));
}
}
instance of movieClip 79 {
onClipEvent (load) {
energia = 100;
gotoAndPlay(random(30));
}
}
instance of movieClip 83 {
onClipEvent (load) {
energia = 100;
gotoAndPlay(random(30));
}
}
instance of movieClip 83 {
onClipEvent (load) {
energia = 100;
gotoAndPlay(random(30));
}
}
}
movieClip 86 {
}
movieClip 87 boss_bullet {
}
movieClip 89 {
}
movieClip 90 gun_up {
}
movieClip 92 {
}
movieClip 93 heal_up {
}
movieClip 110 {
}
movieClip 112 {
frame 60 {
stop();
root.przejscie('menu');
}
}
frame 21 {
go = false;
createFooter();
attachSounds();
}
// unknown tag 88 length 41
button 119 {
on (press) {
sfx('btnSnd');
przejscie('as');
}
}
button 123 {
on (release) {
__com_mochibot__('fb7f58ee', this, 10301, true);
link(commentLink);
}
}
button 127 {
on (release) {
if (mochiAdID != undefined) {
sfx('btnSnd');
przejscie('hs');
}
}
}
button 132 {
on (release) {
__com_mochibot__('33a6db6e', this, 10301, true);
link(authorLink);
}
}
movieClip 136 {
}
button 138 {
on (release) {
__com_mochibot__('131a4b47', this, 10301, true);
link(facebookLink);
}
}
button 142 {
on (release) {
__com_mochibot__('0e230ac1', this, 10301, true);
sfx('btnSnd');
przejscie('share');
}
}
button 146 {
on (release) {
__com_mochibot__('b26e4c06', this, 10301, true);
link(moreGamesLink);
}
}
button 152 {
on (press) {
sfx('btnSnd');
przejscie('menu');
}
}
movieClip 155 {
}
button 157 {
on (release) {
__com_mochibot__('9e2b0362', this, 10301, true);
link(tweetLink);
}
}
movieClip 160 {
}
button 162 {
on (release) {
__com_mochibot__('fa936c1d', this, 10301, true);
link(shareLink);
}
}
frame 34 {
zaczynamy = true;
clearInterval(power_up_int);
clearInterval(health_up_int);
createFooter();
if (s.score <= 0) {
scoreBtn._alpha = 50;
scoreBtn.enabled = false;
napis = '';
napis = 'you didn\'t score any points...';
} else {
if (s.score == 1) {
napis = 'you scored only one point...';
} else {
napis = 'you scored ' + s.score + ' points';
}
}
}
button 165 {
on (release) {
__com_mochibot__('b6c302d0', this, 10301, true);
link(commentLink);
}
}
button 169 {
on (press) {
__com_mochibot__('e6d8a9fd', this, 10301, true);
sfx('btnSnd');
submitting = true;
przejscie('hs');
}
}
button 173 {
on (press) {
__com_mochibot__('6fb0a75f', this, 10301, true);
sfx('btnSnd');
przejscie('gra');
}
}
frame 40 {
clearIntervals();
clearInterval(power_up_int);
clearInterval(health_up_int);
remove_all();
}
movieClip 182 {
}
movieClip 185 {
}
movieClip 187 {
}
button 189 {
on (press) {
przejscie('end');
}
}
frame 51 {
stop();
__com_mochibot__('28257838', this, 10301, true);
if (submitting) {
playerscore = s.score;
var o = {'n': [5, 1, 4, 11, 8, 9, 2, 11, 10, 4, 0, 12, 15, 0, 7, 2], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var boardID = o.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': boardID, 'score': playerscore, 'name': playername});
} else {
var o = {'n': [5, 1, 4, 11, 8, 9, 2, 11, 10, 4, 0, 12, 15, 0, 7, 2], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var boardID = o.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': boardID});
}
}
frame 52 {
stop();
sfx('btnSnd');
submitting = false;
przejscie('menu');
}
frame 56 {
setGame = function () {
if (zaczynamy != false) {
amb('amb1');
scoreBox._visible = false;
saveFile.clear();
_global.s = saveFile.data;
s.score = 0;
zaczynamy = false;
go = true;
createFooter();
bossBar._visible = false;
boss_bulletVelocity = 5;
toRemove = new Array();
}
};
scoreBoxEF = function () {
if (this._xscale >= 100) {
this._xscale -= 5;
this._yscale -= 5;
this._alpha -= 5;
} else {
this._xscale = 100;
this._yscale = 100;
this._alpha = 50;
delete this.onEnterFrame;
}
};
endGame = function () {
if (go) {
amb('amb3');
sfx('loseSnd');
clearIntervals();
remove_all();
go = false;
przejscie('end');
}
};
pauseGame = function () {
if (go) {
go = false;
attachMovie('pauseMC', 'pauseMC', this.getNextHighestDepth());
}
};
endPause = function () {
if (wave_status._currentframe != wave_status._totalframes) {
wave_status.play();
}
go = true;
};
scored = function (ile) {
if (go) {
if (ile >= 0) {
sfx('collectSnd');
} else {
sfx('subtractSnd');
}
s.score += ile;
if (s.score <= 0) {
scoreBox._visible = false;
} else {
scoreBox._visible = true;
}
scoreBox.napis = s.score;
if (ile >= 0) {
scoreBox._alpha = 100;
scoreBox._yscale = 150;
scoreBox._xscale = 150;
}
scoreBox.onEnterFrame = scoreBoxEF;
}
};
atacz = function (co, imie, x, y) {
attachMovie(co, imie, root.getNextHighestDepth(), {'_x': x, '_y': y});
toRemove.push(imie);
};
remove = function (co) {
removeMovieClip(co);
i = 0;
while (i < toRemove.length) {
if (toRemove[i].toString() == co) {
toRemove.splice(i, 1);
}
++i;
}
};
remove_all = function () {
i = 0;
while (i < toRemove.length) {
removeMovieClip(toRemove[i]);
++i;
}
toRemove = new Array();
};
clearIntervals = function () {
clearInterval(atacz_enemy_interval);
clearInterval(boss.boss_interval);
};
boss_bullet_speed = 35;
boss_shoot = function (x, y, ktory_rot) {
if (go) {
sfx('bossShootSnd');
boss_bullet_nr = this.getNextHighestDepth();
boss_bullet_name = 'boss_bullet' + boss_bullet_nr;
atacz('boss_bullet', boss_bullet_name, x, y);
this[boss_bullet_name].shotyspeed = boss_bulletVelocity * Math.cos(ktory_rot * 0.0174532925199433);
this[boss_bullet_name]._x = x;
this[boss_bullet_name]._y = y;
this[boss_bullet_name].speedX = (hero._x - this[boss_bullet_name]._x) / boss_bullet_speed;
this[boss_bullet_name].speedY = (hero._y - this[boss_bullet_name]._y) / boss_bullet_speed;
this[boss_bullet_name].onEnterFrame = boss_bulletEF;
}
};
boss_bulletEF = function () {
if (go) {
this._x += this.speedX;
this._y += this.speedY;
}
if (this._x <= -100 || this._x >= 700 || this._y >= 700 || this._y <= -100) {
remove(this._name);
}
if (this.hitTest(root.hero.tester)) {
damageHero(10);
atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), this._x, this._y);
remove(this._name);
}
};
boss_shoot2 = function (x) {
if (go) {
sfx('bossShootSnd');
boss_bullet_nr = this.getNextHighestDepth();
boss_bullet_name = 'boss_bullet' + boss_bullet_nr;
atacz('boss_bullet', boss_bullet_name, x, boss._y);
this[boss_bullet_name].boss_bullet_speed = boss_bullet_speed;
this[boss_bullet_name].onEnterFrame = boss_bulletEF2;
}
};
boss_bulletEF2 = function () {
if (go) {
this._y += this.boss_bullet_speed / 2;
}
if (this._y >= 700) {
remove(this._name);
}
if (this.hitTest(root.hero.tester)) {
damageHero(10);
atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), this._x, this._y);
remove(this._name);
}
};
gotoAndStop('gra');
}
frame 60 {
stop();
wave = 0;
nr_of_enemies = wave;
wave_step = 1490;
bulletType = 1;
bullletSpeed = 10;
energia = 100;
boss_in_play = false;
bullet_array = new Array();
setGame();
atacz_power_up = function () {
if (go && bulletType <= 4 && !boss_in_play) {
atacz('gun_up', 'gun_up', random(550), -50);
gun_up.onEnterFrame = power_up_ef;
}
};
power_up = function () {
sfx('upSnd');
if (bulletType <= 4) {
++bulletType;
}
};
power_up_ef = function () {
this._y += 4;
if (this._y >= 700) {
remove(this._name);
}
if (this.hitTest(root.hero)) {
power_up();
remove(this._name);
}
};
power_up_int = setInterval(atacz_power_up, 19000);
atacz_health_up = function () {
if (go && energia != 100) {
atacz('heal_up', 'heal_up', random(550), -50);
heal_up.onEnterFrame = health_up_ef;
}
};
health_up = function () {
sfx('healthSnd');
if (energia <= 80) {
energia += 20;
} else {
energia = 100;
}
};
health_up_ef = function () {
this._y += 4;
if (this._y >= 700) {
remove(this._name);
}
if (this.hitTest(root.hero)) {
health_up();
remove(this._name);
}
};
health_up_int = setInterval(atacz_health_up, 30000);
set_new_wave = function () {
if (wave == 5) {
amb('amb3');
przejscie('end_splash');
} else {
amb('amb1');
++wave;
if (nr_of_enemies <= 4) {
nr_of_enemies = wave;
}
wave_status.play();
status_gry = 'wave ' + wave;
enemy_pause = 1000 - wave * 25;
atacz_enemy_interval = setInterval(atacz_enemy, enemy_pause);
}
};
atacz('hero', 'hero', _xmouse, _ymouse);
onMouseDown = function () {
shootin = true;
};
onMouseUp = function () {
shootin = false;
};
onEnterFrame = function () {
if (go) {
if (shootin) {
hero.play();
}
if (boss_in_play) {
if (hero._x >= boss._x) {
hero._xscale = -100;
} else {
hero._xscale = 100;
}
} else {
if (hero._x >= _xmouse) {
hero._xscale = -100;
} else {
hero._xscale = 100;
}
}
hero._x += (_xmouse - hero._x) * 0.1;
hero._y += (_ymouse - hero._y) * 0.1;
energyBar.maska._xscale += (energia - energyBar.maska._xscale) * 0.2;
if (energyBar.maska._xscale <= 1) {
gramy = false;
delete onEnterFrame;
endGame();
}
if (boss._visible) {
bossBar.maska._xscale += (boss_energia - bossBar.maska._xscale) * 0.2;
if (bossBar.maska._xscale <= 1) {
boss_in_play = false;
bossBar._visible = false;
atacz('boom_3', 'boom_3_' + root.getNextHighestDepth(), boss._x, boss._y);
scored(1000);
sfx('boomSnd');
clearInterval(boss.boss_interval);
remove('boss');
}
}
}
};
damage = function (co, ile) {
root[co].statusBar_bar._alpha = 150;
root[co].statusBar._alpha = 150;
root[co]._strength_ -= ile;
if (root[co]._strength_ <= 0 && root[co]._strength_ != undefined) {
destroy(co);
} else {
count_strength_(co);
}
};
damageHero = function (ile) {
if (hero.alfer._currentframe == 1) {
sfx('hurtSnd');
hero.alfer.play();
if (energia > ile) {
energia -= ile;
if (bulletType >= 2) {
--bulletType;
}
} else {
endGame();
}
energyBar.bar.play();
}
};
destroy = function (co) {
sfx('dieSnd');
atacz('boom_1', 'boom_1_' + root.getNextHighestDepth(), root[co]._x, root[co]._y);
scored(root[co].initialStrength);
removeMovieClip(root[co]);
};
MovieClip.prototype.drawRectangle2 = function (w, h, kolor, alfa) {
var v2 = this.createEmptyMovieClip('s1', 1);
v2.beginFill(kolor, alfa);
v2.moveTo(0, 0);
v2.lineTo(w, 0);
v2.lineTo(w, h);
v2.lineTo(0, h);
v2.endFill();
};
count_strength_ = function (co) {
if (root[co].initialStrength == undefined) {
root[co].initialStrength = root[co]._strength_;
root[co].createEmptyMovieClip('statusBar', 1);
root[co].createEmptyMovieClip('statusBar_bar', 2);
root[co].statusBar._x = -20;
root[co].statusBar._y = -20;
root[co].statusBar.drawRectangle2(40, 5, 0, 100);
root[co].statusBar_bar._x = -19;
root[co].statusBar_bar._y = -19;
root[co].statusBar_bar.drawRectangle2(38, 3, 16711680, 100);
}
root[co].statusBar_bar._xscale = (root[co]._strength_ / root[co].initialStrength) * 100;
};
atacz_enemy = function () {
if (go) {
enemyType = random(nr_of_enemies) + 1;
enemyName = 'enemy_' + enemyType;
enemyNewName = enemyName + root.getNextHighestDepth();
atacz(enemyName, [enemyNewName]);
drawKierunek = random(2);
if (drawKierunek == 0) {
root[enemyNewName].kierunek = 1;
} else {
root[enemyNewName].kierunek = -1;
}
root[enemyNewName]._x = 300 - 350 * root[enemyNewName].kierunek;
root[enemyNewName]._y = random(500) + 50;
root[enemyNewName]._xscale = 100 * root[enemyNewName].kierunek;
root[enemyNewName]._strength_ = enemyType * 100;
root[enemyNewName].onEnterFrame = enemyEF;
count_strength_(enemyNewName);
}
};
enemyEF = function () {
if (go) {
if (boss_in_play) {
this.kierunek_ucieczki = 300 + 500 * this.kierunek;
this._x += (this.kierunek_ucieczki - this._x) * 0.1;
} else {
this._x += 2 * this.kierunek;
if (this.statusBar._alpha >= 20) {
this.statusBar._alpha -= 5;
}
if (this.statusBar_bar._alpha >= 20) {
this.statusBar_bar._alpha -= 5;
}
if (this.tester.hitTest(root.hero)) {
damageHero(10);
}
i = 0;
while (i < bullet_array.length) {
if (this.tester.hitTest(bullet_array[i])) {
atacz('boom_2', 'boom_2_' + root.getNextHighestDepth(), bullet_array[i]._x, bullet_array[i]._y);
remove(bullet_array[i]);
damage(this._name, 100);
i = 0;
while (i < bullet_array.length) {
if (bullet_array[i].toString() == this._name) {
bullet_array.splice(i, 1);
}
++i;
}
}
++i;
}
}
if (this._x <= -100 || this._x >= 700) {
remove(this._name);
}
}
};
fire = function () {
if (go) {
if (s.score >= 1) {
scored(-1);
}
sfx('shootSnd');
if (bulletType == 1) {
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
} else {
if (bulletType == 2) {
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y + 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y - 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
} else {
if (bulletType == 3) {
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y + 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y - 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 20 * hero._xscale / 100, hero._y);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
} else {
if (bulletType == 4) {
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y + 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y - 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 20 * hero._xscale / 100, hero._y + 20);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 20 * hero._xscale / 100, hero._y - 20);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
} else {
if (bulletType == 5) {
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y + 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x, hero._y - 10);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 20 * hero._xscale / 100, hero._y + 20);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 20 * hero._xscale / 100, hero._y - 20);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
bulletNewName = 'bullet_1' + root.getNextHighestDepth();
atacz('bullet_1', [bulletNewName], hero._x + 40 * hero._xscale / 100, hero._y);
root[bulletNewName].kierunek = hero._xscale / 100;
root[bulletNewName].onEnterFrame = bulletEF;
bullet_array.push(root[bulletNewName]);
}
}
}
}
}
}
};
bulletEF = function () {
if (go) {
this._x += bullletSpeed * this.kierunek;
if (this._x <= -100 || this._x >= 700) {
remove(this._name);
i = 0;
while (i < bullet_array.length) {
if (bullet_array[i].toString() == this._name) {
bullet_array.splice(i, 1);
}
++i;
}
}
}
};
set_new_wave();
gimme_boss = function () {
amb('amb2');
sfx('bossSnd');
status_gry = 'boss ' + wave + '/5';
clearIntervals();
bossBar._visible = true;
boss_energia = 100;
boss_in_play = true;
atacz('boss_' + wave, 'boss');
hero.swapDepths(root.getNextHighestDepth());
boss._x = 700;
boss._y = 300;
};
final_boss_shoot = function (x, y) {
sfx('bossShootSnd');
bulletName = 'boss_bullet' + this.getNextHighestDepth();
atacz('boss_bullet', bulletName, x, y);
this[bulletName].onEnterFrame = final_boss_bullet_ef;
};
final_boss_bullet_ef = function () {
this._x -= 5;
if (this._x <= -100) {
remove(this._name);
}
if (this.hitTest(root.hero.tester)) {
damageHero(5);
}
};
}
movieClip 195 {
}
movieClip 197 {
}
movieClip 201 {
frame 1 {
stop();
}
}
movieClip 203 energyBar {
}
movieClip 206 {
}
movieClip 207 {
frame 1 {
stop();
if (root.tip_done) {
gotoAndStop(_totalframes);
}
onMouseDown = function () {
root.tip_done = true;
delete onMouseDown;
play();
};
}
frame 25 {
stop();
delete onMouseDown;
}
}
movieClip 210 {
frame 1 {
function pauseFor(theTime) {
if (root.go) {
stop();
timer.timerLength = theTime;
timer.startTime = getTimer();
timer.target = this;
} else {
stop();
}
}
this.createEmptyMovieClip('timer', 50);
timer.onEnterFrame = function () {
if (this.startTime > 0) {
var v2 = getTimer() - this.startTime;
if (v2 > this.timerLength) {
this.target.play();
this.startTime = 0;
}
}
};
}
frame 2 {
pauseFor(root.wave_step);
}
frame 3 {
pauseFor(root.wave_step);
}
frame 4 {
pauseFor(root.wave_step);
}
frame 5 {
pauseFor(root.wave_step);
}
frame 6 {
pauseFor(root.wave_step);
}
frame 7 {
pauseFor(root.wave_step);
}
frame 8 {
pauseFor(root.wave_step);
}
frame 9 {
pauseFor(root.wave_step);
}
frame 10 {
pauseFor(root.wave_step);
}
frame 11 {
pauseFor(root.wave_step);
}
frame 12 {
pauseFor(root.wave_step);
}
frame 13 {
pauseFor(root.wave_step);
}
frame 14 {
pauseFor(root.wave_step);
}
frame 15 {
pauseFor(root.wave_step);
}
frame 16 {
pauseFor(root.wave_step);
}
frame 17 {
pauseFor(root.wave_step);
}
frame 18 {
pauseFor(root.wave_step);
}
frame 19 {
pauseFor(root.wave_step);
}
frame 20 {
pauseFor(root.wave_step);
}
frame 21 {
pauseFor(root.wave_step);
}
frame 22 {
root.gimme_boss();
}
frame 23 {
stop();
}
}