Frame 1
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
MochiAd.showPreloaderAd({id:"94fe0e32047c0829", res:"600x400"});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("loading");
}
Frame 5
stop();
Instance of Symbol 108 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
_game_name = "head_defence";
score_var = "_root.score";
}
Frame 6
stop();
_root.startMenu_mc._visible = false;
if (_root.soundManage == undefined) {
var soundManage = new SoundManage();
_root.soundManage.addMusic("mainm_s");
_root.soundManage.addSound("bigbang_s");
_root.soundManage.addSound("money_s");
}
var isMusicPlay;
var isSoundPlay;
if (_root.c_s == undefined) {
var c_s;
var p_s;
}
if (_root.isMusicPlay == undefined) {
_root.soundManage.playMusic("mainm_s", 9999);
_root.isMusicPlay = true;
}
if (_root.isSoundPlay == undefined) {
_root.isSoundPlay = true;
}
Instance of Symbol 158 MovieClip in Frame 6
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Instance of Symbol 3 MovieClip in Frame 6
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Frame 7
stop();
Frame 8
function degree() {
if (_root.level == 1) {
_root.nandu = "EASY";
} else if (_root.level == 2) {
_root.nandu = "NORMAL";
} else if (_root.level == 3) {
_root.nandu = "HARD";
}
}
stop();
var level = 2;
degree();
if (_root.c_s == undefined) {
_root.cpu_mc.head_mc.gotoAndStop(2);
_root.cpu_mc.hand1_mc.gotoAndStop(2);
_root.cpu_mc.hand2_mc.gotoAndStop(2);
_root.cpu_mc.foot1_mc.gotoAndStop(2);
_root.cpu_mc.foot2_mc.gotoAndStop(2);
_root.cpu_mc.body_mc.gotoAndStop(2);
} else {
_root.cpu_mc.head_mc.gotoAndStop(_root.c_s);
_root.cpu_mc.hand1_mc.gotoAndStop(_root.c_s);
_root.cpu_mc.hand2_mc.gotoAndStop(_root.c_s);
_root.cpu_mc.foot1_mc.gotoAndStop(_root.c_s);
_root.cpu_mc.foot2_mc.gotoAndStop(_root.c_s);
_root.cpu_mc.body_mc.gotoAndStop(_root.c_s);
}
if (_root.p_s == undefined) {
_root.player_mc.head_mc.gotoAndStop(1);
_root.player_mc.hand1_mc.gotoAndStop(1);
_root.player_mc.hand2_mc.gotoAndStop(1);
_root.player_mc.foot1_mc.gotoAndStop(1);
_root.player_mc.foot2_mc.gotoAndStop(1);
_root.player_mc.body_mc.gotoAndStop(1);
} else {
_root.player_mc.head_mc.gotoAndStop(_root.p_s);
_root.player_mc.hand1_mc.gotoAndStop(_root.p_s);
_root.player_mc.hand2_mc.gotoAndStop(_root.p_s);
_root.player_mc.foot1_mc.gotoAndStop(_root.p_s);
_root.player_mc.foot2_mc.gotoAndStop(_root.p_s);
_root.player_mc.body_mc.gotoAndStop(_root.p_s);
}
_root.cl_btn.onRelease = function () {
if (_root.cpu_mc.head_mc._currentframe != 1) {
_root.cpu_mc.head_mc.prevFrame();
_root.cpu_mc.head_mc.stop;
_root.cpu_mc.hand1_mc.prevFrame();
_root.cpu_mc.hand1_mc.stop;
_root.cpu_mc.hand2_mc.prevFrame();
_root.cpu_mc.hand2_mc.stop;
_root.cpu_mc.foot1_mc.prevFrame();
_root.cpu_mc.foot1_mc.stop;
_root.cpu_mc.foot2_mc.prevFrame();
_root.cpu_mc.foot2_mc.stop;
_root.cpu_mc.body_mc.prevFrame();
_root.cpu_mc.body_mc.stop;
} else {
_root.cpu_mc.head_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.head_mc.stop;
_root.cpu_mc.hand1_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.hand1_mc.stop;
_root.cpu_mc.hand2_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.hand2_mc.stop;
_root.cpu_mc.foot1_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.foot1_mc.stop;
_root.cpu_mc.foot2_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.foot2_mc.stop;
_root.cpu_mc.body_mc.gotoAndStop(_root.cpu_mc.head_mc._totalframes);
_root.cpu_mc.body_mc.stop;
}
if (_root.player_mc.head_mc._currentframe == _root.cpu_mc.head_mc._currentframe) {
_root.cl_btn.onRelease();
}
};
_root.cn_btn.onRelease = function () {
if (_root.cpu_mc.head_mc._currentframe != _root.cpu_mc.head_mc._totalframes) {
_root.cpu_mc.head_mc.nextFrame();
_root.cpu_mc.head_mc.stop;
_root.cpu_mc.hand1_mc.nextFrame();
_root.cpu_mc.hand1_mc.stop;
_root.cpu_mc.hand2_mc.nextFrame();
_root.cpu_mc.hand2_mc.stop;
_root.cpu_mc.foot1_mc.nextFrame();
_root.cpu_mc.foot1_mc.stop;
_root.cpu_mc.foot2_mc.nextFrame();
_root.cpu_mc.foot2_mc.stop;
_root.cpu_mc.body_mc.nextFrame();
_root.cpu_mc.body_mc.stop;
} else {
_root.cpu_mc.head_mc.gotoAndStop(1);
_root.cpu_mc.head_mc.stop;
_root.cpu_mc.hand1_mc.gotoAndStop(1);
_root.cpu_mc.hand1_mc.stop;
_root.cpu_mc.hand2_mc.gotoAndStop(1);
_root.cpu_mc.hand2_mc.stop;
_root.cpu_mc.foot1_mc.gotoAndStop(1);
_root.cpu_mc.foot1_mc.stop;
_root.cpu_mc.foot2_mc.gotoAndStop(1);
_root.cpu_mc.foot2_mc.stop;
_root.cpu_mc.body_mc.gotoAndStop(1);
_root.cpu_mc.body_mc.stop;
}
if (_root.player_mc.head_mc._currentframe == _root.cpu_mc.head_mc._currentframe) {
_root.cn_btn.onRelease();
}
};
_root.pl_btn.onRelease = function () {
if (_root.player_mc.head_mc._currentframe != 1) {
_root.player_mc.head_mc.prevFrame();
_root.player_mc.head_mc.stop;
_root.player_mc.hand1_mc.prevFrame();
_root.player_mc.hand1_mc.stop;
_root.player_mc.hand2_mc.prevFrame();
_root.player_mc.hand2_mc.stop;
_root.player_mc.foot1_mc.prevFrame();
_root.player_mc.foot1_mc.stop;
_root.player_mc.foot2_mc.prevFrame();
_root.player_mc.foot2_mc.stop;
_root.player_mc.body_mc.prevFrame();
_root.player_mc.body_mc.stop;
} else {
_root.player_mc.head_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.head_mc.stop;
_root.player_mc.hand1_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.hand1_mc.stop;
_root.player_mc.hand2_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.hand2_mc.stop;
_root.player_mc.foot1_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.foot1_mc.stop;
_root.player_mc.foot2_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.foot2_mc.stop;
_root.player_mc.body_mc.gotoAndStop(_root.player_mc.head_mc._totalframes);
_root.player_mc.body_mc.stop;
}
if (_root.player_mc.head_mc._currentframe == _root.cpu_mc.head_mc._currentframe) {
_root.pl_btn.onRelease();
}
};
_root.pn_btn.onRelease = function () {
if (_root.player_mc.head_mc._currentframe != _root.player_mc.head_mc._totalframes) {
_root.player_mc.head_mc.nextFrame();
_root.player_mc.head_mc.stop;
_root.player_mc.hand1_mc.nextFrame();
_root.player_mc.hand1_mc.stop;
_root.player_mc.hand2_mc.nextFrame();
_root.player_mc.hand2_mc.stop;
_root.player_mc.foot1_mc.nextFrame();
_root.player_mc.foot1_mc.stop;
_root.player_mc.foot2_mc.nextFrame();
_root.player_mc.foot2_mc.stop;
_root.player_mc.body_mc.nextFrame();
_root.player_mc.body_mc.stop;
} else {
_root.player_mc.head_mc.gotoAndStop(1);
_root.player_mc.head_mc.stop;
_root.player_mc.hand1_mc.gotoAndStop(1);
_root.player_mc.hand1_mc.stop;
_root.player_mc.hand2_mc.gotoAndStop(1);
_root.player_mc.hand2_mc.stop;
_root.player_mc.foot1_mc.gotoAndStop(1);
_root.player_mc.foot1_mc.stop;
_root.player_mc.foot2_mc.gotoAndStop(1);
_root.player_mc.foot2_mc.stop;
_root.player_mc.body_mc.gotoAndStop(1);
_root.player_mc.body_mc.stop;
}
if (_root.player_mc.head_mc._currentframe == _root.cpu_mc.head_mc._currentframe) {
_root.pn_btn.onRelease();
}
};
Frame 9
function between() {
_root.pchit = _root.pchit + 2;
if (_root.computer_mc._x > _root.player_mc._x) {
_root.computer_mc._x = _root.computer_mc._x + 5;
_root.player_mc._x = _root.player_mc._x - 5;
} else if (_root.computer_mc._x <= _root.player_mc._x) {
_root.computer_mc._x = _root.computer_mc._x - 5;
_root.player_mc._x = _root.player_mc._x + 5;
}
}
stop();
var rootTimer = 50;
var keyManage = new KeyManage();
_root.keyManage.setPlayer(_root.player_mc);
_root.player_mc._xscale = -100;
var myLis = new Object();
var pchit = 0;
var gameOver = false;
var score;
var isPause = false;
_root.overmenu_mc._visible = false;
_root.youwin_mc._visible = false;
_root.youlost_mc._visible = false;
_root.return_mc._visible = false;
_root.lifeview_mc.comlife_mc.setMask(_root.lifeview_mc.commask_mc);
_root.lifeview_mc.mylife_mc.setMask(_root.lifeview_mc.mymask_mc);
_root.lifeview_mc.commask_mc._x = _root.lifeview_mc.comlife_mc._x;
_root.lifeview_mc.mymask_mc._x = _root.lifeview_mc.mylife_mc._x - (_root.lifeview_mc.mymask_mc._width - _root.lifeview_mc.mylife_mc._width);
_root.player_mc.setSkin(_root.p_s);
_root.computer_mc.setSkin(_root.c_s);
_root.player_mc.turnSkin();
_root.computer_mc.turnSkin();
_root.computer_mc.setLevel(_root.level);
_root.onEnterFrame = function () {
if (_root.isPause == false) {
if (_root.gameOver == false) {
_root.pchit--;
if (_root.pchit < 0) {
_root.pchit = 0;
}
_root.keyManage.detectKeys();
_root.player_mc.jumpPlay();
_root.computer_mc.jumpPlay();
if (_root.player_mc.hit_mc.hitTest(_root.computer_mc.hit_mc)) {
_root.between();
}
if ((_root.player_mc._x + (_root.player_mc._width / 2)) > _root.myhome_mc._x) {
_root.player_mc._x = _root.myhome_mc._x - (_root.player_mc._width / 2);
}
if (_root.player_mc._x < (_root.hishome_mc._x + ((_root.hishome_mc._width * 3) / 2))) {
_root.player_mc._x = _root.hishome_mc._x + ((_root.hishome_mc._width * 3) / 2);
}
if ((_root.computer_mc._x + (_root.computer_mc._width / 2)) > _root.myhome_mc._x) {
_root.computer_mc._x = _root.myhome_mc._x - (_root.computer_mc._width / 2);
}
if (_root.computer_mc._x < (_root.hishome_mc._x + ((_root.hishome_mc._width * 3) / 2))) {
_root.computer_mc._x = _root.hishome_mc._x + ((_root.hishome_mc._width * 3) / 2);
}
for (var _local6 in _root.toolArray_mc) {
var _local2 = random(2);
if (_local2 == 0) {
if (_root.toolArray_mc[_local6].hit_mc.hitTest(_root.player_mc.hit_mc)) {
_root.player_mc.booo(_root.toolArray_mc[_local6]);
_root.relifeview_mc._x = _root.toolArray_mc[_local6]._x;
_root.relifeview_mc._y = _root.toolArray_mc[_local6]._y;
_root.relifeview_mc.gotoAndPlay(1);
_root.relifeview_mc.relife_mc.relife = "+" + String(_root.toolArray_mc[_local6].price * _root.level);
} else if (_root.toolArray_mc[_local6].hit_mc.hitTest(_root.computer_mc.hit_mc)) {
_root.computer_mc.booo(_root.toolArray_mc[_local6]);
}
} else if (_local2 == 1) {
if (_root.toolArray_mc[_local6].hit_mc.hitTest(_root.computer_mc.hit_mc)) {
_root.computer_mc.booo(_root.toolArray_mc[_local6]);
} else if (_root.toolArray_mc[_local6].hit_mc.hitTest(_root.player_mc.hit_mc)) {
_root.player_mc.booo(_root.toolArray_mc[_local6]);
_root.relifeview_mc._x = _root.toolArray_mc[_local6]._x;
_root.relifeview_mc._y = _root.toolArray_mc[_local6]._y;
_root.relifeview_mc.gotoAndPlay(1);
_root.relifeview_mc.relife_mc.relife = "+" + String(_root.toolArray_mc[_local6].price * _root.level);
}
}
}
_root.rootTimer--;
if (_root.rootTimer == 0) {
var _local3;
var _local5;
var _local6 = random(100);
if (_local6 < 50) {
_local5 = _root.toolArray_mc.attachMovie("powerMoney", ("powerMoney" + _root.toolArray_mc.getNextHighestDepth()) + "_mc", _root.toolArray_mc.getNextHighestDepth());
}
_local5._x = random(300) + 150;
_local5._y = -45;
var _local4 = random(99) + 1;
if (_local4 <= 20) {
_local3 = _root.ballArray_mc.attachMovie("ball3", ("ball" + _root.ballArray_mc.getNextHighestDepth()) + "_mc", _root.ballArray_mc.getNextHighestDepth());
_local3.setLevel(1);
} else if ((_local4 > 20) && (_local4 <= 70)) {
_local3 = _root.ballArray_mc.attachMovie("ball2", ("ball" + _root.ballArray_mc.getNextHighestDepth()) + "_mc", _root.ballArray_mc.getNextHighestDepth());
_local3.setLevel(2);
} else if (_local4 > 70) {
_local3 = _root.ballArray_mc.attachMovie("ball1", ("ball" + _root.ballArray_mc.getNextHighestDepth()) + "_mc", _root.ballArray_mc.getNextHighestDepth());
_local3.setLevel(3);
}
_local3._x = random(300) + 150;
_local3._y = -40;
_root.rootTimer = 70;
}
_root.score = _root.player_mc.money;
}
}
};
Instance of Symbol 396 MovieClip "return_mc" in Frame 9
/* no clip actions */
Frame 10
stop();
Instance of Symbol 3 MovieClip in Frame 10
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Instance of Symbol 158 MovieClip in Frame 10
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Symbol 2 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.freeworldgroup.com", "_blank");
};
Symbol 6 MovieClip Frame 1
onEnterFrame = function () {
var _local4 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local5 = int((_local4 / _local3) * 100);
num_txt.text = _local5 + "%";
if (_local4 == _local3) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Symbol 10 MovieClip Frame 1
this._visible = false;
Symbol 10 MovieClip Frame 2
this._visible = true;
Symbol 10 MovieClip Frame 39
stop();
Instance of Symbol 3 MovieClip in Symbol 10 MovieClip Frame 39
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 416 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("1.5");
}
static function showPreloaderAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local25 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local25);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local24 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local24);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb) {
cb = parseInt(cb);
var _local4 = this._callbacks[cb];
if (!_local4) {
return(undefined);
}
delete this._callbacks[cb];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local7 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local7._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local7.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local7._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
if (_local7._url.indexOf("http") != 0) {
options.no_page = true;
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local9 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local9;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local9);
_local6.lc = _local5;
_local4.lc = _local9;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 417 MovieClip [__Packages.Ball] Frame 0
class Ball extends MovieClip
{
var speedX, speedY, power, isHit, level, scope, g, _x, _y, intoMC, hit_mc, hitTest, gotoAndStop;
function Ball () {
super();
speedX = 0;
speedY = 0;
power = 10;
isHit = false;
level = 2;
scope = 100;
g = 0.2;
}
function setLevel(l) {
level = l;
if (level == 1) {
power = 6;
scope = 50;
} else if (level == 2) {
power = 10;
scope = 100;
} else if (level == 3) {
power = 15;
scope = 150;
}
}
function setPower(p) {
power = p;
}
function setG(g) {
this.g = g;
}
function moveBall() {
speedY = speedY + g;
_x = _x + speedX;
_y = _y + speedY;
}
function onEnterFrame() {
if (_root.isPause == false) {
if (_root.gameOver == false) {
var _local5 = 1;
while (_local5 <= 2) {
if (_local5 == 1) {
intoMC = _root.player_mc;
} else {
intoMC = _root.computer_mc;
}
if (hit_mc.hitTest(intoMC.hit_mc)) {
if (intoMC.isHit == false) {
intoMC.headMove();
var _local7 = Math.abs(_x - intoMC._x);
var _local6 = Math.abs(_y - intoMC._y);
var _local4 = intoMC.getBoooX() * intoMC.getBoooX();
var _local3 = (_local7 * _local7) / (_local6 * _local6);
if (((_x - intoMC._x) > 0) && ((_y - intoMC._y) <= 0)) {
trace("--------------- \u5C0F\u7403\u5411\u524D");
speedY = -1 * Math.sqrt(_local4 / (_local3 + 1));
speedX = speedX + Math.sqrt(_local4 / ((1 / _local3) + 1));
intoMC.jumpSpeed = 4;
} else if (((_x - intoMC._x) <= 0) && ((_y - intoMC._y) <= 0)) {
trace("--------------- \u5C0F\u7403\u5411\u540E");
speedY = -1 * Math.sqrt(_local4 / (_local3 + 1));
speedX = speedX + (-1 * Math.sqrt(_local4 / ((1 / _local3) + 1)));
intoMC.jumpSpeed = 4;
} else if (((_x - intoMC._x) > 0) && ((_y - intoMC._y) > 0)) {
trace("--------------- \u5C0F\u7403\u5411 \u4E0B \u524D");
speedY = Math.sqrt(_local4 / (_local3 + 1));
speedX = speedX + Math.sqrt(_local4 / ((1 / _local3) + 1));
intoMC.jumpSpeed = -4;
} else if (((_x - intoMC._x) <= 0) && ((_y - intoMC._y) > 0)) {
trace("--------------- \u5C0F\u7403\u5411 \u4E0B \u540E");
speedY = Math.sqrt(_local4 / (_local3 + 1));
speedX = speedX + (-1 * Math.sqrt(_local4 / ((1 / _local3) + 1)));
intoMC.jumpSpeed = -4;
}
_root.booo_mc._x = (_x + intoMC._x) / 2;
_root.booo_mc._y = (_y + intoMC._y) / 2;
_root.booo_mc.gotoAndPlay(1);
}
intoMC.money = intoMC.money + (2 * _root.level);
intoMC.isHit = true;
intoMC.setJumpOver(true);
} else {
intoMC.isHit = false;
}
_local5++;
}
if (speedY <= -15) {
speedY = -15;
}
if (speedX <= -5) {
speedX = -5;
}
if (speedX >= 5) {
speedX = 5;
}
moveBall();
if (hitTest(_root.dimian_mc.hit_mc)) {
g = 0;
speedY = 0;
speedX = 0;
_local5 = 1;
while (_local5 <= 2) {
if (_local5 == 1) {
intoMC = _root.player_mc;
} else {
intoMC = _root.computer_mc;
}
if (((intoMC._x <= (_x + scope)) && (intoMC._x >= (_x - scope))) && (intoMC.jumpSpeed == 0)) {
intoMC.isDizzy = true;
intoMC.gotoAndStop(5);
intoMC.all_mc.gotoAndPlay(1);
}
_local5++;
}
gotoAndStop(2);
}
if (hitTest(_root.myhome_mc.chengbao_mc.hit_mc)) {
g = 0;
speedY = 0;
speedX = 0;
_root.myhome_mc.reduceLife(power);
_root.relifeview_mc._x = _x;
_root.relifeview_mc._y = _y;
_root.relifeview_mc.gotoAndPlay(1);
_root.player_mc.money = _root.player_mc.money - int(power / 2);
if (_root.player_mc.money < 0) {
_root.player_mc.money = 0;
}
_root.relifeview_mc.relife_mc.relife = "-" + (power * 2);
gotoAndStop(2);
}
if (hitTest(_root.hishome_mc.chengbao_mc.hit_mc)) {
g = 0;
speedY = 0;
speedX = 0;
_root.hishome_mc.reduceLife(power);
var _local8 = 0;
switch (_root.level) {
case 1 :
_local8 = 20;
break;
case 2 :
_local8 = 40;
break;
case 3 :
_local8 = 60;
}
_root.player_mc.money = _root.player_mc.money + (_local8 - int((_y * _local8) / 400));
_root.relifeview_mc._x = _x;
_root.relifeview_mc._y = _y;
_root.relifeview_mc.gotoAndPlay(1);
_root.relifeview_mc.relife_mc.relife = "+" + String((_local8 - int((_y * _local8) / 400)) * 4);
gotoAndStop(2);
}
}
}
}
}
Symbol 418 MovieClip [__Packages.PowerUp] Frame 0
class PowerUp extends MovieClip
{
var isUse, g, speed, removeMovieClip, _y, _height, gotoAndStop;
function PowerUp () {
super();
isUse = false;
g = 0.2;
speed = 0;
}
function setG(g) {
this.g = g;
}
function booo(mc) {
isUse = true;
(removeMovieClip());// not popped
}
function movePower() {
speed = speed + g;
_y = _y + speed;
}
function onEnterFrame() {
if (_root.isPause == false) {
if (_root.gameOver == false) {
movePower();
if (((_y + speed) + _height) >= _root.dimian_mc._y) {
g = 0;
speed = 0;
gotoAndStop(2);
}
}
}
}
}
Symbol 419 MovieClip [__Packages.PowerMoney] Frame 0
class PowerMoney extends PowerUp
{
var price, g, speed, gotoAndStop;
function PowerMoney () {
super();
price = 50;
}
function setPrice(money) {
price = money;
}
function booo(mc) {
mc.money = mc.money + (price * _root.level);
g = 0;
speed = 0;
_root.soundManage.playSound("money_s", 1);
gotoAndStop(2);
}
}
Symbol 420 MovieClip [__Packages.Role] Frame 0
class Role extends MovieClip
{
var jumpOver, isJump, jumpSpeed, jumpStart, jumpState, speed, boooX, life, g, isHit, xingzou, isDizzy, heady, all_mc, mySkin, _x, _y, gotoAndStop, vsMC, hitleg1_mc, hitleg2_mc, _height, headMoveID, headMoveTimer;
function Role () {
super();
}
function PlayStart() {
jumpOver = false;
isJump = false;
jumpSpeed = 0;
jumpStart = -20;
jumpState = 0;
speed = 7;
boooX = 7;
life = 100;
g = 2;
isHit = false;
xingzou = 0;
isDizzy = false;
heady = all_mc.head_mc._y;
}
function setSkin(s) {
mySkin = s;
}
function getIsDizzy() {
return(isDizzy);
}
function setIsDizzy(d) {
isDizzy = d;
}
function isJumpOver() {
return(jumpOver);
}
function setJumpOver(i) {
jumpOver = i;
}
function getJumpState() {
return(jumpState);
}
function getBoooX() {
return(boooX);
}
function moveToXY(thisx, thisy) {
_x = thisx;
_y = thisy;
}
function moveRight() {
moveToXY(_x + speed, _y);
}
function moveLeft() {
moveToXY(_x - speed, _y);
}
function dojump() {
_root.pchit = 0;
jumpSpeed = jumpStart;
jumpState = 1;
xingzou = 2;
gotoAndStop(1);
gotoAndStop(3);
}
function turnSkin() {
all_mc.head_mc.gotoAndStop(mySkin);
all_mc.hand1_mc.gotoAndStop(mySkin);
all_mc.hand2_mc.gotoAndStop(mySkin);
all_mc.body_mc.gotoAndStop(mySkin);
all_mc.foot1_mc.gotoAndStop(mySkin);
all_mc.foot2_mc.gotoAndStop(mySkin);
}
function jumpPlay() {
if ((jumpSpeed < 0) && (jumpState == 1)) {
_y = _y + jumpSpeed;
jumpSpeed = jumpSpeed + g;
} else if ((jumpSpeed >= 0) && (jumpState == 1)) {
gotoAndStop(1);
jumpState = 2;
_y = _y + jumpSpeed;
jumpSpeed = jumpSpeed + g;
} else if ((jumpSpeed >= 0) && (jumpState == 2)) {
if (!(vsMC.hit_mc.hitTest(hitleg1_mc._x + _x, hitleg1_mc._y + _y) || (vsMC.hit_mc.hitTest(hitleg2_mc._x + _x, hitleg2_mc._y + _y)))) {
_y = _y + jumpSpeed;
jumpSpeed = jumpSpeed + g;
} else {
_y = (vsMC._height + _root.dimian_mc) + (_height / 2);
dojump();
}
if (((_y + 26.4) + jumpSpeed) >= _root.dimian_mc._y) {
xingzou = 0;
_y = _root.dimian_mc._y - 26.4;
jumpSpeed = 0;
jumpState = 0;
jumpOver = false;
gotoAndStop(1);
}
} else {
jumpSpeed = 0;
}
}
function headMove() {
clearInterval(headMoveID);
all_mc.head_mc._y = heady;
headMoveTimer = 2;
headMoveID = setInterval(this, "headMoveStart", 30);
}
function headMoveStart() {
headMoveTimer--;
if (headMoveTimer > 0) {
all_mc.head_mc._y = all_mc.head_mc._y + 2;
} else if (headMoveTimer < 0) {
all_mc.head_mc._y = all_mc.head_mc._y - 2;
}
if (headMoveTimer <= -1) {
clearInterval(headMoveID);
}
}
function booo(mc) {
mc.booo(this);
}
function gotoOne() {
gotoAndStop(1);
}
}
Symbol 421 MovieClip [__Packages.SoundManage] Frame 0
class SoundManage
{
function SoundManage () {
_root.createEmptyMovieClip("mysound_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("mymusic_mc", _root.getNextHighestDepth());
soundArray[0] = new Array();
soundArray[1] = new Array();
musicArray[0] = new Array();
musicArray[1] = new Array();
}
function addSound(s) {
soundArray[0].push(s);
_root.mysound_mc.createEmptyMovieClip(s + "_sound", _root.mysound_mc.getNextHighestDepth());
var _local3 = new Sound(_root.mysound_mc[s + "_sound"]);
_local3.attachSound(s);
soundArray[1].push(_local3);
trace((("\u52A0\u5165\u97F3\u6548\uFF1A" + s) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
}
function addMusic(s) {
musicArray[0].push(s);
_root.mymusic_mc.createEmptyMovieClip(s + "_sound", _root.mymusic_mc.getNextHighestDepth());
var _local3 = new Sound(_root.mymusic_mc[s + "_sound"]);
_local3.attachSound(s);
musicArray[1].push(_local3);
trace((("\u52A0\u5165\u97F3\u4E50\uFF1A" + s) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
}
function stopSound() {
var _local2 = 0;
while (_local2 <= soundArray[1].length) {
soundArray[1][_local2].setVolume(0);
_local2++;
}
}
function stopMusic() {
var _local2 = 0;
while (_local2 <= musicArray[1].length) {
musicArray[1][_local2].setVolume(0);
_local2++;
}
}
function returnSound() {
var _local2 = 0;
while (_local2 <= soundArray[1].length) {
soundArray[1][_local2].setVolume(100);
_local2++;
}
}
function returnMusic() {
var _local2 = 0;
while (_local2 <= musicArray[1].length) {
musicArray[1][_local2].setVolume(100);
_local2++;
}
}
function setSoundVol(n) {
if (n > 100) {
n = 100;
} else if (n < 0) {
n = 0;
}
}
function setMusicVol(n) {
if (n > 100) {
n = 100;
} else if (n < 0) {
n = 0;
}
var _local2 = 0;
while (_local2 <= musicArray[1].length) {
musicArray[1][_local2].setVolume(n);
_local2++;
}
}
function playSound(s, no) {
var _local2 = 0;
while (_local2 <= soundArray[0].length) {
if (soundArray[0][_local2] == s) {
soundArray[1][_local2].start(0, no);
trace("\u64AD\u653E\u97F3\u6548\uFF1A" + soundArray[1][_local2]);
break;
}
_local2++;
}
}
function playMusic(s, no) {
var _local2 = 0;
while (_local2 <= musicArray[0].length) {
if (musicArray[0][_local2] == s) {
musicArray[1][_local2].start(0, no);
trace("\u64AD\u653E\u97F3\u4E50\uFF1A" + musicArray[1][_local2]);
break;
}
_local2++;
}
}
function clearSoundAndMusic() {
for (var _local2 in _root.mymusic_mc) {
removeMovieClip(_root.mymusic_mc[_local2]);
}
for (var _local2 in _root.mysound_mc) {
removeMovieClip(_root.mysound_mc[_local2]);
}
removeMovieClip(_root.mysound_mc);
removeMovieClip(_root.mymusic_mc);
}
var soundArray = new Array();
var musicArray = new Array();
}
Symbol 422 MovieClip [__Packages.KeyManage] Frame 0
class KeyManage
{
var player, isPress2Up;
function KeyManage () {
}
function setPlayer(player) {
this.player = player;
trace(this.player);
}
function getPlayer() {
return(player);
}
function detectKeys() {
if (player.getIsDizzy() == false) {
if (Key.isDown(39)) {
player.moveRight();
} else if (Key.isDown(37)) {
player.moveLeft();
} else if (_root.player_mc.jumpState == 0) {
_root.player_mc.gotoAndStop(1);
_root.player_mc.xingzou = 0;
}
if (Key.isDown(38)) {
if ((player.getJumpState() == 0) || (player.getJumpState() == 3)) {
isPress2Up = false;
player.dojump();
} else if ((((player.getJumpState() == 1) || (player.getJumpState() == 2)) && (player.isJumpOver() == false)) && (isPress2Up == true)) {
trace("\u6267\u884C\u4E862\u8DF3\uFF01");
player.setJumpOver(true);
player.dojump();
}
} else {
isPress2Up = true;
}
}
}
}
Symbol 423 MovieClip [__Packages.Player] Frame 0
class Player extends Role
{
var PlayStart, money, vsMC, _xscale, xingzou, jumpState, gotoAndPlay, moveToXY, speed, _x, _y, gotoAndStop;
function Player () {
super();
PlayStart();
money = 0;
vsMC = _root.computer_mc;
}
function moveRight() {
_xscale = 100;
if ((xingzou == 0) && (jumpState == 0)) {
gotoAndPlay(2);
xingzou = 1;
}
moveToXY(_x + speed, _y);
if (_root.computer_mc.hit_mc.hitTest(_root.player_mc.hit_mc)) {
_root.between();
}
}
function moveLeft() {
_xscale = -100;
if ((xingzou == 0) && (jumpState == 0)) {
gotoAndStop(2);
xingzou = 1;
}
moveToXY(_x - speed, _y);
if (_root.computer_mc.hit_mc.hitTest(_root.player_mc.hit_mc)) {
_root.between();
}
}
}
Symbol 424 MovieClip [__Packages.Castle] Frame 0
class Castle extends MovieClip
{
var maxLife, life, chengbao_mc, _name;
function Castle () {
super();
maxLife = 1000;
life = maxLife;
}
function setMaxLife(m) {
maxLife = m;
}
function setLife(life) {
this.life = life;
if (this.life >= maxLife) {
this.life = maxLife;
}
}
function reduceLife(life) {
this.life = this.life - life;
if (this.life <= 0) {
this.life = 0;
gameover();
}
reducelife();
changeModel();
}
function addLife(life) {
this.life = this.life + life;
if (this.life >= maxLife) {
this.life = maxLife;
}
}
function getLife() {
return(life);
}
function restoreLife() {
life = maxLife;
}
function changeModel() {
if ((life <= (maxLife * 0.8)) && (life > (maxLife * 0.6))) {
chengbao_mc.gotoAndStop(2);
} else if ((life <= (maxLife * 0.6)) && (life > (maxLife * 0.4))) {
chengbao_mc.gotoAndStop(3);
} else if ((life <= (maxLife * 0.4)) && (life > (maxLife * 0.2))) {
chengbao_mc.gotoAndStop(4);
} else if ((life <= (maxLife * 0.2)) && (life > (maxLife * 0.1))) {
chengbao_mc.gotoAndStop(5);
} else if (life <= 0) {
chengbao_mc.gotoAndStop(6);
}
}
function reducelife() {
if (_name == "hishome_mc") {
_root.lifeview_mc.commask_mc._x = _root.lifeview_mc.comlife_mc._x + ((_root.lifeview_mc.comlife_mc._width * (maxLife - life)) / maxLife);
} else if (_name == "myhome_mc") {
_root.lifeview_mc.mymask_mc._x = (_root.lifeview_mc.mylife_mc._x - (_root.lifeview_mc.mymask_mc._width - _root.lifeview_mc.mylife_mc._width)) - ((_root.lifeview_mc.mylife_mc._width * (maxLife - life)) / maxLife);
}
}
function gameover() {
_root.gameOver = true;
_root.overmenu_mc._visible = true;
if (_name == "hishome_mc") {
_root.player_mc.money = _root.player_mc.money + (life * _root.level);
var _local3;
switch (_root.level) {
case 1 :
_local3 = 500;
break;
case 2 :
_local3 = 700;
break;
case 3 :
_local3 = 1000;
}
_root.player_mc.money = _root.player_mc.money + _local3;
_root.relifeview_mc._x = _root.player_mc._x;
_root.relifeview_mc._y = _root.player_mc._y;
_root.relifeview_mc.gotoAndPlay(1);
_root.relifeview_mc.relife_mc.relife = "+" + _local3;
_root.youwin_mc._visible = true;
} else if (_name == "myhome_mc") {
_root.youlost_mc._visible = true;
}
_root.score = _root.player_mc.money;
}
}
Symbol 425 MovieClip [__Packages.Computer] Frame 0
class Computer extends Role
{
var PlayStart, isBefore, minx, vsMC, isLevelUp, level, jumpStart, speed, _xscale, xingzou, jumpState, gotoAndStop, moveToXY, _x, _y, hitright_mc, hitleft_mc, isDizzy, dojump;
function Computer () {
super();
PlayStart();
isBefore = true;
minx = -1000;
vsMC = _root.player_mc;
isLevelUp = false;
}
function setLevel(l) {
level = l;
if (level == 1) {
} else if (level == 2) {
jumpStart = jumpStart - 5;
} else if (level == 3) {
speed = speed + 1;
jumpStart = jumpStart - 8;
}
}
function moveRight() {
_xscale = 100;
if ((xingzou == 0) && (jumpState == 0)) {
gotoAndStop(2);
xingzou = 1;
}
moveToXY(_x + speed, _y);
if (_root.player_mc.hit_mc.hitTest(hitright_mc._x + _x, hitright_mc._y + _y)) {
_root.between();
}
}
function moveLeft() {
_xscale = -100;
if ((xingzou == 0) && (jumpState == 0)) {
gotoAndStop(2);
xingzou = 1;
}
moveToXY(_x - speed, _y);
if (_root.player_mc.hit_mc.hitTest(hitleft_mc._x + _x, hitleft_mc._y + _y)) {
_root.between();
}
}
function onEnterFrame() {
if (_root.isPause == false) {
if (_root.gameOver == false) {
if (level == 2) {
if (isDizzy == false) {
minx = 400;
for (var _local4 in _root.ballArray_mc) {
var _local3;
_local3 = Math.abs(_root.ballArray_mc[_local4]._x - _x);
if (_local3 < Math.abs(minx)) {
minx = Math.round(_root.ballArray_mc[_local4]._x - _x);
}
}
if ((minx - 20) > 7) {
moveRight();
} else if ((minx - 20) < -7) {
moveLeft();
}
if (Math.abs(minx - 20) <= 7) {
if ((jumpState == 0) || (jumpState == 3)) {
var _local5 = random(8);
if (_local5 == 0) {
dojump();
}
}
}
if (_root.pchit >= 70) {
dojump();
}
}
} else if (level == 1) {
if (isDizzy == false) {
minx = 400;
for (var _local4 in _root.ballArray_mc) {
var _local3 = Math.abs(_root.ballArray_mc[_local4]._x - _x);
if (_local3 < Math.abs(minx)) {
minx = Math.round(_root.ballArray_mc[_local4]._x - _x);
}
}
if ((minx - 20) > 7) {
moveRight();
} else if ((minx - 20) < -7) {
moveLeft();
}
if (Math.abs(minx - 20) <= 7) {
if ((jumpState == 0) || (jumpState == 3)) {
var _local5 = random(10);
if (_local5 == 0) {
dojump();
}
}
}
}
} else if (level == 3) {
minx = 400;
for (var _local4 in _root.ballArray_mc) {
var _local3 = Math.abs(_root.ballArray_mc[_local4]._x - _x);
if (_root.ballArray_mc[_local4]._x <= 100) {
continue;
}
if (_local3 < Math.abs(minx)) {
minx = Math.round(_root.ballArray_mc[_local4]._x - _x);
}
}
if ((minx - 20) > 7) {
moveRight();
} else if ((minx - 20) < -7) {
moveLeft();
}
if (Math.abs(minx - 20) <= 7) {
if ((jumpState == 0) || (jumpState == 3)) {
var _local5 = random(8);
if (_local5 == 0) {
dojump();
}
}
}
if (_root.myhome_mc.life <= (_root.myhome_mc.maxLife * 0.2)) {
if (isLevelUp == false) {
speed = speed + 1;
jumpStart = jumpStart + 5;
isLevelUp = true;
}
}
if (_root.pchit >= 70) {
dojump();
}
}
}
}
}
}
Symbol 13 MovieClip Frame 1
return(undefined);
Symbol 27 MovieClip Frame 1
_root.soundManage.playSound("bigbang_s", 1);
Symbol 27 MovieClip Frame 6
stop();
removeMovieClip(this._parent);
Symbol 28 MovieClip [ball1] Frame 1
#initclip 14
Object.registerClass("ball1", Ball);
#endinitclip
stop();
Symbol 28 MovieClip [ball1] Frame 2
stop();
Symbol 31 MovieClip [ball2] Frame 1
#initclip 11
Object.registerClass("ball2", Ball);
#endinitclip
stop();
Symbol 31 MovieClip [ball2] Frame 2
stop();
Symbol 34 MovieClip [ball3] Frame 1
#initclip 12
Object.registerClass("ball3", Ball);
#endinitclip
stop();
Symbol 34 MovieClip [ball3] Frame 2
stop();
Symbol 49 MovieClip Frame 9
stop();
removeMovieClip(this._parent);
Symbol 50 MovieClip [powerMoney] Frame 1
#initclip 13
Object.registerClass("powerMoney", PowerMoney);
#endinitclip
stop();
Symbol 50 MovieClip [powerMoney] Frame 2
stop();
Symbol 51 MovieClip Frame 1
stop();
Symbol 72 MovieClip Frame 146
_root.nextFrame();
Symbol 77 Button
on (release) {
gotoAndStop ("frontPage");
}
Symbol 82 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 91 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 107 Button
on (release) {
viewHighscore();
}
Symbol 108 MovieClip Frame 1
stop();
_global.game_name = _game_name;
var highscore = eval (score_var);
_global.viewHighscore = function () {
getURL ("http://www.freeworldgroup.com/score/index.asp?game=" + game_name, "_blank");
};
if (highscore <= 0) {
this._visible = false;
}
trace(game_name);
trace(highscore);
trace("http://www.freeworldgroup.com/score/index.asp?game=" + game_name);
Symbol 108 MovieClip Frame 3
function sendData() {
send_var.game = game_name;
send_var.score = highscore;
send_var.name = name_txt.text;
if (send_var.name == "") {
send_var.name = "guest" + int(Math.random() * 1000);
}
send_var.sendAndLoad("http://www.freeworldgroup.com/score/score.asp", load_var, "POST");
gotoAndStop ("sending");
}
stop();
highscore = _root.score;
gold_txt.text = highscore;
send_var = new LoadVars();
load_var = new LoadVars();
ok_btn.onRelease = sendData;
load_var.onLoad = function () {
gotoAndStop ("done");
};
Instance of Symbol 85 MovieClip in Symbol 108 MovieClip Frame 3
on (release) {
}
Instance of Symbol 87 MovieClip in Symbol 108 MovieClip Frame 3
on (release) {
}
Symbol 136 Button
on (release) {
this._visible = false;
_root.startMenu_mc._visible = true;
}
Symbol 141 Button
on (release) {
_root.nextFrame();
}
Symbol 142 Button
on (release) {
_root.gotoAndStop("Instructions");
}
Symbol 143 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 144 Button
on (release) {
getURL ("http://www.ifungames.com", "_blank");
}
Symbol 145 Button
on (release) {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
}
Symbol 146 Button
on (release) {
viewHighscore();
}
Symbol 157 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 160 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 170 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 171 Button
on (release) {
_root.gotoAndStop("setgame");
}
Symbol 172 Button
on (release) {
nextFrame();
}
Symbol 205 MovieClip Frame 1
stop();
Symbol 205 MovieClip Frame 2
stop();
Symbol 205 MovieClip Frame 3
stop();
Symbol 205 MovieClip Frame 4
stop();
Symbol 205 MovieClip Frame 5
stop();
Symbol 205 MovieClip Frame 6
stop();
Symbol 205 MovieClip Frame 7
stop();
Symbol 205 MovieClip Frame 8
stop();
Symbol 205 MovieClip Frame 9
stop();
Symbol 205 MovieClip Frame 10
stop();
Symbol 205 MovieClip Frame 11
stop();
Symbol 205 MovieClip Frame 12
stop();
Symbol 230 MovieClip Frame 1
stop();
Symbol 230 MovieClip Frame 2
stop();
Symbol 230 MovieClip Frame 3
stop();
Symbol 230 MovieClip Frame 4
stop();
Symbol 230 MovieClip Frame 5
stop();
Symbol 230 MovieClip Frame 6
stop();
Symbol 230 MovieClip Frame 7
stop();
Symbol 230 MovieClip Frame 8
stop();
Symbol 230 MovieClip Frame 9
stop();
Symbol 230 MovieClip Frame 10
stop();
Symbol 230 MovieClip Frame 11
stop();
Symbol 230 MovieClip Frame 12
stop();
Symbol 241 MovieClip Frame 1
stop();
Symbol 241 MovieClip Frame 2
stop();
Symbol 241 MovieClip Frame 3
stop();
Symbol 241 MovieClip Frame 4
stop();
Symbol 241 MovieClip Frame 5
stop();
Symbol 241 MovieClip Frame 6
stop();
Symbol 241 MovieClip Frame 7
stop();
Symbol 241 MovieClip Frame 8
stop();
Symbol 241 MovieClip Frame 9
stop();
Symbol 241 MovieClip Frame 10
stop();
Symbol 241 MovieClip Frame 11
stop();
Symbol 241 MovieClip Frame 12
stop();
Symbol 266 MovieClip Frame 1
stop();
Symbol 266 MovieClip Frame 2
stop();
Symbol 266 MovieClip Frame 3
stop();
Symbol 266 MovieClip Frame 4
stop();
Symbol 266 MovieClip Frame 5
stop();
Symbol 266 MovieClip Frame 6
stop();
Symbol 266 MovieClip Frame 7
stop();
Symbol 266 MovieClip Frame 8
stop();
Symbol 266 MovieClip Frame 9
stop();
Symbol 266 MovieClip Frame 10
stop();
Symbol 266 MovieClip Frame 11
stop();
Symbol 266 MovieClip Frame 12
stop();
Symbol 291 MovieClip Frame 1
stop();
Symbol 291 MovieClip Frame 2
stop();
Symbol 291 MovieClip Frame 3
stop();
Symbol 291 MovieClip Frame 4
stop();
Symbol 291 MovieClip Frame 5
stop();
Symbol 291 MovieClip Frame 6
stop();
Symbol 291 MovieClip Frame 7
stop();
Symbol 291 MovieClip Frame 8
stop();
Symbol 291 MovieClip Frame 9
stop();
Symbol 291 MovieClip Frame 10
stop();
Symbol 291 MovieClip Frame 11
stop();
Symbol 291 MovieClip Frame 12
stop();
Symbol 292 MovieClip Frame 16
Symbol 299 Button
on (release) {
this.prevFrame();
}
Symbol 302 MovieClip Frame 1
stop();
Symbol 302 MovieClip Frame 2
stop();
Symbol 303 Button
on (release) {
_root.gotoAndStop("menu");
}
Symbol 304 Button
on (release) {
_root.c_s = _root.cpu_mc.foot1_mc._currentframe;
_root.p_s = _root.player_mc.foot1_mc._currentframe;
_root.play();
}
Symbol 316 Button
on (release) {
_root.level = _root.level - 1;
if (_root.level == 0) {
_root.level = 1;
}
_root.degree();
}
Symbol 317 Button
on (release) {
_root.level = _root.level + 1;
if (_root.level == 4) {
_root.level = 3;
}
_root.degree();
}
Symbol 328 MovieClip Frame 1
stop();
Symbol 328 MovieClip Frame 2
stop();
Symbol 328 MovieClip Frame 3
stop();
Symbol 328 MovieClip Frame 4
stop();
Symbol 328 MovieClip Frame 5
stop();
Symbol 328 MovieClip Frame 6
stop();
Symbol 329 MovieClip [hisCastle] Frame 1
#initclip 18
Object.registerClass("hisCastle", Castle);
#endinitclip
Symbol 337 MovieClip Frame 1
stop();
Symbol 337 MovieClip Frame 2
stop();
Symbol 337 MovieClip Frame 3
stop();
Symbol 337 MovieClip Frame 4
stop();
Symbol 337 MovieClip Frame 5
stop();
Symbol 337 MovieClip Frame 6
stop();
Symbol 338 MovieClip [myCastle] Frame 1
#initclip 15
Object.registerClass("myCastle", Castle);
#endinitclip
Symbol 341 MovieClip Frame 6
stop();
Symbol 352 MovieClip Frame 30
stop();
this._parent.setIsDizzy(false);
this._parent.jumpSpeed = 0;
this._parent.gotoAndStop(1);
Symbol 353 MovieClip [1-REN] Frame 1
#initclip 16
Object.registerClass("1-REN", Player);
#endinitclip
stop();
this.setIsDizzy(false);
this.turnSkin();
Symbol 353 MovieClip [1-REN] Frame 2
stop();
this.turnSkin();
Symbol 353 MovieClip [1-REN] Frame 3
stop();
this.turnSkin();
Symbol 353 MovieClip [1-REN] Frame 4
stop();
this.turnSkin();
Symbol 353 MovieClip [1-REN] Frame 5
stop();
this.turnSkin();
Symbol 354 MovieClip [computer] Frame 1
#initclip 17
Object.registerClass("computer", Computer);
#endinitclip
stop();
this.setIsDizzy(false);
this.turnSkin();
Symbol 354 MovieClip [computer] Frame 2
stop();
this.turnSkin();
Symbol 354 MovieClip [computer] Frame 3
stop();
this.turnSkin();
Symbol 354 MovieClip [computer] Frame 4
stop();
this.turnSkin();
Symbol 354 MovieClip [computer] Frame 5
stop();
this.turnSkin();
Symbol 357 MovieClip Frame 4
stop();
this._x = -100;
this._y = -100;
Symbol 360 MovieClip Frame 1
Symbol 360 MovieClip Frame 14
stop();
this._x = -100;
this._y = -200;
Symbol 371 Button
on (release) {
if (_root.return_mc._visible == false) {
_root.return_mc._visible = true;
_root.isPause = true;
} else {
_root.return_mc._visible = false;
_root.isPause = false;
}
}
Symbol 376 MovieClip Frame 1
stop();
Symbol 376 MovieClip Frame 2
stop();
Symbol 379 MovieClip Frame 1
stop();
Symbol 379 MovieClip Frame 2
stop();
Symbol 382 MovieClip Frame 1
stop();
Symbol 382 MovieClip Frame 2
stop();
Symbol 387 MovieClip Frame 1
stop();
Symbol 387 MovieClip Frame 10
function quality_init() {
switch (_quality) {
case "LOW" :
bt4.gotoAndStop(2);
return;
case "MEDIUM" :
bt3.gotoAndStop(2);
return;
case "HIGH" :
bt2.gotoAndStop(2);
return;
case "BEST" :
bt1.gotoAndStop(2);
}
}
function bt_init() {
bt1.gotoAndStop(1);
bt2.gotoAndStop(1);
bt3.gotoAndStop(1);
bt4.gotoAndStop(1);
}
stop();
quality_init();
bt1.onPress = function () {
_root._quality = "BEST";
};
bt2.onPress = function () {
_root._quality = "HIGH";
};
bt3.onPress = function () {
_root._quality = "MEDIUM";
};
bt4.onPress = function () {
_root._quality = "LOW";
};
Symbol 388 MovieClip Frame 1
hit = false;
opend = false;
onEnterFrame = function () {
dcHitMenu();
dcMenu();
};
dcHitMenu = function () {
var _local2 = btQuality.hitTest(_root._xmouse, _root._ymouse, false);
if (_local2) {
hit = true;
} else {
hit = false;
}
};
dcMenu = function () {
if (hit && (!opend)) {
qualityMenu.gotoAndPlay(1);
btQuality.gotoAndStop(2);
opend = true;
}
if (!hit) {
if (opend) {
qualityMenu.gotoAndPlay(11);
opend = false;
}
btQuality.gotoAndStop(1);
}
};
btMusic.onRelease = function () {
trace("\u4F60\u70B9\u51FB\u4E86\u97F3\u4E50\u6309\u94AE\uFF01");
if (_root.isMusicPlay == true) {
_root.soundManage.stopMusic();
_root.isMusicPlay = false;
btMusic.gotoAndStop(2);
} else {
_root.soundManage.returnMusic();
_root.isMusicPlay = true;
btMusic.gotoAndStop(1);
}
};
btSound.onRelease = function () {
trace("\u4F60\u70B9\u51FB\u4E86\u97F3\u6548\u6309\u94AE\uFF01");
if (_root.isSoundPlay == true) {
_root.soundManage.stopSound();
_root.isSoundPlay = false;
btSound.gotoAndStop(2);
} else {
_root.soundManage.returnSound();
_root.isSoundPlay = true;
btSound.gotoAndStop(1);
}
};
Symbol 392 Button
on (release) {
_root.gotoAndStop("menu");
_root.isPause = false;
}
Symbol 393 Button
on (release) {
this._visible = false;
_root.isPause = false;
}
Symbol 401 Button
on (release) {
_root.gotoAndStop("setgame");
}
Instance of Symbol 108 MovieClip in Symbol 405 MovieClip Frame 1
//component parameters
onClipEvent (construct) {
_game_name = "head_defence";
score_var = "_root.score";
}
Symbol 413 MovieClip Frame 92
stop();