Frame 1
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
MochiAd.showPreGameAd({id:"0b52ab566a6be4f1", res:"600x500"});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("Loading");
}
Instance of Symbol 58 MovieClip in Frame 7
//component parameters
onClipEvent (construct) {
_game_name = "barnyard";
score_var = "_root.score";
}
Frame 10
stop();
Mouse.show();
if (_root.soundManage == undefined) {
var soundManage = new SoundManage();
_root.soundManage.addSound("jiguang_s");
_root.soundManage.addSound("jiadaoju_s");
_root.soundManage.addSound("jiawuqi_s");
_root.soundManage.addSound("money_s");
_root.soundManage.addSound("qiqiubaozha_s");
_root.soundManage.addSound("zhadan_s");
_root.soundManage.addSound("zidan_s");
}
var isPopup;
var isIn;
Instance of Symbol 408 MovieClip in Frame 10
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Instance of Symbol 414 MovieClip in Frame 10
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Frame 11
stop();
_root.isIn = true;
Frame 12
function nextSelect() {
_root.selectTemp++;
_root.selectText_mc.gotoAndStop(_root.selectTemp);
if (_root.selectTemp == 3) {
var _local2 = 1;
while (_local2 <= 3) {
if (_local2 == _root.c_t) {
} else if (_local2 == _root.p_t) {
} else {
_root.s_t = _local2;
if (_root.niut == "") {
_root.niut = "SHOP";
} else if (_root.gout == "") {
_root.gout = "SHOP";
} else if (_root.yangt == "") {
_root.yangt = "SHOP";
}
}
_local2++;
}
}
}
stop();
var c_t;
var p_t;
var s_t;
_root.niut = "";
_root.gout = "";
_root.yangt = "";
var selectTemp;
_root.selectTemp = 1;
Instance of Symbol 257 MovieClip in Frame 12
on (release) {
if (_root.niut == "") {
if (_root.selectTemp == 1) {
_root.p_t = 2;
_root.niut = "PLAYER";
_root.nextSelect();
} else if (_root.selectTemp == 2) {
_root.c_t = 2;
_root.niut = "COM";
_root.nextSelect();
}
}
}
Instance of Symbol 270 MovieClip in Frame 12
on (release) {
if (_root.gout == "") {
if (_root.selectTemp == 1) {
_root.p_t = 3;
_root.gout = "PLAYER";
_root.nextSelect();
} else if (_root.selectTemp == 2) {
_root.c_t = 3;
_root.gout = "COM";
_root.nextSelect();
}
}
}
Instance of Symbol 235 MovieClip in Frame 12
on (release) {
if (_root.yangt == "") {
if (_root.selectTemp == 1) {
_root.p_t = 1;
_root.yangt = "PLAYER";
_root.nextSelect();
} else if (_root.selectTemp == 2) {
_root.c_t = 1;
_root.yangt = "COM";
_root.nextSelect();
}
}
}
Frame 13
function getNearComputer() {
var _local3 = 800;
var _local4 = "";
for (var _local5 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local5].myState == 1) {
var _local2 = Math.sqrt((Math.abs(_root.computerArray_mc[_local5]._x - _root.player_mc._x) * Math.abs(_root.computerArray_mc[_local5]._x - _root.player_mc._x)) + (Math.abs(_root.computerArray_mc[_local5]._y - _root.player_mc._y) * Math.abs(_root.computerArray_mc[_local5]._y - _root.player_mc._y)));
if (_local2 < _local3) {
_local3 = _local2;
_local4 = _root.computerArray_mc[_local5]._name;
}
}
}
return(_local4);
}
function init() {
_root.player_mc.setType(_root.p_t);
_root.dimianArray_mc.attachMovie("dimian", "dimian_mc", _root.dimianArray_mc.getNextHighestDepth());
_root.dimianView_mc.attachMovie("dimianView", "dimianView_mc", _root.dimianView_mc.getNextHighestDepth());
_root.player_mc._x = _root.dimianArray_mc.dimian_mc.playerset_mc._x;
_root.player_mc._y = _root.dimianArray_mc.dimian_mc.playerset_mc._y - 17;
_root.gm.nextLevel();
_root.km.setPlayer(_root.player_mc);
}
function createPig() {
_root.zidanArray_mc.attachMovie("powerFlyPig", "powerFlyPig_mc", _root.zidanArray_mc.getNextHighestDepth());
}
function createPowerUp() {
var _local2 = random(100);
if (_local2 < 35) {
_root.powerupArray_mc.attachMovie("powerMoney", ("powerMoney" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
} else if ((_local2 >= 35) && (_local2 < 55)) {
_root.powerupArray_mc.attachMovie("powerPause", ("powerPause" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
} else if ((_local2 >= 55) && (_local2 < 70)) {
_root.powerupArray_mc.attachMovie("powerStitch", ("powerStitch" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
} else if ((_local2 >= 70) && (_local2 < 82)) {
_root.powerupArray_mc.attachMovie("powerBalloon", ("powerBalloon" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
} else if ((_local2 >= 82) && (_local2 < 94)) {
_root.powerupArray_mc.attachMovie("powerElectricity", ("powerElectricity" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
} else if ((_local2 >= 94) && (_local2 < 100)) {
_root.powerupArray_mc.attachMovie("powerPower", ("powerPower" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
}
}
stop();
var gm = new GameManage();
_root.gm.level = 0;
var km = new KeyManage();
var sm = new ScoreManage();
_root.replay_mc.gotoAndStop(1);
_root.return_mc._visible = false;
_root.hasBullet_mc.gotoAndStop(3);
_root.lifeview_mc.mylife_mc.setMask(_root.lifeview_mc.mymask_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);
init();
if (_root.myListener == undefined) {
var myListener = new Object();
myListener.onKeyDown = function () {
if (_root.gm.isGameOver == false) {
if (Key.isDown(80)) {
if (_root.nextlevel_mc._currentframe == 1) {
if (_root.return_mc._visible == false) {
_root.return_mc._visible = true;
_root.gm.isPause = true;
} else {
_root.return_mc._visible = false;
_root.gm.isPause = false;
}
}
}
if (Key.isDown(66)) {
if (_root.shopArray_mc.shop_mc.isView == true) {
if (_root.gm.isPause == false) {
if (_root.shopArray_mc.shop_mc.balloon > 0) {
if (_root.sm.score >= _root.shopArray_mc.shop_mc.price) {
if (_root.player_mc.balloon < 3) {
_root.sm.reduceScore(_root.shopArray_mc.shop_mc.price);
_root.player_mc.myState = 1;
_root.shopArray_mc.shop_mc.reduceBalloon();
_root.player_mc.addBalloon();
}
}
}
}
}
}
if (Key.isDown(32)) {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
if (_root.player_mc.isHasBullet == 1) {
_root.soundManage.playSound("zidan_s");
var _local2 = 1;
while (_local2 <= 4) {
var _local3 = _root.zidanArray_mc.attachMovie("stitchBullet", ("stitchBullet" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
_local3._x = _root.player_mc._x;
_local3._y = _root.player_mc._y;
_local3.setDirection(_local2);
_local2++;
}
_root.player_mc.isHasBullet = 0;
_root.hasBullet_mc.gotoAndStop(3);
} else if (_root.player_mc.isHasBullet == 2) {
_root.soundManage.playSound("jiguang_s");
var _local3 = _root.zidanArray_mc.attachMovie("laser", ("laser" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
_local3._x = _root.player_mc._x;
_local3._y = _root.player_mc._y;
var _local4 = _root.getNearComputer();
_local3._rotation = ExtMath.angleOfLine(_root.player_mc._x, _root.player_mc._y, _root.computerArray_mc[_local4]._x, _root.computerArray_mc[_local4]._y - 20);
_root.player_mc.isHasBullet = 0;
_root.hasBullet_mc.gotoAndStop(3);
}
}
}
}
}
};
Key.addListener(myListener);
}
_root.onEnterFrame = function () {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
_root.km.detectKeys();
if (Computer.isStart < 50) {
Computer.isStart++;
}
if (Computer.comPause > 0) {
Computer.comPause--;
}
PowerUp.powerTimer++;
if (PowerUp.powerTimer >= 210) {
if (((_root.gm.powerUpNo % 5) == 0) && (_root.gm.powerUpNo != 0)) {
_root.createPig();
PowerUp.powerTimer = 0;
_root.gm.powerUpNo++;
} else if (_root.gm.powerUpNo <= _root.gm.powerUpNoArray[_root.gm.level - 1]) {
_root.createPowerUp();
PowerUp.powerTimer = 0;
_root.gm.powerUpNo++;
}
}
}
}
};
_root.zidan_mc.useHandCursor = false;
_root.zidan_mc.onRelease = function () {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
if (_root.player_mc.isHasBullet == 1) {
_root.soundManage.playSound("zidan_s");
var _local2 = 1;
while (_local2 <= 4) {
var _local3 = _root.zidanArray_mc.attachMovie("stitchBullet", ("stitchBullet" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
_local3._x = _root.player_mc._x;
_local3._y = _root.player_mc._y;
_local3.setDirection(_local2);
_local2++;
}
_root.player_mc.isHasBullet = 0;
_root.hasBullet_mc.gotoAndStop(3);
} else if (_root.player_mc.isHasBullet == 2) {
_root.soundManage.playSound("jiguang_s");
var _local3 = _root.zidanArray_mc.attachMovie("laser", ("laser" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
_local3._x = _root.player_mc._x;
_local3._y = _root.player_mc._y;
_local3._rotation = ExtMath.angleOfLine(_root.player_mc._x, _root.player_mc._y, _root._xmouse, _root._ymouse);
_root.player_mc.isHasBullet = 0;
_root.hasBullet_mc.gotoAndStop(3);
}
}
}
};
Instance of Symbol 522 MovieClip "return_mc" in Frame 13
/* no clip actions */
Frame 14
stop();
Frame 15
stop();
Instance of Symbol 414 MovieClip in Frame 15
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Instance of Symbol 408 MovieClip in Frame 15
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Symbol 2 MovieClip Frame 1
onPress = function () {
FWGURL();
};
this.cacheAsBitmap = true;
Symbol 5 MovieClip Frame 1
function Replace() {
if (sVariable.length == 0) {
tTxt.text = sTxt;
} else {
tTxt.variable = sVariable;
}
tTxt.autoSize = autoSize;
if (autoSize == "right") {
tTxt._x = -Math.floor(tTxt._width);
} else if (autoSize == "center") {
tTxt._x = -Math.floor(tTxt._width / 2);
} else {
tTxt._x = 0;
}
}
var sTxt;
var bBmp;
var bMultiline;
var autoSize;
var sVariable;
Replace();
this.cacheAsBitmap = bBmp;
Symbol 6 MovieClip Frame 1
_x = (Stage.width / 2);
_y = ((Stage.height / 2) - 30);
Symbol 6 MovieClip Frame 25
stop();
var rate;
var all = _root.getBytesTotal();
onEnterFrame = function () {
var _local3 = _root.getBytesLoaded();
rate = int((_local3 / all) * 100) + "%";
mLoading._alpha = Math.round(SFM.linearCycle(getTimer(), 1000, 100));
if (_local3 == all) {
delete this.onEnterFrame;
if ((_root._mochiad instanceof MovieClip) != true) {
_root.play();
}
}
};
Instance of Symbol 5 MovieClip in Symbol 6 MovieClip Frame 25
//component parameters
onClipEvent (construct) {
sTxt = "TXT";
sVariable = "_parent.rate";
autoSize = "center";
bBmp = false;
}
Instance of Symbol 5 MovieClip "mLoading" in Symbol 6 MovieClip Frame 25
//component parameters
onClipEvent (construct) {
sTxt = "Loading...";
sVariable = "";
autoSize = "center";
bBmp = false;
}
Symbol 627 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.0");
}
static function showPreGameAd(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 showInterLevelAd(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.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 - 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 showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
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 _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
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 _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
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_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
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 _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
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 _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_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 628 MovieClip [__Packages.ExtMath] Frame 0
class ExtMath extends Math
{
function ExtMath () {
super();
}
static function distance(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return(Math.sqrt((_local2 * _local2) + (_local1 * _local1)));
}
static function distance2(x1, y1, x2, y2) {
var _local2 = x2 - x1;
var _local1 = y2 - y1;
return((_local2 * _local2) + (_local1 * _local1));
}
static function degreesToRadians(angle) {
return(angle * 0.017453);
}
static function radiansToDegrees(radian) {
return(radian * 57.29578);
}
static function sinD(angle) {
return(Math.sin((angle * 3.141593) / 180));
}
static function asinD(ratio) {
return(Math.asin(ratio) * 57.29578);
}
static function cosD(angle) {
return(Math.cos((angle * 3.141593) / 180));
}
static function acosD(ratio) {
return(Math.acos(ratio) * 57.29578);
}
static function tanD(angle) {
return(Math.tan((angle * 3.141593) / 180));
}
static function atan2D(y, x) {
return(Math.atan2(y, x) * 57.29578);
}
static function angleOfLine(x1, y1, x2, y2) {
return(atan2D(y2 - y1, x2 - x1));
}
static function fixAngle(angle) {
var _local1 = angle % 360;
return((((_local1 % 360) < 0) ? (_local1 + 360) : (_local1)));
}
static function to_global(target, target_x, target_y) {
var _local1 = {x:target_x, y:target_y};
target.localToGlobal(_local1);
return(_local1);
}
static function to_local(target, target_x, target_y, local_coord) {
local_coord = {x:target_x, y:target_y};
target.globalToLocal(local_coord);
return(local_coord);
}
}
Symbol 629 MovieClip [__Packages.PowerUp] Frame 0
class PowerUp extends MovieClip
{
var isPigThrow, isRight, zhenfu, speed, moveDirection, isUse, mc, cacheAsBitmap, _x, _y, sinCenter, removeMovieClip;
function PowerUp () {
super();
isPigThrow = false;
isRight = true;
zhenfu = random(50) + 20;
speed = random(2) + 1;
moveDirection = random(4) + 1;
isUse = false;
mc = _root.player_mc;
cacheAsBitmap = true;
setSeat();
}
function setIsPigThrow(no) {
isPigThrow = no;
if (isPigThrow == true) {
speed = -6;
}
}
function setSeat() {
if (moveDirection == 1) {
_x = random(440) + 80;
_y = -50;
sinCenter = _x;
} else if (moveDirection == 2) {
_x = random(440) + 80;
_y = 550;
sinCenter = _x;
} else if (moveDirection == 3) {
_x = -50;
_y = random(340) + 80;
sinCenter = _y;
} else if (moveDirection == 4) {
_x = 650;
_y = random(340) + 8;
sinCenter = _y;
}
}
function booo() {
isUse = true;
}
function onEnterFrame() {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
if (isPigThrow == false) {
if (moveDirection == 1) {
_y = _y + speed;
if (isRight == true) {
_x = _x + speed;
if (_x >= (sinCenter + zhenfu)) {
isRight = false;
}
} else {
_x = _x - speed;
if (_x <= (sinCenter - zhenfu)) {
isRight = true;
}
}
} else if (moveDirection == 2) {
_y = _y - speed;
if (isRight == true) {
_x = _x + speed;
if (_x >= (sinCenter + zhenfu)) {
isRight = false;
}
} else {
_x = _x - speed;
if (_x <= (sinCenter - zhenfu)) {
isRight = true;
}
}
} else if (moveDirection == 3) {
_x = _x + speed;
if (isRight == true) {
_y = _y + speed;
if (_y >= (sinCenter + zhenfu)) {
isRight = false;
}
} else {
_y = _y - speed;
if (_y <= (sinCenter - zhenfu)) {
isRight = true;
}
}
} else if (moveDirection == 4) {
_x = _x - speed;
if (isRight == true) {
_y = _y + speed;
if (_y >= (sinCenter + zhenfu)) {
isRight = false;
}
} else {
_y = _y - speed;
if (_y <= (sinCenter - zhenfu)) {
isRight = true;
}
}
}
} else if (isPigThrow == true) {
_y = _y + speed;
if (speed <= 4) {
speed = speed + 0.7;
}
}
if ((((_x < -70) || (_x > 670)) || (_y < -70)) || (_y > 570)) {
removeMovieClip();
}
}
}
}
static var powerTimer = 0;
}
Symbol 630 MovieClip [__Packages.PowerBomb] Frame 0
class PowerBomb extends PowerUp
{
var isbooo, gotoAndStop, _x, _y, isPigThrow, speed, removeMovieClip;
function PowerBomb () {
super();
isbooo = false;
}
function booo() {
_root.soundManage.playSound("zhadan_s");
isbooo = true;
_root.player_mc.reduceBalloon(this);
_root.player_mc.separate(this);
gotoAndStop(2);
}
function bigbooo() {
_root.soundManage.playSound("zhadan_s");
isbooo = true;
gotoAndStop(2);
var _local4 = 1;
while (_local4 <= 8) {
var _local3 = _root.powerupArray_mc.attachMovie("powerSmallB", ("powerSmallB" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
_local3.setFangxiang(_local4);
_local3._x = _x;
_local3._y = _y;
_local4++;
}
}
function onEnterFrame() {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
if (isPigThrow == true) {
if (isbooo == false) {
_y = _y + speed;
if (speed <= 4) {
speed = speed + 0.7;
}
if ((_y >= 200) && (isbooo == false)) {
var _local3 = random(12);
if (_local3 == 0) {
bigbooo();
}
}
}
}
if ((((_x < -70) || (_x > 670)) || (_y < -70)) || (_y > 570)) {
removeMovieClip();
}
}
}
}
}
Symbol 631 MovieClip [__Packages.PowerElectricity] Frame 0
class PowerElectricity extends PowerUp
{
var gotoAndStop;
function PowerElectricity () {
super();
}
function booo() {
_root.soundManage.playSound("jiawuqi_s");
_root.player_mc.isHasBullet = 2;
_root.hasBullet_mc.gotoAndStop(_root.player_mc.isHasBullet);
gotoAndStop(2);
}
}
Symbol 632 MovieClip [__Packages.StitchBullet] Frame 0
class StitchBullet extends MovieClip
{
var myDirection, _rotation, _x, _y, target_mc, removeMovieClip;
function StitchBullet () {
super();
}
function setDirection(no) {
myDirection = no;
if (myDirection == 1) {
_rotation = 0;
} else if (myDirection == 2) {
_rotation = 90;
} else if (myDirection == 3) {
_rotation = 180;
} else if (myDirection == 4) {
_rotation = -90;
}
}
function onEnterFrame() {
if (myDirection == 1) {
_x = _x + 8;
} else if (myDirection == 2) {
_y = _y + 8;
} else if (myDirection == 3) {
_x = _x - 8;
} else if (myDirection == 4) {
_y = _y - 8;
}
var _local4 = ExtMath.to_global(this, target_mc._x, target_mc._y);
if (_root.computerArray_mc.hitTest(_local4.x, _local4.y, true)) {
for (var _local3 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local3].qiqiu_mc.qiqiu_mc.hit_mc.hitTest(this)) {
_root.computerArray_mc[_local3].reduceBalloon();
removeMovieClip();
}
}
}
if ((((_x < -70) || (_x > 670)) || (_y < -70)) || (_y > 570)) {
removeMovieClip();
}
}
}
Symbol 633 MovieClip [__Packages.PowerPower] Frame 0
class PowerPower extends PowerUp
{
var gotoAndStop;
function PowerPower () {
super();
}
function booo() {
_root.soundManage.playSound("money_s");
_root.shanping_mc.play();
for (var _local3 in _root.computerArray_mc) {
_root.computerArray_mc[_local3].reduceBalloon();
}
gotoAndStop(2);
}
}
Symbol 634 MovieClip [__Packages.PowerBalloon] Frame 0
class PowerBalloon extends PowerUp
{
var gotoAndStop;
function PowerBalloon () {
super();
}
function booo() {
_root.soundManage.playSound("money_s");
if (_root.player_mc.balloon < 3) {
_root.player_mc.myState = 1;
_root.player_mc.addBalloon();
} else {
_root.sm.addScore(50);
}
gotoAndStop(2);
}
}
Symbol 635 MovieClip [__Packages.PowerStitch] Frame 0
class PowerStitch extends PowerUp
{
var gotoAndStop;
function PowerStitch () {
super();
}
function booo() {
_root.soundManage.playSound("jiawuqi_s");
_root.player_mc.isHasBullet = 1;
_root.hasBullet_mc.gotoAndStop(_root.player_mc.isHasBullet);
gotoAndStop(2);
}
}
Symbol 636 MovieClip [__Packages.PowerPause] Frame 0
class PowerPause extends PowerUp
{
var timer, gotoAndStop;
function PowerPause () {
super();
timer = 100;
}
function booo() {
_root.soundManage.playSound("money_s");
Computer.comPause = timer;
gotoAndStop(2);
}
}
Symbol 637 MovieClip [__Packages.Player] Frame 0
class Player extends MovieClip
{
var booo, myState, pdirection, upSpeed, speed, myType, gotoAndStop, _x, _y;
function Player () {
super();
booo = 4;
myState = 1;
pdirection = false;
upSpeed = 0;
speed = 0;
}
function setType(no) {
myType = no;
gotoAndStop(myType);
}
function movePlayer() {
}
function onEnterFrame() {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
movePlayer();
}
}
}
function pointLeft() {
if (myState == 1) {
if (((((_root.dimianArray_mc.hitTest(_x - 16, _y + 12, true) || (_root.dimianArray_mc.hitTest(_x - 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 2, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 10, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 20, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 30, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if (((((_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 12, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 6, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y - 2, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y - 10, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y - 20, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y - 30, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
speed = 5;
}
} else if (myState == 2) {
if ((((_root.dimianArray_mc.hitTest(_x - 16, _y + 13, true) || (_root.dimianArray_mc.hitTest(_x - 16, _y + 9, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y + 1, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 3, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if ((((_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 13, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 9, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 6, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y + 1, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 16, _y - 3, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
speed = 5;
}
}
}
function pointRight() {
if (myState == 1) {
if (((((_root.dimianArray_mc.hitTest(_x + 16, _y + 12, true) || (_root.dimianArray_mc.hitTest(_x + 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 2, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 10, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 20, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 30, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if (((((_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 12, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 6, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y - 2, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y - 10, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y - 20, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y - 30, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
speed = -5;
}
} else if (myState == 2) {
if ((((_root.dimianArray_mc.hitTest(_x + 16, _y + 13, true) || (_root.dimianArray_mc.hitTest(_x + 16, _y + 9, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y + 1, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 3, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if ((((_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 13, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 9, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 6, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y + 1, true))) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 16, _y - 3, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
speed = -5;
}
}
}
function moveReturn() {
if (speed > 0) {
speed = speed - 0.2;
if (speed < 0) {
speed = 0;
}
if (speed != 0) {
pointRight();
}
} else if (speed < 0) {
speed = speed + 0.2;
if (speed > 0) {
speed = 0;
}
if (speed != 0) {
pointLeft();
}
}
}
function separate(mc) {
var _local6 = Math.abs(_x - mc._x);
var _local5 = Math.abs(_y - mc._y);
var _local4 = booo * booo;
var _local3 = (_local6 * _local6) / (_local5 * _local5);
if ((mc._x >= _x) && (mc._y <= _y)) {
upSpeed = -1 * Math.sqrt(_local4 / (_local3 + 1));
speed = -1 * Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x > _x) && (mc._y > _y)) {
upSpeed = Math.sqrt(_local4 / (_local3 + 1));
speed = -1 * Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x < _x) && (mc._y > _y)) {
upSpeed = Math.sqrt(_local4 / (_local3 + 1));
speed = Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x <= _x) && (mc._y <= _y)) {
upSpeed = -1 * Math.sqrt(_local4 / (_local3 + 1));
speed = Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
}
}
}
Symbol 638 MovieClip [__Packages.Computer] Frame 0
class Computer extends Player
{
var myType, upRandom, directionTimer, udDirection, lrDirection, level, balloon, qiqiu_mc, gotoAndStop, pdirection, _xscale, myState, _x, _y, speedOne, upSpeedOne, upSpeed, speed, _name, hitTest, separate, removeMovieClip;
function Computer () {
super();
myType = 3;
upRandom = 3;
directionTimer = 0;
udDirection = 1;
lrDirection = 1;
level = 2;
balloon = 3;
getSpeed();
qiqiu_mc.attachMovie("qiqiu" + balloon, "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
var _local4 = Computer["cmfArray" + level];
qiqiu_mc.qiqiu_mc.filters = [new flash.filters.ColorMatrixFilter(_local4)];
gotoAndStop(_root.c_t);
}
function setBalloon(no) {
balloon = no;
if (balloon < 0) {
balloon = 0;
}
qiqiu_mc.qiqiu_mc.removeMovieClip();
if (balloon > 0) {
qiqiu_mc.attachMovie("qiqiu" + balloon, "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
var _local4 = Computer["cmfArray" + level];
qiqiu_mc.qiqiu_mc.filters = [new flash.filters.ColorMatrixFilter(_local4)];
if (pdirection == true) {
_xscale = -100;
var _local3 = 1;
while (_local3 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local3) + "_mc"]._xscale = -100;
_local3++;
}
pdirection = true;
}
} else if (balloon <= 0) {
myState = 3;
_root.gm.isAllOver();
}
}
function reduceBalloon() {
_root.soundManage.playSound("qiqiubaozha_s");
var _local3 = _root.zidanArray_mc.attachMovie("balloonbooo", ("balloonbooo" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
if (balloon == 3) {
if (_root.player_mc._x > _x) {
_local3._x = _x + 15;
_local3._y = _y - 30;
} else if (_root.player_mc._x <= _x) {
_local3._x = _x - 15;
_local3._y = _y - 30;
}
} else if (balloon == 2) {
if (_root.player_mc._x > _x) {
_local3._x = _x + 10;
_local3._y = _y - 30;
} else if (_root.player_mc._x <= _x) {
_local3._x = _x - 10;
_local3._y = _y - 30;
}
} else if (balloon == 1) {
_local3._x = _x;
_local3._y = _y - 30;
}
var _local5 = Computer["cmfArray" + level];
_local3.filters = [new flash.filters.ColorMatrixFilter(_local5)];
setBalloon(balloon - 1);
var _local4;
if (_root.p_t == 1) {
_local4 = 0;
} else if (_root.p_t == 2) {
_local4 = -1;
} else if (_root.p_t == 3) {
_local4 = 1;
}
_root.sm.addScore(level * (7 + _local4));
}
function addBalloon() {
setBalloon(balloon + 1);
}
function getSpeed() {
if (level == 1) {
speedOne = 0.35;
upSpeedOne = 0.2;
} else if (level == 2) {
speedOne = 0.4;
upSpeedOne = 0.27;
} else if (level == 3) {
speedOne = 0.47;
upSpeedOne = 0.3;
} else if (level == 4) {
speedOne = 0.55;
upSpeedOne = 0.35;
}
}
function up() {
if (upSpeed < ((upSpeedOne + 0.4) * 7)) {
upSpeed = (upSpeed + (balloon * 0.2)) + upSpeedOne;
}
if (upSpeed > ((upSpeedOne + 0.4) * 7)) {
upSpeed = (upSpeedOne + 0.4) * 7;
}
}
function setLevel(no) {
level = no;
var _local2 = Computer["cmfArray" + level];
qiqiu_mc.qiqiu_mc.filters = [new flash.filters.ColorMatrixFilter(_local2)];
if (level == 1) {
setBalloon(1);
} else if (level == 2) {
setBalloon(1);
} else if (level == 3) {
setBalloon(2);
} else if (level == 4) {
setBalloon(3);
}
getSpeed();
}
function updateDirection() {
lrDirection = random(2) + 1;
upRandom = random(4) + 1;
}
function isDiscover() {
if (pdirection == false) {
if ((((_root.player_mc._y <= ((_y + 60) + (level * 10))) && (_root.player_mc._y >= ((_y - 60) - (level * 10)))) && (_root.player_mc._x > ((_x - 70) - (level * 10)))) && (_root.player_mc._x <= ((_x + 200) + (level * 25)))) {
return(true);
}
} else if (pdirection == true) {
if ((((_root.player_mc._y <= ((_y + 60) + (level * 10))) && (_root.player_mc._y >= ((_y - 60) - (level * 10)))) && (_root.player_mc._x < ((_x - 70) - (level * 10)))) && (_root.player_mc._x >= ((_x - 200) - (level * 25)))) {
return(true);
}
} else {
return(false);
}
}
function movePlayer() {
if (isStart >= 50) {
if (myState == 1) {
if (comPause <= 0) {
if (isDiscover()) {
if (_root.player_mc._x < _x) {
if (!(((_x - _root.player_mc._x) < 60) && (_root.player_mc._y < _y))) {
moveLeft();
}
if (_root.player_mc._y < _y) {
if (random(upRandom) == 0) {
up();
}
}
} else if (_root.player_mc._x > _x) {
if (!(((_root.player_mc._x - _x) < 60) && (_root.player_mc._y < _y))) {
moveRight();
}
if (_root.player_mc._y < _y) {
if (random(upRandom) == 0) {
up();
}
}
}
} else {
directionTimer++;
if (random(upRandom) == 0) {
up();
}
if (lrDirection == 1) {
moveLeft();
} else {
moveRight();
}
if (directionTimer >= 80) {
directionTimer = 0;
updateDirection();
}
}
_y = _y - upSpeed;
if (_y <= 40) {
upSpeed = -9;
}
if (_y >= 480) {
upSpeed = 7;
}
if (_root.dimianArray_mc.hitTest(_x + 15, _y - 40, true) || (_root.dimianArray_mc.hitTest(_x - 15, _y - 40, true))) {
upSpeed = -7;
}
if (_root.dimianArray_mc.hitTest(_x - 10, _y + 17, true) || (_root.dimianArray_mc.hitTest(_x + 10, _y + 17, true))) {
upSpeed = 3;
return(undefined);
}
upSpeed = upSpeed - 0.2;
if (upSpeed <= -4) {
upSpeed = -4;
}
_x = _x + speed;
if (_x >= 610) {
_x = -5;
} else if (_x <= -10) {
_x = 605;
}
for (var _local3 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local3]._name == _name) {
break;
}
if (hitTest(_root.computerArray_mc[_local3])) {
separate(_root.computerArray_mc[_local3]);
}
}
}
} else if (myState == 3) {
_y = _y - upSpeed;
upSpeed = upSpeed - 0.2;
if (upSpeed <= -4) {
upSpeed = -4;
}
}
if (_y > 520) {
removeMovieClip();
}
}
}
function moveRight() {
if (pdirection == true) {
_xscale = 100;
var _local3 = 1;
while (_local3 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local3) + "_mc"]._xscale = 100;
_local3++;
}
pdirection = false;
}
speed = speed + speedOne;
if (speed > (speedOne * 9)) {
speed = speedOne * 9;
}
if (((((_root.dimianArray_mc.hitTest(_x + 16, _y + 12, true) || (_root.dimianArray_mc.hitTest(_x + 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 2, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 10, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 20, true))) || (_root.dimianArray_mc.hitTest(_x + 16, _y - 30, true))) {
speed = -5;
}
}
function moveLeft() {
if (pdirection == false) {
_xscale = -100;
var _local3 = 1;
while (_local3 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local3) + "_mc"]._xscale = -100;
_local3++;
}
pdirection = true;
}
speed = speed - speedOne;
if (speed < ((-1 * speedOne) * 9)) {
speed = (-1 * speedOne) * 9;
}
if (((((_root.dimianArray_mc.hitTest(_x - 16, _y + 12, true) || (_root.dimianArray_mc.hitTest(_x - 16, _y + 6, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 2, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 10, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 20, true))) || (_root.dimianArray_mc.hitTest(_x - 16, _y - 30, true))) {
speed = 5;
}
}
static var cmfArray1 = [0.0454937815666199, 1.67667281627655, -0.722166657447815, 0, 0, 0.182286083698273, 0.460871756076813, 0.356842160224915, 0, 0, 1.01092219352722, 0.402533650398254, -0.413455724716187, 0, 0, 0, 0, 0, 1, 0];
static var cmfArray2 = [-0.574000000953674, 1.4300000667572, 0.143999919295311, 0, 100, 0.425999999046326, 0.429999947547913, 0.144000023603439, 0, 100, 0.42600005865097, 1.42999982833862, -0.855999946594238, 0, 99.9999923706055, 0, 0, 0, 1, 0];
static var cmfArray3 = [0.927082657814026, 0.697352766990662, -0.624435424804688, 0, 100, -0.0395555272698402, 0.822759628295898, 0.216795861721039, 0, 100, 0.606476783752441, -0.296008706092834, 0.689531862735748, 0, 99.9999923706055, 0, 0, 0, 1, 0];
static var cmfArray4 = [0.586436450481415, 1.3758317232132, -0.992268264293671, 0, -28.165002822876, -0.0136083038523793, 0.610824108123779, 0.37278413772583, 0, -28.1650009155273, 1.03469800949097, -0.236079767346382, 0.171381875872612, 0, -28.1650047302246, 0, 0, 0, 1, 0];
static var isStart = 0;
static var comPause = 0;
}
Symbol 639 MovieClip [__Packages.PowerMoney] Frame 0
class PowerMoney extends PowerUp
{
var price, gotoAndStop;
function PowerMoney () {
super();
price = 20;
}
function booo() {
_root.soundManage.playSound("money_s");
_root.sm.addScore(price + (_root.gm.level * 10));
gotoAndStop(2);
}
}
Symbol 640 MovieClip [__Packages.BalloonShop] Frame 0
class BalloonShop extends MovieClip
{
var _x, _y, balloon, isView, gotoAndStop, qiqiu_mc, viewPrice_mc, price, hit_mc;
function BalloonShop () {
super();
_x = _root.dimianArray_mc.dimian_mc.shop_mc._x;
_y = _root.dimianArray_mc.dimian_mc.shop_mc._y;
balloon = 6;
isView = false;
getPrice();
gotoAndStop(_root.s_t);
qiqiu_mc.attachMovie("shopqiqiu", "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
qiqiu_mc.qiqiu_mc.gotoAndStop(balloon + 1);
}
function setBalloon(no) {
balloon = no;
qiqiu_mc.qiqiu_mc.gotoAndStop(balloon + 1);
if (balloon <= 0) {
viewPrice_mc.gotoAndStop(2);
}
}
function getPrice() {
switch (_root.gm.level) {
case 1 :
price = 20;
break;
case 2 :
price = 40;
break;
case 3 :
price = 60;
break;
case 4 :
price = 75;
break;
case 5 :
price = 90;
break;
case 6 :
price = 100;
break;
case 7 :
price = 125;
break;
case 8 :
price = 155;
break;
case 9 :
price = 185;
break;
case 10 :
price = 210;
}
}
function reduceBalloon() {
setBalloon(balloon - 1);
}
function onEnterFrame() {
if (isView == false) {
if (hit_mc.hitTest(_root.player_mc._x, _root.player_mc._y, true)) {
isView = true;
_root.buy_mc.gotoAndPlay(2);
}
} else if (hit_mc.hitTest(_root.player_mc._x, _root.player_mc._y, true) == false) {
isView = false;
_root.buy_mc.gotoAndPlay(11);
}
}
}
Symbol 641 MovieClip [__Packages.Hedgehog] Frame 0
class Hedgehog extends Player
{
var dieTimerMax, myType, isHasBullet, dieTimer, isFly, balloon, qiqiu_mc, _xscale, pdirection, booo, myState, upSpeed, speed, _x, _y, hitTest, hit_mc, pointLeft, p_mc, pointRight;
function Hedgehog () {
super();
dieTimerMax = 170;
myType = 1;
isHasBullet = 3;
dieTimer = dieTimerMax;
isFly = false;
balloon = 3;
qiqiu_mc.qiqiu_mc.removeMovieClip();
qiqiu_mc.attachMovie("qiqiu" + balloon, "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
}
function init() {
_xscale = 100;
var _local3 = 1;
while (_local3 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local3) + "_mc"]._xscale = 100;
_local3++;
}
pdirection = false;
booo = 4;
myState = 1;
upSpeed = 0;
speed = 0;
isHasBullet = 3;
dieTimer = dieTimerMax;
isFly = false;
balloon = 3;
qiqiu_mc.qiqiu_mc.removeMovieClip();
_root.hasBullet_mc.gotoAndStop(_root.player_mc.isHasBullet);
qiqiu_mc.attachMovie("qiqiu" + balloon, "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
}
function getBalloonNo() {
if (_root.gm.getLevel() == 1) {
balloon = 2;
} else if (_root.gm.getLevel() == 2) {
balloon = 2;
} else if (_root.gm.getLevel() == 3) {
balloon = 3;
}
}
function setBalloon(no) {
if (balloon < no) {
dieTimer = dieTimerMax;
_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 * (dieTimerMax - dieTimer)) / dieTimerMax);
}
balloon = no;
if (balloon < 0) {
balloon = 0;
}
qiqiu_mc.qiqiu_mc.removeMovieClip();
if (balloon > 0) {
qiqiu_mc.attachMovie("qiqiu" + balloon, "qiqiu_mc", qiqiu_mc.getNextHighestDepth());
if (pdirection == true) {
_xscale = -100;
var _local3 = 1;
while (_local3 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local3) + "_mc"]._xscale = -100;
_local3++;
}
pdirection = true;
}
} else if (balloon <= 0) {
myState = 2;
}
}
function reduceBalloon(mc) {
_root.soundManage.playSound("qiqiubaozha_s");
var _local3 = _root.zidanArray_mc.attachMovie("balloonbooo", ("balloonbooo" + _root.zidanArray_mc.getNextHighestDepth()) + "_mc", _root.zidanArray_mc.getNextHighestDepth());
if (balloon == 3) {
if (mc._x > _x) {
_local3._x = _x + 15;
_local3._y = _y - 30;
} else if (mc._x <= _x) {
_local3._x = _x - 15;
_local3._y = _y - 30;
}
} else if (balloon == 2) {
if (mc._x > _x) {
_local3._x = _x + 10;
_local3._y = _y - 30;
} else if (mc._x <= _x) {
_local3._x = _x - 10;
_local3._y = _y - 30;
}
} else if (balloon == 1) {
_local3._x = _x;
_local3._y = _y - 30;
}
setBalloon(balloon - 1);
}
function addBalloon() {
setBalloon(balloon + 1);
}
function movePlayer() {
if (myState == 1) {
if (isFly == true) {
_y = _y - upSpeed;
if (_y <= 40) {
upSpeed = -9;
}
if (_root.dimianArray_mc.hitTest(_x + 15, _y - 40, true) || (_root.dimianArray_mc.hitTest(_x - 15, _y - 40, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 15, _y - 40, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 15, _y - 40, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
upSpeed = -7;
}
if (_root.dimianArray_mc.hitTest(_x - 10, _y + 17, true) || (_root.dimianArray_mc.hitTest(_x + 10, _y + 17, true))) {
upSpeed = 0;
isFly = false;
var _local4 = _y + 5;
var _local3 = _y + 17;
var _local6 = 1;
while (_local6 <= 3) {
if (_root.dimianArray_mc.hitTest(_x, (_local4 + _local3) / 2, true)) {
_y = _y - Math.abs((_local3 - _local4) / 2);
_local3 = _local3 - Math.abs((_local3 - _local4) / 2);
} else {
_local4 = _local4 + Math.abs((_local3 - _local4) / 2);
}
_local6++;
}
return(undefined);
}
isFly = true;
upSpeed = upSpeed - 0.2;
if (upSpeed <= -4) {
upSpeed = -4;
}
} else if (isFly == false) {
if (!(_root.dimianArray_mc.hitTest(_x - 10, _y + 17, true) || (_root.dimianArray_mc.hitTest(_x + 10, _y + 17, true)))) {
isFly = true;
}
}
_x = _x + speed;
if (_x >= 610) {
_x = -5;
} else if (_x <= -10) {
_x = 605;
}
if (hitTest(_root.computerArray_mc)) {
for (var _local5 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local5].myState != 3) {
if (hit_mc.hitTest(_root.computerArray_mc[_local5].qiqiu_mc.qiqiu_mc.hit_mc)) {
_root.computerArray_mc[_local5].reduceBalloon(_root.computerArray_mc[_local5]);
separate(_root.computerArray_mc[_local5]);
break;
}
if (qiqiu_mc.qiqiu_mc.hit_mc.hitTest(_root.computerArray_mc[_local5].hit_mc)) {
reduceBalloon();
separate(_root.computerArray_mc[_local5]);
break;
}
if (hit_mc.hitTest(_root.computerArray_mc[_local5].hit_mc)) {
separate(_root.computerArray_mc[_local5]);
break;
}
}
}
}
if (((_root.powerupArray_mc.hitTest(_x + 6, _y - 1, true) || (_root.powerupArray_mc.hitTest(_x - 6, _y - 1, true))) || (_root.powerupArray_mc.hitTest(_x + 6, _y - 11, true))) || (_root.powerupArray_mc.hitTest(_x - 6, _y - 11, true))) {
for (var _local6 in _root.powerupArray_mc) {
if (hit_mc.hitTest(_root.powerupArray_mc[_local6].hit_mc)) {
_root.powerupArray_mc[_local6].booo();
}
}
}
if (_y >= 470) {
dieTimer--;
if (dieTimer <= 0) {
myState = 3;
}
_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 * (dieTimerMax - dieTimer)) / dieTimerMax);
}
} else if (myState == 2) {
dieTimer--;
if (dieTimer <= 0) {
myState = 3;
}
_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 * (dieTimerMax - dieTimer)) / dieTimerMax);
if (isFly == true) {
_y = _y - upSpeed;
if (_y <= 40) {
upSpeed = -7;
}
if (_root.dimianArray_mc.hitTest(_x + 15, _y - 7, true) || (_root.dimianArray_mc.hitTest(_x - 15, _y - 7, true))) {
if ((_root.gm.level == 6) || (_root.gm.level == 8)) {
if (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x + 15, _y - 7, true) || (_root.dimianArray_mc.dimian_mc.fwg_mc.hitTest(_x - 15, _y - 7, true))) {
_root.dimianView_mc.dimianView_mc.fwg_mc.gotoAndPlay(2);
}
}
upSpeed = -7;
}
if (_root.dimianArray_mc.hitTest(_x - 10, _y + 17, true) || (_root.dimianArray_mc.hitTest(_x + 10, _y + 17, true))) {
upSpeed = 0;
isFly = false;
var _local4 = _y + 5;
var _local3 = _y + 17;
var _local6 = 1;
while (_local6 <= 3) {
if (_root.dimianArray_mc.hitTest(_x, (_local4 + _local3) / 2, true)) {
_y = _y - Math.abs((_local3 - _local4) / 2);
_local3 = _local3 - Math.abs((_local3 - _local4) / 2);
} else {
_local4 = _local4 + Math.abs((_local3 - _local4) / 2);
}
_local6++;
}
return(undefined);
}
isFly = true;
upSpeed = upSpeed - 0.2;
if (upSpeed <= -4) {
upSpeed = -4;
}
} else if (isFly == false) {
if (!(_root.dimianArray_mc.hitTest(_x - 10, _y + 17, true) || (_root.dimianArray_mc.hitTest(_x + 10, _y + 17, true)))) {
isFly = true;
}
}
_x = _x + speed;
if (_x >= 610) {
_x = -5;
} else if (_x <= -10) {
_x = 605;
}
if (hitTest(_root.computerArray_mc)) {
if (_root.computerArray_mc[_local5].myState != 3) {
for (var _local5 in _root.computerArray_mc) {
if (hit_mc.hitTest(_root.computerArray_mc[_local5].qiqiu_mc.qiqiu_mc.hit_mc)) {
separate(_root.computerArray_mc[_local5]);
break;
}
if (hit_mc.hitTest(_root.computerArray_mc[_local5].hit_mc)) {
separate(_root.computerArray_mc[_local5]);
break;
}
}
}
}
if (((_root.powerupArray_mc.hitTest(_x + 6, _y - 1, true) || (_root.powerupArray_mc.hitTest(_x - 6, _y - 1, true))) || (_root.powerupArray_mc.hitTest(_x + 6, _y - 11, true))) || (_root.powerupArray_mc.hitTest(_x - 6, _y - 11, true))) {
for (var _local6 in _root.powerupArray_mc) {
if (hit_mc.hitTest(_root.powerupArray_mc[_local6].hit_mc)) {
_root.powerupArray_mc[_local6].booo();
}
}
}
} else if (myState == 3) {
_root.gm.gameOver();
}
if (_y >= 480) {
upSpeed = 3;
}
}
function separate(mc) {
var _local6 = Math.abs(_x - mc._x);
var _local5 = Math.abs(_y - mc._y);
var _local4 = booo * booo;
var _local3 = (_local6 * _local6) / (_local5 * _local5);
if ((mc._x >= _x) && (mc._y <= _y)) {
upSpeed = -1 * Math.sqrt(_local4 / (_local3 + 1));
speed = -1 * Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x > _x) && (mc._y > _y)) {
upSpeed = Math.sqrt(_local4 / (_local3 + 1));
speed = -1 * Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x < _x) && (mc._y > _y)) {
upSpeed = Math.sqrt(_local4 / (_local3 + 1));
speed = Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
} else if ((mc._x <= _x) && (mc._y <= _y)) {
upSpeed = -1 * Math.sqrt(_local4 / (_local3 + 1));
speed = Math.sqrt(_local4 / ((1 / _local3) + 1));
mc.upSpeed = -1 * upSpeed;
mc.speed = -1 * speed;
}
}
function moveRight() {
if (pdirection == true) {
_xscale = 100;
var _local2 = 1;
while (_local2 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local2) + "_mc"]._xscale = 100;
_local2++;
}
pdirection = false;
}
if (isFly == true) {
speed = speed + 0.6;
if (speed < 0) {
pointLeft();
}
if (speed > 5) {
speed = 5;
}
} else {
if (p_mc._currentframe == 1) {
p_mc.gotoAndStop(2);
}
speed = speed + 0.8;
if (speed < 0) {
pointLeft();
}
if (speed > 6) {
speed = 6;
}
}
pointRight();
}
function moveLeft() {
if (pdirection == false) {
_xscale = -100;
var _local2 = 1;
while (_local2 <= balloon) {
qiqiu_mc.qiqiu_mc[("q" + _local2) + "_mc"]._xscale = -100;
_local2++;
}
pdirection = true;
}
if (isFly == true) {
speed = speed - 0.6;
if (speed > 0) {
pointRight();
}
if (speed < -5) {
speed = -5;
}
} else {
if (p_mc._currentframe == 1) {
p_mc.gotoAndStop(2);
}
speed = speed - 0.8;
if (speed > 0) {
pointRight();
}
if (speed < -6) {
speed = -6;
}
}
pointLeft();
}
}
Symbol 642 MovieClip [__Packages.PowerFlyPig] Frame 0
class PowerFlyPig extends MovieClip
{
var throwTimer, speed, myDirection, _x, _y, _xscale, removeMovieClip, throwPowerUp;
function PowerFlyPig () {
super();
throwTimer = 0;
speed = 3;
myDirection = random(2) + 1;
if (myDirection == 1) {
_x = -50;
_y = 100;
} else {
_x = 650;
_y = 100;
_xscale = -100;
}
}
function onEnterFrame() {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
throwTimer++;
if (throwTimer >= 65) {
createPowerUp();
throwTimer = 0;
}
if (myDirection == 1) {
_x = _x + speed;
} else {
_x = _x - speed;
}
if ((_x < -70) || (_x > 670)) {
removeMovieClip();
}
}
}
}
function createPowerUp() {
throwPowerUp = _root.powerupArray_mc.attachMovie("powerBomb", ("powerBomb" + _root.powerupArray_mc.getNextHighestDepth()) + "_mc", _root.powerupArray_mc.getNextHighestDepth());
throwPowerUp.setIsPigThrow(true);
throwPowerUp._x = _x;
throwPowerUp._y = _y;
}
}
Symbol 643 MovieClip [__Packages.PowerSmallB] Frame 0
class PowerSmallB extends PowerUp
{
var speed, gotoAndStop, fangxiang, _y, _x, removeMovieClip;
function PowerSmallB () {
super();
speed = 4;
}
function booo() {
_root.soundManage.playSound("zhadan_s");
_root.player_mc.reduceBalloon(this);
_root.player_mc.separate(this);
gotoAndStop(2);
}
function setFangxiang(no) {
fangxiang = no;
}
function onEnterFrame() {
if (_root.gm.isGameOver == false) {
if (_root.gm.isPause == false) {
if (fangxiang == 1) {
_y = _y - speed;
} else if (fangxiang == 2) {
_x = _x + speed;
} else if (fangxiang == 3) {
_y = _y + speed;
} else if (fangxiang == 4) {
_x = _x - speed;
} else if (fangxiang == 5) {
_y = _y - (speed / Math.SQRT2);
_x = _x + (speed / Math.SQRT2);
} else if (fangxiang == 6) {
_y = _y + (speed / Math.SQRT2);
_x = _x + (speed / Math.SQRT2);
} else if (fangxiang == 7) {
_y = _y - (speed / Math.SQRT2);
_x = _x - (speed / Math.SQRT2);
} else if (fangxiang == 8) {
_y = _y + (speed / Math.SQRT2);
_x = _x - (speed / Math.SQRT2);
}
if ((((_x < -70) || (_x > 670)) || (_y < -70)) || (_y > 570)) {
removeMovieClip();
}
}
}
}
}
Symbol 644 MovieClip [__Packages.SoundManage] Frame 0
class SoundManage
{
var isMusicPlay, isSoundPlay;
function SoundManage () {
_root.createEmptyMovieClip("mysound_mc", _root.getNextHighestDepth());
_root.createEmptyMovieClip("mymusic_mc", _root.getNextHighestDepth());
soundArray[0] = new Array();
soundArray[1] = new Array();
soundArray[2] = new Array();
musicArray[0] = new Array();
musicArray[1] = new Array();
musicArray[2] = new Array();
addMusic("main_s");
if (isMusicPlay == undefined) {
isMusicPlay = true;
playMusic("main_s", 9999);
}
if (isSoundPlay == undefined) {
isSoundPlay = true;
}
}
function addSound() {
switch (arguments.length) {
case 1 :
soundArray[0].push(arguments[0]);
_root.mysound_mc.createEmptyMovieClip(arguments[0] + "_sound", _root.mysound_mc.getNextHighestDepth());
var _local4 = new Sound(_root.mysound_mc[arguments[0] + "_sound"]);
_local4.attachSound(arguments[0]);
soundArray[1].push(_local4);
soundArray[2].push(100);
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
soundArray[0].push(arguments[0]);
_root.mysound_mc.createEmptyMovieClip(arguments[0] + "_sound", _root.mysound_mc.getNextHighestDepth());
_local4 = new Sound(_root.mysound_mc[arguments[0] + "_sound"]);
_local4.attachSound(arguments[0]);
_local4.setVolume(arguments[1]);
soundArray[1].push(_local4);
soundArray[2].push(arguments[1]);
}
}
function addMusic() {
switch (arguments.length) {
case 1 :
musicArray[0].push(arguments[0]);
_root.mymusic_mc.createEmptyMovieClip(arguments[0] + "_sound", _root.mymusic_mc.getNextHighestDepth());
var _local4 = new Sound(_root.mymusic_mc[arguments[0] + "_sound"]);
_local4.attachSound(arguments[0]);
musicArray[1].push(_local4);
musicArray[2].push(100);
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
musicArray[0].push(arguments[0]);
_root.mymusic_mc.createEmptyMovieClip(arguments[0] + "_sound", _root.mymusic_mc.getNextHighestDepth());
_local4 = new Sound(_root.mymusic_mc[arguments[0] + "_sound"]);
_local4.attachSound(arguments[0]);
_local4.setVolume(arguments[1]);
musicArray[1].push(_local4);
musicArray[2].push(arguments[1]);
}
}
function stopSound() {
isSoundPlay = false;
var _local2 = 0;
while (_local2 <= soundArray[1].length) {
soundArray[1][_local2].setVolume(0);
_local2++;
}
}
function stopMusic() {
isMusicPlay = false;
var _local2 = 0;
while (_local2 <= musicArray[1].length) {
musicArray[1][_local2].setVolume(0);
_local2++;
}
}
function returnSound() {
isSoundPlay = true;
var _local2 = 0;
while (_local2 < soundArray[1].length) {
soundArray[1][_local2].setVolume(soundArray[2][_local2]);
_local2++;
}
}
function returnMusic() {
isMusicPlay = true;
var _local2 = 0;
while (_local2 < musicArray[1].length) {
musicArray[1][_local2].setVolume(musicArray[2][_local2]);
_local2++;
}
}
function setSoundVol() {
switch (arguments.length) {
case 1 :
if (arguments[0] > 100) {
arguments[0] = 100;
} else if (arguments[0] < 0) {
arguments[0] = 0;
}
var _local3 = 0;
while (_local3 < soundArray[1].length) {
soundArray[2][_local3] = arguments[0];
soundArray[1][_local3].setVolume(arguments[0]);
_local3++;
}
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
_local3 = 0;
for(;;){
if (_local3 >= soundArray[0].length) {
break;
}
if (soundArray[0][_local3] == arguments[0]) {
soundArray[2][_local3] = arguments[1];
soundArray[1][_local3].setVolume(arguments[1]);
break;
}
_local3++;
};
}
}
function setMusicVol() {
switch (arguments.length) {
case 1 :
if (arguments[0] > 100) {
arguments[0] = 100;
} else if (arguments[0] < 0) {
arguments[0] = 0;
}
var _local3 = 0;
while (_local3 < musicArray[1].length) {
musicArray[2][_local3] = arguments[0];
musicArray[1][_local3].setVolume(arguments[0]);
_local3++;
}
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
_local3 = 0;
for(;;){
if (_local3 >= musicArray[0].length) {
break;
}
if (musicArray[0][_local3] == arguments[0]) {
musicArray[2][_local3] = arguments[1];
musicArray[1][_local3].setVolume(arguments[1]);
break;
}
_local3++;
};
}
}
function playSound() {
if (isSoundPlay == true) {
switch (arguments.length) {
case 1 :
var _local3 = 0;
while (_local3 <= soundArray[0].length) {
if (soundArray[0][_local3] == arguments[0]) {
soundArray[1][_local3].start(0, 1);
break;
}
_local3++;
}
break;
case 2 :
_local3 = 0;
while (_local3 <= soundArray[0].length) {
if (soundArray[0][_local3] == arguments[0]) {
soundArray[1][_local3].start(0, arguments[1]);
break;
}
_local3++;
}
break;
case 3 :
_local3 = 0;
for(;;){
if (_local3 > soundArray[0].length) {
break;
}
if (soundArray[0][_local3] == arguments[0]) {
soundArray[1][_local3].setVolume(arguments[2]);
soundArray[1][_local3].start(0, arguments[1]);
soundArray[1][_local3].setVolume(soundArray[2][_local3]);
break;
}
_local3++;
};
}
}
}
function playMusic() {
if (isMusicPlay == true) {
switch (arguments.length) {
case 1 :
var _local3 = 0;
while (_local3 <= musicArray[0].length) {
if (musicArray[0][_local3] == arguments[0]) {
musicArray[1][_local3].start(0, 1);
break;
}
_local3++;
}
break;
case 2 :
_local3 = 0;
while (_local3 <= musicArray[0].length) {
if (musicArray[0][_local3] == arguments[0]) {
musicArray[1][_local3].start(0, arguments[1]);
break;
}
_local3++;
}
break;
case 3 :
_local3 = 0;
for(;;){
if (_local3 > musicArray[0].length) {
break;
}
if (musicArray[0][_local3] == arguments[0]) {
musicArray[1][_local3].setVolume(arguments[2]);
musicArray[1][_local3].start(0, arguments[1]);
musicArray[1][_local3].setVolume(musicArray[2][_local3]);
break;
}
_local3++;
};
}
}
}
function isTrueStopSound() {
switch (arguments.length) {
case 0 :
var _local3 = 0;
while (_local3 <= soundArray[1].length) {
soundArray[1][_local3].stop();
_local3++;
}
break;
case 1 :
_local3 = 0;
for(;;){
if (_local3 > soundArray[1].length) {
break;
}
if (soundArray[0][_local3] == arguments[0]) {
soundArray[1][_local3].stop();
}
_local3++;
};
}
}
function isTrueStopMusic() {
switch (arguments.length) {
case 0 :
var _local3 = 0;
while (_local3 <= musicArray[1].length) {
musicArray[1][_local3].stop();
_local3++;
}
break;
case 1 :
_local3 = 0;
for(;;){
if (_local3 > musicArray[1].length) {
break;
}
if (musicArray[0][_local3] == arguments[0]) {
musicArray[1][_local3].stop();
}
_local3++;
};
}
}
function clearSoundAndMusic() {
for (var _local3 in _root.mymusic_mc) {
removeMovieClip(_root.mymusic_mc[_local3]);
}
for (var _local3 in _root.mysound_mc) {
removeMovieClip(_root.mysound_mc[_local3]);
}
removeMovieClip(_root.mysound_mc);
removeMovieClip(_root.mymusic_mc);
soundArray = null;
musicArray = null;
delete soundArray;
delete musicArray;
}
var soundArray = new Array();
var musicArray = new Array();
}
Symbol 645 MovieClip [__Packages.GameManage] Frame 0
class GameManage
{
var powerUpNo, levelMax, level, level_l, level4NowNo, level3NowNo, level2NowNo;
function GameManage () {
powerUpNo = 0;
levelMax = 10;
level = 0;
level_l = 1;
}
function nextLevel() {
isPause = false;
clearAll();
addScore();
level = level + 1;
_root.level = level;
_root.player_mc.setBalloon(3);
_root.player_mc.myState = 1;
_root.player_mc.dieTimer = _root.player_mc.dieTimerMax;
_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 * (_root.player_mc.dieTimerMax - _root.player_mc.dieTimer)) / _root.player_mc.dieTimerMax);
level4NowNo = level4No[level];
level3NowNo = level3No[level];
level2NowNo = level2No[level];
_root.hasBullet_mc.gotoAndStop(_root.player_mc.isHasBullet);
_root.buy_mc.gotoAndStop(1);
Computer.comPause = 0;
Computer.isStart = 0;
powerUpNo = 0;
_root.player_mc.dieTimer = _root.player_mc.dieTimerMax;
_root.player_mc.upSpeed = 0;
_root.player_mc.speed = 0;
_root.player_mc.dieTimer = _root.player_mc.dieTimerMax;
_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 * (_root.player_mc.dieTimerMax - _root.player_mc.dieTimer)) / _root.player_mc.dieTimerMax);
_root.dimianArray_mc.dimian_mc.gotoAndStop(level);
_root.dimianArray_mc.dimian_mc.computerset_mc.gotoAndStop(level);
_root.dimianView_mc.dimianView_mc.gotoAndStop(level);
_root.player_mc._x = _root.dimianArray_mc.dimian_mc.playerset_mc._x;
_root.player_mc._y = _root.dimianArray_mc.dimian_mc.playerset_mc._y - 17;
_root.shopArray_mc.attachMovie("shop", "shop_mc", _root.shopArray_mc.getNextHighestDepth());
_root.shopArray_mc.shop_mc._x = _root.dimianArray_mc.dimian_mc.shop_mc._x;
_root.shopArray_mc.shop_mc._y = _root.dimianArray_mc.dimian_mc.shop_mc._y;
for (var _local4 in _root.dimianArray_mc.dimian_mc.computerset_mc) {
var _local3 = _root.computerArray_mc.attachMovie("computer", ("computer" + _root.computerArray_mc.getNextHighestDepth()) + "_mc", _root.computerArray_mc.getNextHighestDepth());
_local3._x = _root.dimianArray_mc.dimian_mc.computerset_mc[_local4]._x;
_local3._y = _root.dimianArray_mc.dimian_mc.computerset_mc[_local4]._y - 17;
_local3.setLevel(getComLevel());
}
}
function getComBalloon() {
}
function getComLevel() {
if (level4NowNo > 0) {
level4NowNo--;
return(4);
}
if (level3NowNo > 0) {
level3NowNo--;
return(3);
}
if (level2NowNo > 0) {
level2NowNo--;
return(2);
}
return(1);
}
function addScore() {
if (level != 0) {
_root.sm.addScore(levelScoreArray[level - 1]);
}
}
function clearAll() {
_root.shopArray_mc.shop_mc.removeMovieClip();
for (var _local4 in _root.computerArray_mc) {
_root.computerArray_mc[_local4].removeMovieClip();
}
for (var _local3 in _root.zidanArray_mc) {
_root.zidanArray_mc[_local3].removeMovieClip();
}
for (var _local2 in _root.powerupArray_mc) {
_root.powerupArray_mc[_local2].removeMovieClip();
}
}
function getLevel() {
return(level);
}
function win() {
isGameOver = true;
_root.gotoAndStop("win");
}
function gameOver() {
isGameOver = true;
_root.replay_mc.gotoAndStop(2);
}
function isAllOver() {
var _local3 = true;
for (var _local4 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local4].myState != 3) {
_local3 = false;
break;
}
}
if (_local3 == true) {
if (level < levelMax) {
isPause = true;
_root.player_mc._x = -100;
_root.player_mc._y = -100;
_root.nextlevel_mc.gotoAndStop(2);
} else if (level >= levelMax) {
win();
}
}
}
var isGameOver = false;
var isPause = false;
static var levelScoreArray = new Array(100, 150, 200, 250, 300, 400, 500, 650, 800, 1000);
var powerUpNoArray = new Array(8, 8, 10, 12, 13, 14, 15, 15, 16, 18);
static var level4No = new Array(0, 0, 0, 0, 0, 0, 1, 2, 2, 3, 4);
static var level3No = new Array(0, 0, 0, 1, 2, 3, 2, 3, 5, 5, 4);
static var level2No = new Array(0, 1, 2, 2, 2, 1, 3, 1, 0, 0, 0);
}
Symbol 646 MovieClip [__Packages.ScoreManage] Frame 0
class ScoreManage
{
var score;
function ScoreManage () {
score = 0;
_root.score = 0;
}
function addScore(no) {
if (!isNaN(no)) {
score = score + no;
score = int(score);
viewScore();
flashUpdateScore(no);
}
}
function reduceScore(no) {
if (!isNaN(no)) {
score = score - no;
if (score < 0) {
score = 0;
}
score = int(score);
viewScore();
flashUpdateScore(no * -1);
}
}
function clearScore() {
score = 0;
viewScore();
}
function viewScore() {
_root.score = score;
}
function flashUpdateScore(no) {
var _local2 = "";
var _local3 = _root.zidanArray_mc.attachMovie("viewMoney", "viewMoney" + _root.zidanArray_mc.getNextHighestDepth(), _root.zidanArray_mc.getNextHighestDepth());
_local3._x = _root.player_mc._x;
_local3._y = _root.player_mc._y - 5;
if (no < 0) {
_local2 = _local2 + "- ";
}
_local2 = _local2 + "$ ";
_local2 = _local2 + String(Math.abs(no));
_local3.viewM_mc.price = _local2;
}
}
Symbol 647 MovieClip [__Packages.KeyManage] Frame 0
class KeyManage
{
var player;
function KeyManage () {
}
function setPlayer(player) {
this.player = player;
}
function getPlayer() {
return(player);
}
function detectKeys() {
if ((Key.isDown(39) || (Key.isDown(68))) || (Key.isDown(100))) {
player.moveRight();
} else if ((Key.isDown(37) || (Key.isDown(65))) || (Key.isDown(97))) {
player.moveLeft();
} else {
if (player.p_mc._currentframe == 2) {
player.p_mc.gotoAndStop(1);
}
player.moveReturn();
}
if ((Key.isDown(38) || (Key.isDown(87))) || (Key.isDown(119))) {
if (player.upSpeed < 5) {
player.upSpeed = (player.upSpeed + (player.balloon * 0.2)) + 0.3;
}
if (player.upSpeed > 5) {
player.upSpeed = 5;
}
if (player.isFly == false) {
player._y = player._y - 5;
player.upSpeed = player.upSpeed + 1;
player.isFly = true;
}
player.chibang_mc.play();
} else {
player.chibang_mc.gotoAndStop(1);
}
}
}
Symbol 30 MovieClip Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
_root.stop();
onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
Symbol 30 MovieClip Frame 146
_root.gotoAndStop("mainmenu");
Symbol 34 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 41 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 57 Button
on (release) {
viewHighscore();
}
Symbol 58 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;
}
Symbol 58 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 36 MovieClip in Symbol 58 MovieClip Frame 3
on (release) {
}
Symbol 69 MovieClip [shopqiqiu] Frame 1
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 2
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 3
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 4
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 5
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 6
stop();
Symbol 69 MovieClip [shopqiqiu] Frame 7
stop();
Symbol 104 MovieClip [boom_1] Frame 16
this._parent.removeMovieClip();
Symbol 105 MovieClip [powerSmallB] Frame 1
#initclip 34
Object.registerClass("powerSmallB", PowerSmallB);
#endinitclip
stop();
Symbol 105 MovieClip [powerSmallB] Frame 2
Symbol 108 MovieClip [viewMoney] Frame 16
this.removeMovieClip();
Symbol 156 MovieClip Frame 1
stop();
Symbol 156 MovieClip Frame 11
gotoAndStop (1);
Symbol 165 MovieClip [dimianView] Frame 1
stop();
Symbol 165 MovieClip [dimianView] Frame 2
stop();
Symbol 165 MovieClip [dimianView] Frame 3
stop();
Symbol 165 MovieClip [dimianView] Frame 4
stop();
Symbol 165 MovieClip [dimianView] Frame 5
stop();
Symbol 165 MovieClip [dimianView] Frame 6
stop();
Symbol 165 MovieClip [dimianView] Frame 7
stop();
Symbol 165 MovieClip [dimianView] Frame 8
stop();
Symbol 165 MovieClip [dimianView] Frame 9
stop();
Symbol 165 MovieClip [dimianView] Frame 10
stop();
Symbol 200 MovieClip Frame 14
stop();
Symbol 201 MovieClip [powerBomb] Frame 1
#initclip 22
Object.registerClass("powerBomb", PowerBomb);
#endinitclip
stop();
Symbol 201 MovieClip [powerBomb] Frame 2
Symbol 206 MovieClip [laser] Frame 1
function onEnterFrame() {
for (var _local4 in pointArray_mc) {
var _local2 = ExtMath.to_global(pointArray_mc, pointArray_mc[_local4]._x, pointArray_mc[_local4]._y);
if (_root.computerArray_mc.hitTest(_local2.x, _local2.y, true)) {
for (var _local3 in _root.computerArray_mc) {
if (_root.computerArray_mc[_local3].qiqiu_mc.qiqiu_mc.hit_mc.hitTest(_local2.x, _local2.y, true)) {
_root.computerArray_mc[_local3].reduceBalloon();
}
}
}
}
}
Symbol 206 MovieClip [laser] Frame 5
this.onEnterFrame = null;
Symbol 206 MovieClip [laser] Frame 11
this.removeMovieClip();
Symbol 211 MovieClip [powerElectricity] Frame 1
#initclip 23
Object.registerClass("powerElectricity", PowerElectricity);
#endinitclip
stop();
Symbol 211 MovieClip [powerElectricity] Frame 2
this.removeMovieClip();
Symbol 214 MovieClip [stitchBullet] Frame 1
#initclip 24
Object.registerClass("stitchBullet", StitchBullet);
#endinitclip
Symbol 217 MovieClip [powerPower] Frame 1
#initclip 25
Object.registerClass("powerPower", PowerPower);
#endinitclip
stop();
Symbol 217 MovieClip [powerPower] Frame 2
this.removeMovieClip();
Symbol 225 MovieClip [powerBalloon] Frame 1
#initclip 26
Object.registerClass("powerBalloon", PowerBalloon);
#endinitclip
stop();
Symbol 225 MovieClip [powerBalloon] Frame 2
this.removeMovieClip();
Symbol 228 MovieClip [powerStitch] Frame 1
#initclip 27
Object.registerClass("powerStitch", PowerStitch);
#endinitclip
stop();
Symbol 228 MovieClip [powerStitch] Frame 2
this.removeMovieClip();
Symbol 230 MovieClip [powerPause] Frame 1
#initclip 28
Object.registerClass("powerPause", PowerPause);
#endinitclip
stop();
Symbol 230 MovieClip [powerPause] Frame 2
this.removeMovieClip();
Symbol 233 MovieClip [powerMoney] Frame 1
#initclip 29
Object.registerClass("powerMoney", PowerMoney);
#endinitclip
stop();
Symbol 233 MovieClip [powerMoney] Frame 2
this.removeMovieClip();
Symbol 235 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 1
stop();
Symbol 249 MovieClip Frame 2
stop();
Symbol 262 MovieClip [shop] Frame 1
#initclip 30
Object.registerClass("shop", BalloonShop);
#endinitclip
stop();
viewPrice_mc.price = this.price;
Symbol 262 MovieClip [shop] Frame 2
stop();
viewPrice_mc.price = this.price;
Symbol 262 MovieClip [shop] Frame 3
stop();
viewPrice_mc.price = this.price;
Symbol 271 MovieClip [computer] Frame 1
#initclip 31
Object.registerClass("computer", Computer);
#endinitclip
stop();
Symbol 271 MovieClip [computer] Frame 2
stop();
Symbol 271 MovieClip [computer] Frame 3
stop();
Symbol 273 MovieClip Frame 1
stop();
Symbol 273 MovieClip Frame 2
stop();
Symbol 273 MovieClip Frame 3
stop();
Symbol 273 MovieClip Frame 4
stop();
Symbol 273 MovieClip Frame 5
stop();
Symbol 273 MovieClip Frame 6
stop();
Symbol 273 MovieClip Frame 7
stop();
Symbol 273 MovieClip Frame 8
stop();
Symbol 273 MovieClip Frame 9
stop();
Symbol 273 MovieClip Frame 10
stop();
Symbol 283 MovieClip [dimian] Frame 1
stop();
Symbol 283 MovieClip [dimian] Frame 2
stop();
Symbol 283 MovieClip [dimian] Frame 3
stop();
Symbol 283 MovieClip [dimian] Frame 4
stop();
Symbol 283 MovieClip [dimian] Frame 5
stop();
Symbol 283 MovieClip [dimian] Frame 6
stop();
Symbol 283 MovieClip [dimian] Frame 7
stop();
Symbol 283 MovieClip [dimian] Frame 8
stop();
Symbol 283 MovieClip [dimian] Frame 9
stop();
Symbol 283 MovieClip [dimian] Frame 10
stop();
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 2
stop();
Symbol 324 MovieClip Frame 1
stop();
Symbol 324 MovieClip Frame 2
stop();
Symbol 338 MovieClip Frame 1
stop();
Symbol 338 MovieClip Frame 2
stop();
Symbol 339 MovieClip [ciwei] Frame 1
#initclip 32
Object.registerClass("ciwei", Hedgehog);
#endinitclip
stop();
Symbol 339 MovieClip [ciwei] Frame 2
stop();
Symbol 339 MovieClip [ciwei] Frame 3
stop();
Symbol 344 MovieClip [powerFlyPig] Frame 1
#initclip 33
Object.registerClass("powerFlyPig", PowerFlyPig);
#endinitclip
stop();
Symbol 352 MovieClip [balloonbooo] Frame 6
stop();
this.removeMovieClip();
Symbol 360 MovieClip Frame 1
stop();
Symbol 388 Button
on (release) {
if (_root.isIn == true) {
_root.gotoAndStop("selectplayer");
} else {
_root.gotoAndStop("Instructions");
}
}
Symbol 391 Button
on (release) {
_root.gotoAndStop("Instructions");
}
Symbol 394 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 397 Button
on (release) {
getURL ("http://www.ifungames.com", "_blank");
}
Symbol 400 Button
on (release) {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
}
Symbol 403 Button
on (release) {
viewHighscore();
}
Symbol 407 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 410 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 413 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.freeworldgroup.com", "_blank");
};
Symbol 417 MovieClip Frame 12
stop();
Symbol 422 Button
on (release) {
nextFrame();
}
Symbol 424 Button
on (release) {
_root.gotoAndStop("selectplayer");
}
Symbol 426 Button
on (release) {
_root.gotoAndStop("mainmenu");
}
Symbol 441 Button
on (release) {
prevFrame();
}
Symbol 449 Button
on (release) {
_root.gotoAndStop("selectplayer");
}
Symbol 464 MovieClip Frame 1
stop();
Symbol 464 MovieClip Frame 2
stop();
Symbol 464 MovieClip Frame 3
stop();
Symbol 472 Button
on (release) {
_root.selectTemp = 0;
_root.nextSelect();
_root.c_t = 0;
_root.p_t = 0;
_root.s_t = 0;
_root.niut = "";
_root.gout = "";
_root.yangt = "";
}
Symbol 473 Button
on (release) {
_root.gotoAndStop("gamestart");
}
Symbol 474 MovieClip Frame 1
stop();
Symbol 474 MovieClip Frame 2
stop();
Symbol 474 MovieClip Frame 3
stop();
Symbol 478 MovieClip Frame 1
stop();
Symbol 478 MovieClip Frame 4
gotoAndStop (1);
Symbol 487 MovieClip Frame 1
stop();
Symbol 487 MovieClip Frame 2
stop();
Symbol 487 MovieClip Frame 3
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 2
stop();
Symbol 501 MovieClip Frame 1
stop();
Symbol 501 MovieClip Frame 2
stop();
Symbol 504 MovieClip Frame 1
stop();
Symbol 504 MovieClip Frame 2
stop();
Symbol 507 MovieClip Frame 1
stop();
Symbol 507 MovieClip Frame 2
stop();
Symbol 512 MovieClip Frame 1
stop();
Symbol 512 MovieClip Frame 10
function quality_init() {
switch (_root._quality) {
case "LOW" :
bt4.gotoAndStop(2);
break;
case "MEDIUM" :
bt3.gotoAndStop(2);
break;
case "HIGH" :
bt2.gotoAndStop(2);
break;
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 () {
bt_init();
_root._quality = "BEST";
quality_init();
bt1.gotoAndStop(2);
};
bt2.onPress = function () {
bt_init();
_root._quality = "HIGH";
quality_init();
bt2.gotoAndStop(2);
};
bt3.onPress = function () {
bt_init();
_root._quality = "MEDIUM";
quality_init();
bt3.gotoAndStop(2);
};
bt4.onPress = function () {
bt_init();
_root._quality = "LOW";
quality_init();
bt4.gotoAndStop(2);
};
Symbol 513 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 () {
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 () {
if (_root.isSoundPlay == true) {
_root.soundManage.stopSound();
_root.isSoundPlay = false;
btSound.gotoAndStop(2);
} else {
_root.soundManage.returnSound();
_root.isSoundPlay = true;
btSound.gotoAndStop(1);
}
};
Symbol 516 Button
on (release) {
if (_root.return_mc._visible == false) {
_root.return_mc._visible = true;
_root.gm.isPause = true;
} else {
_root.return_mc._visible = false;
_root.gm.isPause = false;
}
}
Symbol 518 Button
on (release) {
_root.gm.isPause = false;
_root.gotoAndStop("mainmenu");
}
Symbol 519 Button
on (release) {
_root.gm.isPause = false;
this._visible = false;
}
Symbol 524 MovieClip Frame 1
stop();
Symbol 524 MovieClip Frame 10
stop();
Symbol 524 MovieClip Frame 19
stop();
Symbol 530 Button
on (release) {
this.gotoAndStop(1);
_root.gm.nextLevel();
}
Symbol 533 MovieClip Frame 1
stop();
Symbol 533 MovieClip Frame 2
stop();
nowscore = _root.score;
nextscore = _root.score + GameManage.levelScoreArray[_root.gm.level - 1];
Instance of Symbol 527 MovieClip in Symbol 533 MovieClip Frame 2
on (release) {
}
Symbol 537 Button
on (release) {
_root.sm.reduceScore(_root.sm.score * 0.3);
_root.gm.isGameOver = false;
_root.gm.level--;
_root.player_mc.init();
_root.gm.nextLevel();
this.gotoAndStop(1);
}
Symbol 540 Button
on (release) {
_root.gotoAndStop("mainmenu");
}
Symbol 543 MovieClip Frame 1
stop();
Symbol 543 MovieClip Frame 2
stop();
Instance of Symbol 527 MovieClip in Symbol 543 MovieClip Frame 2
on (release) {
}
Instance of Symbol 58 MovieClip in Symbol 543 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
_game_name = "barnyard";
score_var = "_root.score";
}
Instance of Symbol 414 MovieClip in Symbol 543 MovieClip Frame 2
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 558 MovieClip Frame 1
stop();
Symbol 558 MovieClip Frame 2
stop();
Symbol 558 MovieClip Frame 3
stop();
Symbol 621 MovieClip Frame 1
shengli_mc.gotoAndStop(_root.p_t);
Symbol 621 MovieClip Frame 365
stop();
Instance of Symbol 58 MovieClip in Symbol 621 MovieClip Frame 365
//component parameters
onClipEvent (construct) {
_game_name = "barnyard";
score_var = "_root.score";
}
Symbol 626 Button
on (release) {
_root.gotoAndStop("mainmenu");
}