Frame 1
var my_cm = new ContextMenu();
my_cm.hideBuiltInItems();
this.menu = my_cm;
MochiAd.showPreGameAd({id:"344918f11cd07655", res:"480x560"});
Frame 3
if (_root.getBytesLoaded() < _root.getBytesTotal()) {
gotoAndStop ("Loading");
}
Instance of Symbol 112 MovieClip in Frame 5
//component parameters
onClipEvent (construct) {
_game_name = "blockocide";
score_var = "_root.game.score";
}
Symbol 2 MovieClip Frame 1
onPress = function () {
FWGURL();
};
this.cacheAsBitmap = true;
Symbol 5 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 9 MovieClip Frame 1
_x = (Stage.width / 2);
_y = ((Stage.height / 2) - 30);
Symbol 9 MovieClip Frame 39
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();
}
}
};
Symbol 310 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
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 311 MovieClip [__Packages.Fade] Frame 0
class Fade
{
function Fade () {
}
static function start() {
var _local4 = Stage.width;
var _local5 = Stage.height;
var bmpRoot = (new flash.display.BitmapData(_local4, _local5, false, 0));
bmpRoot.draw(_root);
var _local3 = _root.createEmptyMovieClip("mClip_mask", _root.getNextHighestDepth());
var mClip_bmp = _root.createEmptyMovieClip("mClip_bmp", _root.getNextHighestDepth());
mClip_bmp.attachBitmap(bmpRoot, 0);
_local3.bmpRoot = bmpRoot;
_local3.mClip_bmp = mClip_bmp;
_local3.nTime = 0;
_local3.nT = 20;
_local3.ready = function () {
this.mClip_bmp.setMask(this);
Fade.enabledFor(true);
};
_local3.finish = function () {
this.mClip_bmp.removeMovieClip();
this.bmpRoot.dispose();
Fade.enabledFor(false);
this.removeMovieClip();
};
switch (random(4)) {
case 0 :
_local3.nRdm = random(2);
createClip("m_", _local3, 0, 0);
createClip("m_", _local3, 0, 1, {_x:10, _y:10, _rotation:180});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 50 - Fade.nolinearCycle(this.nTime, this.nT, 50);
if (this.nRdm > 0) {
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
} else {
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 1 :
_local3.nRdm = random(3);
_local3.nRdm_2 = random(4);
createClip("m_", _local3, 1, 0, {_x:5, _y:5});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Fade.nolinearCycle(this.nTime, this.nT, 100);
switch (this.nRdm) {
case 0 :
this.m_0._xscale = 150;
this.m_0._yscale = this.nTemp;
break;
case 1 :
this.m_0._xscale = this.nTemp;
this.m_0._yscale = 150;
break;
case 2 :
this.m_0._xscale = (this.m_0._yscale = this.nTemp);
}
if (this.nRdm_2 == 3) {
this.m_0._rotation = 180 - Fade.nolinearCycle(this.nTime, this.nT, 180);
} else if (this.nRdm_2 == 2) {
this.m_0._rotation = Fade.nolinearCycle(this.nTime, this.nT, 180);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 2 :
_local3.nRdm = random(5);
createClip("m_", _local3, 2, 0);
createClip("m_", _local3, 2, 1, {_x:10, _y:10, _rotation:180});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Fade.nolinearCycle(this.nTime, this.nT, 100);
switch (this.nRdm) {
case 0 :
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
break;
case 1 :
this.m_0._xscale = (this.m_1._yscale = this.nTemp);
break;
case 2 :
this.m_0._yscale = (this.m_1._xscale = this.nTemp);
break;
case 3 :
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
break;
case 4 :
this.m_0._xscale = (this.m_1._xscale = this.nTemp);
this.m_0._yscale = (this.m_1._yscale = this.nTemp);
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
case 3 :
_local3.nRdm = random(2);
createClip("m_", _local3, 2, 0);
createClip("m_", _local3, 2, 1, {_x:10, _y:10, _rotation:180});
createClip("m_", _local3, 2, 2, {_x:0, _y:10, _rotation:-90});
createClip("m_", _local3, 2, 3, {_x:10, _y:0, _rotation:90});
_local3.onEnterFrame = function () {
if (this.nTime == 0) {
this.ready();
}
this.nTime++;
this.nTemp = 100 - Fade.nolinearCycle(this.nTime, this.nT, 100);
if (this.nRdm > 0) {
this.m_0._yscale = (this.m_1._yscale = (this.m_2._yscale = (this.m_3._yscale = this.nTemp)));
} else {
this.m_0._xscale = (this.m_1._xscale = (this.m_2._xscale = (this.m_3._xscale = this.nTemp)));
}
if (this.nTime == (this.nT / 2)) {
this.finish();
delete this.onEnterFrame;
}
};
break;
}
(_local3._width = _local4);
(_local3._height = _local5);
}
static function enabledFor(_b, _m, _nDepth) {
(_m == undefined) && (_m = _root);
(_nDepth == undefined) && (_nDepth = _m.getNextHighestDepth());
if (_b) {
_m.createEmptyMovieClip("mEnabled", _nDepth);
_m.mEnabled.enabled = false;
_m.mEnabled.hitArea = _root;
_m.mEnabled.onPress = function () {
};
updateAfterEvent();
} else {
_m.mEnabled.removeMovieClip();
updateAfterEvent();
}
}
static function createClip(_s, _m, _nType, _nDepth, _ob) {
(_nDepth == undefined) && (_nDepth = _m.getNextHighestDepth());
(_nType == undefined) && (_nType = 0);
_m.createEmptyMovieClip(_s + _nDepth, _nDepth);
_m[_s + _nDepth].beginFill(16711680);
switch (_nType) {
case 0 :
_m[_s + _nDepth].lineTo(10, 0);
_m[_s + _nDepth].lineTo(10, 10);
_m[_s + _nDepth].lineTo(0, 10);
_m[_s + _nDepth].lineTo(0, 0);
break;
case 1 :
_m[_s + _nDepth].moveTo(-5, -5);
_m[_s + _nDepth].lineTo(-5, 5);
_m[_s + _nDepth].lineTo(5, 5);
_m[_s + _nDepth].lineTo(5, -5);
_m[_s + _nDepth].lineTo(-5, -5);
break;
case 2 :
_m[_s + _nDepth].lineTo(10, 0);
_m[_s + _nDepth].lineTo(0, 10);
_m[_s + _nDepth].lineTo(0, 0);
break;
}
_m[_s + _nDepth].endFill();
for (var _local5 in _ob) {
_m[_s + _nDepth][_local5] = _ob[_local5];
}
return(_m[_s + _nDepth]);
}
static function nolinearCycle(x, T, r) {
var _local1 = T / 2;
var _local2 = (-r) / (_local1 * _local1);
return((_local2 * Math.pow((x % T) - _local1, 2)) + r);
}
static function linearCycle(x, T, r) {
var _local1 = T / 2;
if ((x % T) > _local1) {
return((1 - ((x % _local1) / _local1)) * r);
}
if ((x % T) < _local1) {
return(((x % _local1) / _local1) * r);
}
return(r);
}
}
Symbol 312 MovieClip [__Packages.Father] Frame 0
class Father extends MovieClip
{
function Father () {
super();
}
function onEnterFrame() {
if (_root.game.isGameOver == false) {
if (_root.game.isPause == false) {
run();
}
}
}
function run() {
}
}
Symbol 313 MovieClip [__Packages.Box] Frame 0
class Box extends Father
{
var isRun, guang_mc, _xscale, _yscale, fangxiang, swapDepths, defaultDepth, _y, speed, _rotation, isUp, myColor, box_mc, _name, _x;
function Box () {
super();
isRun = false;
init();
}
function backup() {
guang_mc._visible = false;
_xscale = 100;
_yscale = 100;
fangxiang = 1;
swapDepths(defaultDepth);
run = null;
}
function goDown(ty) {
_y = ty;
speed = 3;
run = function () {
this._y = this._y + this.speed;
this.speed = this.speed + 1.5;
if (this._y >= this.default_y) {
this._y = this.default_y;
this.isRun = false;
this.run = null;
}
};
}
function init() {
_rotation = 0;
_xscale = 100;
_yscale = 100;
isUp = false;
guang_mc._visible = false;
fangxiang = 1;
myColor = random(4) + 1;
box_mc.gotoAndStop(myColor);
}
function setValue(no) {
_rotation = 0;
_xscale = 100;
_yscale = 100;
isUp = false;
guang_mc._visible = false;
fangxiang = 1;
myColor = no;
box_mc.gotoAndStop(myColor);
}
function onEnterFrame() {
run();
}
function boooView() {
_root.game.boxBoooArray_mc.attachMovie("kuai" + myColor, _name + "_booo_mc", _root.game.boxBoooArray_mc.getNextHighestDepth(), {_x:_x, _y:_y});
}
function remove(no) {
isRun = true;
backup();
if (no == undefined) {
init();
} else {
setValue(no);
}
goDown(_y - ((_root.game.thisClearW + 1) * 40));
}
function run() {
}
}
Symbol 314 MovieClip [__Packages.manage.SoundManage] Frame 0
class manage.SoundManage
{
var soundMC, musicMC, isMusicPlay, isSoundPlay;
function SoundManage () {
soundMC = _root.createEmptyMovieClip("mysound_mc", _root.getNextHighestDepth());
musicMC = _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", 999999);
}
if (isSoundPlay == undefined) {
isSoundPlay = true;
}
}
function addSound() {
switch (arguments.length) {
case 1 :
soundArray[0].push(arguments[0]);
soundMC.createEmptyMovieClip(arguments[0] + "_sound", soundMC.getNextHighestDepth());
var _local3 = new Sound(soundMC[arguments[0] + "_sound"]);
_local3.attachSound(arguments[0]);
soundArray[1].push(_local3);
soundArray[2].push(100);
trace((("\u52A0\u5165\u97F3\u6548\uFF1A" + arguments[0]) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
soundArray[0].push(arguments[0]);
soundMC.createEmptyMovieClip(arguments[0] + "_sound", soundMC.getNextHighestDepth());
_local3 = new Sound(soundMC[arguments[0] + "_sound"]);
_local3.attachSound(arguments[0]);
_local3.setVolume(arguments[1]);
soundArray[1].push(_local3);
soundArray[2].push(arguments[1]);
trace((("\u52A0\u5165\u97F3\u6548\uFF1A" + arguments[0]) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
}
}
function addMusic() {
switch (arguments.length) {
case 1 :
musicArray[0].push(arguments[0]);
musicMC.createEmptyMovieClip(arguments[0] + "_sound", musicMC.getNextHighestDepth());
var _local3 = new Sound(musicMC[arguments[0] + "_sound"]);
_local3.attachSound(arguments[0]);
musicArray[1].push(_local3);
musicArray[2].push(100);
trace((("\u52A0\u5165\u97F3\u4E50\uFF1A" + arguments[0]) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
break;
case 2 :
if (arguments[1] > 100) {
arguments[1] = 100;
} else if (arguments[1] < 0) {
arguments[1] = 0;
}
musicArray[0].push(arguments[0]);
musicMC.createEmptyMovieClip(arguments[0] + "_sound", musicMC.getNextHighestDepth());
_local3 = new Sound(musicMC[arguments[0] + "_sound"]);
_local3.attachSound(arguments[0]);
_local3.setVolume(arguments[1]);
musicArray[1].push(_local3);
musicArray[2].push(arguments[1]);
trace((("\u52A0\u5165\u97F3\u6548\uFF1A" + arguments[0]) + "\u97F3\u91CF\u4E3A\uFF1A") + _local3.getVolume());
}
}
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);
trace("\u64AD\u653E\u97F3\u6548\uFF1A" + soundArray[1][_local3]);
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]);
trace("\u64AD\u653E\u97F3\u6548\uFF1A" + soundArray[1][_local3]);
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]);
trace((("\u64AD\u653E\u97F3\u6548\uFF1A" + soundArray[1][_local3]) + " \u97F3\u91CF\u4E3A\uFF1A") + soundArray[1][_local3].getVolume());
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);
trace("\u64AD\u653E\u97F3\u6548\uFF1A" + musicArray[1][_local3]);
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]);
trace("\u64AD\u653E\u97F3\u4E50\uFF1A" + musicArray[1][_local3]);
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]);
trace((("\u64AD\u653E\u97F3\u6548\uFF1A" + musicArray[1][_local3]) + " \u97F3\u91CF\u4E3A\uFF1A") + musicArray[1][_local3].getVolume());
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 _local2 in musicMC) {
removeMovieClip(musicMC[_local2]);
}
for (var _local2 in soundMC) {
removeMovieClip(soundMC[_local2]);
}
removeMovieClip(soundMC);
removeMovieClip(musicMC);
soundArray = null;
musicArray = null;
delete soundArray;
delete musicArray;
}
var soundArray = new Array();
var musicArray = new Array();
}
Symbol 315 MovieClip [__Packages.manage.GameManage] Frame 0
class manage.GameManage extends MovieClip
{
var nowBoxDepth, box1Depth, box2Depth, box3Depth, box4Depth, timerMax, gogoTimer, gogoNo, timer, nowBoxNo, life, runTime, isGameOver, isPause, keyManage, frameManage, score, nowBox, box1, box2, box3, box4, thisClearW, thisClearH, downTime, level, gotoAndStop, money;
function GameManage () {
super();
trace("GameManage.rootX = " + rootX);
trace("GameManage.rootY = " + rootY);
nowBoxDepth = 10000;
box1Depth = 5001;
box2Depth = 5002;
box3Depth = 5003;
box4Depth = 5004;
timerMax = 3840;
}
function init() {
gogoTimer = 0;
gogoNo = 1;
timer = timerMax;
lifeUpdate();
nowBoxNo = 1;
life = 6;
runTime = 0;
isGameOver = false;
isPause = false;
keyManage = null;
frameManage = null;
score = 0;
createAllBox();
nextLevel();
trace("\u521D\u59CB\u5316GAME\u5BF9\u8C61\uFF01");
}
function createAllBox() {
var _local3 = 1;
while (_local3 <= 10) {
var _local2 = 1;
while (_local2 <= 10) {
var _local4 = (_local3 * 10) + (_local2 * 100);
_root.game.boxArray_mc.attachMovie("box", ((("box" + _local3) + "_") + _local2) + "_mc", _local4, {_x:20 + (_local3 * 40), _y:20 + (_local2 * 40), default_x:20 + (_local3 * 40), default_y:20 + (_local2 * 40), thisX:_local3, thisY:_local2, defaultDepth:_local4});
_local2++;
}
_local3++;
}
}
function youDie() {
isPause = true;
if (life > 0) {
life--;
_root.game.map_mc.buildArray_mc.player_mc.gotoAndStop(5);
} else {
gameOver();
}
}
function onEnterFrame() {
frameManage.nextPoint();
if (isGameOver == false) {
if (isPause == false) {
findMouseBox();
DownBox();
timer--;
lifeUpdate();
if (timer <= 0) {
gameOver();
}
if (gogoTimer > 0) {
gogoTimer--;
} else {
gogoNo = 1;
}
}
}
}
function lifeUpdate() {
_root.game.life_mc.houzi_mc._x = (400 / timerMax) * timer;
}
function findMouseBox() {
var _local4 = Math.floor(_root._xmouse / 40);
var _local3 = Math.floor(_root._ymouse / 40);
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isRun == false) {
if ((nowBox.thisX != _local4) || (nowBox.thisY != _local3)) {
if ((nowBox.isUp == false) && (nowBox.isRun == false)) {
nowBox.backup();
}
nowBox = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
if ((nowBox.isUp == false) && (nowBox.isRun == false)) {
nowBox.swapDepths(nowBoxDepth);
nowBox.run = function () {
if (this.fangxiang == 1) {
this._xscale = this._xscale + 1;
this._yscale = this._xscale;
if (this._xscale > 110) {
this.fangxiang = 2;
}
} else {
this._xscale = this._xscale - 1;
this._yscale = this._xscale;
if (this._xscale < 90) {
this.fangxiang = 1;
}
}
};
}
}
}
}
function replay() {
clearAll();
init();
}
function DownBox(tI) {
}
function clearSelectBox() {
var tbox1Sum = (box1.thisX + box1.thisY);
var tbox2Sum = (box2.thisX + box2.thisY);
var tbox3Sum = (box3.thisX + box3.thisY);
var tbox4Sum = (box4.thisX + box4.thisY);
trace("this.thisClearW=" + thisClearW);
trace("this.thisClearH=" + thisClearH);
var tI = 1;
var tboxSumMin = tbox1Sum;
var i = 2;
while (i <= 4) {
if (eval (("tbox" + i) + "Sum") < tboxSumMin) {
tI = i;
tboxSumMin = eval (("tbox" + i) + "Sum");
}
i++;
}
var no1Box = this["box" + tI];
var boxClearNo = 0;
var m = no1Box.thisX;
while (m <= (no1Box.thisX + thisClearH)) {
var n = no1Box.thisY;
while (n <= (no1Box.thisY + thisClearW)) {
_root.game.boxArray_mc[((("box" + m) + "_") + n) + "_mc"].boooView();
_root.game.boxArray_mc[((("box" + m) + "_") + n) + "_mc"].remove(_root.game.boxArray_mc[((("box" + m) + "_") + ((n - thisClearW) - 1)) + "_mc"].myColor);
boxClearNo++;
n++;
}
m++;
}
var thisAddScore = 0;
thisAddScore = thisAddScore + CalculationScore(boxClearNo);
if ((thisClearW == 9) && (thisClearH != 9)) {
thisAddScore = thisAddScore + (500 * thisClearH);
_root.game.pop_mc.zi_mc.gotoAndPlay(2);
_root.game.pop_mc.zi_mc.zi_mc.gotoAndStop(3);
} else if ((thisClearW != 9) && (thisClearH == 9)) {
thisAddScore = thisAddScore + (500 * thisClearW);
_root.game.pop_mc.zi_mc.gotoAndPlay(2);
_root.game.pop_mc.zi_mc.zi_mc.gotoAndStop(2);
} else if ((thisClearW == 9) && (thisClearH == 9)) {
thisAddScore = 15000;
_root.game.pop_mc.zi_mc.gotoAndPlay(2);
_root.game.pop_mc.zi_mc.zi_mc.gotoAndStop(4);
} else if (gogoTimer > 0) {
_root.game.pop_mc.zi_mc.gotoAndPlay(2);
_root.game.pop_mc.zi_mc.zi_mc.gotoAndStop(5);
}
if (gogoTimer > 0) {
trace("\u8FDE\u51FB\u4E86\uFF01");
gogoNo++;
if (gogoNo >= 2) {
_root.game.gogo_mc.gotoAndPlay(2);
_root.game.gogo_mc.no_mc.no = gogoNo;
}
thisAddScore = thisAddScore + (100 * (gogoNo - 1));
}
gogoTimer = 190;
trace("\u5F97\u4E86 " + thisAddScore);
downTime = 20;
m = no1Box.thisX;
while (m <= (no1Box.thisX + thisClearH)) {
n = no1Box.thisY - 1;
while (n >= 1) {
_root.game.boxArray_mc[((("box" + m) + "_") + n) + "_mc"].remove(_root.game.boxArray_mc[((("box" + m) + "_") + ((n - thisClearW) - 1)) + "_mc"].myColor);
n--;
}
m++;
}
timer = timer + 15;
if (timer > timerMax) {
timer = timerMax;
}
lifeUpdate();
addScore(thisAddScore);
nowBoxNo = 1;
box1 = null;
box2 = null;
box3 = null;
box4 = null;
box4Obj = {thisX:null, thisY:null};
}
function CalculationScore(no) {
var _local2 = 0;
_local2 = _local2 + (20 + no);
if (no > 1) {
_local2 = _local2 + CalculationScore(no - 1);
}
return(_local2);
}
function onMouseDown() {
if (isGameOver == false) {
if (isPause == false) {
var _local4 = Math.floor(_root._xmouse / 40);
var _local3 = Math.floor(_root._ymouse / 40);
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isRun == false) {
switch (nowBoxNo) {
case 1 :
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isUp == false) {
thisClearW = null;
thisClearH = null;
box1 = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
box1.guang_mc._visible = true;
box1.run = null;
box1.swapDepths(box1Depth);
box1.isUp = true;
box1._xscale = 110;
box1._yscale = 110;
_root.game.soundManage.playSound("button_s");
nowBoxNo++;
}
break;
case 2 :
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isUp == false) {
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].myColor == box1.myColor) {
box2 = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
box2.guang_mc._visible = true;
box2.run = null;
box2.swapDepths(this[("box" + nowBoxNo) + "Depth"]);
box2.isUp = true;
box2._xscale = 110;
box2._yscale = 110;
_root.game.soundManage.playSound("button_s");
if (box1.thisX == box2.thisX) {
thisClearW = Math.abs(box2.thisY - box1.thisY);
trace("\u7B2C2\u6B21\u9009\u62E9\uFF01\u9AD8\u4E3A\uFF1A" + thisClearW);
} else if (box1.thisY == box2.thisY) {
thisClearH = Math.abs(box2.thisX - box1.thisX);
trace("\u7B2C2\u6B21\u9009\u62E9\uFF01\u5BBD\u4E3A\uFF1A" + thisClearH);
} else {
thisClearW = Math.abs(box2.thisY - box1.thisY);
thisClearH = Math.abs(box2.thisX - box1.thisX);
trace((("\u7B2C2\u6B21\u9009\u62E9\uFF01\u659C\u89D2 \uFF01\uFF01\u9AD8\u4E3A\uFF1A" + thisClearW) + " \u5BBD\u4E3A\uFF1A") + thisClearH);
}
nowBoxNo++;
} else {
box1.isUp = false;
box1.backup();
box1 = null;
nowBoxNo = 1;
}
}
break;
case 3 :
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isUp == false) {
box3 = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
if (box3.myColor != box1.myColor) {
box3 = null;
box1.isUp = false;
box2.isUp = false;
box1.backup();
box2.backup();
box1 = null;
box2 = null;
nowBoxNo = 1;
return(undefined);
}
if ((((box1.thisX == box2.thisX) && ((box3.thisY == box1.thisY) || (box3.thisY == box2.thisY))) || ((box1.thisY == box2.thisY) && ((box3.thisX == box1.thisX) || (box3.thisX == box2.thisX)))) || (((box1.thisX != box2.thisX) && ((box3.thisX == box1.thisX) && (box3.thisY == box2.thisY))) || ((box3.thisX == box2.thisX) && (box3.thisY == box1.thisY)))) {
box3 = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
box3.guang_mc._visible = true;
box3.run = null;
box3.swapDepths(this[("box" + nowBoxNo) + "Depth"]);
box3.isUp = true;
box3._xscale = 110;
box3._yscale = 110;
_root.game.soundManage.playSound("button_s");
if (thisClearW == undefined) {
if (box1.thisX == box3.thisX) {
thisClearW = Math.abs(box3.thisY - box1.thisY);
trace("\u7B2C3\u6B21\u9009\u62E9\uFF01\u9AD8\u4E3A\uFF1A" + thisClearW);
}
}
if (thisClearH == undefined) {
if (box1.thisY == box3.thisY) {
thisClearH = Math.abs(box3.thisX - box1.thisX);
trace("\u7B2C3\u6B21\u9009\u62E9\uFF01\u5BBD\u4E3A\uFF1A" + thisClearH);
}
}
nowBoxNo++;
} else {
box3 = null;
box1.isUp = false;
box2.isUp = false;
box1.backup();
box2.backup();
box1 = null;
box2 = null;
nowBoxNo = 1;
}
}
break;
case 4 :
_local4 = Math.floor(_root._xmouse / 40);
_local3 = Math.floor(_root._ymouse / 40);
if (_root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"].isUp != false) {
break;
}
box4 = _root.game.boxArray_mc[((("box" + _local4) + "_") + _local3) + "_mc"];
if (box4.myColor != box1.myColor) {
box4 = null;
box1.isUp = false;
box2.isUp = false;
box3.isUp = false;
box1.backup();
box2.backup();
box3.backup();
box1 = null;
box2 = null;
box3 = null;
nowBoxNo = 1;
trace("\u989C\u8272\u4E0D\u540C\u554A\uFF01\uFF01");
return(undefined);
}
if (thisClearW == undefined) {
if (box1.thisX == box4.thisX) {
thisClearW = Math.abs(box4.thisY - box1.thisY);
trace("\u7B2C4\u6B21\u9009\u62E9\uFF01\u9AD8\u4E3A\uFF1A" + thisClearW);
}
}
if (thisClearH == undefined) {
if (box1.thisY == box4.thisY) {
thisClearH = Math.abs(box4.thisX - box1.thisX);
trace("\u7B2C4\u6B21\u9009\u62E9\uFF01\u5BBD\u4E3A\uFF1A" + thisClearH);
}
}
if (box1.thisX == box2.thisX) {
box4Obj.thisX = box3.thisX;
} else if (box1.thisX == box3.thisX) {
box4Obj.thisX = box2.thisX;
} else if (box3.thisX == box2.thisX) {
box4Obj.thisX = box1.thisX;
} else {
trace("\u6700\u540E\u4E00\u4E2A\u70B9 X \u7684\u503C\u6CA1\u53D6\u5230\uFF01\u80AF\u5B9A\u51FA\u4E86\u4EC0\u4E48\u95EE\u9898\u3002");
}
if (box1.thisY == box2.thisY) {
box4Obj.thisY = box3.thisY;
} else if (box1.thisY == box3.thisY) {
box4Obj.thisY = box2.thisY;
} else if (box3.thisY == box2.thisY) {
box4Obj.thisY = box1.thisY;
} else {
trace("\u6700\u540E\u4E00\u4E2A\u70B9 Y \u7684\u503C\u6CA1\u53D6\u5230\uFF01\u80AF\u5B9A\u51FA\u4E86\u4EC0\u4E48\u95EE\u9898\u3002");
}
trace((("this.box4Obj=" + box4Obj.thisX) + " ") + box4Obj.thisY);
if ((box4.thisX == box4Obj.thisX) && (box4.thisY == box4Obj.thisY)) {
clearSelectBox();
trace("------------------------");
} else {
box4 = null;
box1.isUp = false;
box2.isUp = false;
box3.isUp = false;
box1.backup();
box2.backup();
box3.backup();
box1 = null;
box2 = null;
box3 = null;
nowBoxNo = 1;
return(undefined);
}
}
}
}
}
}
function nextLevel() {
}
function resetGame() {
isPause = false;
score = 0;
_root.game.level = _root.game.level - 1;
_root.game.nextLevel();
}
function addNextLevelScore() {
}
function clearAll() {
for (var _local2 in _root.game.boxArray_mc) {
_root.game.boxArray_mc[_local2].removeMovieClip();
}
}
function getLevel() {
return(level);
}
function win() {
trace("\u80DC\u5229\u4E86\uFF01");
isGameOver = true;
runTime = 0;
Fade.start();
gotoAndStop("win");
}
function gameOver() {
trace("gameover");
isGameOver = true;
runTime = 0;
_root.game.life_mc.houzi_mc._x = -200;
_root.game.monkeyDie_mc.gotoAndPlay(2);
_root.game.soundManage.playSound("monkey_s");
}
function isAllOver() {
}
function addScore(no) {
if (!isNaN(no)) {
score = score + no;
if (score < 0) {
score = 0;
} else {
score = int(score);
}
flashUpdateScore(no);
}
}
function reduceScore(no) {
addScore(no * -1);
}
function setScore(no) {
score = no;
}
function clearScore() {
score = 0;
}
function flashUpdateScore(no) {
_root.game.no_mc.zi_mc.gotoAndPlay(2);
_root.game.no_mc.zi_mc.zi_mc.sddScore = no;
}
function addMoney(no) {
if (!isNaN(no)) {
money = money + no;
if (money < 0) {
money = 0;
} else {
money = int(money);
}
flashUpdateMoney(no);
}
}
function reduceMoney(no) {
addMoney(no * -1);
}
function flashUpdateMoney(no) {
}
function clearMoney() {
money = 0;
}
static var rootX = 480;
static var rootY = 560;
static var oneSize = 40;
var box4Obj = new Object({thisX:null, thisY:null});
static var levelScoreArray = new Array(0, 800, 1600, 2300, 3500, 4800, 5500, 6800, 8000, 10000);
static var levelMoneyArray = new Array(250, 260, 300, 340, 380, 430, 500, 580, 650, 720);
}
Symbol 33 MovieClip Frame 1
_x = (Stage.width / 2);
_y = (Stage.height / 2);
_root.stop();
onPress = function () {
getURL ("http://www.freeworldgroup.com/", "_blank");
};
Symbol 33 MovieClip Frame 145
Fade.start();
_root.gotoAndStop("game");
Symbol 42 MovieClip [kuai3] Frame 8
this.removeMovieClip();
Symbol 51 MovieClip [kuai2] Frame 8
this.removeMovieClip();
Symbol 60 MovieClip [kuai1] Frame 8
this.removeMovieClip();
Symbol 69 MovieClip [kuai4] Frame 8
this.removeMovieClip();
Symbol 82 MovieClip Frame 1
stop();
Symbol 82 MovieClip Frame 2
stop();
Symbol 82 MovieClip Frame 3
stop();
Symbol 82 MovieClip Frame 4
stop();
Symbol 83 MovieClip [box] Frame 1
#initclip 7
Object.registerClass("box", Box);
#endinitclip
Symbol 87 MovieClip Frame 1
stop();
Symbol 92 Button
on (release) {
gotoAndStop ("submit");
}
Symbol 98 Button
on (release) {
gotoAndStop ("submited");
}
Symbol 108 Button
on (release) {
viewHighscore();
}
Symbol 112 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 112 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();
gold_txt.text = highscore;
send_var = new LoadVars();
load_var = new LoadVars();
ok_btn.onRelease = sendData;
load_var.onLoad = function () {
gotoAndStop ("done");
};
Symbol 125 Button
on (release) {
_root.game.startgame();
}
Symbol 126 Button
on (release) {
Fade.start();
_root.game.gotoAndStop("Instructions");
}
Symbol 127 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 128 Button
on (release) {
getURL ("http://www.ifungames.com", "_blank");
}
Symbol 129 Button
on (release) {
getURL ("http://www.freeworldgroup.com/koalafiles.htm", "_blank");
}
Symbol 130 Button
on (release) {
viewHighscore();
}
Symbol 143 MovieClip Frame 1
this.onRelease = function () {
getURL ("http://www.freeworldgroup.com", "_blank");
};
Symbol 147 Button
on (release) {
getURL ("http://www.freeworldgroup.com/", "_blank");
}
Symbol 150 Button
on (release) {
Fade.start();
gotoAndStop ("credits");
}
Symbol 153 Button
on (release) {
Fade.start();
_root.game.gotoAndStop("mainmenu");
}
Symbol 154 Button
on (release) {
this.nextFrame();
}
Symbol 155 Button
on (release) {
Fade.start();
_root.game.gotoAndStop("gamestart");
}
Symbol 173 MovieClip Frame 8
stop();
Symbol 180 Button
on (release) {
this.prevFrame();
}
Symbol 210 MovieClip Frame 1
stop();
Symbol 210 MovieClip Frame 2
stop();
Symbol 210 MovieClip Frame 3
stop();
Symbol 243 MovieClip Frame 1
stop();
Symbol 243 MovieClip Frame 2
stop();
Symbol 243 MovieClip Frame 3
stop();
Symbol 243 MovieClip Frame 4
stop();
Symbol 243 MovieClip Frame 5
stop();
Symbol 244 MovieClip Frame 1
stop();
Symbol 244 MovieClip Frame 32
stop();
this._parent.gotoAndStop(1);
Symbol 245 MovieClip Frame 1
stop();
Symbol 247 Button
on (release) {
if (_root.game.return_mc._visible == false) {
_root.game.return_mc._visible = true;
_root.game.isPause = true;
} else {
_root.game.return_mc._visible = false;
_root.game.isPause = false;
}
}
Symbol 258 MovieClip Frame 1
hit_mc.useHandCursor = false;
hit_mc.onRelease = function () {
};
Symbol 266 MovieClip Frame 1
function viewQ() {
switch (_root._quality) {
case "LOW" :
qView_mc.b1_mc._visible = true;
qView_mc.b2_mc._visible = false;
qView_mc.b3_mc._visible = false;
qView_mc.b4_mc._visible = false;
break;
case "MEDIUM" :
qView_mc.b2_mc._visible = true;
qView_mc.b1_mc._visible = false;
qView_mc.b3_mc._visible = false;
qView_mc.b4_mc._visible = false;
break;
case "HIGH" :
qView_mc.b3_mc._visible = true;
qView_mc.b2_mc._visible = false;
qView_mc.b1_mc._visible = false;
qView_mc.b4_mc._visible = false;
break;
case "BEST" :
qView_mc.b4_mc._visible = true;
qView_mc.b2_mc._visible = false;
qView_mc.b3_mc._visible = false;
qView_mc.b1_mc._visible = false;
}
}
qView_mc._visible = false;
if (_root.game.soundManage.isMusicPlay == true) {
notmusic_mc._visible = false;
}
if (_root.game.soundManage.isSoundPlay == true) {
notsound_mc._visible = false;
}
music_btn.onRelease = function () {
trace("\u4F60\u70B9\u51FB\u4E86\u97F3\u4E50\u6309\u94AE\uFF01");
if (_root.game.soundManage.isMusicPlay == true) {
_root.game.soundManage.stopMusic();
_root.game.soundManage.isMusicPlay = false;
notmusic_mc._visible = true;
} else {
_root.game.soundManage.returnMusic();
_root.game.soundManage.isMusicPlay = true;
notmusic_mc._visible = false;
}
};
sound_btn.onRelease = function () {
trace("\u4F60\u70B9\u51FB\u4E86\u97F3\u6548\u6309\u94AE\uFF01");
if (_root.game.soundManage.isSoundPlay == true) {
_root.game.soundManage.soundManage.stopSound();
_root.game.soundManage.isSoundPlay = false;
notsound_mc._visible = true;
} else {
_root.game.soundManage.soundManage.returnSound();
_root.game.soundManage.isSoundPlay = true;
notsound_mc._visible = false;
}
};
q_btn.onRelease = function () {
if (qView_mc._visible == false) {
qView_mc._visible = true;
qView_mc.onEnterFrame = function () {
if (!this.hit_mc.hitTest(_root._xmouse, _root._ymouse, true)) {
this._visible = false;
this.onEnterFrame = null;
}
};
viewQ();
} else {
qView_mc._visible = false;
}
};
qView_mc.b1_btn.onRelease = function () {
_root._quality = "LOW";
viewQ();
};
qView_mc.b2_btn.onRelease = function () {
_root._quality = "MEDIUM";
viewQ();
};
qView_mc.b3_btn.onRelease = function () {
_root._quality = "HIGH";
viewQ();
};
qView_mc.b4_btn.onRelease = function () {
_root._quality = "BEST";
viewQ();
};
Symbol 269 MovieClip Frame 1
stop();
Symbol 269 MovieClip Frame 14
gotoAndStop (1);
Symbol 273 Button
on (release) {
_root.game.isPause = true;
Fade.start();
_root.game.gotoAndStop("mainmenu");
}
Symbol 275 Button
on (release) {
_root.game.isPause = false;
this._visible = false;
}
Symbol 279 MovieClip Frame 1
hit_mc.useHandCursor = false;
Instance of Symbol 272 MovieClip "hit_mc" in Symbol 279 MovieClip Frame 1
on (release) {
}
Symbol 285 Button
on (release) {
this.gotoAndStop(1);
_root.game.return_mc._visible = false;
_root.game.replay();
}
Symbol 286 Button
on (release) {
_root.game.isPause = true;
Fade.start();
_root.game.gotoAndStop("mainmenu");
}
Symbol 289 MovieClip Frame 1
stop();
Symbol 289 MovieClip Frame 2
stop();
hhh_mc.useHandCursor = false;
hit_mc.useHandCursor = false;
score = _root.game.score;
Instance of Symbol 281 MovieClip "hhh_mc" in Symbol 289 MovieClip Frame 2
on (release) {
}
Instance of Symbol 272 MovieClip "hit_mc" in Symbol 289 MovieClip Frame 2
on (release) {
}
Instance of Symbol 112 MovieClip in Symbol 289 MovieClip Frame 2
//component parameters
onClipEvent (construct) {
_game_name = "blockocide";
score_var = "_root.game.score";
}
Symbol 304 MovieClip Frame 1
stop();
Symbol 304 MovieClip Frame 58
gotoAndStop (1);
_root.game.gameover_mc.gotoAndStop(2);
Symbol 309 MovieClip [gameManage] Frame 1
#initclip 8
Object.registerClass("gameManage", manage.GameManage);
#endinitclip
function startgame() {
if (_root.game.isIn == true) {
Fade.start();
_root.game.gotoAndStop("gamestart");
} else {
Fade.start();
_root.game.gotoAndStop("Instructions");
}
}
_root.game = this;
stop();
if (_root.game.soundManage == undefined) {
var soundManage = (new manage.SoundManage());
_root.game.soundManage.addSound("button_s", 80);
_root.game.soundManage.addSound("monkey_s");
}
var isPopup;
var isIn;
Instance of Symbol 148 MovieClip in Symbol 309 MovieClip [gameManage] Frame 1
on (release) {
getURL ("http://www.freeworldgroup.com/", _blank);
}
Symbol 309 MovieClip [gameManage] Frame 2
isIn = true;
Symbol 309 MovieClip [gameManage] Frame 3
stop();
this.init();
return_mc._visible = false;
var isSpaceUp = true;
var isDie = false;
if (_root.game.myListener == undefined) {
trace("\u6DFB\u52A0\u76D1\u542C\u5BF9\u8C61");
_root.game.myListener = new Object();
_root.game.myListener.onKeyUp = function () {
if (_root.game.isGameOver == false) {
if (Key.getCode(32)) {
this.isSpaceUp = true;
}
}
};
_root.game.myListener.onKeyDown = function () {
if (_root.game.isGameOver == false) {
if (_root.game.isPause == false) {
if (Key.isDown(32)) {
if (this.isSpaceUp == true) {
this.isSpaceUp = false;
_root.game.map_mc.buildArray_mc.player_mc.pressSpaces();
}
}
} else if (Key.isDown(32)) {
if (_root.game.isDie == true) {
_root.game.score = _root.game.prevLevelScore;
_root.game.level = _root.game.level - 1;
_root.game.nextLevel();
}
}
}
};
Key.addListener(_root.game.myListener);
}
Symbol 309 MovieClip [gameManage] Frame 4
stop();
Symbol 309 MovieClip [gameManage] Frame 5
stop();
Symbol 309 MovieClip [gameManage] Frame 6
stop();