Combined Code
movieClip 17 {
}
// unknown tag 88 length 197
movieClip 23 entry_mc {
}
movieClip 27 {
}
movieClip 28 cono {
}
frame 1 {
function bitAND(a, b) {
if (a < 0 && b < 0) {
var v3 = a & 1 & (b & 1);
var v4 = a >>> 1 & b >>> 1;
return v4 << 1 | v3;
} else {
return a & b;
}
}
function rhex(num) {
str = '';
j = 0;
while (j <= 3) {
str += hex_chr.charAt(bitAND(num >> j * 8 + 4, 15)) + hex_chr.charAt(bitAND(num >> j * 8, 15));
++j;
}
return str;
}
function str2blks_MD5(str) {
nblk = (str.length + 8 >> 6) + 1;
blks = new Array(nblk * 16);
i = 0;
while (i < nblk * 16) {
blks[i] = 0;
++i;
}
i = 0;
while (i < str.length) {
blks[i >> 2] |= str.charCodeAt(i) << (i % 4) * 8;
++i;
}
blks[i >> 2] |= 128 << (i % 4) * 8;
blks[nblk * 16 - 2] = str.length * 8;
return blks;
}
function addme(x, y) {
var v1 = bitAND(x, 65535) + bitAND(y, 65535);
var v2 = (x >> 16) + (y >> 16) + (v1 >> 16);
return v2 << 16 | bitAND(v1, 65535);
}
function rol(num, cnt) {
return num << cnt | num >>> 32 - cnt;
}
function cmn(q, a, b, x, s, t) {
return addme(rol(addme(addme(a, q), addme(x, t)), s), b);
}
function ff(a, b, c, d, x, s, t) {
return cmn(bitAND(b, c) | bitAND(~b, d), a, b, x, s, t);
}
function gg(a, b, c, d, x, s, t) {
return cmn(bitAND(b, d) | bitAND(c, ~d), a, b, x, s, t);
}
function hh(a, b, c, d, x, s, t) {
return cmn(b ^ c ^ d, a, b, x, s, t);
}
function ii(a, b, c, d, x, s, t) {
return cmn(c ^ (b | ~d), a, b, x, s, t);
}
var hex_chr = '0123456789abcdef';
String.prototype.MD5 = function () {
var v2 = this;
x = str2blks_MD5(v2);
a = 1732584193;
b = -271733879;
c = -1732584194;
d = 271733878;
i = 0;
while (i < x.length) {
olda = a;
oldb = b;
oldc = c;
oldd = d;
a = ff(a, b, c, d, x[i + 0], 7, -680876936);
d = ff(d, a, b, c, x[i + 1], 12, -389564586);
c = ff(c, d, a, b, x[i + 2], 17, 606105819);
b = ff(b, c, d, a, x[i + 3], 22, -1044525330);
a = ff(a, b, c, d, x[i + 4], 7, -176418897);
d = ff(d, a, b, c, x[i + 5], 12, 1200080426);
c = ff(c, d, a, b, x[i + 6], 17, -1473231341);
b = ff(b, c, d, a, x[i + 7], 22, -45705983);
a = ff(a, b, c, d, x[i + 8], 7, 1770035416);
d = ff(d, a, b, c, x[i + 9], 12, -1958414417);
c = ff(c, d, a, b, x[i + 10], 17, -42063);
b = ff(b, c, d, a, x[i + 11], 22, -1990404162);
a = ff(a, b, c, d, x[i + 12], 7, 1804603682);
d = ff(d, a, b, c, x[i + 13], 12, -40341101);
c = ff(c, d, a, b, x[i + 14], 17, -1502002290);
b = ff(b, c, d, a, x[i + 15], 22, 1236535329);
a = gg(a, b, c, d, x[i + 1], 5, -165796510);
d = gg(d, a, b, c, x[i + 6], 9, -1069501632);
c = gg(c, d, a, b, x[i + 11], 14, 643717713);
b = gg(b, c, d, a, x[i + 0], 20, -373897302);
a = gg(a, b, c, d, x[i + 5], 5, -701558691);
d = gg(d, a, b, c, x[i + 10], 9, 38016083);
c = gg(c, d, a, b, x[i + 15], 14, -660478335);
b = gg(b, c, d, a, x[i + 4], 20, -405537848);
a = gg(a, b, c, d, x[i + 9], 5, 568446438);
d = gg(d, a, b, c, x[i + 14], 9, -1019803690);
c = gg(c, d, a, b, x[i + 3], 14, -187363961);
b = gg(b, c, d, a, x[i + 8], 20, 1163531501);
a = gg(a, b, c, d, x[i + 13], 5, -1444681467);
d = gg(d, a, b, c, x[i + 2], 9, -51403784);
c = gg(c, d, a, b, x[i + 7], 14, 1735328473);
b = gg(b, c, d, a, x[i + 12], 20, -1926607734);
a = hh(a, b, c, d, x[i + 5], 4, -378558);
d = hh(d, a, b, c, x[i + 8], 11, -2022574463);
c = hh(c, d, a, b, x[i + 11], 16, 1839030562);
b = hh(b, c, d, a, x[i + 14], 23, -35309556);
a = hh(a, b, c, d, x[i + 1], 4, -1530992060);
d = hh(d, a, b, c, x[i + 4], 11, 1272893353);
c = hh(c, d, a, b, x[i + 7], 16, -155497632);
b = hh(b, c, d, a, x[i + 10], 23, -1094730640);
a = hh(a, b, c, d, x[i + 13], 4, 681279174);
d = hh(d, a, b, c, x[i + 0], 11, -358537222);
c = hh(c, d, a, b, x[i + 3], 16, -722521979);
b = hh(b, c, d, a, x[i + 6], 23, 76029189);
a = hh(a, b, c, d, x[i + 9], 4, -640364487);
d = hh(d, a, b, c, x[i + 12], 11, -421815835);
c = hh(c, d, a, b, x[i + 15], 16, 530742520);
b = hh(b, c, d, a, x[i + 2], 23, -995338651);
a = ii(a, b, c, d, x[i + 0], 6, -198630844);
d = ii(d, a, b, c, x[i + 7], 10, 1126891415);
c = ii(c, d, a, b, x[i + 14], 15, -1416354905);
b = ii(b, c, d, a, x[i + 5], 21, -57434055);
a = ii(a, b, c, d, x[i + 12], 6, 1700485571);
d = ii(d, a, b, c, x[i + 3], 10, -1894986606);
c = ii(c, d, a, b, x[i + 10], 15, -1051523);
b = ii(b, c, d, a, x[i + 1], 21, -2054922799);
a = ii(a, b, c, d, x[i + 8], 6, 1873313359);
d = ii(d, a, b, c, x[i + 15], 10, -30611744);
c = ii(c, d, a, b, x[i + 6], 15, -1560198380);
b = ii(b, c, d, a, x[i + 13], 21, 1309151649);
a = ii(a, b, c, d, x[i + 4], 6, -145523070);
d = ii(d, a, b, c, x[i + 11], 10, -1120210379);
c = ii(c, d, a, b, x[i + 2], 15, 718787259);
b = ii(b, c, d, a, x[i + 9], 21, -343485551);
a = addme(a, olda);
b = addme(b, oldb);
c = addme(c, oldc);
d = addme(d, oldd);
i += 16;
}
return rhex(a) + rhex(b) + rhex(c) + rhex(d);
};
}
frame 1 {
SUONO = function (istanza_sound, id, gestore_suoni, loop, bgm) {
this.id = id;
this.loop = loop;
this.bgm = bgm;
this.nome = istanza_sound;
this.gestore_suoni = gestore_suoni;
this.rif_mc = this.gestore_suoni.cont.createEmptyMovieClip(istanza_sound, this.gestore_suoni.cont.getNextHighestDepth());
this.ciclo = this.gestore_suoni.cont.createEmptyMovieClip(istanza_sound + '_ciclo', this.gestore_suoni.cont.getNextHighestDepth());
this.sound = new Sound(this.rif_mc);
this.sound.attachSound(id);
this.id_gestore = this.gestore_suoni.suoni.length;
this.cur_volume = 100;
if (this.bgm) {
if (this.gestore_suoni.bgm_down) {
trace('1');
this.sound.setVolume(0);
this.cur_volume = 0;
}
} else {
if (this.gestore_suoni.sfx_down) {
trace('2');
this.sound.setVolume(0);
this.cur_volume = 0;
}
}
if (this.loop) {
this.sound.onSoundComplete = function () {
trace('restart');
this.start();
};
} else {
this.sound.loc_classe = this;
this.sound.onSoundComplete = function () {
this.loc_classe.gestore_suoni.remove_suono_by_name(this.loc_classe.nome);
};
}
this.sound.start();
};
SUONO.prototype.volume_down = function () {
trace('3');
this.sound.setVolume(0);
this.cur_volume = 0;
};
SUONO.prototype.volume_up = function () {
this.sound.setVolume(100);
this.cur_volume = 100;
};
SUONO.prototype.fade_in = function () {
if (this.bgm && this.gestore_suoni.bgm_down) {
trace('4');
this.sound.setVolume(0);
this.cur_volume = 0;
return undefined;
}
if (!this.bgm && this.gestore_suoni.sfx_down) {
trace('5');
this.sound.setVolume(0);
this.cur_volume = 0;
return undefined;
}
classe_fade_in = this;
trace('6');
this.sound.setVolume(0);
this.cur_volume = 0;
this.ciclo.onEnterFrame = function () {
trace(classe_fade_in.sound.getVolume());
if (classe_fade_in.sound.getVolume() < 100) {
classe_fade_in.sound.setVolume(classe_fade_in.sound.getVolume() + 5);
} else {
classe_fade_in.sound.setVolume(100);
classe_fade_in.cur_volume = 100;
delete this.onEnterFrame;
}
};
};
SUONO.prototype.fade_out = function (canc) {
classe_fade_out = this;
this.ciclo.onEnterFrame = function () {
if (classe_fade_out.sound.getVolume() > 0) {
classe_fade_out.sound.setVolume(classe_fade_out.sound.getVolume() - 5);
} else {
trace('7');
classe_fade_out.sound.setVolume(0);
classe_fade_out.cur_volume = 0;
if (canc) {
classe_fade_out.remove_suono();
}
delete this.onEnterFrame;
}
};
};
SUONO.prototype.turn_down_volume_to = function (volume) {
if (this.bgm_down || this.sfx_down) {
return undefined;
}
var classe_fade_out = this;
this.ciclo.onEnterFrame = function () {
if (classe_fade_out.sound.getVolume() > volume) {
classe_fade_out.sound.setVolume(classe_fade_out.sound.getVolume() - 3);
} else {
classe_fade_out.sound.setVolume(volume);
classe_fade_out.cur_volume = volume;
delete this.onEnterFrame;
}
};
};
SUONO.prototype.turn_up_volume_to = function (volume) {
if (this.bgm_down || this.sfx_down) {
return undefined;
}
var classe_fade_in = this;
trace(this.sound);
this.ciclo.onEnterFrame = function () {
trace('classe_fade_out.sound.getVolume() ' + classe_fade_in.sound.getVolume());
if (classe_fade_in.sound.getVolume() < volume) {
classe_fade_in.sound.setVolume(classe_fade_in.sound.getVolume() + 5);
} else {
classe_fade_in.sound.setVolume(volume);
classe_fade_in.cur_volume = volume;
delete this.onEnterFrame;
}
};
};
SUONO.prototype.restart_suono = function () {
this.sound.stop();
this.sound.setVolume(100);
this.sound.start();
};
SUONO.prototype.remove_suono = function () {
this.nome = undefined;
this.sound.stop();
this.sound = null;
delete this.sound;
this.rif_mc.removeMovieClip();
this.ciclo.removeMovieClip();
this = null;
false;
};
SOUND_HANDLER = function () {
trace('new SOUND_HANDLER');
this.bgm_down = false;
this.sfx_down = false;
this.suoni = new Array();
this.cont = _root.createEmptyMovieClip('reference_for_sound_mc', 10000);
};
SOUND_HANDLER.prototype.add_suono = function (istanza_sound, id, loop, bgm) {
this.suoni.push(new SUONO(istanza_sound, id, this, loop, bgm));
};
SOUND_HANDLER.prototype.volume_down_suono = function (istanza_sound) {
for (i in this.suoni) {
if (this.suoni[i].nome == istanza_sound) {
this.suoni[i].volume_down();
}
}
};
SOUND_HANDLER.prototype.volume_up_suono = function (istanza_sound) {
for (i in this.suoni) {
if (this.suoni[i].nome == istanza_sound) {
this.suoni[i].volume_up();
}
}
};
SOUND_HANDLER.prototype.fade_out_suono = function (istanza_sound, canc) {
for (i in this.suoni) {
if (this.suoni[i].nome == istanza_sound) {
this.suoni[i].fade_out(canc);
}
}
};
SOUND_HANDLER.prototype.turn_down_suono_to_volume = function (istanza_sound, volume) {
var v2 = 0;
while (v2 < this.suoni.length) {
if (this.suoni[v2].nome == istanza_sound) {
if (this.suoni[v2].bgm && this.bgm_down) {
return undefined;
}
if (!this.suoni[v2].bgm && this.sfx_down) {
return undefined;
}
this.suoni[v2].turn_down_volume_to(volume);
}
++v2;
}
};
SOUND_HANDLER.prototype.turn_up_suono_to_volume = function (istanza_sound, volume) {
var v2 = 0;
while (v2 < this.suoni.length) {
if (this.suoni[v2].nome == istanza_sound) {
if (this.suoni[v2].bgm && this.bgm_down) {
return undefined;
}
if (!this.suoni[v2].bgm && this.sfx_down) {
return undefined;
}
this.suoni[v2].turn_up_volume_to(volume);
}
++v2;
}
};
SOUND_HANDLER.prototype.fade_in_suono = function (istanza_sound) {
for (i in this.suoni) {
if (this.suoni[i].nome == istanza_sound) {
if (this.suoni[i].bgm && this.bgm_down) {
return undefined;
}
if (!this.suoni[i].bgm && this.sfx_down) {
return undefined;
}
this.suoni[i].fade_in();
}
}
};
SOUND_HANDLER.prototype.all_sfx_down = function () {
for (i in this.suoni) {
if (!this.suoni[i].bgm) {
this.suoni[i].volume_down();
}
}
this.sfx_down = true;
};
SOUND_HANDLER.prototype.all_sfx_up = function () {
this.sfx_down = false;
for (i in this.suoni) {
if (!this.suoni[i].bgm) {
this.suoni[i].volume_up();
}
}
};
SOUND_HANDLER.prototype.all_bgm_down = function () {
var v2 = 0;
while (v2 < this.suoni.length) {
if (this.suoni[v2].bgm) {
this.suoni[v2].fade_out();
}
++v2;
}
this.bgm_down = true;
};
SOUND_HANDLER.prototype.all_bgm_up = function () {
this.bgm_down = false;
for (i in this.suoni) {
if (this.suoni[i].bgm) {
this.suoni[i].fade_in();
}
}
};
SOUND_HANDLER.prototype.all_bgm_up_to_volume = function (vol) {
var v2 = 0;
while (v2 < this.suoni.length) {
if (this.suoni[v2].bgm) {
this.suoni[v2].turn_up_volume_to(vol);
}
++v2;
}
this.bgm_down = false;
};
SOUND_HANDLER.prototype.all_down = function () {
for (i in this.suoni) {
this.suoni[i].volume_down();
}
this.bgm_down = true;
this.sfx_down = true;
};
SOUND_HANDLER.prototype.all_up = function () {
for (i in this.suoni) {
this.suoni[i].volume_up();
}
this.bgm_down = false;
this.sfx_down = false;
};
SOUND_HANDLER.prototype.all_up_to_volume = function (volume) {
for (i in this.suoni) {
this.suoni[i].turn_up_volume_to(volume);
}
this.bgm_down = false;
this.sfx_down = false;
};
SOUND_HANDLER.prototype.remove_all = function () {
i = 0;
while (i < this.suoni.length) {
this.suoni[i].remove_suono();
++i;
}
};
SOUND_HANDLER.prototype.remove_suono_by_id = function (id) {
i = 0;
while (i < this.suoni.length) {
if (this.suoni[i].id_gestore == id) {
this.suoni[i].remove_suono();
}
++i;
}
};
SOUND_HANDLER.prototype.remove_suono_by_name = function (nome) {
i = 0;
while (i < this.suoni.length) {
if (this.suoni[i].nome == nome) {
this.suoni[i].remove_suono();
}
++i;
}
};
SOUND_HANDLER.prototype.sound_exixts = function (nome) {
exists = false;
i = 0;
while (i < this.suoni.length) {
if (this.suoni[i].nome == nome) {
exists = true;
}
++i;
}
return exists;
};
SOUND_HANDLER.prototype.restart_suono_by_name = function (nome) {
i = 0;
while (i < this.suoni.length) {
if (this.suoni[i].nome == nome) {
this.suoni[i].restart_suono();
}
++i;
}
};
SOUND_HANDLER.prototype.return_suono_by_name = function (nome) {
i = 0;
while (i < this.suoni.length) {
if (this.suoni[i].nome == nome) {
return this.suoni[i];
}
++i;
}
};
}
frame 1 {
caurina.transitions.properties.CurveModifiers.init();
caurina.transitions.properties.ColorShortcuts.init();
POINT = function (x, y) {
this.x = x;
this.y = y;
};
COLLECTABLE_PROTOTYPE = function (space_value, type, xmov, bonus, is_jumpable) {
this.space_value = space_value;
this.type = type;
this.xmov = xmov;
this.bonus = bonus;
this.is_jumpable = is_jumpable;
};
COLLECTABLE = function (game, istanza, space_value, track_id, id, type, bonus, generated_at_frame, is_jumpable) {
this.game = game;
this.istanza = istanza;
this.width = this.istanza._width;
this.height = this.istanza._height;
this.temp_x = this.game.stage_width;
this.previous_x = this.temp_x;
this.x = this.temp_x;
this.istanza._x = this.x;
this.temp_y = 0;
this.y = this.temp_y;
this.istanza._y = this.y;
this.space_value = space_value;
this.track_id = track_id;
this.id = id;
this.xmov = 2;
this.active = true;
this.type = type;
this.bonus = bonus;
this.generated_at_frame = generated_at_frame;
this.hitten = false;
this.is_jumpable = is_jumpable;
};
COLLECTABLE.prototype.check_position = function () {
if (this.temp_x <= this.width * -1) {
this.remove();
}
};
COLLECTABLE.prototype.remove = function () {
this.istanza.removeMovieClip();
this.active = false;
this.game.reset_collectables();
this.game.generate_collectable();
};
COLLECTABLE.prototype.destroy = function () {
trace('coll destroy');
this.istanza.removeMovieClip();
this.active = false;
this = null;
false;
};
TRACK = function (game, x, y, ape_x, ape_y, level, hero_level, istanza, id) {
this.game = game;
this.x = x;
this.y = y;
this.ape_x = ape_x;
this.ape_y = ape_y;
this.level = level;
this.hero_level = hero_level;
this.istanza = istanza;
this.collectables_arr = new Array();
this.space = 4;
this.id = id;
};
TRACK.prototype.set_depth = function () {
this.istanza.swapDepths(this.level);
};
TRACK.prototype.add_collectable = function (no_bonus) {
if (no_bonus) {
temp_arr = new Array();
i = 0;
while (i < this.game.collectables_types_arr.length) {
prot = this.game.collectables_types_arr[i];
if (!prot.bonus) {
temp_arr.push(prot);
}
++i;
}
ind = random(temp_arr.length - 1);
prot = temp_arr[ind];
clip = this.istanza.attachMovie(prot.type, 'collectable_' + this.game.collectables_generated, this.istanza.getNextHighestDepth());
this.collectables_arr.push(new COLLECTABLE(this.game, clip, prot.space_value, this.id, this.game.collectables_generated, prot.type, prot.bonus, this.game.ciclo.frame, prot.is_jumpable));
temp_arr = null;
++this.game.collectables_generated;
} else {
if (this.collectables_arr.length < 3) {
temp_arr = new Array();
i = 0;
while (i < this.game.collectables_types_arr.length) {
prot = this.game.collectables_types_arr[i];
if (prot.bonus) {
temp_arr.push(prot);
}
++i;
}
ind = random(temp_arr.length - 1);
prot = temp_arr[ind];
if (prot.type == 'gold_ball' && this.game.hero.golden_balls_n > this.superkick_balls_n) {
if (!this.game.hero.has_ball) {
i = 0;
while (i < this.game.collectables_types_arr.length) {
prot = this.game.collectables_types_arr[i];
if (prot.type == 'collectable_ball') {
break;
}
++i;
}
} else {
this.add_collectable(true);
return undefined;
}
} else {
if (prot.type == 'collectable_ball' && this.game.hero.has_ball) {
if (this.game.hero.golden_balls_n < this.game.hero.superkick_balls_n) {
i = 0;
while (i < this.game.collectables_types_arr.length) {
prot = this.game.collectables_types_arr[i];
if (prot.type == 'gold_ball') {
break;
}
++i;
}
} else {
this.add_collectable(true);
return undefined;
}
}
}
clip = this.istanza.attachMovie(prot.type, 'collectable_' + this.game.collectables_generated, this.istanza.getNextHighestDepth());
this.collectables_arr.push(new COLLECTABLE(this.game, clip, prot.space_value, this.id, this.game.collectables_generated, prot.type, prot.bonus, this.game.ciclo.frame, prot.is_jumpable));
temp_arr = null;
++this.game.collectables_generated;
}
}
};
LEVEL = function (istanza, istanza_secondaria, level) {
this.istanza = istanza;
this.istanza_secondaria = istanza_secondaria;
this.x = istanza._x;
this.width = istanza._width;
this.temp_x = this.x;
this.level = level;
this.base_mov = 1;
this.xmov = this.base_mov + 0.5 * this.level;
};
LEVEL.prototype.handle_switching = function () {
if (this.temp_x <= this.width * -1) {
this.temp_x = 0;
temp = this.istanza;
this.istanza = this.istanza_secondaria;
this.istanza_secondaria = temp;
}
};
LEVEL.prototype.destroy = function () {
this.istanza.removeMovieClip();
this.istanza_secondaria.removeMovieClip();
this = null;
false;
};
HERO = function (game, player) {
this.game = game;
this.player = player;
switch (this.player) {
case 'ranocchia':
this.frame_threshold = 5;
this.stamina = 8;
this.good_kicker = false;
this.istanza = _root.attachMovie('ranocchia', 'pupazzo', 0);
break;
case 'bonucci':
this.frame_threshold = 0;
this.stamina = 0;
this.good_kicker = false;
this.istanza = _root.attachMovie('bonucci', 'pupazzo', 0);
break;
case 'okaka':
this.frame_threshold = 10;
this.stamina = 2;
this.good_kicker = true;
this.istanza = _root.attachMovie('okaka', 'pupazzo', 0);
}
this.istanza._x = 55;
this.istanza._y = 505;
this.x = this.istanza._x;
this.y = this.istanza._y;
this.width = this.istanza.area._width;
this.height = this.istanza.area._height;
this.xmov = 0;
this.ymov = 0;
this.tempx = this.x;
this.tempy = this.y;
this.min_X_mov = 0.75;
this.min_Y_mov = 10;
this.dead = false;
this.in_air = false;
this.is_walking = false;
this.is_jumping = false;
this.cur_track = 3;
this.moving_to_track = false;
this.is_kicking = false;
this.kick_to_track = undefined;
this.last_kick_deleted = false;
this.has_ball = true;
this.switch_at_frame = this.game.fps;
this.golden_balls_n = 0;
this.superkick_balls_n = 3;
this.delay_active = false;
this.waiting_trigger = false;
this.delayed_param = undefined;
this.trigger_frame = 0;
this.ball_removed_at_frame = 0;
this.ball_delay = 45;
};
HERO.prototype.destroy = function () {
trace('hero destroy');
this.istanza.removeMovieClip();
this = null;
false;
};
HERO.prototype.move_track = function (up) {
if (this.waiting_trigger) {
return undefined;
}
if (!this.delay_active) {
this.delay_active = true;
this.waiting_trigger = true;
this.delayed_param = up;
this.trigger_frame = this.game.ciclo.frame + this.frame_threshold;
return undefined;
}
if (!this.moving_to_track && !this.is_jumping && !this.in_air && this.delay_active) {
if (up) {
if (this.cur_track - 1 >= 0) {
this.moving_to_track = true;
--this.cur_track;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
}
} else {
if (this.cur_track + 1 <= 3) {
this.moving_to_track = true;
++this.cur_track;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
}
}
this.game.floor = this.game.tracks_arr[this.cur_track].y;
this.delay_active = false;
}
};
HERO.prototype.ready_to_switch = function () {
return this.game.ciclo.frame - this.switched_at_frame >= this.switch_frame_threshold;
};
HERO.prototype.switch_track = function () {
if (this.moving_to_track || this.game.movement_halted) {
return undefined;
}
ind = random(this.game.tracks_arr.length);
if (ind != this.cur_track) {
this.moving_to_track = true;
this.cur_track = ind;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
this.switch_at_frame = this.game.ciclo.frame + (random(4) + 1) * this.game.timer.fps;
this.game.floor = this.game.tracks_arr[this.cur_track].y;
} else {
this.switch_track();
}
};
HERO.prototype.set_depth = function (lev) {
this.istanza.swapDepths(lev);
};
HERO.prototype.get_depth = function (lev) {
this.istanza.getDepth();
};
HERO.prototype.detect_collision = function () {
if (!this.moving_to_track) {
arr = this.game.tracks_arr[this.cur_track].collectables_arr;
i = 0;
while (i < arr.length) {
if (arr[i].active && !arr[i].hitten) {
coll = arr[i];
p = new POINT(coll.x, coll.y);
this.game.tracks_arr[this.cur_track].istanza.localToGlobal(p);
x_coll = p.x;
p = new POINT(coll.previous_x, coll.y);
this.game.tracks_arr[this.cur_track].istanza.localToGlobal(p);
previous_x_coll = p.x;
p = new POINT(this.istanza.area._x, this.istanza.area._y);
this.istanza.localToGlobal(p);
x_hero = p.x;
p = null;
coll_left = x_coll;
coll_right = x_coll + coll.istanza.area._width;
coll_previous_left = previous_x_coll;
coll_previous_right = previous_x_coll + coll.istanza.area._width;
hero_left = x_hero;
hero_right = x_hero + this.istanza.area._width;
collide_ora = coll_left < hero_right && coll_right > hero_left;
avrebbe_colliso = coll_previous_left > hero_right && coll_previous_right < hero_left;
if (collide_ora || avrebbe_colliso) {
if (this.is_jumping) {
if (!coll.is_jumpable) {
trace('stavi a sartà ma non poi sartallo');
this.handle_collision(coll);
}
} else {
this.handle_collision(coll);
}
}
}
++i;
}
}
};
HERO.prototype.handle_collision = function (coll) {
if (coll.bonus) {
_global.suono.add_suono('bonus_catch_snd', 'bonus_catch', false, false);
if (coll.type == 'collectable_ball') {
this.has_ball = true;
coll.remove();
} else {
if (coll.type == 'gold_ball') {
++this.golden_balls_n;
++this.game.golden_balls_colleted;
if (this.golden_balls_n == this.superkick_balls_n) {
_global.suono.add_suono('bar_full_snd', 'bar_full', false, false);
_root.display.interface_bar.superkick_bar.new_frame = 101;
_root.display.interface_bar.onEnterFrame = function () {
if (this.superkick_bar._currentframe < this.superkick_bar.new_frame) {
this.superkick_bar.gotoAndStop(this.superkick_bar._currentframe + 1);
} else {
delete this.onEnterFrame;
this.superkick_bar.play();
}
};
} else {
if (this.golden_balls_n < this.superkick_balls_n) {
_root.display.interface_bar.superkick_bar.new_frame = int((this.golden_balls_n / this.superkick_balls_n) * 100);
_root.display.interface_bar.onEnterFrame = function () {
if (this.superkick_bar._currentframe != this.superkick_bar.new_frame) {
this.superkick_bar.gotoAndStop(this.superkick_bar._currentframe + 1);
} else {
this.superkick_bar.gotoAndStop(this.superkick_bar.new_frame);
delete this.onEnterFrame;
}
};
}
}
coll.remove();
}
}
} else {
_global.suono.add_suono('hurt_snd', 'hurt', false, false);
caurina.transitions.Tweener.addTween(this.istanza, {'_color': 16711680, '_alpha': 75, 'time': 0.5, 'transition': 'easeOutSine', 'onComplete': function () {
caurina.transitions.Tweener.addTween(this, {'_color': null, '_alpha': 100, 'time': 0.5, 'transition': 'easeOutSine'});
}});
this.game.arbitrary_speed_decreasement = true;
}
coll.hitten = true;
};
HERO.prototype.hurt = function () {
this.istanza.gotoAndPlay('hurt');
};
HERO.prototype.jump = function (jump_speed) {
if (!this.is_jumping && !this.in_air) {
_global.suono.add_suono('salto_snd', 'salto', false, false);
this.istanza.gotoAndStop('jumping');
this.is_jumping = true;
this.in_air = true;
this.ymov = -jump_speed;
}
};
HERO.prototype.kick = function () {
if (this.is_kicking || !this.has_ball) {
return undefined;
}
this.is_kicking = true;
this.kick_to_track = this.game.ape.cur_track;
if (!arguments[0]) {
this.istanza.gotoAndStop('kicking');
} else {
this.istanza.grafica.play();
}
p_palla = {'x': 0, 'y': 0};
this.istanza.anim_palla.palla.localToGlobal(p_palla);
clip_palla = _root.attachMovie('palla', 'palla', _root.getNextHighestDepth(), {'_x': p_palla.x, '_y': p_palla.y});
this.has_ball = false;
this.ball_removed_at_frame = this.game.ciclo.frame;
this.istanza.anim_palla._visible = false;
chance = 0;
des_clip = undefined;
if (Math.abs(this.cur_track - this.game.ape.cur_track) > 1) {
chance = 0;
} else {
if (Math.abs(this.cur_track - this.game.ape.cur_track) == 0) {
chance = 100;
} else {
if (Math.abs(this.cur_track - this.game.ape.cur_track) == 1) {
chance = 10;
if (this.good_kicker) {
chance = 100;
}
}
}
}
if (this.game.cur_speed < this.game.max_speed) {
chance = 0;
}
if (this.game.last_stage) {
chance = 85;
}
if (arguments[0]) {
chance = 100;
}
if (_root.randRange(1, 100) <= chance) {
des_clip = this.game.ape.istanza.good_kick;
clip_palla.win = true;
} else {
clip_palla.win = false;
if (_root.randRange(1, 100) < 50) {
des_clip = this.game.ape.istanza.wrong_kick_1;
} else {
des_clip = this.game.ape.istanza.wrong_kick_2;
}
}
p_ape = {'x': des_clip._x, 'y': des_clip._y};
this.game.ape.istanza.localToGlobal(p_ape);
bez_x = this.game.ape.x / 2;
y = 0;
if (this.y > this.game.ape.y) {
y = this.game.ape.y - _root.randRange(5, 20);
} else {
y = this.y - _root.randRange(5, 20);
}
bez_y = y;
clip_palla.classe = this;
kick_speed = 5 / this.game.cur_speed;
bez_curv = [{'_x': bez_x, '_y': bez_y}];
if (arguments[0]) {
kick_speed = 0.35;
bez_curv = undefined;
clip_palla.superkick = true;
}
_global.suono.add_suono('tiro_snd', 'tiro', false, false);
caurina.transitions.Tweener.addTween(clip_palla, {'_x': p_ape.x, '_y': p_ape.y, '_bezier': bez_curv, 'time': kick_speed, 'transition': 'linear', 'delay': 0, 'onComplete': function () {
this.classe.is_kicking = false;
if (this.classe.last_kick_deleted) {
this.classe.last_kick_deleted = false;
return undefined;
}
if (!this.win) {
this.play();
} else {
++this.classe.game.goals_n;
if (this.classe.game.last_stage && this.classe.game.goals_n >= 10) {
this.classe.game.ended = true;
this.classe.game.showing_result = true;
this.classe.game.show_level_result(true);
}
if (this.classe.game.last_stage) {
_root.display.goals_n.text = 10 - this.classe.game.goals_n;
} else {
_root.display.goals_n.text = this.classe.game.goals_n;
}
_global.suono.add_suono('gol_snd', 'gol', false, false);
this.classe.game.ape.istanza.gol_anim.play();
this.removeMovieClip();
}
}, 'onUpdate': function () {
if (this.superkick) {
_root.attachMovie('palla_scia', 'scia', _root.getNextHighestDepth(), {'_x': this._x, '_y': this._y});
}
if (this.classe.kick_to_track != this.classe.game.ape.cur_track) {
this.classe.last_kick_deleted = true;
caurina.transitions.Tweener.addTween(this, {'_alpha': 0, 'time': 0.25, 'transition': 'easeOutSine', 'onComplete': function () {
this.removeMovieClip();
}});
}
}});
};
HERO.prototype.super_kick = function () {
if (this.is_kicking || !this.has_ball || this.golden_balls_n < this.superkick_balls_n) {
return undefined;
}
this.golden_balls_n = 0;
delete _root.display.interface_bar.onEnterFrame;
_root.display.interface_bar.superkick_bar.gotoAndStop(1);
++this.game.superkick_scored;
this.istanza.ombra._visible = false;
this.is_kicking = true;
this.game.stop_movement();
this.set_depth(_root.getNextHighestDepth());
this.game.ape.set_depth(_root.getNextHighestDepth());
this.istanza.gotoAndStop('superkick');
middle_x = (this.game.stage_width - this.istanza._width) / 2 - 100;
middle_y = (this.game.stage_height - this.istanza._height) / 2 + 50;
this.istanza.classe = this;
_global.suono.add_suono('superkick_snd', 'superkick', false, false);
caurina.transitions.Tweener.addTween(this.istanza, {'_x': middle_x, '_y': middle_y, '_xscale': 115, '_yscale': 115, 'time': 0.85, 'transition': 'easeOutSine', 'delay': 0, 'onComplete': function () {
caurina.transitions.Tweener.addTween(this, {'_color': 16711680, '_alpha': 75, 'time': 0.25, 'transition': 'easeOutSine', 'onComplete': function () {
caurina.transitions.Tweener.addTween(this, {'_color': null, '_alpha': 100, 'time': 0.25, 'transition': 'easeOutSine'});
}});
this.onEnterFrame = function () {
if (this.grafica._currentframe == 25) {
this.grafica.play();
this.classe.is_kicking = false;
this.classe.kick(true);
this.classe.set_depth(this.classe.game.tracks_arr[this.classe.cur_track].hero_level);
this.classe.game.ape.set_depth(this.classe.game.tracks_arr[this.classe.game.ape.cur_track].hero_level);
this.swapDepths(this.classe.level);
caurina.transitions.Tweener.addTween(this, {'_x': this.classe.x, '_y': this.classe.y, '_xscale': 100, '_yscale': 100, 'time': 0.25, 'delay': 0.5, 'transition': 'easeOutSine', 'onComplete': function () {
this.ombra._visible = true;
this.classe.game.restart_movement();
}});
delete this.onEnterFrame;
}
};
}});
};
HERO.prototype.detect_ape = function () {
if (this.cur_track == this.game.ape.cur_track) {
this.kick();
}
};
APE_CROSS = function (game) {
this.game = game;
this.istanza = _root.attachMovie('ape_cross', 'ape', 8);
this.istanza._x = this.game.stage_width;
this.istanza._y = 328;
this.x = this.istanza._x;
this.y = this.istanza._y;
this.width = this.istanza.area._width;
this.height = this.istanza.area._height;
this.xmov = 0;
this.ymov = 0;
this.tempx = this.x;
this.tempy = this.x;
this.min_X_mov = 0.75;
this.min_Y_mov = 10;
this.is_walking = false;
this.is_in_range = false;
this.cur_track = 3;
this.moving_to_track = false;
this.is_in_range = false;
this.switch_at_frame = this.game.timer.fps;
this.switched_at_frame = 0;
this.delay_active = false;
this.waiting_trigger = false;
this.delayed_param = undefined;
this.trigger_frame = 0;
this.frame_threshold = 5;
};
APE_CROSS.prototype.destroy = function () {
this.istanza.removeMovieClip();
this = null;
false;
};
APE_CROSS.prototype.move_track = function (up) {
if (this.waiting_trigger) {
return undefined;
}
if (!this.delay_active) {
this.delay_active = true;
this.waiting_trigger = true;
this.delayed_param = up;
this.trigger_frame = this.game.ciclo.frame + this.frame_threshold;
return undefined;
}
if (!this.moving_to_track && !this.is_jumping && !this.in_air && this.delay_active) {
if (up) {
if (this.cur_track - 1 >= 0) {
this.moving_to_track = true;
--this.cur_track;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
}
} else {
if (this.cur_track + 1 <= 3) {
this.moving_to_track = true;
++this.cur_track;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
}
}
this.delay_active = false;
}
};
APE_CROSS.prototype.switch_track = function () {
if (this.moving_to_track || this.game.movement_halted) {
return undefined;
}
ind = random(this.game.tracks_arr.length);
if (ind != this.cur_track) {
this.moving_to_track = true;
this.cur_track = ind;
this.set_depth(this.game.tracks_arr[this.cur_track].hero_level);
this.switch_at_frame = this.game.ciclo.frame + (random(4) + 1) * this.game.timer.fps;
this.switched_at_frame = this.game.ciclo.frame;
} else {
this.switch_track();
}
};
APE_CROSS.prototype.get_depth = function () {
return this.istanza.getDepth();
};
APE_CROSS.prototype.set_depth = function (lev) {
this.istanza.swapDepths(lev + 7);
};
GAME = function (handler) {
this.handler = handler;
this.hero = undefined;
this.ape = undefined;
this.run_decay = 0.75;
this.gravity = 2;
this.wind_resistance = 0.92;
this.collectables_taken = 0;
this.floor = 505;
this.base_speed = 5;
this.cur_speed = this.base_speed;
this.ape_speed = 10;
this.max_speed = 0;
this.mt_sec = 2.5;
this.ml_sec = 0.021;
this.mt_percorsi = 0;
this.ml_percorse = 0;
this.bottlecaps = 0;
this.bottles = 0;
this.punti = 0;
this.paused = false;
this.ended = false;
this.showing_result = false;
this.jump_key_released = true;
this.coll_arr = new Array();
this.wave_arr = new Array();
this.parallax_levels_arr = new Array();
this.tracks_arr = new Array();
this.collectables_types_arr = new Array();
this.secondi_totali = undefined;
this.collectables_generated = 0;
this.stage_label = undefined;
this.game_type = undefined;
this.last_populated_track = undefined;
this.arbitrary_speed_decreasement = false;
this.stage_width = 700;
this.stage_height = 600;
this.space_key_pressed = false;
this.up_key_pressed = false;
this.down_key_pressed = false;
this.last_stage = false;
this.winning_post_active = false;
this.goals_n = 0;
this.goals_to_win = 10;
this.golden_balls_colleted = 0;
this.superkick_scored = 0;
};
GAME.prototype.decrease_speed = function () {
if (this.cur_speed - 1 >= this.base_speed && !this.arbitrary_speed_decreasement) {
this.cur_speed -= 1;
} else {
this.cur_speed = this.base_speed;
}
};
GAME.prototype.increase_speed = function () {
if (this.cur_speed + 0.5 <= this.max_speed && !this.arbitrary_speed_decreasement) {
this.cur_speed += 0.5;
} else {
this.cur_speed = this.max_speed;
}
};
GAME.prototype.calculate_mt = function () {
this.mt_percorsi += this.mt_sec * this.calculate_mt_velocity();
};
GAME.prototype.calculate_ml = function () {
this.ml_percorse += 0.021 * this.calculate_ml_velocity();
};
GAME.prototype.calculate_ml_velocity = function () {
return (this.cur_speed / 30) * 2;
};
GAME.prototype.calculate_mt_velocity = function () {
return (this.cur_speed / 25) * 125;
};
GAME.prototype.calculate_ml_points = function () {
return Math.round(this.ml_percorse);
};
GAME.prototype.populate_tracks = function () {
this.tracks_arr.push(new TRACK(this, 115, 355, 460, 188, 1, 2, _root.track_0, 0));
this.tracks_arr.push(new TRACK(this, 95, 405, 450, 238, 3, 4, _root.track_1, 1));
this.tracks_arr.push(new TRACK(this, 75, 455, 440, 288, 5, 6, _root.track_2, 2));
this.tracks_arr.push(new TRACK(this, 55, 505, 430, 328, 7, 8, _root.track_3, 3));
};
GAME.prototype.populate_collectables_types = function () {
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(1, 'cono', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(1, 'tombino', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(1, 'collectable_ball', 1, true, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(1, 'gold_ball', 1, true, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'ostacolo', 1, false, true));
switch (this.stage_label) {
case 'spiaggia':
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'salvagente', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'crema', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'secchiello', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(3, 'child', 1, false, false));
break;
case 'citta':
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'copertone', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'vuvuzela', 1, false, true));
break;
case 'street':
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'bomboletta', 1, false, true));
this.collectables_types_arr.push(new COLLECTABLE_PROTOTYPE(2, 'bidone', 1, false, true));
break;
case 'stadium':
}
};
GAME.prototype.generate_collectable = function () {
if (!this.ended) {
if (this.get_collectables_n() >= 3) {
return undefined;
}
ind = random(this.tracks_arr.length);
if (ind != this.last_populated_track) {
arr = this.tracks_arr[ind].collectables_arr;
if (arr.length > 0) {
bonus_exists = false;
i = 0;
while (i < arr.length) {
if (arr[i].bonus) {
bonus_exists = true;
}
++i;
}
if (!bonus_exists) {
coll = arr[arr.length - 1];
frame = this.ciclo.frame;
frame_interval = frame - coll.generated_at_frame;
if (frame_interval < this.fps / 2) {
return undefined;
} else {
this.last_populated_track = ind;
no_bonus = _root.randRange(0, 99) <= 49;
this.tracks_arr[ind].add_collectable(no_bonus);
}
} else {
this.last_populated_track = ind;
this.tracks_arr[ind].add_collectable(true);
}
} else {
this.last_populated_track = ind;
no_bonus = _root.randRange(0, 99) <= 49;
this.tracks_arr[ind].add_collectable(no_bonus);
}
} else {
this.generate_collectable();
}
}
};
GAME.prototype.reset_collectables = function () {
i = 0;
while (i < this.tracks_arr.length) {
track = this.tracks_arr[i].collectables_arr;
temp_arr = new Array();
j = 0;
while (j < track.length) {
coll = track[j];
if (coll.active) {
temp_arr.push(coll);
} else {
if (!coll.active) {
coll = null;
}
}
++j;
}
this.tracks_arr[i].collectables_arr = temp_arr;
temp_arr = null;
++i;
}
};
GAME.prototype.get_collectables_n = function () {
var v4 = 0;
var v3 = 0;
while (v3 < this.tracks_arr.length) {
track = this.tracks_arr[v3].collectables_arr;
var v2 = 0;
while (v2 < track.length) {
coll = track[v2];
if (coll.active) {
++v4;
}
++v2;
}
++v3;
}
return v4;
};
GAME.prototype.populate_levels = function () {
i = 0;
while (i < 4) {
clip = _root['doodad_' + i];
secondary_clip = _root['doodad_copy_' + i];
this.parallax_levels_arr.push(new LEVEL(clip, secondary_clip, i));
++i;
}
};
GAME.prototype.stop_movement = function () {
this.movement_halted = true;
};
GAME.prototype.restart_movement = function () {
this.movement_halted = false;
};
GAME.prototype.add_friction_gravity = function () {
this.hero.ymov += this.gravity;
if (!this.hero.in_air) {
this.hero.xmov *= this.run_decay;
} else {
this.hero.xmov *= this.wind_resistance;
}
if (Math.abs(this.hero.xmov) < this.hero.min_X_mov) {
this.hero.xmov = 0;
} else {
if (Math.abs(this.hero.xmov) > this.hero.max_X_mov) {
this.hero.xmov = (Math.abs(this.hero.xmov) / this.hero.xmov) * hero.max_X_mov;
}
}
};
GAME.prototype.create_temp_positions = function () {
if (this.movement_halted) {
return undefined;
}
if (!this.last_stage) {
if (!this.hero.moving_to_track) {
this.hero.tempx = this.hero.x + this.hero.xmov;
this.hero.tempy = this.hero.y + this.hero.ymov;
} else {
this.hero.tempx += (this.tracks_arr[this.hero.cur_track].x - this.hero.tempx) / 2;
this.hero.tempy += (this.tracks_arr[this.hero.cur_track].y - this.hero.tempy) / 2;
reached_x = Math.round(this.hero.tempx) == this.tracks_arr[this.hero.cur_track].x;
reached_y = Math.round(this.hero.tempy) == this.tracks_arr[this.hero.cur_track].y;
if (reached_x && reached_y) {
this.hero.tempx = this.tracks_arr[this.hero.cur_track].x;
this.hero.tempy = this.tracks_arr[this.hero.cur_track].y;
this.hero.moving_to_track = false;
}
}
perc = 0;
if (this.cur_speed >= this.ape_speed) {
perc = Math.round(((this.cur_speed - this.ape_speed) / (this.max_speed - this.ape_speed)) * 100);
}
distanza_minima = this.stage_width - this.tracks_arr[this.ape.cur_track].ape_x;
delta_distanza = distanza_minima - (distanza_minima / 100) * perc;
ape_x_pos = this.tracks_arr[this.ape.cur_track].ape_x + delta_distanza;
if (!this.ape.moving_to_track) {
this.ape.tempx = Math.round(ape_x_pos);
this.ape.tempy = this.ape.y + this.ape.ymov;
} else {
this.ape.tempx += (ape_x_pos - this.ape.tempx) / 4;
this.ape.tempy += (this.tracks_arr[this.ape.cur_track].ape_y - this.ape.tempy) / 4;
dis_x = Math.abs(Math.abs(this.ape.tempx) - Math.abs(ape_x_pos));
dis_y = Math.abs(Math.abs(this.ape.tempy) - Math.abs(this.tracks_arr[this.ape.cur_track].ape_y));
reached_x = dis_x < 1;
reached_y = dis_y < 1;
if (reached_x && reached_y) {
this.ape.tempx = Math.round(ape_x_pos);
this.ape.tempy = this.tracks_arr[this.ape.cur_track].ape_y;
this.ape.moving_to_track = false;
}
}
} else {
if (!this.hero.moving_to_track) {
this.hero.tempx = this.hero.x + this.hero.xmov;
this.hero.tempy = this.hero.y + this.hero.ymov;
} else {
this.hero.tempx += (this.tracks_arr[this.hero.cur_track].x - this.hero.tempx) / 4;
this.hero.tempy += (this.tracks_arr[this.hero.cur_track].y - this.hero.tempy) / 4;
reached_x = Math.round(this.hero.tempx) == this.tracks_arr[this.hero.cur_track].x;
reached_y = Math.round(this.hero.tempy) == this.tracks_arr[this.hero.cur_track].y;
if (reached_x && reached_y) {
this.hero.detect_ape();
this.hero.tempx = this.tracks_arr[this.hero.cur_track].x;
this.hero.tempy = this.tracks_arr[this.hero.cur_track].y;
this.hero.moving_to_track = false;
}
}
perc = 0;
if (this.cur_speed >= this.ape_speed) {
perc = Math.round(((this.cur_speed - this.ape_speed) / (this.max_speed - this.ape_speed)) * 100);
}
distanza_minima = this.stage_width - this.tracks_arr[this.ape.cur_track].ape_x;
delta_distanza = distanza_minima - (distanza_minima / 100) * perc;
ape_x_pos = this.tracks_arr[this.ape.cur_track].ape_x + delta_distanza;
if (!this.ape.moving_to_track) {
this.ape.tempx = Math.round(ape_x_pos);
this.ape.tempy = this.ape.y + this.ape.ymov;
} else {
this.ape.tempx += (ape_x_pos - this.ape.tempx) / 4;
this.ape.tempy += (this.tracks_arr[this.ape.cur_track].ape_y - this.ape.tempy) / 4;
dis_x = Math.abs(Math.abs(this.ape.tempx) - Math.abs(ape_x_pos));
dis_y = Math.abs(Math.abs(this.ape.tempy) - Math.abs(this.tracks_arr[this.ape.cur_track].ape_y));
reached_x = dis_x < 1;
reached_y = dis_y < 1;
if (reached_x && reached_y) {
this.hero.detect_ape();
this.ape.tempx = Math.round(ape_x_pos);
this.ape.tempy = this.tracks_arr[this.ape.cur_track].ape_y;
this.ape.moving_to_track = false;
}
}
}
i = 0;
while (i < this.parallax_levels_arr.length) {
if (!this.movement_halted) {
obj = this.parallax_levels_arr[i];
k_speed = this.parallax_levels_arr.length - i;
obj.temp_x -= (obj.xmov + this.cur_speed) / k_speed;
obj.handle_switching();
}
++i;
}
i = 0;
while (i < this.tracks_arr.length) {
track = this.tracks_arr[i].collectables_arr;
if (track.length > 0) {
j = 0;
while (j < track.length) {
coll = track[j];
if (coll.active) {
coll.previous_x = coll.temp_x;
coll.temp_x -= (coll.xmov + this.cur_speed) / 2;
coll.check_position();
}
++j;
}
}
++i;
}
this.reset_collectables();
};
GAME.prototype.check_floor = function () {
if (!this.hero.moving_to_track) {
if (this.hero.tempy > this.floor) {
this.hero.tempy = this.floor;
if (this.hero.is_jumping) {
this.hero.is_jumping = false;
this.hero.in_air = false;
}
}
}
};
GAME.prototype.enemy_kick = function () {
if (!this.last_stage) {
return undefined;
}
if (Math.abs(this.hero.cur_track - this.game.ape.cur_track) == 0 && this.game.last_stage) {
this.hero.kick();
}
};
GAME.prototype.render = function () {
if (!this.showing_result) {
this.hero.detect_collision();
if (this.arbitrary_speed_decreasement) {
if (this.cur_speed > this.base_speed + this.hero.stamina) {
--this.cur_speed;
} else {
this.cur_speed = this.base_speed + this.hero.stamina;
this.arbitrary_speed_decreasement = false;
}
}
}
this.add_friction_gravity();
this.create_temp_positions();
this.check_floor();
this.renderScreen();
};
GAME.prototype.renderScreen = function () {
if (this.movement_halted) {
return undefined;
}
if (!this.ended) {
_root.display.vel.text = int(this.calculate_ml_velocity());
cur_displayed_ml = int(_root.mt_txt.text);
_root.display.mt_txt.text = Math.round(this.ml_percorse);
}
this.hero.istanza.anim_palla._visible = this.hero.has_ball;
this.hero.last_X = this.hero.x;
this.hero.last_Y = this.hero.y;
this.hero.x = this.hero.tempx;
this.hero.y = this.hero.tempy;
this.hero.istanza._x = this.hero.x;
this.hero.istanza._y = this.hero.y;
if (this.hero.is_jumping) {
p = new POINT(this.hero.x, this.floor);
this.hero.istanza.globalToLocal(p);
this.hero.istanza.ombra._y = p.y;
cur_y = this.hero.y;
cur_distance = this.floor - this.hero.y;
max_distance = 168;
distanza = 100 - Math.round((cur_distance / max_distance) * 100);
this.hero.istanza.ombra._xscale = distanza;
this.hero.istanza.ombra._yscale = distanza;
}
this.ape.last_X = this.ape.x;
this.ape.last_Y = this.hero.y;
this.ape.x = this.ape.tempx;
this.ape.y = this.ape.tempy;
this.ape.istanza._x = this.ape.x;
this.ape.istanza._y = this.ape.y;
i = 0;
while (i < this.parallax_levels_arr.length) {
obj = this.parallax_levels_arr[i];
obj.x = obj.temp_x;
obj.istanza._x = obj.x;
obj.istanza_secondaria._x = obj.x + obj.width;
++i;
}
i = 0;
while (i < this.tracks_arr.length) {
track = this.tracks_arr[i].collectables_arr;
if (track.length > 0) {
j = 0;
while (j < track.length) {
coll = track[j];
if (coll.active) {
coll.x = coll.temp_x;
coll.istanza._x = coll.x;
coll.y = coll.temp_y;
coll.istanza._y = coll.y;
}
++j;
}
}
++i;
}
this.reset_collectables();
if (this.winning_post_active) {
if (_root.goal_front._x > -_root.goal_front._width) {
_root.goal_front._x -= (1 + this.cur_speed) / (this.parallax_levels_arr.length - 2);
}
_root.goal_front.swapDepths(this.ape.get_depth() + 1);
if (_root.goal_back._x > -_root.goal_back._width) {
_root.goal_back._x -= (1 + this.cur_speed) / (this.parallax_levels_arr.length - 2);
}
}
if (this.last_stage) {
cur_mt = Number(_root.display.metri_percorsi.text);
next_mt = this.mt_percorsi;
cur_mt += (next_mt - cur_mt) / 15;
_root.display.metri_percorsi.text = int(cur_mt);
}
_root.display.swapDepths(_root.getNextHighestDepth());
};
GAME.prototype.start = function (game_type, secs, label, last_stage, player, max_speed) {
this.game_type = game_type;
this.secondi_totali = secs;
this.stage_label = label;
this.last_stage = last_stage;
_root.display.player_name.text = player.toUpperCase();
if (this.last_stage) {
this.max_speed = max_speed;
this.cur_speed = this.max_speed;
_root.display.interface_bar.gotoAndStop(2);
_root.display.goals_n.text = 10;
_root.display.metri_percorsi.text = 0;
switch (player) {
case 'ranocchia':
player = 'bonucci';
break;
case 'bonucci':
player = 'okaka';
break;
case 'okaka':
player = 'ranocchia';
}
}
this.hero = new HERO(this, player);
this.ape = new APE_CROSS(this);
this.max_speed = max_speed;
_root.display.interface_bar.superkick_bar.gotoAndStop(1);
this.timer = new TIMER(this);
this.populate_levels();
this.populate_tracks();
this.populate_collectables_types();
i = 0;
while (i < this.tracks_arr.length) {
cur_pista = this.tracks_arr[i];
cur_pista.set_depth();
++i;
}
this.hero.set_depth(this.tracks_arr[this.hero.cur_track].hero_level);
this.ape.set_depth(this.tracks_arr[this.ape.cur_track].hero_level);
this.ciclo = _root.createEmptyMovieClip('ciclo_game', 1000);
this.ciclo.classe = this;
this.ciclo.frame = 0;
this.paused = true;
this.hero.istanza._visible = false;
this.ape.istanza._visible = false;
this.ciclo.onEnterFrame = function () {
if (this.classe.paused) {
return undefined;
}
if (!this.classe.ended) {
this.classe.timer.time(this.frame);
this.classe.render();
++this.frame;
} else {
if (this.classe.showing_result) {
this.classe.render();
} else {
_root.display.removeMovieClip();
trace('_root.display removed = ' + _root.display);
this.classe.end();
}
}
};
var v4;
if (_root.gioco.advancement_status() == 0) {
_global.suono.turn_down_suono_to_volume('loop_bgm_snd', 10);
_global.suono.add_suono('popup_snd', 'popup', false, false);
v4 = _root.display.istruzioni;
} else {
if (_root.gioco.advancement_status() == 3) {
_global.suono.turn_down_suono_to_volume('loop_bgm_snd', 10);
_global.suono.add_suono('popup_snd', 'popup', false, false);
v4 = _root.display.istruzioni_ape;
} else {
this.set_countdown();
}
}
v4.classe = this;
v4.gotoAndPlay(2);
v4.pannello.ok.onRelease = function () {
this._parent._parent.play();
this._parent._parent.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
this.classe.set_countdown();
this.gotoAndStop(1);
delete this.onEnterFrame;
}
};
};
_global.suono.add_suono('loop_partita_snd', 'loop_partita', true, false);
_global.suono.fade_in_suono('loop_partita_snd');
this.handler.keyboard_disabled = false;
};
GAME.prototype.set_countdown = function () {
_root.display.countdown.classe = this;
_root.display.countdown.gotoAndPlay(2);
_root.display.countdown.onEnterFrame = function () {
if (this._currentframe == 4) {
_global.suono.add_suono('countdown_snd', 'countdown', false, false);
} else {
if (this._currentframe == 26) {
_global.suono.add_suono('countdown_snd', 'countdown', false, false);
} else {
if (this._currentframe == 49) {
_global.suono.add_suono('countdown_snd', 'countdown', false, false);
} else {
if (this._currentframe >= this._totalframes) {
this.classe.paused = false;
this.classe.hero.istanza._visible = true;
this.classe.ape.istanza._visible = true;
this.classe.hero.istanza._alpha = 0;
this.classe.ape.istanza._alpha = 0;
caurina.transitions.Tweener.addTween(this.classe.hero.istanza, {'_alpha': 100, 'time': 0.5, 'transition': 'easeOutSine'});
caurina.transitions.Tweener.addTween(this.classe.ape.istanza, {'_alpha': 100, 'time': 0.5, 'transition': 'easeOutSine'});
this.gotoAndStop(1);
delete this.onEnterFrame;
}
}
}
}
};
};
GAME.prototype.end = function () {
trace('END');
delete this.ciclo.onEnterFrame;
this.ciclo.removeMovieClip();
_root.display.removeMovieClip();
trace('_root.display removed = ' + _root.display);
i = 0;
while (i < this.tracks_arr.length) {
track = this.tracks_arr[i].collectables_arr;
j = 0;
while (j < track.length) {
track[j].destroy();
++j;
}
++i;
}
i = 0;
while (i < 4) {
if (this.handler['stage_' + (i + 1)].label == this.stage_label) {
lev = this.handler['stage_' + i];
this.handler.mt_percorsi = this.mt_percorsi;
this.handler.tappi = this.bottlecaps;
this.handler.bottiglie = this.bottles;
this.handler.completato = true;
}
++i;
}
this.handler.close_stage();
};
GAME.prototype.show_level_result = function (game_over) {
_root.display.riepilogo.mt = int(this.mt_percorsi);
if (!this.last_stage) {
_root.display.riepilogo.goals_n = this.goals_n;
_root.display.riepilogo.palloni_n = this.golden_balls_colleted;
_root.display.riepilogo.superkicks_n = this.superkick_scored;
} else {
_root.display.riepilogo.goals_n = '';
_root.display.riepilogo.palloni_n = '';
_root.display.riepilogo.superkicks_n = '';
}
if (!this.last_stage) {
this.punti = this.mt_percorsi * 3 + this.goals_n * 50 + this.golden_balls_colleted * 10 + this.superkick_scored * 100;
} else {
this.punti = this.mt_percorsi * 3 + (10 - this.goals_n) * 100;
}
_root.punti += int(this.punti);
_root.display.riepilogo.punti_tot = 0;
trace(_root.display.riepilogo.pannello.labels);
_root.display.riepilogo.pannello.labels._visible = !this.last_stage;
_root.display.riepilogo.pannello.avathar.gotoAndStop(_root.player_name);
_global.suono.fade_out_suono('loop_partita_snd', true);
_global.suono.add_suono('suono_riepilogo_snd', 'suono_riepilogo', false, false);
_root.display.riepilogo.pannello.avanti.classe = this;
if (!game_over) {
_root.display.riepilogo.pannello.avanti.onRelease = function () {
_root.display.fading.gotoAndStop(1);
this.classe.showing_result = false;
};
_root.display.finish.play();
_root.display.finish.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
_global.suono.add_suono('popup_snd', 'popup', false, false);
_root.display.riepilogo.play();
_root.display.riepilogo.tot = 0;
_root.display.riepilogo.onEnterFrame = function () {
this.tot += (_root.punti - this.tot) / 4;
_root.display.riepilogo.punti_tot = int(this.tot);
if (Math.abs(_root.display.riepilogo.punti_tot - _root.punti) <= 1) {
trace('conto fatto');
_root.display.riepilogo.punti_tot = int(_root.punti);
_root.display.riepilogo.pannello.avanti._alpha = 100;
_root.display.riepilogo.pannello.avanti.enabled = true;
delete this.onEnterFrame;
}
};
_root.display.fading.gotoAndPlay(2);
this.gotoAndStop(1);
delete this.onEnterFrame;
}
};
} else {
_root.display.riepilogo.pannello.avanti.onRelease = function () {
_root.display.fading.gotoAndStop(1);
this.classe.handler.close_game();
};
_root.display.game_over.play();
_root.display.game_over.onEnterFrame = function () {
if (this._currentframe == this._totalframes) {
_root.display.riepilogo.play();
_root.display.riepilogo.onEnterFrame = function () {
_root.display.riepilogo.punti_tot += (_root.punti - _root.display.riepilogo.punti_tot) / 4;
if (Math.ceil(_root.display.riepilogo.punti_tot) >= _root.punti) {
_root.display.riepilogo.punti_tot = _root.punti;
_root.display.riepilogo.pannello.avanti._alpha = 100;
_root.display.riepilogo.pannello.avanti.enabled = true;
delete this.onEnterFrame;
}
};
_root.display.fading.gotoAndPlay(2);
this.gotoAndStop(1);
delete this.onEnterFrame;
}
};
}
_root.display.riepilogo.pannello.avanti._alpha = 50;
_root.display.riepilogo.pannello.avanti.enabled = false;
};
TIMER = function (game) {
this.game = game;
this.display_text = _root.display.tempo;
this.secondi = 0;
this.secondi_totali = this.game.secondi_totali;
this.fps = 30;
};
TIMER.prototype.time = function (frame) {
if (frame % this.fps == 0) {
this.game.calculate_mt();
++this.secondi;
this.display();
if (this.secondi == this.secondi_totali - 2) {
this.game.winning_post_active = true;
}
if (this.secondi == this.secondi_totali) {
this.game.ended = true;
this.game.showing_result = true;
if (!this.game.last_stage) {
this.game.show_level_result(this.game.goals_n < this.game.goals_to_win);
} else {
this.game.show_level_result(this.game.goals_n == 0);
}
}
}
if (frame % this.fps / 2 == 0 && this.game.hero.has_ball) {
_global.suono.add_suono('rimbalzo_snd', 'rimbalzo', false, false);
}
if (frame % this.fps * 5 == 0 && !this.game.ended && !this.game.last_stage) {
this.game.generate_collectable();
}
if (!this.game.last_stage) {
if (this.game.hero.delay_active) {
if (frame >= this.game.hero.trigger_frame) {
this.game.hero.waiting_trigger = false;
this.game.hero.move_track(this.game.hero.delayed_param);
}
}
if (frame >= this.game.ape.switch_at_frame && !this.game.ape.moving_to_track) {
this.game.ape.switch_track();
}
} else {
if (this.game.ape.delay_active) {
if (frame >= this.game.ape.trigger_frame) {
this.game.ape.waiting_trigger = false;
this.game.ape.move_track(this.game.ape.delayed_param);
}
}
if (frame >= this.game.hero.switch_at_frame && !this.game.hero.moving_to_track) {
this.game.hero.switch_track();
}
if (frame - this.game.hero.ball_removed_at_frame >= this.game.hero.ball_delay) {
this.game.hero.has_ball = true;
}
}
};
TIMER.prototype.display = function () {
sec_rim = this.secondi_totali - this.secondi;
min = int(sec_rim / 60);
if (min < 10) {
min = '0' + min;
}
secs = int(sec_rim % 60);
if (secs < 10) {
secs = '0' + secs;
}
this.display_text.text = min + ':' + secs;
};
GAME_STAGE = function (label) {
this.label = label;
this.punti = 0;
this.mt_percorsi = 0;
this.completato = false;
this.gioco = undefined;
this.prophile_name = undefined;
this.input_field = undefined;
};
GAME_HANDLER = function () {
this.game_type = undefined;
this.cur_location = undefined;
this.stage_1 = new GAME_STAGE('spiaggia');
this.stage_2 = new GAME_STAGE('citta');
this.stage_3 = new GAME_STAGE('street');
this.stage_4 = new GAME_STAGE('stadium');
this.keyboard_disabled = true;
this.keys_arr = new Array();
this.key_listener = undefined;
this.map_keys();
this.set_keys();
};
GAME_HANDLER.prototype.get_cur_game = function () {
i = 0;
while (i < 4) {
livello = this['stage_' + (i + 1)];
if (livello.label == this.cur_location) {
return livello;
}
++i;
}
};
PUL = function (game, asci, name, single_press) {
this.game = game;
this.asci = asci;
this.name = name;
this.is_pressed = false;
this.single_press = single_press;
};
GAME_HANDLER.prototype.map_keys = function () {
this.keys_arr.push(new PUL(this, 122, 'Z', true));
this.keys_arr.push(new PUL(this, 120, 'X', true));
this.keys_arr.push(new PUL(this, 32, 'SPACE', true));
this.keys_arr.push(new PUL(this, undefined, 'UP', true));
this.keys_arr.push(new PUL(this, undefined, 'LEFT'));
this.keys_arr.push(new PUL(this, undefined, 'RIGHT'));
this.keys_arr.push(new PUL(this, undefined, 'DOWN', true));
};
GAME_HANDLER.prototype.set_keys = function () {
this.key_listener = new Object();
this.key_listener.classe = this;
this.key_listener.onKeyDown = function () {
if (this.classe.keyboard_disabled) {
return undefined;
}
trace(Key.getAscii());
var v2 = 0;
while (v2 < this.classe.keys_arr.length) {
key = this.classe.keys_arr[v2];
if (key.asci) {
if (key.single_press && key.asci == Key.getAscii() && !key.is_pressed) {
key.is_pressed = true;
this.classe.handle_press(key);
}
} else {
if (key.single_press && Key.isDown(Key[key.name]) && !key.is_pressed) {
key.is_pressed = true;
this.classe.handle_press(key);
}
}
++v2;
}
};
this.key_listener.onKeyUp = function () {
var v2 = 0;
while (v2 < this.classe.keys_arr.length) {
key = this.classe.keys_arr[v2];
if (key.single_press && key.is_pressed) {
key.is_pressed = false;
}
++v2;
}
};
Key.addListener(this.key_listener);
this.listening_cycle = _root.createEmptyMovieClip('ciclo_keys', _root.getNextHighestDepth());
this.listening_cycle.classe = this;
this.listening_cycle.onEnterFrame = function () {
if (this.classe.keyboard_disabled) {
return undefined;
}
var v2 = 0;
while (v2 < this.classe.keys_arr.length) {
key = this.classe.keys_arr[v2];
if (!key.single_press) {
if (key.asci) {
if (key.asci == Key.getAscii()) {
this.classe.handle_press(key);
}
} else {
if (Key.isDown(Key[key.name])) {
this.classe.handle_press(key);
}
}
}
++v2;
}
};
};
GAME_HANDLER.prototype.handle_press = function (key) {
switch (key.name) {
case 'Z':
if (!(this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.hero.kick();
}
break;
case 'X':
if (!(this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.hero.super_kick();
}
break;
case 'SPACE':
if (!(this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.hero.jump(20);
}
break;
case 'UP':
if ((this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.ape.move_track(true);
} else {
(this.get_cur_game()).gioco.hero.move_track(true);
}
break;
case 'DOWN':
if ((this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.ape.move_track(false);
} else {
(this.get_cur_game()).gioco.hero.move_track(false);
}
break;
case 'LEFT':
if (!(this.get_cur_game()).gioco.last_stage) {
(this.get_cur_game()).gioco.decrease_speed();
}
break;
case 'RIGHT':
if (!(this.get_cur_game()).gioco.last_stage) {
if ((this.get_cur_game()).gioco.arbitrary_speed_decreasement) {
return undefined;
}
if ((this.get_cur_game()).gioco.cur_speed < (this.get_cur_game()).gioco.max_speed) {
(this.get_cur_game()).gioco.increase_speed();
}
}
}
};
GAME_HANDLER.prototype.set_cur_location = function (cur_location) {
this.cur_location = cur_location;
};
GAME_HANDLER.prototype.set_game_type = function (game_type) {
this.game_type = game_type;
};
GAME_HANDLER.prototype.activate_stage = function () {
switch (this.cur_location) {
case 'citta':
this.stage_2.gioco = new GAME(this);
this.stage_2.gioco.start(this.game_type, 75, this.cur_location, false, _root.player_name, 20);
break;
case 'spiaggia':
this.stage_1.gioco = new GAME(this);
this.stage_1.gioco.start(this.game_type, 75, this.cur_location, false, _root.player_name, 25);
break;
case 'street':
this.stage_3.gioco = new GAME(this);
this.stage_3.gioco.start(this.game_type, 75, this.cur_location, false, _root.player_name, 30);
break;
case 'stadium':
this.stage_4.gioco = new GAME(this);
this.stage_4.gioco.start(this.game_type, 75, this.cur_location, true, _root.player_name, 37);
}
};
GAME_HANDLER.prototype.advancement_status = function () {
advancement = 0;
i = 0;
while (i < 4) {
livello = this['stage_' + (i + 1)];
if (livello.completato) {
++advancement;
}
++i;
}
return advancement;
};
GAME_HANDLER.prototype.close_game = function () {
_root.display.removeMovieClip();
(this.get_cur_game()).gioco.hero.destroy();
(this.get_cur_game()).gioco.ape.destroy();
var v3 = 0;
while (v3 < this.gioco.parallax_levels_arr.length) {
this.gioco.parallax_levels_arr[v3].destroy();
++v3;
}
_root.goal_front.removeMovieClip();
_root.goal_back.removeMovieClip();
this.gioco.timer = null;
delete this.gioco.timer;
_root.goto_ladder();
this.gioco = null;
delete this.gioco;
};
GAME_HANDLER.prototype.resolve_stage = function () {
i = 0;
while (i < 4) {
livello = this['stage_' + (i + 1)];
if (livello.label == this.cur_location) {
livello.punti = livello.gioco.punti;
livello.mt_percorsi = livello.gioco.mt_percorsi;
livello.completato = true;
this.cur_location = undefined;
}
++i;
}
};
GAME_HANDLER.prototype.close_stage = function () {
(this.get_cur_game()).gioco.hero.destroy();
(this.get_cur_game()).gioco.ape.destroy();
this.resolve_stage();
var v3 = 0;
while (v3 < this.gioco.parallax_levels_arr.length) {
this.gioco.parallax_levels_arr[v3].destroy();
++v3;
}
_root.goal_front.removeMovieClip();
_root.goal_back.removeMovieClip();
this.gioco.timer = null;
delete this.gioco.timer;
this.gioco = null;
this.handler.keyboard_disabled = true;
delete this.gioco;
_root.goto_map();
};
GAME_HANDLER.prototype.destroy = function () {
this.stage_1 = null;
this.stage_2 = null;
this.stage_3 = null;
this.stage_4 = null;
Key.removeListener(this.key_listener);
this.listening_cycle.removeMovieClip();
Mouse.show();
this = null;
};
}
frame 1 {
function goto_map() {
gotoAndPlay(187);
}
function goto_ladder() {
_root.direct_ladder = true;
gotoAndPlay(401);
}
function count_hit() {
if (_root.game_ref == undefined) {
_root.game_ref = 'flashgames_eng_2010';
}
mylv = new LoadVars();
mylv.ref = _root.game_ref;
mylv.sendAndLoad('http://92.60.65.196/giochi/sport/soccer.mobile/ref.php', mylv, 'POST');
}
stop();
php_path = 'http://92.60.65.196/giochi/sport/soccer.mobile/chart.php';
this.onEnterFrame = function () {
perc = Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100);
this.preload._xscale = perc;
this.prld_n.text = perc;
if (perc >= 100) {
this.count_hit();
delete this.onEnterFrame;
this.play();
}
};
}
movieClip 30 {
}
movieClip 35 {
}
movieClip 39 {
}
movieClip 829 __Packages.caurina.transitions.properties.ColorShortcuts {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.properties) {
_global.caurina.transitions.properties = new Object();
}
if (!_global.caurina.transitions.properties.ColorShortcuts) {
var v1 = function () {
trace('This is an static class and should not be instantiated.');
};
caurina.transitions.properties.ColorShortcuts = v1;
var v2 = v1.prototype;
v1.init = function () {
caurina.transitions.Tweener.registerSpecialProperty('_color_ra', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['ra']);
caurina.transitions.Tweener.registerSpecialProperty('_color_rb', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['rb']);
caurina.transitions.Tweener.registerSpecialProperty('_color_ga', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['ga']);
caurina.transitions.Tweener.registerSpecialProperty('_color_gb', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['gb']);
caurina.transitions.Tweener.registerSpecialProperty('_color_ba', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['ba']);
caurina.transitions.Tweener.registerSpecialProperty('_color_bb', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['bb']);
caurina.transitions.Tweener.registerSpecialProperty('_color_aa', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['aa']);
caurina.transitions.Tweener.registerSpecialProperty('_color_ab', caurina.transitions.properties.ColorShortcuts._oldColor_property_get, caurina.transitions.properties.ColorShortcuts._oldColor_property_set, ['ab']);
caurina.transitions.Tweener.registerSpecialProperty('_color_redMultiplier', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['redMultiplier']);
caurina.transitions.Tweener.registerSpecialProperty('_color_redOffset', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['redOffset']);
caurina.transitions.Tweener.registerSpecialProperty('_color_greenMultiplier', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['greenMultiplier']);
caurina.transitions.Tweener.registerSpecialProperty('_color_greenOffset', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['greenOffset']);
caurina.transitions.Tweener.registerSpecialProperty('_color_blueMultiplier', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['blueMultiplier']);
caurina.transitions.Tweener.registerSpecialProperty('_color_blueOffset', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['blueOffset']);
caurina.transitions.Tweener.registerSpecialProperty('_color_alphaMultiplier', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['alphaMultiplier']);
caurina.transitions.Tweener.registerSpecialProperty('_color_alphaOffset', caurina.transitions.properties.ColorShortcuts._color_property_get, caurina.transitions.properties.ColorShortcuts._color_property_set, ['alphaOffset']);
caurina.transitions.Tweener.registerSpecialPropertySplitter('_color', caurina.transitions.properties.ColorShortcuts._color_splitter);
caurina.transitions.Tweener.registerSpecialPropertySplitter('_colorTransform', caurina.transitions.properties.ColorShortcuts._colorTransform_splitter);
caurina.transitions.Tweener.registerSpecialProperty('_brightness', caurina.transitions.properties.ColorShortcuts._brightness_get, caurina.transitions.properties.ColorShortcuts._brightness_set, [false]);
caurina.transitions.Tweener.registerSpecialProperty('_tintBrightness', caurina.transitions.properties.ColorShortcuts._brightness_get, caurina.transitions.properties.ColorShortcuts._brightness_set, [true]);
caurina.transitions.Tweener.registerSpecialProperty('_contrast', caurina.transitions.properties.ColorShortcuts._contrast_get, caurina.transitions.properties.ColorShortcuts._contrast_set);
caurina.transitions.Tweener.registerSpecialProperty('_hue', caurina.transitions.properties.ColorShortcuts._hue_get, caurina.transitions.properties.ColorShortcuts._hue_set);
caurina.transitions.Tweener.registerSpecialProperty('_saturation', caurina.transitions.properties.ColorShortcuts._saturation_get, caurina.transitions.properties.ColorShortcuts._saturation_set, [false]);
caurina.transitions.Tweener.registerSpecialProperty('_dumbSaturation', caurina.transitions.properties.ColorShortcuts._saturation_get, caurina.transitions.properties.ColorShortcuts._saturation_set, [true]);
};
v1._color_splitter = function (p_value, p_parameters) {
var v1 = new Array();
if (p_value == null) {
v1.push({'name': '_color_redMultiplier', 'value': 1});
v1.push({'name': '_color_redOffset', 'value': 0});
v1.push({'name': '_color_greenMultiplier', 'value': 1});
v1.push({'name': '_color_greenOffset', 'value': 0});
v1.push({'name': '_color_blueMultiplier', 'value': 1});
v1.push({'name': '_color_blueOffset', 'value': 0});
return v1;
}
v1.push({'name': '_color_redMultiplier', 'value': 0});
v1.push({'name': '_color_redOffset', 'value': caurina.transitions.AuxFunctions.numberToR(p_value)});
v1.push({'name': '_color_greenMultiplier', 'value': 0});
v1.push({'name': '_color_greenOffset', 'value': caurina.transitions.AuxFunctions.numberToG(p_value)});
v1.push({'name': '_color_blueMultiplier', 'value': 0});
v1.push({'name': '_color_blueOffset', 'value': caurina.transitions.AuxFunctions.numberToB(p_value)});
return v1;
};
v1._colorTransform_splitter = function (p_value, p_parameters) {
var v2 = new Array();
if (p_value == null) {
v2.push({'name': '_color_redMultiplier', 'value': 1});
v2.push({'name': '_color_redOffset', 'value': 0});
v2.push({'name': '_color_greenMultiplier', 'value': 1});
v2.push({'name': '_color_greenOffset', 'value': 0});
v2.push({'name': '_color_blueMultiplier', 'value': 1});
v2.push({'name': '_color_blueOffset', 'value': 0});
return v2;
}
if (p_value.ra != undefined) {
v2.push({'name': '_color_ra', 'value': p_value.ra});
}
if (p_value.rb != undefined) {
v2.push({'name': '_color_rb', 'value': p_value.rb});
}
if (p_value.ga != undefined) {
v2.push({'name': '_color_ba', 'value': p_value.ba});
}
if (p_value.gb != undefined) {
v2.push({'name': '_color_bb', 'value': p_value.bb});
}
if (p_value.ba != undefined) {
v2.push({'name': '_color_ga', 'value': p_value.ga});
}
if (p_value.bb != undefined) {
v2.push({'name': '_color_gb', 'value': p_value.gb});
}
if (p_value.aa != undefined) {
v2.push({'name': '_color_aa', 'value': p_value.aa});
}
if (p_value.ab != undefined) {
v2.push({'name': '_color_ab', 'value': p_value.ab});
}
if (p_value.redMultiplier != undefined) {
v2.push({'name': '_color_redMultiplier', 'value': p_value.redMultiplier});
}
if (p_value.redOffset != undefined) {
v2.push({'name': '_color_redOffset', 'value': p_value.redOffset});
}
if (p_value.blueMultiplier != undefined) {
v2.push({'name': '_color_blueMultiplier', 'value': p_value.blueMultiplier});
}
if (p_value.blueOffset != undefined) {
v2.push({'name': '_color_blueOffset', 'value': p_value.blueOffset});
}
if (p_value.greenMultiplier != undefined) {
v2.push({'name': '_color_greenMultiplier', 'value': p_value.greenMultiplier});
}
if (p_value.greenOffset != undefined) {
v2.push({'name': '_color_greenOffset', 'value': p_value.greenOffset});
}
if (p_value.alphaMultiplier != undefined) {
v2.push({'name': '_color_alphaMultiplier', 'value': p_value.alphaMultiplier});
}
if (p_value.alphaOffset != undefined) {
v2.push({'name': '_color_alphaOffset', 'value': p_value.alphaOffset});
}
return v2;
};
v1._oldColor_property_get = function (p_obj, p_parameters) {
return ((new Color(p_obj)).getTransform())[p_parameters[0]];
};
v1._oldColor_property_set = function (p_obj, p_value, p_parameters) {
var v1 = new Object();
v1[p_parameters[0]] = p_value;
(new Color(p_obj)).setTransform(v1);
};
v1._color_property_get = function (p_obj, p_parameters) {
return p_obj.transform.colorTransform[p_parameters[0]];
};
v1._color_property_set = function (p_obj, p_value, p_parameters) {
var v1 = p_obj.transform.colorTransform;
v1[p_parameters[0]] = p_value;
p_obj.transform.colorTransform = v1;
};
v1._brightness_get = function (p_obj, p_parameters) {
var v4 = p_parameters[0];
var v1 = (new Color(p_obj)).getTransform();
var v3 = 1 - (v1.ra + v1.ga + v1.ba) / 300;
var v2 = (v1.rb + v1.gb + v1.bb) / 3;
if (v4) {
return v2 > 0 ? v2 / 255 : -v3;
} else {
return v2 / 100;
}
};
v1._brightness_set = function (p_obj, p_value, p_parameters) {
var v5 = p_parameters[0];
var v2;
var v1;
if (v5) {
v2 = 1 - Math.abs(p_value);
v1 = p_value > 0 ? Math.round(p_value * 255) : 0;
} else {
v2 = 1;
v1 = Math.round(p_value * 100);
}
var v4 = {'ra': v2 * 100, 'rb': v1, 'ga': v2 * 100, 'gb': v1, 'ba': v2 * 100, 'bb': v1};
(new Color(p_obj)).setTransform(v4);
};
v1._saturation_get = function (p_obj, p_parameters) {
var v1 = caurina.transitions.properties.ColorShortcuts.getObjectMatrix(p_obj);
var v5 = p_parameters[0];
var v2 = v5 ? 0.3333333333333333 : caurina.transitions.properties.ColorShortcuts.LUMINANCE_R;
var v4 = v5 ? 0.3333333333333333 : caurina.transitions.properties.ColorShortcuts.LUMINANCE_G;
if (!v5) {
var v3 = caurina.transitions.properties.ColorShortcuts.LUMINANCE_B;
var v6 = ((v1[0] - v2) / (1 - v2) + (v1[6] - v4) / (1 - v4) + (v1[12] - v3) / (1 - v3)) / 3;
var v7 = 1 - (v1[1] / v4 + v1[2] / v3 + v1[5] / v2 + v1[7] / v3 + v1[10] / v2 + v1[11] / v4) / 6;
return (v6 + v7) / 2;
}
var v3 = 0.3333333333333333;
var v6 = ((v1[0] - v2) / (1 - v2) + (v1[6] - v4) / (1 - v4) + (v1[12] - v3) / (1 - v3)) / 3;
var v7 = 1 - (v1[1] / v4 + v1[2] / v3 + v1[5] / v2 + v1[7] / v3 + v1[10] / v2 + v1[11] / v4) / 6;
return (v6 + v7) / 2;
};
v1._saturation_set = function (p_obj, p_value, p_parameters) {
var v3 = p_parameters[0];
var v7 = v3 ? 0.3333333333333333 : caurina.transitions.properties.ColorShortcuts.LUMINANCE_R;
var v10 = v3 ? 0.3333333333333333 : caurina.transitions.properties.ColorShortcuts.LUMINANCE_G;
var v8 = v3 ? 0.3333333333333333 : caurina.transitions.properties.ColorShortcuts.LUMINANCE_B;
var v1 = p_value;
var v5 = 1 - v1;
var v2 = v7 * v5;
var v4 = v10 * v5;
var v6 = v8 * v5;
var v9 = [v2 + v1, v4, v6, 0, 0, v2, v4 + v1, v6, 0, 0, v2, v4, v6 + v1, 0, 0, 0, 0, 0, 1, 0];
caurina.transitions.properties.ColorShortcuts.setObjectMatrix(p_obj, v9);
};
v1._contrast_get = function (p_obj, p_parameters) {
var v1 = (new Color(p_obj)).getTransform();
var v3;
var v2;
v3 = (v1.ra + v1.ga + v1.ba) / 300 - 1;
v2 = (v1.rb + v1.gb + v1.bb) / 3 / -128;
return (v3 + v2) / 2;
};
v1._contrast_set = function (p_obj, p_value, p_parameters) {
var v2;
var v1;
v2 = p_value + 1;
v1 = Math.round(p_value * -128);
var v3 = {'ra': v2 * 100, 'rb': v1, 'ga': v2 * 100, 'gb': v1, 'ba': v2 * 100, 'bb': v1};
(new Color(p_obj)).setTransform(v3);
};
v1._hue_get = function (p_obj, p_parameters) {
var v4 = caurina.transitions.properties.ColorShortcuts.getObjectMatrix(p_obj);
var v1 = [];
v1[0] = {'angle': -179.9, 'matrix': caurina.transitions.properties.ColorShortcuts.getHueMatrix(-179.9)};
v1[1] = {'angle': 180, 'matrix': caurina.transitions.properties.ColorShortcuts.getHueMatrix(180)};
var v3 = 0;
while (v3 < v1.length) {
v1[v3].distance = caurina.transitions.properties.ColorShortcuts.getHueDistance(v4, v1[v3].matrix);
++v3;
}
var v5 = 15;
var v2;
v3 = 0;
while (v3 < v5) {
if (v1[0].distance < v1[1].distance) {
v2 = 1;
} else {
v2 = 0;
}
v1[v2].angle = (v1[0].angle + v1[1].angle) / 2;
v1[v2].matrix = caurina.transitions.properties.ColorShortcuts.getHueMatrix(v1[v2].angle);
v1[v2].distance = caurina.transitions.properties.ColorShortcuts.getHueDistance(v4, v1[v2].matrix);
++v3;
}
return v1[v2].angle;
};
v1._hue_set = function (p_obj, p_value, p_parameters) {
caurina.transitions.properties.ColorShortcuts.setObjectMatrix(p_obj, caurina.transitions.properties.ColorShortcuts.getHueMatrix(p_value));
};
v1.getHueDistance = function (mtx1, mtx2) {
return Math.abs(mtx1[0] - mtx2[0]) + Math.abs(mtx1[1] - mtx2[1]) + Math.abs(mtx1[2] - mtx2[2]);
};
v1.getHueMatrix = function (hue) {
var v6 = hue * Math.PI / 180;
var v3 = caurina.transitions.properties.ColorShortcuts.LUMINANCE_R;
var v5 = caurina.transitions.properties.ColorShortcuts.LUMINANCE_G;
var v4 = caurina.transitions.properties.ColorShortcuts.LUMINANCE_B;
var v1 = Math.cos(v6);
var v2 = Math.sin(v6);
var v7 = [v3 + v1 * (1 - v3) + v2 * -v3, v5 + v1 * -v5 + v2 * -v5, v4 + v1 * -v4 + v2 * (1 - v4), 0, 0, v3 + v1 * -v3 + v2 * 0.143, v5 + v1 * (1 - v5) + v2 * 0.14, v4 + v1 * -v4 + v2 * -0.283, 0, 0, v3 + v1 * -v3 + v2 * -(1 - v3), v5 + v1 * -v5 + v2 * v5, v4 + v1 * (1 - v4) + v2 * v4, 0, 0, 0, 0, 0, 1, 0];
return v7;
};
v1.getObjectMatrix = function (p_obj) {
var v1 = 0;
while (v1 < p_obj.filters.length) {
if (p_obj.filters[v1] instanceof flash.filters.ColorMatrixFilter) {
return p_obj.filters[v1].matrix.concat();
}
++v1;
}
return [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
};
v1.setObjectMatrix = function (p_obj, p_matrix) {
var v2 = p_obj.filters.concat();
var v3 = false;
var v1 = 0;
while (v1 < v2.length) {
if (v2[v1] instanceof flash.filters.ColorMatrixFilter) {
v2[v1].matrix = p_matrix.concat();
v3 = true;
}
++v1;
}
if (!v3) {
var v5 = new flash.filters.ColorMatrixFilter(p_matrix);
v2[v2.length] = v5;
}
p_obj.filters = v2;
};
v1.LUMINANCE_R = 0.212671;
v1.LUMINANCE_G = 0.71516;
v1.LUMINANCE_B = 0.072169;
ASSetPropFlags(caurina.transitions.properties.ColorShortcuts.prototype, null, 1);
}
#endinitclip
}
movieClip 830 __Packages.caurina.transitions.Tweener {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.Tweener) {
var v1 = function () {
trace('Tweener is an static class and should not be instantiated.');
};
caurina.transitions.Tweener = v1;
var v2 = v1.prototype;
v1.addTween = function (p_scopes, p_parameters) {
if (p_scopes == undefined) {
return false;
}
var v3;
var v7;
var v2;
var v11;
if (p_scopes instanceof Array) {
v11 = p_scopes.concat();
} else {
v11 = [p_scopes];
}
var v5 = caurina.transitions.TweenListObj.makePropertiesChain(p_parameters);
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
if (!caurina.transitions.Tweener._engineExists || _root[caurina.transitions.Tweener.getControllerName()] == undefined) {
caurina.transitions.Tweener.startEngine();
}
var v19 = isNaN(v5.time) ? 0 : v5.time;
var v12 = isNaN(v5.delay) ? 0 : v5.delay;
var v4 = new Object();
var v24 = {'overwrite': true, 'time': true, 'delay': true, 'useFrames': true, 'skipUpdates': true, 'transition': true, 'transitionParams': true, 'onStart': true, 'onUpdate': true, 'onComplete': true, 'onOverwrite': true, 'onError': true, 'rounded': true, 'onStartParams': true, 'onUpdateParams': true, 'onCompleteParams': true, 'onOverwriteParams': true, 'onStartScope': true, 'onUpdateScope': true, 'onCompleteScope': true, 'onOverwriteScope': true, 'onErrorScope': true};
var v13 = new Object();
for (v2 in v5) {
if (!v24[v2]) {
if (caurina.transitions.Tweener._specialPropertySplitterList[v2] != undefined) {
var v8 = caurina.transitions.Tweener._specialPropertySplitterList[v2].splitValues(v5[v2], caurina.transitions.Tweener._specialPropertySplitterList[v2].parameters);
v3 = 0;
while (v3 < v8.length) {
if (caurina.transitions.Tweener._specialPropertySplitterList[v8[v3].name] != undefined) {
var v9 = caurina.transitions.Tweener._specialPropertySplitterList[v8[v3].name].splitValues(v8[v3].value, caurina.transitions.Tweener._specialPropertySplitterList[v8[v3].name].parameters);
v7 = 0;
while (v7 < v9.length) {
v4[v9[v7].name] = {'valueStart': undefined, 'valueComplete': v9[v7].value, 'arrayIndex': v9[v7].arrayIndex, 'isSpecialProperty': false};
++v7;
}
} else {
v4[v8[v3].name] = {'valueStart': undefined, 'valueComplete': v8[v3].value, 'arrayIndex': v8[v3].arrayIndex, 'isSpecialProperty': false};
}
++v3;
}
} else {
if (caurina.transitions.Tweener._specialPropertyModifierList[v2] != undefined) {
var v10 = caurina.transitions.Tweener._specialPropertyModifierList[v2].modifyValues(v5[v2]);
v3 = 0;
while (v3 < v10.length) {
v13[v10[v3].name] = {'modifierParameters': v10[v3].parameters, 'modifierFunction': caurina.transitions.Tweener._specialPropertyModifierList[v2].getValue};
++v3;
}
} else {
v4[v2] = {'valueStart': undefined, 'valueComplete': v5[v2]};
}
}
}
}
for (v2 in v4) {
if (caurina.transitions.Tweener._specialPropertyList[v2] != undefined) {
v4[v2].isSpecialProperty = true;
} else {
if (v11[0][v2] == undefined) {
caurina.transitions.Tweener.printError('The property \'' + v2 + '\' doesn\'t seem to be a normal object property of ' + v11[0].toString() + ' or a registered special property.');
}
}
}
for (v2 in v13) {
if (v4[v2] != undefined) {
v4[v2].modifierParameters = v13[v2].modifierParameters;
v4[v2].modifierFunction = v13[v2].modifierFunction;
}
}
var v21;
if (typeof v5.transition == 'string') {
var v26 = v5.transition.toLowerCase();
v21 = caurina.transitions.Tweener._transitionList[v26];
} else {
v21 = v5.transition;
}
if (v21 == undefined) {
v21 = caurina.transitions.Tweener._transitionList.easeoutexpo;
}
var v14;
var v6;
var v20;
v3 = 0;
while (v3 < v11.length) {
v14 = new Object();
for (v2 in v4) {
v14[v2] = new caurina.transitions.PropertyInfoObj(v4[v2].valueStart, v4[v2].valueComplete, v4[v2].valueComplete, v4[v2].arrayIndex, {}, v4[v2].isSpecialProperty, v4[v2].modifierFunction, v4[v2].modifierParameters);
}
if (v5.useFrames == true) {
v6 = new caurina.transitions.TweenListObj(v11[v3], caurina.transitions.Tweener._currentTimeFrame + v12 / caurina.transitions.Tweener._timeScale, caurina.transitions.Tweener._currentTimeFrame + (v12 + v19) / caurina.transitions.Tweener._timeScale, true, v21, v5.transitionParams);
} else {
v6 = new caurina.transitions.TweenListObj(v11[v3], caurina.transitions.Tweener._currentTime + v12 * 1000 / caurina.transitions.Tweener._timeScale, caurina.transitions.Tweener._currentTime + (v12 * 1000 + v19 * 1000) / caurina.transitions.Tweener._timeScale, false, v21, v5.transitionParams);
}
v6.properties = v14;
v6.onStart = v5.onStart;
v6.onUpdate = v5.onUpdate;
v6.onComplete = v5.onComplete;
v6.onOverwrite = v5.onOverwrite;
v6.onError = v5.onError;
v6.onStartParams = v5.onStartParams;
v6.onUpdateParams = v5.onUpdateParams;
v6.onCompleteParams = v5.onCompleteParams;
v6.onOverwriteParams = v5.onOverwriteParams;
v6.onStartScope = v5.onStartScope;
v6.onUpdateScope = v5.onUpdateScope;
v6.onCompleteScope = v5.onCompleteScope;
v6.onOverwriteScope = v5.onOverwriteScope;
v6.onErrorScope = v5.onErrorScope;
v6.rounded = v5.rounded;
v6.skipUpdates = v5.skipUpdates;
if ((v5.overwrite == undefined) ? caurina.transitions.Tweener.autoOverwrite : v5.overwrite) {
caurina.transitions.Tweener.removeTweensByTime(v6.scope, v6.properties, v6.timeStart, v6.timeComplete);
}
caurina.transitions.Tweener._tweenList.push(v6);
if (v19 == 0 && v12 == 0) {
v20 = caurina.transitions.Tweener._tweenList.length - 1;
caurina.transitions.Tweener.updateTweenByIndex(v20);
caurina.transitions.Tweener.removeTweenByIndex(v20);
}
++v3;
}
return true;
};
v1.addCaller = function (p_scopes, p_parameters) {
if (p_scopes == undefined) {
return false;
}
var v5;
var v6;
if (p_scopes instanceof Array) {
v6 = p_scopes.concat();
} else {
v6 = [p_scopes];
}
var v3 = p_parameters;
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
if (!caurina.transitions.Tweener._engineExists || _root[caurina.transitions.Tweener.getControllerName()] == undefined) {
caurina.transitions.Tweener.startEngine();
}
var v7 = isNaN(v3.time) ? 0 : v3.time;
var v4 = isNaN(v3.delay) ? 0 : v3.delay;
var v9;
if (typeof v3.transition == 'string') {
var v11 = v3.transition.toLowerCase();
v9 = caurina.transitions.Tweener._transitionList[v11];
} else {
v9 = v3.transition;
}
if (v9 == undefined) {
v9 = caurina.transitions.Tweener._transitionList.easeoutexpo;
}
var v2;
var v8;
v5 = 0;
while (v5 < v6.length) {
if (v3.useFrames == true) {
v2 = new caurina.transitions.TweenListObj(v6[v5], caurina.transitions.Tweener._currentTimeFrame + v4 / caurina.transitions.Tweener._timeScale, caurina.transitions.Tweener._currentTimeFrame + (v4 + v7) / caurina.transitions.Tweener._timeScale, true, v9, v3.transitionParams);
} else {
v2 = new caurina.transitions.TweenListObj(v6[v5], caurina.transitions.Tweener._currentTime + v4 * 1000 / caurina.transitions.Tweener._timeScale, caurina.transitions.Tweener._currentTime + (v4 * 1000 + v7 * 1000) / caurina.transitions.Tweener._timeScale, false, v9, v3.transitionParams);
}
v2.properties = undefined;
v2.onStart = v3.onStart;
v2.onUpdate = v3.onUpdate;
v2.onComplete = v3.onComplete;
v2.onOverwrite = v3.onOverwrite;
v2.onStartParams = v3.onStartParams;
v2.onUpdateParams = v3.onUpdateParams;
v2.onCompleteParams = v3.onCompleteParams;
v2.onOverwriteParams = v3.onOverwriteParams;
v2.onStartScope = v3.onStartScope;
v2.onUpdateScope = v3.onUpdateScope;
v2.onCompleteScope = v3.onCompleteScope;
v2.onOverwriteScope = v3.onOverwriteScope;
v2.onErrorScope = v3.onErrorScope;
v2.isCaller = true;
v2.count = v3.count;
v2.waitFrames = v3.waitFrames;
caurina.transitions.Tweener._tweenList.push(v2);
if (v7 == 0 && v4 == 0) {
v8 = caurina.transitions.Tweener._tweenList.length - 1;
caurina.transitions.Tweener.updateTweenByIndex(v8);
caurina.transitions.Tweener.removeTweenByIndex(v8);
}
++v5;
}
return true;
};
v1.removeTweensByTime = function (p_scope, p_properties, p_timeStart, p_timeComplete) {
var v5 = false;
var v4;
var v1;
var v7 = caurina.transitions.Tweener._tweenList.length;
var v2;
v1 = 0;
while (v1 < v7) {
if (p_scope == caurina.transitions.Tweener._tweenList[v1].scope) {
if (p_timeComplete > caurina.transitions.Tweener._tweenList[v1].timeStart && p_timeStart < caurina.transitions.Tweener._tweenList[v1].timeComplete) {
v4 = false;
for (v2 in caurina.transitions.Tweener._tweenList[v1].properties) {
if (p_properties[v2] != undefined) {
if (caurina.transitions.Tweener._tweenList[v1].onOverwrite != undefined) {
var v3 = (caurina.transitions.Tweener._tweenList[v1].onOverwriteScope != undefined) ? caurina.transitions.Tweener._tweenList[v1].onOverwriteScope : caurina.transitions.Tweener._tweenList[v1].scope;
try {
caurina.transitions.Tweener._tweenList[v1].onOverwrite.apply(v3, caurina.transitions.Tweener._tweenList[v1].onOverwriteParams);
}
catch (enumerate caurina.transitions.Tweener._tweenList[v1].properties) {
if (Error(enumerate caurina.transitions.Tweener._tweenList[v1].properties) != null) {
var e = Error(enumerate caurina.transitions.Tweener._tweenList[v1].properties);
caurina.transitions.Tweener.handleError(caurina.transitions.Tweener._tweenList[v1], e, 'onOverwrite');
} else {
throw enumerate caurina.transitions.Tweener._tweenList[v1].properties;
}
}
}
caurina.transitions.Tweener._tweenList[v1].properties[v2] = undefined;
delete caurina.transitions.Tweener._tweenList[v1].properties[v2];
v4 = true;
v5 = true;
}
}
if (v4) {
if (caurina.transitions.AuxFunctions.getObjectLength(caurina.transitions.Tweener._tweenList[v1].properties) == 0) {
caurina.transitions.Tweener.removeTweenByIndex(v1);
}
}
}
}
++v1;
}
return v5;
};
v1.removeTweens = function (p_scope) {
var v5 = new Array();
var v3;
v3 = 1;
while (v3 < arguments.length) {
if (typeof arguments[v3] == 'string' && !caurina.transitions.AuxFunctions.isInArray(arguments[v3], v5)) {
if (caurina.transitions.Tweener._specialPropertySplitterList[arguments[v3]]) {
var v6 = caurina.transitions.Tweener._specialPropertySplitterList[arguments[v3]];
var v4 = v6.splitValues(p_scope, null);
var v2 = 0;
while (v2 < v4.length) {
v5.push(v4[v2].name);
++v2;
}
} else {
v5.push(arguments[v3]);
}
}
++v3;
}
return caurina.transitions.Tweener.affectTweens(caurina.transitions.Tweener.removeTweenByIndex, p_scope, v5);
};
v1.removeAllTweens = function () {
var v2 = false;
var v1;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
caurina.transitions.Tweener.removeTweenByIndex(v1);
v2 = true;
++v1;
}
return v2;
};
v1.pauseTweens = function (p_scope) {
var v3 = new Array();
var v2;
v2 = 1;
while (v2 < arguments.length) {
if (typeof arguments[v2] == 'string' && !caurina.transitions.AuxFunctions.isInArray(arguments[v2], v3)) {
v3.push(arguments[v2]);
}
++v2;
}
return caurina.transitions.Tweener.affectTweens(caurina.transitions.Tweener.pauseTweenByIndex, p_scope, v3);
};
v1.pauseAllTweens = function () {
var v2 = false;
var v1;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
caurina.transitions.Tweener.pauseTweenByIndex(v1);
v2 = true;
++v1;
}
return v2;
};
v1.resumeTweens = function (p_scope) {
var v3 = new Array();
var v2;
v2 = 1;
while (v2 < arguments.length) {
if (typeof arguments[v2] == 'string' && !caurina.transitions.AuxFunctions.isInArray(arguments[v2], v3)) {
v3.push(arguments[v2]);
}
++v2;
}
return caurina.transitions.Tweener.affectTweens(caurina.transitions.Tweener.resumeTweenByIndex, p_scope, v3);
};
v1.resumeAllTweens = function () {
var v2 = false;
var v1;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
caurina.transitions.Tweener.resumeTweenByIndex(v1);
v2 = true;
++v1;
}
return v2;
};
v1.affectTweens = function (p_affectFunction, p_scope, p_properties) {
var v5 = false;
var v2;
if (!caurina.transitions.Tweener._tweenList) {
return false;
}
v2 = 0;
while (v2 < caurina.transitions.Tweener._tweenList.length) {
if (caurina.transitions.Tweener._tweenList[v2].scope == p_scope) {
if (p_properties.length == 0) {
p_affectFunction(v2);
v5 = true;
} else {
var v4 = new Array();
var v1;
v1 = 0;
while (v1 < p_properties.length) {
if (caurina.transitions.Tweener._tweenList[v2].properties[p_properties[v1]] != undefined) {
v4.push(p_properties[v1]);
}
++v1;
}
if (v4.length > 0) {
var v7 = caurina.transitions.AuxFunctions.getObjectLength(caurina.transitions.Tweener._tweenList[v2].properties);
if (v7 == v4.length) {
p_affectFunction(v2);
v5 = true;
} else {
var v8 = caurina.transitions.Tweener.splitTweens(v2, v4);
p_affectFunction(v8);
v5 = true;
}
}
}
}
++v2;
}
return v5;
};
v1.splitTweens = function (p_tween, p_properties) {
var v6 = caurina.transitions.Tweener._tweenList[p_tween];
var v5 = v6.clone(false);
var v1;
var v2;
v1 = 0;
while (v1 < p_properties.length) {
v2 = p_properties[v1];
if (v6.properties[v2] != undefined) {
v6.properties[v2] = undefined;
delete v6.properties[v2];
}
++v1;
}
var v4;
for (v2 in v5.properties) {
v4 = false;
v1 = 0;
while (v1 < p_properties.length) {
if (p_properties[v1] == v2) {
v4 = true;
break;
}
++v1;
}
if (!v4) {
v5.properties[v2] = undefined;
delete v5.properties[v2];
}
}
caurina.transitions.Tweener._tweenList.push(v5);
return caurina.transitions.Tweener._tweenList.length - 1;
};
v1.updateTweens = function () {
if (caurina.transitions.Tweener._tweenList.length == 0) {
return false;
}
var v1;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
if (!caurina.transitions.Tweener._tweenList[v1].isPaused) {
if (!caurina.transitions.Tweener.updateTweenByIndex(v1)) {
caurina.transitions.Tweener.removeTweenByIndex(v1);
}
if (caurina.transitions.Tweener._tweenList[v1] == null) {
caurina.transitions.Tweener.removeTweenByIndex(v1, true);
--v1;
}
}
++v1;
}
return true;
};
v1.removeTweenByIndex = function (p_tween, p_finalRemoval) {
caurina.transitions.Tweener._tweenList[p_tween] = null;
if (p_finalRemoval) {
caurina.transitions.Tweener._tweenList.splice(p_tween, 1);
}
return true;
};
v1.pauseTweenByIndex = function (p_tween) {
var v1 = caurina.transitions.Tweener._tweenList[p_tween];
if (v1 == null || v1.isPaused) {
return false;
}
v1.timePaused = caurina.transitions.Tweener.getCurrentTweeningTime(v1);
v1.isPaused = true;
return true;
};
v1.resumeTweenByIndex = function (p_tween) {
var v1 = caurina.transitions.Tweener._tweenList[p_tween];
if (v1 == null || !v1.isPaused) {
return false;
}
var v2 = caurina.transitions.Tweener.getCurrentTweeningTime(v1);
v1.timeStart += v2 - v1.timePaused;
v1.timeComplete += v2 - v1.timePaused;
v1.timePaused = undefined;
v1.isPaused = false;
return true;
};
v1.updateTweenByIndex = function (i) {
var v1 = caurina.transitions.Tweener._tweenList[i];
if (v1 == null || !v1.scope) {
return false;
}
var v13 = false;
var v14;
var v3;
var v7;
var v10;
var v9;
var v6;
var v2;
var v12;
var v5;
var v8 = caurina.transitions.Tweener.getCurrentTweeningTime(v1);
var v4;
if (v8 >= v1.timeStart) {
v5 = v1.scope;
if (v1.isCaller) {
do {
v7 = ((v1.timeComplete - v1.timeStart) / v1.count) * (v1.timesCalled + 1);
v10 = v1.timeStart;
v9 = v1.timeComplete - v1.timeStart;
v6 = v1.timeComplete - v1.timeStart;
v3 = v1.transition(v7, v10, v9, v6, v1.transitionParams);
if (v8 >= v3) {
if (v1.onUpdate != undefined) {
v12 = (v1.onUpdateScope != undefined) ? v1.onUpdateScope : v5;
try {
v1.onUpdate.apply(v12, v1.onUpdateParams);
}
catch (v0) {
if (Error(v0) != null) {
var e = Error(v0);
caurina.transitions.Tweener.handleError(v1, e, 'onUpdate');
} else {
throw v0;
}
}
}
++v1.timesCalled;
if (v1.timesCalled >= v1.count) {
v13 = true;
break;
}
if (v1.waitFrames) {
break;
}
}
} while (v8 >= v3);
} else {
v14 = v1.skipUpdates < 1 || v1.skipUpdates == undefined || v1.updatesSkipped >= v1.skipUpdates;
if (v8 >= v1.timeComplete) {
v13 = true;
v14 = true;
}
if (!v1.hasStarted) {
if (v1.onStart != undefined) {
v12 = (v1.onStartScope != undefined) ? v1.onStartScope : v5;
try {
v1.onStart.apply(v12, v1.onStartParams);
}
catch (v0) {
if (Error(v0) != null) {
var e = Error(v0);
caurina.transitions.Tweener.handleError(v1, e, 'onStart');
} else {
throw v0;
}
}
}
var v11;
for (v2 in v1.properties) {
if (v1.properties[v2].isSpecialProperty) {
if (caurina.transitions.Tweener._specialPropertyList[v2].preProcess != undefined) {
v1.properties[v2].valueComplete = caurina.transitions.Tweener._specialPropertyList[v2].preProcess(v5, caurina.transitions.Tweener._specialPropertyList[v2].parameters, v1.properties[v2].originalValueComplete, v1.properties[v2].extra);
}
v11 = caurina.transitions.Tweener._specialPropertyList[v2].getValue(v5, caurina.transitions.Tweener._specialPropertyList[v2].parameters, v1.properties[v2].extra);
} else {
v11 = v5[v2];
}
v1.properties[v2].valueStart = isNaN(v11) ? v1.properties[v2].valueComplete : v11;
}
v14 = true;
v1.hasStarted = true;
}
if (v14) {
for (v2 in v1.properties) {
v4 = v1.properties[v2];
if (v13) {
v3 = v4.valueComplete;
} else {
if (v4.hasModifier) {
v7 = v8 - v1.timeStart;
v6 = v1.timeComplete - v1.timeStart;
v3 = v1.transition(v7, 0, 1, v6, v1.transitionParams);
v3 = v4.modifierFunction(v4.valueStart, v4.valueComplete, v3, v4.modifierParameters);
} else {
v7 = v8 - v1.timeStart;
v10 = v4.valueStart;
v9 = v4.valueComplete - v4.valueStart;
v6 = v1.timeComplete - v1.timeStart;
v3 = v1.transition(v7, v10, v9, v6, v1.transitionParams);
}
}
if (v1.rounded) {
v3 = Math.round(v3);
}
if (v4.isSpecialProperty) {
caurina.transitions.Tweener._specialPropertyList[v2].setValue(v5, v3, caurina.transitions.Tweener._specialPropertyList[v2].parameters, v1.properties[v2].extra);
} else {
v5[v2] = v3;
}
}
v1.updatesSkipped = 0;
if (v1.onUpdate != undefined) {
v12 = (v1.onUpdateScope != undefined) ? v1.onUpdateScope : v5;
try {
v1.onUpdate.apply(v12, v1.onUpdateParams);
}
catch (enumerate v1.properties) {
if (Error(enumerate v1.properties) != null) {
var e = Error(enumerate v1.properties);
caurina.transitions.Tweener.handleError(v1, e, 'onUpdate');
} else {
throw enumerate v1.properties;
}
}
}
} else {
++v1.updatesSkipped;
}
}
if (v13 && v1.onComplete != undefined) {
v12 = (v1.onCompleteScope != undefined) ? v1.onCompleteScope : v5;
try {
v1.onComplete.apply(v12, v1.onCompleteParams);
}
catch (enumerate v1.properties) {
if (Error(enumerate v1.properties) != null) {
var e = Error(enumerate v1.properties);
caurina.transitions.Tweener.handleError(v1, e, 'onComplete');
} else {
throw enumerate v1.properties;
}
}
}
return !v13;
}
return true;
};
v1.init = function () {
caurina.transitions.Tweener._inited = true;
caurina.transitions.Tweener._transitionList = new Object();
caurina.transitions.Equations.init();
caurina.transitions.Tweener._specialPropertyList = new Object();
caurina.transitions.Tweener._specialPropertyModifierList = new Object();
caurina.transitions.Tweener._specialPropertySplitterList = new Object();
};
v1.registerTransition = function (p_name, p_function) {
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
caurina.transitions.Tweener._transitionList[p_name] = p_function;
};
v1.registerSpecialProperty = function (p_name, p_getFunction, p_setFunction, p_parameters, p_preProcessFunction) {
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
var v1 = new caurina.transitions.SpecialProperty(p_getFunction, p_setFunction, p_parameters, p_preProcessFunction);
caurina.transitions.Tweener._specialPropertyList[p_name] = v1;
};
v1.registerSpecialPropertyModifier = function (p_name, p_modifyFunction, p_getFunction) {
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
var v1 = new caurina.transitions.SpecialPropertyModifier(p_modifyFunction, p_getFunction);
caurina.transitions.Tweener._specialPropertyModifierList[p_name] = v1;
};
v1.registerSpecialPropertySplitter = function (p_name, p_splitFunction, p_parameters) {
if (!caurina.transitions.Tweener._inited) {
caurina.transitions.Tweener.init();
}
var v1 = new caurina.transitions.SpecialPropertySplitter(p_splitFunction, p_parameters);
caurina.transitions.Tweener._specialPropertySplitterList[p_name] = v1;
};
v1.startEngine = function () {
caurina.transitions.Tweener._engineExists = true;
caurina.transitions.Tweener._tweenList = new Array();
var v2 = Math.floor(Math.random() * 999999);
var v3 = _root.createEmptyMovieClip(caurina.transitions.Tweener.getControllerName(), 31338 + v2);
v3.onEnterFrame = function () {
caurina.transitions.Tweener.onEnterFrame();
};
caurina.transitions.Tweener._currentTimeFrame = 0;
caurina.transitions.Tweener.updateTime();
};
v1.stopEngine = function () {
caurina.transitions.Tweener._engineExists = false;
caurina.transitions.Tweener._tweenList = null;
caurina.transitions.Tweener._currentTime = 0;
caurina.transitions.Tweener._currentTimeFrame = 0;
delete _root[caurina.transitions.Tweener.getControllerName()].onEnterFrame;
_root[caurina.transitions.Tweener.getControllerName()].removeMovieClip();
};
v1.updateTime = function () {
caurina.transitions.Tweener._currentTime = getTimer();
};
v1.updateFrame = function () {
++caurina.transitions.Tweener._currentTimeFrame;
};
v1.onEnterFrame = function () {
caurina.transitions.Tweener.updateTime();
caurina.transitions.Tweener.updateFrame();
var v1 = false;
v1 = caurina.transitions.Tweener.updateTweens();
if (!v1) {
caurina.transitions.Tweener.stopEngine();
}
};
v1.setTimeScale = function (p_time) {
var v1;
var v2;
if (isNaN(p_time)) {
p_time = 1;
}
if (p_time < 1.0e-005) {
p_time = 1.0e-005;
}
if (p_time != caurina.transitions.Tweener._timeScale) {
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
v2 = caurina.transitions.Tweener.getCurrentTweeningTime(caurina.transitions.Tweener._tweenList[v1]);
caurina.transitions.Tweener._tweenList[v1].timeStart = v2 - (v2 - caurina.transitions.Tweener._tweenList[v1].timeStart) * caurina.transitions.Tweener._timeScale / p_time;
caurina.transitions.Tweener._tweenList[v1].timeComplete = v2 - (v2 - caurina.transitions.Tweener._tweenList[v1].timeComplete) * caurina.transitions.Tweener._timeScale / p_time;
if (caurina.transitions.Tweener._tweenList[v1].timePaused != undefined) {
caurina.transitions.Tweener._tweenList[v1].timePaused = v2 - (v2 - caurina.transitions.Tweener._tweenList[v1].timePaused) * caurina.transitions.Tweener._timeScale / p_time;
}
++v1;
}
caurina.transitions.Tweener._timeScale = p_time;
}
};
v1.isTweening = function (p_scope) {
var v1;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
if (caurina.transitions.Tweener._tweenList[v1].scope == p_scope) {
return true;
}
++v1;
}
return false;
};
v1.getTweens = function (p_scope) {
var v1;
var v2;
var v3 = new Array();
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
if (caurina.transitions.Tweener._tweenList[v1].scope == p_scope) {
for (v2 in caurina.transitions.Tweener._tweenList[v1].properties) {
v3.push(v2);
}
}
++v1;
}
return v3;
};
v1.getTweenCount = function (p_scope) {
var v1;
var v2 = 0;
v1 = 0;
while (v1 < caurina.transitions.Tweener._tweenList.length) {
if (caurina.transitions.Tweener._tweenList[v1].scope == p_scope) {
v2 += caurina.transitions.AuxFunctions.getObjectLength(caurina.transitions.Tweener._tweenList[v1].properties);
}
++v1;
}
return v2;
};
v1.handleError = function (pTweening, pError, pCallBackName) {
if (pTweening.onError != undefined && typeof (pTweening.onError == 'function')) {
var v3 = (pTweening.onErrorScope != undefined) ? pTweening.onErrorScope : pTweening.scope;
try {
pTweening.onError.apply(v3, [pTweening.scope, pError]);
}
catch (v0) {
if (Error(v0) != null) {
var metaError = Error(v0);
caurina.transitions.Tweener.printError(pTweening.scope.toString() + ' raised an error while executing the \'onError\' handler. Original error:\n ' + pError + '\nonError error: ' + metaError);
} else {
throw v0;
}
}
} else {
if (pTweening.onError == undefined) {
caurina.transitions.Tweener.printError(pTweening.scope.toString() + ' raised an error while executing the \'' + pCallBackName.toString() + '\'handler. \n' + pError);
}
}
};
v1.getCurrentTweeningTime = function (p_tweening) {
return p_tweening.useFrames ? caurina.transitions.Tweener._currentTimeFrame : caurina.transitions.Tweener._currentTime;
};
v1.getVersion = function () {
return 'AS2 1.33.74';
};
v1.getControllerName = function () {
return '__tweener_controller__' + caurina.transitions.Tweener.getVersion();
};
v1.printError = function (p_message) {
trace('## [Tweener] Error: ' + p_message);
};
v1._engineExists = false;
v1._inited = false;
v1._timeScale = 1;
v1.autoOverwrite = true;
ASSetPropFlags(caurina.transitions.Tweener.prototype, null, 1);
}
#endinitclip
}
movieClip 831 __Packages.caurina.transitions.TweenListObj {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.TweenListObj) {
var v1 = function (p_scope, p_timeStart, p_timeComplete, p_useFrames, p_transition, p_transitionParams) {
this.scope = p_scope;
this.timeStart = p_timeStart;
this.timeComplete = p_timeComplete;
this.useFrames = p_useFrames;
this.transition = p_transition;
this.transitionParams = p_transitionParams;
this.properties = new Object();
this.isPaused = false;
this.timePaused = undefined;
this.isCaller = false;
this.updatesSkipped = 0;
this.timesCalled = 0;
this.skipUpdates = 0;
this.hasStarted = false;
};
caurina.transitions.TweenListObj = v1;
var v2 = v1.prototype;
v2.clone = function (omitEvents) {
var v2 = new caurina.transitions.TweenListObj(this.scope, this.timeStart, this.timeComplete, this.useFrames, this.transition, this.transitionParams);
v2.properties = new Object();
for (var v3 in this.properties) {
v2.properties[v3] = this.properties[v3].clone();
}
v2.skipUpdates = this.skipUpdates;
v2.updatesSkipped = this.updatesSkipped;
if (!omitEvents) {
v2.onStart = this.onStart;
v2.onUpdate = this.onUpdate;
v2.onComplete = this.onComplete;
v2.onOverwrite = this.onOverwrite;
v2.onError = this.onError;
v2.onStartParams = this.onStartParams;
v2.onUpdateParams = this.onUpdateParams;
v2.onCompleteParams = this.onCompleteParams;
v2.onOverwriteParams = this.onOverwriteParams;
v2.onStartScope = this.onStartScope;
v2.onUpdateScope = this.onUpdateScope;
v2.onCompleteScope = this.onCompleteScope;
v2.onOverwriteScope = this.onOverwriteScope;
v2.onErrorScope = this.onErrorScope;
}
v2.rounded = this.rounded;
v2.isPaused = this.isPaused;
v2.timePaused = this.timePaused;
v2.isCaller = this.isCaller;
v2.count = this.count;
v2.timesCalled = this.timesCalled;
v2.waitFrames = this.waitFrames;
v2.hasStarted = this.hasStarted;
return v2;
};
v2.toString = function () {
var v2 = '\n[TweenListObj ';
v2 += 'scope:' + String(this.scope);
v2 += ', properties:';
var v3 = true;
for (var v4 in this.properties) {
if (!v3) {
v2 += ',';
}
v2 += '[name:' + this.properties[v4].name;
v2 += ',valueStart:' + this.properties[v4].valueStart;
v2 += ',valueComplete:' + this.properties[v4].valueComplete;
v2 += ']';
v3 = false;
}
v2 += ', timeStart:' + String(this.timeStart);
v2 += ', timeComplete:' + String(this.timeComplete);
v2 += ', useFrames:' + String(this.useFrames);
v2 += ', transition:' + String(this.transition);
v2 += ', transitionParams:' + String(this.transitionParams);
if (this.skipUpdates) {
v2 += ', skipUpdates:' + String(this.skipUpdates);
}
if (this.updatesSkipped) {
v2 += ', updatesSkipped:' + String(this.updatesSkipped);
}
if (this.onStart) {
v2 += ', onStart:' + String(this.onStart);
}
if (this.onUpdate) {
v2 += ', onUpdate:' + String(this.onUpdate);
}
if (this.onComplete) {
v2 += ', onComplete:' + String(this.onComplete);
}
if (this.onOverwrite) {
v2 += ', onOverwrite:' + String(this.onOverwrite);
}
if (this.onError) {
v2 += ', onError:' + String(this.onError);
}
if (this.onStartParams) {
v2 += ', onStartParams:' + String(this.onStartParams);
}
if (this.onUpdateParams) {
v2 += ', onUpdateParams:' + String(this.onUpdateParams);
}
if (this.onCompleteParams) {
v2 += ', onCompleteParams:' + String(this.onCompleteParams);
}
if (this.onOverwriteParams) {
v2 += ', onOverwriteParams:' + String(this.onOverwriteParams);
}
if (this.onStartScope) {
v2 += ', onStartScope:' + String(this.onStartScope);
}
if (this.onUpdateScope) {
v2 += ', onUpdateScope:' + String(this.onUpdateScope);
}
if (this.onCompleteScope) {
v2 += ', onCompleteScope:' + String(this.onCompleteScope);
}
if (this.onOverwriteScope) {
v2 += ', onOverwriteScope:' + String(this.onOverwriteScope);
}
if (this.onErrorScope) {
v2 += ', onErrorScope:' + String(this.onErrorScope);
}
if (this.rounded) {
v2 += ', rounded:' + String(this.rounded);
}
if (this.isPaused) {
v2 += ', isPaused:' + String(this.isPaused);
}
if (this.timePaused) {
v2 += ', timePaused:' + String(this.timePaused);
}
if (this.isCaller) {
v2 += ', isCaller:' + String(this.isCaller);
}
if (this.count) {
v2 += ', count:' + String(this.count);
}
if (this.timesCalled) {
v2 += ', timesCalled:' + String(this.timesCalled);
}
if (this.waitFrames) {
v2 += ', waitFrames:' + String(this.waitFrames);
}
if (this.hasStarted) {
v2 += ', hasStarted:' + String(this.hasStarted);
}
v2 += ']\n';
return v2;
};
v1.makePropertiesChain = function (p_obj) {
var v6 = p_obj.base;
if (v6) {
var v5 = {};
var v2;
if (v6 instanceof Array) {
v2 = [];
var v3 = 0;
while (v3 < v6.length) {
v2.push(v6[v3]);
++v3;
}
} else {
v2 = [v6];
}
v2.push(p_obj);
var v4;
var v7 = v2.length;
var v1 = 0;
while (v1 < v7) {
if (v2[v1].base) {
v4 = caurina.transitions.AuxFunctions.concatObjects(caurina.transitions.TweenListObj.makePropertiesChain(v2[v1].base), v2[v1]);
} else {
v4 = v2[v1];
}
v5 = caurina.transitions.AuxFunctions.concatObjects(v5, v4);
++v1;
}
if (v5.base) {
delete v5.base;
}
return v5;
} else {
return p_obj;
}
};
ASSetPropFlags(caurina.transitions.TweenListObj.prototype, null, 1);
}
#endinitclip
}
movieClip 832 __Packages.caurina.transitions.AuxFunctions {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.AuxFunctions) {
var v1 = function () {};
caurina.transitions.AuxFunctions = v1;
var v2 = v1.prototype;
v1.numberToR = function (p_num) {
return (p_num & 16711680) >> 16;
};
v1.numberToG = function (p_num) {
return (p_num & 65280) >> 8;
};
v1.numberToB = function (p_num) {
return p_num & 255;
};
v1.isInArray = function (p_string, p_array) {
var v2 = p_array.length;
var v1 = 0;
while (v1 < v2) {
if (p_array[v1] == p_string) {
return true;
}
++v1;
}
return false;
};
v1.getObjectLength = function (p_object) {
var v1 = 0;
for (var v2 in p_object) {
++v1;
}
return v1;
};
v1.concatObjects = function () {
var v4 = {};
var v2;
var v3 = 0;
while (v3 < arguments.length) {
v2 = arguments[v3];
for (var v5 in v2) {
if (v2[v5] == null) {
delete v4[v5];
} else {
v4[v5] = v2[v5];
}
}
++v3;
}
return v4;
};
ASSetPropFlags(caurina.transitions.AuxFunctions.prototype, null, 1);
}
#endinitclip
}
movieClip 833 __Packages.caurina.transitions.PropertyInfoObj {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.PropertyInfoObj) {
var v1 = function (p_valueStart, p_valueComplete, p_originalValueComplete, p_arrayIndex, p_extra, p_isSpecialProperty, p_modifierFunction, p_modifierParameters) {
this.valueStart = p_valueStart;
this.valueComplete = p_valueComplete;
this.originalValueComplete = p_originalValueComplete;
this.arrayIndex = p_arrayIndex;
this.extra = p_extra;
this.isSpecialProperty = p_isSpecialProperty;
this.hasModifier = p_modifierFunction != undefined;
this.modifierFunction = p_modifierFunction;
this.modifierParameters = p_modifierParameters;
};
caurina.transitions.PropertyInfoObj = v1;
var v2 = v1.prototype;
v2.clone = function () {
var v2 = new caurina.transitions.PropertyInfoObj(this.valueStart, this.valueComplete, this.originalValueComplete, this.arrayIndex, this.extra, this.isSpecialProperty, this.modifierFunction, this.modifierParameters);
return v2;
};
v2.toString = function () {
var v2 = '\n[PropertyInfoObj ';
v2 += 'valueStart:' + String(this.valueStart);
v2 += ', ';
v2 += 'valueComplete:' + String(this.valueComplete);
v2 += ', ';
v2 += 'originalValueComplete:' + String(this.originalValueComplete);
v2 += ', ';
v2 += 'arrayIndex:' + String(this.arrayIndex);
v2 += ', ';
v2 += 'extra:' + String(this.extra);
v2 += ', ';
v2 += 'isSpecialProperty:' + String(this.isSpecialProperty);
v2 += ', ';
v2 += 'hasModifier:' + String(this.hasModifier);
v2 += ', ';
v2 += 'modifierFunction:' + String(this.modifierFunction);
v2 += ', ';
v2 += 'modifierParameters:' + String(this.modifierParameters);
v2 += ']\n';
return v2;
};
ASSetPropFlags(caurina.transitions.PropertyInfoObj.prototype, null, 1);
}
#endinitclip
}
movieClip 834 __Packages.caurina.transitions.SpecialPropertySplitter {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.SpecialPropertySplitter) {
var v1 = function (p_splitFunction, p_parameters) {
this.splitValues = p_splitFunction;
this.parameters = p_parameters;
};
caurina.transitions.SpecialPropertySplitter = v1;
var v2 = v1.prototype;
v2.splitValues = function (p_value, p_parameters) {
return [];
};
v2.toString = function () {
var v2 = '';
v2 += '[SpecialPropertySplitter ';
v2 += 'splitValues:' + this.splitValues.toString();
v2 += ', ';
v2 += 'parameters:' + this.parameters.toString();
v2 += ']';
return v2;
};
ASSetPropFlags(caurina.transitions.SpecialPropertySplitter.prototype, null, 1);
}
#endinitclip
}
movieClip 835 __Packages.caurina.transitions.Equations {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.Equations) {
var v1 = function () {
trace('Equations is a static class and should not be instantiated.');
};
caurina.transitions.Equations = v1;
var v2 = v1.prototype;
v1.init = function () {
caurina.transitions.Tweener.registerTransition('easenone', caurina.transitions.Equations.easeNone);
caurina.transitions.Tweener.registerTransition('linear', caurina.transitions.Equations.easeNone);
caurina.transitions.Tweener.registerTransition('easeinquad', caurina.transitions.Equations.easeInQuad);
caurina.transitions.Tweener.registerTransition('easeoutquad', caurina.transitions.Equations.easeOutQuad);
caurina.transitions.Tweener.registerTransition('easeinoutquad', caurina.transitions.Equations.easeInOutQuad);
caurina.transitions.Tweener.registerTransition('easeoutinquad', caurina.transitions.Equations.easeOutInQuad);
caurina.transitions.Tweener.registerTransition('easeincubic', caurina.transitions.Equations.easeInCubic);
caurina.transitions.Tweener.registerTransition('easeoutcubic', caurina.transitions.Equations.easeOutCubic);
caurina.transitions.Tweener.registerTransition('easeinoutcubic', caurina.transitions.Equations.easeInOutCubic);
caurina.transitions.Tweener.registerTransition('easeoutincubic', caurina.transitions.Equations.easeOutInCubic);
caurina.transitions.Tweener.registerTransition('easeinquart', caurina.transitions.Equations.easeInQuart);
caurina.transitions.Tweener.registerTransition('easeoutquart', caurina.transitions.Equations.easeOutQuart);
caurina.transitions.Tweener.registerTransition('easeinoutquart', caurina.transitions.Equations.easeInOutQuart);
caurina.transitions.Tweener.registerTransition('easeoutinquart', caurina.transitions.Equations.easeOutInQuart);
caurina.transitions.Tweener.registerTransition('easeinquint', caurina.transitions.Equations.easeInQuint);
caurina.transitions.Tweener.registerTransition('easeoutquint', caurina.transitions.Equations.easeOutQuint);
caurina.transitions.Tweener.registerTransition('easeinoutquint', caurina.transitions.Equations.easeInOutQuint);
caurina.transitions.Tweener.registerTransition('easeoutinquint', caurina.transitions.Equations.easeOutInQuint);
caurina.transitions.Tweener.registerTransition('easeinsine', caurina.transitions.Equations.easeInSine);
caurina.transitions.Tweener.registerTransition('easeoutsine', caurina.transitions.Equations.easeOutSine);
caurina.transitions.Tweener.registerTransition('easeinoutsine', caurina.transitions.Equations.easeInOutSine);
caurina.transitions.Tweener.registerTransition('easeoutinsine', caurina.transitions.Equations.easeOutInSine);
caurina.transitions.Tweener.registerTransition('easeincirc', caurina.transitions.Equations.easeInCirc);
caurina.transitions.Tweener.registerTransition('easeoutcirc', caurina.transitions.Equations.easeOutCirc);
caurina.transitions.Tweener.registerTransition('easeinoutcirc', caurina.transitions.Equations.easeInOutCirc);
caurina.transitions.Tweener.registerTransition('easeoutincirc', caurina.transitions.Equations.easeOutInCirc);
caurina.transitions.Tweener.registerTransition('easeinexpo', caurina.transitions.Equations.easeInExpo);
caurina.transitions.Tweener.registerTransition('easeoutexpo', caurina.transitions.Equations.easeOutExpo);
caurina.transitions.Tweener.registerTransition('easeinoutexpo', caurina.transitions.Equations.easeInOutExpo);
caurina.transitions.Tweener.registerTransition('easeoutinexpo', caurina.transitions.Equations.easeOutInExpo);
caurina.transitions.Tweener.registerTransition('easeinelastic', caurina.transitions.Equations.easeInElastic);
caurina.transitions.Tweener.registerTransition('easeoutelastic', caurina.transitions.Equations.easeOutElastic);
caurina.transitions.Tweener.registerTransition('easeinoutelastic', caurina.transitions.Equations.easeInOutElastic);
caurina.transitions.Tweener.registerTransition('easeoutinelastic', caurina.transitions.Equations.easeOutInElastic);
caurina.transitions.Tweener.registerTransition('easeinback', caurina.transitions.Equations.easeInBack);
caurina.transitions.Tweener.registerTransition('easeoutback', caurina.transitions.Equations.easeOutBack);
caurina.transitions.Tweener.registerTransition('easeinoutback', caurina.transitions.Equations.easeInOutBack);
caurina.transitions.Tweener.registerTransition('easeoutinback', caurina.transitions.Equations.easeOutInBack);
caurina.transitions.Tweener.registerTransition('easeinbounce', caurina.transitions.Equations.easeInBounce);
caurina.transitions.Tweener.registerTransition('easeoutbounce', caurina.transitions.Equations.easeOutBounce);
caurina.transitions.Tweener.registerTransition('easeinoutbounce', caurina.transitions.Equations.easeInOutBounce);
caurina.transitions.Tweener.registerTransition('easeoutinbounce', caurina.transitions.Equations.easeOutInBounce);
};
v1.easeNone = function (t, b, c, d, p_params) {
return c * t / d + b;
};
v1.easeInQuad = function (t, b, c, d, p_params) {
t /= d;
return c * t * t + b;
};
v1.easeOutQuad = function (t, b, c, d, p_params) {
t /= d;
return -c * t * (t - 2) + b;
};
v1.easeInOutQuad = function (t, b, c, d, p_params) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t + b;
}
return (-c / 2) * (--t * (t - 2) - 1) + b;
};
v1.easeOutInQuad = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutQuad(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInQuad(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInCubic = function (t, b, c, d, p_params) {
t /= d;
return c * t * t * t + b;
};
v1.easeOutCubic = function (t, b, c, d, p_params) {
t = t / d - 1;
return c * (t * t * t + 1) + b;
};
v1.easeInOutCubic = function (t, b, c, d, p_params) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t + b;
}
t -= 2;
return (c / 2) * (t * t * t + 2) + b;
};
v1.easeOutInCubic = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutCubic(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInCubic(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInQuart = function (t, b, c, d, p_params) {
t /= d;
return c * t * t * t * t + b;
};
v1.easeOutQuart = function (t, b, c, d, p_params) {
t = t / d - 1;
return -c * (t * t * t * t - 1) + b;
};
v1.easeInOutQuart = function (t, b, c, d, p_params) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t * t + b;
}
t -= 2;
return (-c / 2) * (t * t * t * t - 2) + b;
};
v1.easeOutInQuart = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutQuart(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInQuart(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInQuint = function (t, b, c, d, p_params) {
t /= d;
return c * t * t * t * t * t + b;
};
v1.easeOutQuint = function (t, b, c, d, p_params) {
t = t / d - 1;
return c * (t * t * t * t * t + 1) + b;
};
v1.easeInOutQuint = function (t, b, c, d, p_params) {
t /= d / 2;
if (t < 1) {
return (c / 2) * t * t * t * t * t + b;
}
t -= 2;
return (c / 2) * (t * t * t * t * t + 2) + b;
};
v1.easeOutInQuint = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutQuint(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInQuint(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInSine = function (t, b, c, d, p_params) {
return -c * Math.cos((t / d) * 1.570796326794897) + c + b;
};
v1.easeOutSine = function (t, b, c, d, p_params) {
return c * Math.sin((t / d) * 1.570796326794897) + b;
};
v1.easeInOutSine = function (t, b, c, d, p_params) {
return (-c / 2) * (Math.cos(Math.PI * t / d) - 1) + b;
};
v1.easeOutInSine = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutSine(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInSine(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInExpo = function (t, b, c, d, p_params) {
return (t == 0) ? b : c * Math.pow(2, 10 * (t / d - 1)) + b - c * 0.001;
};
v1.easeOutExpo = function (t, b, c, d, p_params) {
return (t == d) ? b + c : c * 1.001 * (-Math.pow(2, -10 * t / d) + 1) + b;
};
v1.easeInOutExpo = function (t, b, c, d, p_params) {
if (t == 0) {
return b;
}
if (t == d) {
return b + c;
}
t /= d / 2;
if (t < 1) {
return (c / 2) * Math.pow(2, 10 * (t - 1)) + b - c * 0.0005;
}
return (c / 2) * 1.0005 * (-Math.pow(2, -10 * --t) + 2) + b;
};
v1.easeOutInExpo = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutExpo(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInExpo(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInCirc = function (t, b, c, d, p_params) {
t /= d;
return -c * (Math.sqrt(1 - t * t) - 1) + b;
};
v1.easeOutCirc = function (t, b, c, d, p_params) {
t = t / d - 1;
return c * Math.sqrt(1 - t * t) + b;
};
v1.easeInOutCirc = function (t, b, c, d, p_params) {
t /= d / 2;
if (t < 1) {
return (-c / 2) * (Math.sqrt(1 - t * t) - 1) + b;
}
t -= 2;
return (c / 2) * (Math.sqrt(1 - t * t) + 1) + b;
};
v1.easeOutInCirc = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutCirc(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInCirc(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInElastic = function (t, b, c, d, p_params) {
if (t == 0) {
return b;
}
t /= d;
if (t == 1) {
return b + c;
}
var v2 = (p_params.period == undefined) ? d * 0.3 : p_params.period;
var v5;
var v1 = p_params.amplitude;
if (!v1 || v1 < Math.abs(c)) {
v1 = c;
v5 = v2 / 4;
t -= 1;
return -(v1 * Math.pow(2, 10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v2)) + b;
}
v5 = (v2 / 6.283185307179586) * Math.asin(c / v1);
t -= 1;
return -(v1 * Math.pow(2, 10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v2)) + b;
};
v1.easeOutElastic = function (t, b, c, d, p_params) {
if (t == 0) {
return b;
}
t /= d;
if (t == 1) {
return b + c;
}
var v3 = (p_params.period == undefined) ? d * 0.3 : p_params.period;
var v5;
var v1 = p_params.amplitude;
if (!v1 || v1 < Math.abs(c)) {
v1 = c;
v5 = v3 / 4;
return v1 * Math.pow(2, -10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v3) + c + b;
}
v5 = (v3 / 6.283185307179586) * Math.asin(c / v1);
return v1 * Math.pow(2, -10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v3) + c + b;
};
v1.easeInOutElastic = function (t, b, c, d, p_params) {
if (t == 0) {
return b;
}
t /= d / 2;
if (t == 2) {
return b + c;
}
var v3 = (p_params.period == undefined) ? d * 0.45 : p_params.period;
var v5;
var v1 = p_params.amplitude;
if (!v1 || v1 < Math.abs(c)) {
v1 = c;
v5 = v3 / 4;
} else {
v5 = (v3 / 6.283185307179586) * Math.asin(c / v1);
}
if (t < 1) {
t -= 1;
return -0.5 * (v1 * Math.pow(2, 10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v3)) + b;
}
t -= 1;
return v1 * Math.pow(2, -10 * t) * Math.sin((t * d - v5) * 6.283185307179586 / v3) * 0.5 + c + b;
};
v1.easeOutInElastic = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutElastic(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInElastic(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInBack = function (t, b, c, d, p_params) {
if (p_params.overshoot != undefined) {
var v1 = p_params.overshoot;
t /= d;
return c * t * t * ((v1 + 1) * t - v1) + b;
}
var v1 = 1.70158;
t /= d;
return c * t * t * ((v1 + 1) * t - v1) + b;
};
v1.easeOutBack = function (t, b, c, d, p_params) {
if (p_params.overshoot != undefined) {
var v2 = p_params.overshoot;
t = t / d - 1;
return c * (t * t * ((v2 + 1) * t + v2) + 1) + b;
}
var v2 = 1.70158;
t = t / d - 1;
return c * (t * t * ((v2 + 1) * t + v2) + 1) + b;
};
v1.easeInOutBack = function (t, b, c, d, p_params) {
var v2 = (p_params.overshoot == undefined) ? 1.70158 : p_params.overshoot;
t /= d / 2;
if (t < 1) {
v2 *= 1.525;
return (c / 2) * (t * t * ((v2 + 1) * t - v2)) + b;
}
t -= 2;
v2 *= 1.525;
return (c / 2) * (t * t * ((v2 + 1) * t + v2) + 2) + b;
};
v1.easeOutInBack = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutBack(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInBack(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
v1.easeInBounce = function (t, b, c, d, p_params) {
return c - caurina.transitions.Equations.easeOutBounce(d - t, 0, c, d) + b;
};
v1.easeOutBounce = function (t, b, c, d, p_params) {
t /= d;
if (t < 0.3636363636363637) {
return c * (7.5625 * t * t) + b;
} else {
if (t < 0.7272727272727273) {
t -= 0.5454545454545454;
return c * (7.5625 * t * t + 0.75) + b;
} else {
if (t < 0.9090909090909091) {
t -= 0.8181818181818182;
return c * (7.5625 * t * t + 0.9375) + b;
} else {
t -= 0.9545454545454546;
return c * (7.5625 * t * t + 0.984375) + b;
}
}
}
};
v1.easeInOutBounce = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeInBounce(t * 2, 0, c, d) * 0.5 + b;
} else {
return caurina.transitions.Equations.easeOutBounce(t * 2 - d, 0, c, d) * 0.5 + c * 0.5 + b;
}
};
v1.easeOutInBounce = function (t, b, c, d, p_params) {
if (t < d / 2) {
return caurina.transitions.Equations.easeOutBounce(t * 2, b, c / 2, d, p_params);
}
return caurina.transitions.Equations.easeInBounce(t * 2 - d, b + c / 2, c / 2, d, p_params);
};
ASSetPropFlags(caurina.transitions.Equations.prototype, null, 1);
}
#endinitclip
}
movieClip 836 __Packages.caurina.transitions.SpecialProperty {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.SpecialProperty) {
var v1 = function (p_getFunction, p_setFunction, p_parameters, p_preProcessFunction) {
this.getValue = p_getFunction;
this.setValue = p_setFunction;
this.parameters = p_parameters;
this.preProcess = p_preProcessFunction;
};
caurina.transitions.SpecialProperty = v1;
var v2 = v1.prototype;
v2.toString = function () {
var v2 = '';
v2 += '[SpecialProperty ';
v2 += 'getValue:' + this.getValue.toString();
v2 += ', ';
v2 += 'setValue:' + this.setValue.toString();
v2 += ', ';
v2 += 'parameters:' + this.parameters.toString();
v2 += ', ';
v2 += 'preProcess:' + this.preProcess.toString();
v2 += ']';
return v2;
};
ASSetPropFlags(caurina.transitions.SpecialProperty.prototype, null, 1);
}
#endinitclip
}
movieClip 837 __Packages.caurina.transitions.SpecialPropertyModifier {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.SpecialPropertyModifier) {
var v1 = function (p_modifyFunction, p_getFunction) {
this.modifyValues = p_modifyFunction;
this.getValue = p_getFunction;
};
caurina.transitions.SpecialPropertyModifier = v1;
var v2 = v1.prototype;
v2.toString = function () {
var v2 = '';
v2 += '[SpecialPropertyModifier ';
v2 += 'modifyValues:' + this.modifyValues.toString();
v2 += ', ';
v2 += 'getValue:' + this.getValue.toString();
v2 += ']';
return v2;
};
ASSetPropFlags(caurina.transitions.SpecialPropertyModifier.prototype, null, 1);
}
#endinitclip
}
movieClip 838 __Packages.caurina.transitions.properties.CurveModifiers {
#initclip
if (!_global.caurina) {
_global.caurina = new Object();
}
if (!_global.caurina.transitions) {
_global.caurina.transitions = new Object();
}
if (!_global.caurina.transitions.properties) {
_global.caurina.transitions.properties = new Object();
}
if (!_global.caurina.transitions.properties.CurveModifiers) {
var v1 = function () {
trace('This is an static class and should not be instantiated.');
};
caurina.transitions.properties.CurveModifiers = v1;
var v2 = v1.prototype;
v1.init = function () {
caurina.transitions.Tweener.registerSpecialPropertyModifier('_bezier', caurina.transitions.properties.CurveModifiers._bezier_modifier, caurina.transitions.properties.CurveModifiers._bezier_get);
};
v1._bezier_modifier = function (p_obj) {
var v7 = [];
var v4;
if (p_obj instanceof Array) {
v4 = p_obj.concat();
} else {
v4 = [p_obj];
}
var v3;
var v1;
var v2 = {};
v3 = 0;
while (v3 < v4.length) {
for (v1 in v4[v3]) {
if (v2[v1] == undefined) {
v2[v1] = [];
}
v2[v1].push(v4[v3][v1]);
}
++v3;
}
for (v1 in v2) {
v7.push({'name': v1, 'parameters': v2[v1]});
}
return v7;
};
v1._bezier_get = function (b, e, t, p) {
if (p.length == 1) {
return b + t * (2 * (1 - t) * (p[0] - b) + t * (e - b));
} else {
var v2 = Math.floor(t * p.length);
var v5 = (t - v2 * (1 / p.length)) * p.length;
var v3;
var v6;
if (v2 == 0) {
v3 = b;
v6 = (p[0] + p[1]) / 2;
return v3 + v5 * (2 * (1 - v5) * (p[v2] - v3) + v5 * (v6 - v3));
}
if (v2 == p.length - 1) {
v3 = (p[v2 - 1] + p[v2]) / 2;
v6 = e;
return v3 + v5 * (2 * (1 - v5) * (p[v2] - v3) + v5 * (v6 - v3));
}
v3 = (p[v2 - 1] + p[v2]) / 2;
v6 = (p[v2] + p[v2 + 1]) / 2;
return v3 + v5 * (2 * (1 - v5) * (p[v2] - v3) + v5 * (v6 - v3));
}
};
ASSetPropFlags(caurina.transitions.properties.CurveModifiers.prototype, null, 1);
}
#endinitclip
}
movieClip 44 {
}
movieClip 46 {
}
movieClip 48 {
}
movieClip 56 {
}
movieClip 57 {
}
movieClip 59 {
frame 1 {
stop();
}
frame 2 {
play();
}
}
movieClip 60 ape_cross {
}
movieClip 62 {
}
movieClip 89 {
}
movieClip 90 {
frame 15 {
this._parent.gotoAndStop(1);
}
}
movieClip 91 {
}
movieClip 105 {
}
movieClip 106 {
}
movieClip 107 {
instance ball of movieClip 106 {
onClipEvent (enterFrame) {
_rotation = _rotation + 45;
shadow._rotation -= 45;
}
}
}
movieClip 108 palla {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 15 {
this.removeMovieClip();
}
}
movieClip 109 {
}
movieClip 112 {
}
movieClip 113 {
frame 13 {
this._parent.gotoAndStop(1);
}
}
movieClip 115 {
}
movieClip 117 {
frame 20 {
this._parent.gotoAndStop(1);
}
}
movieClip 124 {
}
movieClip 126 {
}
movieClip 129 {
}
movieClip 130 {
}
movieClip 148 {
frame 25 {
stop();
}
frame 40 {
this._parent.gotoAndStop(1);
}
}
movieClip 149 {
frame 20 {
stop();
}
}
movieClip 150 bonucci {
frame 1 {
stop();
this.anim_palla._visible = false;
}
}
movieClip 152 marker {
}
movieClip 156 collectable_ball {
}
movieClip 158 {
}
movieClip 159 palla_scia {
frame 15 {
this.removeMovieClip();
}
}
movieClip 160 {
}
movieClip 163 crema {
}
movieClip 166 tombino {
}
movieClip 169 salvagente {
}
movieClip 172 secchiello {
}
movieClip 175 {
}
movieClip 176 {
}
movieClip 178 {
}
movieClip 179 {
}
movieClip 181 {
}
movieClip 182 {
}
movieClip 185 {
}
movieClip 187 child {
}
movieClip 190 ostacolo {
}
movieClip 193 copertone {
}
movieClip 196 vuvuzela {
}
movieClip 199 bidone {
}
movieClip 202 bomboletta {
}
movieClip 204 {
}
movieClip 206 {
}
movieClip 207 {
}
movieClip 208 {
}
movieClip 209 {
}
movieClip 210 {
}
movieClip 211 {
}
movieClip 212 {
}
movieClip 213 {
}
movieClip 220 gold_ball {
}
movieClip 241 {
}
movieClip 242 {
frame 15 {
this._parent.gotoAndStop(1);
}
}
movieClip 248 {
}
movieClip 249 {
frame 13 {
this._parent.gotoAndStop(1);
}
}
movieClip 251 {
}
movieClip 252 {
frame 20 {
this._parent.gotoAndStop(1);
}
}
movieClip 263 {
frame 25 {
stop();
}
frame 40 {
this._parent.gotoAndStop(1);
}
}
movieClip 264 ranocchia {
frame 1 {
stop();
this.anim_palla._visible = false;
}
}
movieClip 290 {
}
movieClip 291 {
frame 15 {
this._parent.gotoAndStop(1);
}
}
movieClip 299 {
}
movieClip 300 {
frame 13 {
this._parent.gotoAndStop(1);
}
}
movieClip 304 {
}
movieClip 305 {
frame 20 {
this._parent.gotoAndStop(1);
}
}
movieClip 318 {
frame 25 {
stop();
}
frame 40 {
this._parent.gotoAndStop(1);
}
}
movieClip 319 okaka {
frame 1 {
stop();
this.anim_palla._visible = false;
}
}
movieClip 320 {
}
instance of movieClip 320 {
onClipEvent (load) {
this.removeMovieClip();
}
}
frame 3 {
if (_root.from_ladder) {
gotoAndStop(150);
} else {
_global.suono = new SOUND_HANDLER();
_global.suono.add_suono('loop_bgm_snd', 'loop_bgm', true, false);
_global.suono.fade_in_suono('loop_bgm_snd');
}
}
movieClip 322 {
}
movieClip 327 {
}
movieClip 330 {
}
movieClip 335 {
}
movieClip 336 {
instance of movieClip 327 {
onClipEvent (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
getURL('http://apps.facebook.com/soccermobile/', '_blank');
}
}
instance of movieClip 330 {
onClipEvent (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
getURL('http://www.gillette.com/it-it/#/home/FutureChampion2010/it-IT/index.shtml/', '_blank');
}
}
}
button 342 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
_parent.play();
}
}
movieClip 360 {
}
movieClip 362 {
}
movieClip 364 {
}
movieClip 372 {
}
movieClip 382 {
}
movieClip 383 {
}
movieClip 384 {
}
movieClip 385 {
}
movieClip 386 {
}
movieClip 387 {
}
movieClip 388 {
}
movieClip 389 {
}
movieClip 390 {
}
movieClip 391 {
}
movieClip 399 {
}
movieClip 402 {
}
movieClip 407 {
}
movieClip 408 {
frame 1 {
this.useHandCursor = false;
this.onRelease = function () {};
}
}
movieClip 409 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 8 {
stop();
}
frame 9 {
play();
}
}
movieClip 411 {
}
movieClip 413 {
}
movieClip 414 {
frame 11 {
stop();
}
}
movieClip 417 {
}
// unknown tag 88 length 197
movieClip 420 {
}
movieClip 427 {
frame 18 {
stop();
}
}
movieClip 435 {
frame 13 {
stop();
}
}
movieClip 438 {
}
movieClip 445 {
}
button 447 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
istruzioni.play();
}
}
movieClip 456 {
}
button 457 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
_global.suono.fade_out_suono('loop_bgm_snd', true);
_root.goto_ladder();
}
}
button 458 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
_global.suono.fade_out_suono('loop_bgm_snd', true);
gotoAndPlay(151);
}
}
frame 150 {
stop();
if (_root.from_ladder) {
_root.from_ladder = false;
_global.suono = new SOUND_HANDLER();
_global.suono.add_suono('loop_bgm_snd', 'loop_bgm', true, false);
_global.suono.fade_in_suono('loop_bgm_snd');
}
_root.punti = 0;
_root.player_name = '';
_root.gioco = new GAME_HANDLER();
}
movieClip 459 {
}
instance of movieClip 459 {
onClipEvent (release) {
getURL('http://www.gillette.com/it-it/#/home/FutureChampion2010/it-IT/index.shtml/', '_blank');
}
}
movieClip 463 {
}
movieClip 464 {
}
movieClip 465 {
frame 13 {
stop();
}
}
movieClip 468 {
}
// unknown tag 88 length 143
movieClip 479 {
}
movieClip 481 {
}
movieClip 485 {
}
movieClip 490 {
}
movieClip 492 {
}
movieClip 493 {
}
movieClip 496 {
}
movieClip 497 {
}
movieClip 499 {
}
movieClip 500 {
}
button 501 {
on (release) {
selected_avatar = 'okaka';
play();
}
}
button 502 {
on (release) {
selected_avatar = 'bonucci';
play();
}
}
button 503 {
on (release) {
selected_avatar = 'okaka';
play();
}
}
frame 186 {
function make_choice() {
var player_discarded_1 = undefined;
var player_discarded_2 = undefined;
switch (local_tl.last_selected) {
case ranocchia:
player_discarded_1 = bonucci;
player_discarded_2 = okaka;
break;
case bonucci:
player_discarded_1 = ranocchia;
player_discarded_2 = okaka;
break;
case okaka:
player_discarded_1 = ranocchia;
player_discarded_2 = bonucci;
}
caurina.transitions.Tweener.addTween(details_ranocchia, {'_alpha': 0, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0});
caurina.transitions.Tweener.addTween(details_bonucci, {'_alpha': 0, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0.1});
caurina.transitions.Tweener.addTween(details_okaka, {'_alpha': 0, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0.2, 'onComplete': function () {
caurina.transitions.Tweener.addTween(player_discarded_1, {'_xscale': 25, '_yscale': 25, '_alpha': 0, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0});
caurina.transitions.Tweener.addTween(player_discarded_2, {'_xscale': 25, '_yscale': 25, '_alpha': 0, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0.1});
x = Stage.width - local_tl.last_selected._width;
y = Stage.height - local_tl.last_selected._height;
local_tl.fade.gotoAndPlay(2);
caurina.transitions.Tweener.addTween(local_tl.last_selected, {'_xscale': 300, '_yscale': 250, '_alpha': 25, '_x': x, '_y': y, 'time': 0.5, 'transition': 'easeOutSine', 'delay': 0.2, 'onComplete': function () {}});
}});
}
stop();
local_tl = this;
_root.punti = 0;
avanti_pul._alpha = 50;
avanti_pul.enabled = false;
var last_selected;
var player_name;
okaka.onRelease = function () {
_global.suono.add_suono('click_snd', 'click', false, false);
this.gotoAndStop(3);
local_tl.player_name = this._name;
local_tl.last_selected.selected = false;
this.selected = true;
local_tl.last_selected = this;
local_tl.avanti_pul.enabled = true;
local_tl.avanti_pul._alpha = 100;
switch (this._name) {
case 'ranocchia':
local_tl.bonucci.gotoAndStop(2);
local_tl.okaka.gotoAndStop(2);
break;
case 'bonucci':
local_tl.ranocchia.gotoAndStop(2);
local_tl.okaka.gotoAndStop(2);
break;
case 'okaka':
local_tl.ranocchia.gotoAndStop(2);
local_tl.bonucci.gotoAndStop(2);
}
};
bonucci.onRelease = okaka.onRelease;
ranocchia.onRelease = okaka.onRelease;
okaka.onRollOver = function () {
if (local_tl.last_selected == undefined) {
this.gotoAndStop(3);
}
if (local_tl.last_selected != undefined && local_tl.last_selected != this) {
this.gotoAndStop(1);
}
};
bonucci.onRollOver = okaka.onRollOver;
ranocchia.onRollOver = okaka.onRollOver;
okaka.onRollOut = function () {
if (local_tl.last_selected == undefined) {
this.gotoAndStop(1);
}
if (local_tl.last_selected != undefined && local_tl.last_selected != this) {
this.gotoAndStop(2);
}
if (this.selected) {
this.gotoAndStop(3);
}
};
bonucci.onRollOut = okaka.onRollOut;
ranocchia.onRollOut = okaka.onRollOut;
}
movieClip 504 {
frame 1 {
stop();
}
}
movieClip 505 {
frame 1 {
stop();
}
}
movieClip 506 {
frame 1 {
stop();
}
}
// unknown tag 88 length 197
button 512 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
make_choice();
}
}
movieClip 518 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 28 {
stop();
this._parent.play();
}
}
frame 187 {
vai_a = '';
_global.suono.add_suono('loop_ladder_snd', 'loop_ladder', true, false);
_global.suono.fade_in_suono('loop_ladder_snd');
switch (_root.gioco.advancement_status()) {
case 0:
zones_stat = new Array(2, 1, 1, 1);
vai_a = 'citta';
break;
case 1:
zones_stat = new Array(3, 2, 1, 1);
vai_a = 'spiaggia';
break;
case 2:
zones_stat = new Array(3, 3, 2, 1);
vai_a = 'street';
break;
case 3:
zones_stat = new Array(3, 3, 3, 2);
vai_a = 'stadium';
break;
case 4:
_root.gioco.destroy();
gotoAndPlay(401);
}
map.gotoAndStop(_root.gioco.advancement_status() + 1);
}
movieClip 529 {
}
movieClip 530 {
frame 8 {
stop();
}
}
movieClip 535 {
frame 75 {
stop();
}
}
movieClip 538 {
}
movieClip 539 {
}
movieClip 543 {
}
movieClip 550 {
frame 75 {
stop();
}
}
movieClip 561 {
frame 75 {
stop();
}
}
movieClip 564 {
frame 1 {
stop();
}
}
movieClip 567 {
frame 15 {
stop();
}
}
frame 366 {
_global.suono.fade_out_suono('loop_ladder_snd', true);
}
frame 396 {
stop();
switch (vai_a) {
case 'spiaggia':
gotoAndStop(398);
break;
case 'citta':
gotoAndStop(397);
break;
case 'street':
gotoAndStop(399);
break;
case 'stadium':
gotoAndStop(400);
}
}
frame 397 {
function randRange(min, max) {
var v1 = Math.floor(Math.random() * (max - min + 1)) + min;
return v1;
}
stop();
_root.gioco.set_cur_location('citta');
_root.gioco.activate_stage();
}
movieClip 570 {
}
movieClip 573 {
}
movieClip 576 {
}
movieClip 579 {
}
movieClip 582 {
}
movieClip 585 {
}
movieClip 588 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 20 {
stop();
}
}
movieClip 591 {
}
movieClip 592 {
frame 1 {
stop();
}
frame 2 {
play();
}
}
movieClip 595 {
}
movieClip 596 {
frame 1 {
stop();
}
frame 2 {
play();
}
}
movieClip 600 {
frame 1 {
stop();
}
frame 2 {
play();
}
}
button 606 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
this._parent.play();
}
}
movieClip 622 {
frame 1 {
stop();
}
}
movieClip 625 {
}
movieClip 626 {
}
movieClip 627 {
frame 1 {
stop();
}
frame 8 {
stop();
}
frame 9 {
play();
}
}
movieClip 650 {
}
movieClip 651 {
}
movieClip 652 {
frame 1 {
stop();
}
frame 101 {
play();
}
frame 135 {
stop();
}
}
movieClip 654 {
}
movieClip 661 {
frame 1 {
stop();
}
}
button 669 {
on (release) {
_global.suono.all_down();
gotoAndStop(2);
}
}
button 671 {
on (release) {
_global.suono.all_up();
gotoAndStop(1);
}
}
movieClip 672 {
frame 1 {
stop();
}
}
movieClip 675 {
frame 1 {
stop();
gotoAndStop(_root.player_name);
}
}
button 678 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
_parent.play();
}
}
movieClip 685 {
}
movieClip 686 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 7 {
stop();
}
}
movieClip 691 {
}
movieClip 692 {
frame 1 {
stop();
}
frame 2 {
play();
}
frame 7 {
stop();
}
}
movieClip 693 {
}
movieClip 697 {
}
movieClip 700 {
}
movieClip 701 {
}
frame 398 {
function randRange(min, max) {
var v1 = Math.floor(Math.random() * (max - min + 1)) + min;
return v1;
}
stop();
_root.gioco.set_cur_location('spiaggia');
_root.gioco.activate_stage();
}
movieClip 704 {
}
movieClip 705 {
}
movieClip 706 {
}
movieClip 707 {
}
movieClip 708 {
}
movieClip 709 {
}
movieClip 713 {
}
movieClip 722 {
}
movieClip 724 {
}
movieClip 725 {
}
movieClip 726 {
}
movieClip 727 {
}
movieClip 737 {
}
movieClip 745 {
}
movieClip 748 {
}
movieClip 751 {
}
frame 399 {
function randRange(min, max) {
var v1 = Math.floor(Math.random() * (max - min + 1)) + min;
return v1;
}
stop();
_root.gioco.set_cur_location('street');
_root.gioco.activate_stage();
}
movieClip 754 {
}
movieClip 757 {
}
movieClip 760 {
}
movieClip 763 {
}
movieClip 767 {
}
movieClip 768 {
}
movieClip 771 {
}
frame 400 {
function randRange(min, max) {
var v1 = Math.floor(Math.random() * (max - min + 1)) + min;
return v1;
}
stop();
_root.gioco.set_cur_location('stadium');
_root.gioco.activate_stage();
}
movieClip 774 {
}
movieClip 777 {
}
movieClip 780 {
}
movieClip 782 {
}
movieClip 785 {
}
frame 401 {
_global.suono.add_suono('loop_ladder_snd', 'loop_ladder', true, false);
_global.suono.fade_in_suono('loop_ladder_snd');
}
button 788 {
on (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
getURL('http://www.gillette.it', '_blank');
}
}
movieClip 791 {
}
movieClip 792 {
}
instance of movieClip 792 {
onClipEvent (release) {
_global.suono.add_suono('click_snd', 'click', false, false);
getURL('http://www.gillette.com/it-it/#/home/FutureChampion2010/it-IT/index.shtml/', '_blank');
}
}
button 793 {
on (release) {
getURL('http://www.gillette.it', '');
}
}
frame 416 {
if (_root.direct_ladder) {
_root.direct_ladder = false;
ladder_mc.gotoAndStop(2);
}
}
button 798 {
on (release) {
if (!sending_data) {
_global.suono.add_suono('click_snd', 'click', false, false);
_global.suono.fade_out_suono('loop_ladder_snd', true);
_parent.play();
}
}
}
movieClip 801 {
}
movieClip 803 {
}
movieClip 804 {
}
movieClip 805 {
}
movieClip 806 {
}
movieClip 807 {
}
movieClip 812 {
}
movieClip 819 loading_animation {
}
movieClip 824 {
frame 1 {
stop();
}
}
movieClip 827 {
frame 1 {
stop();
}
}
movieClip 828 {
frame 1 {
stop();
stop();
local_tl = this;
local_tl.msg.text = '';
punteggio.text = int(_root.punti);
my_lv = new LoadVars();
my_lv.game = 'Kelloggs';
my_lv.score = int(_root.punti);
sending_data = false;
loading._visible = false;
pul_ok.onRelease = function () {
_global.suono.add_suono('click_snd', 'click', false, false);
local_tl.msg.text = '';
if (local_tl.nick_txt.text != '' && !local_tl.sending_data) {
local_tl.sending_data = true;
local_tl.loading._visible = true;
local_tl.pul_ok._alpha = 75;
local_tl.pul_ok.enabled = false;
local_tl.my_lv.nick = local_tl.nick_txt.text;
md5_key = local_tl.nick_txt.text + _root.punti + local_tl.my_lv.game;
local_tl.my_lv.key = md5_key.MD5();
local_tl.my_lv.onLoad = function (success) {
local_tl.sending_data = false;
local_tl.loading._visible = false;
local_tl.form_insert.pul_ok._alpha = 100;
local_tl.form_insert.pul_ok.enabled = true;
if (success && Number(this.result) == 1) {
local_tl.msg.text = 'Your data have been saved!';
setTimeout(function () {
_root.cur_nick = local_tl.nick_txt.text;
_root.goto_ladder();
}, 500);
} else {
local_tl.msg.text = 'A connection error has occurred.';
}
};
local_tl.my_lv.sendAndLoad(_root.php_path, local_tl.my_lv, 'GET');
} else {
local_tl.msg.text = 'Insert your nickname';
}
};
System.useCodepage = true;
}
frame 2 {
function load_ladder(daily) {
ladder_arr = new Array();
my_lv = new LoadVars();
my_lv.chart = 'Krave';
if (daily) {
my_lv.oggi = 1;
whole_pul.gotoAndStop(1);
daily_pul.gotoAndStop(2);
} else {
whole_pul.gotoAndStop(2);
daily_pul.gotoAndStop(1);
}
my_lv.onLoad = function (success) {
if (success) {
var v2 = 0;
while (v2 < (this.list.split(';')).length) {
nick = ((this.list.split(';'))[v2].split(','))[0];
punti = ((this.list.split(';'))[v2].split(','))[1];
data_it = ((this.list.split(';'))[v2].split(','))[2];
local_tl.ladder_arr.push({'nick': nick, 'punti': punti, 'data_it': data_it});
++v2;
}
local_tl.show_ladder();
if (local_tl._currentframe != local_tl._totalframes) {
local_tl.play();
}
}
};
my_lv.sendAndLoad(_root.php_path, my_lv, 'GET');
}
function show_ladder() {
local_tl.classifica.cont._y = 0;
cont = local_tl.classifica.cont.createEmptyMovieClip('cont', 1);
var v2 = 0;
while (v2 < local_tl.ladder_arr.length - 1) {
clip = cont.attachMovie('entry_mc', 'entry_' + v2, cont.getNextHighestDepth());
clip._y = clip._height * v2;
clip.numero.text = v2 + 1;
clip.nome.text = local_tl.ladder_arr[v2].nick;
clip.marker._visible = _root.cur_nick == clip.nome.text;
clip.punti.text = local_tl.ladder_arr[v2].punti;
clip.datazione.text = local_tl.ladder_arr[v2].data_it;
++v2;
}
scroller.up._visible = cont._height > local_tl.classifica.mask._height;
scroller.down._visible = cont._height > local_tl.classifica.mask._height;
scroller.up.onRelease = function () {
local_tl.scroll_up();
};
scroller.down.onRelease = function () {
local_tl.scroll_down();
};
}
function scroll_up() {
des_y = 0;
jump = 111.5;
if (local_tl.classifica.cont._y + jump < 0) {
des_y = local_tl.classifica.cont._y + jump;
}
local_tl.classifica.cont.des_y = des_y;
local_tl.classifica.cont.onEnterFrame = function () {
this._y += (this.des_y - this._y) / 2;
if (Math.ceil(this._y) == Math.ceil(this.des_y)) {
this._y = this.des_y;
delete this.onEnterFrame;
}
};
}
function scroll_down() {
des_y = 0;
jump = 111.5;
if (local_tl.classifica.cont._y - jump > -(local_tl.classifica.cont._height - local_tl.classifica.mask._height)) {
des_y = local_tl.classifica.cont._y - jump;
} else {
des_y = -(local_tl.classifica.cont._height - local_tl.classifica.mask._height);
}
local_tl.classifica.cont.des_y = des_y;
local_tl.classifica.cont.onEnterFrame = function () {
this._y += (this.des_y - this._y) / 2;
if (Math.ceil(this._y) == Math.ceil(this.des_y)) {
this._y = this.des_y;
delete this.onEnterFrame;
}
};
}
stop();
local_tl = this;
ladder_arr = new Array();
whole_pul.onRelease = function () {
local_tl.load_ladder();
};
daily_pul.onRelease = function () {
local_tl.load_ladder(true);
};
load_ladder();
}
}
frame 422 {
stop();
}
frame 430 {
stop();
gotoAndPlay(3);
}