Frame 1
function Lbar() {
if (getBytesLoaded() >= getBytesTotal()) {
clearInterval(loaderInt);
}
fill_MC._xscale = (getBytesLoaded() / getBytesTotal()) * 100;
}
Stage.showMenu = false;
MochiAd.showPreGameAd({id:"d719c4f86dab7fc5", res:"550x400"});
stop();
loaderInt = setInterval(Lbar, 10);
Frame 2
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
timer = 0;
mochi.MochiServices.connect("d719c4f86dab7fc5");
__com_mochibot__("509f22ae", this, 10301, true);
Instance of Symbol 5 MovieClip in Frame 2
onClipEvent (enterFrame) {
_parent.timer++;
if (_parent.timer > 300) {
_root.gotoAndStop("gameIntro");
}
}
Instance of Symbol 16 MovieClip in Frame 2
onClipEvent (mouseDown) {
getURL ("http://www.smileygamer.com/?gameref=1131 ", _blank);
}
Frame 3
stop();
local_data = SharedObject.getLocal("tirwik_user");
soundActive = true;
Frame 4
stop();
Frame 5
stop();
Frame 6
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
__com_mochibot__("3e88751f", this, 10301, true);
actualFrame = 6;
codigo = "753bae2adabad3cd";
Instance of Symbol 349 MovieClip "tablero" in Frame 6
onClipEvent (load) {
anchoTablero = 5;
altoTablero = 5;
colores = 3;
tiempoTotal = 40;
tiempoActual = 35;
tiempoBonus = 5;
gameSpeed = 1;
ciclo = 10;
enteroRandom = 0;
isAction = false;
isGame = false;
getPoints = false;
}
Frame 7
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
__com_mochibot__("e5c55400", this, 10301, true);
actualFrame = 7;
codigo = "9d849ca3de237dc6";
Instance of Symbol 364 MovieClip "tablero" in Frame 7
onClipEvent (load) {
anchoTablero = 5;
altoTablero = 5;
colores = 3;
tiempoTotal = 40;
tiempoActual = 35;
tiempoBonus = 5;
gameSpeed = 1;
ciclo = 10;
enteroRandom = 0;
isAction = false;
isGame = false;
getPoints = false;
}
Frame 8
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
__com_mochibot__("5ed96e12", this, 10301, true);
actualFrame = 8;
codigo = "7cfb00cac22297af";
Instance of Symbol 372 MovieClip "tablero" in Frame 8
onClipEvent (load) {
anchoTablero = 5;
altoTablero = 5;
colores = 3;
tiempoTotal = 40;
tiempoActual = 35;
tiempoBonus = 5;
gameSpeed = 1;
ciclo = 10;
enteroRandom = 0;
isAction = false;
isGame = false;
getPoints = false;
}
Symbol 373 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.2");
}
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++;
}
}
if (_local4.id == "test") {
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
}
return(_local4);
}
}
Symbol 374 MovieClip [__Packages.mochi.MochiServices] Frame 0
class mochi.MochiServices
{
static var _id, _container, _clip, _sendChannelName, _rcvChannelName, __get__comChannelName, onError, _listenChannel, _rcvChannel, _loader, _loaderListener, _sendChannel;
function MochiServices () {
}
static function get id() {
return(_id);
}
static function get clip() {
return(_container);
}
static function get childClip() {
return(_clip);
}
static function getVersion() {
return("1.31");
}
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 get isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function set comChannelName(val) {
if (val != undefined) {
if (val.length > 3) {
_sendChannelName = val + "_fromgame";
_rcvChannelName = val;
initComChannels();
}
}
//return(__get__comChannelName());
}
static function get connected() {
return(_connected);
}
static function connect(id, clip, onError) {
if ((!_connected) && (_clip == undefined)) {
trace("MochiServices Connecting...");
_connecting = true;
init(id, clip);
}
if (onError != undefined) {
mochi.MochiServices.onError = onError;
} else if (mochi.MochiServices.onError == undefined) {
mochi.MochiServices.onError = function (errorCode) {
trace(errorCode);
};
}
}
static function disconnect() {
if (_connected || (_connecting)) {
_connecting = (_connected = false);
flush(true);
if (_clip != undefined) {
_clip.removeMovieClip();
delete _clip;
}
_listenChannel.close();
_rcvChannel.close();
}
}
static function init(id, clip) {
_id = id;
if (clip != undefined) {
_container = clip;
} else {
_container = _root;
}
loadCommunicator(id, _container);
}
static function loadCommunicator(id, clip) {
var _local2 = "_mochiservices_com_" + id;
if (_clip != null) {
return(_clip);
}
if (!isNetworkAvailable) {
return(null);
}
allowDomains(_gatewayURL);
_clip = clip.createEmptyMovieClip(_local2, 10336, false);
_loader = new MovieClipLoader();
if (_loaderListener.waitInterval != null) {
clearInterval(_loaderListener.waitInterval);
}
_loaderListener = {};
_loaderListener.onLoadError = function (target_mc, errorCode, httpStatus) {
trace("MochiServices could not load.");
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, [errorCode]);
};
_loaderListener.onLoadStart = function (target_mc) {
this.isLoading = true;
};
_loaderListener.startTime = getTimer();
_loaderListener.wait = function () {
if ((getTimer() - this.startTime) > 10000) {
if (!this.isLoading) {
mochi.MochiServices.disconnect();
mochi.MochiServices.onError.apply(null, ["IOError"]);
}
clearInterval(this.waitInterval);
}
};
_loaderListener.waitInterval = setInterval(_loaderListener, "wait", 1000);
_loader.addListener(_loaderListener);
_loader.loadClip(_gatewayURL, _clip);
_sendChannel = new LocalConnection();
_sendChannel._queue = [];
_rcvChannel = new LocalConnection();
_rcvChannel.allowDomain = function (d) {
return(true);
};
_rcvChannel.allowInsecureDomain = _rcvChannel.allowDomain;
_rcvChannel._nextcallbackID = 0;
_rcvChannel._callbacks = {};
listen();
return(_clip);
}
static function onStatus(infoObject) {
if (!(infoObject.level === "error")) {
} else {
_connected = false;
_listenChannel.connect(_listenChannelName);
}
}
static function listen() {
_listenChannel = new LocalConnection();
_listenChannel.handshake = function (args) {
mochi.MochiServices.__set__comChannelName(args.newChannel);
};
_listenChannel.allowDomain = function (d) {
return(true);
};
_listenChannel.allowInsecureDomain = _listenChannel.allowDomain;
_listenChannel.connect(_listenChannelName);
trace("Waiting for MochiAds services to connect...");
}
static function initComChannels() {
if (!_connected) {
_sendChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"handshakeDone"});
_sendChannel.send(_sendChannelName, "onReceive", {methodName:"registerGame", id:_id, clip:_clip, version:getVersion()});
_rcvChannel.onStatus = function (infoObject) {
mochi.MochiServices.onStatus(infoObject);
};
_rcvChannel.onReceive = function (pkg) {
var _local5 = pkg.callbackID;
var _local4 = this._callbacks[_local5];
if (!_local4) {
return(undefined);
}
var _local2 = _local4.callbackMethod;
var _local3 = _local4.callbackObject;
if (_local3 && (typeof(_local2) == "string")) {
_local2 = _local3[_local2];
}
if (_local2 != undefined) {
_local2.apply(_local3, pkg.args);
}
delete this._callbacks[_local5];
};
_rcvChannel.onError = function () {
mochi.MochiServices.onError.apply(null, ["IOError"]);
};
_rcvChannel.connect(_rcvChannelName);
trace("connected!");
_connecting = false;
_connected = true;
_listenChannel.close();
while (_sendChannel._queue.length > 0) {
_sendChannel.send(_sendChannelName, "onReceive", _sendChannel._queue.shift());
}
}
}
static function flush(error) {
var _local1;
var _local2;
while (_sendChannel._queue.length > 0) {
_local1 = _sendChannel._queue.shift();
if (_local1.callbackID != null) {
_local2 = _rcvChannel._callbacks[_local1.callbackID];
}
delete _rcvChannel._callbacks[_local1.callbackID];
if (error) {
handleError(_local1.args, _local2.callbackObject, _local2.callbackMethod);
}
}
}
static function handleError(args, callbackObject, callbackMethod) {
if (args != null) {
if (args.onError != null) {
args.onError.apply(null, ["NotConnected"]);
}
}
if (callbackMethod != null) {
args = {};
args.error = true;
args.errorCode = "NotConnected";
if ((callbackObject != null) && (typeof(callbackMethod) == "string")) {
callbackObject[callbackMethod](args);
} else if (callbackMethod != null) {
callbackMethod.apply(args);
}
}
}
static function send(methodName, args, callbackObject, callbackMethod) {
if (_connected) {
_sendChannel.send(_sendChannelName, "onReceive", {methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
} else {
if ((_clip == undefined) || (!_connecting)) {
onError.apply(null, ["NotConnected"]);
handleError(args, callbackObject, callbackMethod);
flush(true);
return(undefined);
}
_sendChannel._queue.push({methodName:methodName, args:args, callbackID:_rcvChannel._nextcallbackID});
}
_rcvChannel._callbacks[_rcvChannel._nextcallbackID] = {callbackObject:callbackObject, callbackMethod:callbackMethod};
_rcvChannel._nextcallbackID++;
}
static var _gatewayURL = "http://www.mochiads.com/static/lib/services/services.swf";
static var _listenChannelName = "__mochiservices";
static var _connecting = false;
static var _connected = false;
}
Symbol 375 MovieClip [__Packages.mochi.MochiScores] Frame 0
class mochi.MochiScores
{
static var boardID, onClose, onError;
function MochiScores () {
}
static function setBoardID(boardID) {
mochi.MochiScores.boardID = boardID;
mochi.MochiServices.send("scores_setBoardID", {boardID:boardID});
}
static function showLeaderboard(options) {
if (options.clip != null) {
if ((options.clip != mochi.MochiServices.__get__clip()) || (mochi.MochiServices.__get__childClip()._target == undefined)) {
mochi.MochiServices.disconnect();
mochi.MochiServices.connect(mochi.MochiServices.__get__id(), options.clip);
}
delete options.clip;
}
if (options.name != null) {
if (typeof(options.name) == "object") {
if (options.name.text != undefined) {
options.name = options.name.text;
}
}
}
if (options.score != null) {
if (typeof(options.score) == "object") {
if (options.score.text != undefined) {
options.score = options.score.text;
}
}
}
if (options.onDisplay != null) {
options.onDisplay();
} else {
mochi.MochiServices.__get__clip().stop();
}
if (options.onClose != null) {
onClose = options.onClose;
} else {
onClose = function () {
mochi.MochiServices.__get__clip().play();
};
}
if (options.onError != null) {
onError = options.onError;
} else {
onError = onClose;
}
if (options.boardID == null) {
if (boardID != null) {
options.boardID = boardID;
}
}
mochi.MochiServices.send("scores_showLeaderboard", {options:options}, null, doClose);
}
static function closeLeaderboard() {
mochi.MochiServices.send("scores_closeLeaderboard");
}
static function getPlayerInfo(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_getPlayerInfo", null, callbackObj, callbackMethod);
}
static function submit(score, name, callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_submit", {score:score, name:name}, callbackObj, callbackMethod);
}
static function requestList(callbackObj, callbackMethod) {
mochi.MochiServices.send("scores_requestList", null, callbackObj, callbackMethod);
}
static function scoresArrayToObjects(scores) {
var _local5 = {};
var _local1;
var _local4;
var _local2;
var _local6;
for (var _local8 in scores) {
if (typeof(scores[_local8]) == "object") {
if ((scores[_local8].cols != null) && (scores[_local8].rows != null)) {
_local5[_local8] = [];
_local2 = scores[_local8];
_local4 = 0;
while (_local4 < _local2.rows.length) {
_local6 = {};
_local1 = 0;
while (_local1 < _local2.cols.length) {
_local6[_local2.cols[_local1]] = _local2.rows[_local4][_local1];
_local1++;
}
_local5[_local8].push(_local6);
_local4++;
}
} else {
_local5[_local8] = {};
for (var _local7 in scores[_local8]) {
_local5[_local8][_local7] = scores[_local8][_local7];
}
}
} else {
_local5[_local8] = scores[_local8];
}
}
return(_local5);
}
static function doClose(args) {
if (args.error == true) {
if (args.errorCode == undefined) {
args.errorCode = "IOError";
}
onError.apply(null, [args.errorCode]);
} else {
onClose.apply();
}
}
}
Instance of Symbol 26 MovieClip in Symbol 29 MovieClip Frame 1
onClipEvent (mouseDown) {
getURL ("http://www.cuaticgames.com", _blank);
}
Symbol 31 MovieClip Frame 1
if (_root.soundActive == true) {
_root.soundActive = false;
}
Symbol 31 MovieClip Frame 280
if (((_root.local_data.data.gameMode == 1) || (_root.local_data.data.gameMode == 2)) || (_root.local_data.data.gameMode == 3)) {
_root.gotoAndStop("continueWindow");
} else {
_root.gotoAndStop("mainMenuEng");
}
Symbol 38 Button
on (release) {
inputMarco(0, 0, -1, 0);
}
on (rollOver) {
onMouseOver(0, 0, -1, 0);
}
on (rollOut) {
onMouseOut(0, 0, -1, 0);
}
Symbol 39 Button
on (release) {
inputMarco(0, 1, -1, 1);
}
on (rollOver) {
onMouseOver(0, 1, -1, 1);
}
on (rollOut) {
onMouseOut(0, 1, -1, 1);
}
Symbol 40 Button
on (release) {
inputMarco(0, 2, -1, 2);
}
on (rollOver) {
onMouseOver(0, 2, -1, 2);
}
on (rollOut) {
onMouseOut(0, 2, -1, 2);
}
Symbol 41 Button
on (release) {
inputMarco(0, 3, -1, 3);
}
on (rollOver) {
onMouseOver(0, 3, -1, 3);
}
on (rollOut) {
onMouseOut(0, 3, -1, 3);
}
Symbol 42 Button
on (release) {
inputMarco(0, 4, -1, 4);
}
on (rollOver) {
onMouseOver(0, 4, -1, 4);
}
on (rollOut) {
onMouseOut(0, 4, -1, 4);
}
Symbol 43 Button
on (release) {
inputMarco(0, 0, 0, -1);
}
on (rollOver) {
onMouseOver(0, 0, 0, -1);
}
on (rollOut) {
onMouseOut(0, 0, 0, -1);
}
Symbol 44 Button
on (release) {
inputMarco(1, 0, 1, -1);
}
on (rollOver) {
onMouseOver(1, 0, 1, -1);
}
on (rollOut) {
onMouseOut(1, 0, 1, -1);
}
Symbol 45 Button
on (release) {
inputMarco(2, 0, 2, -1);
}
on (rollOver) {
onMouseOver(2, 0, 2, -1);
}
on (rollOut) {
onMouseOut(2, 0, 2, -1);
}
Symbol 46 Button
on (release) {
inputMarco(3, 0, 3, -1);
}
on (rollOver) {
onMouseOver(3, 0, 3, -1);
}
on (rollOut) {
onMouseOut(3, 0, 3, -1);
}
Symbol 47 Button
on (release) {
inputMarco(4, 0, 4, -1);
}
on (rollOver) {
onMouseOver(4, 0, 4, -1);
}
on (rollOut) {
onMouseOut(4, 0, 4, -1);
}
Symbol 103 MovieClip Frame 1
stop();
Symbol 103 MovieClip Frame 10
stop();
Symbol 103 MovieClip Frame 40
gotoAndStop ("yellow");
Symbol 103 MovieClip Frame 70
gotoAndStop ("red");
Symbol 103 MovieClip Frame 100
gotoAndStop ("green");
Symbol 103 MovieClip Frame 101
stop();
Symbol 103 MovieClip Frame 110
stop();
Symbol 103 MovieClip Frame 140
gotoAndStop ("green");
Symbol 103 MovieClip Frame 170
gotoAndStop ("red");
Symbol 103 MovieClip Frame 200
gotoAndStop ("yellow");
Symbol 103 MovieClip Frame 201
stop();
Symbol 103 MovieClip Frame 211
stop();
Symbol 103 MovieClip Frame 240
gotoAndStop ("green");
Symbol 103 MovieClip Frame 270
gotoAndStop ("yellow");
Symbol 103 MovieClip Frame 300
gotoAndStop ("red");
Symbol 103 MovieClip Frame 331
gotoAndStop ("red");
Symbol 103 MovieClip Frame 360
gotoAndStop ("yellow");
Symbol 103 MovieClip Frame 391
gotoAndStop ("green");
Symbol 103 MovieClip Frame 397
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 405
gotoAndStop ("green");
Symbol 103 MovieClip Frame 408
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 415
stop();
Symbol 103 MovieClip Frame 418
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 425
gotoAndStop ("yellow");
Symbol 103 MovieClip Frame 428
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 435
stop();
Symbol 103 MovieClip Frame 438
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 445
gotoAndStop ("red");
Symbol 103 MovieClip Frame 448
_parent.nextSquare = true;
Symbol 103 MovieClip Frame 456
stop();
Symbol 103 MovieClip Frame 457
stop();
Instance of Symbol 103 MovieClip "_21" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("green");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_22" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("red");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_23" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("red");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_24" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("green");
congeladoF._alpha = 35;
}
Instance of Symbol 103 MovieClip "_25" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("yellow");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_31" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("red");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_32" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("green");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_33" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("yellow");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_34" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("yellow");
congeladoF._alpha = 35;
}
Instance of Symbol 103 MovieClip "_35" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("red");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_11" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("greenHigh");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_12" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("yellowHigh");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_13" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("greenHigh");
congeladoF._alpha = 0;
}
Instance of Symbol 103 MovieClip "_14" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("red");
congeladoF._alpha = 35;
}
Instance of Symbol 103 MovieClip "_15" in Symbol 104 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop ("yellowHigh");
congeladoF._alpha = 0;
}
Symbol 107 MovieClip Frame 1
tablero.setMask(mask);
Symbol 124 MovieClip Frame 1
Symbol 124 MovieClip Frame 10
stop();
Symbol 124 MovieClip Frame 20
stop();
if (_parent.modo == 1) {
_root.gotoAndStop("partidaNormalEng");
} else if (_parent.modo == 2) {
_root.gotoAndStop("partidaEndlessEng");
} else if (_parent.modo == 3) {
_root.gotoAndStop("partidaBoardEng");
}
Symbol 146 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeEndless = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
}
}
Symbol 147 Button
on (release) {
_parent.sound.gotoAndPlay("menuClick");
_parent.modo = 1;
_parent.completeFade.gotoAndPlay("fadeOut");
_root.local_data.data.gameMode = 0;
}
Symbol 148 MovieClip Frame 1
stop();
Symbol 148 MovieClip Frame 2
stop();
Symbol 158 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeEndless = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
}
}
Symbol 159 Button
on (release) {
_parent.sound.gotoAndPlay("menuClick");
_parent.modo = 2;
_parent.completeFade.gotoAndPlay("fadeOut");
_root.local_data.data.gameMode = 0;
}
Symbol 160 MovieClip Frame 1
stop();
Symbol 160 MovieClip Frame 2
stop();
Symbol 169 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeEndless = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
}
}
Symbol 170 Button
on (release) {
_parent.sound.gotoAndPlay("menuClick");
_parent.modo = 3;
_root.local_data.data.gameMode = 0;
_parent.completeFade.gotoAndPlay("fadeOut");
}
Symbol 171 MovieClip Frame 1
stop();
Symbol 171 MovieClip Frame 2
stop();
Symbol 179 MovieClip Frame 1
stop();
Symbol 179 MovieClip Frame 25
gotoAndStop (1);
Symbol 179 MovieClip Frame 50
gotoAndStop (1);
Symbol 179 MovieClip Frame 60
gotoAndStop (1);
Symbol 179 MovieClip Frame 70
gotoAndStop (1);
Symbol 179 MovieClip Frame 120
gotoAndStop (1);
Symbol 179 MovieClip Frame 191
gotoAndStop (1);
Symbol 184 Button
on (release) {
getURL ("http://www.smileygamer.com/?gameref=1131", _blank);
}
Symbol 194 MovieClip Frame 1
stop();
Symbol 194 MovieClip Frame 2
stop();
Symbol 194 MovieClip Frame 3
stop();
Symbol 194 MovieClip Frame 4
stop();
Symbol 195 MovieClip Frame 1
modo = 0;
Mouse.hide();
startDrag ("cursorInGame", true);
Instance of Symbol 124 MovieClip "completeFade" in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
}
Instance of Symbol 148 MovieClip "normalButton" in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 160 MovieClip "endlessButton" in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 171 MovieClip "boardButton" in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (2);
}
Instance of Symbol 179 MovieClip "sound" in Symbol 195 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 196 Button
on (release) {
getURL ("http://www.cuaticgames.com/", _blank);
}
Symbol 209 Button
on (release) {
sound.gotoAndPlay("menuClick");
_root.gotoAndStop("mainMenuEng");
_root.local_data.data.gameMode = 0;
}
Symbol 211 Button
on (release) {
sound.gotoAndPlay("menuClick");
if (_root.local_data.data.gameMode == 1) {
_root.gotoAndStop("partidaNormalEng");
} else if (_root.local_data.data.gameMode == 2) {
_root.gotoAndStop("partidaEndlessEng");
} else if (_root.local_data.data.gameMode == 3) {
_root.gotoAndStop("partidaBoardEng");
}
}
Instance of Symbol 179 MovieClip "sound" in Symbol 212 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 259 Button
on (release) {
if (isGame == true) {
isGame = false;
isRestart = true;
nextSquare = true;
isDisappear = true;
sound.gotoAndPlay("menuClick");
}
}
Symbol 278 MovieClip Frame 1
stop();
Symbol 278 MovieClip Frame 22
gotoAndStop (1);
Symbol 278 MovieClip Frame 62
gotoAndStop (1);
Symbol 278 MovieClip Frame 95
gotoAndStop (1);
Symbol 278 MovieClip Frame 98
gotoAndStop (1);
Symbol 278 MovieClip Frame 107
gotoAndStop (1);
Symbol 278 MovieClip Frame 116
gotoAndStop (1);
Symbol 278 MovieClip Frame 125
gotoAndStop (1);
Instance of Symbol 278 MovieClip "timerBar" in Symbol 280 MovieClip Frame 1
/* no clip actions */
Symbol 296 MovieClip Frame 1
stop();
Symbol 296 MovieClip Frame 30
gotoAndStop (1);
Symbol 298 MovieClip Frame 1
stop();
Symbol 298 MovieClip Frame 10
stop();
Symbol 298 MovieClip Frame 20
gotoAndStop (1);
Symbol 303 Button
on (release) {
_parent.gotoAndPlay("fadeOut");
_parent._parent.fondoOpaco.gotoAndPlay("fadeOut");
}
Symbol 313 Button
on (release) {
_parent.gotoAndPlay("scoreIn");
_root.local_data.data.gameMode = 0;
}
Symbol 318 MovieClip Frame 1
stop();
Symbol 323 Button
on (release) {
if (a.playerName.text != "Name") {
mochi.MochiScores.setBoardID(_root.codigo);
callback = {onScoresReceived:function (args) {
}};
mochi.MochiScores.submit(_parent._parent.gameScore, _a.playerName.text, callback, "onScoresReceived");
getURL ("http://www.smileygamer.com/highscores/tirwik.html?gameref=1131", _blank);
_parent.gotoAndPlay("scoreOut");
enterName._alpha = 0;
} else {
enterName._alpha = 100;
}
}
Symbol 326 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 10
stop();
Symbol 327 MovieClip Frame 20
_parent.createBoard();
gotoAndStop (1);
Symbol 327 MovieClip Frame 40
stop();
Symbol 327 MovieClip Frame 41
_parent._parent.fondoOpaco.gotoAndPlay("fadeOut");
Symbol 327 MovieClip Frame 50
gotoAndStop (20);
_root.gotoAndStop("mainMenuEng");
Symbol 328 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeEndless = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
_parent.sound.gotoAndPlay("menuClick");
}
}
Symbol 329 Button
on (release) {
_parent.modo = 2;
_parent.completeFade.gotoAndPlay("fadeOut");
_root.local_data.data.gameMode = 0;
}
Symbol 330 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 2
stop();
Symbol 331 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeBoard = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
_parent.sound.gotoAndPlay("menuClick");
}
}
Symbol 332 Button
on (release) {
_parent.modo = 3;
_parent.completeFade.gotoAndPlay("fadeOut");
_root.local_data.data.gameMode = 0;
}
Symbol 333 MovieClip Frame 1
stop();
Symbol 333 MovieClip Frame 2
stop();
Symbol 341 Button
on (release) {
gotoAndStop ("soundOff");
}
Symbol 343 Button
on (release) {
gotoAndStop ("soundOn");
}
Symbol 344 MovieClip Frame 1
stop();
Symbol 344 MovieClip Frame 2
stop();
Symbol 349 MovieClip Frame 1
function createBoard() {
if (_root.local_data.data.gameMode == 0) {
actualScore = 0;
gameScore = 0;
contLineas = 0;
bonus = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
tiempoActual = tiempoTotal / 2;
gameSpeed = 1;
dif = 0.1;
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = 0;
enteroRandom = Math.floor((Math.random() * colores) + 1);
if (enteroRandom == 1) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 1;
} else if (enteroRandom == 2) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 2;
} else if (enteroRandom == 3) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 3;
}
celdasCongelado[i][j] = 0;
celdasObjetos[i][j].congeladoF._alpha = 0;
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
_root.local_data.data.gameMode = 1;
_root.local_data.data.celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasColores[i] = new Array();
i++;
}
_root.local_data.data.celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasEstado[i] = new Array();
i++;
}
_root.local_data.data.celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasCongelado[i] = new Array();
i++;
}
_root.local_data.data.pointAX = 0;
_root.local_data.data.pointAY = 0;
_root.local_data.data.pointBX = 0;
_root.local_data.data.pointBY = 0;
_root.local_data.flush();
} else if (_root.local_data.data.gameMode == 1) {
actualScore = _root.local_data.data.actualScore;
gameScore = _root.local_data.data.gameScore;
contLineas = _root.local_data.data.contLineas;
bonus = _root.local_data.data.bonus;
mLineas = _root.local_data.data.mLineas;
mBronze = _root.local_data.data.mBronze;
mPlata = _root.local_data.data.mPlata;
mOro = _root.local_data.data.mOro;
tiempoActual = _root.local_data.data.tiempoActual;
gameSpeed = _root.local_data.data.gameSpeed;
dif = _root.local_data.data.dif;
pointAX = _root.local_data.data.pointAX;
pointAY = _root.local_data.data.pointAY;
pointBX = _root.local_data.data.pointBX;
pointBY = _root.local_data.data.pointBY;
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = _root.local_data.data.celdasEstado[i][j];
celdasColores[i][j] = _root.local_data.data.celdasColores[i][j];
celdasObjetos[i][j].gotoAndStop("invisible");
celdasCongelado[i][j] = _root.local_data.data.celdasCongelado[i][j];
if (celdasCongelado[i][j] == 1) {
celdasObjetos[i][j].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
}
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
}
}
function gameCycleControl() {
if (isGame == true) {
i = 0;
while (i < anchoTablero) {
if (((((((celdasColores[i][0] == 1) && (celdasColores[i][1] == 1)) && (celdasColores[i][2] == 1)) && (celdasColores[i][3] == 1)) && (celdasColores[i][4] == 1)) || (((((celdasColores[i][0] == 2) && (celdasColores[i][1] == 2)) && (celdasColores[i][2] == 2)) && (celdasColores[i][3] == 2)) && (celdasColores[i][4] == 2))) || (((((celdasColores[i][0] == 3) && (celdasColores[i][1] == 3)) && (celdasColores[i][2] == 3)) && (celdasColores[i][3] == 3)) && (celdasColores[i][4] == 3))) {
celdasEstado[i][0] = 1;
celdasEstado[i][1] = 1;
celdasEstado[i][2] = 1;
celdasEstado[i][3] = 1;
celdasEstado[i][4] = 1;
getPoints = true;
}
if (((((((celdasColores[0][i] == 1) && (celdasColores[1][i] == 1)) && (celdasColores[2][i] == 1)) && (celdasColores[3][i] == 1)) && (celdasColores[4][i] == 1)) || (((((celdasColores[0][i] == 2) && (celdasColores[1][i] == 2)) && (celdasColores[2][i] == 2)) && (celdasColores[3][i] == 2)) && (celdasColores[4][i] == 2))) || (((((celdasColores[0][i] == 3) && (celdasColores[1][i] == 3)) && (celdasColores[2][i] == 3)) && (celdasColores[3][i] == 3)) && (celdasColores[4][i] == 3))) {
celdasEstado[0][i] = 1;
celdasEstado[1][i] = 1;
celdasEstado[2][i] = 1;
celdasEstado[3][i] = 1;
celdasEstado[4][i] = 1;
getPoints = true;
}
i++;
}
if (tiempoActual < 0) {
tiempoActual = 0;
isDisappear = true;
nextSquare = true;
_root.local_data.data.gameMode = null;
}
if ((isAction == true) && (getPoints == false)) {
tiempoActual = tiempoActual - gameSpeed;
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (j == pointAY)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[i][pointAY] == 0) {
if (celdasColores[i][pointAY] == 3) {
celdasColores[i][pointAY] = 2;
celdasObjetos[i][pointAY].gotoAndStop("yellowGreen");
} else if (celdasColores[i][pointAY] == 1) {
celdasColores[i][pointAY] = 3;
celdasObjetos[i][pointAY].gotoAndStop("redYellow");
} else if (celdasColores[i][pointAY] == 2) {
celdasColores[i][pointAY] = 1;
celdasObjetos[i][pointAY].gotoAndStop("greenRed");
}
celdasCongelado[i][pointAY] = 1;
celdasObjetos[i][pointAY].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (i == pointAX)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[pointAX][i] == 0) {
if (celdasColores[pointAX][i] == 3) {
celdasColores[pointAX][i] = 2;
celdasObjetos[pointAX][i].gotoAndStop("yellowGreen");
} else if (celdasColores[pointAX][i] == 1) {
celdasColores[pointAX][i] = 3;
celdasObjetos[pointAX][i].gotoAndStop("redYellow");
} else if (celdasColores[pointAX][i] == 2) {
celdasColores[pointAX][i] = 1;
celdasObjetos[pointAX][i].gotoAndStop("greenRed");
}
celdasCongelado[pointAX][i] = 1;
celdasObjetos[pointAX][i].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
}
isAction = false;
_root.local_data.data.actualScore = actualScore;
_root.local_data.data.gameScore = gameScore;
_root.local_data.data.contLineas = contLineas;
_root.local_data.data.bonus = bonus;
_root.local_data.data.mLineas = mLineas;
_root.local_data.data.mBronze = mBronze;
_root.local_data.data.mPlata = mPlata;
_root.local_data.data.mOro = mOro;
_root.local_data.data.tiempoActual = tiempoActual;
_root.local_data.data.gameSpeed = gameSpeed;
_root.local_data.data.dif = dif;
_root.local_data.data.pointAX = pointAX;
_root.local_data.data.pointAY = pointAY;
_root.local_data.data.pointBX = pointBX;
_root.local_data.data.pointBY = pointBY;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
_root.local_data.data.celdasEstado[i][j] = celdasEstado[i][j];
_root.local_data.data.celdasColores[i][j] = celdasColores[i][j];
_root.local_data.data.celdasCongelado[i][j] = celdasCongelado[i][j];
j++;
}
i++;
}
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
detPatron();
if (tiempoActual > tiempoTotal) {
tiempoActual = tiempoTotal;
}
}
}
function detPatron() {
if (isGame == true) {
if (getPoints == true) {
bonus = 0;
contLineas = 0;
i = 0;
while (i < anchoTablero) {
if (((((((celdasColores[i][0] == 1) && (celdasColores[i][1] == 1)) && (celdasColores[i][2] == 1)) && (celdasColores[i][3] == 1)) && (celdasColores[i][4] == 1)) || (((((celdasColores[i][0] == 2) && (celdasColores[i][1] == 2)) && (celdasColores[i][2] == 2)) && (celdasColores[i][3] == 2)) && (celdasColores[i][4] == 2))) || (((((celdasColores[i][0] == 3) && (celdasColores[i][1] == 3)) && (celdasColores[i][2] == 3)) && (celdasColores[i][3] == 3)) && (celdasColores[i][4] == 3))) {
bonus++;
contLineas++;
}
if (((((((celdasColores[0][i] == 1) && (celdasColores[1][i] == 1)) && (celdasColores[2][i] == 1)) && (celdasColores[3][i] == 1)) && (celdasColores[4][i] == 1)) || (((((celdasColores[0][i] == 2) && (celdasColores[1][i] == 2)) && (celdasColores[2][i] == 2)) && (celdasColores[3][i] == 2)) && (celdasColores[4][i] == 2))) || (((((celdasColores[0][i] == 3) && (celdasColores[1][i] == 3)) && (celdasColores[2][i] == 3)) && (celdasColores[3][i] == 3)) && (celdasColores[4][i] == 3))) {
bonus++;
contLineas++;
}
i++;
}
if (contLineas == 1) {
actualScore = puntajeLineaBasica;
tiempoActual = tiempoActual + tiempoBonus;
if (tiempoActual >= tiempoTotal) {
tiempoActual = tiempoTotal;
}
if (tiempoActual < tiempoTotal) {
actualScore = puntajeLineaBasica;
timer_.timerBar.gotoAndPlay("getAPoints");
sound.gotoAndPlay("win1Line");
} else {
actualScore = puntajeLineaBasica * BONUS_ONMAX;
timer_.timerBar.gotoAndPlay("getBPoints");
sound.gotoAndPlay("bonus");
}
oneLiner++;
mBronze++;
mLineas++;
gameSpeed = gameSpeed + dif;
dif = dif + difDA;
} else {
if (tiempoActual > tiempoTotal) {
tiempoActual = tiempoTotal;
}
mLineas = mLineas + contLineas;
if (contLineas == 2) {
tiempoActual = tiempoActual + (tiempoBonus * 3);
twoLiner++;
mPlata++;
} else if (contLineas == 3) {
tiempoActual = tiempoActual + ((tiempoBonus * bonus) * 3);
threeLiner++;
mOro++;
} else if (contLineas == 4) {
tiempoActual = tiempoActual + ((tiempoBonus * bonus) * 4);
threeLiner++;
mOro++;
} else if ((contLineas >= 5) && (contLineas >= 5)) {
fiveLiner++;
}
if (tiempoActual < (tiempoTotal - 2)) {
actualScore = puntajeLineaBasica * contLineas;
timer_.timerBar.gotoAndPlay("getCPoints");
sound.gotoAndPlay("win2Line");
} else {
actualScore = (puntajeLineaBasica * contLineas) * BONUS_ONMAX;
timer_.timerBar.gotoAndPlay("getBPoints");
bonusMC.gotoAndPlay("bonusF");
sound.gotoAndPlay("bonus");
}
gameSpeed = gameSpeed + dif;
dif = dif + difDA;
}
gameScore = gameScore + actualScore;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if (celdasEstado[i][j] == 1) {
enteroRandom = Math.floor((Math.random() * colores) + 1);
if (enteroRandom == 1) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
}
} else if (enteroRandom == 2) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
}
} else if (enteroRandom == 3) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
}
}
celdasEstado[i][j] = 0;
}
j++;
}
i++;
}
getPoints = false;
_root.local_data.data.actualScore = actualScore;
_root.local_data.data.gameScore = gameScore;
_root.local_data.data.contLineas = contLineas;
_root.local_data.data.bonus = bonus;
_root.local_data.data.mLineas = mLineas;
_root.local_data.data.mBronze = mBronze;
_root.local_data.data.mPlata = mPlata;
_root.local_data.data.mOro = mOro;
_root.local_data.data.tiempoActual = tiempoActual;
_root.local_data.data.gameSpeed = gameSpeed;
_root.local_data.data.dif = dif;
_root.local_data.data.pointAX = pointAX;
_root.local_data.data.pointAY = pointAY;
_root.local_data.data.pointBX = pointBX;
_root.local_data.data.pointBY = pointBY;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
_root.local_data.data.celdasEstado[i][j] = celdasEstado[i][j];
_root.local_data.data.celdasColores[i][j] = celdasColores[i][j];
_root.local_data.data.celdasCongelado[i][j] = celdasCongelado[i][j];
j++;
}
i++;
}
}
}
}
function inputMarco(aX, aY, bX, bY) {
if (((isGame == true) && (isAction == false)) && (getPoints == false)) {
pointAY = aY;
pointAX = aX;
pointBY = bY;
pointBX = bX;
isAction = true;
sound.gotoAndPlay("colorUp");
}
}
function onMouseOver(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if ((isGame == true) && (isAction == false)) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[aX][i] == 1) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[aX][i] == 2) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[aX][i] == 3) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[aX][i] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[i][aY] == 1) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[i][aY] == 2) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[i][aY] == 3) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[i][aY] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
}
}
}
function onMouseOut(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("normal");
}
if ((isGame == true) && (isAction == false)) {
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[aX][i] == 1) {
celdasObjetos[aX][i].gotoAndStop("green");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 2) {
celdasObjetos[aX][i].gotoAndStop("yellow");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 3) {
celdasObjetos[aX][i].gotoAndStop("red");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[i][aY] == 1) {
celdasObjetos[i][aY].gotoAndStop("green");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 2) {
celdasObjetos[i][aY].gotoAndStop("yellow");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 3) {
celdasObjetos[i][aY].gotoAndStop("red");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
}
textBar.gotoAndStop(1);
textBar.tipBoxText = "";
}
}
function disappearBoard() {
if (isDisappear == true) {
isGame = false;
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeOut");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeOut");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeOut");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = 0;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isDisappear = false;
_root.local_data.data.gameMode = 0;
if (isRestart == true) {
createBoard();
isRestart = false;
nextSquare = true;
isAppear = true;
} else if (isChangeModeEndless == true) {
isChangeModeEndless = false;
_root.gotoAndStop("partidaEndlessEng");
} else if (isChangeModeBoard == true) {
isChangeModeBoard = false;
_root.gotoAndStop("partidaBoardEng");
} else if (isChangeModeNormal == true) {
isChangeModeNormal = false;
_root.gotoAndStop("partidaNormalEng");
} else {
finalWindow.gotoAndPlay("fadeIn");
fondoOpaco.gotoAndPlay("fadeIn");
}
}
}
if (isAppear == false) {
nextSquare = false;
}
}
}
}
function appearBoard() {
if (isAppear == true) {
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeIn");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeIn");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeIn");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isAppear = false;
isGame = true;
}
}
nextSquare = false;
}
}
}
BORDER_HINT = "Click to flip arrows. This controls how the squares cycle through colors.";
FORBIDDEN_HINT = "Arrows in squares with 'forbidden' sign cannot be flipped.";
BAR_HINT = "When the turn bar is depleted, the game is over.";
TURN_HINT = "Click to cycle the squares' colors and spend turns.";
BRONZE_HINT = "Bronze Medal: Awarded for achieving 3 lines at the same time.";
SILVER_HINT = "Silver Medal: Awarded for achieving 4 lines at the same time.";
GOLD_HINT = "Gold Medal: Awarded for achieving 5 or more lines at the same time.";
CASH_IN_HINT = "Click to get points for all the lines formed.";
SCORE_HINT = "Forming more lines earns you more points.";
SQUARE_HINT = "Click to cycle the squares' colors.";
dif = 0.1;
difDA = 0.0001;
TRANS_ROOTARROW = 65;
TRANS_GLOWPIEZA = 25;
TRANS_CONGELADO = 35;
BONUS_ONMAX = 3;
fps = 24;
eco = 24;
actualF = 0;
resetCount = 0;
resetState = false;
secPC = 10;
actualScore = 0;
gameScore = 0;
puntajeLineaBasica = 250;
contLineas = 0;
bonus = 0;
pointAX = 0;
pointAY = 0;
pointBX = 0;
pointBY = 0;
firstTime = true;
cursorContador = 0;
controlTrigger = true;
oneLiner = 0;
twoLiner = 0;
threeLiner = 0;
fourLiner = 0;
fiveLiner = 0;
isDisappear = false;
isAppear = true;
nextSquare = true;
onBonus = false;
l = 0;
m = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
isRestart = false;
isChangeModeEndless = false;
isChangeModeNormal = false;
isChangeModeBoard = false;
gameMode = 0;
Mouse.hide();
startDrag ("cursorInGame", true);
Instance of Symbol 280 MovieClip "timer_" in Symbol 349 MovieClip Frame 1
on (rollOver) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = "Represent the turns left. Achieve more lines to gain turns.";
}
}
on (rollOut) {
if (textBar.tipBoxText != "") {
textBar.gotoAndStop(1);
textBar.tipBoxText = "";
}
}
Instance of Symbol 103 MovieClip "_11" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
_parent.createBoard();
}
onClipEvent (enterFrame) {
_parent.appearBoard();
_parent.disappearBoard();
_parent.gameCycleControl();
if (_parent.cursorContador > 0) {
_parent.cursorContador++;
if (_parent.cursorContador > _parent.eco) {
_parent.isAction = false;
}
}
}
Instance of Symbol 124 MovieClip "completeFade" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (1);
}
Instance of Symbol 330 MovieClip "endlessButton" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 333 MovieClip "boardButton" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 179 MovieClip "sound" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 344 MovieClip "soundOnOff" in Symbol 349 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 352 Button
on (release) {
if (isGame == true) {
isGame = false;
nextSquare = true;
isDisappear = true;
sound.gotoAndPlay("menuClick");
}
}
Symbol 356 Button
on (release) {
if (_parent.isGame == true) {
_parent.isGame = false;
_parent.isChangeModeNormal = true;
_parent.nextSquare = true;
_parent.isDisappear = true;
}
}
Symbol 357 Button
on (release) {
_parent.modo = 1;
_parent.completeFade.gotoAndPlay("fadeOut");
_root.local_data.data.gameMode = 0;
}
Symbol 358 MovieClip Frame 1
stop();
Symbol 358 MovieClip Frame 2
stop();
Symbol 364 MovieClip Frame 1
function createBoard() {
if (_root.local_data.data.gameMode == 0) {
actualScore = 0;
gameScore = 0;
contLineas = 0;
bonus = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
tiempoActual = tiempoTotal / 2;
gameSpeed = 1;
dif = 0.1;
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = 0;
enteroRandom = Math.floor((Math.random() * colores) + 1);
if (enteroRandom == 1) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 1;
} else if (enteroRandom == 2) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 2;
} else if (enteroRandom == 3) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 3;
}
celdasCongelado[i][j] = 0;
celdasObjetos[i][j].congeladoF._alpha = 0;
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
_root.local_data.data.gameMode = 2;
_root.local_data.data.celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasColores[i] = new Array();
i++;
}
_root.local_data.data.celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasEstado[i] = new Array();
i++;
}
_root.local_data.data.celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasCongelado[i] = new Array();
i++;
}
_root.local_data.data.pointAX = 0;
_root.local_data.data.pointAY = 0;
_root.local_data.data.pointBX = 0;
_root.local_data.data.pointBY = 0;
_root.local_data.flush();
} else if (_root.local_data.data.gameMode == 2) {
actualScore = _root.local_data.data.actualScore;
gameScore = _root.local_data.data.gameScore;
contLineas = _root.local_data.data.contLineas;
bonus = _root.local_data.data.bonus;
mLineas = _root.local_data.data.mLineas;
mBronze = _root.local_data.data.mBronze;
mPlata = _root.local_data.data.mPlata;
mOro = _root.local_data.data.mOro;
tiempoActual = _root.local_data.data.tiempoActual;
gameSpeed = _root.local_data.data.gameSpeed;
dif = _root.local_data.data.dif;
pointAX = _root.local_data.data.pointAX;
pointAY = _root.local_data.data.pointAY;
pointBX = _root.local_data.data.pointBX;
pointBY = _root.local_data.data.pointBY;
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = _root.local_data.data.celdasEstado[i][j];
celdasColores[i][j] = _root.local_data.data.celdasColores[i][j];
celdasObjetos[i][j].gotoAndStop("invisible");
celdasCongelado[i][j] = _root.local_data.data.celdasCongelado[i][j];
if (celdasCongelado[i][j] == 1) {
celdasObjetos[i][j].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
}
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
}
}
function gameCycleControl() {
if (isGame == true) {
i = 0;
while (i < anchoTablero) {
if (((((((celdasColores[i][0] == 1) && (celdasColores[i][1] == 1)) && (celdasColores[i][2] == 1)) && (celdasColores[i][3] == 1)) && (celdasColores[i][4] == 1)) || (((((celdasColores[i][0] == 2) && (celdasColores[i][1] == 2)) && (celdasColores[i][2] == 2)) && (celdasColores[i][3] == 2)) && (celdasColores[i][4] == 2))) || (((((celdasColores[i][0] == 3) && (celdasColores[i][1] == 3)) && (celdasColores[i][2] == 3)) && (celdasColores[i][3] == 3)) && (celdasColores[i][4] == 3))) {
celdasEstado[i][0] = 1;
celdasEstado[i][1] = 1;
celdasEstado[i][2] = 1;
celdasEstado[i][3] = 1;
celdasEstado[i][4] = 1;
getPoints = true;
}
if (((((((celdasColores[0][i] == 1) && (celdasColores[1][i] == 1)) && (celdasColores[2][i] == 1)) && (celdasColores[3][i] == 1)) && (celdasColores[4][i] == 1)) || (((((celdasColores[0][i] == 2) && (celdasColores[1][i] == 2)) && (celdasColores[2][i] == 2)) && (celdasColores[3][i] == 2)) && (celdasColores[4][i] == 2))) || (((((celdasColores[0][i] == 3) && (celdasColores[1][i] == 3)) && (celdasColores[2][i] == 3)) && (celdasColores[3][i] == 3)) && (celdasColores[4][i] == 3))) {
celdasEstado[0][i] = 1;
celdasEstado[1][i] = 1;
celdasEstado[2][i] = 1;
celdasEstado[3][i] = 1;
celdasEstado[4][i] = 1;
getPoints = true;
}
i++;
}
if (tiempoActual < 0) {
tiempoActual = 0;
isDisappear = true;
nextSquare = true;
}
if ((isAction == true) && (getPoints == false)) {
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (j == pointAY)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[i][pointAY] == 0) {
if (celdasColores[i][pointAY] == 3) {
celdasColores[i][pointAY] = 2;
celdasObjetos[i][pointAY].gotoAndStop("yellow");
} else if (celdasColores[i][pointAY] == 1) {
celdasColores[i][pointAY] = 3;
celdasObjetos[i][pointAY].gotoAndStop("red");
} else if (celdasColores[i][pointAY] == 2) {
celdasColores[i][pointAY] = 1;
celdasObjetos[i][pointAY].gotoAndStop("green");
}
celdasCongelado[i][pointAY] = 1;
celdasObjetos[i][pointAY].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (i == pointAX)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[pointAX][i] == 0) {
if (celdasColores[pointAX][i] == 3) {
celdasColores[pointAX][i] = 2;
celdasObjetos[pointAX][i].gotoAndStop("yellow");
} else if (celdasColores[pointAX][i] == 1) {
celdasColores[pointAX][i] = 3;
celdasObjetos[pointAX][i].gotoAndStop("red");
} else if (celdasColores[pointAX][i] == 2) {
celdasColores[pointAX][i] = 1;
celdasObjetos[pointAX][i].gotoAndStop("green");
}
celdasCongelado[pointAX][i] = 1;
celdasObjetos[pointAX][i].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
}
isAction = false;
_root.local_data.data.actualScore = actualScore;
_root.local_data.data.gameScore = gameScore;
_root.local_data.data.contLineas = contLineas;
_root.local_data.data.bonus = bonus;
_root.local_data.data.mLineas = mLineas;
_root.local_data.data.mBronze = mBronze;
_root.local_data.data.mPlata = mPlata;
_root.local_data.data.mOro = mOro;
_root.local_data.data.tiempoActual = tiempoActual;
_root.local_data.data.gameSpeed = gameSpeed;
_root.local_data.data.dif = dif;
_root.local_data.data.pointAX = pointAX;
_root.local_data.data.pointAY = pointAY;
_root.local_data.data.pointBX = pointBX;
_root.local_data.data.pointBY = pointBY;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
_root.local_data.data.celdasEstado[i][j] = celdasEstado[i][j];
_root.local_data.data.celdasColores[i][j] = celdasColores[i][j];
_root.local_data.data.celdasCongelado[i][j] = celdasCongelado[i][j];
j++;
}
i++;
}
}
detPatron();
}
}
function detPatron() {
if (isGame == true) {
if (getPoints == true) {
bonus = 0;
contLineas = 0;
i = 0;
while (i < anchoTablero) {
if (((((((celdasColores[i][0] == 1) && (celdasColores[i][1] == 1)) && (celdasColores[i][2] == 1)) && (celdasColores[i][3] == 1)) && (celdasColores[i][4] == 1)) || (((((celdasColores[i][0] == 2) && (celdasColores[i][1] == 2)) && (celdasColores[i][2] == 2)) && (celdasColores[i][3] == 2)) && (celdasColores[i][4] == 2))) || (((((celdasColores[i][0] == 3) && (celdasColores[i][1] == 3)) && (celdasColores[i][2] == 3)) && (celdasColores[i][3] == 3)) && (celdasColores[i][4] == 3))) {
bonus++;
contLineas++;
}
if (((((((celdasColores[0][i] == 1) && (celdasColores[1][i] == 1)) && (celdasColores[2][i] == 1)) && (celdasColores[3][i] == 1)) && (celdasColores[4][i] == 1)) || (((((celdasColores[0][i] == 2) && (celdasColores[1][i] == 2)) && (celdasColores[2][i] == 2)) && (celdasColores[3][i] == 2)) && (celdasColores[4][i] == 2))) || (((((celdasColores[0][i] == 3) && (celdasColores[1][i] == 3)) && (celdasColores[2][i] == 3)) && (celdasColores[3][i] == 3)) && (celdasColores[4][i] == 3))) {
bonus++;
contLineas++;
}
i++;
}
if (contLineas == 1) {
actualScore = puntajeLineaBasica;
tiempoActual = tiempoActual + tiempoBonus;
if (tiempoActual >= tiempoTotal) {
tiempoActual = tiempoTotal;
}
if (tiempoActual < tiempoTotal) {
actualScore = puntajeLineaBasica;
timer_.timerBar.gotoAndPlay("getAPoints");
sound.gotoAndPlay("win1Line");
} else {
actualScore = puntajeLineaBasica * BONUS_ONMAX;
timer_.timerBar.gotoAndPlay("getBPoints");
sound.gotoAndPlay("win1Line");
}
oneLiner++;
mBronze++;
mLineas++;
gameSpeed = gameSpeed + dif;
dif = dif + difDA;
} else {
if (tiempoActual > tiempoTotal) {
tiempoActual = tiempoTotal;
}
mLineas = mLineas + contLineas;
if (contLineas == 2) {
tiempoActual = tiempoActual + (tiempoBonus * 3);
twoLiner++;
mPlata++;
} else if (contLineas == 3) {
tiempoActual = tiempoActual + ((tiempoBonus * bonus) * 3);
threeLiner++;
mOro++;
} else if (contLineas == 4) {
tiempoActual = tiempoActual + ((tiempoBonus * bonus) * 4);
threeLiner++;
mOro++;
} else if ((contLineas >= 5) && (contLineas >= 5)) {
fiveLiner++;
}
if (tiempoActual < (tiempoTotal - 2)) {
actualScore = puntajeLineaBasica * contLineas;
timer_.timerBar.gotoAndPlay("getAPoints");
sound.gotoAndPlay("win2Line");
} else {
actualScore = (puntajeLineaBasica * contLineas) * BONUS_ONMAX;
timer_.timerBar.gotoAndPlay("getBPoints");
sound.gotoAndPlay("win2Line");
}
gameSpeed = gameSpeed + dif;
dif = dif + difDA;
}
gameScore = gameScore + actualScore;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if (celdasEstado[i][j] == 1) {
enteroRandom = Math.floor((Math.random() * colores) + 1);
if (enteroRandom == 1) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
}
} else if (enteroRandom == 2) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 2;
}
} else if (enteroRandom == 3) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 3;
}
}
celdasEstado[i][j] = 0;
}
j++;
}
i++;
}
getPoints = false;
_root.local_data.data.actualScore = actualScore;
_root.local_data.data.gameScore = gameScore;
_root.local_data.data.contLineas = contLineas;
_root.local_data.data.bonus = bonus;
_root.local_data.data.mLineas = mLineas;
_root.local_data.data.mBronze = mBronze;
_root.local_data.data.mPlata = mPlata;
_root.local_data.data.mOro = mOro;
_root.local_data.data.tiempoActual = tiempoActual;
_root.local_data.data.gameSpeed = gameSpeed;
_root.local_data.data.dif = dif;
_root.local_data.data.pointAX = pointAX;
_root.local_data.data.pointAY = pointAY;
_root.local_data.data.pointBX = pointBX;
_root.local_data.data.pointBY = pointBY;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
_root.local_data.data.celdasEstado[i][j] = celdasEstado[i][j];
_root.local_data.data.celdasColores[i][j] = celdasColores[i][j];
_root.local_data.data.celdasCongelado[i][j] = celdasCongelado[i][j];
j++;
}
i++;
}
}
}
}
function inputMarco(aX, aY, bX, bY) {
if (((isGame == true) && (isAction == false)) && (getPoints == false)) {
pointAY = aY;
pointAX = aX;
pointBY = bY;
pointBX = bX;
isAction = true;
sound.gotoAndPlay("colorUp");
}
}
function onMouseOver(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if ((isGame == true) && (isAction == false)) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[aX][i] == 1) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[aX][i] == 2) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[aX][i] == 3) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[aX][i] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[i][aY] == 1) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[i][aY] == 2) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[i][aY] == 3) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[i][aY] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
}
}
}
function onMouseOut(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("normal");
}
if ((isGame == true) && (isAction == false)) {
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[aX][i] == 1) {
celdasObjetos[aX][i].gotoAndStop("green");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 2) {
celdasObjetos[aX][i].gotoAndStop("yellow");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 3) {
celdasObjetos[aX][i].gotoAndStop("red");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[i][aY] == 1) {
celdasObjetos[i][aY].gotoAndStop("green");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 2) {
celdasObjetos[i][aY].gotoAndStop("yellow");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 3) {
celdasObjetos[i][aY].gotoAndStop("red");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
}
textBar.gotoAndStop(1);
textBar.tipBoxText = "";
}
}
function disappearBoard() {
if (isDisappear == true) {
isGame = false;
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeOut");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeOut");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeOut");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = 0;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isDisappear = false;
_root.local_data.data.gameMode = 0;
if (isRestart == true) {
createBoard();
isRestart = false;
nextSquare = true;
isAppear = true;
} else if (isChangeModeEndless == true) {
isChangeModeEndless = false;
_root.gotoAndStop("partidaEndlessEng");
} else if (isChangeModeBoard == true) {
isChangeModeBoard = false;
_root.gotoAndStop("partidaBoardEng");
} else if (isChangeModeNormal == true) {
isChangeModeNormal = false;
_root.gotoAndStop("partidaNormalEng");
} else {
finalWindow.gotoAndPlay("fadeIn");
fondoOpaco.gotoAndPlay("fadeIn");
}
}
}
if (isAppear == false) {
nextSquare = false;
}
}
}
}
function appearBoard() {
if (isAppear == true) {
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeIn");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeIn");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeIn");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isAppear = false;
isGame = true;
}
}
nextSquare = false;
}
}
}
BORDER_HINT = "Click to flip arrows. This controls how the squares cycle through colors.";
FORBIDDEN_HINT = "Arrows in squares with 'forbidden' sign cannot be flipped.";
BAR_HINT = "When the turn bar is depleted, the game is over.";
TURN_HINT = "Click to cycle the squares' colors and spend turns.";
BRONZE_HINT = "Bronze Medal: Awarded for achieving 3 lines at the same time.";
SILVER_HINT = "Silver Medal: Awarded for achieving 4 lines at the same time.";
GOLD_HINT = "Gold Medal: Awarded for achieving 5 or more lines at the same time.";
CASH_IN_HINT = "Click to get points for all the lines formed.";
SCORE_HINT = "Forming more lines earns you more points.";
SQUARE_HINT = "Click to cycle the squares' colors.";
dif = 0.1;
difDA = 0.0001;
TRANS_ROOTARROW = 65;
TRANS_GLOWPIEZA = 25;
TRANS_CONGELADO = 35;
BONUS_ONMAX = 3;
fps = 24;
eco = 24;
actualF = 0;
resetCount = 0;
resetState = false;
secPC = 10;
actualScore = 0;
gameScore = 0;
puntajeLineaBasica = 250;
contLineas = 0;
bonus = 0;
pointAX = 0;
pointAY = 0;
pointBX = 0;
pointBY = 0;
firstTime = true;
cursorContador = 0;
controlTrigger = true;
oneLiner = 0;
twoLiner = 0;
threeLiner = 0;
fourLiner = 0;
fiveLiner = 0;
isDisappear = false;
isAppear = true;
nextSquare = true;
onBonus = false;
l = 0;
m = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
isRestart = false;
isChangeModeEndless = false;
isChangeModeNormal = false;
isChangeModeBoard = false;
gameMode = 0;
Mouse.hide();
startDrag ("cursorInGame", true);
Instance of Symbol 280 MovieClip "timer_" in Symbol 364 MovieClip Frame 1
on (rollOver) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = "Represent the turns left. Achieve more lines to gain turns.";
}
}
on (rollOut) {
if (textBar.tipBoxText != "") {
textBar.gotoAndStop(1);
textBar.tipBoxText = "";
}
}
Instance of Symbol 103 MovieClip "_11" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
_parent.createBoard();
}
onClipEvent (enterFrame) {
_parent.appearBoard();
_parent.disappearBoard();
_parent.gameCycleControl();
if (_parent.cursorContador > 0) {
_parent.cursorContador++;
if (_parent.cursorContador > _parent.eco) {
_parent.isAction = false;
}
}
}
Instance of Symbol 124 MovieClip "completeFade" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (1);
}
Instance of Symbol 358 MovieClip "normalButton" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 333 MovieClip "boardButton" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 179 MovieClip "sound" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 344 MovieClip "soundOnOff" in Symbol 364 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Symbol 372 MovieClip Frame 1
function createBoard() {
if (_root.local_data.data.gameMode == 0) {
actualScore = 0;
gameScore = 0;
contLineas = 0;
bonus = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
tiempoActual = tiempoTotal / 2;
gameSpeed = 1;
dif = 0.1;
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = 0;
enteroRandom = Math.floor((Math.random() * colores) + 1);
if (enteroRandom == 1) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 1;
} else if (enteroRandom == 2) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 2;
} else if (enteroRandom == 3) {
celdasObjetos[i][j].gotoAndStop("invisible");
celdasColores[i][j] = 3;
}
celdasCongelado[i][j] = 0;
celdasObjetos[i][j].congeladoF._alpha = 0;
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
_root.local_data.data.gameMode = 3;
_root.local_data.data.celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasColores[i] = new Array();
i++;
}
_root.local_data.data.celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasEstado[i] = new Array();
i++;
}
_root.local_data.data.celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
_root.local_data.data.celdasCongelado[i] = new Array();
i++;
}
_root.local_data.data.pointAX = 0;
_root.local_data.data.pointAY = 0;
_root.local_data.data.pointBX = 0;
_root.local_data.data.pointBY = 0;
_root.local_data.flush();
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
} else if (_root.local_data.data.gameMode == 3) {
actualScore = _root.local_data.data.actualScore;
gameScore = _root.local_data.data.gameScore;
contLineas = _root.local_data.data.contLineas;
bonus = _root.local_data.data.bonus;
mLineas = _root.local_data.data.mLineas;
mBronze = _root.local_data.data.mBronze;
mPlata = _root.local_data.data.mPlata;
mOro = _root.local_data.data.mOro;
tiempoActual = _root.local_data.data.tiempoActual;
gameSpeed = _root.local_data.data.gameSpeed;
dif = _root.local_data.data.dif;
pointAX = _root.local_data.data.pointAX;
pointAY = _root.local_data.data.pointAY;
pointBX = _root.local_data.data.pointBX;
pointBY = _root.local_data.data.pointBY;
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
}
celdasObjetos = new Array();
i = 0;
while (i < anchoTablero) {
celdasObjetos[i] = new Array();
i++;
}
celdasColores = new Array();
i = 0;
while (i < anchoTablero) {
celdasColores[i] = new Array();
i++;
}
celdasEstado = new Array();
i = 0;
while (i < anchoTablero) {
celdasEstado[i] = new Array();
i++;
}
celdasCongelado = new Array();
i = 0;
while (i < anchoTablero) {
celdasCongelado[i] = new Array();
i++;
}
celdasObjetos[0][0] = _11;
celdasObjetos[0][1] = _12;
celdasObjetos[0][2] = _13;
celdasObjetos[0][3] = _14;
celdasObjetos[0][4] = _15;
celdasObjetos[1][0] = _21;
celdasObjetos[1][1] = _22;
celdasObjetos[1][2] = _23;
celdasObjetos[1][3] = _24;
celdasObjetos[1][4] = _25;
celdasObjetos[2][0] = _31;
celdasObjetos[2][1] = _32;
celdasObjetos[2][2] = _33;
celdasObjetos[2][3] = _34;
celdasObjetos[2][4] = _35;
celdasObjetos[3][0] = _41;
celdasObjetos[3][1] = _42;
celdasObjetos[3][2] = _43;
celdasObjetos[3][3] = _44;
celdasObjetos[3][4] = _45;
celdasObjetos[4][0] = _51;
celdasObjetos[4][1] = _52;
celdasObjetos[4][2] = _53;
celdasObjetos[4][3] = _54;
celdasObjetos[4][4] = _55;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
celdasEstado[i][j] = _root.local_data.data.celdasEstado[i][j];
celdasColores[i][j] = _root.local_data.data.celdasColores[i][j];
celdasObjetos[i][j].gotoAndStop("invisible");
celdasCongelado[i][j] = _root.local_data.data.celdasCongelado[i][j];
if (celdasCongelado[i][j] == 1) {
celdasObjetos[i][j].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
}
j++;
}
i++;
}
timer_.timerMask._xscale = (tiempoActual / tiempoTotal) * 100;
with (cursorInGame) {
gotoAndStop("normal");
}
isAppear = true;
nextSquare = true;
}
}
function gameCycleControl() {
if (isGame == true) {
if (((((((((((((((((((((((((((celdasColores[0][0] == 1) && (celdasColores[0][1] == 1)) && (celdasColores[0][2] == 1)) && (celdasColores[0][3] == 1)) && (celdasColores[0][4] == 1)) && (celdasColores[1][0] == 1)) && (celdasColores[1][1] == 1)) && (celdasColores[1][2] == 1)) && (celdasColores[1][3] == 1)) && (celdasColores[1][4] == 1)) && (celdasColores[2][0] == 1)) && (celdasColores[2][1] == 1)) && (celdasColores[2][2] == 1)) && (celdasColores[2][3] == 1)) && (celdasColores[2][4] == 1)) && (celdasColores[3][0] == 1)) && (celdasColores[3][1] == 1)) && (celdasColores[3][2] == 1)) && (celdasColores[3][3] == 1)) && (celdasColores[3][4] == 1)) && (celdasColores[4][0] == 1)) && (celdasColores[4][1] == 1)) && (celdasColores[4][2] == 1)) && (celdasColores[4][3] == 1)) && (celdasColores[4][4] == 1)) || (((((((((((((((((((((((((celdasColores[0][0] == 2) && (celdasColores[0][1] == 2)) && (celdasColores[0][2] == 2)) && (celdasColores[0][3] == 2)) && (celdasColores[0][4] == 2)) && (celdasColores[1][0] == 2)) && (celdasColores[1][1] == 2)) && (celdasColores[1][2] == 2)) && (celdasColores[1][3] == 2)) && (celdasColores[1][4] == 2)) && (celdasColores[2][0] == 2)) && (celdasColores[2][1] == 2)) && (celdasColores[2][2] == 2)) && (celdasColores[2][3] == 2)) && (celdasColores[2][4] == 2)) && (celdasColores[3][0] == 2)) && (celdasColores[3][1] == 2)) && (celdasColores[3][2] == 2)) && (celdasColores[3][3] == 2)) && (celdasColores[3][4] == 2)) && (celdasColores[4][0] == 2)) && (celdasColores[4][1] == 2)) && (celdasColores[4][2] == 2)) && (celdasColores[4][3] == 2)) && (celdasColores[4][4] == 2))) || (((((((((((((((((((((((((celdasColores[0][0] == 3) && (celdasColores[0][1] == 3)) && (celdasColores[0][2] == 3)) && (celdasColores[0][3] == 3)) && (celdasColores[0][4] == 3)) && (celdasColores[1][0] == 3)) && (celdasColores[1][1] == 3)) && (celdasColores[1][2] == 3)) && (celdasColores[1][3] == 3)) && (celdasColores[1][4] == 3)) && (celdasColores[2][0] == 3)) && (celdasColores[2][1] == 3)) && (celdasColores[2][2] == 3)) && (celdasColores[2][3] == 3)) && (celdasColores[2][4] == 3)) && (celdasColores[3][0] == 3)) && (celdasColores[3][1] == 3)) && (celdasColores[3][2] == 3)) && (celdasColores[3][3] == 3)) && (celdasColores[3][4] == 3)) && (celdasColores[4][0] == 3)) && (celdasColores[4][1] == 3)) && (celdasColores[4][2] == 3)) && (celdasColores[4][3] == 3)) && (celdasColores[4][4] == 3))) {
getPoints = true;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
celdasEstado[i][j] = 1;
j++;
}
i++;
}
}
if ((isAction == true) && (getPoints == false)) {
if (aa._x < -100) {
aa._x = aa._x + 10000;
}
if (ab._x < -100) {
ab._x = ab._x + 10000;
}
if (ac._x < -100) {
ac._x = ac._x + 10000;
}
if (ad._x < -100) {
ad._x = ad._x + 10000;
}
if (ae._x < -100) {
ae._x = ae._x + 10000;
}
if (ba._x < -100) {
ba._x = ba._x + 10000;
}
if (bb._x < -100) {
bb._x = bb._x + 10000;
}
if (bc._x < -100) {
bc._x = bc._x + 10000;
}
if (bd._x < -100) {
bd._x = bd._x + 10000;
}
if (be._x < -100) {
be._x = be._x + 10000;
}
if (pointAY == pointBY) {
if (pointAY == 0) {
aa._x = aa._x - 10000;
} else if (pointAY == 1) {
ab._x = ab._x - 10000;
} else if (pointAY == 2) {
ac._x = ac._x - 10000;
} else if (pointAY == 3) {
ad._x = ad._x - 10000;
} else if (pointAY == 4) {
ae._x = ae._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (j == pointAY)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[i][pointAY] == 0) {
if (celdasColores[i][pointAY] == 3) {
celdasColores[i][pointAY] = 2;
celdasObjetos[i][pointAY].gotoAndStop("yellow");
} else if (celdasColores[i][pointAY] == 1) {
celdasColores[i][pointAY] = 3;
celdasObjetos[i][pointAY].gotoAndStop("red");
} else if (celdasColores[i][pointAY] == 2) {
celdasColores[i][pointAY] = 1;
celdasObjetos[i][pointAY].gotoAndStop("green");
}
celdasCongelado[i][pointAY] = 1;
celdasObjetos[i][pointAY].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
gameScore++;
} else if (pointAX == pointBX) {
if (pointAX == 0) {
ba._x = ba._x - 10000;
} else if (pointAX == 1) {
bb._x = bb._x - 10000;
} else if (pointAX == 2) {
bc._x = bc._x - 10000;
} else if (pointAX == 3) {
bd._x = bd._x - 10000;
} else if (pointAX == 4) {
be._x = be._x - 10000;
}
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if ((celdasCongelado[i][j] == 1) && (i == pointAX)) {
} else {
celdasObjetos[i][j].congeladoF._alpha = 0;
celdasCongelado[i][j] = 0;
}
j++;
}
i++;
}
i = 0;
while (i < anchoTablero) {
if (celdasCongelado[pointAX][i] == 0) {
if (celdasColores[pointAX][i] == 3) {
celdasColores[pointAX][i] = 2;
celdasObjetos[pointAX][i].gotoAndStop("yellow");
} else if (celdasColores[pointAX][i] == 1) {
celdasColores[pointAX][i] = 3;
celdasObjetos[pointAX][i].gotoAndStop("red");
} else if (celdasColores[pointAX][i] == 2) {
celdasColores[pointAX][i] = 1;
celdasObjetos[pointAX][i].gotoAndStop("green");
}
celdasCongelado[pointAX][i] = 1;
celdasObjetos[pointAX][i].congeladoF._alpha = TRANS_CONGELADO;
}
i++;
}
gameScore++;
}
isAction = false;
_root.local_data.data.actualScore = actualScore;
_root.local_data.data.gameScore = gameScore;
_root.local_data.data.contLineas = contLineas;
_root.local_data.data.bonus = bonus;
_root.local_data.data.mLineas = mLineas;
_root.local_data.data.mBronze = mBronze;
_root.local_data.data.mPlata = mPlata;
_root.local_data.data.mOro = mOro;
_root.local_data.data.tiempoActual = tiempoActual;
_root.local_data.data.gameSpeed = gameSpeed;
_root.local_data.data.dif = dif;
_root.local_data.data.pointAX = pointAX;
_root.local_data.data.pointAY = pointAY;
_root.local_data.data.pointBX = pointBX;
_root.local_data.data.pointBY = pointBY;
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < altoTablero) {
_root.local_data.data.celdasEstado[i][j] = celdasEstado[i][j];
_root.local_data.data.celdasColores[i][j] = celdasColores[i][j];
_root.local_data.data.celdasCongelado[i][j] = celdasCongelado[i][j];
j++;
}
i++;
}
}
detPatron();
}
}
function detPatron() {
if (isGame == true) {
if (getPoints == true) {
i = 0;
while (i < anchoTablero) {
j = 0;
while (j < anchoTablero) {
if (celdasColores[i][j] == 1) {
celdasObjetos[i][j].gotoAndStop("greenGreenPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 2) {
celdasObjetos[i][j].gotoAndStop("yellowYellowPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
} else if (celdasColores[i][j] == 3) {
celdasObjetos[i][j].gotoAndStop("redRedPoint");
celdasObjetos[i][j].play();
celdasColores[i][j] = 1;
}
j++;
}
i++;
}
sound.gotoAndPlay("board");
getPoints = false;
isDisappear = true;
nextSquare = true;
}
}
}
function inputMarco(aX, aY, bX, bY) {
if (((isGame == true) && (isAction == false)) && (getPoints == false)) {
pointAY = aY;
pointAX = aX;
pointBY = bY;
pointBX = bX;
isAction = true;
sound.gotoAndPlay("colorUp");
}
}
function onMouseOver(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if ((isGame == true) && (isAction == false)) {
with (cursorInGame) {
gotoAndStop("turnArrow");
}
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[aX][i] == 1) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[aX][i] == 2) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[aX][i] == 3) && (celdasCongelado[aX][i] == 0)) {
celdasObjetos[aX][i].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[aX][i] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if ((celdasColores[i][aY] == 1) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverGreen");
} else if ((celdasColores[i][aY] == 2) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverYellow");
} else if ((celdasColores[i][aY] == 3) && (celdasCongelado[i][aY] == 0)) {
celdasObjetos[i][aY].gotoAndPlay("mouseOverRed");
}
if (celdasCongelado[i][aY] != 1) {
if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = BORDER_HINT;
}
} else if (textBar.tipBoxText == "") {
textBar.gotoAndPlay(2);
textBar.tipBoxText = FORBIDDEN_HINT;
}
i++;
}
}
}
}
function onMouseOut(aX, aY, bX, bY) {
with (cursorInGame) {
gotoAndStop("normal");
}
if ((isGame == true) && (isAction == false)) {
if (aX == bX) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[aX][i] == 1) {
celdasObjetos[aX][i].gotoAndStop("green");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 2) {
celdasObjetos[aX][i].gotoAndStop("yellow");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[aX][i] == 3) {
celdasObjetos[aX][i].gotoAndStop("red");
if (celdasCongelado[aX][i] == 1) {
celdasObjetos[aX][i].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
} else if (aY == bY) {
i = 0;
while (i < anchoTablero) {
if (celdasColores[i][aY] == 1) {
celdasObjetos[i][aY].gotoAndStop("green");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 2) {
celdasObjetos[i][aY].gotoAndStop("yellow");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
} else if (celdasColores[i][aY] == 3) {
celdasObjetos[i][aY].gotoAndStop("red");
if (celdasCongelado[i][aY] == 1) {
celdasObjetos[i][aY].sentidoPieza.rootArrow._alpha = TRANS_ROOTARROW;
}
}
i++;
}
}
textBar.gotoAndStop(1);
textBar.tipBoxText = "";
}
}
function disappearBoard() {
if (isDisappear == true) {
isGame = false;
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeOut");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeOut");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeOut");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = 0;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isDisappear = false;
_root.local_data.data.gameMode = 0;
if (isRestart == true) {
createBoard();
isRestart = false;
nextSquare = true;
isAppear = true;
} else if (isChangeModeEndless == true) {
isChangeModeEndless = false;
_root.gotoAndStop("partidaEndlessEng");
} else if (isChangeModeBoard == true) {
isChangeModeBoard = false;
_root.gotoAndStop("partidaBoardEng");
} else if (isChangeModeNormal == true) {
isChangeModeNormal = false;
_root.gotoAndStop("partidaNormalEng");
} else {
finalWindow.gotoAndPlay("fadeIn");
fondoOpaco.gotoAndPlay("fadeIn");
}
}
}
if (isAppear == false) {
nextSquare = false;
}
}
}
}
function appearBoard() {
if (isAppear == true) {
if (nextSquare == true) {
if (celdasColores[l][m] == 1) {
celdasObjetos[l][m].gotoAndPlay("greenFadeIn");
} else if (celdasColores[l][m] == 2) {
celdasObjetos[l][m].gotoAndPlay("yellowFadeIn");
} else if (celdasColores[l][m] == 3) {
celdasObjetos[l][m].gotoAndPlay("redFadeIn");
}
if (celdasCongelado[l][m] == 1) {
celdasObjetos[l][m].congeladoF._alpha = TRANS_CONGELADO;
} else {
celdasObjetos[l][m].congeladoF._alpha = 0;
}
m++;
if (m >= altoTablero) {
m = 0;
l++;
if (l >= anchoTablero) {
l = 0;
isAppear = false;
isGame = true;
}
}
nextSquare = false;
}
}
}
BORDER_HINT = "Click to flip arrows. This controls how the squares cycle through colors.";
FORBIDDEN_HINT = "Arrows in squares with 'forbidden' sign cannot be flipped.";
BAR_HINT = "When the turn bar is depleted, the game is over.";
TURN_HINT = "Click to cycle the squares' colors and spend turns.";
BRONZE_HINT = "Bronze Medal: Awarded for achieving 3 lines at the same time.";
SILVER_HINT = "Silver Medal: Awarded for achieving 4 lines at the same time.";
GOLD_HINT = "Gold Medal: Awarded for achieving 5 or more lines at the same time.";
CASH_IN_HINT = "Click to get points for all the lines formed.";
SCORE_HINT = "Forming more lines earns you more points.";
SQUARE_HINT = "Click to cycle the squares' colors.";
dif = 0.1;
difDA = 0.0001;
TRANS_ROOTARROW = 65;
TRANS_GLOWPIEZA = 25;
TRANS_CONGELADO = 35;
BONUS_ONMAX = 3;
fps = 24;
eco = 24;
actualF = 0;
resetCount = 0;
resetState = false;
secPC = 10;
actualScore = 0;
gameScore = 0;
puntajeLineaBasica = 250;
contLineas = 0;
bonus = 0;
pointAX = 0;
pointAY = 0;
pointBX = 0;
pointBY = 0;
firstTime = true;
cursorContador = 0;
controlTrigger = true;
oneLiner = 0;
twoLiner = 0;
threeLiner = 0;
fourLiner = 0;
fiveLiner = 0;
isDisappear = false;
isAppear = true;
nextSquare = true;
onBonus = false;
l = 0;
m = 0;
mLineas = 0;
mBronze = 0;
mPlata = 0;
mOro = 0;
isRestart = false;
isChangeModeEndless = false;
isChangeModeNormal = false;
isChangeModeBoard = false;
gameMode = 0;
Mouse.hide();
startDrag ("cursorInGame", true);
Instance of Symbol 103 MovieClip "_11" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
_parent.createBoard();
}
onClipEvent (enterFrame) {
_parent.appearBoard();
_parent.disappearBoard();
_parent.gameCycleControl();
if (_parent.cursorContador > 0) {
_parent.cursorContador++;
if (_parent.cursorContador > _parent.eco) {
_parent.isAction = false;
}
}
}
Instance of Symbol 124 MovieClip "completeFade" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndPlay (1);
}
Instance of Symbol 358 MovieClip "normalButton" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 330 MovieClip "endlessButton" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
gotoAndStop (1);
}
Instance of Symbol 179 MovieClip "sound" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}
Instance of Symbol 344 MovieClip "soundOnOff" in Symbol 372 MovieClip Frame 1
onClipEvent (load) {
_alpha = 0;
}