Frame 1
var gameCore = (new com.midasplayer.gameCore.GameCore(_root));
var gameLogic = (new com.midasplayer.millionaire.GameLogic());
var gameView = (new com.midasplayer.millionaire.GameView());
gameLogic.setGameView(gameView);
gameCore.setGameLogic(gameLogic);
Symbol 21 MovieClip Frame 1
stop();
Symbol 21 MovieClip Frame 2
stop();
Symbol 21 MovieClip Frame 3
stop();
Symbol 28 MovieClip Frame 1
stop();
Symbol 28 MovieClip Frame 2
stop();
Symbol 28 MovieClip Frame 3
stop();
Symbol 38 MovieClip Frame 1
play();
Symbol 38 MovieClip Frame 218
gotoAndPlay (1);
Symbol 54 MovieClip [introAnim_dk] Frame 1
play();
Symbol 54 MovieClip [introAnim_dk] Frame 113
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 1
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 2
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 3
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 4
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 5
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 6
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 7
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 8
stop();
Symbol 67 MovieClip [mcLifeline5050] Frame 9
stop();
Symbol 68 MovieClip [mcAnimation5050_dk] Frame 1
play();
Symbol 68 MovieClip [mcAnimation5050_dk] Frame 14
symbol5050.gotoAndStop(7);
Symbol 68 MovieClip [mcAnimation5050_dk] Frame 50
stop();
Symbol 69 MovieClip [mcAnimation5050] Frame 1
play();
Symbol 69 MovieClip [mcAnimation5050] Frame 50
stop();
Symbol 72 MovieClip [introAnim] Frame 1
play();
Symbol 72 MovieClip [introAnim] Frame 113
stop();
Symbol 81 MovieClip [spotAnim1] Frame 1
play();
Symbol 81 MovieClip [spotAnim1] Frame 51
stop();
Symbol 85 MovieClip Frame 1
play();
Symbol 85 MovieClip Frame 31
stop();
Symbol 86 MovieClip Frame 1
play();
Symbol 86 MovieClip Frame 37
stop();
Symbol 92 MovieClip Frame 1
play();
Symbol 92 MovieClip Frame 23
gotoAndPlay (1);
Symbol 148 MovieClip [securityLevelDK] Frame 1
play();
Symbol 148 MovieClip [securityLevelDK] Frame 19
stop();
Symbol 148 MovieClip [securityLevelDK] Frame 22
play();
Symbol 148 MovieClip [securityLevelDK] Frame 38
stop();
Symbol 148 MovieClip [securityLevelDK] Frame 41
play();
Symbol 148 MovieClip [securityLevelDK] Frame 53
stop();
Symbol 177 MovieClip [securityLevel] Frame 1
play();
Symbol 177 MovieClip [securityLevel] Frame 19
stop();
Symbol 177 MovieClip [securityLevel] Frame 22
play();
Symbol 177 MovieClip [securityLevel] Frame 38
stop();
Symbol 177 MovieClip [securityLevel] Frame 41
play();
Symbol 177 MovieClip [securityLevel] Frame 53
stop();
Symbol 180 MovieClip [mcWalkAway] Frame 1
stop();
Symbol 180 MovieClip [mcWalkAway] Frame 2
stop();
Symbol 180 MovieClip [mcWalkAway] Frame 3
stop();
Symbol 194 MovieClip [answerD] Frame 1
stop();
Symbol 194 MovieClip [answerD] Frame 2
stop();
Symbol 194 MovieClip [answerD] Frame 3
stop();
Symbol 194 MovieClip [answerD] Frame 4
stop();
Symbol 194 MovieClip [answerD] Frame 5
stop();
Symbol 194 MovieClip [answerD] Frame 6
stop();
Symbol 194 MovieClip [answerD] Frame 7
stop();
Symbol 194 MovieClip [answerD] Frame 8
stop();
Symbol 194 MovieClip [answerD] Frame 9
stop();
Symbol 200 MovieClip [answerC] Frame 1
stop();
Symbol 200 MovieClip [answerC] Frame 2
stop();
Symbol 200 MovieClip [answerC] Frame 3
stop();
Symbol 200 MovieClip [answerC] Frame 4
stop();
Symbol 200 MovieClip [answerC] Frame 5
stop();
Symbol 200 MovieClip [answerC] Frame 6
stop();
Symbol 200 MovieClip [answerC] Frame 7
stop();
Symbol 200 MovieClip [answerC] Frame 8
stop();
Symbol 200 MovieClip [answerC] Frame 9
stop();
Symbol 207 MovieClip [answerB] Frame 1
stop();
Symbol 207 MovieClip [answerB] Frame 2
stop();
Symbol 207 MovieClip [answerB] Frame 3
stop();
Symbol 207 MovieClip [answerB] Frame 4
stop();
Symbol 207 MovieClip [answerB] Frame 5
stop();
Symbol 207 MovieClip [answerB] Frame 6
stop();
Symbol 207 MovieClip [answerB] Frame 7
stop();
Symbol 207 MovieClip [answerB] Frame 8
stop();
Symbol 207 MovieClip [answerB] Frame 9
stop();
Symbol 213 MovieClip [answerA] Frame 1
stop();
Symbol 213 MovieClip [answerA] Frame 2
stop();
Symbol 213 MovieClip [answerA] Frame 3
stop();
Symbol 213 MovieClip [answerA] Frame 4
stop();
Symbol 213 MovieClip [answerA] Frame 5
stop();
Symbol 213 MovieClip [answerA] Frame 6
stop();
Symbol 213 MovieClip [answerA] Frame 7
stop();
Symbol 213 MovieClip [answerA] Frame 8
stop();
Symbol 213 MovieClip [answerA] Frame 9
stop();
Symbol 218 MovieClip [mcAnimationFriend] Frame 1
play();
Symbol 218 MovieClip [mcAnimationFriend] Frame 61
stop();
Symbol 230 MovieClip [mcAnimationAudience] Frame 1
play();
Symbol 230 MovieClip [mcAnimationAudience] Frame 40
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 1
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 2
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 3
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 4
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 5
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 6
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 7
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 8
stop();
Symbol 239 MovieClip [mcLifelineFriend] Frame 9
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 1
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 2
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 3
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 4
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 5
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 6
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 7
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 8
stop();
Symbol 246 MovieClip [mcLifelineAudience] Frame 9
stop();
Symbol 271 MovieClip [question] Frame 1
stop();
Symbol 271 MovieClip [question] Frame 2
stop();
Symbol 271 MovieClip [question] Frame 3
stop();
Symbol 271 MovieClip [question] Frame 4
stop();
Symbol 271 MovieClip [question] Frame 5
stop();
Symbol 271 MovieClip [question] Frame 6
stop();
Symbol 271 MovieClip [question] Frame 7
stop();
Symbol 271 MovieClip [question] Frame 8
stop();
Symbol 271 MovieClip [question] Frame 9
stop();
Symbol 271 MovieClip [question] Frame 10
stop();
Symbol 271 MovieClip [question] Frame 11
stop();
Symbol 271 MovieClip [question] Frame 12
stop();
Symbol 281 MovieClip [mcSoundToggle] Frame 1
stop();
Symbol 281 MovieClip [mcSoundToggle] Frame 2
stop();
Symbol 281 MovieClip [mcSoundToggle] Frame 3
stop();
Symbol 281 MovieClip [mcSoundToggle] Frame 4
stop();
Symbol 321 MovieClip Frame 1
stop();
Symbol 321 MovieClip Frame 2
stop();
Symbol 321 MovieClip Frame 3
stop();
Symbol 321 MovieClip Frame 4
stop();
Symbol 321 MovieClip Frame 5
stop();
Symbol 321 MovieClip Frame 6
stop();
Symbol 321 MovieClip Frame 7
stop();
Symbol 321 MovieClip Frame 8
stop();
Symbol 321 MovieClip Frame 9
stop();
Symbol 321 MovieClip Frame 10
stop();
Symbol 321 MovieClip Frame 11
stop();
Symbol 321 MovieClip Frame 12
stop();
Symbol 321 MovieClip Frame 13
stop();
Symbol 321 MovieClip Frame 14
stop();
Symbol 321 MovieClip Frame 15
stop();
Symbol 321 MovieClip Frame 16
stop();
Symbol 321 MovieClip Frame 17
stop();
Symbol 321 MovieClip Frame 35
stop();
Symbol 321 MovieClip Frame 36
stop();
Symbol 321 MovieClip Frame 37
stop();
Symbol 321 MovieClip Frame 38
stop();
Symbol 321 MovieClip Frame 39
stop();
Symbol 321 MovieClip Frame 40
stop();
Symbol 321 MovieClip Frame 41
stop();
Symbol 321 MovieClip Frame 42
stop();
Symbol 321 MovieClip Frame 43
stop();
Symbol 321 MovieClip Frame 44
stop();
Symbol 321 MovieClip Frame 45
stop();
Symbol 321 MovieClip Frame 46
stop();
Symbol 321 MovieClip Frame 47
stop();
Symbol 321 MovieClip Frame 48
stop();
Symbol 321 MovieClip Frame 49
stop();
Symbol 321 MovieClip Frame 50
stop();
Symbol 321 MovieClip Frame 51
stop();
Symbol 335 MovieClip [__Packages.com.midasplayer.gameCore.IGameLogic] Frame 0
interface com.midasplayer.gameCore.IGameLogic
{
}
Symbol 336 MovieClip [__Packages.com.midasplayer.gameCore.GameCore] Frame 0
class com.midasplayer.gameCore.GameCore
{
static var _languageFrame;
var m_scopeRef, m_resetTick, m_tickCount, m_gameState, m_gda, m_gameLogic, NUMBER_LEVELS, m_timeLimit, m_timeLeft, m_pendingStateTarget, m_pendingStateStart;
function GameCore (scopeRef) {
m_scopeRef = scopeRef;
m_resetTick = true;
m_tickCount = 0;
m_lastTickTime = -1;
m_ipTime = 0;
m_gameState = STATE_INTRUCTIONS;
if (isClient()) {
m_gda = new com.midasplayer.util.GameDataAcquirer();
m_gda.beginWait(mx.utils.Delegate.create(this, setupGame));
}
}
static function getLanguageFrame() {
return(_languageFrame);
}
function isServer() {
return(SERVER);
}
function isClient() {
return(!SERVER);
}
function getScopeRef() {
return(m_scopeRef);
}
function setGameLogic(gameLogic) {
m_gameLogic = gameLogic;
m_gameLogic.setGameCore(this);
m_gameLogic.init();
}
function getGameLogic() {
return(m_gameLogic);
}
function setupGame() {
NUMBER_LEVELS = Number(m_gda.getGameData("numberLevels"));
_languageFrame = Number(m_gda.getGameData("languageFrame"));
m_timeLimit = new com.midasplayer.util.ArrayList(m_gda.getGameData("timeLimit"));
var _local3 = Number(m_gda.getGameData("timeLimit"));
m_timeLimit = new com.midasplayer.util.ArrayList();
var _local2 = 0;
while (_local2 < NUMBER_LEVELS) {
m_timeLimit.insert(_local3);
_local2++;
}
getGameLogic().setGameData(m_gda);
m_scopeRef.onEnterFrame = mx.utils.Delegate.create(this, update);
}
function getTickCount() {
return(m_tickCount);
}
function getIPTime() {
return(m_ipTime);
}
function getGameTime() {
return(getTickCount() * TIME_PER_TICK);
}
function getScore() {
return(m_score);
}
function setScore(score) {
m_score = Math.max(score, 0);
}
function addScore(score) {
m_score = Math.max(m_score + score, 0);
}
function getLevel() {
return(m_level);
}
function getNumberLevels() {
return(NUMBER_LEVELS);
}
function addTime(time) {
m_timeLeft = Math.max(m_timeLeft + time, 0);
}
function getTimeLeft(ipTime) {
var _local2 = (((ipTime != undefined) && (getState() != STATE_LEVEL_OVER_PENDING)) ? (ipTime) : 0);
return(m_timeLeft - (_local2 * TIME_PER_TICK));
}
function getTimeLeftPercent(ipTime) {
return((getTimeLeft(ipTime) / m_timeLimit.get(getLevel())) * 100);
}
function getState() {
return(m_gameState);
}
function setState(state, pendingStateTarget) {
m_gameState = state;
if (state == STATE_LEVEL_OVER_PENDING) {
if (pendingStateTarget == undefined) {
getGameLogic().trace("PENDING STATE CALLED WITHOUT TARGET STATE!");
return(undefined);
}
m_pendingStateTarget = pendingStateTarget;
m_pendingStateStart = getTickCount();
}
if (state == STATE_LEVEL_OVER) {
m_timeLeft = m_timeLeft - (m_ipTime * TIME_PER_TICK);
}
}
function getPendingStateDuration() {
return(m_pendingStateDuration);
}
function setPendingStateDuration(duration) {
m_pendingStateDuration = duration * TICKS_PER_SECOND;
}
function update() {
checkForServerResponse();
if (m_gameState == STATE_NONE) {
trace("INVALID GAME STATE!!");
} else if (m_gameState == STATE_INTRUCTIONS) {
getGameLogic().updateInstructions();
} else if (m_gameState == STATE_START_GAME) {
fscommand ("gameStart");
setState(STATE_SETUP);
} else if (m_gameState == STATE_SETUP) {
trace("-- State: SETUP");
m_level++;
m_resetTick = true;
m_timeLeft = Number(m_timeLimit.get(getLevel()));
getGameLogic().setupLevel();
getGameLogic().getGameView().setupLevel();
setState(STATE_RUNNING);
} else if (m_gameState == STATE_RUNNING) {
gameLoop();
} else if (m_gameState == STATE_LEVEL_OVER_PENDING) {
if (getTickCount() >= (m_pendingStateStart + m_pendingStateDuration)) {
setState(m_pendingStateTarget);
} else {
gameLoop();
}
} else if (m_gameState == STATE_LEVEL_OVER) {
trace("-- State: LEVEL_OVER");
getGameLogic().levelOver();
if ((m_level + 1) >= NUMBER_LEVELS) {
m_level++;
setState(STATE_GAME_OVER);
} else {
setState(STATE_LEVEL_SUMMARY);
}
} else if (m_gameState == STATE_LEVEL_SUMMARY) {
getGameLogic().updateSummary();
} else if (m_gameState == STATE_GAME_OVER) {
trace("-- State: GAME_OVER");
setState(STATE_GAME_SUMMARY);
fscommand ("gameEnd", m_score);
trace("gameEnd: " + m_score);
} else if (m_gameState == STATE_GAME_SUMMARY) {
getGameLogic().updateGameOver();
} else if (m_gameState == STATE_END_GAME) {
fscommand ("gameQuit");
m_gameState = STATE_GAME_ENDED;
} else if (m_gameState == STATE_GAME_ENDED) {
}
}
function completeLevel() {
m_timeLeft = m_timeLeft - (m_ipTime * TIME_PER_TICK);
setState(STATE_LEVEL_OVER_PENDING, STATE_LEVEL_OVER);
}
function gameOver() {
m_timeLeft = m_timeLeft - (m_ipTime * TIME_PER_TICK);
setState(STATE_LEVEL_OVER_PENDING, STATE_GAME_OVER);
}
function gameLoop() {
if (isServer()) {
tickGame();
return(undefined);
}
if (m_resetTick) {
m_resetTick = false;
m_lastTickTime = getTimer();
}
var _local2 = 0;
for(;;){
calcIPTime();
if (m_ipTime < 1) {
break;
}
tickGame();
if (getState() != STATE_RUNNING) {
break;
}
if (_local2 >= 1000) {
trace("Infinite recursions or intolerable delay in gameLoop");
break;
}
if (getGameLogic().isDev() && (_local2 > 1)) {
break;
}
_local2++;
};
m_gameLogic.render(m_ipTime);
}
function calcIPTime() {
if (isServer()) {
m_ipTime = 1;
} else if (isClient()) {
m_ipTime = (getTimer() - m_lastTickTime) / TIME_PER_TICK;
}
}
function tickGame() {
m_gameLogic.coreTick();
m_gameLogic.tick();
m_lastTickTime = m_lastTickTime + TIME_PER_TICK;
m_tickCount++;
calcIPTime();
if (getState() != STATE_LEVEL_OVER_PENDING) {
m_timeLeft = m_timeLeft - TIME_PER_TICK;
if (getTimeLeft() <= 0) {
getGameLogic().gameOver();
}
}
}
function checkForServerResponse() {
if (_root.response != undefined) {
var _local3 = _root.response;
_root.response = undefined;
_local3 = _local3.split("<").join("<");
_local3 = _local3.split(">").join(">");
_local3 = _local3.split(""").join("\"");
getGameLogic().responseReceived(_local3);
}
}
var m_pendingStateDuration = 0;
var m_lastTickTime = -1;
var m_ipTime = 0;
var m_score = 0;
var m_level = -1;
static var TICKS_PER_SECOND = 2;
static var TIME_PER_TICK = 1000 / TICKS_PER_SECOND;
static var STATE_NONE = -1;
static var STATE_INTRUCTIONS = 0;
static var STATE_START_GAME = 1;
static var STATE_SETUP = 2;
static var STATE_RUNNING = 3;
static var STATE_LEVEL_OVER_PENDING = 4;
static var STATE_LEVEL_OVER = 5;
static var STATE_LEVEL_SUMMARY = 6;
static var STATE_GAME_OVER = 7;
static var STATE_GAME_SUMMARY = 8;
static var STATE_END_GAME = 9;
static var STATE_GAME_ENDED = 10;
var SERVER = false;
}
Symbol 337 MovieClip [__Packages.com.midasplayer.util.GameDataAcquirer] Frame 0
class com.midasplayer.util.GameDataAcquirer
{
var attrib, multiplayerAttrib, trees, targetVar, dataEvent, timerFn, timer, error;
function GameDataAcquirer (variable) {
attrib = new com.midasplayer.util.Map();
multiplayerAttrib = 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 _local1 = _level0[caller.targetVar];
if (((_local1 != undefined) && (_local1 != null)) && (_local1.length > 0)) {
caller.parse(_local1);
if (caller.dataEvent != undefined) {
caller.dataEvent();
}
caller.dataEvent = undefined;
clearInterval(caller.timer);
}
};
timer = 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 getMultiplayerData(name) {
return(multiplayerAttrib.get(name));
}
function parse(data) {
attrib.clear();
var _local7 = new com.midasplayer.util.Map();
var _local9 = new XML();
_local9.ignoreWhite = true;
_local9.parseXML(data);
var _local4 = _local9.firstChild;
if (_local4.nodeName != "gamedata") {
error = "Bad XML (expected <gamedata>)";
return(undefined);
}
for (var _local8 in _local4.attributes) {
var _local5;
var _local3 = _local4.attributes[_local8];
if ((_local3.indexOf("[") == 0) && ((_local5 = _local3.indexOf("]")) != -1)) {
_local3 = _local3.substring(1, _local5).split(",");
}
attrib.put(_local8, _local3);
}
for (var _local8 in _local4.childNodes) {
var _local2 = _local4.childNodes[_local8];
switch (_local2.nodeName) {
case "text" :
_local7.put(_local2.attributes.id, _local2.firstChild.nodeValue);
break;
case "multiplayer" :
for (var _local8 in _local2.attributes) {
multiplayerAttrib.put(_local8, _local2.attributes[_local8]);
}
break;
default :
var _local6;
_local6 = trees.get(_local2.nodeName);
if (_local6 == undefined) {
trees.put(_local2.nodeName, [_local2]);
} else {
_local6.push(_local2);
}
}
}
trace("parse(): completed");
com.midasplayer.util.I18n.init(_local7);
}
var parsed = false;
}
Symbol 338 MovieClip [__Packages.com.midasplayer.util.Map] Frame 0
class com.midasplayer.util.Map
{
var map, lastSize;
function Map (init) {
map = new Object();
for (var _local3 in init) {
map["@" + _local3] = init[_local3];
}
lastSize = -1;
}
function put(key, value) {
map["@" + key] = value;
lastSize = -1;
}
function get(key) {
return(map["@" + key]);
}
function remove(key) {
var _local2 = map["@" + key];
delete map["@" + key];
lastSize = -1;
return(_local2);
}
function count() {
if (lastSize < 0) {
lastSize = 0;
for (var _local2 in map) {
lastSize++;
}
}
return(lastSize);
}
function size() {
return(count());
}
function clear() {
map = {};
lastSize = 0;
}
function dump() {
var _local2 = "";
for (var _local3 in map) {
_local2 = _local2 + (((_local3 + "=>") + map[_local3]) + newline);
}
trace(_local2);
}
function toArray() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = map[_local3];
}
return(_local2);
}
function keySet() {
var _local2 = [];
for (var _local3 in map) {
_local2[_local2.length] = _local3.substring(1);
}
return(_local2);
}
function foreach(fn) {
do {
if ((in map) == null) {
break;
}
var _local3 = in map;
} while (fn(_local3.substring(1), map[_local3]) != false);
do {
} while ("foreach" != null);
lastSize = -1;
}
}
Symbol 339 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 _local1 = lang.get(name);
if (_local1 == undefined) {
return(("{" + name) + "}");
}
return(_local1.toString());
}
}
Symbol 340 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 _local2 = value.length;
if ((pos == undefined) || (pos >= _local2)) {
value.push(obj);
return(_local2);
}
value.splice(pos, 0, obj);
return(pos);
}
function get(pos) {
return(value[pos]);
}
function set(pos, o) {
value[pos] = o;
}
function indexOf(obj) {
var _local2 = 0;
while (_local2 < value.length) {
if (obj == value[_local2]) {
return(_local2);
}
_local2++;
}
return(-1);
}
function remove(obj) {
return(removeByIndex(indexOf(obj)));
}
function removeByIndex(pos) {
var _local2;
var _local4 = value.length;
if ((pos < _local4) && (pos >= 0)) {
_local2 = value[pos];
value.splice(pos, 1);
}
return(_local2);
}
function size() {
return(value.length);
}
function clear() {
value = new Array();
}
function toArray() {
return(value);
}
function foreach(fn) {
var _local2 = 0;
var _local3 = value.length;
while (_local2 < _local3) {
if (fn(_local2, value[_local2]) == false) {
break;
}
_local2++;
}
}
function sortOn(field) {
value.sortOn(field);
}
function sort() {
value.sort();
}
function get iterator() {
return(new com.midasplayer.util.ArrayListIterator(this));
}
function subList(from, to) {
if ((to > value.length) || (!to)) {
to = value.length;
}
var _local4 = value.slice(from, to);
var _local3 = new com.midasplayer.util.ArrayList(_local4);
return(_local3);
}
}
Symbol 341 MovieClip [__Packages.com.midasplayer.util.Iterator] Frame 0
interface com.midasplayer.util.Iterator
{
}
Symbol 342 MovieClip [__Packages.com.midasplayer.util.ArrayListIterator] Frame 0
class com.midasplayer.util.ArrayListIterator implements com.midasplayer.util.Iterator
{
var ptr, list;
function ArrayListIterator (list) {
ptr = 0;
this.list = list;
}
function next() {
if (ptr < list.size()) {
return(list.get(ptr++));
}
return(undefined);
}
function hasNext() {
return(ptr < list.size());
}
function remove() {
if (ptr == 0) {
return(undefined);
}
list.removeByIndex(ptr - 1);
}
}
Symbol 343 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 344 MovieClip [__Packages.com.midasplayer.gameCore.GameViewBase] Frame 0
class com.midasplayer.gameCore.GameViewBase
{
var m_gameLogic;
function GameViewBase () {
}
function setGameLogic(gameLogic) {
m_gameLogic = gameLogic;
}
function getGameLogic() {
return(m_gameLogic);
}
function initInstructions(infoScreen) {
}
function updateInstructions(infoScreen) {
}
function initSummary(infoScreen) {
}
function updateSummary(infoScreen) {
}
function initGameOver(infoScreen) {
}
function updateGameOver(infoScreen) {
}
function init() {
}
function tick() {
}
function render(ipTime) {
}
function setupLevel() {
}
}
Symbol 345 MovieClip [__Packages.com.midasplayer.gameCore.InfoScreen] Frame 0
class com.midasplayer.gameCore.InfoScreen
{
var m_okButtonText, m_clip, m_okButton, m_gameLogic, m_soundIdentifier;
function InfoScreen () {
m_okButtonText = com.midasplayer.util.I18n.getString("start");
}
function setExitDelay(delay) {
m_exitDelay = delay;
}
function setFps(fps) {
m_fps = fps;
}
function setLooping(looping) {
m_looping = looping;
}
function getClip() {
return(m_clip);
}
function init(parent, symbol, expireTime) {
if (symbol == undefined) {
symbol = DEFAULT_SYMBOL;
}
if (expireTime != undefined) {
m_expireTime = expireTime;
}
m_clip = parent.attachMovie(symbol, symbol + "_infoscreen", parent.getNextHighestDepth());
setOkButton(m_clip[SIGN_NAME].ok_button);
m_startTime = getTimer();
}
function setOkButton(okButton) {
m_okButton = okButton;
m_okButton.onPress = mx.utils.Delegate.create(this, exit);
m_okButton.onRollOver = mx.utils.Delegate.create(this, okButtonRollOver);
m_okButton.onRollOut = mx.utils.Delegate.create(this, okButtonRollOut);
}
function okButtonRollOver() {
m_okButton.gotoAndStop(2);
updateButtonText();
}
function okButtonRollOut() {
m_okButton.gotoAndStop(1);
updateButtonText();
}
function setPos(x, y) {
m_clip._x = x;
m_clip._y = y;
}
function setExitState(gameLogic, exitState) {
m_gameLogic = gameLogic;
m_exitState = exitState;
}
function setExpireTime(expireTime) {
m_expireTime = expireTime;
}
function setSound(sound) {
m_soundIdentifier = sound;
com.midasplayer.fx.SoundManager.play(m_soundIdentifier);
}
function setButtonText(textValue) {
m_okButtonText = textValue;
}
function setSignText(textFieldName, textValue) {
m_clip[SIGN_NAME][textFieldName].text = textValue;
}
function setText(textFieldName, textValue) {
m_clip[textFieldName].text = textValue;
}
function setElementVisible(name, visible) {
m_clip[name]._visible = visible;
}
function updateButtonText() {
m_okButton.text.text = m_okButtonText;
}
function update() {
if (m_clip == undefined) {
exit();
}
var _local5 = (getTimer() - m_startTime) / 1000;
var _local4 = Math.round(m_expireTime - _local5);
var _local7 = m_okButtonText;
var _local6 = m_clip[SIGN_NAME][TIMER_NAME];
if (_local6 != undefined) {
_local6.gotoAndStop(_local4 - 1);
}
updateButtonText();
if (_local4 <= 0) {
exit();
}
var _local2 = m_clip[SIGN_NAME][ANIM_NAME];
if (_local2 != undefined) {
var _local3 = Math.floor(_local5 * m_fps);
if (m_looping) {
_local3 = (_local3 % _local2._framesloaded) + 1;
} else if (_local3 > _local2._framesloaded) {
_local3 = _local2._framesloaded;
}
_local2.gotoAndStop(_local3);
}
}
function exit() {
var _local2 = (getTimer() - m_startTime) / 1000;
if (_local2 < m_exitDelay) {
return(undefined);
}
com.midasplayer.fx.SoundManager.stop(m_soundIdentifier);
if (m_exitState != com.midasplayer.gameCore.GameCore.STATE_END_GAME) {
m_clip.removeMovieClip();
}
m_gameLogic.infoScreenExit(m_exitState);
}
static var DEFAULT_SYMBOL = "info_screen";
static var SIGN_NAME = "sign";
static var ANIM_NAME = "anim";
static var TIMER_NAME = "timer";
static var OK_BUTTON_TEXT = "ok_button_text";
var m_startTime = -1;
var m_expireTime = 10000;
var m_exitState = com.midasplayer.gameCore.GameCore.STATE_NONE;
var m_exitDelay = 0;
var m_fps = 20;
var m_looping = true;
}
Symbol 346 MovieClip [__Packages.com.midasplayer.fx.SoundManager] Frame 0
class com.midasplayer.fx.SoundManager
{
function SoundManager () {
}
static function parseGroup(group) {
return(((group == undefined) ? (DEFAULT_GROUP) : (group)));
}
static function addSoundGroup(group) {
var _local1 = soundEnabledMap.get(group);
if (_local1 == undefined) {
soundEnabledMap.put(group, {groupEnabled:isSoundEnabled(DEFAULT_GROUP)});
}
}
static function isSoundEnabled(group) {
group = parseGroup(group);
var _local1 = soundEnabledMap.get(group).groupEnabled;
if (_local1 == undefined) {
_local1 = true;
}
return(_local1);
}
static function enableSounds(enabled, group) {
group = parseGroup(group);
addSoundGroup(group);
var _local2 = (soundEnabledMap.get(group).groupEnabled = enabled);
trace(((("soundEnabled: " + isSoundEnabled(group)) + " '") + group) + "'");
if (!enabled) {
muteAll(group);
} else {
restoreMuteAll(group);
}
}
static function stopAll(group) {
sounds.foreach(function (name, soundEntry) {
soundEntry.sound.stop();
soundEntry.playStatus = false;
});
}
static function muteAll(group) {
group = parseGroup(group);
sounds.foreach(function (name, soundEntry) {
if (soundEntry.group == group) {
soundEntry.sound.setVolume(0);
}
});
}
static function restoreMuteAll(group) {
group = parseGroup(group);
sounds.foreach(function (name, soundEntry) {
if (soundEntry.group == group) {
soundEntry.sound.setVolume(soundEntry.realVol);
}
});
}
static function stop(resource) {
var _local1 = sounds.get(resource);
if (_local1 != undefined) {
_local1.sound.stop();
_local1.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 _local1 = sounds.get(resource);
if ((_local1 != undefined) && (_local1.playStatus == true)) {
var _local2 = getCalibratedVolume(percent);
_local1.sound.setVolume(_local2);
_local1.sound.volume = _local2;
}
}
static function isPlaying(resource) {
var _local1 = sounds.get(resource);
return((_local1 != undefined) && (_local1.playStatus == true));
}
static function play(resource, volume, isLoop, group) {
if (volume == undefined) {
volume = 100;
}
if (isLoop == undefined) {
isLoop = false;
}
volume = getCalibratedVolume(volume);
var _local1 = sounds.get(resource);
if (_local1 == undefined) {
_local1 = loadResource(resource, group);
}
if (_local1 != undefined) {
_local1.sound.setVolume((isSoundEnabled(_local1.group) ? (volume) : 0));
_local1.realVol = volume;
_local1.playStatus = true;
_local1.sound.start(0, (isLoop ? 32767 : 1));
}
}
static function loadResource(resource, group) {
group = parseGroup(group);
addSoundGroup(group);
var _local3 = _root.getNextHighestDepth();
var _local2 = new Sound(_root.createEmptyMovieClip("sm_sndhold_" + _local3, _local3));
_local2.attachSound(resource);
_local2.onSoundComplete = function () {
var _local1 = com.midasplayer.fx.SoundManager.sounds.get(resource);
_local1.playStatus = false;
};
sounds.put(resource, {realVol:100, sound:_local2, playStatus:true, group:group});
return(sounds.get(resource));
}
static var DEFAULT_GROUP = "default";
static var sounds = new com.midasplayer.util.Map();
static var soundEnabledMap = new com.midasplayer.util.Map();
}
Symbol 347 MovieClip [__Packages.com.midasplayer.gameCore.World] Frame 0
class com.midasplayer.gameCore.World
{
var m_scopeRef, m_gameLogic, m_clip, m_layers, m_worldObjects, m_worldObjectRemove, m_background;
function World (scope, gameLogic) {
m_scopeRef = scope;
m_gameLogic = gameLogic;
m_clip = m_scopeRef.createEmptyMovieClip("world", m_scopeRef.getNextHighestDepth());
m_layers = new com.midasplayer.util.ArrayList();
m_worldObjects = new com.midasplayer.util.ArrayList();
m_worldObjectRemove = new com.midasplayer.util.ArrayList();
m_background = new com.midasplayer.gameCore.WorldObject();
addWorldObjectHelper(m_background, "", 0);
m_background.setPlaybackSpeed(BACKGROUND_PLAYBACK_SPEED);
}
function getGameLogic() {
return(m_gameLogic);
}
function getBackground() {
return(m_background);
}
function getClip() {
return(m_clip);
}
function setBackground(symbol) {
m_background.setClip(symbol, 0, "background");
}
function render(ipTime) {
m_background.render(ipTime);
var _local2 = 0;
while (_local2 < m_worldObjects.size()) {
m_worldObjects.get(_local2).render(ipTime);
_local2++;
}
}
function tick() {
var _local5 = m_worldObjects.size();
m_background.updatePhysics();
var _local2 = 0;
while (_local2 < _local5) {
m_worldObjects.get(_local2).updatePhysics();
_local2++;
}
m_background.update();
_local2 = 0;
while (_local2 < _local5) {
m_worldObjects.get(_local2).update();
_local2++;
}
m_background.tick();
_local2 = 0;
while (_local2 < _local5) {
m_worldObjects.get(_local2).tick();
_local2++;
}
var _local4 = 0;
while (_local4 < m_worldObjectRemove.size()) {
_local2 = 0;
while (_local2 < m_worldObjects.size()) {
var _local3 = com.midasplayer.gameCore.WorldObject(m_worldObjects.get(_local2));
if (_local3.getObjId() == m_worldObjectRemove.get(_local4)) {
_local3.getObjectView().getClip().removeMovieClip();
_local3.onRemovedFromWorld();
m_worldObjects.removeByIndex(_local2);
break;
}
_local2++;
}
_local4++;
}
if (m_worldObjectRemove.size() > 0) {
m_worldObjectRemove.clear();
}
}
function getLayer(layer) {
if (m_layers.size() <= layer) {
var _local2 = m_layers.size();
while (_local2 <= layer) {
addLayer();
_local2++;
}
}
return(MovieClip(m_layers.get(layer)));
}
function addLayer() {
m_layers.insert(getClip().createEmptyMovieClip("layer_" + m_layers.size(), getClip().getNextHighestDepth()));
return(m_layers.size());
}
function addWorldObject(obj, symbol, worldLayer, clipName) {
var _local3 = m_worldObjectIdCounter;
m_worldObjectIdCounter++;
obj.setObjId(_local3);
m_worldObjects.insert(obj);
addWorldObjectHelper(obj, symbol, worldLayer, clipName);
return(obj);
}
function addWorldObjectHelper(obj, symbol, worldLayer, clipName) {
obj.setGameLogic(m_gameLogic);
obj.setWorld(this);
obj.setClip(symbol, worldLayer, clipName);
obj.onAddedToWorld();
obj.getObjectView().getClip()._visible = false;
}
function clearWorldObjects() {
var _local2 = 0;
while (_local2 < m_worldObjects.size()) {
m_worldObjects.get(_local2).getClip().removeMovieClip();
_local2++;
}
m_worldObjects.clear();
}
function removeWorldObject(obj) {
m_worldObjectRemove.insert(obj.getObjId());
obj.getObjectView().setClip("");
}
function getAllWorldObjects() {
return(m_worldObjects);
}
function getWorldObject(objId) {
var _local2 = 0;
while (_local2 < m_worldObjects.size()) {
var _local3 = m_worldObjects[_local2];
if (_local3.getObjId() == objId) {
return(com.midasplayer.gameCore.WorldObject(m_worldObjects.get(_local2)));
}
_local2++;
}
return(undefined);
}
static var WORLD_EDGE_TOP = 0;
static var WORLD_EDGE_BOTTOM = 530;
static var WORLD_EDGE_LEFT = 0;
static var WORLD_EDGE_RIGHT = 540;
static var BACKGROUND_PLAYBACK_SPEED = 0.4;
var m_worldObjectIdCounter = 0;
}
Symbol 348 MovieClip [__Packages.com.midasplayer.gameCore.WorldObject] Frame 0
class com.midasplayer.gameCore.WorldObject
{
var DEFAULT_SYMBOL, m_animFrame, m_posX, m_posY, m_rotation, m_scaleX, m_scaleY, m_alpha, m_visible, m_objectView, m_gameLogic, m_world, m_parent;
function WorldObject (defaultSymbol) {
if ((defaultSymbol != undefined) && (defaultSymbol != "")) {
DEFAULT_SYMBOL = defaultSymbol;
}
m_animFrame = new com.midasplayer.gameCore.InterpolationValue(1);
m_posX = new com.midasplayer.gameCore.InterpolationValue(0);
m_posY = new com.midasplayer.gameCore.InterpolationValue(0);
m_rotation = new com.midasplayer.gameCore.InterpolationValue(0);
m_scaleX = new com.midasplayer.gameCore.InterpolationValue(100);
m_scaleY = new com.midasplayer.gameCore.InterpolationValue(100);
m_alpha = new com.midasplayer.gameCore.InterpolationValue(100);
m_visible = new Array();
m_visible.push(true);
m_visible.push(true);
}
function getObjectView() {
return(m_objectView);
}
function deleteObjectView() {
delete m_objectView;
}
function setDefaultSymbol(symbol) {
DEFAULT_SYMBOL = symbol;
}
function getDefaultSymbol() {
return(DEFAULT_SYMBOL);
}
function setObjId(id) {
m_objectId = id;
}
function getObjId() {
return(m_objectId);
}
function setGameLogic(gameLogic) {
m_gameLogic = gameLogic;
}
function getGameLogic() {
return(m_gameLogic);
}
function setWorld(world) {
m_world = world;
}
function getWorld() {
return(m_world);
}
function setPerformCollision(collision) {
m_performCollision = collision;
}
function getPerformCollision() {
return(m_performCollision);
}
function setPhysicsEnabled(physics) {
m_physicsEnabled = physics;
}
function isPhysicsEnabled() {
return(m_physicsEnabled);
}
function setAnimated(animated) {
m_animated = animated;
}
function isAnimated() {
return(m_animated);
}
function animPlay() {
m_playing = true;
}
function animStop() {
m_playing = false;
}
function isAnimPlaying() {
return(m_playing);
}
function setAnimLooping(loop) {
m_looping = loop;
}
function isAnimLooping() {
return(m_looping);
}
function setFps(fps) {
m_playbackSpeed = fps / com.midasplayer.gameCore.GameCore.TICKS_PER_SECOND;
}
function setPlaybackSpeed(speed) {
m_playbackSpeed = speed;
}
function getPlaybackSpeed() {
return(m_playbackSpeed);
}
function setFrame(frame) {
m_animFrame.setValue(frame);
}
function getFrame(ipTime) {
return(m_animFrame.getValue(ipTime));
}
function setParent(parent) {
m_parent = parent;
}
function getParent() {
return(m_parent);
}
function setX(x) {
m_posX.setValue(x);
}
function setY(y) {
m_posY.setValue(y);
}
function setPos(x, y) {
setX(x);
setY(y);
}
function setPrevX(x) {
m_posX.setPrevValue(x);
}
function setPrevY(y) {
m_posY.setPrevValue(y);
}
function setNextX(x) {
m_posX.setNextValue(x);
}
function setNextY(y) {
m_posY.setNextValue(y);
}
function setVelX(vel) {
m_posVelocityX = vel;
}
function setVelY(vel) {
m_posVelocityY = vel;
}
function setVel(vel) {
m_posVelocityX = vel.x;
m_posVelocityY = vel.y;
}
function addVelX(vel) {
m_posVelocityX = m_posVelocityX + vel;
}
function addVelY(vel) {
m_posVelocityY = m_posVelocityY + vel;
}
function setGravity(vel) {
m_gravity = vel;
}
function setRotation(rot) {
m_rotation.setValue(rot);
}
function setRotationVel(vel) {
m_rotationVelocity = vel;
}
function addRotationVel(vel) {
m_rotationVelocity = m_rotationVelocity + vel;
}
function setScaleX(scale) {
m_scaleX.setValue(scale);
}
function setNextScaleX(scale) {
m_scaleX.setNextValue(scale);
}
function setScaleXVel(vel) {
m_scaleXVelocity = vel;
}
function setScaleY(scale) {
m_scaleY.setValue(scale);
}
function setNextScaleY(scale) {
m_scaleY.setNextValue(scale);
}
function setScaleYVel(vel) {
m_scaleYVelocity = vel;
}
function setAlpha(alpha) {
m_alpha.setValue(alpha);
}
function setAlphaVel(vel) {
m_alphaVelocity = vel;
}
function setVisible(visible) {
m_visible[0] = (m_visible[1] = visible);
}
function setNextVisible(visible) {
m_visible[1] = visible;
}
function getX(ipTime) {
return(m_posX.getValue(ipTime));
}
function getY(ipTime) {
return(m_posY.getValue(ipTime));
}
function getPos(ipTime) {
return(new com.midasplayer.util.Vec2D(m_posX.getValue(ipTime), m_posY.getValue(ipTime)));
}
function getVelX() {
return(m_posVelocityX);
}
function getVelY() {
return(m_posVelocityY);
}
function getVel() {
return(new com.midasplayer.util.Vec2D(m_posVelocityX, m_posVelocityY));
}
function getGravity() {
return(m_gravity);
}
function getRotation(ipTime) {
return(m_rotation.getValue(ipTime));
}
function getRotationVel() {
return(m_rotationVelocity);
}
function getScaleX(ipTime) {
return(m_scaleX.getValue(ipTime));
}
function getScaleXVel() {
return(m_scaleXVelocity);
}
function getScaleY(ipTime) {
return(m_scaleY.getValue(ipTime));
}
function getScaleYVel() {
return(m_scaleYVelocity);
}
function getAlpha(ipTime) {
return(m_alpha.getValue(ipTime));
}
function getAlphaVel() {
return(m_alphaVelocity);
}
function getVisible(ipTime) {
if (ipTime < 1) {
return(m_visible[0]);
}
return(m_visible[1]);
}
function setDestroyTick(tick) {
m_destroyTick = tick;
}
function getDestroyTick() {
return(m_destroyTick);
}
function setClip(symbol, worldLayer, clipName) {
if (m_objectView != undefined) {
deleteObjectView();
}
createObjectView();
getObjectView().setObject(this);
getObjectView().setClip(symbol, worldLayer, clipName);
}
function createObjectView() {
m_objectView = new com.midasplayer.gameCore.WorldObjectView();
}
function onMouseEvent() {
}
function inputEnabled(input) {
return((input & m_inputEnabled) == input);
}
function onPress() {
}
function onRelease() {
}
function onRollOver() {
}
function onRollOut() {
}
function onDragOver() {
}
function onDragOut() {
}
function onClipLoaded() {
}
function onAddedToWorld() {
}
function onRemovedFromWorld() {
}
function tick() {
}
function updatePhysics() {
}
function update() {
if ((m_destroyTick != -1) && (m_gameLogic.getTickCount() >= m_destroyTick)) {
m_world.removeWorldObject(this);
}
m_posX.updateValue(m_posX.getNextValue() + m_posVelocityX);
m_posY.updateValue(m_posY.getNextValue() + m_posVelocityY);
if (isPhysicsEnabled()) {
m_posVelocityY = m_posVelocityY + m_gravity;
}
m_rotation.updateValue(m_rotation.getNextValue() + m_rotationVelocity);
m_alpha.updateValue(m_alpha.getNextValue() + m_alphaVelocity);
m_scaleX.updateValue(m_scaleX.getNextValue() + m_scaleXVelocity);
m_scaleY.updateValue(m_scaleY.getNextValue() + m_scaleYVelocity);
m_visible[0] = m_visible[1];
if (isAnimated()) {
if (isAnimPlaying()) {
var _local4 = m_animFrame.getNextValue() + m_playbackSpeed;
m_animFrame.updateValue(_local4);
var _local3 = m_animFrame.getPrevValue();
var _local2 = getObjectView().getFrames();
if (_local3 > _local2) {
if (!isAnimLooping()) {
m_animFrame.setValue(_local2);
animStop();
} else {
m_animFrame.setNextValue(m_animFrame.getNextValue() - getObjectView().getFrames());
m_animFrame.setPrevValue(m_animFrame.getPrevValue() - getObjectView().getFrames());
}
}
}
}
}
function render(ipTime) {
getObjectView().render(ipTime);
}
static var INPUT_MOUSE_PRESS = 1;
static var INPUT_MOUSE_RELEASE = 2;
static var INPUT_MOUSE_ROLL_OVER = 4;
static var INPUT_MOUSE_ROLL_OUT = 8;
static var INPUT_MOUSE_DRAG_OVER = 16;
static var INPUT_MOUSE_DRAG_OUT = 32;
var m_objectId = -1;
var m_inputEnabled = 0;
var m_worldLayer = 0;
var m_performCollision = false;
var m_physicsEnabled = true;
var m_animated = false;
var m_playing = true;
var m_looping = true;
var m_playbackSpeed = 0.2;
var m_posVelocityX = 0;
var m_posVelocityY = 0;
var m_gravity = 0;
var m_rotationVelocity = 0;
var m_scaleXVelocity = 0;
var m_scaleYVelocity = 0;
var m_alphaVelocity = 0;
var m_destroyTick = -1;
}
Symbol 349 MovieClip [__Packages.com.midasplayer.gameCore.WorldObjectView] Frame 0
class com.midasplayer.gameCore.WorldObjectView
{
var m_object, m_clip;
function WorldObjectView () {
}
function setObject(worldObject) {
m_object = worldObject;
}
function getObject() {
return(m_object);
}
function getClip() {
return(m_clip);
}
function getFrames() {
return(getClip()._framesloaded);
}
function setClip(symbol, worldLayer, clipName) {
if (symbol == undefined) {
symbol = getObject().getDefaultSymbol();
}
if (worldLayer != undefined) {
m_worldLayer = worldLayer;
}
if ((clipName == undefined) || (clipName == null)) {
clipName = (symbol + "_") + getObject().getObjId();
}
var _local5 = getObject().getWorld().getLayer(m_worldLayer);
var _local3 = _local5.getNextHighestDepth();
if (m_clip != undefined) {
_local3 = m_clip.getDepth();
m_clip.removeMovieClip();
}
if (symbol != "") {
m_clip = _local5.attachMovie(symbol, clipName, _local3);
if (m_clip == undefined) {
trace(((((("Falied to attach clip: " + symbol) + " for objId: ") + getObject().getObjId()) + " Symbol: '") + symbol) + "'");
}
} else {
m_clip = undefined;
}
useHandCursor(m_useHandCursor);
getObject().setFrame(1);
if (getObject().isAnimated()) {
m_clip.stop();
}
getObject().onClipLoaded();
onClipLoaded();
setupInput();
render(0);
}
function useHandCursor(useHand) {
m_useHandCursor = useHand;
getClip().useHandCursor = m_useHandCursor;
}
function setupInput() {
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_PRESS)) {
getClip().onPress = mx.utils.Delegate.create(this, onPress);
}
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_RELEASE)) {
getClip().onRelease = mx.utils.Delegate.create(this, onRelease);
}
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OVER)) {
getClip().onRollOver = mx.utils.Delegate.create(this, onRollOver);
}
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OUT)) {
getClip().onRollOut = mx.utils.Delegate.create(this, onRollOut);
}
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_DRAG_OVER)) {
getClip().onRollOut = mx.utils.Delegate.create(this, onDragOut);
}
if (getObject().inputEnabled(com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_DRAG_OUT)) {
getClip().onRollOut = mx.utils.Delegate.create(this, onDragOut);
}
}
function isMouseOver() {
return(m_mouseOver);
}
function onPress() {
getObject().onPress();
getObject().onMouseEvent();
}
function onRelease() {
getObject().onRelease();
getObject().onMouseEvent();
}
function onRollOver() {
getObject().onRollOver();
m_mouseOver = true;
getObject().onMouseEvent();
}
function onRollOut() {
getObject().onRollOut();
m_mouseOver = false;
getObject().onMouseEvent();
}
function onDragOver() {
getObject().onDragOver();
m_mouseOver = true;
getObject().onMouseEvent();
}
function onDragOut() {
getObject().onDragOut();
m_mouseOver = false;
getObject().onMouseEvent();
}
function onClipLoaded() {
}
function render(ipTime) {
if (getClip() == undefined) {
return(undefined);
}
m_clip._x = getObject().getX(ipTime);
m_clip._y = getObject().getY(ipTime);
m_clip._rotation = getObject().getRotation(ipTime);
m_clip._xscale = getObject().getScaleX(ipTime);
m_clip._yscale = getObject().getScaleY(ipTime);
m_clip._alpha = getObject().getAlpha(ipTime);
m_clip._visible = getObject().getVisible(ipTime);
if (getObject().isAnimated()) {
var _local2 = Math.floor(getObject().getFrame(ipTime)) - 1;
if (_local2 < 0) {
_local2 = _local2 + getFrames();
}
if ((!getObject().isAnimLooping()) && (_local2 > (getFrames() - 1))) {
_local2 = getFrames() - 1;
}
_local2 = (_local2 % getFrames()) + 1;
m_clip.gotoAndStop(_local2);
}
if (m_clip._y == undefined) {
trace("error! Objid: " + getObject().getObjId());
}
}
var m_useHandCursor = false;
var m_mouseOver = false;
var m_worldLayer = 0;
}
Symbol 350 MovieClip [__Packages.com.midasplayer.gameCore.InterpolationValue] Frame 0
class com.midasplayer.gameCore.InterpolationValue
{
function InterpolationValue (startValue) {
if (startValue != undefined) {
setValue(startValue);
}
}
function getPrevValue() {
return(m_prevValue);
}
function getNextValue() {
return(m_nextValue);
}
function setValue(valueParam) {
setPrevValue(valueParam);
setNextValue(valueParam);
}
function setPrevValue(valueParam) {
m_prevValue = valueParam;
}
function setNextValue(valueParam) {
m_nextValue = valueParam;
}
function setWaypointValue(valueParam, IPparam) {
m_waypointValue = valueParam;
m_waypointIP = IPparam;
}
function clearWaypoint() {
m_waypointIP = -1;
}
function updateValue(valueParam) {
setPrevValue(getNextValue());
setNextValue(valueParam);
}
function getValue(ipTime) {
if (((ipTime == undefined) || (ipTime == 1)) || (m_prevValue == m_nextValue)) {
return(m_nextValue);
}
if (ipTime == 0) {
return(m_prevValue);
}
if ((m_waypointIP > 0) && (m_waypointIP < 1)) {
if (ipTime == m_waypointIP) {
return(m_waypointValue);
}
if (ipTime < m_waypointIP) {
return(m_prevValue + ((m_waypointValue - m_prevValue) * (ipTime / m_waypointIP)));
}
if (ipTime > m_waypointIP) {
return(m_waypointValue + (((m_nextValue - m_waypointValue) * (ipTime - m_waypointIP)) / (1 - m_waypointIP)));
}
}
return(m_prevValue + ((m_nextValue - m_prevValue) * ipTime));
}
var m_prevValue = 0;
var m_nextValue = 0;
var m_waypointValue = 0;
var m_waypointIP = -1;
}
Symbol 351 MovieClip [__Packages.com.midasplayer.util.Vec2D] Frame 0
class com.midasplayer.util.Vec2D
{
function Vec2D (x, y) {
if (x != undefined) {
this.x = x;
}
if (y != undefined) {
this.y = y;
}
}
function toString() {
return(((("<" + x) + ", ") + y) + ">");
}
function addition(vec) {
return(new com.midasplayer.util.Vec2D(x + vec.x, y + vec.y));
}
function subtract(vec) {
return(new com.midasplayer.util.Vec2D(x - vec.x, y - vec.y));
}
function multiply(scalar) {
return(new com.midasplayer.util.Vec2D(x * scalar, y * scalar));
}
function divide(scalar) {
return(new com.midasplayer.util.Vec2D(x / scalar, y / scalar));
}
function normalize() {
return(divide(length()));
}
function length() {
return(Math.sqrt(lengthSqr()));
}
function lengthSqr() {
return(Math.pow(x, 2) + Math.pow(y, 2));
}
function dot(vec) {
return((x * vec.x) + (y * vec.y));
}
function project(vec) {
var _local4 = dot(vec);
var _local3 = new com.midasplayer.util.Vec2D();
_local3.x = (_local4 / ((vec.x * vec.x) + (vec.y * vec.y))) * vec.x;
_local3.y = (_local4 / ((vec.x * vec.x) + (vec.y * vec.y))) * vec.y;
return(_local3);
}
var x = 0;
var y = 0;
}
Symbol 352 MovieClip [__Packages.com.midasplayer.gameCore.GameLogicBase] Frame 0
class com.midasplayer.gameCore.GameLogicBase implements com.midasplayer.gameCore.IGameLogic
{
var m_gameCore, m_gameView, m_world, m_infoScreen;
function GameLogicBase () {
}
function setGameCore(gameCore) {
m_gameCore = gameCore;
}
function getGameCore() {
return(m_gameCore);
}
function setGameView(gameView) {
m_gameView = gameView;
getGameView().setGameLogic(this);
getGameView().init();
}
function getGameView() {
return(m_gameView);
}
function getWorld() {
return(m_world);
}
function getTickCount() {
return(getGameCore().getTickCount());
}
function getIPTime() {
return(getGameCore().getIPTime());
}
function getGameTime() {
return(getGameCore().getGameTime());
}
function getScore() {
return(getGameCore().getScore());
}
function setScore(score) {
getGameCore().setScore(score);
}
function addScore(score) {
getGameCore().addScore(score);
}
function getLevel() {
return(getGameCore().getLevel());
}
function getNumberLevels() {
return(getGameCore().getNumberLevels());
}
function getTimeLeft(ipTime) {
return(getGameCore().getTimeLeft(ipTime));
}
function getTimeLeftPercent(ipTime) {
return(getGameCore().getTimeLeftPercent(ipTime));
}
function setState(state, pendingStateTarget) {
getGameCore().setState(state, pendingStateTarget);
}
function getState() {
return(getGameCore().getState());
}
function isPractice() {
return(PRACTICE_GAME);
}
function isDev() {
return(DEV);
}
function isLocalGame() {
return(LOCAL_GAME);
}
function coreTick() {
m_world.tick();
m_gameView.tick();
}
function render(ipTime) {
m_world.render(ipTime);
m_gameView.render(ipTime);
}
function updateInstructions() {
if (m_infoScreen == undefined) {
m_infoScreen = new com.midasplayer.gameCore.InfoScreen();
m_infoScreen.setExitState(this, com.midasplayer.gameCore.GameCore.STATE_START_GAME);
getGameView().initInstructions(m_infoScreen);
}
getGameView().updateInstructions(m_infoScreen);
m_infoScreen.update();
}
function updateSummary() {
if (m_infoScreen == undefined) {
m_infoScreen = new com.midasplayer.gameCore.InfoScreen();
m_infoScreen.setExitState(this, com.midasplayer.gameCore.GameCore.STATE_SETUP);
m_gameView.initSummary(m_infoScreen);
}
getGameView().updateSummary(m_infoScreen);
m_infoScreen.update();
}
function updateGameOver() {
if (m_infoScreen == undefined) {
m_infoScreen = new com.midasplayer.gameCore.InfoScreen();
m_infoScreen.setExitState(this, com.midasplayer.gameCore.GameCore.STATE_END_GAME);
m_gameView.initGameOver(m_infoScreen);
}
getGameView().updateGameOver(m_infoScreen);
m_infoScreen.update();
}
function infoScreenExit(state) {
setState(state);
delete m_infoScreen;
}
function completeLevel() {
getGameCore().completeLevel();
}
function gameOver() {
getGameCore().gameOver();
}
function sendRequest(request) {
request = request.split("<").join("<");
request = request.split(">").join(">");
request = request.split(""").join("\"");
fscommand ("request", request);
}
function init() {
}
function setGameData(gda) {
}
function setupLevel() {
}
function levelOver() {
}
function tick() {
}
function responseReceived(response) {
}
function trace(string) {
if (getGameCore().isClient()) {
trace(string);
var _local2 = getGameCore().getScopeRef().debug_text;
_local2.text = (string + newline) + _local2.text;
if (!DEV) {
_local2._visible = false;
}
} else if (getGameCore().isServer()) {
}
}
static var PRACTICE_GAME = false;
static var DEV = false;
static var LOCAL_GAME = false;
}
Symbol 353 MovieClip [__Packages.com.midasplayer.millionaire.GameLogic] Frame 0
class com.midasplayer.millionaire.GameLogic extends com.midasplayer.gameCore.GameLogicBase
{
var getTickCount, m_question, m_scorePerLevel, m_lifelinePerLevel, isDev, getGameCore, m_world, getWorld, m_answers, m_lifelines, m_walkAway, m_spotAnim, getState, isLocalGame, getLevel, trace, getTimeLeft, m_lifelineAnim, getIPTime, getScore, setScore, m_requestQuestionId, completeLevel, addScore;
function GameLogic () {
super();
}
function isUpdateViewTick() {
return(m_updateViewTick == getTickCount());
}
function hasAnswered() {
return(m_givenAnswer != -1);
}
function isAnswerCorrect() {
return((m_givenAnswer != -1) && (m_givenAnswer == m_correctAnswer));
}
function getAnswerId() {
return(m_givenAnswer);
}
function getQuestion() {
return(m_question);
}
function getQuestionText() {
return(m_question.getText());
}
function getScoreForLevel(level) {
return(Number(m_scorePerLevel.get(level)));
}
function getLifelineForLevel(level) {
return(Number(m_lifelinePerLevel.get(level)));
}
function getLifelineUsed() {
return(m_lifelineUsed);
}
function getNumLifelinesUsed() {
return(m_numLifelinesUsed);
}
function getSafetyLevelScore() {
return(m_safetyLevelScore);
}
function getRequestCount() {
return(m_requestCount);
}
function isQuestionReceived() {
return(m_questionReceived);
}
function getGameView() {
return(com.midasplayer.millionaire.GameView(super.getGameView()));
}
function init() {
com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME = false;
com.midasplayer.gameCore.GameLogicBase.DEV = false;
com.midasplayer.gameCore.GameLogicBase.LOCAL_GAME = false;
if (com.midasplayer.gameCore.GameLogicBase.LOCAL_GAME) {
com.midasplayer.millionaire.DummyQuestions.m_gameLogic = this;
}
if (isDev()) {
new com.midasplayer.util.FpsCounter(getGameCore().getScopeRef());
}
getGameCore().setPendingStateDuration(6);
m_scorePerLevel = new com.midasplayer.util.ArrayList();
m_lifelinePerLevel = new com.midasplayer.util.ArrayList();
m_world = new com.midasplayer.gameCore.World(getGameCore().getScopeRef(), this);
m_question = new com.midasplayer.millionaire.ScalingText();
m_question.setPos(295, 315);
getWorld().addWorldObject(m_question, "question", LAYER_QUESTION);
m_answers = new com.midasplayer.util.ArrayList();
var _local5 = 295;
var _local6 = 0;
while (_local6 < NUM_ANSWERS) {
var _local4 = new com.midasplayer.millionaire.Answer();
if (_local6 == 0) {
_local4.setPos(_local5 - 145, 365);
getWorld().addWorldObject(_local4, "answerA", LAYER_QUESTION);
}
if (_local6 == 1) {
_local4.setPos(_local5 + 145, 365);
getWorld().addWorldObject(_local4, "answerB", LAYER_QUESTION);
}
if (_local6 == 2) {
_local4.setPos(_local5 - 145, 400);
getWorld().addWorldObject(_local4, "answerC", LAYER_QUESTION);
}
if (_local6 == 3) {
_local4.setPos(_local5 + 145, 400);
getWorld().addWorldObject(_local4, "answerD", LAYER_QUESTION);
}
m_answers.insert(_local4);
_local6++;
}
m_lifelines = new com.midasplayer.util.ArrayList();
_local6 = 0;
while (_local6 < 3) {
var _local3 = new com.midasplayer.millionaire.Lifeline();
if (_local6 == 0) {
_local3.setLifelineType(LIFELINE_TYPE_5050);
_local3.setPos(_local5 - 220, 95);
getWorld().addWorldObject(_local3, "mcLifeline5050", LAYER_LIFELINE_ICON);
}
if (_local6 == 1) {
_local3.setLifelineType(LIFELINE_TYPE_FRIEND);
_local3.setPos(_local5 - 220, 150);
getWorld().addWorldObject(_local3, "mcLifelineFriend", LAYER_LIFELINE_ICON);
}
if (_local6 == 2) {
_local3.setLifelineType(LIFELINE_TYPE_AUDIENCE);
_local3.setPos(_local5 - 220, 205);
getWorld().addWorldObject(_local3, "mcLifelineAudience", LAYER_LIFELINE_ICON);
}
m_lifelines.insert(_local3);
_local6++;
}
m_walkAway = new com.midasplayer.millionaire.WalkAway();
m_walkAway.setPos(672.5, 245);
getWorld().addWorldObject(m_walkAway, "mcWalkAway", LAYER_QUESTION);
new com.midasplayer.fx.SoundToggle(_root, 127, 450);
com.midasplayer.fx.SoundToggle.ENABLED_FRAME = 3;
com.midasplayer.fx.SoundToggle.DISABLED_FRAME = 1;
com.midasplayer.fx.SoundToggle.ENABLED_MOUSE_OVER_FRAME = 4;
com.midasplayer.fx.SoundToggle.DISABLED_MOUSE_OVER_FRAME = 2;
m_spotAnim = getWorld().addWorldObject(new com.midasplayer.gameCore.WorldObject(), "spotAnim1", LAYER_SPOT_ANIM);
var _local7 = new Color(m_spotAnim.getObjectView().getClip());
_local7.setRGB(14380971);
m_spotAnim.getObjectView().getClip()._alpha = 60;
m_spotAnim.setPos(325, 235);
m_spotAnim.setFps(20);
m_spotAnim.setAnimLooping(false);
m_spotAnim.animStop();
m_spotAnim.setAnimated(true);
}
function tick() {
if ((!isQuestionReceived()) || (hasAnswered() && (getState() == com.midasplayer.gameCore.GameCore.STATE_RUNNING))) {
getGameCore().addTime(com.midasplayer.gameCore.GameCore.TIME_PER_TICK);
}
}
function getAnswerBySlot(answerSlot) {
return(com.midasplayer.millionaire.Answer(m_answers.get(answerSlot)));
}
function getAnswerById(answerId) {
var _local2 = 0;
while (_local2 < NUM_ANSWERS) {
var _local3 = getAnswerBySlot(_local2);
if (_local3.getAnswerId() == answerId) {
return(_local3);
}
_local2++;
}
return(undefined);
}
function setGameData(gda) {
var _local2 = Number(gda.getGameData("languageFrame"));
getGameView().setLanguageFrame(_local2);
m_walkAway.updateText();
updateLanguageFrames();
}
function updateLanguageFrames() {
var _local3 = 0;
while (_local3 < m_lifelines.size()) {
m_lifelines.get(_local3).init();
_local3++;
}
var _local2 = 0;
while (_local2 < m_answers.size()) {
m_answers.get(_local2).init();
_local2++;
}
}
function setupLevel() {
m_questionReceived = false;
m_givenAnswer = -1;
m_correctAnswer = -1;
m_lifelineUsed = LIFELINE_TYPE_NONE;
var _local4 = 1 + (4 * (com.midasplayer.gameCore.GameCore.getLanguageFrame() - 1));
m_question.getObjectView().getClip().gotoAndStop(_local4);
requestQuestion();
clearLifelineAnim();
var _local2 = 0;
while (_local2 < NUM_ANSWERS) {
var _local3 = com.midasplayer.millionaire.Answer(m_answers.get(_local2));
_local3.clear();
_local3.getObjectView().useHandCursor(true);
_local2++;
}
m_walkAway.getObjectView().useHandCursor(true);
if (isLocalGame()) {
com.midasplayer.millionaire.DummyQuestions.getQuestionXML();
}
if (getLevel() == 0) {
com.midasplayer.fx.SoundManager.play(SOUND_LOOP, SOUND_LOOP_VOLUME, true);
}
}
function requestQuestion() {
var _local3 = ("<question " + getGameStateString()) + "></question>";
sendRequest(_local3);
trace("SendRequest: \n" + _local3);
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
var _local2 = ("123," + getLevel()) + " ,=0";
fscommand ("playData", _local2);
trace("playData: " + _local2);
}
}
function levelOver() {
if (getTimeLeft() <= 0) {
com.midasplayer.fx.SoundManager.play(SOUND_TIME_UP);
}
}
function gameOver(gameOverFinished) {
trace("gameOver");
if (gameOverFinished) {
super.gameOver();
} else {
walkAway();
}
}
function clearQuestions() {
var _local4 = 1 + (4 * (com.midasplayer.gameCore.GameCore.getLanguageFrame() - 1));
m_question.getObjectView().getClip().gotoAndStop(_local4);
m_question.setText("");
var _local2 = 0;
while (_local2 < NUM_ANSWERS) {
var _local3 = com.midasplayer.millionaire.Answer(m_answers.get(_local2));
_local3.clear();
_local3.getObjectView().useHandCursor(false);
_local2++;
}
m_walkAway.getObjectView().useHandCursor(false);
clearLifelineAnim();
}
function clearLifelineAnim() {
if (m_lifelineAnim != undefined) {
getWorld().removeWorldObject(m_lifelineAnim);
m_lifelineAnim = undefined;
}
}
function useLifeline(lifelineType) {
var _local3 = ((("<lifeline " + getGameStateString()) + " type=\"") + lifelineType) + "\"></lifeline>";
sendRequest(_local3);
trace("SendRequest: \n" + _local3);
if (m_lifelineUsed == LIFELINE_TYPE_NONE) {
m_lifelinePerLevel.insert(lifelineType);
}
m_lifelineUsed = lifelineType;
m_numLifelinesUsed++;
m_lifelinesUsed[lifelineType] = true;
com.midasplayer.fx.SoundManager.play(SOUND_CLICK);
if (isLocalGame()) {
com.midasplayer.millionaire.DummyQuestions.getLifelineXML(lifelineType);
}
}
function answer(answerId) {
m_givenAnswer = answerId;
var _local2 = getTimeLeft(getIPTime());
if (_local2 < 0) {
return(undefined);
}
var _local4 = ((((("<answer " + getGameStateString()) + " id=\"") + answerId) + "\" timeLeft=\"") + _local2) + "\"></answer>";
sendRequest(_local4);
trace("SendRequest: \n" + _local4);
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
var _local3 = ((("946," + answerId) + " ") + _local2) + " ,=0";
fscommand ("playData", _local3);
trace("playData: " + _local3);
}
com.midasplayer.fx.SoundManager.play(SOUND_CLICK);
if (isLocalGame()) {
com.midasplayer.millionaire.DummyQuestions.getAnswerXML();
}
if (m_lifelineUsed == LIFELINE_TYPE_NONE) {
m_lifelinePerLevel.insert(LIFELINE_TYPE_NONE);
}
m_spotAnim.setFrame(1);
m_spotAnim.animPlay();
}
function walkAway() {
var _local3 = getTimeLeft(getIPTime());
var _local2 = ((("<walk " + getGameStateString()) + "timeLeft=\"") + _local3) + "\"></walk>";
sendRequest(_local2);
trace("SendRequest: \n" + _local2);
if (isLocalGame()) {
com.midasplayer.millionaire.DummyQuestions.getWalkAwayXML();
}
}
function responseReceived(response) {
if (com.midasplayer.gameCore.GameLogicBase.DEV) {
trace(("Response: " + response) + newline);
}
var _local23 = new XML(response);
var _local3 = _local23.firstChild;
if (_local3.nodeName == "question") {
var _local16 = -1;
var _local11 = -1;
var _local19;
var _local14 = new com.midasplayer.util.ArrayList();
var _local13 = new com.midasplayer.util.ArrayList();
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "id") {
_local16 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "level") {
_local11 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "text") {
_local19 = new String(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "answer") {
_local14.insert(new String(_local2.firstChild.nodeValue));
_local13.insert(new Number(_local2.attributes.answerId));
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
setQuestion(_local19, _local14, _local13);
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
var _local21 = ((("222," + _local16) + " ") + _local11) + " =0";
fscommand ("playData", _local21);
trace("playData: " + _local21);
}
} else if (_local3.nodeName == "lifeline") {
var _local4 = new com.midasplayer.util.ArrayList();
var _local24 = "mcAnimation";
if (_local3.attributes.type == LIFELINE_TYPE_5050) {
_local4.insert("5050");
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "answer") {
var _local7 = new Number(_local2.firstChild.nodeValue);
_local4.insert(_local7);
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
} else if (_local3.attributes.type == LIFELINE_TYPE_FRIEND) {
_local4.insert("Friend");
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "answer") {
var _local5 = new String(_local2.firstChild.nodeValue);
_local4.insert(_local5);
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
} else if (_local3.attributes.type == LIFELINE_TYPE_AUDIENCE) {
_local4.insert("Audience");
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "answer") {
var _local6 = new Number(_local2.firstChild.nodeValue);
_local4.insert(_local6);
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
}
if (m_lifelineAnim != undefined) {
trace("remove old lifeline anim");
getWorld().removeWorldObject(m_lifelineAnim);
}
m_lifelineAnim = new com.midasplayer.millionaire.LifelineAnimation();
var _local20 = "mcAnimation" + _local4.get(0);
if ((_local4.get(0) == "5050") && (com.midasplayer.gameCore.GameCore.getLanguageFrame() == com.midasplayer.millionaire.GameView.LANGUAGE_FRAME_DANISH)) {
_local20 = _local20 + "_dk";
}
trace("symbol: " + _local20);
getWorld().addWorldObject(m_lifelineAnim, _local20, LAYER_LIFELINE_ANIMATION);
m_lifelineAnim.setPos(192, 150);
m_lifelineAnim.setData(_local4);
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
var _local21 = ("588," + _local3.attributes.type) + " ,=0";
fscommand ("playData", _local21);
trace("playData: " + _local21);
}
} else if (_local3.nodeName == "answer") {
var _local16 = -1;
var _local11 = -1;
var _local9 = -1;
var _local12 = 0;
var _local17 = 0;
var _local10 = 0;
var _local8 = getScore();
var _local15 = 0;
var _local18;
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "id") {
_local16 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "level") {
_local11 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "correct") {
_local9 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "clientTimeLeft") {
_local12 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "serverTimeLeft") {
_local17 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "levelScore") {
_local10 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "totalScore") {
_local8 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "safetyLevelScore") {
_local15 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "c") {
_local18 = new String(_local2.firstChild.nodeValue);
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
checkAnswer(_local9, _local10, _local8, _local15);
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
var _local21 = ((((((((((((((((("486," + m_givenAnswer) + " ") + _local12) + " ") + _local17) + " ") + _local10) + " ") + _local8) + " ") + _local18) + " ") + _local9) + " ") + _local16) + " ") + _local11) + " ,=0";
fscommand ("playData", _local21);
trace("playData: " + _local21);
}
} else if ((_local3.nodeName == "walk") || (_local3.nodeName == "timeOut")) {
var _local12 = 0;
var _local17 = 0;
var _local10 = 0;
var _local8 = 0;
var _local2 = _local3.firstChild;
while (_local2 != null) {
if (_local2.nodeName == "clientTimeLeft") {
_local12 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "serverTimeLeft") {
_local17 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "levelScore") {
_local10 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "totalScore") {
_local8 = new Number(_local2.firstChild.nodeValue);
} else if (_local2.nodeName == "c") {
var _local18 = new String(_local2.firstChild.nodeValue);
}
checkForServerJump(_local2);
_local2 = _local2.nextSibling;
}
m_scorePerLevel.insert(_local8 - getScore());
setScore(_local8);
gameOver(true);
INFO_UPDATE_DELAY = 0;
setPendingUpdate();
if (!com.midasplayer.gameCore.GameLogicBase.PRACTICE_GAME) {
trace("walk away");
if (_local3.nodeName == "walk") {
var _local21 = "753,";
} else {
var _local21 = "777,";
}
var _local21 = _local21 + (((((((((("-1 " + _local12) + " ") + _local17) + " ") + _local10) + " ") + _local8) + " ") + _local18) + " ,=0");
fscommand ("playData", _local21);
trace("playData: " + _local21);
}
} else {
var _local21 = ("111," + response) + " ,=0";
fscommand ("playData", _local21);
trace("playData: " + _local21);
}
}
function checkForServerJump(aNode) {
if (aNode.nodeName == "serverJump") {
var _local1 = String(aNode.firstChild.nodeValue);
if (_local1 == "true") {
var _local2 = "666, ,=0";
fscommand ("playData", _local2);
}
}
}
function setQuestion(questionText, answerTexts, answerIds) {
m_questionReceived = true;
clearInterval(m_requestQuestionId);
m_question.setText(questionText);
var _local2 = 0;
while (_local2 < answerTexts.size()) {
var _local3 = com.midasplayer.millionaire.Answer(m_answers.get(_local2));
var _local5 = String(answerTexts.get(_local2));
var _local4 = Number(answerIds.get(_local2));
_local3.setText(_local5);
_local3.setAnswerId(_local4);
_local3.setDisabled(false);
_local2++;
}
}
function checkAnswer(correctAnswerId, levelScore, totalScore, safetyLevelScore) {
setPendingUpdate();
m_correctAnswer = correctAnswerId;
var _local3 = getAnswerById(m_correctAnswer);
_local3.setCorrect(true);
m_safetyLevelScore = safetyLevelScore;
if (m_givenAnswer == correctAnswerId) {
trace("-- score add: " + levelScore);
completeLevel();
addScore(levelScore);
m_scorePerLevel.insert(levelScore);
} else {
setScore(totalScore);
trace("WRONG ANSWER - GAME_OVER!!");
gameOver(true);
}
}
function getGameStateString() {
var _local2 = "";
_local2 = _local2 + ((" level=\"" + getLevel()) + "\"");
_local2 = _local2 + ((" score=\"" + getScore()) + "\"");
_local2 = _local2 + ((" lifelinesUsed0=\"" + m_lifelinesUsed[0]) + "\"");
_local2 = _local2 + ((" lifelinesUsed1=\"" + m_lifelinesUsed[1]) + "\"");
_local2 = _local2 + ((" lifelinesUsed2=\"" + m_lifelinesUsed[2]) + "\"");
_local2 = _local2 + ((" safetyLevelScore=\"" + getSafetyLevelScore()) + "\"");
_local2 = _local2 + ((" lifelineUsed=\"" + getLifelineUsed()) + "\"");
_local2 = _local2 + ((" rc=\"" + getRequestCount()) + "\"");
_local2 = _local2 + " ";
return(_local2);
}
function sendRequest(query) {
super.sendRequest(query);
m_requestCount++;
}
function setPendingUpdate() {
m_updateViewTick = getTickCount() + (INFO_UPDATE_DELAY * com.midasplayer.gameCore.GameCore.TICKS_PER_SECOND);
}
function updateAnswersView() {
var _local2 = 0;
while (_local2 < NUM_ANSWERS) {
var _local3 = com.midasplayer.millionaire.Answer(m_answers.get(_local2));
_local3.updateView();
_local2++;
}
}
static var NUM_ANSWERS = 4;
static var LIFELINE_TYPE_NONE = -1;
static var LIFELINE_TYPE_5050 = 0;
static var LIFELINE_TYPE_FRIEND = 1;
static var LIFELINE_TYPE_AUDIENCE = 2;
static var LAYER_LIFELINE_ANIMATION = 0;
static var LAYER_LIFELINE_ICON = 1;
static var LAYER_SPOT_ANIM = 2;
static var LAYER_QUESTION = 3;
static var SOUND_INTRO = "intro";
static var SOUND_LOOP = "loop";
static var SOUND_LOOP_VOLUME = 50;
static var SOUND_CLICK = "click";
static var SOUND_BIG_CORRECT = "big_correct";
static var SOUND_SMALL_CORRECT = "small_correct";
static var SOUND_BIG_WRONG = "big_wrong";
static var SOUND_SMALL_WRONG = "small_wrong";
static var SOUND_TIME_OUT = "lifeline_5050";
static var SOUND_SAFETY_LEVEL = "safety_level";
static var SOUND_LIFELINE_5050 = "lifeline_5050";
static var SOUND_LIFELINE_FRIEND = "lifeline_friend";
static var SOUND_LIFELINE_AUDIENCE = "lifeline_audience";
static var SOUND_TIME_UP = "time_up";
static var SOUND_GAME_OVER = "intro";
static var SAFETY_LEVEL = new Array(4, 9);
static var INFO_UPDATE_DELAY = 2;
var m_lifelineUsed = -1;
var m_lifelinesUsed = new Array(false, false, false);
var m_safetyLevelScore = 0;
var m_numLifelinesUsed = 0;
var m_questionReceived = false;
var m_requestCount = 0;
var m_updateViewTick = -1;
var m_givenAnswer = -1;
var m_correctAnswer = -1;
}
Symbol 354 MovieClip [__Packages.com.midasplayer.millionaire.MillionaireWorldObject] Frame 0
class com.midasplayer.millionaire.MillionaireWorldObject extends com.midasplayer.gameCore.WorldObject
{
function MillionaireWorldObject () {
super();
}
function getGameLogic() {
return(com.midasplayer.millionaire.GameLogic(super.getGameLogic()));
}
}
Symbol 355 MovieClip [__Packages.com.midasplayer.millionaire.ScalingText] Frame 0
class com.midasplayer.millionaire.ScalingText extends com.midasplayer.millionaire.MillionaireWorldObject
{
var m_objectView;
function ScalingText () {
super();
}
function getObjectView() {
return(com.midasplayer.millionaire.ScalingTextView(super.getObjectView()));
}
function createObjectView() {
m_objectView = new com.midasplayer.millionaire.ScalingTextView();
}
function setText(text) {
getObjectView().setText(text);
}
function getText() {
return(getObjectView().getText());
}
}
Symbol 356 MovieClip [__Packages.com.midasplayer.millionaire.ScalingTextView] Frame 0
class com.midasplayer.millionaire.ScalingTextView extends com.midasplayer.gameCore.WorldObjectView
{
var getClip;
function ScalingTextView () {
super();
}
function setText(text) {
com.midasplayer.util.TextScaler.setText(getClip().text, text);
}
function getText() {
return(getClip().text.text);
}
}
Symbol 357 MovieClip [__Packages.com.midasplayer.util.TextScaler] Frame 0
class com.midasplayer.util.TextScaler
{
function TextScaler () {
}
static function setText(textField, str, maxSize) {
var _local9 = str;
var _local6 = textField._width;
var _local7 = textField._height;
if (maxSize == undefined) {
maxSize = MAX_SIZE;
}
var _local4 = maxSize;
var _local8 = 2;
textField.text = str;
while (true) {
var _local1 = new TextFormat();
_local1.size = _local4;
textField.setTextFormat(_local1);
var _local5 = textField.getTextFormat();
var _local3 = fitText(_local9, _local5, _local6, _local7);
if ((_local3 != false) || (_local4 == _local8)) {
textField.text = _local3;
textField.setTextFormat(_local1);
break;
}
_local4--;
}
}
static function fitText(textString, myTextFormat, boxWidth, boxHeight) {
if (textString == "") {
return(textString);
}
textString = textString.split("\n\r").join(" ");
textString = textString.split("\r\n").join(" ");
textString = textString.split(newline).join(" ");
textString = textString.split("\r").join(" ");
textString = textString.split(" ").join(" ");
textString = textString.split(" ").join(" ");
textString = textString.split("\r ").join("\r");
var _local2 = myTextFormat.getTextExtent(textString, boxWidth);
if (boxHeight > _local2.textFieldHeight) {
return(textString);
}
return(false);
}
static var MAX_SIZE = 20;
}
Symbol 358 MovieClip [__Packages.com.midasplayer.millionaire.LifelineAnimation] Frame 0
class com.midasplayer.millionaire.LifelineAnimation extends com.midasplayer.millionaire.MillionaireWorldObject
{
var setAnimated, setFps, setAnimLooping, getObjectView, m_dataList, getGameLogic, getFrame;
function LifelineAnimation () {
super();
}
function onClipLoaded() {
setAnimated(true);
setFps(25);
setAnimLooping(false);
var _local2 = 0;
while (_local2 < 4) {
getObjectView().getClip()["percent_" + _local2]._visible = false;
getObjectView().getClip()["percent_text_" + _local2]._visible = false;
getObjectView().getClip()["percent_sign_" + _local2]._visible = false;
_local2++;
}
getObjectView().getClip().header._visible = false;
getObjectView().getClip().question_text._visible = false;
getObjectView().getClip().answer_text._visible = false;
}
function setData(dataList) {
m_dataList = dataList;
m_startTick = getGameLogic().getTickCount();
}
function tick() {
if ((getFrame() >= 35) && (m_startTick != -1)) {
trace("do shit");
m_startTick = -1;
trace(m_dataList.get(0));
if (m_dataList.get(0) == "5050") {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_LIFELINE_5050);
var _local2 = 1;
while (_local2 < m_dataList.size()) {
var _local6 = Number(m_dataList.get(_local2));
var _local3 = getGameLogic().getAnswerById(_local6);
if (_local3 != undefined) {
_local3.setDisabled(true);
_local3.setText("");
}
_local2++;
}
} else if (m_dataList.get(0) == "Friend") {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_LIFELINE_FRIEND);
var _local2 = 1;
while (_local2 < m_dataList.size()) {
var _local7 = (com.midasplayer.util.I18n.getString("question") + ": ") + getGameLogic().getQuestionText();
var _local4 = (com.midasplayer.util.I18n.getString("answer") + ": ") + com.midasplayer.util.I18n.getString("friend_text_" + Math.floor(Math.random() * NUM_FRIEND_ANSWERS));
_local4 = _local4.split(FRIEND_TEXT_IDENTIFIER).join(String(m_dataList.get(_local2)));
getObjectView().getClip().header.text = com.midasplayer.util.I18n.getString("connecting") + "...";
getObjectView().getClip().header._visible = true;
com.midasplayer.util.TextScaler.setText(getObjectView().getClip().question_text, _local7, 15);
getObjectView().getClip().question_text._visible = true;
com.midasplayer.util.TextScaler.setText(getObjectView().getClip().answer_text, _local4, 15);
getObjectView().getClip().answer_text._visible = true;
_local2++;
}
} else if (m_dataList.get(0) == "Audience") {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_LIFELINE_AUDIENCE);
var _local2 = 1;
while (_local2 < m_dataList.size()) {
var _local5 = Number(m_dataList.get(_local2));
getObjectView().getClip()["percent_" + (_local2 - 1)]._yscale = _local5;
getObjectView().getClip()["percent_" + (_local2 - 1)]._visible = true;
getObjectView().getClip()["percent_text_" + (_local2 - 1)].text = _local5;
getObjectView().getClip()["percent_text_" + (_local2 - 1)]._visible = true;
getObjectView().getClip()["percent_sign_" + (_local2 - 1)]._visible = true;
_local2++;
}
}
}
}
static var NUM_FRIEND_ANSWERS = 10;
static var FRIEND_TEXT_IDENTIFIER = "X";
var m_startTick = -1;
}
Symbol 359 MovieClip [__Packages.com.midasplayer.millionaire.Answer] Frame 0
class com.midasplayer.millionaire.Answer extends com.midasplayer.millionaire.ScalingText
{
var setDefaultSymbol, setAnimated, setPlaybackSpeed, m_inputEnabled, getObjectView, setFrame, setText, render, getGameLogic;
function Answer () {
super();
setDefaultSymbol("mcAnswerField");
setAnimated(true);
setPlaybackSpeed(0);
m_inputEnabled = com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_RELEASE;
}
function onClipLoaded() {
getObjectView().useHandCursor(true);
}
function setAnswerId(answerId) {
m_answerId = answerId;
}
function getAnswerId() {
return(m_answerId);
}
function setCorrect(correct) {
m_correct = correct;
}
function setDisabled(disabled) {
m_disabled = disabled;
getObjectView().useHandCursor(!disabled);
updateView();
}
function init() {
setFrame(languageTranslatedFrame(1));
}
function languageTranslatedFrame(f) {
var _local1 = f + (ANSWER_NUM_FRAMES * (com.midasplayer.gameCore.GameCore.getLanguageFrame() - 1));
return(_local1);
}
function clear() {
setText("");
setAnswerId(-1);
setCorrect(false);
setDisabled(false);
updateView();
render();
}
function isSelectable() {
if (m_answerId == -1) {
return(false);
}
if (getGameLogic().getState() != com.midasplayer.gameCore.GameCore.STATE_RUNNING) {
return(false);
}
if (getGameLogic().hasAnswered()) {
return(false);
}
if (m_disabled) {
return(false);
}
return(true);
}
function onRelease() {
if (!isSelectable()) {
return(undefined);
}
getGameLogic().answer(getAnswerId());
updateView();
}
function updateView() {
if (m_correct) {
setFrame(languageTranslatedFrame(3));
} else if ((getGameLogic().getAnswerId() == getAnswerId()) && (getAnswerId() != -1)) {
setFrame(languageTranslatedFrame(2));
} else {
setFrame(languageTranslatedFrame(1));
}
}
var m_answerId = -1;
var m_correct = false;
var m_disabled = false;
static var ANSWER_NUM_FRAMES = 3;
}
Symbol 360 MovieClip [__Packages.com.midasplayer.millionaire.WalkAway] Frame 0
class com.midasplayer.millionaire.WalkAway extends com.midasplayer.millionaire.MillionaireWorldObject
{
var getObjectView, m_inputEnabled, setAnimated, setFps, setFrame, getGameLogic;
function WalkAway () {
super();
}
function onClipLoaded() {
getObjectView().useHandCursor(true);
m_inputEnabled = (com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_RELEASE | com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OVER) | com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OUT;
setAnimated(true);
setFps(0);
}
function updateText() {
getObjectView().getClip().text.text = com.midasplayer.util.I18n.getString("walk_away");
}
function onRollOver() {
setFrame(2);
}
function onRollOut() {
setFrame(1);
}
function onRelease() {
if (getGameLogic().getState() != com.midasplayer.gameCore.GameCore.STATE_RUNNING) {
return(undefined);
}
if (getGameLogic().getLevel() == 0) {
return(undefined);
}
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_CLICK);
getObjectView().useHandCursor(false);
getGameLogic().walkAway();
}
}
Symbol 361 MovieClip [__Packages.com.midasplayer.millionaire.GameView] Frame 0
class com.midasplayer.millionaire.GameView extends com.midasplayer.gameCore.GameViewBase
{
function GameView () {
super();
}
function getGameLogic() {
return(com.midasplayer.millionaire.GameLogic(super.getGameLogic()));
}
function setLanguageFrame(frame) {
m_languageFrame = frame;
if (frame == LANGUAGE_FRAME_DANISH) {
SECURITY_SCREEN_SYMBOL = "securityLevelDK";
} else {
SECURITY_SCREEN_SYMBOL = "securityLevel";
}
}
function getCurrencySign() {
return(CURRENCY_SIGN[m_languageFrame - 1]);
}
function getLifelineValueString() {
var _local2;
if (getGameLogic().getLevel() == 4) {
_local2 = 0;
} else if (getGameLogic().getLevel() == 9) {
_local2 = 1;
} else {
return("");
}
return(getCurrencySign() + LIFELINE_LEVELS[m_languageFrame - 1][_local2]);
}
function init() {
_root.time_left.stop();
_root.score_header._visible = false;
_root.score_text._visible = false;
_root.time_left._visible = false;
var _local2 = 1;
while (_local2 <= MAX_LANGUAGE_FRAME_ID) {
if (_root.time_left["bg_" + _local2]) {
_root.time_left["bg_" + _local2]._visible = false;
}
_local2++;
}
_root.level._visible = false;
_root.background._visible = false;
}
function initInstructions(infoScreen) {
_root.background.gotoAndStop(m_languageFrame);
_root.background._visible = true;
if (com.midasplayer.gameCore.GameCore.getLanguageFrame() == LANGUAGE_FRAME_DANISH) {
INTRO_SCREEN_SYMBOL = INTRO_SCREEN_SYMBOL + "_dk";
}
infoScreen.init(_root, INTRO_SCREEN_SYMBOL);
infoScreen.setFps(20);
infoScreen.setLooping(false);
infoScreen.setExpireTime(30);
infoScreen.setExitDelay(0);
infoScreen.setSound(com.midasplayer.millionaire.GameLogic.SOUND_INTRO);
infoScreen.setPos(SCREEN_X, SCREEN_Y + 15);
if (com.midasplayer.gameCore.GameCore.getLanguageFrame() == LANGUAGE_FRAME_DANISH) {
infoScreen.setText("copyright_text", "Who Wants To Be A Millionaire? logo, TM and \u00A9 2010 2waytraffic, a Sony Pictures Entertainment company. All rights reserved");
}
}
function updateInstructions(infoScreen) {
_root[INTRO_SCREEN_SYMBOL + "_infoscreen"].intro_background.gotoAndStop(m_languageFrame);
_root[INTRO_SCREEN_SYMBOL + "_infoscreen"].logo.logo.gotoAndStop(m_languageFrame);
infoScreen.setText("instruction_header", com.midasplayer.util.I18n.getString("instruction_header"));
infoScreen.setText("instruction_text", com.midasplayer.util.I18n.getString("instruction_text"));
infoScreen.setOkButton(infoScreen.getClip().ok_button);
infoScreen.setButtonText(com.midasplayer.util.I18n.getString("start_game"));
}
function initSummary(infoScreen) {
if ((getGameLogic().getLevel() == com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[0]) || (getGameLogic().getLevel() == com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1])) {
infoScreen.init(_root, SECURITY_SCREEN_SYMBOL);
infoScreen.setFps(20);
infoScreen.setExpireTime(10);
infoScreen.setExitDelay(0);
infoScreen.setPos(SCREEN_X + 54.2, SCREEN_Y);
infoScreen.setSound(com.midasplayer.millionaire.GameLogic.SOUND_SAFETY_LEVEL);
if (getGameLogic().getLevel() == com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1]) {
infoScreen.getClip().gotoAndPlay("level10", 1);
}
}
}
function updateSummary(infoScreen) {
if (infoScreen == undefined) {
return(undefined);
}
_root[SECURITY_SCREEN_SYMBOL + "_infoscreen"].summary_background.gotoAndStop(m_languageFrame);
_root[SECURITY_SCREEN_SYMBOL + "_infoscreen"].level.gotoAndStop(m_languageFrame);
_root[SECURITY_SCREEN_SYMBOL + "_infoscreen"].stars.gotoAndStop(m_languageFrame);
var _local4 = com.midasplayer.util.I18n.getString("secure_text");
_local4 = _local4.split(SECURE_TEXT_MONEY_IDENTIFIER).join(getLifelineValueString());
infoScreen.setText("security_header", com.midasplayer.util.I18n.getString("security_header"));
infoScreen.setText("secure_score", com.midasplayer.util.I18n.getString("secure_score") + ":");
infoScreen.setText("score", getGameLogic().getScore() + "");
infoScreen.setText("secure_text", _local4);
infoScreen.setOkButton(infoScreen.getClip().ok_button);
infoScreen.setButtonText(com.midasplayer.util.I18n.getString("continue"));
if ((infoScreen.getClip()._currentframe % 11) == 0) {
getGameLogic().clearQuestions();
}
}
function initGameOver(infoScreen) {
com.midasplayer.fx.SoundManager.stopAll();
getGameLogic().clearQuestions();
infoScreen.init(_root, GAME_OVER_SCREEN_SYMBOL);
_root[GAME_OVER_SCREEN_SYMBOL + "_infoscreen"].game_over_background.gotoAndStop(m_languageFrame);
_root[GAME_OVER_SCREEN_SYMBOL + "_infoscreen"].gotoAndStop(m_languageFrame);
infoScreen.setFps(20);
infoScreen.setLooping(false);
infoScreen.setExpireTime(15);
infoScreen.setExitDelay(0);
infoScreen.setOkButton(infoScreen.getClip().ok_button);
infoScreen.setButtonText(com.midasplayer.util.I18n.getString("game_over"));
infoScreen.setSound(com.midasplayer.millionaire.GameLogic.SOUND_GAME_OVER);
infoScreen.setPos(SCREEN_X + 54.2, SCREEN_Y);
infoScreen.setButtonText(com.midasplayer.util.I18n.getString("continue"));
infoScreen.setText("game_over", com.midasplayer.util.I18n.getString("game_over"));
var _local18 = infoScreen.getClip().game_over.getTextFormat();
var _local16 = _local18.getTextExtent(infoScreen.getClip().game_over.text);
var _local15 = _local16.textFieldWidth;
infoScreen.getClip().star_left._x = -63.5 - ((_local15 / 2) + 10);
infoScreen.getClip().star_right._x = -63.5 + ((_local15 / 2) + 10);
infoScreen.setText("questions_answered", (((com.midasplayer.util.I18n.getString("questions_answered") + ":\n") + getGameLogic().getLevel()) + "/") + getGameLogic().getNumberLevels());
infoScreen.setText("lifelines_used", ((com.midasplayer.util.I18n.getString("lifelines_used") + ":\n") + getGameLogic().getNumLifelinesUsed()) + "/3");
infoScreen.setText("final_score", com.midasplayer.util.I18n.getString("final_score"));
infoScreen.setText("score", getGameLogic().getScore() + "");
if (getGameLogic().getLevel() < getGameLogic().getNumberLevels()) {
infoScreen.getClip().starAnim._visible = false;
}
var _local13 = 0;
var _local17 = !getGameLogic().hasAnswered();
var _local14 = (!_local17) && (!getGameLogic().isAnswerCorrect());
var _local3 = 0;
while (_local3 < getGameLogic().getLevel()) {
var _local9 = infoScreen.getClip();
var _local4 = _local9["score_" + (_local3 + 1)];
var _local10 = getGameLogic().getScoreForLevel(_local3);
_local13 = _local13 + _local10;
var _local8 = String(_local10);
if ((_local8 == "NaN") || (_local8 == "undefined")) {
break;
}
var _local7 = Number(getGameLogic().getLifelineForLevel(_local3));
if (_local7 != com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_NONE) {
var _local5;
var _local6 = "mcLifeline";
if (_local7 == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_5050) {
_local6 = _local6 + "5050";
} else if (_local7 == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_AUDIENCE) {
_local6 = _local6 + "Audience";
} else if (_local7 == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_FRIEND) {
_local6 = _local6 + "Friend";
}
_local5 = _local9.attachMovie(_local6, "lifeline_icon", _local9.getNextHighestDepth());
_local5.gotoAndStop(com.midasplayer.millionaire.Lifeline.languageTranslatedFrame(1));
_local5._xscale = (_local5._yscale = 25);
_local5._y = _local4._y + (_local4._height / 2);
_local5._x = _local4._x + 100;
}
_local4.text = _local8;
if (_local10 < 0) {
_local4.textColor = 16737894 /* 0xFF6666 */;
}
if (_local14) {
var _local12 = getGameLogic().getLevel() - 1;
if (((_local3 > com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1]) || ((_local3 > com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[0]) && (_local12 < com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1]))) || ((_local3 >= 0) && (_local12 < com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[0]))) {
_local4.textColor = 3368601 /* 0x336699 */;
}
}
_local3++;
}
}
function tick() {
var _local3 = com.midasplayer.millionaire.GameLogic(getGameLogic());
if ((_local3.getState() == com.midasplayer.gameCore.GameCore.STATE_LEVEL_OVER_PENDING) && (_local3.isUpdateViewTick())) {
_root.score_text.text = getGameLogic().getScore();
_local3.updateAnswersView();
var _local4 = getGameLogic().getScoreForLevel(_local3.getLevel());
var _local7 = 4;
var _local5 = ((String(_local4) == "NaN") ? 3 : 2);
var _local6 = _local5 + (_local7 * (com.midasplayer.gameCore.GameCore.getLanguageFrame() - 1));
_local3.getQuestion().getObjectView().getClip().gotoAndStop(_local6);
if (_local5 == 2) {
trace("set score: " + _local4);
_local3.getQuestion().getObjectView().getClip().score.text = (com.midasplayer.util.I18n.getString("score") + ": ") + _local4;
} else if (_local5 == 3) {
_local3.getQuestion().getObjectView().getClip().text.text = com.midasplayer.util.I18n.getString("wrong_answer");
}
if (_local3.getTimeLeft() <= 0) {
if (!m_hasPlayedGameOverSound) {
com.midasplayer.fx.SoundManager.stop(com.midasplayer.millionaire.GameLogic.SOUND_LOOP);
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_TIME_UP);
m_hasPlayedGameOverSound = true;
}
} else if (_local3.isAnswerCorrect()) {
if (_local3.getLevel() > com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1]) {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_BIG_CORRECT);
} else {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_SMALL_CORRECT);
}
} else if (_local3.getLevel() > com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1]) {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_BIG_WRONG);
} else {
com.midasplayer.fx.SoundManager.play(com.midasplayer.millionaire.GameLogic.SOUND_SMALL_WRONG);
}
}
}
function render(ipTime) {
var _local3 = getGameLogic().getTimeLeft(ipTime);
var _local4 = _local3 / 1000;
_root.time_left.text1.text = Math.max(Math.round(_local4), 0);
_root.time_left.text2.text = Math.max(Math.round(_local4), 0);
if (((getGameLogic().getState() == com.midasplayer.gameCore.GameCore.STATE_RUNNING) && (_local3 <= 5000)) && ((_local3 % 500) >= 250)) {
_root.time_left.text1._visible = false;
_root.time_left.text2._visible = false;
} else {
_root.time_left.text1._visible = true;
_root.time_left.text2._visible = true;
}
if (getGameLogic().hasAnswered() && (getGameLogic().getState() == com.midasplayer.gameCore.GameCore.STATE_RUNNING)) {
} else {
var _local5 = 1;
if (getGameLogic().isQuestionReceived()) {
_local5 = 100 - Math.round(getGameLogic().getTimeLeftPercent(ipTime));
}
_root.time_left.gotoAndStop(_local5);
}
}
function setupLevel() {
_root.time_left._visible = true;
var _local3 = com.midasplayer.gameCore.GameCore.getLanguageFrame();
if (_local3 == LANGUAGE_FRAME_UK) {
_local3 = 1;
}
if (_root.time_left["bg_" + _local3]) {
_root.time_left["bg_" + _local3]._visible = true;
}
var _local4 = ((m_languageFrame - 1) * LEVEL_COUNTER_NUM_FRAMES) + (getGameLogic().getLevel() + 2);
if (m_languageFrame == LANGUAGE_FRAME_GERMAN) {
_local4--;
}
trace("levelCounterFrame: " + _local4);
_root.level.gotoAndStop(_local4);
_root.level._visible = true;
_root.score_header.text = com.midasplayer.util.I18n.getString("score");
_root.score_header._visible = true;
_root.score_text.text = getGameLogic().getScore();
_root.score_text._visible = true;
}
var SCREEN_X = 377.5;
var SCREEN_Y = 220;
var INTRO_SCREEN_SYMBOL = "introAnim";
var SECURITY_SCREEN_SYMBOL = "";
var GAME_OVER_SCREEN_SYMBOL = "gameOver";
var SECURE_TEXT_MONEY_IDENTIFIER = "$";
var LEVEL_COUNTER_NUM_FRAMES = 17;
var m_hasPlayedGameOverSound = false;
static var LANGUAGE_FRAME_GERMAN = 1;
static var LANGUAGE_FRAME_UK = 2;
static var LANGUAGE_FRAME_DANISH = 3;
static var MAX_LANGUAGE_FRAME_ID = LANGUAGE_FRAME_DANISH;
static var CURRENCY_SIGN = new Array("\u20AC", "\u00A3", "");
static var LIFELINE_LEVELS = new Array(new Array("500", "16,000"), new Array("1,000", "32,000"), new Array("5.000", "50.000"));
var m_languageFrame = LANGUAGE_FRAME_GERMAN;
}
Symbol 362 MovieClip [__Packages.com.midasplayer.millionaire.Lifeline] Frame 0
class com.midasplayer.millionaire.Lifeline extends com.midasplayer.millionaire.MillionaireWorldObject
{
var setAnimated, animStop, setScaleX, setScaleY, m_inputEnabled, m_objectView, setFrame, getGameLogic;
function Lifeline () {
super();
setAnimated(true);
animStop();
setScaleX(60);
setScaleY(60);
m_inputEnabled = (com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_RELEASE | com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OVER) | com.midasplayer.gameCore.WorldObject.INPUT_MOUSE_ROLL_OUT;
}
function getObjectView() {
return(com.midasplayer.millionaire.LifelineView(super.getObjectView()));
}
function createObjectView() {
m_objectView = new com.midasplayer.millionaire.LifelineView();
}
function setLifelineType(type) {
m_lifelineType = type;
}
function getLifelineType() {
return(m_lifelineType);
}
static function languageTranslatedFrame(f) {
var _local1 = f + (LIFELINES_NUM_FRAMES * (com.midasplayer.gameCore.GameCore.getLanguageFrame() - 1));
return(_local1);
}
function init() {
setFrame(languageTranslatedFrame(1));
}
function onClipLoaded() {
getObjectView().useHandCursor(true);
}
function onRollOver() {
if (m_used) {
return(undefined);
}
setFrame(languageTranslatedFrame(2));
}
function onRollOut() {
if (m_used) {
return(undefined);
}
setFrame(languageTranslatedFrame(1));
}
function onRelease() {
if (m_used || (getGameLogic().getState() != com.midasplayer.gameCore.GameCore.STATE_RUNNING)) {
return(undefined);
}
m_used = true;
setFrame(languageTranslatedFrame(3));
getObjectView().useHandCursor(false);
getGameLogic().useLifeline(m_lifelineType);
return(undefined);
}
var m_lifelineType = -1;
var m_used = false;
static var LIFELINES_NUM_FRAMES = 3;
}
Symbol 363 MovieClip [__Packages.com.midasplayer.millionaire.LifelineView] Frame 0
class com.midasplayer.millionaire.LifelineView extends com.midasplayer.gameCore.WorldObjectView
{
var getClip;
function LifelineView () {
super();
}
function onClipLoaded() {
var _local2 = 0;
while (_local2 < 4) {
getClip()["percent_" + _local2]._visible = false;
_local2++;
}
}
function setFriendText(text) {
getClip().text.text = text;
}
function setAudiencePercent(percent) {
var _local2 = 0;
while (_local2 < percent.size()) {
getClip()["percent_" + _local2]._yscale = new Number(percent.get(_local2));
getClip()["percent_" + _local2]._visible = true;
_local2++;
}
}
}
Symbol 364 MovieClip [__Packages.com.midasplayer.millionaire.DummyQuestions] Frame 0
class com.midasplayer.millionaire.DummyQuestions
{
static var m_gameLogic;
function DummyQuestions () {
}
static function getCorrect() {
if (GERMAN) {
var _local1 = new Array(0, 0, 0, 3, 2, 3, 1, 1, 1, 0, 2, 3, 3, 0, 1);
return(_local1[m_gameLogic.getLevel()] + 1);
}
if (m_gameLogic.getLevel() == 0) {
return(1);
}
if (m_gameLogic.getLevel() == 1) {
return(2);
}
if (m_gameLogic.getLevel() == 2) {
return(3);
}
if (m_gameLogic.getLevel() == 3) {
return(3);
}
if (m_gameLogic.getLevel() == 4) {
return(2);
}
if (m_gameLogic.getLevel() == 5) {
return(4);
}
if (m_gameLogic.getLevel() == 6) {
return(2);
}
if (m_gameLogic.getLevel() == 7) {
return(1);
}
if (m_gameLogic.getLevel() == 8) {
return(3);
}
if (m_gameLogic.getLevel() == 9) {
return(1);
}
if (m_gameLogic.getLevel() == 10) {
return(3);
}
if (m_gameLogic.getLevel() == 11) {
return(4);
}
if (m_gameLogic.getLevel() == 12) {
return(1);
}
if (m_gameLogic.getLevel() == 13) {
return(3);
}
if (m_gameLogic.getLevel() == 14) {
return(2);
}
}
static function getQuestionXML() {
var _local4 = "Default question, level: " + m_gameLogic.getLevel();
var _local2 = new Array("Default answer A", "Default answer B", "Default answer C", "Default answer D");
if (GERMAN) {
if (m_gameLogic.getLevel() == 0) {
_local4 = "Was machen Kleider sprichw\u00F6rtlich?";
_local2 = new Array("Leute", "Meute", "Br\u00E4ute", "Beute");
} else if (m_gameLogic.getLevel() == 1) {
_local4 = "Wie hei\u00DFen die ersten Z\u00E4hne des Kindes?";
_local2 = new Array("Milchz\u00E4hne", "Kakaoz\u00E4hne", "Saftz\u00E4hne", "Kaffeez\u00E4hne");
} else if (m_gameLogic.getLevel() == 2) {
_local4 = "Von Calais kommt man sehr schnell nach ...?";
_local2 = new Array("Dover", "Demlicher", "Dummer", "Dusselicher");
} else if (m_gameLogic.getLevel() == 3) {
_local4 = "Wer gilt als einer der \"V\u00E4ter der Telefonie\"?";
_local2 = new Array("Knurr", "Jaul", "Kl\u00E4ff", "Bell");
} else if (m_gameLogic.getLevel() == 4) {
_local4 = "Wes Brot ich ess, des ...?";
_local2 = new Array("Geld ich klau", "Buch ich les", "Lied ich sing", "Bier ich trink");
} else if (m_gameLogic.getLevel() == 5) {
_local4 = "Wobei k\u00F6nnen Spieler ihren Gegnern mit Sperren den Weg verbarrikadieren?";
_local2 = new Array("Fang den Hut", "Monopoly", "Hase und Igel", "Malefiz");
} else if (m_gameLogic.getLevel() == 6) {
_local4 = "In welcher Sportart kommen Oxer vor?";
_local2 = new Array("Polo", "Springreiten", "H\u00FCrdensprint", "Ger\u00E4teturnen");
} else if (m_gameLogic.getLevel() == 7) {
_local4 = "Was ist Eibisch?";
_local2 = new Array("amerikanische Sekte", "Heilpflanze", "Stadt in Sachsen", "Sp\u00E4tzlesorte");
} else if (m_gameLogic.getLevel() == 8) {
_local4 = "Zu den Sehensw\u00FCrdigkeiten welcher Insel geh\u00F6rt der 118 m hohe K\u00F6nigsstuhl?";
_local2 = new Array("Mainau", "R\u00FCgen", "Osterinsel", "St. Helena");
} else if (m_gameLogic.getLevel() == 9) {
_local4 = "Welcher Planet unseres Sonnensystems ist nicht nach einem r\u00F6mischen Gott benannt?";
_local2 = new Array("Uranus", "Neptun", "Merkur", "Mars");
} else if (m_gameLogic.getLevel() == 10) {
_local4 = "Welcher Klub gewann als einziger Fu\u00DFballverein der DDR einen Europapokal?";
_local2 = new Array("Dynamo Dresden", "Hansa Rostock", "1. FC Magdeburg", "FC Carl Zeiss Jena");
} else if (m_gameLogic.getLevel() == 11) {
_local4 = "Was macht eine Segelyacht, wenn sie sich zur Seite neigt?";
_local2 = new Array("spodden", "peleidigen", "ernietrigen", "kr\u00E4ngen");
} else if (m_gameLogic.getLevel() == 12) {
_local4 = "Welcher Dramenheld Schillers erkannte als Erster: \"Fr\u00FCh \u00FCbt sich, was ein Meister werden will\"?";
_local2 = new Array("Wallenstein", "Maria Stuart", "Don Carlos", "Wilhelm Tell");
} else if (m_gameLogic.getLevel() == 13) {
_local4 = "Wie wird der bei der Atmung ablaufende Zitronens\u00E4urezyklus noch genannt?";
_local2 = new Array("Krebs-Zyklus", "Steinbock-Zyklus", "Waage-Zyklus", "Zwilling-Zyklus");
} else if (m_gameLogic.getLevel() == 14) {
_local4 = "Welches K\u00FCchenkraut nennt man auch \"Welscher Quendel\"?";
_local2 = new Array("Estragon", "Thymian", "Rosmarin", "Majoran");
}
} else if (m_gameLogic.getLevel() == 0) {
_local4 = "In the 1990s who had three successive Christmas number ones?";
_local2 = new Array("Spice Girls", "Cliff Richard", "Mr Blobby", "Queen");
} else if (m_gameLogic.getLevel() == 1) {
_local4 = "In which town is the comedy series 'The Office' set?";
_local2 = new Array("Norwich", "Slough", "Ipswich", "Swindon");
} else if (m_gameLogic.getLevel() == 2) {
_local4 = "Who had a UK 2000 number one with 'Toca's Miracle'? ";
_local2 = new Array("Geri Halliwell", "Shaggy", "Fragma", "Take That");
} else if (m_gameLogic.getLevel() == 3) {
_local4 = "Who had a UK 1993 number one with 'Falling In Love With You'? ";
_local2 = new Array("Another Level", "Take That", "UB40", "Prodigy");
} else if (m_gameLogic.getLevel() == 4) {
_local4 = "In what year was the electric chair first used as a means of carrying a death sentence?";
_local2 = new Array("1910", "1890", "1880", "1900");
} else if (m_gameLogic.getLevel() == 5) {
_local4 = "In Eastenders who is Danny Moon's brother?";
_local2 = new Array("Bertie", "Freddie", "Reggie", "Alfie");
} else if (m_gameLogic.getLevel() == 6) {
_local4 = "Which actress was Elton John's song 'Candle In The Wind' originally about?";
_local2 = new Array("Mae West", "Marilyn Monroe", "Jane Russell", "Bette Davis");
} else if (m_gameLogic.getLevel() == 7) {
_local4 = "Which musical Boulevard provided Barbra Streisand with a hit in 1994?";
_local2 = new Array("Sunset Boulevard", "Sunrise Boulevard", "Sunshine Boulevard", "Sunbeam Boulevard");
} else if (m_gameLogic.getLevel() == 8) {
_local4 = "In which film does Pauline Collins go on holiday to Greece?";
_local2 = new Array("Yentl", "Thelma And Louise", "Shirley Valentine", "Educating Rita");
} else if (m_gameLogic.getLevel() == 9) {
_local4 = "What horror movie takes place in the small town of Grover's Bend?";
_local2 = new Array("Critters", "Halloween", "Gremlins", "Friday the 13th");
} else if (m_gameLogic.getLevel() == 10) {
_local4 = "Who had a UK 2000 number one with 'Black Coffee'?";
_local2 = new Array("Peter Andre", "U2", "All Saints", "Snap");
} else if (m_gameLogic.getLevel() == 11) {
_local4 = "What character did Nicholas Lyndhurst play in the classic television comedy 'Only Fools and Horses'?";
_local2 = new Array("Trigger", "Del Boy", "Uncle Albert", "Rodney");
} else if (m_gameLogic.getLevel() == 12) {
_local4 = "Complete the title of the Tom Hanks film; 'Sleepless In ?' where? ";
_local2 = new Array("Seattle", "Sydney", "Skegness", "Salisbury");
} else if (m_gameLogic.getLevel() == 13) {
_local4 = "Whose hit album is called 'White Ladder'?";
_local2 = new Array("Mary Blige", "Macy Gray", "David Gray", "Eminem");
} else if (m_gameLogic.getLevel() == 14) {
_local4 = "With what type of novel is the publisher Mills & Boon associated?";
_local2 = new Array("Westerns", "Romance", "Espionage", "Thrillers");
}
var _local5 = "";
_local5 = _local5 + "<question>";
_local5 = _local5 + (("<text>" + _local4) + "</text>");
var _local3 = 0;
while (_local3 < 4) {
_local5 = _local5 + (((("<answer answerId=\"" + (_local3 + 1)) + "\">") + _local2[_local3]) + "</answer>");
_local3++;
}
_local5 = _local5 + "</question>";
_root.response = _local5;
return(_local5);
}
static function getAnswerXML(answer) {
var _local5 = getCorrect();
var _local3 = (1000 * m_gameLogic.getTimeLeftPercent(m_gameLogic.getIPTime())) / 100;
_local3 = Math.round(_local3);
if (answer != _local5) {
_local3 = 0;
}
var _local6 = m_gameLogic.getScore() + _local3;
var _local4 = m_gameLogic.getSafetyLevelScore();
if (m_gameLogic.getLevel() < com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[0]) {
_local4 = Math.round(_local6 / 10);
} else if ((m_gameLogic.getLevel() == com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[0]) || (m_gameLogic.getLevel() == com.midasplayer.millionaire.GameLogic.SAFETY_LEVEL[1])) {
_local4 = _local6;
}
var _local2 = "";
_local2 = _local2 + "<answer>";
_local2 = _local2 + (("<correct>" + _local5) + "</correct>");
_local2 = _local2 + (("<levelScore>" + _local3) + "</levelScore>");
_local2 = _local2 + (("<totalScore>" + ((answer != _local5) ? (_local4) : (_local6))) + "</totalScore>");
_local2 = _local2 + (("<safetyLevelScore>" + _local4) + "</safetyLevelScore>");
_local2 = _local2 + "</answer>";
_root.response = _local2;
return(_local2);
}
static function getLifelineXML(lifelineType) {
var _local2 = new Array("6", "6", "6", "42");
if (lifelineType == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_5050) {
if (getCorrect() == 1) {
_local2 = new Array("2", "4");
} else if (getCorrect() == 2) {
_local2 = new Array("3", "4");
} else if (getCorrect() == 3) {
_local2 = new Array("1", "2");
} else if (getCorrect() == 4) {
_local2 = new Array("1", "3");
}
} else if (lifelineType == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_FRIEND) {
var _local5 = new Array("A", "B", "C", "D");
_local2 = new Array(_local5[getCorrect() - 1]);
} else if (lifelineType == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_AUDIENCE) {
_local2 = new Array("10", "10", "10", "10");
_local2[getCorrect() - 1] = "70";
}
var _local3 = "";
_local3 = _local3 + (("<lifeline type=\"" + lifelineType) + "\">");
_local3 = _local3 + (("<answer>" + _local2[0]) + "</answer>");
if (lifelineType != com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_FRIEND) {
_local3 = _local3 + (("<answer>" + _local2[1]) + "</answer>");
}
if (lifelineType == com.midasplayer.millionaire.GameLogic.LIFELINE_TYPE_AUDIENCE) {
_local3 = _local3 + (("<answer>" + _local2[2]) + "</answer>");
_local3 = _local3 + (("<answer>" + _local2[3]) + "</answer>");
}
_local3 = _local3 + "</lifeline>";
_root.response = _local3;
return(_local3);
}
static function getWalkAwayXML() {
var _local2 = "";
_local2 = _local2 + "<walk>";
_local2 = _local2 + (("<totalScore>" + m_gameLogic.getScore()) + "</totalScore>");
_local2 = _local2 + "</walk>";
_root.response = _local2;
return(_local2);
}
static var GERMAN = false;
}
Symbol 365 MovieClip [__Packages.com.midasplayer.util.FpsCounter] Frame 0
class com.midasplayer.util.FpsCounter
{
var m_clip, m_textField;
function FpsCounter (scope) {
var _local4 = 0;
var _local3 = 0;
var _local2 = "fpsTextField";
m_clip = scope.createEmptyMovieClip("fpsCounter", scope.getNextHighestDepth());
m_clip.createTextField(_local2, m_clip.getNextHighestDepth(), _local4, _local3, 100, 30);
m_textField = m_clip[_local2];
m_textField.textColor = 16711680 /* 0xFF0000 */;
m_clip.onEnterFrame = mx.utils.Delegate.create(this, onRender);
}
function onRender() {
var _local2 = getTimer();
m_fpsCount++;
if ((getTimer() - m_lastFpsUpdateTime) >= 1000) {
var _local3 = "FPS: " + m_fpsCount;
m_lastFpsUpdateTime = _local2;
m_textField.text = _local3;
m_fpsCount = 0;
m_lastFpsUpdateTime = getTimer();
}
}
var m_fpsCount = 0;
var m_lastFpsUpdateTime = 0;
}
Symbol 366 MovieClip [__Packages.com.midasplayer.fx.SoundToggle] Frame 0
class com.midasplayer.fx.SoundToggle extends MovieClip
{
var m_clip;
function SoundToggle (parent, x, y) {
super();
m_clip = parent.attachMovie(SymbolName, "sound_toggle", parent.getNextHighestDepth());
if (x != undefined) {
m_clip._x = x;
}
if (y != undefined) {
m_clip._y = y;
}
m_clip.onEnterFrame = mx.utils.Delegate.create(this, update);
m_clip.onRelease = mx.utils.Delegate.create(this, toggle);
m_clip.onRollOver = mx.utils.Delegate.create(this, onRollOver);
m_clip.onRollOut = mx.utils.Delegate.create(this, onRollOut);
}
function onRollOver() {
m_isMouseOver = true;
}
function onRollOut() {
m_isMouseOver = false;
}
function update() {
var _local3 = 1;
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
_local3 = ENABLED_FRAME;
}
if (!com.midasplayer.fx.SoundManager.isSoundEnabled()) {
_local3 = DISABLED_FRAME;
}
if ((com.midasplayer.fx.SoundManager.isSoundEnabled() && (m_isMouseOver)) && (m_clip._framesloaded >= ENABLED_MOUSE_OVER_FRAME)) {
_local3 = ENABLED_MOUSE_OVER_FRAME;
}
if (((!com.midasplayer.fx.SoundManager.isSoundEnabled()) && (m_isMouseOver)) && (m_clip._framesloaded >= DISABLED_MOUSE_OVER_FRAME)) {
_local3 = DISABLED_MOUSE_OVER_FRAME;
}
m_clip.gotoAndStop(_local3);
var _local2 = "";
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
_local2 = com.midasplayer.util.I18n.getString("sound_on");
} else {
_local2 = com.midasplayer.util.I18n.getString("sound_off");
}
if ((_local2 == "{sound_on}") || (_local2 == "{sound_off}")) {
_local2 = "";
}
m_clip.text.text = _local2;
}
function toggle() {
if (com.midasplayer.fx.SoundManager.isSoundEnabled()) {
trace("Sound: off");
com.midasplayer.fx.SoundManager.enableSounds(false);
} else {
trace("Sound: on");
com.midasplayer.fx.SoundManager.enableSounds(true);
}
}
static var SymbolName = "mcSoundToggle";
static var ENABLED_FRAME = 1;
static var DISABLED_FRAME = 2;
static var ENABLED_MOUSE_OVER_FRAME = 3;
static var DISABLED_MOUSE_OVER_FRAME = 4;
var m_isMouseOver = false;
}