Frame 1
var MochiAd = {getVersion:function () {
return("2.1");
}, showPreGameAd:function (options) {
var DEFAULTS = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = MochiAd._getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = w * -0.5;
chk._y = h * -0.5;
var bar = chk.createEmptyMovieClip("_mochiad_bar", 4);
bar._x = 10;
bar._y = h - 20;
var bar_color = options.color;
delete options.color;
var bar_background = options.background;
delete options.background;
var bar_outline = options.outline;
delete options.outline;
var backing = bar.createEmptyMovieClip("_outline", 1);
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo(w - 20, 0);
backing.lineTo(w - 20, 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
var inside = bar.createEmptyMovieClip("_inside", 2);
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo(w - 20, 0);
inside.lineTo(w - 20, 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside._xscale = 0;
var outline = bar.createEmptyMovieClip("_outline", 3);
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo(w - 20, 0);
outline.lineTo(w - 20, 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0) {
this._parent._alpha = p;
} else {
var _clip = this._parent._parent;
MochiAd.unload(_clip);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _chk = this.mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _clip = this._parent._parent;
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
var clip_total = _clip.getBytesTotal();
var clip_loaded = _clip.getBytesLoaded();
var clip_pcnt = ((100 * clip_loaded) / clip_total);
var ad_pcnt = ((100 * elapsed) / chk.ad_msec);
var _inside = this._mochiad_bar._inside;
var pcnt = Math.min(100, Math.min(clip_pcnt || 0, ad_pcnt));
pcnt = Math.max(this.last_pcnt, pcnt);
this.last_pcnt = pcnt;
_inside._xscale = pcnt;
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
finished = true;
}
}
if (elapsed > chk.ad_msec) {
finished = true;
}
if (((clip_total > 0) && (clip_loaded >= clip_total)) && (finished)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}, showInterLevelAd:function (options) {
var DEFAULTS = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = MochiAd._parseOptions(options, DEFAULTS);
var clip = options.clip;
var ad_msec = 11000;
var ad_timeout = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var wh = MochiAd._getRes(options);
var w = wh[0];
var h = wh[1];
mc._x = w * 0.5;
mc._y = h * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var p = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (p > 0) {
this._parent._alpha = p;
} else {
var _clip = this._parent._parent;
MochiAd.unload(_clip);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _chk = this.mc._mochiad_wait;
_chk.server_control = true;
_chk.started = getTimer();
_chk.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var ad_clip = this._parent._mochiad_ctr;
var elapsed = (getTimer() - this.started);
var finished = false;
if (!chk.showing) {
var total = ad_clip.getBytesTotal();
if ((total > 0) || (typeof(total) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (elapsed > chk.ad_timeout) {
finished = true;
}
}
if (elapsed > chk.ad_msec) {
finished = true;
}
if (finished) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}, showTimedAd:function (options) {
MochiAd.showInterLevelAd(options);
}, showPreloaderAd:function (options) {
MochiAd.showPreGameAd(options);
}, _allowDomains:function (server) {
var hostname = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(hostname);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(hostname);
}
}
return(hostname);
}, _loadCommunicator:function (options) {
var DEFAULTS = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var clip = options.clip;
var clipname = ("_mochiad_com_" + options.id);
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (clip[clipname]) {
return(clip[clipname].lc);
}
var server = (options.com_server + options.id);
MochiAd._allowDomains(server);
delete options.id;
delete options.com_server;
var depth = options.depth;
delete options.depth;
var mc = clip.createEmptyMovieClip(clipname, depth);
var lv = mc.createEmptyMovieClip("_mochiad_com", 1);
for (var k in options) {
lv[k] = options[k];
}
var lc = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
lc.mc = mc;
lc.name = name;
lc.allowDomain = function (d) {
return(true);
};
lc.allowInsecureDomain = lc.allowDomain;
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lc._id = 0;
lc._queue = [];
lc.rpcResult = function (cb_arg) {
var cb = parseInt(cb_arg);
var cblst = this._callbacks[cb];
if (!cblst) {
return(undefined);
}
delete this._callbacks[cb];
var args = [];
var i = 2;
while (i < cblst.length) {
args.push(cblst[i]);
i++;
}
var i = 1;
while (i < arguments.length) {
args.push(arguments[i]);
i++;
}
var method = cblst[1];
var obj = cblst[0];
if (obj && (typeof(method) == "string")) {
method = obj[method];
}
if (method) {
method.apply(obj, args);
}
};
lc._didConnect = function (endpoint) {
this._endpoint = endpoint;
var q = this._queue;
delete this._queue;
var ds = this.doSend;
var i = 0;
while (i < q.length) {
var item = q[i];
ds.apply(this, item);
i++;
}
};
lc.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var qargs = [];
var i = 0;
while (i < arguments.length) {
qargs.push(arguments[i]);
i++;
}
this._queue.push(qargs);
return(undefined);
}
this._id = this._id + 1;
var id = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[id] = [cbobj, cbfn];
var slc = new LocalConnection();
var ss = slc.send(this._endpoint, "rpc", id, args);
};
lc._callbacks = {};
lc._callbacks[0] = [lc, "_didConnect"];
lv.st = getTimer();
lv.loadMovie(server + ".swf", "POST");
return(lc);
}, fetchHighScores:function (options, callbackObj, callbackMethod) {
var lc = MochiAd._loadCommunicator({id:options.id});
if (!lc) {
return(false);
}
var fncall = ["fetchHighScores", options];
lc.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}, sendHighScore:function (options, callbackObj, callbackMethod) {
var lc = MochiAd._loadCommunicator({id:options.id});
if (!lc) {
return(false);
}
var fncall = ["sendHighScore", options];
lc.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}, load:function (options) {
var DEFAULTS = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = MochiAd.getVersion();
var clip = options.clip;
if (!MochiAd._isNetworkAvailable()) {
return(null);
}
if (clip._mochiad_loaded) {
return(null);
}
var depth = options.depth;
delete options.depth;
var mc = clip.createEmptyMovieClip("_mochiad", depth);
var wh = MochiAd._getRes(options);
options.res = (wh[0] + "x") + wh[1];
options.server = options.server + options.id;
delete options.id;
clip._mochiad_loaded = true;
var lv = mc.createEmptyMovieClip("_mochiad_ctr", 1);
for (var k in options) {
lv[k] = options[k];
}
var server = lv.server;
delete lv.server;
var hostname = MochiAd._allowDomains(server);
mc.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var lc = new LocalConnection();
var name = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
lc.mc = mc;
lc.name = name;
lc.hostname = hostname;
lc.allowDomain = function (d) {
return(true);
};
lc.allowInsecureDomain = lc.allowDomain;
lc.connect(name);
mc.lc = lc;
lv.lc = name;
lv.st = getTimer();
lv.loadMovie(server + ".swf", "POST");
return(mc);
}, unload:function (clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}, _isNetworkAvailable:function () {
if (System.security) {
var o = System.security;
if (o.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}, _getRes:function (options) {
var b = options.clip.getBounds();
var w = 0;
var h = 0;
if (typeof(options.res) != "undefined") {
var xy = options.res.split("x");
w = parseFloat(xy[0]);
h = parseFloat(xy[1]);
} else {
w = b.xMax - b.xMin;
h = b.yMax - b.yMin;
}
if ((w == 0) || (h == 0)) {
w = Stage.width;
h = Stage.height;
}
return([w, h]);
}, _parseOptions:function (options, defaults) {
var optcopy = {};
for (var k in defaults) {
optcopy[k] = defaults[k];
}
if (options) {
for (var k in options) {
optcopy[k] = options[k];
}
}
if (_root.mochiad_options) {
var pairs = _root.mochiad_options.split("&");
var i = 0;
while (i < pairs.length) {
var kv = pairs[i].split("=");
optcopy[unescape(kv[0])] = unescape(kv[1]);
i++;
}
}
return(optcopy);
}, _:null};
MochiAd.showPreGameAd({id:"0cb132291b787238", res:"550x420"});
Stage.scaleMode = "noScale";
Stage.showMenu = false;
fscommand ("trapallkeys", true);
fscommand ("showmenu", "false");
Button.prototype.tabEnabled = false;
MovieClip.prototype.tabEnabled = false;
napisDol = "created by <u><a href='http://www.pastelstories.com' target='_blank'>Mateusz Skutnik</a></u> | \u00A9 2007 | <u><a href='http://www.pastelgames.com' target='_blank'>www.PastelGames.com</a></u> | <u><a href='http://www.pastelgames.com/index.php?dzial=comments&co=game&id=47' target='_blank'>comment this game</a></u>";
napisDol2 = "music by <u><a href='http://www.thumpmonks.com' target='_blank'>ThumpMonks</a></u>";
Frame 4
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;
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);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
firstTime = true;
achievement = 0;
commentLink = "http://www.pastelgames.com/index.php?dzial=comments&co=game&id=47";
__com_mochibot__("73be0724", this, 10301, true);
Frame 13
stop();
playSound = function (gdzie) {
soundFX.gotoAndPlay(gdzie);
};
hero.removeMovieClip();
attachMovie("hero", "hero", 2000);
hero._x = _xmouse;
hero._y = _ymouse;
if (achievement == 0) {
achievement = 1;
}
dH = 1;
dropHelp = function () {
attachMovie("PUhelp", "a" + dH, dH + 800);
eval ("a" + dH)._x = random(500) + 25;
dH++;
};
helpCount = 0;
Button.prototype.useHandCursor = false;
if (firstTime == false) {
dialog._visible = false;
helfDialog._visible = false;
}
powerUp = "kula";
first = true;
score = 0;
ilosc = 0;
energy = 100;
maxEnemy = 100;
combo = 1;
onEnterFrame = function () {
napis = "score: " + score;
if (hero.hitTest(boss.tester)) {
energy = energy - 2;
}
if (combo == 1) {
comboMC._visible = false;
comboMC.stop();
} else {
comboMC._visible = true;
comboMC.play();
}
comboMC.comboVal = combo;
bossEnergyBar._xscale = bossEnergy;
energyBar._xscale = energy;
if (energy <= 25) {
energyBar.gotoAndStop(2);
} else {
energyBar.gotoAndStop(1);
}
if (energy <= 10) {
i = 0;
while (i < (maxEnemy + 1)) {
eval ("enemy" + i).removeMovieClip();
i++;
}
gotoAndStop (25);
}
hero._x = hero._x + ((_xmouse - hero._x) * 0.1);
hero._y = hero._y + ((_ymouse - hero._y) * 0.1);
if (hero._x >= _xmouse) {
hero._xscale = -100;
} else {
hero._xscale = 100;
}
};
w = 1;
dropPowerUp = function () {
ktora = random(3) + 1;
if (ktora == 1) {
attachMovie("PUrocket", "PUrocket", w + 700);
PUrocket._x = random(500) + 25;
} else if (ktora == 2) {
attachMovie("PUlaser", "PUlaser", w + 700);
PUlaser._x = random(500) + 25;
} else if (ktora == 3) {
attachMovie("PUplasma", "PUplasma", w + 700);
PUplasma._x = random(500) + 25;
}
};
dropHelp = function () {
attachMovie("PUhelp", "PUhelp", w + 800);
PUhelp._x = random(500) + 25;
};
wrog = function () {
attachMovie("enemy", "enemy" + w, w + 500);
pos = random(2) + 1;
if (pos == 1) {
eval ("enemy" + w)._x = -20;
eval ("enemy" + w)._xscale = 100;
eval ("enemy" + w).dx = 3;
} else {
eval ("enemy" + w)._x = 570;
eval ("enemy" + w)._xscale = -100;
eval ("enemy" + w).dx = -3;
}
eval ("enemy" + w)._y = random(350) + 25;
eval ("enemy" + w).onEnterFrame = moveWrog;
if (w == maxEnemy) {
w = 1;
} else {
w++;
}
helpCount++;
if (helpCount == 50) {
dropHelp();
helpCount = 0;
}
ilosc++;
if ((((((w == 15) || (w == 30)) || (w == 45)) || (w == 60)) || (w == 75)) || (w == 90)) {
dropPowerUp();
}
};
moveWrog = function () {
if ((this._xscale == 100) && (this._x >= 570)) {
this._x = -20;
this._y = random(350) + 25;
} else if ((this._xscale == -100) && (this._x <= -20)) {
this._x = 570;
this._y = random(350) + 25;
}
if (this.hitTest(hero)) {
energy--;
}
this._x = this._x + this.dx;
};
moveBullet = function () {
this._x = this._x + this.dx;
if ((this._x >= 660) || (this._x <= -20)) {
this.removeMovieClip();
}
if (this.hitTest(boss.tester)) {
attachMovie("boom", "boom", w + 800);
if (w == maxEnemy) {
w = 1;
dropHelp();
} else {
w++;
}
bossEnergy--;
boom._rotation = random(355);
boom._x = this._x;
boom._y = this._y;
this.removeMovieClip();
}
i = 0;
while (i < (maxEnemy + 1)) {
if (this.hitTest(eval ("enemy" + i)) && (eval ("enemy" + i)._visible == true)) {
playSound("enemy");
score = score + (23 * combo);
kloner.play();
if (dialog._currentframe == 75) {
dialog.play();
}
attachMovie("boom", "boom" + i, i);
eval ("boom" + i)._x = eval ("enemy" + i)._x;
eval ("boom" + i)._y = eval ("enemy" + i)._y;
eval ("boom" + i)._rotation = random(355);
eval ("enemy" + i).removeMovieClip();
ilosc--;
if (String(this._name).substr(0, 4) == "kula") {
this.removeMovieClip();
} else {
combo++;
}
}
i++;
}
};
numerKuli = 1;
dir = hero._xscale / 100;
shoot = function () {
playSound(powerUp);
combo = 1;
if (dialog._currentframe <= 74) {
dialog.gotoAndStop(75);
}
if (first == true) {
wrog();
first = false;
}
nm = powerUp + numerKuli;
this.attachMovie(powerUp, nm, numerKuli + 1000);
dir = hero._xscale / 100;
this[nm]._x = hero._x + (2 * dir);
this[nm]._y = hero._y;
this[nm]._xscale = dir * 100;
this[nm].dx = 12 * dir;
this[nm].onEnterFrame = moveBullet;
if (numerKuli == 20) {
numerKuli = 1;
} else {
numerKuli++;
}
if (powerUp != "kula") {
eval (powerUp + "Display").nextFrame();
}
};
Frame 25
stop();
hero.removeMovieClip();
attachMovie("hero", "hero", 2000);
hero._x = _xmouse;
hero._y = _ymouse;
Button.prototype.useHandCursor = false;
if (achievement == 1) {
achievement = 2;
}
dH = 1;
dropHelp = function () {
attachMovie("PUhelp", "a" + dH, dH + 800);
eval ("a" + dH)._x = random(500) + 25;
dH++;
};
first = false;
maxEnemy = 100;
combo = 1;
fight = false;
bossEnergy = 100;
odlicz = 150;
bossEnergyRamka._visible = false;
bossEnergyBar._visible = false;
enemy2nr = 1;
iloscBossow = 30;
onEnterFrame = function () {
if (boss.enemy16._visible == true) {
odlicz--;
}
if (odlicz <= 0) {
ktory = random(2) + 2;
attachMovie("enemy" + ktory, "enemy" + enemy2nr, enemy2nr + 500);
enemy2nr++;
odlicz = 150;
}
napis = "score: " + score;
k = 0;
while (k < 31) {
if (hero.hitTest(eval ("boss.enemy" + k)) && (eval ("boss.enemy" + k)._visible == true)) {
energy = energy - 1;
}
if (eval ("enemy" + k).hitTest(hero)) {
energy = energy - 2;
}
k++;
}
comboMC.comboVal = combo;
bossEnergyBar._xscale = bossEnergy;
energyBar._xscale = energy;
if (energy <= 25) {
energyBar.gotoAndStop(2);
} else {
energyBar.gotoAndStop(1);
}
if (energy <= 0) {
i = 0;
while (i < (maxEnemy + 1)) {
eval ("enemy" + i).removeMovieClip();
i++;
}
gotoAndStop (50);
}
hero._x = hero._x + ((_xmouse - hero._x) * 0.1);
hero._y = hero._y + ((_ymouse - hero._y) * 0.1);
if (hero._x >= _xmouse) {
hero._xscale = -100;
} else {
hero._xscale = 100;
}
};
w = 1;
dropPowerUp = function () {
ktora = random(3) + 1;
if (ktora == 1) {
attachMovie("PUrocket", "PUrocket", w + 900);
PUrocket._x = random(500) + 25;
} else if (ktora == 2) {
attachMovie("PUlaser", "PUlaser", w + 900);
PUlaser._x = random(500) + 25;
} else if (ktora == 3) {
attachMovie("PUplasma", "PUplasma", w + 900);
PUplasma._x = random(500) + 25;
}
};
dodajW = function () {
if (w == maxEnemy) {
w = 1;
dropHelp();
} else {
w++;
}
ilosc++;
if ((((((w == 15) || (w == 30)) || (w == 45)) || (w == 60)) || (w == 75)) || (w == 90)) {
dropPowerUp();
}
};
moveBullet = function () {
this._x = this._x + this.dx;
if ((this._x >= 660) || (this._x <= -20)) {
this.removeMovieClip();
}
i = 0;
while (i < 31) {
if (this.hitTest(eval ("enemy" + i)) && (eval ("enemy" + i)._visible == true)) {
score = score + 23;
playSound("enemy");
attachMovie("boom", "boom" + i, i);
eval ("boom" + i)._x = eval ("enemy" + i)._x;
eval ("boom" + i)._y = eval ("enemy" + i)._y;
eval ("boom" + i)._rotation = random(355);
eval ("enemy" + i).removeMovieClip();
ilosc--;
if (String(this._name).substr(0, 4) == "kula") {
this.removeMovieClip();
} else {
combo++;
}
}
if (this.hitTest(eval ("boss.enemy" + i)) && (eval ("boss.enemy" + i)._visible == true)) {
score = score + 32;
playSound("enemy");
dodajW();
bossEnergy--;
iloscBossow--;
boss.attachMovie("boom", "boom", 800);
boss.boom._rotation = random(355);
boss.boom._x = eval ("boss.enemy" + i)._x;
boss.boom._y = eval ("boss.enemy" + i)._y;
if (boss._x >= hero._x) {
cofka = -1;
} else {
cofka = 1;
}
boss._x = boss._x - (5 * cofka);
this.removeMovieClip();
eval ("boss.enemy" + i)._visible = false;
if (iloscBossow == 0) {
gotoAndStop (37);
}
}
i++;
}
};
numerKuli = 1;
dir = hero._xscale / 100;
shoot = function () {
playSound(powerUp);
combo = 1;
if (dialog._currentframe <= 74) {
dialog.gotoAndStop(75);
}
if (first == true) {
wrog();
first = false;
}
nm = powerUp + numerKuli;
this.attachMovie(powerUp, nm, numerKuli + 20);
dir = hero._xscale / 100;
this[nm]._x = hero._x + (2 * dir);
this[nm]._y = hero._y;
this[nm]._xscale = dir * 100;
this[nm].dx = 12 * dir;
this[nm].onEnterFrame = moveBullet;
if (numerKuli == 20) {
numerKuli = 1;
} else {
numerKuli++;
}
if (powerUp != "kula") {
eval (powerUp + "Display").nextFrame();
}
};
Frame 37
stop();
hero.removeMovieClip();
attachMovie("hero", "hero", 2000);
hero._x = _xmouse;
hero._y = _ymouse;
Button.prototype.useHandCursor = false;
if (achievement == 2) {
achievement = 3;
}
dH = 1;
dropHelp = function () {
attachMovie("PUhelp", "a" + dH, dH + 800);
eval ("a" + dH)._x = random(500) + 25;
dH++;
};
first = false;
maxEnemy = 100;
combo = 1;
bossFight = false;
bossLoose = function () {
attachMovie("bossBoom", "bossBoom", 15);
attachMovie("finalEnemy", "finalEnemy", 14);
playSound("boom");
bossBoom._x = boss._x;
bossBoom._y = boss._y;
finalEnemy._x = boss._x;
finalEnemy._y = boss._y;
boss.removeMovieClip();
};
onEnterFrame = function () {
napis = "score: " + score;
if (hero.hitTest(boss.tester)) {
energy = energy - 1;
}
if (powerUp == "kula") {
damage2 = 1;
} else {
damage2 = 2;
}
comboMC.comboVal = combo;
bossEnergyBar._xscale = bossEnergy;
energyBar._xscale = energy;
if (energy <= 25) {
energyBar.gotoAndStop(2);
} else {
energyBar.gotoAndStop(1);
}
if (energy <= 0) {
i = 0;
while (i < (maxEnemy + 1)) {
eval ("enemy" + i).removeMovieClip();
boss.removeMovieClip();
i++;
}
gotoAndStop (50);
}
hero._x = hero._x + ((_xmouse - hero._x) * 0.1);
hero._y = hero._y + ((_ymouse - hero._y) * 0.1);
if (hero._x >= _xmouse) {
hero._xscale = -100;
} else {
hero._xscale = 100;
}
};
w = 1;
dropPowerUp = function () {
ktora = random(3) + 1;
if (ktora == 1) {
attachMovie("PUrocket", "PUrocket", w + 900);
PUrocket._x = random(500) + 25;
} else if (ktora == 2) {
attachMovie("PUlaser", "PUlaser", w + 900);
PUlaser._x = random(500) + 25;
} else if (ktora == 3) {
attachMovie("PUplasma", "PUplasma", w + 900);
PUplasma._x = random(500) + 25;
}
};
dodajW = function () {
if (w == maxEnemy) {
w = 1;
dropHelp();
} else {
w++;
}
ilosc++;
if ((((((w == 15) || (w == 30)) || (w == 45)) || (w == 60)) || (w == 75)) || (w == 90)) {
dropPowerUp();
}
};
moveBullet = function () {
this._x = this._x + this.dx;
if ((this._x >= 660) || (this._x <= -20)) {
this.removeMovieClip();
}
i = 0;
while (i < 31) {
if (this.hitTest(eval ("enemy" + i)) && (eval ("enemy" + i)._visible == true)) {
score = score + 23;
playSound("enemy");
attachMovie("boom", "boom" + i, i);
eval ("boom" + i)._x = eval ("enemy" + i)._x;
eval ("boom" + i)._y = eval ("enemy" + i)._y;
eval ("boom" + i)._rotation = random(355);
eval ("enemy" + i).removeMovieClip();
ilosc--;
if (String(this._name).substr(0, 4) == "kula") {
this.removeMovieClip();
} else {
combo++;
}
}
if (this.hitTest(finalEnemy)) {
finalEnemy.play();
playSound("enemy");
this.removeMovieClip();
}
if (this.hitTest(boss.tester)) {
playSound("boss2Impact");
score = score + 32;
dodajW();
attachMovie("boom", "boom" + i, i + 800);
eval ("boom" + i)._rotation = random(355);
if (powerUp == "laser") {
eval ("boom" + i)._x = this._x + (150 * (this._xscale / 100));
eval ("boom" + i)._y = this._y;
} else {
eval ("boom" + i)._x = this._x;
eval ("boom" + i)._y = this._y;
}
if (boss._x >= hero._x) {
cofka = -1;
} else {
cofka = 1;
}
boss._x = boss._x - (5 * cofka);
if (boss.iloscDzial == 0) {
boss.meter.gotoAndStop(boss.meter._currentframe + damage2);
}
this.removeMovieClip();
}
if (this.hitTest(eval ("boss.dzialo" + i)) && (eval ("boss.dzialo" + i)._visible == true)) {
score = score + 12;
playSound("boss2Impact");
dodajW();
eval ("boss.dzialo" + i).damage = eval ("boss.dzialo" + i).damage - damage2;
eval ("boss.dzialo" + i).meter.gotoAndStop(eval ("boss.dzialo" + i).meter._currentframe + damage2);
boss.attachMovie("boom", "boom" + i, i + 800);
eval ("boss.boom" + i)._rotation = random(355);
eval ("boss.boom" + i)._x = eval ("boss.dzialo" + i)._x;
eval ("boss.boom" + i)._y = eval ("boss.dzialo" + i)._y;
if (boss._x >= hero._x) {
cofka = -1;
} else {
cofka = 1;
}
boss._x = boss._x - (5 * cofka);
this.removeMovieClip();
}
i++;
}
};
numerKuli = 1;
dir = hero._xscale / 100;
shoot = function () {
playSound(powerUp);
combo = 1;
if (dialog._currentframe <= 74) {
dialog.gotoAndStop(75);
}
if (first == true) {
wrog();
first = false;
}
nm = powerUp + numerKuli;
this.attachMovie(powerUp, nm, numerKuli + 20);
dir = hero._xscale / 100;
this[nm]._x = hero._x + (2 * dir);
this[nm]._y = hero._y;
this[nm]._xscale = dir * 100;
this[nm].dx = 12 * dir;
this[nm].onEnterFrame = moveBullet;
if (numerKuli == 20) {
numerKuli = 1;
} else {
numerKuli++;
}
if (powerUp != "kula") {
eval (powerUp + "Display").nextFrame();
}
};
Frame 50
Button.prototype.useHandCursor = true;
stopAllSounds();
laserDisplay.removeMovieClip();
plasmaDisplay.removeMovieClip();
rocketDisplay.removeMovieClip();
enemyShot21.removeMovieClip();
enemyShot22.removeMovieClip();
enemyShot23.removeMovieClip();
enemyShot24.removeMovieClip();
hero.removeMovieClip();
i = 0;
while (i < (maxEnemy + 1)) {
eval ("enemy" + i).removeMovieClip();
i++;
}
energy = 100;
playSound("loose");
Frame 60
Button.prototype.useHandCursor = true;
stopAllSounds();
playSound("win");
laserDisplay.removeMovieClip();
plasmaDisplay.removeMovieClip();
rocketDisplay.removeMovieClip();
enemyShot21.removeMovieClip();
enemyShot22.removeMovieClip();
enemyShot23.removeMovieClip();
enemyShot24.removeMovieClip();
finalEnemy.removeMovieClip();
hero.removeMovieClip();
i = 0;
while (i < (maxEnemy + 1)) {
eval ("enemy" + i).removeMovieClip();
i++;
}
Frame 71
score = 0;
powerUp = "kula";
firstTime = false;
if (achievement == 1) {
b2._visible = false;
b3._visible = false;
}
if (achievement == 2) {
b3._visible = false;
}
Symbol 2 MovieClip [boom2] Frame 16
this.removeMovieClip();
Symbol 3 MovieClip [boom] Frame 16
this.removeMovieClip();
Symbol 10 MovieClip [hero] Frame 1
stop();
Symbol 10 MovieClip [hero] Frame 3
_parent.shoot();
Symbol 19 MovieClip [enemy3] Frame 1
pos = function () {
_x = _parent.boss._x;
_y = _parent.boss._y;
};
pos();
Symbol 19 MovieClip [enemy3] Frame 31
pos();
Symbol 19 MovieClip [enemy3] Frame 60
pos();
Symbol 19 MovieClip [enemy3] Frame 90
pos();
Symbol 19 MovieClip [enemy3] Frame 119
this.removeMovieClip();
Symbol 20 MovieClip [enemy2] Frame 1
_x = _parent.boss._x;
_y = _parent.boss._y;
onEnterFrame = function () {
_x = (_x + ((_parent.hero._x - _x) * 0.05));
_y = (_y + ((_parent.hero._y - _y) * 0.05));
if (_x >= _parent.hero._x) {
_xscale = -100;
} else {
_xscale = 100;
}
};
Symbol 20 MovieClip [enemy2] Frame 30
gotoAndPlay (2);
Symbol 22 MovieClip [finalEnemy] Frame 1
stop();
onEnterFrame = function () {
if (_currentframe == 1) {
_x = (_x + ((_parent.hero._x - _x) * 0.01));
_y = (_y + ((_parent.hero._y - _y) * 0.01));
}
if (_x >= _parent.hero._x) {
_xscale = -100;
} else {
_xscale = 100;
}
};
Symbol 22 MovieClip [finalEnemy] Frame 38
_parent.gotoAndStop("win");
Symbol 25 MovieClip [laser] Frame 5
stop();
Symbol 31 MovieClip [PUplasma] Frame 1
onEnterFrame = function () {
_y = (_y + 5);
if (this.hitTest(_parent.hero)) {
_parent.playSound("powerUp");
_parent.powerUp = "plasma";
_parent.attachMovie("plasmaDisplay", "plasmaDisplay", 700);
this.removeMovieClip();
}
if (this._y >= 440) {
this.removeMovieClip();
}
};
Symbol 33 MovieClip [PUhelp] Frame 1
onEnterFrame = function () {
_y = (_y + 5);
if (this.hitTest(_parent.hero)) {
_parent.playSound("help");
if (_parent.energy <= 90) {
_parent.energy = _parent.energy + 10;
} else {
_parent.energy = 100;
}
this.removeMovieClip();
}
if (this._y >= 440) {
this.removeMovieClip();
}
};
Symbol 35 MovieClip [PUlaser] Frame 1
onEnterFrame = function () {
_y = (_y + 5);
if (this.hitTest(_parent.hero)) {
_parent.playSound("powerUp");
_parent.powerUp = "laser";
_parent.attachMovie("laserDisplay", "laserDisplay", 700);
this.removeMovieClip();
}
if (this._y >= 440) {
this.removeMovieClip();
}
};
Symbol 37 MovieClip [PUrocket] Frame 1
onEnterFrame = function () {
_y = (_y + 5);
if (this.hitTest(_parent.hero)) {
_parent.playSound("powerUp");
_parent.powerUp = "rocket";
_parent.attachMovie("rocketDisplay", "rocketDisplay", 700);
this.removeMovieClip();
}
if (this._y >= 440) {
this.removeMovieClip();
}
};
Symbol 41 MovieClip [laserDisplay] Frame 1
stop();
Symbol 41 MovieClip [laserDisplay] Frame 4
_parent.powerUp = "kula";
removeMovieClip(this);
Symbol 46 MovieClip [plasmaDisplay] Frame 1
stop();
Symbol 46 MovieClip [plasmaDisplay] Frame 5
_parent.powerUp = "kula";
removeMovieClip(this);
Symbol 52 MovieClip [rocketDisplay] Frame 1
stop();
Symbol 52 MovieClip [rocketDisplay] Frame 6
_parent.powerUp = "kula";
removeMovieClip(this);
Symbol 56 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 1
stop();
Symbol 62 MovieClip Frame 10
_parent._parent.bossLoose();
Symbol 75 MovieClip Frame 1
stop();
Symbol 79 MovieClip Frame 1
numerek = String(this._name).substr(-1, 1);
Symbol 79 MovieClip Frame 30
if (_visible == true) {
_parent._parent.attachMovie(ktory, ktory + String(numerek), String(numerek) + 200);
eval (("_parent._parent." + ktory) + String(numerek))._rotation = this._rotation;
eval (("_parent._parent." + ktory) + String(numerek))._x = _parent._parent.boss._x + eval ("_parent._parent.boss.dzialo" + String(numerek))._x;
eval (("_parent._parent." + ktory) + String(numerek))._y = _parent._parent.boss._y + eval ("_parent._parent.boss.dzialo" + String(numerek))._y;
}
Symbol 83 MovieClip Frame 1
numerek = String(this._name).substr(-1, 1);
Symbol 83 MovieClip Frame 38
if (_visible == true) {
_parent._parent.attachMovie(ktory, ktory + String(numerek), String(numerek) + 200);
eval (("_parent._parent." + ktory) + String(numerek))._rotation = this._rotation;
eval (("_parent._parent." + ktory) + String(numerek))._x = _parent._parent.boss._x + eval ("_parent._parent.boss.dzialo" + String(numerek))._x;
eval (("_parent._parent." + ktory) + String(numerek))._y = _parent._parent.boss._y + eval ("_parent._parent.boss.dzialo" + String(numerek))._y;
}
Symbol 87 MovieClip Frame 1
numerek = String(this._name).substr(-1, 1);
Symbol 87 MovieClip Frame 33
if (_visible == true) {
_parent._parent.attachMovie(ktory, ktory + String(numerek), String(numerek) + 200);
eval (("_parent._parent." + ktory) + String(numerek))._rotation = this._rotation;
eval (("_parent._parent." + ktory) + String(numerek))._x = _parent._parent.boss._x + eval ("_parent._parent.boss.dzialo" + String(numerek))._x;
eval (("_parent._parent." + ktory) + String(numerek))._y = _parent._parent.boss._y + eval ("_parent._parent.boss.dzialo" + String(numerek))._y;
}
Symbol 91 MovieClip Frame 1
numerek = String(this._name).substr(-1, 1);
Symbol 91 MovieClip Frame 35
if (_visible == true) {
_parent._parent.attachMovie(ktory, ktory + String(numerek), String(numerek) + 200);
eval (("_parent._parent." + ktory) + String(numerek))._rotation = this._rotation;
eval (("_parent._parent." + ktory) + String(numerek))._x = _parent._parent.boss._x + eval ("_parent._parent.boss.dzialo" + String(numerek))._x;
eval (("_parent._parent." + ktory) + String(numerek))._y = _parent._parent.boss._y + eval ("_parent._parent.boss.dzialo" + String(numerek))._y;
}
Symbol 94 MovieClip [boss2] Frame 1
dzialo1.damage = 10;
dzialo2.damage = 10;
dzialo3.damage = 10;
dzialo4.damage = 10;
iloscDzial = 4;
onEnterFrame = function () {
_x = (_x + ((_parent.hero._x - _x) * 0.01));
_y = (_y + ((_parent.hero._y - _y) * 0.01));
if (this._x >= _parent.hero._x) {
enemyFig.gotoAndStop(2);
} else {
enemyFig.gotoAndStop(1);
}
i = 0;
while (i < 5) {
ktoreDzialo = eval ("dzialo" + i);
if ((ktoreDzialo.damage <= 0) && (ktoreDzialo._visible == true)) {
ktoreDzialo._visible = false;
attachMovie("boom2", "boom", 338);
boom._x = ktoreDzialo._x;
boom._x = ktoreDzialo._x;
iloscDzial--;
}
i++;
}
};
Instance of Symbol 79 MovieClip "dzialo1" in Symbol 94 MovieClip [boss2] Frame 1
onClipEvent (load) {
X = this._x;
Y = this._y;
this.ktory = "enemyShot2";
}
onClipEvent (enterFrame) {
Xm = _parent._parent.hero._x - _parent._parent.boss._x;
Ym = _parent._parent.hero._y - _parent._parent.boss._y;
Xdiff = Xm - X;
Ydiff = Ym - Y;
radAngle = Math.atan2(Ydiff, Xdiff);
this._rotation = (radAngle * 360) / (Math.PI*2);
updateAfterEvent();
}
Instance of Symbol 83 MovieClip "dzialo4" in Symbol 94 MovieClip [boss2] Frame 1
onClipEvent (load) {
X = this._x;
Y = this._y;
this.ktory = "enemyShot2";
}
onClipEvent (enterFrame) {
Xm = _parent._parent.hero._x - _parent._parent.boss._x;
Ym = _parent._parent.hero._y - _parent._parent.boss._y;
Xdiff = Xm - X;
Ydiff = Ym - Y;
radAngle = Math.atan2(Ydiff, Xdiff);
this._rotation = (radAngle * 360) / (Math.PI*2);
updateAfterEvent();
}
Instance of Symbol 87 MovieClip "dzialo3" in Symbol 94 MovieClip [boss2] Frame 1
onClipEvent (load) {
X = this._x;
Y = this._y;
this.ktory = "enemyShot2";
}
onClipEvent (enterFrame) {
Xm = _parent._parent.hero._x - _parent._parent.boss._x;
Ym = _parent._parent.hero._y - _parent._parent.boss._y;
Xdiff = Xm - X;
Ydiff = Ym - Y;
radAngle = Math.atan2(Ydiff, Xdiff);
this._rotation = (radAngle * 360) / (Math.PI*2);
updateAfterEvent();
}
Instance of Symbol 91 MovieClip "dzialo2" in Symbol 94 MovieClip [boss2] Frame 1
onClipEvent (load) {
X = this._x;
Y = this._y;
this.ktory = "enemyShot2";
}
onClipEvent (enterFrame) {
Xm = _parent._parent.hero._x - _parent._parent.boss._x;
Ym = _parent._parent.hero._y - _parent._parent.boss._y;
Xdiff = Xm - X;
Ydiff = Ym - Y;
radAngle = Math.atan2(Ydiff, Xdiff);
this._rotation = (radAngle * 360) / (Math.PI*2);
updateAfterEvent();
}
Symbol 97 MovieClip [enemyShot2] Frame 1
onEnterFrame = function () {
if (this.hitTest(_parent.hero)) {
_parent.energy--;
}
};
Symbol 97 MovieClip [enemyShot2] Frame 57
this.removeMovieClip();
Symbol 100 MovieClip [enemyShot] Frame 55
this.removeMovieClip();
Symbol 104 MovieClip [bossBoom] Frame 26
this.removeMovieClip();
Symbol 121 Button
on (release) {
getURL (commentLink, "_blank");
}
Symbol 126 Button
on (press) {
gotoAndStop (13);
}
Symbol 141 MovieClip Frame 1
stop();
Symbol 141 MovieClip Frame 9
stop();
Symbol 141 MovieClip Frame 20
stop();
Symbol 141 MovieClip Frame 32
stop();
Symbol 141 MovieClip Frame 42
stop();
Symbol 141 MovieClip Frame 53
stop();
Symbol 141 MovieClip Frame 65
stop();
Symbol 141 MovieClip Frame 80
stop();
Symbol 141 MovieClip Frame 94
stop();
Symbol 141 MovieClip Frame 105
stop();
Symbol 141 MovieClip Frame 116
stop();
Symbol 141 MovieClip Frame 125
stop();
Symbol 141 MovieClip Frame 133
stop();
Symbol 141 MovieClip Frame 144
stop();
Symbol 146 Button
on (press) {
hero.play();
}
Symbol 149 MovieClip Frame 1
stop();
Symbol 168 MovieClip Frame 74
stop();
Symbol 168 MovieClip Frame 75
stop();
_parent.helfDialog._visible = false;
Symbol 168 MovieClip Frame 193
stop();
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 3
_parent.wrog();
Symbol 171 MovieClip Frame 8
_parent.wrog();
Symbol 174 MovieClip Frame 1
stop();
napis = "music: on";
onPress = function () {
if (napis == "music: on") {
stopAllSounds();
napis = "music: off";
} else if (napis == "music: off") {
napis = "music: on";
play();
}
};
Symbol 182 MovieClip Frame 135
_parent.fight = true;
_parent.bossEnergyRamka._visible = true;
_parent.bossEnergyBar._visible = true;
Symbol 182 MovieClip Frame 208
stop();
Symbol 183 MovieClip Frame 1
e = 0;
while (e < 31) {
eval ("enemy" + e)._rotation = random(355);
e++;
}
onEnterFrame = function () {
if (_parent.fight == true) {
_x = (_x + ((_parent.hero._x - _x) * 0.01));
_y = (_y + ((_parent.hero._y - _y) * 0.01));
}
};
Symbol 185 MovieClip Frame 10
_parent.dropHelp();
Symbol 185 MovieClip Frame 26
_parent.dropHelp();
Symbol 185 MovieClip Frame 39
_parent.dropHelp();
Symbol 185 MovieClip Frame 49
_parent.dropHelp();
Symbol 185 MovieClip Frame 63
_parent.dropHelp();
Symbol 185 MovieClip Frame 69
stop();
Symbol 193 MovieClip Frame 237
_parent.bossFight = true;
_parent.attachMovie("boss2", "boss", 5);
_parent.boss._y = -100;
_parent.playSound("cybAlarm");
Symbol 193 MovieClip Frame 301
stop();
Symbol 199 Button
on (press) {
gotoAndStop (71);
}
Symbol 203 Button
on (release) {
getURL (commentLink, "_blank");
}
Symbol 207 Button
on (press) {
gotoAndStop (4);
}
Symbol 231 Button
on (press) {
gotoAndStop (37);
}
Symbol 236 Button
on (press) {
gotoAndStop (25);
}
Symbol 239 Button
on (press) {
gotoAndStop (13);
}