Frame 1
function open_link(buttonLocation, GameURL) {
var _local4 = _root._url;
var _local2 = Url;
if ((GameURL != undefined) and (GameURL != "")) {
_local2 = GameURL;
}
if (domein == "media.jaludo.com") {
BrandingT = "jaludo";
} else if (Branding == "") {
BrandingT = "third party";
} else {
BrandingT = "cobranded - " + Branding;
}
var _local5 = (((((((_local2 + "?utm_campaign=") + escape(GameName)) + "&utm_content=") + escape(buttonLocation)) + "&utm_medium=") + escape(BrandingT)) + "&utm_source=") + escape(_local4);
getURL (_local5, "_blank");
}
function clean_game_name(TheGameName) {
TheGameName = TheGameName.toLowerCase();
TheGameName = TheGameName.split(" ").join("-");
return(TheGameName);
}
function openLink(obj, item) {
open_link("ContextMenuItem");
}
function NewLoad() {
var _local2 = new ContextMenu();
_local2.hideBuiltInItems();
_local2.customItems.push(new ContextMenuItem("Go to " + Type, openLink, true));
this.menu = _local2;
}
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
var pv;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
pv = ((fv == 5) ? (getVersion()) : (System.capabilities.version));
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=8&fv=") + fv) + "&v=") + escape(pv)) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
stop();
var GameName = "Blackjack time";
var Mochikey = "6333ea11";
var Branding = "";
var GameReadyTime = 5;
stop();
var sender = new LocalConnection();
var domein = sender.domain();
_root.open_link = open_link;
var Url = "http://www.gamesclub.com/";
var Type = "gamesclub.com";
_global.Goto = "gamesclub";
if (domein == "localhost") {
var lv = new LoadVars();
lv.onData = function (portalData) {
Type = portalData.toLowerCase();
if (Type == "funnygames.co.uk") {
Url = "http://www.funnygames.co.uk/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "funnygames";
} else if (Type == "giocare.it") {
Url = "http://www.giocare.it/";
HighscoreUrl = (Url + "punteggi-piu-alti/") + clean_game_name(GameName);
_global.Goto = "giocare";
} else if (Type == "hry.net") {
Url = "http://www.hry.net/";
HighscoreUrl = (Url + "nejvyssi-skore/") + clean_game_name(GameName);
_global.Goto = "hry";
} else if (Type == "sk.hry.net") {
Url = "http://sk.hry.net/";
HighscoreUrl = (Url + "najvyssie-skore/") + clean_game_name(GameName);
_global.Goto = "sk-hry";
} else if (Type == "jatekok.net") {
Url = "http://www.jatekok.net/";
HighscoreUrl = (Url + "legmagasabb-pontszam/") + clean_game_name(GameName);
_global.Goto = "jatekok";
} else if (Type == "jeuxgratuits.fr") {
Url = "http://www.jeuxgratuits.fr/";
HighscoreUrl = (Url + "meilleurs-scores/") + clean_game_name(GameName);
_global.Goto = "jeuxgratuits";
} else if (Type == "jocuri.net") {
Url = "http://www.jocuri.net/";
HighscoreUrl = (Url + "cele-mai-mari-scoruri/") + clean_game_name(GameName);
_global.Goto = "jocuri";
} else if (Type == "lege.dk") {
Url = "http://www.lege.dk/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "lege";
} else if (Type == "spelletje.nl") {
Url = "http://www.spelletje.nl/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "spelletje";
} else if (Type == "spiel.de") {
Url = "http://www.spiel.de/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "spiel";
} else if (Type == "igriigri.ru") {
Url = "http://www.igriigri.ru/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "igriigri";
} else if (Type == "spille.no") {
Url = "http://www.spille.no/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "spille";
} else if (Type == "flashgierki.pl") {
Url = "http://www.flashgierki.pl/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "flashgierki";
} else {
Url = "http://www.gamesclub.com/";
HighscoreUrl = (Url + "highscores/") + clean_game_name(GameName);
_global.Goto = "gamesclub";
}
NewLoad();
};
} else {
NewLoad();
}
if (domein != "localhost") {
lv.load("http://api.jaludo.com/geoip/index.php?return=domain&type=gameshell&portal=gamesclub");
} else {
NewLoad();
}
stop();
__com_mochibot__(Mochikey, this, 10301, true);
Frame 2
stop();
stop();
stopAllSounds();
var repeat = false;
var my_intro;
if (repeat == false) {
repeat = true;
my_intro = new Sound();
my_intro.attachSound("snd_intro");
my_intro.onSoundComplete = function () {
this.start();
};
if (!_root.nosounds) {
my_intro.start();
} else {
btn_music.gotoAndStop(2);
}
}
btn_music.onRelease = function () {
if (btn_music._currentframe == 1) {
my_intro.stop();
_root.nosounds = true;
btn_music.gotoAndStop(2);
} else {
my_intro.start();
_root.nosounds = false;
btn_music.gotoAndStop(1);
}
};
btn_music.onRollOver = function () {
btn_music.btn_roll.gotoAndStop(2);
};
btn_music.onReleaseOutside = function () {
btn_music.btn_roll.gotoAndStop(1);
};
btn_music.onRollOut = function () {
btn_music.btn_roll.gotoAndStop(1);
};
Instance of Symbol 245 MovieClip in Frame 2
//component parameters
onClipEvent (construct) {
Type = "logo-menu";
}
Frame 3
stop();
this.my_intro.stop("snd_intro");
game.main();
Symbol 149 MovieClip Frame 1
stop();
Symbol 188 MovieClip [mc_score] Frame 1
stop();
Symbol 206 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_global.Goto);
};
Symbol 211 Button
on (rollOver) {
play();
}
Symbol 212 MovieClip Frame 60
stop();
Symbol 212 MovieClip Frame 65
_root.gotoAndStop(2);
Symbol 278 MovieClip [__Packages.game] Frame 0
class game extends MovieClip
{
var __proto__, aleatorio, mesa;
function game (base) {
super();
base.__proto__ = __proto__;
base.__constructor__ = game;
this=base;//parameter overwritten
aleatorio = new com.prng.Mersenne();
aleatorio.seedMT(_root.stats);
mesa = new tablero(this);
}
static function main() {
var _local2 = new game(_root);
}
}
Symbol 279 MovieClip [__Packages.com.prng.Mersenne] Frame 0
class com.prng.Mersenne
{
function Mersenne () {
}
function seedMT(seed) {
var _local2 = (seed & 4294967295) | 1;
var _local3;
seed = _local2;
left = 0;
_local3 = 0;
state[_local3++] = _local2;
var _local4 = 624;
while (_local4-- , _local4) {
_local2 = _local2 * 69069;
_local2 = _local2 & 4294967295;
state[_local3++] = _local2;
}
return(seed);
}
function reloadMT() {
var _local5 = 0;
var _local7 = 2;
var _local4 = 397;
var _local3;
var _local2;
var _local6;
if (left < -1) {
seedMT(4357);
}
left = 623;
next = 1;
_local3 = state[0];
_local2 = state[1];
_local6 = 228;
while (_local6-- , _local6) {
state[_local5++] = (state[_local4++] ^ ((((_local3 & 2147483648) | (_local2 & 2147483647)) >> 1) & 2147483647)) ^ ((_local2 & 1) ? 2567483615 : 0);
_local3 = _local2;
_local2 = state[_local7++];
}
_local4 = 0;
_local6 = 397;
while (_local6-- , _local6) {
state[_local5++] = (state[_local4++] ^ ((((_local3 & 2147483648) | (_local2 & 2147483647)) >> 1) & 2147483647)) ^ ((_local2 & 1) ? 2567483615 : 0);
_local3 = _local2;
_local2 = state[_local7++];
}
_local2 = state[0];
state[_local5] = (state[_local4] ^ ((((_local3 & 2147483648) | (_local2 & 2147483647)) >> 1) & 2147483647)) ^ ((_local2 & 1) ? 2567483615 : 0);
_local2 = _local2 ^ ((_local2 >> 11) & 2097151);
_local2 = _local2 ^ ((_local2 << 7) & 2636928640);
_local2 = _local2 ^ ((_local2 << 15) & 4022730752);
return(_local2 ^ ((_local2 >> 18) & 16383));
}
function randomMT() {
var _local2;
if ((--left) < 0) {
return(reloadMT());
}
_local2 = state[next++];
_local2 = _local2 ^ ((_local2 >> 11) & 2097151);
_local2 = _local2 ^ ((_local2 << 7) & 2636928640);
_local2 = _local2 ^ ((_local2 << 15) & 4022730752);
return(_local2 ^ ((_local2 >> 18) & 16383));
}
function resized_randomMT(low, high) {
var _local2 = randomMT();
if (_local2 < 0) {
_local2 = _local2 + 4294967296;
}
return(((_local2 * ((high - low) + 1)) / 4294967296) + low);
}
function seedLCG(new_seed) {
if (new_seed < 0) {
new_seed = -new_seed;
}
LCG_store = new_seed % LCG_modulus;
return(LCG_store);
}
function randomLCG() {
LCG_store = ((LCG_store * LCG_multiplier_a) + LCG_offset_b) % LCG_modulus;
return(LCG_store);
}
function resized_randomLCG(low, high) {
var _local2 = randomLCG();
if (_local2 < 0) {
_local2 = _local2 + 4294967296;
}
return(((_local2 * ((high - low) + 1)) / LCG_modulus) + low);
}
var state = new Array(625);
var next = 0;
var left = -1;
var LCG_store = 7;
var LCG_modulus = 2147483647;
var LCG_multiplier_a = 16807;
var LCG_offset_b = 0;
}
Symbol 280 MovieClip [__Packages.tablero] Frame 0
class tablero extends MovieClip
{
var mesa, moveTo, lineTo, mazo, col1, col2, col3, col4, tf_format, intervalo, snd_background, repeat, nivel_finalizado, juego_finalizado, cant_niveles_jugados, intervalo_puntaje;
function tablero (target) {
super();
mesa = target.createEmptyMovieClip("mesa", target.getNextHighestDepth());
Object.registerClass("columna", columna);
Object.registerClass("popupwin", popupw);
moveTo(0, 0);
lineTo(100, 100);
_root.pause = false;
mazo = new libreria.deck(mesa);
mazo.setX(560);
mazo.setY(189.4);
mazo.setMesa(this);
col1 = mesa.attachMovie("columna", "col1", 1001);
col1.setMazo(mazo);
col1.setMesa(this);
col1._x = 81.7;
col1._y = 30;
col2 = mesa.attachMovie("columna", "col2", 1010);
col2.setMazo(mazo);
col2._x = 185.9;
col2._y = 65;
col2.setMesa(this);
col3 = mesa.attachMovie("columna", "col3", 1020);
col3.setMazo(mazo);
col3._x = 294.6;
col3._y = 50;
col3.setMesa(this);
col4 = mesa.attachMovie("columna", "col4", 1030);
col4.setMazo(mazo);
col4._x = 390.8;
col4._y = 40;
col4.setMesa(this);
var _local4;
_local4 = mesa.attachMovie("descartar", "algo", 1050);
_local4._x = 560;
_local4._y = 189.4;
_local4.onRelease = function () {
_root.mesa.mazo.descartarCarta();
};
tf_format = new TextFormat();
tf_format.size = 50;
tf_format.font = "fuente1";
tf_format.align = "left";
tf_format.color = 26367;
var _local5 = mesa.attachMovie("mc_score", "mc_score", mesa.getNextHighestDepth());
_local5._x = 475;
_local5._y = 437;
mesa.mc_score.txt_score.createTextField("tf_score", 1200, 0, 0, 400, 400);
mesa.mc_score.txt_score.tf_score.setNewTextFormat(tf_format);
mesa.mc_score.txt_score.tf_score.embedFonts = true;
mesa.mc_score.txt_score.tf_score.selectable = false;
mesa.mc_score.txt_score.tf_score.text = score;
tf_format.size = 22;
tf_format.color = 26367;
mesa.createTextField("tf_time", 1201, 105, 413.8, 95, 39.5);
mesa.tf_time.setNewTextFormat(tf_format);
mesa.tf_time.embedFonts = true;
mesa.tf_time.selectable = false;
tf_format.size = 25;
tf_format.color = 26367;
mesa.createTextField("tf_cartas_restantes", 1202, 560, 118, 70, 40);
mesa.tf_cartas_restantes.setNewTextFormat(tf_format);
mesa.tf_cartas_restantes.embedFonts = true;
mesa.tf_cartas_restantes.selectable = false;
mesa.tf_cartas_restantes.text = mazo.cards.length;
prepareSound();
intervalo = setInterval(this, "restaTiempo", 1000);
trace("_root.btn_music : " + _root.btn_music);
btnGUIEvents();
}
function btnGUIEvents() {
_root.btn_music.onRelease = mx.utils.Delegate.create(this, onBtnMusicRelease);
_root.btn_pause.onRelease = mx.utils.Delegate.create(this, onBtnPauseRelease);
_root.btn_exit.onRelease = mx.utils.Delegate.create(this, onBtnExitRelease);
_root.btn_music.onRollOver = function () {
this.btn_roll.gotoAndStop(2);
};
_root.btn_music.onRollOut = function () {
this.btn_roll.gotoAndStop(1);
};
_root.btn_music.onReleaseOutside = function () {
this.btn_roll.gotoAndStop(1);
};
_root.btn_pause.onRollOver = function () {
this.btn_roll.gotoAndStop(2);
};
_root.btn_pause.onRollOut = function () {
this.btn_roll.gotoAndStop(1);
};
_root.btn_pause.onReleaseOutside = function () {
this.btn_roll.gotoAndStop(1);
};
_root.btn_exit.onRollOver = function () {
this.btn_roll.gotoAndStop(2);
};
_root.btn_exit.onRollOut = function () {
this.btn_roll.gotoAndStop(1);
};
_root.btn_exit.onReleaseOutside = function () {
this.btn_roll.gotoAndStop(1);
};
}
function onBtnExitRelease() {
if (_root.btn_exit._currentframe == 1) {
clearInterval(intervalo);
mesa.removeMovieClip();
snd_background.stop();
_root.gotoAndStop("cover");
}
}
function onBtnPauseRelease() {
if (_root.btn_pause._currentframe == 1) {
_root.pause = true;
_root.btn_pause.gotoAndStop(2);
} else {
_root.pause = false;
_root.btn_pause.gotoAndStop(1);
}
}
function onBtnMusicRelease() {
if (_root.btn_music._currentframe == 1) {
snd_background.stop();
_root.nosounds = true;
_root.btn_music.gotoAndStop(2);
} else {
snd_background.start();
_root.nosounds = false;
_root.btn_music.gotoAndStop(1);
}
}
function prepareSound() {
snd_background = new Sound();
snd_background.stop();
repeat = false;
snd_background.stop();
if (repeat == false) {
repeat = true;
snd_background.attachSound("snd_background");
snd_background.onSoundComplete = function () {
this.start();
};
if (!_root.nosounds) {
snd_background.start();
} else {
_root.btn_music.gotoAndStop(2);
}
}
}
function restaTiempo() {
if (!_root.pause) {
if (!nivel_finalizado) {
if (tiempo > 0) {
tiempo--;
mesa.tf_time.text = ((Math.floor(tiempo / 60).toString() + "m ") + (tiempo % 60).toString()) + "s";
} else {
juego_finalizado = true;
finNivel();
}
}
}
}
function sumarScore(modificador) {
clearings++;
score = score + ((100 * clearings) * modificador);
mesa.mc_score.txt_score.tf_score.text = score;
mesa.mc_score.gotoAndPlay("shake");
}
function finNivel() {
cant_niveles_jugados++;
if (cant_niveles_jugados > 3) {
juego_finalizado = true;
}
nivel_finalizado = true;
var _local2 = Math.floor(((5000 * tiempo) / tiempo_total) / (1 + descartadas));
total_score = (total_score + score) + _local2;
mesa.attachMovie("popupwin", "puntos", mesa.getNextHighestDepth());
mesa.puntos.mostrarPuntos(score, _local2, score + _local2, total_score);
mesa.puntos.btn_restart._caller = this;
mesa.puntos.btn_restart.onRollOver = function () {
this.gotoAndStop(2);
};
mesa.puntos.btn_restart.onRollOut = function () {
this.gotoAndStop(1);
};
mesa.puntos.btn_restart.onReleaseOutside = function () {
this.gotoAndStop(1);
};
mesa.puntos.btn_restart.onRelease = function () {
this._caller.quitarPuntaje();
};
col1.limpiarColumna();
col2.limpiarColumna();
col3.limpiarColumna();
col4.limpiarColumna();
descartadas = 0;
tiempo = 180;
score = 0;
}
function quitarPuntaje(finalizar) {
mesa.puntos.removeMovieClip();
clearInterval(intervalo_puntaje);
reiniciarNivel();
}
function reiniciarNivel() {
prepareSound();
mazo.resetearMazo();
mesa.tf_cartas_restantes.text = mazo.cards.length;
mesa.tf_cartas_descartadas.text = descartadas;
mesa.mc_score.txt_score.tf_score.text = score;
nivel_finalizado = false;
}
var clearings = 0;
var score = 0;
var total_score = 0;
var tiempo_total = 180;
var tiempo = 180;
var descartadas = 0;
}
Symbol 281 MovieClip [__Packages.libreria.deck] Frame 0
class libreria.deck extends MovieClip
{
var deckContainer, snd_click, snd_deal, basecard, cards, y, x, mesa;
function deck (target) {
super();
deckContainer = target.createEmptyMovieClip("deckContainer", 1950);
resetearMazo();
snd_click = new Sound();
snd_deal = new Sound();
}
function resetearMazo() {
basecard = deckContainer.attachMovie("basecard", "basecard", 1951);
basecard._visible = false;
cardDepth = 0;
var _local4 = new Array("A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K");
var _local5 = new Array("C", "D", "H", "S");
var _local8;
var _local7 = 1;
_local8 = _local4.length * _local5.length;
cards = new Array(_local7 * _local8);
var _local6 = 0;
while (_local6 < _local7) {
var _local3 = 0;
while (_local3 < _local5.length) {
var _local2 = 0;
while (_local2 < _local4.length) {
cards[cardDepth] = new libreria.carta(_local4[_local2], _local5[_local3], deckContainer, cardDepth);
cardDepth++;
_local2++;
}
_local3++;
}
_local6++;
}
deckShuffle(3);
}
function removeTopCard() {
}
function getCardCount() {
return(cards.length);
}
function deckShuffle(n) {
var _local6;
var _local3;
var _local4;
var _local5;
var _local8;
trace("stackShuffle(n): " + n);
_local6 = 0;
while (_local6 < n) {
_local3 = 0;
while (_local3 < cards.length) {
_local4 = Math.floor(_root.aleatorio.resized_randomMT(0, cards.length - 1));
_local5 = cards[_local3];
cards[_local3] = cards[_local4];
cards[_local4] = _local5;
cards[_local4].swapDepth(cards[_local3].mc_card);
_local3++;
}
_local6++;
}
}
function getY() {
return(y);
}
function setY(y) {
this.y = y;
deckContainer._y = y;
}
function getX() {
return(x);
}
function setX(x) {
this.x = x;
deckContainer._x = x;
}
function descartarCarta() {
if (!_root.pause) {
if (!mesa.nivel_finalizado) {
var _local3 = cards.pop();
_local3.mc_card.removeMovieClip();
mesa.mesa.tf_cartas_restantes.text = cards.length;
mesa.descartadas++;
mesa.mesa.tf_cartas_descartadas.text = mesa.descartadas;
if (cards.length == 0) {
mesa.finNivel();
}
snd_click.attachSound("snd_click");
if (!_root.nosounds) {
snd_click.start();
}
}
}
}
function sacarCarta() {
cards.pop();
mesa.mesa.tf_cartas_restantes.text = cards.length;
if (cards.length == 0) {
mesa.finNivel();
}
var _local3 = Math.round(Math.random() * 5);
if (_local3 == 0) {
_local3 = 1;
}
snd_deal.attachSound("deal_r" + _local3);
if (!_root.nosounds) {
snd_deal.start();
}
}
function getMesa() {
return(mesa);
}
function setMesa(mesa) {
this.mesa = mesa;
}
var cardDepth = 0;
}
Symbol 282 MovieClip [__Packages.libreria.carta] Frame 0
class libreria.carta extends MovieClip
{
var mc_card, cdepth, width, height, rango, palo, moverse, intervalos_ira, id_interval_ira, ira_x, ira_y, angle;
function carta (rank, suit, target, depth) {
super();
mc_card = target.basecard.duplicateMovieClip("carta" + depth, 2000 + depth);
mc_card.img.attachMovie(("C_" + suit) + rank, "carta" + depth, 2000 + depth);
cdepth = 2000 + depth;
width = mc_card._width;
height = mc_card._height;
rango = rank;
palo = suit;
}
function moverCarta() {
if (moverse) {
if (intervalos_ira == 0) {
moverse = false;
clearInterval(id_interval_ira);
finalizaIrA();
} else {
setPosX(posX + ((ira_x - posX) / intervalos_ira));
setPosY(posY + ((ira_y - posY) / intervalos_ira));
intervalos_ira--;
}
}
}
function irA(x, y, angle) {
moverse = true;
ira_x = x;
ira_y = y;
intervalos_ira = 5;
this.angle = angle;
id_interval_ira = setInterval(this, "moverCarta", 10);
empiezaIrA();
}
function empiezaIrA() {
mc_card.swapDepths(mc_card.getDepth() + 10000);
}
function finalizaIrA() {
mc_card.swapDepths(mc_card.getDepth() - 10000);
mc_card._rotation = angle;
}
function getPosX() {
return(posX);
}
function setPosX(posX) {
this.posX = posX;
mc_card._x = this.posX;
}
function getPosY() {
return(posY);
}
function setPosY(posY) {
this.posY = posY;
mc_card._y = this.posY;
}
function getCdepth() {
return(cdepth);
}
function setCdepth(cdepth) {
this.cdepth = cdepth;
mc_card.swapDepths(cdepth);
}
function swapDepth(mc) {
mc_card.swapDepths(mc);
}
function getWidth() {
return(width);
}
function setWidth(width) {
this.width = width;
mc_card._width = width;
}
function getHeight() {
return(height);
}
function setHeight(height) {
this.height = height;
mc_card._height = height;
}
var posX = 0;
var posY = 0;
}
Symbol 283 MovieClip [__Packages.columna] Frame 0
class columna extends MovieClip
{
var cards, tf_format, createTextField, getDepth, tf_total_col, puntos_anim, mazo, _width, _x, _y, mesa, snd_win, _height;
function columna () {
super();
cards = new Array();
tf_format = new TextFormat();
tf_format.font = "fuente1";
tf_format.color = 16777215 /* 0xFFFFFF */;
tf_format.align = "center";
tf_format.size = 30;
createTextField("tf_total_col", getDepth() + 1, 0, 25, 70, 40);
tf_total_col.setNewTextFormat(tf_format);
tf_total_col.embedFonts = true;
tf_total_col.variable = "total_columna";
}
function onEnterFrame() {
if (limpiar_columna) {
var _local4 = false;
var _local3 = 0;
while (_local3 < cards.length) {
if (cards[_local3].moverse) {
_local4 = true;
}
_local3++;
}
if (!_local4) {
if (puntos_anim._currentframe < puntos_anim._totalframes) {
var _local2 = 0;
while (_local2 < cards.length) {
cards[_local2].mc_card._alpha = ((puntos_anim._totalframes - puntos_anim._currentframe) * 100) / puntos_anim._totalframes;
_local2++;
}
} else {
var _local2 = 0;
while (_local2 < cards.length) {
cards[_local2].mc_card._alpha = 0;
_local2++;
}
limpiarColumna();
puntos_anim.removeMovieClip();
}
}
}
}
function onRelease() {
if (!_root.pause) {
if (!limpiar_columna) {
cards.push(mazo.cards[mazo.getCardCount() - 1]);
if (calcularScoreColumna() < 22) {
var _local3 = cards.length;
while (_local3 > 0) {
cards[_local3].swapDepth(cards[_local3 - 1].mc_card);
_local3--;
}
var _local5;
var _local4;
if (cards.length == 1) {
_local5 = 0;
_local4 = 0;
} else if ((cards.length % 2) == 0) {
_local5 = -15;
_local4 = 10;
} else {
_local5 = 15;
_local4 = 5;
}
cards[cards.length - 1].irA((_x + ((_width - cards[0].mc_card._width) / 2)) - mazo.getX(), (_y + (25 + ((40 + _local4) * cards.length))) - mazo.getY(), _local5);
total_columna = calcularScoreColumna();
mazo.sacarCarta();
} else {
cards.pop();
}
if (cards.length == 5) {
mesa.sumarScore(3);
snd_win.attachSound("snd_winHand21");
if (!_root.nosounds) {
snd_win.start();
}
limpiar_columna = true;
puntos_anim = _root.attachMovie("puntos_5cc", "puntos_anim", getDepth() + 15000);
puntos_anim._x = ((_width / 2) - (puntos_anim._width / 2)) + _x;
puntos_anim._y = ((_height / 2) - (puntos_anim._height / 2)) + _y;
}
if (total_columna == 21) {
snd_win = new Sound();
if (cards.length == 2) {
if (((cards[0].rango = "A")) || ((cards[1].rango = "A"))) {
trace("******PARECE QUE BLACKJACK********");
snd_win.attachSound("snd_blackjack");
if (!_root.nosounds) {
snd_win.start();
}
mesa.sumarScore(2);
limpiar_columna = true;
puntos_anim = _root.attachMovie("puntos_bj", "puntos_anim", getDepth() + 15000);
puntos_anim._x = ((_width / 2) - (puntos_anim._width / 2)) + _x;
puntos_anim._y = ((_height / 2) - (puntos_anim._height / 2)) + _y;
} else {
trace("****CREO QUE FUE 21***");
snd_win.attachSound("snd_winHand21");
if (!_root.nosounds) {
snd_win.start();
}
mesa.sumarScore(1);
limpiar_columna = true;
}
} else {
trace("*******TAMBIEN 21???****");
snd_win.attachSound("snd_winHand21");
if (!_root.nosounds) {
snd_win.start();
}
mesa.sumarScore(1);
limpiar_columna = true;
puntos_anim = _root.attachMovie("puntos_21", "puntos_anim", getDepth() + 15000);
puntos_anim._x = ((_width / 2) - (puntos_anim._width / 2)) + _x;
puntos_anim._y = ((_height / 2) - (puntos_anim._height / 2)) + _y;
}
}
}
}
}
function limpiarColumna() {
var _local4 = cards.length;
var _local2 = 0;
while (_local2 < _local4) {
var _local3 = cards.pop();
_local3.mc_card.removeMovieClip();
_local2++;
}
limpiar_columna = false;
total_columna = 0;
}
function calcularScoreColumna() {
var _local2;
var _local3;
_local3 = 0;
_local2 = 0;
while (_local2 < cards.length) {
if (cards[_local2].rango == "A") {
_local3++;
} else if (((cards[_local2].rango == "J") || (cards[_local2].rango == "Q")) || (cards[_local2].rango == "K")) {
_local3 = _local3 + 10;
} else {
_local3 = _local3 + parseInt(cards[_local2].rango, 10);
}
_local2++;
}
_local2 = 0;
while (_local2 < cards.length) {
if ((cards[_local2].rango == "A") && (_local3 <= 11)) {
_local3 = _local3 + 10;
}
_local2++;
}
return(_local3);
}
function getMazo() {
return(mazo);
}
function setMazo(mazo) {
this.mazo = mazo;
}
function setMesa(mesa) {
this.mesa = mesa;
}
var total_columna = 0;
var limpiar_columna = false;
}
Symbol 284 MovieClip [__Packages.popupw] Frame 0
class popupw extends MovieClip
{
var repeat, sfx_sound, _x, _width, _y, _height, tf_format, createTextField, getNextHighestDepth, tf_score_puntos, tf_time_bonus_puntos, tf_round_total_puntos, tf_total_puntos;
function popupw () {
super();
repeat = false;
sfx_sound = new Sound();
sfx_sound.stop();
if (repeat == false) {
repeat = true;
sfx_sound.attachSound("snd_loseGame");
sfx_sound.onSoundComplete = function () {
this.start();
};
if (!_root.nosounds) {
sfx_sound.start();
}
}
_x = (Stage.width / 2) - (_width / 2);
_y = (Stage.height / 2) - (_height / 2);
tf_format = new TextFormat();
tf_format.size = 20;
tf_format.font = "fuente1";
tf_format.color = 3381759 /* 0x3399FF */;
createTextField("tf_score_puntos", getNextHighestDepth(), 184.1, 109.8, 100, 35);
tf_score_puntos.setNewTextFormat(tf_format);
tf_score_puntos.embedFonts = true;
tf_score_puntos.selectable = false;
createTextField("tf_time_bonus_puntos", getNextHighestDepth(), 184.1, 137.8, 100, 35);
tf_time_bonus_puntos.setNewTextFormat(tf_format);
tf_time_bonus_puntos.embedFonts = true;
tf_time_bonus_puntos.selectable = false;
tf_time_bonus_puntos.color = 26367;
createTextField("tf_round_total_puntos", getNextHighestDepth(), 184.1, 165.8, 100, 35);
tf_round_total_puntos.setNewTextFormat(tf_format);
tf_round_total_puntos.embedFonts = true;
tf_round_total_puntos.selectable = false;
tf_round_total_puntos.color = 26367;
tf_format = new TextFormat();
tf_format.size = 20;
tf_format.font = "fuente1";
tf_format.color = 16777215 /* 0xFFFFFF */;
createTextField("tf_total_puntos", getNextHighestDepth(), 184.1, 219.8, 100, 35);
tf_total_puntos.setNewTextFormat(tf_format);
tf_total_puntos.embedFonts = true;
tf_total_puntos.selectable = false;
tf_total_puntos.color = 16777215 /* 0xFFFFFF */;
}
function mostrarPuntos(score, time_bonus, round_total, total_score) {
tf_total_puntos.text = total_score.toString();
tf_round_total_puntos.text = round_total.toString();
tf_time_bonus_puntos.text = time_bonus.toString();
tf_score_puntos.text = score.toString();
}
}
Symbol 285 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 224 MovieClip Frame 1
stop();
Symbol 227 MovieClip Frame 1
stop();
if (_root.nosounds) {
gotoAndStop (2);
}
Symbol 227 MovieClip Frame 2
stop();
Symbol 232 Button
on (release) {
_root.open_link("more-games");
}
Symbol 235 Button
on (release) {
gotoAndPlay ("game");
}
Symbol 243 MovieClip Frame 1
stop();
onEnterFrame = function () {
gotoAndStop(_global.Goto);
};
Symbol 244 MovieClip Frame 1
stop();
Symbol 245 MovieClip Frame 1
stop();
Logo.onRelease = function () {
_root.open_link(Type);
trace(Type);
};
Logo.onRollOver = function () {
this.gotoAndStop(2);
};
Logo.onRollOut = function () {
this.gotoAndStop(1);
};
Symbol 266 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 1
stop();
Symbol 268 MovieClip Frame 2
stop();
Symbol 272 MovieClip Frame 1
stop();
Symbol 274 MovieClip Frame 1
stop();
if (_root.pause) {
gotoAndStop (2);
}
Symbol 274 MovieClip Frame 2
stop();