Frame 1
function onGameDataLoaded() {
var _local2 = new idol.Game(_root);
_local2.init(gd);
}
var gameDataTimer = setInterval(function () {
var _local1 = Math.round(Math.random() * 2147483647);
_level0.songData = "<promolevels><level number=\"1\" song=\"I Heard It Through The Grapevine\"><song extra-note=\"95\" divider=\"2\" long-note=\"92\" new-note=\"60\" sections-boy=\"8710,12724,16652,20708,25181,29963\" bpm=\"50\" new-long-note=\"95\" sections-girl=\"7557,12382,16492,20708,24935,29493\" song-length-ms=\"30000\" name=\"grapevine_30s\" /></level><level number=\"1\" song=\"Lady Marmalade\"><song extra-note=\"95\" divider=\"2\" long-note=\"92\" new-note=\"60\" sections-boy=\"7660,12584,15897,19180,21004,25047\" bpm=\"55\" new-long-note=\"95\" sections-girl=\"3075,5837,8378,12578,15989,18906,20917,21726,25136\" song-length-ms=\"30000\" name=\"lady_marmalade_30s\" /></level><level number=\"1\" song=\"I Want You Back\"><song extra-note=\"95\" divider=\"2\" long-note=\"90\" new-note=\"74\" sections-boy=\"4759,7729,9953,14546,17182,19384,23922,28904,32886\" bpm=\"56\" new-long-note=\"90\" sections-girl=\"5010,7740,9975,12717,14719,19356,24150,28921,32919\" song-length-ms=\"30000\" name=\"i_want_you_back_30s\" /></level><level number=\"1\" song=\"The Greatest Love Of All\"><song extra-note=\"95\" divider=\"2\" long-note=\"90\" new-note=\"74\" sections-boy=\"4450,8017,11791,17059,21924,24520,29297\" bpm=\"65\" new-long-note=\"90\" sections-girl=\"4286,8202,11878,17757,21825,24585,29450\" song-length-ms=\"30000\" name=\"the_greatest_30s\" /></level></promolevels>";
_level0.gameData = ((((((((((((((((((((((((((((((((((((("<gamedata path=\"songdata/\" wait=\"1\" randomseed=\"" + _local1) + "\" lang=\"en\">") + "<text id=\"viral_end_message_1\">We'd really like to see you in the audience!</text>") + "<text id=\"viral_end_message_2\">Will your friends help you to the Finale?</text>") + "<text id=\"jury_grade_5\">You'll have to do better to convince us.</text>") + "<text id=\"level_1\">AUDITION</text>") + "<text id=\"jury_grade_8\">You have a great voice.</text>") + "<text id=\"jury_continue_2\">See you in the Finale!</text>") + "<text id=\"jury_grade_2\">You call that singing?</text>") + "<text id=\"jury_grade_10\">We may have found our new star.</text>") + "<text id=\"to_qualify\">{0} points to qualify</text>") + "<text id=\"game_end_in\">Game will end in {0} seconds.</text>") + "<text id=\"jury_continue_3\">See you in the studio!</text>") + "<text id=\"btn_quit_game\">QUIT</text>") + "<text id=\"legal\">American Idol is a trademark of 19 TV Limited and FremantleMedia North America, Inc.\nBased on the television program \"American Idol\" produced by FremantleMedia North America, Inc and 19 TV Limited.\nLicensed by FremantleMedia Licensing Worldwide. www.americanidol.com \u00A9 2007 FremantleMedia North America, Inc and 19 TV Limited. All Rights Reserved.</text>") + "<text id=\"jury_grade_3\">That was false and without feeling.</text>") + "<text id=\"jury_grade_6\">Oo, yay. Not bad for a beginner.</text>") + "<text id=\"jury_points\">You needed {0} points, your score was {1}</text>") + "<text id=\"download_error\">Error while downloading</text>") + "<text id=\"jury_grade_1\">Who told you that you can sing?</text>") + "<text id=\"jury_grade_4\">Bad in almost every aspect.</text>") + "<text id=\"jury_continue_1\">You wanted a golden ticket? You got it. See you in Hollywood!</text>") + "<text id=\"level_2\">HOLLYWOOD</text>") + "<text id=\"instructions_title\">INSTRUCTIONS</text>") + "<text id=\"jury_grade_7\">Keep practicing and you'll go far.</text>") + "<text id=\"jury_grade_0\">That was absolutely awful!</text>") + "<text id=\"level_3\">FINALE</text>") + "<text id=\"jury_grade_9\">That was amazing, you have something!</text>") + "<text id=\"jury_fail\">Thank you, please never return!</text>") + "<text id=\"btn_sound_on\">SOUND ON</text>") + "<text id=\"game_over_total_score\">FINAL SCORE</text>") + "<text id=\"instructions_text\">Welcome to the American Idol Auditions. We will soon call your number and you will get to sing in front of the judges. Hit the correct Arrow keys in time with the music to sing. If you miss too much you will start singing badly and the judges are likely to throw you out. Pick the singer of your choice to get started.</text>") + "<text id=\"opengame_msg\">You have talent, but you have to register to come to Hollywood!</text>") + "<text id=\"game_over_title\">GAME OVER</text>") + "<text id=\"btn_sound_off\">SOUND OFF</text>") + "<text id=\"instructions_click_to_start\">Click to start</text>") + "<text id=\"game_start_in\">Game will start in {0} seconds.</text>") + "</gamedata>";
trace("insertGameData(): gameData has been planted.");
clearInterval(gameDataTimer);
}, 50);
var gd = null;
gd = new com.midasplayer.util.GameDataAcquirer();
gd.beginWait(mx.utils.Delegate.create(this, onGameDataLoaded));
Symbol 11 MovieClip [recording_sign] Frame 1
#initclip 67
Object.registerClass("recording_sign", idol.AnimDriver50Fps);
#endinitclip
Symbol 37 MovieClip [spotlight] Frame 1
stop();
Symbol 98 MovieClip [Animationen] Frame 1
#initclip 49
Object.registerClass("Animationen", idol.AnimDriver50Fps);
#endinitclip
Symbol 111 MovieClip Frame 8
stop();
Symbol 112 MovieClip [new_anim] Frame 1
#initclip 50
Object.registerClass("new_anim", idol.AnimDriver50Fps);
#endinitclip
Symbol 116 MovieClip [intro_screen] Frame 1
#initclip 51
Object.registerClass("intro_screen", idol.AnimDriver50Fps);
#endinitclip
Symbol 120 MovieClip [maskedstar] Frame 1
Symbol 120 MovieClip [maskedstar] Frame 50
this.removeMovieClip();
Symbol 124 MovieClip Frame 1
stop();
Symbol 124 MovieClip Frame 2
stop();
Symbol 124 MovieClip Frame 3
stop();
Symbol 138 MovieClip [loader_arrow] Frame 1
stop();
Symbol 149 MovieClip [bitmap_crowd] Frame 1
stop();
Symbol 158 MovieClip [color_bars] Frame 1
#initclip 52
Object.registerClass("color_bars", idol.ColorBar);
#endinitclip
Symbol 188 MovieClip [idol_splash] Frame 1
#initclip 53
Object.registerClass("idol_splash", idol.AnimDriver50Fps);
#endinitclip
Symbol 206 MovieClip [legal] Frame 1
stop();
Symbol 206 MovieClip [legal] Frame 2
Symbol 214 MovieClip [sparkle] Frame 1
#initclip 54
Object.registerClass("sparkle", idol.AnimDriver50Fps);
#endinitclip
Symbol 217 MovieClip [starburst] Frame 1
#initclip 55
Object.registerClass("starburst", idol.AnimDriver50Fps);
#endinitclip
Symbol 217 MovieClip [starburst] Frame 8
stop();
Symbol 232 MovieClip [tracks] Frame 1
#initclip 56
Object.registerClass("tracks", idol.Tracks);
#endinitclip
Symbol 237 MovieClip [select_light] Frame 1
stop();
Symbol 248 MovieClip Frame 1
stop();
Symbol 248 MovieClip Frame 2
stop();
Symbol 248 MovieClip Frame 3
stop();
Symbol 248 MovieClip Frame 4
stop();
Symbol 253 MovieClip Frame 1
stop();
Symbol 253 MovieClip Frame 2
stop();
Symbol 253 MovieClip Frame 3
stop();
Symbol 253 MovieClip Frame 4
stop();
Symbol 254 MovieClip Frame 1
stop();
Symbol 254 MovieClip Frame 2
stop();
Symbol 254 MovieClip Frame 3
stop();
Symbol 254 MovieClip Frame 4
stop();
Symbol 255 MovieClip Frame 1
stop();
Symbol 255 MovieClip Frame 2
stop();
Symbol 255 MovieClip Frame 3
stop();
Symbol 255 MovieClip Frame 4
stop();
Symbol 270 MovieClip Frame 1
stop();
Symbol 270 MovieClip Frame 2
stop();
Symbol 270 MovieClip Frame 3
stop();
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 40
stop();
Symbol 321 MovieClip Frame 60
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 70
play();
Symbol 321 MovieClip Frame 110
gotoAndStop ("armmove1");
Symbol 321 MovieClip Frame 120
play();
Symbol 321 MovieClip Frame 181
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 190
play();
Symbol 321 MovieClip Frame 210
stop();
Symbol 321 MovieClip Frame 221
play();
Symbol 321 MovieClip Frame 301
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 310
play();
Symbol 321 MovieClip Frame 370
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 380
play();
Symbol 321 MovieClip Frame 459
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 470
play();
Symbol 321 MovieClip Frame 550
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 560
play();
Symbol 321 MovieClip Frame 640
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 650
play();
Symbol 321 MovieClip Frame 721
gotoAndPlay ("loop8");
Symbol 321 MovieClip Frame 760
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 770
play();
Symbol 321 MovieClip Frame 810
stop();
Symbol 321 MovieClip Frame 820
play();
Symbol 321 MovieClip Frame 890
gotoAndPlay ("loop9");
Symbol 321 MovieClip Frame 929
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 940
play();
Symbol 321 MovieClip Frame 980
stop();
Symbol 321 MovieClip Frame 990
play();
Symbol 321 MovieClip Frame 1040
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 1050
play();
Symbol 321 MovieClip Frame 1070
stop();
Symbol 321 MovieClip Frame 1131
gotoAndStop ("armstill");
Symbol 321 MovieClip Frame 1155
stop();
Symbol 327 MovieClip Frame 1
stop();
Symbol 327 MovieClip Frame 2
stop();
Symbol 327 MovieClip Frame 3
stop();
Symbol 361 MovieClip Frame 1
stop();
Symbol 361 MovieClip Frame 2
stop();
Symbol 361 MovieClip Frame 3
stop();
Symbol 384 MovieClip Frame 1
stop();
Symbol 384 MovieClip Frame 10
stop();
Symbol 384 MovieClip Frame 20
stop();
Symbol 384 MovieClip Frame 30
stop();
Symbol 384 MovieClip Frame 40
stop();
Symbol 384 MovieClip Frame 50
stop();
Symbol 385 MovieClip [avatar_girl] Frame 1
#initclip 57
Object.registerClass("avatar_girl", idol.AvatarGirl);
#endinitclip
stop();
Symbol 385 MovieClip [avatar_girl] Frame 20
play();
Symbol 385 MovieClip [avatar_girl] Frame 100
gotoAndPlay ("move1");
Symbol 385 MovieClip [avatar_girl] Frame 110
play();
Symbol 385 MovieClip [avatar_girl] Frame 190
gotoAndPlay ("move2");
Symbol 385 MovieClip [avatar_girl] Frame 232
play();
Symbol 385 MovieClip [avatar_girl] Frame 312
gotoAndPlay ("move3");
Symbol 385 MovieClip [avatar_girl] Frame 320
play();
Symbol 385 MovieClip [avatar_girl] Frame 360
stop();
Symbol 388 MovieClip Frame 1
stop();
Symbol 388 MovieClip Frame 2
stop();
Symbol 394 MovieClip Frame 1
stop();
Symbol 394 MovieClip Frame 2
stop();
Symbol 394 MovieClip Frame 3
stop();
Symbol 396 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 1
stop();
Symbol 397 MovieClip Frame 2
stop();
Symbol 397 MovieClip Frame 3
stop();
Symbol 399 MovieClip Frame 1
stop();
Symbol 399 MovieClip Frame 2
stop();
Symbol 399 MovieClip Frame 3
stop();
Symbol 400 MovieClip Frame 1
stop();
Symbol 400 MovieClip Frame 2
stop();
Symbol 400 MovieClip Frame 3
stop();
Symbol 412 MovieClip Frame 1
stop();
Symbol 412 MovieClip Frame 2
stop();
Symbol 412 MovieClip Frame 3
stop();
Symbol 421 MovieClip Frame 1
stop();
Symbol 421 MovieClip Frame 2
stop();
Symbol 421 MovieClip Frame 3
stop();
Symbol 429 MovieClip Frame 1
stop();
Symbol 429 MovieClip Frame 2
stop();
Symbol 429 MovieClip Frame 3
stop();
Symbol 439 MovieClip Frame 1
stop();
Symbol 439 MovieClip Frame 40
stop();
Symbol 439 MovieClip Frame 60
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 61
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 70
play();
Symbol 439 MovieClip Frame 110
gotoAndStop ("armmove1");
Symbol 439 MovieClip Frame 120
play();
Symbol 439 MovieClip Frame 181
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 190
play();
Symbol 439 MovieClip Frame 210
stop();
Symbol 439 MovieClip Frame 220
play();
Symbol 439 MovieClip Frame 300
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 310
play();
Symbol 439 MovieClip Frame 370
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 380
play();
Symbol 439 MovieClip Frame 459
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 470
play();
Symbol 439 MovieClip Frame 550
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 560
play();
Symbol 439 MovieClip Frame 640
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 650
play();
Symbol 439 MovieClip Frame 690
stop();
Symbol 439 MovieClip Frame 701
play();
Symbol 439 MovieClip Frame 771
gotoAndPlay ("loop8");
Symbol 439 MovieClip Frame 810
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 820
play();
Symbol 439 MovieClip Frame 860
stop();
Symbol 439 MovieClip Frame 870
play();
Symbol 439 MovieClip Frame 940
gotoAndPlay ("loop9");
Symbol 439 MovieClip Frame 979
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 990
play();
Symbol 439 MovieClip Frame 1030
stop();
Symbol 439 MovieClip Frame 1040
play();
Symbol 439 MovieClip Frame 1090
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 1100
play();
Symbol 439 MovieClip Frame 1120
stop();
Symbol 439 MovieClip Frame 1181
gotoAndStop ("armstill");
Symbol 439 MovieClip Frame 1205
stop();
Symbol 446 MovieClip Frame 1
stop();
Symbol 446 MovieClip Frame 2
stop();
Symbol 446 MovieClip Frame 3
stop();
Symbol 469 MovieClip Frame 1
stop();
Symbol 469 MovieClip Frame 2
stop();
Symbol 469 MovieClip Frame 3
stop();
Symbol 472 MovieClip Frame 1
stop();
Symbol 472 MovieClip Frame 2
stop();
Symbol 472 MovieClip Frame 3
stop();
Symbol 475 MovieClip Frame 1
stop();
Symbol 475 MovieClip Frame 2
stop();
Symbol 475 MovieClip Frame 3
stop();
Symbol 476 MovieClip Frame 1
stop();
Symbol 476 MovieClip Frame 2
stop();
Symbol 476 MovieClip Frame 3
stop();
Symbol 498 MovieClip Frame 1
stop();
Symbol 498 MovieClip Frame 10
stop();
Symbol 498 MovieClip Frame 20
stop();
Symbol 498 MovieClip Frame 30
stop();
Symbol 498 MovieClip Frame 40
stop();
Symbol 498 MovieClip Frame 50
stop();
Symbol 499 MovieClip [avatar_boy] Frame 1
#initclip 58
Object.registerClass("avatar_boy", idol.AvatarBoy);
#endinitclip
stop();
Symbol 499 MovieClip [avatar_boy] Frame 20
play();
Symbol 499 MovieClip [avatar_boy] Frame 100
gotoAndPlay ("move1");
Symbol 499 MovieClip [avatar_boy] Frame 110
play();
Symbol 499 MovieClip [avatar_boy] Frame 190
gotoAndPlay ("move2");
Symbol 499 MovieClip [avatar_boy] Frame 210
play();
Symbol 499 MovieClip [avatar_boy] Frame 290
gotoAndPlay ("move3");
Symbol 499 MovieClip [avatar_boy] Frame 338
stop();
Symbol 510 MovieClip [background_row] Frame 1
#initclip 59
Object.registerClass("background_row", idol.BackgroundRow);
#endinitclip
Symbol 519 MovieClip [arrow] Frame 1
#initclip 60
Object.registerClass("arrow", idol.Arrow);
#endinitclip
Symbol 526 MovieClip [levelsigns_en] Frame 1
stop();
Symbol 527 MovieClip [sparkle_left] Frame 1
#initclip 61
Object.registerClass("sparkle_left", idol.AnimDriver50Fps);
#endinitclip
Symbol 528 MovieClip [sparkle_down] Frame 1
#initclip 62
Object.registerClass("sparkle_down", idol.AnimDriver50Fps);
#endinitclip
Symbol 529 MovieClip [sparkle_up] Frame 1
#initclip 63
Object.registerClass("sparkle_up", idol.AnimDriver50Fps);
#endinitclip
Symbol 530 MovieClip [sparkle_right] Frame 1
#initclip 64
Object.registerClass("sparkle_right", idol.AnimDriver50Fps);
#endinitclip
Symbol 539 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 1
stop();
Symbol 586 MovieClip Frame 10
stop();
Symbol 586 MovieClip Frame 20
stop();
Symbol 596 MovieClip Frame 1
stop();
Symbol 596 MovieClip Frame 10
stop();
Symbol 596 MovieClip Frame 20
stop();
Symbol 596 MovieClip Frame 30
stop();
Symbol 596 MovieClip Frame 40
stop();
Symbol 596 MovieClip Frame 50
stop();
Symbol 628 MovieClip Frame 1
stop();
Symbol 628 MovieClip Frame 10
stop();
Symbol 628 MovieClip Frame 20
stop();
Symbol 639 MovieClip Frame 1
stop();
Symbol 639 MovieClip Frame 10
stop();
Symbol 639 MovieClip Frame 20
stop();
Symbol 639 MovieClip Frame 30
stop();
Symbol 639 MovieClip Frame 40
stop();
Symbol 639 MovieClip Frame 50
stop();
Symbol 669 MovieClip Frame 1
stop();
Symbol 669 MovieClip Frame 10
stop();
Symbol 669 MovieClip Frame 20
stop();
Symbol 677 MovieClip Frame 1
stop();
Symbol 677 MovieClip Frame 10
stop();
Symbol 677 MovieClip Frame 20
stop();
Symbol 677 MovieClip Frame 30
stop();
Symbol 677 MovieClip Frame 40
stop();
Symbol 677 MovieClip Frame 50
stop();
Symbol 700 MovieClip [TitleBar] Frame 1
#initclip 65
Object.registerClass("TitleBar", idol.AnimDriver50Fps);
#endinitclip
Symbol 701 MovieClip [songtitle] Frame 1
#initclip 66
Object.registerClass("songtitle", idol.AnimDriver50Fps);
#endinitclip
Symbol 715 MovieClip [levelsigns_de] Frame 1
stop();
Symbol 746 MovieClip [__Packages.mx.utils.Delegate] Frame 0
class mx.utils.Delegate extends Object
{
var func;
function Delegate (f) {
super();
func = f;
}
static function create(obj, func) {
var _local2 = function () {
var _local2 = arguments.callee.target;
var _local3 = arguments.callee.func;
return(_local3.apply(_local2, arguments));
};
_local2.target = obj;
_local2.func = func;
return(_local2);
}
function createDelegate(obj) {
return(create(obj, func));
}
}
Symbol 747 MovieClip [__Packages.com.midasplayer.util.GameDataAcquirer] Frame 0
class com.midasplayer.util.GameDataAcquirer
{
var attrib, trees, targetVar, dataEvent, timerFn, timer, error;
function GameDataAcquirer (variable) {
attrib = new com.midasplayer.util.Map();
trees = new com.midasplayer.util.Map();
if (variable != undefined) {
targetVar = variable;
} else {
targetVar = "gameData";
}
}
function beginWait(fn) {
dataEvent = fn;
timerFn = function (caller) {
var _local3 = _level0[caller.targetVar];
if ((_local3 != undefined) && ((_local3 != null) && (_local3.length > 0))) {
caller.parse(_local3);
if (caller.dataEvent != undefined) {
caller.dataEvent();
}
caller.dataEvent = undefined;
_global.clearInterval(caller.timer);
}
};
timer = _global.setInterval(timerFn, 100, this);
}
function poll() {
if (!parsed) {
var _local2 = _level0[targetVar];
if ((_local2 != undefined) && ((_local2 != null) && (_local2.length > 0))) {
parse(_local2);
parsed = true;
return(true);
}
}
return(false);
}
function getAttributes() {
return(attrib);
}
function getSubTrees(name) {
return(trees.get(name));
}
function getGameData(name) {
return(attrib.get(name));
}
function parse(data) {
attrib.clear();
var _local3 = new com.midasplayer.util.Map();
var _local4 = new XML();
_local4.ignoreWhite = true;
_local4.parseXML(data);
var _local5 = _local4.firstChild;
if (_local5.nodeName != "gamedata") {
error = "Bad XML (expected <gamedata>)";
return(undefined);
}
for (var i in _local5.attributes) {
var _local7 = _local5.attributes[i];
if ((_local7.indexOf("[") == 0) && ((_local6 = _local7.indexOf("]")) != -1)) {
_local7 = _local7.substring(1, _local6).split(",");
}
attrib.put(i, _local7);
}
for (var i in _local5.childNodes) {
var _local8 = _local5.childNodes[i];
switch (_local8.nodeName) {
case "text" :
_local3.put(_local8.attributes.id, _local8.firstChild.nodeValue);
break;
default :
var _local9 = trees.get(_local8.nodeName);
if (_local9 == undefined) {
trees.put(_local8.nodeName, [_local8]);
} else {
_local9.push(_local8);
}
}
}
com.midasplayer.util.I18n.init(_local3);
}
var parsed = false;
}
Symbol 748 MovieClip [__Packages.com.midasplayer.util.Map] Frame 0
class com.midasplayer.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var i in init) {
map["" + i] = init[i];
}
lastSize = -1;
}
function put(key, value) {
map["" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["" + key]);
}
function remove(key) {
var _local3 = "" + key;
var _local4 = map[_local3];
delete map[_local3];
lastSize = -1;
return(_local4);
}
function contains(key) {
return(map["" + key] != undefined);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var i in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var _local2 = "";
for (var i in map) {
_local2 = _local2 + (((i + "=>") + map[i]) + newline);
}
}
function toArray() {
var _local2 = [];
for (var i in map) {
_local2[_local2.length] = map[i];
}
return(_local2);
}
function keySet() {
var _local2 = [];
for (var i in map) {
_local2[_local2.length] = i;
}
return(_local2);
}
function get iterator() {
return(new com.midasplayer.util.MapIterator(this));
}
function get valueIterator() {
return(new com.midasplayer.util.MapValueIterator(this));
}
function foreach(fn) {
var _local3 = arguments.slice(1);
if (_local3.length > 0) {
do {
if ((in map) == null) {
break;
}
var i = (in map);
} while (fn(i, map[i], _local3[0], _local3[1], _local3[2], _local3[3], _local3[4]) != false);
do {
} while ("foreach" != null);
} else {
do {
if ((in map) == null) {
break;
}
var i = (in map);
} while (fn(i, map[i]) != false);
do {
} while (_local1 != null);
}
lastSize = -1;
}
function get _content() {
return(map);
}
}
Symbol 749 MovieClip [__Packages.com.midasplayer.util.Iterator] Frame 0
class com.midasplayer.util.Iterator
{
function Iterator () {
}
}
Symbol 750 MovieClip [__Packages.com.midasplayer.util.MapIterator] Frame 0
class com.midasplayer.util.MapIterator implements com.midasplayer.util.Iterator
{
var map, keys, ptr;
function MapIterator (map) {
this.map = map;
keys = map.keySet();
ptr = 0;
}
function next() {
if (ptr < keys.length) {
return(keys[ptr++]);
}
return(undefined);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 751 MovieClip [__Packages.com.midasplayer.util.MapValueIterator] Frame 0
class com.midasplayer.util.MapValueIterator implements com.midasplayer.util.Iterator
{
var map, mapRef, keys, ptr;
function MapValueIterator (map) {
this.map = map;
mapRef = map._content;
keys = map.keySet();
ptr = 0;
}
function next() {
return(mapRef[keys[ptr++]]);
}
function hasNext() {
return(ptr != keys.length);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
map.remove(keys[ptr - 1]);
}
}
Symbol 752 MovieClip [__Packages.com.midasplayer.util.I18n] Frame 0
class com.midasplayer.util.I18n
{
static var lang;
function I18n () {
}
static function init(newLang) {
lang = newLang;
}
static function getString(name) {
var _local3 = lang.get(name);
if (_local3 == undefined) {
var _local4 = ("{" + name) + "}";
} else {
var _local4 = _local3.toString();
}
var _local5 = 1;
for ( ; _local5 < arguments.length ; _local5++) {
var _local4 = _local4.split(("{" + (_local5 - 1)) + "}").join(arguments[_local5]);
}
return(_local4);
}
}
Symbol 753 MovieClip [__Packages.com.midasplayer.timing.Timeable] Frame 0
class com.midasplayer.timing.Timeable
{
function Timeable () {
}
}
Symbol 754 MovieClip [__Packages.idol.KingGame] Frame 0
class idol.KingGame implements com.midasplayer.timing.Timeable
{
var m_parent, m_performance, m_lastFps, m_forcedLow, m_enableFrameRate, m_soundsEnabled, m_mainTimer;
function KingGame (gameParent) {
m_parent = gameParent;
var _local3 = new ContextMenu();
_local3.hideBuiltInItems();
_local3.builtInItems.quality = true;
_root.menu = _local3;
_root._quality = "high";
m_performance = new com.midasplayer.timing.Performance(MOVIE_FPS);
m_performance.setFpsThreshold(MIN_FPS, MEASURE_TIME);
m_performance.addQualityFeedbackListener(mx.utils.Delegate.create(this, onLowQualityWarning));
m_lastFps = "";
m_forcedLow = false;
m_enableFrameRate = false;
m_soundsEnabled = true;
}
function start() {
m_mainTimer = new com.midasplayer.timing.Timer(this, 25);
m_parent.onEnterFrame = mx.utils.Delegate.create(this, drive);
}
function drive() {
m_mainTimer.advanceTime2();
m_performance.frameUpdated();
if (m_enableFrameRate) {
var _local2 = ((m_performance.fps > 0) ? ("FPS: " + m_performance.fps) : "");
if (_local2 != m_lastFps) {
m_parent.btnpanel.fpsmeter_txt.text = _local2;
m_lastFps = _local2;
}
} else if (m_lastFps.length > 0) {
m_parent.fpsmeter_txt.text = "";
m_lastFps = "";
}
}
function tick(tick) {
}
function render(tick, alpha) {
}
function init(gda) {
}
function onLowQualityWarning() {
if (!m_forcedLow) {
m_forcedLow = true;
m_parent._quality = "low";
}
}
static var MOVIE_FPS = 120;
static var MEASURE_TIME = 6;
static var MIN_FPS = 8;
}
Symbol 755 MovieClip [__Packages.com.midasplayer.timing.Timer] Frame 0
class com.midasplayer.timing.Timer
{
var timeable;
function Timer (timeable, gameTicksPerSecond) {
millisPerGameTick = 1000 / gameTicksPerSecond;
this.gameTicksPerSecond = gameTicksPerSecond;
this.timeable = timeable;
maxTickTime = 500;
}
function getMillisPerTick() {
return(millisPerGameTick);
}
function getTicksPerSecond() {
return(gameTicksPerSecond);
}
function setMaxTickTime(millis) {
maxTickTime = millis;
}
function advanceTime2() {
var _local2 = getTimer();
if (startTime < 0) {
startTime = _local2;
unprocessedTime = millisPerGameTick;
}
time = _local2 - startTime;
var _local3 = time - lastTime;
lastTime = time;
unprocessedTime = unprocessedTime + _local3;
if (unprocessedTime >= millisPerGameTick) {
var _local4 = maxTickTime + _local2;
do {
timeable.tick(tick);
tick++;
unprocessedTime = unprocessedTime - millisPerGameTick;
} while ((unprocessedTime >= millisPerGameTick) && (getTimer() < _local4));
}
var _local5 = (unprocessedTime % millisPerGameTick) / millisPerGameTick;
com.midasplayer.timing.IFloat.setAlpha(_local5);
timeable.render(tick, _local5);
}
function advanceTime() {
time = getTimer();
var _local2 = time - lastTime;
lastTime = time;
unprocessedTime = unprocessedTime + _local2;
var _local3 = 0;
while (unprocessedTime > millisPerGameTick) {
unprocessedTime = unprocessedTime - millisPerGameTick;
timeable.tick(tick);
tick++;
_local3++;
if (_local3 >= 10) {
unprocessedTime = 0;
}
}
var _local4 = unprocessedTime / millisPerGameTick;
timeable.render(tick, _local4);
}
var time = 0;
var startTime = -1;
var lastTime = 0;
var unprocessedTime = 0;
var gameTicksPerSecond = 0;
var tick = 0;
var millisPerGameTick = 0;
var maxTickTime = -1;
}
Symbol 756 MovieClip [__Packages.com.midasplayer.timing.IFloat] Frame 0
class com.midasplayer.timing.IFloat
{
static var alpha;
var ivalue, lastValue;
function IFloat (initial) {
ivalue = initial;
lastValue = initial;
alpha = 0;
}
function setTo(initial) {
ivalue = initial;
lastValue = initial;
}
function set(newValue) {
lastValue = ivalue;
ivalue = newValue;
}
function get(lalpha) {
return(lastValue + ((ivalue - lastValue) * lalpha));
}
static function setAlpha(na) {
alpha = na;
}
function get value() {
return(lastValue + ((ivalue - lastValue) * alpha));
}
function set value(v) {
ivalue = v;
lastValue = v;
//return(value);
}
}
Symbol 757 MovieClip [__Packages.com.midasplayer.timing.Performance] Frame 0
class com.midasplayer.timing.Performance
{
var idealFps, measurePeriod, minPeriodFps, listeners, startAt, period, nextFpsUpdate, totalFps, fpsCount, lastFpsCount, periodFps, updates;
function Performance (idealFps) {
this.idealFps = idealFps;
measurePeriod = 5;
minPeriodFps = (idealFps / 2) * measurePeriod;
listeners = [];
begin();
}
function begin() {
startAt = -1;
period = -1;
nextFpsUpdate = getTimer();
totalFps = 0;
fpsCount = 0;
lastFpsCount = -1;
periodFps = 0;
updates = 0;
}
function frameUpdated() {
fpsCount++;
var _local2 = getTimer();
if (startAt < 0) {
startAt = _local2;
}
if (_local2 > nextFpsUpdate) {
if (updates > 0) {
lastFpsCount = fpsCount;
totalFps = totalFps + fpsCount;
}
periodFps = periodFps + fpsCount;
if ((++period) == measurePeriod) {
if (periodFps < minPeriodFps) {
for (var i in listeners) {
listeners[i](periodFps / measurePeriod);
}
}
period = 0;
periodFps = 0;
}
nextFpsUpdate = _local2 + 1000;
fpsCount = 0;
updates++;
}
}
function addQualityFeedbackListener(fn) {
listeners.push(fn);
}
function setFpsThreshold(minPeriodFps, measurePeriod) {
this.minPeriodFps = minPeriodFps * measurePeriod;
this.measurePeriod = measurePeriod;
}
function get fps() {
return(lastFpsCount);
}
function get averageFps() {
return(totalFps / ((getTimer() - startAt) / 1000));
}
}
Symbol 758 MovieClip [__Packages.idol.Game] Frame 0
class idol.Game extends idol.KingGame
{
var m_quitJumped, m_quitAddr, m_soundEnabled, m_gameQuit, m_state, m_halt, m_resultFlag, m_execListPc, m_returnCode, m_buttons, m_soundBtn, m_quitBtn, m_gda, start, m_data, m_mainTimer, m_prevStateFinalFrame, m_runState, m_parent;
function Game (m_parent) {
super(m_parent);
m_quitJumped = false;
m_quitAddr = 0;
m_soundEnabled = true;
m_gameQuit = false;
m_state = null;
m_halt = false;
m_resultFlag = false;
m_execListPc = 0;
m_returnCode = 0;
m_buttons = m_parent.attachMovie("gamectrl_buttons", "btnpanel", m_parent.getNextHighestDepth());
m_buttons._x = 2;
m_buttons._y = 560;
m_soundBtn = m_buttons.btn_sound;
m_quitBtn = m_buttons.btn_quit;
m_soundBtn.onPress = mx.utils.Delegate.create(this, onSoundToggle);
m_quitBtn.onPress = mx.utils.Delegate.create(this, onQuit);
m_quitBtn.swapDepths(m_parent.getNextHighestDepth());
m_quitBtn.txt.text = com.midasplayer.util.I18n.getString("btn_quit_game");
m_soundBtn.swapDepths(m_parent.getNextHighestDepth());
m_soundBtn.txt.text = com.midasplayer.util.I18n.getString("btn_sound_off");
updateSoundState();
}
function setProperty(name, value) {
switch (name) {
case "auxPath" :
case "auxPromo" :
case "auxSignup" :
case "auxPromoLimit" :
case "auxPlayerName" :
case "auxViral" :
case "auxReplayData" :
_root[name] = value;
}
}
function updateSoundState() {
com.midasplayer.fx.SoundManager.enableSounds(m_soundEnabled);
m_soundBtn.txt.text = (m_soundEnabled ? (com.midasplayer.util.I18n.getString("btn_sound_off")) : (com.midasplayer.util.I18n.getString("btn_sound_on")));
}
function onSoundToggle() {
m_soundEnabled = !m_soundEnabled;
updateSoundState();
}
function onQuit() {
if ((!m_gameQuit) && (m_state)) {
m_gameQuit = true;
m_state.quitGame();
}
}
function init(gda) {
m_gda = gda;
flash.external.ExternalInterface.addCallback("startIdol", null, mx.utils.Delegate.create(this, startIdol));
flash.external.ExternalInterface.addCallback("setIdolProperty", null, mx.utils.Delegate.create(this, setProperty));
if (m_gda.getGameData("wait") == "1") {
flash.external.ExternalInterface.call("onIdolReady");
} else {
start();
}
}
function startIdol() {
if (_root.auxReplayData != undefined) {
m_execList = m_execListViralReplay;
}
start();
}
function gameInit() {
m_gameQuit = false;
m_quitJumped = false;
m_buttons._x = 2;
m_buttons._y = 560;
var _local2 = AUTO_VERSION.split("_")[1];
var _local3 = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
var _local4 = 0;
var _local5 = SharedObject.getLocal("timesPlayed");
if (_local5 != null) {
_local4 = _local5.data.played;
if (_local4 == undefined) {
_local4 = 0;
}
}
var _local6 = ((m_data != undefined) ? (m_data.numTimesPlayed) : (_local4));
m_data = new Object();
m_data.numTimesPlayed = _local6;
m_data.version = _global.parseInt(_local2.substring(1, _local2.length - 1));
m_data.startFrom = 0;
m_data.promoLimit = ((_root.auxPromoLimit != undefined) ? (_root.auxPromoLimit) : -1);
m_data.playerName = ((_root.auxPlayerName != undefined) ? (_root.auxPlayerName) : "");
m_data.viralUrl = ((_root.auxViral != undefined) ? (_root.auxViral) : "");
m_data.promoUrl = ((_root.auxPromo != undefined) ? (_root.auxPromo) : "");
m_data.isSignup = ((_root.auxSignup != undefined) ? true : false);
m_data.signupPostUrl = ((_root.auxSignup != undefined) ? (_root.auxSignup) : "");
m_data.isViral = ((m_data.viralUrl.length > 0) ? true : false);
m_data.isViralReplay = false;
m_data.isPromo = m_data.isSignup || (((m_data.promoUrl.length > 0) ? true : false));
m_data.currentLevel = m_data.startFrom;
m_data.millisPerTick = m_mainTimer.getMillisPerTick();
m_data.ticksPerSec = m_mainTimer.getTicksPerSecond();
m_data.lang = m_gda.getGameData("lang");
m_data.isMale = false;
m_data.lastGrade = 0;
m_data.roundScore = 0;
m_data.gameWon = false;
m_data.totalScore = 0;
m_data.dataPath = m_gda.getGameData("path");
m_data.isMale = false;
m_data.numLevels = 0;
m_data.lastMaxScore = -1;
m_data.lastQualifyScore = -1;
m_data.haircut = 1;
m_data.hairColor = _local3;
m_data.skinColor = _local3;
m_data.eyeColor = _local3;
m_data.mouthColor = _local3;
m_data.clothesColor = [_local3, _local3, _local3];
m_data.tick = -1;
m_data.alpha = -1;
m_data.promoSongRngIndex = undefined;
m_data.level = [null, null, null];
if (_root.auxPath) {
m_data.dataPath = _root.auxPath;
}
if (m_data.isPromo || (m_data.isViral)) {
m_data.seed = int(Math.random() * 2147483647);
} else {
m_data.seed = m_gda.getGameData("randomseed");
}
if (_root.auxReplayData != undefined) {
var _local7 = com.midasplayer.util.Base64.decode(_root.auxReplayData);
var _local8 = com.midasplayer.util.LZW.decompress(_local7);
var _local9 = _local8.split(newline);
m_data.replayData = new Array();
var _local10 = 0;
for ( ; _local10 < _local9.length ; _local10++) {
m_data.replayData.push(new idol.RecordData(_local9[_local10]));
}
var _local11 = m_data.replayData[0].m_body;
var _local12 = _local11.split(" ");
m_data.seed = _global.parseInt(_local12[0]);
m_data.promoSongRngIndex = _global.parseInt(_local12[1]);
m_data.replayScore = _global.parseInt(_local12[2]);
m_data.haircut = _global.parseInt(_local12[3]);
m_data.isMale = _global.parseInt(_local12[4]) == 1;
m_data.playerName = _global.unescape(_local12[5]);
var _local13 = _local12[6].split(";");
m_data.hairColor = makeColor(_local13[0]);
m_data.eyeColor = makeColor(_local13[1]);
m_data.mouthColor = makeColor(_local13[2]);
m_data.skinColor = makeColor(_local13[3]);
m_data.clothesColor[0] = makeColor(_local13[4]);
m_data.isViralReplay = true;
_root.btnpanel._x = 2;
_root.btnpanel._y = 502;
} else {
m_data.replayData = "";
}
m_data.rng = new com.midasplayer.util.Random(m_data.seed);
var _local14 = new XML();
_local14.ignoreWhite = true;
var _local15 = "";
if (m_data.isPromo || (m_data.isViral)) {
var _local16 = new XML();
_local16.ignoreWhite = true;
_local16.parseXML(_level0.songData);
var _local17 = _local16.firstChild.childNodes;
var _local18 = 0;
for (var i in _local17) {
_local18++;
}
if (m_data.promoSongRngIndex == undefined) {
m_data.promoSongRngIndex = int(Math.random() * 2147483647) % _local18;
}
_local15 = _local15 + "<levels>";
_local15 = _local15 + _local17[m_data.promoSongRngIndex];
_local15 = _local15 + "</levels>";
} else {
_local15 = m_gda.getSubTrees("levels");
}
_local14.parseXML(_local15);
var _local19 = _local14.firstChild.childNodes;
var _local20 = 0;
for (var i in _local19) {
var _local21 = _local19[i];
var _local22 = new Object();
var _local23 = _global.parseInt(_local21.attributes.number) - 1;
_local22.song = _local21.attributes.song;
_local22.qualify = _global.parseInt(_local21.attributes.qualify);
var _local24 = _local21.firstChild;
_local22.bpm = _global.parseInt(_local24.attributes.bpm);
_local22.name = _local24.attributes.name;
_local22.sectionsBoy = _local24.attributes["sections-boy"].split(",");
_local22.sectionsGirl = _local24.attributes["sections-girl"].split(",");
_local22.songLength = _local24.attributes["song-length-ms"];
_local22.divider = _global.parseInt(_local24.attributes.divider);
_local22.longNote = _global.parseInt(_local24.attributes["long-note"]);
_local22.newLongNote = _global.parseInt(_local24.attributes["new-long-note"]);
_local22.extraNote = _global.parseInt(_local24.attributes["extra-note"]);
_local22.newNote = _global.parseInt(_local24.attributes["new-note"]);
m_data.level[_local23] = _local22;
_local20++;
}
m_data.numLevels = _local20;
if (m_data.isPromo && (m_data.promoLimit != -1)) {
if (m_data.numTimesPlayed >= m_data.promoLimit) {
m_gameQuit = true;
m_execListPc = m_quitAddr;
m_quitJumped = true;
if (m_state) {
m_state.quitGame();
}
}
}
}
function tick(tick) {
if (m_halt) {
return(undefined);
}
if ((m_state == null) || (m_state.isDisengage())) {
var _local3 = false;
if ((m_execListPc < 0) || (m_execListPc >= m_execList.length)) {
m_halt = true;
return(undefined);
}
if (m_state && (m_state.isDisengage())) {
m_state.disengage();
m_prevStateFinalFrame = m_state.getFramebuffer();
m_returnCode = m_state.returnCode();
m_state.destroy();
m_state = null;
}
if ((!m_quitJumped) && (m_gameQuit)) {
m_execListPc = m_quitAddr;
m_quitJumped = true;
}
while (!_local3) {
var _local4 = m_execList[m_execListPc++];
var _local5 = _local4.split(" ");
switch (_local5[0]) {
case "qu" :
m_quitAddr = _global.parseInt(_local5[1]);
break;
case "init" :
gameInit();
break;
case "nop" :
break;
case "st" :
var _local6 = _local5[1];
m_runState = _local6;
switch (_local6) {
case "intro" :
m_state = new idol.StateIntro(m_parent, tick, m_data, _local5[2]);
break;
case "closeup" :
m_state = new idol.StateCloseUp(m_parent, tick, m_data, _local5[2]);
break;
case "jury" :
m_state = new idol.StateJury(m_parent, tick, m_data, _local5[2]);
break;
case "gameover" :
m_state = new idol.StateGameOver(m_parent, tick, m_data, _local5[2]);
m_gameQuit = true;
m_quitJumped = true;
break;
case "game" :
m_state = new idol.StateGame(m_parent, tick, m_data, _local5[2]);
break;
case "replaygame" :
m_state = new idol.StateReplayGame(m_parent, tick, m_data, _local5[2]);
break;
default :
m_halt = true;
return(undefined);
}
m_state.copyFramebuffer(m_prevStateFinalFrame);
m_state.engage();
m_state.initCurtain();
m_buttons.swapDepths(m_parent.getNextHighestDepth());
_local3 = true;
break;
case "stop" :
m_halt = true;
_local3 = true;
if (m_data.isPromo) {
getURL (m_data.promoUrl, "_top", "POST");
}
break;
case "cmp" :
m_resultFlag = _global.parseInt(_local5[1]) == m_returnCode;
break;
case "beq" :
if (m_resultFlag) {
m_execListPc--;
m_execListPc = m_execListPc + _global.parseInt(_local5[1]);
}
break;
case "bne" :
if (!m_resultFlag) {
m_execListPc--;
m_execListPc = m_execListPc + _global.parseInt(_local5[1]);
}
break;
case "bra" :
m_execListPc--;
m_execListPc = m_execListPc + _global.parseInt(_local5[1]);
break;
default :
m_halt = true;
_local3 = true;
return(undefined);
}
}
}
m_data.tick = tick;
m_state.tick();
}
function render(tick, alpha) {
m_data.alpha = alpha;
m_state.render();
}
function makeColor(s) {
var _local3 = new Object();
var _local4 = s.split("#");
var _local5 = 0;
for ( ; _local5 < _local4.length ; _local5++) {
var _local6 = _local4[_local5].split(":");
_local3[_local6[0]] = _global.parseInt(_local6[1]);
}
return(_local3);
}
static var AUTO_VERSION = "BUILD_[241]_111e4c00c65";
static var m_execListNormal = ["qu 16", "init", "st intro", "cmp -1", "beq 12", "st game", "cmp -1", "beq 8", "st jury", "cmp 2", "beq 10", "cmp 0", "beq 3", "st closeup still,glad", "bra -9", "st closeup still,angry", "st gameover", "cmp 1", "beq -17", "stop", "st closeup still,glad", "st gameover", "stop"];
static var m_execListViralReplay = ["qu 5", "init", "st replaygame", "st jury", "st closeup still,glad", "st gameover", "stop"];
var m_execList = m_execListNormal;
}
Symbol 759 MovieClip [__Packages.com.midasplayer.util.Random] Frame 0
class com.midasplayer.util.Random
{
var mta, mti, lastSeed;
function Random (aSeed) {
mta = new Array(N);
mti = N + 1;
if (aSeed != undefined) {
init_genrand(aSeed);
}
}
function set seed(s) {
init_genrand(s);
//return(seed);
}
function get seed() {
return(lastSeed);
}
function nextInt(n) {
return((genrand_int32() & 2147483647) % n);
}
function nextFloat() {
return(next(24) / (1 << 24));
}
function nextDouble() {
return(next(24) / (1 << 24));
}
function next(bits) {
if (bits < 32) {
return(genrand_int32() & ((1 << bits) - 1));
}
return(genrand_int32());
}
function init_genrand(s) {
s = int(s);
var _local3 = getTimer();
lastSeed = s;
mta[0] = s;
var _local4 = s;
var _local5 = new com.midasplayer.util.Integer64();
var _local6 = N;
mti = 1;
for ( ; mti < _local6 ; mti++) {
_local5.init32((_local4 >>> 30) ^ _local4);
_local5.mulu32(1812433253);
_local4 = (mta[mti] = int(_local5.lsb + mti));
}
var _local7 = getTimer();
}
function genrand_int32() {
var _local2 = N;
var _local3 = 0;
if (mti >= _local2) {
if (mti == (_local2 + 1)) {
init_genrand(5489);
}
var _local4 = M;
var _local5 = UPPER_MASK;
var _local6 = LOWER_MASK;
var _local7 = mag01;
var _local8 = getTimer();
var _local9 = 0;
var _local10 = _local2 - _local4;
var _local11 = _local4 - _local2;
_local9 = 0;
for ( ; _local9 < _local10 ; _local9++) {
_local3 = (mta[_local9] & _local5) | (mta[_local9 + 1] & _local6);
mta[_local9] = (mta[_local9 + _local4] ^ (_local3 >>> 1)) ^ _local7[_local3 & 1];
}
_local10 = _local2 - 1;
for ( ; _local9 < _local10 ; _local9++) {
_local3 = (mta[_local9] & _local5) | (mta[_local9 + 1] & _local6);
mta[_local9] = (mta[_local9 + _local11] ^ (_local3 >>> 1)) ^ _local7[_local3 & 1];
}
_local3 = (mta[_local2 - 1] & _local5) | (mta[0] & _local6);
mta[_local2 - 1] = (mta[_local4 - 1] ^ (_local3 >>> 1)) ^ _local7[_local3 & 1];
mti = 0;
var _local12 = getTimer();
}
_local3 = mta[mti++];
_local3 = _local3 ^ (_local3 >>> 11);
_local3 = _local3 ^ ((_local3 << 7) & -1658038656);
_local3 = _local3 ^ ((_local3 << 15) & -272236544);
_local3 = _local3 ^ (_local3 >>> 18);
return(_local3);
}
static var N = 624;
static var M = 397;
static var MATRIX_A = -1727483681;
static var UPPER_MASK = -2147483648;
static var LOWER_MASK = 2147483647;
static var mag01 = [0, -1727483681];
}
Symbol 760 MovieClip [__Packages.com.midasplayer.util.Integer64] Frame 0
class com.midasplayer.util.Integer64
{
var r, p, s;
function Integer64 (lowInt) {
r = [[0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0], [0, 0, 0, 0, 0]];
p = [0, 0, 0, 0, 0];
s = [0, 0, 0];
if (lowInt != undefined) {
merge(lowInt);
}
}
function init(v) {
var _local3 = 0;
for ( ; _local3 < p.length ; _local3++) {
p[_local3] = v.p[_local3];
}
}
function init32(n) {
p[0] = n & 32767;
n = n >>> 15;
p[1] = n & 32767;
n = n >>> 15;
p[2] = n & 3;
p[3] = 0;
p[4] = 0;
}
function get lsb() {
return((p[0] | (p[1] << 15)) | ((p[2] & 3) << 30));
}
function get msb() {
return((((p[2] >> 2) | ((p[3] << 15) >> 2)) | ((p[4] << (15 * 2)) >> 2)) & 2147483647);
}
function binary15iftLeft(step) {
var _local3 = 0;
for ( ; _local3 < step ; _local3++) {
shl();
}
}
function binary15iftRight(step) {
var _local3 = (step / 15) >> 0;
var _local4 = step - (_local3 * 15);
var _local5 = p.length - 1;
for ( ; _local5 > 0 ; p[_local5--] = 0) {
var _local6 = 0;
for ( ; _local6 < _local3 ; _local6++) {
p[_local6] = p[_local6 + 1];
}
}
if (_local4 > 0) {
var _local7 = 0;
for ( ; _local7 < _local4 ; _local7++) {
shr();
}
}
}
function binaryNot(o) {
p[0] = p[0] ^ o.p[0];
p[1] = p[1] ^ o.p[1];
p[2] = p[2] ^ o.p[2];
p[3] = p[3] ^ o.p[3];
p[4] = p[4] ^ o.p[4];
}
function add64(o) {
var _local3 = 0;
var _local4 = 1;
var _local5 = 0;
for ( ; (_local4 < p.length) && (o.p[_local5] != 0) ; _local4++) {
}
_local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
_local3 = _local3 + (p[_local5] + o.p[_local5]);
p[_local5] = _local3 & 32767;
_local3 = _local3 >> 15;
}
}
function add32(num) {
var _local3 = 0;
var _local4 = num & 32767;
num = num >> 15;
var _local5 = num & 32767;
num = num >> 15;
var _local6 = num & 3;
_local3 = _local3 + (p[0] + _local4);
p[0] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (p[1] + _local5);
p[1] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (p[2] + _local6);
p[2] = _local3 & 32767;
}
function mulu32(num) {
var _local3 = 0;
s[0] = num & 32767;
num = num >>> 15;
s[1] = num & 32767;
num = num >>> 15;
s[2] = num & 3;
var _local4 = 0;
for ( ; _local4 < 3 ; _local4++) {
var _local5 = s[_local4];
_local3 = _local5 * p[0];
r[_local4][0] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[1]);
r[_local4][1] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[2]);
r[_local4][2] = _local3 & 3;
}
_local3 = r[0][0];
p[0] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (r[0][1] + r[1][0]);
p[1] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local3 & 3;
p[3] = 0;
p[4] = 0;
}
function mul64(o) {
var _local3 = 0;
var _local4 = 0;
for ( ; _local4 < 5 ; _local4++) {
var _local5 = o.p[_local4];
_local3 = _local5 * p[0];
r[_local4][0] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[1]);
r[_local4][1] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[2]);
r[_local4][2] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[3]);
r[_local4][3] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (_local5 * p[4]);
r[_local4][4] = _local3 & 32767;
}
_local3 = r[0][0];
p[0] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (r[0][1] + r[1][0]);
p[1] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + ((r[0][2] + r[1][1]) + r[2][0]);
p[2] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + (((r[0][3] + r[1][2]) + r[2][1]) + r[3][0]);
p[3] = _local3 & 32767;
_local3 = _local3 >> 15;
_local3 = _local3 + ((((r[0][4] + r[1][3]) + r[2][2]) + r[3][1]) + r[4][0]);
p[4] = _local3 & 7;
}
function mul32(value) {
mul64(new com.midasplayer.util.Integer64(value));
}
function merge(a) {
var _local3 = 0;
for ( ; _local3 < 3 ; _local3++) {
p[_local3] = p[_local3] + (a & 32767);
a = a >>> 15;
}
return(a);
}
function shl() {
var _local2 = 0;
var _local3 = 0;
var _local4 = 0;
var _local5 = p.length;
for ( ; _local4 < _local5 ; _local4++ , _local3 = _local2) {
_local2 = (p[_local4] & 16384) >> 14;
p[_local4] = p[_local4] << 1;
p[_local4] = (p[_local4] | _local3) & 32767;
}
}
function shr() {
var _local2 = 0;
var _local3 = 0;
var _local4 = p.length - 1;
for ( ; _local4 >= 0 ; _local4-- , _local3 = _local2) {
_local2 = (p[_local4] & 1) << 14;
p[_local4] = p[_local4] >> 1;
p[_local4] = (p[_local4] | _local3) & 32767;
}
}
}
Symbol 761 MovieClip [__Packages.idol.State] Frame 0
class idol.State
{
var m_superParent, m_disengage, m_startTick, m_data, m_width, m_height, m_ctorParam, m_curtainRemoved, m_parent, m_frameBuf, m_curtain;
function State (aParent, tick, dao, param) {
m_superParent = aParent;
m_disengage = false;
m_startTick = tick;
m_data = dao;
m_width = 755;
m_height = 600;
m_ctorParam = param;
m_curtainRemoved = true;
m_parent = m_superParent.createEmptyMovieClip("state_parent", m_superParent.getNextHighestDepth());
m_frameBuf = new flash.display.BitmapData(m_width, m_height, false, 0);
m_curtain = m_superParent.createEmptyMovieClip("state_curtain", m_superParent.getNextHighestDepth());
m_curtain.attachBitmap(m_frameBuf, 1);
}
function removeCurtain() {
m_curtain._visible = false;
m_curtainRemoved = true;
}
function destroy() {
m_parent.removeMovieClip();
m_parent = null;
m_curtain.removeMovieClip();
m_curtain = null;
m_frameBuf = null;
}
function initCurtain() {
m_curtainRemoved = false;
m_curtain.swapDepths(m_superParent.getNextHighestDepth());
}
function snapshot(src) {
m_frameBuf.draw(src);
}
function getFramebuffer() {
return(m_frameBuf);
}
function copyFramebuffer(buf) {
if (buf != undefined) {
m_frameBuf.copyPixels(buf, new flash.geom.Rectangle(0, 0, m_width, m_height), new flash.geom.Point(0, 0));
}
}
function quitGame() {
}
function engage(tick, dao, prevStateReturnCode) {
}
function isDisengage() {
return(false);
}
function disengage() {
}
function returnCode() {
return(0);
}
function tick() {
}
function render() {
}
}
Symbol 762 MovieClip [__Packages.com.midasplayer.fx.SoundManager] Frame 0
class com.midasplayer.fx.SoundManager
{
static var preloadLastId, progressCallback, preloadList, preloadNum, preloadLast, beginLoadCallback;
function SoundManager () {
}
static function isSoundEnabled() {
return(soundEnabled);
}
static function enableSounds(enabled) {
soundEnabled = enabled;
if (!enabled) {
muteAll();
} else {
restoreMuteAll();
}
}
static function stopAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(0);
soundEntry.isMuted = true;
});
}
static function restoreMuteAll() {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.setVolume(soundEntry.realVol);
soundEntry.isMuted = false;
});
}
static function stop(resource) {
var _local3 = sounds.get(resource);
if (_local3 != undefined) {
_local3.sound.stop();
_local3.playStatus = false;
}
}
static function getCalibratedVolume(flashVolume) {
flashVolume = Math.min(100, flashVolume);
flashVolume = Math.max(0, flashVolume);
return(Math.ceil(Math.pow(flashVolume / 100, 1.46) * 100));
}
static function setVolume(resource, percent) {
var _local4 = sounds.get(resource);
if ((_local4 != undefined) && (_local4.playStatus == true)) {
var _local5 = getCalibratedVolume(percent);
if (!_local4.isMuted) {
_local4.sound.setVolume(_local5);
}
_local4.realVol = _local5;
}
}
static function getPosition(resource) {
var _local3 = sounds.get(resource);
if ((_local3 != undefined) && (_local3.playStatus == true)) {
return(_local3.sound.position);
}
return(-1);
}
static function getLength(resource) {
var _local3 = sounds.get(resource);
if (_local3 != undefined) {
return(_local3.sound.duration);
}
return(-1);
}
static function isPlaying(resource) {
var _local3 = sounds.get(resource);
return((_local3 != undefined) && (_local3.playStatus == true));
}
static function initialize(list) {
for (var i in list) {
var resource = list[i];
var _local3 = m_placeholder.getNextHighestDepth();
var _local4 = new Sound(m_placeholder.createEmptyMovieClip("sm_sndhold_" + _local3, _local3));
_local4.attachSound(resource);
_local4.onSoundComplete = function () {
var _local2 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local2.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:_local4, playStatus:false});
}
}
static function killPreload() {
unload(preloadLastId);
progressCallback = undefined;
preloadLastId = undefined;
preloadList = undefined;
preloadNum = 0;
preloadLast = undefined;
}
static function preload(urlList, fnProgressCallback, fnBeginLoadCallback) {
beginLoadCallback = fnBeginLoadCallback;
progressCallback = fnProgressCallback;
preloadList = new Array();
for (var i in urlList) {
preloadList.push(urlList[i]);
}
preloadLast = "";
preloadNum = urlList.length;
loadUrl_();
}
static function unload(name) {
var _local3 = sounds.get(name);
if ((_local3 != undefined) && (_local3.runtime == true)) {
var _local4 = m_placeholder[_local3.clipId];
_local4.removeMovieClip();
delete _local3.sound;
_local3.sound = undefined;
sounds.remove(name);
}
}
static function setPlaceholderParent(p) {
m_placeholder = p;
}
static function play(resource, volume, isLoop, fn) {
if (volume == undefined) {
volume = 100;
}
if (isLoop == undefined) {
isLoop = false;
}
volume = getCalibratedVolume(volume);
var _local5 = sounds.get(resource);
if (_local5 != undefined) {
_local5.sound.setVolume((soundEnabled ? (volume) : 0));
_local5.realVol = volume;
_local5.isMuted = !soundEnabled;
_local5.playStatus = true;
_local5.onPlayedFn = fn;
_local5.sound.start(0, (isLoop ? 65535 : 1));
} else {
var _local6 = m_placeholder.getNextHighestDepth();
var _local7 = new Sound(m_placeholder.createEmptyMovieClip("sm_sndhold_" + _local6, _local6));
_local7.attachSound(resource);
_local7.onSoundComplete = function () {
var _local2 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local2.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(resource);
};
_local7.setVolume((soundEnabled ? (volume) : 0));
_local7.start(0, (isLoop ? 65535 : 1));
sounds.put(resource, {isMuted:!soundEnabled, realVol:volume, onPlayedFn:fn, sound:_local7, playStatus:true});
}
}
static function onPlayed_(name) {
var _local3 = sounds.get(name);
if ((_local3 != undefined) && (_local3.onPlayedFn != undefined)) {
_local3.onPlayedFn();
}
}
static function loadUrl_(success) {
var _local3 = preloadNum - preloadList.length;
if (_local3 != 0) {
if (success == false) {
}
progressCallback(_local3, success);
}
if (preloadList.length == 0) {
progressCallback = undefined;
preloadList = undefined;
preloadNum = 0;
preloadLast = undefined;
return(undefined);
}
var _local4 = preloadList.pop();
preloadLast = _local4.url;
var nextId = _local4.id;
if (!_local4.id) {
var _local5 = preloadLast.lastIndexOf("/");
if (_local5 == -1) {
_local5 = 0;
} else {
_local5++;
}
var _local6 = preloadLast.lastIndexOf(".");
if (_local6 == -1) {
_local6 = preloadLast.length;
}
nextId = preloadLast.substring(_local5, _local6);
}
var _local7 = m_placeholder.getNextHighestDepth();
var _local8 = "dn_sndhold_" + _local7;
var _local9 = new Sound(m_placeholder.createEmptyMovieClip(_local8, _local7));
_local9.onLoad = function (a) {
var _local3 = com.midasplayer.fx.SoundManager.loadUrl_;
com.midasplayer.util.Delay.oneShot(this, _local3, 50, a);
};
_local9.onSoundComplete = function () {
var _local2 = com.midasplayer.fx.SoundManager.sounds.get(nextId);
_local2.playStatus = false;
com.midasplayer.fx.SoundManager.onPlayed_(nextId);
};
preloadLastId = nextId;
_local9.loadSound("" + preloadLast, false);
sounds.put(nextId, {realVol:100, clipId:_local8, sound:_local9, playStatus:false, runtime:true});
if (beginLoadCallback) {
beginLoadCallback(_local9, preloadLast, nextId, (preloadNum - preloadList.length) - 1);
}
}
static var m_placeholder = _root;
static var sounds = new com.midasplayer.util.Map();
static var soundEnabled = true;
}
Symbol 763 MovieClip [__Packages.com.midasplayer.util.Delay] Frame 0
class com.midasplayer.util.Delay
{
var m_fn, m_param, m_context, m_delay, m_started, m_timerId;
function Delay (context, fn, delay) {
m_fn = fn;
m_param = new Array();
var _local5 = 3;
for ( ; _local5 < arguments.length ; _local5++) {
m_param.push(arguments[_local5]);
}
m_context = context;
m_delay = delay;
m_started = getTimer();
m_timerId = _global.setInterval(mx.utils.Delegate.create(this, onEvent), delay);
}
function onEvent() {
if (getTimer() >= (m_delay + m_started)) {
_global.clearInterval(m_timerId);
m_fn.apply(m_context, m_param);
m_fn = undefined;
m_param = undefined;
}
}
static function oneShot(context, fn, delay) {
var _local5 = new com.midasplayer.util.Delay(context, fn, delay);
_local5.m_param = new Array();
var _local6 = 3;
for ( ; _local6 < arguments.length ; _local6++) {
_local5.m_param.push(arguments[_local6]);
}
}
}
Symbol 764 MovieClip [__Packages.com.midasplayer.util.Base64] Frame 0
class com.midasplayer.util.Base64
{
function Base64 () {
}
static function encode(input) {
var _local3 = "";
var _local11 = 0;
input = _utf8_encode(input);
while (_local11 < input.length) {
var _local4 = input.charCodeAt(_local11++);
var _local5 = input.charCodeAt(_local11++);
var _local6 = input.charCodeAt(_local11++);
var _local7 = _local4 >> 2;
var _local8 = ((_local4 & 3) << 4) | (_local5 >> 4);
var _local9 = ((_local5 & 15) << 2) | (_local6 >> 6);
var _local10 = _local6 & 63;
if (_global.isNaN(_local5)) {
_local10 = 64;
_local9 = _local10;
} else if (_global.isNaN(_local6)) {
_local10 = 64;
}
_local3 = (((_local3 + _keyStr.charAt(_local7)) + _keyStr.charAt(_local8)) + _keyStr.charAt(_local9)) + _keyStr.charAt(_local10);
}
return(_local3);
}
static function decode(input) {
var _local3 = "";
var _local11 = 0;
while (_local11 < input.length) {
var _local7 = _keyStr.indexOf(input.charAt(_local11++));
var _local8 = _keyStr.indexOf(input.charAt(_local11++));
var _local9 = _keyStr.indexOf(input.charAt(_local11++));
var _local10 = _keyStr.indexOf(input.charAt(_local11++));
var _local4 = (_local7 << 2) | (_local8 >> 4);
var _local5 = ((_local8 & 15) << 4) | (_local9 >> 2);
var _local6 = ((_local9 & 3) << 6) | _local10;
_local3 = _local3 + String.fromCharCode(_local4);
if (_local9 != 64) {
_local3 = _local3 + String.fromCharCode(_local5);
}
if (_local10 != 64) {
_local3 = _local3 + String.fromCharCode(_local6);
}
}
_local3 = _utf8_decode(_local3);
return(_local3);
}
static function _utf8_encode(string) {
var _local3 = "";
var _local4 = 0;
for ( ; _local4 < string.length ; _local4++) {
var _local5 = string.charCodeAt(_local4);
if (_local5 < 128) {
_local3 = _local3 + String.fromCharCode(_local5);
} else if ((_local5 > 127) && (_local5 < 2048)) {
_local3 = _local3 + String.fromCharCode((_local5 >> 6) | 192);
_local3 = _local3 + String.fromCharCode((_local5 & 63) | 128);
} else {
_local3 = _local3 + String.fromCharCode((_local5 >> 12) | 224);
_local3 = _local3 + String.fromCharCode(((_local5 >> 6) & 63) | 128);
_local3 = _local3 + String.fromCharCode((_local5 & 63) | 128);
}
}
return(_local3);
}
static function _utf8_decode(utftext) {
var _local3 = "";
var _local4 = 0;
var _local5 = 0;
var _local6 = 0;
var _local7 = 0;
var _local8 = 0;
while (_local4 < utftext.length) {
_local5 = utftext.charCodeAt(_local4);
if (_local5 < 128) {
_local3 = _local3 + String.fromCharCode(_local5);
_local4++;
} else if ((_local5 > 191) && (_local5 < 224)) {
_local7 = utftext.charCodeAt(_local4 + 1);
_local3 = _local3 + String.fromCharCode(((_local5 & 31) << 6) | (_local7 & 63));
_local4 = _local4 + 2;
} else {
_local7 = utftext.charCodeAt(_local4 + 1);
_local8 = utftext.charCodeAt(_local4 + 2);
_local3 = _local3 + String.fromCharCode((((_local5 & 15) << 12) | ((_local7 & 63) << 6)) | (_local8 & 63));
_local4 = _local4 + 3;
}
}
return(_local3);
}
static var _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
}
Symbol 765 MovieClip [__Packages.com.midasplayer.util.LZW] Frame 0
class com.midasplayer.util.LZW
{
function LZW () {
}
static function compress(str) {
var _local3 = new Array();
var _local4 = (xmlsafe ? 5 : 0);
var _local5 = 0;
for ( ; _local5 < 256 ; _local5++) {
_local3[String.fromCharCode(_local5)] = _local5;
}
if (xmlsafe) {
_local3["<"] = 256;
_local3[">"] = 257;
_local3["&"] = 258;
_local3["\""] = 259;
_local3["'"] = 260;
}
var _local6 = "";
var _local7 = str;
var _local8 = _local7.split("");
var _local9 = _local8.length;
var _local10 = 256 + _local4;
var _local11 = "";
var _local12 = 0;
for ( ; _local12 <= _local9 ; _local12++) {
var _local13 = _local8[_local12];
if (!(_local3[_local11 + _local13] === undefined)) {
_local11 = _local11 + _local13;
} else {
_local6 = _local6 + String.fromCharCode(_local3[_local11]);
_local3[_local11 + _local13] = _local10;
_local10++;
_local11 = _local13;
}
}
return(_local6);
}
static function decompress(str) {
var _local3 = new Array();
var _local4 = (xmlsafe ? 5 : 0);
var _local5 = 0;
for ( ; _local5 < 256 ; _local5++) {
var _local6 = String.fromCharCode(_local5);
_local3[_local5] = _local6;
}
if (xmlsafe) {
_local3[256] = "<";
_local3[257] = ">";
_local3[258] = "&";
_local3[259] = "\"";
_local3[260] = "'";
}
var _local7 = str;
var _local8 = _local7.split("");
var _local9 = _local8.length;
var _local10 = 256 + _local4;
var _local11 = "";
var _local12 = "";
var _local13 = "";
var _local14 = 0;
for ( ; _local14 < _local9 ; _local14++) {
var _local15 = _local7.charCodeAt(_local14);
var _local16 = _local3[_local15];
if (_local11 == "") {
_local11 = _local16;
_local13 = _local13 + _local16;
} else if (_local15 <= (255 + _local4)) {
_local13 = _local13 + _local16;
_local12 = _local11 + _local16;
_local3[_local10] = _local12;
_local10++;
_local11 = _local16;
} else {
_local12 = _local3[_local15];
if (_local12 == undefined) {
_local12 = _local11 + _local11.slice(0, 1);
}
_local13 = _local13 + _local12;
_local3[_local10] = _local11 + _local12.slice(0, 1);
_local10++;
_local11 = _local12;
}
}
return(_local13);
}
static var xmlsafe = false;
}
Symbol 766 MovieClip [__Packages.idol.RecordData] Frame 0
class idol.RecordData
{
var m_data, m_tick, m_cmd, m_body, m_points;
function RecordData (st) {
m_data = st;
var _local3 = st.split(",");
m_tick = _global.parseInt(_local3[0]);
m_cmd = _global.parseInt(_local3[1]);
m_body = _local3[2];
m_points = -1;
var _local4 = 0;
for ( ; _local4 < _local3.length ; _local4++) {
if (_local3[_local4].indexOf("p=") == 0) {
m_points = _global.parseInt(_local3[_local4].substring(2));
break;
}
}
}
}
Symbol 767 MovieClip [__Packages.idol.StateIntro] Frame 0
class idol.StateIntro extends idol.State
{
var m_data, m_avatarReadyTick, m_autoDisengageTick, m_selectState, m_selectedCharacter, m_disengageNow, m_removeInstructions, m_isError, m_leftAvatarIdx, m_rightAvatarIdx, m_bkg, m_parent, m_logo, m_screen, m_instructions, m_blackplate, m_fadeShadowAt, m_fadeOutAt, m_fadeInInstructionsAt, m_fadeInstructionsAt, m_autoLeaveTick, m_autoQuitTick, m_startTick, m_initTick, removeCurtain, m_tinted, m_normal, m_btnAnim, m_countdownClip, m_shadow, m_select, m_leftColor, m_rightColor, snapshot;
function StateIntro (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
}
function engage() {
fscommand ("gameStart");
m_data.numTimesPlayed++;
var _local2 = SharedObject.getLocal("timesPlayed");
if (_local2 != null) {
_local2.data.played = m_data.numTimesPlayed;
_local2.flush();
}
m_avatarReadyTick = -1;
m_autoDisengageTick = -1;
m_selectState = 0;
m_selectedCharacter = 0;
m_disengageNow = false;
m_removeInstructions = false;
m_isError = false;
var _local3 = Math.random();
_local3 = _local3 * m_skinColorsFemale.length;
m_leftAvatarIdx = int(_local3);
_local3 = Math.random();
_local3 = _local3 * m_skinColorsMale.length;
m_rightAvatarIdx = int(_local3);
m_bkg = m_parent.attachMovie("bkg_intro", "bkg", m_parent.getNextHighestDepth());
m_bkg._x = 0;
m_bkg._y = 0;
m_logo = idol.AnimDriver(m_parent.attachMovie("idol_splash", "slash", m_parent.getNextHighestDepth()));
m_logo._x = 20;
m_logo._y = 20;
m_screen = m_parent.attachMovie("intro_screen", "bkg_screen", m_parent.getNextHighestDepth());
m_screen._x = 0;
m_screen._y = 0;
if (m_data.lang == "de") {
m_logo.logo_en._visible = false;
m_logo.logo_de._visible = true;
} else {
m_logo.logo_en._visible = true;
m_logo.logo_de._visible = false;
}
m_instructions = m_parent.attachMovie("instructions_text_and_animation", "instructions", m_parent.getNextHighestDepth());
m_instructions._x = 0;
m_instructions._y = 0;
m_instructions._alpha = 0;
m_instructions.title.text = com.midasplayer.util.I18n.getString("instructions_title");
m_instructions.label.text = com.midasplayer.util.I18n.getString("instructions_text");
m_instructions.clicktostart.text = com.midasplayer.util.I18n.getString("instructions_click_to_start");
m_instructions.onPress = mx.utils.Delegate.create(this, onPressInstructions);
m_blackplate = m_parent.createEmptyMovieClip("intro_blackplate", m_parent.getNextHighestDepth());
m_blackplate.beginFill(0);
m_blackplate.moveTo(0, 500);
m_blackplate.lineTo(755, 500);
m_blackplate.lineTo(755, 600);
m_blackplate.lineTo(0, 580);
m_blackplate.endFill();
var _local4 = com.midasplayer.util.I18n.getString("legal");
_local4 = _local4.split("\r").join("");
_root.btnpanel.legaltext.gotoAndStop(((m_data.lang == "de") ? 3 : 2));
_root.btnpanel.legaltext.box.text = _local4;
m_fadeShadowAt = -1;
m_fadeOutAt = -1;
m_fadeInInstructionsAt = -1;
m_fadeInstructionsAt = -1;
m_autoLeaveTick = -1;
m_autoQuitTick = m_startTick + int((m_data.ticksPerSec * 60) * 10);
if (m_data.isPromo) {
m_autoQuitTick = -1;
}
m_initTick = m_startTick + 1;
m_fadeInInstructionsAt = getTimer() + 500;
removeCurtain();
com.midasplayer.fx.SoundManager.stopAll();
com.midasplayer.fx.SoundManager.play("intro_sound");
m_logo.playStart();
}
function onPressInstructions() {
if (!m_removeInstructions) {
m_tinted = {ra:50, ga:50, ba:50, aa:100, rb:0, gb:0, bb:0, ab:0};
m_normal = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_removeInstructions = true;
m_fadeInstructionsAt = getTimer() + 500;
_root.btnpanel.legaltext.gotoAndStop(4);
m_btnAnim = new com.midasplayer.util.EaseOutQuadAnimator(_root.btnpanel);
m_btnAnim.setDuration(750);
m_btnAnim.setPosition(2, 502);
m_countdownClip._visible = false;
m_shadow = m_parent.attachMovie("select_light", "sel_light", m_parent.getNextHighestDepth());
m_shadow._x = 0;
m_shadow._y = 0;
m_shadow._alpha = 0;
m_select = m_parent.attachMovie("select_stage", "sel_stage", m_parent.getNextHighestDepth());
m_select._x = 220;
m_select._y = 500;
m_select._alpha = 0;
m_countdownClip = m_select.countdown;
var f = (new flash.filters.GlowFilter(16776994, 1, 8, 8, 4, 3, false, false));
m_select.arrowLeftLeft.onRollOver = function () {
this.filters = [f];
};
m_select.arrowLeftLeft.onRollOut = function () {
this.filters = [];
};
m_select.arrowLeftLeft.onRollOutOutside = function () {
this.filters = [];
};
m_select.arrowLeftLeft.onPress = mx.utils.Delegate.create(this, onStepAvatarLeftLeft);
m_select.arrowLeftRight.onRollOver = function () {
this.filters = [f];
};
m_select.arrowLeftRight.onRollOut = function () {
this.filters = [];
};
m_select.arrowLeftRight.onRollOutOutside = function () {
this.filters = [];
};
m_select.arrowLeftRight.onPress = mx.utils.Delegate.create(this, onStepAvatarLeftRight);
m_select.arrowRightLeft.onRollOver = function () {
this.filters = [f];
};
m_select.arrowRightLeft.onRollOut = function () {
this.filters = [];
};
m_select.arrowRightLeft.onRollOutOutside = function () {
this.filters = [];
};
m_select.arrowRightLeft.onPress = mx.utils.Delegate.create(this, onStepAvatarRightLeft);
m_select.arrowRightRight.onRollOver = function () {
this.filters = [f];
};
m_select.arrowRightRight.onRollOut = function () {
this.filters = [];
};
m_select.arrowRightRight.onRollOutOutside = function () {
this.filters = [];
};
m_select.arrowRightRight.onPress = mx.utils.Delegate.create(this, onStepAvatarRightRight);
m_blackplate.swapDepths(m_parent.getNextHighestDepth());
com.midasplayer.fx.SoundManager.stop("intro_sound");
com.midasplayer.fx.SoundManager.play("game_loop", 100, true);
m_leftColor = new Color(m_select.avatarLeft);
m_rightColor = new Color(m_select.avatarRight);
m_rightColor.setTransform(m_tinted);
m_leftColor.setTransform(m_tinted);
m_avatarReadyTick = m_data.tick + int(m_data.ticksPerSec * 0.5);
m_autoLeaveTick = m_data.tick + int(m_data.ticksPerSec * 30);
m_autoQuitTick = -1;
m_screen.playOnce();
}
}
function onStepAvatarLeftLeft() {
m_leftAvatarIdx--;
if (m_leftAvatarIdx < 0) {
m_leftAvatarIdx = m_skinColorsFemale.length - 1;
}
var _local2 = m_skinColorsFemale[m_leftAvatarIdx];
m_select.avatarLeft.setHairColorTransform(_local2.hair);
m_select.avatarLeft.setSkinColorTransform(_local2.skin);
m_select.avatarLeft.setMouthColorTransform(_local2.mouth);
m_select.avatarLeft.setEyeColorTransform(_local2.eyes);
m_select.avatarLeft.setClothesColorTransform(m_clothesColor[_local2.clothes[0]]);
m_select.avatarLeft.setHaircut(_local2.haircut);
}
function onStepAvatarLeftRight() {
m_leftAvatarIdx++;
if (m_leftAvatarIdx > (m_skinColorsFemale.length - 1)) {
m_leftAvatarIdx = 0;
}
var _local2 = m_skinColorsFemale[m_leftAvatarIdx];
m_select.avatarLeft.setHairColorTransform(_local2.hair);
m_select.avatarLeft.setClothesColorTransform(m_clothesColor[_local2.clothes[0]]);
m_select.avatarLeft.setSkinColorTransform(_local2.skin);
m_select.avatarLeft.setMouthColorTransform(_local2.mouth);
m_select.avatarLeft.setEyeColorTransform(_local2.eyes);
m_select.avatarLeft.setHaircut(_local2.haircut);
}
function onStepAvatarRightLeft() {
m_rightAvatarIdx--;
if (m_rightAvatarIdx < 0) {
m_rightAvatarIdx = m_skinColorsMale.length - 1;
}
var _local2 = m_skinColorsMale[m_rightAvatarIdx];
m_select.avatarRight.setHairColorTransform(_local2.hair);
m_select.avatarRight.setSkinColorTransform(_local2.skin);
m_select.avatarRight.setMouthColorTransform(_local2.mouth);
m_select.avatarRight.setEyeColorTransform(_local2.eyes);
m_select.avatarRight.setHaircut(_local2.haircut);
m_select.avatarRight.setClothesColorTransform(m_clothesColor[_local2.clothes[0]]);
}
function onStepAvatarRightRight() {
m_rightAvatarIdx++;
if (m_rightAvatarIdx > (m_skinColorsMale.length - 1)) {
m_rightAvatarIdx = 0;
}
var _local2 = m_skinColorsMale[m_rightAvatarIdx];
m_select.avatarRight.setHairColorTransform(_local2.hair);
m_select.avatarRight.setSkinColorTransform(_local2.skin);
m_select.avatarRight.setMouthColorTransform(_local2.mouth);
m_select.avatarRight.setEyeColorTransform(_local2.eyes);
m_select.avatarRight.setHaircut(_local2.haircut);
m_select.avatarRight.setClothesColorTransform(m_clothesColor[_local2.clothes[0]]);
}
function quitGame() {
m_disengageNow = true;
}
function isDisengage() {
return(m_disengageNow);
}
function disengage() {
snapshot(m_parent);
}
function returnCode() {
if (m_isError) {
return(-1);
}
return(0);
}
function onSelectCharacter() {
m_data.isMale = m_selectedCharacter == 2;
m_select.arrowLeftLeft._visible = false;
m_select.arrowLeftRight._visible = false;
m_select.arrowRightLeft._visible = false;
m_select.arrowRightRight._visible = false;
m_fadeOutAt = getTimer() + 500;
m_autoDisengageTick = m_data.tick + (int(1000 / m_data.millisPerTick) * 1);
m_selectState = 2;
}
function tick() {
var _local2 = m_data.tick;
if (_local2 == m_initTick) {
m_instructions.anim.playStart();
}
if (_local2 == m_autoQuitTick) {
m_isError = true;
m_disengageNow = true;
return(undefined);
}
if ((m_autoDisengageTick == -1) && (m_autoLeaveTick == _local2)) {
if (m_selectedCharacter == 0) {
m_selectedCharacter = 1 + int((Math.random() * 100) % 2);
}
if (!com.midasplayer.fx.SoundManager.isPlaying("game_loop")) {
com.midasplayer.fx.SoundManager.play("game_loop", 100, true);
}
m_data.isMale = m_selectedCharacter == 2;
m_autoDisengageTick = _local2 + m_data.ticksPerSec;
m_fadeOutAt = getTimer() + 500;
m_selectState = 2;
}
if (m_autoDisengageTick == _local2) {
var _local3 = 0;
if (m_selectedCharacter == 1) {
_local3 = m_skinColorsFemale[m_leftAvatarIdx];
} else {
_local3 = m_skinColorsMale[m_rightAvatarIdx];
}
m_data.skinColor = _local3.skin;
m_data.mouthColor = _local3.mouth;
m_data.hairColor = _local3.hair;
m_data.eyeColor = _local3.eyes;
m_data.haircut = _local3.haircut;
m_data.clothesColor = [m_clothesColor[_local3.clothes[0]], m_clothesColor[_local3.clothes[1]], m_clothesColor[_local3.clothes[2]]];
_root.btnpanel.legaltext.gotoAndStop(4);
m_disengageNow = true;
}
if (m_avatarReadyTick == _local2) {
var _local4 = m_skinColorsFemale[m_leftAvatarIdx];
m_select.avatarLeft.setup(m_data.millisPerTick, 50, 0);
m_select.avatarLeft.onPress = mx.utils.Delegate.create(this, onSelectCharacter);
m_select.avatarLeft.setSkinColorTransform(_local4.skin);
m_select.avatarLeft.setEyeColorTransform(_local4.eyes);
m_select.avatarLeft.setMouthColorTransform(_local4.mouth);
m_select.avatarLeft.setHairColorTransform(_local4.hair);
m_select.avatarLeft.setHaircut(_local4.haircut);
m_select.avatarLeft.setClothesColorTransform(m_clothesColor[_local4.clothes[0]]);
m_select.avatarLeft.setLanguage(m_data.lang);
m_leftColor.setTransform(m_tinted);
_local4 = m_skinColorsMale[m_rightAvatarIdx];
m_select.avatarRight.setup(m_data.millisPerTick, 50, 0);
m_select.avatarRight.onPress = mx.utils.Delegate.create(this, onSelectCharacter);
m_select.avatarRight.setSkinColorTransform(_local4.skin);
m_select.avatarRight.setEyeColorTransform(_local4.eyes);
m_select.avatarRight.setMouthColorTransform(_local4.mouth);
m_select.avatarRight.setHairColorTransform(_local4.hair);
m_select.avatarRight.setClothesColorTransform(m_clothesColor[_local4.clothes[0]]);
m_select.avatarRight.setHaircut(_local4.haircut);
m_select.avatarRight.setLanguage(m_data.lang);
m_rightColor.setTransform(m_tinted);
m_instructions.removeMovieClip();
m_fadeShadowAt = getTimer() + 450;
m_selectState = 1;
}
if (m_selectState == 1) {
var _local5 = m_bkg._xmouse;
if ((_local5 > 243) && (_local5 < 481)) {
if (m_selectedCharacter != 1) {
m_selectedCharacter = 1;
m_shadow.gotoAndStop(2);
m_select.avatarLeft.animateBody(2);
m_select.avatarLeft.animateArm("left", 6, true);
m_select.avatarLeft.animateArm("right", 5, true);
m_select.avatarLeft.setExpression(idol.Avatar.FACE_VERY_HAPPY);
m_leftColor.setTransform(m_normal);
m_rightColor.setTransform(m_tinted);
m_select.avatarRight.stopBody();
m_select.avatarRight.setExpression(idol.Avatar.FACE_SAD);
}
} else if ((_local5 > 481) && (_local5 < 720)) {
if (m_selectedCharacter != 2) {
m_selectedCharacter = 2;
m_shadow.gotoAndStop(3);
m_select.avatarLeft.stopBody();
m_select.avatarLeft.setExpression(idol.Avatar.FACE_SAD);
m_rightColor.setTransform(m_normal);
m_leftColor.setTransform(m_tinted);
m_select.avatarRight.animateBody(2);
m_select.avatarRight.setExpression(idol.Avatar.FACE_VERY_HAPPY);
m_select.avatarRight.animateArm("left", 5, true);
m_select.avatarRight.animateArm("right", 6, true);
}
} else if (m_selectedCharacter != 0) {
m_selectedCharacter = 0;
m_shadow.gotoAndStop(1);
m_select.avatarLeft.stopBody();
m_select.avatarRight.stopBody();
m_rightColor.setTransform(m_tinted);
m_leftColor.setTransform(m_tinted);
}
m_select.avatarLeft.update();
m_select.avatarRight.update();
}
if (m_selectState == 2) {
m_select.avatarLeft.update();
m_select.avatarRight.update();
}
}
function render() {
var _local2 = m_data.alpha;
if (m_btnAnim && (m_btnAnim.update())) {
m_btnAnim = undefined;
}
if (m_fadeShadowAt != -1) {
var _local3 = Math.max(0, m_fadeShadowAt - getTimer()) / 450;
var _local4 = int(100 * (1 - _local3));
m_shadow._alpha = _local4;
m_select._alpha = _local4;
if (_local3 == 0) {
m_fadeShadowAt = -1;
}
}
if (m_fadeInInstructionsAt != -1) {
var _local5 = Math.max(0, m_fadeInInstructionsAt - getTimer()) / 500;
var _local6 = int(100 * (1 - _local5));
m_instructions._alpha = _local6;
if (_local5 == 0) {
m_fadeInInstructionsAt = -1;
}
}
if (m_fadeInstructionsAt != -1) {
var _local7 = Math.max(0, m_fadeInstructionsAt - getTimer()) / 500;
var _local8 = int(100 * _local7);
m_instructions._alpha = _local8;
if (_local7 == 0) {
m_fadeInstructionsAt = -1;
}
}
if (m_countdownClip && (m_autoLeaveTick != -1)) {
var _local9 = 1 + int(Math.max(0, m_autoLeaveTick - m_data.tick) / m_data.ticksPerSec);
m_countdownClip.text = com.midasplayer.util.I18n.getString("game_start_in", _local9);
}
if (m_selectState == 1) {
}
m_select.avatarLeft.render(_local2);
m_select.avatarRight.render(_local2);
}
var m_clothesColor = {red:{ra:100, ga:100, ba:100, aa:100, rb:-51, gb:-174, bb:-184, ab:0}, cyan:{ra:100, ga:100, ba:100, aa:100, rb:-100, gb:-50, bb:-50, ab:0}, orange:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:-102, bb:-204, ab:0}, green:{ra:100, ga:100, ba:100, aa:100, rb:-87, gb:-77, bb:-153, ab:0}, pink:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:-102, bb:-51, ab:0}, black:{ra:10, ga:10, ba:10, aa:100, rb:0, gb:0, bb:0, ab:0}, normal:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, shit:{ra:100, ga:100, ba:100, aa:100, rb:-26, gb:-31, bb:-62, ab:0}};
var m_skinColorsMale = [{skin:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, clothes:["green", "orange", "cyan"], haircut:2}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-67, gb:-67, bb:-57, ab:0}, mouth:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, clothes:["green", "red", "cyan"], haircut:1}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-113, gb:-118, bb:-97, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:-90, gb:-80, bb:-60, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, clothes:["red", "orange", "cyan"], haircut:2}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-67, gb:-67, bb:-57, ab:0}, mouth:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:255, gb:153, bb:102, ab:0}, clothes:["green", "orange", "cyan"], haircut:2}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:-102, gb:-21, bb:0, ab:0}, clothes:["normal", "green", "cyan"], haircut:1}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-113, gb:-118, bb:-97, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:-90, gb:-80, bb:-60, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:-102, gb:-21, bb:0, ab:0}, clothes:["orange", "red", "cyan"], haircut:3}];
var m_skinColorsFemale = [{skin:{ra:100, ga:100, ba:100, aa:100, rb:-67, gb:-67, bb:-57, ab:0}, mouth:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, clothes:["orange", "red", "normal"], haircut:3}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-113, gb:-118, bb:-97, ab:0}, mouth:{ra:60, ga:60, ba:60, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, clothes:["green", "pink", "normal"], haircut:2}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:255, gb:153, bb:102, ab:0}, clothes:["pink", "red", "normal"], haircut:1}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-67, gb:-67, bb:-57, ab:0}, mouth:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:255, gb:153, bb:102, ab:0}, clothes:["orange", "red", "normal"], haircut:2}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, mouth:{ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:-102, gb:-21, bb:0, ab:0}, clothes:["shit", "green", "normal"], haircut:3}, {skin:{ra:100, ga:100, ba:100, aa:100, rb:-113, gb:-118, bb:-97, ab:0}, mouth:{ra:60, ga:60, ba:60, aa:100, rb:0, gb:0, bb:0, ab:0}, eyes:{ra:80, ga:80, ba:80, aa:100, rb:0, gb:0, bb:0, ab:0}, hair:{ra:100, ga:100, ba:100, aa:100, rb:-102, gb:-21, bb:0, ab:0}, clothes:["green", "red", "normal"], haircut:1}];
}
Symbol 768 MovieClip [__Packages.com.midasplayer.util.Animator] Frame 0
class com.midasplayer.util.Animator
{
var finished, targetObject, x, startX, y, startY, startTime, tick, duration, timeTicks, targetY, targetX, dx, dy, dt, callback, callbackFire;
function Animator (t) {
finished = true;
targetObject = t;
x = (startX = t._x);
y = (startY = t._y);
startTime = null;
tick = 0;
duration = 800;
timeTicks = false;
}
function fillBaseCopy(t, o) {
o.targetObject = t;
o.duration = duration;
o.x = x;
o.y = y;
o.startTime = startTime;
o.finished = finished;
o.timeTicks = timeTicks;
o.tick = tick;
o.targetY = targetY;
o.targetX = targetX;
o.startX = startX;
o.startY = startY;
o.dx = dx;
o.dy = dy;
o.dt = dt;
}
function setSource(t) {
targetObject = t;
x = (startX = t._x);
y = (startY = t._y);
}
function complete() {
startTime = null;
x = targetX;
y = targetY;
finished = true;
targetObject._x = x;
targetObject._y = y;
}
function setPosition(x, y) {
startX = targetObject._x;
startY = targetObject._y;
targetX = Math.round(x);
targetY = Math.round(y);
finished = false;
startTime = null;
}
function setDuration(ms) {
duration = ms;
finished = false;
startTime = null;
}
function setDurationTicks(ticks) {
duration = ticks;
finished = false;
startTime = null;
timeTicks = true;
}
function getElapsedPercent() {
return(getElapsed());
}
function getElapsed() {
if ((!dt) || (duration == 0)) {
return(1);
}
return(Math.max(0, duration - dt) / duration);
}
function update() {
if (finished) {
if (callback && ((1 - getElapsed()) >= callbackFire)) {
callback();
callbackFire = undefined;
callback = undefined;
}
return(true);
}
if (!timeTicks) {
var _local2 = getTimer();
if (startTime == null) {
startTime = _local2;
}
dt = _local2 - startTime;
} else {
dt = tick;
tick++;
}
dx = targetX - startX;
dy = targetY - startY;
nextPosition();
x = x >> 0;
var _local3 = false;
if (((x >= targetX) && (targetX >= startX)) || ((x <= targetX) && (targetX <= startX))) {
_local3 = true;
x = targetX;
}
var _local4 = false;
y = y >> 0;
if (((y >= targetY) && (targetY >= startY)) || ((y <= targetY) && (targetY <= startY))) {
_local4 = true;
y = targetY;
}
if (_local3 && (_local4)) {
startTime = null;
x = targetX;
y = targetY;
finished = true;
}
targetObject._x = x;
targetObject._y = y;
if (callback && ((1 - getElapsed()) >= callbackFire)) {
callback();
callbackFire = undefined;
callback = undefined;
}
return(finished);
}
function setCallback(at, fn) {
callbackFire = ((at == undefined) ? 1 : (at));
callback = fn;
}
function toString() {
return((((((((("Animator[start=" + [startX, startY]) + ", target=") + [targetX, targetY]) + ", t=") + getElapsedPercent()) + ", ticks=") + tick) + ", targetObject=") + [targetObject._x, targetObject._y]);
}
function isFinished() {
return(finished);
}
function nextPosition() {
}
}
Symbol 769 MovieClip [__Packages.idol.AnimDriver] Frame 0
class idol.AnimDriver extends MovieClip
{
var m_isFrozen, m_ticks, m_direction, m_frameRate, m_frameTime, m_frameCounts, m_clips, cacheAsBitmap, m_stopped, m_once, m_lastTime, onEnterFrame;
function AnimDriver (frameRate) {
super();
m_isFrozen = false;
m_ticks = 0;
m_direction = 1;
m_frameRate = frameRate;
m_frameTime = (1 / m_frameRate) * 1000;
m_frameCounts = {};
m_clips = find(this);
for (var i in m_clips) {
m_frameCounts[m_clips[i]._name] = 0;
}
cacheAsBitmap = true;
m_stopped = true;
m_once = false;
m_lastTime = getTimer();
}
function drive() {
if (m_stopped) {
cacheAsBitmap = true;
onEnterFrame = undefined;
return(undefined);
}
var _local2 = getTimer();
var _local3 = _local2 - m_lastTime;
m_lastTime = _local2;
m_ticks = m_ticks + (_local3 / m_frameTime);
var _local4 = int(m_ticks);
if (_local4 > 0) {
if (m_direction > 0) {
m_ticks = m_ticks - (m_direction * _local4);
} else if (m_direction < 0) {
m_ticks = m_ticks + (m_direction * _local4);
}
var _local5 = 0;
var _local6 = 0;
for (var i in m_clips) {
var _local7 = m_clips[i];
if (idol.AnimDriver(_local7) != null) {
var _local8 = idol.AnimDriver(_local7);
if (_local8.frozen == true) {
continue;
}
}
m_frameCounts[_local7._name] = m_frameCounts[_local7._name] + (m_direction * _local4);
if (m_once) {
if ((m_direction > 0) && (m_frameCounts[_local7._name] >= _local7._totalframes)) {
m_frameCounts[_local7._name] = _local7._totalframes - 1;
_local7.frozen = true;
_local5++;
}
if ((m_direction < 0) && (m_frameCounts[_local7._name] <= 0)) {
m_frameCounts[_local7._name] = 0;
_local7.frozen = true;
_local5++;
}
}
var _local9 = (m_frameCounts[_local7._name] % _local7._totalframes) + 1;
_local7.gotoAndStop(_local9);
_local6++;
}
if (_local5 == _local6) {
m_stopped = true;
}
}
}
function get frozen() {
return(m_isFrozen);
}
function set frozen(b) {
m_isFrozen = b;
//return(frozen);
}
function forceCompleted() {
cacheAsBitmap = true;
onEnterFrame = undefined;
var _local2 = 0;
var _local3 = 0;
for (var i in m_clips) {
var _local4 = m_clips[i];
if (idol.AnimDriver(_local4) != null) {
var _local5 = idol.AnimDriver(_local4);
if (_local5.frozen == true) {
continue;
}
}
m_frameCounts[_local4._name] = m_frameCounts[_local4._name] + (m_direction * 10000);
if (m_once) {
if ((m_direction > 0) && (m_frameCounts[_local4._name] >= _local4._totalframes)) {
m_frameCounts[_local4._name] = _local4._totalframes - 1;
_local4.frozen = true;
}
if ((m_direction < 0) && (m_frameCounts[_local4._name] <= 0)) {
m_frameCounts[_local4._name] = 0;
_local4.frozen = true;
}
var _local6 = (m_frameCounts[_local4._name] % _local4._totalframes) + 1;
_local4.gotoAndStop(_local6);
}
}
}
function isRunning() {
return(onEnterFrame != undefined);
}
function playOnce(dir, fromFrame) {
if (fromFrame == undefined) {
fromFrame = 1;
}
if (dir == undefined) {
m_direction = 1;
} else {
m_direction = dir;
}
m_isFrozen = false;
m_ticks = 0;
m_stopped = false;
m_once = true;
m_lastTime = getTimer();
for (var i in m_clips) {
var _local4 = m_clips[i];
if (idol.AnimDriver(_local4) != null) {
var _local5 = idol.AnimDriver(_local4);
if (_local5.frozen == true) {
continue;
}
}
m_frameCounts[_local4._name] = fromFrame - 1;
_local4.gotoAndStop(fromFrame);
}
cacheAsBitmap = false;
onEnterFrame = mx.utils.Delegate.create(this, drive);
}
function playStart(startFrom) {
if (startFrom == undefined) {
startFrom = 0;
}
m_ticks = 0;
m_stopped = false;
m_lastTime = getTimer();
for (var i in m_clips) {
var _local3 = m_clips[i];
if (idol.AnimDriver(_local3) != null) {
var _local4 = idol.AnimDriver(_local3);
if (_local4.frozen == true) {
continue;
}
}
m_frameCounts[_local3._name] = startFrom;
_local3.gotoAndStop(1);
}
cacheAsBitmap = false;
onEnterFrame = mx.utils.Delegate.create(this, drive);
}
function playStop() {
m_stopped = true;
onEnterFrame = undefined;
}
function find(clip) {
var _local3 = new Array();
if (clip._totalframes > 1) {
clip.stop();
_local3.push(clip);
}
for (var i in clip) {
var _local4 = clip[i];
var _local5 = find(_local4);
for (var j in _local5) {
_local3.push(_local5[j]);
}
}
return(_local3);
}
}
Symbol 770 MovieClip [__Packages.idol.CurtainTransition] Frame 0
class idol.CurtainTransition
{
function CurtainTransition () {
}
}
Symbol 771 MovieClip [__Packages.com.midasplayer.util.EaseOutQuadAnimator] Frame 0
class com.midasplayer.util.EaseOutQuadAnimator extends com.midasplayer.util.Animator
{
var dt, duration, x, startX, dx, y, startY, dy;
function EaseOutQuadAnimator (o) {
super(o);
}
function nextPosition() {
var _local2 = dt;
var _local3 = duration * duration;
if (_local2 > duration) {
_local2 = duration;
}
var _local4 = _local2 * _local2;
x = ((((-dx) * _local4) / _local3) + (((2 * dx) * _local2) / duration)) + startX;
y = ((((-dy) * _local4) / _local3) + (((2 * dy) * _local2) / duration)) + startY;
}
}
Symbol 772 MovieClip [__Packages.idol.Avatar] Frame 0
class idol.Avatar extends MovieClip
{
var m_anim, m_cmdQueue, m_currentClothesColor, m_currentHairColor, m_currentMouthColor, m_currentEyeColor, m_currentSkinColor, m_lastClothes, m_haircut, m_expression, m_beat, m_bpm, m_timeToNextBeat, m_head, head, m_hairA, m_hairB, m_earR, m_earRC, m_earL, m_earLC, m_face, m_faceC, m_bodyA, body_a, m_hairC, m_mouthC, m_eyeLC, m_eyeRC, m_bodyAC, m_topAC, m_topCC, m_topA1C, m_bodyB, body_b, m_topBC, m_hipsC, m_bodyBC, m_armL, m_armAL, m_armALC, m_armBL, m_armBLC, m_handL, m_handLC, m_armR, m_armAR, m_armARC, m_armBR, m_armBRC, m_handR, m_handRC, m_hairAC, m_hairBC, m_hairCC, m_legAR, legAR, m_legARC, m_legAL, legAL, m_legALC, m_legBR, legBR, m_legBRC, m_legBL, legBL, m_legBLC, m_millisPerTick, m_beatInterval, m_lng, m_lastDanceIdx, m_moves, m_tick, m_bodyAnims, m_anims;
function Avatar () {
super();
m_anim = {};
m_cmdQueue = [];
m_currentClothesColor = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_currentHairColor = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_currentMouthColor = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_currentEyeColor = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_currentSkinColor = {ra:100, ga:100, ba:100, aa:100, rb:0, gb:0, bb:0, ab:0};
m_lastClothes = 1;
m_haircut = 1;
m_expression = FACE_NEUTRAL;
m_beat = 0;
m_bpm = 88;
m_timeToNextBeat = 0;
m_head = head;
var _local3 = m_head.ears;
m_hairA = m_head.hairA;
m_hairB = m_head.hairB;
m_earR = _local3.earR;
m_earRC = new Color(m_earR);
m_earL = _local3.earL;
m_earLC = new Color(m_earL);
m_face = m_head.face;
m_faceC = new Color(m_face);
m_bodyA = body_a;
m_hairC = m_bodyA.hairC;
m_mouthC = new Color(m_head.mouth);
m_eyeLC = new Color(m_head.eyeL);
m_eyeRC = new Color(m_head.eyeR);
m_bodyAC = new Color(m_bodyA.bodyA);
m_topAC = new Color(m_bodyA.topA);
m_topCC = new Color(m_bodyA.topC);
m_topA1C = new Color(m_bodyA.topA1);
m_bodyB = body_b;
m_topBC = new Color(m_bodyB.topB);
m_hipsC = new Color(m_bodyB.hips);
m_bodyBC = new Color(m_bodyB);
m_armL = m_bodyA.armL;
m_armAL = m_armL.armAR;
m_armALC = new Color(m_armAL.armA);
m_armBL = m_armL.armBR;
m_armBLC = new Color(m_armBL.armB);
m_handL = m_armL.handR;
m_handLC = new Color(m_handL.hand);
m_armR = m_bodyA.armR;
m_armAR = m_armR.armAR;
m_armARC = new Color(m_armAR.armA);
m_armBR = m_armR.armBR;
m_armBRC = new Color(m_armBR.armB);
m_handR = m_armR.handR;
m_handRC = new Color(m_handR.hand);
if (m_hairA) {
m_hairAC = new Color(m_hairA.hair);
}
if (m_hairB) {
m_hairBC = new Color(m_hairB);
}
if (m_hairC) {
m_hairCC = new Color(m_hairC);
}
m_legAR = legAR;
m_legARC = new Color(m_legAR.legA);
m_legAL = legAL;
m_legALC = new Color(m_legAL.legA);
m_legBR = legBR;
m_legBRC = new Color(m_legBR.legB);
m_legBL = legBL;
m_legBLC = new Color(m_legBL.legB);
m_anim.eye1 = {loop:true, running:true, fromFrame:0, lastFrame:-1, toFrame:250, startTime:-1, frameStep:(1 / 50) * 1000, timeLine:m_head.eyeL};
m_anim.eye2 = {running:true, loop:true, fromFrame:0, lastFrame:-1, toFrame:250, startTime:-1, frameStep:(1 / 50) * 1000, timeLine:m_head.eyeR};
m_anim.armleft = {running:false, loop:false, stopFrame:-1, fromFrame:0, toFrame:0, lastFrame:0, startTime:-1, frameStep:(1 / 50) * 1000};
m_anim.armleft.timeLine = m_armL;
m_anim.armright = {running:false, loop:false, stopFrame:-1, fromFrame:0, toFrame:0, lastFrame:0, startTime:-1, frameStep:(1 / 50) * 1000};
m_anim.armright.timeLine = m_armR;
}
function setup(millisPerTick, bpm) {
m_millisPerTick = millisPerTick;
m_bpm = bpm;
m_beatInterval = (1 / (m_bpm / 60)) * 1000;
}
function setExpression(ex) {
m_expression = ex;
}
function setHaircut(idx) {
m_haircut = idx;
}
function setMouthColorTransform(c) {
m_currentMouthColor = c;
}
function setEyeColorTransform(c) {
m_currentEyeColor = c;
}
function setSkinColorTransform(ct) {
m_currentSkinColor = ct;
}
function setHairColorTransform(ct) {
m_currentHairColor = ct;
}
function setClothesColorTransform(c) {
m_currentClothesColor = c;
}
function setLanguage(lng) {
m_lng = lng;
}
function setClothing(idx) {
m_lastClothes = idx;
m_head.gotoAndStop(m_expression);
m_hairA.gotoAndStop(m_haircut);
m_bodyA.gotoAndStop(idx);
m_bodyB.gotoAndStop(idx);
m_armAR.gotoAndStop(idx);
m_armBR.gotoAndStop(idx);
m_armAL.gotoAndStop(idx);
m_armBL.gotoAndStop(idx);
if (idx == 1) {
m_bodyA.number.gotoAndStop(((m_lng == "de") ? 2 : 1));
}
var _local3 = Math.min(2, idx);
m_legAR.gotoAndStop(_local3);
m_legBR.gotoAndStop(_local3);
m_legAL.gotoAndStop(_local3);
m_legBL.gotoAndStop(_local3);
}
function updateSkinColor() {
var _local2 = m_currentSkinColor;
m_faceC.setTransform(_local2);
m_earLC.setTransform(_local2);
m_earRC.setTransform(_local2);
m_bodyAC.setTransform(_local2);
m_armARC.setTransform(_local2);
m_armBRC.setTransform(_local2);
m_handRC.setTransform(_local2);
m_armALC.setTransform(_local2);
m_armBLC.setTransform(_local2);
m_handLC.setTransform(_local2);
m_eyeRC.setTransform(m_currentEyeColor);
m_eyeLC.setTransform(m_currentEyeColor);
m_mouthC.setTransform(m_currentMouthColor);
}
function animationEnded(name) {
}
function throwYourHandsInTheAirAndWaveThemLikeYouJustDontCare() {
var _local2 = int(Math.random() * 2) % 2;
var _local3 = int(Math.random() * 2) % 2;
var _local4 = "";
var _local5 = m_beat + 2;
switch (_local2) {
case 0 :
switch (_local3) {
case 0 :
_local4 = _local5 + ":start:arm:left,11,oneshot";
m_cmdQueue.push(_local4);
break;
case 1 :
_local4 = _local5 + ":start:arm:left,9,oneshot";
m_cmdQueue.push(_local4);
}
break;
case 1 :
switch (_local3) {
case 0 :
_local4 = _local5 + ":start:arm:right,9,oneshot";
m_cmdQueue.push(_local4);
break;
case 1 :
_local4 = _local5 + ":start:arm:right,11,oneshot";
m_cmdQueue.push(_local4);
}
}
if (m_lastDanceIdx != undefined) {
startDance(m_lastDanceIdx, 2.5);
}
}
function stopDance() {
var _local2 = m_beat + 1;
m_cmdQueue.push(_local2 + ":stop:dance");
}
function stopBody() {
var _local2 = m_beat + 1;
m_cmdQueue.push(_local2 + ":stop:body");
}
function moveBody(amount) {
var _local3 = m_beat + 1;
m_cmdQueue.push((_local3 + ":start:body:") + amount);
}
function startDance(typeIdx, offs) {
if (offs == undefined) {
offs = 0;
}
var _local4 = m_moves[typeIdx];
m_cmdQueue.push((((((offs + _local4.left.startOffset) + m_beat) + ":start:arm:left,") + _local4.left.move) + ",loop,") + _local4.left.startOffset);
m_cmdQueue.push((((((offs + _local4.right.startOffset) + m_beat) + ":start:arm:right,") + _local4.right.move) + ",loop,") + _local4.right.startOffset);
m_lastDanceIdx = typeIdx;
}
function update(tick) {
m_tick = tick;
m_timeToNextBeat = m_timeToNextBeat - m_millisPerTick;
var _local3 = 1 - (m_timeToNextBeat / m_beatInterval);
var _local4 = m_cmdQueue.length;
if (_local4 > 0) {
var _local5 = _local4;
while (_local4--) {
var _local6 = m_cmdQueue[_local4];
var _local7 = _local6.split(":");
var _local8 = _global.parseFloat(_local7);
var _local9 = _local8;
var _local10 = int(_local9);
if ((_local10 == m_beat) && (_local3 >= (_local9 - _local10))) {
if (_local7[1] == "stop") {
if (_local7[2] == "body") {
if (m_anim.base) {
m_anim.base.running = false;
}
}
if (_local7[2] == "dance") {
if (m_anim.armleft) {
m_anim.armleft.running = false;
}
if (m_anim.armright) {
m_anim.armright.running = false;
}
m_lastDanceIdx = undefined;
m_cmdQueue = [];
}
}
if (_local7[1] == "start") {
if (_local7[2] == "body") {
var _local11 = _local7[3].split(",");
animateBody(_global.parseInt(_local11[0]));
}
if (_local7[2] == "arm") {
var _local12 = _local7[3].split(",");
switch (_local12[0]) {
case "both" :
case "left" :
animateArm("left", _local12[1], _local12[2] == "oneshot");
if (_local12[0] != "both") {
break;
}
case "right" :
animateArm("right", _local12[1], _local12[2] == "oneshot");
}
}
}
m_cmdQueue[_local4] = null;
}
}
var _local13 = [];
var _local14 = 0;
var _local15 = 0;
for ( ; _local14 < m_cmdQueue.length ; _local14++) {
for ( ; m_cmdQueue[_local14] == null ; _local14++) {
}
_local13.push(m_cmdQueue[_local14]);
}
m_cmdQueue = _local13;
}
if (m_timeToNextBeat <= 0) {
m_timeToNextBeat = m_timeToNextBeat + m_beatInterval;
m_beat++;
}
}
function render(alpha) {
var _local3 = getTimer();
for (var i in m_anim) {
var _local4 = m_anim[i];
var _local5 = _local4.startTime;
if (_local5 < 0) {
_local5 = (_local4.startTime = _local3);
}
var _local6 = int((_local3 - _local5) / _local4.frameStep) + _local4.fromFrame;
if (_local6 >= _local4.toFrame) {
if (!_local4.running) {
_local4.timeLine.stop();
delete m_anim[i];
_local6 = _local4.stopFrame;
animationEnded(i);
} else {
if (_local4.loop) {
_local4.startTime = _local4.startTime + (_local4.frameStep * (_local4.toFrame - _local4.fromFrame));
continue;
}
if (_local4.stopFrame != -1) {
_local4.timeLine.gotoAndStop(_local4.stopFrame);
_local4.lastFrame = _local4.stopFrame;
} else {
_local4.timeLine.stop();
}
delete m_anim[i];
animationEnded(i);
continue;
}
}
if (_local4.lastFrame != _local6) {
_local4.timeLine.gotoAndStop(_local6);
_local4.lastFrame = _local6;
}
}
setClothing(m_lastClothes);
updateSkinColor();
}
function animateBody(num) {
var _local3 = m_bodyAnims[num].toFrame - m_bodyAnims[num].fromFrame;
var _local4 = (_local3 * (m_bpm / 2)) / 60;
var _local5 = (1 / _local4) * 1000;
var _local6 = {loop:true, running:true, frameStep:_local5, stopFrame:-1, fromFrame:m_bodyAnims[num].fromFrame, toFrame:m_bodyAnims[num].toFrame, lastFrame:-1, startTime:-1, timeLine:this};
m_anim.base = _local6;
}
function animateArm(arm, moveIdx, once) {
var _local5 = once == true;
var _local6 = m_anims[moveIdx].toFrame - m_anims[moveIdx].fromFrame;
var _local7 = (_local6 * m_bpm) / 60;
var _local8 = (1 / _local7) * 1000;
if ((arm == "left") || (arm == "all")) {
var _local9 = {running:true, loop:!_local5, fromFrame:m_anims[moveIdx].fromFrame, toFrame:m_anims[moveIdx].toFrame, lastFrame:-1, stopFrame:1, startTime:-1, frameStep:_local8, timeLine:m_armL};
m_anim.armleft = _local9;
}
if ((arm == "right") || (arm == "all")) {
var _local10 = {running:true, loop:!_local5, fromFrame:m_anims[moveIdx].fromFrame, toFrame:m_anims[moveIdx].toFrame, frameStep:_local8, stopFrame:1, lastFrame:-1, startTime:-1, timeLine:m_armR};
m_anim.armright = _local10;
}
return(true);
}
static var FACE_NEUTRAL = 1;
static var FACE_SAD = 10;
static var FACE_FALSE = 20;
static var FACE_VERY_FALSE = 30;
static var FACE_HAPPY = 40;
static var FACE_VERY_HAPPY = 50;
}
Symbol 773 MovieClip [__Packages.idol.StateCloseUp] Frame 0
class idol.StateCloseUp extends idol.State
{
var m_data, m_bkg, m_parent, m_avatarClip, m_fadeOutAt, m_ctorParam, m_isPan, m_isGlad, m_expressionTick, m_startTick, m_autoLeaveTick, m_bigAssPlatta, m_removePlattaTick, m_fadeOutTick, m_blackplate, m_initTick, m_disengageNow, removeCurtain, snapshot, m_anim, m_avatar;
function StateCloseUp (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
}
function engage() {
var _local2 = "en";
if (m_data.lang == "de") {
_local2 = "de";
}
m_bkg = m_parent.attachMovie("bkg_level_" + _local2, "bkg", m_parent.getNextHighestDepth());
m_bkg._x = 0;
m_bkg._y = 0;
m_bkg.gotoAndStop(1 + ((m_data.currentLevel - 1) * 2));
m_avatarClip = m_parent.attachMovie((m_data.isMale ? "avatar_boy" : "avatar_girl"), "avatar", m_parent.getNextHighestDepth());
m_avatarClip._xscale = 500;
m_avatarClip._yscale = 500;
m_avatarClip._y = 1124;
m_fadeOutAt = -1;
var _local3 = m_ctorParam.split(",");
m_isPan = _local3[0] == "pan";
m_isGlad = _local3[1] == "glad";
if (m_isPan) {
com.midasplayer.fx.SoundManager.play("game_loop", 100, true);
m_avatarClip._x = 1024;
m_expressionTick = m_startTick + 1;
m_autoLeaveTick = int(m_startTick + (4 * (1000 / m_data.millisPerTick)));
} else {
m_bigAssPlatta = m_parent.createEmptyMovieClip("overlay", m_parent.getNextHighestDepth());
m_bigAssPlatta.beginFill(0);
m_bigAssPlatta.moveTo(0, 0);
m_bigAssPlatta.lineTo(755, 0);
m_bigAssPlatta.lineTo(755, 500);
m_bigAssPlatta.lineTo(0, 500);
m_bigAssPlatta.endFill();
m_avatarClip._x = 355;
m_removePlattaTick = m_startTick + 8;
m_expressionTick = m_startTick + 10;
m_autoLeaveTick = int(m_startTick + (2 * (1000 / m_data.millisPerTick)));
m_fadeOutTick = int(m_startTick + (2 * (1000 / m_data.millisPerTick)));
}
m_blackplate = m_parent.createEmptyMovieClip("intro_blackplate", m_parent.getNextHighestDepth());
m_blackplate.beginFill(0);
m_blackplate.moveTo(0, 500);
m_blackplate.lineTo(755, 500);
m_blackplate.lineTo(755, 600);
m_blackplate.lineTo(0, 600);
m_blackplate.endFill();
m_initTick = m_startTick + 1;
m_disengageNow = false;
removeCurtain();
}
function isDisengage() {
return(m_disengageNow);
}
function disengage() {
snapshot(m_parent);
}
function returnCode() {
return(0);
}
function tick() {
var _local2 = m_data.tick;
if (_local2 == m_fadeOutTick) {
m_fadeOutAt = getTimer() + 800;
}
if (_local2 == m_removePlattaTick) {
m_bigAssPlatta.removeMovieClip();
}
if (_local2 == m_initTick) {
if (m_isPan) {
m_anim = new com.midasplayer.util.EaseOutQuadAnimator(m_avatarClip);
m_anim.setPosition(355, 1124);
m_anim.setDuration(750);
}
m_avatar = idol.Avatar(m_avatarClip);
m_avatar.setup(m_data.millisPerTick, 120, 0);
m_avatar.setLanguage(m_data.lang);
m_avatar.setSkinColorTransform(m_data.skinColor);
m_avatar.setHaircut(m_data.haircut);
m_avatar.setHairColorTransform(m_data.hairColor);
m_avatar.setEyeColorTransform(m_data.eyeColor);
m_avatar.setMouthColorTransform(m_data.mouthColor);
m_avatar.setClothesColorTransform(m_data.clothesColor[Math.max(0, m_data.currentLevel - 1)]);
m_avatar.setClothing(m_data.currentLevel);
m_avatar.stopBody();
}
if (_local2 == m_expressionTick) {
if (m_isPan) {
m_avatar.setExpression(idol.Avatar.FACE_HAPPY);
} else if (m_data.isViral) {
m_avatar.setExpression(idol.Avatar.FACE_VERY_HAPPY);
} else if (m_isGlad) {
com.midasplayer.fx.SoundManager.play("next_level");
m_avatar.setExpression(idol.Avatar.FACE_VERY_HAPPY);
} else {
com.midasplayer.fx.SoundManager.play("end_jingle");
m_avatar.setExpression(idol.Avatar.FACE_SAD);
}
}
m_avatar.update(_local2);
if (_local2 == m_autoLeaveTick) {
m_disengageNow = true;
}
}
function render() {
m_avatar.render(m_data.alpha);
if (m_anim && (m_anim.update())) {
m_anim = null;
}
}
}
Symbol 774 MovieClip [__Packages.idol.StateJury] Frame 0
class idol.StateJury extends idol.State
{
var m_data, m_bkg, m_parent, m_fadeOutAt, m_jury, m_blackplate, m_initTick, m_startTick, m_showFirstBoxTick, m_showSecondBoxTick, m_showThirdBoxTick, m_fadeOutTick, m_removePlattaTick, m_autoLeaveTick, m_disengageNow, m_bigAssPlatta, removeCurtain, snapshot;
function StateJury (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
}
function engage() {
var _local2 = "en";
if (m_data.lang == "de") {
_local2 = "de";
}
m_bkg = m_parent.attachMovie("bkg_level_" + _local2, "bkg", m_parent.getNextHighestDepth());
m_bkg._x = 0;
m_bkg._y = 0;
m_bkg.gotoAndStop(2 + ((m_data.currentLevel - 1) * 2));
m_fadeOutAt = -1;
m_jury = m_parent.attachMovie("jury", "juy", m_parent.getNextHighestDepth());
m_jury._x = 375;
m_jury._y = 510;
m_jury.box1._visible = false;
m_jury.box2._visible = false;
m_jury.box3._visible = false;
if (m_data.lang == "de") {
m_jury.table.logo.gotoAndStop(2);
} else {
m_jury.table.logo.gotoAndStop(1);
}
var _local3 = m_data.totalScore - (m_data.lastQualifyScore / 2);
var _local4 = m_data.lastMaxScore - (m_data.lastQualifyScore / 2);
var _local5 = Math.max(int(10 * (1 - Math.max(0, (_local4 - _local3) / _local4))), 0);
var _local6 = 1 - ((m_data.lastMaxScore - m_data.totalScore) / m_data.lastMaxScore);
_local6 = _local6 * 100;
_local6 = int(_local6);
_local6 = Math.min(100, _local6);
m_jury.box1.textbox.text = com.midasplayer.util.I18n.getString("jury_grade_" + _local5);
m_jury.box2.textbox.text = ((com.midasplayer.util.I18n.getString("jury_points", m_data.lastQualifyScore, m_data.totalScore) + " (") + _local6) + "%)";
if (m_data.isViral) {
m_jury.box2.textbox.text = com.midasplayer.util.I18n.getString("viral_end_message_1");
m_jury.box3.textbox.text = com.midasplayer.util.I18n.getString("viral_end_message_2");
} else if (m_data.numLevels == 1) {
m_jury.box3.textbox.text = com.midasplayer.util.I18n.getString("opengame_msg");
} else if (m_data.totalScore > m_data.lastQualifyScore) {
var _local7 = Math.min(3, Math.max(1, m_data.currentLevel));
m_jury.box3.textbox.text = com.midasplayer.util.I18n.getString("jury_continue_" + _local7);
} else {
m_jury.box3.textbox.text = com.midasplayer.util.I18n.getString("jury_fail");
}
var _local8 = m_jury.person1;
var _local9 = m_jury.person2;
var _local10 = m_jury.person3;
switch (_local5) {
case 0 :
_local8.gotoAndStop("negative-");
_local8.head.gotoAndStop("sad");
_local9.gotoAndStop("negative-");
_local9.head.gotoAndStop("sad");
_local10.gotoAndStop("negative");
_local10.head.gotoAndStop("sad");
break;
case 1 :
case 2 :
_local8.gotoAndStop("negative-");
_local8.head.gotoAndStop("sad");
_local9.gotoAndStop("negative");
_local9.head.gotoAndStop("neutral");
_local10.gotoAndStop("negative");
_local10.head.gotoAndStop("sad");
break;
case 3 :
case 4 :
_local8.gotoAndStop("netural");
_local8.head.gotoAndStop("neutral");
_local9.gotoAndStop("negative");
_local9.head.gotoAndStop("sad");
_local10.gotoAndStop("neutral");
_local10.head.gotoAndStop("neutral");
break;
case 5 :
_local8.gotoAndStop("positive");
_local8.head.gotoAndStop("neutral");
_local9.gotoAndStop("positive");
_local9.head.gotoAndStop("neutral");
_local10.gotoAndStop("neutral");
_local10.head.gotoAndStop("neutral");
break;
case 6 :
case 7 :
_local8.gotoAndStop("positive");
_local8.head.gotoAndStop("happy");
_local9.gotoAndStop("positive+");
_local9.head.gotoAndStop("happy");
_local10.gotoAndStop("positive");
_local10.head.gotoAndStop("happy");
break;
case 8 :
_local8.gotoAndStop("positive");
_local8.head.gotoAndStop("neutral");
_local9.gotoAndStop("positive+");
_local9.head.gotoAndStop("happy");
_local10.gotoAndStop("positive");
_local10.head.gotoAndStop("happy");
break;
case 9 :
_local8.gotoAndStop("positive");
_local8.head.gotoAndStop("neutral");
_local9.gotoAndStop("positive+");
_local9.head.gotoAndStop("happy");
_local10.gotoAndStop("positive+");
_local10.head.gotoAndStop("happy");
break;
case 10 :
_local8.gotoAndStop("positive+");
_local8.head.gotoAndStop("happy");
_local9.gotoAndStop("positive+");
_local9.head.gotoAndStop("happy");
_local10.gotoAndStop("positive+");
_local10.head.gotoAndStop("happy");
}
m_blackplate = m_parent.createEmptyMovieClip("intro_blackplate", m_parent.getNextHighestDepth());
m_blackplate.beginFill(0);
m_blackplate.moveTo(0, 500);
m_blackplate.lineTo(755, 500);
m_blackplate.lineTo(755, 600);
m_blackplate.lineTo(0, 600);
m_blackplate.endFill();
m_initTick = m_startTick + 1;
m_showFirstBoxTick = int(m_startTick + (1000 / m_data.millisPerTick));
m_showSecondBoxTick = int(m_startTick + (2.5 * (1000 / m_data.millisPerTick)));
m_showThirdBoxTick = int(m_startTick + (5 * (1000 / m_data.millisPerTick)));
m_fadeOutTick = int(m_startTick + (7 * (1000 / m_data.millisPerTick)));
m_removePlattaTick = m_startTick + 10;
m_autoLeaveTick = int(m_startTick + (8 * (1000 / m_data.millisPerTick)));
m_disengageNow = false;
m_bigAssPlatta = m_parent.createEmptyMovieClip("overlay", m_parent.getNextHighestDepth());
m_bigAssPlatta.beginFill(0);
m_bigAssPlatta.moveTo(0, 0);
m_bigAssPlatta.lineTo(755, 0);
m_bigAssPlatta.lineTo(755, 500);
m_bigAssPlatta.lineTo(0, 500);
m_bigAssPlatta.endFill();
removeCurtain();
}
function isDisengage() {
return(m_disengageNow);
}
function disengage() {
com.midasplayer.fx.SoundManager.stop("game_loop");
snapshot(m_parent);
}
function returnCode() {
if ((m_data.currentLevel == 3) && (m_data.totalScore >= m_data.lastQualifyScore)) {
m_data.gameWon = true;
return(2);
}
if (m_data.currentLevel == m_data.numLevels) {
return(0);
}
if (m_data.totalScore < m_data.lastQualifyScore) {
return(0);
}
return(1);
}
function quitGame() {
m_disengageNow = true;
}
function tick() {
var _local2 = m_data.tick;
if (_local2 == m_initTick) {
}
if (_local2 == m_removePlattaTick) {
m_bigAssPlatta.removeMovieClip();
}
if (_local2 == m_showFirstBoxTick) {
m_jury.box1._visible = true;
}
if (_local2 == m_showSecondBoxTick) {
m_jury.box1._visible = false;
m_jury.box2._visible = true;
}
if (_local2 == m_showThirdBoxTick) {
m_jury.box3._visible = true;
}
if (_local2 == m_fadeOutTick) {
m_fadeOutAt = getTimer() + 1000;
}
if (_local2 == m_autoLeaveTick) {
m_disengageNow = true;
}
}
function render() {
if (m_fadeOutAt != -1) {
var _local2 = Math.max(0, m_fadeOutAt - getTimer()) / 1000;
var _local3 = int(100 * _local2);
com.midasplayer.fx.SoundManager.setVolume("game_loop", _local3);
if (_local2 == 0) {
com.midasplayer.fx.SoundManager.stop("game_loop");
m_fadeOutAt = -1;
}
}
}
}
Symbol 775 MovieClip [__Packages.idol.StateGameOver] Frame 0
class idol.StateGameOver extends idol.State
{
var m_data, m_disengageNow, m_bkg, m_parent, m_logo, m_screen, m_shadow, m_starclip, m_avatarClip, m_avatar, m_stars, m_emitters, m_plate, m_startTick, m_score, m_blackplate, m_initTick, m_quitTick, m_autoLeaveTick, m_playAgain, m_promo, snapshot, m_curtainTrans, m_frameBuf, removeCurtain;
function StateGameOver (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
}
function engage() {
if (m_data.isViral) {
m_data.gameWon = true;
m_data.totalScore = m_data.replayScore;
}
m_disengageNow = false;
m_bkg = m_parent.attachMovie("bkg_intro", "bkg", m_parent.getNextHighestDepth());
m_bkg._x = 0;
m_bkg._y = 0;
m_logo = idol.AnimDriver(m_parent.attachMovie("idol_splash", "slash", m_parent.getNextHighestDepth()));
m_logo._x = 20;
m_logo._y = 20;
if (m_data.lang == "de") {
m_logo.logo_en._visible = false;
m_logo.logo_de._visible = true;
} else {
m_logo.logo_en._visible = true;
m_logo.logo_de._visible = false;
}
m_screen = m_parent.attachMovie("intro_screen", "bkg_screen", m_parent.getNextHighestDepth());
m_screen._x = 0;
m_screen._y = 0;
m_screen.onPress = mx.utils.Delegate.create(this, onPressPlate);
m_shadow = m_parent.attachMovie("select_light", "sel_light", m_parent.getNextHighestDepth());
m_shadow._x = 0;
m_shadow._y = 0;
m_shadow.gotoAndStop(4);
if (m_data.gameWon) {
var _local2 = m_parent.attachMovie("disc", "d", m_parent.getNextHighestDepth());
_local2._x = 478;
_local2._y = 450;
if (m_data.lang == "de") {
_local2.gotoAndStop(2);
} else {
_local2.gotoAndStop(1);
}
} else if (com.midasplayer.fx.SoundManager.isPlaying("end_jingle") == false) {
com.midasplayer.fx.SoundManager.stopAll();
com.midasplayer.fx.SoundManager.play("end_jingle");
}
m_starclip = m_parent.createEmptyMovieClip("starclip", m_parent.getNextHighestDepth());
m_starclip._x = 500;
m_starclip._y = 0;
m_avatarClip = m_parent.attachMovie((m_data.isMale ? "avatar_boy" : "avatar_girl"), "avatar", m_parent.getNextHighestDepth());
m_avatarClip._xscale = 135;
m_avatarClip._yscale = 135;
m_avatarClip._x = 600;
m_avatarClip._y = 410;
m_avatar = idol.Avatar(m_avatarClip);
m_avatar.setup(m_data.millisPerTick, 66, 0);
m_avatar.setExpression((m_data.gameWon ? (idol.Avatar.FACE_VERY_HAPPY) : (idol.Avatar.FACE_SAD)));
m_avatar.setLanguage(m_data.lang);
m_avatar.setSkinColorTransform(m_data.skinColor);
m_avatar.setEyeColorTransform(m_data.eyeColor);
m_avatar.setHairColorTransform(m_data.hairColor);
m_avatar.setMouthColorTransform(m_data.mouthColor);
m_avatar.setHaircut(m_data.haircut);
m_avatar.setClothesColorTransform(m_data.clothesColor[Math.max(0, m_data.currentLevel - 1)]);
m_avatar.setClothing(Math.max(1, m_data.currentLevel));
m_stars = new Object();
m_emitters = new Object();
if (m_data.gameWon) {
m_avatar.startDance(0);
m_avatar.moveBody(2);
m_plate = m_parent.attachMovie("game_over_gamewin", "platta", m_parent.getNextHighestDepth());
var _local3 = 30;
m_emitters.a = {tick:(m_startTick + 10) + _local3, xoffs:20};
m_emitters.b = {tick:(m_startTick + 3) + _local3, xoffs:50};
m_emitters.c = {tick:(m_startTick + 4) + _local3, xoffs:80};
m_emitters.D = {tick:(m_startTick + 8) + _local3, xoffs:110};
m_emitters.E = {tick:(m_startTick + 13) + _local3, xoffs:140};
m_emitters.f = {tick:(m_startTick + 5) + _local3, xoffs:170};
} else {
m_plate = m_parent.attachMovie("game_over_gamelost", "platta", m_parent.getNextHighestDepth());
m_avatar.stopBody();
}
m_plate.title.text = com.midasplayer.util.I18n.getString("game_over_title");
m_plate.score_label.text = com.midasplayer.util.I18n.getString("game_over_total_score");
m_score = m_plate.score;
updateScore(m_data.totalScore);
m_blackplate = m_parent.createEmptyMovieClip("intro_blackplate", m_parent.getNextHighestDepth());
m_blackplate.beginFill(0);
m_blackplate.moveTo(0, 500);
m_blackplate.lineTo(755, 500);
m_blackplate.lineTo(755, 600);
m_blackplate.lineTo(0, 600);
m_blackplate.endFill();
m_initTick = m_startTick + 1;
m_quitTick = m_startTick + (m_data.ticksPerSec * 3);
m_autoLeaveTick = -1;
m_playAgain = false;
fscommand ("gameEnd", "" + m_data.totalScore);
}
function updateScore(s) {
var _local3 = s;
var _local4 = s;
var _local5 = s;
var _local6 = s;
var _local7 = s;
var _local8 = s;
_local3 = _local3 / 100000;
_local3 = int(_local3);
_local3 = _local3 % 10;
_local4 = _local4 / 10000;
_local4 = int(_local4);
_local4 = _local4 % 10;
_local5 = _local5 / 1000;
_local5 = int(_local5);
_local5 = _local5 % 10;
_local6 = _local6 / 100;
_local6 = _local6 % 10;
_local6 = int(_local6);
_local7 = _local7 / 10;
_local7 = _local7 % 10;
_local7 = int(_local7);
_local8 = _local8 % 10;
_local8 = int(_local8);
if (_local3 != 0) {
_local3++;
m_score.dig6.gotoAndStop(_local3);
}
_local4++;
m_score.dig5.gotoAndStop(_local4);
_local5++;
m_score.dig4.gotoAndStop(_local5);
_local6++;
m_score.dig3.gotoAndStop(_local6);
_local7++;
m_score.dig2.gotoAndStop(_local7);
_local8++;
m_score.dig1.gotoAndStop(_local8);
m_score.dig6._visible = _local3 != 0;
}
function onShowPromo() {
if (!m_promo) {
if (m_data.isSignup) {
m_promo = m_parent.attachMovie("internal_signup", "promobox", m_parent.getNextHighestDepth());
m_promo.b1.onPress = mx.utils.Delegate.create(this, onPlayAgain);
m_promo.b2.onPress = mx.utils.Delegate.create(this, onInternalSignUp);
m_promo.pass1.password = true;
m_promo.pass2.password = true;
} else if (m_data.promoLimit == m_data.numTimesPlayed) {
m_promo = m_parent.attachMovie("promo_signup_only", "promobox", m_parent.getNextHighestDepth());
m_promo.onPress = mx.utils.Delegate.create(this, onSignUp);
} else {
m_promo = m_parent.attachMovie("promo_signup_or_playagain", "promobox", m_parent.getNextHighestDepth());
m_promo.onPress = mx.utils.Delegate.create(this, onDecide);
}
m_promo._x = 0;
m_promo._y = 0;
m_screen.onPress = undefined;
}
}
function onInternalSignUp() {
m_promo.errorbox.text = "";
var _local2 = m_promo.user.text;
var _local3 = m_promo.pass1.text;
var _local4 = m_promo.pass2.text;
var _local5 = m_promo.email.text;
if (_local2.length < 2) {
m_promo.errorbox.text = "The username is too short.";
} else if (_local3.length < 3) {
m_promo.errorbox.text = "The password is too short.";
} else if (_local3 != _local4) {
m_promo.errorbox.text = "The password does not match.";
} else if (_local5.length < 6) {
m_promo.errorbox.text = "Invalid email.";
} else if (_local5.indexOf("@") < 0) {
m_promo.errorbox.text = "Invalid email.";
} else if (_local5.indexOf(".") < 0) {
m_promo.errorbox.text = "Invalid email.";
} else {
var _local6 = m_promo.attachMovie("internal_signup_over", "ovr", m_promo.getNextHighestDepth());
_local6._x = 61;
_local6._y = 20;
_local6._alpha = 50;
m_promo.b1.onPress = undefined;
m_promo.b2.onPress = undefined;
var _local7 = m_parent.createEmptyMovieClip("dummy", m_parent.getNextHighestDepth());
_local7.gameType = "americanidol";
_local7.username = m_promo.user.text;
_local7.password = m_promo.pass1.text;
_local7.password_validation = m_promo.pass2.text;
_local7.email = m_promo.email.text;
_local7.getURL(m_data.signupPostUrl, "_top", "POST");
}
}
function onPlayAgain() {
m_playAgain = true;
m_disengageNow = true;
m_promo.onPress = undefined;
}
function onSignUp() {
m_playAgain = false;
m_disengageNow = true;
m_promo.onPress = undefined;
}
function onDecide() {
var _local2 = m_parent._xmouse;
var _local3 = m_parent._ymouse;
if ((_local3 > 368) && (_local3 < 410)) {
if (_local2 > 371) {
m_playAgain = true;
}
m_disengageNow = true;
m_promo.onPress = undefined;
}
}
function onPressPlate() {
if ((m_quitTick <= m_data.tick) && (!m_disengageNow)) {
if (m_data.isPromo) {
onShowPromo();
} else {
m_disengageNow = true;
}
}
}
function isDisengage() {
return(m_disengageNow);
}
function disengage() {
com.midasplayer.fx.SoundManager.stopAll();
if (m_data.isPromo == false) {
fscommand ("gameQuit");
}
snapshot(m_parent);
}
function returnCode() {
if (m_playAgain) {
return(1);
}
return(0);
}
function tick() {
var _local2 = m_data.tick;
if (_local2 == m_initTick) {
var _local3 = m_bkg._width;
var _local4 = m_bkg._height;
m_curtainTrans = new idol.VerticalSlicer(9, _local3, _local4, m_frameBuf, m_parent);
}
if (m_autoLeaveTick == _local2) {
if (m_data.isPromo) {
onShowPromo();
} else {
m_disengageNow = true;
}
}
if (m_avatar) {
m_avatar.update(_local2);
}
if (_local2 > (m_initTick + 25)) {
for (var i in m_stars) {
var _local5 = m_stars[i];
_local5.fy.set((_local5.y = _local5.y - 13));
if (_local5.y < -10) {
_local5.clip.removeMovieClip();
delete m_stars[i];
}
}
for (var i in m_emitters) {
if (m_emitters[i].tick == _local2) {
m_emitters[i].tick = _local2 + 8;
var _local6 = new Object();
_local6.fy = new com.midasplayer.timing.IFloat();
_local6.x = (m_emitters[i].xoffs + int(Math.random() * 50)) - 25;
_local6.y = 500;
var _local7 = m_starclip.getNextHighestDepth();
var _local8 = "star" + _local7;
_local6.clip = m_starclip.attachMovie("single_star", _local8, _local7);
_local6.clip._x = _local6.x;
_local6.clip._y = _local6.y;
m_stars[_local8] = _local6;
}
}
}
}
function render() {
for (var i in m_stars) {
var _local2 = m_stars[i];
_local2.clip._y = int(_local2.fy.value);
_local2.clip._alpha = int(Math.min(_local2.clip._y, 100));
}
if (m_autoLeaveTick != -1) {
var _local3 = 1 + int(Math.max(0, m_autoLeaveTick - m_data.tick) / m_data.ticksPerSec);
m_plate.countdown.text = com.midasplayer.util.I18n.getString("game_end_in", _local3);
}
if (m_curtainTrans && (m_curtainTrans.update())) {
m_logo.playStart();
m_curtainTrans = undefined;
removeCurtain();
m_autoLeaveTick = m_startTick + (m_data.ticksPerSec * 10);
}
if (m_avatar) {
m_avatar.render(m_data.alpha);
}
}
}
Symbol 776 MovieClip [__Packages.idol.VerticalSlicer] Frame 0
class idol.VerticalSlicer implements idol.CurtainTransition
{
var m_slice, m_width, m_height, m_sliceWidth, m_bitmapSrc, m_bitmapDest, m_bitmapOut;
function VerticalSlicer (numSlice, width, height, outBuf, newClip) {
m_slice = [];
m_width = width;
m_height = height;
m_sliceWidth = Math.ceil(m_width / numSlice);
var _local7 = numSlice;
while (_local7--) {
var _local8 = new Object();
if ((_local7 % 2) == 0) {
var _local9 = {_x:0, _y:-m_height};
_local8.oa = _local9;
_local8.anim = new com.midasplayer.util.EaseInBounceAnimator(_local9);
_local8.anim.setDuration(800);
_local8.anim.setPosition(0, 0);
_local8.yd = 1;
_local8.lh = m_height;
} else {
var _local10 = {_x:0, _y:m_height};
_local8.oa = _local10;
_local8.anim = new com.midasplayer.util.EaseInBounceAnimator(_local10);
_local8.anim.setDuration(800);
_local8.anim.setPosition(0, 0);
_local8.yd = -1;
_local8.lh = m_height;
}
_local8.delay = (numSlice - _local7) * 2.5;
m_slice.push(_local8);
}
m_bitmapSrc = new flash.display.BitmapData(m_width, m_height, false, 0);
m_bitmapSrc.copyPixels(outBuf, new flash.geom.Rectangle(0, 0, m_width, m_height), new flash.geom.Point(0, 0));
m_bitmapDest = new flash.display.BitmapData(m_width, m_height, false, 0);
m_bitmapDest.draw(newClip);
m_bitmapOut = outBuf;
}
function update() {
var _local2 = 0;
var _local3 = 0;
for ( ; _local3 < m_slice.length ; _local3++) {
var _local4 = m_slice[_local3];
for ( ; (--_local4.delay) > 0 ; _local3++) {
_local2++;
}
for ( ; _local4.anim.isFinished() ; _local3++) {
}
_local4.anim.update();
var _local5 = _local4.oa._y;
var _local6 = m_sliceWidth * _local3;
var _local7 = m_height - _local5;
var _local8 = m_height - _local7;
var _local9 = new flash.geom.Rectangle(_local6, _local8, m_sliceWidth, m_height);
var _local10 = new flash.geom.Rectangle(_local6, _local8, m_sliceWidth, m_height);
m_bitmapOut.copyPixels(m_bitmapSrc, _local9, new flash.geom.Point(_local6, _local8));
m_bitmapOut.copyPixels(m_bitmapDest, _local10, new flash.geom.Point(_local6, 0));
_local2++;
}
return(_local2 == 0);
}
}
Symbol 777 MovieClip [__Packages.com.midasplayer.util.EaseInBounceAnimator] Frame 0
class com.midasplayer.util.EaseInBounceAnimator extends com.midasplayer.util.Animator
{
var dt, duration, x, startX, dx, y, startY, dy;
function EaseInBounceAnimator (o) {
super(o);
}
function nextPosition() {
var _local2 = dt;
_local2 = _local2 / duration;
if (_local2 < (1 / 2.75)) {
x = (dx * ((7.5625 * _local2) * _local2)) + startX;
} else if (_local2 < (2 / 2.75)) {
_local2 = _local2 - (1.5 / 2.75);
x = (dx * (((7.5625 * _local2) * _local2) + 0.75)) + startX;
} else if (_local2 < (2.5 / 2.75)) {
_local2 = _local2 - (2.25 / 2.75);
x = (dx * (((7.5625 * _local2) * _local2) + 0.9375)) + startX;
} else {
_local2 = _local2 - (2.625 / 2.75);
x = (dx * (((7.5625 * _local2) * _local2) + 0.984375)) + startX;
}
_local2 = dt;
_local2 = _local2 / duration;
if (_local2 < (1 / 2.75)) {
y = (dy * ((7.5625 * _local2) * _local2)) + startY;
} else if (_local2 < (2 / 2.75)) {
_local2 = _local2 - (1.5 / 2.75);
y = (dy * (((7.5625 * _local2) * _local2) + 0.75)) + startY;
} else if (_local2 < (2.5 / 2.75)) {
_local2 = _local2 - (2.25 / 2.75);
y = (dy * (((7.5625 * _local2) * _local2) + 0.9375)) + startY;
} else {
_local2 = _local2 - (2.625 / 2.75);
y = (dy * (((7.5625 * _local2) * _local2) + 0.984375)) + startY;
}
}
}
Symbol 778 MovieClip [__Packages.idol.StateGame] Frame 0
class idol.StateGame extends idol.State
{
var m_isError, m_disengageNow, m_songPlayStart, m_songPlayStop, m_data, m_lastScore, m_bkg, m_parent, m_avatarClip, m_avatarScale, m_tracksClip, m_topBar, m_trackUnder, m_blackplate, m_crowd, m_loaderContainer, m_loaderBkg, m_loaderBkgStars, m_loader, m_loaderAnimator, m_songTitle, m_autoLeaveTick, m_curtainTick, m_startTick, m_loaderStarsIdx, m_loaderStars, m_loopStarted, m_initState, m_tracks, snapshot, m_songLengthMs, m_sectionPtr, m_nextDanceMove, m_lastDanceMove, m_tick, m_curtainTrans, m_frameBuf, m_lastSongBeginTime, m_songLoadRetry, m_songBpm, m_beginLoadXmlAt, m_songDataTotal, m_songDataNowLoading, m_songDataNowLoadingNum, m_topBarAnim, m_avatar, m_accTrackTime, m_accTrackTicks, m_sections, m_recordSign, m_lastGrade, m_lastVol0, m_lastVol1, m_lastVol2, m_crowdAnim, m_avatarZoom, m_avatarZoomAnim, m_platformAnim, m_tracksAnim, m_frame, removeCurtain, m_startTime, m_lastCrowdFrame;
function StateGame (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
}
function engage() {
var _local2 = false;
m_isError = false;
m_disengageNow = false;
m_songPlayStart = -1;
m_songPlayStop = -1;
m_data.currentLevel++;
m_lastScore = -1;
var _local3 = "en";
if (m_data.lang == "de") {
_local3 = "de";
}
m_bkg = m_parent.attachMovie("bkg_level_" + _local3, "bkg", m_parent.getNextHighestDepth());
m_bkg._x = 0;
m_bkg._y = 0;
m_bkg.gotoAndStop(1 + ((m_data.currentLevel - 1) * 2));
if (m_data.currentLevel < 3) {
m_avatarClip = m_parent.attachMovie((m_data.isMale ? "avatar_boy" : "avatar_girl"), "avatar", m_parent.getNextHighestDepth());
m_avatarClip._x = 378;
m_avatarClip._y = 464;
m_avatarClip._xscale = 150;
m_avatarClip._yscale = 150;
m_avatarClip._alpha = 0;
m_avatarScale = 150;
} else {
m_avatarClip = m_parent.attachMovie((m_data.isMale ? "avatar_boy" : "avatar_girl"), "avatar", m_parent.getNextHighestDepth());
m_avatarClip._x = 378;
m_avatarClip._y = 375;
m_avatarClip._xscale = 100;
m_avatarClip._yscale = 100;
m_avatarClip._alpha = 0;
m_avatarScale = 100;
}
_local2 = true;
m_tracksClip = m_parent.attachMovie("tracks", "stripesBkg", m_parent.getNextHighestDepth());
m_tracksClip._x = -10 + 43;
m_tracksClip._y = -10;
m_tracksClip._alpha = 0;
m_topBar = m_parent.attachMovie("top_bar", "topBar", m_parent.getNextHighestDepth());
m_topBar._x = 755;
m_topBar._y = 0;
m_topBar.short_sparkle_1._visible = false;
m_topBar.short_sparkle_2._visible = false;
m_topBar.short_sparkle_3._visible = false;
m_topBar.short_sparkle_4._visible = false;
m_topBar.long_sparkle_1._visible = false;
m_topBar.long_sparkle_2._visible = false;
m_topBar.long_sparkle_3._visible = false;
m_topBar.long_sparkle_4._visible = false;
var _local4 = m_topBar.attachMovie("levelsigns_" + _local3, "levelsign", m_topBar.getNextHighestDepth());
_local4.gotoAndStop(m_data.currentLevel);
_local4._x = 253;
_local4._y = 42;
m_trackUnder = m_parent.createEmptyMovieClip("dfsdv", m_parent.getNextHighestDepth());
m_trackUnder._x = 33;
m_trackUnder._y = 0;
m_blackplate = m_parent.createEmptyMovieClip("intro_blackplate", m_parent.getNextHighestDepth());
m_blackplate.beginFill(0);
m_blackplate.moveTo(0, 500);
var _local5 = 755;
if (!_local2) {
_local5 = 260;
}
m_blackplate.lineTo(_local5, 500);
m_blackplate.lineTo(_local5, 560);
m_blackplate.lineTo(0, 560);
m_blackplate.endFill();
if (m_data.currentLevel == 3) {
m_crowd = m_blackplate.attachMovie("bitmap_crowd", "sfgb", m_blackplate.getNextHighestDepth());
m_crowd._x = 0;
m_crowd._y = 501;
}
var _local6 = 300;
m_loaderContainer = m_blackplate.createEmptyMovieClip("loaderstuff", m_blackplate.getNextHighestDepth());
m_loaderContainer._x = 0;
m_loaderContainer._y = 0;
m_loaderBkg = m_loaderContainer.attachMovie("loader_background", "loaderbkg", m_loaderContainer.getNextHighestDepth());
m_loaderBkg.silhouette.gotoAndStop(3);
m_loaderBkg._x = 375;
m_loaderBkg._y = _local6 + 75;
m_loaderBkgStars = m_loaderContainer.createEmptyMovieClip("loader_bkg_stars", m_loaderContainer.getNextHighestDepth());
m_loaderBkgStars._x = 375;
m_loaderBkgStars._y = _local6 + 75;
m_loaderBkgStars.setMask(m_loaderBkg);
m_loader = m_loaderContainer.attachMovie("loader_arrow", "loader", m_loaderContainer.getNextHighestDepth());
m_loader.levelname_txt.text = com.midasplayer.util.I18n.getString("level_" + m_data.currentLevel);
m_loader._x = -250;
m_loader._y = _local6 + 45;
m_loaderAnimator = new com.midasplayer.util.EaseInBounceAnimator(m_loader);
m_loaderAnimator.setPosition(272, _local6 + 45);
m_loaderAnimator.setDuration(500);
m_songTitle = m_parent.attachMovie("songtitle", "title", m_parent.getNextHighestDepth());
m_songTitle._x = 755 - 377;
m_songTitle._y = 290;
var _local7 = 1;
if (_local3 == "de") {
_local7 = 2;
}
m_songTitle.inner.frozen = true;
m_songTitle.inner.gotoAndStop(_local7);
m_autoLeaveTick = -1;
m_curtainTick = m_startTick + 1;
m_loaderStarsIdx = 0;
m_loaderStars = {};
m_loopStarted = false;
updateScore();
m_initState = 0;
}
function isDisengage() {
return(m_disengageNow);
}
function disengage() {
var _local2 = ["song_0", "song_1", "song_2", "song_background"];
for (var i in _local2) {
com.midasplayer.fx.SoundManager.stop(_local2[i]);
com.midasplayer.fx.SoundManager.unload(_local2[i]);
}
if (m_tracks) {
m_data.roundScore = m_tracks.m_score;
if (m_data.isViral) {
var _local3 = m_tracks.getRecordData();
var _local4 = "";
_local4 = _local4 + (serializeColor(m_data.hairColor) + ";");
_local4 = _local4 + (serializeColor(m_data.eyeColor) + ";");
_local4 = _local4 + (serializeColor(m_data.mouthColor) + ";");
_local4 = _local4 + (serializeColor(m_data.skinColor) + ";");
_local4 = _local4 + serializeColor(m_data.clothesColor[0]);
var _local5 = m_data.playerName;
_local5 = _global.escape(_local5.substring(0, Math.min(20, _local5.length)));
var _local6 = (((((((((((((("0,0," + m_data.seed) + " ") + m_data.promoSongRngIndex) + " ") + m_data.roundScore) + " ") + m_data.haircut) + " ") + (m_data.isMale ? "1" : "0")) + " ") + _local5) + " ") + _local4) + ",p=0\n") + _local3.join(newline);
var _local7 = com.midasplayer.util.Base64.encode(com.midasplayer.util.LZW.compress(_local6));
fscommand ("data", _local7);
}
} else {
m_data.roundScore = 0;
}
m_data.totalScore = m_data.totalScore + m_data.roundScore;
snapshot(m_parent);
}
function serializeColor(o) {
var _local3 = "";
for (var i in o) {
if (_local3.length > 0) {
_local3 = _local3 + "#";
}
_local3 = _local3 + ((i + ":") + o[i]);
}
return(_local3);
}
function returnCode() {
if (m_isError) {
return(-1);
}
if (m_data.currentLevel == 3) {
return(0);
}
return(1);
}
function generateSong() {
var _local2 = m_data.level[m_data.currentLevel - 1];
var _local3 = new idol.Song(m_data.rng, m_songLengthMs, _local2.bpm, _local2.divider, _local2.longNote, _local2.newLongNote, _local2.extraNote, _local2.newNote);
_local3.generate();
return(_local3);
}
function onSongCtrl(startSong) {
if (startSong) {
com.midasplayer.fx.SoundManager.play("song_background", 100);
com.midasplayer.fx.SoundManager.play("song_0", 100);
com.midasplayer.fx.SoundManager.play("song_1", 0);
com.midasplayer.fx.SoundManager.play("song_2", 0);
m_songPlayStart = getTimer();
m_sectionPtr = 0;
m_nextDanceMove = -1;
m_lastDanceMove = -1;
m_initState = 9;
} else {
m_songPlayStop = getTimer();
m_initState = 10;
}
}
function updateScore() {
var _local2 = Math.max(0, m_lastScore) + m_data.totalScore;
var _local3 = _local2;
var _local4 = _local2;
var _local5 = _local2;
var _local6 = _local2;
var _local7 = _local2;
var _local8 = _local2;
_local3 = _local3 / 100000;
_local3 = int(_local3);
_local3 = _local3 % 10;
_local4 = _local4 / 10000;
_local4 = int(_local4);
_local4 = _local4 % 10;
_local5 = _local5 / 1000;
_local5 = int(_local5);
_local5 = _local5 % 10;
_local6 = _local6 / 100;
_local6 = int(_local6);
_local6 = _local6 % 10;
_local7 = _local7 / 10;
_local7 = int(_local7);
_local7 = _local7 % 10;
_local8 = int(_local8);
_local8 = _local8 % 10;
if (_local3 != 0) {
_local3++;
m_topBar.dig6.gotoAndStop(_local3);
}
_local4++;
m_topBar.dig5.gotoAndStop(_local4);
_local5++;
m_topBar.dig4.gotoAndStop(_local5);
_local6++;
m_topBar.dig3.gotoAndStop(_local6);
_local7++;
m_topBar.dig2.gotoAndStop(_local7);
_local8++;
m_topBar.dig1.gotoAndStop(_local8);
m_topBar.dig6._visible = _local3 != 0;
}
function runAlways() {
if (m_initState < 5) {
if ((m_tick % 2) == 0) {
var _local2 = m_loaderBkgStars.getNextHighestDepth();
var _local3 = m_loaderBkgStars.attachMovie("maskedstar", "saa" + _local2, _local2);
_local3._x = int((Math.random() * 300) - 150);
_local3._y = 140;
}
}
if (m_tick == m_autoLeaveTick) {
m_disengageNow = true;
}
if (m_tick == m_curtainTick) {
var _local4 = m_bkg._width;
var _local5 = m_bkg._height;
m_curtainTrans = new idol.VerticalSlicer(9, _local4, _local5, m_frameBuf, m_parent);
}
if ((m_lastSongBeginTime != -1) && (getTimer() > (m_lastSongBeginTime + 60000))) {
m_songLoadRetry--;
if (m_songLoadRetry >= 0) {
com.midasplayer.fx.SoundManager.killPreload();
m_initState = 3;
} else {
bailOut();
}
m_lastSongBeginTime = -1;
}
}
function runState1() {
var _local2 = m_data.level[m_data.currentLevel - 1];
m_songBpm = _local2.bpm;
m_songLoadRetry = 1;
m_initState = 3;
}
function runState2() {
if (getTimer() > (m_beginLoadXmlAt + 20000)) {
m_initState = 1;
}
}
function runState3() {
var _local2 = m_data.level[m_data.currentLevel - 1];
var _local3 = _local2.name;
var _local4 = (m_data.isMale ? "_boy" : "_girl");
var _local5 = [{url:((m_data.dataPath + _local3) + _local4) + "_background.mp3", id:"song_background"}, {url:((m_data.dataPath + _local3) + _local4) + "_good.mp3", id:"song_0"}, {url:((m_data.dataPath + _local3) + _local4) + "_avg.mp3", id:"song_1"}, {url:((m_data.dataPath + _local3) + _local4) + "_crap.mp3", id:"song_2"}];
m_lastSongBeginTime = -1;
m_songDataTotal = _local5.length;
com.midasplayer.fx.SoundManager.preload(_local5, mx.utils.Delegate.create(this, onSongDataLoaded), mx.utils.Delegate.create(this, onBeginLoadSong));
m_initState = 4;
}
function runState4() {
if ((!m_loopStarted) && ((!com.midasplayer.fx.SoundManager.isPlaying("next_level")) && (!com.midasplayer.fx.SoundManager.isPlaying("game_loop")))) {
m_loopStarted = true;
com.midasplayer.fx.SoundManager.play("game_loop", 100, true);
}
var _local2 = m_songDataNowLoading.getBytesTotal();
if (m_songDataNowLoading && (_local2 > 0)) {
var _local3 = m_songDataNowLoading.getBytesLoaded();
var _local4 = 1 - ((_local2 - _local3) / _local2);
if (m_songDataTotal > 1) {
_local4 = 1 - ((m_songDataTotal - ((m_songDataNowLoadingNum - 1) + _local4)) / m_songDataTotal);
}
var _local5 = int(m_loader._totalframes * _local4) + 1;
m_loader.gotoAndStop(_local5);
}
}
function runState5() {
m_topBarAnim = new com.midasplayer.util.EaseOutQuadAnimator(m_topBar);
m_topBarAnim.setPosition(0, 0);
m_topBarAnim.setDuration(500);
m_loaderBkg.removeMovieClip();
m_loaderBkgStars.removeMovieClip();
m_loaderContainer.removeMovieClip();
m_avatar = idol.Avatar(m_avatarClip);
m_avatar.setLanguage(m_data.lang);
m_avatar.setHairColorTransform(m_data.hairColor);
m_avatar.setSkinColorTransform(m_data.skinColor);
m_avatar.setEyeColorTransform(m_data.eyeColor);
m_avatar.setMouthColorTransform(m_data.mouthColor);
m_avatar.setHaircut(m_data.haircut);
m_avatar.setClothesColorTransform(m_data.clothesColor[Math.max(0, m_data.currentLevel - 1)]);
var _local2 = m_songBpm;
while (_local2 > 75) {
_local2 = _local2 / 2;
}
m_avatar.setup(m_data.millisPerTick, _local2);
m_avatar.setClothing(m_data.currentLevel);
m_avatar.setExpression(idol.Avatar.FACE_NEUTRAL);
m_initState = 6;
}
function runState6() {
if (m_topBarAnim == undefined) {
m_initState = 7;
}
}
function runState7() {
var _local2 = m_data.level[m_data.currentLevel - 1];
m_songLengthMs = _local2.songLength;
m_accTrackTime = 0;
m_accTrackTicks = 0;
var _local3 = generateSong();
var _local4 = _local3.getMaxScore();
var _local5 = [0, 0.5, 0.66, 0.75];
var _local6 = int(_local4 * _local5[m_data.currentLevel]);
_local6 = _local6 / 100;
_local6 = int(_local6);
_local6 = _local6 * 100;
m_sections = (m_data.isMale ? (_local2.sectionsBoy) : (_local2.sectionsGirl));
m_data.lastQualifyScore = m_data.totalScore + _local6;
m_data.lastMaxScore = m_data.totalScore + _local4;
if ((!m_data.isViralReplay) && (m_data.isViral)) {
m_recordSign = m_parent.attachMovie("recording_sign", "rec", m_parent.getNextHighestDepth());
m_recordSign._x = 645;
m_recordSign._y = 120;
}
m_tracks = idol.Tracks(m_tracksClip);
m_tracks.init(m_tick);
m_tracks.setParents(m_parent, m_trackUnder, m_topBar);
m_tracks.setPlayControlFn(mx.utils.Delegate.create(this, onSongCtrl));
m_tracks.setSongData(_local3.getFrets(), m_songLengthMs, m_songBpm, m_data.millisPerTick);
m_tracks.enableViralRecord(m_data.isViral);
if (m_data.isViral) {
m_songTitle.inner.title.text = (m_data.playerName + newline) + _local2.song;
} else {
m_songTitle.inner.title.text = (_local2.song + newline) + com.midasplayer.util.I18n.getString("to_qualify", m_data.lastQualifyScore);
}
m_songTitle.playOnce();
m_initState = 8;
}
function runState8() {
m_tracks.update(m_tick);
}
function runState9() {
var _local2 = 10;
var _local3 = _local2 / 2;
var _local4 = 10 - m_tracks.m_grade;
var _local5 = m_tracks.m_percent;
var _local6 = [];
if (m_lastScore != m_tracks.m_score) {
m_lastScore = m_tracks.m_score;
updateScore();
}
if (m_lastGrade != _local4) {
var _local7 = m_lastGrade - _local4;
if ((_local7 > 0) && ((_local4 < 4) && (!com.midasplayer.fx.SoundManager.isPlaying("cheer")))) {
com.midasplayer.fx.SoundManager.play("cheer", 40);
}
if ((_local7 < 0) && ((_local4 >= 4) && (!com.midasplayer.fx.SoundManager.isPlaying("boo")))) {
com.midasplayer.fx.SoundManager.play("boo", 75);
}
m_lastGrade = _local4;
}
if (_local4 < 1) {
m_avatar.setExpression(idol.Avatar.FACE_VERY_HAPPY);
} else if (_local4 < 2) {
m_avatar.setExpression(idol.Avatar.FACE_HAPPY);
} else if (_local4 < 4) {
m_avatar.setExpression(idol.Avatar.FACE_NEUTRAL);
} else if (_local4 < 6) {
m_avatar.setExpression(idol.Avatar.FACE_FALSE);
} else {
m_avatar.setExpression(idol.Avatar.FACE_VERY_FALSE);
}
_local6 = [0, 1];
if ((m_nextDanceMove < 0) || (m_tick == m_nextDanceMove)) {
var _local8 = (_local2 - _local4) / _local2;
var _local9 = int(_local8 * _local6.length);
var _local10 = _local6[int((Math.random() * _local9) % _local9)];
if (m_lastDanceMove != _local10) {
m_avatar.startDance(_local10);
m_avatar.moveBody(2);
m_lastDanceMove = _local10;
}
var _local11 = 1000 / m_data.millisPerTick;
m_nextDanceMove = (m_tick + int((Math.random() * 5) * _local11)) + (_local11 * 5);
}
if (m_tracks.m_perfectStreak > 4) {
if ((m_tick % 50) == 0) {
m_avatar.throwYourHandsInTheAirAndWaveThemLikeYouJustDontCare();
}
}
if (_local4 < 3) {
m_lastVol0 = 80;
m_lastVol1 = 0;
m_lastVol2 = 0;
} else if (_local4 < 6) {
m_lastVol0 = 0;
m_lastVol1 = 80;
m_lastVol2 = 0;
} else {
m_lastVol0 = 0;
m_lastVol1 = 0;
m_lastVol2 = 80;
}
if (!m_sections) {
com.midasplayer.fx.SoundManager.setVolume("song_0", m_lastVol0);
com.midasplayer.fx.SoundManager.setVolume("song_1", m_lastVol1);
com.midasplayer.fx.SoundManager.setVolume("song_2", m_lastVol2);
}
}
function runState10() {
var _local2 = 1 - Math.min(1, (getTimer() - m_songPlayStop) / 1000);
com.midasplayer.fx.SoundManager.setVolume("song_0", int(m_lastVol0 * _local2));
com.midasplayer.fx.SoundManager.setVolume("song_1", int(m_lastVol1 * _local2));
com.midasplayer.fx.SoundManager.setVolume("song_2", int(m_lastVol2 * _local2));
com.midasplayer.fx.SoundManager.setVolume("song_background", int(100 * _local2));
if (_local2 == 0) {
m_initState = 11;
}
}
function runState11() {
var _local2 = ["song_0", "song_1", "song_2", "song_background"];
for (var i in _local2) {
com.midasplayer.fx.SoundManager.stop(_local2[i]);
com.midasplayer.fx.SoundManager.unload(_local2[i]);
}
m_topBarAnim = new com.midasplayer.util.EaseInQuadAnimator(m_topBar);
m_topBarAnim.setPosition(0, -128);
m_topBarAnim.setDuration(800);
if (m_crowd) {
m_crowdAnim = new com.midasplayer.util.EaseInQuadAnimator(m_crowd);
m_crowdAnim.setPosition(0, 620);
m_crowdAnim.setDuration(800);
}
m_avatarZoom = {_x:m_avatarClip._xscale, _y:m_avatarClip._yscale};
m_avatarZoomAnim = new com.midasplayer.util.EaseInQuadAnimator(m_avatarZoom);
m_avatarZoomAnim.setPosition(500, 500);
m_avatarZoomAnim.setDuration(800);
m_platformAnim = new com.midasplayer.util.EaseInQuadAnimator(m_avatarClip);
m_platformAnim.setPosition(355, 1124);
m_platformAnim.setDuration(800);
m_tracksAnim = new com.midasplayer.util.EaseInQuadAnimator(m_tracks);
m_tracksAnim.setPosition(-500, 0);
m_tracksAnim.setDuration(800);
m_recordSign.removeMovieClip();
m_avatar.setExpression(idol.Avatar.FACE_HAPPY);
m_avatar.stopDance();
m_avatar.stopBody();
com.midasplayer.fx.SoundManager.play("game_loop", 0, true);
m_initState = 12;
m_autoLeaveTick = m_tick + ((1000 / m_data.millisPerTick) * 4);
}
function tick() {
m_tick = m_data.tick;
if (m_initState > 0) {
if (m_initState == 11) {
runState11();
}
if (m_initState == 10) {
runState10();
}
if (m_initState == 9) {
runState9();
}
if (m_initState >= 8) {
runState8();
}
if (m_initState == 7) {
runState7();
}
if (m_initState == 6) {
runState6();
}
if (m_initState == 5) {
runState5();
}
if (m_initState == 4) {
runState4();
}
if (m_initState == 3) {
runState3();
}
if (m_initState == 2) {
runState2();
}
if (m_initState == 1) {
runState1();
}
m_avatar.update();
}
runAlways();
}
function bailOut() {
var _local2 = m_parent.attachMovie("error_box", "err", m_parent.getNextHighestDepth());
_local2._x = 188;
_local2._y = 260;
_local2.txt.text = com.midasplayer.util.I18n.getString("download_error");
m_autoLeaveTick = m_data.tick + (5 * m_data.ticksPerSec);
m_isError = true;
com.midasplayer.fx.SoundManager.killPreload();
m_initState = -1;
}
function onSongDataLoaded(numLoaded, success) {
if (success == false) {
bailOut();
} else {
if (m_songDataTotal == numLoaded) {
m_initState = 5;
}
m_songLoadRetry = 1;
m_lastSongBeginTime = -1;
}
}
function onBeginLoadSong(newSound, songName, songId, numLoaded) {
m_lastSongBeginTime = getTimer();
m_songDataNowLoading = newSound;
m_songDataNowLoadingNum = numLoaded + 1;
m_frame = 0;
}
function quitGame() {
m_autoLeaveTick = m_data.tick + 1;
}
function render() {
var _local2 = m_data.alpha;
var _local3 = m_frame & 1;
m_frame++;
if (m_initState > 0) {
m_tracks.render(_local2, !m_data.isViralReplay);
if (_local3) {
m_avatar.render(_local2);
}
}
if (m_curtainTrans) {
if (m_curtainTrans.update()) {
m_curtainTrans = undefined;
removeCurtain();
m_initState = 1;
}
}
if (m_initState == 12) {
if (m_topBarAnim && (m_topBarAnim.update())) {
m_topBarAnim = null;
}
if (m_platformAnim && (m_platformAnim.update())) {
m_platformAnim = null;
m_avatarClip._xscale = 500;
m_avatarClip._yscale = 500;
} else if (m_platformAnim) {
com.midasplayer.fx.SoundManager.setVolume("game_loop", (1 - m_platformAnim.getElapsed()) * 100);
}
if (m_avatarZoomAnim && (m_avatarZoomAnim.update())) {
m_avatarZoomAnim = null;
} else if (m_avatarZoomAnim) {
m_avatarClip._xscale = m_avatarZoom._x;
m_avatarClip._yscale = m_avatarZoom._y;
}
if (m_crowdAnim && (m_crowdAnim.update())) {
m_crowdAnim = null;
}
if (m_tracksAnim && (m_tracksAnim.update())) {
m_tracksAnim = null;
}
} else {
if (m_initState >= 1) {
if (m_loaderAnimator && (m_loaderAnimator.update())) {
m_loaderAnimator = undefined;
}
if ((m_songPlayStop == -1) && ((m_songPlayStart != -1) && (m_sections))) {
var _local4 = getTimer() - m_songPlayStart;
var _local5 = m_sectionPtr;
var _local6 = m_sections.length;
while ((_local5 < _local6) && (_local4 >= m_sections[_local5])) {
_local5++;
}
var _local7 = _local4;
if (_local5 > 0) {
_local7 = _local7 - m_sections[_local5 - 1];
}
if (_local7 < 250) {
com.midasplayer.fx.SoundManager.setVolume("song_0", m_lastVol0);
com.midasplayer.fx.SoundManager.setVolume("song_1", m_lastVol1);
com.midasplayer.fx.SoundManager.setVolume("song_2", m_lastVol2);
}
m_sectionPtr = _local5;
}
}
if (m_topBarAnim) {
if (m_topBarAnim.update()) {
m_topBarAnim = undefined;
m_tracksClip._alpha = 100;
m_avatarClip._alpha = 100;
m_startTime = -1;
m_loader.removeMovieClip();
com.midasplayer.fx.SoundManager.stop("game_loop");
com.midasplayer.fx.SoundManager.stop("next_level");
} else {
var _local8 = (1 - m_topBarAnim.getElapsed()) * 100;
m_tracksClip._alpha = _local8;
m_avatarClip._alpha = _local8;
m_loader._alpha = 100 - _local8;
com.midasplayer.fx.SoundManager.setVolume("game_loop", 100 - _local8);
com.midasplayer.fx.SoundManager.setVolume("next_level", 100 - _local8);
}
}
}
if (m_crowd && (!_local3)) {
var _local9 = getTimer();
if (m_startTime < 0) {
m_startTime = _local9;
}
var _local10 = int((_local9 - m_startTime) / ((1 / 5) * 1000));
_local10++;
if (_local10 >= m_crowd._totalframes) {
m_startTime = _local9;
} else if (m_lastCrowdFrame != _local10) {
m_crowd.gotoAndStop(_local10);
m_lastCrowdFrame = _local10;
}
}
m_blackplate.swapDepths(m_parent.getNextHighestDepth());
if (m_songTitle.isRunning()) {
m_songTitle.swapDepths(m_parent.getNextHighestDepth());
}
}
}
Symbol 779 MovieClip [__Packages.idol.Tracks] Frame 0
class idol.Tracks extends MovieClip
{
var m_songEnded, m_combinedHitScore, m_lastReportedState, m_endSong, m_triggedFrets, m_playedNotes, m_notesPlayed, m_notesNailed, m_anim, m_grade, m_longALength, m_longBLength, m_longCLength, m_longDLength, m_heldNotes, m_longNotes, m_runningNotes, m_score, m_keystate, m_perfectStreak, m_fretOffsetPrev, m_fretOffset, m_objs, m_bkgRows, m_perfectHit, m_lateHit, m_earlyHit, m_hitLimit, m_trackHeight, m_record, m_viralRecord, m_tick, m_pointsAcquired, m_songLength, m_songPosMs, m_percent, m_fretLength, m_startPlaying, m_travelTicks, m_playCtrlFn, m_arrowIndicator, m_speed, m_millisPerTick, m_overParent, m_statusBar, getNextHighestDepth, attachMovie, m_frets, m_isLongA, m_isLongB, m_isLongC, m_isLongD, m_underParent, m_bpm, m_timePerFret;
function Tracks () {
super();
m_songEnded = false;
m_combinedHitScore = 15;
m_lastReportedState = "";
m_endSong = -1;
m_triggedFrets = {};
m_playedNotes = {};
m_notesPlayed = 0;
m_notesNailed = 0;
m_anim = {};
m_grade = 10;
m_longALength = 0;
m_longBLength = 0;
m_longCLength = 0;
m_longDLength = 0;
m_heldNotes = [null, null, null, null];
m_longNotes = [null, null, null, null];
m_runningNotes = [null, null, null, null];
m_score = 0;
m_keystate = [new idol.KeyState(0, Key.LEFT), new idol.KeyState(1, Key.DOWN), new idol.KeyState(2, Key.UP), new idol.KeyState(3, Key.RIGHT)];
m_perfectStreak = 0;
m_fretOffsetPrev = -1;
m_fretOffset = 0;
m_objs = new com.midasplayer.util.ArrayList();
m_bkgRows = {};
m_perfectHit = 36;
m_lateHit = 2;
m_earlyHit = 71;
m_hitLimit = m_earlyHit - m_lateHit;
m_trackHeight = 550;
}
function mergeScore(p) {
switch (idol.Arrow.getArrowTypeByScore(p)) {
case 4 :
m_combinedHitScore = m_combinedHitScore + HIT_SCORE_PERFECT;
break;
case 3 :
m_combinedHitScore = m_combinedHitScore + HIT_SCORE_GOOD;
break;
case 2 :
m_combinedHitScore = m_combinedHitScore + HIT_SCORE_AVERAGE;
break;
case 1 :
m_combinedHitScore = m_combinedHitScore + HIT_SCORE_WEAK;
break;
case 5 :
m_combinedHitScore = m_combinedHitScore + HIT_SCORE_MISSED;
}
m_combinedHitScore = Math.max(-20, Math.min(20, m_combinedHitScore));
}
function init(tick) {
m_record = false;
var _local3 = tick + ",1,p=0";
m_viralRecord = [_local3];
}
function update(tick) {
m_tick = tick;
m_pointsAcquired = 0;
var _local3 = "";
var _local4 = 0;
for ( ; _local4 < m_keystate.length ; _local4++) {
if (_local3.length > 0) {
_local3 = _local3 + " ";
}
_local3 = _local3 + m_keystate[_local4].serialize();
}
var _local5 = 1 - ((m_songLength - m_songPosMs) / m_songLength);
m_percent = Math.min(1, Math.max(0, _local5 - 0.12));
m_fretOffset = 1 + int(m_fretLength * _local5);
var _local6 = false;
for (var i in m_bkgRows) {
var _local7 = idol.BackgroundRow(m_bkgRows[i]);
if ((!m_startPlaying) && (_local7.m_moves == (m_travelTicks - 1))) {
_local6 = true;
}
if (_local7.m_y < -50) {
_local7.destroy();
_local7.removeMovieClip();
delete m_bkgRows[i];
continue;
}
_local7.update();
}
var _local8 = [];
var _local9 = [];
var _local10 = m_objs.size();
while (_local10--) {
var _local11 = idol.RenderObj(m_objs.get(_local10));
if (_local11.m_removeAt == tick) {
_local9.push(_local11);
_local11.destroy();
continue;
}
var _local12 = _local11.m_y;
if (_local11.m_isLongEnd) {
if (m_triggedFrets[_local11.m_id] == 2) {
_local11.m_alpha = 50;
}
}
if (idol.ColorBar(_local11) != null) {
if (m_triggedFrets[_local11.m_id] == 2) {
_local11.m_alpha = 50;
}
if (_local12 <= 112) {
var _local13 = idol.ColorBar(_local11);
var _local14 = m_heldNotes[_local13.m_arrowNum];
if (!_local13.m_isTriggered) {
_local13.m_isTriggered = (_local14 != null) && (_local14.m_isLongStart);
}
}
}
if (_local11.m_removeAt != -1) {
continue;
}
if ((_local12 < m_lateHit) && (idol.Arrow(_local11) != null)) {
m_playedNotes[_local11.m_id] = 1;
}
if ((_local12 >= m_lateHit) && (_local12 < m_earlyHit)) {
if (idol.Arrow(_local11) != null) {
if (m_triggedFrets[_local11.m_id] != 2) {
_local8.push(_local11);
}
}
if (idol.ColorBar(_local11) != null) {
if (m_triggedFrets[_local11.m_id] != 2) {
var _local15 = m_runningNotes[_local11.m_arrowNum];
if (_local15 && ((_local15.m_hitAt != -1) && (m_triggedFrets[_local11.m_id] == 1))) {
_local11.destroy();
_local9.push(_local11);
} else {
_local8.push(_local11);
}
}
}
if (_local11.m_isLongStart) {
m_runningNotes[_local11.m_arrowNum] = _local11;
}
if (_local11.m_isLongEnd) {
var _local16 = _local11.m_arrowNum;
m_heldNotes[_local16] = null;
m_runningNotes[_local16] = null;
}
}
if (_local12 < -50) {
mergeScore(-2);
modifyScore(-25);
m_perfectStreak = 0;
_local9.push(_local11);
if (!_local11.m_isLongStart) {
_local11.destroy();
}
continue;
}
_local11.update();
}
for (var i in _local9) {
var _local17 = idol.RenderObj(_local9[i]);
m_objs.remove(_local17);
if (_local17.m_destroy) {
_local17.removeMovieClip();
}
}
for (var i in m_anim) {
if (!m_anim[i].isRunning()) {
m_anim[i]._visible = false;
delete m_anim[i];
}
}
if (!m_songEnded) {
checkHit(_local8);
}
if ((m_fretOffsetPrev != m_fretOffset) && (m_songPosMs < m_songLength)) {
m_fretOffsetPrev = m_fretOffset;
insertNewRow();
}
if (_local6 && (!m_startPlaying)) {
m_startPlaying = true;
m_playCtrlFn(true);
}
if (m_startPlaying && (m_endSong == m_tick)) {
var _local18 = 4;
while (_local18--) {
if (m_runningNotes[_local18]) {
m_runningNotes[_local18].removeMovieClip();
}
m_runningNotes[_local18] = null;
if (m_heldNotes[_local18]) {
m_heldNotes[_local18].removeMovieClip();
}
m_heldNotes[_local18] = null;
m_arrowIndicator[_local18]._visible = false;
}
m_songEnded = true;
m_playCtrlFn(false);
}
if ((m_fretLength + 1) == m_fretOffset) {
m_endSong = (m_tick + int(m_trackHeight / m_speed)) + 1;
}
m_songPosMs = m_songPosMs + m_millisPerTick;
_local5 = 0;
for (var i in m_playedNotes) {
_local5++;
}
m_notesPlayed = _local5;
if (m_notesPlayed > 0) {
var _local19 = m_combinedHitScore;
if (_local19 > 15) {
_local19 = 15;
}
if (_local19 < -15) {
_local19 = -15;
}
_local19 = _local19 + 15;
m_grade = int(10 * (_local19 / 30));
}
if (m_record && (m_lastReportedState != _local3)) {
m_lastReportedState = _local3;
var _local20 = (((tick + ",2,") + _local3) + ",p=") + m_pointsAcquired;
m_viralRecord.push(_local20);
}
}
function getRecordData() {
return(m_viralRecord);
}
function enableViralRecord(enable) {
m_record = enable;
}
function checkHit(currentObj) {
var _local3 = 0;
var _local4 = 0;
var _local5 = 0;
var _local6 = 0;
var _local7 = 0;
var _local8 = currentObj.length;
var _local9 = 0;
for ( ; _local9 < m_keystate.length ; _local9++) {
var _local10 = idol.KeyState(m_keystate[_local9]);
if (_local10.isReleased()) {
var _local11 = 0;
for ( ; _local11 < _local8 ; _local11++) {
var _local12 = idol.RenderObj(currentObj[_local11]);
var _local13 = _local12.m_arrowNum;
var _local14 = m_runningNotes[_local13];
var _local15 = null;
if (_local14 != null) {
_local15 = _local14.m_id;
}
if (_local13 == _local10.m_keyIndex) {
if (_local10.m_isTickReleased && (_local12.m_isLongEnd && (m_triggedFrets[_local15] == 1))) {
_local7++;
var _local16 = (_local12.m_y + m_speed) - (_local10.m_releaseAlpha * m_speed);
var _local17 = Math.abs(_local16 - m_perfectHit);
var _local18 = (m_hitLimit - _local17) / m_hitLimit;
_local12.hitNote(-1, m_tick);
mergeScore(idol.Arrow.getArrowTypeByScore(_local18));
var _local19 = "@" + m_fretOffset;
var _local20 = m_overParent.getNextHighestDepth();
var _local21 = (_local19 + _local20) + "_";
var _local22 = m_overParent.attachMovie("arrow", _local21, _local20);
_local22.init(_local12.m_x - 10, _local12.m_y - 18, m_speed, _local12.m_arrowNum);
_local22.setPosition(_local12.m_x - 10, 36.5);
_local22.m_id = (_local12.m_arrowNum + "@") + m_fretOffset;
_local22.m_hitScore = _local18;
_local22.m_removeAt = int(m_tick + ((1000 / m_millisPerTick) * 0.5));
_local22.hitNote(_local18, m_tick);
m_objs.insert(_local22);
_local6 = _local6 + _local18;
if (_local18 >= 0.95) {
m_perfectStreak++;
var _local23 = "long_sparkle_" + (_local13 + 1);
var _local24 = m_statusBar[_local23];
_local24.playOnce();
_local24.swapDepths(m_statusBar.getNextHighestDepth());
_local24._visible = true;
m_anim[_local23] = _local24;
} else {
m_perfectStreak = 0;
}
if (!m_playedNotes[_local12.m_id]) {
m_notesNailed++;
m_playedNotes[_local12.m_id] = 1;
}
}
if (_local12.m_hitAt != -1) {
if (_local15) {
m_triggedFrets[_local15] = 2;
}
m_heldNotes[_local13] = null;
m_runningNotes[_local13] = null;
m_objs.remove(_local12);
_local12.destroy();
_local12.removeMovieClip();
}
}
}
m_arrowIndicator[_local10.m_keyIndex]._visible = false;
_local10.m_isTickReleased = false;
_local10.m_releaseAlpha = 0;
}
if (_local10.isDown()) {
var _local25 = 0;
for ( ; _local25 < _local8 ; _local25++) {
var _local26 = idol.RenderObj(currentObj[_local25]);
var _local27 = _local26.m_arrowNum;
var _local28 = m_runningNotes[_local27].m_id;
if (_local27 == _local10.m_keyIndex) {
if (_local26.m_isLong) {
var _local29 = m_heldNotes[_local27];
if (_local29.m_hitAt == -1) {
var _local30 = m_runningNotes[_local27];
_local30.hitNote(0, m_tick);
mergeScore(0);
if (m_objs.indexOf(_local30) == -1) {
m_objs.insert(_local30);
}
m_heldNotes[_local27] = _local30;
m_triggedFrets[_local28] = 1;
if (!m_playedNotes[_local28]) {
m_notesNailed++;
m_playedNotes[_local28] = 1;
}
}
}
}
}
}
if (_local10.isTap()) {
_local5++;
var _local31 = false;
var _local32 = 0;
for ( ; _local32 < _local8 ; _local32++) {
var _local33 = idol.RenderObj(currentObj[_local32]);
if (_local33.m_arrowNum == _local10.m_keyIndex) {
for ( ; _local33.m_isLongEnd ; _local32++) {
modifyScore(-25);
mergeScore(-2);
}
var _local34 = (_local33.m_y + m_speed) - (_local10.m_pressedAlpha * m_speed);
var _local35 = Math.abs(_local34 - m_perfectHit);
var _local36 = (m_hitLimit - _local35) / m_hitLimit;
if (_local36 >= 0.95) {
m_perfectStreak++;
var _local37 = "long_sparkle_" + (_local33.m_arrowNum + 1);
var _local38 = m_statusBar[_local37];
_local38.playOnce();
_local38.swapDepths(m_statusBar.getNextHighestDepth());
_local38._visible = true;
m_anim[_local37] = _local38;
} else {
m_perfectStreak = 0;
}
_local33.hitNote(_local36, m_tick);
mergeScore(idol.Arrow.getArrowTypeByScore(_local36));
m_heldNotes[_local33.m_arrowNum] = _local33;
_local4 = _local4 + _local36;
_local3++;
if (!m_playedNotes[_local33.m_id]) {
m_notesNailed++;
m_playedNotes[_local33.m_id] = 1;
}
_local31 = true;
}
}
if (!_local31) {
var _local39 = _local10.m_keyIndex;
modifyScore(-25);
mergeScore(-2);
m_perfectStreak = 0;
m_arrowIndicator[_local39]._visible = true;
}
_local10.m_isTickTap = false;
_local10.m_pressedAlpha = 0;
}
}
var _local40 = (m_tick % 4) == 0;
var _local41 = 0;
for ( ; _local41 < m_heldNotes.length ; _local41++) {
if ((m_heldNotes[_local41] != null) && (m_heldNotes[_local41].m_isLongStart)) {
if (_local40) {
var _local42 = "short_sparkle_" + (_local41 + 1);
var _local43 = m_statusBar[_local42];
_local43.playOnce();
_local43.swapDepths(m_statusBar.getNextHighestDepth());
_local43._visible = true;
m_anim[_local42] = _local43;
}
}
}
if (_local6 != 0) {
var _local44 = int(_local6 * 100);
modifyScore(_local44);
}
if (_local8 > 0) {
var _local45 = int(_local4 * 100) + int(_local6 * 100);
if (_local45 != 0) {
modifyScore(_local45);
}
}
}
function modifyScore(amount) {
m_pointsAcquired = m_pointsAcquired + amount;
m_score = m_score + amount;
if (m_score < 0) {
m_score = 0;
}
}
function insertNewRow() {
var _local2 = getNextHighestDepth();
var _local3 = attachMovie("background_row", "br" + _local2, _local2);
var _local4 = getBottomMostRow();
var _local5 = m_trackHeight;
if (_local4 != null) {
_local5 = _local4.m_y + 50;
}
_local3.init(23, _local5, m_speed);
var _local6 = "@" + m_fretOffset;
m_bkgRows[_local6] = _local3;
var _local7 = m_frets[_local6];
if (!_local7) {
_local7 = new Object();
_local7.tapA = false;
_local7.tapB = false;
_local7.tapC = false;
_local7.tapD = false;
_local7.longA = false;
_local7.longB = false;
_local7.longC = false;
_local7.longD = false;
}
_local5 = _local5 - 50;
var _local10 = 0;
var _local11 = _local6 + "_";
var _local12 = (!_local7.longA) && (m_isLongA);
if (_local7.tapA || (_local12)) {
m_isLongA = false;
m_longALength = 0;
var _local8 = m_overParent.getNextHighestDepth();
var _local9 = m_overParent.attachMovie("arrow", _local11 + _local8, _local8);
_local9.init(23, _local5, m_speed, 0);
_local9.m_isLongEnd = _local12;
_local9.m_isLongStart = _local7.longA;
_local9.m_id = "0@" + m_fretOffset;
m_objs.insert(_local9);
if (_local7.longA) {
m_longNotes[0] = _local9;
}
if (_local12) {
_local9.m_id = m_longNotes[0].m_id;
m_longNotes[0] = null;
} else {
m_triggedFrets[_local9.m_id] = 1;
}
}
_local12 = (!_local7.longB) && (m_isLongB);
if (_local7.tapB || (_local12)) {
m_isLongB = false;
m_longBLength = 0;
var _local8 = m_overParent.getNextHighestDepth();
var _local9 = m_overParent.attachMovie("arrow", _local11 + _local8, _local8);
_local9.init(23 + 50, _local5, m_speed, 1);
_local9.m_isLongEnd = _local12;
_local9.m_isLongStart = _local7.longB;
_local9.m_id = "1@" + m_fretOffset;
m_objs.insert(_local9);
if (_local7.longB) {
m_longNotes[1] = _local9;
}
if (_local12) {
_local9.m_id = m_longNotes[1].m_id;
m_longNotes[1] = null;
} else {
m_triggedFrets[_local9.m_id] = 1;
}
}
_local12 = (!_local7.longC) && (m_isLongC);
if (_local7.tapC || (_local12)) {
m_isLongC = false;
m_longCLength = 0;
var _local8 = m_overParent.getNextHighestDepth();
var _local9 = m_overParent.attachMovie("arrow", _local11 + _local8, _local8);
_local9.init(23 + (50 * 2), _local5, m_speed, 2);
_local9.m_isLongEnd = _local12;
_local9.m_isLongStart = _local7.longC;
_local9.m_id = "2@" + m_fretOffset;
m_objs.insert(_local9);
if (_local7.longC) {
m_longNotes[2] = _local9;
}
if (_local12) {
_local9.m_id = m_longNotes[2].m_id;
m_longNotes[2] = null;
} else {
m_triggedFrets[_local9.m_id] = 1;
}
}
_local12 = (!_local7.longD) && (m_isLongD);
if (_local7.tapD || (_local12)) {
m_isLongD = false;
m_longDLength = 0;
var _local8 = m_overParent.getNextHighestDepth();
var _local9 = m_overParent.attachMovie("arrow", _local11 + _local8, _local8);
_local9.init(23 + (50 * 3), _local5, m_speed, 3);
_local9.m_isLongEnd = _local12;
_local9.m_isLongStart = _local7.longD;
_local9.m_id = "3@" + m_fretOffset;
m_objs.insert(_local9);
if (_local7.longD) {
m_longNotes[3] = _local9;
}
if (_local12) {
_local9.m_id = m_longNotes[3].m_id;
m_longNotes[3] = null;
} else {
m_triggedFrets[_local9.m_id] = 1;
}
}
if (_local7.longA) {
m_isLongA = true;
m_longALength++;
var _local8 = m_underParent.getNextHighestDepth();
var _local13 = (_local11 + "l") + _local8;
var _local9 = m_underParent.attachMovie("color_bars", _local13, _local8);
_local9.init(23, _local5, m_speed, m_longALength, 0);
_local9.m_isLong = true;
_local9.m_id = m_longNotes[0].m_id;
m_objs.insert(_local9);
}
if (_local7.longB) {
m_longBLength++;
m_isLongB = true;
var _local8 = m_underParent.getNextHighestDepth();
var _local14 = (_local11 + "l") + _local8;
var _local9 = m_underParent.attachMovie("color_bars", _local14, _local8);
_local9.init(23 + 50, _local5, m_speed, m_longBLength, 1);
_local9.m_isLong = true;
_local9.m_id = m_longNotes[1].m_id;
m_objs.insert(_local9);
}
if (_local7.longC) {
m_longCLength++;
m_isLongC = true;
var _local8 = m_underParent.getNextHighestDepth();
var _local15 = (_local11 + "l") + _local8;
var _local9 = m_underParent.attachMovie("color_bars", _local15, _local8);
_local9.init(23 + (50 * 2), _local5, m_speed, m_longCLength, 2);
_local9.m_isLong = true;
_local9.m_id = m_longNotes[2].m_id;
m_objs.insert(_local9);
}
if (_local7.longD) {
m_longDLength++;
m_isLongD = true;
var _local8 = m_underParent.getNextHighestDepth();
var _local16 = (_local11 + "l") + _local8;
var _local9 = m_underParent.attachMovie("color_bars", _local16, _local8);
_local9.init(23 + (50 * 3), _local5, m_speed, m_longDLength, 3);
_local9.m_isLong = true;
_local9.m_id = m_longNotes[3].m_id;
m_objs.insert(_local9);
}
}
function render(alpha, readInput) {
if (readInput && (m_startPlaying && (!m_songEnded))) {
var _local4 = 1 + m_tick;
var _local5 = 0;
for ( ; _local5 < m_keystate.length ; _local5++) {
m_keystate[_local5].update(_local4, alpha);
}
}
for (var i in m_bkgRows) {
m_bkgRows[i].render();
}
var _local6 = m_objs.iterator;
while (_local6.hasNext()) {
_local6.next().render();
}
}
function getBottomMostRow() {
var _local2 = 0;
var _local3 = null;
for (var i in m_bkgRows) {
var _local4 = idol.BackgroundRow(m_bkgRows[i]);
if (_local4.m_y > _local2) {
_local2 = _local4.m_y;
_local3 = _local4;
}
}
return(_local3);
}
function setPlayControlFn(fn) {
m_playCtrlFn = fn;
}
function setParents(over, under, statusBar) {
m_statusBar = statusBar;
m_overParent = over;
m_arrowIndicator = [];
var _local5 = m_overParent.attachMovie("arrow_indicator_container", "arr_ind_1", m_overParent.getNextHighestDepth());
_local5._x = 33;
_local5._y = 36.5;
_local5.inner.gotoAndStop(5);
_local5._visible = false;
m_arrowIndicator.push(_local5);
_local5 = m_overParent.attachMovie("arrow_indicator_container", "arr_ind_2", m_overParent.getNextHighestDepth());
_local5._x = 33 + 50;
_local5._y = 36.5;
_local5.inner.gotoAndStop(10);
_local5._visible = false;
m_arrowIndicator.push(_local5);
_local5 = m_overParent.attachMovie("arrow_indicator_container", "arr_ind_3", m_overParent.getNextHighestDepth());
_local5._x = 33 + (50 * 2);
_local5._y = 36.5;
_local5.inner.gotoAndStop(15);
_local5._visible = false;
m_arrowIndicator.push(_local5);
_local5 = m_overParent.attachMovie("arrow_indicator_container", "arr_ind_4", m_overParent.getNextHighestDepth());
_local5._x = 33 + (50 * 3);
_local5._y = 36.5;
_local5.inner.gotoAndStop(20);
_local5._visible = false;
m_arrowIndicator.push(_local5);
m_underParent = this;
}
function setSongData(fret, lengthMs, bpm, millisPerTick) {
m_bpm = bpm;
m_frets = fret;
m_songLength = lengthMs;
m_songPosMs = 0;
m_millisPerTick = millisPerTick;
m_fretOffset = 0;
var _local6 = m_songLength / 60000;
m_fretLength = int((_local6 * m_bpm) * 2);
m_timePerFret = m_songLength / m_fretLength;
m_speed = (m_fretLength * 50) / (m_songLength / m_millisPerTick);
m_travelTicks = int(Math.ceil((m_trackHeight - 84) / m_speed));
}
function getKeyState() {
return(m_keystate);
}
static var HIT_SCORE_PERFECT = 2;
static var HIT_SCORE_GOOD = 1;
static var HIT_SCORE_AVERAGE = 0;
static var HIT_SCORE_WEAK = -1;
static var HIT_SCORE_MISSED = -2;
}
Symbol 780 MovieClip [__Packages.com.midasplayer.util.ArrayList] Frame 0
class com.midasplayer.util.ArrayList
{
var value;
function ArrayList (ar) {
if (ar == undefined) {
value = new Array();
} else {
value = ar;
}
}
function insert(obj, pos) {
var _local4 = value.length;
if ((pos == undefined) || (pos >= _local4)) {
value.push(obj);
return(_local4);
}
value.splice(pos, 0, obj);
return(pos);
}
function get(pos) {
return(value[pos]);
}
function set(pos, o) {
value[pos] = o;
}
function indexOf(obj) {
var _local3 = 0;
var _local4 = value.length;
for ( ; _local3 < _local4 ; _local3++) {
if (obj == value[_local3]) {
return(_local3);
}
}
return(-1);
}
function remove(obj) {
return(removeByIndex(indexOf(obj)));
}
function removeByIndex(pos) {
var _local3;
var _local4 = value.length;
if ((pos < _local4) && (pos >= 0)) {
_local3 = value[pos];
value.splice(pos, 1);
}
return(_local3);
}
function size() {
return(value.length);
}
function clear() {
value = new Array();
}
function toArray() {
return(value);
}
function foreach(fn) {
var _local3 = 0;
var _local4 = value.length;
// unexpected jump
do {
_local3++;
if (_local3 >= _local4) {
break;
}
} while (fn(_local3, value[_local3]) != false);
}
function sortOn(field) {
value.sortOn(field);
}
function sort() {
value.sort();
}
function get iterator() {
return(new com.midasplayer.util.ArrayListIterator(this));
}
function get dump() {
var _local2 = "";
var _local3 = 0;
for ( ; _local3 < value.length ; _local3++) {
_local2 = _local2 + (((_local3 + " : ") + value[_local3]) + newline);
}
return(_local2);
}
function subList(from, to) {
if ((to > value.length) || (!to)) {
to = value.length;
}
var _local4 = value.slice(from, to);
var _local5 = new com.midasplayer.util.ArrayList(_local4);
return(_local5);
}
}
Symbol 781 MovieClip [__Packages.com.midasplayer.util.ArrayListIterator] Frame 0
class com.midasplayer.util.ArrayListIterator implements com.midasplayer.util.Iterator
{
var ptr, list, sz;
function ArrayListIterator (list) {
ptr = 0;
this.list = list;
sz = list.size();
}
function next() {
var _local2;
if (ptr < sz) {
_local2 = list.get(ptr);
ptr++;
}
return(_local2);
}
function hasNext() {
return(ptr < sz);
}
function remove() {
if (ptr == 0) {
return(undefined);
}
list.removeByIndex(ptr - 1);
}
}
Symbol 782 MovieClip [__Packages.idol.RenderObj] Frame 0
class idol.RenderObj extends MovieClip
{
var m_hitScore, m_removeAt, m_id, m_alpha, m_arrowNum, m_hitAt, m_destroy, m_isLongStart, m_isLongEnd, m_isLong, m_fx, m_fy, m_x, m_y;
function RenderObj () {
super();
m_hitScore = 0;
m_removeAt = -1;
m_id = "";
m_alpha = 100;
m_arrowNum = -1;
m_hitAt = -1;
m_destroy = false;
m_isLongStart = false;
m_isLongEnd = false;
m_isLong = false;
m_fx = new com.midasplayer.timing.IFloat();
m_fy = new com.midasplayer.timing.IFloat();
}
function setPosition(x, y) {
m_x = x;
m_y = y;
}
function hitNote(score, tick) {
}
function destroy() {
m_destroy = true;
}
function render() {
}
function update() {
}
}
Symbol 783 MovieClip [__Packages.idol.Arrow] Frame 0
class idol.Arrow extends idol.RenderObj
{
var m_arrowNum, m_fr, gotoAndStop, m_speed, m_x, m_fx, m_y, m_fy, _x, _y, cacheAsBitmap, attachMovie, m_hitAt, _alpha, m_alpha;
function Arrow () {
super();
}
function init(x, y, sp, num) {
m_arrowNum = num;
var _local6 = x + 10;
var _local7 = y + 18;
m_fr = (num * 2) + 1;
gotoAndStop(m_fr);
m_speed = sp;
m_x = _local6;
m_fx.value = _local6;
m_y = _local7;
m_fy.value = _local7;
_x = _local6;
_y = _local7;
cacheAsBitmap = true;
}
static function getArrowTypeByScore(score) {
var _local3 = -1;
if (score < 0) {
_local3 = 5;
} else if ((score >= 0) && (score < 0.66)) {
_local3 = 1;
} else if (score < 0.8) {
_local3 = 2;
} else if (score < 0.95) {
_local3 = 3;
} else {
_local3 = 4;
}
return(_local3);
}
function hitNote(score, tick) {
gotoAndStop(++m_fr);
var _local4 = attachMovie("arrow_indicator_container", "ind", 1);
var _local5 = getArrowTypeByScore(score);
m_hitAt = tick;
m_y = 36.5;
m_fy.set(m_y);
_local4.inner.gotoAndStop((m_arrowNum * 5) + _local5);
_local4._x = 0;
_local4._y = 0;
}
function render() {
_y = int(m_fy.value);
_alpha = m_alpha;
}
function update() {
if (m_hitAt < 0) {
m_y = m_y - m_speed;
}
m_fy.set(m_y);
}
}
Symbol 784 MovieClip [__Packages.idol.KeyState] Frame 0
class idol.KeyState
{
var m_keyIndex, m_isTickReleased, m_key, m_isDown, m_isTickTap, m_pressedTick, m_pressedAlpha, m_releaseAlpha;
function KeyState (keyIndex, keyCode) {
m_keyIndex = keyIndex;
m_isTickReleased = false;
m_key = keyCode;
}
function isReleased() {
return(!m_isDown);
}
function wasReleased() {
return(m_isTickReleased);
}
function isDown() {
return(m_isDown);
}
function isTap() {
return(m_isTickTap);
}
function setData(tick, bits, alpha) {
m_isDown = (bits & 1) != 0;
m_isTickTap = (bits & 2) != 0;
m_isTickReleased = (bits & 4) != 0;
if (bits != 0) {
if (m_isTickTap) {
m_pressedTick = tick;
}
if (m_isDown) {
m_pressedAlpha = alpha;
} else {
m_releaseAlpha = alpha;
}
}
}
function serialize() {
var _local2 = 0;
_local2 = _local2 | (m_isDown ? 1 : 0);
_local2 = _local2 | (m_isTickTap ? 2 : 0);
_local2 = _local2 | (m_isTickReleased ? 4 : 0);
if (_local2 != 0) {
var _local3 = "" + _local2;
if (m_isDown) {
_local3 = _local3 + (":" + com.midasplayer.util.FloatEncoder.encodeBits(m_pressedAlpha));
} else {
_local3 = _local3 + (":" + com.midasplayer.util.FloatEncoder.encodeBits(m_releaseAlpha));
}
return(_local3);
}
return("" + _local2);
}
function update(tick, alpha) {
if (Key.isDown(m_key) && (!m_isDown)) {
m_isDown = true;
m_pressedTick = tick;
m_pressedAlpha = alpha;
m_isTickTap = true;
m_isTickReleased = false;
}
if ((!Key.isDown(m_key)) && (m_isDown)) {
m_isDown = false;
m_isTickTap = false;
m_isTickReleased = true;
m_releaseAlpha = alpha;
}
}
}
Symbol 785 MovieClip [__Packages.com.midasplayer.util.FloatEncoder] Frame 0
class com.midasplayer.util.FloatEncoder
{
function FloatEncoder () {
}
static function encodeBits(val) {
var _local3 = val < 0;
if (_local3) {
val = -val;
}
var _local4 = 0;
while (val > 1) {
val = val / 2;
_local4++;
}
if (_local3) {
_local4 = (-_local4) - 1;
}
var _local5 = _local4 + ".";
do {
var _local6 = 0;
var _local7 = 0;
for ( ; _local7 < 6 ; _local7++) {
if (val >= 1) {
val = val - 1;
_local6 = _local6 | (1 << _local7);
}
val = val * 2;
}
_local5 = _local5 + BASE_64_CHARS.charAt(_local6);
} while (val > 0);
return(_local5);
}
static function decodeBits(encodedData) {
var _local3 = encodedData.split(".");
var _local4 = _global.parseInt(_local3[0]);
var _local5 = _local4 < 0;
var _local6 = _local3[1];
var _local7 = 0;
if (_local5) {
_local4 = (-_local4) - 1;
}
var _local8 = 0;
for ( ; _local8 < _local6.length ; _local8++) {
_local3 = _local6.charAt((_local6.length - _local8) - 1);
var _local9 = BASE_64_CHARS.indexOf(_local3);
var _local10 = 0;
for ( ; _local10 < 6 ; _local10++) {
_local7 = _local7 / 2;
if (((_local9 >> (5 - _local10)) & 1) > 0) {
_local7 = _local7 + 1;
}
}
}
var _local11 = 0;
for ( ; _local11 < _local4 ; _local11++) {
_local7 = _local7 * 2;
}
if (_local5) {
_local7 = -_local7;
}
return(_local7);
}
static var BASE_64_CHARS = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ()";
}
Symbol 786 MovieClip [__Packages.idol.BackgroundRow] Frame 0
class idol.BackgroundRow extends idol.RenderObj
{
var m_moves, m_speed, m_x, m_fx, m_y, m_fy, _x, _y, cacheAsBitmap;
function BackgroundRow () {
super();
m_moves = 0;
}
function init(x, y, sp) {
m_speed = sp;
m_x = x;
m_fx.value = m_x;
m_y = y;
m_fy.value = m_y;
_x = x;
_y = y;
cacheAsBitmap = true;
}
function render() {
_y = int(m_fy.value);
}
function update() {
m_moves++;
m_y = m_y - m_speed;
m_fy.set(m_y);
}
}
Symbol 787 MovieClip [__Packages.idol.ColorBar] Frame 0
class idol.ColorBar extends idol.RenderObj
{
var m_isTriggered, m_runCount, m_ry, m_arrowNum, gotoAndStop, m_speed, m_x, m_fx, m_y, m_fy, _x, _y, scrollRect, cacheAsBitmap, _alpha, m_alpha;
function ColorBar () {
super();
m_isTriggered = false;
m_runCount = 0;
}
function init(x, y, sp, runCount, num) {
m_runCount = runCount;
m_ry = 50 * Math.min(3, m_runCount - 1);
m_arrowNum = num;
var _local7 = x - 12;
var _local8 = y + 44;
gotoAndStop(num + 1);
m_speed = sp;
m_x = _local7;
m_fx.value = _local7;
m_y = _local8;
m_fy.value = _local8;
_x = _local7;
_y = _local8;
scrollRect = new flash.geom.Rectangle(0, m_ry, 60, 50);
cacheAsBitmap = true;
}
function render() {
_alpha = m_alpha;
var _local2 = int(m_fy.value);
if (m_isTriggered) {
var _local3 = 112;
if (_local2 < _local3) {
var _local4 = int(Math.max(0, 50 - (_local3 - _local2)));
scrollRect = new flash.geom.Rectangle(0, m_ry + (50 - _local4), 60, _local4);
_y = _local3;
} else {
_y = _local2;
}
} else {
_y = _local2;
}
}
function update() {
m_y = m_y - m_speed;
m_fy.set(m_y);
}
}
Symbol 788 MovieClip [__Packages.idol.Song] Frame 0
class idol.Song
{
var m_frets, m_bpm, m_rng, m_divider, m_longNote, m_newLongNote, m_extraNote, m_newNote, m_songLengthMs, m_noteCount, m_scorePerNote, m_maxScore;
function Song (rng, songLengthMs, bpm, divider, longNote, newLongNote, extraNote, newNote) {
m_frets = {};
m_bpm = bpm;
m_rng = rng;
m_divider = divider;
m_longNote = longNote;
m_newLongNote = newLongNote;
m_extraNote = extraNote;
m_newNote = newNote;
m_songLengthMs = songLengthMs;
m_noteCount = 0;
m_scorePerNote = 100;
}
function getFrets() {
return(m_frets);
}
function getMaxScore() {
return(m_maxScore);
}
function generate() {
m_maxScore = 0;
var _local2 = m_songLengthMs / 60000;
var _local3 = int((_local2 * m_bpm) * 2);
var _local4 = [0, 0, 0, 0];
var _local5 = -1;
var _local6 = 1;
for ( ; _local6 < _local3 ; _local6++) {
var _local7 = new Object();
_local7.tapA = false;
_local7.tapB = false;
_local7.tapC = false;
_local7.tapD = false;
_local7.longA = false;
_local7.longB = false;
_local7.longC = false;
_local7.longD = false;
if (_local4[0] > 0) {
if (_local4[0] > 2) {
_local7.longA = true;
} else {
m_maxScore = m_maxScore + m_scorePerNote;
_local5 = Math.max(_local6, _local5);
}
_local4[0]--;
}
if (_local4[1] > 0) {
if (_local4[1] > 2) {
_local7.longB = true;
} else {
m_maxScore = m_maxScore + m_scorePerNote;
_local5 = Math.max(_local6, _local5);
}
_local4[1]--;
}
if (_local4[2] > 0) {
if (_local4[2] > 2) {
_local7.longC = true;
} else {
m_maxScore = m_maxScore + m_scorePerNote;
_local5 = Math.max(_local6, _local5);
}
_local4[2]--;
}
if (_local4[3] > 0) {
if (_local4[3] > 2) {
_local7.longD = true;
} else {
m_maxScore = m_maxScore + m_scorePerNote;
_local5 = Math.max(_local6, _local5);
}
_local4[3]--;
}
if ((_local6 > (_local5 + 4)) && (((_local6 % m_divider) == 0) && (m_rng.nextInt(100) >= m_newLongNote))) {
var _local8 = 0;
if (_local7.longA) {
_local8++;
}
if (_local7.longB) {
_local8++;
}
if (_local7.longC) {
_local8++;
}
if (_local7.longD) {
_local8++;
}
if ((_local8 < 2) && ((!_local7.longA) && ((_local4[0] == 0) && (m_rng.nextInt(100) > m_longNote)))) {
_local4[0] = m_rng.nextInt(5) + 3;
_local7.tapA = true;
_local7.longA = true;
m_maxScore = m_maxScore + m_scorePerNote;
_local8++;
}
if ((_local8 < 2) && ((!_local7.longB) && ((_local4[1] == 0) && (m_rng.nextInt(100) > m_longNote)))) {
_local4[1] = m_rng.nextInt(5) + 3;
_local7.tapB = true;
_local7.longB = true;
m_maxScore = m_maxScore + m_scorePerNote;
_local8++;
}
if ((_local8 < 2) && ((!_local7.longC) && ((_local4[2] == 0) && (m_rng.nextInt(100) > m_longNote)))) {
_local4[2] = m_rng.nextInt(5) + 3;
_local7.tapC = true;
_local7.longC = true;
m_maxScore = m_maxScore + m_scorePerNote;
_local8++;
}
if ((_local8 < 2) && ((!_local7.longD) && ((_local4[3] == 0) && (m_rng.nextInt(100) > m_longNote)))) {
_local4[3] = m_rng.nextInt(5) + 3;
_local7.tapD = true;
_local7.longD = true;
m_maxScore = m_maxScore + m_scorePerNote;
_local8++;
}
}
m_frets["@" + _local6] = _local7;
}
var _local9 = 1;
for ( ; _local9 < _local3 ; _local9++) {
var _local10 = m_frets["@" + _local9];
if (((_local9 % m_divider) == 0) || (m_rng.nextInt(100) >= m_extraNote)) {
var _local11 = 0;
if (_local10.tapA || (_local10.longA)) {
_local11++;
}
if (_local10.tapB || (_local10.longB)) {
_local11++;
}
if (_local10.tapC || (_local10.longC)) {
_local11++;
}
if (_local10.tapD || (_local10.longD)) {
_local11++;
}
if ((_local11 < 2) && ((!_local10.longB) && (m_rng.nextInt(100) > m_newNote))) {
_local11++;
m_maxScore = m_maxScore + m_scorePerNote;
_local10.tapB = true;
}
if ((_local11 < 2) && ((!_local10.longC) && (m_rng.nextInt(100) > m_newNote))) {
_local11++;
m_maxScore = m_maxScore + m_scorePerNote;
_local10.tapC = true;
}
if ((_local11 < 2) && ((!_local10.longA) && (m_rng.nextInt(100) > m_newNote))) {
_local11++;
m_maxScore = m_maxScore + m_scorePerNote;
_local10.tapA = true;
}
if ((_local11 < 2) && ((!_local10.longD) && (m_rng.nextInt(100) > m_newNote))) {
_local11++;
m_maxScore = m_maxScore + m_scorePerNote;
_local10.tapD = true;
}
if (_local10.tapA || (_local10.tapB || (_local10.tapC || (_local10.tapD)))) {
m_noteCount++;
}
}
}
}
}
Symbol 789 MovieClip [__Packages.com.midasplayer.util.EaseInQuadAnimator] Frame 0
class com.midasplayer.util.EaseInQuadAnimator extends com.midasplayer.util.Animator
{
var dt, duration, x, startX, dx, y, startY, dy, fillBaseCopy;
function EaseInQuadAnimator (o) {
super(o);
}
function nextPosition() {
var _local2 = dt * dt;
var _local3 = duration * duration;
x = ((dx * _local2) / _local3) + startX;
y = ((dy * _local2) / _local3) + startY;
}
function makeCopy(t) {
var _local3 = new com.midasplayer.util.EaseInQuadAnimator();
fillBaseCopy(t, _local3);
return(_local3);
}
}
Symbol 790 MovieClip [__Packages.idol.StateReplayGame] Frame 0
class idol.StateReplayGame extends idol.StateGame
{
var m_tickOffset, m_recPtr, m_tracksInited, m_keyBits, m_keyAlpha, m_tick, m_data, m_tracks, m_initState, runState11, runState10, runState9, runState8, runState7, runState6, runState5, runState4, runState3, runState2, runState1, m_avatar, runAlways;
function StateReplayGame (a1, a2, a3, a4, a5) {
super(a1, a2, a3, a4, a5);
m_tickOffset = 0;
m_recPtr = 2;
m_tracksInited = false;
m_keyBits = [0, 0, 0, 0];
m_keyAlpha = [0, 0, 0, 0];
}
function tick() {
m_tick = m_data.tick;
if (m_tracksInited) {
var _local2 = m_tick + m_tickOffset;
var _local3 = idol.RecordData(m_data.replayData[m_recPtr]);
while ((_local3 != null) && (_local3.m_tick <= _local2)) {
switch (_local3.m_cmd) {
case 0 :
break;
case 1 :
break;
case 2 :
var _local4 = _local3.m_body.split(" ");
var _local5 = 0;
// unexpected jump
for(;;){
_local5++;
if (_local5 >= 4) {
break;
}
var _local6 = 0;
var _local7 = 0;
if (_local4[_local5].indexOf(":") != -1) {
var _local8 = _local4[_local5].split(":");
m_keyBits[_local5] = _global.parseInt(_local8[0]);
m_keyAlpha[_local5] = com.midasplayer.util.FloatEncoder.decodeBits(_local8[1]);
} else {
m_keyBits[_local5] = 0;
m_keyAlpha[_local5] = 0;
}
};
}
_local3 = idol.RecordData(m_data.replayData[++m_recPtr]);
}
var _local9 = m_tracks.getKeyState();
var _local10 = 0;
for ( ; _local10 < 4 ; _local10++) {
_local9[_local10].setData(tick, m_keyBits[_local10], m_keyAlpha[_local10]);
m_keyAlpha[_local10] = 0;
if ((m_keyBits[_local10] & 4) != 0) {
m_keyBits[_local10] = m_keyBits[_local10] & 3;
}
}
}
if (m_initState > 0) {
if (m_initState == 11) {
runState11();
}
if (m_initState == 10) {
runState10();
}
if (m_initState == 9) {
runState9();
}
if (m_initState >= 8) {
runState8();
}
if (m_initState == 7) {
runState7();
m_tickOffset = m_data.replayData[1].m_tick - m_tick;
m_tracksInited = true;
m_recPtr = 2;
}
if (m_initState == 6) {
runState6();
}
if (m_initState == 5) {
runState5();
}
if (m_initState == 4) {
runState4();
}
if (m_initState == 3) {
runState3();
}
if (m_initState == 2) {
runState2();
}
if (m_initState == 1) {
runState1();
}
m_avatar.update();
}
runAlways();
}
}
Symbol 791 MovieClip [__Packages.idol.AnimDriver50Fps] Frame 0
class idol.AnimDriver50Fps extends idol.AnimDriver
{
function AnimDriver50Fps () {
super(50);
}
}
Symbol 792 MovieClip [__Packages.idol.AvatarGirl] Frame 0
class idol.AvatarGirl extends idol.Avatar
{
var m_currentSkinColor, m_faceC, m_earLC, m_earRC, m_bodyAC, m_armARC, m_armBRC, m_handRC, m_armALC, m_armBLC, m_handLC, m_lastClothes, m_legARC, m_legALC, m_legBRC, m_legBLC, m_eyeRC, m_currentEyeColor, m_eyeLC, m_mouthC, m_currentMouthColor, m_hairAC, m_currentHairColor, m_hairBC, m_hairCC, m_hipsC, m_currentClothesColor, m_topAC, m_topA1C, m_topBC, m_haircut, m_head, m_expression, m_hairA, m_hairB, m_hairC, m_bodyA, m_bodyB, m_armAR, m_armBR, m_armAL, m_armBL, m_lng, m_legAR, m_legBR, m_legAL, m_legBL;
function AvatarGirl () {
super();
}
function updateSkinColor() {
var _local2 = m_currentSkinColor;
m_faceC.setTransform(_local2);
m_earLC.setTransform(_local2);
m_earRC.setTransform(_local2);
m_bodyAC.setTransform(_local2);
m_armARC.setTransform(_local2);
m_armBRC.setTransform(_local2);
m_handRC.setTransform(_local2);
m_armALC.setTransform(_local2);
m_armBLC.setTransform(_local2);
m_handLC.setTransform(_local2);
if ((m_lastClothes != 1) && (m_lastClothes != 4)) {
m_legARC.setTransform(_local2);
m_legALC.setTransform(_local2);
m_legBRC.setTransform(_local2);
m_legBLC.setTransform(_local2);
}
m_eyeRC.setTransform(m_currentEyeColor);
m_eyeLC.setTransform(m_currentEyeColor);
m_mouthC.setTransform(m_currentMouthColor);
m_hairAC.setTransform(m_currentHairColor);
m_hairBC.setTransform(m_currentHairColor);
m_hairCC.setTransform(m_currentHairColor);
if (m_lastClothes == 2) {
m_hipsC.setTransform(m_currentClothesColor);
}
if (m_lastClothes != 3) {
m_topAC.setTransform(m_currentClothesColor);
m_topA1C.setTransform(m_currentClothesColor);
m_topBC.setTransform(m_currentClothesColor);
}
}
function setHaircut(idx) {
m_haircut = idx;
setClothing(m_lastClothes);
updateSkinColor();
}
function setClothing(idx) {
m_lastClothes = idx;
m_head.gotoAndStop(m_expression);
m_hairA.gotoAndStop(m_haircut);
m_hairB._visible = m_haircut == 1;
m_hairC._visible = m_haircut == 1;
m_bodyA.gotoAndStop(idx);
m_bodyB.gotoAndStop(idx);
m_armAR.gotoAndStop(idx);
m_armBR.gotoAndStop(idx);
m_armAL.gotoAndStop(idx);
m_armBL.gotoAndStop(idx);
if (idx == 1) {
m_bodyA.number.gotoAndStop(((m_lng == "de") ? 2 : 1));
}
var _local3 = Math.min(2, idx);
m_legAR.gotoAndStop(_local3);
m_legBR.gotoAndStop(_local3);
m_legAL.gotoAndStop(_local3);
m_legBL.gotoAndStop(_local3);
}
var m_anims = [{fromFrame:20, toFrame:60}, {fromFrame:70, toFrame:110}, {fromFrame:120, toFrame:180}, {fromFrame:190, toFrame:210}, {fromFrame:221, toFrame:301}, {fromFrame:310, toFrame:370}, {fromFrame:380, toFrame:459}, {fromFrame:470, toFrame:550}, {fromFrame:560, toFrame:640}, {fromFrame:650, toFrame:760}, {fromFrame:770, toFrame:810}, {fromFrame:820, toFrame:929}, {fromFrame:940, toFrame:980}, {fromFrame:990, toFrame:1040}, {fromFrame:1050, toFrame:1070}, {fromFrame:1080, toFrame:1131}, {fromFrame:1140, toFrame:1150}];
var m_bodyAnims = [{fromFrame:20, toFrame:100}, {fromFrame:110, toFrame:190}, {fromFrame:232, toFrame:312}];
var m_moves = [{left:{move:13, startOffset:0.5}, right:{move:13, startOffset:0.5}}, {left:{move:7, startOffset:0.5}, right:{move:7, startOffset:1}}, {left:{move:4, startOffset:0.5}, right:{move:4, startOffset:1}}, {left:{move:4, startOffset:0.5}, right:{move:4, startOffset:1.5}}, {left:{move:5, startOffset:0.5}, right:{move:5, startOffset:1}}, {left:{move:9, startOffset:0.5}, right:{move:9, startOffset:1}}, {left:{move:6, startOffset:0.5}, right:{move:6, startOffset:1}}, {left:{move:6, startOffset:1}, right:{move:6, startOffset:0.5}}, {left:{move:6, startOffset:0.5}, right:{move:6, startOffset:0.5}}];
}
Symbol 793 MovieClip [__Packages.idol.AvatarBoy] Frame 0
class idol.AvatarBoy extends idol.Avatar
{
var m_beat, m_cmdQueue, m_lastDanceIdx, startDance, m_currentSkinColor, m_currentClothesColor, m_faceC, m_earLC, m_earRC, m_bodyAC, m_lastClothes, m_armARC, m_armBRC, m_armALC, m_armBLC, m_handRC, m_handLC, m_eyeRC, m_currentEyeColor, m_eyeLC, m_mouthC, m_currentMouthColor, m_hairAC, m_currentHairColor, m_hairBC, m_hairCC, m_bodyA, m_topCC, m_bodyB, m_topBC, m_topAC, m_topA1C;
function AvatarBoy () {
super();
}
function throwYourHandsInTheAirAndWaveThemLikeYouJustDontCare() {
var _local2 = int(Math.random() * 2) % 2;
var _local3 = int(Math.random() * 2) % 2;
var _local4 = "";
var _local5 = m_beat + 2;
switch (_local2) {
case 0 :
switch (_local3) {
case 0 :
_local4 = _local5 + ":start:arm:left,10,oneshot";
m_cmdQueue.push(_local4);
break;
case 1 :
_local4 = _local5 + ":start:arm:left,12,oneshot";
m_cmdQueue.push(_local4);
}
break;
case 1 :
switch (_local3) {
case 0 :
_local4 = _local5 + ":start:arm:right,12,oneshot";
m_cmdQueue.push(_local4);
break;
case 1 :
_local4 = _local5 + ":start:arm:right,10,oneshot";
m_cmdQueue.push(_local4);
}
}
if (m_lastDanceIdx != undefined) {
startDance(m_lastDanceIdx, 2.5);
}
}
function updateSkinColor() {
var _local2 = m_currentSkinColor;
var _local3 = m_currentClothesColor;
m_faceC.setTransform(_local2);
m_earLC.setTransform(_local2);
m_earRC.setTransform(_local2);
m_bodyAC.setTransform(_local2);
if (m_lastClothes == 2) {
m_armARC.setTransform(_local2);
m_armBRC.setTransform(_local2);
m_armALC.setTransform(_local2);
m_armBLC.setTransform(_local2);
}
m_handRC.setTransform(_local2);
m_handLC.setTransform(_local2);
m_eyeRC.setTransform(m_currentEyeColor);
m_eyeLC.setTransform(m_currentEyeColor);
m_mouthC.setTransform(m_currentMouthColor);
m_hairAC.setTransform(m_currentHairColor);
m_hairBC.setTransform(m_currentHairColor);
m_hairCC.setTransform(m_currentHairColor);
if (m_lastClothes == 1) {
m_armARC.setTransform(m_currentClothesColor);
m_armALC.setTransform(m_currentClothesColor);
m_armBRC.setTransform(m_currentClothesColor);
m_armBLC.setTransform(m_currentClothesColor);
}
if (m_bodyA.topC != undefined) {
m_topCC = new Color(m_bodyA.topC);
}
if (m_bodyB.topB1 != undefined) {
m_topBC = new Color(m_bodyB.topB1);
}
m_topBC.setTransform(m_currentClothesColor);
m_topCC.setTransform(m_currentClothesColor);
m_topAC.setTransform(m_currentClothesColor);
m_topA1C.setTransform(m_currentClothesColor);
}
var m_anims = [{fromFrame:20, toFrame:60}, {fromFrame:70, toFrame:110}, {fromFrame:120, toFrame:181}, {fromFrame:190, toFrame:210}, {fromFrame:220, toFrame:300}, {fromFrame:310, toFrame:370}, {fromFrame:380, toFrame:459}, {fromFrame:470, toFrame:550}, {fromFrame:560, toFrame:640}, {fromFrame:650, toFrame:690}, {fromFrame:701, toFrame:810}, {fromFrame:820, toFrame:860}, {fromFrame:870, toFrame:979}, {fromFrame:990, toFrame:1030}, {fromFrame:1040, toFrame:1090}, {fromFrame:1100, toFrame:1120}, {fromFrame:1130, toFrame:1181}, {fromFrame:1190, toFrame:1205}];
var m_bodyAnims = [{fromFrame:20, toFrame:100}, {fromFrame:110, toFrame:190}, {fromFrame:210, toFrame:290}, {fromFrame:298, toFrame:338}];
var m_moves = [{left:{move:14, startOffset:0.5}, right:{move:14, startOffset:0.5}}, {left:{move:7, startOffset:0.5}, right:{move:7, startOffset:1}}, {left:{move:1, startOffset:0}, right:{move:1, startOffset:1}}, {left:{move:4, startOffset:0.5}, right:{move:4, startOffset:1}}, {left:{move:4, startOffset:0.5}, right:{move:4, startOffset:1.5}}, {left:{move:5, startOffset:0.5}, right:{move:5, startOffset:1}}, {left:{move:10, startOffset:0.5}, right:{move:10, startOffset:1}}, {left:{move:6, startOffset:0.5}, right:{move:6, startOffset:1}}, {left:{move:6, startOffset:1}, right:{move:6, startOffset:0.5}}, {left:{move:6, startOffset:0.5}, right:{move:6, startOffset:0.5}}];
}