Combined Code
// unknown tag 88 length 148
movieClip 4 SubmitScore_btn {
#initclip
Object.registerClass('SubmitScore_btn', botao);
#endinitclip
}
movieClip 6 btn_back {
#initclip
Object.registerClass('btn_back', botao);
#endinitclip
}
movieClip 8 btn_continue {
#initclip
Object.registerClass('btn_continue', botao);
#endinitclip
}
// unknown tag 88 length 153
movieClip 16 FastGames copy {
#initclip
Object.registerClass('FastGames copy', botao2);
#endinitclip
frame 1 {
stop();
}
}
movieClip 21 FastGames {
#initclip
Object.registerClass('FastGames', botao2);
#endinitclip
frame 1 {
stop();
}
}
movieClip 24 {
}
movieClip 25 {
}
movieClip 27 {
}
movieClip 31 btn_blank {
#initclip
Object.registerClass('btn_blank', botao2);
#endinitclip
frame 1 {
stop();
}
}
movieClip 34 fastgames menu {
#initclip
Object.registerClass('fastgames menu', botao);
#endinitclip
}
movieClip 36 btn_credits {
#initclip
Object.registerClass('btn_credits', botao);
#endinitclip
}
// unknown tag 88 length 148
movieClip 42 btnHard {
#initclip
Object.registerClass('btnHard', botao);
#endinitclip
frame 1 {
stop();
}
}
movieClip 44 box {
#initclip
Object.registerClass('box', Box);
#endinitclip
}
movieClip 46 {
}
movieClip 48 {
}
movieClip 49 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 8 {
this.gotoAndStop(1);
}
}
movieClip 52 {
}
movieClip 53 {
}
movieClip 54 {
}
movieClip 58 {
}
movieClip 59 {
frame 19 {
stop();
_root.verificaAwards();
_root.heroi.gameOver();
}
}
movieClip 60 hero {
#initclip
Object.registerClass('hero', hero);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
frame 3 {
}
frame 13 {
this.gotoAndStop('idle');
}
}
movieClip 62 {
}
movieClip 63 tiromc2 {
#initclip
Object.registerClass('tiromc2', tiro);
#endinitclip
frame 1 {
stop();
}
frame 2 {
dirx = 0;
diry = 0;
}
frame 5 {
this.removeMovieClip();
stop();
_alpha = 0;
}
}
movieClip 65 {
}
movieClip 66 tiromc {
#initclip
Object.registerClass('tiromc', tiro);
#endinitclip
frame 1 {
stop();
}
frame 2 {
this.vx = 0;
this.vy = 0;
}
frame 5 {
this.removeMovieClip();
stop();
}
}
movieClip 69 tip {
}
movieClip 71 play pre {
#initclip
Object.registerClass('play pre', botao);
#endinitclip
}
frame 1 {
function fastGamesClick() {
getURL('http://www.fastgames.com/', '_blank');
}
function sitelock(urls_allowed) {
lock = true;
domain_parts = _url.split('://');
real_domain = domain_parts[1].split('/');
domain.text = real_domain[0];
for (x in urls_allowed) {
if (urls_allowed[x] == real_domain[0]) {
lock = false;
trace('sitelocked');
_root.fgLogo._x = 359.4;
adTime = 2600000;
}
}
if (lock) {
adTime = 0;
var v3 = '864QD159780A';
System.security.allowDomain('server.cpmstar.com');
_root.adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + v3);
}
}
function preloader() {
if (adTime < 2600000) {
adTime += 8666.666666666666;
}
idn = Math.floor(((_root.getBytesLoaded() - firstFrame) / (_root.getBytesTotal() - firstFrame)) * 100 * adTime / 2600000);
loadedtxt.text = idn + '%';
if (idn == 100) {
mascara.removeMovieClip();
loadedtxt.text = 'NICE!';
_root.click.gotoAndStop(2);
}
idn = (origin / 100) * idn;
mascara.clear();
mascara.beginFill(0);
mascara.moveTo(0, 0);
mascara.lineTo(0, loadbar._height);
mascara.lineTo(idn, loadbar._height);
mascara.lineTo(idn, 0);
mascara.lineTo(0, 0);
mascara.endFill();
}
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();
fastLogo.stop();
MENU = new ContextMenu();
MENU.hideBuiltInItems();
Functioned = new ContextMenuItem('FastGames.com', fastGamesClick);
MENU.customItems.push(Functioned);
_root.menu = MENU;
urls_allowed = ['chat.kongregate.com', 'www.chat.kongregate.com', 'www.kongregate.com'];
sitelock(urls_allowed);
mochi.as2.MochiServices.connect('ab795851a78278ea');
mascara = _root.createEmptyMovieClip('mascara', _root.getNextHighestDepth());
mascara._x = loadbar._x;
mascara._y = loadbar._y;
origin = loadbar._width;
loadbar.setMask(mascara);
firstFrame = 183303;
_root.onEnterFrame = preloader;
preloader();
__com_mochibot__('3966a72d', this, 10301, true);
}
movieClip 74 {
}
movieClip 75 {
}
movieClip 77 {
}
movieClip 78 {
}
movieClip 80 {
frame 1 {
stop();
}
}
movieClip 83 {
}
movieClip 85 {
}
movieClip 87 {
}
movieClip 89 {
}
movieClip 94 {
frame 1 {
stop();
}
instance of movieClip 71 play pre {
onClipEvent (release) {
_root.play();
_root.removeMovieClip(_root.adBox);
}
}
}
movieClip 95 {
frame 12 {
_parent.play();
stop();
}
}
movieClip 98 {
frame 10 {
stop();
}
}
button 99 {
on (release) {
getURL('http://www.fastgames.com/', '_blank');
}
}
movieClip 100 {
frame 2 {
stop();
}
frame 7 {
stop();
}
}
instance fastLogo of movieClip 100 {
onClipEvent (load) {
_alpha = 0;
_x = 350;
_y = 300;
}
}
movieClip 300 __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.02 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) {
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);
}
if (onError != undefined) {
mochi.as2.MochiServices.onError = onError;
} else {
if (mochi.as2.MochiServices.onError == undefined) {
mochi.as2.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
};
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 v3 = '_mochiservices_com_' + id;
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servicesURL != undefined) {
mochi.as2.MochiServices._servicesURL = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(mochi.as2.MochiServices._servicesURL);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v3, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
mochi.as2.MochiServices._loader = new MovieClipLoader();
if (mochi.as2.MochiServices._loaderListener.waitInterval != null) {
clearInterval(mochi.as2.MochiServices._loaderListener.waitInterval);
}
mochi.as2.MochiServices._loaderListener = {};
mochi.as2.MochiServices._loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
mochi.as2.MochiServices._loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
mochi.as2.MochiServices._loaderListener.startTime = getTimer();
mochi.as2.MochiServices._loaderListener.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
mochi.as2.MochiServices._loaderListener.waitInterval = setInterval(mochi.as2.MochiServices._loaderListener, 'wait', 1000);
mochi.as2.MochiServices._loader.addListener(mochi.as2.MochiServices._loaderListener);
mochi.as2.MochiServices._loader.loadClip(mochi.as2.MochiServices._servicesURL + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
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, 'clip': mochi.as2.MochiServices._clip, 'version': /:$version});
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.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('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.apply(null, ['NotConnected']);
}
if (args.options != null && args.options.onError != null) {
args.options.onError.apply(null, ['NotConnected']);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = 'NotConnected';
if (callbackObject != null && typeof callbackMethod == 'string') {
callbackObject[callbackMethod](args);
} else {
if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
};
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) {
mochi.as2.MochiServices.onError.apply(null, ['NotConnected']);
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 = {};
if (_root.mochiad_options) {
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':
break;
case '7':
case '8':
case '9':
case 'a':
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 = /:$version;
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://x.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._servicesURL = 'http://www.mochiads.com/static/lib/services/services.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
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 301 __Packages.botao {
#initclip
if (!_global.botao) {
var v1 = function () {
super();
this._alpha = 70;
};
_global.botao = v1;
_global.botao extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this.e) {
this._alpha = 100;
} else {
if (this._alpha > 70) {
this._alpha -= 4.285714285714286;
}
}
};
v2.onRollOver = function () {
this.e = true;
};
v2.onRollOut = function () {
this.e = false;
};
v2.onRelease = function () {
_root.box.click.setVolume(_root.box.volume);
_root.box.click.start(0, 1);
};
v2.e = false;
v2._alpha = 70;
v2.onReleaseOutside = botao.prototype.onRelease;
ASSetPropFlags(_global.botao.prototype, null, 1);
}
#endinitclip
}
movieClip 302 __Packages.botao2 {
#initclip
if (!_global.botao2) {
var v1 = function () {
super();
};
_global.botao2 = v1;
_global.botao2 extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this.e) {
this.gotoAndStop(2);
} else {
this.gotoAndStop(1);
}
};
v2.onRollOver = function () {
this.e = true;
};
v2.onRollOut = function () {
this.e = false;
};
v2.onRelease = function () {
this.e = false;
};
v2.e = false;
v2.onReleaseOutside = botao2.prototype.onRelease;
ASSetPropFlags(_global.botao2.prototype, null, 1);
}
#endinitclip
}
movieClip 303 __Packages.Box {
#initclip
if (!_global.Box) {
var v1 = function () {
super();
this.click = new Sound();
this.click.attachSound('did');
this.win = new Sound();
this.win.attachSound('win');
this.Saves = SharedObject.getLocal('easy');
if (this.Saves.data.easy == undefined) {
this.Saves.data.easy = false;
}
if (this.Saves.data.medium == undefined) {
this.Saves.data.medium = false;
}
if (this.Saves.data.hard == undefined) {
this.Saves.data.hard = false;
}
};
_global.Box = v1;
_global.Box extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this.dificuldade == 1) {
this.dificuldadeS = 1;
}
if (this.dificuldade == 1.3) {
this.dificuldadeS = 0.5;
}
if (this.dificuldade == 0.75) {
this.dificuldadeS = 1.5;
}
};
v2.volume = 100;
v2.dificuldade = 1;
v2.dificuldadeS = 1;
v2.pontos = 0;
ASSetPropFlags(_global.Box.prototype, null, 1);
}
#endinitclip
}
movieClip 304 __Packages.hero {
#initclip
if (!_global.hero) {
var v1 = function () {
super();
};
_global.hero = v1;
_global.hero extends MovieClip;
var v2 = v1.prototype;
v2.onLoad = function () {
var v3 = new Array();
v3.push(_root.drop);
this.filters = v3;
this.atrib.hp = 15;
this.atrib.level = 1;
this.atrib.exp = 0;
this.atrib.score = 0;
if (_root.box.dificuldade == 1.3) {
this.atrib.points = 3;
}
if (_root.box.dificuldade == 1) {
this.atrib.points = 2;
}
if (_root.box.dificuldade == 0.8) {
this.atrib.points = 1;
}
this.atrib.need = 100;
this.atrib.combo = 0;
this.atrib.dano = 1;
this.atrib.velocidade = 1;
this.atrib.recarregar = 1;
this.atrib.tiroVelocidade = 1;
_root.updateInfos();
};
v2.onMouseDown = function () {
this.atirando = true;
_root.mouse.gotoAndStop(2);
};
v2.onMouseUp = function () {
this.atirando = false;
_root.mouse.gotoAndStop(1);
};
v2.voluma = function () {
_root.music_menu.setVolume(_root.volume);
_root.music_game.setVolume(_root.volume);
_root.music_boss.setVolume(_root.volume);
_root.music_end.setVolume(_root.volume);
_root.did.setVolume(_root.volume);
_root.over.setVolume(_root.volume);
_root.tiroson.setVolume(_root.volume);
_root.explosao.setVolume(_root.volume);
_root.up.setVolume(_root.volume);
_root.edie.setVolume(_root.volume);
_root.damage.setVolume(_root.volume);
};
v2.onEnterFrame = function () {
this.voluma();
if (_root.pausar) {
return undefined;
}
if (this.valid == false) {
if (this._currentframe == 1) {
this.gotoAndPlay('morrer');
}
return undefined;
}
if (_root.destroy) {
this.removeMovieClip();
return undefined;
}
if (this.recarregar > 0) {
--this.recarregar;
}
this.tv = new Array(false, false, false, false);
this.tvx = 0;
this.tvy = 0;
if (Key.isDown(65) || Key.isDown(37)) {
this.tv[0] = true;
this.tvx -= this.getAtrib(1) * _root.box.dificuldade;
}
if (Key.isDown(68) || Key.isDown(39)) {
this.tv[1] = true;
this.tvx += this.getAtrib(1) * _root.box.dificuldade;
}
if (Key.isDown(87) || Key.isDown(38)) {
this.tv[2] = true;
this.tvy -= this.getAtrib(1) * _root.box.dificuldade;
}
if (Key.isDown(83) || Key.isDown(40)) {
this.tv[3] = true;
this.tvy += this.getAtrib(1) * _root.box.dificuldade;
}
if ((this.tv[0] || this.tv[1]) && (this.tv[2] || this.tv[3])) {
this.tvx /= 2;
this.tvy /= 2;
}
this.vx += this.tvx;
this.vy += this.tvy;
if (this.atirando == true && this.recarregar <= 0 && _root._xmouse <= 415 && _root._ymouse >= 35 && _root._ymouse <= 575) {
this.nave.canhao.gotoAndPlay(2);
++this.tirocache;
if (this.tirocache > _root.maxtcache) {
this.tirocache = 1;
}
_root['tiro' + this.tirocache].removeMovieClip();
if (_root.volume == 100) {
_root.tiroson.setVolume(_root.volume);
_root.tiroson.start();
}
_root.attachMovie('tiromc', 'tiro' + this.tirocache, _root.getNextHighestDepth());
_root['tiro' + this.tirocache].direcao(_root._xmouse, _root._ymouse, this.getAtrib(3) * _root.box.dificuldade, this.getAtrib(0) * _root.box.dificuldade, this._x, this._y, this);
this.recarregar += this.getAtrib(2) / _root.box.dificuldade;
this.toFront();
}
while (this._x >= 415) {
this.vx = -(Math.abs(this.vx) * 0.85);
this._x -= 1;
}
while (this._x <= 35) {
this.vx = Math.abs(this.vx) * 0.85;
this._x += 1;
}
while (this._y >= 565) {
this.vy = -(Math.abs(this.vy) * 0.85);
this._y -= 1;
}
while (this._y <= 35) {
this.vy = Math.abs(this.vy) * 0.85;
this._y += 1;
}
this._x += this.vx;
this.vx *= 0.85;
this._y += this.vy;
this.vy *= 0.85;
this.tmp[0] = this._y - _root._ymouse;
this.tmp[1] = this._x - _root._xmouse;
this.tmp[2] = Math.atan2(this.tmp[0], this.tmp[1]);
this.tmp[3] = this.tmp[2] / 0.0174532925199433 - 180;
this._rotation = this.tmp[3];
this.i = 1;
while (this.i <= 100) {
this.ref = _root['tiroe' + this.i];
if (this.ref == undefined) {
} else {
if (com.gskinner.sprites.CollisionDetection.checkForCollision(this, this.ref) && this.ref.valid == true) {
_root.explosao.start();
_root.heroi.atrib.combo = Math.floor(_root.heroi.atrib.combo / 2);
this.atrib.hp -= this.ref.dano;
this.ref.play();
this.ref.valid = false;
_root.updateInfos();
_root.shake();
if (this.atrib.hp <= 0) {
this.gotoAndPlay('morrer');
this.valid = false;
_root.updateInfo();
return undefined;
} else {
this.gotoAndPlay('piscar');
}
}
}
++this.i;
}
};
v2.ganhar = function (qtd) {
++this.atrib.combo;
_root.maxcombo = Math.max(_root.maxcombo, this.atrib.combo);
this.atrib.score += Math.floor(qtd * this.atrib.combo * _root.box.dificuldadeS);
this.atrib.exp += qtd;
while (this.atrib.exp >= this.atrib.need) {
_root.levelup();
this.atrib.hp += 10;
if (this.atrib.hp > 15) {
this.atrib.hp = 15;
}
this.atrib.level += 1;
if (this.atrib.level <= 25) {
this.atrib.points += 1;
}
this.atrib.exp -= this.atrib.need;
this.atrib.need = Math.round(this.atrib.need * 1.5);
}
_root.box.pontos = this.atrib.score;
_root.updateInfos();
};
v2.addAtrib = function (id) {
if (this.atrib.points == 0) {
return undefined;
}
_root.fez();
if (id == 0) {
if (this.atrib.dano < 6) {
this.atrib.dano += 1;
this.atrib.points -= 1;
}
} else {
if (id == 1) {
if (this.atrib.velocidade < 6) {
this.atrib.velocidade += 1;
this.atrib.points -= 1;
}
} else {
if (id == 2) {
if (this.atrib.recarregar < 6) {
this.atrib.recarregar += 1;
this.atrib.points -= 1;
}
} else {
if (id == 3) {
if (this.atrib.tiroVelocidade < 6) {
this.atrib.tiroVelocidade += 1;
this.atrib.points -= 1;
}
}
}
}
}
_root.updateInfos();
};
v2.getAtrib = function (id) {
if (id == 0) {
switch (this.atrib.dano) {
case 1:
return 10;
break;
case 2:
return 20;
break;
case 3:
return 30;
break;
case 4:
return 40;
break;
case 5:
return 50;
break;
case 6:
return 60;
}
}
if (id == 1) {
switch (this.atrib.velocidade) {
case 1:
return 1.5;
break;
case 2:
return 1.75;
break;
case 3:
return 2;
break;
case 4:
return 2.25;
break;
case 5:
return 2.5;
break;
case 6:
return 2.75;
}
}
if (id == 2) {
switch (this.atrib.recarregar) {
case 1:
return 14;
break;
case 2:
return 12;
break;
case 3:
return 10;
break;
case 4:
return 8;
break;
case 5:
return 6;
break;
case 6:
return 4;
}
}
if (id == 3) {
switch (this.atrib.tiroVelocidade) {
case 1:
return 4.3;
break;
case 2:
return 4.7;
break;
case 3:
return 5.1;
break;
case 4:
return 5.5;
break;
case 5:
return 5.9;
break;
case 6:
return 6.3;
}
}
};
v2.impulso = function (ix, iy) {
ix *= -1;
iy *= -1;
this.vx += (ix / 10) * (this.atrib.tiroVelocidade / 10) / (this.atrib.velocidade / 2);
this.vy += (iy / 10) * (this.atrib.tiroVelocidade / 10) / (this.atrib.velocidade / 2);
};
v2.recuperar = function () {
this.atrib.hp = 15;
_root.updateInfos();
};
v2.gameOver = function () {
_root.verificaAwards();
_root.finalscore = this.atrib.score;
_root.gotoAndStop('lose');
this.removeMovieClip();
};
v2.toFront = function () {
this.swapDepths(_root.getNextHighestDepth());
};
v2.recarregar = 0;
v2.tirocache = 1;
v2.vx = 0;
v2.vy = 0;
v2.tvx = 0;
v2.tvy = 0;
v2.tv = new Array();
v2.valid = true;
v2.atrib = {};
v2.tmp = new Array();
v2.filterArray = new Array();
v2.atirando = false;
ASSetPropFlags(_global.hero.prototype, null, 1);
}
#endinitclip
}
movieClip 305 __Packages.com.gskinner.sprites.CollisionDetection {
#initclip
if (!_global.com) {
_global.com = new Object();
}
if (!_global.com.gskinner) {
_global.com.gskinner = new Object();
}
if (!_global.com.gskinner.sprites) {
_global.com.gskinner.sprites = new Object();
}
if (!_global.com.gskinner.sprites.CollisionDetection) {
var v1 = function () {};
com.gskinner.sprites.CollisionDetection = v1;
var v2 = v1.prototype;
v1.checkForCollision = function (p_clip1, p_clip2, p_alphaTolerance) {
if (p_alphaTolerance == undefined) {
p_alphaTolerance = 255;
}
var v4 = p_clip1.getBounds(_root);
var v3 = p_clip2.getBounds(_root);
if (v4.xMax < v3.xMin || v3.xMax < v4.xMin || v4.yMax < v3.yMin || v3.yMax < v4.yMin) {
return null;
}
var v2 = {};
v2.xMin = Math.max(v4.xMin, v3.xMin);
v2.xMax = Math.min(v4.xMax, v3.xMax);
v2.yMin = Math.max(v4.yMin, v3.yMin);
v2.yMax = Math.min(v4.yMax, v3.yMax);
var v6 = new flash.display.BitmapData(v2.xMax - v2.xMin, v2.yMax - v2.yMin, false);
var v5 = p_clip1.transform.concatenatedMatrix;
v5.tx -= v2.xMin;
v5.ty -= v2.yMin;
v6.draw(p_clip1, v5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, -255, -255, p_alphaTolerance));
v5 = p_clip2.transform.concatenatedMatrix;
v5.tx -= v2.xMin;
v5.ty -= v2.yMin;
v6.draw(p_clip2, v5, new flash.geom.ColorTransform(1, 1, 1, 1, 255, 255, 255, p_alphaTolerance), 'difference');
var v7 = v6.getColorBoundsRect(4294967295.0, 4278255615.0);
v6.dispose();
v7.x += v2.xMin;
v7.y += v2.yMin;
return v7;
};
ASSetPropFlags(com.gskinner.sprites.CollisionDetection.prototype, null, 1);
}
#endinitclip
}
movieClip 306 __Packages.tiro {
#initclip
if (!_global.tiro) {
var v1 = function () {
super();
};
_global.tiro = v1;
_global.tiro extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (_root.pausar) {
return undefined;
}
if (_root.destroy) {
this.removeMovieClip();
return undefined;
}
this._x += this.vx * this.ac * 1.5;
this._y += this.vy * this.ac * 1.5;
if (this._x >= 417 || this._x <= 30 || this._y >= 570 || this._y <= 30) {
this.play();
}
};
v2.direcao = function (px, py, velocidade, dano, fx, fy, fh, adi) {
if (adi == undefined) {
adi = 0;
}
this._x = fx;
this._y = fy;
this.tmp = Array();
this.tmp[0] = this._y - py;
this.tmp[1] = this._x - px;
this.tmp[2] = Math.atan2(this.tmp[0], this.tmp[1]);
this.tmp[3] = this.tmp[2] / 0.0174532925199433;
this.angulo = this.tmp[3] + 180 + adi;
this.vx = Math.cos(this.angulo * Math.PI / 180) * velocidade;
this.vy = Math.sin(this.angulo * Math.PI / 180) * velocidade;
this.angle = Math.atan(this.vy / this.vx) / 0.0174532925199433;
if (this.vx < 0) {
this.angle += 180;
}
if (this.vx >= 0 && this.vy < 0) {
this.angle += 360;
}
this._rotation = this.angle;
this.angulo = Math.atan(this.vy / this.vx) / 0.0174532925199433;
this.ac = 2;
this._x += this.vx * 5;
this._y += this.vy * 5;
this.dano = dano;
fh.impulso(this.vx, this.vy);
};
v2.vx = 0;
v2.vy = 0;
v2.angulo = 0;
v2.ac = 1;
v2.valid = true;
v2.tmp = new Array();
ASSetPropFlags(_global.tiro.prototype, null, 1);
}
#endinitclip
}
movieClip 307 __Packages.enemy {
#initclip
if (!_global.enemy) {
var v1 = function () {
super();
};
_global.enemy = v1;
_global.enemy extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (this._currentframe == 1 && this.valid == false) {
this.gotoAndPlay(2);
}
if (_root.destroy) {
this.removeMovieClip();
return undefined;
}
if (_root.pausar) {
return undefined;
}
if (this.valid == false) {
return undefined;
}
if (this.vx == 0 && this.vy == 0 && this.movementType != -1) {
this.callAction();
}
this.todo = false;
this.angulo = Math.atan(this.vy / this.vx) / 0.0174532925199433;
if (this.vx < 0) {
this.angulo += 180;
}
if (this.vx >= 0 && this.vy < 0) {
this.angulo += 360;
}
this._rotation = this.angulo;
while (this._x >= 415) {
if (this._x == undefined) {
break;
}
this.vx = -Math.abs(this.vx);
this._x -= 1;
this.todo = true;
}
while (this._x <= 35) {
if (this._x == undefined) {
break;
}
this.vx = Math.abs(this.vx);
this._x += 1;
this.todo = true;
}
while (this._y >= 565) {
if (this._y == undefined) {
break;
}
this.vy = -Math.abs(this.vy);
this._y -= 1;
this.todo = true;
}
while (this._y <= 35) {
if (this._y == undefined) {
break;
}
this.vy = Math.abs(this.vy);
this._y += 1;
this.todo = true;
}
if (this.todo) {
this.callAction();
}
if (this.look) {
this.olhar();
}
this._x += this.vx * this.turbo;
this._y += this.vy * this.turbo;
this.checkCollision();
if (this.movementType == 2) {
this.reCalcAngles();
}
if (this.movementType == 3) {
this.reCalcAngles2();
}
if (this.shooter) {
if (this.recarregar == 0) {
this.shot();
} else {
this.recarregar -= 1;
}
}
if (com.gskinner.sprites.CollisionDetection.checkForCollision(this, _root.heroi, 0) && this.valid && _root.heroi.valid) {
if (_root.volume == 100) {
_root.edie.setVolume(_root.volume);
_root.edie.start();
}
this.play();
this.morrer();
this.valid = false;
_root.heroi.atrib.combo = Math.floor(_root.heroi.atrib.combo / 1.5);
_root.heroi.atrib.hp -= this.dano;
_root.shake();
if (_root.heroi.atrib.hp <= 0) {
_root.heroi.gotoAndPlay('morrer');
_root.heroi.valid = false;
return undefined;
} else {
_root.heroi.gotoAndPlay('piscar');
}
if (this.calc) {
_root.heroi.ganhar(this.expe);
}
}
};
v2.reCalcVxVy = function () {
this.olhar();
if (this._x < 55) {
this.vx = 3;
} else {
if (this._x > 395) {
this.vx = -3;
} else {
this.vx = 3;
if (Math.round(Math.random()) == 0) {
this.vx *= -1;
}
}
}
if (this._y < 55) {
this.vy = 3;
} else {
if (this._x > 550) {
this.vy = -3;
} else {
this.vy = 3;
if (Math.round(Math.random()) == 0) {
this.vy *= -1;
}
}
}
};
v2.reCalcAngles = function () {
this.olhar();
this.angulo = this._rotation;
this.vx = Math.cos(this.angulo * Math.PI / 180) * 4;
this.vy = Math.sin(this.angulo * Math.PI / 180) * 4;
};
v2.reCalcAngles2 = function () {
this.olhar();
this.angulo = this._rotation;
this.vx = Math.cos(this.angulo * Math.PI / 180) * 6;
this.vy = Math.sin(this.angulo * Math.PI / 180) * 6;
};
v2.callAction = function () {
switch (this.movementType) {
case 0:
this.reCalcVxVy();
break;
case 1:
this.reCalcAngles();
break;
case 2:
this.reCalcAngles();
break;
case 3:
this.reCalcAngles2();
}
};
v2.shot = function () {
++_root.tiroecache;
if (_root.tiroecache > 100) {
_root.tiroecache = 0;
}
this.olhar();
_root['tiroe' + _root.tiroecache].removeMovieClip();
if (_root.volume == 100) {
_root.tiroson.setVolume(_root.volume);
_root.tiroson.start();
}
_root.attachMovie('tiromc2', 'tiroe' + _root.tiroecache, _root.getNextHighestDepth());
_root['tiroe' + _root.tiroecache].direcao(_root.heroi._x, _root.heroi._y, 3, this.dano, this._x, this._y);
this.recarregar += this.reloadtime;
this.toFront();
};
v2.olhar = function () {
this.tmp[0] = this._y - _root.heroi._y;
this.tmp[1] = this._x - _root.heroi._x;
this.tmp[2] = Math.atan2(this.tmp[0], this.tmp[1]);
this.tmp[3] = this.tmp[2] / 0.0174532925199433;
this._rotation = this.tmp[3] + 180;
};
v2.morrer = function () {
++_root.nowKilledEnemies;
};
v2.toFront = function () {
this.swapDepths(_root.getNextHighestDepth());
};
v2.checkCollision = function () {
this.i = 1;
while (this.i <= _root.maxtcache) {
this.ref = _root['tiro' + this.i];
if (this.ref == undefined) {
} else {
if (com.gskinner.sprites.CollisionDetection.checkForCollision(this, this.ref, 0) && this.ref.valid) {
this.hp -= this.ref.dano;
this.ref.valid = false;
this.ref.play();
this.a.play();
if (this.hp <= 0) {
if (_root.volume == 100) {
_root.edie.setVolume(_root.volume);
_root.edie.start();
}
this.morrer();
if (this.calc) {
_root.heroi.ganhar(this.expe);
}
this.valid = false;
this.play();
if (this.combo) {
_root.dano(this.ref.dano, this._x, this._y);
}
return undefined;
} else {
this.damage.start();
}
}
}
++this.i;
}
};
v2.shooter = false;
v2.look = false;
v2.kaboom = false;
v2.valid = true;
v2.calc = true;
v2.todo = false;
v2.recarregar = 30;
v2.reloadtime = 75;
v2.vx = 0;
v2.vy = 0;
v2.inix = 0;
v2.iniy = 0;
v2.dirx = 0;
v2.diry = 0;
v2.dano = 1;
v2.expe = 0;
v2.tmp = new Array();
v2.i = 0;
v2.combo = true;
v2.turbo = 1;
ASSetPropFlags(_global.enemy.prototype, null, 1);
}
#endinitclip
}
movieClip 308 __Packages.enemy02 {
#initclip
if (!_global.enemy02) {
var v1 = function () {
super();
};
_global.enemy02 = v1;
_global.enemy02 extends enemy;
var v2 = v1.prototype;
v2.movementType = 1;
v2.hp = 20;
v2.expe = 55;
ASSetPropFlags(_global.enemy02.prototype, null, 1);
}
#endinitclip
}
movieClip 309 __Packages.enemy03 {
#initclip
if (!_global.enemy03) {
var v1 = function () {
super();
};
_global.enemy03 = v1;
_global.enemy03 extends enemy;
var v2 = v1.prototype;
v2.movementType = 0;
v2.shooter = true;
v2.look = true;
v2.hp = 30;
v2.expe = 110;
ASSetPropFlags(_global.enemy03.prototype, null, 1);
}
#endinitclip
}
movieClip 310 __Packages.enemy04 {
#initclip
if (!_global.enemy04) {
var v1 = function () {
super();
};
_global.enemy04 = v1;
_global.enemy04 extends enemy;
var v2 = v1.prototype;
v2.movementType = 2;
v2.look = true;
v2.kaboom = true;
v2.hp = 40;
v2.dano = 1;
v2.expe = 190;
ASSetPropFlags(_global.enemy04.prototype, null, 1);
}
#endinitclip
}
movieClip 311 __Packages.enemy05 {
#initclip
if (!_global.enemy05) {
var v1 = function () {
super();
};
_global.enemy05 = v1;
_global.enemy05 extends enemy;
var v2 = v1.prototype;
v2.movementType = 2;
v2.look = true;
v2.kaboom = true;
v2.hp = 50;
v2.dano = 2;
v2.expe = 300;
ASSetPropFlags(_global.enemy05.prototype, null, 1);
}
#endinitclip
}
movieClip 312 __Packages.enemy06 {
#initclip
if (!_global.enemy06) {
var v1 = function () {
super();
};
_global.enemy06 = v1;
_global.enemy06 extends enemy;
var v2 = v1.prototype;
v2.movementType = 0;
v2.shooter = true;
v2.look = true;
v2.reloadtime = 40;
v2.hp = 100;
v2.expe = 410;
ASSetPropFlags(_global.enemy06.prototype, null, 1);
}
#endinitclip
}
movieClip 313 __Packages.enemy07 {
#initclip
if (!_global.enemy07) {
var v1 = function () {
super();
};
_global.enemy07 = v1;
_global.enemy07 extends enemy;
var v2 = v1.prototype;
v2.movementType = 3;
v2.look = true;
v2.hp = 50;
v2.dano = 2;
v2.expe = 710;
ASSetPropFlags(_global.enemy07.prototype, null, 1);
}
#endinitclip
}
movieClip 314 __Packages.boss {
#initclip
if (!_global.boss) {
var v1 = function () {
super();
};
_global.boss = v1;
_global.boss extends MovieClip;
var v2 = v1.prototype;
v2.onEnterFrame = function () {
if (_root.destroy) {
this.removeMovieClip();
return undefined;
}
if (_root.pausar) {
return undefined;
}
if (this.valid == false) {
return undefined;
}
this.poderExtra = (4000 - this.hp) / 7000 + 0.8;
while (this._x >= 415) {
if (this._x == undefined) {
break;
}
this.vx = -Math.abs(this.vx);
this._x -= 1;
}
while (this._x <= 35) {
if (this._x == undefined) {
break;
}
this.vx = Math.abs(this.vx);
this._x += 1;
}
while (this._y >= 565) {
if (this._y == undefined) {
break;
}
this.vy = -Math.abs(this.vy);
this._y -= 1;
}
while (this._y <= 35) {
if (this._y == undefined) {
break;
}
this.vy = Math.abs(this.vy);
this._y += 1;
}
this.i = 1;
while (this.i <= _root.maxtcache) {
this.ref = _root['tiro' + this.i];
if (com.gskinner.sprites.CollisionDetection.checkForCollision(this.ref, this) && this.ref.valid == true) {
this.a.play();
this.hp -= this.ref.dano;
this.ref.play();
if (this.hp <= 0) {
this.morrer();
++_root.inimigosMortos;
_root.heroi.ganhar(this.expe);
this.valid = false;
this.play();
break;
}
this.ref.valid = false;
}
++this.i;
}
this.reCalcAngles();
this.olhar();
if (this.recarregar > 0) {
--this.recarregar;
}
if (this.recarregar <= 0) {
this.shot(0);
this.shot(15);
this.shot(-15);
}
if (this.sumontime > 0) {
--this.sumontime;
}
if (this.sumontime <= 0) {
this.sumon();
}
if (com.gskinner.sprites.CollisionDetection.checkForCollision(this, _root.heroi, 120)) {
this.distx = _root.heroi._x - this._x;
this.disty = _root.heroi._y - this._y;
this.distancia = Math.sqrt(this.distx * this.distx + this.disty * this.disty);
this.tmp[0] = this._y - _root.heroi._y;
this.tmp[1] = this._x - _root.heroi._x;
this.tmp[2] = Math.atan2(this.tmp[0], this.tmp[1]);
this.tmp[3] = (this.tmp[2] / 0.0174532925199433 - 180) * Math.PI / 180;
_root.heroi.vx += (Math.cos(this.tmp[3]) / this.distancia) * 70;
_root.heroi.vy += (Math.sin(this.tmp[3]) / this.distancia) * 70;
}
this.dist_x = _root.heroi._x - this._x;
this.dist_y = _root.heroi._y - this._y;
this.distance = Math.sqrt(this.dist_x * this.dist_x + this.dist_y * this.dist_y);
this.angle = Math.atan2(this.dist_y, this.dist_x);
this.speed = this.distance / this.velocidade / 8;
this.xspeed = this.speed * Math.cos(this.angle);
this.yspeed = this.speed * Math.sin(this.angle);
this.vx = this.xspeed;
this.vy = this.yspeed;
this._x += this.vx * 0.5 * this.poderExtra;
this._y += this.vy * 0.5 * this.poderExtra;
};
v2.shot = function (mais) {
++_root.tiroecache;
if (_root.tiroecache > 100) {
_root.tiroecache = 0;
}
this.olhar();
_root['tiroe' + _root.tiroecache].removeMovieClip();
_root.tiroson.start();
_root.attachMovie('tiromc2', 'tiroe' + _root.tiroecache, _root.getNextHighestDepth());
_root['tiroe' + _root.tiroecache].direcao(_root.heroi._x, _root.heroi._y, 5 * this.poderExtra, 3, this._x, this._y, false);
_root['tiroe' + _root.tiroecache]._yscale = 125;
_root['tiroe' + _root.tiroecache]._xscale = 125;
this.recarregar = Math.floor(14 / this.poderExtra);
this.toFront();
};
v2.reCalcAngles = function () {
this.olhar();
this.angulo = this._rotation;
this.vx = Math.cos(this.angulo * Math.PI / 180) * 1;
this.vy = Math.sin(this.angulo * Math.PI / 180) * 1;
};
v2.olhar = function () {
this.tmp[0] = this._y - _root.heroi._y;
this.tmp[1] = this._x - _root.heroi._x;
this.tmp[2] = Math.atan2(this.tmp[0], this.tmp[1]);
this.tmp[3] = this.tmp[2] / 0.0174532925199433;
this._rotation = this.tmp[3] + 180;
};
v2.morrer = function () {
_root.heroi.winner = true;
_root.so.flush();
};
v2.sumon = function () {
++_root.icache;
if (_root.icache > 15) {
_root.icache = 0;
}
if (_root['inimigo' + _root.icache] != undefined) {
return undefined;
}
this.atalho = _root.attachMovie('enemy07', 'inimigo' + _root.icache, _root.getNextHighestDepth());
this.atalho._x = this._x;
this.atalho._y = this._y;
this.atalho.calc = false;
this.atalho.turbo = 1.5;
this.atalho.combo = false;
this.atalho._yscale = 150;
this.atalho._xscale = 150;
this.sumontime += 50 / this.poderExtra;
};
v2.toFront = function () {
this.swapDepths(_root.getNextHighestDepth());
};
v2.hp = 4000;
v2.valid = true;
v2.recarregar = 30;
v2.sumontime = 45;
v2.tmp = new Array();
v2.vx = 0;
v2.vy = 0;
v2.angulo = 0;
v2.expe = 0;
v2.n = 0;
v2.velocidade = 2;
ASSetPropFlags(_global.boss.prototype, null, 1);
}
#endinitclip
}
movieClip 315 __Packages.enemy01 {
#initclip
if (!_global.enemy01) {
var v1 = function () {
super();
};
_global.enemy01 = v1;
_global.enemy01 extends enemy;
var v2 = v1.prototype;
v2.movementType = 0;
v2.hp = 10;
v2.expe = 30;
ASSetPropFlags(_global.enemy01.prototype, null, 1);
}
#endinitclip
}
movieClip 316 __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) {
if (options.clip == null || options.clip == undefined) {
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 317 __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 2 {
stop();
__a = 0;
_root.onEnterFrame = function () {
++__a;
if (__a >= 100) {
_root.gotoAndStop('menu');
delete _root.onEnterFrame;
}
};
music_end = new Sound();
music_end.attachSound('end');
music_end.onSoundComplete = function () {
music_end.start();
};
music_win = new Sound();
music_win.attachSound('win');
music_win.onSoundComplete = function () {
music_win.start();
};
music_game = new Sound();
music_game.attachSound('game');
music_game.onSoundComplete = function () {
music_game.start();
};
music_boss = new Sound();
music_boss.attachSound('bossm');
music_boss.onSoundComplete = function () {
music_boss.start();
};
music_menu = new Sound();
music_menu.attachSound('mmenu');
music_menu.onSoundComplete = function () {
music_menu.start();
};
did = new Sound();
did.attachSound('did');
over = new Sound();
over.attachSound('over');
tiroson = new Sound();
tiroson.attachSound('Tiro');
explosao = new Sound();
explosao.attachSound('edie');
explosao.setVolume(100);
up = new Sound();
up.attachSound('up');
edie = new Sound();
edie.attachSound('pop');
damage = new Sound();
damage.attachSound('damage');
damage.setVolume(100);
volume = 100;
_root.mudo = false;
_root.mutar = function () {
_root.mudo = _root.mudo ? false : true;
if (_root.mudo) {
volume = 0;
_root.box.volume = 0;
_root.music_menu.setVolume(_root.volume);
_root.music_menu.stop();
_root.music_win.setVolume(_root.volume);
_root.music_game.setVolume(_root.volume);
_root.music_boss.setVolume(_root.volume);
_root.music_end.setVolume(_root.volume);
_root.did.setVolume(_root.volume);
_root.over.setVolume(_root.volume);
_root.tiroson.setVolume(_root.box.volume);
_root.explosao.setVolume(_root.volume);
_root.up.setVolume(_root.volume);
_root.edie.setVolume(_root.volume);
_root.damage.setVolume(_root.volume);
} else {
volume = 100;
_root.box.volume = 100;
_root.music_menu.start();
_root.ingame.setVolume(volume);
_root.music_menu.setVolume(volume);
_root.music_game.setVolume(volume);
_root.music_boss.setVolume(volume);
_root.music_end.setVolume(volume);
_root.did.setVolume(volume);
_root.over.setVolume(volume);
_root.tiroson.setVolume(volume);
_root.explosao.setVolume(volume);
_root.up.setVolume(volume);
_root.edie.setVolume(volume);
_root.damage.setVolume(volume);
_root.music_win.setVolume(_root.volume);
}
};
_root.gotoAndStop(4);
}
movieClip 110 {
frame 1 {
stop();
}
}
movieClip 112 {
}
movieClip 114 {
}
movieClip 115 {
frame 1 {
stop();
}
}
movieClip 116 {
frame 13 {
stop();
if (_parent.calc) {
++_root.inimigosMortos;
}
this.removeMovieClip();
}
}
movieClip 117 enemy01 {
#initclip
Object.registerClass('enemy01', enemy01);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 119 {
}
movieClip 120 {
frame 1 {
stop();
}
}
movieClip 121 enemy02 {
#initclip
Object.registerClass('enemy02', enemy02);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 123 {
}
movieClip 124 {
frame 1 {
stop();
}
}
movieClip 125 enemy03 {
#initclip
Object.registerClass('enemy03', enemy03);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 127 {
}
movieClip 128 {
frame 1 {
stop();
}
}
movieClip 129 enemy04 {
#initclip
Object.registerClass('enemy04', enemy04);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 131 {
}
movieClip 132 {
frame 1 {
stop();
}
}
movieClip 133 enemy05 {
#initclip
Object.registerClass('enemy05', enemy05);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 135 {
}
movieClip 136 {
frame 1 {
stop();
}
}
movieClip 137 enemy06 {
#initclip
Object.registerClass('enemy06', enemy06);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 139 {
}
movieClip 140 {
frame 1 {
stop();
}
}
movieClip 141 enemy07 {
#initclip
Object.registerClass('enemy07', enemy07);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 143 {
}
movieClip 145 {
}
movieClip 146 {
}
movieClip 147 {
frame 1 {
stop();
}
}
movieClip 148 boss {
#initclip
Object.registerClass('boss', boss);
#endinitclip
frame 1 {
stop();
}
frame 2 {
stop();
}
}
movieClip 150 {
}
movieClip 152 {
}
frame 3 {
btn_play.onRelease = function () {
_root.gotoAndStop('game');
};
_root.box.dificuldade = 1;
_root.box.dificuldadeS = 1;
_root.playAs.text = 'Play in: Medium';
_root.selector._x = _root.btnMedium._x;
btnEasy.onRelease = function () {
_root.box.dificuldade = 1.3;
_root.box.dificuldadeS = 0.5;
_root.playAs.text = 'Play in: Easy';
_root.selector._x = _root.btnEasy._x;
};
btnMedium.onRelease = function () {
_root.box.dificuldade = 1;
_root.box.dificuldadeS = 1;
_root.playAs.text = 'Play in: Normal';
_root.selector._x = _root.btnMedium._x;
};
btnHard.onRelease = function () {
if (_root.box.Saves.data.medium || _root.box.Saves.data.easy) {
_root.box.dificuldade = 0.8;
_root.box.dificuldadeS = 2;
_root.playAs.text = 'Play in: Hard';
_root.selector._x = _root.btnHard._x;
}
};
}
movieClip 154 btn_play {
#initclip
Object.registerClass('btn_play', botao);
#endinitclip
}
movieClip 158 btnEasy {
#initclip
Object.registerClass('btnEasy', botao);
#endinitclip
}
movieClip 160 btnMedium {
#initclip
Object.registerClass('btnMedium', botao);
#endinitclip
}
movieClip 163 {
}
instance easyMedal of movieClip 163 {
onClipEvent (load) {
if (_root.box.Saves.data.easy) {
_alpha = 100;
} else {
_alpha = 0;
}
}
}
instance mediumMedal of movieClip 163 {
onClipEvent (load) {
if (_root.box.Saves.data.medium) {
_alpha = 100;
} else {
_alpha = 0;
}
}
}
instance hardMedal of movieClip 163 {
onClipEvent (load) {
if (_root.box.Saves.data.hard) {
_alpha = 100;
} else {
_alpha = 0;
}
if (_root.box.Saves.data.medium || _root.box.Saves.data.easy) {
_root.btnHard.gotoAndStop(1);
} else {
_root.btnHard.gotoAndStop(2);
}
}
}
movieClip 165 {
}
frame 4 {
function verificaAwards() {
i = 0;
while (i <= 100) {
_root['tiroe' + i]._alpha = 0;
_root['tiroe' + i]._x = -100;
_root['tiro' + i]._alpha = 0;
_root['tiro' + i]._x = -100;
++i;
}
}
stop();
var so = SharedObject.getLocal('diepix');
so.data.maxCombos = (so.data.maxCombos == undefined) ? 0 : so.data.maxCombos;
so.data.finalScore = (so.data.finalScore == undefined) ? 0 : so.data.finalScore;
so.data.inimigosMortos = (so.data.inimigosMortos == undefined) ? 0 : so.data.inimigosMortos;
so.data.flush();
_root.destroy = true;
btn_play.onRelease = function () {
_root.gotoAndStop('dificuldade');
};
btnMoreGames.onRelease = function () {
getURL('http://www.fastgames.com/', '_blank');
};
btn_hs.onRelease = function () {
var v2 = {'n': [0, 5, 2, 5, 10, 10, 0, 0, 13, 1, 13, 0, 5, 14, 10, 5], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var v3 = v2.f(0, '');
mochi.as2.MochiScores.showLeaderboard({'boardID': v3});
Mouse.show();
};
Mouse.show();
btn_leader.onRelease = function () {
_root.fez();
_root.finalscore = 0;
_root.dost = true;
_root.gotoAndStop('postscore');
};
creditos.onRelease = function () {
_root.gotoAndStop(6);
};
_root.mouse._alpha = 0;
}
movieClip 167 btn_highscores {
#initclip
Object.registerClass('btn_highscores', botao);
#endinitclip
}
instance of movieClip 36 btn_credits {
onClipEvent (release) {
_root.gotoAndStop(6);
}
}
movieClip 171 btn_moreGames {
#initclip
Object.registerClass('btn_moreGames', botao);
#endinitclip
}
instance of movieClip 34 fastgames menu {
onClipEvent (release) {
getURL('http://www.fastgames.com/', '_blank');
}
}
frame 5 {
_root.gotoAndStop(4);
}
frame 6 {
btn_back.onRelease = function () {
_root.fez();
_root.gotoAndStop('pmenu');
};
}
frame 7 {
function createHero() {
_root.attachMovie('hero', 'heroi', _root.getNextHighestDepth());
heroi._x = 224.96;
heroi._y = 303;
}
function updateInfos() {
level = _root.heroi.atrib.level;
fundo.scored.text = _root.heroi.atrib.score;
points = _root.heroi.atrib.points;
power.barra._xscale = (_root.heroi.atrib.dano - 1) * 14;
speed.barra._xscale = (_root.heroi.atrib.velocidade - 1) * 14;
reload.barra._xscale = (_root.heroi.atrib.recarregar - 1) * 14;
sspeed.barra._xscale = (_root.heroi.atrib.tiroVelocidade - 1) * 14;
armorbar.barra._xscale = Math.floor((_root.heroi.atrib.hp / 15) * 100);
expbar.barra._xscale = Math.floor((_root.heroi.atrib.exp / _root.heroi.atrib.need) * 100);
}
function levelupup() {
--leveluptxt._y;
leveluptxt._alpha -= 2.5;
if (leveluptxt._alpha == 0) {
clearInterval(lvlupi);
}
}
function destroyText(tref) {}
function criarInimigo() {
if (_root.pausar) {
return undefined;
}
if (inimigos[nivelAtual][numero] == undefined) {
if (_root.inimigosMortos >= inimigos[nivelAtual].length) {
++nivelAtual;
if (nivelAtual < 10) {
fundo.wave.wave2.text = '0' + nivelAtual;
} else {
fundo.wave.wave2.text = nivelAtual;
}
if (_root.inimigos[nivelAtual][0] == undefined) {
_root.gotoAndStop('win');
switch (_root.box.dificuldade) {
case 1.3:
_root.box.Saves.data.easy = true;
break;
case 1:
_root.box.Saves.data.medium = true;
break;
case 0.8:
_root.box.Saves.data.hard = true;
}
_root.verificaAwards();
_root.destroy = true;
return undefined;
}
if (nivelAtual >= 25) {
_root.heroi.recuperar();
}
numero = 0;
_root.inimigosMortos = 0;
inispa = 0;
inilim = true;
}
return undefined;
}
++_root.icache;
if (_root.icache > 12) {
_root.icache = 1;
}
_root['inimigo' + _root.icache].removeMovieClip();
atalho = _root.attachMovie(inimigos[nivelAtual][numero], 'inimigo' + _root.icache, _root.getNextHighestDepth());
atalho._x = -100;
atalho._y = -100;
if (Math.round(Math.random()) == 0) {
atalho._x = 800;
}
if (Math.round(Math.random()) == 0) {
atalho._y = 700;
}
atalho.onEnterFrame();
++numero;
}
stop();
ewarn._alpha = true;
i = 0;
Mouse.hide();
_root.tip._visible = false;
_root.mouse._alpha = 100;
a.tabEnabled = false;
b.tabEnabled = false;
c.tabEnabled = false;
d.tabEnabled = false;
spawninterval = 4;
shake_i = 0;
shaker = _root.createEmptyMovieClip('shaker', _root.getNextHighestDepth());
_root.shake = function () {
_root.shake_n = 6;
_root.shake_i = random(5);
shaker.onEnterFrame = function () {
++_root.shake_i;
--_root.shake_n;
if (_root.shake_n < 0) {
delete shaker.onEnterFrame;
}
_root._y = Math.round(Math.sin(shake_i) * _root.shake_n);
_root._x = Math.round(Math.sin(shake_i) * _root.shake_n);
};
};
stopAllSounds();
if (_root.volume == 100) {
music_menu.start();
}
_root.maxtcache = 25;
inispa = 0;
inilim = false;
music_game.start();
pausar = false;
destroy = false;
finalscore = 0;
maxcombo = 0;
nowKilledEnemies = 0;
drop = new flash.filters.DropShadowFilter(3, 45, 0, 0.5, 3, 3, 1, 1, false, false, false);
inimigosMortos = 0;
cache = 0;
armorbar.barra._xscale = 0;
expbar.barra._xscale = 0;
icache = 1;
_root.tiroecache = 0;
_root.ignore = false;
tecla = false;
_root.onEnterFrame = function () {
if (nivelAtual >= 25) {
_root.ewarn._alpha = 0;
}
if (fundo.hitTest(mouse._x, mouse._y, yes)) {
pausar = false;
} else {
pausar = true;
}
if (pausar) {
_root.ignore = true;
} else {
_root.ignore = false;
}
if (_root.destroy) {
delete this.onEnterFrame;
}
++inispa;
if (inispa >= 15) {
criarInimigo();
if (inilim) {
__i = 0;
while (__i <= 15) {
_root['inimigo' + __i].removeMovieClip();
++__i;
}
inilim = false;
}
inispa = 0;
}
tmph = false;
if (nivelAtual < 25) {
distx1 = _root.fundo.gate1._x + _root.fundo._x - _root.heroi._x;
disty1 = _root.fundo.gate1._y + _root.fundo._y - _root.heroi._y;
distancia1 = Math.sqrt(distx1 * distx1 + disty1 * disty1);
distx2 = _root.fundo.gate2._x + _root.fundo._x - _root.heroi._x;
disty2 = _root.fundo.gate2._y + _root.fundo._y - _root.heroi._y;
distancia2 = Math.sqrt(distx2 * distx2 + disty2 * disty2);
distx3 = _root.fundo.gate3._x + _root.fundo._x - _root.heroi._x;
disty3 = _root.fundo.gate3._y + _root.fundo._y - _root.heroi._y;
distancia3 = Math.sqrt(distx3 * distx3 + disty3 * disty3);
distx4 = _root.fundo.gate4._x + _root.fundo._x - _root.heroi._x;
disty4 = _root.fundo.gate4._y + _root.fundo._y - _root.heroi._y;
distancia4 = Math.sqrt(distx4 * distx4 + disty4 * disty4);
}
if (distancia1 < 60 or distancia2 < 60 or distancia3 < 60 or distancia4 < 60) {
tmph = true;
}
if (tmph && ewarn._alpha < 90) {
ewarn._alpha += 15;
} else {
if (ewarn._alpha > 0) {
ewarn._alpha -= 20;
}
}
};
btn_mute.onRelease = function () {
mutar();
};
btn_menu.onRelease = function () {
stopAllSounds();
_root.verificaAwards();
_root.pausar = false;
_root.gotoAndStop('pmenu');
};
leveluptxt._alpha = 0;
_root.levelup = function () {
if (_root.pausar) {
return undefined;
}
if (_root.volume == 100) {
up.start();
}
leveluptxt._alpha = 100;
leveluptxt._y = 220;
leveluptxt.text = 'LEVEL UP!';
clearInterval(lvlupi);
lvlupi = setInterval(levelupup, 50);
};
createHero();
updateInfos();
startGame();
numero = 0;
nivelAtual = 0;
inimigos = new Array();
inimigos[0] = new Array();
inimigos[1] = new Array('enemy01', 'enemy01', 'enemy01', 'enemy01');
inimigos[2] = new Array('enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01');
inimigos[3] = new Array('enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01', 'enemy01');
inimigos[4] = new Array('enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02');
inimigos[5] = new Array('enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02');
inimigos[6] = new Array('enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy02');
inimigos[7] = new Array('enemy03', 'enemy01', 'enemy03', 'enemy01', 'enemy02', 'enemy03', 'enemy02', 'enemy03', 'enemy03', 'enemy03');
inimigos[8] = new Array('enemy03', 'enemy03', 'enemy02', 'enemy03', 'enemy03', 'enemy03', 'enemy04', 'enemy03', 'enemy02', 'enemy04');
inimigos[9] = new Array('enemy03', 'enemy04', 'enemy02', 'enemy04', 'enemy03', 'enemy04', 'enemy04', 'enemy04', 'enemy02', 'enemy04');
inimigos[10] = new Array('enemy03', 'enemy04', 'enemy04', 'enemy04', 'enemy03', 'enemy04', 'enemy04', 'enemy04', 'enemy04', 'enemy04');
inimigos[11] = new Array('enemy03', 'enemy04', 'enemy05', 'enemy04', 'enemy03', 'enemy04', 'enemy04', 'enemy05', 'enemy04', 'enemy04');
inimigos[12] = new Array('enemy03', 'enemy04', 'enemy04', 'enemy05', 'enemy03', 'enemy05', 'enemy04', 'enemy05', 'enemy04', 'enemy05');
inimigos[13] = new Array('enemy03', 'enemy05', 'enemy04', 'enemy05', 'enemy03', 'enemy05', 'enemy04', 'enemy05', 'enemy04', 'enemy05');
inimigos[14] = new Array('enemy03', 'enemy05', 'enemy05', 'enemy05', 'enemy03', 'enemy05', 'enemy04', 'enemy05', 'enemy04', 'enemy05');
inimigos[15] = new Array('enemy04', 'enemy05', 'enemy06', 'enemy05', 'enemy04', 'enemy05', 'enemy04', 'enemy05', 'enemy04', 'enemy06');
inimigos[16] = new Array('enemy06', 'enemy05', 'enemy06', 'enemy05', 'enemy04', 'enemy05', 'enemy06', 'enemy05', 'enemy04', 'enemy06');
inimigos[17] = new Array('enemy06', 'enemy05', 'enemy06', 'enemy05', 'enemy04', 'enemy06', 'enemy06', 'enemy06', 'enemy04', 'enemy06');
inimigos[18] = new Array('enemy06', 'enemy05', 'enemy07', 'enemy05', 'enemy05', 'enemy06', 'enemy07', 'enemy06', 'enemy05', 'enemy06');
inimigos[19] = new Array('enemy06', 'enemy05', 'enemy07', 'enemy05', 'enemy07', 'enemy06', 'enemy07', 'enemy06', 'enemy07', 'enemy06');
inimigos[20] = new Array('enemy07', 'enemy05', 'enemy07', 'enemy05', 'enemy07', 'enemy06', 'enemy07', 'enemy06', 'enemy07', 'enemy07');
inimigos[21] = new Array('enemy07', 'enemy07', 'enemy07', 'enemy07', 'enemy07', 'enemy06', 'enemy07', 'enemy06', 'enemy07', 'enemy07');
inimigos[22] = new Array('enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy01', 'enemy02', 'enemy03', 'enemy03');
inimigos[23] = new Array('enemy03', 'enemy03', 'enemy04', 'enemy04', 'enemy05', 'enemy05', 'enemy04', 'enemy04', 'enemy05', 'enemy05');
inimigos[24] = new Array('enemy06', 'enemy07', 'enemy06', 'enemy07', 'enemy06', 'enemy07', 'enemy07', 'enemy06', 'enemy07', 'enemy07');
inimigos[25] = new Array('boss');
}
movieClip 186 {
}
movieClip 188 {
}
movieClip 190 {
}
movieClip 192 {
}
movieClip 194 {
}
movieClip 196 {
frame 1 {
stop();
}
}
movieClip 207 {
frame 133 {
stop();
}
}
// unknown tag 88 length 148
movieClip 212 {
}
movieClip 216 {
}
movieClip 220 {
}
movieClip 222 {
}
movieClip 225 {
}
movieClip 228 {
}
movieClip 229 {
}
movieClip 231 {
frame 1 {
stop();
}
}
movieClip 233 {
}
movieClip 237 {
}
movieClip 246 {
}
movieClip 248 {
}
instance ewarn of movieClip 248 {
onClipEvent (load) {
_x = 224.95;
_y = 303;
}
}
instance btn_menu of movieClip 31 btn_blank {
onClipEvent (rollOver) {
gotoAndStop(2);
}
onClipEvent (rollOut) {
gotoAndStop(1);
}
}
instance btn_mute of movieClip 31 btn_blank {
onClipEvent (rollOver) {
gotoAndStop(2);
}
onClipEvent (rollOut) {
gotoAndStop(1);
}
}
movieClip 252 {
}
movieClip 254 {
}
movieClip 255 {
frame 1 {
stop();
}
}
instance a of movieClip 255 {
onClipEvent (release) {
_root.heroi.addAtrib(0);
}
onClipEvent (rollOver) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.dano < 6) {
this.gotoAndStop(3);
}
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
_root.tip.texto.text = 'Power increases the damage made by your bullets.';
_root.tip._visible = true;
}
onClipEvent (rollOut) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.dano < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseDown) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.dano < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseMove) {
if (_root.tip) {
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
if (_root.heroi.atrib.points <= 0 || _root.heroi.atrib.dano >= 6) {
this.useHandCursor = false;
this.gotoAndStop(2);
} else {
this.useHandCursor = true;
if (this._currentframe == 2) {
this.gotoAndStop(1);
}
}
}
}
instance b of movieClip 255 {
onClipEvent (release) {
_root.heroi.addAtrib(1);
}
onClipEvent (rollOver) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.velocidade < 6) {
this.gotoAndStop(3);
}
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
_root.tip.texto.text = 'Move Speed increases your speed.';
_root.tip._visible = true;
}
onClipEvent (rollOut) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.velocidade < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseDown) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.velocidade < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseMove) {
if (_root.tip) {
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
if (_root.heroi.atrib.points <= 0 || _root.heroi.atrib.velocidade >= 6) {
this.useHandCursor = false;
this.gotoAndStop(2);
} else {
this.useHandCursor = true;
if (this._currentframe == 2) {
this.gotoAndStop(1);
}
}
}
}
instance c of movieClip 255 {
onClipEvent (release) {
_root.heroi.addAtrib(2);
}
onClipEvent (rollOver) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.recarregar < 6) {
this.gotoAndStop(3);
}
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
_root.tip.texto.text = 'Rate of Fire decreases the time of reload.';
_root.tip._visible = true;
}
onClipEvent (rollOut) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.recarregar < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseDown) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.recarregar < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseMove) {
if (_root.tip) {
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
if (_root.heroi.atrib.points <= 0 || _root.heroi.atrib.recarregar >= 6) {
this.useHandCursor = false;
this.gotoAndStop(2);
} else {
this.useHandCursor = true;
if (this._currentframe == 2) {
this.gotoAndStop(1);
}
}
}
}
instance d of movieClip 255 {
onClipEvent (release) {
_root.heroi.addAtrib(3);
}
onClipEvent (rollOver) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.tiroVelocidade < 6) {
this.gotoAndStop(3);
}
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
_root.tip.texto.text = 'Move Speed increases your bullets\' speed.';
_root.tip._visible = true;
}
onClipEvent (rollOut) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.tiroVelocidade < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseDown) {
if (_root.heroi.atrib.points > 0 && _root.heroi.atrib.tiroVelocidade < 6) {
this.gotoAndStop(1);
}
_root.tip._visible = false;
}
onClipEvent (mouseMove) {
if (_root.tip) {
_root.tip._x = _root._xmouse;
_root.tip._y = _root._ymouse;
}
}
onClipEvent (enterFrame) {
if (_root.heroi.atrib.points <= 0 || _root.heroi.atrib.tiroVelocidade >= 6) {
this.useHandCursor = false;
this.gotoAndStop(2);
} else {
this.useHandCursor = true;
if (this._currentframe == 2) {
this.gotoAndStop(1);
}
}
}
}
movieClip 256 {
}
movieClip 259 {
frame 1 {
stop();
_root._quality = 'HIGH';
}
frame 2 {
stop();
_root._quality = 'LOW';
}
}
movieClip 261 {
}
movieClip 262 {
frame 1 {
stop();
}
instance swaper2 of movieClip 259 {
onClipEvent (load) {
teclaq = 1;
}
onClipEvent (enterFrame) {
if (Key.isDown(81)) {
if (teclaq == 1) {
teclaq = 0;
this.play();
}
} else {
teclaq = 1;
}
}
}
}
instance of movieClip 262 {
onClipEvent (load) {
this.swaper2.gotoandStop(2);
}
onClipEvent (release) {
this.swaper2.play();
}
onClipEvent (rollOver) {
gotoAndStop(2);
}
onClipEvent (rollOut) {
gotoAndStop(1);
}
}
movieClip 268 {
frame 1 {
stop();
}
}
instance of movieClip 268 {
onClipEvent (load) {
if (_root.box.dificuldade == 1.3) {
gotoAndStop(1);
}
if (_root.box.dificuldade == 1) {
gotoAndStop(2);
}
if (_root.box.dificuldade == 0.8) {
gotoAndStop(3);
}
}
}
movieClip 272 {
frame 1 {
stop();
}
}
instance btn_mute of movieClip 272 {
onClipEvent (rollOver) {
gotoAndStop(2);
}
onClipEvent (rollOut) {
gotoAndStop(1);
}
onClipEvent (release) {
getURL('http://www.fastgames.com/', '_blank');
}
}
movieClip 274 {
}
movieClip 276 {
frame 1 {
stop();
}
}
instance mouse of movieClip 276 {
onClipEvent (enterFrame) {
_x = _root._xmouse;
_y = _root._ymouse;
this.swapDepths(_root.getNextHighestDepth());
}
}
// unknown tag 88 length 148
frame 8 {
stop();
stopAllSounds();
music_end.start();
_root.destroy = true;
processar();
getAwards();
nivelAtual >= 26 ? 'Boss' : nivelAtual;
btn_back.onRelease = function () {
_root.gotoAndStop(4);
};
btn_submit.onRelease = function () {
_root.gotoAndStop(10);
};
fscore.text = box.pontos;
Mouse.show();
_root.mouse._alpha = 0;
btnMoreGames.onRelease = function () {
getURL('http://www.fastgames.com/', '_blank');
};
}
movieClip 290 {
}
frame 9 {
stop();
stopAllSounds();
music_win.start();
_root.destroy = true;
processar();
getAwards();
btn_back.onRelease = function () {
_root.gotoAndStop(4);
};
fscore.text = box.pontos;
btn_submit.onRelease = function () {
_root.gotoAndStop(10);
};
Mouse.show();
_root.mouse._alpha = 0;
btnMoreGames.onRelease = function () {
getURL('http://www.fastgames.com/', '_blank');
};
}
frame 10 {
var o = {'n': [0, 5, 2, 5, 10, 10, 0, 0, 13, 1, 13, 0, 5, 14, 10, 5], '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': box.pontos});
btn_back.onRelease = function () {
_root.gotoAndStop(5);
};
Mouse.show();
}
frame 11 {
gotoAndStop(3);
}