Frame 1
function __com_mochibot__(swfid, mc, lv, trk) {
var x;
var g;
var s;
var fv;
var sb;
var u;
var res;
var mb;
var mbc;
mb = "__mochibot__";
mbc = "mochibot.com";
g = (_global ? (_global) : (_level0._root));
if (g[mb + swfid]) {
return(g[mb + swfid]);
}
s = System.security;
x = mc._root.getSWFVersion;
fv = (x ? (mc.getSWFVersion()) : ((_global ? 6 : 5)));
if (!s) {
s = {};
}
sb = s.sandboxType;
if (sb == "localWithFile") {
return(null);
}
x = s.allowDomain;
if (x) {
s.allowDomain(mbc);
}
x = s.allowInsecureDomain;
if (x) {
s.allowInsecureDomain(mbc);
}
u = (((((((((((("http://" + mbc) + "/my/core.swf?mv=7&fv=") + fv) + "&v=") + escape(getVersion())) + "&swfid=") + escape(swfid)) + "&l=") + lv) + "&f=") + mc) + (sb ? ("&sb=" + sb) : "")) + (trk ? "&t=1" : "");
lv = ((fv > 6) ? (mc.getNextHighestDepth()) : ((g[mb + "level"] ? (g[mb + "level"] + 1) : (lv))));
g[mb + "level"] = lv;
if (fv == 5) {
res = "_level" + lv;
if (!eval (res)) {
loadMovieNum (u, lv);
}
} else {
res = mc.createEmptyMovieClip(mb + swfid, lv);
res.loadMovie(u);
}
return(res);
}
var SINGLE_FILE_VERSION = true;
Stage.scaleMode = "noScale";
stop();
var OnMovieBlur;
sliderLoading.ReadOnly = true;
_root.loadingPhase = 0;
var loading_target = _root;
var languageXml = new XML();
var urlXml = new XML();
var levelsXml = new XML();
EndLoading = function () {
_root.gotoAndStop("frameLoadPhase2");
};
_root.languageXml.ignoreWhite = true;
_root.urlXml.ignoreWhite = true;
_root.levelsXml.ignoreWhite = true;
if (!SINGLE_FILE_VERSION) {
_root.languageXml.load("languages.xml");
_root.urlXml.load("url.xml");
_root.levelsXml.load("levels.xml");
}
var loaded = 0;
var total = 100;
_root.onEnterFrame = function () {
var _local9 = _root.getBytesLoaded();
var _local3 = _root.getBytesTotal();
var _local11 = _root.languageXml.getBytesLoaded();
var _local7 = _root.languageXml.getBytesTotal();
var _local10 = _root.urlXml.getBytesLoaded();
var _local6 = _root.urlXml.getBytesTotal();
var _local12 = _root.levelsXml.getBytesLoaded();
var _local5 = _root.levelsXml.getBytesTotal();
var _local2 = 0;
if (!SINGLE_FILE_VERSION) {
if ((_local3 != 0) && (_local3 != undefined)) {
_local2 = _local2 + Math.floor((_local9 * 90) / _local3);
}
if ((_local7 != 0) && (_local7 != undefined)) {
_local2 = _local2 + Math.floor((_local11 * 5) / _local7);
}
if ((_local6 != 0) && (_local6 != undefined)) {
_local2 = _local2 + Math.floor((_local10 * 4) / _local6);
}
if ((_local5 != 0) && (_local5 != undefined)) {
_local2 = _local2 + Math.floor((_local12 * 1) / _local5);
}
} else if ((_local3 != 0) && (_local3 != undefined)) {
_local2 = _local2 + Math.floor((_local9 * 100) / _local3);
}
if (!((_local2 >= 0) && (_local2 <= 100))) {
_local2 = 0;
}
if (isNaN(_local2)) {
_local2 = 0;
}
sliderLoading.SetValue(_local2);
if (!((_local2 >= 0) && (_local2 <= 100))) {
_local2 = 0;
}
var _local4 = 0;
if (_local2 >= 0) {
if (_local2 <= 100) {
_local4 = _local2;
}
}
if (_local4 == Number.NaN) {
_local4 = 0;
}
var _local8 = String(_local4);
if (_local8 == "NaN") {
_local8 = "0";
}
strLoading = ("LOADING " + _local8) + "%";
if (_local2 == 100) {
_root.EndLoading();
}
};
_root.createEmptyMovieClip("custom_logo", _root.getNextHighestDepth());
_root.custom_logo._x = 5;
_root.custom_logo._y = 5;
loadMovie ("customlogo.jpg", custom_logo);
__com_mochibot__("8c6d0bee", this, 10301, true);
Frame 2
delete _root.onEnterFrame;
gotoAndStop ("frameIntro");
Frame 3
_exported_.visible = false;
if (SINGLE_FILE_VERSION) {
_root.urlXml.parseXML(xml_singlefile_data.urlXmlData);
_root.languageXml.parseXML(xml_singlefile_data.languageXmlData);
_root.levelsXml.parseXML(xml_singlefile_data.levelsXmlData);
}
Language.SetLangXML(languageXml);
Helper.LoadUrlXML(urlXml);
LevelsConfig.SetXML(levelsXml);
gotoAndPlay ("frameInit");
Frame 4
_root.custom_logo.removeMovieClip();
if (Helper.SKIP_MENU) {
Language.LoadLanguage();
gotoAndStop ("frameStartGame");
return(undefined);
}
Helper.MochiAdShowPreloadAd(this);
Frame 24
if (Helper.FORCE_LANGUAGE == "") {
if (Language.GetLanguagesCount() > 1) {
gotoAndStop ("frameSelectLang");
} else {
Language.LoadLanguage();
gotoAndStop ("framePlayer");
}
} else {
Language.LoadLanguage(Helper.FORCE_LANGUAGE);
gotoAndStop ("framePlayer");
}
Frame 25
stop();
var langxml = Language.GetLangXML();
var node = langxml.firstChild;
OnLangBtnClick = function (instance) {
Language.LoadLanguage(instance.lang_id);
gotoAndStop ("framePlayer");
};
var i = 0;
while (i < node.childNodes.length) {
var lang_id = node.childNodes[i].attributes.id;
var lang_name = node.childNodes[i].attributes.name;
var lang_intname = node.childNodes[i].attributes.intname;
var lang_btn = mcOrientierFirstButton.attachMovie("ButtonStartGame", "lang_btn_" + i, mcOrientierFirstButton.getNextHighestDepth());
lang_btn._x = 0;
lang_btn._y = (lang_btn._height + 10) * i;
lang_btn.buttonText = ((lang_name != lang_intname) ? (lang_name) : (lang_name));
lang_btn.lang_id = lang_id;
lang_btn.OnClick = OnLangBtnClick;
i++;
}
Frame 27
textYourName = Language.Transl("enter name");
if ((Helper.__get__PlayerName() == undefined) || (Helper.__get__PlayerName() == "")) {
playerName = Language.Transl("default player name");
} else {
playerName = Helper.PlayerName;
}
btnOk.buttonText = Language.Transl("ok");
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
Helper.__set__PlayerName(playerName);
gotoAndStop ("frameMainMenu");
});
Frame 29
stop();
btnStart.buttonText = Language.Transl("start");
btnOptions.buttonText = Language.Transl("options");
btnGetIt.buttonText = Language.Transl("get it");
btnScores.buttonText = Language.Transl("scores");
btnStart.OnClick = mx.utils.Delegate.create(this, function () {
if (Helper.__get__isMusicLoaded() || (!Helper.MusicEnabled)) {
gotoAndStop ("frameStartGame");
} else {
gotoAndStop ("framePreGameLoader");
}
});
btnOptions.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameOptions");
});
btnChangePlayer.onPress = mx.utils.Delegate.create(this, function () {
gotoAndStop ("framePlayer");
});
btnScores.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameScores");
});
btnGetIt.OnClick = function () {
Helper.GetIt();
};
Frame 31
textSoundVolume = Language.Transl("sound volume");
textMusicVolume = Language.Transl("music volume");
btnOk.buttonText = Language.Transl("ok");
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameMainMenu");
});
mcSoundVolume.Value = Helper.SoundVolume;
mcSoundVolume.OnValueChanged = function () {
Helper.SoundVolume = this.Value;
Helper.PlaySound("soundMenuHit");
};
mcMusicButton.Value = Helper.MusicEnabled;
mcMusicButton.OnValueChanged = function () {
Helper.MusicEnabled = this.Value;
if (Helper.MusicEnabled) {
Helper.PlayMusic();
} else {
Helper.StopMusic();
}
};
textOptionsTips = Language.Transl("menu tips");
btnShowTips.Value = TipsWindow.TipsEnabled;
btnShowTips.OnValueChanged = function () {
TipsWindow.TipsEnabled = this.Value;
};
stop();
Frame 33
function RefreshScores() {
var _local2 = new TextScoreTable(this.mcScoresTable);
_local2.reset("Fetching high scores...");
var _local3 = MochiAd.fetchHighScores({id:Helper.MochiAdId}, _local2, "gotScores");
if (!_local3) {
_local2.reset("Local sandbox does not allow network, try playing online.");
}
}
btnOk.buttonText = Language.Transl("ok");
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameMainMenu");
});
this.mcScoresTable.names_text = "";
this.mcScoresTable.ranks_text = "";
this.mcScoresTable.scores_text = "";
this.mcScoresTable.status_text = "";
var TextScoreTable = function (mc, max_scores) {
this.mc = mc;
this.max_scores = max_scores || 10;
this.reset("");
};
TextScoreTable.prototype.reset = function (statusText) {
this.mc.ranks_text = "";
this.mc.names_text = "";
this.mc.scores_text = "";
this.mc.dates_text = "";
this.mc.status_text = statusText;
};
TextScoreTable.prototype.gotScores = function (scores, playerIndex) {
trace("Loaded: " + scores);
this.reset("");
if (playerIndex === undefined) {
playerIndex = -1;
}
var _local8 = Math.min(this.max_scores, scores.length);
if (_local8 == 0) {
this.mc.status_text = "No high scores yet!";
}
var _local2 = 0;
while (_local2 < _local8) {
var _local4 = scores[_local2];
var _local3 = (_local2 + 1) + ".";
if (_local2 === playerIndex) {
_local3 = "*" + _local3;
}
var _local5 = _local4[0];
var _local7 = commafy(String(_local4[1]));
var _local6 = msecToDateString(_local4[2]);
this.mc.ranks_text = this.mc.ranks_text + (_local3 + newline);
this.mc.names_text = this.mc.names_text + (_local5 + newline);
this.mc.scores_text = this.mc.scores_text + (_local7 + newline);
this.mc.dates_text = this.mc.dates_text + (_local6 + newline);
_local2++;
}
};
var commafy = function (n) {
trace("\tcommafy:" + n);
var _local1 = parseInt(n, 10) + "";
var _local2 = new Array();
while (_local1.length > 3) {
_local2.unshift(_local1.slice(_local1.length - 3, _local1.length));
_local1 = _local1.slice(0, _local1.length - 3);
}
_local2.unshift(_local1);
return(_local2.join(" "));
};
var msecToDateString = function (msec) {
var _local1 = new Date(msec);
return([_local1.getFullYear(), 1 + _local1.getMonth(), _local1.getDate()].join("-"));
};
_root.RefreshScores();
Frame 35
stop();
if (SINGLE_FILE_VERSION) {
Helper.LoadMusic("musicGameplay", true);
gotoAndStop ("framePreGameLoaded");
return(undefined);
}
btnAbort._visible = false;
mcLoadingProgress.ReadOnly = true;
Helper.OnMusicLoaded = mx.utils.Delegate.create(this, function (success) {
if (success) {
gotoAndStop ("framePreGameLoaded");
} else {
Helper.MusicEnabled = false;
}
});
_root.onEnterFrame = function () {
var _local4 = Helper.__get__Music().getBytesLoaded();
var _local3 = Helper.__get__Music().getBytesTotal();
var _local1 = 0;
if ((_local3 != 0) && (_local3 != undefined)) {
_local1 = _local1 + Math.floor((_local4 * 100) / _local3);
}
if (!((_local1 >= 0) && (_local1 <= 100))) {
_local1 = 0;
}
if ((_local1 == Number.NaN) || (_local1 == undefined)) {
_local1 = 0;
}
if (isNaN(_local1)) {
_local1 = 0;
}
var _local2 = "";
_local2 = String(_local1);
if (_local2 == "NaN") {
_local2 = "0";
}
mcLoadingProgress.SetValue(_local1);
textLoading = ((((Language.Transl("loading") + " ") + Language.Transl("of music")) + " ") + _local2) + "%";
};
Helper.LoadMusic("music_gameplay.mp3");
Frame 36
delete _root.onEnterFrame;
gotoAndStop ("frameStartGame");
Frame 37
mcGame.OnGameExit = function () {
gotoAndStop ("frameSubmitScores");
};
mcGame.OnMenu = function () {
gotoAndStop ("frameGameMenu");
};
var mcGame;
OnMovieBlur = function () {
if ((mcGame != undefined) && (!mcGame.__get__inPause())) {
mcGame.OpenGameMenu();
}
};
stop();
Frame 38
mcGame.CloseGameMenu();
stop();
Frame 40
trace(123134);
stop();
Helper.PlaySound("tip");
Helper.MochiAdShowLevelAd(_root);
Frame 41
trace(8888888);
mcGame.LoadingLevelPhase2();
stop();
Frame 44
textPause = Language.Transl("pause");
btnContinue.buttonText = Language.Transl("resume");
btnContinue.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameGameContinue");
});
btnAbort.buttonText = Language.Transl("abort");
btnGetIt.buttonText = Language.Transl("get it");
btnAbort.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameAbortQuestion");
});
btnGetIt.OnClick = function () {
Helper.GetIt();
};
textSoundVolume = Language.Transl("sound volume");
textMusicVolume = Language.Transl("music volume");
mcSoundVolume.Value = Helper.SoundVolume;
mcSoundVolume.OnValueChanged = function () {
Helper.SoundVolume = this.Value;
Helper.PlaySound("soundMenuHit");
};
mcMusicButton.Value = Helper.MusicEnabled;
mcMusicButton.OnValueChanged = function () {
Helper.MusicEnabled = this.Value;
if (Helper.MusicEnabled) {
Helper.PlayMusic();
} else {
Helper.StopMusic();
}
};
textOptionsTips = Language.Transl("menu tips");
btnShowTips.Value = TipsWindow.TipsEnabled;
btnShowTips.OnValueChanged = function () {
TipsWindow.TipsEnabled = this.Value;
};
stop();
Frame 46
textQuestion = Language.Transl("want to exit");
btnYes.buttonText = Language.Transl("yes");
btnYes.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameMainMenu");
});
btnNo.buttonText = Language.Transl("no");
btnNo.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameGameMenu");
});
stop();
Frame 48
shop.game = mcGame;
Frame 51
textTitle = Language.Transl("send score title");
textYourName = Language.Transl("player name");
textYourScore = Language.Transl("player score");
playerName = Helper.PlayerName;
playerScore = Helper.globalGameScore;
btnOk.buttonText = Language.Transl("ok");
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
var _local2 = Helper.MochiAdId;
var _local1 = function () {
};
_local1.prototype.DoAction = function () {
gotoAndStop ("frameScores");
};
var _local3 = new _local1[undefined]();
MochiAd.sendHighScore({id:_local2, name:playerName, score:Helper.globalGameScore}, _local3, "DoAction");
btnOk.enabled = false;
});
btnCancel.buttonText = Language.Transl("cancel");
btnCancel.OnClick = mx.utils.Delegate.create(this, function () {
gotoAndStop ("frameMainMenu");
});
Symbol 2 MovieClip Frame 1
this._visible = false;
stop();
Symbol 8 MovieClip [Slider] Frame 1
function SetValue(val, initializing) {
this.Value = Math.floor(Math.max(0, Math.min(100, val)));
Tracer.trace("set val=" + val);
Update();
if ((initializing == false) || (initializing == undefined)) {
if (OnValueChanged != undefined) {
OnValueChanged();
}
}
}
function Update() {
var _local1 = ((-mcMask._width) * (100 - Value)) / 100;
mcMask._x = _local1;
var _local2 = mcAllocator._visible;
mcAllocator._visible = false;
mcAllocator._visible = true;
mcAllocator._visible = _local2;
}
var Value;
var ReadOnly;
var OnValueChanged;
if (ReadOnly == undefined) {
ReadOnly = false;
}
mcAllocator._visible = false;
SetValue(Value, true);
if (!ReadOnly) {
this.hitArea = this;
this.onPress = function () {
SetValue(100 - (((mcHit._width - this._xmouse) * 100) / mcHit._width));
};
this.onRollOver = function () {
Helper.PlaySound("soundMenuToggle");
mcAllocator._visible = true;
};
this.onRollOut = function () {
mcAllocator._visible = false;
};
}
mcHit._visible = false;
Symbol 19 MovieClip Frame 1
gotoAndStop (2);
Symbol 21 MovieClip Frame 1
gotoAndStop (2);
Symbol 22 MovieClip [<Orientir>] Frame 1
#initclip 67
Object.registerClass("<Orientir>", Orientir);
#endinitclip
Symbol 43 MovieClip [Door] Frame 1
#initclip 56
Object.registerClass("Door", Door);
#endinitclip
var Opened;
Symbol 43 MovieClip [Door] Frame 16
if (Opened != undefined) {
Opened();
}
stop();
Symbol 43 MovieClip [Door] Frame 29
stop();
Symbol 58 MovieClip [Gorshok] Frame 1
#initclip 57
Object.registerClass("Gorshok", Gorshok);
#endinitclip
Symbol 282 MovieClip [Hero] Frame 1
#initclip 58
Object.registerClass("Hero", Hero);
#endinitclip
Symbol 285 MovieClip [PointsAnimation] Frame 60
this.removeMovieClip();
Symbol 291 MovieClip [ButtonStartGame] Frame 1
function Resize() {
ResizeField(mcTextNormal);
ResizeField(mcTextActive);
}
function ResizeField(tf) {
var _local1;
var _local3;
_local1 = tf.getTextFormat();
_local1.size++;
do {
_local1.size--;
var obj = _local1.getTextExtent(tf.text);
_local3 = obj.height;
} while (obj.textFieldWidth > 90);
tf.setTextFormat(_local1);
tf._y = (-_local3) / 2;
}
var buttonText;
var OnClick;
this.hitArea = mcHint;
mcHint._visible = false;
mcTextNormal._visible = true;
mcTextActive._visible = false;
this.onRollOver = function () {
mcTextNormal._visible = false;
mcTextActive._visible = true;
Helper.PlaySound("soundMenuToggle");
gotoAndStop (3);
};
this.onRollOut = function () {
gotoAndStop (2);
mcTextNormal._visible = true;
mcTextActive._visible = false;
};
this.onPress = function () {
Helper.PlaySound("soundMenuHit");
gotoAndStop (4);
};
this.onRelease = function () {
if (OnClick != undefined) {
OnClick(this);
}
};
Resize();
stop();
Symbol 302 MovieClip [StartLevelWindow] Frame 1
var OnClosed;
var Level;
var MasterObj;
var Popularity;
Symbol 302 MovieClip [StartLevelWindow] Frame 2
strPressAnyKey = Language.Transl("press any key");
textLevel.text = (Language.Transl("day") + " ") + (Level + 1);
textMasterObj.text = (Language.Transl("start goal") + " ") + MasterObj;
textPopular.text = (Language.Transl("start popular") + " ") + Popularity;
btnScreen.onPress = mx.utils.Delegate.create(this, function () {
if (OnClosed != undefined) {
Helper.PlaySound("soundMenuHit");
OnClosed();
}
});
_root.onKeyDown = mx.utils.Delegate.create(this, function () {
if (OnClosed != undefined) {
Helper.PlaySound("soundMenuHit");
OnClosed();
}
});
stop();
Symbol 313 MovieClip [EndLevelWinWindow] Frame 1
var OnClosed;
var OnTryAgain;
var level;
var server_clients;
var losted_clients;
var trash_toys;
var trash_packs;
var sales;
var master_obj;
var expert_obj;
var happy_bonus;
var total;
var ShowNextLevelButton;
if (ShowNextLevelButton == undefined) {
ShowNextLevelButton = true;
}
var Winned;
Symbol 313 MovieClip [EndLevelWinWindow] Frame 2
if (Winned) {
strTitle = Language.Transl("greeting");
} else {
strTitle = Language.Transl("youlose");
}
strLevel = (Language.Transl("strLevel") + " ") + (level + 1);
strServed = Language.Transl("strServed");
strLosted = Language.Transl("strLosted");
strTToys = Language.Transl("strTToys");
strTPacks = Language.Transl("strTPacks");
strSales = Language.Transl("strSales");
strObjMaster = Language.Transl("strObjMaster");
strObjExpert = Language.Transl("strObjExpert");
strBonus = Language.Transl("strBonus");
strTotal = Language.Transl("strTotal");
textserver_clients.text = server_clients;
textlosted_clients.text = losted_clients;
texttrash_toys.text = trash_toys;
texttrash_packs.text = trash_packs;
textsales.text = sales;
textmaster_obj.text = master_obj;
textexpert_obj.text = expert_obj;
texthappy_bonus.text = happy_bonus;
texttotal.text = total;
textMasterObj.text = MasterObj;
textExpertObj.text = ExpertObj;
if (Winned) {
btnOk.buttonText = Language.Transl("next level");
btnTryAgain._visible = false;
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
if (OnClosed != undefined) {
OnClosed();
}
});
} else {
btnOk.buttonText = Language.Transl("try again");
btnTryAgain.buttonText = Language.Transl("exit");
btnTryAgain._visible = true;
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
if (OnClosed != undefined) {
OnTryAgain();
}
});
btnTryAgain.OnClick = mx.utils.Delegate.create(this, function () {
if (OnTryAgain != undefined) {
OnClosed();
}
});
}
btnOk.Resize();
btnTryAgain.Resize();
stop();
Symbol 317 MovieClip [EndLevelWinWindowTrial] Frame 1
var OnClosed;
var OnTryAgain;
var level;
var server_clients;
var losted_clients;
var trash_toys;
var trash_packs;
var sales;
var master_obj;
var expert_obj;
var happy_bonus;
var total;
var ShowNextLevelButton;
if (ShowNextLevelButton == undefined) {
ShowNextLevelButton = true;
}
var Winned;
Symbol 317 MovieClip [EndLevelWinWindowTrial] Frame 2
if (Winned) {
strTitle = Language.Transl("greeting");
} else {
strTitle = Language.Transl("youlose");
}
strLevel = (Language.Transl("strLevel") + " ") + (level + 1);
strGetItText = Language.Transl("get it text");
if (Winned) {
btnOk.buttonText = Language.Transl("next level");
btnTryAgain._visible = false;
} else {
btnOk.buttonText = Language.Transl("exit");
btnTryAgain.buttonText = Language.Transl("try again");
btnTryAgain._visible = true;
btnTryAgain.OnClick = mx.utils.Delegate.create(this, function () {
if (OnTryAgain != undefined) {
OnTryAgain();
}
});
}
btnOk.OnClick = mx.utils.Delegate.create(this, function () {
if (OnClosed != undefined) {
OnClosed();
}
});
if (!ShowNextLevelButton) {
btnOk.buttonText = Language.Transl("exit");
}
btnGetIt.buttonText = Language.Transl("get it");
btnGetIt.OnClick = function () {
Helper.GetIt();
};
stop();
Symbol 319 MovieClip [FullscreenButton] Frame 1
function Show() {
}
function Hide() {
status = 2;
}
onPress = function () {
var _local1 = 0;
};
var status;
var mc;
onEnterFrame = function () {
switch (status) {
case 0 :
gotoAndStop(_currentframe + 1);
return;
case 1 :
return;
case 2 :
gotoAndStop(_currentframe - 1);
}
};
status = 0;
gotoAndStop (2);
Symbol 319 MovieClip [FullscreenButton] Frame 2
if (status == 2) {
this.removeMovieClip();
}
Symbol 319 MovieClip [FullscreenButton] Frame 35
status = 1;
Symbol 627 MovieClip [ClientOrder] Frame 1
#initclip 59
Object.registerClass("ClientOrder", ClientOrder);
#endinitclip
Symbol 631 MovieClip [Client] Frame 1
#initclip 60
Object.registerClass("Client", Client);
#endinitclip
Symbol 696 MovieClip [Moneys] Frame 1
#initclip 61
Object.registerClass("Moneys", Moneys);
#endinitclip
Symbol 706 MovieClip Frame 1
var buttonText;
var OnClick;
this.hitArea = mcHint;
mcHint._visible = false;
this.onRollOver = function () {
Helper.PlaySound("soundMenuToggle");
gotoAndStop (3);
};
this.onRollOut = function () {
gotoAndStop (2);
};
this.onPress = function () {
Helper.PlaySound("soundMenuHit");
gotoAndStop (4);
};
this.onRelease = function () {
if (OnClick != undefined) {
OnClick(this);
}
};
stop();
Symbol 718 MovieClip [StarsSlider] Frame 1
#initclip 62
Object.registerClass("StarsSlider", StarsSlider);
#endinitclip
Symbol 753 MovieClip [ShopGood] Frame 1
#initclip 63
Object.registerClass("ShopGood", ShopGood);
#endinitclip
Symbol 755 MovieClip [Shop] Frame 1
#initclip 64
Object.registerClass("Shop", Shop);
#endinitclip
Symbol 767 MovieClip [GoodDetailWindow] Frame 1
#initclip 65
Object.registerClass("GoodDetailWindow", GoodDetailWindow);
#endinitclip
Symbol 788 MovieClip Frame 1
stop();
var Value;
var OnValueChanged;
if (Value == undefined) {
Value = true;
}
mcAllocator._visible = false;
GetValue = function () {
return(Value);
};
SetValue = function (value, init) {
Value = value;
gotoAndStop((Value ? 2 : 3));
if (init != true) {
if (OnValueChanged != undefined) {
OnValueChanged(this);
}
}
};
this.onPress = function () {
SetValue(!Value);
};
SetValue(Value, true);
this.onRollOver = function () {
Helper.PlaySound("soundMenuToggle");
mcAllocator._visible = true;
};
this.onRollOut = function () {
mcAllocator._visible = false;
};
Symbol 795 MovieClip [TipsWindow] Frame 1
#initclip 66
Object.registerClass("TipsWindow", TipsWindow);
#endinitclip
Symbol 840 MovieClip Frame 1
stop();
Symbol 1342 MovieClip [__Packages.Tracer] Frame 0
class Tracer
{
static var _traceBox, traceProperties;
function Tracer () {
}
static function Init(rootMC) {
var traceBox;
traceBox = rootMC.createTextField("traceBox", 11000, 0, 10, 150, 400);
with (traceBox) {
backgroundColor = 16777215 /* 0xFFFFFF */;
background = true;
multiline = true;
wordWrap = true;
html = true;
}
var traceBoxFormat = new TextFormat();
traceBoxFormat.font = "Courier";
traceBoxFormat.size = 12;
traceBox.setNewTextFormat(traceBoxFormat);
_traceBox = traceBox;
rootMC.tr = function (obj) {
var _local3 = newline;
var _local2 = 0;
while (_local2 < arguments.length) {
_local3 = _local3 + String(arguments[_local2]);
if (_local2 != (arguments.length - 1)) {
_local3 = _local3 + ", ";
}
_local2++;
}
rootMC.traceBox.text = rootMC.traceBox.text + _local3;
traceBox.scroll = traceBox.maxscroll;
};
rootMC.trprops = function (obj) {
rootMC.traceBox.text = rootMC.traceBox.text + ("\n---Trace props of: " + String(obj));
for (var _local2 in obj) {
rootMC.traceBox.text = rootMC.traceBox.text + (((newline + String(_local2)) + ":") + String(obj[_local2]));
}
traceBox.scroll = traceBox.maxscroll;
};
rootMC.err = function (obj) {
var _local1 = String(obj);
rootMC.traceBox.htmlText = rootMC.traceBox.htmlText + (("\n<b>" + _local1) + "</b>");
traceBox.scroll = traceBox.maxscroll;
};
trace = mx.utils.Delegate.create(rootMC, rootMC.tr);
traceProperties = mx.utils.Delegate.create(rootMC, rootMC.trprops);
info = trace;
error = mx.utils.Delegate.create(rootMC, rootMC.err);
trace("---Start tracing---");
var btnToggleVisible;
btnToggleVisible = rootMC.createEmptyMovieClip("btnToggleVisible", 11001);
with (btnToggleVisible) {
_x = 0;
_y = 0;
beginFill(16776960);
lineStyle(0, 16777215);
moveTo(0, 0);
lineTo(10, 0);
lineTo(10, 10);
lineTo(0, 10);
lineTo(0, 0);
}
btnToggleVisible.onPress = function () {
rootMC.traceBox._visible = !rootMC.traceBox._visible;
};
var btnClearTrace;
btnClearTrace = rootMC.createEmptyMovieClip("btnClearTrace", 11002);
with (btnClearTrace) {
_x = 12;
_y = 0;
beginFill(16711935);
lineStyle(0, 16777215);
moveTo(0, 0);
lineTo(10, 0);
lineTo(10, 10);
lineTo(0, 10);
lineTo(0, 0);
}
btnClearTrace.onPress = function () {
rootMC.traceBox.text = "";
};
}
static function Show() {
if (_traceBox != undefined) {
_traceBox._visible = true;
}
}
static function Hide() {
if (_traceBox != undefined) {
_traceBox._visible = false;
}
}
static var trace = _global.trace;
static var info = _global.trace;
static var error = _global.trace;
}
Symbol 1343 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 1344 MovieClip [__Packages.Helper] Frame 0
class Helper
{
static var _Music, _Music_name, OnMusicLoaded, _get_it_url, _get_it_target;
function Helper () {
}
static function get PlayerName() {
return(_playerName);
}
static function set PlayerName(value) {
_playerName = value;
globalSharedObject.data.PlayerName = _playerName;
//return(PlayerName);
}
static function get isMusicLoaded() {
return((_Music != undefined) && (_Music.getBytesTotal() == _Music.getBytesLoaded()));
}
static function get isMusicPlaying() {
return(_Music_playing);
}
static function get Music() {
return(_Music);
}
static function PlaySound(name, loop) {
var _local1 = new Sound();
_local1.attachSound(name);
_local1.setVolume(SoundVolume);
_local1.start(0, loop);
}
static function PlayMusic(name) {
if (name == undefined) {
name = _Music_name;
} else {
_Music_name = name;
}
Tracer.info("Play music: " + _Music_name);
if ((_Music != undefined) && (_Music_playing == false)) {
_Music.setVolume(SoundVolume);
var _local1 = new Object();
_local1.ll = MUSIC_LOUD_VALUE;
_local1.lr = 0;
_local1.rr = MUSIC_LOUD_VALUE;
_local1.rl = 0;
_Music.setTransform(_local1);
_Music.start(0, 1000);
_Music_playing = true;
}
}
static function StopMusic() {
Tracer.info("Stop music");
if ((_Music != undefined) && (_Music_playing == true)) {
_Music.stop();
_Music_playing = false;
}
}
static function LoadMusic(url, localImported) {
if (localImported == undefined) {
localImported = false;
}
Tracer.info("Start load music from: " + url);
_Music_name = url;
if (_Music == undefined) {
_Music = new Sound();
}
if (!localImported) {
_Music.onLoad = function (success) {
var _local1 = new Object();
_local1.ll = Helper.MUSIC_LOUD_VALUE;
_local1.lr = Helper.MUSIC_LOUD_VALUE;
_local1.rr = 0;
_local1.rl = 0;
Helper._Music.setTransform(_local1);
if (Helper.OnMusicLoaded != undefined) {
Helper.OnMusicLoaded(success);
}
};
_Music.loadSound(url, false);
} else {
_Music.attachSound(_Music_name);
OnMusicLoaded(true);
}
}
static function AbortMusicLoad() {
if (_Music != undefined) {
delete _Music;
_Music = undefined;
if (OnMusicLoaded != undefined) {
OnMusicLoaded(false);
}
}
}
static function ConvertSeconds2TimeString(seconds) {
var _local1 = seconds;
var _local2 = Math.floor(_local1 / 60);
_local1 = _local1 % 60;
return((((Math.abs(_local2) < 10) ? ("0" + _local2) : (_local2)) + ":") + ((Math.abs(_local1) < 10) ? ("0" + _local1) : (_local1)));
}
static function LoadUrlXML(xml) {
var _local1 = xml.firstChild;
_get_it_url = _local1.attributes.url;
_get_it_target = _local1.attributes.window;
Tracer.info(((("UrlXML loaded: \"" + _get_it_url) + "\", \"") + _get_it_target) + "\"");
}
static function GetIt() {
if (_get_it_url == undefined) {
Tracer.trace("Get it url not loaded!");
return(undefined);
}
getURL (_get_it_url, _get_it_target);
}
static function SubtractArray(from, what) {
if (what.length == 0) {
return(from);
}
var _local5 = new Array();
var _local2 = 0;
while (_local2 < from.length) {
var _local1 = 0;
while (_local1 < what.length) {
if (from[_local2] == what[_local1]) {
break;
}
if (_local1 == (what.length - 1)) {
_local5.push(from[_local2]);
}
_local1++;
}
_local2++;
}
return(_local5);
}
static function IntersectArray(from, what) {
if (what.length == 0) {
return(null);
}
if (from.length == 0) {
return(null);
}
var _local5 = new Array();
var _local2 = 0;
while (_local2 < from.length) {
var _local1 = 0;
while (_local1 < what.length) {
if (from[_local2] == what[_local1]) {
_local5.push(from[_local2]);
break;
}
_local1++;
}
_local2++;
}
return(_local5);
}
static function SearchArray(arr, what) {
var _local1 = 0;
while (_local1 < arr.length) {
if (arr[_local1] == what) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function SearchArray2(needle, arr) {
var _local1 = 0;
while (_local1 < arr.length) {
if (arr[_local1] == needle) {
return(_local1);
}
_local1++;
}
return(-1);
}
static function GetRandomFromArray(arr) {
if (arr.length == 0) {
return(undefined);
}
return(arr[Math.floor(arr.length * Math.random())]);
}
static function ClearArray(arr) {
if (arr == undefined) {
return(undefined);
}
while (arr.length != 0) {
arr.pop();
}
}
static function ClearArray2(arr) {
if (arr == undefined) {
return(undefined);
}
while (arr.length != 0) {
var _local1 = arr.pop();
if (((_local1 != null) && (_local1 != undefined)) && (_local1 instanceof MovieClip)) {
MovieClip(_local1).removeMovieClip();
_local1 = undefined;
}
}
}
static function FillArray(arr, filler) {
if (arr == undefined) {
return(undefined);
}
var _local1 = 0;
while (_local1 < arr.length) {
arr[_local1] = filler;
_local1++;
}
}
static function CopyArray(arr) {
var _local2 = new Array();
for (var _local3 in arr) {
if (arr[_local3] instanceof Array) {
_local2[_local3] = Array(arr[_local3]).slice();
} else {
_local2[_local3] = arr[_local3];
}
}
return(_local2);
}
static function CreateFPSCounter() {
_root._fps = 0;
var _local2 = _root.createEmptyMovieClip("fps_mc", 20000);
_local2.onEnterFrame = function () {
_root._fps++;
};
_local2._x = 200;
_local2.createTextField("tf", 10000, 0, 0, 60, 20);
_local2.tf.selectable = false;
_local2.tf.backgroundColor = 16777215 /* 0xFFFFFF */;
_local2.tf.background = true;
setInterval(function () {
_root.fps_mc.tf.text = "fps:" + _root._fps;
_root._fps = 0;
}, 1000);
}
static function setTimeout(functionReference, delay, args) {
return(_global.setTimeout(functionReference, delay, args));
}
static function StopMovies(mc) {
for (var _local2 in mc) {
if (mc[_local2] instanceof MovieClip) {
MovieClip(mc[_local2]).stop();
StopMovies(MovieClip(mc[_local2]));
}
}
}
static function PlayMovies(mc) {
for (var _local2 in mc) {
if ((mc[_local2] instanceof MovieClip) && (_local2 != "mcCarryObject")) {
MovieClip(mc[_local2]).play();
PlayMovies(MovieClip(mc[_local2]));
}
}
}
static function SetHighlite(mc) {
mc.filters = HighliteFilterOn;
}
static function ClearHighlite(mc) {
mc.filters = HighliteFilterOff;
}
static function SetGrayscale(mc) {
mc.filters = GrayscaleFilterOn;
}
static function ClearGrayscale(mc) {
mc.filters = GrayscaleFilterOff;
}
static function MochiAdShowPreloadAd(parent_mc) {
if (MochiAdEnabled) {
var _local1 = "2c6ab2";
if (Math.random() > 0.2) {
_local1 = MochiAdId;
} else {
_local1 = _local1 + "01369c056c";
}
MochiAd.showPreGameAd({id:_local1, res:"640x480", clip:parent_mc, background:14284287, color:13832216});
} else {
parent_mc.play();
}
}
static function MochiAdShowLevelAd(parent_mc, callback_func) {
if (MochiAdEnabled) {
var _local1 = "2c6ab2013";
if (Math.random() > 0.2) {
_local1 = MochiAdId;
} else {
_local1 = _local1 + "69c056c";
}
if (callback_func != undefined) {
MochiAd.showInterLevelAd({id:_local1, res:"640x480", clip:parent_mc, background:14284287, color:13832216, ad_started:function () {
}, ad_finished:callback_func});
} else {
MochiAd.showInterLevelAd({id:_local1, res:"640x480", clip:parent_mc, background:14284287, color:13832216, ad_started:function () {
}});
}
} else if (callback_func != undefined) {
callback_func();
} else {
parent_mc.play();
}
}
static var DEBUG = false;
static var DEBUG_START_LEVEL = 4;
static var DEBUG2 = false;
static var DEBUG_MAP = false;
static var SKIP_MENU = false;
static var DEBUG_CLIENT_IN_FIRST_ROOM = false;
static var DEBUG_FLOWERS = false;
static var DEBUG_ALL_UPGRADES_AVAILABLE = false;
static var DEBUG_START_MONEYS = 5000;
static var DEBUG_GLOBAL_SPEED_MUL = 1;
static var MochiAdId = "9d5719ed7edb9420";
static var MochiAdEnabled = true;
static var FORCE_LANGUAGE = "ENG";
static var GLOBAL_STORE_ID = "RealoreFlashGames";
static var GLOBAL_GAME_ID = "JanesHoteliYZIdgwg";
static var globalSharedObject = SharedObject.getLocal(GLOBAL_STORE_ID);
static var globalGameSharedObject = SharedObject.getLocal(GLOBAL_GAME_ID);
static var _playerName = ((globalSharedObject.data.PlayerName != undefined) ? (globalSharedObject.data.PlayerName) : "");
static var globalGameScore = 0;
static var globalGameLevelStartScore = 0;
static var globalGameLevelStartSpend = 0;
static var globalGameLevelStartUpgrades = new Array();
static var globalGameLevelStartLevel = 0;
static var MUSIC_LOUD_VALUE = 50;
static var SoundVolume = 100;
static var _MusicVolume = 100;
static var _Music_playing = false;
static var MusicEnabled = true;
static var HighliteFilter = new flash.filters.GlowFilter(16773263, 0.9, 5, 5, 100, 1);
static var HighliteFilterOn = new Array(HighliteFilter);
static var HighliteFilterOff = new Array();
static var grayscale_matrix = [0.308600038290024, 0.609399974346161, 0.0820000022649765, 0, 0, 0.308600008487701, 0.609399974346161, 0.0820000022649765, 0, 0, 0.308600008487701, 0.609399974346161, 0.0820000246167183, 0, 0, 0, 0, 0, 1, 0];
static var GrayscaleFilter = new flash.filters.ColorMatrixFilter(grayscale_matrix);
static var GrayscaleFilterOn = new Array(GrayscaleFilter);
static var GrayscaleFilterOff = new Array();
}
Symbol 1345 MovieClip [__Packages.MochiAd] Frame 0
class MochiAd
{
function MochiAd () {
}
static function getVersion() {
return("2.1");
}
static function showPreGameAd(options) {
var _local27 = {clip:_root, ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:16747008, background:16777161, outline:13994812, ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local27);
var clip = options.clip;
var _local23 = 11000;
var _local26 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local14 = _getRes(options);
var _local4 = _local14[0];
var _local13 = _local14[1];
mc._x = _local4 * 0.5;
mc._y = _local13 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk._x = _local4 * -0.5;
chk._y = _local13 * -0.5;
var _local7 = chk.createEmptyMovieClip("_mochiad_bar", 4);
_local7._x = 10;
_local7._y = _local13 - 20;
var _local22 = options.color;
delete options.color;
var _local19 = options.background;
delete options.background;
var _local24 = options.outline;
delete options.outline;
var _local5 = _local7.createEmptyMovieClip("_outline", 1);
_local5.beginFill(_local19);
_local5.moveTo(0, 0);
_local5.lineTo(_local4 - 20, 0);
_local5.lineTo(_local4 - 20, 10);
_local5.lineTo(0, 10);
_local5.lineTo(0, 0);
_local5.endFill();
var _local3 = _local7.createEmptyMovieClip("_inside", 2);
_local3.beginFill(_local22);
_local3.moveTo(0, 0);
_local3.lineTo(_local4 - 20, 0);
_local3.lineTo(_local4 - 20, 10);
_local3.lineTo(0, 10);
_local3.lineTo(0, 0);
_local3.endFill();
_local3._xscale = 0;
var _local6 = _local7.createEmptyMovieClip("_outline", 3);
_local6.lineStyle(0, _local24, 100);
_local6.moveTo(0, 0);
_local6.lineTo(_local4 - 20, 0);
_local6.lineTo(_local4 - 20, 10);
_local6.lineTo(0, 10);
_local6.lineTo(0, 0);
chk.ad_msec = _local23;
chk.ad_timeout = _local26;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec;
};
chk.onEnterFrame = function () {
var _local6 = this._parent._parent;
var _local12 = this._parent._mochiad_ctr;
var _local5 = getTimer() - this.started;
var _local3 = false;
var _local4 = _local6.getBytesTotal();
var _local8 = _local6.getBytesLoaded();
var _local10 = (100 * _local8) / _local4;
var _local11 = (100 * _local5) / chk.ad_msec;
var _local9 = this._mochiad_bar._inside;
var _local2 = Math.min(100, Math.min(_local10 || 0, _local11));
_local2 = Math.max(this.last_pcnt, _local2);
this.last_pcnt = _local2;
_local9._xscale = _local2;
if (!chk.showing) {
var _local7 = _local12.getBytesTotal();
if ((_local7 > 0) || (typeof(_local7) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local5 > chk.ad_timeout) {
_local3 = true;
}
}
if (_local5 > chk.ad_msec) {
_local3 = true;
}
if (((_local4 > 0) && (_local8 >= _local4)) && (_local3)) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
}
}
};
}
static function showInterLevelAd(options) {
var _local13 = {clip:_root, ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function () {
this.clip.stop();
}, ad_finished:function () {
this.clip.play();
}};
options = _parseOptions(options, _local13);
var clip = options.clip;
var _local10 = 11000;
var _local12 = options.ad_timeout;
delete options.ad_timeout;
var fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!load(options)) {
options.ad_finished();
return(undefined);
}
options.ad_started();
var mc = clip._mochiad;
mc.onUnload = function () {
options.ad_finished();
};
var _local5 = _getRes(options);
var _local14 = _local5[0];
var _local11 = _local5[1];
mc._x = _local14 * 0.5;
mc._y = _local11 * 0.5;
var chk = mc.createEmptyMovieClip("_mochiad_wait", 3);
chk.ad_msec = _local10;
chk.ad_timeout = _local12;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function () {
var _local2 = 100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time));
if (_local2 > 0) {
this._parent._alpha = _local2;
} else {
var _local3 = this._parent._parent;
MochiAd.unload(_local3);
delete this.onEnterFrame;
}
};
mc.lc.adLoaded = function (width, height) {
};
mc.lc.adjustProgress = function (msec) {
var _local2 = this.mc._mochiad_wait;
_local2.server_control = true;
_local2.started = getTimer();
_local2.ad_msec = msec - 250;
};
chk.onEnterFrame = function () {
var _local5 = this._parent._mochiad_ctr;
var _local4 = getTimer() - this.started;
var _local2 = false;
if (!chk.showing) {
var _local3 = _local5.getBytesTotal();
if ((_local3 > 0) || (typeof(_local3) == "undefined")) {
chk.showing = true;
chk.started = getTimer();
} else if (_local4 > chk.ad_timeout) {
_local2 = true;
}
}
if (_local4 > chk.ad_msec) {
_local2 = true;
}
if (_local2) {
if (this.server_control) {
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
}
}
};
}
static function showTimedAd(options) {
showInterLevelAd(options);
}
static function showPreloaderAd(options) {
showPreGameAd(options);
}
static function _allowDomains(server) {
var _local1 = server.split("/")[2].split(":")[0];
if (System.security) {
if (System.security.allowDomain) {
System.security.allowDomain("*");
System.security.allowDomain(_local1);
}
if (System.security.allowInsecureDomain) {
System.security.allowInsecureDomain("*");
System.security.allowInsecureDomain(_local1);
}
}
return(_local1);
}
static function _loadCommunicator(options) {
var _local26 = {clip:_root, com_server:"http://x.mochiads.com/com/1/", method:"loadCommunicator", depth:10337, id:"_UNKNOWN_"};
options = _parseOptions(options, _local26);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local18 = options.clip;
var _local20 = "_mochiad_com_" + options.id;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local18[_local20]) {
return(_local18[_local20].lc);
}
var _local21 = options.com_server + options.id;
_allowDomains(_local21);
delete options.id;
delete options.com_server;
var _local25 = options.depth;
delete options.depth;
var _local17 = _local18.createEmptyMovieClip(_local20, _local25);
var _local11 = _local17.createEmptyMovieClip("_mochiad_com", 1);
for (var _local15 in options) {
_local11[_local15] = options[_local15];
}
var _local6 = new LocalConnection();
var _local16 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local6.mc = _local17;
_local6.name = _local16;
_local6.allowDomain = function (d) {
return(true);
};
_local6.allowInsecureDomain = _local6.allowDomain;
_local6.connect(_local16);
_local17.lc = _local6;
_local11.lc = _local16;
_local6._id = 0;
_local6._queue = [];
_local6.rpcResult = function (cb_arg) {
var _local8 = parseInt(cb_arg);
var _local4 = this._callbacks[_local8];
if (!_local4) {
return(undefined);
}
delete this._callbacks[_local8];
var _local5 = [];
var _local3 = 2;
while (_local3 < _local4.length) {
_local5.push(_local4[_local3]);
_local3++;
}
_local3 = 1;
while (_local3 < arguments.length) {
_local5.push(arguments[_local3]);
_local3++;
}
var _local6 = _local4[1];
var _local7 = _local4[0];
if (_local7 && (typeof(_local6) == "string")) {
_local6 = _local7[_local6];
}
if (_local6) {
_local6.apply(_local7, _local5);
}
};
_local6._didConnect = function (endpoint) {
this._endpoint = endpoint;
var _local4 = this._queue;
delete this._queue;
var _local5 = this.doSend;
var _local2 = 0;
while (_local2 < _local4.length) {
var _local3 = _local4[_local2];
_local5.apply(this, _local3);
_local2++;
}
};
_local6.doSend = function (args, cbobj, cbfn) {
if (this._endpoint == null) {
var _local4 = [];
var _local3 = 0;
while (_local3 < arguments.length) {
_local4.push(arguments[_local3]);
_local3++;
}
this._queue.push(_local4);
return(undefined);
}
this._id = this._id + 1;
var _local5 = this._id;
if ((cbfn === undefined) || (cbfn === null)) {
cbfn = cbobj;
}
this._callbacks[_local5] = [cbobj, cbfn];
var _local7 = new LocalConnection();
var _local9 = _local7.send(this._endpoint, "rpc", _local5, args);
};
_local6._callbacks = {};
_local6._callbacks[0] = [_local6, "_didConnect"];
_local11.st = getTimer();
_local11.loadMovie(_local21 + ".swf", "POST");
return(_local6);
}
static function fetchHighScores(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["fetchHighScores", options];
_local1.doSend(["fetchHighScores", options], callbackObj, callbackMethod);
return(true);
}
static function sendHighScore(options, callbackObj, callbackMethod) {
var _local1 = _loadCommunicator({id:options.id});
if (!_local1) {
return(false);
}
var _local4 = ["sendHighScore", options];
_local1.doSend(["sendHighScore", options], callbackObj, callbackMethod);
return(true);
}
static function load(options) {
var _local13 = {clip:_root, server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = _parseOptions(options, _local13);
options.swfv = options.clip.getSWFVersion() || 6;
options.mav = getVersion();
var _local9 = options.clip;
if (!_isNetworkAvailable()) {
return(null);
}
if (_local9._mochiad_loaded) {
return(null);
}
var _local12 = options.depth;
delete options.depth;
var _local6 = _local9.createEmptyMovieClip("_mochiad", _local12);
var _local11 = _getRes(options);
options.res = (_local11[0] + "x") + _local11[1];
options.server = options.server + options.id;
delete options.id;
_local9._mochiad_loaded = true;
var _local4 = _local6.createEmptyMovieClip("_mochiad_ctr", 1);
for (var _local7 in options) {
_local4[_local7] = options[_local7];
}
var _local10 = _local4.server;
delete _local4.server;
var _local14 = _allowDomains(_local10);
_local6.onEnterFrame = function () {
if (this._mochiad_ctr._url != this._url) {
this.onEnterFrame = function () {
if (!this._mochiad_ctr) {
delete this.onEnterFrame;
MochiAd.unload(this._parent);
}
};
}
};
var _local5 = new LocalConnection();
var _local8 = ["", Math.floor(new Date().getTime()), random(999999)].join("_");
_local5.mc = _local6;
_local5.name = _local8;
_local5.hostname = _local14;
_local5.allowDomain = function (d) {
return(true);
};
_local5.allowInsecureDomain = _local5.allowDomain;
_local5.connect(_local8);
_local6.lc = _local5;
_local4.lc = _local8;
_local4.st = getTimer();
_local4.loadMovie(_local10 + ".swf", "POST");
return(_local6);
}
static function unload(clip) {
if (typeof(clip) == "undefined") {
clip = _root;
}
if (clip.clip && (clip.clip._mochiad)) {
clip = clip.clip;
}
if (!clip._mochiad) {
return(false);
}
clip._mochiad.removeMovieClip();
delete clip._mochiad_loaded;
delete clip._mochiad;
return(true);
}
static function _isNetworkAvailable() {
if (System.security) {
var _local1 = System.security;
if (_local1.sandboxType == "localWithFile") {
return(false);
}
}
return(true);
}
static function _getRes(options) {
var _local3 = options.clip.getBounds();
var _local2 = 0;
var _local1 = 0;
if (typeof(options.res) != "undefined") {
var _local4 = options.res.split("x");
_local2 = parseFloat(_local4[0]);
_local1 = parseFloat(_local4[1]);
} else {
_local2 = _local3.xMax - _local3.xMin;
_local1 = _local3.yMax - _local3.yMin;
}
if ((_local2 == 0) || (_local1 == 0)) {
_local2 = Stage.width;
_local1 = Stage.height;
}
return([_local2, _local1]);
}
static function _parseOptions(options, defaults) {
var _local4 = {};
for (var _local8 in defaults) {
_local4[_local8] = defaults[_local8];
}
if (options) {
for (var _local8 in options) {
_local4[_local8] = options[_local8];
}
}
if (_root.mochiad_options) {
var _local5 = _root.mochiad_options.split("&");
var _local2 = 0;
while (_local2 < _local5.length) {
var _local3 = _local5[_local2].split("=");
_local4[unescape(_local3[0])] = unescape(_local3[1]);
_local2++;
}
}
return(_local4);
}
}
Symbol 1346 MovieClip [__Packages.xml_singlefile_data] Frame 0
class xml_singlefile_data
{
function xml_singlefile_data () {
}
static var languageXmlData = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<languages>\n\t<language id=\"RU\" name=\"\u0420\u0443\u0441\u0441\u043A\u0438\u0439\" intname=\"Russian\">\n <![CDATA[\ngame name:\u041F\u043E\u0432\u0435\u0440\u044C \u0432 \u0421\u0430\u043D\u0442\u0443\nmenu:\u041C\u0415\u041D\u042E\nresume:\u041D\u0410\u0417\u0410\u0414\npause:\u041F\u0410\u0423\u0417\u0410\nopen:\u041E\u0422\u041A\u0420\u042B\u0422\u041E\nclose:\u0417\u0410\u041A\u0420\u042B\u0422\u041E\n//---Main menu---\nstart:\u0421\u0422\u0410\u0420\u0422\noptions:\u041E\u041F\u0426\u0418\u0418\nget it:\u0421\u041A\u0410\u0427\u0410\u0422\u042C\nplayer:\u0418\u0413\u0420\u041E\u041A\n//---Player menu---\nenter name:\u0412\u0412\u0415\u0414\u0418\u0422\u0415 \u0412\u0410\u0428\u0415 \u0418\u041C\u042F\ndefault player name:\u0418\u0433\u0440\u043E\u043A\n//---common---\nok:OK\nyes:\u0414\u0410\nno:\u041D\u0415\u0422\nloading:\u0417\u0410\u0413\u0420\u0423\u0417\u041A\u0410\nselect language: \u0412\u042B\u0411\u0415\u0420\u0418\u0422\u0415 \u042F\u0417\u042B\u041A\nwelcome:\u0414\u043E\u0431\u0440\u043E \u043F\u043E\u0436\u0430\u043B\u043E\u0432\u0430\u0442\u044C\nmenu:\u041C\u0415\u041D\u042E\ngame over:\u0412\u042B \u041F\u0420\u041E\u0418\u0413\u0420\u0410\u041B\u0418\n//---Options---\nsound volume:\u0413\u0420\u041E\u041C\u041A\u041E\u0421\u0422\u042C \u0417\u0412\u0423\u041A\u0410\nmusic volume:\u041C\u0423\u0417\u042B\u041A\u0410 \u0412\u041A\u041B/\u0412\u042B\u041A\u041B\nskip loading:\u041F\u0420\u041E\u041F\u0423\u0421\u0422\u0418\u0422\u042C\nof music:\u0423\u0420\u041E\u0412\u041D\u042F\n// ***** GAME ******\nobjective:\u0426\u0415\u041B\u042C \u041D\u0410 \u0421\u0415\u0413\u041E\u0414\u041D\u042F\nmaster:\u041C\u0410\u0421\u0422\u0415\u0420:\nexpert:\u042D\u041A\u0421\u041F\u0415\u0420\u0422:\nsales:\u041F\u0440\u043E\u0434\u0430\u0436\u0438:\nformaster:\u0414\u043B\u044F \u043C\u0430\u0441\u0442\u0435\u0440\u0430:\nforexpert:\u0414\u043B\u044F \u044D\u043A\u0441\u043F\u0435\u0440\u0442\u0430:\n// Level end window\nstrLevel:\u0423\u0420\u041E\u0412\u0415\u041D\u042C\ngreeting:\u041F\u041E\u0417\u0414\u0420\u0410\u0412\u041B\u0415\u041D\u0418\u042F!\nyoulose:\u041F\u041E\u041F\u0420\u041E\u0411\u0423\u0419\u0422\u0415 \u0415\u0429\u0415 \u0420\u0410\u0417!\nnext level:\u0414\u0410\u041B\u042C\u0428\u0415\nexit:\u041C\u0415\u041D\u042E\n//try again:\u041F\u041E\u0412\u0422\u041E\u0420\ntry again:\u0415\u0429\u0415 \u0420\u0410\u0417\nget it text:\u0412 \u043F\u043E\u043B\u043D\u043E\u0439 \u0432\u0435\u0440\u0441\u0438\u0438 \u0438\u0433\u0440\u044B \u0432\u044B \u0443\u0432\u0438\u0434\u0438\u0442\u0435:\n\n- 40 \u0443\u0440\u043E\u0432\u043D\u0435\u0439\n\n- 4 \u043E\u0442\u0435\u043B\u044F \u043E\u0442 2* \u0434\u043E 5*\n\n- \u0431\u043E\u043B\u0435\u0435 40 \u0443\u043B\u0443\u0447\u0448\u0435\u043D\u0438\u0439 \u0438\u043D\u0442\u0435\u0440\u044C\u0435\u0440\u0430\n\n \u0434\u043B\u044F \u0432\u0430\u0448\u0435\u0433\u043E \u043E\u0442\u0435\u043B\u044F\n\n- \u0448\u0438\u043A\u0430\u0440\u043D\u043E\u0435 \u043E\u0437\u0432\u0443\u0447\u0430\u043D\u0438\u0435 \u0438\n\n \u0432\u0435\u043B\u0438\u043A\u043E\u043B\u0435\u043F\u043D\u0443\u044E \u0433\u0440\u0430\u0444\u0438\u043A\u0443\n//---Game menu---\nwant to exit:\u0412\u044B \u0443\u0432\u0435\u0440\u0435\u043D\u044B, \u0447\u0442\u043E \u0445\u043E\u0442\u0438\u0442\u0435\n\n\u043F\u0440\u0435\u0440\u0432\u0430\u0442\u044C \u0438\u0433\u0440\u0443?\nresume:\u041F\u0420\u041E\u0414\u041E\u041B\u0416\u0418\u0422\u042C\nabort:\u0412\u042B\u0425\u041E\u0414\n//---NEW---\nday:\u0414\u0435\u043D\u044C\nstart goal:\u0426\u0435\u043B\u044C:\nstart popular:\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u043E\u0441\u0442\u044C:\npress any key:\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043B\u044E\u0431\u0443\u044E \u043A\u043B\u0430\u0432\u0438\u0448\u0443\ngame goal:\u0426\u0435\u043B\u044C\nstrServed:\u041A\u043B\u0438\u0435\u043D\u0442\u043E\u0432 \u043E\u0431\u0441\u043B\u0443\u0436\u0435\u043D\u043E:\nstrLosted:\u041A\u043B\u0438\u0435\u043D\u0442\u043E\u0432 \u043D\u0435 \u043E\u0431\u0441\u043B\u0443\u0436\u0435\u043D\u043E:\nstrSales:\u041F\u0440\u0438\u0431\u044B\u043B\u044C \u0437\u0430 \u0434\u0435\u043D\u044C:\nstrTotal:\u041E\u0431\u0449\u0430\u044F \u043F\u0440\u0438\u0431\u044B\u043B\u044C:\n//... upgrades shop ...\nshop popular:\u041F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u043E\u0441\u0442\u044C:\nshop money:\u0414\u0435\u043D\u044C\u0433\u0438:\nshop warning1:\u041D\u0430\u0434\u043E \nshop warning2: \u043E\u0447\u043A\u043E\u0432 \u043F\u043E\u043F\u0443\u043B\u044F\u0440\u043D\u043E\u0441\u0442\u0438\nshop butt play:\u0418\u0413\u0420\u0410\u0422\u042C\nshop butt menu:\u041C\u0415\u041D\u042E\ndetail require:\u041D\u0430\u0434\u043E\ndetail take:\u0414\u0430\u0435\u0442\nshop back button:\u041D\u0410\u0417\u0410\u0414\nshop buy button:\u041A\u0423\u041F\u0418\u0422\u042C\ngood0name:\u0426\u0432\u0435\u0442\u044B\ngood0descr:\u042D\u0442\u0438 \u0447\u0443\u0434\u043D\u044B\u0435 \u0446\u0432\u0435\u0442\u044B \u0441\u0434\u0435\u043B\u0430\u044E\u0442 \u043E\u0442\u0435\u043B\u044C \u0431\u043E\u043B\u0435\u0435 \u043A\u0440\u0430\u0441\u0438\u0432\u044B\u043C \u0438 \u0443\u044E\u0442\u043D\u044B\u043C. \u0413\u043B\u044F\u0434\u044F \u043D\u0430 \u043D\u0438\u0445, \u043A\u043B\u0438\u0435\u043D\u0442\u044B \u043E\u0442\u0435\u043B\u044F \u0431\u0443\u0434\u0443\u0442 \u043D\u0435 \u0442\u0430\u043A \u0441\u0438\u043B\u044C\u043D\u043E \u0441\u043E\u0441\u0440\u0435\u0434\u043E\u0442\u043E\u0447\u0435\u043D\u044B \u043D\u0430 \u0441\u0432\u043E\u0438\u0445 \u0437\u0430\u0431\u043E\u0442\u0430\u0445.\ngood1name:\u0421\u0432\u0435\u0436\u0438\u0435 \u0433\u0430\u0437\u0435\u0442\u044B\ngood1descr:\u0422\u0435\u043F\u0435\u0440\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u044B \u043E\u0442\u0435\u043B\u044F \u0432\u0441\u0435\u0433\u0434\u0430 \u0441\u043C\u043E\u0433\u0443\u0442 \u0437\u0430\u043A\u0430\u0437\u0430\u0442\u044C \u0441\u0432\u0435\u0436\u0438\u0435 \u0433\u0430\u0437\u0435\u0442\u044B.\ngood2name:\u041A\u0430\u0440\u0442\u0438\u043D\u044B\ngood2descr:\u041A\u0430\u0440\u0442\u0438\u043D\u044B \u0432 \u0445\u043E\u043B\u043B\u0435 \u0441\u0434\u0435\u043B\u0430\u044E\u0442 \u043E\u0442\u0435\u043B\u044C \u0435\u0449\u0435 \u0431\u043E\u043B\u0435\u0435 \u0443\u044E\u0442\u043D\u044B\u043C \u0434\u043B\u044F \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u0432. \ngood3name:\u0414\u0438\u0432\u0430\u043D \u0438 \u0442\u0435\u043B\u0435\u0432\u0438\u0437\u043E\u0440\ngood3descr:\u0422\u0435\u043F\u0435\u0440\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u044B \u043E\u0442\u0435\u043B\u044F \u0441\u043C\u043E\u0433\u0443\u0442 \u043F\u043E\u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u0442\u0435\u043B\u0435\u0432\u0438\u0437\u043E\u0440 \u0438 \u0432\u044B\u043F\u0438\u0442\u044C \u043A\u043E\u0444\u0435 \u0432 \u0445\u043E\u043B\u043B\u0435.\ngood4name:\u0410\u043A\u0432\u0430\u0440\u0438\u0443\u043C\ngood4descr:\u041A\u0430\u043A \u043F\u0440\u0438\u044F\u0442\u043D\u043E \u0441\u043C\u043E\u0442\u0440\u0435\u0442\u044C \u043D\u0430 \u044F\u0440\u043A\u0438\u0445 \u0438 \u0432\u0435\u0441\u0435\u043B\u044B\u0445 \u0440\u044B\u0431\u043E\u043A!\ngood5name:\u041A\u043E\u0444\u0435\u0439\u043D\u044B\u0439 \u0441\u0442\u043E\u043B\u0438\u043A\ngood5descr:\u0422\u0435\u043F\u0435\u0440\u044C \u043F\u0438\u0442\u044C \u043A\u043E\u0444\u0435 \u0438 \u0447\u0438\u0442\u0430\u0442\u044C \u0433\u0430\u0437\u0435\u0442\u0443 \u043A\u043B\u0438\u0435\u043D\u0442\u044B \u0441\u043C\u043E\u0433\u0443\u0442 \u043D\u0435 \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043D\u043E\u043C\u0435\u0440\u0435, \u043D\u043E \u0438 \u0432 \u0445\u043E\u043B\u043B\u0435.\ngood6name:\u0421\u0432\u0435\u0442\u0438\u043B\u044C\u043D\u0438\u043A\u0438\ngood6descr:\u0421 \u044D\u0442\u0438\u043C\u0438 \u0441\u0432\u0435\u0442\u0438\u043B\u044C\u043D\u0438\u043A\u0430\u043C\u0438 \u043E\u0442\u0435\u043B\u044C \u0431\u0443\u0434\u0435\u0442 \u0432\u044B\u0433\u043B\u044F\u0434\u0435\u0442\u044C \u0431\u043E\u043B\u0435\u0435 \u043A\u043E\u043C\u0444\u043E\u0440\u0442\u043D\u044B\u043C.\ngood7name:\u0422\u0435\u043B\u0435\u0444\u043E\u043D\ngood7descr:\u0422\u0435\u043F\u0435\u0440\u044C \u043A\u043B\u0438\u0435\u043D\u0442\u044B \u043E\u0442\u0435\u043B\u044F \u0441\u043C\u043E\u0433\u0443\u0442 \u043F\u043E\u0437\u0432\u043E\u043D\u0438\u0442\u044C \u0432 \u043B\u044E\u0431\u043E\u0435 \u0432\u0440\u0435\u043C\u044F.\ngood8name:\u0417\u0432\u0435\u0437\u0434\u0430\ngood8descr:\u041F\u043E\u043B\u0443\u0447\u0438\u0432 \u044D\u0442\u0443 \u0437\u0432\u0435\u0437\u0434\u0443, \u0432\u0430\u0448 \u043E\u0442\u0435\u043B\u044C \u0441\u0442\u0430\u043D\u0435\u0442 \u0442\u0440\u0435\u0445\u0437\u0432\u0435\u0437\u0434\u043E\u0447\u043D\u044B\u043C.\nstimul good:\u0425\u041E\u0420\u041E\u0428\u041E\nstimul excellent:\u041E\u0422\u041B\u0418\u0427\u041D\u041E\nstimul impressive:\u0412\u041F\u0415\u0427\u0410\u0422\u041B\u042F\u042E\u0429\u0415\nstimul incredible:\u041F\u041E\u0422\u0420\u042F\u0421\u0410\u042E\u0429\u0415\nmessage get ready:\u041F\u0420\u0418\u0413\u041E\u0422\u041E\u0412\u0418\u041B\u0418\u0421\u042C\nmessage go:\u041D\u0410\u0427\u0410\u041B\u0418!\nmessage goal complete:\u0426\u0415\u041B\u042C \u0412\u042B\u041F\u041E\u041B\u041D\u0415\u041D\u0410\nscores:\u041E\u0427\u041A\u0418\nsend score title:\u041E\u0442\u043F\u0440\u0430\u0432\u0438\u0442\u044C \u0440\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442?\nplayer name:\u0418\u043C\u044F\nplayer score:\u0420\u0435\u0437\u0443\u043B\u044C\u0442\u0430\u0442\ncancel:\u041E\u0422\u041C\u0415\u041D\u0410\n//---Tips---\nshow tips:\u041F\u043E\u043A\u0430\u0437\u044B\u0432\u0430\u0442\u044C \u043F\u043E\u0434\u0441\u043A\u0430\u0437\u043A\u0438...\ntip1text:\u042D\u0442\u043E \u043A\u043B\u0438\u0435\u043D\u0442, \u043E\u043D \u0445\u043E\u0447\u0435\u0442 \u043F\u043E\u0441\u0435\u043B\u0438\u0442\u044C\u0441\u044F \u0432 \u043E\u0442\u0435\u043B\u0435, \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043D\u0430 \u0441\u0442\u043E\u043B \u0430\u0434\u043C\u0438\u043D\u0438\u0441\u0442\u0440\u0430\u0442\u043E\u0440\u0430, \u0447\u0442\u043E\u0431\u044B \u0432\u0437\u044F\u0442\u044C \u043A\u043B\u044E\u0447.\ntip2text:\u041E\u0442\u0434\u0430\u0439\u0442\u0435 \u043A\u043B\u044E\u0447 \u043A\u043B\u0438\u0435\u043D\u0442\u0443, \u0438 \u043E\u043D \u0437\u0430\u0441\u0435\u043B\u0438\u0442\u0441\u044F \u0432 \u0441\u0432\u043E\u0431\u043E\u0434\u043D\u044B\u0439 \u043D\u043E\u043C\u0435\u0440.\ntip3text:\u041A\u043B\u0438\u0435\u043D\u0442 \u043F\u0440\u043E\u0441\u0438\u0442 \u043A\u043E\u0444\u0435, \u043D\u0430\u0436\u043C\u0438\u0442\u0435 \u043D\u0430 \u043A\u043E\u0444\u0435\u0432\u0430\u0440\u043A\u0443, \u0438 \u0414\u0436\u0435\u0439\u043D \u0432\u043E\u0437\u044C\u043C\u0435\u0442 \u0447\u0430\u0448\u043A\u0443 \u043A\u043E\u0444\u0435.\ntip4text:\u041D\u0430\u0436\u043C\u0438\u0442\u0435 \u043D\u0430 \u0434\u0432\u0435\u0440\u044C \u0432 \u043D\u043E\u043C\u0435\u0440, \u0438 \u0414\u0436\u0435\u0439\u043D \u043E\u0442\u043D\u0435\u0441\u0435\u0442 \u0447\u0430\u0448\u043A\u0443 \u0441 \u043A\u043E\u0444\u0435 \u043A\u043B\u0438\u0435\u043D\u0442\u0443.\ntip5text:\u0412\u043D\u0430\u0447\u0430\u043B\u0435 \u043A\u0430\u0436\u0434\u043E\u0433\u043E \u0434\u043D\u044F, \u0432\u0430\u043C \u043D\u0435\u043E\u0431\u0445\u043E\u0434\u0438\u043C\u043E \u043D\u0430\u0432\u0435\u0441\u0442\u0438 \u043F\u043E\u0440\u044F\u0434\u043E\u043A \u0432 \u043D\u043E\u043C\u0435\u0440\u0430\u0445, \u0434\u043B\u044F \u0442\u043E\u0433\u043E \u0447\u0442\u043E \u0431\u044B \u0437\u0430\u0441\u0435\u043B\u0438\u0442\u044C \u043D\u043E\u0432\u044B\u0445 \u043A\u043B\u0438\u0435\u043D\u0442\u043E\u0432. \u0414\u043B\u044F \u044D\u0442\u043E\u0433\u043E \u0432\u0430\u043C \u043F\u043E\u043D\u0430\u0434\u043E\u0431\u0438\u0442\u0441\u044F \u043F\u043E\u043C\u043E\u0449\u044C \u0433\u043E\u0440\u043D\u0438\u0447\u043D\u043E\u0439.\ntip15text:\u0412\u044B \u0437\u0430\u0440\u0430\u0431\u043E\u0442\u0430\u043B\u0438 \u0441\u0432\u043E\u0438 \u043F\u0435\u0440\u0432\u044B\u0435 \u0434\u0435\u043D\u044C\u0433\u0438, \u0438 \u0442\u0435\u043F\u0435\u0440\u044C \u0438\u0445 \u043C\u043E\u0436\u043D\u043E \u043F\u043E\u0442\u0440\u0430\u0442\u0438\u0442\u044C \u043D\u0430 \u043E\u0431\u0443\u0441\u0442\u0440\u043E\u0439\u0441\u0442\u0432\u043E \u043E\u0442\u0435\u043B\u044F.\nmenu tips:\u041F\u041E\u041A\u0410\u0417\u042B\u0412\u0410\u0422\u042C \u041F\u041E\u0414\u0421\u041A\u0410\u0417\u041A\u0418\n]]></language>\n<language id=\"ENG\" name=\"English\" intname=\"English\">\n <![CDATA[\ngame name:Believe in Santa\nmenu:MENU\nresume:RESUME\npause:PAUSE\nopen:OPEN\nclose:CLOSE\n//---Main menu---\nstart:START\noptions:OPTIONS\nget it:GET IT\nplayer:PLAYER\n//---Player menu---\nenter name:ENTER YOUR NAME\ndefault player name:Player\n//---common---\nok:OK\nyes:YES\nno:NO\nloading:LOADING\nselect language:SELECT YOUR LANGUAGE\nwelcome:WELCOME\nmenu:MENU\ngame over:GAME OVER\n//---Options---\nsound volume:SOUND VOLUME\nmusic volume:Music ON/OFF\nskip loading:SKIP\nof music:LEVEL\n// ***** GAME ******\nobjective:TODAY`S GOAL\nmaster:MASTER:\nexpert:EXPERT:\nsales:Sales:\nformaster:For master:\nforexpert:For expert:\n// Level end window\nstrLevel:LEVEL\ngreeting:CONGRATULATIONS!\nyoulose:LET`S TRY AGAIN!\nstrServed:Customers served:\nstrLosted:Customers lost:\nstrTToys:Toys discarded:\nstrTPacks:Wrapping discarded:\nstrSales:Today sales:\nstrObjMaster:Master Goal:\nstrObjExpert:Expert Goal:\nstrBonus:Happiness bonus:\nstrTotal:Today`s total:\nnext level:NEXT\nexit:MENU\ntry again:TRY AGAIN\nget it text:Download now to get:\n\n- You can grade your hotel\n\n up from 2 star till 5 star.\n\n- 40 levels\n\n- You can upgrade your decor\n\n- Fun sounds, cool visual style,\n\n and humorous animations. \n//---Game menu---\nwant to exit:Are you sure you want\n\nto abort the game?\nresume:RESUME\nabort:ABORT\n//---NEW---\nday:Day\nstart goal:Goal:\nstart popular:Popularity:\npress any key:Press any key\ngame goal:Goal\nstrServed:Customers served:\nstrLosted:Customers lost:\nstrSales:Day score:\nstrTotal:Total score:\n//... upgrades shop ...\nshop popular:Popularity:\nshop money:Money:\nshop warning1:Requires \nshop warning2: popularity\nshop butt play:PLAY\nshop butt menu:MENU\ndetail require:Requires\ndetail take:Add\nshop back button:BACK\nshop buy button:BUY\ngood0name:Flowers\ngood0descr:These wonderful flowers make the hotel more beautiful and comfortable. Watching them, customers would not be so concerned with their worries.\ngood1name:Newspapers\ngood1descr:Fresh newspapers. Customers could read fresh press at any time.\ngood2name:Picture\ngood2descr:The pictures on the walls of the hall make it more comfortable for customers.\ngood3name:Sofa and TV Set\ngood3descr:Allow customers watch TV and drink coffee sitting in the hall.\ngood4name:Aquarium\ngood4descr:Customers like observing attractive and blazing fish.\ngood5name:Restaurant\ngood5descr:Customers can drink coffee and read newspapers not only in their rooms, but also in the hall.\ngood6name:Sconce\ngood6descr:These lamp brackets make your hotel more cosy.\ngood7name:Telephone\ngood7descr:Customers can make phone calls at any time.\ngood8name:The Star\ngood8descr:When you get the star, your hotel becomes 3 star hotel. The number of rooms in your hotel increased, the interior became more exquisite.\nstimul good:GOOD\nstimul excellent:EXCELLENT\nstimul impressive:IMPRESSIVE\nstimul incredible:INCREDIBLE\nmessage get ready:GET READY\nmessage go:GO!\nmessage goal complete:GOAL REACHED\nscores:SCORES\nsend score title:Submit your score?\nplayer name:Name\nplayer score:Score\ncancel:CANCEL\n//---Tips---\nshow tips: Show tips...\ntip1text:This is a customer who wishes to take a room. Click on the reception to get the key.\ntip2text:Give the key to the customer and she/he will occupy the room.\ntip3text:The customer wants to take a cup of coffee. Click on the coffee-machine and Jane will make some coffee.\ntip4text:Click on the door of the room and Jane will bring the cup of coffee to the customer.\ntip5text:Every morning the hotel rooms need to be cleaned. You have to order the chambermaid to do it.\ntip15text:You've earned your first money and now you can spend it to improve your hotel.\nmenu tips:SHOW TIPS\n]]></language>\n</languages>\n";
static var urlXmlData = "<data url=\" http://www.realore.com/games/janeshotel/\" window=\"_blank\"/>";
static var levelsXmlData = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n<levels_cfg>\n\t<config>\n\t\t<CleaningTime>4000</CleaningTime>\n\t\t<TimeDryCleaning>5000</TimeDryCleaning>\n\t\t<MaxSuccessPerReputation>5,10,15,20</MaxSuccessPerReputation>\n\t\t<!-- Nenoaia inoaaeaiey aaiaa ca auoia ec ioaey 0-25|26-50|51-75|76-100 -->\n\t\t<LeaveHotelPayPerReputation>5,10,15,20</LeaveHotelPayPerReputation>\n\t</config>\n <levels>\n <level id=\"1\">\n\t\t\t<Goal>50</Goal>\n\t\t\t<CloseTime>25</CloseTime>\n\t\t\t<ActionCountForClients>2</ActionCountForClients>\n\t\t\t<ActionCountForClients2>4</ActionCountForClients2>\n\t\t\t<MaxClient>2</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t</level>\n <level id=\"2\">\n\t\t\t<Goal>100</Goal>\n\t\t\t<CloseTime>60</CloseTime>\n\t\t\t<ActionCountForClients>3</ActionCountForClients>\n\t\t\t<MaxClient>3</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\t\t\t\n\t\t\t<Upgrade>flower</Upgrade>\n\t\t</level>\t\t\n <level id=\"3\">\n\t\t\t<Goal>150</Goal>\n\t\t\t<CloseTime>60</CloseTime>\n\t\t\t<ActionCountForClients>4</ActionCountForClients>\n\t\t\t<MaxClient>4</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t</level>\n <level id=\"4\">\n\t\t\t<Goal>180</Goal>\n\t\t\t<CloseTime>70</CloseTime>\n\t\t\t<ActionCountForClients>4</ActionCountForClients>\n\t\t\t<MaxClient>4</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy</Clients2>\n\t\t\t<Upgrade>picture</Upgrade>\n\t\t</level>\t\n <level id=\"5\">\n\t\t\t<Goal>350</Goal>\n\t\t\t<CloseTime>100</CloseTime>\n\t\t\t<ActionCountForClients>5</ActionCountForClients>\n\t\t\t<MaxClient>6</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy</Clients2>\n\t\t</level>\t\t\n <level id=\"6\">\n\t\t\t<Goal>650</Goal>\n\t\t\t<CloseTime>160</CloseTime>\n\t\t\t<ActionCountForClients>6</ActionCountForClients>\n\t\t\t<MaxClient>15</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy</Clients2>\n\t\t\t<Upgrade>aquarium</Upgrade>\n\t\t</level>\t\t\n <level id=\"7\">\n\t\t\t<Goal>1100</Goal>\n\t\t\t<CloseTime>220</CloseTime>\n\t\t\t<ActionCountForClients>7</ActionCountForClients>\n\t\t\t<MaxClient>15</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy,Tourist</Clients2>\t\n\t\t</level>\t\t\t\n <level id=\"8\">\n\t\t\t<Goal>1300</Goal>\n\t\t\t<CloseTime>250</CloseTime>\n\t\t\t<ActionCountForClients>8</ActionCountForClients>\n\t\t\t<MaxClient>15</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy,Tourist</Clients2>\t\n\t\t</level>\t\t\n <level id=\"9\">\n\t\t\t<Goal>2000</Goal>\n\t\t\t<CloseTime>330</CloseTime>\n\t\t\t<ActionCountForClients>9</ActionCountForClients>\n\t\t\t<MaxClient>20</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy,Tourist</Clients2>\t\n\t\t</level>\t\t\n <level id=\"10\">\n\t\t\t<Goal>2200</Goal>\n\t\t\t<CloseTime>370</CloseTime>\n\t\t\t<ActionCountForClients>8</ActionCountForClients>\n\t\t\t<MaxClient>20</MaxClient>\n\t\t\t<Clients>SimpleWoman,Audioboy</Clients>\n\t\t\t<Clients2>SimpleWoman,Audioboy,Badguy,Tourist</Clients2>\t\n\t\t</level>\n </levels>\n <clients>\n\t <Audioboy>\n<!-- normal -->\t\t \n<!-- <reception2>0|20|200|1|8|35</reception2> -->\n<!-- test -->\t\t \n<reception>0|20|250|1|8|35</reception>\n<away>50</away>\t\t\t\t\t\t\t\n<magazine>15|5|15|1|2|32|2</magazine>\n<phone>20|5|15|1|2|32|2</phone>\n<coffee>20|5|15|1|2|32|2</coffee>\n<fruit>0|5|15|1|2|32|2</fruit>\n<DrinkToRoom>0|5|15|1|2|32|2</DrinkToRoom>\n<DryCleaning>0|5|15|1|2|32|2</DryCleaning>\n<CleanRoom>5|5|15|1|2|32|3</CleanRoom>\n<bedclothes>0|5|15|1|2|32|100</bedclothes>\n<golf>0|5|15|1|2|32|2</golf>\n<tv>20|5|15|1|2|32|2</tv>\n<table>15|5|15|1|2|32|2</table>\t\t\t\t\t\t\t\n<delay>3500</delay>\n<speed>220</speed>\n\t </Audioboy>\n<SimpleWoman>\n<!-- normal -->\t\n<!-- <reception2>0|20|200|1|8|35</reception2>\t -->\t\n<!-- test -->\t\t \n<reception>0|20|250|1|8|35</reception>\n<away>50</away>\t\t\t\t\t\n\t\t\t\t\t\t\t\n<magazine>5|5|15|1|2|35|2</magazine>\n<phone>20|5|15|1|2|35|2</phone>\n<coffee>15|5|15|1|2|35|2</coffee>\n<fruit>0|5|15|1|2|35|3</fruit>\n<DrinkToRoom>0|5|15|1|2|35|2</DrinkToRoom>\n<DryCleaning>10|5|15|1|2|35|3</DryCleaning>\n<CleanRoom>20|5|15|1|2|35|2</CleanRoom>\n<bedclothes>0|5|15|1|2|35|100</bedclothes>\n<golf>0|5|15|1|2|35|2</golf>\n<tv>15|5|15|1|2|35|2</tv>\n<table>10|5|15|1|2|35|2</table>\n<delay>4000</delay>\t\t\n<speed>220</speed>\n</SimpleWoman>\t \n<Badguy>\n<reception>0|20|250|1|8|40</reception>\t\n<away>50</away>\t\t\t\t\t\n\t\t\t\t\t\t\t\n<magazine>15|5|15|1|3|40|2</magazine>\n<phone>5|5|15|1|3|40|3</phone>\n<coffee>15|5|15|1|3|40|2</coffee>\n<fruit>0|5|15|1|3|40|3</fruit>\n<DrinkToRoom>10|5|15|1|3|40|2</DrinkToRoom>\n<DryCleaning>115|5|15|1|3|45|4</DryCleaning>\n<CleanRoom>5|5|15|1|3|45|3</CleanRoom>\n<bedclothes>5|5|15|1|3|45|4</bedclothes>\n<golf>0|5|15|1|3|40|2</golf>\n<tv>10|5|15|1|3|40|2</tv>\n<table>20|5|15|1|3|40|2</table>\n\t\t\t\t\t\t\t\n<delay>4000</delay>\n<speed>140</speed>\n</Badguy>\n<Tourist>\n<reception>0|20|250|1|8|40</reception>\t\n<away>50</away>\t\t\t\t\t\n\t\t\t\t\t\t\t\n<magazine>15|5|15|1|2|40|3</magazine>\n<phone>5|5|15|1|2|40|2</phone>\n<coffee>10|5|15|1|2|40|2</coffee>\n<fruit>10|5|15|1|2|40|2</fruit>\n<DrinkToRoom>10|5|15|1|2|40|2</DrinkToRoom>\n<DryCleaning>10|5|15|1|2|45|3</DryCleaning>\n<CleanRoom>5|5|15|1|2|45|3</CleanRoom>\n<bedclothes>5|5|15|1|2|45|3</bedclothes>\n<golf>10|5|15|1|2|40|4</golf>\n<tv>5|5|15|1|2|40|3</tv>\n<table>10|5|15|1|2|40|3</table>\n<delay>4000</delay>\n<speed>140</speed>\n</Tourist>\n </clients>\n <upgrades>\n<!--\n\tprice | reputation gived | reputation requared | x_offset | y_offset | path_to_object | path_to_obj_ignore\n-->\n<coffee> 0,0,5,0,-12</coffee>\n\t<flowers> 60,5,5,0,-12</flowers>\n <daily> 100,5,10,-3,-12</daily>\n <picture> 70,5,20,0,-13</picture>\n <divan> 300,10,30,4,-13</divan>\n <aqua> 100,5,40,0,-13</aqua>\n <table> 800,10,55,3,-11</table>\n <bra> 350,5,70,0,-18</bra>\n <phone> 950,10,80,-1,-13</phone>\n <star>0,0,100,3,-13</star>\n\t \n\t \n </upgrades>\n</levels_cfg>";
}
Symbol 1347 MovieClip [__Packages.LevelsConfig] Frame 0
class LevelsConfig
{
static var _xml;
function LevelsConfig () {
}
static function SetXML(xml) {
_xml = xml;
}
static function GetXML() {
return(_xml);
}
static function ParseXML() {
}
}
Symbol 1348 MovieClip [__Packages.Hashtable] Frame 0
class Hashtable
{
var keys, values;
function Hashtable () {
keys = new Array();
values = new Array();
}
function containsKey(key) {
var _local3 = false;
var _local2 = 0;
while (_local2 < keys.length) {
if (keys == key) {
_local3 = true;
}
_local2++;
}
return(_local3);
}
function putValue(key, value) {
var _local3 = false;
var _local2 = 0;
while (_local2 < keys.length) {
if (keys == key) {
values = value;
_local3 = true;
break;
}
_local2++;
}
if (!_local3) {
keys.push(key);
values.push(value);
}
}
function size() {
return(keys.length);
}
function getValue(key) {
var _local2 = 0;
while (_local2 < keys.length) {
if (keys[_local2] == key) {
return(values[_local2]);
}
_local2++;
}
}
function remove(key) {
var _local2 = 0;
while (_local2 < keys.length) {
if (keys == key) {
keys.splice(_local2, 1);
values.splice(_local2, 1);
}
_local2++;
}
}
function getKeys() {
return(keys);
}
function getValues() {
return(values);
}
function clear() {
delete values;
delete keys;
keys = new Array();
values = new Array();
}
}
Symbol 1349 MovieClip [__Packages.Language] Frame 0
class Language
{
static var langs_xml, currentLang, OnLoaded;
function Language () {
}
static function LoadLanguage(lang, xmlfile) {
if (xmlfile != undefined) {
SetLangXML(xmlfile);
}
if (lang == undefined) {
if (langs_xml != undefined) {
lang = XMLNode(langs_xml.firstChild.childNodes[0]).attributes.id;
}
}
Tracer.info((("Loading language \"" + lang) + "\" from file ") + langs_file);
currentLang = lang;
strings.clear();
if (langs_xml == undefined) {
langs_xml = new XML();
langs_xml.ignoreWhite = true;
langs_xml.onLoad = ParseLanguageXML;
langs_xml.load(langs_file);
} else {
ParseLanguageXML(true);
}
}
static function SetLangXML(xml) {
langs_xml = xml;
}
static function GetLangXML() {
return(langs_xml);
}
static function GetLanguagesCount() {
var _local1 = langs_xml.firstChild;
return(_local1.childNodes.length);
}
static function ParseLanguageXML(success) {
var _local9 = langs_xml.firstChild;
var _local12;
Tracer.info("Language xml loaded");
var _local14 = strings;
var _local6 = 0;
while (_local6 < _local9.childNodes.length) {
if (XMLNode(_local9.childNodes[_local6]).attributes.id == currentLang) {
_local12 = XMLNode(_local9.childNodes[_local6]);
break;
}
_local6++;
}
if (_local12 == undefined) {
Tracer.trace(("Language " + currentLang) + " not found!");
return(undefined);
}
var _local13 = _local12.firstChild.nodeValue;
var _local10 = _local13.split(newline);
var _local4;
var _local11;
var _local1;
var _local7;
var _local3 = false;
var _local8 = 0;
for ( ; _local8 < _local10.length ; _local8++) {
_local4 = _local10[_local8];
if ((_local4.indexOf("//", 0) == 0) || (_local4.indexOf(";", 0) == 0)) {
} else {
var _local5 = _local4.indexOf(":", 0);
if (!_local3) {
if (_local5 <= 0) {
continue;
}
} else {
_local5 = 0;
}
if (!_local3) {
_local11 = _local4.substring(0, _local5);
}
_local1 = _local4.substring(((_local5 > 0) ? (_local5 + 1) : 0), _local4.length);
var _local2 = _local1.length - 1;
while ((_local1.charCodeAt(_local2) == 13) || (_local1.charCodeAt(_local2) == 10)) {
_local2--;
}
_local1 = _local1.substring(0, _local2 + 1);
if (_local1.substr(-2, 2) == "\\n") {
_local1 = _local1.substr(0, _local1.length - 2);
if (!_local3) {
_local7 = _local1;
_local3 = true;
} else {
_local7 = _local7 + _local1;
}
} else {
if (_local3) {
_local7 = _local7 + _local1;
_local1 = _local7;
}
_local3 = false;
}
if (!_local3) {
strings.putValue(_local11, _local1);
} else {
_local7 = _local7 + newline;
}
}
}
if (OnLoaded != undefined) {
OnLoaded();
}
}
static function Transl(key) {
var _local1 = strings.getValue(key);
if (_local1 == undefined) {
Tracer.trace(((("Translation of \"" + key) + "\" not found(LANG=") + currentLang) + ")");
}
return(((_local1 != undefined) ? (_local1) : (("<" + key) + ">")));
}
static var langs_file = "languages.xml";
static var strings = new Hashtable();
}
Symbol 1350 MovieClip [__Packages.MapObject] Frame 0
class MapObject extends MovieClip
{
function MapObject () {
super();
}
function Quant(dtime) {
}
function get Enabled() {
return(false);
}
}
Symbol 1351 MovieClip [__Packages.Mebel] Frame 0
class Mebel extends MapObject
{
var mcHit, hitArea, mcHitArea, depthSeatValue, depthSeat, seat_place_x, seat_place_y, HighliteFilter, HighliteFilter2, _highlited_movie, SeatedChar, _attached_chars, mcGraph, mcSeatPlace, bitmapSeatPlace, mcSeatPlaceAbove, depthSeatAbove, bitmapSeatPlaceAbove, OnClick, _ticks, mcTick, _visible;
function Mebel () {
super();
if (mcHit != undefined) {
mcHit._alpha = 0;
hitArea = mcHit;
}
mcHitArea._alpha = 0;
depthSeatValue = depthSeat.getDepth();
seat_place_x = depthSeat._x;
seat_place_y = depthSeat._y;
InitSeatPlace();
HighliteFilter = new flash.filters.GlowFilter(16773263, 0.9, 5, 5, 100, 1);
HighliteFilter2 = new flash.filters.GlowFilter(16755200, 0.9, 3, 3, 100, 1);
_highlited_movie = this;
_active = true;
Enabled = (true);
SeatedChar = null;
_attached_chars = new Array();
if (mcGraph != undefined) {
_highlited_movie = mcGraph;
}
ClearTicks();
}
function InitSeatPlace() {
mcSeatPlace = depthSeat;
MoveSeatPlace(depthSeat._x, depthSeat._y);
bitmapSeatPlace = new flash.display.BitmapData(SEAT_PLACE_W, SEAT_PLACE_H, true, 16777215);
mcSeatPlace.attachBitmap(bitmapSeatPlace, 1, "never", false);
mcSeatPlaceAbove = depthSeatAbove;
MoveSeatPlace(depthSeat._x, depthSeat._y, mcSeatPlaceAbove);
bitmapSeatPlaceAbove = new flash.display.BitmapData(SEAT_PLACE_W, SEAT_PLACE_H, true, 16777215);
mcSeatPlaceAbove.attachBitmap(bitmapSeatPlaceAbove, 1, "never", false);
}
function MoveSeatPlace(newx, newy, ofmc) {
if (ofmc == undefined) {
mcSeatPlace._x = newx - SEAT_PLACE_CENTER_X;
mcSeatPlace._y = newy - SEAT_PLACE_CENTER_Y;
} else {
ofmc._x = newx - SEAT_PLACE_CENTER_X;
ofmc._y = newy - SEAT_PLACE_CENTER_Y;
}
}
function AttachChar(cl) {
trace("AttachChar: " + cl.toString());
_attached_chars.push(cl);
cl._visible = false;
}
function DeattachChar(cl) {
trace("DeattachChar: " + cl.toString());
var _local4;
var _local2;
_local2 = 0;
while (_local2 < _attached_chars.length) {
if (_attached_chars[_local2] == cl) {
break;
}
_local2++;
}
if (_local2 >= _attached_chars.length) {
return(null);
}
_attached_chars.splice(_local2, 1);
cl._visible = true;
bitmapSeatPlace.fillRect(bitmapSeatPlace.rectangle, 16777215);
bitmapSeatPlaceAbove.fillRect(bitmapSeatPlaceAbove.rectangle, 16777215);
return(cl);
}
function get HasChar() {
return(_attached_chars.length > 0);
}
function get Char() {
if (HasChar) {
return(_attached_chars[0]);
}
return(null);
}
function onEnterFrame() {
if (HasChar) {
bitmapSeatPlace.fillRect(bitmapSeatPlace.rectangle, 16777215);
bitmapSeatPlaceAbove.fillRect(bitmapSeatPlaceAbove.rectangle, 16777215);
var _local5 = new flash.geom.Matrix();
_local5.translate(SEAT_PLACE_CENTER_X, SEAT_PLACE_CENTER_Y);
var _local4;
var _local3 = 0;
while (_local3 < _attached_chars.length) {
_local4 = Client(_attached_chars[_local3]);
bitmapSeatPlace.draw(_local4.GetDrawedMovie(), _local5);
var _local2 = _local4.GetDrawedAboveMovie();
if (_local2 != null) {
MoveSeatPlace(seat_place_x + _local2.diff_x, seat_place_y + _local2.diff_y, mcSeatPlaceAbove);
bitmapSeatPlaceAbove.draw(_local2, _local5);
}
_local3++;
}
}
}
function get Enabled() {
return(_enabled);
}
function set Enabled(val) {
_enabled = val;
//return(Enabled);
}
function onRollOver() {
if (Enabled && (_active)) {
SetHighlite();
}
}
function onRollOut() {
if (Enabled && (_active)) {
ClearHighlite();
}
}
function ClearHighlite() {
if (_highlited) {
var _local3 = _highlited_movie.filters;
var _local2 = 0;
while (_local2 < _local3.length) {
_local3.pop();
_local2++;
}
_highlited_movie.filters = _local3;
_highlited = false;
}
}
function SetHighlite() {
if (!_highlited) {
var _local2 = _highlited_movie.filters;
_local2.push(HighliteFilter);
_highlited_movie.filters = _local2;
_highlited = true;
}
}
function onPress(Void) {
if (Enabled && (OnClick != undefined)) {
OnClick(this);
}
}
function HideTick() {
_ticks--;
if (_ticks < 0) {
_ticks = 0;
}
if ((mcTick != undefined) && (_ticks == 0)) {
mcTick._visible = false;
}
}
function ShowTick() {
_ticks++;
if ((mcTick != undefined) && (_ticks > 0)) {
mcTick._visible = true;
Helper.PlaySound("event_accepted");
}
}
function ClearTicks() {
_ticks = 0;
HideTick();
}
function PlayAppearAnimation() {
_visible = true;
Fx.PlayAppearAnimation(this);
}
function PrepareAppearAnimation() {
_visible = false;
}
var SEAT_PLACE_W = 120;
var SEAT_PLACE_H = 240;
var SEAT_PLACE_CENTER_X = 60;
var SEAT_PLACE_CENTER_Y = 165;
var _highlited = false;
var _enabled = false;
var _active = false;
var _multiply_chars_mode = false;
}
Symbol 1352 MovieClip [__Packages.Bot] Frame 0
class Bot extends MapObject
{
var moving_speed, _enabled, map, __get__Map, target_move, moving_direction, animation_direction, mcAnim, speed, _x, _y, path, game, OnTargetReached;
function Bot () {
super();
moving_speed = MOVING_SPEED;
if (Helper.DEBUG) {
moving_speed = moving_speed * Helper.DEBUG_GLOBAL_SPEED_MUL;
}
SetAnimation(ANIM_STAY);
_enabled = false;
}
function set Map(value) {
map = value;
//return(__get__Map());
}
function get Enabled() {
return(_enabled);
}
function get InMoving() {
return(target_move != undefined);
}
function UpdateAnimation() {
var _local2;
if (InMoving) {
if (moving_direction < -1.8) {
_local2 = ANIM_LEFT;
} else if ((moving_direction >= -1.8) && (moving_direction < -1)) {
_local2 = ANIM_UP;
} else if ((moving_direction >= -1) && (moving_direction < 1)) {
_local2 = ANIM_RIGHT;
} else if ((moving_direction >= 1) && (moving_direction < 1.8)) {
_local2 = ANIM_DOWN;
} else {
_local2 = ANIM_LEFT;
}
} else {
_local2 = ANIM_STAY;
}
if (animation_direction != _local2) {
SetAnimation(_local2);
}
}
function SetAnimation(anim) {
animation_direction = anim;
mcAnim.gotoAndStop(animation_direction + 1);
UpdateBoxPosition();
}
function UpdateBoxPosition() {
}
function Quant(dtime) {
var _local8 = dtime;
speed = moving_speed * _local8;
var _local7 = moving_direction;
if (target_move == undefined) {
return(undefined);
}
var _local4 = target_move.x - _x;
var _local3 = target_move.y - _y;
if ((Math.abs(_local4) <= speed) && (Math.abs(_local3) <= speed)) {
if (HasPath()) {
DoPathMove();
} else {
StopMove();
}
} else {
var _local2 = Math.atan2(_local3, _local4);
moving_direction = _local2;
var _local6 = Math.cos(_local2) * speed;
var _local5 = Math.sin(_local2) * speed;
_x = _x + _local6;
_y = _y + _local5;
}
if (Math.abs(moving_direction - _local7) > 0.01) {
UpdateAnimation();
}
}
function GoToPath(path_array) {
moving_type = 0;
MoveToPath(path_array);
}
function GoTo(p, instantly) {
moving_type = 0;
MoveTo(p);
if ((instantly != undefined) && (instantly == true)) {
_x = target_move.x;
_y = target_move.y;
StopMove();
UpdateAnimation();
}
}
function MoveTo(p) {
target_move = p;
}
function MoveToPath(path_array) {
path = path_array;
DoPathMove();
}
function WalkTo(p) {
MoveToPath(Pathfinding.findPath(game.map.map, game.map.YConvertToMap(_y), game.map.XConvertToMap(_x), game.map.YConvertToMap(p.y), game.map.XConvertToMap(p.x)));
}
function DoPathMove() {
if (HasPath()) {
var _local2 = path.shift();
target_move = new Point(map.XConvertToLocal(_local2[1]), map.YConvertToLocal(_local2[0]));
}
}
function HasPath() {
return((path != undefined) && (path.length > 0));
}
function StopMove() {
target_move = undefined;
moving_direction = -4;
if (OnTargetReached != undefined) {
OnTargetReached();
}
}
function PauseAnimation() {
Helper.StopMovies(mcAnim);
}
function ResumeAnimation() {
Helper.PlayMovies(mcAnim);
}
static var MOVING_SPEED = 0.25;
static var ANIM_STAY = 0;
static var ANIM_RIGHT = 1;
static var ANIM_DOWN = 2;
static var ANIM_LEFT = 3;
static var ANIM_UP = 4;
static var ANIMS_WITH_BOX = 5;
static var ANIM_SEAT = 10;
static var ANIM_SEAT_FRAME = 5;
static var ANIM_COFFEE = 11;
static var ANIM_COFFEE_FRAME = 6;
static var ANIM_READ = 12;
static var ANIM_READ_FRAME = 7;
static var ANIM_CLEAN = 13;
static var ANIM_FLOWERS = 14;
var moving_type = 0;
var __prev_quant_time = 0;
}
Symbol 1353 MovieClip [__Packages.Point] Frame 0
class Point
{
var x, y;
function Point (x, y) {
this.x = x;
this.y = y;
}
function offset(dx, dy) {
x = x + dx;
y = y + dy;
}
function equals(toCompare) {
return((x == toCompare.x) && (y == toCompare.y));
}
function subtractPoint(v) {
return(new Point(x - v.x, y - v.y));
}
function addPoint(v) {
return(new Point(x + v.x, y + v.y));
}
function normalize(length) {
}
function toString() {
return(((("Point {x=" + x) + ", y=") + y) + "}");
}
static function FromMovie(mc) {
var _local1 = new Point();
_local1.x = mc._x;
_local1.y = mc._y;
return(_local1);
}
}
Symbol 1354 MovieClip [__Packages.Map] Frame 0
class Map
{
var X, Y;
function Map () {
}
function XConvertToLocal(mapx) {
return(X + (mapx * CELL_SIZE));
}
function YConvertToLocal(mapy) {
return(Y + (mapy * CELL_SIZE));
}
function XConvertToMap(locx) {
return(Math.round((locx - X) / CELL_SIZE));
}
function YConvertToMap(locy) {
return(Math.round((locy - Y) / CELL_SIZE));
}
static var CELL_SIZE = 20;
}
Symbol 1355 MovieClip [__Packages.Game] Frame 0
class Game extends MovieClip
{
static var __game_in_pause_time;
var btnMenu, mcAvailableArea, _quant_interval_id, mapObjects, _pause, _game_in_process, mcEnabledButton, customers, hero, maid, attachMovie, _success, succesBar, _max_success, _popularity, orientierMapCenter, _time_last_user_active, _clients_in_hotel, _rount_time, _round_max_time, _client_count, _last_client_arrive_time, _MaxClient, mebelDver, mebelReceiption, mebelFlower0, mebelFlower1, OnMenu, strSales, strObjective, mcLoadingText, map, createEmptyMovieClip, getNextHighestDepth, _rooms, mebelCoffee, mebelPhone, mebelDaily, mebelTV, mebelDivan, mebelTable, mebelAquarium, mebelBra0, mebelBra1, mebelPicture, _available_upgrades, mcGornichnayaPanel, mcBlackBox, _score, _spend_score, _current_level, _round_finished, _time_is_lefted, _score_in_round, orientierStartPosition, mcClock, _scores2master, _ActionCountForClients, _Clients, _Clients_configs, _wish_cleaning_time, success_maxes, LeaveHotelPay_maxes, _available_wishes, upgrades_config, _moneys_per_exit, mebelKWall, _buyed_goods, _shop_window, _winned, stat_served_clients, stat_losted_clients, stat_trashed_toys, stat_trashed_packs, stat_bonus_score, _complete_wishes, _fast_complete_wishes, orientierRoom0, mapDepthLevel, _time_tick_interval_id, OnGameExit, _xmouse, _ymouse, _gragging, textScore, textScoreTarget, _keys_from_room, actionOptional1, mcWndStartLevel, mcWndEndLevel, _cursor_movie, orientierKeys, orientierCoffee, orientierPhone, orientierRead, orientierTvSet, orientierTv, orientierTable, orientierFlower0, orientierFlower1, orientierDoor, orientierKitchenIn, orientierKitchenOut, _tip_high;
function Game () {
super();
Key.addListener(this);
btnMenu.OnClick = mx.utils.Delegate.create(this, MenuButtonOnPress);
mcAvailableArea.onPress = mx.utils.Delegate.create(this, MoveheroToMouse);
mcAvailableArea.hitArea = mcAvailableArea;
Enabled = (false);
_quant_interval_id = setInterval(this, "OnQuant", 10);
mapObjects = new Array();
com.mosesSupposes.fuse.ZigoEngine.register(com.mosesSupposes.fuse.Fuse, com.mosesSupposes.fuse.PennerEasing);
}
function get inPause() {
return(_pause);
}
function EnablePause() {
if (!_pause) {
__pause_enabled_in = getTimer();
}
_pause = true;
}
function DisablePause() {
_pause = false;
__game_in_pause_time = __game_in_pause_time + (getTimer() - __pause_enabled_in);
}
function get UserCanInterract() {
return(_game_in_process && (!_pause));
}
function set Enabled(val) {
__enabled = val;
if (__enabled && (mcEnabledButton != undefined)) {
mcEnabledButton.Hide();
mcEnabledButton = undefined;
var _local2 = 0;
while (_local2 < customers.length) {
var _local3 = Client(customers[_local2]);
_local3.ResumeAnimation();
_local2++;
}
hero.ResumeAnimation();
maid.ResumeAnimation();
} else if ((!__enabled) && (mcEnabledButton == undefined)) {
mcEnabledButton = attachMovie("FullscreenButton", "mcEnabledButton", LEVEL_END_DIALOG_DEPTH - 1);
mcEnabledButton.Show();
var _local2 = 0;
while (_local2 < customers.length) {
var _local3 = Client(customers[_local2]);
_local3.PauseAnimation();
_local2++;
}
hero.PauseAnimation();
maid.PauseAnimation();
}
//return(Enabled);
}
function get Enabled() {
return(__enabled);
}
function get Success() {
return(_success);
}
function set Success(value) {
_success = Math.min(100, Math.max(0, value));
succesBar.__set__Progress(_success);
succesBar.__set__Text("+" + SuccessCoins);
//return(Success);
}
function AddSuccess(value) {
if (isNaN(value)) {
return(undefined);
}
if (value < 0) {
Helper.PlaySound("minus");
}
Success = Success + value;
}
function get SuccessCoins() {
return(Math.max(_extra_success, Math.floor((_success * _max_success) / 100)));
}
function get Popularity() {
return(_popularity);
}
function set Popularity(value) {
if (isNaN(value)) {
return;
}
_popularity = value;
//return(Popularity);
}
function MenuButtonOnPress() {
OpenGameMenu();
}
function SetInStageCenter(mc) {
mc._x = orientierMapCenter._x - (mc._width / 2);
mc._y = orientierMapCenter._y - (mc._height / 2);
}
function SetInStageCenterEx(mc, w, h) {
mc._x = orientierMapCenter._x - (w / 2);
mc._y = orientierMapCenter._y - (h / 2);
}
function OnQuant() {
if (___prev_pause != _pause) {
if (_pause == true) {
}
}
Quant();
}
function Quant() {
if ((!_pause) && (_game_in_process)) {
heroDoNextAction();
if (_prev_quant_time < 0) {
_prev_quant_time = getGameTimer();
}
var _local5 = Math.min(200, getGameTimer() - _prev_quant_time);
Tracer.trace("QUANT: " + _local5);
if (_local5 == 0) {
Tracer.trace("getGameTimer()= " + getGameTimer());
Tracer.trace("_prev_quant_time= " + _prev_quant_time);
Tracer.trace("__game_in_pause_time= " + __game_in_pause_time);
Tracer.trace("inPause= " + inPause);
}
var _local3 = 0;
while (_local3 < mapObjects.length) {
MapObject(mapObjects[_local3]).Quant(_local5);
_local3++;
}
_prev_quant_time = getGameTimer();
_time_last_user_active = _time_last_user_active + Math.min(100, _local5);
if (((((!maid.__get__InKitchen()) && (maid.__get__State() != Maid.STATE_WAITING)) || (hero.__get__InMoving())) || (_actions_queue.length != 0)) || (_clients_in_hotel == 0)) {
_time_last_user_active = 0;
} else {
var _local6 = true;
var _local4 = 0;
while (_local4 < customers.length) {
var _local2 = Client(customers[_local4]);
if ((_local2.__get__Live() && (!_local2.__get__InMoving())) && (_local2.Wish != Client.WISH_NONE)) {
_local6 = false;
break;
}
_local4++;
}
if (_local6) {
_time_last_user_active = 0;
}
}
if (_time_last_user_active > 1000) {
}
if ((_time_last_user_active > UNACTIVE_TIME_TO_OPEN_GAME_MENU) && ((_round_max_time - _rount_time) > 5)) {
OpenGameMenu();
_time_last_user_active = 0;
}
if (ShopOpened && ((_client_count == 0) || ((_last_client_arrive_time + CLIENT_ARRIVE_INTERVAL) < getGameTimer()))) {
if ((((_client_count < _MaxClient) && (_clients_in_hotel < CUSTOMERS_NUM)) && (!mebelDver.__get__HasChar())) && (HallIsFree())) {
CreateCustomer();
_last_client_arrive_time = getGameTimer();
}
}
}
}
function onEnterFrame() {
if (_launsh_state == 1) {
Launch2();
}
if (!_pause) {
if (_game_in_process) {
if (__update_objects_depth_counter == 0) {
UpdateMapObjectsDepth();
}
__update_objects_depth_counter++;
if (__update_objects_depth_counter > 2) {
__update_objects_depth_counter = 0;
}
if ((((((!ShopOpened) && (_clients_in_hotel <= 0)) && (!mebelReceiption.__get__HasMoneyOnTable())) && (!mebelFlower0.__get__InIll())) && (!mebelFlower1.__get__InIll())) && (AllRoomsCleared)) {
OnRoundFinished();
}
}
}
return(undefined);
}
function SortMapObjects(a, b) {
if (!a.__get__Enabled()) {
return(-1);
}
if (!b.__get__Enabled()) {
return(1);
}
if (a._y < b._y) {
return(-1);
}
if (a._y > b._y) {
return(1);
}
return(0);
}
function OpenGameMenu() {
if (OnMenu != undefined) {
EnablePause();
Enabled = (false);
OnMenu();
}
}
function CloseGameMenu() {
_time_last_user_active = 0;
Enabled = (true);
DisablePause();
if ((_game_in_process && (Helper.MusicEnabled)) && (Helper.__get__isMusicLoaded())) {
Helper.PlayMusic();
}
}
function Init() {
btnMenu.buttonText = Language.Transl("menu");
strSales = Language.Transl("game goal");
strObjective = Language.Transl("formaster");
mcLoadingText.strValue = Language.Transl("loading");
HideLoadingText();
map = new Map();
map.W = (mcAvailableArea._width / Map.CELL_SIZE) + 1;
map.H = (mcAvailableArea._height / Map.CELL_SIZE) + 1;
map.X = mcAvailableArea._x - (Map.CELL_SIZE / 2);
map.Y = mcAvailableArea._y - (Map.CELL_SIZE / 2);
mcAvailableArea.hitArea = mcAvailableArea;
RebuildMapWalkArea();
mcAvailableArea._alpha = 0;
if (Helper.DEBUG_MAP) {
var _local5 = createEmptyMovieClip("canvas_mc", getNextHighestDepth());
_local5.lineStyle(1, 16711680, 100);
var _local7 = 0;
while (_local7 < map.H) {
var _local4 = 0;
while (_local4 < map.W) {
if (map.map[_local7][_local4] > 0) {
var _local3 = map.X + (_local4 * Map.CELL_SIZE);
var _local2 = map.Y + (_local7 * Map.CELL_SIZE);
_local5.moveTo(_local3, _local2);
_local5.lineTo(_local3 + Map.CELL_SIZE, _local2);
_local5.lineTo(_local3 + Map.CELL_SIZE, _local2 + Map.CELL_SIZE);
_local5.lineTo(_local3, _local2 + Map.CELL_SIZE);
_local5.lineTo(_local3, _local2);
}
_local4++;
}
_local7++;
}
}
hero = Hero(attachMovie("Hero", "hero", DEPTH_LEVEL_3));
hero.map = map;
hero.OnTargetReached = mx.utils.Delegate.create(this, heroReachTarget);
customers = new Array();
var _local9 = 0;
while (_local9 < CUSTOMERS_NUM) {
var _local6 = Client(attachMovie("Client", "client_" + _local9, DEPTH_LEVEL_2 + _local9));
_local6.__set__Map(map);
_local6.OnClick = mx.utils.Delegate.create(this, ClientClicked);
_local6.OnWishComplete = mx.utils.Delegate.create(this, ClientWishComplete);
_local6.OnWishFail = mx.utils.Delegate.create(this, ClientWishFail);
_local6.OnWishDelivered = mx.utils.Delegate.create(this, ClientWishDelivered);
RegisterMapObject(_local6);
customers.push(_local6);
_local9++;
}
_rooms = new Array();
_local9 = 0;
while (_local9 < ROOMS_NUM) {
var _local8 = Room(this["mcRoom" + _local9]);
_local8.orientierEnter = Orientir(this["orientierRoom" + _local9]);
_local8.__set__Num(_local9);
_local8.OnClick = mx.utils.Delegate.create(this, RoomClicked);
_rooms.push(_local8);
_local9++;
}
mebelDver.Close();
mebelDver.CharEntered = mx.utils.Delegate.create(this, CharEnteredInDoor);
mebelDver.CharExited = mx.utils.Delegate.create(this, CharExitedFromHotel);
mebelReceiption.OnClick = mx.utils.Delegate.create(this, ReceiptionClicked);
mebelReceiption.OnMoneyClick = mx.utils.Delegate.create(this, ReceiptionMoneysClicked);
mebelCoffee.OnClick = mx.utils.Delegate.create(this, CoffeeClicked);
mebelPhone.OnClick = mx.utils.Delegate.create(this, PhoneClicked);
mebelDaily.OnClick = mx.utils.Delegate.create(this, DailyClicked);
mebelTV.OnClick = mx.utils.Delegate.create(this, TVClicked);
mebelDivan.OnClick = mx.utils.Delegate.create(this, DivanClicked);
mebelTable.OnClick = mx.utils.Delegate.create(this, TableClicked);
mebelFlower0.OnDeathFail = mx.utils.Delegate.create(this, FlowerFailed);
mebelFlower1.OnDeathFail = mx.utils.Delegate.create(this, FlowerFailed);
mebelFlower0.OnClick = mx.utils.Delegate.create(this, Flower0Clicked);
mebelFlower1.OnClick = mx.utils.Delegate.create(this, Flower1Clicked);
mebelAquarium._active = false;
mebelAquarium._enabled = false;
mebelBra0._active = false;
mebelBra0._enabled = false;
mebelBra1._active = false;
mebelBra1._enabled = false;
mebelPicture._active = false;
mebelPicture._enabled = false;
_available_upgrades = new Array(UPGRADE_MAX);
_local9 = 0;
while (_local9 < _available_upgrades.length) {
_available_upgrades[_local9] = UPGRADE_UNAVAILABLE;
if (Helper.DEBUG_ALL_UPGRADES_AVAILABLE) {
_available_upgrades[_local9] = UPGRADE_AVAILABLE;
}
_local9++;
}
_available_upgrades[UPGRADE_COFFEE] = UPGRADE_AVAILABLE;
if (Helper.DEBUG_FLOWERS) {
_available_upgrades[UPGRADE_FLOWERS] = UPGRADE_AVAILABLE;
}
mcGornichnayaPanel._visible = false;
Button(mcGornichnayaPanel.btnClean).onPress = mx.utils.Delegate.create(this, GornichnayaCleanClicked);
Button(mcGornichnayaPanel.btnFlower).onPress = mx.utils.Delegate.create(this, GornichnayaFlowerClicked);
maid._game = this;
maid.Reset();
}
function StartNewGame() {
mcBlackBox._visible = false;
_score = 0;
_spend_score = 0;
_popularity = 0;
__game_in_pause_time = 0;
if (Helper.DEBUG) {
_score = Helper.DEBUG_START_MONEYS;
LoadLevel(Helper.DEBUG_START_LEVEL);
} else {
LoadLevel(0);
}
}
function Launch() {
_launsh_state = 1;
Init();
Enabled = (true);
}
function Launch2() {
_launsh_state = 2;
StartNewGame();
}
function StartNextLevel() {
_current_level++;
LoadLevel(_current_level);
}
function StartPrevLevel() {
_current_level--;
LoadLevel(_current_level);
}
function LoadLevel(level) {
_time_last_user_active = 0;
var _local5 = 0;
while (_local5 < customers.length) {
Client(customers[_local5]).Die();
_local5++;
}
_round_finished = false;
_time_is_lefted = false;
_current_level = level;
_score_in_round = 0;
_client_count = 0;
_clients_in_hotel = 0;
_last_client_arrive_time = 0;
hero.GoTo(Point.FromMovie(orientierStartPosition), true);
Tracer.trace(("--LoadLevel: " + level) + "--");
mcClock.__set__Day(level + 1);
_round_max_time = 60;
var _local13 = LevelsConfig.GetXML().firstChild;
var _local17 = GetNodeByName(_local13, "levels");
var _local12 = getArrayNodesById(_local17, level + 1)[0];
_round_max_time = Number(GetNodeByName(_local12, "CloseTime").firstChild.nodeValue);
_scores2master = Number(GetNodeByName(_local12, "Goal").firstChild.nodeValue);
_ActionCountForClients = Number(GetNodeByName(_local12, "ActionCountForClients").firstChild.nodeValue);
_MaxClient = Number(GetNodeByName(_local12, "MaxClient").firstChild.nodeValue);
var _local8 = String(GetNodeByName(_local12, "Clients").firstChild.nodeValue).split(",");
_Clients = new Array();
for (var _local14 in _local8) {
_Clients.push(Helper.SearchArray2(_local8[_local14], CLIENTS_TYPES));
}
_Clients_configs = new Array(CLIENTS_TYPES.length);
var _local9 = GetNodeByName(_local13, "clients");
_local5 = 0;
while (_local5 < CLIENTS_TYPES.length) {
_Clients_configs[_local5] = new Object();
_Clients_configs[_local5].wishes = new Array(Client.WISHES.length);
var _local6 = GetNodeByName(_local9, CLIENTS_TYPES[_local5]);
var _local2 = 0;
while (_local2 < Client.WISHES.length) {
var _local3 = Client.WISHES[_local2];
var _local4 = GetNodeByName(_local6, _local3);
_Clients_configs[_local5].wishes[_local2] = _local4.firstChild.nodeValue.split("|");
_local2++;
}
_Clients_configs[_local5].delay = Number(GetNodeByName(_local6, "delay").firstChild.nodeValue);
_Clients_configs[_local5].speed = Number(GetNodeByName(_local6, "speed").firstChild.nodeValue) * SPEED_PORTABLE_COEFF;
if (Helper.DEBUG) {
_Clients_configs[_local5].delay = _Clients_configs[_local5].delay / Helper.DEBUG_GLOBAL_SPEED_MUL;
_Clients_configs[_local5].speed = _Clients_configs[_local5].speed * Helper.DEBUG_GLOBAL_SPEED_MUL;
}
_local5++;
}
var _local18 = [[false, false, false, false], [true, false, false, false], [true, false, false, true], [true, false, true, true], [true, true, true, true]];
var _local10 = _local18[Math.min(4, _MaxClient)];
_local5 = 0;
while (_local5 < _rooms.length) {
var _local7 = Room(_rooms[_local5]);
if (_local10[_local5]) {
_local7.__set__Status(Room.FREE);
} else {
_local7.__set__Status(Room.CLOSED);
}
_local5++;
}
var _local16 = GetNodeByName(_local13, "config");
_wish_cleaning_time = Number(GetNodeByName(_local16, "CleaningTime").firstChild.nodeValue);
if (Helper.DEBUG) {
_wish_cleaning_time = _wish_cleaning_time / Helper.DEBUG_GLOBAL_SPEED_MUL;
}
success_maxes = GetNodeByName(_local16, "MaxSuccessPerReputation").firstChild.nodeValue.split(",");
var _local19;
_extra_success = 0;
Success = (0);
LeaveHotelPay_maxes = GetNodeByName(_local16, "LeaveHotelPayPerReputation").firstChild.nodeValue.split(",");
_available_wishes = new Array();
if (_current_level > 0) {
_available_wishes.push(Client.WISH_CLEAN);
}
ClearMapObjects();
RegisterMapObject(hero);
RegisterMapObject(maid);
_local5 = 0;
while (_local5 < CUSTOMERS_NUM) {
RegisterMapObject(MapObject(customers[_local5]));
_local5++;
}
if (mebelReceiption._moneys != undefined) {
Helper.ClearArray2(mebelReceiption._moneys);
}
mebelReceiption._moneys = new Array(CUSTOMERS_NUM);
var _local11 = GetNodeByName(_local13, "upgrades");
upgrades_config = new Array(ShopGood.GOOD_MAX);
_local5 = 0;
while (_local5 < ShopGood.GOOD_MAX) {
upgrades_config[_local5] = GetNodeByName(_local11, ShopGood.GOODS_NAMES[_local5]).firstChild.nodeValue.split(",");
_local5++;
}
Helper.globalGameLevelStartScore = _score;
Helper.globalGameLevelStartSpend = _spend_score;
Helper.globalGameLevelStartUpgrades = Helper.CopyArray(_available_upgrades);
Helper.globalGameLevelStartLevel = level;
if (_current_level > 0) {
ShowShop();
} else {
LoadingLevelPhase2();
}
}
function GetMaxChaevie(popular) {
var _local2;
if (popular < 41) {
_local2 = 0;
} else if (popular < 66) {
_local2 = 1;
} else if (popular < 91) {
_local2 = 2;
} else {
_local2 = 3;
}
return(parseInt(success_maxes[_local2]));
}
function LoadingLevelPhase2() {
trace("LoadingLevelPhase2");
HideLoadingText();
Enabled = (true);
_max_success = GetMaxChaevie(Popularity);
Success = (0);
var _local2;
if (Popularity < 26) {
_local2 = 0;
} else if (Popularity < 51) {
_local2 = 1;
} else if (Popularity < 76) {
_local2 = 2;
} else {
_local2 = 3;
}
_moneys_per_exit = parseInt(LeaveHotelPay_maxes[_local2]);
RegisterMapObject(mebelReceiption);
RegisterMapObject(mebelDver);
RegisterMapObject(mebelKWall);
if (_available_upgrades[UPGRADE_TV] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelDivan);
RegisterMapObject(mebelTV);
mebelDivan._visible = true;
mebelTV._visible = true;
_available_wishes.push(Client.WISH_TV);
if (Helper.SearchArray(_buyed_goods, UPGRADE_TV) != -1) {
mebelDivan.PrepareAppearAnimation();
mebelTV.PrepareAppearAnimation();
}
} else {
mebelDivan._visible = false;
mebelTV._visible = false;
}
if (_available_upgrades[UPGRADE_TABLE] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelTable);
mebelTable._visible = true;
if (Helper.SearchArray(_buyed_goods, UPGRADE_TABLE) != -1) {
mebelTable.PrepareAppearAnimation();
}
} else {
mebelTable._visible = false;
}
if (_available_upgrades[UPGRADE_READ] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelDaily);
mebelDaily._visible = true;
_available_wishes.push(Client.WISH_READ);
if (Helper.SearchArray(_buyed_goods, UPGRADE_READ) != -1) {
mebelDaily.PrepareAppearAnimation();
}
} else {
mebelDaily._visible = false;
}
if (_available_upgrades[UPGRADE_COFFEE] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelCoffee);
mebelCoffee._visible = true;
_available_wishes.push(Client.WISH_COFFEE);
} else {
mebelCoffee._visible = false;
}
if (_available_upgrades[UPGRADE_PHONE] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelPhone);
mebelPhone._visible = true;
_available_wishes.push(Client.WISH_PHONE);
if (Helper.SearchArray(_buyed_goods, UPGRADE_PHONE) != -1) {
mebelPhone.PrepareAppearAnimation();
}
} else {
mebelPhone._visible = false;
}
if (_available_upgrades[UPGRADE_FLOWERS] == UPGRADE_AVAILABLE) {
RegisterMapObject(mebelFlower0);
RegisterMapObject(mebelFlower1);
mebelFlower0._visible = true;
mebelFlower1._visible = true;
mebelFlower0.Respawn();
mebelFlower1.Respawn();
if (Helper.SearchArray(_buyed_goods, UPGRADE_FLOWERS) != -1) {
mebelFlower0.PrepareAppearAnimation();
mebelFlower1.PrepareAppearAnimation();
}
} else {
mebelFlower0._visible = false;
mebelFlower1._visible = false;
mebelFlower0.Disable();
mebelFlower1.Disable();
}
if (_available_upgrades[UPGRADE_PICTURE] == UPGRADE_AVAILABLE) {
mebelPicture._visible = true;
if (Helper.SearchArray(_buyed_goods, UPGRADE_PICTURE) != -1) {
mebelPicture.PrepareAppearAnimation();
}
} else {
mebelPicture._visible = false;
}
if (_available_upgrades[UPGRADE_AQUARIUM] == UPGRADE_AVAILABLE) {
mebelAquarium._visible = true;
if (Helper.SearchArray(_buyed_goods, UPGRADE_AQUARIUM) != -1) {
mebelAquarium.PrepareAppearAnimation();
}
} else {
mebelAquarium._visible = false;
}
if (_available_upgrades[UPGRADE_LAMP] == UPGRADE_AVAILABLE) {
mebelBra0._visible = true;
mebelBra1._visible = true;
if (Helper.SearchArray(_buyed_goods, UPGRADE_LAMP) != -1) {
mebelBra0.PrepareAppearAnimation();
mebelBra1.PrepareAppearAnimation();
}
} else {
mebelBra0._visible = false;
mebelBra1._visible = false;
}
trace("_available_wishes=" + _available_wishes);
RebuildMapWalkArea();
mcGornichnayaPanel._visible = Helper.SearchArray(_available_wishes, Client.WISH_CLEAN) != -1;
mcGornichnayaPanel.btnClean._visible = Helper.SearchArray(_available_wishes, Client.WISH_CLEAN) != -1;
mcGornichnayaPanel.btnFlower._visible = _available_upgrades[UPGRADE_FLOWERS] == UPGRADE_AVAILABLE;
Start();
}
function ShowShop() {
Tracer.trace("ShowShop()");
_shop_window = Shop(attachMovie("Shop", "shop_window", getNextHighestDepth()));
_shop_window.OnClose = mx.utils.Delegate.create(this, OnShopClosed);
_shop_window.OnMenu = mx.utils.Delegate.create(this, OnShopMenuClicked);
_shop_window.__set__game(this);
ShowTip(TipsWindow.TIP_SHOP);
}
function OnShopClosed() {
_buyed_goods = _shop_window.BayedGoods;
_shop_window.removeMovieClip();
_shop_window = undefined;
if (Helper.MochiAdEnabled) {
Enabled = (false);
ShowLoadingText();
_root.gotoAndStop("frameShowAd");
} else {
LoadingLevelPhase2();
}
}
function OnShopMenuClicked() {
_shop_window.removeMovieClip();
_shop_window = undefined;
GotoMainMenu();
}
function SplitToNumberArray(s) {
var _local3 = s.split(",");
var _local2 = new Array(_local3.length);
var _local1 = 0;
while (_local1 < _local2.length) {
_local2[_local1] = new Number(0);
_local2[_local1] = parseInt(_local3[_local1]);
_local1++;
}
return(_local2);
}
function GetNodeByName(node, name) {
var _local6 = node;
var _local3 = node.childNodes.length;
var _local1 = 0;
while (_local1 < _local3) {
var _local2 = node.childNodes[_local1];
if (_local2.nodeName == name) {
return(_local2);
}
_local1++;
}
return(null);
}
function getArrayNodesById(node, val, deep) {
if (deep == undefined) {
deep = false;
}
var _local4 = 0;
var _local6 = node.childNodes;
var _local2;
var _local7 = _local6.length;
var _local3 = [];
while (_local4 < _local7) {
_local2 = _local6[_local4++];
((_local2.attributes.id == val) ? (_local3.push(_local2)) : "");
((deep && (_local2.firstChild != null)) ? (_local3 = _local3.concat(getArrayNodesById(_local2, val, true))) : "");
}
return(_local3);
}
function Start() {
_rount_time = _round_max_time;
_winned = false;
stat_served_clients = 0;
stat_losted_clients = 0;
stat_trashed_toys = 0;
stat_trashed_packs = 0;
stat_bonus_score = 0;
_extra_success = 0;
_complete_wishes = 0;
_fast_complete_wishes = 0;
SetCursorMode(CURSOR_NORMAL);
maid.Reset();
mebelDver.Close();
if (Helper.DEBUG_CLIENT_IN_FIRST_ROOM) {
var _local5 = CreateCustomer();
mebelDver.DeattachChar(_local5);
mebelDver.Close();
_local5.SetAnimation(Bot.ANIM_STAY);
_local5.GoTo(orientierRoom0.GetPoint(), true);
_local5.__set__room(Room(_rooms[0]));
_local5.GoState(Client.STATE_AT_ROOM);
_local5.RequestWish();
}
var _local2 = 0;
while (_local2 < mapObjects.length) {
if (mapObjects[_local2] instanceof Mebel) {
var _local4 = Mebel(mapObjects[_local2]);
_local4.__set__Enabled(false);
}
_local2++;
}
_local2 = 0;
while (_local2 < _rooms.length) {
var _local3 = Room(_rooms[_local2]);
_local3.__set__Enabled(false);
_local3.ClearTicks();
_local2++;
}
Button(mcGornichnayaPanel.btnClean).enabled = false;
Button(mcGornichnayaPanel.btnFlower).enabled = false;
UpdateScore();
ShowStartLevelMessage();
}
function Start2() {
_extra_success = 0;
ShopOpened = true;
if (Helper.MusicEnabled && (Helper.__get__isMusicLoaded())) {
Helper.PlayMusic();
}
mebelReceiption.Init();
if (_available_upgrades[UPGRADE_FLOWERS] == UPGRADE_AVAILABLE) {
mebelFlower0.Respawn();
mebelFlower1.Respawn();
} else {
mebelFlower0.Disable();
mebelFlower1.Disable();
}
mapDepthLevel = LEVEL_MAP_OBJECTS_DEPTH;
mcClock.swapDepths(LEVEL_GAME_INTERFACE_DEPTH + DEPTH_FOR_CLOCK);
}
function StartLevelMessageClosed() {
if (Helper.SearchArray(_buyed_goods, UPGRADE_TV) != -1) {
mebelDivan.PlayAppearAnimation();
mebelTV.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_TABLE) != -1) {
mebelTable.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_READ) != -1) {
mebelDaily.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_PHONE) != -1) {
mebelPhone.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_FLOWERS) != -1) {
mebelFlower0.PlayAppearAnimation();
mebelFlower1.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_PICTURE) != -1) {
mebelPicture.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_AQUARIUM) != -1) {
mebelAquarium.PlayAppearAnimation();
}
if (Helper.SearchArray(_buyed_goods, UPGRADE_LAMP) != -1) {
mebelBra0.PlayAppearAnimation();
mebelBra1.PlayAppearAnimation();
}
ShowStartTextAnimation(Language.Transl("message get ready"), mx.utils.Delegate.create(this, function () {
Helper.setTimeout(mx.utils.Delegate.create(this, this.BeginGameProcess), 500);
this.ShowStartTextAnimation(Language.Transl("message go"));
}));
}
function BeginGameProcess() {
Start2();
__game_in_pause_time = 0;
_time_last_user_active = 0;
UpdateRemainTime();
if (_time_tick_interval_id != undefined) {
clearInterval(_time_tick_interval_id);
_time_tick_interval_id = undefined;
}
_time_tick_interval_id = setInterval(this, "OnTimerTick", 1000);
_game_in_process = true;
var _local2 = 0;
while (_local2 < mapObjects.length) {
if (mapObjects[_local2] instanceof Mebel) {
var _local3 = Mebel(mapObjects[_local2]);
_local3.__set__Enabled(true);
}
_local2++;
}
Button(mcGornichnayaPanel.btnClean).enabled = true;
Button(mcGornichnayaPanel.btnFlower).enabled = true;
maid.Reset();
if (_current_level == 1) {
Room(_rooms[3]).RequestClean();
ShowTip(TipsWindow.TIP_CLEAN_ROOM);
}
ClearHeroActions();
UpdateMapObjectsDepth();
}
function OnRoundFinished() {
_winned = _score_in_round >= _scores2master;
_game_in_process = false;
ClearHeroActions();
SetCursorMode(CURSOR_NORMAL);
hero.StopMove();
ShowLevelEndMessage();
}
function YouWinMessageClosed() {
CloseLevelEndMessage();
StartNextLevel();
}
function GameOverMessageClosed() {
GotoMainMenu();
}
function GotoMainMenu() {
OnGameExit();
}
function onMouseDown(Void) {
}
function MoveheroToMouse(Void) {
if ((UserCanInterract || (Helper.DEBUG)) || (Helper.DEBUG2)) {
if (CursorMode == CURSOR_KEYS) {
mebelReceiption.ReturnKey();
SetCursorMode(CURSOR_NORMAL);
} else if ((_actions_queue.length <= 0) && (hero.moving_type == Hero.MOVING_TYPE_WALK)) {
var _local2 = new Point(_xmouse, _ymouse);
if (mcAvailableArea.hitTest(_local2.x, _local2.y, true)) {
heroDoAction(Hero.MOVING_TYPE_WALK, _local2);
_repeat_current_action = false;
}
}
}
}
function onMouseUp(Void) {
_gragging = false;
}
function onMouseMove(Void) {
_time_last_user_active = 0;
UpdateCursorPosition();
}
function onKeyDown() {
Tracer.trace(Key.getCode());
if (!(Key.getCode() === 80)) {
} else {
OpenGameMenu();
}
if (Helper.DEBUG) {
switch (Key.getCode()) {
case 49 :
Fx.CreateTrailToPoint(this, new Point(_xmouse, _ymouse), succesBar.__get__DiskPosition(), "StarGreen", "AddGreen");
break;
case 51 :
_round_finished = true;
OnRoundFinished();
break;
case 52 :
var _local2 = 0;
while (_local2 < customers.length) {
trace(Client(customers[_local2]).toString());
_local2++;
}
break;
case 83 :
}
}
}
function AddScore(score) {
trace("AddScore:" + score);
if (isNaN(score)) {
return(undefined);
}
var _local2 = ((score != Number.NaN) ? (score) : 0);
trace("AddScore score__norm:" + _local2);
if ((((_local2 > 0) || (_local2 < 0)) && (_local2 < 100000)) && (_local2.toString() != "NaN")) {
} else {
_local2 = 0;
}
trace("AddScore score__norm:" + _local2);
score = _local2;
var _local4 = _score_in_round;
_score_in_round = _score_in_round + score;
if (_score_in_round < 0) {
_score_in_round = 0;
}
if ((_local4 < _scores2master) && (_score_in_round >= _scores2master)) {
ShowStartTextAnimation(Language.Transl("message goal complete"));
Helper.PlaySound("goal");
}
_score = _score + (_score_in_round - _local4);
UpdateScore();
}
function UpdateScore() {
textScore.text = String(_score_in_round);
textScoreTarget.text = String(_scores2master);
Helper.globalGameScore = _score;
}
function UpdateCompleteBar() {
mcClock.__set__Progress((_rount_time * 100) / _round_max_time);
}
function OnTimerTick() {
if ((_game_in_process && (!_pause)) && (ShopOpened)) {
_rount_time--;
if (!HasTime()) {
CloseShop();
}
UpdateRemainTime();
}
if (!_pause) {
OnCustomerReduceHood();
}
}
function HasTime() {
return(_rount_time > 0);
}
function UpdateRemainTime() {
UpdateCompleteBar();
}
function CloseShop() {
ShopOpened = false;
}
function heroReachTarget() {
Tracer.trace("Game::heroReachTarget");
_repeat_current_action = false;
switch (hero.moving_type) {
case Hero.MOVING_KEYS :
mebelReceiption.HideTick();
if (mebelReceiption.__get__HasKeys() && (CursorMode != CURSOR_KEYS)) {
if (HasWishesWith(Client.WISH_KEYS)) {
_keys_from_room = GetFreeRoom();
if (_keys_from_room != null) {
_keys_from_room.Open();
mebelReceiption.TakeKey();
SetCursorMode(CURSOR_KEYS);
Helper.PlaySound("key_set");
ShowTip(TipsWindow.TIP_TAKE_KEYS);
} else {
trace("no free room!");
Helper.PlaySound("key_denied");
}
}
} else if (CursorMode == CURSOR_KEYS) {
mebelReceiption.ReturnKey();
SetCursorMode(CURSOR_NORMAL);
} else {
Helper.PlaySound("key_denied");
}
break;
case Hero.MOVING_COFFEE :
mebelCoffee.HideTick();
hero.__set__CarryngMode(Hero.CARRYNG_COFFEE);
hero.UpdateAnimation();
Helper.PlaySound("pickup_coffee");
ShowTip(TipsWindow.TIP_CLICK_DOOR);
break;
case Hero.MOVING_PHONE :
mebelPhone.HideTick();
hero.__set__CarryngMode(Hero.CARRYNG_PHONE);
Helper.PlaySound("pickup_phone");
break;
case Hero.MOVING_READ :
mebelDaily.HideTick();
hero.__set__CarryngMode(Hero.CARRYNG_READ);
Helper.PlaySound("pickup_newspaper");
break;
case Hero.MOVING_TV :
mebelTV.ClearTicks();
if ((mebelDivan.__get__HasChar() && (mebelDivan.__get__Char().Wish == Client.WISH_TV)) && (!mebelDivan.__get__Char().__get__WishInProcess())) {
mebelTV.TurnOn();
mebelDivan.__get__Char().TakeTV();
Helper.PlaySound("pickup_tv");
}
break;
case Hero.MOVING_DIVAN :
mebelDivan.HideTick();
if (mebelDivan.__get__HasChar() && (hero.__get__CarryngMode() == Hero.CARRYNG_COFFEE)) {
mebelDivan.__get__Char().TakeCoffee();
hero.CarryngItemUsed = true;
var _local6 = getNextHeroActionWish();
}
break;
case Hero.MOVING_TABLE :
mebelTable.HideTick();
if (mebelTable.__get__HasChar()) {
var _local6 = getNextHeroActionWish();
if ((hero.__get__CarryngMode() == Hero.CARRYNG_COFFEE) && (mebelTable.__get__Char().Wish == Client.WISH_COFFEE)) {
mebelTable.__get__Char().TakeCoffee();
hero.CarryngItemUsed = true;
} else if ((hero.__get__CarryngMode() == Hero.CARRYNG_READ) && (mebelTable.__get__Char().Wish == Client.WISH_READ)) {
mebelTable.__get__Char().TakeRead();
hero.CarryngItemUsed = true;
} else {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
NoActionAvailable();
}
} else {
NoActionAvailable();
}
break;
case Hero.MOVING_ROOM0 :
case Hero.MOVING_ROOM1 :
case Hero.MOVING_ROOM2 :
case Hero.MOVING_ROOM3 :
var _local3 = Room(_rooms[hero.moving_type - Hero.MOVING_ROOM0]);
_local3.ClearTicks();
var _local4 = GetClientOfRoom(_local3);
if ((_local4 != null) && (_local4.State == Client.STATE_AT_ROOM)) {
if ((_local4.Wish == Client.WISH_COFFEE) && (hero.__get__CarryngMode() == Hero.CARRYNG_COFFEE)) {
_local4.TakeCoffee();
hero.CarryngItemUsed = true;
_local3.HideTick();
HeroMoveAvayFromRoom(_local3);
} else if ((_local4.Wish == Client.WISH_PHONE) && (hero.__get__CarryngMode() == Hero.CARRYNG_PHONE)) {
_local4.TakePhone();
hero.CarryngItemUsed = true;
_local3.HideTick();
HeroMoveAvayFromRoom(_local3);
} else if ((_local4.Wish == Client.WISH_READ) && (hero.__get__CarryngMode() == Hero.CARRYNG_READ)) {
_local4.TakeRead();
hero.CarryngItemUsed = true;
_local3.HideTick();
HeroMoveAvayFromRoom(_local3);
} else {
NoActionAvailable();
}
} else {
NoActionAvailable();
}
break;
case Hero.MOVING_CLIENT_AT_RECEIPTION :
_local4 = Client(actionOptional1);
if (CursorMode == CURSOR_KEYS) {
if ((((_local4.State == Client.STATE_AT_RECEIPTION) && (!_local4.__get__InMoving())) && (_local4.__get__room() == null)) && (_keys_from_room != null)) {
_local4.TakeKeys(_keys_from_room);
SetCursorMode(CURSOR_NORMAL);
mebelReceiption.ReleaseKey();
} else {
NoActionAvailable();
}
} else {
NoActionAvailable();
}
_local4.HideTick();
break;
case Hero.MOVING_MONEYS_ON_TABLE :
var _local2 = Moneys(actionOptional1);
if (!((_local2 != undefined) && (_local2.__get__Value() != undefined))) {
break;
}
_local2.HideTick();
trace("add score MOVING_MONEYS_ON_TABLE:" + _local2.__get__Value());
AddScore(_local2.__get__Value());
var _local5 = new Point(mebelReceiption._x, mebelReceiption._y);
_local5.x = _local5.x + _local2._x;
_local5.y = _local5.y + _local2._y;
PlayMoneyTakedAnimation(_local2.__get__Value().toString(), _local5);
mebelReceiption.RemoveMoneys(_local2);
Helper.PlaySound("pickup_money");
}
switch (hero.__get__CarryngMode()) {
case Hero.CARRYNG_COFFEE :
if (!HasWishesWith(Client.WISH_COFFEE)) {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
break;
case Hero.CARRYNG_READ :
if (!HasWishesWith(Client.WISH_READ)) {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
break;
case Hero.CARRYNG_PHONE :
if (HasWishesWith(Client.WISH_PHONE)) {
break;
}
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
if (!_repeat_current_action) {
hero.moving_type = Hero.MOVING_TYPE_WALK;
}
}
function HeroMoveAvayFromRoom(rm) {
if (_actions_queue.length == 0) {
var _local2 = rm.orientierEnter.GetPoint();
_local2.x = _local2.x + 40;
_local2.y = _local2.y + 40;
heroDoActionNOW(Hero.MOVING_TYPE_WALK, _local2);
}
}
function RepearAction() {
_repeat_current_action = true;
}
function heroDoNextAction() {
if (_repeat_current_action) {
return(undefined);
}
if ((_actions_queue.length != 0) && (hero.moving_type == Hero.MOVING_TYPE_WALK)) {
var _local2 = _actions_queue.shift();
if (heroCanDoAction(_local2.mtype)) {
heroDoActionNOW(Number(_local2.mtype), MovieClip(_local2.orient), _local2.opt1);
} else {
ClearHeroActions();
BeepError();
}
} else if ((_actions_queue.length == 0) && (hero.moving_type == Hero.MOVING_TYPE_WALK)) {
if (hero.__get__CarryngMode() != Hero.CARRYNG_NONE) {
if (hero.CarryngItemUsed) {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
hero.UpdateAnimation();
}
}
}
}
function getNextHeroAction() {
if (_actions_queue.length > 0) {
return(_actions_queue[0]);
}
return(null);
}
function getNextHeroActionWish() {
var _local2 = getNextHeroAction();
return(GetActionWish(_local2));
}
function getCurrentHeroActionWish(action) {
var _local2 = new Array();
_local2.mtype = action;
return(GetActionWish(_local2));
}
function GetActionWish(arr) {
if (arr == null) {
return(Client.WISH_NONE);
}
var _local2 = Number(arr.mtype);
if ((_local2 >= Hero.MOVING_ROOM0) && (_local2 <= Hero.MOVING_ROOM3)) {
var _local4 = _local2 - Hero.MOVING_ROOM0;
var _local3 = GetClientOfRoom(Room(_rooms[_local4]));
return(_local3.Wish);
}
if (_local2 == Hero.MOVING_DIVAN) {
if (mebelDivan.__get__Char() != null) {
return(mebelDivan.__get__Char().Wish);
}
} else if (_local2 == Hero.MOVING_TABLE) {
if (mebelTable.__get__Char() != null) {
return(mebelTable.__get__Char().Wish);
}
}
return(Client.WISH_NONE);
}
function HasWishesWith(wish) {
var _local3 = 0;
while (_local3 < customers.length) {
var _local2 = Client(customers[_local3]);
if (_local2.__get__Live() && (_local2.Wish == wish)) {
trace((("wish " + wish) + " has a ") + _local2.toString());
return(true);
}
_local3++;
}
return(false);
}
function HasWishesWithCarryngMode(cmode) {
if (cmode == Hero.CARRYNG_COFFEE) {
return(HasWishesWith(Client.WISH_COFFEE));
}
if (cmode == Hero.CARRYNG_PHONE) {
return(HasWishesWith(Client.WISH_PHONE));
}
if (cmode == Hero.CARRYNG_READ) {
return(HasWishesWith(Client.WISH_READ));
}
return(false);
}
function heroCanDoAction(movingtype) {
var _local1 = false;
return(!_local1);
}
function heroDoAction(movingtype, orientier, optional1) {
var _local4 = false;
if (_local4) {
return(undefined);
}
if ((_actions_queue.length == 0) && (hero.moving_type == Hero.MOVING_TYPE_WALK)) {
if (heroCanDoAction(movingtype)) {
heroDoActionNOW(movingtype, orientier, optional1);
// unexpected jump
}
BeepError();
return(undefined);
}
var _local2 = {mtype:movingtype, orient:orientier, opt1:optional1};
_actions_queue.push(_local2);
}
function heroDoActionNOW(movingtype, orientier, optional1) {
var _local2 = getCurrentHeroActionWish(movingtype);
var _local4 = getNextHeroActionWish();
trace((("heroDoActionNOW:" + movingtype) + " hero.CarryngMode=") + hero.__get__CarryngMode());
switch (hero.__get__CarryngMode()) {
case Hero.CARRYNG_COFFEE :
if ((_local2 != Client.WISH_COFFEE) && (movingtype == Hero.MOVING_COFFEE)) {
mebelCoffee.HideTick();
return(undefined);
}
if ((!HasWishesWith(Client.WISH_COFFEE)) || ((_local4 != Client.WISH_COFFEE) && (_local2 != Client.WISH_COFFEE))) {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
break;
case Hero.CARRYNG_READ :
if ((_local2 != Client.WISH_READ) && (movingtype == Hero.MOVING_READ)) {
mebelDaily.HideTick();
return(undefined);
}
if ((!HasWishesWith(Client.WISH_READ)) || ((_local4 != Client.WISH_READ) && (_local2 != Client.WISH_READ))) {
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
break;
case Hero.CARRYNG_PHONE :
if ((_local2 != Client.WISH_PHONE) && (movingtype == Hero.MOVING_PHONE)) {
mebelPhone.HideTick();
return(undefined);
}
if (!((!HasWishesWith(Client.WISH_PHONE)) || ((_local4 != Client.WISH_PHONE) && (_local2 != Client.WISH_PHONE)))) {
break;
}
hero.__set__CarryngMode(Hero.CARRYNG_NONE);
}
actionOptional1 = optional1;
hero.moving_type = movingtype;
MoveHeroToOrientir(orientier);
}
function OnCustomerReduceHood() {
}
function MoveHeroToOrientir(orientir) {
var _local3;
var _local4;
if (orientir instanceof MovieClip) {
_local3 = MovieClip(orientir)._x;
_local4 = MovieClip(orientir)._y;
} else if (orientir instanceof Point) {
_local3 = Point(orientir).x;
_local4 = Point(orientir).y;
}
hero.MoveToPath(Pathfinding.findPath(map.map, map.YConvertToMap(hero._y), map.XConvertToMap(hero._x), map.YConvertToMap(_local4), map.XConvertToMap(_local3)));
}
function CreateCustomer() {
var _local2;
_local2 = 0;
while (_local2 < CUSTOMERS_NUM) {
if (!Client(customers[_local2]).__get__Live()) {
break;
}
_local2++;
}
if (_local2 >= CUSTOMERS_NUM) {
return(null);
}
var _local3 = Client(customers[_local2]);
var _local4 = Number(Helper.GetRandomFromArray(_Clients));
_local3.Init(_local4, _Clients_configs[_local4]);
mebelDver.PlayCharComin(_local3);
_client_count++;
_clients_in_hotel++;
Helper.PlaySound("door_main_bell");
return(_local3);
}
function ChashaCandyClicked(id) {
}
function UpdateCandyCursorPosition() {
}
function PlayOpenDoorAnimate() {
}
function BeepError() {
Helper.PlaySound("soundError");
}
function ShowStartLevelMessage() {
Enabled = (false);
Helper.StopMusic();
mcWndStartLevel = attachMovie("StartLevelWindow", "mcWndStartLevel", LEVEL_END_DIALOG_DEPTH);
mcWndStartLevel.Level = _current_level;
mcWndStartLevel.MasterObj = _scores2master;
mcWndStartLevel.Popularity = _popularity;
mcWndStartLevel.OnClosed = mx.utils.Delegate.create(this, CloseStartLevelMessage);
}
function CloseStartLevelMessage() {
Enabled = (true);
mcWndStartLevel.removeMovieClip();
mcWndStartLevel = undefined;
StartLevelMessageClosed();
}
function ShowLevelEndMessage() {
Enabled = (false);
Helper.StopMusic();
if (_winned) {
Helper.PlaySound("levelup");
} else {
Helper.PlaySound("leveldefeat");
}
var _local2 = "EndLevelWinWindow";
if (_current_level > SHOW_TRIAL_MESSAGE_AFTER_LEVEL) {
_local2 = "EndLevelWinWindowTrial";
}
mcWndEndLevel = attachMovie(_local2, "mcWndEndLevel", LEVEL_END_DIALOG_DEPTH);
mcWndEndLevel.Winned = _winned;
mcWndEndLevel.OnTryAgain = mx.utils.Delegate.create(this, ReplayLevel);
mcWndEndLevel.level = _current_level;
mcWndEndLevel.server_clients = stat_served_clients;
mcWndEndLevel.losted_clients = stat_losted_clients;
mcWndEndLevel.sales = _score_in_round;
mcWndEndLevel.master_obj = _scores2master;
mcWndEndLevel.total = _score - _spend_score;
if (_current_level >= MAX_LEVEL_NUMBER) {
mcWndEndLevel.ShowNextLevelButton = false;
mcWndEndLevel.OnClosed = mx.utils.Delegate.create(this, GotoMainMenu);
} else {
mcWndEndLevel.OnClosed = mx.utils.Delegate.create(this, CloseLevelEndMessage);
}
}
function CloseLevelEndMessage() {
Enabled = (true);
mcWndEndLevel.removeMovieClip();
mcWndEndLevel = undefined;
if (_winned) {
StartNextLevel();
} else {
GotoMainMenu();
}
}
function ReplayLevel() {
Enabled = (true);
mcWndEndLevel.removeMovieClip();
mcWndEndLevel = undefined;
_score = Helper.globalGameLevelStartScore;
_spend_score = Helper.globalGameLevelStartSpend;
_available_upgrades = Helper.CopyArray(Helper.globalGameLevelStartUpgrades);
LoadLevel(Helper.globalGameLevelStartLevel);
}
function ClientSuccessServed() {
}
static function getGameTimer() {
return(getTimer() - __game_in_pause_time);
}
function RegisterMapObject(mo) {
if (mo instanceof Bot) {
Bot(mo).game = this;
}
mapObjects.push(mo);
}
function ClearMapObjects() {
var _local3 = LEVEL_TEMP_DEPTH;
var _local4;
var _local2 = 0;
while (_local2 < mapObjects.length) {
_local4 = MapObject(mapObjects[_local2]);
_local4.swapDepths(_local3);
_local3++;
_local2++;
}
Helper.ClearArray(mapObjects);
}
function RebuildMapWalkArea() {
var _local5;
map.map = new Array(map.H);
var _local7 = 0;
while (_local7 < map.map.length) {
map.map[_local7] = new Array(map.W);
_local7++;
}
var _local4 = 0;
while (_local4 < map.H) {
var _local3 = 0;
while (_local3 < map.W) {
if (mcAvailableArea.hitTest(map.X + (_local3 * Map.CELL_SIZE), map.Y + (_local4 * Map.CELL_SIZE), true)) {
_local5 = 1;
var _local2 = 0;
while (_local2 < mapObjects.length) {
if (mapObjects[_local2] instanceof Mebel) {
var _local6 = Mebel(mapObjects[_local2]);
if (_local6.mcHitArea.hitTest(map.X + (_local3 * Map.CELL_SIZE), map.Y + (_local4 * Map.CELL_SIZE), true)) {
_local5 = 0;
break;
}
}
_local2++;
}
} else {
_local5 = 0;
}
map.map[_local4][_local3] = _local5;
_local3++;
}
_local4++;
}
}
function UpdateMapObjectsDepth() {
mapObjects.sort(mx.utils.Delegate.create(this, SortMapObjects));
var _local5 = LEVEL_TEMP_DEPTH;
var _local4 = mapDepthLevel;
var _local3;
var _local2 = 0;
while (_local2 < mapObjects.length) {
_local3 = MapObject(mapObjects[_local2]);
_local3.swapDepths(_local5);
_local3.swapDepths(_local4);
_local4++;
_local2++;
}
}
function ReceiptionIsFree() {
var _local2 = 0;
while (_local2 < customers.length) {
if (Client(customers[_local2]).State == Client.STATE_AT_RECEIPTION) {
return(false);
}
_local2++;
}
return(true);
}
function get DivanIsVacant() {
if (_available_upgrades[UPGRADE_TV] == UPGRADE_UNAVAILABLE) {
return(false);
}
var _local2;
var _local3 = 0;
while (_local3 < customers.length) {
_local2 = Client(customers[_local3]);
if ((((_local2.State == Client.STATE_COFFEE_ON_DIVAN) || (_local2.State == Client.STATE_READ_ON_DIVAN)) || (_local2.State == Client.STATE_SIT_ON_DIVAN)) || (_local2.State == Client.STATE_WALK_TO_TV)) {
return(false);
}
_local3++;
}
return(true);
}
function get TableIsVacant() {
if (_available_upgrades[UPGRADE_TABLE] == UPGRADE_UNAVAILABLE) {
return(false);
}
var _local2;
var _local3 = 0;
while (_local3 < customers.length) {
_local2 = Client(customers[_local3]);
if ((((_local2.State == Client.STATE_COFFEE_ON_TABLE) || (_local2.State == Client.STATE_READ_ON_TABLE)) || (_local2.State == Client.STATE_SIT_ON_TABLE)) || (_local2.State == Client.STATE_WALK_TO_TABLE)) {
return(false);
}
_local3++;
}
return(true);
}
function HallIsFree() {
var _local2 = 0;
while (_local2 < customers.length) {
if (Client(customers[_local2]).State == Client.STATE_AT_HALL) {
return(false);
}
_local2++;
}
return(true);
}
function GetFreeRoom() {
var _local2 = 0;
while (_local2 < _rooms.length) {
var _local3 = Room(_rooms[_local2]);
if ((_local3.__get__Status() == Room.FREE) && (!_local3.__get__CleanRequired())) {
return(Room(_rooms[_local2]));
}
_local2++;
}
return(null);
}
function PlayMoneyTakedAnimation(str, cl) {
var _local4 = getNextHighestDepth();
var _local2 = attachMovie("MoneysTakedAnim", "moneysTakedAnim_" + _local4, _local4);
if (cl instanceof Client) {
var _local6 = Client(cl);
_local2._x = cl._x + cl.orientierHead.x;
_local2._y = cl._y + cl.orientierHead.y;
} else if (cl instanceof Point) {
var _local5 = Point(cl);
_local2._x = _local5.x;
_local2._y = _local5.y;
}
_local2.strValue = str;
com.mosesSupposes.fuse.ZigoEngine.doTween(_local2, "_y,_alpha", [_local2._y - 30, 10], 1, mx.transitions.easing.Regular.easeIn, 0, {scope:this, func:"MoneyTakedAnimationFinishedCallback", args:_local2});
}
function MoneyTakedAnimationFinishedCallback(mc) {
mc.unloadMovie();
mc = undefined;
}
function ShowStimulationText(str) {
var _local3 = getNextHighestDepth();
var _local2 = attachMovie("StimulationTextAnim", "stimulationTextAnim_" + _local3, _local3);
_local2._x = hero._x;
_local2._y = hero._y - 130;
_local2.strValue = str;
_local2.strValue2 = str;
MovieClip(_local2.mcMasked).setMask(_local2.textMask);
com.mosesSupposes.fuse.ZigoEngine.doTween(_local2, "_y,_alpha", [_local2._y - 30, 10], 1, mx.transitions.easing.Regular.easeIn, 0, {scope:this, func:"MoneyTakedAnimationFinishedCallback", args:_local2});
}
function ShowStartTextAnimation(str, callback) {
var _local19 = 34;
var _local7 = orientierMapCenter._x - ((str.length * _local19) / 2);
var _local8 = orientierMapCenter._y;
var _local23 = 100;
var _local20 = 50;
var _local22 = StartTextAnimation_TIME / 1000;
var _local21 = (StartTextAnimation_TIME / 1000) * 0.2;
var _local5 = 0;
while (_local5 < str.length) {
var _local4 = str.charAt(_local5);
var _local6 = getNextHighestDepth();
var _local2 = attachMovie("BeginTextSymbolAnim", "beginTextSymbolAnim" + _local6, _local6);
_local2._x = _local7;
_local2._y = _local8 - (_local23 + (Math.random() * _local20));
_local2.strValue = _local4;
_local2.strValue2 = _local4;
_local2.strValue3 = _local4;
MovieClip(_local2.mcMasked).setMask(_local2.textMask);
var _local3 = new com.mosesSupposes.fuse.Fuse();
_local3.__set__target(_local2);
_local3.push({label:"appear", y:_local8, start_alpha:0, time:_local22, ease:mx.transitions.easing.Elastic.easeOut});
_local3.push({_alpha:0, time:_local21});
_local3.push({scope:this, func:"MoneyTakedAnimationFinishedCallback", args:_local2});
_local3.start(true);
_local7 = _local7 + _local19;
_local5++;
}
if (callback != undefined) {
Helper.setTimeout(mx.utils.Delegate.create(this, callback), StartTextAnimation_TIME);
}
}
function ShowStartTextAnimationFinished(callback) {
callback();
}
function SetCursorMode(newmode) {
if (_cursor_mode == newmode) {
return(undefined);
}
if (!(_cursor_mode === CURSOR_KEYS)) {
} else if (_keys_from_room != null) {
_keys_from_room.Close();
_keys_from_room = null;
}
_cursor_mode = newmode;
if (_cursor_movie != undefined) {
_cursor_movie.removeMovieClip();
delete _cursor_movie;
_cursor_movie = undefined;
}
switch (_cursor_mode) {
case CURSOR_NORMAL :
break;
case CURSOR_KEYS :
_cursor_movie = attachMovie("KeysCursor", "_cursor_movie", getNextHighestDepth());
UpdateCursorPosition();
}
}
function get CursorMode() {
return(_cursor_mode);
}
function UpdateCursorPosition() {
if (_cursor_movie != undefined) {
_cursor_movie._x = _xmouse;
_cursor_movie._y = _ymouse;
}
}
function GetClientOfRoom(rm) {
var _local2 = 0;
while (_local2 < customers.length) {
if (Client(customers[_local2]).__get__room() == rm) {
return(Client(customers[_local2]));
}
_local2++;
}
return(null);
}
function get AllRoomsCleared() {
var _local2 = 0;
while (_local2 < _rooms.length) {
var _local3 = Room(_rooms[_local2]);
if (_local3.__get__CleanRequired()) {
return(false);
}
_local2++;
}
return(true);
}
function PlaceMoneyOnTable() {
var _local5 = _moneys_per_exit;
var _local3 = -1;
var _local2 = 0;
while (_local2 < CUSTOMERS_NUM) {
if (mebelReceiption._moneys[_local2] == undefined) {
_local3 = _local2;
break;
}
_local2++;
}
if (_local3 >= 0) {
var _local6 = mebelReceiption.getNextHighestDepth();
var _local4 = Moneys(mebelReceiption.attachMovie("Moneys", "Moneys_" + _local6, _local6));
_local4._y = mebelReceiption.orientierMoneysPlace._y;
_local4._x = mebelReceiption.orientierMoneysPlace._x + ((mebelReceiption.orientierMoneysPlace2._x - mebelReceiption.orientierMoneysPlace._x) * _local3);
_local4.__set__Value(_local5);
mebelReceiption._moneys[_local3] = _local4;
} else {
Moneys(mebelReceiption._moneys[CUSTOMERS_NUM - 1]).Value = Moneys(mebelReceiption._moneys[CUSTOMERS_NUM - 1]).Value + _local5;
}
Helper.PlaySound("checkout");
}
function ReceiptionClicked() {
if (HasWishesWith(Client.WISH_KEYS)) {
heroDoAction(Hero.MOVING_KEYS, orientierKeys);
mebelReceiption.ShowTick();
} else {
NoActionAvailable();
}
}
function ReceiptionMoneysClicked(ind) {
var _local2 = mebelReceiption._moneys[ind];
if ((_local2 != null) && (_local2 != undefined)) {
_local2.ShowTick();
heroDoAction(Hero.MOVING_MONEYS_ON_TABLE, orientierKeys, _local2);
}
}
function CoffeeClicked() {
if (HasWishesWith(Client.WISH_COFFEE)) {
heroDoAction(Hero.MOVING_COFFEE, orientierCoffee);
mebelCoffee.ShowTick();
} else {
NoActionAvailable();
}
}
function PhoneClicked() {
if (HasWishesWith(Client.WISH_PHONE)) {
heroDoAction(Hero.MOVING_PHONE, orientierPhone);
mebelPhone.ShowTick();
} else {
NoActionAvailable();
}
}
function DailyClicked() {
if (HasWishesWith(Client.WISH_READ)) {
heroDoAction(Hero.MOVING_READ, orientierRead);
mebelDaily.ShowTick();
} else {
NoActionAvailable();
}
}
function TVClicked() {
if (mebelDivan.__get__HasChar() && (mebelDivan.__get__Char().Wish == Client.WISH_TV)) {
heroDoAction(Hero.MOVING_TV, orientierTvSet);
mebelTV.ShowTick();
} else {
NoActionAvailable();
}
}
function DivanClicked() {
if ((mebelDivan.__get__HasChar() && (mebelDivan.__get__Char().Wish == Client.WISH_COFFEE)) && (CanDoWish(mebelDivan.__get__Char().Wish))) {
heroDoAction(Hero.MOVING_DIVAN, orientierTv);
mebelDivan.ShowTick();
} else {
NoActionAvailable();
}
}
function TableClicked() {
if ((mebelTable.__get__HasChar() && (mebelTable.__get__Char().Wish != Client.WISH_NONE)) && (CanDoWish(mebelTable.__get__Char().Wish))) {
heroDoAction(Hero.MOVING_TABLE, orientierTable);
mebelTable.ShowTick();
} else {
NoActionAvailable();
}
}
function FlowerFailed(flw) {
trace("FlowerFailed " + flw);
AddSuccess(WISH_FAIL_SUCCESS_COST);
Fx.CreateTrailToPoint(this, Point.FromMovie(flw), succesBar.__get__DiskPosition(), "StarRed", "MinusRed");
}
function Flower0Clicked() {
if (mebelFlower0.__get__InIll()) {
if (maid.__get__InHall() && (maid.GetQueueMode() == Maid.MODE_FLOWERS)) {
mebelFlower0.ShowTick();
maid.DoAction(Maid.STATE_GO_WATER_FLOWERS, orientierFlower0, mebelFlower0);
}
} else {
NoActionAvailable();
}
}
function Flower1Clicked() {
if (mebelFlower1.__get__InIll()) {
if (maid.__get__InHall() && (maid.GetQueueMode() == Maid.MODE_FLOWERS)) {
mebelFlower1.ShowTick();
maid.DoAction(Maid.STATE_GO_WATER_FLOWERS, orientierFlower1, mebelFlower1);
}
} else {
NoActionAvailable();
}
}
function ClearHeroActions() {
Helper.ClearArray(_actions_queue);
var _local5 = [mebelCoffee, mebelDaily, mebelDivan, mebelFlower0, mebelFlower1, mebelPhone];
var _local3 = 0;
while (_local3 < _local5.length) {
var _local4 = Mebel(_local5[_local3]);
_local4.ClearTicks();
_local3++;
}
var _local2 = 0;
while (_local2 < mapObjects.length) {
if (mapObjects[_local2] instanceof Mebel) {
var _local4 = Mebel(mapObjects[_local2]);
_local4.ClearTicks();
}
_local2++;
}
_local3 = 0;
while (_local3 < CUSTOMERS_NUM) {
Client(customers[_local3]).ClearTicks();
_local3++;
}
_local3 = 0;
while (_local3 < _rooms.length) {
Room(_rooms[_local3]).ClearTicks();
_local3++;
}
mebelReceiption.ClearMoneyTicks();
}
function CharEnteredInDoor(c) {
mebelDver.DeattachChar(c);
c.GoTo(orientierDoor.GetPoint(), true);
c.GoState(Client.STATE_AT_HALL);
}
function CharExitedFromHotel(c) {
if (c.__get__Mood() > 0) {
stat_served_clients++;
} else {
stat_losted_clients++;
}
mebelDver.DeattachChar(c);
c.Die();
_clients_in_hotel--;
}
function ClientClicked(cl) {
if (cl == undefined) {
var _local2 = 0;
while (_local2 < customers.length) {
var _local3 = Client(customers[_local2]);
if (_local3.State == Client.STATE_AT_RECEIPTION) {
cl = _local3;
break;
}
_local2++;
}
}
if (cl != undefined) {
heroDoAction(Hero.MOVING_CLIENT_AT_RECEIPTION, orientierKeys, cl);
cl.ShowTick();
}
}
function ClientWishDelivered(cl) {
var _local4 = cl._model_config.wishes[cl.Wish][Client.CONFIG_COST_ZA_USPEH];
var _local6 = 1;
var _local5 = 0;
var _local3 = SuccessCoins;
if (cl.__get__Progress() < 26) {
_local5 = 2;
} else if (cl.__get__Progress() > 75) {
}
var _local7 = false;
if (cl.Wish != Client.WISH_KEYS) {
if (cl.__get__Progress() < 26) {
_local6 = 1.2;
_local7 = true;
} else if (cl.__get__Progress() > 75) {
_local6 = 0.8;
}
}
if (_local7) {
_fast_complete_wishes++;
if (_fast_complete_wishes == 2) {
ShowStimulationText(Language.Transl("stimul good"));
} else if (_fast_complete_wishes == 4) {
ShowStimulationText(Language.Transl("stimul excellent"));
} else if (_fast_complete_wishes == 6) {
ShowStimulationText(Language.Transl("stimul impressive"));
} else if (_fast_complete_wishes >= 8) {
ShowStimulationText(Language.Transl("stimul incredible"));
}
} else {
_fast_complete_wishes = 0;
}
_local4 = _local4 * _local6;
AddSuccess(_local5);
trace("add score money:" + (_local4 + _local3));
trace(_local4);
trace(_local3);
AddScore(_local4 + _local3);
PlayMoneyTakedAnimation(_local4.toString() + ((_local3 > 0) ? ("+" + _local3) : ""), cl);
if (_local5 > 0) {
Fx.CreateTrailToPoint(this, cl.orientierHead.GetPointAtParent(), succesBar.__get__DiskPosition(), "StarGreen", "AddGreen");
} else if (_local5 < 0) {
}
_complete_wishes++;
if ((_complete_wishes > 2) && (_extra_success == 0)) {
_extra_success = 1;
}
Helper.PlaySound("service_accepted");
}
function ClientWishComplete(cl) {
var _local3 = cl._model_config.wishes[cl.Wish][Client.CONFIG_NASTROENIE_ZA_USPEH];
cl.Mood = cl.Mood + _local3;
Fx.CreateGrowUp(this, cl.orientierHead.GetPointAtParent(), "HearthFx", _local3);
}
function ClientWishFail(cl) {
trace("ClientWishFail cl=" + cl.toString());
var _local3 = cl._model_config.wishes[cl.Wish][Client.CONFIG_COST_ZA_NEUDACHU];
var _local4 = cl._model_config.wishes[cl.Wish][Client.CONFIG_NASTROENIE_ZA_NEUDACHU];
AddSuccess(WISH_FAIL_SUCCESS_COST);
if (cl.Wish == Client.WISH_KEYS) {
trace("add score WishFail:" + (-_local3));
if (((_local3 != Number.NaN) && (_local3.toString() != "NaN")) && (_local3 > 0)) {
AddScore(-_local3);
}
}
cl.Mood = cl.Mood - _local4;
Fx.CreateTrailToPoint(this, cl.orientierHead.GetPointAtParent(), succesBar.__get__DiskPosition(), "StarRed", "MinusRed");
}
function RoomClicked(rm) {
if (rm == undefined) {
rm = _rooms[0];
}
if (rm.__get__HasTick()) {
NoActionAvailable();
}
var _local3 = GetClientOfRoom(rm);
if (((_local3 != null) && (_local3.Wish == Client.WISH_CLEAN)) || ((_local3 == null) && (rm.__get__CleanRequired()))) {
if (maid.__get__InHall() && (maid.GetQueueMode() == Maid.MODE_CLEANER)) {
rm.ShowTick();
maid.DoAction(Maid.STATE_CLEAN_ROOM, rm.orientierEnter, rm);
}
} else if ((_local3 != null) && (CanDoWish(_local3.Wish))) {
heroDoAction(Hero.MOVING_ROOM0 + rm.__get__Num(), rm.orientierEnter);
rm.ShowTick();
} else {
NoActionAvailable();
}
}
function HeroStateToCarryngType(hstate) {
switch (hstate) {
case Hero.MOVING_COFFEE :
return(Hero.CARRYNG_COFFEE);
case Hero.MOVING_READ :
return(Hero.CARRYNG_READ);
case Hero.MOVING_PHONE :
return(Hero.CARRYNG_PHONE);
}
return(Hero.CARRYNG_NONE);
}
function CanDoWish(wish) {
var _local3 = Hero.CARRYNG_NONE;
var _local2 = _actions_queue.length - 1;
while (_local2 >= 0) {
var _local4 = _actions_queue[_local2];
_local3 = HeroStateToCarryngType(_local4.mtype);
if (_local3 != Hero.CARRYNG_NONE) {
break;
}
_local2--;
}
if (_local3 == Hero.CARRYNG_NONE) {
_local3 = HeroStateToCarryngType(hero.moving_type);
}
if (_local3 == Hero.CARRYNG_NONE) {
_local3 = hero.CarryngMode;
}
switch (_local3) {
case Hero.CARRYNG_COFFEE :
return(wish == Client.WISH_COFFEE);
case Hero.CARRYNG_READ :
return(wish == Client.WISH_READ);
case Hero.CARRYNG_PHONE :
return(wish == Client.WISH_PHONE);
}
return(false);
}
function NoActionAvailable() {
Helper.PlaySound("key_denied");
}
function GornichnayaCleanClicked() {
Helper.PlaySound("soundMenuHit");
if (maid.__get__InKitchen()) {
maid.DoActionNow({action:Maid.STATE_GO_TO_HALL, orient:orientierKitchenIn, optional1:Maid.MODE_CLEANER});
} else if (maid.GetQueueMode() != Maid.MODE_CLEANER) {
maid.DoAction(Maid.STATE_GO_TO_HALL, orientierKitchenOut, Maid.MODE_CLEANER);
maid.DoAction(Maid.STATE_GO_TO_HALL, orientierKitchenIn, Maid.MODE_CLEANER);
}
}
function GornichnayaFlowerClicked() {
Helper.PlaySound("soundMenuHit");
if (maid.__get__InKitchen()) {
maid.DoActionNow({action:Maid.STATE_GO_TO_HALL, orient:orientierKitchenIn, optional1:Maid.MODE_FLOWERS});
} else if (maid.GetQueueMode() != Maid.MODE_FLOWERS) {
maid.DoAction(Maid.STATE_GO_TO_HALL, orientierKitchenOut, Maid.MODE_FLOWERS);
maid.DoAction(Maid.STATE_GO_TO_HALL, orientierKitchenIn, Maid.MODE_FLOWERS);
}
}
function ShowTip(tip) {
var _local3 = TipsWindow.ShowTip(this, tip);
if ((_local3 != null) && (_local3 != undefined)) {
_local3.OnClose = mx.utils.Delegate.create(this, TipClosed);
Enabled = (false);
EnablePause();
if ((this["orientierTip" + tip] != undefined) || (this[("orientierTip" + tip) + "REV"] != undefined)) {
var _local4 = Orientir(this["orientierTip" + tip]);
var _local9 = false;
if (_local4 == undefined) {
_local4 = Orientir(this[("orientierTip" + tip) + "REV"]);
_local9 = true;
}
var _local6 = getNextHighestDepth();
var _local2 = attachMovie("TipHighlite", "TipHighlite" + _local6, _local6);
_local2._x = _local4.x;
_local2._y = _local4.y;
_local2._xscale = -100;
_local2.twnd = _local3;
_local2.CloseTip = mx.utils.Delegate.create(_local3, _local3.Close);
_local2.btnClose.onPress = mx.utils.Delegate.create(this, function () {
var _local3 = TipsWindow(this._tip_high.twnd).__get__Id();
this._tip_high.CloseTip();
var _local2 = this._tip_click_target[_local3];
if (_local2 != undefined) {
_local2.call(this);
}
});
_tip_high = _local2;
}
}
}
function TipClosed(twnd) {
if (_tip_high != undefined) {
_tip_high.removeMovieClip();
_tip_high = undefined;
}
DisablePause();
Enabled = (true);
hero.UpdateAnimation();
hero.SetAnimation(hero.animation_direction);
hero.UpdateAnimation();
}
function ShowLoadingText() {
Tracer.trace("ShowLoadingText");
mcLoadingText._visible = true;
}
function HideLoadingText() {
Tracer.trace("HideLoadingText");
mcLoadingText._visible = false;
}
static var DEBUG = Helper.DEBUG;
var UNACTIVE_TIME_TO_OPEN_GAME_MENU = 6000;
var LEVEL_TEMP_DEPTH = 1000;
var LEVEL_MAP_OBJECTS_DEPTH = 7500;
var LEVEL_GAME_INTERFACE_DEPTH = 8000;
var DEPTH_FOR_CLOCK = 10;
var LEVEL_END_DIALOG_DEPTH = 8500;
var StartTextAnimation_TIME = 3800;
var DEPTH_LEVEL_1 = 20000;
var DEPTH_LEVEL_2 = 7600;
var DEPTH_LEVEL_3 = 7610;
var DEPTH_LEVEL_4 = 20300;
var DEPTH_LEVEL_5 = 20400;
var DEPTH_LEVEL_6 = 20500;
var DEPTH_LEVEL_7 = 20600;
var DEPTH_LEVEL_8 = 20700;
var DEPTH_LEVEL_9 = 20800;
static var CURSOR_DISABLE = -1;
static var CURSOR_NORMAL = 0;
static var CURSOR_KEYS = 1;
var _cursor_mode = CURSOR_DISABLE;
var CUSTOMERS_NUM = 4;
var ROOMS_NUM = 4;
var CLIENTS_TYPES = new Array("Audioboy", "SimpleWoman", "Badguy", "Tourist");
var WISH_FAIL_SUCCESS_COST = -15;
static var SHOW_TRIAL_MESSAGE_AFTER_LEVEL = 5;
static var MAX_LEVEL_NUMBER = 9;
static var UPGRADE_UNAVAILABLE = 0;
static var UPGRADE_AVAILABLE = 1;
static var UPGRADE_COFFEE = 10;
static var UPGRADE_CLEAN = 11;
static var UPGRADE_FLOWERS = 0;
static var UPGRADE_READ = 1;
static var UPGRADE_PICTURE = 2;
static var UPGRADE_TV = 3;
static var UPGRADE_AQUARIUM = 4;
static var UPGRADE_TABLE = 5;
static var UPGRADE_LAMP = 6;
static var UPGRADE_PHONE = 7;
static var UPGRADE_STARS = 8;
static var UPGRADE_MAX = 15;
static var SPEED_PORTABLE_COEFF = 0.000625;
static var CLIENT_ARRIVE_INTERVAL = 7000;
var __enabled = true;
var ShopOpened = false;
var _launsh_state = 0;
var _extra_success = 0;
var __pause_enabled_in = 0;
var ___prev_pause = false;
var _prev_quant_time = -1;
var __update_objects_depth_counter = 0;
var _repeat_current_action = false;
var _actions_queue = new Array();
var _tip_click_target = [undefined, Game.prototype.ReceiptionClicked, Game.prototype.ClientClicked, Game.prototype.CoffeeClicked, Game.prototype.RoomClicked, Game.prototype.GornichnayaCleanClicked];
}
Symbol 1356 MovieClip [__Packages.Hero] Frame 0
class Hero extends MapObject
{
var speed, package, map, __get__Map, target_move, moving_direction, animation_direction, mcAnim, _carryng_mode, CarryngItemUsed, _x, _y, path, OnTargetReached;
function Hero () {
super();
if (Helper.DEBUG) {
SANDY_MOVING_SPEED = SANDY_MOVING_SPEED * Helper.DEBUG_GLOBAL_SPEED_MUL;
}
speed = SANDY_MOVING_SPEED;
SetAnimation(ANIM_STAY);
CarryngMode = (CARRYNG_NONE);
}
function get HasToy() {
return(CarryngMode != CARRYNG_NONE);
}
function get HasBox() {
return(package != undefined);
}
function set Map(value) {
map = value;
//return(__get__Map());
}
function get Enabled() {
return(true);
}
function get InMoving() {
return(target_move != undefined);
}
function UpdateAnimation() {
Tracer.trace("Hero::UpdateAnimation");
var _local2;
if (InMoving) {
if (moving_direction < -1.8) {
_local2 = ANIM_LEFT;
} else if ((moving_direction >= -1.8) && (moving_direction < -1)) {
_local2 = ANIM_UP;
} else if ((moving_direction >= -1) && (moving_direction < 1)) {
_local2 = ANIM_RIGHT;
} else if ((moving_direction >= 1) && (moving_direction < 1.8)) {
_local2 = ANIM_DOWN;
} else {
_local2 = ANIM_LEFT;
}
} else {
_local2 = ANIM_STAY;
}
if (HasToy) {
_local2 = _local2 + ANIMS_WITH_BOX;
}
if (animation_direction != _local2) {
SetAnimation(_local2);
}
}
function SetAnimation(anim) {
animation_direction = anim;
mcAnim.gotoAndStop(animation_direction + 1);
if (_carryng_mode != CARRYNG_NONE) {
var _local2 = (((_carryng_mode - 1) * ANIMS_WITH_BOX) + 1) + (animation_direction - ANIMS_WITH_BOX);
MovieClip(mcAnim.mcCarryObject).gotoAndStop(_local2);
UpdateBoxPosition();
}
}
function get CarryngMode() {
return(_carryng_mode);
}
function set CarryngMode(value) {
if (_carryng_mode != value) {
_carryng_mode = value;
var _local2 = MovieClip(mcAnim.mcCarryObject);
if (_carryng_mode == CARRYNG_NONE) {
_local2._visible = false;
_local2.stop();
} else {
_local2._visible = true;
var _local3 = (((_carryng_mode - 1) * ANIMS_WITH_BOX) + 1) + (animation_direction - ANIMS_WITH_BOX);
_local2.gotoAndStop(_local3);
}
CarryngItemUsed = false;
}
UpdateAnimation();
//return(CarryngMode);
}
function Quant() {
var _local5 = getTimer();
var _local9 = _local5 - __prev_quant_time;
speed = SANDY_MOVING_SPEED * _local9;
__prev_quant_time = _local5;
var _local8 = moving_direction;
if (target_move == undefined) {
return(undefined);
}
var _local4 = target_move.x - _x;
var _local3 = target_move.y - _y;
if ((Math.abs(_local4) <= speed) && (Math.abs(_local3) <= speed)) {
if (HasPath()) {
DoPathMove();
} else {
StopMove();
UpdateAnimation();
}
} else {
var _local2 = Math.atan2(_local3, _local4);
moving_direction = _local2;
var _local7 = Math.cos(_local2) * speed;
var _local6 = Math.sin(_local2) * speed;
_x = _x + _local7;
_y = _y + _local6;
}
if (Math.abs(moving_direction - _local8) > 0.01) {
UpdateAnimation();
}
}
function GoToPath(path_array) {
moving_type = 0;
MoveToPath(path_array);
}
function GoTo(p, instantly) {
moving_type = 0;
MoveTo(p);
if ((instantly != undefined) && (instantly == true)) {
_x = target_move.x;
_y = target_move.y;
StopMove();
UpdateAnimation();
}
}
function MoveTo(p) {
target_move = p;
}
function MoveToPath(path_array) {
path = path_array;
DoPathMove();
}
function DoPathMove() {
if (HasPath()) {
var _local2 = path.shift();
target_move = new Point(map.XConvertToLocal(_local2[1]), map.YConvertToLocal(_local2[0]));
}
}
function HasPath() {
return((path != undefined) && (path.length > 0));
}
function StopMove() {
target_move = undefined;
moving_direction = -4;
if (OnTargetReached != undefined) {
OnTargetReached();
}
}
function UpdateBoxPosition() {
}
function PauseAnimation() {
Helper.StopMovies(mcAnim);
}
function ResumeAnimation() {
Helper.PlayMovies(mcAnim);
}
static var SANDY_MOVING_SPEED = 0.24;
static var ANIM_STAY = 0;
static var ANIM_RIGHT = 1;
static var ANIM_DOWN = 2;
static var ANIM_LEFT = 3;
static var ANIM_UP = 4;
static var ANIMS_WITH_BOX = 5;
static var MOVING_TYPE_WALK = 0;
static var MOVING_KEYS = 1;
static var MOVING_COFFEE = 2;
static var MOVING_ROOM0 = 3;
static var MOVING_ROOM1 = 4;
static var MOVING_ROOM2 = 5;
static var MOVING_ROOM3 = 6;
static var MOVING_CLIENT_AT_RECEIPTION = 7;
static var MOVING_MONEYS_ON_TABLE = 8;
static var MOVING_PHONE = 9;
static var MOVING_READ = 10;
static var MOVING_TV = 11;
static var MOVING_DIVAN = 12;
static var MOVING_TABLE = 13;
static var CARRYNG_NONE = 0;
static var CARRYNG_COFFEE = 1;
static var CARRYNG_READ = 2;
static var CARRYNG_PHONE = 3;
var moving_type = 0;
var box_orientiers = new Array(ANIMS_WITH_BOX);
var __prev_quant_time = 0;
}
Symbol 1357 MovieClip [__Packages.Toy] Frame 0
class Toy extends MovieClip
{
var mcDesignModeControl, HighliteFilter, graphic, attachMovie, type, getNextHighestDepth, color, upgrade, enabled, hitArea, mcNullMask, OnClick;
function Toy () {
super();
mcDesignModeControl._visible = false;
HighliteFilter = new flash.filters.GlowFilter(16776960, 0.8, 4, 4, 50, 1);
}
function LoadGraphic(toyType) {
if (graphic != undefined) {
graphic.removeMovieClip();
graphic.unloadMovie();
graphic = undefined;
}
graphic = attachMovie(toys[type], "graphic", getNextHighestDepth());
SetColor(COLOR_WHITE);
}
function SetType(toyType) {
if ((toyType >= 0) && (toyType < toys.length)) {
type = toyType;
LoadGraphic(type);
ClearUpgrades();
}
}
function SetColor(colorNum) {
color = colorNum;
graphic.gotoAndStop(colorNum + 1);
}
function ClearUpgrades() {
if (toys_upgrades[type][0] == 1) {
graphic.mcFlag._visible = false;
}
if (toys_upgrades[type][1] == 1) {
graphic.mcShar._visible = false;
}
upgrade = 0;
}
function GetUpgrade() {
return(upgrade);
}
function SetUpgrade(upgrade_num) {
upgrade = upgrade_num;
switch (upgrade_num) {
case UPGRADE_FLAG :
if (toys_upgrades[type][0] == 1) {
graphic.mcFlag._visible = true;
} else {
Tracer.error(("Toy type=" + type) + " cannot upgraded to Flag");
}
break;
case UPGRADE_SHAR :
if (toys_upgrades[type][1] == 1) {
graphic.mcShar._visible = true;
} else {
Tracer.error(("Toy type=" + type) + " cannot upgraded to Shar");
}
break;
default :
ClearUpgrades();
}
}
function CanUpgrade(upgrade_num) {
switch (upgrade_num) {
case UPGRADE_FLAG :
return(toys_upgrades[type][0] == 1);
case UPGRADE_SHAR :
return(toys_upgrades[type][1] == 1);
}
return(false);
}
function Equal(toy) {
return(((color == toy.color) && (GetUpgrade() == toy.GetUpgrade())) && (type == toy.type));
}
function ClearHighlite() {
if (highlited) {
var _local3 = graphic.filters;
var _local2 = 0;
while (_local2 < _local3.length) {
_local3.pop();
_local2++;
}
graphic.filters = _local3;
highlited = false;
}
}
function SetHighlite() {
if (!highlited) {
var _local2 = graphic.filters;
_local2.push(HighliteFilter);
graphic.filters = _local2;
highlited = true;
}
}
function set Enabled(val) {
enabled = val;
if (enabled) {
hitArea = graphic;
} else {
hitArea = mcNullMask;
}
//return(Enabled);
}
function get Enabled() {
return(enabled);
}
static function Copy(from, to) {
to.SetType(from.type);
to.SetColor(from.color);
to.conveier_num = from.conveier_num;
to.conveier_anchor_mc = from.conveier_anchor_mc;
to.SetUpgrade(from.GetUpgrade());
}
static function TransferToy(toy, from_obj, to_object, new_depth) {
if (new_depth == undefined) {
new_depth = to_object.getNextHighestDepth();
}
var _local1 = Toy(to_object.attachMovie("Toy", "toy" + (_toy_id_++), new_depth));
Copy(toy, _local1);
RemoveToy(toy, from_obj);
return(_local1);
}
static function RemoveToy(toy, where) {
for (var _local3 in where) {
if (where[_local3] == toy) {
where[_local3].removeMovieClip();
where[_local3].unloadMovie();
delete where[_local3];
where[_local3] = undefined;
toy.removeMovieClip();
toy = undefined;
break;
}
}
}
function onRollOver() {
if (enabled) {
SetHighlite();
}
}
function onRollOut() {
if (enabled) {
ClearHighlite();
}
}
function onPress(Void) {
if (enabled && (OnClick != undefined)) {
OnClick(this);
}
}
static var _toy_id_ = 3330;
static var TYPES = 7;
static var COLOR_WHITE = 0;
static var COLOR_BLUE = 1;
static var COLOR_RED = 2;
static var COLOR_FIOLET = 3;
static var COLOR_YELLOW = 4;
static var COLORS = 5;
static var COLOR_BALLON = 5;
static var COLOR_FLAG = 6;
static var UPGRADE_NONE = 0;
static var UPGRADE_FLAG = 1;
static var UPGRADE_SHAR = 2;
static var UPGRADES = 3;
static var toys = ["ToyCat", "ToyAeroplan", "ToyCat", "ToyBigcar", "ToyDoll", "ToyHare", "ToyHorse"];
static var toys_upgrades = [[0, 1], [1, 0], [0, 1], [1, 1], [1, 1], [0, 1], [1, 1]];
var highlited = false;
}
Symbol 1358 MovieClip [__Packages.Orientir] Frame 0
class Orientir extends MovieClip
{
var x, y, depth, _x, _y, _parent;
function Orientir (mc) {
super();
if (mc == undefined) {
GetFromMC(this);
}
}
function GetFromMC(mc) {
x = mc._x;
y = mc._y;
depth = mc.getDepth();
}
function Set(orient) {
x = orient.x;
y = orient.y;
depth = orient.depth;
}
function GetPoint() {
return(new Point(_x, _y));
}
function GetPointAtParent() {
return(new Point(_x + _parent._x, _y + _parent._y));
}
}
Symbol 1359 MovieClip [__Packages.Package] Frame 0
class Package extends MovieClip
{
var type, mcAnim, HighliteFilter, enabled, OnClick;
function Package () {
super();
Type = (PACK_NONE);
}
function get Type() {
return(type);
}
function set Type(val) {
type = val;
UpdateAnim();
//return(Type);
}
function UpdateAnim() {
if (type == PACK_NONE) {
mcAnim._visible = false;
} else {
mcAnim._visible = true;
mcAnim.gotoAndStop(type);
switch (type) {
case PACK_CIRCLE :
HighliteFilter = new flash.filters.GlowFilter(38893, 0.6, 5, 5, 30, 1);
break;
case PACK_TRIANGLE :
HighliteFilter = new flash.filters.GlowFilter(11369726, 0.6, 5, 5, 30, 1);
}
}
}
function onRollOver() {
if (!enabled) {
return(undefined);
}
SetHighlite();
}
function onRollOut() {
if (!enabled) {
return(undefined);
}
ClearHighlite();
}
function onPress(Void) {
if (!enabled) {
return(undefined);
}
if (OnClick != undefined) {
OnClick();
}
}
function ClearHighlite() {
if (highlited) {
var _local3 = mcAnim.filters;
var _local2 = 0;
while (_local2 < _local3.length) {
_local3.pop();
_local2++;
}
mcAnim.filters = _local3;
highlited = false;
}
}
function SetHighlite() {
if (!highlited) {
var _local2 = mcAnim.filters;
_local2.push(HighliteFilter);
mcAnim.filters = _local2;
highlited = true;
}
}
static function Transfer(pack, from_obj, to_object, new_depth) {
if (new_depth == undefined) {
new_depth = to_object.getNextHighestDepth();
}
var _local1 = Package(to_object.attachMovie("Package", "pack" + (_pack_id_++), new_depth));
_local1.__set__Type(pack.Type);
Remove(pack, from_obj);
return(_local1);
}
static function Remove(toy, where) {
for (var _local3 in where) {
if (where[_local3] == toy) {
where[_local3].removeMovieClip();
where[_local3].unloadMovie();
delete where[_local3];
where[_local3] = undefined;
toy.removeMovieClip();
toy = undefined;
break;
}
}
}
static var _pack_id_ = 5550;
static var PACK_NONE = 0;
static var PACK_CIRCLE = 1;
static var PACK_TRIANGLE = 2;
static var PACKS = 3;
var highlited = false;
}
Symbol 1360 MovieClip [__Packages.Clock] Frame 0
class Clock extends MovieClip
{
var mcClosed, progress, mcArrow, day, textDay;
function Clock () {
super();
mcClosed._visible = false;
Day = (1);
closed_state = 0;
}
function set Progress(val) {
progress = val;
mcArrow._rotation = ((-val) * 360) / 100;
if (progress < 0) {
progress = 0;
}
if (progress <= 0) {
if (mcClosed._visible == false) {
Helper.PlaySound("hotel_close");
}
mcClosed._visible = true;
} else {
mcClosed._visible = false;
}
//return(Progress);
}
function get Progress() {
return(progress);
}
function get Day() {
return(day);
}
function set Day(value) {
day = value;
textDay.text = day.toString();
//return(Day);
}
var closed_state = 0;
}
Symbol 1361 MovieClip [__Packages.Timer] Frame 0
class Timer extends MovieClip
{
var Value, frames_num, mcAnim, stop, OnValueChanged, time, start_time, OnElapdes;
function Timer () {
super();
if (Value == undefined) {
Value = 0;
}
SetValue(Value, true);
frames_num = mcAnim._totalframes;
stop();
}
function SetValue(val, initializing) {
Value = val;
var _local2 = Math.floor(((frames_num - 1) * Math.max(0, Math.min(100, val))) / 100);
if (isNaN(_local2)) {
_local2 = 0;
}
_local2 = _local2 + 1;
mcAnim.gotoAndStop(_local2);
if ((initializing == false) || (initializing == undefined)) {
if (OnValueChanged != undefined) {
OnValueChanged();
}
}
}
function Start(time_in_ms) {
time = time_in_ms;
start_time = Game.getGameTimer();
Enabled = (true);
}
function Stop() {
Enabled = (false);
}
function OnTimerTick() {
if (!enabled) {
return(undefined);
}
var _local2 = Game.getGameTimer() - start_time;
if (_local2 >= time) {
Elapdes();
} else {
SetValue((_local2 * 100) / time);
}
}
function Elapdes() {
SetValue(100);
if (OnElapdes != undefined) {
OnElapdes();
}
}
function Quant() {
OnTimerTick();
}
function get Enabled() {
return(enabled);
}
function set Enabled(value) {
enabled = value;
mcAnim._visible = enabled;
//return(Enabled);
}
var enabled = false;
}
Symbol 1362 MovieClip [__Packages.DivanTV] Frame 0
class DivanTV extends Mebel
{
var _active, __set__Enabled;
function DivanTV () {
super();
_active = true;
__set__Enabled(true);
}
}
Symbol 1363 MovieClip [__Packages.ReceptionTable] Frame 0
class ReceptionTable extends Mebel
{
var mcReception, _active, __set__Enabled, _moneys, _keys, _key_taked, OnMoneyClick;
function ReceptionTable () {
super();
mcReception.mcWOKeys._visible = false;
_active = true;
__set__Enabled(true);
Init();
_moneys = new Array(MONEYS_MAX);
}
function Init() {
_keys = 4;
ReturnKey();
}
function get HasKeys() {
return((_keys > 0) && (!_key_taked));
}
function TakeKey() {
_key_taked = true;
mcReception.mcWOKeys._visible = true;
}
function ReturnKey() {
_key_taked = false;
mcReception.mcWOKeys._visible = false;
}
function ReleaseKey() {
ReturnKey();
_keys--;
}
function ReturnBackKey() {
_keys++;
}
function onPress(Void) {
var _local4 = 0;
while (_local4 < MONEYS_MAX) {
if (_moneys[_local4] != undefined) {
var _local5 = Moneys(_moneys[_local4]);
if (_local5.hitTest(_root._xmouse, _root._ymouse, true)) {
if (OnMoneyClick != undefined) {
OnMoneyClick(_local4);
}
return(undefined);
}
}
_local4++;
}
super.onPress();
}
function RemoveMoneys(mn) {
mn.__set__Value(0);
var _local2 = 0;
while (_local2 < MONEYS_MAX) {
if (_moneys[_local2] == mn) {
_moneys[_local2] = undefined;
mn.removeMovieClip();
}
_local2++;
}
}
function get HasMoneyOnTable() {
var _local2 = 0;
while (_local2 < MONEYS_MAX) {
if (_moneys[_local2] != undefined) {
return(true);
}
_local2++;
}
return(false);
}
function ClearMoneyTicks() {
var _local2 = 0;
while (_local2 < MONEYS_MAX) {
if (_moneys[_local2] != undefined) {
Moneys(_moneys[_local2]).ClearTicks();
}
_local2++;
}
}
static var MONEYS_MAX = 4;
}
Symbol 1364 MovieClip [__Packages.Moneys] Frame 0
class Moneys extends MovieClip
{
var hitArea, mcHitArea, enabled, _value, gotoAndStop, OnClick, _ticks, mcTick;
function Moneys () {
super();
ClearHighlite();
hitArea = mcHitArea;
mcHitArea._alpha = 0;
enabled = true;
Value = (0);
ClearTicks();
}
function get Value() {
return(_value);
}
function set Value(value) {
_value = value;
if (_value < 10) {
gotoAndStop(1);
} else if (_value < 15) {
gotoAndStop(2);
} else if (_value < 20) {
gotoAndStop(3);
} else {
gotoAndStop(4);
}
//return(Value);
}
function onRollOver() {
if (Enabled) {
SetHighlite();
}
}
function onRollOut() {
if (Enabled) {
ClearHighlite();
}
}
function onPress(Void) {
trace(99999999);
if (OnClick != undefined) {
OnClick();
}
}
function ClearHighlite() {
if (highlited) {
Helper.ClearHighlite(this);
highlited = false;
}
}
function SetHighlite() {
if (!highlited) {
Helper.SetHighlite(this);
highlited = true;
}
}
function HideTick() {
_ticks--;
if (_ticks < 0) {
_ticks = 0;
}
if ((mcTick != undefined) && (_ticks == 0)) {
mcTick._visible = false;
}
}
function ShowTick() {
_ticks++;
if ((mcTick != undefined) && (_ticks > 0)) {
mcTick._visible = true;
}
}
function ClearTicks() {
_ticks = 0;
HideTick();
}
var Enabled = true;
var highlited = false;
}
Symbol 1365 MovieClip [__Packages.TVSet] Frame 0
class TVSet extends Mebel
{
var _working, _working_time, mcAnim;
function TVSet () {
super();
TurnOff();
}
function get InWorking() {
return(_working);
}
function TurnOn() {
_working_time = 0;
_working = true;
mcAnim.gotoAndStop(2);
}
function TurnOff() {
_working_time = 0;
_working = false;
mcAnim.gotoAndStop(1);
}
function Quant(dtime) {
if (_working) {
_working_time = _working_time + dtime;
if (_working_time >= WORKING_TIME) {
TurnOff();
}
}
}
static var WORKING_TIME = 5000;
}
Symbol 1366 MovieClip [__Packages.Table] Frame 0
class Table extends Mebel
{
function Table () {
super();
}
}
Symbol 1367 MovieClip [__Packages.Daily] Frame 0
class Daily extends Mebel
{
function Daily () {
super();
}
}
Symbol 1368 MovieClip [__Packages.Phone] Frame 0
class Phone extends Mebel
{
function Phone () {
super();
}
}
Symbol 1369 MovieClip [__Packages.Coffee] Frame 0
class Coffee extends Mebel
{
var mcCup;
function Coffee () {
super();
ShowCup();
}
function ShowCup() {
mcCup._visible = true;
}
function HideCup() {
mcCup._visible = false;
}
}
Symbol 1370 MovieClip [__Packages.KitchenWallMC] Frame 0
class KitchenWallMC extends Mebel
{
var _active, __set__Enabled;
function KitchenWallMC () {
super();
_active = false;
__set__Enabled(false);
}
}
Symbol 1371 MovieClip [__Packages.Flower] Frame 0
class Flower extends Mebel
{
var state, _live_time, mcAnim, _showing_in_process, OnDeathFail;
function Flower () {
super();
SetState(ANIM_OFF);
}
function get InIll() {
return((state == ANIM_ILL) || (state == ANIM_DEATH));
}
function Respawn() {
_live_time = 0;
SetState(ANIM_NORMAL);
}
function SetState(newstate) {
if (state != newstate) {
if (newstate == ANIM_ILL) {
Helper.PlaySound("flower_dry");
}
}
state = newstate;
if (state > 0) {
mcAnim.gotoAndStop(state);
} else {
mcAnim.gotoAndStop(4);
}
_live_time = 0;
_showing_in_process = false;
}
function Disable() {
SetState(ANIM_OFF);
}
function BeginShowing() {
_showing_in_process = true;
}
function EndShowing() {
SetState(ANIM_NORMAL);
_showing_in_process = false;
}
function Quant(dtime) {
if (_showing_in_process) {
return(undefined);
}
switch (state) {
case ANIM_NORMAL :
_live_time = _live_time + dtime;
if (_live_time >= LIVE_TIME) {
SetState(ANIM_ILL);
}
break;
case ANIM_ILL :
_live_time = _live_time + dtime;
if (_live_time >= TIME_TO_DEATH) {
SetState(ANIM_DEATH);
}
break;
case ANIM_DEATH :
_live_time = _live_time + dtime;
if (_live_time < SUCCESS_FAIL_PERIOD_TIME) {
break;
}
if (OnDeathFail != undefined) {
OnDeathFail(this);
}
SetState(ANIM_DEATH);
}
}
static var LIVE_TIME = 55000;
static var TIME_TO_DEATH = 30000;
static var SUCCESS_FAIL_PERIOD_TIME = 10000;
static var ANIM_OFF = 0;
static var ANIM_NORMAL = 1;
static var ANIM_ILL = 2;
static var ANIM_DEATH = 3;
}
Symbol 1372 MovieClip [__Packages.Maid] Frame 0
class Maid extends Bot
{
var OnTargetReached, moving_speed, _state, _game, _x, _y, target_move, moving_direction, _visible, __get__InMoving, _state_time, _mode, _action_option1, animation_direction, GoTo, cleaning_room, _showing_particle_emmiter, showing_flower, game, mcAnim, UpdateBoxPosition;
function Maid () {
super();
OnTargetReached = mx.utils.Delegate.create(this, TargetReached);
moving_speed = MAID_SPEED;
if (Helper.DEBUG) {
moving_speed = moving_speed * Helper.DEBUG_GLOBAL_SPEED_MUL;
}
}
function Reset() {
_state = STATE_IN_KITCHEN;
Mode = (MODE_CLEANER);
var _local2 = _game.orientierKitchenOut.GetPoint();
_x = _local2.x;
_y = _local2.y;
target_move = undefined;
SetAnimation(Bot.ANIM_STAY);
moving_direction = -4;
_visible = false;
_actions_queue = new Array();
}
function get Enabled() {
return(true);
}
function get InHall() {
return((_state != STATE_IN_KITCHEN) || (__get__InMoving()));
}
function get InKitchen() {
return((_state == STATE_IN_KITCHEN) && (!__get__InMoving()));
}
function get State() {
return(_state);
}
function set State(value) {
if (_state != value) {
if (_state == STATE_IN_KITCHEN) {
_visible = true;
} else if (_state == STATE_CLEANING) {
SetAnimation(Bot.ANIM_STAY);
}
_state = value;
_state_time = 0;
}
//return(State);
}
function get Mode() {
return(_mode);
}
function set Mode(value) {
_mode = value;
UpdateAnimation();
//return(Mode);
}
function DoAction(act, ort, opt1, now) {
if (now == undefined) {
now = false;
}
if (!now) {
_actions_queue.push({action:act, orient:ort, optional1:opt1});
} else {
DoActionNow({action:act, orient:ort, optional1:opt1});
}
}
function GetQueueMode() {
var _local2 = _actions_queue.length - 1;
while (_local2 >= 0) {
var _local3 = _actions_queue[_local2];
if ((_local3.action == STATE_GO_TO_HALL) && (_local3.optional1 != undefined)) {
return(Number(_local3.optional1));
}
_local2--;
}
return(Mode);
}
function DoActionNow(action) {
var _local2 = Number(action.action);
var _local3 = Orientir(action.orient);
_action_option1 = action.optional1;
if ((_local2 == STATE_GO_TO_HALL) && (State != STATE_IN_KITCHEN)) {
var _local4 = Number(_action_option1);
if (_local4 == Mode) {
return(undefined);
}
} else if ((_local2 == STATE_GO_TO_HALL) && (InKitchen)) {
if (_action_option1 != undefined) {
var _local4 = Number(_action_option1);
Mode = (_local4);
animation_direction = Bot.ANIM_RIGHT;
UpdateAnimation();
SetAnimation(Bot.ANIM_RIGHT + Bot.ANIMS_WITH_BOX);
}
}
State = (_local2);
if (State == STATE_CLEANING) {
UpdateAnimation();
}
if (_local3 != null) {
GoTo(_local3.GetPoint(), false);
}
}
function Quant(dtime) {
super.Quant(dtime);
_state_time = _state_time + dtime;
if ((_actions_queue.length != 0) && ((State == STATE_WAITING) || (State == STATE_IN_KITCHEN))) {
DoActionNow(_actions_queue.shift());
} else {
switch (State) {
case STATE_WAITING :
if (_state_time >= WAITING_TIME_TO_GO_OUT) {
DoAction(STATE_IN_KITCHEN, _game.orientierKitchenOut, 0, true);
}
break;
case STATE_CLEANING :
if (_state_time >= _game._wish_cleaning_time) {
if (!cleaning_room.__get__CleanRequired()) {
cleaning_room.mcOrder._visible = false;
var _local3 = _game.GetClientOfRoom(cleaning_room);
_local3.FinishCleaning();
} else {
cleaning_room.CleanDone();
}
cleaning_room.ClearTicks();
State = (STATE_WAITING);
} else {
cleaning_room.mcOrder._visible = true;
cleaning_room.mcOrder.__set__Progress((_state_time * 100) / _game._wish_cleaning_time);
cleaning_room.mcOrder.__set__Wish(Client.WISH_CLEAN);
}
break;
case STATE_SHOWING_FLOWERS :
if (_state_time < TIME_WATER_FLOWERS) {
break;
}
if (_showing_particle_emmiter != undefined) {
_showing_particle_emmiter.Terminate();
if (_showing_particle_emmiter != undefined) {
_showing_particle_emmiter.removeMovieClip();
_showing_particle_emmiter = undefined;
}
}
showing_flower.EndShowing();
showing_flower.ClearTicks();
State = (STATE_WAITING);
UpdateAnimation();
}
}
}
function TargetReached() {
var _local2 = false;
switch (State) {
case STATE_GO_TO_HALL :
Mode = (Number(_action_option1));
break;
case STATE_IN_KITCHEN :
Reset();
_local2 = true;
break;
case STATE_CLEAN_ROOM :
cleaning_room = Room(_action_option1);
var _local3 = _game.GetClientOfRoom(cleaning_room);
if (cleaning_room.__get__CleanRequired() || ((_local3.Wish == Client.WISH_CLEAN) && (!_local3.__get__WishInProcess()))) {
_local3.StartCleaning();
DoAction(STATE_CLEANING, null, 0, true);
_local2 = true;
Helper.PlaySound("cleaning");
}
break;
case STATE_GO_WATER_FLOWERS :
showing_flower = Flower(_action_option1);
if (!showing_flower.__get__InIll()) {
} else {
showing_flower.HideTick();
showing_flower.BeginShowing();
if (_showing_particle_emmiter != undefined) {
_showing_particle_emmiter.Terminate();
if (_showing_particle_emmiter != undefined) {
_showing_particle_emmiter.removeMovieClip();
_showing_particle_emmiter = undefined;
}
}
_showing_particle_emmiter = Fx.CreateParticlesEmmiterUp(game, Point.FromMovie(showing_flower), "GreenParticle");
DoAction(STATE_SHOWING_FLOWERS, null, 0, true);
_local2 = true;
Helper.PlaySound("flower_water");
}
}
if (!_local2) {
State = (STATE_WAITING);
}
}
function UpdateAnimation() {
if (State == STATE_CLEANING) {
SetAnimation(Bot.ANIM_CLEAN);
} else if (State == STATE_SHOWING_FLOWERS) {
SetAnimation(Bot.ANIM_FLOWERS);
} else {
super.UpdateAnimation();
}
}
function SetAnimation(anim) {
animation_direction = anim;
if (Mode == MODE_FLOWERS) {
animation_direction = animation_direction + Bot.ANIMS_WITH_BOX;
}
mcAnim.gotoAndStop(animation_direction + 1);
UpdateBoxPosition();
}
static var MAID_SPEED = 0.16;
static var WAITING_TIME_TO_GO_OUT = 3000;
static var TIME_WATER_FLOWERS = 5000;
static var MODE_CLEANER = 0;
static var MODE_FLOWERS = 1;
static var STATE_IN_KITCHEN = 0;
static var STATE_WAITING = 1;
static var STATE_GO_TO_HALL = 5;
static var STATE_CLEAN_ROOM = 6;
static var STATE_CLEANING = 7;
static var STATE_GO_WATER_FLOWERS = 8;
static var STATE_SHOWING_FLOWERS = 9;
var _actions_queue = new Array();
}
Symbol 1373 MovieClip [__Packages.Room] Frame 0
class Room extends MovieClip
{
var _opened, mcOrder, _clean_required, hitArea, mcAnim, _number, mcHighlite, mcStatusDnd, mcStatusClosed, _status, roomWish, _enabled, OnClick, _ticks, mcTick;
function Room () {
super();
Num = (0);
Status = (CLOSED);
_opened = false;
ClearHighlite();
HideWish();
Enabled = (false);
ClearTicks();
mcOrder._visible = false;
_clean_required = false;
hitArea = mcAnim;
}
function get Num() {
return(_number);
}
function set Num(value) {
_number = value;
mcAnim.gotoAndStop(_number + 1);
mcHighlite.gotoAndStop(_number + 1);
mcStatusDnd._x = mcAnim.pointDnd._x;
mcStatusDnd._y = mcAnim.pointDnd._y;
mcStatusClosed._x = mcAnim.pointClosed._x;
mcStatusClosed._y = mcAnim.pointClosed._y;
//return(Num);
}
function set Status(value) {
_status = value;
mcStatusClosed._visible = _status == CLOSED;
mcStatusDnd._visible = _status == DND;
ClearHighlite();
//return(Status);
}
function get Status() {
return(_status);
}
function Open() {
_opened = true;
mcAnim._visible = false;
}
function Close() {
_opened = false;
mcAnim._visible = true;
}
function ShowWish() {
roomWish._visible = true;
}
function HideWish() {
roomWish._visible = false;
}
function UpdateWish(cl) {
roomWish.__set__Mood(cl.Mood);
roomWish.__set__ClientModel(cl.ClientModel);
roomWish.__set__Progress(cl.Progress);
roomWish.__set__Wish(cl.Wish);
}
function get CleanRequired() {
return(_clean_required);
}
function RequestClean() {
if ((Status == FREE) && (!_clean_required)) {
HideWish();
_clean_required = true;
Open();
mcOrder._visible = true;
mcOrder.__set__Wish(Client.WISH_CLEAN);
mcOrder.__set__Progress(0);
Enabled = (true);
} else {
trace("WARNING!: Incorrect RequestClean()");
}
}
function CleanDone() {
_clean_required = false;
Close();
mcOrder._visible = false;
Enabled = (false);
}
function get Enabled() {
return(_enabled);
}
function set Enabled(val) {
_enabled = val;
if (!_enabled) {
ClearHighlite();
ClearTicks();
}
//return(Enabled);
}
function onRollOver() {
if (Enabled) {
SetHighlite();
}
}
function onRollOut() {
if (Enabled) {
ClearHighlite();
}
}
function ClearHighlite() {
mcHighlite._visible = false;
}
function SetHighlite() {
mcHighlite._visible = true;
}
function onPress(Void) {
if (Enabled) {
OnClick(this);
}
}
function HideTick() {
_ticks--;
if (_ticks < 0) {
_ticks = 0;
}
if ((mcTick != undefined) && (_ticks == 0)) {
mcTick._visible = false;
}
}
function ShowTick() {
_ticks++;
if ((mcTick != undefined) && (_ticks > 0)) {
mcTick._visible = true;
Helper.PlaySound("event_accepted");
}
}
function ClearTicks() {
_ticks = 0;
HideTick();
}
function get HasTick() {
return(_ticks != 0);
}
static var CLOSED = 0;
static var FREE = 1;
static var DND = 2;
}
Symbol 1374 MovieClip [__Packages.RoomWish] Frame 0
class RoomWish extends MovieClip
{
var _client_model, _mood, mcHighlite, __get__ClientModel, mcAvatar, mcBar, __get__Mood, mcOrder, __get__Progress, __get__Wish;
function RoomWish () {
super();
_client_model = 0;
_mood = 0;
mcHighlite._visible = false;
}
function set ClientModel(value) {
_client_model = value;
UpdateAvatar();
//return(__get__ClientModel());
}
function UpdateAvatar() {
var _local3 = (_client_model * 3) + 1;
var _local2 = 0;
if (_mood > 5) {
_local2 = 2;
} else if (_mood > 3) {
_local2 = 1;
}
_local3 = _local3 + _local2;
mcAvatar.gotoAndStop(_local3);
}
function set Mood(value) {
_mood = value;
mcBar.gotoAndStop(_mood + 1);
UpdateAvatar();
//return(__get__Mood());
}
function set Progress(value) {
mcOrder.__set__Progress(value);
//return(__get__Progress());
}
function set Wish(value) {
mcOrder.__set__Wish(value);
//return(__get__Wish());
}
}
Symbol 1375 MovieClip [__Packages.ClientOrder] Frame 0
class ClientOrder extends MovieClip
{
var colorTrans, trans, mcProgress, _progress, _wish, mcAnim;
function ClientOrder () {
super();
Progress = (0);
Wish = (Client.WISH_KEYS);
colorTrans = new flash.geom.ColorTransform(0, 0, 0, 1, 0, 0, 0, 0);
trans = new flash.geom.Transform(mcProgress);
trans.colorTransform = colorTrans;
}
function get Progress() {
return(_progress);
}
function set Progress(value) {
var _local10 = _progress;
_progress = Math.floor(Math.min(100, Math.max(0, value)));
mcProgress.gotoAndStop(101 - _progress);
if (_progress != _local10) {
var _local3;
var _local4;
var _local5 = [0, 0, 0];
var _local7 = 1;
var _local8 = 1;
var _local9 = false;
var _local2 = 0;
while (_local2 < CIRCLE_COLORS.length) {
if (_progress <= Number(CIRCLE_COLORS[_local2][0])) {
_local3 = CIRCLE_COLORS[_local2 - 1][1];
_local4 = CIRCLE_COLORS[_local2][1];
_local7 = Number(CIRCLE_COLORS[_local2 - 1][0]);
_local8 = Number(CIRCLE_COLORS[_local2][0]);
break;
}
if (_progress == CIRCLE_COLORS[_local2][0]) {
_local5 = Array(CIRCLE_COLORS[_local2][1]);
_local9 = true;
break;
}
_local2++;
}
if (!_local9) {
var _local6 = (_progress - _local7) / (_local8 - _local7);
_local2 = 0;
while (_local2 < 3) {
if (_local4[_local2] <= _local3[_local2]) {
_local5[_local2] = _local3[_local2] + ((_local4[_local2] - _local3[_local2]) * _local6);
} else {
_local5[_local2] = _local3[_local2] + ((_local4[_local2] - _local3[_local2]) * _local6);
}
_local2++;
}
}
colorTrans.redOffset = Math.floor(_local5[0]);
colorTrans.greenOffset = Math.floor(_local5[1]);
colorTrans.blueOffset = Math.floor(_local5[2]);
trans.colorTransform = colorTrans;
}
//return(Progress);
}
function get Wish() {
return(_wish);
}
function set Wish(value) {
_wish = value;
if (_wish >= 0) {
mcAnim.gotoAndStop(_wish + 1);
}
//return(Wish);
}
static var CIRCLE_COLORS = [[0, [0, 255, 0]], [50, [255, 255, 0]], [102, [255, 0, 0]]];
}
Symbol 1376 MovieClip [__Packages.Fx] Frame 0
class Fx
{
function Fx () {
}
static function CreateTrailToPoint(parentmc, fly_from, fly_to, head_mc_name, trail_mc_name) {
var _local6 = parentmc.getNextHighestDepth();
var _local2 = parentmc.attachMovie(head_mc_name, head_mc_name + _local6, _local6);
_local2.direct = Math.atan2(ANIM_TRAIL_START_DIRECT_Y, ANIM_TRAIL_START_DIRECT_X);
_local2._x = fly_from.x;
_local2._y = fly_from.y;
_local2.fly_to = fly_to;
_local2.trail_mc_name = trail_mc_name;
_local2.speed = ANIM_TRAIL_START_SPEED;
_local2.fly_distance = 0;
_local2.trail_distance = 0;
_local2.finish_phase = 0;
_local2.ang_change_summ = 0;
_local2.onEnterFrame = function () {
if (this.finish_phase > 0) {
if (this.finish_phase == 1) {
this._x = fly_to.x;
this._y = fly_to.y;
this._alpha = 60;
this.finish_phase = 2;
} else if (this.finish_phase == 2) {
this.finish_phase = 3;
MovieClip(this).removeMovieClip();
this=undefined;//parameter overwritten
}
return(undefined);
}
var _local8 = Math.atan2(this.fly_to.y - this._y, this.fly_to.x - this._x);
var _local2 = _local8 - this.direct;
if (Math.abs(_local2) > Math.PI) {
_local2 = ((_local2 > 0) ? -1 : 1) * ((Math.PI*2) - Math.abs(_local2));
}
this.direct = this.direct + (_local2 * Fx.ANIM_TRAIL_ANGLE_CHANGE_COEFF);
if (this.direct > Math.PI) {
this.direct = this.direct - (Math.PI*2);
} else if (this.direct < -3.14159265358979) {
this.direct = this.direct + (Math.PI*2);
}
var _local7 = Math.sqrt(((this.fly_to.x - this._x) * (this.fly_to.x - this._x)) + ((this.fly_to.y - this._y) * (this.fly_to.y - this._y)));
if (this._prev_time == undefined) {
this._prev_time = getTimer();
}
var _local9 = getTimer() - this._prev_time;
this._prev_time = getTimer();
var _local10 = (this.speed * ((Math.PI*2) - Math.abs(_local2 * Fx.ANIM_TRAIL_ANGLE_CHANGE_COEFF_FOR_SPEED))) / (Math.PI*2);
var _local3 = (_local10 * _local9) / 1000;
this._x = this._x + (Math.cos(this.direct) * _local3);
this._y = this._y + (Math.sin(this.direct) * _local3);
this.fly_distance = this.fly_distance + _local3;
this.trail_distance = this.trail_distance + _local3;
this.ang_change_summ = this.ang_change_summ + Math.abs(_local2);
if (this.trail_distance > Fx.ANIM_TRAIL_TRAIL_EACH_DISTANCE) {
this.trail_distance = this.trail_distance - Fx.ANIM_TRAIL_TRAIL_EACH_DISTANCE;
var _local6 = MovieClip(this)._parent.getNextHighestDepth();
var _local4 = MovieClip(this)._parent.attachMovie(this.trail_mc_name, this.trail_mc_name + _local6, _local6);
_local4._x = this._x - (Math.cos(this.direct) * Fx.ANIM_TRAIL_TRAIL_DIST_DELAY);
_local4._y = this._y - (Math.sin(this.direct) * Fx.ANIM_TRAIL_TRAIL_DIST_DELAY);
var _local12 = _local4._x + (Math.cos(this.direct) * _local3);
var _local11 = _local4._y + (Math.sin(this.direct) * _local3);
com.mosesSupposes.fuse.ZigoEngine.doTween(_local4, "_alpha,_x,_y", [0, _local12, _local11], Fx.ANIM_TRAIL_TRAIL_LIFE_TIME, mx.transitions.easing.None.easeNone, 0, {scope:Fx, func:"RemoveMeCallback", args:_local4});
}
var _local5 = Math.sqrt(((this.fly_to.x - this._x) * (this.fly_to.x - this._x)) + ((this.fly_to.y - this._y) * (this.fly_to.y - this._y)));
if (((_local5 > _local7) && (_local5 < (_local3 * 2.5))) || (this.ang_change_summ > 30)) {
this.finish_phase = 1;
}
};
}
static function CreateGrowUp(parentmc, fly_from, mc_name, count_multiply) {
var _local11 = ANIM_GROW_PIECES + ((ANIM_GROW_PIECES * count_multiply) / 2);
var _local4 = 0;
while (_local4 < _local11) {
var _local2 = parentmc.getNextHighestDepth();
var _local1 = parentmc.attachMovie(mc_name, mc_name + _local2, _local2);
_local1._x = fly_from.x + (ANIM_GROW_WIDTH * (Math.random() - 0.5));
_local1._y = fly_from.y + (ANIM_GROW_HEIGHT * (Math.random() - 0.5));
_local1._xscale = (_local1._yscale = ANIM_GROW_PIECE_SIZE_FROM + ((ANIM_GROW_PIECE_SIZE_TO - ANIM_GROW_PIECE_SIZE_FROM) * Math.random()));
_local1.speed = ANIM_GROW_MIN_SPEED + (ANIM_GROW_SPEED_DELTA * Math.random());
var _local3 = ANIM_GROW_LIFETIME_FROM + (ANIM_GROW_LIFETIME_DELTA * Math.random());
com.mosesSupposes.fuse.ZigoEngine.doTween(_local1, "_y,_alpha", [_local1._y - _local1.speed, 0], _local3, mx.transitions.easing.Regular.easeIn, 0, {scope:Fx, func:"RemoveMeCallback", args:_local1});
com.mosesSupposes.fuse.ZigoEngine.doTween(_local1, "_x", _local1._x + (10 * ((Math.random() > 0.5) ? 1 : -1)), _local3, mx.transitions.easing.Elastic.easeIn, 0);
_local4++;
}
}
static function CreateParticlesEmmiterUp(parentmc, fly_from, mc_name) {
var _local4 = parentmc.getNextHighestDepth();
var _local2 = parentmc.createEmptyMovieClip("particlesEmmiterUp" + _local4, _local4);
_local2._x = fly_from.x;
_local2._y = fly_from.y;
_local2.EmmitCounter = 0;
_local2.ParticleMCName = mc_name;
_local2.onEnterFrame = function () {
if (this.EmmitCounter >= Fx.EMIT_EACH_FRAME) {
var _local3 = MovieClip(this).getNextHighestDepth();
var _local2 = MovieClip(this).attachMovie(this.ParticleMCName, this.ParticleMCName + _local3, _local3);
_local2._y = 0;
_local2._x = ((-Fx.EMIT_WIDTH) / 2) + (Math.random() * Fx.EMIT_WIDTH);
var _local5 = Fx.EMIT_LIFE_TIME + (Math.random() * Fx.EMIT_LIFE_TIME_DELTA);
var _local4 = _local2._y - (Fx.EMIT_GROW_UP_FROM + (Math.random() * Fx.EMIT_GROW_UP_DELTA));
com.mosesSupposes.fuse.ZigoEngine.doTween(_local2, "_y,_alpha", [_local4, 0], _local5, mx.transitions.easing.Regular.easeIn, 0, {scope:Fx, func:"RemoveMeCallback", args:_local2});
this.EmmitCounter = 0;
}
this.EmmitCounter++;
};
_local2.Terminate = function () {
this.removeMovieClip();
this=undefined;//parameter overwritten
};
return(_local2);
}
static function PlayAppearAnimation(target) {
var _local1 = new com.mosesSupposes.fuse.Fuse();
_local1.__set__target(target);
_local1.push({delay:0.25});
_local1.push({label:"appear", start_alpha:0, time:2.3, ease:"easeOutBack", trigger:0.5});
_local1.push({alpha:10, scale:104, ease:"easeInOutQuad", cycles:2, time:0.5, delay:0.1});
_local1.push({alpha:100, time:0.1});
_local1.start(true);
}
static function RemoveMeCallback(mc) {
mc.removeMovieClip();
mc = undefined;
}
static var ANIM_TRAIL_START_DIRECT_X = 2;
static var ANIM_TRAIL_START_DIRECT_Y = -20;
static var ANIM_TRAIL_START_SPEED = 350;
static var ANIM_TRAIL_TRAIL_EACH_DISTANCE = 35;
static var ANIM_TRAIL_TRAIL_DIST_DELAY = 35;
static var ANIM_TRAIL_TRAIL_LIFE_TIME = 0.4;
static var ANIM_TRAIL_ANGLE_CHANGE_COEFF = 0.14;
static var ANIM_TRAIL_ANGLE_CHANGE_COEFF_FOR_SPEED = 1;
static var ANIM_GROW_PIECES = 4;
static var ANIM_GROW_PIECE_SIZE_FROM = 60;
static var ANIM_GROW_PIECE_SIZE_TO = 100;
static var ANIM_GROW_WIDTH = 50;
static var ANIM_GROW_HEIGHT = 20;
static var ANIM_GROW_SPEED_DELTA = 15;
static var ANIM_GROW_MIN_SPEED = 22;
static var ANIM_GROW_LIFETIME_FROM = 0.4;
static var ANIM_GROW_LIFETIME_DELTA = 0.5;
static var EMIT_EACH_FRAME = 1;
static var EMIT_WIDTH = 30;
static var EMIT_GROW_UP_FROM = 10;
static var EMIT_GROW_UP_DELTA = 10;
static var EMIT_LIFE_TIME = 1;
static var EMIT_LIFE_TIME_DELTA = 1;
}
Symbol 1377 MovieClip [__Packages.com.mosesSupposes.fuse.FuseKitCommon] Frame 0
class com.mosesSupposes.fuse.FuseKitCommon
{
static var logOutput;
function FuseKitCommon () {
}
static function _cts() {
return("|_tint|_tintPercent|_brightness|_brightOffset|_contrast|_invertColor|_colorReset|_colorTransform|");
}
static function _resetTo100() {
return("|_alpha|_contrast|_invertColor|_tintPercent|_xscale|_yscale|_scale|");
}
static function _resetTo0() {
return("|_brightness|_brightOffset|_colorReset|_rotation|");
}
static function _underscoreable() {
return(_cts() + "_frame|_x|_y|_xscale|_yscale|_scale|_width|_height|_size|_rotation|_alpha|_fade|_visible|");
}
static function _cbprops() {
return("|skipLevel|cycles|roundResults|extra1|extra2|func|scope|args|startfunc|startscope|startargs|updfunc|updscope|updargs|");
}
static function _fuseEvents() {
return("|onStart|onStop|onPause|onResume|onAdvance|onComplete|");
}
static function _fuseprops() {
return("|command|label|delay|event|eventparams|target|addTarget|trigger|startAt|ease|easing|seconds|duration|time|");
}
static function _validateFuseCommand(c, inGroup, hasArg, outputLevel, simple) {
var _local1 = false;
var _local2 = false;
switch (c) {
case "start" :
case "stop" :
case "pause" :
case "resume" :
case "setStartProps" :
if (inGroup != true) {
_local1 = true;
}
break;
case "delay" :
case "trigger" :
if (simple == true) {
if (hasArg == true) {
_local1 = true;
}
} else {
_local2 = true;
}
inGroup = false;
break;
case "skipTo" :
if (!((hasArg == true) && (inGroup != true))) {
break;
}
_local1 = true;
}
if ((outputLevel > 0) && (_local1 == false)) {
error("109", c, inGroup, _local2);
}
return(_local1);
}
static function output(s) {
if (typeof(logOutput) == "function") {
logOutput(s);
} else {
trace(s);
}
}
static function error(errorCode) {
var _local3 = arguments[1];
var _local4 = arguments[2];
var _local6 = arguments[3];
if (VERBOSE != true) {
output(("[FuseKitCommon#" + errorCode) + "]");
return(undefined);
}
var _local2 = "";
var _local5 = newline;
switch (errorCode) {
case "001" :
_local2 = _local2 + "** ERROR: When using simpleSetup to extend prototypes, you must pass the Shortcuts class. **";
_local2 = _local2 + (_local5 + " import com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + " ZigoEngine.simpleSetup(Shortcuts);") + _local5);
break;
case "002" :
_local2 = _local2 + "** ZigoEngine.doShortcut: shortcuts missing. Use the setup commands: import com.mosesSupposes.fuse.*; ZigoEngine.register(Shortcuts); **";
break;
case "003" :
_local2 = _local2 + ((_local5 + "*** Error: DO NOT use #include \"lmc_tween.as\" with this version of ZigoEngine! ***") + _local5);
break;
case "004" :
_local2 = _local2 + (("** ZigoEngine.doTween - too few arguments [" + _local3) + "].");
if (Boolean(_local4) == true) {
_local2 = _local2 + " If you are trying to use Object Syntax without Fuse, pass FuseItem in your register() or simpleSetup() call. **";
} else {
_local2 = _local2 + " Object syntax call failed. **";
}
break;
case "005" :
_local2 = _local2 + (((("** ZigoEngine.doTween - missing targets[" + _local3) + "] and/or props[") + _local4) + "] **");
break;
case "006" :
_local2 = _local2 + (("** Error: easing shortcut string not recognized (\"" + _local3) + "\"). You may need to pass the in PennerEasing class during register or simpleSetup. **");
break;
case "007" :
_local2 = _local2 + (((("- ZigoEngine: Target locked [" + _local3) + "], ignoring tween call [") + _local4) + "]");
break;
case "008" :
_local2 = _local2 + "** You must register the Shortcuts class in order to use easy string-type callback parsing. **";
break;
case "009" :
_local2 = _local2 + (("** ZigoEngine: A callback parameter \"" + _local3) + "\" was not recognized. **");
break;
case "010" :
_local2 = _local2 + ((((("** " + ((_local3 == true) ? "ZigoEngine" : "FuseItem")) + " unable to parse ") + ((_local4 == 1) ? "callback[" : (String(_local4) + " callbacks["))) + _local6) + "]. Try using the syntax {scope:this, func:\"myFunction\"} **");
break;
case "011" :
_local2 = _local2 + (((("- ZigoEngine: Callbacks discarded via skipLevel 2 option [" + _local3) + "|") + _local4) + "].");
break;
case "012" :
_local2 = _local2 + (((((("- Engine set props or ignored no-change tween on: " + _local3) + ", props passed:[") + _local4) + "], endvals passed:[") + _local6) + "]");
break;
case "013" :
_local2 = _local2 + (((((("- Engine added tween on:\n\ttargets:[" + _local3) + "]\n\tprops:[") + _local4) + "]\n\tendvals:[") + _local6) + "]");
break;
case "014" :
_local2 = _local2 + "** Error: easing function passed is not usable with this engine. Functions need to follow the Robert Penner model. **";
break;
case "015" :
_local2 = _local2 + "** Error: The CustomEasing class must be passed during setup (register or simpleSetup) to use custom easing Arrays. **";
break;
case "016" :
_local2 = _local2 + (("[ ZigoEngine.TIME_MULTIPLIER: " + String(Number(Number(_local3) * 100))) + "% ]");
break;
case "101" :
_local2 = _local2 + "** ERROR: Fuse simpleSetup was removed in version 2.0! **";
_local2 = _local2 + (_local5 + " You must now use the following commands:");
_local2 = _local2 + ((_local5 + _local5) + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + (_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);");
_local2 = _local2 + ((_local5 + "Note that PennerEasing is optional, and FuseFMP is also accepted. (FuseFMP.simpleSetup is run automatically if included.)") + _local5);
break;
case "102" :
_local2 = _local2 + (((("** Fuse " + _local3) + " index or label not found (") + _local4) + ") or out of range. **");
break;
case "103" :
_local2 = _local2 + (((("** Fuse skipTo (" + _local3) + ") ignored - targets the current index (") + _local4) + "). **");
break;
case "104" :
_local2 = _local2 + (("** Fuse fastForward index out of play range (" + _local3) + ") - skipTo has been called instead. **");
break;
case "105" :
_local2 = _local2 + "** An unsupported Array method was called on Fuse. **";
break;
case "106" :
_local2 = _local2 + "** ERROR: You have not set up Fuse correctly. **";
_local2 = _local2 + (_local5 + "You must now use the following commands (PennerEasing is optional).");
_local2 = _local2 + (_local5 + "\timport com.mosesSupposes.fuse.*;");
_local2 = _local2 + ((_local5 + "\tZigoEngine.simpleSetup(Shortcuts, PennerEasing, Fuse);") + _local5);
break;
case "107" :
_local2 = _local2 + "** Fuse :: id not found - Aborting open(). **";
break;
case "108" :
_local2 = _local2 + "** Fuse.startRecent: No recent Fuse found to start! **";
break;
case "109" :
_local2 = _local2 + (("** Command \"" + _local3) + "\" discarded. ");
if (_local4 == true) {
_local2 = _local2 + "Not allowed within a group. **";
} else if (_local6 == true) {
_local2 = _local2 + (("Not supported in Object Syntax, use the " + _local3) + " property instead. **");
} else {
_local2 = _local2 + "The command may be unrecognized or missing an argument. **";
}
break;
case "110" :
_local2 = _local2 + (((("** " + _local3) + " illegal Fuse property discarded:\"") + _local4) + "\". Bezier keywords other than x and y cannot be set as start values. **");
break;
case "112" :
_local2 = _local2 + "** Fuse: missing com.mosesSupposes.fuse.ZigoEngine! Cannot tween. **";
break;
case "113" :
_local2 = _local2 + "** FuseItem: A callback has been discarded. Actions with a command may only contain: label, delay, scope, args. **";
break;
case "115" :
_local2 = _local2 + ((_local3 + " overlapping prop discarded: ") + _local4);
break;
case "116" :
_local2 = _local2 + ("** FuseItem Error: Delays within groups (arrays) and start/update callbacks are not supported when using Fuse without ZigoEngine. Although you need to restructure your Fuse, it should be possible to achieve the same results. **" + _local5);
break;
case "117" :
_local2 = _local2 + (("** " + _local3) + ": infinite cycles are not allowed within Fuses - discarded. **");
break;
case "118" :
_local2 = _local2 + ((("** " + _local3) + ": No targets found!") + ((_local4 == true) ? " [Unable to set start props] **" : " [Skipping tween parameters in this action] **"));
break;
case "119" :
_local2 = _local2 + ((((("** " + _local3) + ": ") + ((_local4 == 1) ? "" : (_local4 + " actions in the group"))) + " missing targets") + ((_local6 == true) ? " during setStartProps **" : " **"));
break;
case "120" :
_local2 = _local2 + (((("** " + _local3) + ": conflict with \"") + _local4) + "\". Property might be doubled within a grouped-action array. **");
break;
case "121" :
_local2 = _local2 + "** Fuse timecode formatting requires \"00:\" formatting (example:\"01:01:33\" yields 61.33 seconds.) **";
break;
case "122" :
_local2 = _local2 + (("** Event \"" + _local3) + "\" reserved by Fuse. **");
break;
case "123" :
_local2 = _local2 + (("** A Fuse event parameter failed in " + _local3) + " **");
break;
case "124" :
_local2 = _local2 + (((("** " + _local3) + ": trigger:") + _local4) + " ignored - only one trigger is allowed per action **");
break;
case "125" :
_local2 = _local2 + (_local3 + " Warning - fastForward hit an item during its tween cycle, may malfunction.");
break;
case "201" :
_local2 = _local2 + (("**** FuseFMP cannot initialize argument " + _local3) + " (BitmapFilters cannot be applied to this object type) ****");
break;
case "202" :
_local2 = _local2 + (((("** FuseFMP error: A " + _local3) + " could not be created for ") + _local4) + " **");
break;
case "203" :
_local2 = _local2 + (("** FuseFMP.setFilterProps - too few arguments passed (" + _local3) + ") - minimum 2 required. **");
break;
case "204" :
_local2 = _local2 + (("** FuseFMP.setFilterProps could not locate the filter passed. (" + _local3) + ") **");
}
output(_local2);
}
static function parseCallback(callback, targets, outputLevel, callerIsEngine, addprefix) {
if (callback._vcb == true) {
return(callback);
}
var validCBs = {_vcb:true, skipLevel:_global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL, cycles:1};
if (callback == undefined) {
return(validCBs);
}
var cbErrors = [];
if (typeof(callback) == "object") {
if (((callback.skipLevel != undefined) && (typeof(callback.skipLevel) == "number")) && (callback.skipLevel != _global.com.mosesSupposes.fuse.ZigoEngine.SKIP_LEVEL)) {
if ((callback.skipLevel >= 0) && (callback.skipLevel <= 2)) {
validCBs.skipLevel = callback.skipLevel;
}
}
if (callback.cycles != undefined) {
if ((typeof(callback.cycles) == "number") && (callback.cycles > -1)) {
validCBs.cycles = callback.cycles;
} else if (callback.cycles.toUpperCase() == "LOOP") {
validCBs.cycles = 0;
}
}
if (callback.extra1 != undefined) {
validCBs.extra1 = callback.extra1;
}
if (callback.extra2 != undefined) {
validCBs.extra2 = callback.extra2;
}
if ((callback.roundResults === true) || (callback.roundResults === false)) {
validCBs.roundResults = callback.roundResults;
}
} else {
callback = {func:callback};
}
var prefixes = ["start", "upd", ""];
var easyfuncparse = _global.com.mosesSupposes.fuse.Shortcuts.parseStringTypeCallback;
for (var i in prefixes) {
var prefix = prefixes[i];
var fstr = callback[prefix + "func"];
if (((fstr != undefined) && (typeof(fstr) == "string")) && (fstr.indexOf("(") > -1)) {
if (easyfuncparse != undefined) {
var efc = easyfuncparse(fstr);
if (efc.func != undefined) {
callback[prefix + "scope"] = efc.scope;
callback[prefix + "func"] = efc.func;
callback[prefix + "args"] = efc.args;
}
} else if (outputLevel > 0) {
error("008");
}
}
}
var basescope = callback.scope;
for (var i in callback) {
var fi = i.toLowerCase().indexOf("func");
if (fi > -1) {
var prefix = i.slice(0, fi);
var func = callback[i];
var args = callback[prefix + "args"];
var scope = ((callback[prefix + "scope"] == undefined) ? (basescope) : (callback[prefix + "scope"]));
if ((typeof(func) == "string") && (scope[func] == undefined)) {
for (var j in targets) {
var targ = targets[j];
if (typeof(targ[func]) == "function") {
scope = targ;
break;
}
if (typeof(targ._parent[func]) == "function") {
scope = targ._parent;
break;
}
}
if ((scope == undefined) && (_level0[func] != undefined)) {
scope = _level0;
}
if ((scope == undefined) && (_global[func] != undefined)) {
scope = _global;
}
}
if (typeof(func) != "function") {
if (typeof(scope[String(func)]) == "function") {
func = scope[String(func)];
} else {
func = eval (String(func));
}
}
if (func == undefined) {
cbErrors.push(String((((((((addprefix == null) ? (i) : (addprefix + i)) + ":") + ((typeof(callback[i]) == "string") ? (("\"" + callback[i]) + "\"") : (callback[i]))) + "/") + prefix) + "scope:") + scope));
} else {
if ((args != undefined) && (!(args instanceof Array))) {
args = [args];
}
if (prefix == "") {
prefix = "end";
}
validCBs[prefix] = {s:scope, f:func, a:args};
if (callerIsEngine == true) {
validCBs[prefix].id = ++cbTicker;
}
if (prefix == "start") {
validCBs.start.fired = false;
}
}
} else if (_cbprops().indexOf(("|" + i) + "|") == -1) {
error("009", i);
}
}
if ((cbErrors.length > 0) && (outputLevel > 0)) {
if (outputLevel > 0) {
error("010", callerIsEngine, cbErrors.length, cbErrors.toString());
}
}
return(validCBs);
}
static var VERSION = "Fuse Kit 2.1.3r1 Copyright (c) 2006 Moses Gunesch, MosesSupposes.com under MIT Open Source License";
static var VERBOSE = true;
static var ALL = "ALL";
static var ALLCOLOR = "ALLCOLOR";
static var cbTicker = 0;
}
Symbol 1378 MovieClip [__Packages.com.mosesSupposes.fuse.ZigoEngine] Frame 0
class com.mosesSupposes.fuse.ZigoEngine
{
static var extensions, updateTime, tweenHolder, instance, _listeners, broadcastMessage, updateIntId;
function ZigoEngine () {
}
static function addListener(handler) {
AsBroadcaster.initialize(com.mosesSupposes.fuse.ZigoEngine);
addListener(handler);
}
static function removeListener(handler) {
}
static function isPlaying() {
return(_playing);
}
static function simpleSetup(shortcutsClass) {
if (arguments.length > 0) {
register.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
}
_global.ZigoEngine = com.mosesSupposes.fuse.ZigoEngine;
if (extensions.fuse != undefined) {
_global.Fuse = extensions.fuse;
}
if (extensions.fuseFMP != undefined) {
extensions.fuseFMP.simpleSetup();
}
initialize(MovieClip.prototype, Button.prototype, TextField.prototype);
if (extensions.shortcuts == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("001");
}
}
static function register(classReference) {
if (extensions == undefined) {
extensions = {};
}
var _local3 = "|fuse|fuseItem|fuseFMP|shortcuts|pennerEasing|customEasing|";
for (var _local4 in arguments) {
var _local2 = arguments[_local4].registryKey;
if ((extensions[_local2] == undefined) && (_local3.indexOf(("|" + _local2) + "|") > -1)) {
extensions[_local2] = arguments[_local4];
if ((_local2 == "fuseFMP") || (_local2 == "shortcuts")) {
Object(extensions[_local2]).initialize();
}
}
}
}
static function initialize(target) {
if (arguments.length > 0) {
initializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.addShortcutsTo.apply(extensions.shortcuts, arguments);
}
}
}
static function deinitialize(target) {
if ((arguments.length == 0) || (target == null)) {
arguments.push(MovieClip.prototype, Button.prototype, TextField.prototype);
}
deinitializeTargets.apply(com.mosesSupposes.fuse.ZigoEngine, arguments);
if (extensions.shortcuts != undefined) {
extensions.shortcuts.removeShortcutsFrom.apply(extensions.shortcuts, arguments);
}
}
static function getUpdateInterval() {
return(updateTime);
}
static function setUpdateInterval(time) {
if (_playing) {
setup(true);
updateTime = time;
setup();
} else {
updateTime = time;
}
}
static function getControllerDepth() {
return(tweenHolder.getDepth());
}
static function setControllerDepth(depth) {
if ((depth == null) || (_global.isNaN(depth) == true)) {
depth = 6789;
}
if (Object(tweenHolder).proof != null) {
tweenHolder.swapDepths(depth);
} else {
tweenHolder = _root.createEmptyMovieClip("ZigoEnginePulse", depth);
}
}
static function doShortcut(targets, methodName) {
if (extensions.shortcuts == undefined) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("002");
}
return(null);
}
return(extensions.shortcuts.doShortcut.apply(extensions.shortcuts, arguments));
}
static function doTween(targets, props, endvals, seconds, ease, delay, callback) {
if (extensions.fuse.addBuildItem(arguments) == true) {
return(null);
}
if (TIME_MULTIPLIER != prevTimeMult) {
TIME_MULTIPLIER = Math.abs(TIME_MULTIPLIER);
if (_global.isNaN(TIME_MULTIPLIER) == true) {
TIME_MULTIPLIER = 1;
}
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("016", TIME_MULTIPLIER);
}
prevTimeMult = TIME_MULTIPLIER;
}
if ((instance == undefined) || ((Object(tweenHolder).proof == undefined) && (updateTime == undefined))) {
if ((MovieClip.prototype.tween != null) && (typeof(_global.$tweenManager) == "object")) {
com.mosesSupposes.fuse.FuseKitCommon.error("003");
}
instance = new com.mosesSupposes.fuse.ZManager();
_playing = false;
}
var _local4 = instance.paramsObj(targets, props, endvals, true);
var _local7 = (((_local4.tg[0] == null) || (_local4.tg.length == 0)) ? undefined : (_local4.tg));
if (((_local4.pa == undefined) || (_local7 == undefined)) || (arguments.length < 3)) {
if (((extensions.fuseItem != null) && (arguments.length == 1)) && (typeof(arguments[0]) == "object")) {
return(extensions.fuseItem.doTween(arguments[0]));
}
if (OUTPUT_LEVEL > 0) {
if (arguments.length < 3) {
com.mosesSupposes.fuse.FuseKitCommon.error("004", (((arguments.length == 1) && (arguments[0] == null)) ? "1 (null)" : (String(arguments.length))), Boolean(extensions.fuseItem == null));
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("005", _local7.toString(), _local4.pa.toString());
}
}
return(null);
}
if (_playing != true) {
setup();
}
if ((seconds == null) || (_global.isNaN(seconds) == true)) {
seconds = DURATION || 1;
} else if (seconds < 0.01) {
seconds = 0;
}
seconds = seconds * TIME_MULTIPLIER;
if (((delay < 0.01) || (delay == null)) || (_global.isNaN(delay) == true)) {
delay = 0;
}
delay = delay * TIME_MULTIPLIER;
var _local12 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(callback, _local7, OUTPUT_LEVEL, true);
var _local9;
if (typeof(ease) == "function") {
if (typeof(Function(ease).call(null, 1, 1, 1, 1)) == "number") {
_local9 = Function(ease);
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("014", ease);
}
} else if ((ease == null) || (ease == "")) {
if (EASING instanceof Function) {
_local9 = Function(EASING);
} else if (extensions.pennerEasing != undefined) {
ease = EASING;
}
}
if ((typeof(ease) == "string") && (ease != "")) {
if (extensions.pennerEasing[ease] != undefined) {
_local9 = extensions.pennerEasing[ease];
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("006", ease);
}
} else if (ease instanceof Array) {
if (extensions.customEasing != undefined) {
_local12.extra1 = ease;
if (typeof(ease[0]) == "number") {
_local9 = extensions.customEasing.precalced;
} else {
_local9 = extensions.customEasing.fromCurve;
}
} else if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("015", ease);
}
}
if (typeof(_local9) != "function") {
_local9 = function (t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
};
}
if (_listeners.length > 0) {
broadcastMessage.call(com.mosesSupposes.fuse.ZigoEngine, "onTweenAdd", _local7, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
}
var _local6 = "";
for (var _local13 in _local7) {
var _local3 = _local7[_local13];
if (_local3.__zigoID__ == null) {
initializeTargets(_local3);
} else if (instance.getStatus("locked", _local3) == true) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("007", ((_local3._name != undefined) ? (_local3._name) : (_local3.toString())), _local4.pa.toString());
}
continue;
}
var _local5 = instance.addTween(_local3, _local4.pa, _local4.va, seconds, _local9, delay, _local12);
_local6 = ((_local5 == null) ? "|" : (_local5 + "|")) + _local6;
}
_local6 = _local6.slice(0, -1);
return((((_local6 == "") || (_local6 == "|")) ? null : (_local6)));
}
static function removeTween(targs, props) {
instance.removeTween(targs, props);
}
static function isTweening(targ, prop) {
return(Boolean(instance.getStatus("active", targ, prop)));
}
static function getTweens(targ) {
if (instance == undefined) {
return(0);
}
return(Number(instance.getStatus("count", targ)));
}
static function lockTween(targ, setLocked) {
instance.alterTweens("lock", targ, setLocked == true);
}
static function isTweenLocked(targ) {
return(Boolean(instance.getStatus("locked", targ)));
}
static function ffTween(targs, props, suppressEndEvents) {
instance.alterTweens("ff", targs, props, null, suppressEndEvents);
}
static function skipTweenTo(seconds, targs, props) {
instance.alterTweens("skipTo", targs, props, false, false, seconds);
}
static function rewTween(targs, props, pauseFlag, suppressStartEvents) {
instance.alterTweens("rewind", targs, props, pauseFlag, suppressStartEvents);
}
static function isTweenPaused(targ, prop) {
return(Boolean(instance.getStatus("paused", targ, prop)));
}
static function pauseTween(targs, props) {
instance.alterTweens("pause", targs, props);
}
static function unpauseTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function resumeTween(targs, props) {
instance.alterTweens("unpause", targs, props);
}
static function setColorByKey(targetObj, type, amt, rgb) {
new Color(targetObj).setTransform(getColorTransObj(type, amt, rgb));
}
static function getColorTransObj(type, amt, rgb) {
switch (type) {
case "brightness" :
var _local3 = 100 - Math.abs(amt);
var _local4 = ((amt > 0) ? (255 * (amt / 100)) : 0);
return({ra:_local3, rb:_local4, ga:_local3, gb:_local4, ba:_local3, bb:_local4});
case "brightOffset" :
return({ra:100, rb:255 * (amt / 100), ga:100, gb:255 * (amt / 100), ba:100, bb:255 * (amt / 100)});
case "contrast" :
return({ra:amt, rb:128 - (1.28 * amt), ga:amt, gb:128 - (1.28 * amt), ba:amt, bb:128 - (1.28 * amt)});
case "invertColor" :
return({ra:100 - (2 * amt), rb:amt * 2.55, ga:100 - (2 * amt), gb:amt * 2.55, ba:100 - (2 * amt), bb:amt * 2.55});
case "tint" :
if (rgb == null) {
break;
}
var _local5;
if (typeof(rgb) == "string") {
if (rgb.charAt(0) == "#") {
rgb = rgb.slice(1);
}
rgb = ((rgb.charAt(1).toLowerCase() != "x") ? ("0x" + rgb) : (rgb));
}
_local5 = Number(rgb);
return({ra:100 - amt, rb:(_local5 >> 16) * (amt / 100), ga:100 - amt, gb:((_local5 >> 8) & 255) * (amt / 100), ba:100 - amt, bb:(_local5 & 255) * (amt / 100)});
}
return({rb:0, ra:100, gb:0, ga:100, bb:0, ba:100});
}
static function getColorKeysObj(targOrTransObj) {
var _local1 = ((targOrTransObj.ra != undefined) ? (targOrTransObj) : (new Color(targOrTransObj).getTransform()));
var _local6 = (_local1.ra == _local1.ga) && (_local1.ga == _local1.ba);
var _local8 = (_local1.rb == _local1.gb) && (_local1.gb == _local1.bb);
var _local3 = {tintPercent:Number(((_local6 == true) ? (100 - _local1.ra) : 0))};
if (_local3.tintPercent != 0) {
var _local5 = 100 / _local3.tintPercent;
_local3.tint = (((_local1.rb * _local5) << 16) | ((_local1.gb * _local5) << 8)) | (_local1.bb * _local5);
var _local2 = _local3.tint.toString(16);
var _local4 = 6 - _local2.length;
while ((_local4--) > 0) {
_local2 = "0" + _local2;
}
_local3.tintString = "0x" + _local2.toUpperCase();
}
if ((_local6 == true) && (_local8 == true)) {
if (_local1.ra < 0) {
_local3.invertColor = _local1.rb * 0.392156862745098;
} else if ((_local1.ra == 100) && (_local1.rb != 0)) {
_local3.brightOffset = _local1.rb * 0.392156862745098;
}
if (_local1.ra != 100) {
if ((_local1.rb == 0) || ((_local1.rb != 0) && (((255 * ((100 - _local1.ra) / 100)) - _local1.rb) <= 1))) {
_local3.brightness = ((_local1.rb != 0) ? (100 - _local1.ra) : (_local1.ra - 100));
}
if (((128 - (1.28 * _local1.ra)) - _local1.rb) <= 1) {
_local3.contrast = _local1.ra;
}
}
}
return(_local3);
}
static function initializeTargets() {
for (var _local5 in arguments) {
var _local4 = arguments[_local5];
if ((((_local4 == MovieClip.prototype) || (_local4 == Button.prototype)) || (_local4 == TextField.prototype)) || (_local4 == Object.prototype)) {
if (_local4.oldAddListener == undefined) {
if (_local4 == TextField.prototype) {
_local4.oldAddListener = _local4.addListener;
_global.ASSetPropFlags(_local4, "oldAddListener", 7, 1);
}
_local4.addListener = function (o) {
if (this.__zigoID__ == undefined) {
com.mosesSupposes.fuse.ZigoEngine.initializeTargets(this);
}
if (this instanceof TextField) {
Function(this.oldAddListener).call(this, o);
} else {
this.addListener(o);
}
};
if (_local4 == MovieClip.prototype) {
_global.ASSetPropFlags(_local4, "addListener", 7, 1);
}
}
} else if (_local4.__zigoID__ == undefined) {
_local4.__zigoID__ = zigoIDs;
_global.ASSetPropFlags(_local4, "__zigoID__", 7, 1);
zigoIDs++;
if ((_local4._listeners == null) || (_local4.addListener == null)) {
AsBroadcaster.initialize(_local4);
}
}
}
}
static function deinitializeTargets() {
for (var _local4 in arguments) {
var _local3 = arguments[_local4];
if (_local3.__zigoID__ != undefined) {
_global.ASSetPropFlags(_local3, "__zigoID__,_listeners,broadcastMessage,addListener,removeListener", 0, 2);
delete _local3.__zigoID__;
delete _local3._listeners;
delete _local3.broadcastMessage;
delete _local3.addListener;
delete _local3.removeListener;
}
if (_local3.oldAddListener != undefined) {
_global.ASSetPropFlags(_local3, "oldAddListener", 0, 2);
_local3.addListener = _local3.oldAddListener;
delete _local3.oldAddListener;
}
}
}
static function __mgrRelay(inst, method, args) {
if (inst == instance) {
Function(com.mosesSupposes.fuse.ZigoEngine[method]).apply(com.mosesSupposes.fuse.ZigoEngine, args);
}
}
static function setup(deinitFlag) {
if (deinitFlag == true) {
_playing = false;
clearInterval(updateIntId);
delete tweenHolder.onEnterFrame;
return(undefined);
}
instance.cleanUp();
clearInterval(updateIntId);
delete updateIntId;
if ((updateTime != null) && (updateTime > 0)) {
updateIntId = setInterval(instance, "update", updateTime);
} else {
if (Object(tweenHolder).proof == null) {
setControllerDepth(6789);
Object(tweenHolder).proof = 1;
}
var _inst = instance;
tweenHolder.onEnterFrame = function () {
_inst.update.call(_inst);
};
}
_playing = true;
instance.now = getTimer();
}
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION + ", ZigoEngine based on concepts by L.Zigo";
static var EASING = "easeOutQuint";
static var DURATION = 1;
static var TIME_MULTIPLIER = 1;
static var ROUND_RESULTS = false;
static var OUTPUT_LEVEL = 1;
static var AUTOSTOP = false;
static var SKIP_LEVEL = 0;
static var _playing = false;
static var zigoIDs = 0;
static var prevTimeMult = 1;
}
Symbol 1379 MovieClip [__Packages.com.mosesSupposes.fuse.ZManager] Frame 0
class com.mosesSupposes.fuse.ZManager
{
var tweens, now;
function ZManager () {
tweens = {};
numTweens = 0;
}
function addTween(obj, props, endvals, seconds, ease, delay, callback) {
var _local24 = ((callback.skipLevel == undefined) ? 0 : (callback.skipLevel));
var _local44 = ((callback.cycles == undefined) ? 1 : (callback.cycles));
var _local30 = callback.extra1;
var _local29 = callback.extra2;
var _local23 = [];
var _local14 = _global.com.mosesSupposes.fuse.FuseFMP;
var _local43 = String(("|" + _local14.getAllShortcuts().join("|")) + "|");
var _local42 = com.mosesSupposes.fuse.FuseKitCommon._cts();
var _local25 = "";
var _local28 = "";
var _local22 = obj.__zigoID__;
var _local7 = tweens[String(_local22)];
if ((_local7 != undefined) && (com.mosesSupposes.fuse.ZigoEngine.AUTOSTOP == true)) {
if (obj._listeners.length > 0) {
for (var _local40 in _local7.props) {
_local23.unshift(_local40);
}
}
_local7.numProps = 0;
cleanUp(true);
}
for (var _local47 in props) {
var _local5 = props[_local47];
var _local4 = endvals[_local47];
var _local15 = 0;
if (_local5 == "_fade") {
_local5 = "_alpha";
_local15 = ((_local4 < 50) ? -1 : 1);
}
var _local16 = _local42.indexOf(("|" + _local5) + "|") > -1;
var _local18 = _local7.colorProp;
if (_local7 != undefined) {
if ((_local16 == true) && (_local18 != undefined)) {
_local23.unshift(_local18);
delete _local7.props[_local18];
delete _local7.colorProp;
_local7.numProps--;
} else if (_local7.props[_local5] != undefined) {
_local23.unshift(_local5);
delete _local7[_local5];
_local7.numProps--;
}
}
var _local3 = {c:-1, fmp:-1, complex:-1};
var _local11 = ((_local24 == 0) && ((seconds + delay) == 0)) || ((_local24 > 0) && (seconds == 0));
var _local10 = false;
var _local13 = (_local14 != undefined) && (_local43.indexOf(("|" + _local5) + "|") > -1);
var _local19 = (_local5.toLowerCase().indexOf("colors") > -1) && (_local4 instanceof Array);
var _local27 = ((_local13 == true) && (_local5.indexOf("lor") > -1)) && (_local5.charAt(2) != "l");
if (_local13 == true) {
_local3.fmp = _local14;
_local3.ps = _local14.getFilterProp(obj, _local5, true);
_local3.special = true;
}
if (((_local16 == true) || (_local19 == true)) || (_local27 && (_local11 == false))) {
_local3.complex = 1;
if (_local16 == true) {
_local3.c = new Color(obj);
_local3.ps = Color(_local3.c).getTransform();
var _local17 = ((((_local5 == "_tint") || (_local5 == "_tintPercent")) || (_local5 == "_colorReset")) ? "tint" : (_local5.slice(1)));
var _local9 = null;
var _local12 = null;
if (_local5 != "_colorTransform") {
if (_local17 == "tint") {
if (typeof(_local4) == "object") {
_local12 = _local4.tint;
_local9 = ((_global.isNaN(_local4.percent) == true) ? 100 : (_local4.percent));
} else if ((_local5 == "_tintPercent") || (_local5 == "_colorReset")) {
var _local20 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tintPercent;
if (_local5 == "_colorReset") {
_local9 = Math.min(_local20, 100 - Math.abs(Number(_local4)));
} else {
_local9 = ((typeof(_local4) == "string") ? ((_local20 || 0) + Number(_local4)) : Number(_local4));
}
_local9 = Math.max(0, Math.min(_local9, 100));
_local12 = com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj).tint || 0;
} else {
_local12 = _local4;
_local9 = 100;
}
} else {
_local9 = ((typeof(_local4) == "string") ? ((com.mosesSupposes.fuse.ZigoEngine.getColorKeysObj(obj)[_local17] || 0) + Number(_local4)) : (_local4));
}
_local4 = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj(_local17, _local9, _local12);
}
if (_local11 == true) {
if (_local5 == "_colorTransform") {
Color(_local3.c).setTransform(_local4);
} else {
com.mosesSupposes.fuse.ZigoEngine.setColorByKey(obj, _local17, _local9, _local12);
}
} else {
var _local21 = getChangeObj(_local3.ps, _local4, false, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local11 == true) {
_local14.setFilterProp(obj, _local5, _local4);
} else if (_local19 == true) {
_local3.c = 2;
_local3.ch = [];
for (var _local40 in _local4) {
if (_local4[_local40] != null) {
if (_local3.ps == null) {
_local3.ps = [];
}
_local3.ps[_local40] = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, ((_local3.ps[_local40] == null) ? obj[_local5][_local40] : _local3.ps[_local40]));
var _local21 = getChangeObj(_local3.ps[_local40], com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4[_local40]), true, false);
_local3.ch[_local40] = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
}
} else {
_local3.c = 1;
_local3.ps = com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local3.ps);
var _local21 = getChangeObj(_local3.ps, com.mosesSupposes.fuse.ZigoEngine.getColorTransObj("tint", 100, _local4), true, false);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
}
} else if (_local5 == "_bezier_") {
removeTween(obj, "_x,_y", true);
if (_local11 == true) {
if ((_local4.x != null) && (_global.isNaN(Number(_local4.x)) == false)) {
obj._x = ((typeof(_local4.x) == "string") ? (obj._x + Number(_local4.x)) : (_local4.x));
}
if ((_local4.y != null) && (_global.isNaN(Number(_local4.y)) == false)) {
obj._y = ((typeof(_local4.y) == "string") ? (obj._y + Number(_local4.y)) : (_local4.y));
}
} else {
_local3.special = true;
_local3.ps = 0;
_local3.ch = 1;
_local3.bz = {sx:obj._x, sy:obj._y};
if ((_local4.x == null) || (_global.isNaN(Number(_local4.x)))) {
_local4.x = _local3.bz.sx;
}
if ((_local4.y == null) || (_global.isNaN(Number(_local4.y)))) {
_local4.y = _local3.bz.sy;
}
_local3.bz.chx = ((typeof(_local4.x) == "string") ? (Number(_local4.x)) : (_local4.x - _local3.bz.sx));
if (_global.isNaN(_local3.bz.chx) == true) {
_local3.bx.chx = 0;
}
_local3.bz.chy = ((typeof(_local4.y) == "string") ? (Number(_local4.y)) : (_local4.y - _local3.bz.sy));
if (_global.isNaN(_local3.bz.chy) == true) {
_local3.bx.chy = 0;
}
if ((_local4.controlX == null) || (_global.isNaN(Number(_local4.controlX)))) {
_local3.bz.ctrlx = _local3.bz.sx + (_local3.bz.chx / 2);
} else {
_local3.bz.ctrlx = ((typeof(_local4.controlX) == "string") ? (_local3.bz.sx + Number(_local4.controlX)) : (_local4.controlX));
}
if ((_local4.controlY == null) || (_global.isNaN(Number(_local4.controlY)))) {
_local3.bz.ctrly = _local3.bz.sy + (_local3.bz.chy / 2);
} else {
_local3.bz.ctrly = ((typeof(_local4.controlY) == "string") ? (_local3.bz.sy + Number(_local4.controlY)) : (_local4.controlY));
}
_local3.bz.ctrlx = _local3.bz.ctrlx - _local3.bz.sx;
_local3.bz.ctrly = _local3.bz.ctrly - _local3.bz.sy;
_local10 = (_local3.bz.chx + _local3.bz.chy) != 0;
}
} else {
if (typeof(_local4) == "object") {
_local3.complex = ((_local4 instanceof Array) ? 0 : 1);
}
if ((_local5 == "_x") || (_local5 == "_y")) {
removeTween(obj, "_bezier_", true);
}
if ((_local5 == "_frame") && (typeof(obj) == "movieclip")) {
_local3.ps = obj._currentframe;
_local3.special = true;
} else if (_local13 == false) {
if (_local3.complex > -1) {
_local3.ps = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local40 in _local4) {
_local3.ps[_local40] = obj[_local5][_local40];
}
} else {
_local3.ps = obj[_local5];
}
}
if (_local11 == true) {
if (_local13 == true) {
_local14.setFilterProp(obj, _local5, ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4)));
} else if (_local3.complex > -1) {
for (var _local40 in _local4) {
if ((_local4[_local40] != null) && (_global.isNaN(Number(_local4[_local40])) == false)) {
obj[_local5][_local40] = ((typeof(_local4[_local40]) == "string") ? (_local3.ps[_local40] + Number(_local4[_local40])) : _local4[_local40]);
if (_global.isNaN(obj[_local5][_local40]) == true) {
obj[_local5][_local40] = 0;
}
}
}
} else {
obj[_local5] = ((typeof(_local4) == "string") ? (_local3.ps + Number(_local4)) : (_local4));
if (_local15 == 1) {
obj._visible = true;
} else if (_local15 == -1) {
obj._visible = false;
}
}
} else if (_local3.complex > -1) {
var _local21 = getChangeObj(_local3.ps, _local4, _local13, _local3.complex == 0);
_local3.ch = _local21.map;
if (_local21.changed == true) {
_local10 = true;
}
} else {
if ((_local4 == null) || (_global.isNaN(Number(_local4)))) {
_local4 = _local3.ps;
}
_local3.ch = ((typeof(_local4) == "string") ? (Number(_local4)) : (Number(_local4) - _local3.ps));
if (_global.isNaN(_local3.ch) == true) {
_local3.ch = 0;
}
_local10 = _local3.ch != 0;
}
}
if (((_local24 == 0) && ((_local10 == true) || (_local11 == false))) || ((_local10 == true) && (_local11 == false))) {
if ((_local3.complex > -1) && (!(_local3.c === 2))) {
_local3.ps = [_local3.ps];
_local3.ch = [_local3.ch];
}
_local3.ts = now + (delay * 1000);
_local3.pt = -1;
_local3.d = seconds * 1000;
_local3.ef = ease;
_local3.sf = false;
_local3.cycles = _local44;
if (_local30 != undefined) {
_local3.e1 = _local30;
}
if (_local29 != undefined) {
_local3.e2 = _local29;
}
_local3.v = _local15;
if (callback.start != undefined) {
_local3.scb = callback.start;
}
if (callback.upd != undefined) {
_local3.ucb = callback.upd;
}
if (callback.end != undefined) {
_local3.ecb = callback.end;
}
if (callback.roundResults != undefined) {
_local3.rr = callback.roundResults;
}
if (tweens[String(_local22)] == undefined) {
_local7 = (tweens[String(_local22)] = {numProps:0, locked:false, targ:obj, targID:String(("\"" + ((obj._name != undefined) ? (obj._name) : (obj.toString()))) + "\""), targZID:_local22, props:{}});
numTweens++;
}
if (_local16 == true) {
_local7.colorProp = _local5;
}
_local7.props[_local5] = _local3;
_local7.numProps++;
_local25 = (_local5 + ",") + _local25;
_local28 = (((typeof(_local4) == "string") ? (("\"" + _local4) + "\"") : (_local4)) + ",") + _local28;
}
_local3 = undefined;
}
if ((_local7 == undefined) || (_local7.numProps <= 0)) {
cleanUp();
}
if ((_local23.length > 0) && (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0)) {
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:obj, props:_local23, __zigoID__:_local22, during:"add"});
}
if (_local25 == "") {
if (_local24 == 2) {
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("011", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString());
}
} else {
var _local48 = obj._listeners.length > 0;
if (_local48 == true) {
obj.broadcastMessage("onTweenStart", {target:obj, props:props});
}
if (callback.start != undefined) {
callback.start.f.apply(callback.start.s, callback.start.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenUpdate", {target:obj, props:props});
}
if (callback.upd != undefined) {
callback.upd.f.apply(callback.upd.s, callback.upd.a);
}
if (_local48 == true) {
obj.broadcastMessage("onTweenEnd", {target:obj, props:props});
}
if (callback.end != undefined) {
callback.end.f.apply(callback.end.s, callback.end.a);
}
}
cleanUp();
}
if (com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL == 2) {
if (_local25 == "") {
com.mosesSupposes.fuse.FuseKitCommon.error("012", ((obj._name != undefined) ? (obj._name) : (obj.toString())), props.toString(), endvals.toString());
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("013", ((obj._name != undefined) ? (obj._name) : (obj.toString())), _local25.slice(0, -1), _local28.slice(0, -1));
}
}
return(((_local25 == "") ? null : (_local25.slice(0, -1))));
}
function removeTween(targs, props, noInit) {
var _local4 = {};
var _local12 = paramsObj(targs, props);
if (_local12.none == true) {
return(undefined);
}
var _local16 = _local12.all;
var _local17 = _local12.allprops;
var _local9 = ((_local16 == true) ? (tweens) : (Object(_local12.tg)));
var _local8 = false;
for (var _local20 in _local9) {
var _local3 = ((_local16 == true) ? (_local20) : (String(_local9[_local20].__zigoID__)));
var _local2 = tweens[_local3];
var _local6 = ((_local17 == true) ? (_local2.props) : (_local12.props));
for (var _local14 in _local6) {
var _local5 = (_local14 == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) && (_local2.colorProp != undefined);
if ((_local2.props[_local14] != undefined) || (_local5 == true)) {
if (_local4[_local3] == null) {
_local4[_local3] = [];
}
_local4[_local3].unshift(_local14);
if ((_local14 == _local2.colorProp) || (_local5 == true)) {
delete _local2.props[_local2.colorProp];
delete _local2.colorProp;
} else {
delete _local2.props[_local14];
}
_local2.numProps--;
if (_local2.numProps <= 0) {
_local8 = true;
break;
}
}
}
}
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
for (var _local19 in _local4) {
var _local7 = tweens[_local19].targ;
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local7.addProperty) == "function") ? (_local7) : (("[MISSING(\"" + tweens[_local19].targID) + "\")]")), props:_local4[_local19], __zigoID__:tweens[_local19].targZID, during:((noInit == true) ? "add" : "remove")});
}
}
if (_local8 == true) {
cleanUp(noInit);
}
}
function alterTweens(type, targs, props, pauseFlag, noEvents, skipTo) {
if (type == "lock") {
tweens[String(targs.__zigoID__)].locked = props;
return(undefined);
}
var _local11 = paramsObj(targs, props);
if (_local11.none == true) {
return(undefined);
}
var _local14 = _local11.all;
var _local15 = _local11.allprops;
var _local9 = ((_local14 == true) ? (tweens) : (Object(_local11.tg)));
var _local8 = 0;
for (var _local16 in _local9) {
var _local7 = ((_local14 == true) ? (_local16) : (String(_local9[_local16].__zigoID__)));
var _local5 = tweens[_local7];
var _local4 = ((_local15 == true) ? (_local5.props) : (_local11.props));
if (_local4.ALLCOLOR == true) {
_local4[_local5.colorProp] = true;
delete _local4.ALLCOLOR;
}
for (var _local10 in _local4) {
_local8++;
var _local2 = _local5.props[_local10];
if (type == "rewind") {
if (pauseFlag == true) {
_local2.pt = now;
}
_local2.ts = now;
if (noEvents != true) {
_local2.sf = false;
if (_local2.scb != undefined) {
_local2.scb.fired = false;
}
}
} else if (type == "ff") {
if (noEvents == true) {
_local2.suppressEnd = true;
}
_local2.o = true;
_local2.pt = -1;
_local2.ts = now - _local2.d;
} else if (type == "skipTo") {
_local2.ts = Math.min(now, (_local2.ts + (now - _local2.ts)) - (skipTo * 1000));
} else if (type == "pause") {
if (_local2.pt == -1) {
_local2.pt = now;
}
} else if (type == "unpause") {
if (_local2.pt != -1) {
_local2.ts = now - (_local2.pt - _local2.ts);
_local2.pt = -1;
}
}
}
}
if ((type == "ff") && (_local8 > 0)) {
update();
} else if ((type == "rewind") && (_local8 > 0)) {
update(true);
}
}
function getStatus(type, targ, param) {
if (targ == null) {
return(null);
}
var _local8 = String(targ).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
var _local4 = tweens[String(targ.__zigoID__)];
switch (type) {
case "paused" :
var _local2 = _local4.props;
if (param != null) {
if (_local2[String(param)] == undefined) {
return(false);
}
return(Boolean(_local2[String(param)].pt != -1));
}
for (var _local6 in _local2) {
if (_local2[_local6].pt != -1) {
return(true);
}
}
return(false);
case "active" :
if (param == null) {
return(Boolean(_local4 != undefined));
}
if (String(param).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
return(Boolean(_local4.colorProp != undefined));
}
return(Boolean(_local4.props[String(param)] != undefined));
case "count" :
if (!_local8) {
return(_local4.numProps);
}
var _local3 = 0;
for (var _local6 in tweens) {
_local3 = _local3 + tweens[_local6].numProps;
}
return(_local3);
case "locked" :
return(_local4.locked);
}
}
function update(force) {
var _local22 = {};
var _local24 = {};
var _local23 = {};
var _local15 = {};
var _local13 = {};
var _local14 = {};
var _local26 = false;
var _local20 = com.mosesSupposes.fuse.ZigoEngine.ROUND_RESULTS;
for (var _local35 in tweens) {
var _local12 = tweens[_local35];
var _local5 = _local12.targ;
var _local34 = _local12.props;
var _local21 = _local5._listeners.length > 0;
if (_local5.__zigoID__ == undefined) {
_local26 = true;
if (com.mosesSupposes.fuse.ZigoEngine._listeners.length > 0) {
var _local25 = [];
for (var _local30 in _local34) {
_local25.unshift(_local30);
}
com.mosesSupposes.fuse.ZigoEngine.broadcastMessage("onTweenInterrupt", {target:((typeof(_local5.addProperty) == "function") ? (_local5) : (("[MISSING:" + _local12.targID) + "]")), props:_local25, __zigoID__:_local12.targZID, during:"update"});
}
continue;
}
for (var _local30 in _local34) {
var _local3 = _local34[_local30];
if (((_local3.ts > now) || (_local3.pt != -1)) && (force != true)) {
continue;
}
var _local9 = now >= (_local3.ts + _local3.d);
if (_local3.complex == -1) {
var _local6;
if (_local9 == true) {
_local6 = _local3.ps + _local3.ch;
if ((_local3.cycles > 1) || (_local3.cycles == 0)) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local3.ps = _local6;
_local3.ch = -_local3.ch;
_local3.ts = now;
_local9 = false;
}
} else {
_local6 = _local3.ef(now - _local3.ts, _local3.ps, _local3.ch, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local6) == false) {
if ((_local30 != "_bezier_") && ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false))))) {
_local6 = Math.round(Number(_local6));
}
if (_local3.special != true) {
_local5[_local30] = _local6;
} else if (_local3.fmp != -1) {
_local3.fmp.setFilterProp(_local5, _local30, _local6);
} else if (_local30 == "_bezier_") {
var _local10 = _local3.bz;
var _local18 = _local10.sx + (_local6 * (((2 * (1 - _local6)) * _local10.ctrlx) + (_local6 * _local10.chx)));
var _local17 = _local10.sy + (_local6 * (((2 * (1 - _local6)) * _local10.ctrly) + (_local6 * _local10.chy)));
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local18 = Math.round(Number(_local18));
_local17 = Math.round(Number(_local17));
}
_local5._x = _local18;
_local5._y = _local17;
} else if (_local30 == "_frame") {
MovieClip(_local5).gotoAndStop(Math.ceil(_local6));
}
}
} else {
var _local16 = (_local9 == true) && ((_local3.cycles > 1) || (_local3.cycles == 0));
var _local7 = [];
for (var _local27 in _local3.ch) {
var _local4 = ((_local3.complex == 0) ? ([]) : ({}));
for (var _local28 in _local3.ch[_local27]) {
var _local8 = _local3.ch[_local27][_local28];
var _local11 = _local3.ps[_local27][_local28];
if (_local9 == true) {
_local4[_local28] = _local11 + _local8;
if (_local16 == true) {
_local3.ch[_local27][_local28] = -_local8;
}
} else {
_local4[_local28] = _local3.ef(now - _local3.ts, _local11, _local8, _local3.d, _local3.e1, _local3.e2);
}
if (_global.isNaN(_local4[_local28]) == false) {
if ((_local3.rr == true) || ((_local20 == true) && (!(_local3.rr === false)))) {
_local4[_local28] = Math.round(_local4[_local28]);
}
}
if ((_local3.fmp == -1) && (_local3.c == -1)) {
_local5[_local30][_local28] = _local4[_local28];
}
}
_local7.push(_local4);
if ((_local3.fmp == -1) && (_local3.c == 2)) {
_local5[_local30][_local27] = Number(((_local4.rb << 16) | (_local4.gb << 8)) | _local4.bb);
}
}
if (_local3.fmp != -1) {
if (_local3.c == 1) {
_local3.fmp.setFilterProp(_local5, _local30, ((_local7[0].rb << 16) | (_local7[0].gb << 8)) | _local7[0].bb);
} else if (_local3.c == 2) {
var _local19 = [];
for (var _local28 in _local7) {
_local19.unshift(((_local7[_local28].rb << 16) | (_local7[_local28].gb << 8)) | _local7[_local28].bb);
}
_local3.fmp.setFilterProp(_local5, _local30, _local19);
}
} else if (_local3.c != -1) {
_local3.c.setTransform(_local7[0]);
}
if (_local16 == true) {
if (_local3.cycles > 1) {
_local3.cycles--;
}
_local9 = false;
_local3.ts = now;
_local3.ps = _local7;
}
}
if (_local3.sf == false) {
if (_local3.v != 0) {
_local5._visible = true;
}
if (_local21 == true) {
if (_local15[_local35] == undefined) {
_local15[_local35] = [_local5, []];
}
_local15[_local35][1].unshift(_local30);
}
_local3.sf = true;
}
if (_local3.scb.fired == false) {
_local22[String(_local3.scb.id)] = _local3.scb;
_local3.scb.fired = true;
}
if (_local21 == true) {
if (_local13[_local35] == undefined) {
_local13[_local35] = [_local5, []];
}
_local13[_local35][1].unshift(_local30);
}
if (_local3.ucb != undefined) {
_local24[String(_local3.ucb.id)] = _local3.ucb;
}
if (_local9 == true) {
if (_local3.v === -1) {
_local5._visible = false;
}
if (_local3.suppressEnd != true) {
if (_local21 == true) {
if (_local14[_local35] == undefined) {
_local14[_local35] = [_local5, []];
}
_local14[_local35][1].unshift(_local30);
}
if (_local3.ecb != undefined) {
_local23[String(_local3.ecb.id)] = _local3.ecb;
}
}
delete _local34[_local30];
if (_local30 == _local12.colorProp) {
delete _local12.colorProp;
}
_local12.numProps--;
if (_local12.numProps <= 0) {
_local26 = true;
}
}
delete _local3.suppressEnd;
}
}
for (var _local35 in _local15) {
_local15[_local35][0].broadcastMessage("onTweenStart", {target:_local15[_local35][0], props:_local15[_local35][1]});
}
for (var _local35 in _local22) {
_local22[_local35].f.apply(_local22[_local35].s, _local22[_local35].a);
}
for (var _local35 in _local13) {
_local13[_local35][0].broadcastMessage("onTweenUpdate", {target:_local13[_local35][0], props:_local13[_local35][1]});
}
for (var _local35 in _local24) {
_local24[_local35].f.apply(_local24[_local35].s, _local24[_local35].a);
}
for (var _local35 in _local14) {
_local14[_local35][0].broadcastMessage("onTweenEnd", {target:_local14[_local35][0], props:_local14[_local35][1]});
}
for (var _local35 in _local23) {
_local23[_local35].f.apply(_local23[_local35].s, _local23[_local35].a);
}
if (_local26) {
cleanUp();
}
now = getTimer();
}
function cleanUp(noInit) {
for (var _local4 in tweens) {
var _local2 = tweens[_local4].targ;
if ((tweens[_local4].numProps <= 0) || (_local2.__zigoID__ == undefined)) {
if ((((_local2 != undefined) && (_local2.tween == undefined)) && (noInit != true)) && (_local2._listeners.length <= 0)) {
com.mosesSupposes.fuse.ZigoEngine.deinitializeTargets(_local2);
}
delete tweens[_local4];
numTweens--;
}
}
if (numTweens <= 0) {
numTweens = 0;
delete tweens;
tweens = {};
if (noInit != true) {
com.mosesSupposes.fuse.ZigoEngine.__mgrRelay(this, "setup", [true]);
}
}
}
function paramsObj(targs, props, endvals, retainFade) {
var _local6 = {};
_local6.all = String(targs).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALL;
_local6.none = Boolean(targs == null);
if (_local6.all == true) {
_local6.tg = [null];
} else {
_local6.tg = ((targs instanceof Array) ? (targs) : ([targs]));
for (var _local11 in _local6.tg) {
var _local7 = _local6.tg[_local11];
if ((_local7 == null) || (!((typeof(_local7) == "object") || (typeof(_local7) == "movieclip")))) {
_local6.tg.splice(Number(_local11), 1);
}
}
}
_local6.allprops = props == null;
var _local1;
var _local4;
var _local3 = {};
if (_local6.allprops == false) {
if ((typeof(props) == "string") && ((String(props).indexOf(" ") > -1) || (String(props).indexOf(",") > -1))) {
props = String(props.split(" ").join("")).split(",");
}
_local1 = ((props instanceof Array) ? (props.slice()) : ([props]));
if (endvals != undefined) {
if ((typeof(endvals) == "string") && ((String(endvals).indexOf(" ") > -1) || (String(endvals).indexOf(",") > -1))) {
endvals = String(endvals.split(" ").join("")).split(",");
}
_local4 = ((endvals instanceof Array) ? (endvals.slice()) : ([endvals]));
while (_local4.length < _local1.length) {
_local4.push(_local4[_local4.length - 1]);
}
_local4.splice(_local1.length, _local4.length - _local1.length);
}
for (var _local11 in _local1) {
var _local2 = Number(_local11);
if ((_local1[_local11] != "_scale") && (_local1[_local11] != "_size")) {
if (_local3[_local1[_local11]] == undefined) {
if ((_local1[_local11] == "_fade") && (retainFade != true)) {
_local1[_local11] = "_alpha";
}
if (String(_local1[_local11]).toUpperCase() == com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR) {
_local1[_local11] = com.mosesSupposes.fuse.FuseKitCommon.ALLCOLOR;
}
_local3[_local1[_local11]] = true;
} else {
_local1.splice(_local2, 1);
_local4.splice(_local2, 1);
}
} else {
var _local8 = String(_local1.splice(_local2, 1)[0]);
var _local5 = _local4.splice(_local2, 1)[0];
if (_local8 == "_scale") {
if (_local3._xscale == undefined) {
_local1.splice(_local2, 0, "_xscale");
_local4.splice(_local2, 0, _local5);
_local3._xscale = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_yscale");
_local4.splice(_local2, 0, _local5);
_local3._yscale = true;
}
}
if (_local8 == "_size") {
if (_local3._width == undefined) {
_local1.splice(_local2, 0, "_width");
_local4.splice(_local2, 0, _local5);
_local3._width = true;
_local2++;
}
if (_local3._yscale == undefined) {
_local1.splice(_local2, 0, "_height");
_local4.splice(_local2, 0, _local5);
_local3._height = true;
}
}
}
}
for (var _local11 in _local1) {
if (((_local1[_local11] == "_xscale") && (_local3._width == true)) || ((_local1[_local11] == "_yscale") && (_local3._height == true))) {
_local1.splice(Number(_local11), 1);
_local4.splice(Number(_local11), 1);
delete _local3[_local1[_local11]];
}
}
}
_local6.pa = _local1;
_local6.va = _local4;
_local6.props = _local3;
return(_local6);
}
function getChangeObj(ps, ep, isFMP, useArray) {
var _local3 = {map:((useArray == true) ? ([]) : ({})), changed:false};
for (var _local7 in ep) {
if ((((((isFMP == true) && (_local7.charAt(1) == "b")) || (ep[_local7] != ps[_local7])) || (useArray == true)) && (ep[_local7] != null)) && (_global.isNaN(Number(ep[_local7])) == false)) {
_local3.map[_local7] = ((typeof(ep[_local7]) == "string") ? (Number(ep[_local7])) : (ep[_local7] - ps[_local7]));
if (_global.isNaN(_local3.map[_local7]) == true) {
_local3.map[_local7] = 0;
} else if (_local3.map[_local7] != 0) {
_local3.changed = true;
}
}
}
return(_local3);
}
var numTweens = 0;
}
Symbol 1380 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 1381 MovieClip [__Packages.mx.transitions.easing.Regular] Frame 0
class mx.transitions.easing.Regular
{
function Regular () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static var version = "1.1.0.52";
}
Symbol 1382 MovieClip [__Packages.mx.transitions.easing.Elastic] Frame 0
class mx.transitions.easing.Elastic
{
function Elastic () {
}
static function easeIn(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
static function easeOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOut(t, b, c, d, a, p) {
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
var _local7 = p / 4;
} else {
var _local7 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local7) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static var version = "1.1.0.52";
}
Symbol 1383 MovieClip [__Packages.com.mosesSupposes.fuse.Fuse] Frame 0
class com.mosesSupposes.fuse.Fuse extends Array
{
var _nID, _aDefaultTargs, length, scope, _nIndex, _oDel1, dispatchEvent, label, autoClear, duration, easing;
function Fuse (fuseAction) {
super();
mx.events.EventDispatcher.initialize(this);
_nID = registerInstance(this);
_nState = -1;
_aDefaultTargs = new Array();
if (arguments.length > 0) {
splice.apply(this, new Array(0, 0).concat(arguments));
}
var _local4 = ["concat", "join", "sort", "sortOn"];
for (var _local5 in _local4) {
com.mosesSupposes.fuse.Fuse.prototype[_local4[_local5]] = function () {
if (com.mosesSupposes.fuse.Fuse.OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("105");
}
};
}
}
function addEventListener(event, handler) {
}
function removeEventListener(event, handler) {
}
function destroy() {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " destroy.");
}
stop(true);
splice(0, length);
_aDefaultTargs = null;
scope = null;
_global.ASSetPropFlags(this, null, 0, 7);
var _local4 = _nID;
for (var _local3 in this) {
delete this[_local3];
}
removeInstanceAt(_local4, true);
}
static function getInstance(idOrLabel) {
if (typeof(idOrLabel) == "number") {
return(_aInstances[idOrLabel]);
}
if (typeof(idOrLabel) == "string") {
for (var _local2 in _aInstances) {
if (com.mosesSupposes.fuse.Fuse(_aInstances[_local2]).label == idOrLabel) {
return(_aInstances[_local2]);
}
}
}
return(null);
}
static function getInstances(stateFilter, targets) {
var _local10 = (stateFilter == null) || (stateFilter.toUpperCase() == "ALL");
if (!(targets instanceof Array)) {
targets = arguments.slice(1);
}
var _local8 = [];
for (var _local11 in _aInstances) {
var _local5 = _aInstances[_local11];
if (_aInstances[_local11] == null) {
continue;
}
if ((_local10 == false) && (_local5.__get__state() != stateFilter)) {
continue;
}
var _local3 = targets.length == 0;
if (_local3 == false) {
if (_local3 == true) {
continue;
}
var _local2 = _local5.getActiveTargets(true);
for (var _local7 in targets) {
for (var _local6 in _local2) {
if (_local2[_local6] == targets[_local7]) {
_local3 = true;
break;
}
}
}
}
if (_local3 == true) {
_local8.unshift(_local5);
}
}
return(_local8);
}
function get id() {
return(_nID);
}
function get state() {
switch (_nState) {
case -1 :
return("stopped");
case 0 :
return("paused");
case 1 :
return("playing");
}
return(undefined);
}
function get currentIndex() {
return(_nIndex);
}
function get currentLabel() {
return(this[_nIndex].label);
}
function get target() {
return(((_aDefaultTargs.length == 1) ? (_aDefaultTargs[0]) : (_aDefaultTargs)));
}
function set target(t) {
delete _aDefaultTargs;
if (t != null) {
addTarget(t);
}
//return(target);
}
function addTarget(t) {
if (_aDefaultTargs == null) {
_aDefaultTargs = [];
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local5 in arguments) {
var _local3 = false;
for (var _local4 in _aDefaultTargs) {
if (arguments[_local5] == _aDefaultTargs[_local4]) {
_local3 = true;
break;
}
}
if (_local3 == false) {
_aDefaultTargs.push(arguments[_local5]);
}
}
}
function removeTarget(t) {
if ((_aDefaultTargs == null) || (_aDefaultTargs.length == 0)) {
return(undefined);
}
if (arguments[0] instanceof Array) {
arguments=arguments[0];//parameter overwritten
arguments[0];
}
for (var _local4 in arguments) {
for (var _local3 in _aDefaultTargs) {
if (arguments[_local4] == _aDefaultTargs[_local3]) {
_aDefaultTargs.splice(Number(_local3), 1);
}
}
}
}
function getActiveTargets(includeDefaults) {
if (_nState == -1) {
return([]);
}
var _local2;
if (includeDefaults == true) {
_local2 = _aDefaultTargs.slice();
} else {
_local2 = [];
}
return(com.mosesSupposes.fuse.FuseItem(this[_nIndex]).getActiveTargets(_local2));
}
function clone() {
var _local3 = [];
var _local2 = 0;
while (_local2 < length) {
_local3.push(com.mosesSupposes.fuse.FuseItem(this[_local2]).getInitObj());
_local2++;
}
var _local4 = new com.mosesSupposes.fuse.Fuse();
_local4.push.apply(_local4, _local3);
_local4.scope = scope;
_local4.__set__target(target);
return(_local4);
}
function push(fuseAction) {
splice.apply(this, new Array(length, 0).concat(arguments));
return(length);
}
function pushTween(targets, props, endvals, seconds, ease, delay, callback) {
push({__buildMode:true, tweenargs:arguments});
return(length);
}
function pop() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[length - 1]).getInitObj();
splice(length - 1, 1);
return(_local2);
}
function unshift(fuseAction) {
splice.apply(this, new Array(0, 0).concat(arguments));
return(length);
}
function shift() {
var _local2 = com.mosesSupposes.fuse.FuseItem(this[0]).getInitObj();
splice(0, 1);
return(_local2);
}
function splice(startIndex, deleteCount, fuseAction) {
stop(true);
var _local7 = Number(arguments.shift());
if (_local7 < 0) {
_local7 = length + _local7;
}
deleteCount = Number(arguments.shift());
var _local8 = new Array();
var _local5 = 0;
while (_local5 < arguments.length) {
var _local4 = ((arguments[_local5] instanceof com.mosesSupposes.fuse.Fuse) ? (arguments[_local5]) : (new com.mosesSupposes.fuse.FuseItem(_local7 + _local5, arguments[_local5], _nID)));
addEventListener("onStop", _local4);
addEventListener("evtSetStart", _local4);
_local8.push(_local4);
_local5++;
}
var _local6 = super.splice.apply(this, new Array(_local7, deleteCount).concat(_local8));
for (var _local9 in _local6) {
var _local4 = _local6[_local9];
removeEventListener("onStop", _local4);
removeEventListener("evtSetStart", _local4);
if (_local4 instanceof com.mosesSupposes.fuse.Fuse) {
_local4.removeEventListener("onComplete", _oDel1);
} else {
_local4.destroy();
}
}
_local5 = 0;
while (_local5 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local5])._nItemID = _local5;
_local5++;
}
}
function slice(indexA, indexB) {
var _local6 = super.slice(indexA, indexB);
var _local5 = new Array();
var _local4 = 0;
while (_local4 < arguments.length) {
_local5.push(com.mosesSupposes.fuse.FuseItem(this[_local4]).getInitObj());
_local4++;
}
return(_local5);
}
function reverse() {
stop(true);
super.reverse();
var _local3 = 0;
while (_local3 < length) {
com.mosesSupposes.fuse.FuseItem(this[_local3])._nItemID = _local3;
_local3++;
}
}
function traceItems(indexA, indexB) {
var _local5 = "";
var _local4 = super.slice(indexA, indexB);
_local5 = _local5 + ((getHandle() + " traceItems:") + "\n----------\n");
var _local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
_local5 = _local5 + (((((getHandle() + ">Item#") + _local3) + ": [Nested Fuse] ") + _local4[_local3]) + newline);
} else {
_local5 = _local5 + (_local4[_local3] + newline);
}
_local3++;
}
_local5 = _local5 + "----------";
com.mosesSupposes.fuse.FuseKitCommon.output(_local5);
}
function toString() {
return(((getHandle() + " (contains ") + length) + ((length == 1) ? " item)" : " items)"));
}
function setStartProps(trueOrItemIDs) {
var _local8 = ((arguments.length == 0) || (trueOrItemIDs === true)) || (trueOrItemIDs == com.mosesSupposes.fuse.FuseKitCommon.ALL);
dispatchEvent({target:this, type:"evtSetStart", all:_local8, filter:((trueOrItemIDs instanceof Array) ? (trueOrItemIDs) : arguments), curIndex:((_nState == 1) ? (_nIndex) : -1), targs:_aDefaultTargs, scope:scope});
}
function start(setStart) {
close();
stop(true);
_nState = 1;
if (length == 0) {
advance(false, true, false);
}
if ((setStart != null) && (setStart != false)) {
setStartProps.apply(this, arguments);
}
dispatchEvent({target:this, type:"onStart"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " start.");
}
playCurrentItem();
}
function stop() {
if (_nState != -1) {
var _local3 = 0;
while (_local3 < length) {
if (this[_local3] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_local3]).removeEventListener("onComplete", _oDel1);
if (com.mosesSupposes.fuse.Fuse(this[_local3]).__get__state() == "playing") {
com.mosesSupposes.fuse.Fuse(this[_local3]).stop();
}
} else if ((_local3 == _nIndex) || (com.mosesSupposes.fuse.FuseItem(this[_local3]).hasTriggerFired() == true)) {
com.mosesSupposes.fuse.FuseItem(this[_local3]).stop();
}
_local3++;
}
}
var _local4 = _nState;
_nState = -1;
if ((!(arguments[0] === true)) && (_local4 != -1)) {
dispatchEvent({target:this, type:"onStop"});
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " stop.");
}
}
_nIndex = 0;
clearInterval(_nDelay);
_nTimeCache = (_nDelay = -1);
}
function skipTo(indexOrLabel) {
close();
var _local3 = normalizeIndex(indexOrLabel);
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "skipTo", String(indexOrLabel));
}
return(undefined);
}
if ((_local3 == _nIndex) && (arguments[1] === true)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("103", String(indexOrLabel), _nIndex);
}
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
stop(true);
_nIndex = _local3;
var _local4 = _nState;
_nState = 1;
if (_local4 == -1) {
dispatchEvent({target:this, type:"onStart"});
}
playCurrentItem();
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output("skipTo:" + _local3);
}
}
function pause() {
if (_nState == 1) {
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2].state === "playing") || (this[_local2]._nPlaying > 0)) {
this[_local2].pause();
}
_local2++;
}
if (_nTimeCache != -1) {
_nTimeCache = _nTimeCache - getTimer();
clearInterval(_nDelay);
}
_nState = 0;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " pause.");
}
dispatchEvent({target:this, type:"onPause"});
}
}
function resume() {
if (_nState != 0) {
return(undefined);
}
close();
_nState = 1;
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " resume.");
}
dispatchEvent({target:this, type:"onResume"});
if (_nTimeCache != -1) {
playCurrentItem(false, true);
}
var _local2 = 0;
while (_local2 <= _nIndex) {
if ((this[_local2] instanceof com.mosesSupposes.fuse.Fuse) && (this[_local2].state == "paused")) {
com.mosesSupposes.fuse.Fuse(this[_local2]).resume();
} else if (this[_local2]._nPlaying == 0) {
com.mosesSupposes.fuse.FuseItem(this[_local2]).pause(true);
}
_local2++;
}
}
function fastForward(resumeAtIndexOrLabel) {
var _local3 = ((resumeAtIndexOrLabel == null) ? (length) : (normalizeIndex(resumeAtIndexOrLabel)));
if (_local3 == null) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("102", "fastForward", String(resumeAtIndexOrLabel));
}
return(undefined);
}
if ((_local3 == 0) || (_local3 <= _nIndex)) {
if (OUTPUT_LEVEL > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("104", _local3);
}
skipTo(_local3);
return(undefined);
}
clearInterval(_nDelay);
var _local2 = _nIndex;
while (_local2 < _local3) {
this[_local2].fastForward(null, _aDefaultTargs, scope);
advance(false, true, !((_local2 == (_local3 - 1)) && (_local3 < length)));
_local2++;
}
}
function getHandle() {
return("-Fuse" + ((label != undefined) ? ((" \"" + label) + "\"") : ("#" + String(_nID))));
}
function advance(wasTriggered, silentStop, isFF) {
if (_nState < 1) {
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("** DEVELOPER ALERT: " + getHandle()) + " advance called out of turn! (state:") + state) + " currentIndex:") + currentIndex) + ") Please report this Fuse's details to MosesSupposes.com. **");
}
return(undefined);
}
var _local3 = false;
if ((_nIndex == (length - 1)) && (isFF != true)) {
var _local2 = length - 1;
while (_local2 > -1) {
if (com.mosesSupposes.fuse.FuseItem(this[_local2])._nPlaying > -1) {
return(undefined);
}
_local2--;
}
_local3 = true;
}
if ((wasTriggered == true) && (_local3 == false)) {
return(undefined);
}
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
com.mosesSupposes.fuse.Fuse(this[_nIndex]).removeEventListener("onComplete", _oDel1);
}
if ((_nIndex + 1) >= length) {
stop(silentStop);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output(getHandle() + " complete.");
}
_nIndex = length - 1;
dispatchEvent({target:this, type:"onComplete"});
if ((autoClear == true) || ((!(autoClear === false)) && (AUTOCLEAR == true))) {
destroy();
}
return(undefined);
}
_nIndex++;
if (isFF == true) {
return(undefined);
}
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " advance: ") + _nIndex);
}
dispatchEvent({target:this, type:"onAdvance"});
playCurrentItem();
}
function playCurrentItem(postDelay, resumeDelay) {
clearInterval(_nDelay);
if ((postDelay != true) || (resumeDelay == true)) {
var _local3 = 0;
if (resumeDelay != true) {
_local3 = (com.mosesSupposes.fuse.FuseItem(this[_nIndex]).evalDelay(scope) || 0) * 1000;
}
if ((_local3 > 0) || (resumeDelay == true)) {
if (resumeDelay == true) {
_local3 = _nTimeCache;
_nTimeCache = _nTimeCache + getTimer();
} else {
var _local4 = Math.abs(_global.com.mosesSupposes.fuse.ZigoEngine.TIME_MULTIPLIER);
if (_global.isNaN(_local4) == true) {
_local4 = 1;
}
_local3 = _local3 * _local4;
_nTimeCache = getTimer() + _local3;
}
_nDelay = setInterval(this, "playCurrentItem", _local3, true);
return(undefined);
}
}
_nTimeCache = (_nDelay = -1);
if (this[_nIndex] instanceof com.mosesSupposes.fuse.Fuse) {
if (_oDel1 == null) {
_oDel1 = mx.utils.Delegate.create(this, advance);
}
com.mosesSupposes.fuse.Fuse(this[_nIndex]).addEventListener("onComplete", _oDel1);
com.mosesSupposes.fuse.Fuse(this[_nIndex]).start(_aDefaultTargs, scope);
} else {
var _local6 = com.mosesSupposes.fuse.FuseItem(this[_nIndex]).startItem(_aDefaultTargs, scope, duration, easing);
if (OUTPUT_LEVEL > 1) {
com.mosesSupposes.fuse.FuseKitCommon.output((getHandle() + " props tweened: ") + _local6);
}
}
}
function evtSetStart(o) {
setStartProps.apply(this, o.filter);
}
static function open(fuseOrID) {
var _local3 = _global.com.mosesSupposes.fuse.ZigoEngine;
if (_local3 == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("106");
return(null);
}
_local3.register(com.mosesSupposes.fuse.Fuse, com.mosesSupposes.fuse.FuseItem);
if (_oBuildMode == null) {
_oBuildMode = {curID:-1, prevID:-1, curGroup:null};
} else if ((_oBuildMode != null) && (_oBuildMode.curID > -1)) {
close();
}
if (fuseOrID != null) {
if (fuseOrID instanceof com.mosesSupposes.fuse.Fuse) {
_oBuildMode.curID = fuseOrID.id;
} else if (getInstance(fuseOrID) != null) {
_oBuildMode.curID = getInstance(fuseOrID).id;
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("107");
return(null);
}
} else {
_oBuildMode.curID = (new com.mosesSupposes.fuse.Fuse()).id;
}
_oBuildMode.prevID = _oBuildMode.curID;
return(getInstance(_oBuildMode.curID));
}
static function openGroup(fuseOrID) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
open(fuseOrID);
} else if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curGroup = new Array();
return(getInstance(_oBuildMode.curID));
}
static function closeGroup() {
if ((_oBuildMode.curGroup == null) || (!((_oBuildMode != null) && (_oBuildMode.curID > -1)))) {
return(undefined);
}
getInstance(_oBuildMode.curID).push(_oBuildMode.curGroup);
_oBuildMode.curGroup = null;
}
static function close() {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
if (_oBuildMode.curGroup != null) {
closeGroup();
}
_oBuildMode.curID = -1;
}
static function closeAndStart(setStart) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local2 = getInstance(_oBuildMode.curID);
close();
_local2.start.apply(_local2, arguments);
}
static function startRecent(setStart) {
var _local2 = getInstance(_oBuildMode.prevID);
if (_local2 != null) {
_local2.start.apply(_local2, arguments);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("108");
}
}
static function addCommand(commandOrScope, indexOrFunc, argument) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(undefined);
}
var _local4 = _oBuildMode.curGroup != null;
var _local2 = ((_local4 == true) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if (typeof(commandOrScope) == "string") {
var _local7 = indexOrFunc != undefined;
var _local5 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(String(commandOrScope), _local4, _local7, OUTPUT_LEVEL, true);
if (_local5 == true) {
_local2.push({__buildMode:true, command:commandOrScope, commandargs:indexOrFunc});
}
} else {
_local2.push({__buildMode:true, scope:commandOrScope, func:indexOrFunc, args:arguments.slice(2)});
}
}
static function addBuildItem(args) {
if (!((_oBuildMode != null) && (_oBuildMode.curID > -1))) {
return(false);
}
var _local1 = ((_oBuildMode.curGroup != null) ? (_oBuildMode.curGroup) : (getInstance(_oBuildMode.curID)));
if ((args.length == 1) && (typeof(args[0]) == "object")) {
_local1.push(args[0]);
} else {
_local1.push({__buildMode:true, tweenargs:args});
}
return(true);
}
function normalizeIndex(indexOrLabel) {
var _local4;
if (typeof(indexOrLabel) == "string") {
_local4 = -1;
var _local3 = 0;
while (_local3 < length) {
if (this[_local3].label == String(indexOrLabel)) {
_local4 = _local3;
break;
}
_local3++;
}
if (_local4 == -1) {
return(null);
}
} else {
_local4 = Number(indexOrLabel);
}
if ((_global.isNaN(_local4) == true) || (Math.abs(_local4) >= length)) {
return(null);
}
if (_local4 < 0) {
_local4 = Math.max(0, length + _local4);
}
return(_local4);
}
static function registerInstance(s) {
if (_aInstances == null) {
_aInstances = new Array();
}
return(_aInstances.push(s) - 1);
}
static function removeInstanceAt(id, isDestroyCall) {
if (isDestroyCall != true) {
com.mosesSupposes.fuse.Fuse(_aInstances[id]).destroy();
}
delete _aInstances[id];
}
static var registryKey = "fuse";
static var VERSION = com.mosesSupposes.fuse.FuseKitCommon.VERSION;
static var OUTPUT_LEVEL = 1;
static var AUTOCLEAR = false;
static var AUTOSTOP = true;
var _nState = -1;
var _nDelay = -1;
var _nTimeCache = -1;
static var _aInstances = null;
static var _oBuildMode = null;
}
Symbol 1384 MovieClip [__Packages.mx.events.EventDispatcher] Frame 0
class mx.events.EventDispatcher
{
function EventDispatcher () {
}
static function _removeEventListener(queue, event, handler) {
if (queue != undefined) {
var _local4 = queue.length;
var _local1;
_local1 = 0;
while (_local1 < _local4) {
var _local2 = queue[_local1];
if (_local2 == handler) {
queue.splice(_local1, 1);
return(undefined);
}
_local1++;
}
}
}
static function initialize(object) {
if (_fEventDispatcher == undefined) {
_fEventDispatcher = new mx.events.EventDispatcher();
}
object.addEventListener = _fEventDispatcher.addEventListener;
object.removeEventListener = _fEventDispatcher.removeEventListener;
object.dispatchEvent = _fEventDispatcher.dispatchEvent;
object.dispatchQueue = _fEventDispatcher.dispatchQueue;
}
function dispatchQueue(queueObj, eventObj) {
var _local7 = "__q_" + eventObj.type;
var _local4 = queueObj[_local7];
if (_local4 != undefined) {
var _local5;
for (_local5 in _local4) {
var _local1 = _local4[_local5];
var _local3 = typeof(_local1);
if ((_local3 == "object") || (_local3 == "movieclip")) {
if (_local1.handleEvent != undefined) {
_local1.handleEvent(eventObj);
}
if (_local1[eventObj.type] != undefined) {
if (exceptions[eventObj.type] == undefined) {
_local1[eventObj.type](eventObj);
}
}
} else {
_local1.apply(queueObj, [eventObj]);
}
}
}
}
function dispatchEvent(eventObj) {
if (eventObj.target == undefined) {
eventObj.target = this;
}
this[eventObj.type + "Handler"](eventObj);
dispatchQueue(this, eventObj);
}
function addEventListener(event, handler) {
var _local3 = "__q_" + event;
if (this[_local3] == undefined) {
this[_local3] = new Array();
}
_global.ASSetPropFlags(this, _local3, 1);
_removeEventListener(this[_local3], event, handler);
this[_local3].push(handler);
}
function removeEventListener(event, handler) {
var _local2 = "__q_" + event;
_removeEventListener(this[_local2], event, handler);
}
static var _fEventDispatcher = undefined;
static var exceptions = {move:1, draw:1, load:1};
}
Symbol 1385 MovieClip [__Packages.com.mosesSupposes.fuse.FuseItem] Frame 0
class com.mosesSupposes.fuse.FuseItem
{
static var _ZigoEngine, _aInstances;
var _nItemID, _nFuseID, _initObj, _aProfiles, _oElements, _oTemps, _sImage, _aTweens, _oTwBeingAdded;
function FuseItem (id, o, fuseID) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
_nItemID = id;
_nFuseID = fuseID;
_initObj = o;
_aProfiles = [];
_oElements = {aEvents:[]};
_oTemps = {};
if (!(o instanceof Array)) {
o = [o];
}
var _local19 = _global.com.mosesSupposes.fuse.Fuse;
_oTemps.outputLevel = ((_local19 != undefined) ? (_local19.OUTPUT_LEVEL) : (_global.com.mosesSupposes.fuse.ZigoEngine.OUTPUT_LEVEL));
if (o.length == 1) {
var _local18 = o[0];
var _local12 = ((_local18.action != undefined) ? (_local18.action) : (_local18));
if ((_local12.__buildMode != true) && (_local12.command != undefined)) {
_oElements.command = _local12.command;
_oElements.scope = _local12.scope;
_oElements.args = _local12.args;
_sImage = " Elements:[" + ("command" + ((typeof(_local12.command) == "string") ? ((":\"" + _local12.command) + "\", ") : ", "));
if (_local12.delay != undefined) {
_sImage = _sImage + "delay, ";
_oElements.delay = _local12.delay;
}
_sImage = _sImage.slice(0, -2) + "]";
if ((_local12.func != undefined) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("113");
}
return;
}
}
_oTemps.sImgS = "";
_oTemps.sImgE = "";
_oTemps.sImgB = "";
_oTemps.afl = 0;
_oTemps.ael = 0;
_oTemps.twDelayFlag = false;
_oTemps.nActions = o.length;
_oTemps.fuseProps = com.mosesSupposes.fuse.FuseKitCommon._fuseprops();
_oTemps.cbProps = com.mosesSupposes.fuse.FuseKitCommon._cbprops();
_oTemps.sUP = com.mosesSupposes.fuse.FuseKitCommon._underscoreable();
_oTemps.sCT = com.mosesSupposes.fuse.FuseKitCommon._cts();
_oTemps.bTriggerFound = false;
for (var _local17 in o) {
var _local3 = o[_local17];
if ((_local3.label != undefined) && (typeof(_local3.label) == "string")) {
_oElements.label = _local3.label;
}
var _local4;
var _local8 = Boolean(typeof(_local3.action) == "object");
if (_local8 == true) {
var _local7 = ((_local3.action instanceof Array) ? (_local3.action) : ([_local3.action]));
_local4 = {delay:_local3.delay, target:_local3.target, addTarget:_local3.addTarget, label:_local3.label, trigger:_local3.trigger};
for (var _local15 in _local7) {
var _local5 = parseProfile(_local7[_local15], _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
} else {
var _local7 = _local3;
var _local5 = parseProfile(_local7, _local4);
if (_local5 != undefined) {
_aProfiles.unshift(_local5);
}
}
}
_sImage = "";
var _local16 = "";
if (_oTemps.afl > 0) {
_local16 = _local16 + ((_oTemps.afl > 1) ? (_oTemps.afl + " callbacks, ") : "callback, ");
}
if ((_oElements.delay != undefined) || (_oTemps.twDelayFlag == true)) {
_local16 = _local16 + "delay, ";
}
if (_oTemps.bTriggerFound == true) {
_local16 = _local16 + "trigger, ";
}
if (_oTemps.ael > 0) {
_local16 = _local16 + ((_oTemps.ael > 1) ? (_oTemps.ael + " events, ") : "event, ");
}
if (_local16 != "") {
_sImage = _sImage + ((" Elements:[" + _local16.slice(0, -2)) + "]");
}
if (_oTemps.sImgS != "") {
_sImage = _sImage + ((" StartProps:[" + _oTemps.sImgS.slice(0, -2)) + "]");
}
if (_oTemps.sImgE != "") {
_sImage = _sImage + ((" Props:[" + _oTemps.sImgE.slice(0, -2)) + "]");
}
if (_oTemps.sImgB != "") {
_sImage = _sImage + ((" Simple Syntax Props:[" + _oTemps.sImgB.slice(0, -1)) + "]");
}
if (_sImage.slice(-2) == ", ") {
_sImage = _sImage.slice(0, -2);
}
delete _oTemps;
}
static function doTween() {
for (var _local3 in arguments) {
if (typeof(arguments[_local3]) == "object") {
if (_aInstances == undefined) {
_aInstances = new Array();
}
var _local2 = new com.mosesSupposes.fuse.FuseItem(_aInstances.length, arguments[_local3], -1);
return(_local2.startItem());
}
}
}
function get label() {
return(_oElements.label);
}
function hasTriggerFired() {
return(_bTrigger == true);
}
function getInitObj() {
return(_initObj);
}
function getActiveTargets(targetList) {
if (_aTweens.length <= 0) {
return(targetList);
}
var _local3 = false;
for (var _local5 in _aTweens) {
for (var _local4 in targetList) {
if (targetList[_local4] == _aTweens[_local5].targ) {
_local3 = true;
break;
}
}
if (_local3 == false) {
targetList.unshift(_aTweens[_local5].targ);
}
}
return(targetList);
}
function toString() {
return(String((_sID() + ":") + _sImage));
}
function evalDelay(scope) {
var _local3 = _oElements.delay;
if (_local3 instanceof Function) {
_local3 = _local3.apply(((_oElements.delayscope != undefined) ? (_oElements.delayscope) : (scope)));
}
if (typeof(_local3) == "string") {
_local3 = parseClock(String(_local3));
}
if (_global.isNaN(Number(_local3)) == true) {
return(0);
}
return(Number(_local3));
}
function startItem(targs, scope, duration, easing) {
_ZigoEngine = _global.com.mosesSupposes.fuse.ZigoEngine;
var _local11 = _global.com.mosesSupposes.fuse.Fuse;
var _local5 = ((_local11 != undefined) ? (_local11.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if (_oElements.command != null) {
var _local12 = _oElements.scope || (scope);
var _local10 = ((_oElements.command instanceof Function) ? (String(_oElements.command.apply(_local12))) : (String(_oElements.command)));
var _local6 = ((_oElements.args instanceof Function) ? (_oElements.args.apply(_local12)) : (_oElements.args));
var _local13 = com.mosesSupposes.fuse.FuseKitCommon._validateFuseCommand(_local10, _aProfiles.length > 0, (_local6 != null) && (!((_local6 instanceof Array) && (_local6.length == 0))), _local5, false);
if (_local13 == true) {
_nPlaying = 1;
if (!(_local6 instanceof Array)) {
_local6 = ((_local6 == null) ? ([]) : ([_local6]));
}
dispatchRequest(String(_local10), _local6);
}
if ((_local13 == false) || (_local10 == "setStartProps")) {
complete();
}
return(null);
}
if (_aTweens.length > 0) {
stop();
}
_ZigoEngine.addListener(this);
_nPlaying = 2;
var _local4 = null;
if (_aProfiles.length > 0) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("112");
} else {
_local4 = doTweens(targs, scope, duration, easing, false, false);
}
}
_nPlaying = 1;
var _local3 = _oElements.aEvents;
for (var _local9 in _local3) {
if (((_local4 == null) && (_aTweens.length > 0)) && (_local3[_local9].skipLevel == 2)) {
continue;
}
fireEvents(_local3[_local9], scope, _local5, targs);
}
if (((_local4 == null) && (_aTweens.length <= 0)) && (_nPlaying == 1)) {
if (_local5 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " no tweens added - item done. [getTimer()=") + getTimer()) + "]");
}
complete();
}
return(_local4);
}
function stop() {
var _local2 = _nPlaying > -1;
_nPlaying = -1;
if (_local2 == true) {
onStop();
}
_ZigoEngine.removeListener(this);
}
static function removeInstance(id) {
com.mosesSupposes.fuse.FuseItem(_aInstances[id]).destroy();
delete _aInstances[id];
}
function onStop() {
_bStartSet = false;
for (var _local3 in _aTweens) {
var _local2 = _aTweens[_local3];
_local2.targ.removeListener(this);
_ZigoEngine.removeTween(_local2.targ, _local2.props);
delete _aTweens[_local3];
}
delete _aTweens;
_bTrigger = false;
}
function evtSetStart(o) {
if ((_sImage.indexOf("StartProps:") == -1) || (o.curIndex == _nItemID)) {
return(undefined);
}
if (o.all != true) {
var _local3 = false;
for (var _local4 in o.filter) {
if ((Number(o.filter[_local4]) == _nItemID) || (String(o.filter[_local4]) == _oElements.label)) {
_local3 = true;
}
}
if (_local3 == false) {
return(undefined);
}
}
_nPlaying = 2;
doTweens(o.targs, o.scope, null, null, true, false);
_nPlaying = -1;
_bStartSet = true;
}
function pause(resume) {
if (_nPlaying == -1) {
return(undefined);
}
_nPlaying = ((resume == true) ? 1 : 0);
for (var _local12 in _aTweens) {
var _local4 = _aTweens[_local12];
var _local2 = _local4.targ;
var _local3 = _local4.props;
if (resume == true) {
var _local5 = [];
var _local6 = _aTweens.length;
for (var _local8 in _local3) {
if (_ZigoEngine.isTweenPaused(_local2, _local3[_local8]) == false) {
_local5.push(_local3[_local8]);
}
}
if (_local5.length > 0) {
onTweenEnd({__zigoID__:_local4.targZID, props:_local5, isResume:true});
}
if (_aTweens.length == _local6) {
_local2.addListener(this);
_ZigoEngine.unpauseTween(_local2, _local4.props);
}
} else {
_local2.removeListener(this);
_ZigoEngine.pauseTween(_local2, _local4.props);
}
}
if ((resume == true) && (_aTweens.length <= 0)) {
complete();
} else if (resume == true) {
_ZigoEngine.addListener(this);
} else {
_ZigoEngine.removeListener(this);
}
}
function fastForward(ignore, targs, scope) {
if (_nPlaying == 1) {
for (var _local4 in _aTweens) {
var _local3 = _aTweens[_local4];
var _local2 = _local3.targ;
_local2.removeListener(this);
_ZigoEngine.ffTween(_local2, _local3.props, true);
}
return(undefined);
}
if (_nPlaying == 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("125", _nItemID);
}
_nPlaying = 2;
doTweens(targs, scope, null, null, false, true);
stop();
}
function destroy() {
var _local3 = _nPlaying > -1;
_nPlaying = -1;
for (var _local5 in _aTweens) {
var _local2 = _aTweens[_local5];
_local2.targ.removeListener(this);
if (_local3 == true) {
_ZigoEngine.removeTween(_local2.targ, _local2.props);
}
delete _aTweens[_local5];
}
for (var _local4 in this) {
delete this[_local4];
}
}
function dispatchRequest(type, args) {
var _local4 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
if ((!(args instanceof Array)) && (args != null)) {
args = new Array(args);
}
Function(_local4[type]).apply(_local4, args);
}
function _sID() {
var _local3;
if (_nFuseID == -1) {
_local3 = "-One-off tween ";
} else {
_local3 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID).getHandle();
}
_local3 = _local3 + (">Item #" + String(_nItemID));
if (_oElements.label != undefined) {
_local3 = _local3 + ((" \"" + _oElements.label) + "\"");
}
return(_local3);
}
function parseProfile(obj, aap) {
var _local40;
var _local2;
var _local8;
if (obj.__buildMode == true) {
if (obj.command != undefined) {
if (obj.command == "delay") {
_oElements.delay = obj.commandargs;
} else if (obj.command == "trigger") {
if (_oTemps.bTriggerFound == false) {
_oTemps.bTriggerFound = true;
return({trigger:obj.commandargs, _doTimer:true});
}
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), obj.commandargs);
}
} else {
_oElements.command = obj.command;
_oElements.args = obj.commandargs;
}
}
if (obj.func != undefined) {
_oTemps.afl++;
_oElements.aEvents.unshift({scope:obj.scope, func:obj.func, args:obj.args});
}
if (obj.tweenargs != undefined) {
_oTemps.sImgB = _oTemps.sImgB + (obj.tweenargs[1].toString() + ",");
return(obj);
}
return(null);
}
var _local4 = {delay:((aap.delay != undefined) ? (aap.delay) : (obj.delay)), ease:obj.ease, seconds:obj.seconds, event:obj.event, eventparams:obj.eventparams, skipLevel:((((typeof(obj.skipLevel) == "number") && (obj.skipLevel >= 0)) && (obj.skipLevel <= 2)) ? (obj.skipLevel) : (_ZigoEngine.SKIP_LEVEL)), roundResults:obj.roundResults, oSP:{}, oEP:{}, oAFV:{}};
var _local22 = ((aap.trigger != undefined) ? (aap.trigger) : (obj.trigger));
if (_local22 != undefined) {
if (_oTemps.bTriggerFound == false) {
_local4.trigger = _local22;
_oTemps.bTriggerFound = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("124", _sID(), _local22);
}
}
if (_local4.delay == undefined) {
_local4.delay = obj.startAt;
}
if (_local4.ease == undefined) {
_local4.ease = obj.easing;
}
if (_local4.seconds == undefined) {
_local4.seconds = ((obj.duration != undefined) ? (obj.duration) : (obj.time));
}
if (aap.target != undefined) {
_local4.target = ((aap.target instanceof Array) ? (aap.target) : ([aap.target]));
} else if (obj.target != undefined) {
_local4.target = ((obj.target instanceof Array) ? (obj.target) : ([obj.target]));
}
if (obj.addTarget != undefined) {
_local4.addTarget = ((obj.addTarget instanceof Array) ? (obj.addTarget) : ([obj.addTarget]));
}
if (aap.addTarget != undefined) {
if (_local4.addTarget == undefined) {
_local4.addTarget = ((aap.addTarget instanceof Array) ? (aap.addTarget) : ([aap.addTarget]));
} else {
_local4.addTarget = ((_local4.addTarget instanceof Array) ? (_local4.addTarget.concat(aap.addTarget)) : (new Array(_local4.addTarget).concat(aap.addTarget)));
}
}
var _local15 = false;
for (_local2 in obj) {
var _local11 = obj[_local2];
if (_oTemps.cbProps.indexOf(("|" + _local2) + "|") > -1) {
if (_local2 != "skipLevel") {
_local4[_local2] = _local11;
}
continue;
}
if (_oTemps.fuseProps.indexOf(("|" + _local2) + "|") > -1) {
if (((_local2 == "command") && (_oTemps.nActions > 1)) && (_oTemps.outputLevel > 0)) {
com.mosesSupposes.fuse.FuseKitCommon.error("109", String(_local11), true);
}
continue;
}
if (typeof(_local11) == "object") {
var _local10 = ((_local11 instanceof Array) ? ([]) : ({}));
for (_local8 in _local11) {
_local10[_local8] = _local11[_local8];
}
_local11 = _local10;
}
var _local3;
var _local21;
if (_local2.indexOf("start_") == 0) {
if (((_local2 == "start_controlX") || (_local2 == "start_controlY")) || (_local2.indexOf("_bezier_") > -1)) {
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("110", _sID(), _local2);
}
continue;
}
_local2 = _local2.slice(6);
_local3 = _local4.oSP;
} else {
_local3 = _local4.oEP;
}
if ((ADD_UNDERSCORES == true) && (_oTemps.sUP.indexOf(("|_" + _local2) + "|") > -1)) {
_local2 = "_" + _local2;
}
if (_oTemps.sCT.indexOf(("|" + _local2) + "|") > -1) {
var _local13 = (_local2 == "_tintPercent") && (_local3.colorProp.p == "_tint");
var _local12 = (_local2 == "_tint") && (_local3.colorProp.p == "_tintPercent");
if (((_local3.colorProp == undefined) || (_local13 == true)) || (_local12 == true)) {
if (_local13 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local3.colorProp.v, percent:_local11}};
} else if (_local12 == true) {
_local3.colorProp = {p:"_tint", v:{tint:_local11, percent:_local3.colorProp.v}};
} else {
_local3.colorProp = {p:_local2, v:_local11};
}
_local15 = true;
} else if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local2);
}
} else if (_local11 != null) {
_local3[_local2] = _local11;
_local15 = true;
}
}
if ((_local15 == false) && ((_local4.trigger != undefined) || (((_local4.delay != undefined) || (_local4.seconds != undefined)) && (((_local4.startfunc != undefined) || (_local4.updfunc != undefined)) || ((_local4.func != undefined) && (_oTemps.nActions > 1)))))) {
if (_ZigoEngine == undefined) {
com.mosesSupposes.fuse.FuseKitCommon.error("116");
} else {
if (_local4.func != undefined) {
_oTemps.afl++;
}
if (_local4.event != undefined) {
_oTemps.ael++;
}
_local4._doTimer = true;
if (_local4.delay != undefined) {
_oTemps.twDelayFlag = true;
}
return(_local4);
}
}
if (_local15 == true) {
var _local17 = _local4.oEP.colorProp != undefined;
var _local7 = 0;
while (_local7 < 2) {
var _local3 = ((_local7 == 0) ? (_local4.oSP) : (_local4.oEP));
var _local6 = ((_local7 == 0) ? (_oTemps.sImgS) : (_oTemps.sImgE));
var _local9 = _local3.colorProp.p;
if (_local9 != undefined) {
_local3[_local9] = _local3.colorProp.v;
delete _local3.colorProp;
}
if (((_local3._xscale != undefined) || (_local3._scale != undefined)) && ((_local3._width != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._xscale != undefined) ? "_xscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if (((_local3._yscale != undefined) || (_local3._scale != undefined)) && ((_local3._height != undefined) || (_local3._size != undefined))) {
var _local14 = ((_local3._yscale != undefined) ? "_yscale" : "_scale");
delete _local3[_local14];
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local14);
}
}
if ((_local3._fade != undefined) && (_local3._alpha != undefined)) {
delete _local3._alpha;
if (_oTemps.outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), "_alpha");
}
}
for (_local2 in _local3) {
if (_local6.indexOf(_local2 + ", ") == -1) {
_local6 = _local6 + (_local2 + ", ");
}
if (_local3 == _local4.oSP) {
if ((_local4.oEP[_local2] == undefined) && (!((_local2 == _local9) && (_local17 == true)))) {
_local4.oAFV[_local2] = true;
_local4.oEP[_local2] = [];
}
}
}
((_local7 == 0) ? ((_oTemps.sImgS = _local6)) : ((_oTemps.sImgE = _local6)));
_local7++;
}
return(_local4);
}
if ((_local4.delay != undefined) && (_oTemps.nActions == 1)) {
_oElements.delay = _local4.delay;
_oElements.delayscope = _local4.scope;
}
if (_local4.event != undefined) {
_oTemps.ael++;
_oElements.aEvents.unshift({scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local4.skipLevel});
}
var _local23 = _oElements.aEvents.length;
if (_local4.func != undefined) {
_oElements.aEvents.push({func:_local4.func, scope:_local4.scope, args:_local4.args, skipLevel:_local4.skipLevel});
}
_oTemps.afl = _oTemps.afl + (_oElements.aEvents.length - _local23);
return(undefined);
}
function doTweens(targs, defaultScope, defaultSeconds, defaultEase, setStart, isFF) {
if (_aTweens == null) {
_aTweens = [];
}
var tba = ((_oTwBeingAdded = {}));
var ZE = _ZigoEngine;
var _local35 = function (target, props, endvals, seconds, ease, delay, callback) {
if (target.__zigoID__ == null) {
ZE.initializeTargets(target);
}
tba[target.__zigoID__] = true;
var _local3 = ZE.doTween.apply(ZE, arguments);
tba[target.__zigoID__] = false;
return(((_local3 == null) ? ([]) : (_local3.split(","))));
};
var _local74 = _global.com.mosesSupposes.fuse.Fuse;
var _local19 = ((_local74 != undefined) ? (_local74.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local24 = "";
var _local66 = 0;
var _local8;
var _local5;
var _local6;
var _local75 = (_bStartSet != true) && ((setStart == true) || (_sImage.indexOf("StartProps:") > -1));
var _local51 = 0;
while (_local51 < _aProfiles.length) {
if (_nPlaying < 2) {
return(null);
}
var _local4 = _aProfiles[_local51];
if (_local4.__buildMode == true) {
var _local10 = _aProfiles[_local51].tweenargs;
var _local65 = _local24;
if ((_local10[6].cycles === 0) || (_local10[6].cycles.toUpperCase() == "LOOP")) {
delete _local10[6].cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
}
var _local60 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(_local10[6]);
if (!(_local10[0] instanceof Array)) {
_local10[0] = [_local10[0]];
}
for (_local8 in _local10[0]) {
if (isFF == true) {
_local35(_local10[0][_local8], _local10[1], _local10[2], 0, null, 0, {skipLevel:0});
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops:[") + _local10[1]) + "]");
}
} else {
var _local17 = _local35(_local10[0][_local8], _local10[1], _local10[2], _local10[3], _local10[4], _local10[5], _local60);
if (_local17.length > 0) {
_aTweens.push({targ:_local10[0][_local8], props:_local17, targZID:_local10[0][_local8].__zigoID__});
_local10[0][_local8].addListener(this);
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " TWEEN(simple syntax)\ttargets:[") + _local10[0][_local8]) + "]\tprops tweened:[") + _local17.toString()) + "]");
}
}
}
if ((isFF == false) && ((_local65 == _local24) || (_local24 == ""))) {
_local66++;
}
} else {
var _local23 = defaultScope;
var _local16 = [];
var _local52 = ((_local4.target == undefined) ? (targs) : (_local4.target));
var _local26 = [];
var _local54 = false;
for (_local8 in _local52) {
var _local7 = _local52[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local4.addTarget) {
var _local7 = _local4.addTarget[_local8];
_local26 = _local26.concat(((_local7 instanceof Function) ? (_local7.apply(_local23)) : (_local7)));
}
for (_local8 in _local26) {
var _local7 = _local26[_local8];
if (_local7 != null) {
var _local40 = false;
for (_local5 in _local16) {
if (_local16[_local5] == _local7) {
_local40 = true;
break;
}
}
if (_local40 == false) {
_local16.unshift(_local7);
}
} else {
_local54 = true;
}
}
var _local56 = ((_local4._doTimer == true) && (_local16.length == 0)) && (isFF == false);
if ((_local54 == true) || ((_local16.length == 0) && (_local4._doTimer != true))) {
_local66++;
}
if (_local75 == true) {
for (_local8 in _local16) {
if (_nPlaying < 2) {
return(null);
}
var _local36 = _local16[_local8];
var _local33 = [];
var _local27 = [];
if (setStart == true) {
for (var _local63 in _local4.oEP) {
_global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local63, true);
}
}
for (var _local64 in _local4.oSP) {
var _local7 = _local4.oSP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
_local36[_local64] = _local7;
if (_local4.oAFV[_local64] == true) {
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:"IGNORE", _isAF:true});
}
continue;
}
if (((_local4.oAFV[_local64] == true) && (!((_local64 == "_colorReset") && (_local7 == 100)))) && (!((_local64 == "_tintPercent") && (_local7 == 0)))) {
var _local20;
if ((_local64 == "_tint") || (_local64 == "_colorTransform")) {
_local20 = _ZigoEngine.getColorTransObj();
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo100()).indexOf(("|" + _local64) + "|") > -1) || ((_local64 == "_fade") && (_local7 < 50))) {
_local20 = 100;
} else if ((String(com.mosesSupposes.fuse.FuseKitCommon._resetTo0()).indexOf(("|" + _local64) + "|") > -1) || (_local64 == "_fade")) {
_local20 = 0;
} else {
var _local29 = _global.com.mosesSupposes.fuse.FuseFMP.getFilterProp(_local36, _local64, true);
if (_local29 != null) {
_local20 = _local29;
} else {
_local20 = ((_global.isNaN(_local36[_local64]) == false) ? _local36[_local64] : 0);
}
}
for (_local6 in _local4.oEP[_local64]) {
if (_local4.oEP[_local64][_local6].targ == _local36) {
_local4.oEP[_local64].splice(Number(_local6), 1);
}
}
_local4.oEP[_local64].push({targ:_local36, val:_local20, _isAF:true});
}
if (typeof(_local7) == "object") {
var _local28 = ((_local7 instanceof Array) ? ([]) : ({}));
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
_local33.push(_local64);
_local27.push(_local7);
}
if (_local27.length > 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output((((_sID() + " ") + _local36) + " SET STARTS: ") + [("[" + _local33) + "]", ("[" + _local27) + "]"]);
}
_local35(_local36, _local33, _local27, 0);
}
}
}
if (setStart == true) {
} else {
var _local25;
var _local50;
var _local32;
var _local12;
var _local49;
var _local21;
var _local43 = "";
if (isFF == false) {
if (_local4.scope != undefined) {
_local23 = _local4.scope;
}
_local50 = ((_local4.skipLevel instanceof Function) ? (_local4.skipLevel.apply(_local23)) : (_local4.skipLevel));
var _local71 = ((_local4.extra1 instanceof Function) ? (_local4.extra1.apply(_local23)) : (_local4.extra1));
var _local70 = ((_local4.extra2 instanceof Function) ? (_local4.extra2.apply(_local23)) : (_local4.extra2));
var _local72 = ((_local4.roundResults instanceof Function) ? (_local4.roundResults.apply(_local23)) : (_local4.roundResults));
_local32 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
_local12 = {skipLevel:_local50, extra1:_local71, extra2:_local70, roundResults:_local72};
if (_local4.cycles != undefined) {
var _local55 = ((_local4.cycles instanceof Function) ? (_local4.cycles.apply(_local23)) : (_local4.cycles));
if (((Number(_local55) == 0) || (String(_local55).toUpperCase() == "LOOP")) && (_local74 != undefined)) {
delete _local4.cycles;
if (_local19 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("117", _sID());
}
} else {
_local32.cycles = (_local12.cycles = _local55);
}
}
if (((_local4.func != undefined) || (_local4.startfunc != undefined)) || (_local4.updfunc != undefined)) {
for (_local8 in _local4) {
if (_local8.indexOf("func") > -1) {
_local12[_local8] = _local4[_local8];
} else if (((_local8 == "startscope") || (_local8 == "updscope")) || (_local8.indexOf("args") > -1)) {
_local12[_local8] = _local4[_local8];
}
}
if (_local23 != undefined) {
if ((_local12.func != undefined) && (_local12.scope == undefined)) {
_local12.scope = _local23;
}
if ((_local12.updfunc != undefined) && (_local12.updscope == undefined)) {
_local12.updscope = _local23;
}
if ((_local12.startfunc != undefined) && (_local12.startscope == undefined)) {
_local12.startscope = _local23;
}
}
}
for (_local5 in _local12) {
_local43 = _local43 + (((_local5 + ":") + _local12[_local5]) + "|");
}
if (_local4.event != undefined) {
_local25 = {scope:_local4.scope, e:_local4.event, ep:_local4.eventparams, skipLevel:_local50};
}
_local49 = _local4.trigger === true;
_local21 = undefined;
if ((_local49 == false) && (_local4.trigger != undefined)) {
_local21 = ((_local4.trigger instanceof Function) ? (_local4.trigger.apply(_local23)) : (_local4.trigger));
if (typeof(_local21) == "string") {
_local21 = ((String(_local21).charAt(0) == "-") ? (-parseClock(String(_local21).slice(1))) : (parseClock(String(_local21))));
}
if (_global.isNaN(_local21) == true) {
_local21 = undefined;
}
}
}
var _local18;
var _local13;
var _local22;
var _local15;
var _local42 = false;
var _local53 = ((_local56 == false) ? (_local16) : ([0]));
var _local34 = -1;
for (_local8 in _local53) {
if (_nPlaying < 2) {
return(null);
}
if (isFF == false) {
if (_local4.ease != null) {
_local22 = _local4.ease;
if (_local22 instanceof Function) {
var _local44 = Function(_local22);
if (typeof(_local44(1, 1, 1, 1)) != "number") {
_local22 = _local44.apply(_local23);
}
}
}
if (_local22 == null) {
_local22 = defaultEase;
}
_local13 = ((_local4.seconds instanceof Function) ? (_local4.seconds.apply(_local23)) : (_local4.seconds));
if (_local13 != undefined) {
if (typeof(_local13) == "string") {
_local13 = parseClock(String(_local13));
}
if (_global.isNaN(_local13) == true) {
_local13 = _ZigoEngine.DURATION || 0;
}
}
if (_local13 == null) {
_local13 = defaultSeconds;
}
_local18 = ((_local4.delay instanceof Function) ? (_local4.delay.apply(_local23)) : (_local4.delay));
if (typeof(_local18) == "string") {
_local18 = parseClock(String(_local18));
}
if ((_local18 == null) || (_global.isNaN(_local18) == true)) {
_local18 = 0;
}
if (_local56 == true) {
continue;
}
}
var _local36 = _local53[_local8];
var _local9 = [];
var _local11 = [];
var _local46 = 0;
var _local14 = -2;
for (var _local64 in _local4.oEP) {
var _local7 = _local4.oEP[_local64];
if (_local7 instanceof Function) {
_local7 = _local7.apply(_local23);
}
if ((_local7 === true) || (_local7 === false)) {
if (_local15 == undefined) {
_local15 = {};
}
_local15[_local64] = _local7;
_local46++;
continue;
}
if (typeof(_local7) == "object") {
if (_local7[0]._isAF == true) {
for (_local6 in _local7) {
if (_local7[_local6].targ == _local36) {
_local7 = _local7[_local6].val;
break;
}
}
} else {
var _local28 = ((_local7 instanceof Array) ? [] : {});
for (_local6 in _local7) {
_local28[_local6] = ((_local7[_local6] instanceof Function) ? Function(_local7[_local6]).apply(_local23) : _local7[_local6]);
}
_local7 = _local28;
}
}
if (_local7 != "IGNORE") {
if (_local64 == "_bezier_") {
_local14 = _local9.length;
} else if ((_local14 == -2) && ((_local64 == "controlX") || (_local64 == "controlY"))) {
_local14 = -1;
}
_local9.push(_local64);
_local11.push(_local7);
}
}
if (_local11.length > 0) {
if (_local14 > -2) {
if (_local14 == -1) {
_local14 = _local9.length;
}
_local9[_local14] = "_bezier_";
if (typeof(_local11[_local14]) != "object") {
_local11[_local14] = {};
}
var _local37 = _local11[_local14];
for (_local5 in _local9) {
if ("|x|y|_x|_y|controlX|controlY|".indexOf(("|" + _local9[_local5]) + "|") > -1) {
if (_local9[_local5].charAt(0) == "_") {
_local9[_local5] = _local9[_local5].slice(-1);
}
if (typeof(_local37[_local9[_local5]]) == "number") {
if ((_local19 > 0) && ((_local34 == -1) || (_local34 == _local8))) {
com.mosesSupposes.fuse.FuseKitCommon.error("115", _sID(), _local9[_local5]);
_local34 = Number(_local8);
}
} else {
_local37[_local9[_local5]] = _local11[_local5];
}
_local9.splice(Number(_local5), 1);
_local11.splice(Number(_local5), 1);
}
}
}
if (isFF == true) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((("\n-" + _sID()) + " FF\ttargets:[") + _local36) + "]\tprops:[") + _local9.toString()) + "]");
}
_local35(_local36, _local9, _local11, 0, null, 0, {skipLevel:0});
continue;
}
var _local31 = {caught:false, onTweenEnd:function (evto) {
this.caught = true;
}};
_local36.addListener(_local31);
var _local17 = _local35(_local36, _local9, _local11, _local13, _local22, _local18, _local12);
_local36.removeListener(_local31);
if (_local17.length == 0) {
if (_local31.caught == true) {
_local12 = _local32;
}
} else {
if (_local17.length > 0) {
var _local38 = {targ:_local36, props:_local17, bools:_local15, targZID:_local36.__zigoID__};
if (_local42 == false) {
_local12 = _local32;
_local38.event = _local25;
_local15 = undefined;
_local25 = _local15;
_local38.trigger = _local49;
}
_aTweens.push(_local38);
_local36.addListener(this);
_local42 = true;
for (_local5 in _local17) {
if (_local24.indexOf(_local17[_local5] + ",") == -1) {
_local24 = _local24 + (_local17[_local5] + ",");
}
}
}
if (_local19 == 3) {
var _local45 = _local9.toString();
if (_local17.length > _local9.length) {
_local45 = _local45 + (("\n\t[NO-CHANGE PROPS DISCARDED (disregard this for double props like _scale). KEPT:" + _local17.toString()) + "]");
}
var _local30 = "";
for (_local5 in _local11) {
_local30 = (((typeof(_local11[_local5]) == "string") ? (("\"" + _local11[_local5]) + "\"") : _local11[_local5]) + ", ") + _local30;
}
com.mosesSupposes.fuse.FuseKitCommon.output((("\n-" + _sID()) + " TWEEN:\n") + [("\t[getTimer():" + getTimer()) + "] ", "targ: " + _local36, "props: " + _local45, "endVals: " + _local30, "time: " + ((_local13 == undefined) ? _ZigoEngine.DURATION : _local13), "easing: " + ((_local22 == undefined) ? _ZigoEngine.EASING : _local22), "delay: " + ((_local18 == undefined) ? 0 : _local18), "callbacks: " + ((_local43 == "") ? "(none)" : _local43)].join("\n\t"));
}
}
_local31 = undefined;
}
}
if ((_global.isNaN(_local13) == true) || (_local4.seconds == null)) {
_local13 = 0;
}
var _local39 = _local18 + _local13;
if (_local21 != undefined) {
if (_local21 < 0) {
_local21 = _local21 + _local39;
}
if ((_local21 > 0) && ((_local39 == 0) || (_local21 < _local39))) {
if (_local39 == 0) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " graft a timed trigger (") + _local21) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(null, _local21, 0, true, _local15, _local12, _local25);
_local42 = true;
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((_sID() + " graft a timed trigger (") + _local21) + " sec).");
}
doTimerTween(null, _local21, 0, true);
}
} else if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((_sID() + " timed trigger discarded: out of range. [") + _local21) + "/") + _local39) + "]");
}
}
if ((_local42 == false) && (((_local12 != _local32) || (_local25 != undefined)) || (_local15 != undefined))) {
if ((_local50 == 0) && (_local39 > 0)) {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((((_sID() + " no props tweened - graft a delay (") + _local39) + " sec). [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
doTimerTween(_local16, _local13, _local18, _local49, _local15, _local12, _local25);
} else {
if (_local19 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((((((_sID() + " no props tweened, executing nontween items. [has callback:") + (_local12 != _local32)) + ", has event:") + (_local25 != undefined)) + ", has booleans:") + (_local15 != undefined)) + "]");
}
for (_local8 in _local16) {
for (_local5 in _local15) {
_local16[_local8][_local5] = _local15[_local5];
}
}
if (_local50 < 2) {
if (_local12 != undefined) {
fireEvents(_local12, _local23, _local19, _local16);
}
if (_local25 != undefined) {
fireEvents(_local25, _local23, _local19);
}
}
}
}
}
}
_local51++;
}
if ((_local66 > 0) && (_local19 > 0)) {
if ((_local66 == _aProfiles.length) && (_local24 == "")) {
com.mosesSupposes.fuse.FuseKitCommon.error("118", _sID(), setStart);
} else {
com.mosesSupposes.fuse.FuseKitCommon.error("119", _sID(), _local66, _local75);
}
}
tba = undefined;
_oTwBeingAdded = undefined;
return(((_local24 == "") ? null : (_local24.slice(0, -1))));
}
function doTimerTween(actualTargets, duration, delay, trigger, booleans, callback, event) {
var _local2 = {__TweenedDelay:0};
_ZigoEngine.initializeTargets(_local2);
_aTweens.push({targ:_local2, props:["__TweenedDelay"], trigger:trigger, bools:booleans, event:event, actualTargs:actualTargets, targZID:_local2.__zigoID__});
var _local3 = _ZigoEngine.doTween(_local2, "__TweenedDelay", 1, duration, null, delay, callback) == null;
if (_local3 == true) {
onTweenEnd({target:_local2, props:["__TweenedDelay"]});
} else {
_local2.addListener(this);
}
}
function onTweenEnd(o, doAutoStop) {
if (_nPlaying < 1) {
return(undefined);
}
var _local12 = _global.com.mosesSupposes.fuse.Fuse;
var _local8 = ((_local12 != undefined) ? (_local12.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
var _local11 = ((!(o.__zigoID__ === undefined)) ? (o.__zigoID__) : (o.target.__zigoID__));
for (var _local19 in _aTweens) {
var _local3 = _aTweens[_local19];
if (_local3.targZID == _local11) {
for (var _local18 in o.props) {
var _local7 = _local3.props;
for (var _local16 in _local7) {
var _local5 = _local7[_local16];
if (_local5 == o.props[_local18]) {
_local7.splice(Number(_local16), 1);
if (doAutoStop == true) {
var _local6 = _local12.getInstance(_nFuseID);
var _local10 = (((_bTrigger == true) && (o.during == "add")) && (_local6[_local6.currentIndex]._oTwBeingAdded[_local11] === true)) && (_local6.state == "playing");
if (_local10 == false) {
_local3.targ.removeListener(this);
for (var _local19 in _aTweens) {
if (_aTweens[_local19].targZID == _local11) {
for (var _local18 in o.props) {
for (var _local16 in _aTweens[_local19].props) {
if (_aTweens[_local19].props[_local16] == o.props[_local18]) {
_aTweens[_local19].props.splice(Number(_local16), 1);
}
}
}
if (_aTweens[_local19].props.length == 0) {
_aTweens.splice(Number(_local19), 1);
}
}
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " triggering auto-stop due to interruption");
}
if ((_local6.autoClear == true) || ((!(_local6.autoClear === false)) && (_local12.AUTOCLEAR == true))) {
dispatchRequest("destroy");
} else {
dispatchRequest("stop");
}
return(undefined);
}
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(((("note -" + _sID()) + " interrupted one of its own properties \"") + _local5) + "\". (Autostop not triggered.)");
}
}
if ((_nPlaying == 2) && (_local5 != "__TweenedDelay")) {
if (_local8 > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("120", _sID(), _local5);
}
}
if (_local7.length == 0) {
if (_local3.event != undefined) {
fireEvents(_local3.event, null, _local8);
}
if (_local5 == "__TweenedDelay") {
_ZigoEngine.deinitializeTargets(_local3.targ);
delete _local3.targ;
for (var _local14 in _local3.bools) {
for (var _local13 in _local3.actualTargs) {
_local3.actualTargs[_local13][_local14] = _local3.bools[_local14];
}
}
} else {
var _local9 = false;
for (var _local14 in _local3.bools) {
_local3.targ[_local14] = _local3.bools[_local14];
}
for (var _local15 in _aTweens) {
if ((_local15 != _local19) && (_aTweens[_local15].targ == _local3.targ)) {
_local9 = true;
}
}
if (_local9 == false) {
_local3.targ.removeListener(this);
}
}
if (_local3.trigger == true) {
if (((_bTrigger == false) && (o.isResume != true)) && (_aTweens.length > 1)) {
_bTrigger = true;
if (_local8 == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " trigger fired!");
}
var breakChainInt;
breakChainInt = setInterval(function (fi) {
clearInterval(breakChainInt);
fi.dispatchRequest("advance", [false, false, false]);
}, 1, this);
}
}
_aTweens.splice(Number(_local19), 1);
}
}
}
}
}
}
if (((_aTweens.length == 0) && (_nPlaying == 1)) && (o.isResume != true)) {
complete(_local8);
}
}
function onTweenInterrupt(o) {
if (_nPlaying == -1) {
return(undefined);
}
var _local4 = _global.com.mosesSupposes.fuse.Fuse;
var _local6 = _local4.getInstance(_nFuseID);
var _local8 = (_local6.autoStop == true) || ((!(_local6.autoStop === false)) && (_local4.AUTOSTOP == true));
var _local3 = o.__zigoID__;
var _local9 = ((_local4 != undefined) ? (_local4.OUTPUT_LEVEL) : (_ZigoEngine.OUTPUT_LEVEL));
if ((_local8 == true) || ((!(_local8 === false)) && (_local4.AUTOSTOP == true))) {
onTweenEnd(o, true);
return(undefined);
}
if (typeof(o.target) != "string") {
onTweenEnd(o);
return(undefined);
}
for (var _local5 in _aTweens) {
if (_aTweens[_local5].targZID == _local3) {
_aTweens.splice(Number(_local5), 1);
}
}
if ((_aTweens.length == 0) && (_nPlaying == 1)) {
complete(_local9);
}
}
function complete(outputLevel) {
if (outputLevel == 3) {
com.mosesSupposes.fuse.FuseKitCommon.output(_sID() + " complete.");
}
var breakChainInt;
breakChainInt = setInterval(function (fi, trigger) {
clearInterval(breakChainInt);
var _local1 = fi._nPlaying;
if (trigger != true) {
if (_local1 < 1) {
return(undefined);
}
}
fi.stop();
if (_local1 > 0) {
fi.dispatchRequest("advance", [trigger, false, false]);
}
}, 1, this, _bTrigger);
}
function parseClock(str) {
if (str.indexOf(":") != 2) {
com.mosesSupposes.fuse.FuseKitCommon.error("121");
return(_ZigoEngine.DURATION || 0);
}
var _local4 = 0;
var _local3 = str.split(":");
_local3.reverse();
var _local2;
if ((String(_local3[0]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[0]))) == false)) {
_local4 = _local4 + (_local2 / 100);
}
if (((String(_local3[1]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[1]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + _local2;
}
if (((String(_local3[2]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[2]))) == false)) && (_local2 < 60)) {
_local4 = _local4 + (_local2 * 60);
}
if (((String(_local3[3]).length == 2) && (_global.isNaN(_local2 = Math.abs(Number(_local3[3]))) == false)) && (_local2 < 24)) {
_local4 = _local4 + (_local2 * 3600);
}
return(_local4);
}
function fireEvents(o, scope, outputLevel, targets) {
if (o.scope == undefined) {
o.scope = scope;
}
if (o.e == undefined) {
var _local3 = com.mosesSupposes.fuse.FuseKitCommon.parseCallback(o, targets, outputLevel, false);
if (_local3.start.f != null) {
_local3.start.f.apply(_local3.start.s, _local3.start.a);
}
if (_local3.upd.f != null) {
_local3.upd.f.apply(_local3.upd.s, _local3.upd.a);
}
if (_local3.end.f != null) {
_local3.end.f.apply(_local3.end.s, _local3.end.a);
}
} else {
var _local6 = ((o.e instanceof Function) ? (String(o.e.apply(scope))) : (String(o.e)));
if ((_local6 != "undefined") && (_local6.length > 0)) {
if (String(com.mosesSupposes.fuse.FuseKitCommon._fuseEvents()).indexOf(("|" + _local6) + "|") > -1) {
if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("122", _local6);
}
} else {
var _local7 = _global.com.mosesSupposes.fuse.Fuse.getInstance(_nFuseID);
var _local5 = ((o.ep instanceof Function) ? (o.ep.apply(scope)) : (o.ep));
if ((_local5 == null) || (typeof(_local5) != "object")) {
_local5 = {};
}
_local5.target = _local7;
_local5.type = _local6;
_local7.dispatchEvent.call(_local7, _local5);
}
} else if (outputLevel > 0) {
com.mosesSupposes.fuse.FuseKitCommon.error("123", _sID());
}
}
}
static var registryKey = "fuseItem";
static var ADD_UNDERSCORES = true;
var _nPlaying = -1;
var _bStartSet = false;
var _bTrigger = false;
}
Symbol 1386 MovieClip [__Packages.SuccessBar] Frame 0
class SuccessBar extends MovieClip
{
var _progress, gotoAndStop, mcDisk, __get__Text, _x, _y;
function SuccessBar () {
super();
Progress = (0);
Text = ("+1");
}
function get Progress() {
return(_progress);
}
function set Progress(value) {
_progress = Math.floor(Math.min(100, Math.max(0, value)));
gotoAndStop(_progress + 1);
//return(Progress);
}
function set Text(value) {
mcDisk.strValue = value;
//return(__get__Text());
}
function get DiskPosition() {
return(new Point(_x + mcDisk._x, _y + mcDisk._y));
}
}
Symbol 1387 MovieClip [__Packages.com.mosesSupposes.fuse.PennerEasing] Frame 0
class com.mosesSupposes.fuse.PennerEasing
{
function PennerEasing () {
}
static function linear(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInQuad(t, b, c, d) {
t = t / d;
return(((c * t) * t) + b);
}
static function easeOutQuad(t, b, c, d) {
t = t / d;
return((((-c) * t) * (t - 2)) + b);
}
static function easeInOutQuad(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((c / 2) * t) * t) + b);
}
t--;
return((((-c) / 2) * ((t * (t - 2)) - 1)) + b);
}
static function easeInExpo(t, b, c, d) {
return(((t == 0) ? (b) : ((c * Math.pow(2, 10 * ((t / d) - 1))) + b)));
}
static function easeOutExpo(t, b, c, d) {
return(((t == d) ? (b + c) : ((c * ((-Math.pow(2, (-10 * t) / d)) + 1)) + b)));
}
static function easeInOutExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.pow(2, 10 * (t - 1))) + b);
}
t--;
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 2)) + b);
}
static function easeOutInExpo(t, b, c, d) {
if (t == 0) {
return(b);
}
if (t == d) {
return(b + c);
}
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * ((-Math.pow(2, -10 * t)) + 1)) + b);
}
return(((c / 2) * (Math.pow(2, 10 * (t - 2)) + 1)) + b);
}
static function easeInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
t = t - 1;
return((-((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
static function easeOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / d;
if (t == 1) {
return(b + c);
}
if (!p) {
p = d * 0.3;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
return((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) + c) + b);
}
static function easeInOutElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
t = t - 1;
return((-0.5 * ((a * Math.pow(2, 10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + b);
}
t = t - 1;
return(((((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)) * 0.5) + c) + b);
}
static function easeOutInElastic(t, b, c, d, a, p) {
var _local5;
if (t == 0) {
return(b);
}
t = t / (d / 2);
if (t == 2) {
return(b + c);
}
if (!p) {
p = d * 0.45;
}
if ((!a) || (a < Math.abs(c))) {
a = c;
_local5 = p / 4;
} else {
_local5 = (p / (Math.PI*2)) * Math.asin(c / a);
}
if (t < 1) {
return(((0.5 * ((a * Math.pow(2, -10 * t)) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p))) + (c / 2)) + b);
}
return(((c / 2) + (0.5 * ((a * Math.pow(2, 10 * (t - 2))) * Math.sin((((t * d) - _local5) * (Math.PI*2)) / p)))) + b);
}
static function easeInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / d;
return((((c * t) * t) * (((s + 1) * t) - s)) + b);
}
static function easeOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = (t / d) - 1;
return((c * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
static function easeInOutBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
s = s * 1.525;
return(((c / 2) * ((t * t) * (((s + 1) * t) - s))) + b);
}
t = t - 2;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 2)) + b);
}
static function easeOutInBack(t, b, c, d, s) {
if (s == undefined) {
s = 1.70158;
}
t = t / (d / 2);
if (t < 1) {
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) + s)) + 1)) + b);
}
t--;
s = s * 1.525;
return(((c / 2) * (((t * t) * (((s + 1) * t) - s)) + 1)) + b);
}
static function easeOutBounce(t, b, c, d) {
t = t / d;
if (t < 0.363636363636364) {
return((c * ((7.5625 * t) * t)) + b);
}
if (t < 0.727272727272727) {
t = t - 0.545454545454545;
return((c * (((7.5625 * t) * t) + 0.75)) + b);
}
if (t < 0.909090909090909) {
t = t - 0.818181818181818;
return((c * (((7.5625 * t) * t) + 0.9375)) + b);
}
t = t - 0.954545454545455;
return((c * (((7.5625 * t) * t) + 0.984375)) + b);
}
static function easeInBounce(t, b, c, d) {
return((c - easeOutBounce(d - t, 0, c, d)) + b);
}
static function easeInOutBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeInBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeOutBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeOutInBounce(t, b, c, d) {
if (t < (d / 2)) {
return((easeOutBounce(t * 2, 0, c, d) * 0.5) + b);
}
return(((easeInBounce((t * 2) - d, 0, c, d) * 0.5) + (c * 0.5)) + b);
}
static function easeInCubic(t, b, c, d) {
t = t / d;
return((((c * t) * t) * t) + b);
}
static function easeOutCubic(t, b, c, d) {
t = (t / d) - 1;
return((c * (((t * t) * t) + 1)) + b);
}
static function easeInOutCubic(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((c / 2) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((t * t) * t) + 2)) + b);
}
static function easeOutInCubic(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((t * t) * t) + 1)) + b);
}
static function easeInQuart(t, b, c, d) {
t = t / d;
return(((((c * t) * t) * t) * t) + b);
}
static function easeOutQuart(t, b, c, d) {
t = (t / d) - 1;
return(((-c) * ((((t * t) * t) * t) - 1)) + b);
}
static function easeInOutQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((((c / 2) * t) * t) * t) * t) + b);
}
t = t - 2;
return((((-c) / 2) * ((((t * t) * t) * t) - 2)) + b);
}
static function easeOutInQuart(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return((((-c) / 2) * ((((t * t) * t) * t) - 1)) + b);
}
t--;
return(((c / 2) * ((((t * t) * t) * t) + 1)) + b);
}
static function easeInQuint(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOutQuint(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOutQuint(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static function easeOutInQuint(t, b, c, d) {
t = t / (d / 2);
t--;
return(((c / 2) * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInSine(t, b, c, d) {
return((((-c) * Math.cos((t / d) * (Math.PI/2))) + c) + b);
}
static function easeOutSine(t, b, c, d) {
return((c * Math.sin((t / d) * (Math.PI/2))) + b);
}
static function easeInOutSine(t, b, c, d) {
return((((-c) / 2) * (Math.cos((Math.PI * t) / d) - 1)) + b);
}
static function easeOutInSine(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((c / 2) * Math.sin((Math.PI * t) / 2)) + b);
}
t--;
return((((-c) / 2) * (Math.cos((Math.PI * t) / 2) - 2)) + b);
}
static function easeInCirc(t, b, c, d) {
t = t / d;
return(((-c) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
static function easeOutCirc(t, b, c, d) {
t = (t / d) - 1;
return((c * Math.sqrt(1 - (t * t))) + b);
}
static function easeInOutCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return((((-c) / 2) * (Math.sqrt(1 - (t * t)) - 1)) + b);
}
t = t - 2;
return(((c / 2) * (Math.sqrt(1 - (t * t)) + 1)) + b);
}
static function easeOutInCirc(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
t--;
return(((c / 2) * Math.sqrt(1 - (t * t))) + b);
}
t--;
return(((c / 2) * (2 - Math.sqrt(1 - (t * t)))) + b);
}
static var registryKey = "pennerEasing";
}
Symbol 1388 MovieClip [__Packages.ShopGood] Frame 0
class ShopGood extends MovieClip
{
var mcSold, textPrice, textWarning, __get__Warning, _enabled, mcBg, mcKrest, mcAnim, _payed, __get__Payed, _good, OnClick;
function ShopGood () {
super();
Price = ("");
Enabled = (false);
Good = (GOOD_FLOWERS);
mcSold._visible = false;
}
function set Price(value) {
textPrice.text = value;
//return(Price);
}
function get Price() {
return(textPrice.text);
}
function set Warning(value) {
textWarning.text = value;
//return(__get__Warning());
}
function get Enabled() {
return(_enabled);
}
function set Enabled(value) {
_enabled = value;
if (_enabled) {
mcBg.gotoAndStop(1);
} else {
mcBg.gotoAndStop(2);
}
mcKrest._visible = !_enabled;
textWarning._visible = !_enabled;
if (_enabled) {
Helper.ClearGrayscale(mcAnim);
} else {
Helper.SetGrayscale(mcAnim);
}
//return(Enabled);
}
function set Payed(value) {
_payed = value;
mcSold._visible = _payed;
//return(__get__Payed());
}
function get Good() {
return(_good);
}
function set Good(value) {
_good = value;
mcAnim.gotoAndStop(_good + 1);
//return(Good);
}
function onPress(Void) {
if ((Enabled && (!_payed)) && (OnClick != undefined)) {
OnClick(this);
}
}
static var GOODS_NAMES = ["flowers", "daily", "picture", "divan", "aqua", "table", "bra", "phone", "star"];
static var GOOD_FLOWERS = 0;
static var GOOD_DAILY = 1;
static var GOOD_PICTURE = 2;
static var GOOD_TV = 3;
static var GOOD_AQUA = 4;
static var GOOD_TABLE = 5;
static var GOOD_LAMP = 6;
static var GOOD_PHONE = 7;
static var GOOD_STARS = 8;
static var GOOD_MAX = 9;
}
Symbol 1389 MovieClip [__Packages.Shop] Frame 0
class Shop extends MovieClip
{
var _inited, BayedGoods, _game, __get__game, btnMenu, btnPlay, textPopularLabel, textPriceLabel, _goods, good0, good1, good2, good3, good4, good5, good6, good7, good8, OnClose, OnMenu, _good_detail_window, attachMovie, getNextHighestDepth, slider, textPopular, textPrice;
function Shop () {
super();
_inited = false;
BayedGoods = new Array();
}
function onEnterFrame() {
if (!_inited) {
Init();
Update();
_inited = true;
}
}
function set game(value) {
_game = value;
if (_inited) {
Update();
}
//return(__get__game());
}
function Init() {
btnMenu.onPress = mx.utils.Delegate.create(this, MenuButtonClicked);
btnPlay.onPress = mx.utils.Delegate.create(this, PlayButtonClicked);
textPopularLabel.text = Language.Transl("shop popular");
textPriceLabel.text = Language.Transl("shop money");
btnPlay.buttonText = Language.Transl("shop butt play");
btnMenu.buttonText = Language.Transl("shop butt menu");
_goods = new Array(ShopGood.GOOD_MAX);
_goods = [good0, good1, good2, good3, good4, good5, good6, good7, good8];
var _local3;
var _local2 = 0;
while (_local2 < ShopGood.GOOD_MAX) {
_local3 = _goods[_local2];
_local3.OnClick = mx.utils.Delegate.create(this, GoodClicked);
_local2++;
}
}
function PlayButtonClicked() {
if (OnClose != undefined) {
OnClose(this);
}
}
function MenuButtonClicked() {
if (OnMenu != undefined) {
OnMenu(this);
}
}
function GoodClicked(good) {
if (_good_detail_window != undefined) {
_good_detail_window.removeMovieClip();
_good_detail_window = undefined;
}
_good_detail_window = GoodDetailWindow(attachMovie("GoodDetailWindow", "_good_detail_window", getNextHighestDepth()));
_good_detail_window.SetGood(good, _game.upgrades_config, _game.__get__Popularity(), Number(_game.upgrades_config[good.__get__Good()][0]) <= (_game._score - _game._spend_score));
_good_detail_window.OnBack = mx.utils.Delegate.create(this, DetailWindowBackClicked);
_good_detail_window.OnBuy = mx.utils.Delegate.create(this, DetailWindowBuyClicked);
}
function DetailWindowBackClicked() {
if (_good_detail_window != undefined) {
_good_detail_window.removeMovieClip();
_good_detail_window = undefined;
}
}
function DetailWindowBuyClicked() {
var _local2 = _good_detail_window.GoodType;
DetailWindowBackClicked();
if (_game._available_upgrades[_local2] == Game.UPGRADE_UNAVAILABLE) {
_game._available_upgrades[_local2] = Game.UPGRADE_AVAILABLE;
_game._spend_score = _game._spend_score + Number(_game.upgrades_config[_local2][0]);
BayedGoods.push(_local2);
Helper.PlaySound("bonus_buy");
}
Update();
}
function Update() {
var _local5 = 0;
_local5 = _local5 + (_game._current_level * 5);
var _local4 = _game.upgrades_config;
var _local3 = 0;
while (_local3 < ShopGood.GOOD_MAX) {
if (_game._available_upgrades[_local3] == Game.UPGRADE_AVAILABLE) {
_local5 = _local5 + Number(_local4[_local3][1]);
}
_local3++;
}
_game.__set__Popularity(_local5);
slider.__set__Value(_local5);
slider.__set__CursorText(_game.GetMaxChaevie(_local5).toString());
slider.__set__CursorValue(_game.GetMaxChaevie(_local5));
var _local2;
_local3 = 0;
while (_local3 < ShopGood.GOOD_MAX) {
_local2 = _goods[_local3];
_local2.__set__Good(_local3);
_local2.__set__Price("$ " + _local4[_local3][0]);
_local2.PopularBonus = _local4[_local3][1];
_local2.RequiredPopular = _local4[_local3][2];
_local2.__set__Enabled(_local2.RequiredPopular <= _local5);
if (Helper.DEBUG) {
_local2.__set__Enabled(true);
}
if (!_local2.__get__Enabled()) {
_local2.__set__Warning((Language.Transl("shop warning1") + _local2.RequiredPopular.toString()) + Language.Transl("shop warning2"));
}
_local2.__set__Payed(_game._available_upgrades[_local3] == Game.UPGRADE_AVAILABLE);
_local3++;
}
textPopular.text = _local5.toString();
trace("Shop update");
trace("_game._score = " + _game._score);
trace("_game._spend_score = " + _game._spend_score);
textPrice.text = (_game._score - _game._spend_score).toString();
if (textPrice.text == "NaN") {
textPrice.text = "0";
}
}
}
Symbol 1390 MovieClip [__Packages.StarsSlider] Frame 0
class StarsSlider extends MovieClip
{
var ReadOnly, _value, OnValueChanged, mcBeginStars, mcEndStars, mcCursor, getNextHighestDepth, attachMovie, __get__CursorText, __get__CursorValue;
function StarsSlider () {
super();
if (ReadOnly == undefined) {
ReadOnly = false;
}
Value = (0);
}
function get Value() {
return(_value);
}
function set Value(value) {
_value = Math.floor(Math.max(0, Math.min(100, value)));
Update();
if (OnValueChanged != undefined) {
OnValueChanged();
}
//return(Value);
}
function Update() {
ClearStars();
var _local3 = mcBeginStars._x;
var _local4 = (mcEndStars._x - mcBeginStars._x) / 100;
var _local2 = 0;
while (_local2 < Value) {
DrawStar(_local3, mcBeginStars._y, 100);
_local3 = _local3 + _local4;
_local2++;
}
_local3 = _local3 - _local4;
mcCursor._x = _local3;
Moneys(mcCursor.mcMoney).Enabled = false;
}
function DrawStar(x, y, alpha) {
var _local3 = getNextHighestDepth();
var _local2 = attachMovie("BarStar", "darStar" + _local3, _local3);
_local2._x = x;
_local2._y = y;
_local2._alpha = alpha;
}
function ClearStars() {
Helper.ClearArray2(_stars);
}
function set CursorText(value) {
TextField(mcCursor.textValue).text = value;
//return(__get__CursorText());
}
function set CursorValue(value) {
Moneys(mcCursor.mcMoney).__set__Value(value);
//return(__get__CursorValue());
}
var _stars = new Array();
}
Symbol 1391 MovieClip [__Packages.GoodDetailWindow] Frame 0
class GoodDetailWindow extends MovieClip
{
var btnBack, btnBuy, GoodType, mcGood, textPrice, textRequiredLabel, textTakeLabel, textRequired, textTake, textGoodName, textGoodDescribe, startBarBegin, startBarEnd, getNextHighestDepth, attachMovie, OnBack, OnBuy;
function GoodDetailWindow () {
super();
btnBack.buttonText = Language.Transl("shop back button");
btnBuy.buttonText = Language.Transl("shop buy button");
btnBack.OnClick = mx.utils.Delegate.create(this, BackClicked);
btnBuy.OnClick = mx.utils.Delegate.create(this, BuyClicked);
}
function SetGood(good, goods_config, current_rep, can_buy) {
GoodType = good.Good;
mcGood.gotoAndStop(good.__get__Good() + 1);
textPrice.text = good.Price;
textRequiredLabel.text = Language.Transl("detail require");
textTakeLabel.text = Language.Transl("detail take");
textRequired.text = good.RequiredPopular.toString();
textTake.text = good.PopularBonus.toString();
textGoodName.text = Language.Transl(("good" + good.__get__Good()) + "name");
textGoodDescribe.text = Language.Transl(("good" + good.__get__Good()) + "descr");
btnBuy._visible = can_buy;
ClearStars();
var _local3 = 0;
var _local2 = startBarBegin._x;
var _local4 = startBarBegin._y;
var _local5 = (startBarEnd._x - startBarBegin._x) / (100 / POPULAR_REP_STAR);
while (_local3 < (current_rep / POPULAR_REP_STAR)) {
DrawStar(_local2, _local4, 100);
_local2 = _local2 + _local5;
_local3++;
}
while (_local3 < ((current_rep / POPULAR_REP_STAR) + (good.PopularBonus / POPULAR_REP_STAR))) {
DrawStar(_local2, _local4, 50);
_local2 = _local2 + _local5;
_local3++;
}
}
function DrawStar(x, y, alpha) {
var _local3 = getNextHighestDepth();
var _local2 = attachMovie("BarStar", "darStar" + _local3, _local3);
_local2._x = x;
_local2._y = y;
_local2._alpha = alpha;
}
function ClearStars() {
Helper.ClearArray2(_stars);
}
function BackClicked() {
if (OnBack != undefined) {
OnBack();
}
}
function BuyClicked() {
if (OnBuy != undefined) {
OnBuy();
}
}
static var POPULAR_REP_STAR = 5;
var _stars = new Array();
}
Symbol 1392 MovieClip [__Packages.TipsWindow] Frame 0
class TipsWindow extends MovieClip
{
var btnShowTips, btnClose, textShowTips, _tip_id, OnClose, removeMovieClip, textTip;
function TipsWindow () {
super();
btnShowTips.OnValueChanged = mx.utils.Delegate.create(this, ShowTipsClicked);
btnClose.onPress = mx.utils.Delegate.create(this, CloseClicked);
textShowTips = Language.Transl("show tips");
btnShowTips.Value = TipsEnabled;
btnShowTips.SetValue(TipsEnabled);
}
function get Id() {
return(_tip_id);
}
function ShowTipsClicked(btn) {
trace("ShowTipsClicked!!!!!!!");
TipsEnabled = btnShowTips.Value;
}
function CloseClicked() {
if (OnClose != undefined) {
OnClose(this);
}
removeMovieClip();
this=undefined;//parameter overwritten
}
function Init(tip_id) {
_tip_id = tip_id;
textTip = Language.Transl(("tip" + _tip_id) + "text");
}
static function ShowTip(parent, tip_id) {
if ((ShowedTips[tip_id] != undefined) && (ShowedTips[tip_id] == true)) {
return(null);
}
ShowedTips[tip_id] = new Boolean(true);
if (!TipsEnabled) {
return(null);
}
var _local2 = parent.getNextHighestDepth();
var _local1 = TipsWindow(parent.attachMovie("TipsWindow", "TipsWindow" + _local2, _local2));
_local1._x = 0;
_local1._y = 0;
_local1.Init(tip_id);
Helper.PlaySound("tip");
return(_local1);
}
function Close() {
CloseClicked();
}
static var TIP_GIVE_KEYS = 1;
static var TIP_TAKE_KEYS = 2;
static var TIP_COFFEE = 3;
static var TIP_CLICK_DOOR = 4;
static var TIP_CLEAN_ROOM = 5;
static var TIP_SHOP = 15;
static var TIP_MAX = 16;
static var TipsEnabled = true;
static var ShowedTips = new Array(TIP_MAX);
}
Symbol 1393 MovieClip [__Packages.Pathfinding] Frame 0
class Pathfinding
{
var mapStatus, openList;
function Pathfinding () {
}
function isOpen(y, x) {
return(mapStatus[y][x].open);
}
function isClosed(y, x) {
return(mapStatus[y][x].closed);
}
function nearerSquare() {
var _local5 = 999999 /* 0x0F423F */;
var _local6 = 0;
var _local3;
var _local4;
var _local2 = openList.length;
while ((_local2--) > 0) {
_local4 = mapStatus[openList[_local2][0]][openList[_local2][1]];
_local3 = _local4.heuristic + _local4.movementCost;
if (_local3 <= _local5) {
_local5 = _local3;
_local6 = _local2;
}
}
return(_local6);
}
function closeSquare(y, x) {
var _local3 = openList.length;
var _local2 = 0;
while (_local2 < _local3) {
if (openList[_local2][0] == y) {
if (openList[_local2][1] == x) {
openList.splice(_local2, 1);
break;
}
}
_local2++;
}
mapStatus[y][x].open = false;
mapStatus[y][x].closed = true;
}
function openSquare(y, x, parent, movementCost, heuristic, replacing) {
if (!replacing) {
openList.push([y, x]);
mapStatus[y][x] = {heuristic:heuristic, open:true, closed:false};
}
mapStatus[y][x].parent = parent;
mapStatus[y][x].movementCost = movementCost;
}
function findPathInternal(map, startY, startX, endY, endX) {
if ((startY == undefined) || (startX == undefined)) {
return(null);
}
if ((endY == undefined) || (endX == undefined)) {
return(null);
}
var _local11 = map.length;
var _local13 = map[0].length;
mapStatus = new Array();
var _local12 = 0;
while (_local12 < _local11) {
mapStatus[_local12] = new Array();
_local12++;
}
openList = new Array();
openSquare(startY, startX, undefined, 0);
while ((openList.length > 0) && (!isClosed(endY, endX))) {
_local12 = nearerSquare();
var _local7 = openList[_local12][0];
var _local8 = openList[_local12][1];
closeSquare(_local7, _local8);
var _local3 = _local7 - 1;
while (_local3 < (_local7 + 2)) {
var _local2 = _local8 - 1;
while (_local2 < (_local8 + 2)) {
if (((((((_local3 >= 0) && (_local3 < _local11)) && (_local2 >= 0)) && (_local2 < _local13)) && (!((_local3 == _local7) && (_local2 == _local8)))) && ((ALLOW_DIAGONAL || (_local3 == _local7)) || (_local2 == _local8))) && (((ALLOW_DIAGONAL_CORNERING || (_local3 == _local7)) || (_local2 == _local8)) || ((map[_local3][_local8] != 0) && (map[_local7][_local2])))) {
if (map[_local3][_local2] != 0) {
if (!isClosed(_local3, _local2)) {
var _local4 = mapStatus[_local7][_local8].movementCost + ((((_local3 == _local7) || (_local2 == _local8)) ? (HV_COST) : (D_COST)) * map[_local3][_local2]);
if (isOpen(_local3, _local2)) {
if (_local4 < mapStatus[_local3][_local2].movementCost) {
openSquare(_local3, _local2, [_local7, _local8], _local4, undefined, true);
}
} else {
var _local6 = (Math.abs(_local3 - endY) + Math.abs(_local2 - endX)) * 10;
openSquare(_local3, _local2, [_local7, _local8], _local4, _local6, false);
}
}
}
}
_local2++;
}
_local3++;
}
}
var _local19 = isClosed(endY, endX);
if (_local19) {
var _local16 = new Array();
var _local7 = endY;
var _local8 = endX;
while ((_local7 != startY) || (_local8 != startX)) {
_local16.push([_local7, _local8]);
var _local14 = mapStatus[_local7][_local8].parent[0];
var _local15 = mapStatus[_local7][_local8].parent[1];
_local7 = _local14;
_local8 = _local15;
}
_local16.push([startY, startX]);
_local16.reverse();
return(_local16);
}
return(null);
}
static function findPath(map, startY, startX, endY, endX) {
var _local1 = new Pathfinding();
var _local2 = _local1.findPathInternal(map, startY, startX, endY, endX);
return(_local2);
}
var HV_COST = 10;
var D_COST = 14;
var ALLOW_DIAGONAL = true;
var ALLOW_DIAGONAL_CORNERING = true;
}
Symbol 1394 MovieClip [__Packages.Client] Frame 0
class Client extends Bot
{
var hitArea, mcHit, OnTargetReached, _wish_in_process, _y, _x, _visible, State, Wish, animation_direction, mcAnim, _client_model, UpdateBoxPosition, orderPosStay, orderPosSeat, mcOrder, _enabled, _model_config, moving_speed, _in_wish_waiting, _wish_waiting_time, _wishes_required, _wish_delay, _room, _mood, __get__InMoving, _wish_time, _wish_max_time, _state_time, _state_processed, game, WalkTo, _wish_delivered, OnClick, OnWishDelivered, OnWishComplete, OnWishFail, _ticks, mcTick;
function Client () {
super();
ClientModel = (MODEL_AUDIOBOY);
Die();
GoState(STATE_NONE);
BeginWish(WISH_NONE);
hitArea = mcHit;
mcHit._visible = false;
OnTargetReached = mx.utils.Delegate.create(this, TargetReached);
}
function get WishInProcess() {
return(_wish_in_process);
}
function toString() {
var _local2;
_local2 = (("Client x:" + _x) + ", y:") + _y;
_local2 = _local2 + (" visible:" + _visible);
_local2 = _local2 + (" State:" + State);
_local2 = _local2 + (" Wish:" + Wish);
return(_local2);
}
function SetAnimation(anim) {
animation_direction = anim;
mcAnim.gotoAndStop((animation_direction + 1) + (FRAMES_PER_MODEL * _client_model));
switch (animation_direction) {
case Bot.ANIM_COFFEE_FRAME :
case Bot.ANIM_READ_FRAME :
var _local2 = MovieClip(mcAnim.mcAbove);
_local2._visible = false;
_local2.diff_x = _local2._x;
_local2.diff_y = _local2._y;
}
UpdateBoxPosition();
var _local3 = ((((anim == Bot.ANIM_SEAT_FRAME) || (anim == Bot.ANIM_COFFEE_FRAME)) || (anim == Bot.ANIM_READ_FRAME)) ? (orderPosSeat) : (orderPosStay));
mcOrder._x = _local3.x;
mcOrder._y = _local3.y;
}
function UpdateAnimation() {
switch (animation_direction) {
case Bot.ANIM_COFFEE_FRAME :
case Bot.ANIM_READ_FRAME :
}
switch (State) {
case STATE_COFFEE_ON_TABLE :
case STATE_COFFEE_ON_DIVAN :
SetAnimation(Bot.ANIM_COFFEE_FRAME);
break;
case STATE_READ_ON_TABLE :
SetAnimation(Bot.ANIM_READ_FRAME);
break;
case STATE_SIT_ON_TABLE :
case STATE_SIT_ON_DIVAN :
if (Wish == WISH_TV) {
SetAnimation(Bot.ANIM_SEAT_FRAME);
} else if (Wish == WISH_COFFEE) {
if (!_wish_in_process) {
SetAnimation(Bot.ANIM_SEAT_FRAME);
} else {
SetAnimation(Bot.ANIM_COFFEE_FRAME);
}
} else if (Wish == WISH_READ) {
if (!_wish_in_process) {
SetAnimation(Bot.ANIM_SEAT_FRAME);
} else {
SetAnimation(Bot.ANIM_READ_FRAME);
}
}
break;
default :
super.UpdateAnimation();
}
}
function GetDrawedMovie() {
return(this);
}
function GetDrawedAboveMovie() {
if (((State == STATE_COFFEE_ON_TABLE) || (State == STATE_COFFEE_ON_DIVAN)) || (State == STATE_READ_ON_TABLE)) {
return(MovieClip(mcAnim.mcAbove));
}
return(null);
}
function Init(model_type, model_config) {
_enabled = true;
_visible = true;
GoState(STATE_NONE);
BeginWish(WISH_NONE);
ClientModel = (model_type);
_model_config = model_config;
moving_speed = _model_config.speed;
Mood = (INIT_MOOD);
room = (null);
_in_wish_waiting = false;
_wish_waiting_time = -1;
_wishes_required = 0;
_wish_in_process = false;
_wish_delay = new Array(WISH_MAX);
Helper.FillArray(_wish_delay, 0);
ClearTicks();
_live = true;
UpdateAnimation();
SetAnimation(Bot.ANIM_STAY);
}
function Die() {
State = STATE_NONE;
BeginWish(WISH_NONE);
_room = null;
_enabled = false;
_visible = false;
_live = false;
}
function get Live() {
return(_live);
}
function get ClientModel() {
return(_client_model);
}
function set ClientModel(value) {
_client_model = value;
//return(ClientModel);
}
function get Mood() {
return(_mood);
}
function set Mood(value) {
if (value == Number.NaN) {
value = 0;
}
_mood = Math.min(MAX_MOOD, Math.max(0, value));
if (_mood <= 0) {
GoLeaveHotel();
}
//return(Mood);
}
function set room(value) {
_room = value;
//return(room);
}
function get room() {
return(_room);
}
function get Progress() {
return(mcOrder.__get__Progress());
}
function Quant(dtime) {
super.Quant(dtime);
if ((Wish != WISH_NONE) && (!_wish_in_process)) {
if (!__get__InMoving()) {
_wish_time = _wish_time + dtime;
if (_wish_time >= _wish_max_time) {
WishFail();
}
mcOrder.__set__Progress((_wish_time * 100) / _wish_max_time);
mcOrder._visible = true;
} else {
mcOrder._visible = false;
}
} else {
mcOrder._visible = false;
}
_state_time = _state_time + dtime;
if (_in_wish_waiting) {
_wish_waiting_time = _wish_waiting_time + dtime;
}
if (!_state_processed) {
switch (State) {
case STATE_COMMING :
Tracer.trace("Client in COMMING");
Tracer.trace("Client trace: " + toString());
break;
case STATE_AT_HALL :
if (Wish != WISH_KEYS) {
BeginWish(WISH_KEYS);
} else if (game.ReceiptionIsFree()) {
GoState(STATE_AT_RECEIPTION);
WalkTo(game.orientierReceiption.GetPoint());
}
break;
case STATE_WALK_TO_ROOM :
WalkTo(room.orientierEnter.GetPoint());
_state_processed = true;
break;
case STATE_WALK_TO_EXIT :
WalkTo(game.orientierDoor.GetPoint());
_state_processed = true;
break;
case STATE_WALK_LEAVE_KEYS :
WalkTo(game.orientierReceiption.GetPoint());
_state_processed = true;
break;
case STATE_WALK_TO_TV :
WalkTo(game.orientierTv.GetPoint());
_state_processed = true;
break;
case STATE_WALK_TO_TABLE :
WalkTo(game.orientierTable.GetPoint());
_state_processed = true;
break;
case STATE_AT_ROOM :
if ((Wish == WISH_NONE) && (!_in_wish_waiting)) {
BeginWaitWish();
}
if (((Wish == WISH_NONE) && (_in_wish_waiting)) && (_wish_waiting_time > _model_config.delay)) {
RequestWish();
} else if (Wish != WISH_NONE) {
room.UpdateWish(this);
}
break;
case STATE_SIT_ON_DIVAN :
if ((Wish == WISH_TV) && (_wish_in_process)) {
if (!game.mebelTV.__get__InWorking()) {
FinishWatchTV();
}
}
break;
case STATE_COFFEE_ON_DIVAN :
if (_state_time > TIME_COFFEE_DIVAN) {
EndDrinkCoffee();
}
break;
case STATE_COFFEE_ON_TABLE :
if (_state_time > TIME_COFFEE_TABLE) {
EndDrinkCoffee();
}
break;
case STATE_READ_ON_TABLE :
if (_state_time <= TIME_READ) {
break;
}
EndReadDaily();
}
}
}
function BeginWaitWish() {
_in_wish_waiting = true;
_wish_waiting_time = 0;
}
function EndWaitWish() {
_in_wish_waiting = false;
_wish_waiting_time = -1;
}
function RequestWish() {
trace("RequestWish");
EndWaitWish();
if (Helper.DEBUG) {
}
if (_wishes_required >= game._ActionCountForClients) {
GoLeaveHotel();
return(undefined);
}
var _local5 = -1;
var _local4 = new Array();
var _local2 = 0;
while (_local2 < game._available_wishes.length) {
if (_wish_delay[game._available_wishes[_local2]] == 0) {
_local4.push(game._available_wishes[_local2]);
}
_local2++;
}
trace("wishes1=" + _local4);
if (_local4.length == 0) {
_local4 = Helper.CopyArray(game._available_wishes);
}
if (!game.__get__DivanIsVacant()) {
_local4 = Helper.SubtractArray(_local4, [WISH_TV]);
}
trace("wishes2=" + _local4);
var _local3 = new Array(_local4.length);
var _local6 = 0;
_local2 = 0;
while (_local2 < _local3.length) {
_local3[_local2] = Number(_model_config.wishes[_local4[_local2]][CONFIG_PROCENT_VIPADENIYA]);
_local6 = _local6 + _local3[_local2];
_local2++;
}
_local6 = Math.random() * _local6;
_local2 = 0;
while (_local2 < _local3.length) {
_local6 = _local6 - _local3[_local2];
if (_local6 <= 0) {
_local5 = _local4[_local2];
break;
}
_local2++;
}
if (((_local5 < 0) || (_local5 == undefined)) || (_local5 == Number.NaN)) {
_local5 = _local4[_local4.length - 1];
}
if (((_local5 < 0) || (_local5 == undefined)) || (_local5 == Number.NaN)) {
_local5 = WISH_COFFEE;
}
var _local7 = [0];
if ((_local5 == WISH_COFFEE) && (game.__get__DivanIsVacant())) {
_local7.push(1);
}
if (((_local5 == WISH_COFFEE) || (_local5 == WISH_READ)) && (game.__get__TableIsVacant())) {
_local7.push(2);
}
var _local8 = Number(Helper.GetRandomFromArray(_local7));
if (_local8 == 1) {
GoState(STATE_WALK_TO_TV);
} else if (_local8 == 2) {
GoState(STATE_WALK_TO_TABLE);
}
BeginWish(_local5);
_wish_delay[_local5] = _wish_delay[_local5] + Number(_model_config.wishes[_local5][CONFIG_WISH_DELAY]);
_local2 = 0;
while (_local2 < WISH_MAX) {
if (_local2 != _local5) {
_wish_delay[_local2] = Math.max(0, _wish_delay[_local2] - 1);
}
_local2++;
}
}
function TargetReached() {
switch (State) {
case STATE_AT_RECEIPTION :
game.ShowTip(TipsWindow.TIP_GIVE_KEYS);
switch (ClientModel) {
case MODEL_WOMAN :
Helper.PlaySound("female_hello");
break;
default :
Helper.PlaySound("male_hello");
}
break;
case STATE_WALK_TO_ROOM :
GoState(STATE_AT_ROOM);
break;
case STATE_WALK_TO_EXIT :
game.mebelDver.PlayCharComout(this);
break;
case STATE_WALK_LEAVE_KEYS :
game.mebelReceiption.ReturnBackKey();
room.__set__Status(Room.FREE);
if (game._current_level > 1) {
room.RequestClean();
}
room = (null);
game.PlaceMoneyOnTable();
GoState(STATE_WALK_TO_EXIT);
break;
case STATE_WALK_TO_TV :
game.mebelDivan.AttachChar(this);
SetAnimation(Bot.ANIM_SEAT);
GoState(STATE_SIT_ON_DIVAN);
break;
case STATE_WALK_TO_TABLE :
game.mebelTable.AttachChar(this);
SetAnimation(Bot.ANIM_SEAT);
GoState(STATE_SIT_ON_TABLE);
}
}
function GoState(newstate) {
trace("GoState: " + newstate);
_state_processed = false;
_state_time = 0;
if (State != newstate) {
if (!(newstate === STATE_AT_ROOM)) {
} else {
room.Close();
_visible = false;
}
if (((newstate != STATE_SIT_ON_DIVAN) && (newstate != STATE_COFFEE_ON_DIVAN)) && (newstate != STATE_READ_ON_DIVAN)) {
if (((State == STATE_SIT_ON_DIVAN) || (State == STATE_COFFEE_ON_DIVAN)) || (State == STATE_READ_ON_DIVAN)) {
game.mebelDivan.DeattachChar(this);
}
}
if (((newstate != STATE_SIT_ON_TABLE) && (newstate != STATE_COFFEE_ON_TABLE)) && (newstate != STATE_READ_ON_TABLE)) {
if (((State == STATE_SIT_ON_TABLE) || (State == STATE_COFFEE_ON_TABLE)) || (State == STATE_READ_ON_TABLE)) {
game.mebelTable.DeattachChar(this);
}
}
if (!(State === STATE_AT_ROOM)) {
} else {
_visible = true;
}
Helper.ClearHighlite(mcAnim);
}
State = newstate;
}
function BeginWish(wish) {
trace("BeginWish: " + wish);
Wish = wish;
_wish_delivered = false;
if (Wish != WISH_NONE) {
_wish_time = 0;
_wish_max_time = _model_config.wishes[Wish][CONFIG_WAIT_TIME] * 1000;
mcOrder._visible = true;
mcOrder.__set__Wish(Wish);
mcOrder.__set__Progress(0);
_wishes_required++;
if ((Wish == WISH_TV) && (State == STATE_AT_ROOM)) {
GoState(STATE_WALK_TO_TV);
}
if (State == STATE_AT_ROOM) {
room.ShowWish();
room.UpdateWish(this);
room.__set__Enabled(true);
if (Wish == WISH_COFFEE) {
game.ShowTip(TipsWindow.TIP_COFFEE);
}
}
} else {
if (State == STATE_AT_ROOM) {
room.HideWish();
}
mcOrder._visible = false;
room.__set__Enabled(false);
}
_wish_in_process = false;
}
function get CanHighlite() {
return((Wish != WISH_NONE) && (!__get__InMoving()));
}
function onRollOver() {
if (CanHighlite) {
Helper.SetHighlite(mcAnim);
}
}
function onRollOut() {
if (CanHighlite) {
Helper.ClearHighlite(mcAnim);
}
}
function onPress(Void) {
if (CanHighlite) {
OnClick(this);
}
}
function GoLeaveHotel() {
BeginWish(WISH_NONE);
if (room != null) {
GoState(STATE_WALK_LEAVE_KEYS);
} else {
GoState(STATE_WALK_TO_EXIT);
}
}
function WishDelivered() {
if (!_wish_delivered) {
if (OnWishDelivered != undefined) {
OnWishDelivered(this);
}
_wish_delivered = true;
}
}
function WishComplete() {
if (OnWishComplete != undefined) {
OnWishComplete(this);
}
BeginWish(WISH_NONE);
}
function WishFail() {
if (OnWishFail != undefined) {
OnWishFail(this);
}
BeginWish(WISH_NONE);
if (State == STATE_SIT_ON_DIVAN) {
game.mebelDivan.DeattachChar(this);
GoState(STATE_WALK_TO_ROOM);
} else if (State == STATE_SIT_ON_TABLE) {
game.mebelTable.DeattachChar(this);
GoState(STATE_WALK_TO_ROOM);
}
}
function TakeKeys(keys_from_room) {
if (Wish == WISH_KEYS) {
room = (keys_from_room);
room.__set__Status(Room.DND);
WishDelivered();
WishComplete();
GoState(STATE_WALK_TO_ROOM);
}
}
function TakeCoffee() {
if (Wish == WISH_COFFEE) {
WishDelivered();
if ((State == STATE_SIT_ON_DIVAN) || (State == STATE_SIT_ON_TABLE)) {
BeginDrinkCoffee();
} else {
WishComplete();
if (State == STATE_AT_ROOM) {
GoState(STATE_AT_ROOM);
}
}
}
}
function BeginDrinkCoffee() {
_wish_in_process = true;
if (game.mebelDivan.__get__Char() == this) {
GoState(STATE_COFFEE_ON_DIVAN);
} else if (game.mebelTable.__get__Char() == this) {
GoState(STATE_COFFEE_ON_TABLE);
}
UpdateAnimation();
}
function EndDrinkCoffee() {
_wish_in_process = true;
if (game.mebelDivan.__get__Char() == this) {
game.mebelDivan.DeattachChar(this);
} else if (game.mebelTable.__get__Char() == this) {
game.mebelTable.DeattachChar(this);
}
WishComplete();
GoState(STATE_WALK_TO_ROOM);
}
function TakePhone() {
if (Wish == WISH_PHONE) {
WishDelivered();
WishComplete();
if (State == STATE_AT_ROOM) {
GoState(STATE_AT_ROOM);
}
}
}
function TakeRead() {
if (Wish == WISH_READ) {
WishDelivered();
if ((State == STATE_SIT_ON_DIVAN) || (State == STATE_SIT_ON_TABLE)) {
BeginReadDaily();
} else {
WishComplete();
if (State == STATE_AT_ROOM) {
GoState(STATE_AT_ROOM);
}
}
}
}
function BeginReadDaily() {
_wish_in_process = true;
if (game.mebelDivan.__get__Char() == this) {
GoState(STATE_READ_ON_DIVAN);
trace("ERROR: Unavailable state! (STATE_READ_ON_DIVAN)");
} else if (game.mebelTable.__get__Char() == this) {
GoState(STATE_READ_ON_TABLE);
}
UpdateAnimation();
}
function EndReadDaily() {
_wish_in_process = true;
if (game.mebelDivan.__get__Char() == this) {
} else if (game.mebelTable.__get__Char() == this) {
game.mebelTable.DeattachChar(this);
}
WishComplete();
GoState(STATE_WALK_TO_ROOM);
}
function TakeTV() {
if (Wish == WISH_TV) {
WishDelivered();
_wish_in_process = true;
}
}
function FinishWatchTV() {
WishComplete();
game.mebelDivan.DeattachChar(this);
GoState(STATE_WALK_TO_ROOM);
}
function StartCleaning() {
if (Wish == WISH_CLEAN) {
WishDelivered();
room.ClearTicks();
room.HideWish();
room.__set__Enabled(false);
_wish_in_process = true;
}
}
function FinishCleaning() {
WishComplete();
}
function HideTick() {
_ticks--;
if (_ticks < 0) {
_ticks = 0;
}
if ((mcTick != undefined) && (_ticks == 0)) {
mcTick._visible = false;
}
}
function ShowTick() {
_ticks++;
if ((mcTick != undefined) && (_ticks > 0)) {
mcTick._visible = true;
Helper.PlaySound("event_accepted");
}
}
function ClearTicks() {
_ticks = 0;
HideTick();
}
static var TIME_COFFEE_DIVAN = 6000;
static var TIME_COFFEE_TABLE = 3000;
static var TIME_READ = 7000;
static var INIT_MOOD = 4;
static var MAX_MOOD = 8;
static var MODEL_AUDIOBOY = 0;
static var MODEL_WOMAN = 1;
static var MODEL_BADGUY = 2;
static var MODEL_TOURIST = 3;
static var STATE_NONE = 0;
static var STATE_WAIT_COMIN = 1;
static var STATE_COMMING = 2;
static var STATE_AT_HALL = 3;
static var STATE_WISH = 4;
static var STATE_AT_RECEIPTION = 5;
static var STATE_WALK = 6;
static var STATE_WALK_TO_ROOM = 7;
static var STATE_AT_ROOM = 8;
static var STATE_WALK_TO_EXIT = 9;
static var STATE_WAIT_COMOUT = 10;
static var STATE_COMOUTING = 11;
static var STATE_WALK_LEAVE_KEYS = 12;
static var STATE_WALK_TO_TV = 13;
static var STATE_SIT_ON_DIVAN = 14;
static var STATE_COFFEE_ON_DIVAN = 15;
static var STATE_COFFEE_ON_TABLE = 16;
static var STATE_WALK_TO_TABLE = 17;
static var STATE_SIT_ON_TABLE = 18;
static var STATE_READ_ON_DIVAN = 19;
static var STATE_READ_ON_TABLE = 20;
static var WISHES = new Array("reception", "CleanRoom", "coffee", "magazine", "phone", "tv");
static var WISH_NONE = -1;
static var WISH_KEYS = 0;
static var WISH_CLEAN = 1;
static var WISH_COFFEE = 2;
static var WISH_READ = 3;
static var WISH_PHONE = 4;
static var WISH_TV = 5;
static var WISH_MAX = 6;
static var CONFIG_PROCENT_VIPADENIYA = 0;
static var CONFIG_COST_ZA_USPEH = 1;
static var CONFIG_COST_ZA_NEUDACHU = 2;
static var CONFIG_NASTROENIE_ZA_USPEH = 3;
static var CONFIG_NASTROENIE_ZA_NEUDACHU = 4;
static var CONFIG_WAIT_TIME = 5;
static var CONFIG_WISH_DELAY = 6;
static var FRAMES_PER_MODEL = 8;
var _live = false;
}
Symbol 1395 MovieClip [__Packages.Door] Frame 0
class Door extends Mebel
{
var _active, _multiply_chars_mode, gotoAndStop, IsOpened, gotoAndPlay, AttachChar, MoveSeatPlace, orientierOut, orientierIn, __get__HasChar, _attached_chars, CharEntered, CharExited;
function Door () {
super();
_active = false;
Close();
_multiply_chars_mode = true;
}
function Close() {
gotoAndStop("frameToOpen");
IsOpened = false;
}
function Open() {
gotoAndStop("frameToClose");
IsOpened = true;
}
function Opened() {
IsOpened = true;
}
function PlayOpen() {
gotoAndPlay("frameToOpen");
Helper.PlaySound("door_main_open");
}
function PlayClose() {
gotoAndPlay("frameToClose");
IsOpened = false;
Helper.PlaySound("door_close");
}
function PlayCharComin(c) {
AttachChar(c);
c.State = Client.STATE_WAIT_COMIN;
MoveSeatPlace(orientierOut._x, orientierOut._y);
PlayOpen();
}
function PlayCharComout(c) {
AttachChar(c);
c.State = Client.STATE_WAIT_COMOUT;
MoveSeatPlace(orientierIn._x, orientierIn._y);
PlayOpen();
}
function Quant(dtime) {
if (__get__HasChar()) {
var _local3 = 0;
while (_local3 < _attached_chars.length) {
var _local2 = Client(_attached_chars[_local3]);
switch (_local2.State) {
case Client.STATE_WAIT_COMIN :
if (IsOpened) {
_local2.State = Client.STATE_COMMING;
_local2.SetAnimation(Bot.ANIM_LEFT);
_local2.GoTo(orientierOut.GetPoint(), true);
_local2.MoveTo(orientierIn.GetPoint());
}
break;
case Client.STATE_COMMING :
MoveSeatPlace(_local2._x, _local2._y);
if (!_local2.__get__InMoving()) {
_local2.GoState(Client.STATE_AT_HALL);
if (CharEntered != undefined) {
CharEntered(_local2);
}
}
break;
case Client.STATE_WAIT_COMOUT :
if (IsOpened) {
_local2.State = Client.STATE_COMOUTING;
_local2.SetAnimation(Bot.ANIM_RIGHT);
_local2.GoTo(orientierIn.GetPoint(), true);
_local2.MoveTo(orientierOut.GetPoint());
}
break;
case Client.STATE_COMOUTING :
MoveSeatPlace(_local2._x, _local2._y);
if (_local2.__get__InMoving()) {
break;
}
_local2.State = Client.STATE_NONE;
if (CharExited == undefined) {
break;
}
CharExited(_local2);
}
_local3++;
}
} else if (IsOpened) {
PlayClose();
}
}
}
Symbol 1396 MovieClip [__Packages.Gorshok] Frame 0
class Gorshok extends MovieClip
{
var gotoAndStop, progress;
function Gorshok () {
super();
Progress = (0);
}
function set Progress(val) {
Tracer.trace("Gorshok::Progress=" + val);
var _local2;
if (val < 11) {
_local2 = 1 + ((val / 10) * (FRAME_NUM_MASTER - 1));
} else {
_local2 = FRAME_NUM_EXPERT;
}
_local2 = Math.floor(_local2);
gotoAndStop(_local2);
//return(Progress);
}
function get Progress() {
return(progress);
}
static var FRAME_NUM_MASTER = 6;
static var FRAME_NUM_EXPERT = 7;
}
Symbol 871 MovieClip Frame 1
stop();
var Value;
var OnValueChanged;
if (Value == undefined) {
Value = true;
}
mcAllocator._visible = false;
GetValue = function () {
return(Value);
};
SetValue = function (value) {
Value = value;
gotoAndStop((Value ? 2 : 3));
if (OnValueChanged != undefined) {
OnValueChanged();
}
};
this.onPress = function () {
SetValue(!Value);
};
SetValue(Value);
this.onRollOver = function () {
Helper.PlaySound("soundMenuToggle");
mcAllocator._visible = true;
};
this.onRollOut = function () {
mcAllocator._visible = false;
};
Symbol 920 MovieClip Frame 109
gotoAndPlay (45);
Symbol 924 MovieClip [Flower] Frame 1
#initclip 85
Object.registerClass("Flower", Flower);
#endinitclip
Symbol 927 MovieClip [Picture] Frame 1
#initclip 68
Object.registerClass("Picture", Mebel);
#endinitclip
Symbol 937 MovieClip [Aquarium] Frame 1
#initclip 69
Object.registerClass("Aquarium", Mebel);
#endinitclip
Symbol 940 MovieClip [Bra] Frame 1
#initclip 70
Object.registerClass("Bra", Mebel);
#endinitclip
Symbol 988 MovieClip [RoomWish] Frame 1
#initclip 71
Object.registerClass("RoomWish", RoomWish);
#endinitclip
Symbol 989 MovieClip [Room] Frame 1
#initclip 72
Object.registerClass("Room", Room);
#endinitclip
Symbol 997 MovieClip [DivanTV] Frame 1
#initclip 73
Object.registerClass("DivanTV", DivanTV);
#endinitclip
Symbol 1008 MovieClip [TVSet] Frame 1
#initclip 74
Object.registerClass("TVSet", TVSet);
#endinitclip
Symbol 1018 MovieClip [ReceptionTable] Frame 1
#initclip 75
Object.registerClass("ReceptionTable", ReceptionTable);
#endinitclip
Symbol 1023 MovieClip [Daily] Frame 1
#initclip 76
Object.registerClass("Daily", Daily);
#endinitclip
Symbol 1031 MovieClip [Phone] Frame 1
#initclip 77
Object.registerClass("Phone", Phone);
#endinitclip
Symbol 1038 MovieClip [Coffee] Frame 1
#initclip 78
Object.registerClass("Coffee", Coffee);
#endinitclip
Symbol 1275 MovieClip [Maid] Frame 1
#initclip 79
Object.registerClass("Maid", Maid);
#endinitclip
Symbol 1278 MovieClip [KitchenWallMC] Frame 1
#initclip 80
Object.registerClass("KitchenWallMC", KitchenWallMC);
#endinitclip
Symbol 1288 MovieClip [Table] Frame 1
#initclip 81
Object.registerClass("Table", Table);
#endinitclip
Symbol 1293 MovieClip Frame 1
var buttonText;
var OnClick;
this.hitArea = mcHint;
mcHint._visible = false;
this.onRollOver = function () {
gotoAndStop (3);
};
this.onRollOut = function () {
gotoAndStop (2);
};
this.onPress = function () {
Helper.PlaySound("soundMenuHit");
gotoAndStop (4);
};
this.onRelease = function () {
if (OnClick != undefined) {
OnClick(this);
}
};
stop();
Symbol 1304 MovieClip [Clock] Frame 1
#initclip 82
Object.registerClass("Clock", Clock);
#endinitclip
Symbol 1313 MovieClip [SuccessBar] Frame 1
#initclip 83
Object.registerClass("SuccessBar", SuccessBar);
#endinitclip
Symbol 1330 MovieClip [Game] Frame 1
#initclip 84
Object.registerClass("Game", Game);
#endinitclip
Symbol 1330 MovieClip [Game] Frame 2
this.Launch();
stop();