Combined Code
// unknown tag 88 length 64
movieClip 67 Story21_judul {
frame 101 {
_root.play();
this.removeMovieClip();
}
}
// unknown tag 88 length 64
// unknown tag 88 length 59
movieClip 73 Story5_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 77 Story4_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 81 Story3_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 85 Story2_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 89 Story1_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 102 Popup_newgame {
}
frame 1 {
stop();
fscommand('showmenu', false);
fscommand('allowscale', false);
fscommand('trapallkeys', true);
Stage.scaleMode = 'noScale';
mochi.as2.MochiServices.connect('75d4c466aa61b77a');
_urlStart = _url.indexOf('://') + 3;
_urlEnd = _url.indexOf('/', _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == 'armorgames.com') {
} else {
var CPMStarContentSpotID = '2360Q13D3001E';
System.security.allowDomain('server.cpmstar.com');
preloader_mc.adBox.loadMovie('http://server.cpmstar.com/adviewas2.swf?contentspotid=' + CPMStarContentSpotID);
}
preload = true;
_root.onEnterFrame = function () {
if (preload == true) {
if (persen == 100) {
preloader_mc.play_btn._visible = true;
preloader_mc.play_btn.onRelease = function () {
_root.play();
};
preloader_mc.play_text._visible = true;
preloader_mc.preloader._visible = false;
preload = false;
} else {
preloader_mc.play_btn._visible = false;
preloader_mc.play_text._visible = false;
preloader_mc.preloader._visible = true;
}
now = getBytesLoaded();
tot = getBytesTotal();
persen = Math.round((now / tot) * 100);
preloader_mc.preloader.text = 'game loading ' + now + '/' + tot + ' bytes (' + persen + '%)';
}
};
var rightClick = new ContextMenu();
rightClick.hideBuiltInItems();
_root.menu = rightClick;
}
movieClip 110 {
}
// unknown tag 88 length 59
movieClip 116 {
}
movieClip 117 {
}
movieClip 120 {
}
movieClip 2657 __Packages.mochi.as2.MochiSync {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSync) {
var v1 = function () {
this._syncContainer = {};
};
mochi.as2.MochiSync = v1;
var v2 = v1.prototype;
v2.getProp = function (name) {
return this._syncContainer[name];
};
v2.setProp = function (name, value) {
if (this._syncContainer[name] == value) {
return undefined;
}
this._syncContainer[name] = value;
mochi.as2.MochiServices.send('sync_propUpdate', {'name': name, 'value': value});
};
v2.triggerEvent = function (eventType, args) {
switch (eventType) {
case mochi.as2.MochiSync.SYNC_REQUEST:
mochi.as2.MochiServices.send('sync_syncronize', this._syncContainer);
break;
case mochi.as2.MochiSync.SYNC_PROPERTY:
this._syncContainer[args.name] = args.value;
}
};
v1.SYNC_REQUEST = 'SyncRequest';
v1.SYNC_PROPERTY = 'UpdateProperty';
ASSetPropFlags(mochi.as2.MochiSync.prototype, null, 1);
}
#endinitclip
}
movieClip 2658 __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.8 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 v6 = '_mochiservices_com_' + id;
var v5 = new MovieClipLoader();
var v3 = {};
if (mochi.as2.MochiServices._clip != null) {
return mochi.as2.MochiServices._clip;
}
if (!mochi.as2.MochiServices.__get__isNetworkAvailable()) {
return null;
}
if ((mochi.as2.MochiServices.urlOptions()).servURL) {
mochi.as2.MochiServices._servURL = (mochi.as2.MochiServices.urlOptions()).servURL;
}
var v4 = mochi.as2.MochiServices._servURL + mochi.as2.MochiServices._services;
if ((mochi.as2.MochiServices.urlOptions()).servicesURL) {
v4 = (mochi.as2.MochiServices.urlOptions()).servicesURL;
}
mochi.as2.MochiServices.allowDomains(v4);
mochi.as2.MochiServices._clip = clip.createEmptyMovieClip(v6, 10336, false);
mochi.as2.MochiServices._listenChannelName += Math.floor((new Date()).getTime()) + '_' + Math.floor(Math.random() * 99999);
mochi.as2.MochiServices.listen();
if (v3.waitInterval != null) {
clearInterval(v3.waitInterval);
}
v3.onLoadError = mochi.as2.MochiServices.loadError;
v3.onLoadStart = function (target_mc) {
this.isLoading = true;
};
v3.onLoadComplete = function (target_mc) {
target_mc.MochiServices = mochi.as2.MochiServices;
};
v3.startTime = getTimer();
v3.wait = function () {
if (getTimer() - this.startTime > 10000) {
if (!this.isLoading) {
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
}
clearInterval(this.waitInterval);
}
};
v3.waitInterval = setInterval(v3, 'wait', 1000);
v5.addListener(v3);
v5.loadClip(v4 + '?listenLC=' + mochi.as2.MochiServices._listenChannelName + '&mochiad_options=' + escape(_root.mochiad_options) + '&api_version=' + mochi.as2.MochiServices.getVersion(), mochi.as2.MochiServices._clip);
mochi.as2.MochiServices._sendChannel = new LocalConnection();
mochi.as2.MochiServices._sendChannel._queue = [];
return mochi.as2.MochiServices._clip;
};
v1.loadError = function (target_mc, errorCode, httpStatus) {
trace('MochiServices could not load.');
mochi.as2.MochiServices.disconnect();
mochi.as2.MochiServices.onError.apply(null, [errorCode]);
};
v1.onStatus = function (infoObject) {
if (infoObject.level !== 'error') {
} else {
mochi.as2.MochiServices._connected = false;
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
}
};
v1.listen = function () {
mochi.as2.MochiServices._listenChannel = new LocalConnection();
mochi.as2.MochiServices._listenChannel.handshake = function (args) {
mochi.as2.MochiServices.__set__comChannelName(args.newChannel);
};
mochi.as2.MochiServices._listenChannel.allowDomain = function (d) {
return true;
};
mochi.as2.MochiServices._listenChannel.allowInsecureDomain = mochi.as2.MochiServices._listenChannel.allowDomain;
mochi.as2.MochiServices._listenChannel._nextcallbackID = 0;
mochi.as2.MochiServices._listenChannel._callbacks = {};
mochi.as2.MochiServices._listenChannel.connect(mochi.as2.MochiServices._listenChannelName);
trace('Waiting for MochiAds services to connect...');
};
v1.initComChannels = function () {
if (!mochi.as2.MochiServices._connected) {
mochi.as2.MochiServices._sendChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'handshakeDone'});
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', {'methodName': 'registerGame', 'id': mochi.as2.MochiServices._id, 'version': mochi.as2.MochiServices.getVersion()});
mochi.as2.MochiServices._listenChannel.onStatus = function (infoObject) {
mochi.as2.MochiServices.onStatus(infoObject);
};
mochi.as2.MochiServices._listenChannel.onReceive = function (pkg) {
var v5 = pkg.callbackID;
var v4 = this._callbacks[v5];
if (!v4) {
return undefined;
}
var v2 = v4.callbackMethod;
var v3 = v4.callbackObject;
if (v3 && typeof v2 == 'string') {
v2 = v3[v2];
}
if (v2 != undefined) {
v2.apply(v3, pkg.args);
}
delete this._callbacks[v5];
};
mochi.as2.MochiServices._listenChannel.onEvent = function (pkg) {
switch (pkg.target) {
case 'events':
mochi.as2.MochiEvents.triggerEvent(pkg.event, pkg.args);
break;
case 'coins':
mochi.as2.MochiSocial.triggerEvent(pkg.event, pkg.args);
break;
case 'sync':
mochi.as2.MochiServices.servicesSync.triggerEvent(pkg.event, pkg.args);
}
};
mochi.as2.MochiServices._listenChannel.onError = function () {
mochi.as2.MochiServices.onError.apply(null, ['IOError']);
};
trace('[SERVICES_API] connected!');
mochi.as2.MochiServices._connecting = false;
mochi.as2.MochiServices._connected = true;
while (mochi.as2.MochiServices._sendChannel._queue.length > 0) {
mochi.as2.MochiServices._sendChannel.send(mochi.as2.MochiServices._sendChannelName, 'onReceive', mochi.as2.MochiServices._sendChannel._queue.shift());
}
}
};
v1.updateCopy = function (args) {
mochi.as2.MochiServices.send('coins_updateCopy', args, null, null);
};
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) {
trace('Error: MochiServices not connected. Please call MochiServices.connect(). Function: ' + methodName);
mochi.as2.MochiServices.handleError(args, callbackObject, callbackMethod);
mochi.as2.MochiServices.flush(true);
return undefined;
} else {
mochi.as2.MochiServices._sendChannel._queue.push({'methodName': methodName, 'args': args, 'callbackID': mochi.as2.MochiServices._listenChannel._nextcallbackID});
}
}
mochi.as2.MochiServices._listenChannel._callbacks[mochi.as2.MochiServices._listenChannel._nextcallbackID] = {'callbackObject': callbackObject, 'callbackMethod': callbackMethod};
++mochi.as2.MochiServices._listenChannel._nextcallbackID;
};
v1.urlOptions = function () {
var v5 = {};
var v6;
if (_root._url.indexOf('mochiad_options') != -1) {
var v2 = _root._url.indexOf('mochiad_options') + 'mochiad_options'.length + 1;
v6 = _root._url.substr(v2, _root._url.length);
} else {
if (_root.mochiad_options) {
v6 = _root.mochiad_options;
}
}
if (v6) {
var v4 = _root.mochiad_options.split('&');
var v2 = 0;
while (v2 < v4.length) {
var v3 = v4[v2].split('=');
v5[unescape(v3[0])] = unescape(v3[1]);
++v2;
}
}
return v5;
};
v1.warnID = function (bid, leaderboard) {
bid = bid.toLowerCase();
if (bid.length != 16) {
trace('WARNING: ' + (leaderboard ? 'board' : 'game') + ' ID is not the appropriate length');
return undefined;
} else {
if (bid == '1e113c7239048b3f') {
if (leaderboard) {
trace('WARNING: Using testing board ID');
} else {
trace('WARNING: Using testing board ID as game ID');
}
return undefined;
} else {
if (bid == '84993a1de4031cd8') {
if (leaderboard) {
trace('WARNING: Using testing game ID as board ID');
} else {
trace('WARNING: Using testing game ID');
}
return undefined;
}
}
}
var v1 = 0;
while (v1 < bid.length) {
switch (bid.charAt(v1)) {
if (bid.charAt(v1) !== 'f') {
} else {
case '0':
case '1':
case '2':
case '3':
case '4':
case '5':
case '6':
case '7':
case '8':
case '9':
case 'a':
case 'b':
case 'c':
break;
case 'd':
case 'e':
}
default:
trace('WARNING: Board ID contains illegal characters: ' + bid);
return undefined;
}
++v1;
}
};
v1.addLinkEvent = function (url, burl, btn, onClick) {
var timeout = 1500;
var t0 = getTimer();
var v2 = new Object();
v2.mav = mochi.as2.MochiServices.getVersion();
v2.swfv = btn.getSWFVersion() || 6;
v2.swfurl = btn._url;
v2.fv = System.capabilities.version;
v2.os = System.capabilities.os;
v2.lang = System.capabilities.language;
v2.scres = System.capabilities.screenResolutionX + 'x' + System.capabilities.screenResolutionY;
var s = '?';
var v3 = 0;
for (var v6 in v2) {
if (v3 != 0) {
s += '&';
}
++v3;
s = s + v6 + '=' + escape(v2[v6]);
}
if (!(mochi.as2.MochiServices.netupAttempted || mochi.as2.MochiServices._connected)) {
var ping = btn.createEmptyMovieClip('ping', 777);
var v7 = btn.createEmptyMovieClip('nettest', 778);
mochi.as2.MochiServices.netupAttempted = true;
ping.loadMovie('http://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.setContainer = function (clip) {};
v1.stayOnTop = function (clip) {};
v1._servURL = 'http://www.mochiads.com/static/lib/services/';
v1._services = 'services.swf';
v1._mochiLC = 'MochiLC.swf';
v1._listenChannelName = '__ms_';
v1._connecting = false;
v1._connected = false;
v1.netup = true;
v1.netupAttempted = false;
v1.servicesSync = new mochi.as2.MochiSync();
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 2659 __Packages.mochi.as2.MochiEventDispatcher {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEventDispatcher) {
var v1 = function () {
this.eventTable = {};
};
mochi.as2.MochiEventDispatcher = v1;
var v2 = v1.prototype;
v2.buildDelegate = function (thisObject, thatObject) {
var v2 = {'thisObject': thisObject, 'thatObject': thatObject};
if (thatObject != undefined) {
var funct = (typeof thatObject == 'string') ? thisObject[thatObject] : thatObject;
v2.delegate = function (args) {
funct.call(thisObject, args);
};
return v2;
}
v2.delegate = thisObject;
return v2;
};
v2.compareDelegate = function (d_A, d_B) {
if (d_A.thisObject != d_B.thisObject || d_A.thatObject != d_B.thatObject) {
return false;
}
return true;
};
v2.addEventListener = function (event, thisObject, thatObject) {
this.removeEventListener(event, thisObject, thatObject);
this.eventTable[event].push(this.buildDelegate(thisObject, thatObject));
};
v2.removeEventListener = function (event, thisObject, thatObject) {
var v3 = this.buildDelegate(thisObject, thatObject);
if (this.eventTable[event] == undefined) {
this.eventTable[event] = [];
return undefined;
}
for (var v4 in this.eventTable[event]) {
if (!this.compareDelegate(this.eventTable[event][v4], v3)) {
continue;
}
this.eventTable[event].splice(Number(v4), 1);
}
};
v2.triggerEvent = function (event, args) {
if (this.eventTable[event] == undefined) {
return undefined;
}
for (var v4 in this.eventTable[event]) {
this.eventTable[event][v4].delegate(args);
}
};
ASSetPropFlags(mochi.as2.MochiEventDispatcher.prototype, null, 1);
}
#endinitclip
}
movieClip 2660 __Packages.mochi.as2.MochiEvents {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiEvents) {
var v1 = function () {};
mochi.as2.MochiEvents = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.startSession = function (achievementID) {
mochi.as2.MochiServices.send('events_beginSession', {'achievementID': achievementID}, null, null);
};
v1.setNotifications = function (clip, style) {
var v2 = {};
for (var v3 in style) {
v2[v3] = style[v3];
}
v2.clip = clip;
mochi.as2.MochiServices.send('events_setNotifications', v2, null, null);
};
v1.addEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.addEventListener(eventType, thisObject, thatObject);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiEvents._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, thisObject, thatObject) {
mochi.as2.MochiEvents._dispatcher.removeEventListener(eventType, thisObject, thatObject);
};
v1.startPlay = function (tag) {
if (tag == undefined) {
tag = 'gameplay';
}
mochi.as2.MochiServices.send('events_setRoundID', {'tag': String(tag)}, null, null);
};
v1.endPlay = function () {
mochi.as2.MochiServices.send('events_clearRoundID', null, null, null);
};
v1.trackEvent = function (tag, value) {
mochi.as2.MochiServices.send('events_trackEvent', {'tag': tag, 'value': value}, null, null);
};
v1.ACHIEVEMENT_RECEIVED = 'AchievementReceived';
v1.ALIGN_TOP_LEFT = 'ALIGN_TL';
v1.ALIGN_TOP = 'ALIGN_T';
v1.ALIGN_TOP_RIGHT = 'ALIGN_TR';
v1.ALIGN_LEFT = 'ALIGN_L';
v1.ALIGN_CENTER = 'ALIGN_C';
v1.ALIGN_RIGHT = 'ALIGN_R';
v1.ALIGN_BOTTOM_LEFT = 'ALIGN_BL';
v1.ALIGN_BOTTOM = 'ALIGN_B';
v1.ALIGN_BOTTOM_RIGHT = 'ALIGN_BR';
v1.FORMAT_SHORT = 'ShortForm';
v1.FORMAT_LONG = 'LongForm';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiEvents.prototype, null, 1);
}
#endinitclip
}
movieClip 2661 __Packages.mochi.as2.MochiSocial {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiSocial) {
var v1 = function () {};
mochi.as2.MochiSocial = v1;
var v2 = v1.prototype;
v1.getVersion = function () {
return mochi.as2.MochiServices.getVersion();
};
v1.showLoginWidget = function (options) {
mochi.as2.MochiServices.setContainer();
mochi.as2.MochiServices.stayOnTop();
mochi.as2.MochiServices.send('coins_showLoginWidget', {'options': options});
};
v1.hideLoginWidget = function () {
mochi.as2.MochiServices.send('coins_hideLoginWidget');
};
v1.requestLogin = function () {
mochi.as2.MochiServices.send('coins_requestLogin');
};
v1.getUserInfo = function () {
mochi.as2.MochiServices.send('coins_getUserInfo');
};
v1.saveUserProperties = function (properties) {
mochi.as2.MochiServices.send('coins_saveUserProperties', properties);
};
v1.addEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.addEventListener(eventType, delegate);
};
v1.triggerEvent = function (eventType, args) {
mochi.as2.MochiSocial._dispatcher.triggerEvent(eventType, args);
};
v1.removeEventListener = function (eventType, delegate) {
mochi.as2.MochiSocial._dispatcher.removeEventListener(eventType, delegate);
};
v1.LOGGED_IN = 'LoggedIn';
v1.LOGGED_OUT = 'LoggedOut';
v1.LOGIN_SHOW = 'LoginShow';
v1.LOGIN_HIDE = 'LoginHide';
v1.LOGIN_SHOWN = 'LoginShown';
v1.PROFILE_SHOW = 'ProfileShow';
v1.PROFILE_HIDE = 'ProfileHide';
v1.PROPERTIES_SAVED = 'PropertySaved';
v1.WIDGET_LOADED = 'WidgetLoaded';
v1.USER_INFO = 'UserInfo';
v1.ERROR = 'Error';
v1.IO_ERROR = 'IOError';
v1.NO_USER = 'NoUser';
v1.PROPERTIES_SIZE = 'PropertiesSize';
v1._dispatcher = new mochi.as2.MochiEventDispatcher();
ASSetPropFlags(mochi.as2.MochiSocial.prototype, null, 1);
}
#endinitclip
}
movieClip 2662 __Packages.mochi.as2.MochiScores {
#initclip
if (!_global.mochi) {
_global.mochi = new Object();
}
if (!_global.mochi.as2) {
_global.mochi.as2 = new Object();
}
if (!_global.mochi.as2.MochiScores) {
var v1 = function () {};
mochi.as2.MochiScores = v1;
var v2 = v1.prototype;
v1.setBoardID = function (boardID) {
mochi.as2.MochiServices.warnID(boardID, true);
mochi.as2.MochiScores.boardID = boardID;
mochi.as2.MochiServices.send('scores_setBoardID', {'boardID': boardID});
};
v1.showLeaderboard = function (options) {
options.clip = mochi.as2.MochiServices.clip;
if (options.clip != mochi.as2.MochiServices.__get__clip() || (mochi.as2.MochiServices.__get__childClip())._target == undefined) {
mochi.as2.MochiServices.disconnect();
trace('WARNING! This application is attempting to connect to MochiServices inside a showLeaderboard call!');
trace('make sure MochiServices.connect is called as early in the application runtime as possible.');
mochi.as2.MochiServices.connect(mochi.as2.MochiServices.__get__id(), options.clip);
}
delete options.clip;
if (options.name != null) {
if (typeof options.name == 'object') {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (options.score instanceof TextField) {
if (options.score.text != undefined) {
options.score = options.score.text;
}
} else {
if (options.score instanceof mochi.as2.MochiDigits) {
options.score = options.score.value;
}
}
var v1 = Number(options.score);
if (isNaN(v1)) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is \'Not a Number\'');
} else {
if (v1 == Number.NEGATIVE_INFINITY || v1 == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + options.score + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(v1) != v1) {
trace('WARNING: Submitted score \'' + options.score + '\' will be truncated');
}
options.score = v1;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
(mochi.as2.MochiServices.__get__clip()).stop();
}
if (options.onClose != null) {
mochi.as2.MochiScores.onClose = options.onClose;
} else {
mochi.as2.MochiScores.onClose = function () {
(mochi.as2.MochiServices.__get__clip()).play();
};
}
if (options.onError != null) {
mochi.as2.MochiScores.onError = options.onError;
} else {
mochi.as2.MochiScores.onError = mochi.as2.MochiScores.onClose;
}
if (options.boardID == null) {
if (mochi.as2.MochiScores.boardID != null) {
options.boardID = mochi.as2.MochiScores.boardID;
}
}
mochi.as2.MochiServices.warnID(options.boardID, true);
trace('[MochiScores] NOTE: Security Sandbox Violation errors below are normal');
mochi.as2.MochiServices.send('scores_showLeaderboard', {'options': options}, null, mochi.as2.MochiScores.doClose);
};
v1.closeLeaderboard = function () {
mochi.as2.MochiServices.send('scores_closeLeaderboard');
};
v1.getPlayerInfo = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_getPlayerInfo', null, callbackObj, callbackMethod);
};
v1.submit = function (score, name, callbackObj, callbackMethod) {
score = Number(score);
if (isNaN(score)) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is \'Not a Number\'');
} else {
if (score == Number.NEGATIVE_INFINITY || score == Number.POSITIVE_INFINITY) {
trace('ERROR: Submitted score \'' + String(score) + '\' will be rejected, score is an infinite');
} else {
if (Math.floor(score) != score) {
trace('WARNING: Submitted score \'' + String(score) + '\' will be truncated');
}
score = Number(score);
}
}
mochi.as2.MochiServices.send('scores_submit', {'score': score, 'name': name}, callbackObj, callbackMethod);
};
v1.requestList = function (callbackObj, callbackMethod) {
mochi.as2.MochiServices.send('scores_requestList', null, callbackObj, callbackMethod);
};
v1.scoresArrayToObjects = function (scores) {
var v5 = {};
var v1;
var v4;
var v2;
var v6;
for (var v8 in scores) {
if (typeof scores[v8] == 'object') {
if (scores[v8].cols != null && scores[v8].rows != null) {
v5[v8] = [];
v2 = scores[v8];
v4 = 0;
while (v4 < v2.rows.length) {
v6 = {};
v1 = 0;
while (v1 < v2.cols.length) {
v6[v2.cols[v1]] = v2.rows[v4][v1];
++v1;
}
v5[v8].push(v6);
++v4;
}
} else {
v5[v8] = {};
for (var v7 in scores[v8]) {
v5[v8][v7] = scores[v8][v7];
}
}
} else {
v5[v8] = scores[v8];
}
}
return v5;
};
v1.doClose = function (args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = 'IOError';
}
mochi.as2.MochiScores.onError.apply(null, [args.errorCode]);
} else {
mochi.as2.MochiScores.onClose.apply();
}
};
ASSetPropFlags(mochi.as2.MochiScores.prototype, null, 1);
}
#endinitclip
}
movieClip 2663 __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 {
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();
removeMovieClip(adBox);
adBox.removeMovieClip();
removeMovieClip(preloader_mc.adBox);
preloader_mc.adBox.removeMovieClip();
fscommand('showmenu', false);
fscommand('allowscale', false);
fscommand('trapallkeys', true);
var rightClick = new ContextMenu();
rightClick.hideBuiltInItems();
_root.menu = rightClick;
__com_mochibot__('be06450c', this, 10301, true);
_urlStart = _url.indexOf('://') + 3;
_urlEnd = _url.indexOf('/', _urlStart);
domain = _url.substring(_urlStart, _urlEnd);
LastDot = domain.lastIndexOf('.') - 1;
domEnd = domain.lastIndexOf('.', LastDot) + 1;
domain = domain.substring(domEnd, domain.length);
if (domain == 'funevergames.com' || domain == 'ludobox.com') {
gotoAndStop('logo');
} else {
stop();
gotoAndStop('logo');
}
domain_teks.text = urlString;
}
// unknown tag 88 length 63
frame 3 {
gotoAndStop(_currentframe - 1);
}
movieClip 127 BG_Back11 {
}
movieClip 130 BG_Castle11 {
}
movieClip 133 BG_Front11 {
}
movieClip 136 BG1b_11 {
}
movieClip 137 BG_Back6 {
}
movieClip 140 BG_Back1 {
}
movieClip 143 BG_Back2 {
}
movieClip 146 BG_Back3 {
}
movieClip 147 BG_Back4 {
}
movieClip 148 BG_Back5 {
}
movieClip 149 BG_Back10 {
}
movieClip 150 BG_Back21 {
}
movieClip 151 BG_Back22 {
}
movieClip 154 mymask {
}
movieClip 159 Arrow {
}
movieClip 162 BG_Front1 {
}
movieClip 165 BG1b_2 {
}
movieClip 168 BG_Castle1 {
}
movieClip 170 Fireball {
}
movieClip 172 Fireball2 {
}
movieClip 173 Fireball3 {
}
movieClip 182 {
}
movieClip 196 {
}
movieClip 197 {
}
movieClip 210 {
}
movieClip 211 {
}
movieClip 224 {
}
movieClip 225 {
}
movieClip 238 {
}
movieClip 249 {
frame 7 {
stop();
_parent.gotoAndStop(1);
}
}
movieClip 256 {
frame 7 {
stop();
}
}
movieClip 267 {
frame 15 {
stop();
}
}
movieClip 270 {
frame 4 {
stop();
}
}
movieClip 273 {
}
movieClip 276 {
}
movieClip 289 {
}
movieClip 300 {
frame 1 {
this._alpha = 0;
}
}
movieClip 304 {
frame 2 {
_root.ready = false;
}
frame 7 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 16 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 16 {
_parent.gotoAndStop(1);
}
}
movieClip 314 {
frame 1 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 2;
}
frame 2 {
_root.ready = false;
}
frame 3 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 11 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 11 {
_parent.gotoAndStop(1);
}
}
movieClip 323 {
frame 1 {
_root.speed = 3 * (this._parent._xscale / 100);
}
frame 2 {
_root.ready = false;
}
frame 6 {
_root.soundFX('WHIP');
}
frame 8 {
_root.speed = 0;
}
frame 21 {
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 21 {
_parent.gotoAndStop(1);
}
}
movieClip 336 {
frame 1 {
_root.ready = false;
}
frame 8 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 17 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 17 {
_parent.gotoAndStop(1);
}
}
movieClip 353 {
frame 1 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 2;
}
frame 2 {
_root.ready = false;
}
frame 10 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 19 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 19 {
_parent.gotoAndStop(1);
}
}
movieClip 366 {
frame 1 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 2;
}
frame 9 {
_root.ready = false;
}
frame 10 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 21 {
_root.speed = 0;
if (_root.pressedHit) {
play();
} else {
_root.isHit = false;
}
_root.energy -= _root.attack / 4;
}
frame 21 {
_parent.gotoAndStop(1);
}
}
movieClip 379 {
frame 1 {
_root.energy -= _root.attack / 2;
}
frame 15 {
stop();
_root.jumpAttack = false;
}
}
movieClip 399 {
frame 1 {
_root.ready = false;
_root.energy -= _root.attack * 2;
}
frame 7 {
_root.speed = 3 * (this._parent._xscale / 100);
_root.soundFX('WHIP');
}
frame 19 {
_parent.gotoAndStop(1);
}
}
movieClip 409 {
}
movieClip 419 {
frame 1 {
_root.ready = false;
_root.energy -= _root.attack * 3;
}
frame 27 {
stop();
_parent.gotoAndStop(1);
}
}
movieClip 436 {
frame 2 {
_root.ready = false;
_root.isDefensePosition = true;
}
frame 15 {
_root.isDefensePosition = false;
}
frame 17 {
_parent.gotoAndStop(1);
}
}
movieClip 461 {
frame 2 {
_root.ready = false;
_root.isDefensePosition = true;
}
frame 17 {
_root.isDefensePosition = false;
}
frame 19 {
_parent.gotoAndStop(1);
}
}
movieClip 476 {
frame 1 {
_root.soundFX('woman_get' + (1 + random(6)));
}
frame 18 {
++_root.ceweGet;
if (_root.ceweGet >= 25) {
_root.newAchievement(16);
}
_root.score += 300;
_root.scoreGetEffect(300);
}
frame 19 {
_root.isGrabbingCewe = false;
this._parent.gotoAndStop('idle');
}
}
movieClip 481 {
frame 1 {
_root.slotBarrel = true;
}
frame 3 {
stop();
_root.slotBarrel = true;
}
}
movieClip 494 {
}
movieClip 503 {
frame 1 {
_root.isGrabbingCewe = false;
}
frame 9 {
_root.throwBarrel(20);
_root.slotBarrel = false;
_parent.gotoAndStop(1);
}
}
movieClip 526 {
}
movieClip 548 {
frame 35 {
if (_root.tornadoTimer > 0) {
gotoAndPlay('ulang');
} else {
play();
}
}
frame 58 {
_root.tornadoMode = false;
_parent.gotoAndStop(1);
}
}
movieClip 561 {
}
movieClip 566 {
}
movieClip 567 {
}
movieClip 575 {
}
movieClip 578 {
frame 7 {
stop();
}
frame 8 {
_root.soundFX('catch' + (1 + random(6)));
}
frame 9 {
victim_mc.gotoAndStop(_root.grabSlot);
}
frame 12 {
victim_mc.gotoAndStop(_root.grabSlot);
}
frame 18 {
_root.throwEnemy(_root.grabSlot);
_root.grabSlot = false;
}
frame 19 {
_root.grabSlot = false;
}
}
movieClip 595 {
frame 101 {
stop();
if (_root.scene == 10 || _root.scene == 11) {
_root.gotoAndStop('summary');
trace('jalan');
} else {
_root.gotoAndStop('gameover');
}
}
}
movieClip 596 Hero {
frame 1 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
_root.isDefensePosition = false;
_root.slotBarrel = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 6 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 11 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 16 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 21 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 26 {
_root.soundFX('HIT');
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 36 {
_root.ready = true;
}
frame 41 {
_root.isFlying = false;
}
frame 46 {
_root.ready = true;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 51 {
_root.ready = true;
_root.isHit = false;
_root.isDefense = false;
_root.isDefensePosition = false;
if (_root.isGrabbingCewe) {
_root.summonMusuhHeroPos(12);
_root.isGrabbingCewe = false;
}
}
frame 116 {
_root.isGrabbingCewe = true;
}
frame 121 {
_root.isGrabbingCewe = true;
}
}
// unknown tag 88 length 115
movieClip 605 {
}
movieClip 606 {
}
movieClip 608 {
}
movieClip 609 {
}
movieClip 613 {
}
movieClip 616 {
}
movieClip 618 {
}
movieClip 637 {
}
movieClip 638 {
}
movieClip 643 {
}
movieClip 644 {
}
movieClip 645 Interface {
}
movieClip 652 {
}
movieClip 665 {
}
movieClip 702 {
}
movieClip 722 {
frame 45 {
stop();
this._parent.removeMovieClip();
}
}
movieClip 723 Musuh1_1 {
}
movieClip 726 {
}
movieClip 737 {
}
movieClip 754 {
frame 21 {
this._parent.hit = true;
if (!_root.isPaused) {
_root.soundFX('SPEAR');
}
}
frame 23 {
this._parent.hit = false;
}
frame 40 {
this._parent.isAttack = false;
}
}
movieClip 761 {
}
movieClip 781 {
frame 38 {
this._parent.removeMovieClip();
}
}
movieClip 782 Musuh2 {
}
movieClip 785 {
}
movieClip 796 {
}
movieClip 824 {
frame 31 {
if (!_root.isPaused) {
this._parent.shoot();
}
}
frame 70 {
this._parent.isAttack = false;
}
}
movieClip 831 {
}
movieClip 849 {
frame 39 {
this._parent.removeMovieClip();
}
}
movieClip 850 Musuh3 {
}
movieClip 853 {
}
movieClip 856 {
}
movieClip 867 {
}
movieClip 924 {
frame 19 {
this._parent.shoot();
}
frame 66 {
this._parent.isAttack = false;
}
}
movieClip 933 {
}
movieClip 974 {
frame 121 {
stop();
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 975 Musuh4 {
frame 5 {
_root.summonMusuhB(this);
}
}
movieClip 981 {
}
movieClip 992 {
}
movieClip 1010 {
frame 39 {
this._parent.removeMovieClip();
}
}
movieClip 1011 Musuh4b {
}
movieClip 1015 {
}
movieClip 1033 {
frame 36 {
this._parent.shoot();
}
frame 83 {
this._parent.isAttack = false;
}
}
movieClip 1054 {
}
movieClip 1090 {
frame 33 {
this._parent.removeMovieClip();
}
}
movieClip 1091 Musuh5 {
}
movieClip 1102 {
}
movieClip 1103 {
}
movieClip 1112 {
}
movieClip 1117 {
}
movieClip 1127 {
frame 51 {
this._parent.shoot();
}
frame 68 {
this._parent.isAttack = false;
}
}
movieClip 1134 {
frame 6 {
_parent.gotoAndStop('idle');
}
}
movieClip 1162 {
frame 48 {
this._parent.removeMovieClip();
}
}
movieClip 1163 Musuh6 {
}
movieClip 1166 Particle1 {
frame 7 {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1169 {
}
movieClip 1170 Particle2 {
frame 16 {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1172 Retakan1 {
}
movieClip 1175 SerpihanA1 {
}
movieClip 1181 Smoke {
frame 1 {
_root.soundFX('poff');
}
frame 9 {
stop();
this.removeMovieClip();
}
}
movieClip 1184 Smoke_FX {
}
movieClip 1200 smokeFX {
frame 16 {
this.removeMovieClip();
}
}
movieClip 1202 Victim1 {
}
movieClip 1205 Fade {
frame 32 {
this.removeMovieClip();
}
}
movieClip 1208 Particle_hero1 {
frame 12 {
removeMovieClip(this);
}
}
movieClip 1211 Particle_hero2 {
frame 12 {
removeMovieClip(this);
}
}
movieClip 1216 {
}
// unknown tag 88 length 57
movieClip 1265 Story1 {
frame 848 {
stop();
_root.play();
}
}
movieClip 1268 {
}
movieClip 1277 {
}
movieClip 1280 {
}
movieClip 1305 {
frame 4 {
this._parent.hit = true;
if (!_root.isPaused) {
_root.soundFX('SPEAR');
}
}
frame 5 {
this._parent.hit = false;
}
frame 18 {
this._parent.isAttack = false;
this._parent.idleTime = 200;
_root.soundFX('ha-ha-ha');
}
}
movieClip 1314 {
}
movieClip 1332 {
frame 32 {
this._parent.removeMovieClip();
}
}
movieClip 1333 Musuh8 {
}
movieClip 1336 Flash {
frame 6 {
stop();
this.removeMovieClip();
}
}
movieClip 1360 Story2 {
frame 348 {
stop();
_root.play();
}
}
movieClip 1377 {
}
movieClip 1379 {
}
movieClip 1381 {
}
movieClip 1383 {
}
movieClip 1387 Story3 {
frame 323 {
stop();
_root.play();
}
}
movieClip 1391 {
}
movieClip 1405 {
}
movieClip 1407 {
}
movieClip 1409 {
}
movieClip 1411 {
}
movieClip 1413 {
}
movieClip 1415 {
}
movieClip 1424 Story4 {
frame 292 {
stop();
_root.play();
}
}
movieClip 1452 Story5 {
frame 408 {
stop();
_root.play();
}
}
movieClip 1460 Ledakan {
frame 11 {
this.removeMovieClip();
}
}
movieClip 1467 Benda1 {
}
movieClip 1482 {
}
movieClip 1483 Pause {
}
movieClip 1486 {
}
movieClip 1487 Bonus1 {
}
movieClip 1489 {
}
movieClip 1490 Bonus2 {
}
movieClip 1493 {
}
movieClip 1494 Achievement {
frame 147 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1503 {
}
movieClip 1512 {
}
movieClip 1525 {
}
movieClip 1528 {
}
movieClip 1535 {
}
movieClip 1539 {
frame 41 {
stop();
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1540 Musuh11 {
}
movieClip 1549 {
}
movieClip 1552 {
}
movieClip 1555 {
}
movieClip 1558 {
}
movieClip 1561 {
}
movieClip 1562 {
frame 29 {
this._parent.hit = true;
if (!_root.isPaused) {
_root.soundFX('BAT');
}
}
frame 30 {
this._parent.hit = false;
}
frame 60 {
this._parent.isAttack = false;
}
}
movieClip 1569 {
}
movieClip 1573 {
frame 41 {
stop();
delete _parent.onEnterFrame;
_parent.removeMovieClip();
}
}
movieClip 1574 Musuh7 {
}
movieClip 1578 {
}
movieClip 1603 Story6 {
frame 468 {
stop();
_root.play();
}
}
movieClip 1606 SerpihanA2 {
}
movieClip 1609 SerpihanA3 {
}
movieClip 1612 Barrel_part1 {
}
movieClip 1615 Barrel_part2 {
}
movieClip 1618 Barrel_part3 {
}
movieClip 1621 Barrel_part4 {
}
movieClip 1624 Barrel_part5 {
}
movieClip 1626 SerpihanA4 {
}
movieClip 1628 SerpihanA5 {
}
movieClip 1629 Barrel_thrown {
}
movieClip 1631 Bonus3 {
}
movieClip 1660 {
}
movieClip 1669 {
}
movieClip 1686 {
frame 36 {
stop();
this._parent.removeMovieClip();
}
}
movieClip 1687 Musuh12 {
}
movieClip 1700 {
}
movieClip 1709 {
}
movieClip 1716 {
frame 12 {
this._parent.hit = true;
if (!_root.isPaused) {
_root.soundFX('KISS' + (1 + random(3)));
}
}
frame 14 {
this._parent.hit = false;
}
frame 41 {
this._parent.isAttack = false;
}
}
movieClip 1725 {
}
movieClip 1726 Musuh13 {
}
movieClip 1728 {
}
movieClip 1729 Interface_Objective {
frame 251 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1731 Victim2 {
}
movieClip 1732 Victim3 {
}
movieClip 1734 {
}
movieClip 1735 Interface_scoreGet {
frame 56 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1737 {
}
movieClip 1738 Interface_combo {
frame 71 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1739 BG1b_1 {
}
movieClip 1742 BG1b_3 {
}
movieClip 1745 BG1b_4 {
}
movieClip 1746 BG1b_5 {
}
movieClip 1747 BG1b_10 {
}
movieClip 1748 BG1b_22 {
}
movieClip 1749 BG1b_21 {
}
movieClip 1751 Bonus4 {
}
movieClip 1753 {
}
movieClip 1754 Interface_bonus {
frame 102 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1771 {
frame 1 {
stop();
}
}
movieClip 1772 Interface_comboEfek {
frame 86 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 1773 BG_Front2 {
}
movieClip 1774 BG_Front3 {
}
movieClip 1775 BG_Front4 {
}
movieClip 1776 BG_Front5 {
}
movieClip 1777 BG_Front10 {
}
movieClip 1778 BG_Front21 {
}
movieClip 1779 BG_Front22 {
}
movieClip 1782 BG_Castle2 {
}
movieClip 1783 BG_Castle3 {
}
movieClip 1784 BG_Castle4 {
}
movieClip 1787 BG_Castle5 {
}
movieClip 1788 BG_Castle10 {
}
movieClip 1789 BG_Castle21 {
}
movieClip 1790 BG_Castle22 {
}
movieClip 1794 Story6_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 1795 BG1b_6 {
}
movieClip 1796 BG_Front6 {
}
movieClip 1797 BG_Castle6 {
}
movieClip 1804 {
}
movieClip 1807 {
}
movieClip 1810 {
}
movieClip 1811 {
frame 20 {
this._parent.shoot();
}
frame 36 {
this._parent.isAttack = false;
}
}
movieClip 1814 {
frame 7 {
_parent.kabur();
}
}
movieClip 1829 {
frame 76 {
stop();
_root.winEffect('Stage Completed!');
}
}
movieClip 1830 Musuh9 {
}
movieClip 1888 Story7 {
frame 821 {
stop();
_root.skip_btn._visible = 0;
play_btn.onRelease = function () {
_root.soundBGM('opening song');
_root.gotoAndStop('menu');
};
logo_btn.onRelease = function () {
getURL('http://www.ludobox.com/', '_blank');
};
scoreTeks.text = _root.score;
submit_btn.onRelease = function () {
_root.gotoAndStop('submitEnd');
};
}
}
movieClip 1890 Gembok {
}
movieClip 1894 Story7_judul {
frame 101 {
_root.attachMovie('Story' + _root.scene, 'story', 1);
this.removeMovieClip();
}
}
movieClip 1899 {
}
movieClip 1912 {
}
movieClip 1917 {
}
movieClip 1954 {
}
movieClip 1974 {
frame 45 {
stop();
this._parent.removeMovieClip();
}
}
movieClip 1975 Musuh1_2 {
}
movieClip 1980 {
}
movieClip 1993 {
}
movieClip 1998 {
}
movieClip 2035 {
}
movieClip 2055 {
frame 45 {
stop();
this._parent.removeMovieClip();
}
}
movieClip 2056 Musuh1_3 {
}
movieClip 2060 Particle_api {
frame 12 {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2065 {
}
movieClip 2068 Interface_completed {
frame 21 {
_root.isPaused = true;
}
frame 122 {
stop();
_root.gotoAndStop('summary');
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2076 {
}
movieClip 2077 Interface_panelA {
frame 151 {
stop();
_root.isPanel = false;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2090 {
}
movieClip 2091 Interface_panelB {
frame 151 {
stop();
_root.isPanelB = false;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2101 {
}
movieClip 2116 rage_effect {
}
movieClip 2118 {
}
movieClip 2119 Interface_counter {
frame 120 {
stop();
delete this.onEnterFrame;
this.removeMovieClip();
}
}
movieClip 2121 {
}
movieClip 2126 Gembok_tombol {
}
frame 4 {
stop();
logo_mc.onRelease = function () {
getURL('http://www.ludobox.com/', '_blank');
};
}
movieClip 2140 {
}
movieClip 2147 {
frame 69 {
stop();
}
}
movieClip 2149 {
}
movieClip 2163 {
}
movieClip 2179 {
frame 39 {
stop();
}
}
movieClip 2180 {
frame 100 {
stop();
}
}
movieClip 2191 {
frame 259 {
stop();
_root.play();
}
}
frame 5 {
stop();
logo.onRelease = function () {
getURL('http://funevergames.com/', '_blank');
};
}
movieClip 2238 {
frame 152 {
stop();
_root.play();
}
}
frame 6 {
function soundFX(idSound) {
if (_root.volFX > 0) {
_root.createEmptyMovieClip('slevel1', 7909);
sEffect = new Sound(_root.slevel1);
sEffect.attachSound(idSound);
sEffect.start(0, 0);
sEffect.setVolume(_root.volFX);
}
}
function soundBGM(idSound) {
if (_root.volBGM > 0) {
_root.createEmptyMovieClip('slevel2', 7910);
stopAllSounds();
sBGM = new Sound(_root.slevel2);
sBGM.attachSound(idSound);
sBGM.start(0, 999999);
sBGM.setVolume(_root.volBGM);
}
}
function soundBGM2(idSound) {
if (_root.volBGM > 0) {
_root.createEmptyMovieClip('slevel2', 7910);
stopAllSounds();
sBGM = new Sound(_root.slevel2);
sBGM.attachSound(idSound);
sBGM.start(0, 0);
sBGM.setVolume(_root.volBGM);
}
}
function setVolumeFX(_vol1) {
sEffect.setVolume(_vol1);
_root.volFX = _vol1;
}
function setVolumeBGM(_vol2) {
sBGM.setVolume(_vol2);
_root.volBGM = _vol2;
}
stop();
attachMovie('mymask', 'mymask', 99999);
skip_btn.onRelease = function () {
gotoAndStop('menu');
soundBGM('opening song');
};
var quality = 1;
var volume1 = 1;
var volume2 = 1;
var sceneSave = 0;
var bonusStage1 = false;
var bonusStage2 = false;
var achievementGet = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
var volFX = 100;
var volBGM = 80;
}
movieClip 2243 {
}
movieClip 2256 {
}
movieClip 2285 {
}
movieClip 2287 {
}
movieClip 2289 {
}
movieClip 2291 {
}
movieClip 2293 {
}
movieClip 2295 {
}
movieClip 2297 {
}
movieClip 2299 {
}
movieClip 2301 {
}
movieClip 2330 {
}
movieClip 2339 {
}
movieClip 2344 {
frame 1535 {
stop();
_root.soundBGM('opening song');
_root.play();
}
}
frame 7 {
function newAchievement(num) {
if (achievementGet[num] == 0) {
attachMovie('Achievement', 'achievement_mc', 2001);
achievement_mc._x = 150;
achievement_mc._y = 420;
achievement_mc.teks = achievementList[num];
achievement_mc.onEnterFrame = function () {
this.ach_mc.tulisan.text = this.teks;
this._x = -(_root._x - 150);
};
achievementGet[num] = 1;
}
saveAchievementData();
}
function newGame() {
_root.sceneSave = 1;
_root.saveData();
_root.resetAchievementData();
_root.bonusStage1 = false;
_root.bonusStage2 = false;
_root.gotoAndStop('story');
_root.setAvailableEnemy(_root.musuhAvailable[_root.scene]);
}
function setPopupActive() {
popup_mc._visible = true;
popup_mc.continue_btn.onRelease = function () {
newGame();
};
popup_mc.back_btn.onRelease = function () {
popup_mc._visible = false;
};
popup_mc.cancel_btn.onRelease = popup_mc.back_btn.onRelease;
}
function setAvailableEnemy(_array) {
arrayAvailableEnemy = _array;
for (var v2 in arrayAvailableEnemy) {
_root['timerMusuh' + v2] = timerArray[scene][arrayAvailableEnemy[v2]];
}
}
function runTimer() {
for (var v2 in arrayAvailableEnemy) {
if (_root['timerMusuh' + v2] <= 0) {
summonMusuh(arrayAvailableEnemy[v2]);
_root['timerMusuh' + v2] = timerArray[scene][arrayAvailableEnemy[v2]];
}
--_root['timerMusuh' + v2];
}
if (scene != 22) {
--timerBenda;
if (timerBenda <= 0) {
summonBenda(1);
timerBenda = 400;
}
}
}
function clearTimer() {
for (var v2 in arrayAvailableEnemy) {
delete _root['timerMusuh' + v2];
}
}
function hapusGembok() {
var v2 = 1;
while (v2 <= 6) {
_root['gembok' + v2].removeMovieClip();
++v2;
}
}
function resetData() {
Cookies = SharedObject.getLocal('SuperPlayboy', '/');
delete Cookies.data.sceneSave;
resetAchievementData();
Cookies.flush(10);
}
function saveData() {
Cookies = SharedObject.getLocal('SuperPlayboy', '/');
Cookies.data.sceneSave = sceneSave;
Cookies.flush(10);
}
function cekSavedData() {
Cookies = SharedObject.getLocal('SuperPlayboy', '/');
if (Cookies.data.sceneSave != undefined) {
return true;
} else {
return false;
}
Cookies.flush(10);
}
function loadData() {
Cookies = SharedObject.getLocal('SuperPlayboy', '/');
if (Cookies.data.sceneSave != undefined) {
sceneSave = Cookies.data.sceneSave;
}
Cookies.flush(10);
}
function resetAchievementData() {
Cookies = SharedObject.getLocal('SuperPlayboyAchievement', '/');
delete Cookies.data.achievementGet;
achievementGet = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
Cookies.flush(10);
}
function saveAchievementData() {
Cookies = SharedObject.getLocal('SuperPlayboyAchievement', '/');
Cookies.data.achievementGet = achievementGet;
Cookies.flush(10);
}
function loadAchievementData() {
Cookies = SharedObject.getLocal('SuperPlayboyAchievement', '/');
if (Cookies.data.achievementGet != undefined) {
achievementGet = Cookies.data.achievementGet;
} else {
achievementGet = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
}
Cookies.flush(10);
}
stop();
story.removeMovieClip();
story._visible = false;
skip_btn._visible = false;
attachMovie('mymask', 'mymask', 99999);
var scene = 1;
var lanjut = false;
var isCustomGame = false;
var achievementList = new Array();
achievementList[1] = 'Invasion';
achievementList[2] = 'The Hero';
achievementList[3] = 'Genocide';
achievementList[4] = 'Dragon Rider';
achievementList[5] = 'The One';
achievementList[6] = 'This is Sparta!';
achievementList[7] = 'Epic Dead';
achievementList[8] = 'Chicken';
achievementList[9] = 'Tons Drop!';
achievementList[10] = 'Mission Completed?';
achievementList[11] = 'Superhero';
achievementList[12] = 'God of Playboy';
achievementList[13] = 'Chicken Run!';
achievementList[14] = 'The Visitor';
achievementList[15] = 'Rubber Hero';
achievementList[16] = 'True Playboy';
var achievementDes = new Array();
achievementDes[1] = 'kill 15 civilians';
achievementDes[2] = 'kill 20 spearmen';
achievementDes[3] = 'destroy 10 catapults';
achievementDes[4] = 'destroy 10 baloons';
achievementDes[5] = 'kill 15 wizards';
achievementDes[6] = 'killed by spearmen';
achievementDes[7] = 'killed by an explosion';
achievementDes[8] = 'fly during more than 30 seconds';
achievementDes[9] = 'drop from 25 meters height';
achievementDes[10] = 'finish all levels';
achievementDes[11] = 'survive 5 minutes in Survival Mode';
achievementDes[12] = 'survive 15 minutes in Survival Mode';
achievementDes[13] = 'kill 30 chickens';
achievementDes[14] = 'visit our sponsor';
achievementDes[15] = 'bounce back 25 projectiles';
achievementDes[16] = 'kiss 25 girls';
var score = 0;
_root.attachMovie('Fade', 'fade_mc', 100000);
popup_mc._visible = false;
cover_mc.play_btn.onRelease = function () {
if (cekSavedData()) {
setPopupActive();
} else {
newGame();
}
};
cover_mc.continue_btn.onRelease = function () {
gotoAndStop('scene');
lanjut = true;
};
cover_mc.custom_btn.onRelease = function () {
gotoAndStop('custom');
};
cover_mc.credit_btn.onRelease = function () {
gotoAndStop('credit');
};
cover_mc.highscores_btn.onRelease = function () {
for (var v5 in cover_mc) {
if (cover_mc[v5]._name.substr(-4, 4) == '_btn') {
var v3 = cover_mc[v5];
v3.enabled = false;
}
}
for (var v6 in _root) {
if (_root[v6]._name.substr(-4, 4) == '_btn') {
var v4 = _root[v6];
v4.enabled = false;
}
}
var v7 = {'n': [14, 2, 3, 15, 7, 9, 0, 11, 10, 8, 15, 1, 0, 13, 8, 8], 'f': function (i, s) {
if (s.length == 16) {
return s;
}
return this.f(i + 1, s + this.n[i].toString(16));
}};
var v8 = v7.f(0, 'd6b491d5474ca3e7');
mochi.as2.MochiScores.showLeaderboard({'boardID': v8});
};
cover_mc.achievement_btn.onRelease = function () {
gotoAndStop('achievement');
};
cover_mc.survival_btn.onRelease = function () {
scene = 11;
gotoAndStop('tutorial');
setAvailableEnemy(musuhAvailable[scene]);
};
cover_mc.moregames_btn.onRelease = function () {
newAchievement(14);
getURL('http://www.ludobox.com/', '_blank');
};
logo_btn.onRelease = function () {
newAchievement(14);
getURL('http://www.ludobox.com/', '_blank');
};
copyright_btn.onRelease = function () {
getURL('http://www.funevergames.com/', '_blank');
};
host_btn.onRelease = function () {
getURL('http://www.ludobox.com/free-content.html', '_blank');
};
onEnterFrame = function () {
if (Key.isDown(35)) {
sceneSave = 6;
}
};
var musuhAvailable = new Array();
musuhAvailable[1] = [1];
musuhAvailable[2] = [1, 2, 3];
musuhAvailable[3] = [1, 2, 3, 4, 7];
musuhAvailable[4] = [1, 2, 3, 4, 5, 7, 8];
musuhAvailable[5] = [1, 2, 3, 4, 5, 6, 7, 8];
musuhAvailable[6] = [2, 3, 4, 7, 8];
musuhAvailable[10] = [1, 2, 3, 4, 5, 6, 7, 8];
musuhAvailable[11] = [1, 2, 3, 4, 5, 6, 7, 8];
musuhAvailable[21] = [11];
musuhAvailable[22] = [12, 13];
var timerArray = new Array();
timerArray[1] = [0, 100, 200, 400, 600, 800, 600, 300, 400];
timerArray[2] = [0, 300, 180, 230, 600, 800, 600, 300, 400];
timerArray[3] = [0, 300, 250, 300, 400, 800, 600, 300, 400];
timerArray[4] = [0, 450, 450, 400, 450, 650, 600, 400, 500];
timerArray[5] = [0, 600, 550, 600, 500, 650, 600, 450, 500];
timerArray[6] = [0, 400, 350, 400, 500, 800, 600, 500, 600];
timerArray[10] = [0, 300, 400, 400, 600, 800, 600, 400, 400];
timerArray[11] = [0, 500, 450, 500, 600, 700, 750, 500, 500];
timerArray[21] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 40];
timerArray[22] = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 50, 500];
var arrayAvailableEnemy = new Array();
var timerBenda = 300;
hapusGembok();
loadData();
loadAchievementData();
if (sceneSave < 2) {
cover_mc.continue_btn.enabled = false;
cover_mc.attachMovie('Gembok_tombol', 'gembok99', 99);
cover_mc.gembok99._x = cover_mc.continue_btn._x;
cover_mc.gembok99._y = cover_mc.continue_btn._y;
cover_mc.gembok99.gotoAndStop(1);
cover_mc.gembok99.label_teks.text = 'Continue';
cover_mc.gembok99.onRollOver = function () {
this.gotoAndStop(2);
this.tulisan.text = '= Continue =\nThere is no saved data';
};
cover_mc.gembok99.onRollOut = function () {
this.gotoAndStop(1);
};
}
if (sceneSave <= 6) {
cover_mc.survival_btn.enabled = false;
cover_mc.attachMovie('Gembok_tombol', 'gembok98', 98);
cover_mc.gembok98._x = cover_mc.survival_btn._x;
cover_mc.gembok98._y = cover_mc.survival_btn._y;
cover_mc.gembok98.gotoAndStop(1);
cover_mc.gembok98.label_teks.text = 'Survival';
cover_mc.gembok98.onRollOver = function () {
this.gotoAndStop(2);
this.tulisan.text = '= Survival Mode =\nFinish the game to unlock';
};
cover_mc.gembok98.onRollOut = function () {
this.gotoAndStop(1);
};
cover_mc.custom_btn.enabled = false;
cover_mc.attachMovie('Gembok_tombol', 'gembok97', 97);
cover_mc.gembok97._x = cover_mc.custom_btn._x;
cover_mc.gembok97._y = cover_mc.custom_btn._y;
cover_mc.gembok97.gotoAndStop(1);
cover_mc.gembok97.label_teks.text = 'Custom Game';
cover_mc.gembok97.onRollOver = function () {
this.gotoAndStop(2);
this.tulisan.text = '= Custom Game =\nFinish the game to unlock';
};
cover_mc.gembok97.onRollOut = function () {
this.gotoAndStop(1);
};
}
}
movieClip 2352 {
}
movieClip 2359 {
}
movieClip 2370 {
}
movieClip 2371 {
}
// unknown tag 88 length 59
frame 8 {
gotoAndStop('menu');
}
frame 9 {
stop();
back_btn.onRelease = function () {
gotoAndStop('menu');
};
}
frame 10 {
stop();
judul.text = 'Achievement';
des.text = 'roll-over to view description';
gembok.gotoAndStop(1);
var i = 1;
while (i <= 16) {
_root['ach' + i].gotoAndStop(Number(achievementGet[i]) + 1);
_root['ab' + i].i = i;
_root['ab' + i].onRollOver = function () {
judul.text = achievementList[this.i];
des.text = achievementDes[this.i];
gembok.gotoAndStop(Number(achievementGet[this.i]) + 1);
};
_root['ab' + i].onRollOut = function () {
judul.text = 'Achievement';
des.text = 'roll-over to view description';
gembok.gotoAndStop(1);
};
++i;
}
back_btn.onRelease = function () {
gotoAndStop('menu');
};
}
movieClip 2392 {
}
movieClip 2395 {
}
movieClip 2398 {
}
movieClip 2401 {
}
movieClip 2404 {
}
movieClip 2407 {
}
movieClip 2410 {
}
movieClip 2413 {
}
movieClip 2416 {
}
movieClip 2419 {
}
movieClip 2422 {
}
movieClip 2425 {
}
movieClip 2431 {
}
movieClip 2437 {
}
movieClip 2443 {
}
movieClip 2446 {
}
movieClip 2452 {
}
movieClip 2456 {
}
frame 11 {
stop();
attachMovie('mymask', 'mymask', 99999);
var j = 1;
while (j <= 6) {
_root['scene' + j + '_btn'].enabled = false;
_root.attachMovie('Gembok', 'gembok' + j, this.getNextHighestDepth());
_root['gembok' + j]._x = _root['scene' + j + '_btn']._x;
_root['gembok' + j]._y = _root['scene' + j + '_btn']._y;
++j;
}
var i = 1;
while (i <= sceneSave) {
_root['gembok' + i].removeMovieClip();
_root['scene' + i + '_btn'].i = i;
_root['scene' + i + '_btn'].enabled = true;
_root['scene' + i + '_btn'].onRelease = function () {
if (this.i == 3) {
bonusStage1 = true;
}
if (this.i == 5) {
bonusStage2 = true;
}
scene = this.i;
gotoAndStop('story');
};
++i;
}
back_btn.onRelease = function () {
gotoAndStop('menu');
};
}
frame 12 {
function resetCekBox() {
var v3 = [];
for (var i in arrayCekEnemy) {
_root['cek' + i].i = i;
_root['cek' + i].onRelease = function () {
if (arrayCekEnemy[this.i] == 0) {
arrayCekEnemy[this.i] = 1;
} else {
if (arrayCekEnemy[this.i] == 1) {
arrayCekEnemy[this.i] = 0;
}
}
resetCekBox();
};
_root['cek' + i].gotoAndStop(arrayCekEnemy[i] + 1);
if (arrayCekEnemy[i] == 1) {
v3.push(Number(i) + 1);
}
}
trace('tempArray= ' + v3);
setAvailableEnemy(v3);
}
stop();
isCustomGame = true;
arrayCekEnemy = [1, 0, 0, 0, 0, 0, 0, 0];
resetCekBox();
go_btn.onRelease = function () {
if (arrayAvailableEnemy.length > 0) {
scene = 10;
gotoAndStop('main');
trace('arrayAvailableEnemy= ' + arrayAvailableEnemy);
}
};
bonus1_btn.onRelease = function () {
savedScene = 3;
bonusStage1 = true;
scene = 21;
setAvailableEnemy(musuhAvailable[scene]);
gotoAndStop('main');
};
bonus2_btn.onRelease = function () {
savedScene = 5;
bonusStage2 = true;
scene = 22;
setAvailableEnemy(musuhAvailable[scene]);
gotoAndStop('main');
};
back_btn.onRelease = function () {
gotoAndStop('menu');
};
}
movieClip 2531 {
}
movieClip 2532 {
}
movieClip 2537 {
}
movieClip 2538 {
}
movieClip 2542 {
}
movieClip 2543 {
}
movieClip 2547 {
}
movieClip 2548 {
}
movieClip 2551 {
}
movieClip 2552 {
}
movieClip 2555 {
}
movieClip 2556 {
}
movieClip 2559 {
}
movieClip 2560 {
}
movieClip 2564 {
}
movieClip 2565 {
}
frame 13 {
stop();
clearTimer();
clearStage();
hapusGembok();
var savedScene = scene;
if (scene == 3 && !bonusStage1) {
scene = 21;
gotoAndStop('tutorial');
bonusStage1 = true;
}
if (scene == 5 && !bonusStage2) {
scene = 22;
gotoAndStop('tutorial');
bonusStage2 = true;
}
setAvailableEnemy(musuhAvailable[scene]);
_root.attachMovie('btn_skip', 'skip_btn', 2);
skip_btn._x = 600;
skip_btn._y = 20;
skip_btn.onRelease = function () {
if (scene == 7) {
story.gotoAndStop('end');
} else {
play();
}
};
soundBGM('storyBGM');
_root.attachMovie('Story' + scene + '_judul', 'story', 1);
Key.removeListener(keyListener);
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.isDown(32)) {
if (scene == 7) {
story.removeMovieClip();
soundBGM('opening song');
gotoAndStop('menu');
} else {
play();
}
}
};
Key.addListener(keyListener);
}
frame 14 {
stop();
clearTimer();
clearStage();
story.removeMovieClip();
skip_btn._visible = 0;
if (scene == 7 || scene == 8) {
gotoAndStop('menu');
soundBGM('opening song');
}
stopAllSounds();
tutorial_mc.gotoAndStop(scene);
tutorial_mc.back_btn.onRelease = function () {
gotoAndStop('menu');
soundBGM('opening song');
};
tutorial_mc.play_btn.onRelease = function () {
play();
};
_root.soundFX('fanfare');
}
movieClip 2610 {
}
frame 15 {
function addGlow(_who) {
var v1 = new flash.filters.GlowFilter(13369344, 0.5, 10, 10, 3, 3);
_who.filters = [v1];
}
function removeGlow(_who) {
_who.filters = 0;
delete _who.filters;
}
function convertTimer(_value) {
var v1 = new Object();
v1.detik = Math.floor(Math.floor(_value / 30) % 60);
v1.menit = Math.floor(_value / 1800);
return v1;
}
function showObjectives(_isi) {
debug.attachMovie('Interface_Objective', 'Objective', 16);
debug.Objective._x = 320;
debug.Objective._y = 85;
debug.Objective.onEnterFrame = function () {
this.objective_mc.objective.text = _isi;
};
}
function scoreGetEffect(_isi) {
var v3 = 'scoreGet' + debug.getNextHighestDepth();
debug.attachMovie('Interface_scoreGet', v3, debug.getNextHighestDepth());
var v2 = 0;
for (var v4 in debug) {
if (debug[v4]._name.substr(0, 8) == 'scoreGet') {
debug[v3]._y = 60 + 20 * v2;
++v2;
}
}
debug[v3]._x = 600;
if (_isi > 0) {
debug[v3].tulisan = '+' + _isi;
} else {
debug[v3].tulisan = _isi;
}
debug[v3].onEnterFrame = function () {
this.mc.tulisan.text = this.tulisan;
};
}
function panelEffectA(_number) {
if (!isPanel) {
if (random(10) <= 3) {
_root.soundFX('panelSoundA' + _number);
isPanel = true;
var v3 = 'panelA';
debug.attachMovie('Interface_panelA', v3, 17);
debug[v3]._x = 100;
debug[v3]._y = 175;
debug[v3].onEnterFrame = function () {
this.mc.gotoAndStop(_number);
};
}
}
}
function panelEffectB(_number) {
if (!isPanelB) {
if (random(10) <= 3) {
_root.soundFX('panelSoundB' + _number);
isPanelB = true;
var v3 = 'panelB';
debug.attachMovie('Interface_panelB', v3, 18);
debug[v3]._x = 540;
debug[v3]._y = 175;
debug[v3].onEnterFrame = function () {
this.mc.gotoAndStop(_number);
};
}
}
}
function comboEffect() {
++combo;
if (combo > maxCombo) {
maxCombo = combo;
}
if (combo > 1) {
comboTimer = comboTimerMax;
var v2 = 'combo';
debug.attachMovie('Interface_combo', v2, 19);
debug[v2]._x = 100;
debug[v2]._y = 260;
debug[v2].onEnterFrame = function () {
this.mc.tulisan.text = combo + 'x Hits!';
};
}
}
function cekComboEffect() {
var lapisan = Math.floor(combo / 5);
if (lapisan >= 1) {
panelEffectA(6);
}
if (lapisan > 8) {
lapisan = 8;
}
_root.soundFX('score_' + lapisan);
var v3 = 'comboEfek';
debug.attachMovie('Interface_comboEfek', v3, 20);
debug[v3]._x = 50;
debug[v3]._y = 300;
debug[v3].onEnterFrame = function () {
this.mc.gotoAndStop(lapisan + 1);
};
}
function bonusEffect(_isi) {
var v2 = 'bonus';
debug.attachMovie('Interface_bonus', v2, 21);
debug[v2]._x = 320;
debug[v2]._y = 150;
debug[v2].onEnterFrame = function () {
this.mc.tulisan.text = _isi;
};
}
function winEffect(_isi) {
if (!isWinning) {
var v2 = 'win';
debug.attachMovie('Interface_completed', v2, 22);
debug[v2]._x = 320;
debug[v2]._y = 225;
debug[v2].onEnterFrame = function () {
this.mc.tulisan.text = _isi;
};
isWinning = true;
}
}
function killsCounterEffect() {
var v2 = 'killsCounter';
debug.attachMovie('Interface_counter', v2, 23);
debug[v2]._x = 530;
debug[v2]._y = 460;
debug[v2].onEnterFrame = function () {
this.mc.tulisan.text = 'Enemy killed: ' + enemyKilled;
};
}
function addParticle(_targetX, _targetY, _explosionParticleAmount, _explosionDistance, _explosionSize, _explosionAlpha, _particle1, _particle2) {
var v6 = 0;
while (v6 < _explosionParticleAmount) {
++enemy_mc.depth;
var v1 = enemy_mc.attachMovie(_particle1, 'explosion2_' + enemy_mc.depth, 10000 + enemy_mc.depth);
++enemy_mc.depth;
var v3 = enemy_mc.attachMovie(_particle2, 'explosion_' + enemy_mc.depth, 10000 + enemy_mc.depth);
v3._x = _targetX + random(_explosionDistance) - _explosionDistance / 2;
v3._y = _targetY + random(_explosionDistance) - _explosionDistance / 2;
v1._x = _targetX + random(_explosionDistance) - _explosionDistance / 2;
v1._y = _targetY + random(_explosionDistance) - _explosionDistance / 2;
var v5 = random(_explosionSize) + _explosionSize / 2;
v3._xscale = v5;
v3._yscale = v5;
v5 = random(_explosionSize) + _explosionSize / 2;
v1._xscale = v5;
v1._yscale = v5;
v1._rotation = random(359);
v3._alpha = random(explosionAlpha) + explosionAlpha / 4;
v1._alpha = random(explosionAlpha) + explosionAlpha / 4;
++v6;
}
}
function debuEffect(sasaran) {
++bg_mc.depth;
var v1 = 'smoke' + bg_mc.depth;
bg_mc.attachMovie('smokeFX', v1, bg_mc.depth);
bg_mc[v1]._x = sasaran._x;
bg_mc[v1]._y = sasaran._y;
bg_mc[v1].cacheAsBitmap = true;
}
function flashEffect() {
var v4 = this.getNextHighestDepth();
var v3 = 'flash' + v4;
_root.attachMovie('Flash', v3, v4);
_root[v3].cacheAsBitmap = true;
}
function shock(durasi) {
_root.createEmptyMovieClip('gempa', this.getNextHighestDepth());
_root.gempa.onEnterFrame = function () {
if (!isPaused) {
if (this.count == undefined) {
this.count = 0;
}
++this.count;
if (this.count % 2 == 1) {
_y = _y + (-5 + random(10));
_x = _x + (-10 + random(20));
} else {
_y = 0;
_x = 0;
}
if (this.count >= durasi) {
_y = 0;
_x = 0;
blam = false;
injak = false;
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
function efekSerpihan(_nama, xpos, ypos) {
if (xpos == undefined) {
xpos = 0;
}
if (_nama == 'SerpihanA') {
++bgg_mc.depth;
var v2 = 'retakan' + bgg_mc.depth;
bgg_mc.attachMovie('Retakan1', v2, bgg_mc.depth);
bgg_mc[v2]._x = -bgg_mc._x + 320 + xpos;
bgg_mc[v2]._y = ypos;
}
var v3 = 0;
while (v3 <= 5) {
++bgg_mc.depth;
v2 = 'serpihan' + bgg_mc.depth;
bgg_mc.attachMovie(_nama + v3, v2, bgg_mc.depth);
bgg_mc[v2]._x = -bgg_mc._x + 320 + xpos;
bgg_mc[v2]._y = ground - bgg_mc[v2]._height / 2;
bgg_mc[v2].speed = 3;
bgg_mc[v2].jumpPow = 10 + random(10);
bgg_mc[v2].jumpPowX = -10 + random(20);
bgg_mc[v2].rot = 10;
bgg_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
if (this._y - this.jumpPow >= ground) {
this.rot *= 0.5;
this.jumpPowX *= 0.5;
this.jumpPow *= -0.5;
if (this.jumpPow < 2) {
this.removeMovieClip();
}
}
}
};
++v3;
}
}
function hitungMusuh() {
var v2 = 0;
for (var v3 in enemy_mc) {
if (enemy_mc[v3]._name.substr(0, 5) == 'enemy') {
var v1 = enemy_mc[v3];
if (v1.life > 0) {
++v2;
}
}
}
return v2;
}
function hitungBenda() {
var v1 = 0;
for (var v2 in enemy_mc) {
if (enemy_mc[v2]._name.substr(0, 5) == 'benda') {
++v1;
}
}
return v1;
}
function acceptProperty(from, to) {
for (var v3 in from.prototype) {
to[v3] = from.prototype[v3];
}
}
function meledak(who) {
delete who.onEnterFrame;
_root.soundFX('explosion');
who._parent.attachMovie('Ledakan', 'ledakan' + who._name, who._parent.depth++);
who._parent['ledakan' + who._name]._x = who._x;
who._parent['ledakan' + who._name]._y = who._y;
who._parent['ledakan' + who._name].attack = who.attack;
if (who._parent['ledakan' + who._name].hitTest(hero_mc) && !tornadoMode) {
if (!rageMode) {
forceX = (who.jarakX / Math.abs(who.jarakX)) * 15;
}
if (who.attack - def > 0) {
life -= who.attack - def;
} else {
life -= 1;
}
if (scene < 6) {
if (life <= 0) {
newAchievement(7);
}
}
panelEffectA(2);
}
who.removeMovieClip();
}
function smokeTraill(_xpos, _ypos) {
++enemy_mc.depth;
var v2 = 'smoke' + enemy_mc.depth;
enemy_mc.attachMovie('Smoke_FX', v2, enemy_mc.depth);
enemy_mc[v2]._x = _xpos;
enemy_mc[v2]._y = _ypos;
enemy_mc[v2]._xscale = random(75) + 25;
enemy_mc[v2]._yscale = random(75) + 25;
enemy_mc[v2].speed = random(5) + 1;
enemy_mc[v2].cacheAsBitmap = true;
enemy_mc[v2].onEnterFrame = function () {
if (!isPaused) {
--this._y;
this._yscale += this.speed;
this._xscale = this._yscale;
this._alpha -= 2 + this.speed;
if (this._alpha <= 0) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
function smokeEffect(who) {
var v3 = 0;
while (v3 <= 2 + random(5)) {
++enemy_mc.depth;
var v2 = 'smoke' + enemy_mc.depth;
enemy_mc.attachMovie('Smoke_FX', v2, enemy_mc.depth);
enemy_mc[v2]._x = who._x;
enemy_mc[v2]._y = who._y;
enemy_mc[v2]._xscale = random(75) + 25;
enemy_mc[v2]._yscale = random(75) + 25;
enemy_mc[v2].speed = random(5) + 1;
enemy_mc[v2].speedx = random(5) - 3;
enemy_mc[v2].cacheAsBitmap = true;
enemy_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this._x += this.speedx;
this._y -= this.speed;
this._yscale += this.speed;
this._xscale = this._yscale;
this._alpha -= 2 + this.speed;
if (this._alpha <= 0) {
this.removeMovieClip();
}
}
};
++v3;
}
}
function doFollow(follower, target) {
follower.posX = follower._x + enemy_mc._x;
follower.posY = follower._y - enemy_mc._y;
follower.jarakX = hero_mc._x - follower.posX;
follower.jarakY = hero_mc._y - hero_mc._height / 2 - follower.posY;
follower.distanceX = follower.jarakX;
follower.distanceY = follower.jarakY;
follower.distanceTotal = Math.sqrt(follower.distanceX * follower.distanceX + follower.distanceY * follower.distanceY);
follower.moveDistanceX = follower.handling * follower.distanceX / follower.distanceTotal;
follower.moveDistanceY = follower.handling * follower.distanceY / follower.distanceTotal;
follower.moveX += follower.moveDistanceX;
follower.moveY += follower.moveDistanceY;
follower.totalmove = Math.sqrt(follower.moveX * follower.moveX + follower.moveY * follower.moveY);
follower.moveX = follower.speed * follower.moveX / follower.totalmove;
follower.moveY = follower.speed * follower.moveY / follower.totalmove;
follower._x += follower.moveX;
follower._y += follower.moveY;
follower._rotation = 180 * Math.atan2(follower.moveY, follower.moveX) / Math.PI;
}
function summonMusuh(_type) {
if (hitungMusuh() < 15) {
var v3 = 1 + random(3);
++enemy_mc.depth;
var v1 = 'enemy' + enemy_mc.depth;
if (_type == 1) {
enemy_mc.attachMovie('Musuh' + _type + '_' + v3, v1, enemy_mc.depth);
enemy_mc.skinNum = v3;
} else {
enemy_mc.attachMovie('Musuh' + _type, v1, enemy_mc.depth);
}
if (random(2) == 1) {
enemy_mc[v1]._x = hero_mc._x - enemy_mc._x + (640 + random(50));
} else {
enemy_mc[v1]._x = hero_mc._x - enemy_mc._x - (640 + random(50));
}
enemy_mc[v1]._y = ground - enemy_mc[v1]._height / 2;
acceptProperty(game['pasukan' + _type], enemy_mc[v1]);
if (enemy_mc[v1].flyingUnit) {
enemy_mc[v1]._y = 50;
}
enemy_mc[v1].onEnterFrame = enemy_mc[v1].updateFrame;
}
}
function summonMusuhHeroPos(_type) {
if (scene == 22) {
var v3 = 1 + random(3);
++enemy_mc.depth;
var v1 = 'enemy' + enemy_mc.depth;
if (_type == 1) {
enemy_mc.attachMovie('Musuh' + _type + '_' + v3, v1, enemy_mc.depth);
enemy_mc.skinNum = v3;
} else {
enemy_mc.attachMovie('Musuh' + _type, v1, enemy_mc.depth);
}
enemy_mc[v1]._x = hero_mc._x - enemy_mc._x;
enemy_mc[v1]._y = ground - enemy_mc[v1]._height / 2;
acceptProperty(game['pasukan' + _type], enemy_mc[v1]);
if (enemy_mc[v1].flyingUnit) {
enemy_mc[v1]._y = 50;
}
enemy_mc[v1].onEnterFrame = enemy_mc[v1].updateFrame;
}
}
function summonMusuhB(who) {
++enemy_mc.depth;
var v1 = 'enemy' + enemy_mc.depth;
enemy_mc.attachMovie('Musuh4b', v1, enemy_mc.depth);
enemy_mc[v1]._x = who._x;
enemy_mc[v1]._y = ground - enemy_mc[v1]._height / 2;
acceptProperty(game.pasukan4b, enemy_mc[v1]);
enemy_mc[v1].onEnterFrame = enemy_mc[v1].updateFrame;
}
function summonBenda(_type) {
if (hitungBenda() < 8) {
++enemy_mc.depth;
var v1 = 'benda' + enemy_mc.depth;
enemy_mc.attachMovie('Benda' + _type, v1, enemy_mc.depth);
if (random(2) == 1) {
enemy_mc[v1]._x = hero_mc._x - enemy_mc._x + (600 + random(100));
} else {
enemy_mc[v1]._x = hero_mc._x - enemy_mc._x - (600 + random(100));
}
enemy_mc[v1]._y = ground - enemy_mc[v1]._height / 2;
acceptProperty(game['benda' + _type], enemy_mc[v1]);
enemy_mc[v1].onEnterFrame = enemy_mc[v1].updateFrame;
}
}
function setBonus(_type, who) {
++enemy_mc.depth;
var v3 = 'bonus' + (100 + enemy_mc.depth);
enemy_mc.attachMovie('Bonus' + _type, v3, 100 + enemy_mc.depth);
enemy_mc[v3]._x = who._x;
enemy_mc[v3]._y = who._y;
enemy_mc[v3].isJumping = true;
enemy_mc[v3].jumpPow = 8;
enemy_mc[v3].onEnterFrame = function () {
if (this.isJumping) {
this._y -= this.jumpPow;
this.jumpPow -= gra / 2;
}
if (this._y - this.jumpPow >= ground) {
this.jumpPow = 0;
this._y = ground;
}
if (this.hitTest(hero_mc)) {
if (_type == 1) {
if (life + 30 < lifeAwal) {
life += 30;
} else {
life = lifeAwal;
}
} else {
if (_type == 2) {
if (energy + 50 < energyAwal) {
energy += 50;
} else {
energy = energyAwal;
}
} else {
if (_type == 3) {
panelEffectA(7);
_root.tornadoTimer = 230;
_root.tornadoMode = true;
} else {
if (_type == 4) {
hero_mc.attachMovie('rage_effect', 'rage_mc', 99);
_root.rageTimer = 485;
_root.rageMode = true;
}
}
}
}
bonusEffect(namaBonus[_type]);
delete this.onEnterFrame;
_root.soundFX('bonus' + _type + '_sound');
this.removeMovieClip();
}
};
}
function throwEnemy(_type) {
_root.soundFX('WHIZZ');
_root.soundFX('scream');
++enemy_mc.depth;
var v4 = 'victim' + enemy_mc.depth;
enemy_mc.attachMovie('Victim' + _type, v4, enemy_mc.depth);
enemy_mc[v4]._x = -enemy_mc._x + hero_mc._x;
enemy_mc[v4]._y = -enemy_mc._y + hero_mc._y;
enemy_mc[v4].forceX = speed * 1.5;
enemy_mc[v4].forceY = 10;
enemy_mc[v4].rot = 0;
enemy_mc[v4].cacheAsBitmap = true;
enemy_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this._x += this.forceX;
this._y += this.forceY;
this.forceY += gra;
this._rotation += this.rot;
if (this._y + this.forceY > ground) {
_root.soundFX('PUNCH' + (1 + random(6)));
if (this.rot == 0) {
this.rot = 20;
} else {
this.rot *= 0.5;
}
this.forceX *= 0.25;
this.forceY *= -0.5;
}
if (Math.abs(this.forceX) < 0.1) {
this.removeMovieClip();
}
for (var v4 in enemy_mc) {
if (enemy_mc[v4]._name.substr(0, 5) == 'enemy') {
var v3 = enemy_mc[v4];
if (this.hitTest(v3)) {
if (v3.jumpAble) {
if (!v3.isJumping) {
v3.isJumping = true;
v3.jumpPow = 10;
v3.life -= 10;
}
} else {
v3.life -= 10;
v3.cekDeath();
}
}
}
}
}
};
}
function throwBarrel(_pow) {
_root.soundFX('WHIZZ');
++enemy_mc.depth;
var v4 = 'barrel' + (500 + enemy_mc.depth);
enemy_mc.attachMovie('Barrel_thrown', v4, 500 + enemy_mc.depth);
enemy_mc[v4]._x = -enemy_mc._x + hero_mc._x;
enemy_mc[v4]._y = -enemy_mc._y + hero_mc._y - 130;
acceptProperty(game.bendaClass, enemy_mc[v4]);
enemy_mc[v4].jumpPow = 8;
enemy_mc[v4].jumpPowX = (hero_mc._xscale / 100) * _pow;
enemy_mc[v4].isJumping = true;
enemy_mc[v4].attack = 10;
enemy_mc[v4].rot = 20;
enemy_mc[v4].cacheAsBitmap = true;
enemy_mc[v4].onEnterFrame = function () {
if (!isPaused) {
this.getPos();
this.cekPosition();
this.cekLedakan();
this.cekPukulan();
if (this.isJumping) {
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.meledak();
setBonus(1 + random(8), this);
delete this.onEnterFrame;
this.removeMovieClip();
}
for (var v3 in enemy_mc) {
if (enemy_mc[v3]._name.substr(0, 5) == 'enemy') {
var v2 = enemy_mc[v3];
if (this.hitTest(v2)) {
this.meledak();
setBonus(1 + random(8), this);
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
}
};
}
function setOrange(who) {
myColor = new Color(who);
myColorTransform = new Object();
myColorTransform = {'rb': 200, 'gb': 0, 'bb': -200};
myColor.setTransform(myColorTransform);
}
function setOriginalColor(who) {
myColor = new Color(who);
myColorTransform = new Object();
myColorTransform = {'rb': 0, 'gb': 0, 'bb': 0};
myColor.setTransform(myColorTransform);
}
function clearStage() {
_x = 0;
delete onEnterFrame;
for (var v1 in arrayObject) {
arrayObject[v1].swapDepths(1);
arrayObject[v1].removeMovieClip();
}
}
function setPauseMode() {
_root._x = 0;
isPaused = true;
_root.attachMovie('Pause', 'pause_mc', this.getNextHighestDepth());
pause_mc.tombol1.gotoAndStop(quality);
pause_mc.tombol2.gotoAndStop(volume1);
pause_mc.tombol3.gotoAndStop(volume2);
pause_mc.tombol1.onRelease = function () {
if (_root.quality == 1) {
_quality = 'LOW';
_root.quality = 2;
} else {
_quality = 'HIGH';
_root.quality = 1;
}
this.gotoAndStop(_root.quality);
};
pause_mc.tombol2.onRelease = function () {
if (_root.volume1 == 1) {
setVolumeBGM(0);
_root.volume1 = 2;
} else {
setVolumeBGM(80);
_root.volume1 = 1;
}
this.gotoAndStop(_root.volume1);
};
pause_mc.tombol3.onRelease = function () {
if (_root.volume2 == 1) {
setVolumeFX(0);
_root.volume2 = 2;
} else {
setVolumeFX(100);
_root.volume2 = 1;
}
this.gotoAndStop(_root.volume2);
};
pause_mc.play_btn.onRelease = function () {
setPauseClear();
};
pause_mc.exit_btn.onRelease = function () {
clearTimer();
clearStage();
soundBGM('opening song');
gotoAndStop('menu');
pause_mc.removeMovieClip();
};
pause_mc.logo_btn.onRelease = function () {
_root.newAchievement(14);
getURL('http://www.ludobox.com/', '_blank');
};
}
function setPauseClear() {
isPaused = false;
pause_mc.removeMovieClip();
}
stop();
var isPaused = false;
var bonusStageTimer = 1800;
if (scene == 11) {
bonusStageTimer = 0;
}
var killedUnit = 0;
var killed1 = 0;
var killed2 = 0;
var killed3 = 0;
var killed4 = 0;
var killed5 = 0;
var killed6 = 0;
var killed7 = 0;
var killed8 = 0;
var killed9 = 0;
var killed10 = 0;
var killed11 = 0;
var killed12 = 0;
var killed13 = 0;
var ceweGet = 0;
_root.attachMovie('Fade', 'fade_mc', 100000);
_root.attachMovie('Interface', 'debug', 99999);
debug.boss._visible = false;
if (scene == 6) {
debug.boss._visible = true;
}
var totalMusuh = new Array();
totalMusuh[1] = 10;
totalMusuh[2] = 30;
totalMusuh[3] = 45;
totalMusuh[4] = 60;
totalMusuh[5] = 75;
totalMusuh[6] = 99999;
totalMusuh[10] = 99999;
totalMusuh[11] = 99999;
totalMusuh[21] = 99999;
totalMusuh[22] = 99999;
var objectiveGame = new Array();
var i = 1;
while (i <= 5) {
objectiveGame[i] = 'Kill ' + totalMusuh[i] + ' enemy units!';
++i;
}
objectiveGame[6] = 'Defeat enemy wizard!';
objectiveGame[10] = 'You chose your own enemy! Face it!';
objectiveGame[11] = 'Survive as long as you can! Defeats all enemies!';
objectiveGame[21] = 'Kill as many chickens as you can in 60 seconds!';
objectiveGame[22] = 'Grab as many real girls as you can in 60 seconds!';
showObjectives(objectiveGame[scene]);
var isPanel = false;
var isPanelB = false;
var maxCombo = 0;
var isWinning = false;
var explosionParticleAmount = 15;
var explosionDistance = 25;
var explosionSize = 100;
var explosionAlpha = 75;
_root.createEmptyMovieClip('bgg_mc', 0);
bgg_mc.depth = 100;
bgg_mc.ID = 0;
bgg_mc.onEnterFrame = function () {
if (!isPaused) {
this._x -= speed;
this.ID = -Math.round((this._x + 320) / 1280);
bgg_mc.attachMovie('BG_Front' + scene, 'BG' + this.ID, this.ID);
bgg_mc['BG' + this.ID]._x = 1280 * this.ID;
bgg_mc.attachMovie('BG_Front' + scene, 'BG' + (this.ID + 1), this.ID + 1);
bgg_mc['BG' + (this.ID + 1)]._x = 1280 * (this.ID + 1);
bgg_mc.attachMovie('BG_Front' + scene, 'BG' + (this.ID - 1), this.ID - 1);
bgg_mc['BG' + (this.ID - 1)]._x = 1280 * (this.ID - 1);
for (var v3 in this) {
if (this[v3]._name.substr(0, 2) == 'BG') {
var v2 = this[v3];
v2.posX = v2._x + this._x;
if (Math.abs(hero_mc._x - v2.posX) > 2000) {
v2.swapDepths(100);
v2.removeMovieClip();
}
}
}
}
};
_root.createEmptyMovieClip('bgg1b_mc', -1);
bgg1b_mc.ID = 0;
bgg1b_mc.onEnterFrame = function () {
if (!isPaused) {
this._x -= speed / 2;
this.ID = -Math.round((this._x + 320) / 1280);
bgg1b_mc.attachMovie('BG1b_' + scene, 'BG' + this.ID, this.ID);
bgg1b_mc['BG' + this.ID]._x = 1280 * this.ID;
bgg1b_mc.attachMovie('BG1b_' + scene, 'BG' + (this.ID + 1), this.ID + 1);
bgg1b_mc['BG' + (this.ID + 1)]._x = 1280 * (this.ID + 1);
bgg1b_mc.attachMovie('BG1b_' + scene, 'BG' + (this.ID - 1), this.ID - 1);
bgg1b_mc['BG' + (this.ID - 1)]._x = 1280 * (this.ID - 1);
for (var v3 in this) {
if (this[v3]._name.substr(0, 2) == 'BG') {
var v2 = this[v3];
v2.posX = v2._x + this._x;
if (Math.abs(hero_mc._x - v2.posX) > 2000) {
v2.swapDepths(100);
v2.removeMovieClip();
}
}
}
}
};
_root.createEmptyMovieClip('bgg2_mc', -2);
bgg2_mc.ID = 0;
bgg2_mc.onEnterFrame = function () {
if (!isPaused) {
this._x -= speed / 4;
this.ID = -Math.round((this._x + 320) / 1280);
bgg2_mc.attachMovie('BG_Castle' + scene, 'BG' + this.ID, this.ID);
bgg2_mc['BG' + this.ID]._x = 1280 * this.ID;
bgg2_mc.attachMovie('BG_Castle' + scene, 'BG' + (this.ID + 1), this.ID + 1);
bgg2_mc['BG' + (this.ID + 1)]._x = 1280 * (this.ID + 1);
bgg2_mc.attachMovie('BG_Castle' + scene, 'BG' + (this.ID - 1), this.ID - 1);
bgg2_mc['BG' + (this.ID - 1)]._x = 1280 * (this.ID - 1);
for (var v3 in this) {
if (this[v3]._name.substr(0, 2) == 'BG') {
var v2 = this[v3];
v2.posX = v2._x + this._x;
if (Math.abs(hero_mc._x - v2.posX) > 2000) {
v2.swapDepths(100);
v2.removeMovieClip();
}
}
}
}
};
_root.createEmptyMovieClip('bgg3_mc', -3);
bgg3_mc.ID = 0;
bgg3_mc.onEnterFrame = function () {
if (!isPaused) {
this._x -= speed / 6;
this.ID = -Math.round((this._x + 320) / 1280);
bgg3_mc.attachMovie('BG_Back' + scene, 'BG' + this.ID, this.ID);
bgg3_mc['BG' + this.ID]._x = 1280 * this.ID;
bgg3_mc.attachMovie('BG_Back' + scene, 'BG' + (this.ID + 1), this.ID + 1);
bgg3_mc['BG' + (this.ID + 1)]._x = 1280 * (this.ID + 1);
bgg3_mc.attachMovie('BG_Back' + scene, 'BG' + (this.ID - 1), this.ID - 1);
bgg3_mc['BG' + (this.ID - 1)]._x = 1280 * (this.ID - 1);
for (var v3 in this) {
if (this[v3]._name.substr(0, 2) == 'BG') {
var v2 = this[v3];
v2.posX = v2._x + this._x;
if (Math.abs(hero_mc._x - v2.posX) > 2000) {
v2.swapDepths(100);
v2.removeMovieClip();
}
}
}
}
};
_root.createEmptyMovieClip('bg_mc', 2);
bg_mc.depth = 0;
bg_mc.attachMovie('Hero', 'playboy', 999999);
hero_mc = bg_mc.playboy;
hero_mc._x = 320;
hero_mc._y = 350;
hero_mc.cacheAsBitmap = true;
var lifeAwal = 100;
var life = lifeAwal;
var energyAwal = 100;
var energy = energyAwal;
var attack = 8;
var def = 3;
var speed = 0;
var speedMax = 20;
var jumpPow = -15;
var jump = 0;
var flyPower = 0;
var gra = 1;
var accel = 0.5;
var regenerate = 0.1;
var frictAwal = 0.94;
var frict = frictAwal;
var blamPower = 0;
var blamRange = 150;
var bouncedProjectile = 0;
var forceX = 0;
var ground = 420;
var injak = false;
var isJumping = true;
var isRunning = false;
var isFlying = false;
var isNgesot = false;
var isNabrak = false;
var isGrab = false;
var isHurt = false;
var grabSlot = false;
var isHit = 0;
var isDefense = false;
var hitCounter = 30;
var game = new Object();
game.bendaClass = function () {};
game.bendaClass.prototype.lifeAwal = 10;
game.bendaClass.prototype.life = game.bendaClass.prototype.lifeAwal;
game.bendaClass.prototype.attack = 10;
game.bendaClass.prototype.def = 2;
game.bendaClass.prototype.forceX = 0;
game.bendaClass.prototype.forceXpow = 3;
game.bendaClass.prototype.forceXfrict = 0.8;
game.bendaClass.prototype.timer = 0;
game.bendaClass.prototype.getPos = function () {
this.posX = this._x + enemy_mc._x;
this.posY = this._y + enemy_mc._y;
};
game.bendaClass.prototype.stay = function () {
if (this.posX < hero_mc._x) {
this.jumpPowX = -1 - random(5);
this.rot = -blamPower;
}
if (this.posX > hero_mc._x) {
this.jumpPowX = 1 + random(5);
this.rot = blamPower;
}
this.gotoAndStop('idle');
};
game.bendaClass.prototype.cekBeingHit = function () {
this._x += this.forceX;
this.forceX *= this.forceXfrict;
this.isHit = false;
if (Math.abs(this.forceX) > 0.1) {
this.isHit = true;
this.hit = false;
}
};
game.bendaClass.prototype.cekPosition = function () {
this.jarak = hero_mc._x - this.posX;
if (this.jarak > 1200 || this.jarak < -1200) {
this._x += this.jarak * 2;
}
this.jarakY = hero_mc._y - 50 - this.posY;
};
game.bendaClass.prototype.cekDeath = function () {
if (this.life <= 0) {
delete this.onEnterFrame;
setBonus(1 + random(8), this);
this.meledak();
this.removeMovieClip();
}
};
game.bendaClass.prototype.cekPukulan = function () {
if (this.hitTest(hero_mc.char.hit) && !this.isDead) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
if (rageMode) {
flashEffect();
this.life -= 10;
this.isJumping = true;
this.jumpPow = 15 + random(10);
}
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
this.cekDeath();
}
if (this.hitTest(hero_mc.char.uppercut) && !this.isDead) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
this.life -= 10;
this.isJumping = true;
this.jumpPow = 15 + random(10);
}
};
game.bendaClass.prototype.cekNormalCondition = function () {
if (!this.isHit && !this.isAttack) {
return true;
}
};
game.bendaClass.prototype.meledak = function () {
efekSerpihan('Barrel_part', -this.jarak, this._y);
flashEffect();
_root.soundFX('explosion');
enemy_mc.attachMovie('Ledakan', 'ledakan' + this._name, enemy_mc.depth++);
enemy_mc['ledakan' + this._name]._x = this._x;
enemy_mc['ledakan' + this._name]._y = this._y;
enemy_mc['ledakan' + this._name].attack = this.attack;
if (enemy_mc['ledakan' + this._name].hitTest(hero_mc) && !tornadoMode) {
if (!rageMode) {
forceX = (this.jarak / Math.abs(this.jarak)) * 15;
}
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
panelEffectA(3);
}
};
game.bendaClass.prototype.cekLedakan = function () {
for (var v4 in enemy_mc) {
if (enemy_mc[v4]._name.substr(0, 7) == 'ledakan') {
var v3 = enemy_mc[v4];
if (this.hitTest(v3)) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
this.char.gotoAndPlay(1);
this.life -= 15 - this.def;
this.cekDeath();
this.isAttack = false;
}
}
}
};
game.bendaClass.prototype.cekTabrakan = function () {
if (Math.abs(this.jarak) < 80 && Math.abs(this.jarakY) < 100) {
return true;
}
};
game.benda1 = function () {};
game.benda1.prototype.__proto__ = game.bendaClass.prototype;
game.benda1.prototype.life = game.benda1.prototype.lifeAwal;
game.benda1.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
this.stay();
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (tornadoMode) {
if (!this.isJumping) {
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
this.life -= this.jumpPow - this.def;
}
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.armyClass = function () {};
game.armyClass.prototype.nomor = 1;
game.armyClass.prototype.speed = 4;
game.armyClass.prototype.isJumping = false;
game.armyClass.prototype.lifeAwal = 8;
game.armyClass.prototype.life = game.armyClass.prototype.lifeAwal;
game.armyClass.prototype.attack = 10;
game.armyClass.prototype.def = 2;
game.armyClass.prototype.forceX = 0;
game.armyClass.prototype.forceXpow = 5;
game.armyClass.prototype.forceXfrict = 0.9;
game.armyClass.prototype.flyingUnit = false;
game.armyClass.prototype.isAttack = false;
game.armyClass.prototype.jumpAble = true;
game.armyClass.prototype.isDead = false;
game.armyClass.prototype.timer = 0;
game.armyClass.prototype.scoreGet = 100;
game.armyClass.prototype.soundHit = 'PUNCH';
game.armyClass.prototype.soundDead = 'man_dead';
game.armyClass.prototype.jarakLihat = 200;
game.armyClass.prototype.attackRange = 80;
game.armyClass.prototype.getPos = function () {
this.posX = this._x + enemy_mc._x;
this.posY = this._y + enemy_mc._y;
};
game.armyClass.prototype.kabur = function () {
if (Math.abs(this.jarak) < this.jarakLihat) {
this.timer = 100;
if (random(40) == 1) {
if (this.nomor == 1) {
panelEffectA(4);
panelEffectB(1);
} else {
if (this.nomor == 4.2) {
panelEffectB(3);
}
}
}
}
if (this.timer > 0) {
this.gotoAndStop('walking');
--this.timer;
if (this.posX < hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
this.jumpPowX = -1 - random(3);
this.rot = -blamPower;
}
if (this.posX > hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
this.jumpPowX = 1 + random(3);
this.rot = blamPower;
}
} else {
this._xscale = (this.jarak / Math.abs(this.jarak)) * -100;
this.gotoAndStop('idle');
if (this.nomor == 1) {
if (random(50) == 1 && scene == 1) {
panelEffectB(2);
}
}
if (this.nomor == 12) {
if (random(50) == 1) {
panelEffectB(8);
}
}
}
};
game.armyClass.prototype.cekBeingHit = function () {
this._x += this.forceX;
this.forceX *= this.forceXfrict;
this.isHit = false;
if (Math.abs(this.forceX) > 0.1) {
this.isHit = true;
this.hit = false;
}
};
game.armyClass.prototype.cekPosition = function () {
this.jarak = hero_mc._x - this.posX;
if (this.jarak > 1500 || this.jarak < -1500) {
this._x += this.jarak * 2;
}
this.jarakY = hero_mc._y - 50 - this.posY;
if (this.isDead) {
this.gotoAndStop('dead');
}
};
game.armyClass.prototype.cekDeath = function () {
if (this.life <= 0 && !this.isDead) {
++_root.enemyKilled;
score += this.scoreGet;
scoreGetEffect(this.scoreGet);
_root.soundFX(this.soundDead + (1 + random(6)));
++_root['killed' + this.nomor];
if (killed1 >= 15) {
newAchievement(1);
}
if (killed2 >= 20) {
newAchievement(2);
}
if (killed4 >= 10) {
newAchievement(3);
}
if (killed5 >= 10) {
newAchievement(4);
}
if (killed6 >= 15) {
newAchievement(5);
}
if (killed11 >= 30) {
newAchievement(13);
}
if (scene != 6) {
killsCounterEffect();
}
if (scene <= 5) {
var v3 = totalMusuh[scene] - killedUnit - 1;
if (v3 <= 5 && v3 > 1) {
showObjectives(v3 + ' enemies remaining');
} else {
if (v3 <= 1 && v3 > 0) {
showObjectives(v3 + ' enemy remaining');
}
}
}
++killedUnit;
if (killedUnit >= totalMusuh[scene] && scene != 10) {
winEffect('Stage Completed!');
}
this.gotoAndStop('dead');
this.isDead = true;
}
};
game.armyClass.prototype.cekPukulan = function () {
if (this.hitTest(hero_mc.char.hit) && !this.isDead) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
comboEffect();
_root.soundFX(this.soundHit + (1 + random(6)));
this.gotoAndStop('hit');
this.char.gotoAndPlay(1);
if (rageMode) {
_root.soundFX('explosion');
flashEffect();
this.life -= 10;
this.isJumping = true;
this.jumpPow = 15 + random(10);
}
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
this.cekDeath();
this.isAttack = false;
if (this.nomor == 9) {
panelEffectB(12);
}
}
if (this.hitTest(hero_mc.char.uppercut) && !this.isDead) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
comboEffect();
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
if (this.nomor != 4) {
this.isJumping = true;
this.jumpPow = 15 + random(10);
}
if (!this.jumpAble) {
this.cekDeath();
}
}
};
game.armyClass.prototype.cekLedakan = function () {
for (var v5 in enemy_mc) {
if (enemy_mc[v5]._name.substr(0, 7) == 'ledakan') {
var v4 = enemy_mc[v5];
if (this.hitTest(v4) && !this.isDead) {
if (this.jarak > 0) {
this.forceX = -this.forceXpow;
} else {
this.forceX = this.forceXpow;
}
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
this.char.gotoAndPlay(1);
this.life -= 12 - this.def;
this.cekDeath();
this.isAttack = false;
}
}
if (enemy_mc[v5]._name.substr(0, 6) == 'peluru') {
var v3 = enemy_mc[v5];
if (v3.bounced) {
if (this.hitTest(v3) && !this.isDead) {
_root.soundFX('PUNCH' + (1 + random(6)));
this.gotoAndStop('hit');
this.char.gotoAndPlay(1);
this.life -= 12 - this.def;
this.cekDeath();
this.isAttack = false;
delete v3.onEnterFrame;
v3.removeMovieClip();
}
}
}
}
};
game.armyClass.prototype.cekNormalCondition = function () {
if (!this.isJumping && !this.isHit && !this.isAttack && !this.isDead) {
return true;
}
};
game.armyClass.prototype.setNormalCondition = function () {
this.isAttack = true;
this.isHit = this.isAttack;
this.isJumping = this.isAttack;
};
game.armyClass.prototype.cekTabrakan = function () {
if (Math.abs(this.jarak) < 80 && Math.abs(this.jarakY) < 150 && !this.isDead) {
return true;
}
};
game.pasukan1 = function () {};
game.pasukan1.prototype.__proto__ = game.armyClass.prototype;
game.pasukan1.prototype.nomor = 1;
game.pasukan1.prototype.speed = 5;
game.pasukan1.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kabur();
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (isGrab && !grabSlot && this.nomor == 1) {
hero_mc.char.gotoAndPlay('slot');
grabSlot = this.nomor;
this.removeMovieClip();
}
if (isNabrak) {
if (!this.isJumping) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
}
}
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan2 = function () {};
game.pasukan2.prototype.__proto__ = game.armyClass.prototype;
game.pasukan2.prototype.nomor = 2;
game.pasukan2.prototype.lifeAwal = 18;
game.pasukan2.prototype.life = game.pasukan2.prototype.lifeAwal;
game.pasukan2.prototype.forceXpow = 15;
game.pasukan2.prototype.forceXfrict = 0.4;
game.pasukan2.prototype.scoreGet = 300;
game.pasukan2.prototype.jarakLihat = 400;
game.pasukan2.prototype.attackRange = 150;
game.pasukan2.prototype.kejar = function () {
if (Math.abs(this.jarak) < this.jarakLihat) {
this.timer = 100;
if (this.nomor == 2) {
if (random(40) == 1) {
panelEffectB(4);
}
}
}
if (this.timer > 0) {
this.gotoAndStop('walking');
--this.timer;
if (this.posX + 10 < hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
this.jumpPowX = 1 + random(5);
this.rot = blamPower;
}
if (this.posX - 10 > hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
this.jumpPowX = -1 - random(5);
this.rot = -blamPower;
}
} else {
this.gotoAndStop('idle');
if (this.nomor == 13) {
if (random(40) == 1) {
panelEffectB(9);
}
}
}
};
game.pasukan2.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kejar();
}
if (Math.abs(this.jarak) < this.attackRange && Math.abs(this.jarakY) < 80 && !this.isHit && !this.isDead) {
this.isAttack = true;
this.gotoAndStop('attack');
this._xscale = (this.jarak / Math.abs(this.jarak)) * 100;
if (this.hit && !tornadoMode) {
if (!rageMode) {
forceX = 5 * (this._xscale / 100);
}
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
if (life <= 0) {
newAchievement(6);
}
}
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
if (this._currentframe == 3) {
this.gotoAndStop('idle');
}
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (isGrab && !grabSlot && this.nomor == 2) {
hero_mc.char.gotoAndPlay('slot');
grabSlot = this.nomor;
this.removeMovieClip();
}
if (isNabrak) {
if (!this.isJumping) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
}
}
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan3 = function () {};
game.pasukan3.prototype.__proto__ = game.pasukan2.prototype;
game.pasukan3.prototype.nomor = 3;
game.pasukan3.prototype.lifeAwal = 15;
game.pasukan3.prototype.life = game.pasukan3.prototype.lifeAwal;
game.pasukan3.prototype.forceXpow = 15;
game.pasukan3.prototype.forceXfrict = 0.4;
game.pasukan3.prototype.jarakLihat = 180;
game.pasukan3.prototype.scoreGet = 250;
game.pasukan3.prototype.shoot = function () {
if (!isPaused) {
_root.soundFX('arrow1');
++enemy_mc.depth;
var v3 = 'peluru' + enemy_mc.depth;
enemy_mc.attachMovie('Arrow', v3, enemy_mc.depth);
enemy_mc[v3]._x = this._x;
enemy_mc[v3]._y = this._y - 80;
enemy_mc[v3].attack = this.attack;
enemy_mc[v3].powX = speed + (hero_mc._x - this.posX) / 15;
enemy_mc[v3].powY = (hero_mc._y - (this.posY + 120)) / 20;
enemy_mc[v3].bounced = false;
enemy_mc[v3].gotoAndStop(1);
enemy_mc[v3].cacheAsBitmap = true;
enemy_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + enemy_mc._x;
this.posY = this._y - enemy_mc._y;
this.jarakX = hero_mc._x - this.posX;
this.jarakY = hero_mc._y - hero_mc._height / 2 - this.posY;
this._x += this.powX;
this._y += this.powY;
this.powX *= 0.985;
this.powY += gra;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.posY + this.powY > ground - this._height / 2) {
this.bounced = false;
delete this.onEnterFrame;
this.gotoAndStop(2);
}
if (!this.bounced) {
if (Math.abs(this.jarakX) < 30 && Math.abs(this.jarakY) < 40 && !tornadoMode) {
if (!isDefensePosition) {
_root.soundFX('arrowHit');
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
delete this.onEnterFrame;
this.removeMovieClip();
} else {
++bouncedProjectile;
if (bouncedProjectile >= 25) {
newAchievement(15);
}
this._x += -(this.powX * 3);
this._y += -5;
this.powX *= -1;
this.powY *= -3;
this.bounced = true;
}
}
}
}
};
}
};
game.pasukan3.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kabur();
}
if (this.timer == 0 && Math.abs(this.jarak) < 700 && !this.isHit && !this.isDead) {
if (this.posX < hero_mc._x) {
this._xscale = 100;
}
if (this.posX > hero_mc._x) {
this._xscale = -100;
}
this.isAttack = true;
this.gotoAndStop('attack');
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (isGrab && !grabSlot) {
hero_mc.char.gotoAndPlay('slot');
grabSlot = this.nomor;
this.removeMovieClip();
}
if (isNabrak) {
if (!this.isJumping) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
}
}
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan4 = function () {};
game.pasukan4.prototype.__proto__ = game.pasukan3.prototype;
game.pasukan4.prototype.nomor = 4;
game.pasukan4.prototype.lifeAwal = 15;
game.pasukan4.prototype.life = game.pasukan4.prototype.lifeAwal;
game.pasukan4.prototype.attack = 15;
game.pasukan4.prototype.speed = 3;
game.pasukan4.prototype.forceXpow = 15;
game.pasukan4.prototype.forceXfrict = 0.4;
game.pasukan4.prototype.jumpAble = false;
game.pasukan4.prototype.scoreGet = 300;
game.pasukan4.prototype.shoot = function () {
if (!isPaused) {
_root.soundFX('FIRE');
++enemy_mc.depth;
var v3 = 'peluru' + enemy_mc.depth;
enemy_mc.attachMovie('Fireball', v3, enemy_mc.depth);
enemy_mc[v3]._x = this._x;
enemy_mc[v3]._y = this._y - 80;
enemy_mc[v3].attack = this.attack;
enemy_mc[v3].powX = speed + (hero_mc._x - this.posX) / 22;
enemy_mc[v3].powY = (hero_mc._y - (this.posY + 120)) / 10;
enemy_mc[v3].bounced = false;
enemy_mc[v3].cacheAsBitmap = true;
enemy_mc[v3].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + enemy_mc._x;
this.posY = this._y - enemy_mc._y;
this.jarakX = hero_mc._x - this.posX;
this.jarakY = hero_mc._y - hero_mc._height / 2 - this.posY;
this._x += this.powX;
this._y += this.powY;
this.powX *= 0.99;
this.powY += gra;
this._rotation = 5 + Math.atan2(this.powY, this.powX) * 180 / Math.PI;
if (this.posY + this.powY > ground - this._height / 2) {
if (Math.abs(this.powY) < 0.3) {
this.bounced = false;
delete this.onEnterFrame;
} else {
this.powX *= 0.5;
this.powY *= -0.5;
}
}
if (!this.bounced) {
if (Math.abs(this.jarakX) < 30 && Math.abs(this.jarakY) < 40 && !tornadoMode) {
if (!rageMode && !isDefensePosition) {
forceX = -this.jarakX / 10;
}
if (!isDefensePosition) {
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
delete this.onEnterFrame;
this.removeMovieClip();
} else {
++bouncedProjectile;
if (bouncedProjectile >= 25) {
newAchievement(15);
}
this._x += -(this.powX * 3);
this._y += -5;
this.powX *= -1;
this.powY *= -3;
this.bounced = true;
}
}
if (Math.abs(this.jarakX) > 5000) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
}
};
}
};
game.pasukan4.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kabur();
}
if (this.timer == 0 && Math.abs(this.jarak) < 800 && !this.isHit && !this.isDead) {
if (this.posX < hero_mc._x) {
this._xscale = 100;
}
if (this.posX > hero_mc._x) {
this._xscale = -100;
}
this.isAttack = true;
this.gotoAndStop('attack');
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
this.life -= blamPower;
this.cekDeath();
}
}
if (this.cekTabrakan()) {
if (isNabrak || tornadoMode) {
comboEffect();
this.life -= attack;
this.cekDeath();
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan4b = function () {};
game.pasukan4b.prototype.__proto__ = game.pasukan1.prototype;
game.pasukan4b.prototype.nomor = 4.2;
game.pasukan4b.prototype.speed = 4;
game.pasukan4b.prototype.forceXpow = 15;
game.pasukan4b.prototype.forceXfrict = 0.4;
game.pasukan5 = function () {};
game.pasukan5.prototype.__proto__ = game.pasukan3.prototype;
game.pasukan5.prototype.nomor = 5;
game.pasukan5.prototype.lifeAwal = 8;
game.pasukan5.prototype.life = game.pasukan5.prototype.lifeAwal;
game.pasukan5.prototype.attack = 15;
game.pasukan5.prototype.speed = 3;
game.pasukan5.prototype.flyingUnit = true;
game.pasukan5.prototype.forceXpow = 15;
game.pasukan5.prototype.forceXfrict = 0.4;
game.pasukan5.prototype.jumpAble = false;
game.pasukan5.prototype.scoreGet = 500;
game.pasukan5.prototype.kabur = function () {
this.gotoAndStop('walking');
if (this.posX < hero_mc._x) {
this.speed = -3;
this._xscale = -100;
}
if (this.posX > hero_mc._x) {
this.speed = 3;
this._xscale = 100;
}
if (this.posY < hero_mc._y) {
this.speedY = -3;
}
if (this.posY > hero_mc._y) {
this.speedY = 3;
}
};
game.pasukan5.prototype.kejar = function () {
this.gotoAndStop('walking');
if (this.posX > hero_mc._x) {
this.speed = -3;
this._xscale = -100;
}
if (this.posX < hero_mc._x) {
this.speed = 3;
this._xscale = 100;
}
if (this.posY + 100 > hero_mc._y) {
this.speedY = -3;
}
if (this.posY < hero_mc._y) {
this.speedY = 3;
}
};
game.pasukan5.prototype.shoot = function () {
if (!isPaused) {
++enemy_mc.depth;
var v2 = 'peluru' + enemy_mc.depth;
enemy_mc.attachMovie('Fireball2', v2, enemy_mc.depth);
enemy_mc[v2]._x = this._x + this._xscale;
enemy_mc[v2]._y = this._y - 50;
enemy_mc[v2].attack = this.attack;
enemy_mc[v2].difX = hero_mc._x - this.posX;
enemy_mc[v2].difY = hero_mc._y - this.posY;
enemy_mc[v2].bounced = false;
enemy_mc[v2].cacheAsBitmap = true;
enemy_mc[v2].onEnterFrame = function () {
if (!isPaused) {
this.posX = this._x + enemy_mc._x;
this.posY = this._y - enemy_mc._y;
this.jarakX = hero_mc._x - this.posX;
this.jarakY = hero_mc._y - hero_mc._height / 2 - this.posY;
this._x += 50 * Math.cos(Math.atan2(this.difY, this.difX));
this._y += 50 * Math.sin(Math.atan2(this.difY, this.difX));
smokeTraill(this._x, this._y);
if (this.posY > ground - this._height / 2) {
this._y = ground;
smokeEffect(this);
meledak(this);
}
if (Math.abs(this.jarakX) < 30 && Math.abs(this.jarakY) < 40) {
smokeEffect(this);
meledak(this);
}
if (Math.abs(this.jarakX) > 1000 || Math.abs(this.jarakY) > 600) {
delete this.onEnterFrame;
this.removeMovieClip();
}
}
};
}
};
game.pasukan5.prototype.cekPosition = function () {
this.jarak = hero_mc._x - this.posX;
if (this.jarak > 1200 || this.jarak < -1200) {
this._x += this.jarak * 2;
}
this.jarakY = hero_mc._y - hero_mc._height / 2 - (this.posY - 200);
if (this.isDead) {
this.gotoAndStop('dead');
}
};
game.pasukan5.prototype.cekTabrakan = function () {
if (Math.abs(this.jarak) < 100 && Math.abs(this.jarakY) < 200) {
return true;
}
};
game.pasukan5.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
this._x += this.speed;
this._y += this.speedY;
this.speed *= 0.98;
this.speedY *= 0.98;
if (this.cekNormalCondition()) {
if (Math.abs(this.jarak) < 300) {
this.kabur();
} else {
this.kejar();
}
}
if (this._y > ground - 50) {
this._y = ground - 50;
}
if (this.timer == 0 && Math.abs(this.jarak) < 700 && !this.isHit && !this.isDead) {
if (this.posX < hero_mc._x) {
this._xscale = 100;
}
if (this.posX > hero_mc._x) {
this._xscale = -100;
}
this.isAttack = true;
this.gotoAndStop('attack');
}
this.cekPosition();
if (this.cekTabrakan()) {
if (isNabrak || tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.life -= 5;
this.cekDeath();
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan6 = function () {};
game.pasukan6.prototype.__proto__ = game.pasukan3.prototype;
game.pasukan6.prototype.nomor = 6;
game.pasukan6.prototype.lifeAwal = 5;
game.pasukan6.prototype.life = game.pasukan6.prototype.lifeAwal;
game.pasukan6.prototype.attack = 30;
game.pasukan6.prototype.speed = 400;
game.pasukan6.prototype.forceXpow = 15;
game.pasukan6.prototype.forceXfrict = 0.4;
game.pasukan6.prototype.jumpAble = false;
game.pasukan6.prototype.scoreGet = 800;
game.pasukan6.prototype.kabur = function () {
if (Math.abs(this.jarak) < 200 && Math.abs(this.jarakY) < 100) {
panelEffectB(5);
this._parent.attachMovie('Smoke', 'smoke' + this._name, this._parent.depth++);
this._parent['smoke' + this._name]._x = this._x;
this._parent['smoke' + this._name]._y = this._y - this._height / 2;
if (this.posX < hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
}
if (this.posX > hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
}
} else {
this.gotoAndStop('idle');
}
};
game.pasukan6.prototype.shoot = function () {
if (!isPaused) {
++enemy_mc.depth;
var v2 = 'peluru' + enemy_mc.depth;
enemy_mc.attachMovie('Fireball3', v2, enemy_mc.depth);
enemy_mc[v2]._x = this._x;
enemy_mc[v2]._y = this._y - 80;
enemy_mc[v2].attack = this.attack;
enemy_mc[v2].speed = 8;
enemy_mc[v2].handling = 0.7;
enemy_mc[v2].moveX = 0;
enemy_mc[v2].moveY = 0;
enemy_mc[v2].bounced = false;
enemy_mc[v2].timer = 100;
enemy_mc[v2].cacheAsBitmap = true;
enemy_mc[v2].onEnterFrame = function () {
if (!isPaused) {
addParticle(this._x, this._y, 2, 10, 100, 75, 'Particle1', 'Particle2');
--this.timer;
if (this.timer <= 0) {
meledak(this);
}
doFollow(this, hero_mc);
if (Math.abs(this.jarakX) < 50 && Math.abs(this.jarakY) < 60) {
this.timer -= 100;
}
}
};
}
};
game.pasukan6.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kabur();
}
if (this.timer == 0 && Math.abs(this.jarak) < 600 && !this.isHit && !this.isDead) {
if (this.posX < hero_mc._x) {
this._xscale = 100;
}
if (this.posX > hero_mc._x) {
this._xscale = -100;
}
this.isAttack = true;
this.gotoAndStop('attack');
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
panelEffectB(6);
this.life -= blamPower;
this.cekDeath();
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan7 = function () {};
game.pasukan7.prototype.__proto__ = game.armyClass.prototype;
game.pasukan7.prototype.nomor = 7;
game.pasukan7.prototype.speed = 3;
game.pasukan7.prototype.lifeAwal = 3;
game.pasukan7.prototype.life = game.pasukan7.prototype.lifeAwal;
game.pasukan7.prototype.flyPow = 5;
game.pasukan7.prototype.kepakSpeedAwal = 15;
game.pasukan7.prototype.kepakSpeed = 0;
game.pasukan7.prototype.flyingUnit = true;
game.pasukan7.prototype.forceXpow = 15;
game.pasukan7.prototype.forceXfrict = 0.4;
game.pasukan7.prototype.scoreGet = 250;
game.pasukan7.prototype.soundHit = 'PUNCH';
game.pasukan7.prototype.soundDead = 'PUNCH';
game.pasukan7.prototype.kejar = function () {
if (this.posX + 50 < hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
}
if (this.posX - 50 > hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
}
};
game.pasukan7.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (!this.isDead) {
if (this.kepakSpeed > 0) {
--this.kepakSpeed;
} else {
this.jumpPow = this.flyPow;
this.isJumping = true;
this.kepakSpeed = this.kepakSpeedAwal;
}
if (!this.isAttack) {
this.kejar();
}
if (this.jarakY > 100) {
this.flyPow = 1.2;
} else {
if (jarakY <= 100) {
this.flyPow = 4;
}
}
if (Math.abs(this.jarak) < 150 && this.jarakY < 120 && this.jarakY > 20 && !this.isHit && !this.isDead) {
this.isAttack = true;
this.gotoAndStop('attack');
if (this.mc.hit.hitTest(hero_mc) && !tornadoMode && !pressedDown) {
if (!rageMode) {
forceX = 5 * (this._xscale / 100);
}
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
}
}
}
this.cekPosition();
if (this.isJumping && !this.isAttack) {
this.gotoAndStop('walking');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra / 3;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (this.cekTabrakan()) {
if (isNabrak || tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
this.cekDeath();
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan8 = function () {};
game.pasukan8.prototype.__proto__ = game.pasukan2.prototype;
game.pasukan8.prototype.nomor = 8;
game.pasukan8.prototype.lifeAwal = 12;
game.pasukan8.prototype.life = game.pasukan8.prototype.lifeAwal;
game.pasukan8.prototype.speed = 8;
game.pasukan8.prototype.idleTime = 200;
game.pasukan8.prototype.scoreGet = 500;
game.pasukan8.prototype.jarakLihat = 400;
game.pasukan8.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.idleTime > 0) {
--this.idleTime;
if (this.cekNormalCondition()) {
this.kabur();
}
} else {
if (this.cekNormalCondition()) {
this.kejar();
}
}
if (Math.abs(this.jarak) < 50 && Math.abs(this.jarakY) < 80 && !this.isHit && !this.isDead && this.idleTime <= 0) {
this.isAttack = true;
this.gotoAndStop('attack');
if (this.hit && !tornadoMode) {
if (!rageMode) {
forceX = 5 * (this._xscale / 100);
}
if (this.attack - def > 0) {
life -= this.attack - def;
} else {
life -= 1;
}
panelEffectA(1);
panelEffectB(7);
}
}
this.cekPosition();
if (this.isJumping) {
this.gotoAndStop('jump');
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
if (this._currentframe == 3) {
this.gotoAndStop('idle');
}
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (isNabrak) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
}
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = 15 + random(10);
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan9 = function () {};
game.pasukan9.prototype.__proto__ = game.pasukan6.prototype;
game.pasukan9.prototype.nomor = 9;
game.pasukan9.prototype.lifeAwal = 150;
game.pasukan9.prototype.life = game.pasukan9.prototype.lifeAwal;
game.pasukan9.prototype.attack = 20;
game.pasukan9.prototype.def = 3;
game.pasukan9.prototype.speed = 350;
game.pasukan9.prototype.speedMove = 3;
game.pasukan9.prototype.flyingUnit = true;
game.pasukan9.prototype.forceXpow = 12;
game.pasukan9.prototype.forceXfrict = 0.9;
game.pasukan9.prototype.timer = 0;
game.pasukan9.prototype.jumpPow = 0;
game.pasukan9.prototype.jumpAble = false;
game.pasukan9.prototype.scoreGet = 10000;
game.pasukan9.prototype.cekNormalCondition = function () {
if (!this.isHit && !this.isAttack && !this.isDead) {
return true;
}
};
game.pasukan9.prototype.kabur = function () {
if (Math.abs(this.jarak) < 200 && Math.abs(this.jarakY) < 100) {
panelEffectB(11);
++this._parent.depth;
this._parent.attachMovie('Smoke', 'smoke' + this._parent.depth, this._parent.depth);
this._parent['smoke' + this._parent.depth]._x = this._x;
this._parent['smoke' + this._parent.depth]._y = this._y - this._height / 2;
if (this.posX < hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
}
if (this.posX > hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
}
} else {
this.gotoAndStop('idle');
this.isHit = false;
this.isAttack = false;
}
};
game.pasukan9.prototype.kejar = function () {
this.gotoAndStop('walking');
if (this.posX + 100 < hero_mc._x) {
this._x += this.speedMove;
this._xscale = 100;
}
if (this.posX - 100 > hero_mc._x) {
this._x -= this.speedMove;
this._xscale = -100;
}
if (this.posY + 100 < hero_mc._y) {
this._y += this.speedMove;
}
if (this.posY - 100 > hero_mc._y) {
this._y -= this.speedMove;
}
};
game.pasukan9.prototype.updateFrame = function () {
if (!isPaused) {
if (this.life <= 0) {
this.life = 0;
}
debug.boss.bar._xscale = (this.life / this.lifeAwal) * 100;
trace(this.jarak);
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
if (Math.abs(this.jarak) < 100) {
this.kabur();
} else {
this.kejar();
if (this.timer > 0) {
--this.timer;
}
}
}
if (this._y > ground - 100 && !this.isDead) {
this._y = ground - 100;
}
if (this.isDead) {
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
}
if (this._y - this.jumpPow >= ground) {
this._y = ground;
this.jumpPow = 0;
delete this.onEnterFrame;
}
if (this.timer <= 0) {
if (this.posX < hero_mc._x) {
this._xscale = 100;
}
if (this.posX > hero_mc._x) {
this._xscale = -100;
}
if (Math.abs(this.jarak) < 300 && Math.abs(this.jarakY) < 400) {
this.isAttack = true;
this.gotoAndStop('attack');
this.timer = 60;
panelEffectB(10);
}
}
if (this.cekTabrakan()) {
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = attack * 2;
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
this.kabur();
}
}
this.cekPosition();
this.cekPukulan();
}
};
game.pasukan11 = function () {};
game.pasukan11.prototype.__proto__ = game.pasukan1.prototype;
game.pasukan11.prototype.nomor = 11;
game.pasukan11.prototype.lifeAwal = 3;
game.pasukan11.prototype.life = game.pasukan11.prototype.lifeAwal;
game.pasukan11.prototype.speed = 3.5;
game.pasukan11.prototype.soundHit = 'chicken';
game.pasukan11.prototype.soundDead = 'chicken';
game.pasukan11.prototype.scoreGet = 100;
game.pasukan11.prototype.kabur = function () {
if (Math.abs(this.jarak) < 200) {
this.timer = 100;
this.jumpPow = 5 + random(10);
this.rot = 0;
this.isJumping = true;
this.gotoAndStop('walking');
_root.soundFX(this.soundHit + (1 + random(6)));
}
if (this.timer > 0) {
this.gotoAndStop('walking');
--this.timer;
if (this.posX < hero_mc._x) {
this._x -= this.speed;
this._xscale = -100;
this.jumpPowX = -1 - random(5);
}
if (this.posX > hero_mc._x) {
this._x += this.speed;
this._xscale = 100;
this.jumpPowX = 1 + random(5);
}
} else {
this.gotoAndStop('idle');
}
};
game.pasukan11.prototype.updateFrame = function () {
if (!isPaused) {
this.getPos();
this.cekBeingHit();
if (this.cekNormalCondition()) {
this.kabur();
}
this.cekPosition();
if (this.isJumping) {
if (!this.isDead) {
this.gotoAndStop('walking');
} else {
this.gotoAndStop('jump');
}
this._x += this.jumpPowX;
this._y -= this.jumpPow;
this.jumpPow -= gra;
this._rotation += this.rot;
}
if (this._y - this.jumpPow >= ground) {
this.isJumping = false;
this._y = ground;
this.jumpPow = 0;
this._rotation = 0;
this.cekDeath();
}
if (Math.abs(this.jarak) <= blamRange) {
if (injak) {
if (!this.isJumping) {
this.isJumping = true;
this.jumpPow = blamPower - random(10);
this.life -= blamPower / this.def;
}
}
}
if (this.cekTabrakan()) {
if (isNabrak) {
if (!this.isJumping) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = attack * 2;
if (attack - this.def > 0) {
var v3 = attack - this.def;
} else {
var v3 = 1;
}
this.life -= v3;
}
}
if (tornadoMode) {
comboEffect();
_root.soundFX('PUNCH' + (1 + random(6)));
this.jumpPowX = (this.jarak / Math.abs(this.jarak)) * (2 + random(8));
this.isJumping = true;
this.jumpPow = attack * 2;
if (attack - this.def > 0) {
v3 = attack - this.def;
} else {
v3 = 1;
}
this.life -= v3;
}
}
this.cekPukulan();
this.cekLedakan();
}
};
game.pasukan12 = function () {};
game.pasukan12.prototype.__proto__ = game.pasukan1.prototype;
game.pasukan12.prototype.nomor = 12;
game.pasukan12.prototype.speed = 4;
game.pasukan12.prototype.lifeAwal = 1;
game.pasukan12.prototype.life = game.pasukan12.prototype.lifeAwal;
game.pasukan12.prototype.soundHit = 'PUNCH';
game.pasukan12.prototype.soundDead = 'woman_dead';
game.pasukan12.prototype.scoreGet = -1000;
game.pasukan13 = function () {};
game.pasukan13.prototype.__proto__ = game.pasukan2.prototype;
game.pasukan13.prototype.nomor = 13;
game.pasukan13.prototype.lifeAwal = 999999;
game.pasukan13.prototype.life = game.pasukan13.prototype.lifeAwal;
game.pasukan13.prototype.forceXpow = 15;
game.pasukan13.prototype.forceXfrict = 0.8;
game.pasukan13.prototype.jarakLihat = 200;
game.pasukan13.prototype.attack = 0;
game.pasukan13.prototype.attackRange = 80;
game.pasukan13.prototype.scoreGet = 50000;
_root.createEmptyMovieClip('enemy_mc', 1);
enemy_mc.depth = 0;
var namaBonus = new Array();
namaBonus[1] = 'Life Point!';
namaBonus[2] = 'Energy Supply!';
namaBonus[3] = 'Tornado Mode!';
namaBonus[4] = 'Rage Mode!';
enemy_mc.onEnterFrame = function () {
if (!isPaused) {
this._x -= speed;
}
};
if (scene == 22) {
summonMusuh(13);
}
if (scene == 6) {
summonMusuh(9);
}
debug.timer_mc._visible = false;
var indexAttack = 0;
var attcounter;
var keydownAttack = false;
var keydownDefense = false;
var isDefensePosition = false;
var ready = true;
var slotBarrel = false;
var rageMode = false;
var rageTimer = 0;
var tornadoMode = false;
var tornadoTimer = 0;
var enemyKilled = 0;
var timerStage = 0;
var combo = 0;
var comboTimer = 0;
var comboTimerMax = 75;
_root.onEnterFrame = function () {
if (!isPaused) {
t = getTimer();
framerate = Math.round(1000 / (t - o));
o = t;
++timerStage;
if (comboTimer > 0) {
--comboTimer;
} else {
cekComboEffect();
combo = 0;
comboTimer = comboTimerMax;
}
debug.score.text = score;
debug.framerate.text = framerate;
debug.lifebar.bar._xscale = (life / lifeAwal) * 100;
debug.energybar.bar._xscale = (energy / energyAwal) * 100;
debug._x = -_root._x;
if (life > 0) {
if (life < lifeAwal) {
life += regenerate;
} else {
life = lifeAwal;
}
if (energy < energyAwal) {
energy += regenerate;
} else {
energy = energyAwal;
}
runTimer();
if (scene == 21 || scene == 22) {
if (bonusStageTimer > 0) {
--bonusStageTimer;
} else {
gotoAndStop('summary');
}
debug.timer_mc._visible = true;
debug.timer_mc.timer.text = (convertTimer(bonusStageTimer)).detik + ' sec. left';
}
if (scene == 11) {
++bonusStageTimer;
debug.timer_mc._visible = true;
debug.timer_mc.timer.text = (convertTimer(bonusStageTimer)).menit + ' min ' + (convertTimer(bonusStageTimer)).detik + ' sec';
if ((convertTimer(bonusStageTimer)).menit >= 5) {
newAchievement(11);
}
if ((convertTimer(bonusStageTimer)).menit >= 15) {
newAchievement(12);
}
}
pressedRight = false;
pressedLeft = false;
pressedUp = false;
pressedDown = false;
pressedJump = false;
pressedHit = false;
pressedDefense = false;
pressedGrab = false;
if (Key.isDown(39)) {
pressedRight = true;
}
if (Key.isDown(37)) {
pressedLeft = true;
}
if (Key.isDown(38)) {
pressedUp = true;
}
if (Key.isDown(40)) {
pressedDown = true;
}
if (Key.isDown(38)) {
pressedJump = true;
}
if (Key.isDown(83)) {
pressedHit = true;
}
if (Key.isDown(65)) {
pressedDefense = true;
}
if (Key.isDown(68)) {
pressedGrab = true;
}
if (rageMode) {
--rageTimer;
setOrange(hero_mc);
addGlow(hero_mc);
} else {
setOriginalColor(hero_mc);
if (!isNabrak) {
removeGlow(hero_mc);
}
hero_mc.rage_mc.removeMovieClip();
}
if (rageTimer <= 0) {
rageMode = false;
}
if (tornadoMode) {
if (tornadoTimer > 0) {
--tornadoTimer;
hero_mc.gotoAndStop('tornado');
if (pressedRight) {
hero_mc._xscale = 100;
isRunning = true;
pressedLeft = false;
pressedHit = false;
}
if (pressedLeft) {
hero_mc._xscale = -100;
isRunning = true;
pressedRight = false;
pressedHit = false;
}
} else {
tornadoTimer = 0;
}
}
if (indexAttack > 0) {
--attcounter;
}
if (pressedHit && !pressedDefense && !keydownAttack && ready && !isJumping && !isFlying && !isHurt && !blam && !pressedGrab && !slotBarrel && !tornadoMode) {
if (pressedDown) {
if (energy > 15) {
hero_mc.gotoAndStop('attackCombo1');
}
} else {
if (energy > 5) {
attcounter = 20;
if (indexAttack > 3) {
indexAttack = 1;
} else {
++indexAttack;
}
hero_mc.gotoAndStop('attack' + (1 + random(2)) + '_' + indexAttack);
if (Math.abs(speed) > 0) {
speed *= frict;
}
_root._x += -_root._x / 8;
debug._x = -_root._x;
}
}
if (Math.abs(speed) >= speedMax - 2) {
if (energy > 20) {
hero_mc.gotoAndStop('attackCombo2');
}
}
isRunning = false;
}
isHit = indexAttack;
if (pressedHit) {
keydownAttack = true;
} else {
keydownAttack = false;
}
if (attcounter <= 0) {
indexAttack = 0;
}
if (pressedDefense && !pressedHit && !keydownAttack && ready && !isJumping && !isFlying && !isHurt && !blam && !pressedGrab && !slotBarrel && !tornadoMode) {
if (energy > 5) {
hero_mc.gotoAndStop('defense' + (1 + random(2)));
}
if (Math.abs(speed) > 0) {
speed *= frict;
}
isDefense = true;
isRunning = false;
}
if (pressedDefense) {
keydownDefense = true;
} else {
keydownDefense = false;
}
def = 3;
if (pressedDown && !pressedGrab && !isFlying && !isJumping && ready && !isHurt && !blam && !pressedHit && !pressedDefense && !tornadoMode) {
if (Math.abs(speed) > 1) {
speed *= frict;
isNgesot = true;
smokeTraill(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y - 10);
}
def = 6;
hero_mc.gotoAndStop('ndodok');
isRunning = false;
}
availableCewe = undefined;
for (var v4 in enemy_mc) {
if (enemy_mc[v4].nomor == 12) {
var v2 = enemy_mc[v4];
if (Math.abs(v2.jarak) < 50) {
if (availableCewe == undefined && !slotCewe) {
availableCewe = v2;
}
}
}
}
availableBarrel = undefined;
for (v4 in enemy_mc) {
if (enemy_mc[v4]._name.substr(0, 5) == 'benda') {
var v3 = enemy_mc[v4];
if (Math.abs(v3.jarak) < 50) {
if (availableBarrel == undefined && !slotBarrel) {
availableBarrel = v3;
}
}
}
}
if (pressedGrab && !pressedRight && !pressedLeft && !pressedHit && !pressedDefense && !isHurt && !blam && !isJumping && !isFlying && !tornadoMode) {
if (slotBarrel) {
hero_mc.gotoAndStop('lempar');
hero_mc.char.gotoAndStop('last');
}
if (availableBarrel != undefined && !isGrabbingCewe) {
hero_mc.gotoAndStop('lempar');
delete availableBarrel.onEnterFrame;
availableBarrel.removeMovieClip();
availableBarrel = undefined;
}
if (availableCewe != undefined && !isGrabbingCewe) {
hero_mc.gotoAndStop('grabCewe');
delete availableCewe.onEnterFrame;
availableCewe.removeMovieClip();
availableCewe = undefined;
}
speed *= frict;
isRunning = false;
isFlying = false;
if (isJumping) {
pressedGrab = false;
}
}
if (slotBarrel) {
if (!pressedGrab) {
hero_mc.gotoAndStop('throwing');
}
}
isRunning = false;
isNgesot = false;
if (pressedRight && !isJumping && !isFlying && !isHurt && !blam && !pressedHit && !pressedDefense && !pressedDown && !slotBarrel) {
if (speed < -3) {
speed *= frict;
isNgesot = true;
smokeTraill(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y - 10);
if (!tornadoMode) {
hero_mc.gotoAndStop('ngesot');
}
} else {
if (speed < 0) {
speed = 0;
}
hero_mc._xscale = 100;
isNgesot = false;
isRunning = true;
speed += accel;
}
pressedLeft = false;
pressedHit = false;
pressedGrab = false;
}
if (pressedLeft && !isJumping && !isFlying && !isHurt && !blam && !pressedHit && !pressedDefense && !pressedDown && !slotBarrel) {
if (speed > 3) {
speed *= frict;
isNgesot = true;
smokeTraill(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y - 10);
if (!tornadoMode) {
hero_mc.gotoAndStop('ngesot');
}
} else {
if (speed > 0) {
speed = 0;
}
hero_mc._xscale = -100;
isNgesot = false;
isRunning = true;
speed -= accel;
}
pressedRight = false;
pressedHit = false;
pressedGrab = false;
}
if (pressedRight && slotBarrel && pressedGrab && !isJumping && !isFlying && !isHurt && !blam && !pressedHit && !pressedDefense && !pressedDown && !tornadoMode) {
speed = 4;
hero_mc.gotoAndStop('walkingBarrel');
hero_mc._xscale = 100;
isRunning = true;
pressedLeft = false;
pressedHit = false;
}
if (pressedLeft && slotBarrel && pressedGrab && !isJumping && !isFlying && !isHurt && !blam && !pressedHit && !pressedDefense && !pressedDown && !tornadoMode) {
speed = -4;
hero_mc.gotoAndStop('walkingBarrel');
hero_mc._xscale = -100;
isRunning = true;
pressedRight = false;
pressedHit = false;
}
if (!isRunning && !isJumping && !isFlying && !isHurt && isHit <= 0) {
speed *= frict;
if (Math.abs(speed) < 0.4) {
speed = 0;
}
}
if (!isRunning && !isFlying && !isJumping && !isHurt && !blam && speed == 0 && isHit <= 0 && !pressedDown && !pressedGrab && !slotBarrel && !tornadoMode && !isDefense) {
hero_mc.gotoAndStop('idle');
}
if (Math.abs(speed) > 0 && ready && !isFlying && !isNgesot && !isJumping && !isHurt && !blam && !isNabrak && isHit <= 0 && !isDefense && !pressedDown && (!pressedGrab && !slotBarrel) && !tornadoMode) {
if (Math.abs(speed) >= speedMax) {
hero_mc.gotoAndStop('walking3');
smokeTraill(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y - 10);
} else {
if (Math.abs(speed) >= speedMax / 4 && Math.abs(speed) <= 2 * speedMax / 3) {
hero_mc.gotoAndStop('walking1');
} else {
if (Math.abs(speed) < speedMax / 4) {
hero_mc.gotoAndStop('walking0');
} else {
hero_mc.gotoAndStop('walking2');
}
}
}
}
if (isFlying && !isRunning && !isJumping && !blam && !isGrab && !isHurt && !grabSlot && isHit <= 0 && !isDefense && !tornadoMode) {
hero_mc.gotoAndStop('flying');
}
if (isNabrak && isRunning && !isFlying && !isJumping && !isHurt && !blam && isHit <= 0 && !isDefense && !pressedDown && !pressedGrab && !tornadoMode) {
hero_mc.gotoAndStop('nabrak');
smokeTraill(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y);
}
if (speed >= speedMax || speed <= -speedMax) {
if (Key.isDown(16) && energy >= 20) {
isNabrak = true;
panelEffectA(5);
}
}
if (isNabrak) {
if (energy > 0) {
_root._x += -_root._x / 8;
debug._x = -_root._x;
--energy;
} else {
isNabrak = false;
}
addGlow(hero_mc);
addParticle(hero_mc._x - enemy_mc._x, hero_mc._y - enemy_mc._y - hero_mc._height / 2, 3, 10, 100, 75, 'Particle_hero1', 'Particle_hero1');
} else {
if (!rageMode) {
removeGlow(hero_mc);
}
}
if (isRunning || isFlying) {
_root._x -= speed / 10;
debug._x += speed / 10;
if (_root._x <= -200) {
_root._x = -200;
}
if (_root._x >= 200) {
_root._x = 200;
}
} else {
_root._x += -_root._x / 40;
debug._x = -_root._x;
}
if (speed >= speedMax) {
speed = speedMax;
}
if (speed <= -speedMax) {
speed = -speedMax;
}
if (pressedJump && !isJumping && !isFlying && !isHurt && !blam && isHit <= 0 && !isDefense && !pressedDown && !pressedGrab && !tornadoMode) {
jump = jumpPow - Math.abs(speed / 4);
hero_mc._y += jump;
isJumping = true;
slotBarrel = false;
}
if (hero_mc._y + jump >= ground) {
hero_mc._y = ground;
bgg_mc._y = 0;
bgg1b_mc._y = 0;
bgg2_mc._y = 0;
bgg3_mc._y = 0;
enemy_mc._y = 0;
isJumping = false;
isFlying = false;
if (blam) {
if (!injak) {
_root.soundFX('BLAM');
debuEffect(hero_mc);
flashEffect();
efekSerpihan('SerpihanA', 0, ground);
}
injak = true;
speed = 0;
blamPower = Math.abs(jump) / 2;
shock(15 + blamPower / 5);
hero_mc.gotoAndStop('blam');
}
if (grabSlot) {
throwEnemy(grabSlot);
}
grabSlot = false;
}
if (speed < speedMax && speed > -speedMax) {
isFlying = false;
}
if (isJumping && !isFlying) {
pressedGrab = false;
if (!blam && !jumpAttack) {
blamPower = 0;
hero_mc.gotoAndStop('jump');
}
if (pressedHit && !jumpAttack) {
hero_mc.gotoAndStop('attackFly');
jumpAttack = true;
}
if (bgg_mc._y <= 0 && hero_mc._y + jump > 150) {
hero_mc._y += jump;
} else {
bgg_mc._y -= jump;
bgg1b_mc._y -= jump / 2;
bgg2_mc._y -= jump / 4;
bgg3_mc._y -= jump / 6;
enemy_mc._y -= jump;
}
jump += gra;
if (jump > 0) {
if ((speed >= speedMax || speed <= -speedMax) && !blam) {
if (speed >= speedMax && !blam) {
if (pressedRight) {
isFlying = true;
} else {
isFlying = false;
}
} else {
if (speed <= -speedMax && !blam) {
if (pressedLeft) {
isFlying = true;
} else {
isFlying = false;
}
}
}
}
if ((pressedJump || pressedDown) && !jumpAttack) {
if (energy > 0) {
_root._x += -_root._x / 8;
debug._x = -_root._x;
blam = true;
jump *= 1.2;
blamPower += 2;
energy -= 2;
if (blamPower > 20) {
newAchievement(9);
}
}
}
}
flyPower = 3;
}
if (!isJumping) {
jumpAttack = false;
}
if (isFlying) {
blam = false;
isRunning = false;
isJumping = false;
if (flyPower < 0) {
if (hero_mc._y >= 150) {
hero_mc._y += flyPower;
} else {
if (bgg_mc._y - flyPower < 1650) {
bgg_mc._y -= flyPower;
bgg1b_mc._y -= flyPower / 2;
bgg2_mc._y -= flyPower / 4;
bgg3_mc._y -= flyPower / 6;
enemy_mc._y -= flyPower;
} else {
flyPower = 0;
}
}
} else {
if (bgg_mc._y <= 0) {
hero_mc._y += flyPower;
} else {
bgg_mc._y -= flyPower;
bgg1b_mc._y -= flyPower / 2;
bgg2_mc._y -= flyPower / 4;
bgg3_mc._y -= flyPower / 6;
enemy_mc._y -= flyPower;
}
}
if (pressedUp) {
flyPower -= accel;
}
if (pressedDown) {
flyPower += accel;
}
if (!pressedDown && !pressedUp) {
flyPower *= frict;
}
if (speed >= speedMax && !blam) {
if (pressedRight) {
isFlying = true;
} else {
isFlying = false;
}
} else {
if (speed <= -speedMax && !blam) {
if (pressedLeft) {
isFlying = true;
} else {
isFlying = false;
}
}
}
jump = flyPower;
if (pressedGrab) {
if (grabSlot) {
hero_mc.char.gotoAndStop('slot');
hero_mc.char.victim_mc.gotoAndStop(grabSlot);
} else {
isGrab = true;
hero_mc.gotoAndStop('grab');
}
} else {
isGrab = false;
if (grabSlot) {
hero_mc.char.play();
} else {
hero_mc.char.gotoAndStop(7);
}
}
++flyDuration;
if (flyDuration >= 900) {
newAchievement(9);
}
}
if (Math.abs(speed) <= speedMax - 3) {
isFlying = false;
isGrab = false;
}
if (!isFlying) {
flyDuration = 0;
}
if (!pressedRight && !pressedLeft || isHurt) {
isFlying = false;
isGrab = false;
if (grabSlot) {
throwEnemy(grabSlot);
grabSlot = false;
}
}
if (bgg_mc._y <= 0) {
bgg_mc._y = 0;
bgg1b_mc._y = 0;
bgg2_mc._y = 0;
bgg3_mc._y = 0;
enemy_mc._y = 0;
}
if (hero_mc._y < ground && !isFlying) {
isJumping = true;
slotBarrel = false;
}
if (Math.abs(forceX) > 0.1) {
speed = 0;
frict = 0.8;
isNabrak = false;
isHit = false;
isDefense = false;
isDefensePosition = false;
isHurt = true;
if (slotBarrel) {
throwBarrel(0);
slotBarrel = false;
}
if (!pressedDown) {
hero_mc.gotoAndStop('hurt');
}
} else {
frict = frictAwal;
isHurt = false;
}
speed += forceX;
forceX *= 0.5;
if (String(forceX) == 'NaN') {
forceX = 0;
}
} else {
isHurt = false;
isJumping = isHurt;
isFlying = isJumping;
isRunning = isFlying;
_x = 0;
life = 0;
speed = 0;
forceX = 0;
hero_mc.gotoAndStop('dead');
if (hero_mc._y < ground) {
hero_mc._y += jump;
jump += gra;
}
}
}
};
var arrayObject = new Array();
for (var i in _root) {
if (_root[i]._x != undefined) {
arrayObject.push(_root[i]);
}
}
soundBGM('battlesong');
if (scene == 21 || scene == 22) {
soundBGM('bonusstagesong');
}
Key.removeListener(keyListener);
var keyListener = new Object();
keyListener.onKeyDown = function () {
if (Key.isDown(80)) {
if (!isPaused) {
setPauseMode();
} else {
setPauseClear();
}
}
if (Key.isDown(35)) {
if (!rageMode) {
rageMode = true;
} else {
rageMode = false;
}
}
};
keyListener.onKeyUp = function () {
isNabrak = false;
};
Key.addListener(keyListener);
}
frame 16 {
stop();
soundFX('drum');
var sceneTimeLimit = new Array();
sceneTimeLimit[1] = 5000;
sceneTimeLimit[2] = 10000;
sceneTimeLimit[3] = 15000;
sceneTimeLimit[4] = 20000;
sceneTimeLimit[5] = 25000;
sceneTimeLimit[6] = 30000;
sceneTimeLimit[7] = 30000;
sceneTimeLimit[10] = 5000;
sceneTimeLimit[11] = 5000;
sceneTimeLimit[12] = 5000;
sceneTimeLimit[21] = 5000;
sceneTimeLimit[22] = 5000;
tulisan2.text = 'Enemies Killed Bonus';
play_teks.text = 'Play';
if (isCustomGame) {
play_teks.text = 'Back';
}
teks_survivalMode._visible = false;
if ((convertTimer(bonusStageTimer)).menit > 1) {
var satuanMenit = ' minutes ';
} else {
var satuanMenit = ' minute ';
}
if ((convertTimer(bonusStageTimer)).detik > 1) {
var satuanDetik = ' seconds ';
} else {
var satuanDetik = ' second ';
}
teks_survivalMode.text = 'You survived ' + (convertTimer(bonusStageTimer)).menit + satuanMenit + (convertTimer(bonusStageTimer)).detik + satuanDetik + 'in survival mode';
teks_score.text = score;
teks_lifeBonus.text = Math.round(life) * 50;
teks_enemyKilled.text = enemyKilled * 100;
teks_comboChain.text = maxCombo * 100;
if (sceneTimeLimit[scene] - timerStage >= 0) {
teks_timeBonus.text = sceneTimeLimit[scene] - timerStage;
} else {
teks_timeBonus.text = 0;
}
if (scene == 11) {
play_teks.text = 'Back';
teks_timeBonus.text = timerStage;
teks_survivalMode._visible = true;
}
if (scene == 21) {
tulisan2.text = 'Chicken Killed Bonus';
if (isCustomGame) {
play_teks.text = 'Back';
}
if (enemyKilled > 1) {
var satuanAyam = ' chickens';
} else {
var satuanAyam = ' chicken';
}
teks_survivalMode._visible = true;
teks_survivalMode.text = 'You killed ' + enemyKilled + satuanAyam + '!';
}
if (scene == 22) {
if (isCustomGame) {
play_teks.text = 'Back';
}
if (ceweGet > 1) {
var satuanCewe = ' girls';
} else {
var satuanCewe = ' girl';
}
teks_survivalMode._visible = true;
teks_survivalMode.text = 'You kissed ' + ceweGet + satuanCewe + '!';
}
score += Math.round(life) * 50 + enemyKilled * 100 + Number(teks_comboChain.text) + Number(teks_timeBonus.text);
teks_totalScore.text = score;
submit_btn.onRelease = function () {
var v2 = {'n': [14, 2, 3, 15, 7, 9, 0, 11, 10, 8, 15, 1, 0, 13, 8, 8], '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, 'd6b491d5474ca3e7');
mochi.as2.MochiScores.showLeaderboard({'boardID': v3, 'score': Number(teks_totalScore.text), 'onClose': function () {
clip.stop();
}});
};
clearTimer();
clearStage();
play_btn.onRelease = function () {
if (scene == 10 || scene == 11 || scene == 12 || isCustomGame) {
gotoAndStop('menu');
soundBGM('opening song');
} else {
gotoAndStop('story');
}
};
if (scene == 21 || scene == 22) {
scene = savedScene;
} else {
++scene;
if (sceneSave < scene) {
sceneSave = scene;
}
if (scene == 7) {
newAchievement(10);
}
}
logo_btn.onRelease = function () {
newAchievement(14);
getURL('http://www.ludobox.com/', '_blank');
};
saveData();
Key.removeListener(keyListener);
}
// unknown tag 88 length 66
frame 17 {
if (scene == 10 || scene == 11 || scene == 12 || isCustomGame) {
gotoAndStop('menu');
soundBGM('opening song');
} else {
gotoAndStop('story');
}
}
frame 18 {
stop();
clearTimer();
clearStage();
_root.attachMovie('btn_skip', 'skip_btn', 2);
skip_btn._x = 600;
skip_btn._y = 20;
skip_btn.onRelease = function () {
story_mc.gotoAndStop('end');
this.removeMovieClip();
};
soundBGM2('endingBGM');
}
movieClip 2656 {
frame 442 {
stop();
_root.skip_btn._visible = 0;
play_btn.onRelease = function () {
_root.soundBGM('opening song');
_root.gotoAndStop('menu');
};
logo_btn.onRelease = function () {
getURL('http://www.ludobox.com/', '_blank');
};
scoreTeks.text = _root.score;
submit_btn.onRelease = function () {
_root.gotoAndStop('submitEnd');
};
}
}
frame 19 {
var o = {'n': [14, 2, 3, 15, 7, 9, 0, 11, 10, 8, 15, 1, 0, 13, 8, 8], '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, 'd6b491d5474ca3e7');
mochi.as2.MochiScores.showLeaderboard({'boardID': boardID, 'score': Number(_root.score)});
}
frame 20 {
soundBGM('opening song');
gotoAndStop('menu');
}