Frame 1
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__("1f2fa999", this, 10301, true);
MochiAd.showPreGameAd({id:"9617842b1d38876b", res:"600x400", background:3447637, color:11799307, outline:16777215, no_bg:true});
Frame 3
function playSound(soundName) {
globalSound = new Sound();
globalSound.attachSound(soundName);
globalSound.start(0, 0);
}
function playRandomSound(sounds) {
generated = Math.floor(Math.random() * sounds.length);
trace(generated);
if (sounds[generated] != "") {
playSound(sounds[generated]);
}
}
function stopLoop(loopName) {
globalSound.stop(loopName);
}
function randomChoice(choices) {
generated = Math.floor(Math.random() * choices.length);
return(choices[generated]);
}
function showBlack() {
caurina.transitions.Tweener.addTween(black, {_alpha:100, time:1.5, transition:"linear"});
}
function hideBlack() {
caurina.transitions.Tweener.addTween(black, {_alpha:0, time:1.5, transition:"linear"});
}
Stage.showMenu = false;
_quality = "HIGH";
var level = 0;
var tutorialStep = 0;
var tutorialClosed = 0;
var levelScore = 0;
var totalScore = 0;
var globalSound;
var retriesLeft;
moveCannonSound = new Sound();
moveCannonSound.attachSound("moveCannon");
black._alpha = 0;
stop();
Instance of Symbol 106 MovieClip "loader" in Frame 3
onClipEvent (enterFrame) {
var total;
var cargados;
var porcentaje;
total = _root.getBytesTotal();
cargados = _root.getBytesLoaded();
porcentaje = Math.floor((cargados * 100) / total);
percentage = porcentaje + "%";
loadbar._xscale = porcentaje;
if (porcentaje >= 100) {
_root.gotoAndPlay("menu");
}
}
Frame 6
Frame 10
stopAllSounds();
Frame 11
stop();
_quality = "HIGH";
menuSound = new Sound();
menuSound.attachSound("menuloop");
menuSound.start(0, 10);
logo._alpha = 0;
luces._alpha = 0;
btnPlay._alpha = 0;
btnMore._alpha = 0;
btnCredits._alpha = 0;
retriesLeft = 3;
hideBlack();
caurina.transitions.Tweener.addTween(logo, {_alpha:100, time:2});
caurina.transitions.Tweener.addTween(luces, {_alpha:100, time:2, delay:0.3});
caurina.transitions.Tweener.addTween(btnPlay, {_alpha:100, time:2, delay:0.6});
caurina.transitions.Tweener.addTween(btnMore, {_alpha:100, time:2, delay:0.9});
caurina.transitions.Tweener.addTween(btnCredits, {_alpha:100, time:2, delay:1.2});
Frame 21
function showTutorialStep(step) {
trace((("tut: " + step) + ", current: ") + tutorialStep);
if (_root.tutorialStep == step) {
var mcTut = eval ("tut" + step);
mcTut._visible = true;
mcTut.mano.gotoAndPlay(1);
}
}
function finishTutorial(step) {
if (tutorialStep == step) {
tutorialStep++;
var mcTut = eval ("tut" + step);
mcTut._visible = false;
}
}
function waktToTarget(targetX, targetType) {
santaXtarget = targetX;
timeX = Math.abs(santa._x - santaXtarget) / santaSpeed;
if (targetType == 2) {
caurina.transitions.Tweener.addTween(santa, {_x:santaXtarget, time:timeX, transition:"linear", onComplete:pickRegalo, onCompleteParams:[_root.lastClickedRegalo]});
} else if (targetType == 1) {
caurina.transitions.Tweener.addTween(santa, {_x:santaXtarget, time:timeX, transition:"linear", onComplete:useCannon, onCompleteParams:[_root.lastClickedRegalo]});
} else {
caurina.transitions.Tweener.addTween(santa, {_x:santaXtarget, time:timeX, transition:"linear", onComplete:standDown});
}
if (!withRegalo) {
santa.gotoAndStop("run");
} else {
santa.gotoAndStop("run2");
}
if (santa._x > santaXtarget) {
santa._xscale = 100;
} else {
santa._xscale = -100;
}
}
function randomGrinchTarget() {
targetBox = _root.randomChoice([btnregalo1, btnregalo2, btnregalo3, btnregalo4, btnregalo5, btnregalo6]);
if (grinchLastTarget != targetBox) {
walkGrinch(targetBox);
}
}
function walkGrinch(targetX) {
grinchTarget = targetX._x + 24;
grinchLastTarget = targetX;
caurina.transitions.Tweener.addTween(grinch2, {_x:grinchTarget, time:1, onComplete:agacharGrinch});
caurina.transitions.Tweener.addTween(grinch2, {_blur_blurX:10, time:0.5});
caurina.transitions.Tweener.addTween(grinch2, {_blur_blurX:0, time:0.5, delay:0.5});
grinch2.clip.gotoAndPlay("run");
if (grinch2._x > grinchTarget) {
grinch2._xscale = 100;
} else {
grinch2._xscale = -100;
}
}
function agacharGrinch() {
grinch2.clip.gotoAndPlay("hide");
}
function gotoPlay() {
btnPlay._visible = false;
caurina.transitions.Tweener.addTween(bgMapa, {_alpha:0, time:1.5, transition:"linear", delay:0.5});
caurina.transitions.Tweener.addTween(mapa, {_y:-400, time:1.5, transition:"linear"});
gotoAndStop ("play");
_root.playSound("mapUp");
}
function pausa() {
caurina.transitions.Tweener.pauseAllTweens();
}
function playGrinch() {
mira._visible = true;
grinch._visible = true;
caurina.transitions.Tweener.addTween(grinch, {_x:380, time:1.8, transition:"linear"});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:grinchStand, time:1.8, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:grinchMartillo, time:2.6, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:grinchVolver, time:4.7, count:1});
}
function grinchStand() {
grinch.clip.gotoAndPlay("stand");
playSound("laugh");
}
function grinchMartillo() {
grinch.clip.gotoAndPlay("martillo");
caurina.transitions.Tweener.addCaller(_root, {onUpdate:stumble, time:1, delay:1.5, count:20, transition:"easeinquad", waitFrames:true});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:breakCannon, time:1, count:1, delay:0.4});
}
function grinchVolver() {
grinch.clip.gotoAndPlay("run");
grinch._xscale = -100;
caurina.transitions.Tweener.addTween(grinch, {_x:800, time:1.8, transition:"linear"});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:blinkMira, time:2, count:22, transition:"easeinquad", waitFrames:true});
caurina.transitions.Tweener.addCaller(mira, {onUpdate:gotoAndStop, onUpdateParams:[2], time:1.5, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:waktToTarget, onUpdateParams:[310], time:3, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:showButtonPlay, time:4, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:finishTutorial, onUpdateParams:[5], time:3, count:1});
}
function breakCannon() {
playSound("break");
showTutorialStep(5);
caurina.transitions.Tweener.addCaller(_root, {onUpdate:finishTutorial, onUpdateParams:[3], time:3, count:1});
}
function showButtonPlay() {
btnPlay._visible = true;
}
function stumble() {
if (_root._y == 0) {
_root._y = -1;
} else {
_root._y = 0;
}
}
function blinkMira() {
mira._visible = !mira._visible;
if (mira._visible) {
playSound("ding");
}
}
function useCannon(tipoRegalo) {
santa.gotoAndStop("stand2");
if (withRegalo) {
cannonRegalo = tipoRegalo;
}
playSound("cargar");
if (showGrinch2) {
randomGrinchTarget();
}
withRegalo = false;
_root.showTutorialStep(2);
}
function pickRegalo(tipoRegalo) {
santa.gotoAndStop("pickup");
if (grinchLastTarget.tipo == lastClickedRegalo) {
grinch2.clip.gotoAndPlay("robar");
withRegalo = false;
pickedRegalo = 0;
playSound("laugh");
} else {
withRegalo = true;
pickedRegalo = tipoRegalo;
}
_root.finishTutorial(1);
_root.finishTutorial(4);
}
function iniciarBarra() {
sumandoPower = true;
}
function disparar() {
sumandoPower = false;
cannon.explosion.gotoAndPlay(2);
tmpRegalo = regalos.attachMovie("regalo", "r_" + regalos.getNextHighestDepth(), regalos.getNextHighestDepth(), {_x:270 + slider.actualPos, _y:240});
caurina.transitions.Tweener.addTween(tmpRegalo, {_x:_root.mira._x, _y:_root.mira._y, _yscale:40, _xscale:40, time:1.5, transition:"easeOutCubic", onComplete:tmpRegalo.chequearColision});
caurina.transitions.Tweener.addTween(tmpRegalo, {_y:_root.mira._y - 40, time:0.8, transition:"easeOutCubic"});
caurina.transitions.Tweener.addTween(tmpRegalo, {_y:_root.mira._y, time:0.5, delay:1, transition:"easeInSine"});
ultimoLanzado = cannonRegalo;
cannonRegalo = 0;
globalSound.stop("min");
globalSound.stop("max");
}
function fixSantaPos() {
if (santa._x > 310) {
santa._xscale = 100;
} else {
santa._xscale = -100;
}
}
function walkToCannon() {
if (!inCannon) {
return(waktToTarget(310, 1));
}
}
function showButtons() {
posicionBotones = 344;
eldelay = 0.2;
caurina.transitions.Tweener.addTween(btnregalo1, {_y:posicionBotones, time:1.5});
if (level > -1) {
caurina.transitions.Tweener.addTween(btnregalo2, {_y:posicionBotones, time:1.5, delay:eldelay});
}
eldelay = eldelay + 0.2;
if (level > 0) {
caurina.transitions.Tweener.addTween(btnregalo3, {_y:posicionBotones, time:1.5, delay:eldelay});
}
eldelay = eldelay + 0.2;
if (level > 4) {
caurina.transitions.Tweener.addTween(btnregalo5, {_y:posicionBotones, time:1.5, delay:eldelay});
eldelay = eldelay + 0.2;
btnregalo1._x = 16;
btnregalo2._x = 100;
}
if (level > 2) {
caurina.transitions.Tweener.addTween(btnregalo4, {_y:posicionBotones, time:1.5, delay:eldelay});
}
eldelay = eldelay + 0.2;
if (level > 5) {
btnregalo3._x = 437;
btnregalo4._x = 521;
caurina.transitions.Tweener.addTween(btnregalo6, {_y:posicionBotones, time:1.5, delay:eldelay});
eldelay = eldelay + 0.2;
}
}
function standDown() {
santa.gotoAndStop("stand");
showTutorialStep(6);
}
function centerCannon() {
cannon.gotoAndStop(11);
}
_quality = "HIGH";
stop();
menuSound = new Sound();
menuSound.attachSound("mainloop");
menuSound.start(0, 80);
trace("RETRIES: " + retriesLeft);
var santaXtarget = 0;
var santaSpeed = 220;
var inCannon = false;
var withRegalo = false;
var pickedRegalo = 0;
var cannonRegalo = 0;
var ultimoLanzado = 0;
var santaEnabled = false;
var inGame = false;
var power = 100;
var sumandoPower = false;
var factorPower = 4;
var casas;
var regalosPedidos = new Array();
var indexRegalo = 0;
var showGrinch2 = false;
grinchLastTarget = undefined;
levelScore = 0;
if (level > 5) {
showGrinch2 = true;
}
mira._visible = false;
tut0._visible = false;
tut1._visible = false;
tut2._visible = false;
tut3._visible = false;
tut4._visible = false;
tut5._visible = false;
tut6._visible = false;
waktToTarget(310);
centerCannon();
showButtons();
if (showGrinch2) {
walkGrinch(btnregalo1);
}
if (level == 2) {
btnPlay._visible = false;
mira._visible = true;
waktToTarget(-50);
playGrinch();
}
showTutorialStep(0);
onEnterFrame = function () {
if (sumandoPower) {
_root.power = _root.power + factorPower;
if ((_root.power > 100) || (_root.power < 0)) {
factorPower = -factorPower;
if (factorPower > 0) {
playSound("min");
} else {
playSound("max");
}
}
}
};
onMouseUp = function () {
stopDrag();
_root.moveCannonSound.stop("moveCannon");
};
Instance of Symbol 208 MovieClip in Frame 21
/* no clip actions */
Instance of Symbol 640 MovieClip "btnregalo1" in Frame 21
onClipEvent (load) {
this.tipo = 1;
gotoAndStop(this.tipo);
}
Instance of Symbol 640 MovieClip "btnregalo2" in Frame 21
onClipEvent (load) {
this.tipo = 2;
gotoAndStop(this.tipo);
}
Instance of Symbol 640 MovieClip "btnregalo4" in Frame 21
onClipEvent (load) {
this.tipo = 4;
gotoAndStop(this.tipo);
}
Instance of Symbol 640 MovieClip "btnregalo5" in Frame 21
onClipEvent (load) {
this.tipo = 5;
gotoAndStop(this.tipo);
}
Instance of Symbol 640 MovieClip "btnregalo6" in Frame 21
onClipEvent (load) {
this.tipo = 6;
gotoAndStop(this.tipo);
}
Instance of Symbol 640 MovieClip "btnregalo3" in Frame 21
onClipEvent (load) {
this.tipo = 3;
gotoAndStop(this.tipo);
}
Frame 29
function restarTiempo() {
tiempo = tiempo + 1;
luces.gotoAndStop(tiempo);
_root.playSound("luz");
}
function setLevelMission() {
txtLevelNombre._alpha = 0;
txtLevelNombre2._alpha = 0;
levelMission = ("Deliver " + levelRequiredRegalos) + " presents";
caurina.transitions.Tweener.addTween(txtLevelNombre, {_alpha:100, time:1, transition:"linear"});
caurina.transitions.Tweener.addTween(txtLevelNombre2, {_alpha:100, time:1, transition:"linear"});
caurina.transitions.Tweener.addTween(txtLevelNombre, {_alpha:0, time:1, delay:2, transition:"linear"});
caurina.transitions.Tweener.addTween(txtLevelNombre2, {_alpha:0, time:1, delay:2, transition:"linear"});
}
function startlevel() {
regalosBuenos = 0;
trace("iniciando nivel");
pedirRegalo();
caurina.transitions.Tweener.addCaller(_root, {onUpdate:pedirRegalo, onComplete:finalizarNivel, time:levelTime, count:levelRegalos, transition:levelEquation});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:restarTiempo, time:levelTime + 15, count:10, transition:"linear"});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:mostrarRegalosReq, time:1});
}
function mostrarRegalosReq() {
mcReqRegalos._visible = true;
mcReqRegalos._alpha = 0;
caurina.transitions.Tweener.addTween(mcReqRegalos, {_alpha:100, time:1});
}
function pedirRegalo() {
tmpCasa = randomChoice(casas);
trace((tmpCasa + " pidiendo ") + tmpCasa.pidiendo);
if (!tmpCasa.pidiendo) {
tmpCasa.pedirRegalo();
tmpcasa.ultimoRegalo = indexRegalo;
indexRegalo++;
} else {
trace("ya estaba pidiendo");
tmpCasa = randomChoice(casas);
if (!tmpCasa.pidiendo) {
tmpCasa.pedirRegalo();
tmpcasa.ultimoRegalo = indexRegalo;
indexRegalo++;
} else {
trace("ya estaba pidiendo 2");
tmpCasa = randomChoice(casas);
if (!tmpCasa.pidiendo) {
tmpCasa.pedirRegalo();
tmpcasa.ultimoRegalo = indexRegalo;
indexRegalo++;
} else {
trace("ya estaba pidiendo 3");
}
}
}
}
function finalizarNivel() {
trace("finalizando nivel");
caurina.transitions.Tweener.addCaller(_root, {onUpdate:showBlack, time:16.5, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:gotoFinish, time:18, count:1});
}
function gotoFinish() {
trace("going to win");
gotoAndPlay ("win");
}
_quality = "MEDIUM";
stop();
santaEnabled = true;
inGame = true;
mcReqRegalos._visible = false;
casas = [casa1, casa2];
arrRegalos = [1];
cannon.stop();
regalosPedidos = new Array();
levelTime = 60;
levelRegalos = 8;
levelRequiredRegalos = 2;
levelEquation = "linear";
levelNombre = "Tutorial";
tiempo = 1;
perfectLevel = true;
caurina.transitions.Tweener.addCaller(this, {onUpdate:this.startlevel, time:2, count:1});
gotoAndStop(30 + level);
Instance of Symbol 683 MovieClip "mcReqRegalos" in Frame 29
onClipEvent (enterFrame) {
this.texto = (_root.regalosBuenos + "/") + _root.levelRequiredRegalos;
}
Frame 30
casas = [casa1, casa2, casa3, casa4, casa5];
arrRegalos = [1, 2];
levelTime = 60;
levelRegalos = 7;
levelRequiredRegalos = 3;
levelEquation = "linear";
levelNombre = "North Pole";
setLevelMission();
Instance of Symbol 91 MovieClip "est1" in Frame 30
onClipEvent (enterFrame) {
_alpha = (random(60) + 30);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 30
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 30
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Frame 31
casas = [casa1, casa2, casa3, casa4, casa5, casa6];
arrRegalos = [1, 2, 3];
levelTime = 70;
levelRegalos = 11;
levelRequiredRegalos = 6;
levelEquation = "linear";
levelNombre = "England";
setLevelMission();
Instance of Symbol 91 MovieClip "est2" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 30);
}
Instance of Symbol 93 MovieClip "esti3" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti6" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti5" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti4" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti7" in Frame 31
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Frame 32
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7];
arrRegalos = [1, 2, 3];
levelTime = 80;
levelRegalos = 12;
levelRequiredRegalos = 7;
levelEquation = "linear";
levelNombre = "Russia";
setLevelMission();
Frame 33
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7];
arrRegalos = [1, 2, 3, 4];
levelTime = 90;
levelRegalos = 16;
levelRequiredRegalos = 10;
levelEquation = "linear";
levelNombre = "South Pole";
setLevelMission();
Instance of Symbol 91 MovieClip "est1" in Frame 33
onClipEvent (enterFrame) {
_alpha = (random(60) + 30);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 33
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 33
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Frame 34
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7];
arrRegalos = [1, 2, 3, 4];
levelTime = 100;
levelRegalos = 20;
levelRequiredRegalos = 13;
levelEquation = "linear";
levelNombre = "Chile";
setLevelMission();
Frame 35
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8];
arrRegalos = [1, 2, 3, 4, 5];
levelTime = 110;
levelRegalos = 24;
levelRequiredRegalos = 15;
levelEquation = "linear";
levelNombre = "Australia";
setLevelMission();
Frame 36
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8];
arrRegalos = [1, 2, 3, 4, 5, 6];
levelTime = 120;
levelRegalos = 28;
levelRequiredRegalos = 17;
levelEquation = "linear";
levelNombre = "Cameroon";
setLevelMission();
Instance of Symbol 93 MovieClip "esti2" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 36
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Frame 37
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8, casa9];
arrRegalos = [1, 2, 3, 4, 5, 6];
levelTime = 130;
levelRegalos = 32;
levelRequiredRegalos = 19;
levelEquation = "linear";
levelNombre = "Brazil";
setLevelMission();
Frame 38
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8, casa9];
arrRegalos = [1, 2, 3, 4, 5, 6];
levelTime = 140;
levelRegalos = 34;
levelRequiredRegalos = 22;
levelEquation = "linear";
levelNombre = "France";
setLevelMission();
Frame 39
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8, casa9, casa10];
arrRegalos = [1, 2, 3, 4, 5, 6];
levelTime = 150;
levelRegalos = 36;
levelRequiredRegalos = 24;
levelEquation = "linear";
levelNombre = "Japan";
setLevelMission();
Frame 40
casas = [casa1, casa2, casa3, casa4, casa5, casa6, casa7, casa8, casa9, casa10];
arrRegalos = [1, 2, 3, 4, 5, 6];
levelTime = 160;
levelRegalos = 38;
levelRequiredRegalos = 27;
levelEquation = "linear";
levelNombre = "USA";
setLevelMission();
Frame 45
stop();
function pegarRegalo(x_, y_, regalo) {
j = 1 + Math.floor(pegados / 10);
ypos = 30 * j;
tmpRegalo = placeregalos.attachMovie("regalo2", "r_" + placeregalos.getNextHighestDepth(), placeregalos.getNextHighestDepth(), {_x:xpos, _y:ypos});
tmpRegalo.stop();
tmpRegalo.gotoAndStop(regalo[0]);
_root.playSound("ding");
if (regalo[1] == true) {
tmpRegalo.estatus.gotoAndStop(2);
drawRegalosBuenos++;
} else {
tmpRegalo.estatus.gotoAndStop(3);
}
pegados++;
xpos = xpos + 30;
if ((Math.floor(pegados / 10) + 1) != j) {
xpos = 0;
}
}
function pegarRegalos() {
j = 1;
ypos = 30;
i = 0;
while (i < regalosPedidos.length) {
caurina.transitions.Tweener.addCaller(_root, {onUpdate:pegarRegalo, onUpdateParams:[30 * i, 5, regalosPedidos[i]], time:0.3 * i, count:1});
i++;
}
caurina.transitions.Tweener.addCaller(_root, {onUpdate:showNextButton, time:(0.3 * i) + 1, count:1});
}
function showNextButton() {
if (drawRegalosBuenos >= levelRequiredRegalos) {
trace((drawRegalosBuenos + " - ") + pegados);
if (drawRegalosBuenos == pegados) {
perfect._visible = true;
_root.totalScore = _root.totalScore + 800;
_root.levelScore = _root.levelScore + 800;
}
if (level < 10) {
btnNext._visible = true;
_root.playSound("right");
} else {
caurina.transitions.Tweener.addCaller(_root, {onUpdate:showBlack, time:1, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:gotoAndPlay, onUpdateParams:["final"], time:3, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:hideBlack, time:3.2, count:1});
}
} else if (retriesLeft > 0) {
btnRetry._visible = true;
mcretries._visible = true;
mcretries.texto = ("(" + String(_root.retriesLeft)) + " left)";
_root.playSound("wrong");
_root.totalScore = _root.totalScore - _root.levelScore;
} else {
caurina.transitions.Tweener.addCaller(_root, {onUpdate:showBlack, time:1, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:gotoAndPlay, onUpdateParams:["lose"], time:3, count:1});
caurina.transitions.Tweener.addCaller(_root, {onUpdate:hideBlack, time:3.3, count:1});
}
}
hideBlack();
_quality = "HIGH";
pegados = 0;
j = 1;
ypos = 30;
xpos = 0;
stopAllSounds();
btnNext._visible = false;
btnRetry._visible = false;
perfect._visible = false;
mcretries._visible = false;
drawRegalosBuenos = 0;
trace("RETRIES: " + retriesLeft);
pegarRegalos();
Instance of Symbol 97 MovieClip in Frame 45
onClipEvent (enterFrame) {
_y = (_y + 0.5);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Frame 45
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Frame 45
onClipEvent (enterFrame) {
_y = (_y + 0.1);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 754 MovieClip "mcReqRegalos2" in Frame 45
onClipEvent (enterFrame) {
this.texto = (_root.drawRegalosBuenos + "/") + _root.levelRequiredRegalos;
}
Frame 51
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__("7f145d95", this, 10301, true);
Instance of Symbol 91 MovieClip "est1" in Frame 51
onClipEvent (enterFrame) {
_alpha = (random(60) + 30);
}
Instance of Symbol 93 MovieClip "esti2" in Frame 51
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti1" in Frame 51
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Frame 59
stop();
Instance of Symbol 97 MovieClip in Frame 70
onClipEvent (enterFrame) {
_y = (_y + 0.5);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Frame 70
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Frame 70
onClipEvent (enterFrame) {
_y = (_y + 0.1);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Symbol 36 MovieClip [regalo] Frame 1
#initclip 14
Object.registerClass("regalo", Regalo);
#endinitclip
Symbol 41 MovieClip Frame 1
stop();
Symbol 52 MovieClip [regalo2] Frame 1
onEnterFrame = function () {
gotoAndStop(_parent._parent.regaloPedido);
};
Symbol 59 MovieClip Frame 506
stop();
Symbol 60 MovieClip Frame 1
stop();
Symbol 60 MovieClip Frame 33
stop();
_root.showTutorialStep(1);
Symbol 66 MovieClip Frame 1
stop();
Symbol 85 MovieClip [casa] Frame 1
#initclip 13
Object.registerClass("casa", Casa);
#endinitclip
stop();
this.gotoAndStop(_root.level + 1);
Symbol 97 MovieClip Frame 91
gotoAndPlay(random(50) + 92);
Instance of Symbol 91 MovieClip "est2" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 30);
}
Instance of Symbol 93 MovieClip "esti3" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti6" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti5" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti4" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 93 MovieClip "esti7" in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_alpha = (random(60) + 20);
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.4);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.4);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.5);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.5);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.5);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.1);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.1);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.1);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.2);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Instance of Symbol 97 MovieClip in Symbol 98 MovieClip Frame 1
onClipEvent (enterFrame) {
_y = (_y + 0.4);
if (_y >= 250) {
_y = -20;
_x = (random(390) + 10);
}
}
Symbol 812 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 813 MovieClip [__Packages.Casa] Frame 0
class Casa extends MovieClip
{
var pidiendo, score, regaloPedido, globo, ultimoRegalo, mcScore, score2;
function Casa () {
super();
trace("casa creada");
pidiendo = false;
score = 200;
}
function pedirRegalo() {
score = 200;
regaloPedido = _root.randomChoice(_root.arrRegalos);
globo.gotoAndPlay(2);
pidiendo = true;
_root.regalosPedidos[_root.indexRegalo] = [regaloPedido, false];
ultimoRegalo = _root.indexRegalo;
caurina.transitions.Tweener.addCaller(this, {onUpdate:stopPedir, time:25, count:1});
mcScore.gotoAndStop(1);
}
function onEnterFrame() {
if (pidiendo) {
score = score - 0.3;
if (score <= 50) {
score = 50;
}
score2 = " " + Math.round(score);
}
}
function acertar() {
trace("tratando de modificar " + _root.regalosPedidos[ultimoRegalo]);
if (_root.ultimoLanzado == regaloPedido) {
_root.regalosPedidos[ultimoRegalo] = [regaloPedido, true];
_root.playSound("right");
mcScore.gotoAndPlay(2);
_root.levelScore = _root.levelScore + Math.round(score);
_root.totalScore = _root.totalScore + Math.round(score);
_root.regalosBuenos++;
} else {
_root.regalosPedidos[ultimoRegalo] = [regaloPedido, false];
_root.playSound("wrong");
score = 0;
_root.perfectLevel = false;
}
_root.ultimoLanzado = 0;
_root.showTutorialStep(4);
stopPedir2();
}
function stopPedir() {
score = 0;
regaloPedido = 0;
pidiendo = false;
caurina.transitions.Tweener.removeTweens(this);
_root.playSound("wrong");
_root.perfectLevel = false;
globo.gotoAndStop(1);
}
function stopPedir2() {
pidiendo = false;
regaloPedido = 0;
caurina.transitions.Tweener.removeTweens(this);
globo.gotoAndStop(1);
}
}
Symbol 814 MovieClip [__Packages.caurina.transitions.Tweener] Frame 0
class caurina.transitions.Tweener
{
static var _specialPropertySplitterList, _specialPropertyModifierList, _transitionList, _currentTime, _tweenList, _specialPropertyList;
function Tweener () {
trace("Tweener is an static class and should not be instantiated.");
}
static function addTween() {
if ((arguments.length < 2) || (arguments[0] == undefined)) {
return(false);
}
var _local11 = new Array();
var _local3;
var _local39;
var _local4;
var _local38;
if (arguments[0] instanceof Array) {
_local3 = 0;
while (_local3 < arguments[0].length) {
_local11.push(arguments[0][_local3]);
_local3++;
}
} else {
_local3 = 0;
while (_local3 < (arguments.length - 1)) {
_local11.push(arguments[_local3]);
_local3++;
}
}
var _local5 = caurina.transitions.TweenListObj.makePropertiesChain(arguments[arguments.length - 1]);
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local17 = (isNaN(_local5.time) ? 0 : (_local5.time));
var _local15 = (isNaN(_local5.delay) ? 0 : (_local5.delay));
var _local7 = new Object();
var _local21 = {time:true, delay:true, useFrames:true, skipUpdates:true, transition:true, onStart:true, onUpdate:true, onComplete:true, onOverwrite:true, rounded:true, onStartParams:true, onUpdateParams:true, onCompleteParams:true, onOverwriteParams:true, quickAdd:true};
var _local10 = new Object();
for (_local4 in _local5) {
if (!_local21[_local4]) {
if (_specialPropertySplitterList[_local4] != undefined) {
var _local9 = _specialPropertySplitterList[_local4].splitValues(_local5[_local4], _specialPropertySplitterList[_local4].parameters);
_local3 = 0;
while (_local3 < _local9.length) {
_local7[_local9[_local3].name] = {valueStart:undefined, valueComplete:_local9[_local3].value};
_local3++;
}
} else if (_specialPropertyModifierList[_local4] != undefined) {
var _local8 = _specialPropertyModifierList[_local4].modifyValues(_local5[_local4]);
_local3 = 0;
while (_local3 < _local8.length) {
_local10[_local8[_local3].name] = {modifierParameters:_local8[_local3].parameters, modifierFunction:_specialPropertyModifierList[_local4].getValue};
_local3++;
}
} else {
_local7[_local4] = {valueStart:undefined, valueComplete:_local5[_local4]};
}
}
}
for (_local4 in _local10) {
if (_local7[_local4] != undefined) {
_local7[_local4].modifierParameters = _local10[_local4].modifierParameters;
_local7[_local4].modifierFunction = _local10[_local4].modifierFunction;
}
}
var _local20;
if (typeof(_local5.transition) == "string") {
var _local22 = _local5.transition.toLowerCase();
_local20 = _transitionList[_local22];
} else {
_local20 = _local5.transition;
}
if (_local20 == undefined) {
_local20 = _transitionList.easeoutexpo;
}
var _local12;
var _local6;
var _local16;
_local3 = 0;
while (_local3 < _local11.length) {
_local12 = new Object();
for (_local4 in _local7) {
_local12[_local4] = new caurina.transitions.PropertyInfoObj(_local7[_local4].valueStart, _local7[_local4].valueComplete, _local7[_local4].modifierFunction, _local7[_local4].modifierParameters);
}
_local6 = new caurina.transitions.TweenListObj(_local11[_local3], _currentTime + ((_local15 * 1000) / _timeScale), _currentTime + (((_local15 * 1000) + (_local17 * 1000)) / _timeScale), _local5.useFrames == true, _local20);
_local6.properties = _local12;
_local6.onStart = _local5.onStart;
_local6.onUpdate = _local5.onUpdate;
_local6.onComplete = _local5.onComplete;
_local6.onOverwrite = _local5.onOverwrite;
_local6.onError = _local5.onError;
_local6.onStartParams = _local5.onStartParams;
_local6.onUpdateParams = _local5.onUpdateParams;
_local6.onCompleteParams = _local5.onCompleteParams;
_local6.onOverwriteParams = _local5.onOverwriteParams;
_local6.rounded = _local5.rounded;
_local6.skipUpdates = _local5.skipUpdates;
if (!_local5.quickAdd) {
removeTweensByTime(_local6.scope, _local6.properties, _local6.timeStart, _local6.timeComplete);
}
_tweenList.push(_local6);
if ((_local17 == 0) && (_local15 == 0)) {
_local16 = _tweenList.length - 1;
updateTweenByIndex(_local16);
removeTweenByIndex(_local16);
}
_local3++;
}
return(true);
}
static function addCaller() {
if ((arguments.length < 2) || (arguments[0] == undefined)) {
return(false);
}
var _local6 = new Array();
var _local5;
var _local12;
if (arguments[0] instanceof Array) {
_local5 = 0;
while (_local5 < arguments[0].length) {
_local6.push(arguments[0][_local5]);
_local5++;
}
} else {
_local5 = 0;
while (_local5 < (arguments.length - 1)) {
_local6.push(arguments[_local5]);
_local5++;
}
}
var _local4 = arguments[arguments.length - 1];
if (!_inited) {
init();
}
if ((!_engineExists) || (_root[getControllerName()] == undefined)) {
startEngine();
}
var _local9 = (isNaN(_local4.time) ? 0 : (_local4.time));
var _local7 = (isNaN(_local4.delay) ? 0 : (_local4.delay));
var _local10;
if (typeof(_local4.transition) == "string") {
var _local11 = _local4.transition.toLowerCase();
_local10 = _transitionList[_local11];
} else {
_local10 = _local4.transition;
}
if (_local10 == undefined) {
_local10 = _transitionList.easeoutexpo;
}
var _local3;
var _local8;
_local5 = 0;
while (_local5 < _local6.length) {
_local3 = new caurina.transitions.TweenListObj(_local6[_local5], _currentTime + ((_local7 * 1000) / _timeScale), _currentTime + (((_local7 * 1000) + (_local9 * 1000)) / _timeScale), _local4.useFrames == true, _local10);
_local3.properties = undefined;
_local3.onStart = _local4.onStart;
_local3.onUpdate = _local4.onUpdate;
_local3.onComplete = _local4.onComplete;
_local3.onOverwrite = _local4.onOverwrite;
_local3.onStartParams = _local4.onStartParams;
_local3.onUpdateParams = _local4.onUpdateParams;
_local3.onCompleteParams = _local4.onCompleteParams;
_local3.onOverwriteParams = _local4.onOverwriteParams;
_local3.isCaller = true;
_local3.count = _local4.count;
_local3.waitFrames = _local4.waitFrames;
_tweenList.push(_local3);
if ((_local9 == 0) && (_local7 == 0)) {
_local8 = _tweenList.length - 1;
updateTweenByIndex(_local8);
removeTweenByIndex(_local8);
}
_local5++;
}
return(true);
}
static function removeTweensByTime(p_scope, p_properties, p_timeStart, p_timeComplete) {
var _local4 = false;
var _local3;
var _local1;
var _local6 = _tweenList.length;
var _local2;
_local1 = 0;
while (_local1 < _local6) {
if (p_scope == _tweenList[_local1].scope) {
if ((p_timeComplete > _tweenList[_local1].timeStart) && (p_timeStart < _tweenList[_local1].timeComplete)) {
_local3 = false;
for (_local2 in _tweenList[_local1].properties) {
if (p_properties[_local2] != undefined) {
if (_tweenList[_local1].onOverwrite != undefined) {
try {
_tweenList[_local1].onOverwrite.apply(_tweenList[_local1].scope, _tweenList[_local1].onOverwriteParams);
} catch(e:Error) {
handleError(_tweenList[_local1], e, "onOverwrite");
}
}
_tweenList[_local1].properties[_local2] = undefined;
delete _tweenList[_local1].properties[_local2];
_local3 = true;
_local4 = true;
}
}
if (_local3) {
if (caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties) == 0) {
removeTweenByIndex(_local1);
}
}
}
}
_local1++;
}
return(_local4);
}
static function removeTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(removeTweenByIndex, p_scope, _local3));
}
static function removeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
removeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function pauseTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(pauseTweenByIndex, p_scope, _local3));
}
static function pauseAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
pauseTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function resumeTweens(p_scope) {
var _local3 = new Array();
var _local2;
_local2 = 1;
while (_local2 < arguments.length) {
if ((typeof(arguments[_local2]) == "string") && (!caurina.transitions.AuxFunctions.isInArray(arguments[_local2], _local3))) {
_local3.push(arguments[_local2]);
}
_local2++;
}
return(affectTweens(resumeTweenByIndex, p_scope, _local3));
}
static function resumeAllTweens() {
var _local2 = false;
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
resumeTweenByIndex(_local1);
_local2 = true;
_local1++;
}
return(_local2);
}
static function affectTweens(p_affectFunction, p_scope, p_properties) {
var _local5 = false;
var _local2;
if (!_tweenList) {
return(false);
}
_local2 = 0;
while (_local2 < _tweenList.length) {
if (_tweenList[_local2].scope == p_scope) {
if (p_properties.length == 0) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local4 = new Array();
var _local1;
_local1 = 0;
while (_local1 < p_properties.length) {
if (_tweenList[_local2].properties[p_properties[_local1]] != undefined) {
_local4.push(p_properties[_local1]);
}
_local1++;
}
if (_local4.length > 0) {
var _local7 = caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local2].properties);
if (_local7 == _local4.length) {
p_affectFunction(_local2);
_local5 = true;
} else {
var _local8 = splitTweens(_local2, _local4);
p_affectFunction(_local8);
_local5 = true;
}
}
}
}
_local2++;
}
return(_local5);
}
static function splitTweens(p_tween, p_properties) {
var _local6 = _tweenList[p_tween];
var _local5 = _local6.clone(false);
var _local1;
var _local2;
_local1 = 0;
while (_local1 < p_properties.length) {
_local2 = p_properties[_local1];
if (_local6.properties[_local2] != undefined) {
_local6.properties[_local2] = undefined;
delete _local6.properties[_local2];
}
_local1++;
}
var _local4;
for (_local2 in _local5.properties) {
_local4 = false;
_local1 = 0;
while (_local1 < p_properties.length) {
if (p_properties[_local1] == _local2) {
_local4 = true;
break;
}
_local1++;
}
if (!_local4) {
_local5.properties[_local2] = undefined;
delete _local5.properties[_local2];
}
}
_tweenList.push(_local5);
return(_tweenList.length - 1);
}
static function updateTweens() {
if (_tweenList.length == 0) {
return(false);
}
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (!_tweenList[_local1].isPaused) {
if (!updateTweenByIndex(_local1)) {
removeTweenByIndex(_local1);
}
if (_tweenList[_local1] == null) {
removeTweenByIndex(_local1, true);
_local1--;
}
}
_local1++;
}
return(true);
}
static function removeTweenByIndex(p_tween, p_finalRemoval) {
_tweenList[p_tween] = null;
if (p_finalRemoval) {
_tweenList.splice(p_tween, 1);
}
return(true);
}
static function pauseTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (_local1.isPaused)) {
return(false);
}
_local1.timePaused = _currentTime;
_local1.isPaused = true;
return(true);
}
static function resumeTweenByIndex(p_tween) {
var _local1 = _tweenList[p_tween];
if ((_local1 == null) || (!_local1.isPaused)) {
return(false);
}
_local1.timeStart = _local1.timeStart + (_currentTime - _local1.timePaused);
_local1.timeComplete = _local1.timeComplete + (_currentTime - _local1.timePaused);
_local1.timePaused = undefined;
_local1.isPaused = false;
return(true);
}
static function updateTweenByIndex(i) {
var _local1 = _tweenList[i];
if ((_local1 == null) || (!_local1.scope)) {
return(false);
}
var _local11 = false;
var _local12;
var _local2;
var _local6;
var _local8;
var _local7;
var _local5;
var _local4;
var _local10;
var _local3;
if (_currentTime >= _local1.timeStart) {
_local10 = _local1.scope;
if (_local1.isCaller) {
do {
_local6 = ((_local1.timeComplete - _local1.timeStart) / _local1.count) * (_local1.timesCalled + 1);
_local8 = _local1.timeStart;
_local7 = _local1.timeComplete - _local1.timeStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, _local8, _local7, _local5);
if (_currentTime >= _local2) {
if (_local1.onUpdate != undefined) {
try {
_local1.onUpdate.apply(_local10, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
_local1.timesCalled++;
if (_local1.timesCalled >= _local1.count) {
_local11 = true;
break;
}
if (_local1.waitFrames) {
break;
}
}
} while (_currentTime >= _local2);
} else {
_local12 = ((_local1.skipUpdates < 1) || (_local1.skipUpdates == undefined)) || (_local1.updatesSkipped >= _local1.skipUpdates);
if (_currentTime >= _local1.timeComplete) {
_local11 = true;
_local12 = true;
}
if (!_local1.hasStarted) {
if (_local1.onStart != undefined) {
try {
_local1.onStart.apply(_local10, _local1.onStartParams);
} catch(e:Error) {
handleError(_local1, e, "onStart");
}
}
for (_local4 in _local1.properties) {
var _local9 = getPropertyValue(_local10, _local4);
_local1.properties[_local4].valueStart = (isNaN(_local9) ? (_local1.properties[_local4].valueComplete) : (_local9));
}
_local12 = true;
_local1.hasStarted = true;
}
if (_local12) {
for (_local4 in _local1.properties) {
_local3 = _local1.properties[_local4];
if (_local11) {
_local2 = _local3.valueComplete;
} else if (_local3.hasModifier) {
_local6 = _currentTime - _local1.timeStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, 0, 1, _local5);
_local2 = _local3.modifierFunction(_local3.valueStart, _local3.valueComplete, _local2, _local3.modifierParameters);
} else {
_local6 = _currentTime - _local1.timeStart;
_local8 = _local3.valueStart;
_local7 = _local3.valueComplete - _local3.valueStart;
_local5 = _local1.timeComplete - _local1.timeStart;
_local2 = _local1.transition(_local6, _local8, _local7, _local5);
}
if (_local1.rounded) {
_local2 = Math.round(_local2);
}
setPropertyValue(_local10, _local4, _local2);
}
_local1.updatesSkipped = 0;
if (_local1.onUpdate != undefined) {
try {
_local1.onUpdate.apply(_local10, _local1.onUpdateParams);
} catch(e:Error) {
handleError(_local1, e, "onUpdate");
}
}
} else {
_local1.updatesSkipped++;
}
}
if (_local11 && (_local1.onComplete != undefined)) {
try {
_local1.onComplete.apply(_local10, _local1.onCompleteParams);
} catch(e:Error) {
handleError(_local1, e, "onComplete");
}
}
return(!_local11);
}
return(true);
}
static function init() {
_inited = true;
_transitionList = new Object();
caurina.transitions.Equations.init();
_specialPropertyList = new Object();
_specialPropertyModifierList = new Object();
_specialPropertySplitterList = new Object();
caurina.transitions.SpecialPropertiesDefault.init();
}
static function registerTransition(p_name, p_function) {
if (!_inited) {
init();
}
_transitionList[p_name] = p_function;
}
static function registerSpecialProperty(p_name, p_getFunction, p_setFunction, p_parameters) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialProperty(p_getFunction, p_setFunction, p_parameters);
_specialPropertyList[p_name] = _local1;
}
static function registerSpecialPropertyModifier(p_name, p_modifyFunction, p_getFunction) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialPropertyModifier(p_modifyFunction, p_getFunction);
_specialPropertyModifierList[p_name] = _local1;
}
static function registerSpecialPropertySplitter(p_name, p_splitFunction, p_parameters) {
if (!_inited) {
init();
}
var _local1 = new caurina.transitions.SpecialPropertySplitter(p_splitFunction, p_parameters);
_specialPropertySplitterList[p_name] = _local1;
}
static function startEngine() {
_engineExists = true;
_tweenList = new Array();
var _local2 = Math.floor(Math.random() * 999999);
var _local3 = _root.createEmptyMovieClip(getControllerName(), 31338 + _local2);
_local3.onEnterFrame = function () {
caurina.transitions.Tweener.onEnterFrame();
};
updateTime();
}
static function stopEngine() {
_engineExists = false;
_tweenList = null;
_currentTime = 0;
delete _root[getControllerName()].onEnterFrame;
_root[getControllerName()].removeMovieClip();
}
static function getPropertyValue(p_obj, p_prop) {
if (_specialPropertyList[p_prop] != undefined) {
return(_specialPropertyList[p_prop].getValue(p_obj, _specialPropertyList[p_prop].parameters));
}
return(p_obj[p_prop]);
}
static function setPropertyValue(p_obj, p_prop, p_value) {
if (_specialPropertyList[p_prop] != undefined) {
_specialPropertyList[p_prop].setValue(p_obj, p_value, _specialPropertyList[p_prop].parameters);
} else {
p_obj[p_prop] = p_value;
}
}
static function updateTime() {
_currentTime = getTimer();
}
static function onEnterFrame() {
updateTime();
var _local1 = false;
_local1 = updateTweens();
if (!_local1) {
stopEngine();
}
}
static function setTimeScale(p_time) {
var _local1;
if (isNaN(p_time)) {
p_time = 1;
}
if (p_time < 1E-5) {
p_time = 1E-5;
}
if (p_time != _timeScale) {
_local1 = 0;
while (_local1 < _tweenList.length) {
_tweenList[_local1].timeStart = _currentTime - (((_currentTime - _tweenList[_local1].timeStart) * _timeScale) / p_time);
_tweenList[_local1].timeComplete = _currentTime - (((_currentTime - _tweenList[_local1].timeComplete) * _timeScale) / p_time);
if (_tweenList[_local1].timePaused != undefined) {
_tweenList[_local1].timePaused = _currentTime - (((_currentTime - _tweenList[_local1].timePaused) * _timeScale) / p_time);
}
_local1++;
}
_timeScale = p_time;
}
}
static function isTweening(p_scope) {
var _local1;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
return(true);
}
_local1++;
}
return(false);
}
static function getTweens(p_scope) {
var _local1;
var _local2;
var _local3 = new Array();
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
for (_local2 in _tweenList[_local1].properties) {
_local3.push(_local2);
}
}
_local1++;
}
return(_local3);
}
static function getTweenCount(p_scope) {
var _local1;
var _local2 = 0;
_local1 = 0;
while (_local1 < _tweenList.length) {
if (_tweenList[_local1].scope == p_scope) {
_local2 = _local2 + caurina.transitions.AuxFunctions.getObjectLength(_tweenList[_local1].properties);
}
_local1++;
}
return(_local2);
}
static function handleError(pTweening, pError, pCallBackName) {
if ((pTweening.onError != undefined) && (typeof(pTweening.onError == "function"))) {
try {
pTweening.onError.apply(pTweening.scope, [pTweening.scope, pError]);
} catch(metaError:Error) {
trace((((("## [Tweener] Error: " + pTweening.scope.toString()) + " raised an error while executing the 'onError' handler. Original error:\n ") + pError) + "\nonError error: ") + metaError);
}
} else if (pTweening.onError == undefined) {
trace((((("## [Tweener] Error: " + pTweening.scope.toString()) + " raised an error while executing the '") + pCallBackName.toString()) + "'handler. \n") + pError);
}
}
static function getVersion() {
return("AS2 1.26.62");
}
static function getControllerName() {
return("__tweener_controller__" + getVersion());
}
static function debug_getList() {
var _local3 = "";
var _local1;
var _local2;
_local1 = 0;
while (_local1 < _tweenList.length) {
_local3 = _local3 + (("[" + _local1) + "] ::\n");
for (_local2 in _tweenList[_local1].properties) {
_local3 = _local3 + ((((" " + _local2) + " -> ") + _tweenList[_local1].properties[_local2].valueComplete) + newline);
}
_local1++;
}
return(_local3);
}
static var _engineExists = false;
static var _inited = false;
static var _timeScale = 1;
}
Symbol 815 MovieClip [__Packages.caurina.transitions.TweenListObj] Frame 0
class caurina.transitions.TweenListObj
{
var scope, timeStart, timeComplete, useFrames, transition, auxProperties, properties, isPaused, timePaused, isCaller, updatesSkipped, timesCalled, skipUpdates, hasStarted, onStart, onUpdate, onComplete, onOverwrite, onError, onStartParams, onUpdateParams, onCompleteParams, onOverwriteParams, rounded, count, waitFrames;
function TweenListObj (p_scope, p_timeStart, p_timeComplete, p_useFrames, p_transition) {
scope = p_scope;
timeStart = p_timeStart;
timeComplete = p_timeComplete;
useFrames = p_useFrames;
transition = p_transition;
auxProperties = new Object();
properties = new Object();
isPaused = false;
timePaused = undefined;
isCaller = false;
updatesSkipped = 0;
timesCalled = 0;
skipUpdates = 0;
hasStarted = false;
}
function clone(omitEvents) {
var _local2 = new caurina.transitions.TweenListObj(scope, timeStart, timeComplete, useFrames, transition);
_local2.properties = new Object();
for (var _local3 in properties) {
_local2.properties[_local3] = properties[_local3].clone();
}
_local2.skipUpdates = skipUpdates;
_local2.updatesSkipped = updatesSkipped;
if (!omitEvents) {
_local2.onStart = onStart;
_local2.onUpdate = onUpdate;
_local2.onComplete = onComplete;
_local2.onOverwrite = onOverwrite;
_local2.onError = onError;
_local2.onStartParams = onStartParams;
_local2.onUpdateParams = onUpdateParams;
_local2.onCompleteParams = onCompleteParams;
_local2.onOverwriteParams = onOverwriteParams;
}
_local2.rounded = rounded;
_local2.isPaused = isPaused;
_local2.timePaused = timePaused;
_local2.isCaller = isCaller;
_local2.count = count;
_local2.timesCalled = timesCalled;
_local2.waitFrames = waitFrames;
_local2.hasStarted = hasStarted;
return(_local2);
}
function toString() {
var _local2 = "\n[TweenListObj ";
_local2 = _local2 + ("scope:" + String(scope));
_local2 = _local2 + ", properties:";
var _local3 = true;
for (var _local4 in properties) {
if (!_local3) {
_local2 = _local2 + ",";
}
_local2 = _local2 + ("[name:" + properties[_local4].name);
_local2 = _local2 + (",valueStart:" + properties[_local4].valueStart);
_local2 = _local2 + (",valueComplete:" + properties[_local4].valueComplete);
_local2 = _local2 + "]";
_local3 = false;
}
_local2 = _local2 + (", timeStart:" + String(timeStart));
_local2 = _local2 + (", timeComplete:" + String(timeComplete));
_local2 = _local2 + (", useFrames:" + String(useFrames));
_local2 = _local2 + (", transition:" + String(transition));
if (skipUpdates) {
_local2 = _local2 + (", skipUpdates:" + String(skipUpdates));
}
if (updatesSkipped) {
_local2 = _local2 + (", updatesSkipped:" + String(updatesSkipped));
}
if (onStart) {
_local2 = _local2 + (", onStart:" + String(onStart));
}
if (onUpdate) {
_local2 = _local2 + (", onUpdate:" + String(onUpdate));
}
if (onComplete) {
_local2 = _local2 + (", onComplete:" + String(onComplete));
}
if (onOverwrite) {
_local2 = _local2 + (", onOverwrite:" + String(onOverwrite));
}
if (onError) {
_local2 = _local2 + (", onError:" + String(onError));
}
if (onStartParams) {
_local2 = _local2 + (", onStartParams:" + String(onStartParams));
}
if (onUpdateParams) {
_local2 = _local2 + (", onUpdateParams:" + String(onUpdateParams));
}
if (onCompleteParams) {
_local2 = _local2 + (", onCompleteParams:" + String(onCompleteParams));
}
if (onOverwriteParams) {
_local2 = _local2 + (", onOverwriteParams:" + String(onOverwriteParams));
}
if (rounded) {
_local2 = _local2 + (", rounded:" + String(rounded));
}
if (isPaused) {
_local2 = _local2 + (", isPaused:" + String(isPaused));
}
if (timePaused) {
_local2 = _local2 + (", timePaused:" + String(timePaused));
}
if (isCaller) {
_local2 = _local2 + (", isCaller:" + String(isCaller));
}
if (count) {
_local2 = _local2 + (", count:" + String(count));
}
if (timesCalled) {
_local2 = _local2 + (", timesCalled:" + String(timesCalled));
}
if (waitFrames) {
_local2 = _local2 + (", waitFrames:" + String(waitFrames));
}
if (hasStarted) {
_local2 = _local2 + (", hasStarted:" + String(hasStarted));
}
_local2 = _local2 + "]\n";
return(_local2);
}
static function makePropertiesChain(p_obj) {
var _local6 = p_obj.base;
if (_local6) {
var _local5 = {};
var _local2;
if (_local6 instanceof Array) {
_local2 = [];
var _local3 = 0;
while (_local3 < _local6.length) {
_local2.push(_local6[_local3]);
_local3++;
}
} else {
_local2 = [_local6];
}
_local2.push(p_obj);
var _local4;
var _local7 = _local2.length;
var _local1 = 0;
while (_local1 < _local7) {
if (_local2[_local1].base) {
_local4 = caurina.transitions.AuxFunctions.concatObjects(makePropertiesChain(_local2[_local1].base), _local2[_local1]);
} else {
_local4 = _local2[_local1];
}
_local5 = caurina.transitions.AuxFunctions.concatObjects(_local5, _local4);
_local1++;
}
if (_local5.base) {
delete _local5.base;
}
return(_local5);
}
return(p_obj);
}
}
Symbol 816 MovieClip [__Packages.caurina.transitions.AuxFunctions] Frame 0
class caurina.transitions.AuxFunctions
{
function AuxFunctions () {
}
static function numberToR(p_num) {
return((p_num & 16711680) >> 16);
}
static function numberToG(p_num) {
return((p_num & 65280) >> 8);
}
static function numberToB(p_num) {
return(p_num & 255);
}
static function isInArray(p_string, p_array) {
var _local2 = p_array.length;
var _local1 = 0;
while (_local1 < _local2) {
if (p_array[_local1] == p_string) {
return(true);
}
_local1++;
}
return(false);
}
static function getObjectLength(p_object) {
var _local1 = 0;
for (var _local2 in p_object) {
_local1++;
}
return(_local1);
}
static function concatObjects() {
var _local4 = {};
var _local2;
var _local3 = 0;
while (_local3 < arguments.length) {
_local2 = arguments[_local3];
for (var _local5 in _local2) {
if (_local2[_local5] == null) {
delete _local4[_local5];
} else {
_local4[_local5] = _local2[_local5];
}
}
_local3++;
}
return(_local4);
}
}
Symbol 817 MovieClip [__Packages.caurina.transitions.PropertyInfoObj] Frame 0
class caurina.transitions.PropertyInfoObj
{
var valueStart, valueComplete, hasModifier, modifierFunction, modifierParameters;
function PropertyInfoObj (p_valueStart, p_valueComplete, p_modifierFunction, p_modifierParameters) {
valueStart = p_valueStart;
valueComplete = p_valueComplete;
hasModifier = p_modifierFunction != undefined;
modifierFunction = p_modifierFunction;
modifierParameters = p_modifierParameters;
}
function clone() {
var _local2 = new caurina.transitions.PropertyInfoObj(valueStart, valueComplete, modifierFunction, modifierParameters);
return(_local2);
}
function toString() {
var _local2 = "\n[PropertyInfoObj ";
_local2 = _local2 + ("valueStart:" + String(valueStart));
_local2 = _local2 + ", ";
_local2 = _local2 + ("valueComplete:" + String(valueComplete));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierFunction:" + String(modifierFunction));
_local2 = _local2 + ", ";
_local2 = _local2 + ("modifierParameters:" + String(modifierParameters));
_local2 = _local2 + "]\n";
return(_local2);
}
}
Symbol 818 MovieClip [__Packages.caurina.transitions.Equations] Frame 0
class caurina.transitions.Equations
{
function Equations () {
trace("Equations is a static class and should not be instantiated.");
}
static function init() {
caurina.transitions.Tweener.registerTransition("easenone", easeNone);
caurina.transitions.Tweener.registerTransition("linear", easeNone);
caurina.transitions.Tweener.registerTransition("easeinquad", easeInQuad);
caurina.transitions.Tweener.registerTransition("easeoutquad", easeOutQuad);
caurina.transitions.Tweener.registerTransition("easeinoutquad", easeInOutQuad);
caurina.transitions.Tweener.registerTransition("easeoutinquad", easeOutInQuad);
caurina.transitions.Tweener.registerTransition("easeincubic", easeInCubic);
caurina.transitions.Tweener.registerTransition("easeoutcubic", easeOutCubic);
caurina.transitions.Tweener.registerTransition("easeinoutcubic", easeInOutCubic);
caurina.transitions.Tweener.registerTransition("easeoutincubic", easeOutInCubic);
caurina.transitions.Tweener.registerTransition("easeinquart", easeInQuart);
caurina.transitions.Tweener.registerTransition("easeoutquart", easeOutQuart);
caurina.transitions.Tweener.registerTransition("easeinoutquart", easeInOutQuart);
caurina.transitions.Tweener.registerTransition("easeoutinquart", easeOutInQuart);
caurina.transitions.Tweener.registerTransition("easeinquint", easeInQuint);
caurina.transitions.Tweener.registerTransition("easeoutquint", easeOutQuint);
caurina.transitions.Tweener.registerTransition("easeinoutquint", easeInOutQuint);
caurina.transitions.Tweener.registerTransition("easeoutinquint", easeOutInQuint);
caurina.transitions.Tweener.registerTransition("easeinsine", easeInSine);
caurina.transitions.Tweener.registerTransition("easeoutsine", easeOutSine);
caurina.transitions.Tweener.registerTransition("easeinoutsine", easeInOutSine);
caurina.transitions.Tweener.registerTransition("easeoutinsine", easeOutInSine);
caurina.transitions.Tweener.registerTransition("easeincirc", easeInCirc);
caurina.transitions.Tweener.registerTransition("easeoutcirc", easeOutCirc);
caurina.transitions.Tweener.registerTransition("easeinoutcirc", easeInOutCirc);
caurina.transitions.Tweener.registerTransition("easeoutincirc", easeOutInCirc);
caurina.transitions.Tweener.registerTransition("easeinexpo", easeInExpo);
caurina.transitions.Tweener.registerTransition("easeoutexpo", easeOutExpo);
caurina.transitions.Tweener.registerTransition("easeinoutexpo", easeInOutExpo);
caurina.transitions.Tweener.registerTransition("easeoutinexpo", easeOutInExpo);
caurina.transitions.Tweener.registerTransition("easeinelastic", easeInElastic);
caurina.transitions.Tweener.registerTransition("easeoutelastic", easeOutElastic);
caurina.transitions.Tweener.registerTransition("easeinoutelastic", easeInOutElastic);
caurina.transitions.Tweener.registerTransition("easeoutinelastic", easeOutInElastic);
caurina.transitions.Tweener.registerTransition("easeinback", easeInBack);
caurina.transitions.Tweener.registerTransition("easeoutback", easeOutBack);
caurina.transitions.Tweener.registerTransition("easeinoutback", easeInOutBack);
caurina.transitions.Tweener.registerTransition("easeoutinback", easeOutInBack);
caurina.transitions.Tweener.registerTransition("easeinbounce", easeInBounce);
caurina.transitions.Tweener.registerTransition("easeoutbounce", easeOutBounce);
caurina.transitions.Tweener.registerTransition("easeinoutbounce", easeInOutBounce);
caurina.transitions.Tweener.registerTransition("easeoutinbounce", easeOutInBounce);
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeOutInQuad(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuad(t * 2, b, c / 2, d));
}
return(easeInQuad((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutCubic(t * 2, b, c / 2, d));
}
return(easeInCubic((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuart(t * 2, b, c / 2, d));
}
return(easeInQuart((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutQuint(t * 2, b, c / 2, d));
}
return(easeInQuint((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutSine(t * 2, b, c / 2, d));
}
return(easeInSine((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : (((c * Math.pow(2, 10 * ((t / d) - 1))) + b) - (c * 0.001))));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : (((c * 1.001) * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * Math.pow(2, 10 * (t - 1))) + b) - (c * 0.0005));
}
t--;
return((((c / 2) * 1.0005) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutExpo(t * 2, b, c / 2, d));
}
return(easeInExpo((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutCirc(t * 2, b, c / 2, d));
}
return(easeInCirc((t * 2) - d, b + (c / 2), c / 2, d));
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
if (t < (d / 2)) {
return(easeOutElastic(t * 2, b, c / 2, d, a, p));
}
return(easeInElastic((t * 2) - d, b + (c / 2), c / 2, d, a, p));
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (t < (d / 2)) {
return(easeOutBack(t * 2, b, c / 2, d, s));
}
return(easeInBack((t * 2) - d, b + (c / 2), c / 2, d, s));
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return(easeOutBounce(t * 2, b, c / 2, d));
}
return(easeInBounce((t * 2) - d, b + (c / 2), c / 2, d));
}
}
Symbol 819 MovieClip [__Packages.caurina.transitions.SpecialPropertiesDefault] Frame 0
class caurina.transitions.SpecialPropertiesDefault
{
function SpecialPropertiesDefault () {
trace("SpecialProperties is an static class and should not be instantiated.");
}
static function init() {
caurina.transitions.Tweener.registerSpecialProperty("_frame", _frame_get, _frame_set);
caurina.transitions.Tweener.registerSpecialProperty("_sound_volume", _sound_volume_get, _sound_volume_set);
caurina.transitions.Tweener.registerSpecialProperty("_sound_pan", _sound_pan_get, _sound_pan_set);
caurina.transitions.Tweener.registerSpecialProperty("_color_ra", _color_property_get, _color_property_set, ["ra"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_rb", _color_property_get, _color_property_set, ["rb"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_ga", _color_property_get, _color_property_set, ["ga"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_gb", _color_property_get, _color_property_set, ["gb"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_ba", _color_property_get, _color_property_set, ["ba"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_bb", _color_property_get, _color_property_set, ["bb"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_aa", _color_property_get, _color_property_set, ["aa"]);
caurina.transitions.Tweener.registerSpecialProperty("_color_ab", _color_property_get, _color_property_set, ["ab"]);
caurina.transitions.Tweener.registerSpecialProperty("_autoAlpha", _autoAlpha_get, _autoAlpha_set);
caurina.transitions.Tweener.registerSpecialPropertySplitter("_color", _color_splitter);
caurina.transitions.Tweener.registerSpecialPropertySplitter("_colorTransform", _colorTransform_splitter);
caurina.transitions.Tweener.registerSpecialPropertySplitter("_scale", _scale_splitter);
caurina.transitions.Tweener.registerSpecialProperty("_blur_blurX", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "blurX"]);
caurina.transitions.Tweener.registerSpecialProperty("_blur_blurY", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "blurY"]);
caurina.transitions.Tweener.registerSpecialProperty("_blur_quality", _filter_property_get, _filter_property_set, [flash.filters.BlurFilter, "quality"]);
caurina.transitions.Tweener.registerSpecialPropertySplitter("_filter", _filter_splitter);
caurina.transitions.Tweener.registerSpecialPropertyModifier("_bezier", _bezier_modifier, _bezier_get);
}
static function _color_splitter(p_value) {
var _local1 = new Array();
if (p_value == null) {
_local1.push({name:"_color_ra", value:100});
_local1.push({name:"_color_rb", value:0});
_local1.push({name:"_color_ga", value:100});
_local1.push({name:"_color_gb", value:0});
_local1.push({name:"_color_ba", value:100});
_local1.push({name:"_color_bb", value:0});
} else {
_local1.push({name:"_color_ra", value:0});
_local1.push({name:"_color_rb", value:caurina.transitions.AuxFunctions.numberToR(p_value)});
_local1.push({name:"_color_ga", value:0});
_local1.push({name:"_color_gb", value:caurina.transitions.AuxFunctions.numberToG(p_value)});
_local1.push({name:"_color_ba", value:0});
_local1.push({name:"_color_bb", value:caurina.transitions.AuxFunctions.numberToB(p_value)});
}
return(_local1);
}
static function _colorTransform_splitter(p_value) {
var _local2 = new Array();
if (p_value == null) {
_local2.push({name:"_color_ra", value:100});
_local2.push({name:"_color_rb", value:0});
_local2.push({name:"_color_ga", value:100});
_local2.push({name:"_color_gb", value:0});
_local2.push({name:"_color_ba", value:100});
_local2.push({name:"_color_bb", value:0});
} else {
if (p_value.ra != undefined) {
_local2.push({name:"_color_ra", value:p_value.ra});
}
if (p_value.rb != undefined) {
_local2.push({name:"_color_rb", value:p_value.rb});
}
if (p_value.ga != undefined) {
_local2.push({name:"_color_ba", value:p_value.ba});
}
if (p_value.gb != undefined) {
_local2.push({name:"_color_bb", value:p_value.bb});
}
if (p_value.ba != undefined) {
_local2.push({name:"_color_ga", value:p_value.ga});
}
if (p_value.bb != undefined) {
_local2.push({name:"_color_gb", value:p_value.gb});
}
if (p_value.aa != undefined) {
_local2.push({name:"_color_aa", value:p_value.aa});
}
if (p_value.ab != undefined) {
_local2.push({name:"_color_ab", value:p_value.ab});
}
}
return(_local2);
}
static function _scale_splitter(p_value) {
var _local1 = new Array();
_local1.push({name:"_xscale", value:p_value});
_local1.push({name:"_yscale", value:p_value});
return(_local1);
}
static function _filter_splitter(p_value) {
var _local1 = new Array();
if (p_value instanceof flash.filters.BlurFilter) {
_local1.push({name:"_blur_blurX", value:flash.filters.BlurFilter(p_value).blurX});
_local1.push({name:"_blur_blurY", value:flash.filters.BlurFilter(p_value).blurY});
_local1.push({name:"_blur_quality", value:flash.filters.BlurFilter(p_value).quality});
} else {
trace("??");
}
return(_local1);
}
static function _frame_get(p_obj) {
return(p_obj._currentFrame);
}
static function _frame_set(p_obj, p_value) {
p_obj.gotoAndStop(Math.round(p_value));
}
static function _sound_volume_get(p_obj) {
return(p_obj.getVolume());
}
static function _sound_volume_set(p_obj, p_value) {
p_obj.setVolume(p_value);
}
static function _sound_pan_get(p_obj) {
return(p_obj.getPan());
}
static function _sound_pan_set(p_obj, p_value) {
p_obj.setPan(p_value);
}
static function _color_property_get(p_obj, p_parameters) {
return(new Color(p_obj).getTransform()[p_parameters[0]]);
}
static function _color_property_set(p_obj, p_value, p_parameters) {
var _local1 = new Object();
_local1[p_parameters[0]] = Math.round(p_value);
new Color(p_obj).setTransform(_local1);
}
static function _autoAlpha_get(p_obj) {
return(p_obj._alpha);
}
static function _autoAlpha_set(p_obj, p_value) {
p_obj._alpha = p_value;
p_obj._visible = p_value > 0;
}
static function _filter_property_get(p_obj, p_parameters) {
var _local2 = p_obj.filters;
var _local1;
var _local4 = p_parameters[0];
var _local3 = p_parameters[1];
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] instanceof _local4) {
return(_local2[_local1][_local3]);
}
_local1++;
}
var _local5;
if (!(_local4 === flash.filters.BlurFilter)) {
} else {
_local5 = {blurX:0, blurY:0, quality:NaN};
}
return(_local5[_local3]);
}
static function _filter_property_set(p_obj, p_value, p_parameters) {
var _local2 = p_obj.filters;
var _local1;
var _local4 = p_parameters[0];
var _local3 = p_parameters[1];
_local1 = 0;
while (_local1 < _local2.length) {
if (_local2[_local1] instanceof _local4) {
_local2[_local1][_local3] = p_value;
p_obj.filters = _local2;
return(undefined);
}
_local1++;
}
if (_local2 == undefined) {
_local2 = new Array();
}
var _local7;
if (!(_local4 === flash.filters.BlurFilter)) {
} else {
_local7 = new flash.filters.BlurFilter(0, 0);
}
_local7[_local3] = p_value;
_local2.push(_local7);
p_obj.filters = _local2;
}
static function _bezier_modifier(p_obj) {
var _local7 = [];
var _local4;
if (p_obj instanceof Array) {
_local4 = p_obj.concat();
} else {
_local4 = [p_obj];
}
var _local3;
var _local1;
var _local2 = {};
_local3 = 0;
while (_local3 < _local4.length) {
for (_local1 in _local4[_local3]) {
if (_local2[_local1] == undefined) {
_local2[_local1] = [];
}
_local2[_local1].push(_local4[_local3][_local1]);
}
_local3++;
}
for (_local1 in _local2) {
_local7.push({name:_local1, parameters:_local2[_local1]});
}
return(_local7);
}
static function _bezier_get(b, e, t, p) {
if (p.length == 1) {
return(b + (t * (((2 * (1 - t)) * (p[0] - b)) + (t * (e - b)))));
}
var _local2 = Math.floor(t * p.length);
var _local5 = (t - (_local2 * (1 / p.length))) * p.length;
var _local3;
var _local6;
if (_local2 == 0) {
_local3 = b;
_local6 = (p[0] + p[1]) / 2;
} else if (_local2 == (p.length - 1)) {
_local3 = (p[_local2 - 1] + p[_local2]) / 2;
_local6 = e;
} else {
_local3 = (p[_local2 - 1] + p[_local2]) / 2;
_local6 = (p[_local2] + p[_local2 + 1]) / 2;
}
return(_local3 + (_local5 * (((2 * (1 - _local5)) * (p[_local2] - _local3)) + (_local5 * (_local6 - _local3)))));
}
}
Symbol 820 MovieClip [__Packages.caurina.transitions.SpecialProperty] Frame 0
class caurina.transitions.SpecialProperty
{
var parameters;
function SpecialProperty (p_getFunction, p_setFunction, p_parameters) {
getValue = p_getFunction;
setValue = p_setFunction;
parameters = p_parameters;
}
function getValue(p_obj, p_parameters) {
return(null);
}
function setValue(p_obj, p_value, p_parameters) {
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialProperty ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("setValue:" + setValue.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 821 MovieClip [__Packages.caurina.transitions.SpecialPropertyModifier] Frame 0
class caurina.transitions.SpecialPropertyModifier
{
var modifyValues, getValue;
function SpecialPropertyModifier (p_modifyFunction, p_getFunction) {
modifyValues = p_modifyFunction;
getValue = p_getFunction;
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertyModifier ";
_local2 = _local2 + ("modifyValues:" + modifyValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("getValue:" + getValue.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 822 MovieClip [__Packages.caurina.transitions.SpecialPropertySplitter] Frame 0
class caurina.transitions.SpecialPropertySplitter
{
var parameters;
function SpecialPropertySplitter (p_splitFunction, p_parameters) {
splitValues = p_splitFunction;
parameters = p_parameters;
}
function splitValues(p_value, p_parameters) {
return([]);
}
function toString() {
var _local2 = "";
_local2 = _local2 + "[SpecialPropertySplitter ";
_local2 = _local2 + ("splitValues:" + splitValues.toString());
_local2 = _local2 + ", ";
_local2 = _local2 + ("parameters:" + parameters.toString());
_local2 = _local2 + "]";
return(_local2);
}
}
Symbol 823 MovieClip [__Packages.Regalo] Frame 0
class Regalo extends MovieClip
{
var hitTest, removeMovieClip;
function Regalo () {
super();
trace("regalo creado");
}
function onEnterFrame() {
}
function chequearColision() {
colisiona = false;
var _local3 = 0;
while (_local3 < _root.casas.length) {
tmpCasa = _root.casas[_local3];
if (hitTest(tmpCasa.colision)) {
colisiona = true;
casaColisionada = tmpCasa;
tmpCasa.acertar();
}
_local3++;
}
removeMovieClip();
}
}
Symbol 106 MovieClip Frame 1
stop();
Symbol 132 Button
on (release) {
gotoAndPlay ("level");
stopAllSounds();
}
Symbol 135 Button
on (release) {
getURL ("http://cerebralgames.com");
}
Symbol 138 Button
on (release) {
gotoAndStop ("credits");
}
Symbol 153 MovieClip Frame 10
stop();
Symbol 155 Button
on (release) {
getURL ("http://cerebralgames.com");
}
Symbol 167 Button
on (release) {
_root.gotoPlay();
_root.btnPlay._visible = false;
linea._visible = false;
_root.finishTutorial(0);
}
Symbol 171 Button
on (release) {
_root.gotoPlay();
_root.btnPlay._visible = false;
linea._visible = false;
}
Symbol 174 Button
on (release) {
_root.gotoPlay();
_root.btnPlay._visible = false;
linea._visible = false;
_root.finishTutorial(6);
}
Symbol 192 MovieClip Frame 1
gotoAndStop(_root.level + 1);
Symbol 199 Button
on (press) {
this.startDrag();
this.isDragging = true;
_root.moveCannonSound.start(0, 2);
}
on (release) {
this.stopDrag();
this.isDragging = false;
_root.moveCannonSound.stop("moveCannon");
_root.finishTutorial(2);
_root.showTutorialStep(3);
}
Symbol 201 MovieClip Frame 1
var isDragging = false;
var totalPos = 84;
var actualPos;
var minFrame = 1;
var maxFrame = 57;
var totalFrames2 = (maxFrame - minFrame);
var actualFrame = 15;
onEnterFrame = function () {
if (this._y != 315) {
this._y = 315;
}
if (this._x < 398) {
this._x = 398;
}
if (this._x > 482) {
this._x = 482;
}
actualPos = Math.abs(Math.round(398 - this._x));
actualFrame = Math.round((actualPos * totalFrames2) / totalPos) + 1;
_root.cannon.gotoAndStop(_root.cannon._currentframe + Math.round((actualFrame - _root.cannon._currentframe) / 3));
};
Symbol 205 Button
on (press) {
if (_root.inGame) {
_root.iniciarBarra();
}
}
on (release) {
if (_root.inGame) {
if (_root.cannonRegalo > 0) {
_root.disparar();
} else {
_root.sumandoPower = false;
}
_root.finishTutorial(3);
}
}
on (rollOut, dragOut) {
_root.sumandoPower = false;
}
Symbol 208 MovieClip Frame 1
_rotation = (random(90) - 45);
Symbol 221 MovieClip Frame 1
onEnterFrame = function () {
this.gotoAndStop(_root.cannonRegalo + 1);
};
Symbol 231 MovieClip Frame 1
function blink() {
this._visible = !this._visible;
}
var minX = 50;
var maxX = 540;
var difX = (maxX - minX);
var posX = 0;
var minY = 240;
var maxY = 90;
var difY = (maxY - minY);
var posY = 0;
stop();
onEnterFrame = function () {
if (_root._currentframe < 29) {
this._visible = false;
} else {
this._visible = true;
}
if (_root.level == 2) {
this._visible = true;
if (_root._currentframe > 29) {
this.gotoAndStop(2);
}
}
if (_root.level > 2) {
this.gotoAndStop(2);
}
posX = Math.round((_root.slider.actualPos * difX) / 84) + minX;
posY = Math.round((_root.power * difY) / 100) + minY;
this._x = this._x + ((posX - this._x) / 2);
this._y = posY;
};
Symbol 237 MovieClip Frame 1
stop();
Symbol 237 MovieClip Frame 15
stop();
Instance of Symbol 298 MovieClip in Symbol 300 MovieClip Frame 1
onClipEvent (enterFrame) {
this._yscale = _root.power;
}
Symbol 305 MovieClip Frame 28
stop();
Symbol 306 MovieClip Frame 1
stop();
Symbol 306 MovieClip Frame 2
stop();
Symbol 306 MovieClip Frame 3
stop();
Symbol 306 MovieClip Frame 4
stop();
Symbol 306 MovieClip Frame 5
stop();
Symbol 306 MovieClip Frame 6
stop();
Symbol 306 MovieClip Frame 7
stop();
Symbol 306 MovieClip Frame 8
stop();
Symbol 306 MovieClip Frame 9
stop();
Symbol 306 MovieClip Frame 10
stop();
Symbol 306 MovieClip Frame 11
stop();
Symbol 378 MovieClip Frame 1
onEnterFrame = function () {
gotoAndStop(_root.pickedRegalo);
};
Symbol 385 MovieClip Frame 14
_root.fixSantaPos();
Symbol 385 MovieClip Frame 23
stop();
_root.walkToCannon();
Symbol 440 MovieClip Frame 1
stop();
Symbol 444 MovieClip Frame 45
stop();
_visible = false;
Symbol 623 MovieClip Frame 25
gotoAndPlay ("run");
Symbol 623 MovieClip Frame 53
gotoAndPlay ("stand");
Symbol 623 MovieClip Frame 93
gotoAndPlay ("hide2");
Symbol 623 MovieClip Frame 111
gotoAndPlay ("hide2");
Symbol 623 MovieClip Frame 177
gotoAndPlay ("run");
Symbol 639 Button
on (release) {
if (_root.santaEnabled) {
_root.lastClickedRegalo = tipo;
_root.waktToTarget(this._x + 36, 2);
}
}
Instance of Symbol 686 MovieClip in Symbol 687 MovieClip Frame 1
onClipEvent (enterFrame) {
_x = (_x - 0.8);
if (_x <= 12) {
_x = 447;
}
}
Symbol 713 Button
on (release) {
_root.level++;
gotoAndPlay ("level");
}
Symbol 748 Button
on (release) {
_root.retriesLeft--;
gotoAndPlay ("level");
}
Symbol 764 Button
on (release) {
gotoAndPlay ("menu");
}
Symbol 787 Button
on (release) {
getURL ("http://cerebralgames.com");
}
Symbol 791 Button
on (release) {
_root.gotoAndPlay("menu");
}