Frame 1
_lockroot = true;
stopAllSounds();
var LANG = "en";
var Labels = new Array();
Labels.en = new Object();
Labels.ru = new Object();
Labels.ru.loading = "\u0417\u0430\u0433\u0440\u0443\u0437\u043A\u0430:";
Labels.en.loading = "Loading:";
var DEBUG = false;
var GAME_VERSION_DEBUG = 0;
var GAME_VERSION_TEST = 1;
var GAME_VERSION_DEBUG_PLACES = 2;
var GAME_VERSION_DEBUG_CHARACTERS = 3;
var GAME_VERSION_OPEN = 4;
var game_version = GAME_VERSION_TEST;
var get_more_games_link_select = "http://www.elefun-games.com";
var logo_enabled = true;
var fmt = new TextFormat();
fmt.size = 30;
fmt.color = 16777215 /* 0xFFFFFF */;
fmt.font = "Arial";
this.createTextField("load_text", this.getNextHighestDepth(), 220, 50, 200, 40);
load_text.selectable = false;
load_text.type = "dynamic";
load_text.text = Labels[LANG].loading;
load_text.setTextFormat(this.fmt);
load_text.setNewTextFormat(this.fmt);
if (game_version == GAME_VERSION_DEBUG) {
DEBUG = true;
stop();
this.onEnterFrame = function () {
if ((_framesloaded > 0) && (_framesloaded == _totalframes)) {
delete _root.onEnterFrame;
play();
} else {
this.load_text.text = ((Labels[LANG].loading + " ") + Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100)) + "%";
}
};
} else if (game_version == GAME_VERSION_TEST) {
stop();
this.onEnterFrame = function () {
if ((_framesloaded > 0) && (_framesloaded == _totalframes)) {
delete _root.onEnterFrame;
play();
} else {
this.load_text.text = ((Labels[LANG].loading + " ") + Math.round((this.getBytesLoaded() / this.getBytesTotal()) * 100)) + "%";
}
};
}
Frame 3
stop();
this.ratio = 1.171875;
this.unratio = 0.853333333333333;
this.load_text.removeTextField();
this.attachMovie("Application", "app", this.getNextHighestDepth());
this.app._xscale = this.app._xscale * _root.ratio;
this.app._yscale = this.app._yscale * _root.ratio;
this.app.init();
if (game_version == GAME_VERSION_DEBUG_CHARACTERS) {
this.onMouseDown = function () {
trace((("x:" + _xmouse) + ",y:") + _ymouse);
};
}
Symbol 37 MovieClip [kitchen_dustbin] Frame 1
sel._visible = false;
Symbol 73 MovieClip [bar_dustbin] Frame 1
sel._visible = false;
Symbol 89 MovieClip [carpet2] Frame 1
stop();
Symbol 89 MovieClip [carpet2] Frame 5
stop();
Symbol 89 MovieClip [carpet2] Frame 9
stop();
Symbol 89 MovieClip [carpet2] Frame 13
stop();
Symbol 89 MovieClip [carpet2] Frame 17
stop();
Symbol 102 MovieClip [carpet1] Frame 1
stop();
Symbol 102 MovieClip [carpet1] Frame 5
stop();
Symbol 102 MovieClip [carpet1] Frame 9
stop();
Symbol 102 MovieClip [carpet1] Frame 13
stop();
Symbol 102 MovieClip [carpet1] Frame 17
stop();
Symbol 115 MovieClip [carpet] Frame 1
stop();
Symbol 115 MovieClip [carpet] Frame 5
stop();
Symbol 115 MovieClip [carpet] Frame 9
stop();
Symbol 115 MovieClip [carpet] Frame 13
stop();
Symbol 115 MovieClip [carpet] Frame 17
stop();
Symbol 192 MovieClip [cake_empty] Frame 1
stop();
sel._visible = false;
Symbol 195 MovieClip [cake_full] Frame 1
stop();
sel._visible = false;
Symbol 198 MovieClip [chicken_empty] Frame 1
stop();
sel._visible = false;
Symbol 201 MovieClip [chicken_full] Frame 1
stop();
sel._visible = false;
Symbol 204 MovieClip [cocktail_empty] Frame 1
stop();
sel._visible = false;
Symbol 207 MovieClip [cocktail_full] Frame 1
stop();
sel._visible = false;
Symbol 210 MovieClip [martini_empty] Frame 1
stop();
sel._visible = false;
Symbol 213 MovieClip [martini_full] Frame 1
stop();
sel._visible = false;
Symbol 216 MovieClip [salad_empty] Frame 1
stop();
sel._visible = false;
Symbol 219 MovieClip [salad_full] Frame 1
stop();
sel._visible = false;
Symbol 222 MovieClip [wine_empty] Frame 1
stop();
sel._visible = false;
Symbol 225 MovieClip [wine_full] Frame 1
stop();
sel._visible = false;
Symbol 3388 MovieClip Frame 1
stop();
Symbol 3388 MovieClip Frame 2
stop();
Symbol 3393 MovieClip Frame 1
stop();
Symbol 3393 MovieClip Frame 2
stop();
Symbol 3398 MovieClip Frame 1
stop();
Symbol 3398 MovieClip Frame 2
stop();
Symbol 3456 MovieClip [dustbin_kitchen1] Frame 1
sel._visible = false;
Symbol 3459 MovieClip [dustbin_bar1] Frame 1
sel._visible = false;
Symbol 3584 MovieClip [kitchen2_dustbin] Frame 1
sel._visible = false;
Symbol 3605 MovieClip [bar2_dustbin] Frame 1
sel._visible = false;
Symbol 3654 MovieClip [SoundManager] Frame 1
#initclip 90
Object.registerClass("SoundManager", SoundManager);
#endinitclip
Symbol 3655 MovieClip [MusicManager] Frame 1
#initclip 88
Object.registerClass("MusicManager", MusicManager);
#endinitclip
Symbol 3657 MovieClip [Application] Frame 1
#initclip 89
Object.registerClass("Application", Application);
#endinitclip
Symbol 3765 MovieClip [volume_slider] Frame 1
stop();
Symbol 3767 MovieClip [visitor_wish] Frame 1
stop();
Symbol 3769 MovieClip [visitor_good_mood] Frame 1
stop();
Symbol 3771 MovieClip [vip_talk] Frame 1
stop();
Symbol 3773 MovieClip [menu_music] Frame 1
stop();
Symbol 3775 MovieClip [level_failed] Frame 1
stop();
Symbol 3777 MovieClip [level_complete] Frame 1
stop();
Symbol 3779 MovieClip [level_begin] Frame 1
stop();
Symbol 3781 MovieClip [goal_money_silver] Frame 1
stop();
Symbol 3783 MovieClip [goal_money_gold] Frame 1
stop();
Symbol 3785 MovieClip [goal_money_bronze] Frame 1
stop();
Symbol 3787 MovieClip [game_music] Frame 1
stop();
Symbol 3789 MovieClip [dustbin] Frame 1
stop();
Symbol 3791 MovieClip [drag] Frame 1
stop();
Symbol 3793 MovieClip [button_select_0] Frame 1
stop();
Symbol 3795 MovieClip [button_click] Frame 1
stop();
Symbol 3797 MovieClip [bad_vip_talk] Frame 1
stop();
Symbol 3799 MovieClip [bad_action] Frame 1
stop();
Symbol 3811 MovieClip [__Packages.MusicManager] Frame 0
class MusicManager extends MovieClip
{
var parent, sound_effects, sound_mc, ss, attachMovie, getNextHighestDepth, volume;
function MusicManager () {
super();
}
function init(s_array, par) {
parent = par;
sound_effects = new Array();
sound_mc = new Array();
ss = new Array();
ss = s_array;
for (var _local5 in s_array) {
sound_mc[s_array[_local5]] = attachMovie(s_array[_local5], s_array[_local5], getNextHighestDepth(), {_x:0, _y:0});
sound_effects[s_array[_local5]] = new Sound(sound_mc[s_array[_local5]]);
}
}
function setVolume(val) {
volume = val;
setAllVolume();
}
function getVolume() {
return(volume);
}
function setAllVolume() {
for (var _local2 in sound_effects) {
sound_effects[_local2].setVolume(volume);
}
}
function stopAll() {
for (var _local2 in sound_effects) {
sound_mc[_local2].gotoAndStop(1);
sound_effects[_local2].stop(_local2 + "_snd");
}
}
function playSound(effect) {
stopAll();
sound_mc[effect].gotoAndStop(2);
}
function stopSound(effect) {
sound_mc[effect].gotoAndStop(1);
sound_effects[effect].stop(effect + "_snd");
}
}
Symbol 3812 MovieClip [__Packages.Application] Frame 0
class Application extends MovieClip
{
var game_set, _parent, sets, eventManager, createEmptyMovieClip, attachMovie, soundM, musicM, mainmenu, startmenu, optionsmenu, ingamemenu, pausemenu, losemenu, restartmenu, leavemenu, exitmenu, createTextField, level, getNextHighestDepth, about_movie, winmenu;
function Application () {
super();
}
function init() {
game_set = new GameSettings(_parent);
sets = new UserSettings(this);
eventManager = new Object();
AsBroadcaster.initialize(eventManager);
eventManager.addListener(this);
createEmptyMovieClip("fake_mc", game_set.FAKE_DEPTH);
attachMovie("SoundManager", "soundM", game_set.SOUND_DEPTH);
soundM.init(game_set.sound_array, this);
soundM.setVolume(sets.data.sound_volume);
attachMovie("MusicManager", "musicM", game_set.MUSIC_DEPTH);
musicM.init(game_set.music_array, this);
musicM.setVolume(sets.data.music_volume);
musicM.playSound("menu_music");
mainmenu = new MainMenu(this, game_set.MAIN_MENU_DEPTH);
startmenu = new StartMenu(this, game_set.MAIN_MENU_DEPTH);
optionsmenu = new OptionsMenu(this, game_set.MAIN_MENU_DEPTH);
ingamemenu = new InGameMenu(this, game_set.MAIN_MENU_DEPTH);
pausemenu = new PauseMenu(this, game_set.MAIN_MENU_DEPTH);
losemenu = new LoseMenu(this, game_set.MAIN_MENU_DEPTH);
restartmenu = new RestartMenu(this, game_set.MAIN_MENU_DEPTH);
leavemenu = new LeaveMenu(this, game_set.MAIN_MENU_DEPTH);
exitmenu = new ExitMenu(this, game_set.MAIN_MENU_DEPTH);
mainmenu.show();
}
function AttachMovie(id, name, depth, initObj) {
var _local2 = attachMovie(id, name, depth, initObj);
if (initObj._xscale != undefined) {
_local2._xscale = initObj._xscale * _parent.unratio;
} else {
_local2._xscale = _local2._xscale * _parent.unratio;
}
if (initObj._yscale != undefined) {
_local2._yscale = initObj._yscale * _parent.unratio;
} else {
_local2._yscale = _local2._yscale * _parent.unratio;
}
return(_local2);
}
function CreateEmptyMovieClip(name, depth, initObj) {
var _local2 = createEmptyMovieClip(name, depth, initObj);
if (initObj._xscale != undefined) {
_local2._xscale = initObj._xscale * _parent.unratio;
} else {
_local2._xscale = _local2._xscale * _parent.unratio;
}
if (initObj._yscale != undefined) {
_local2._yscale = initObj._yscale * _parent.unratio;
} else {
_local2._yscale = _local2._yscale * _parent.unratio;
}
return(_local2);
}
function CreateTextField(instanceName, depth, x, y, width, height) {
var _local2 = createTextField(instanceName, depth, x, y, width, height);
return(_local2);
}
function next_level() {
ingamemenu.hide();
delete level;
if ((sets.data.max_stage == sets.data.current_stage) && (sets.data.max_level == sets.data.current_level)) {
if ((sets.data.current_level + 1) == game_set.COL_LEVELS) {
if ((sets.data.current_stage + 1) == game_set.COL_STAGES) {
go_game_complete();
} else {
sets.data.current_stage++;
sets.data.current_level = 0;
}
} else {
sets.data.current_level++;
}
sets.data.max_stage = sets.data.current_stage;
sets.data.max_level = sets.data.current_level;
} else if ((sets.data.current_level + 1) == game_set.COL_LEVELS) {
if ((sets.data.current_stage + 1) == game_set.COL_STAGES) {
go_game_complete();
} else {
sets.data.current_stage++;
sets.data.current_level = 0;
}
} else {
sets.data.current_level++;
}
menu_music();
startmenu.show();
}
function go_game_complete() {
trace("game complete");
}
function go_start_game() {
mainmenu.hide();
startmenu.show();
}
function go_options() {
mainmenu.hide();
optionsmenu.show();
}
function go_exit_confirm() {
mainmenu.hide();
exitmenu.show();
}
function go_close_exit() {
fscommand ("quit");
}
function go_close_menu() {
exitmenu.hide();
mainmenu.show();
}
function go_pause_about() {
pausemenu.hide();
AttachMovie("about", "about_movie", getNextHighestDepth());
about_movie.onMouseDown = function () {
this._parent.pausemenu.show();
this.removeMovieClip();
};
}
function go_about() {
mainmenu.hide();
AttachMovie("about", "about_movie", getNextHighestDepth());
about_movie.onMouseDown = function () {
this._parent.mainmenu.show();
this.removeMovieClip();
};
}
function go_lose_restart() {
losemenu.hide();
sets.setProp("restart", true);
level.finishlevel();
level = new Level(this, game_set.levels[sets.data.current_stage][sets.data.current_level]);
}
function go_restart_restart() {
restartmenu.hide();
sets.setProp("restart", true);
level.finishlevel();
level = new Level(this, game_set.levels[sets.data.current_stage][sets.data.current_level]);
}
function go_restart_pause() {
restartmenu.hide();
pausemenu.show();
}
function go_pause_restart_confirm() {
pausemenu.hide();
restartmenu.show();
}
function go_game() {
startmenu.hide();
level = new Level(this, game_set.levels[sets.data.current_stage][sets.data.current_level]);
}
function go_cont_game() {
mainmenu.hide();
level = new Level(this, game_set.levels[sets.data.current_stage][sets.data.current_level]);
}
function go_start_main() {
startmenu.hide();
mainmenu.show();
}
function go_options_main() {
optionsmenu.hide();
mainmenu.show();
}
function go_pause() {
ingamemenu.hide();
level.pause = true;
level.level_interface.update();
level.tutorManager.show(!level.pause);
pausemenu.show();
}
function go_pause_game() {
pausemenu.hide();
level.pause = false;
level.level_interface.update();
level.tutorManager.show(!level.pause);
ingamemenu.show();
}
function go_exit_menu() {
leavemenu.hide();
level.finishlevel();
menu_music();
mainmenu.show();
}
function go_pause_exit_confirm() {
pausemenu.hide();
leavemenu.show();
}
function go_exit_pause() {
leavemenu.hide();
pausemenu.show();
}
function go_win_main() {
winmenu.hide();
level.finishlevel();
menu_music();
mainmenu.show();
}
function go_continue() {
winmenu.hide();
level.finishlevel();
level = new Level(this, game_set.levels[sets.data.current_stage][sets.data.current_level]);
}
function go_lose_main() {
losemenu.hide();
level.finishlevel();
menu_music();
mainmenu.show();
}
function go_win() {
ingamemenu.hide();
}
function go_lose() {
ingamemenu.hide();
losemenu.show();
}
function select_level(n_stage, n_level) {
sets.setProp("current_level", n_level);
if (sets.data.current_stage != n_stage) {
sets.setProp("current_stage", n_stage);
startmenu.update();
}
}
function change_music_volume(val) {
sets.setProp("music_volume", val);
musicM.setVolume(sets.getProp("music_volume"));
volume_slider();
}
function change_sound_volume(val) {
sets.setProp("sound_volume", val);
soundM.setVolume(sets.getProp("sound_volume"));
volume_slider();
}
function addScore() {
}
function subScore() {
}
function bad_action() {
soundM.playSound("bad_action");
}
function bad_vip_talk() {
soundM.playSound("bad_vip_talk");
}
function button_click() {
soundM.playSound("button_click");
}
function button_select() {
soundM.playSound("button_select_0");
}
function drag() {
soundM.playSound("drag");
}
function dustbin() {
soundM.playSound("dustbin");
}
function goal_money_bronze() {
soundM.playSound("goal_money_bronze");
}
function goal_money_gold() {
soundM.playSound("goal_money_gold");
}
function goal_money_silver() {
soundM.playSound("goal_money_silver");
}
function vip_talk() {
soundM.playSound("vip_talk");
}
function visitor_good_mood() {
soundM.playSound("visitor_good_mood");
}
function visitor_wish() {
soundM.playSound("visitor_wish");
}
function volume_slider() {
soundM.playSound("volume_slider");
}
function level_begin() {
musicM.playSound("level_begin");
}
function level_complete() {
musicM.playSound("level_complete");
}
function level_failed() {
musicM.playSound("level_failed");
}
function menu_music() {
musicM.playSound("menu_music");
}
function game_music() {
musicM.playSound("game_music");
}
var timer = 0;
var score = 0;
var curScore = 0;
var win = false;
}
Symbol 3813 MovieClip [__Packages.SoundManager] Frame 0
class SoundManager extends MovieClip
{
var parent, sound_effects, sound_mc, ss, attachMovie, getNextHighestDepth, volume;
function SoundManager () {
super();
}
function init(s_array, par) {
parent = par;
sound_effects = new Array();
sound_mc = new Array();
ss = new Array();
ss = s_array;
for (var _local5 in s_array) {
sound_mc[s_array[_local5]] = attachMovie(s_array[_local5], s_array[_local5], getNextHighestDepth(), {_x:0, _y:0});
sound_effects[s_array[_local5]] = new Sound(sound_mc[s_array[_local5]]);
}
}
function setVolume(val) {
volume = val;
setAllVolume();
}
function getVolume() {
return(volume);
}
function setAllVolume() {
for (var _local2 in sound_effects) {
sound_effects[_local2].setVolume(volume);
}
}
function playSound(effect) {
sound_mc[effect].gotoAndPlay(2);
}
function stopSound(effect) {
sound_mc[effect].gotoAndStop(1);
sound_effects[effect].stop(effect + "_snd");
}
}
Symbol 3814 MovieClip [__Packages.UserMenu] Frame 0
class UserMenu
{
var childs, target_mc, depth, startdepth, show;
function UserMenu (_target_mc, _depth) {
childs = new Array();
target_mc = _target_mc;
depth = _depth;
startdepth = depth;
}
function addSprite(so, io) {
childs.push(new Sprite(so.id, so.newid, target_mc, depth, io));
depth++;
}
function addButton(so, io) {
childs.push(new MenuButton(so.id, so.newid, so.funct, target_mc, depth, io));
depth++;
}
function addSlider(so, io) {
childs.push(new SliderBar(so.slider_id, so.head_id, so.newid, target_mc, depth, io, so.value, so.min, so.max, so.funct));
depth++;
}
function addCaption(so, io) {
childs.push(new Caption(target_mc, so.text, so.newid, so.format, depth, io, so.useShadow, so.embed));
depth++;
}
function addLink(so, io) {
childs.push(new Link(target_mc, so.text, so.link, so.newid, so.format, depth, io, so.useShadow, so.embed));
depth++;
}
function addRadioButton(so, io) {
childs.push(new ClassicRadioButton(so.number, so.id, so.newid, target_mc, depth, io, so.checked, so.funct));
depth++;
}
function addLevelRadioButton(so, io) {
childs.push(new LevelRadioButton(so.num_s, so.num_l, so.id, so.newid, target_mc, depth, io, so.checked, so.locked, so.flip, so.goal, so.funct));
depth++;
}
function addCheckBox(so, io) {
childs.push(new ClassicCheckBox(so.id, so.newid, target_mc, depth, io, so.checked, so.funct));
depth++;
}
function hide() {
for (var _local2 in childs) {
childs[_local2].remove();
}
childs = [];
}
function update() {
hide();
show();
}
}
Symbol 3815 MovieClip [__Packages.Sprite] Frame 0
class Sprite
{
var _mc;
function Sprite (id, new_id, target, depth, initObj) {
_mc = target.AttachMovie(id, new_id, depth, initObj);
}
function setVisible(bool) {
_mc._visible = bool;
}
function remove() {
_mc.removeMovieClip();
}
}
Symbol 3816 MovieClip [__Packages.MenuButton] Frame 0
class MenuButton
{
var funct, target_mc, _btn;
function MenuButton (id, new_id, _funct, _target_mc, depth, initObj) {
funct = _funct;
target_mc = _target_mc;
_btn = target_mc.AttachMovie(id, new_id, depth, initObj);
_btn.btn.papa = this;
_btn.papa = this;
_btn.btn.onRollOver = function () {
_target_mc.button_select();
};
_btn.btn.onPress = function () {
_target_mc.button_click();
};
_btn.btn.onRelease = function () {
this.papa.target_mc[this.papa.funct]();
};
}
function setVisible(bool) {
_btn._visible = bool;
}
function remove() {
_btn.removeMovieClip();
}
}
Symbol 3817 MovieClip [__Packages.SliderBar] Frame 0
class SliderBar
{
var value, min, max, funct, target_mc, _mc;
function SliderBar (slider_id, head_id, new_id, _target_mc, depth, initObj, _value, _min, _max, _funct) {
value = _value;
min = _min;
max = _max;
funct = _funct;
target_mc = _target_mc;
_mc = target_mc.CreateEmptyMovieClip(new_id, depth);
_mc._x = initObj._x;
_mc._y = initObj._y;
_mc._xscale = initObj._xscale;
_mc._yscale = initObj._yscale;
_mc.attachMovie(slider_id, "slider", _mc.getNextHighestDepth());
_mc.attachMovie(head_id, "head", _mc.getNextHighestDepth());
_mc.head.btn.onRollOver = function () {
this._parent._parent.papa.target_mc.button_select();
};
_mc.head.btn.onPress = function () {
this._parent.startDrag(true, this._parent._parent.papa.dx, 0, this._parent._parent.slider._width - (1.5 * this._parent._parent.papa.dx), 0);
};
_mc.head.btn.onRelease = function () {
this._parent.stopDrag();
v = this._parent._parent.papa.min + (((this._parent._x - this._parent._parent.papa.dx) / (this._parent._parent.slider._width - (2.5 * this._parent._parent.papa.dx))) * (this._parent._parent.papa.max - this._parent._parent.papa.min));
this._parent._parent.papa.setValue(v);
};
_mc.head.btn.onReleaseOutside = _mc.head.btn.onRelease;
_mc.papa = this;
move_head();
}
function setValue(_val) {
value = _val;
target_mc[funct](value);
}
function move_head() {
_mc.head._x = ((value - min) * (_mc.slider._width - 20)) / (max - min);
}
function remove() {
_mc.removeMovieClip();
}
var dx = 10;
}
Symbol 3818 MovieClip [__Packages.Caption] Frame 0
class Caption
{
var _txt, shad;
function Caption (target, txt, id, format, depth, initObj, useShadow, embed) {
_txt = target.CreateTextField(id, depth, initObj._x, initObj._y, initObj._width, initObj._height);
if (useShadow) {
shad = new flash.filters.DropShadowFilter(1, 45, 0, 100, 2, 2, 1, 3, false, false, false);
_txt.filters = [shad];
}
if (embed) {
_txt.embedFonts = true;
}
if (target.game_set.DEBUG) {
_txt.border = true;
}
_txt.text = txt;
_txt.type = "dynamic";
_txt.selectable = false;
_txt.autoSize = false;
_txt.setTextFormat(format);
_txt.setNewTextFormat(format);
}
function getObject() {
return(_txt);
}
function setFormat(format) {
_txt.setTextFormat(format);
_txt.setNewTextFormat(format);
}
function setVisible(bool) {
_txt._visible = bool;
}
function remove() {
_txt.removeTextField();
}
}
Symbol 3819 MovieClip [__Packages.Link] Frame 0
class Link
{
var link, _txt, shad;
function Link (target, txt, _link, id, format, depth, initObj, useShadow, embed) {
link = _link;
_txt = target.CreateTextField(id, depth, initObj._x, initObj._y, initObj._width, initObj._height);
if (useShadow) {
shad = new flash.filters.DropShadowFilter(1, 45, 0, 100, 2, 2, 1, 3, false, false, false);
_txt.filters = [shad];
}
if (embed) {
_txt.embedFonts = true;
}
if (target.game_set.DEBUG) {
_txt.border = true;
}
_txt.html = true;
_txt.htmlText = ((("<a href='" + link) + "'><u>") + txt) + "</u></a>";
_txt.type = "dynamic";
_txt.multiline = true;
_txt.autoSize = false;
_txt.selectable = false;
_txt.setTextFormat(format);
_txt.setNewTextFormat(format);
}
function getObject() {
return(_txt);
}
function setFormat(format) {
_txt.setTextFormat(format);
_txt.setNewTextFormat(format);
}
function setVisible(bool) {
_txt._visible = bool;
}
function remove() {
_txt.removeTextField();
}
}
Symbol 3820 MovieClip [__Packages.ClassicRadioButton] Frame 0
class ClassicRadioButton
{
var checked, number, funct, target_mc, _mc;
function ClassicRadioButton (_number, id, new_id, _target_mc, depth, initObj, _checked, _funct) {
checked = _checked;
number = _number;
funct = _funct;
target_mc = _target_mc;
target_mc.eventManager.addListener(this);
_mc = target_mc.AttachMovie(id, new_id, depth, initObj);
if (checked) {
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
} else {
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
_mc.papa = this;
_mc.unchecked_btn.papa = this;
_mc.checked_btn.papa = this;
_mc.unchecked_btn.onRollOver = function () {
this.papa.target_mc.button_select();
};
_mc.unchecked_btn.onPress = function () {
this.papa.target_mc.button_click();
};
_mc.checked_btn.onRollOver = function () {
this.papa.target_mc.button_select();
};
_mc.checked_btn.onPress = function () {
this.papa.target_mc.button_click();
};
_mc.unchecked_btn.onRelease = function () {
this.papa.target_mc.eventManager.broadcastMessage("uncheck_radio_button");
this.papa.check();
};
}
function uncheck_radio_button() {
checked = false;
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
function check() {
checked = true;
target_mc[funct](number);
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
}
function remove() {
_mc.removeMovieClip();
}
}
Symbol 3821 MovieClip [__Packages.LevelRadioButton] Frame 0
class LevelRadioButton
{
var checked, num_s, num_l, goal, flip, locked, funct, target_mc, _mc;
function LevelRadioButton (_num_s, _num_l, id, new_id, _target_mc, depth, initObj, _checked, _locked, _flip, _goal, _funct) {
checked = _checked;
num_s = _num_s;
num_l = _num_l;
goal = _goal;
flip = _flip;
locked = _locked;
funct = _funct;
target_mc = _target_mc;
target_mc.eventManager.addListener(this);
_mc = target_mc.AttachMovie(id, new_id, depth, initObj);
if (checked) {
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
} else {
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
_mc.papa = this;
_mc.unchecked_btn.papa = this;
_mc.checked_btn.papa = this;
_mc.unchecked_btn.onPress = function () {
this.papa.target_mc.button_click();
};
_mc.unchecked_btn.onRelease = function () {
if (!this.papa.locked) {
this.papa.target_mc.eventManager.broadcastMessage("uncheck_radio_button");
this.papa.check();
}
};
update();
}
function update() {
if (locked) {
_mc.star._visible = false;
_mc.dot.gotoAndStop(1);
} else {
_mc.star._visible = true;
_mc.star.gotoAndStop(goal + 1);
_mc.dot.gotoAndStop(goal + 1);
}
if (checked) {
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
} else {
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
if (flip) {
_mc.unchecked_btn._xscale = -100;
_mc.checked_btn._xscale = -100;
} else {
_mc.unchecked_btn._xscale = 100;
_mc.checked_btn._xscale = 100;
}
}
function uncheck_radio_button() {
checked = false;
update();
}
function check() {
checked = true;
target_mc[funct](num_s, num_l);
update();
}
function remove() {
_mc.removeMovieClip();
}
}
Symbol 3822 MovieClip [__Packages.ClassicCheckBox] Frame 0
class ClassicCheckBox
{
var checked, funct, target_mc, _mc;
function ClassicCheckBox (id, new_id, _target_mc, depth, initObj, _checked, _funct) {
checked = _checked;
funct = _funct;
target_mc = _target_mc;
_mc = target_mc.AttachMovie(id, new_id, depth, initObj);
if (checked) {
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
} else {
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
_mc.papa = this;
_mc.unchecked_btn.papa = this;
_mc.checked_btn.papa = this;
_mc.unchecked_btn.onRollOver = function () {
this.papa.target_mc.button_select();
};
_mc.unchecked_btn.onPress = function () {
this.papa.target_mc.button_click();
};
_mc.checked_btn.onRollOver = function () {
this.papa.target_mc.button_select();
};
_mc.checked_btn.onPress = function () {
this.papa.target_mc.button_click();
};
_mc.unchecked_btn.onRelease = function () {
this.papa.check();
};
_mc.checked_btn.onRelease = function () {
this.papa.uncheck();
};
}
function uncheck() {
checked = false;
target_mc[funct](checked);
_mc.unchecked_btn._visible = true;
_mc.checked_btn._visible = false;
}
function check() {
checked = true;
target_mc[funct](checked);
_mc.unchecked_btn._visible = false;
_mc.checked_btn._visible = true;
}
function remove() {
_mc.removeMovieClip();
}
}
Symbol 3823 MovieClip [__Packages.MainMenu] Frame 0
class MainMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton;
function MainMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"menu_bg", newid:"menu_bg"}, {});
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].welcome, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addButton({id:"button_small_mc", newid:"new_game", funct:"go_start_game"}, {_x:360, _y:130});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].start, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:380, _y:136, _width:160, _height:40});
addButton({id:"button_small_mc", newid:"options", funct:"go_options"}, {_x:380, _y:175});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].options, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:400, _y:181, _width:160, _height:40});
addButton({id:"button_small_mc", newid:"about", funct:"go_about"}, {_x:400, _y:220});
addCaption({newid:"capt4", text:target_mc.game_set.Labels[target_mc.game_set.LANG].about, format:target_mc.game_set.button_compress_format, embed:true, useShadow:true}, {_x:420, _y:226, _width:160, _height:40});
}
}
Symbol 3824 MovieClip [__Packages.OptionsMenu] Frame 0
class OptionsMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton, addSlider;
function OptionsMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"menu_bg", newid:"menu_bg"}, {});
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].options, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addButton({id:"button_small_mc", newid:"button_small_mc", funct:"go_options_main"}, {_x:440, _y:330});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].ok, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:336, _width:150, _height:40});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].music_volume, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:430, _y:156, _width:150, _height:40});
addSlider({slider_id:"slider", head_id:"slider_toddler_mc", newid:"slider1", funct:"change_music_volume", value:target_mc.sets.getProp("music_volume"), min:0, max:100}, {_x:430, _y:190});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].sound_volume, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:236, _width:150, _height:40});
addSlider({slider_id:"slider", head_id:"slider_toddler_mc", newid:"slider2", funct:"change_sound_volume", value:target_mc.sets.getProp("sound_volume"), min:0, max:100}, {_x:470, _y:270});
}
}
Symbol 3825 MovieClip [__Packages.InGameMenu] Frame 0
class InGameMenu extends UserMenu
{
var depth, startdepth, addButton, addCaption, target_mc;
function InGameMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addButton({id:"button_menu_mc", newid:"button_menu_mc1", funct:"go_pause"}, {_x:540, _y:460});
addCaption({newid:"capt10", text:target_mc.game_set.Labels[target_mc.game_set.LANG].menu, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:545, _y:458, _width:80, _height:30});
}
}
Symbol 3826 MovieClip [__Packages.PauseMenu] Frame 0
class PauseMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton, addSlider;
function PauseMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].pause, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addButton({id:"button_big_mc", newid:"button_small_mc1", funct:"go_pause_game"}, {_x:440, _y:320});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].back_game, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:330, _width:170, _height:40});
addButton({id:"button_big_mc", newid:"button_small_mc2", funct:"go_pause_restart_confirm"}, {_x:440, _y:360});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].restart_level, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:370, _width:170, _height:40});
addButton({id:"button_big_mc", newid:"button_small_mc3", funct:"go_pause_exit_confirm"}, {_x:440, _y:400});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].return_to_main_menu, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:410, _width:170, _height:40});
addButton({id:"button_big_mc", newid:"button_small_mc4", funct:"go_pause_about"}, {_x:440, _y:440});
addCaption({newid:"capt4", text:target_mc.game_set.Labels[target_mc.game_set.LANG].about, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:450, _width:170, _height:40});
addCaption({newid:"capt5", text:target_mc.game_set.Labels[target_mc.game_set.LANG].music_volume, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:430, _y:156, _width:150, _height:40});
addSlider({slider_id:"slider", head_id:"slider_toddler_mc", newid:"slider1", funct:"change_music_volume", value:target_mc.sets.getProp("music_volume"), min:0, max:100}, {_x:430, _y:190});
addCaption({newid:"capt6", text:target_mc.game_set.Labels[target_mc.game_set.LANG].sound_volume, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:236, _width:150, _height:40});
addSlider({slider_id:"slider", head_id:"slider_toddler_mc", newid:"slider2", funct:"change_sound_volume", value:target_mc.sets.getProp("sound_volume"), min:0, max:100}, {_x:470, _y:270});
}
}
Symbol 3827 MovieClip [__Packages.WinMenu] Frame 0
class WinMenu extends UserMenu
{
var depth, startdepth;
function WinMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
}
}
Symbol 3828 MovieClip [__Packages.LoseMenu] Frame 0
class LoseMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton;
function LoseMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].game_over, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
if (target_mc.game_over_type == "score") {
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].game_over_text, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:420, _y:155, _width:200, _height:150});
} else {
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].game_over_vip_text, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:420, _y:155, _width:200, _height:150});
}
addButton({id:"button_big_mc", newid:"button_small_mc2", funct:"go_lose_restart"}, {_x:440, _y:320});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].restart_level, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:330, _width:170, _height:40});
addButton({id:"button_big_mc", newid:"button_small_mc3", funct:"go_lose_main"}, {_x:440, _y:360});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].return_to_main_menu, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:370, _width:170, _height:40});
}
}
Symbol 3829 MovieClip [__Packages.LeaveMenu] Frame 0
class LeaveMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton;
function LeaveMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].leave_game + "?", format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].leave_text, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:420, _y:155, _width:200, _height:150});
addButton({id:"button_small_mc", newid:"button_small_mc2", funct:"go_exit_menu"}, {_x:440, _y:320});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].leave, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:326, _width:150, _height:40});
addButton({id:"button_small_mc", newid:"button_small_mc3", funct:"go_exit_pause"}, {_x:440, _y:360});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].cancel, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:366, _width:150, _height:40});
}
}
Symbol 3830 MovieClip [__Packages.ExitMenu] Frame 0
class ExitMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton;
function ExitMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"menu_bg", newid:"menu_bg"}, {});
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].exit + "?", format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].exit_text, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:420, _y:155, _width:200, _height:150});
addButton({id:"button_small_mc", newid:"button_small_mc2", funct:"go_close_exit"}, {_x:440, _y:320});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].exit, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:326, _width:150, _height:40});
addButton({id:"button_small_mc", newid:"button_small_mc3", funct:"go_close_menu"}, {_x:440, _y:360});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].cancel, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:366, _width:150, _height:40});
}
}
Symbol 3831 MovieClip [__Packages.RestartMenu] Frame 0
class RestartMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton;
function RestartMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"panel", newid:"panel"}, {_x:360, _y:5});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].restart_level + "?", format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].restart_text, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:420, _y:155, _width:200, _height:150});
addButton({id:"button_small_mc", newid:"button_small_mc2", funct:"go_restart_restart"}, {_x:440, _y:320});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].yes, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:326, _width:150, _height:40});
addButton({id:"button_small_mc", newid:"button_small_mc3", funct:"go_restart_pause"}, {_x:440, _y:360});
addCaption({newid:"capt3", text:target_mc.game_set.Labels[target_mc.game_set.LANG].cancel, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:366, _width:150, _height:40});
}
}
Symbol 3832 MovieClip [__Packages.UserSettings] Frame 0
class UserSettings
{
var target_mc, data, def, set_so;
function UserSettings (_target_mc) {
target_mc = _target_mc;
data = new Object();
def = new Object();
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_OPEN) {
set_so = SharedObject.getLocal(target_mc.game_set.SHARED_NAME + "_open");
set_so.clear();
} else {
set_so = SharedObject.getLocal(target_mc.game_set.SHARED_NAME);
}
defaultSettings();
useSettings();
}
function setProp(prop, val) {
data[prop] = val;
saveSettings();
}
function getProp(prop) {
return(data[prop]);
}
function defaultOptions() {
set_so.data.music_volume = def.music_volume;
set_so.data.sound_volume = def.sound_volume;
useSettings();
}
function defaultSettings() {
var _local3 = 0;
while (_local3 < target_mc.game_set.COL_STAGES) {
var _local2 = 0;
while (_local2 < target_mc.game_set.COL_LEVELS) {
def[("goals" + _local3) + _local2] = 0;
_local2++;
}
_local3++;
}
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_OPEN) {
def.score = 0;
def.music_volume = 20;
def.sound_volume = 50;
def.max_level = 2;
def.max_stage = 3;
def.current_level = 0;
def.current_stage = 0;
} else {
def.score = 0;
def.music_volume = 20;
def.sound_volume = 50;
def.max_level = 0;
def.max_stage = 0;
def.current_level = 0;
def.current_stage = 0;
}
}
function useSettings() {
for (var _local2 in def) {
if ((set_so.data[_local2] == null) || (set_so.data[_local2] == undefined)) {
set_so.data[_local2] = def[_local2];
}
data[_local2] = set_so.data[_local2];
}
saveSettings();
}
function show_settings() {
for (var _local2 in set_so.data) {
trace((_local2 + ": ") + set_so.data[_local2]);
}
}
function saveSettings() {
for (var _local2 in data) {
set_so.data[_local2] = data[_local2];
}
set_so.flush();
}
}
Symbol 3833 MovieClip [__Packages.GameSettings] Frame 0
class GameSettings
{
var ratio, unratio, GAME_VERSION_DEBUG, GAME_VERSION_TEST, GAME_VERSION_DEBUG_PLACES, GAME_VERSION_DEBUG_CHARACTERS, GAME_VERSION_OPEN, game_version, get_more_games_link_select, DEBUG, SHARED_NAME, get_more_games_link, ROOT_W, ROOT_H, W, H, DX, DY, X0, Y0, sound_array, music_array, score_format, goal_format, button_format, button_compress_format, money_format, level_preview_format, level_format, tutor_format, LANG, Labels, COL_TUTORS, tutor, tutor_steps, COL_STAGES, COL_LEVELS, fireworks, levels;
function GameSettings (root) {
ratio = root.ratio;
unratio = root.unratio;
GAME_VERSION_DEBUG = 0;
GAME_VERSION_TEST = 1;
GAME_VERSION_DEBUG_PLACES = 2;
GAME_VERSION_DEBUG_CHARACTERS = 3;
GAME_VERSION_OPEN = 4;
game_version = root.game_version;
get_more_games_link_select = root.get_more_games_link_select;
logo_enabled = root.logo_enabled;
MochiAdID = root.MochiAdID;
MochiAdRes = root.MochiAdRes;
DEBUG = root.DEBUG;
FULLSCREEN = false;
SHARED_NAME = "party_down_2";
get_more_games_link = get_more_games_link_select;
TIMER_INTERVAL = 30;
ROOT_W = 640;
ROOT_H = 480;
W = 22;
H = 22;
DX = 32;
DY = 19.4;
X0 = 319;
Y0 = (480 + (DY * 10)) + 8;
sound_array = ["bad_action", "bad_vip_talk", "button_click", "button_select_0", "drag", "dustbin", "goal_money_bronze", "goal_money_gold", "goal_money_silver", "vip_talk", "visitor_good_mood", "visitor_wish", "volume_slider"];
music_array = ["menu_music", "game_music", "level_begin", "level_complete", "level_failed"];
score_format = new TextFormat();
score_format.color = 16763904 /* 0xFFCC00 */;
score_format.font = "Arial";
score_format.bold = true;
score_format.italic = true;
score_format.size = 24;
score_format.align = "right";
goal_format = new TextFormat();
goal_format.color = 7247019 /* 0x6E94AB */;
goal_format.font = "Arial";
goal_format.bold = true;
goal_format.italic = true;
goal_format.size = 12;
goal_format.align = "right";
button_format = new TextFormat();
button_format.color = 16763904 /* 0xFFCC00 */;
button_format.font = "Arial";
button_format.bold = true;
button_format.italic = true;
button_format.size = 16;
button_format.align = "center";
button_compress_format = new TextFormat();
button_compress_format.color = 16763904 /* 0xFFCC00 */;
button_compress_format.font = "Arial";
button_compress_format.bold = true;
button_compress_format.italic = true;
button_compress_format.size = 16;
button_compress_format.align = "center";
button_compress_format.letterSpacing = -1;
money_format = new TextFormat();
money_format.color = 65280;
money_format.font = "Arial";
money_format.bold = true;
money_format.italic = true;
money_format.size = 24;
money_format.align = "center";
level_preview_format = new TextFormat();
level_preview_format.color = 16777215 /* 0xFFFFFF */;
level_preview_format.font = "Arial";
level_preview_format.italic = true;
level_preview_format.bold = true;
level_preview_format.size = 20;
level_preview_format.align = "center";
level_format = new TextFormat();
level_format.color = 16763904 /* 0xFFCC00 */;
level_format.font = "Arial";
level_format.italic = true;
level_format.bold = true;
level_format.size = 60;
level_format.align = "center";
tutor_format = new TextFormat();
tutor_format.color = 16777215 /* 0xFFFFFF */;
tutor_format.font = "Arial";
tutor_format.italic = true;
tutor_format.bold = true;
tutor_format.size = ratio * 14;
tutor_format.align = "justify";
LANG = root.LANG;
Labels = new Array();
Labels.ru = new Object();
Labels.en = new Object();
if (game_version == GAME_VERSION_MAIL_RU) {
Labels.ru.get_more_games = "\u0421\u043A\u0430\u0447\u0430\u0442\u044C\n\u043F\u043E\u043B\u043D\u0443\u044E \u0432\u0435\u0440\u0441\u0438\u044E";
Labels.en.get_more_games = "Download\nfull version";
} else {
Labels.ru.get_more_games = "\u0411\u043E\u043B\u044C\u0448\u0435 \u0438\u0433\u0440!";
Labels.en.get_more_games = "Get more games!";
}
Labels.en.level00 = "Angelina's Birthday Party\nHour 1";
Labels.en.level01 = "Angelina's Birthday Party\nHour 2";
Labels.en.level02 = "Angelina's Birthday Party\nHour 3";
Labels.en.level03 = "Angelina's Birthday Party\nHour 4";
Labels.en.level04 = "Angelina's Birthday Party\nHour 5";
Labels.en.level05 = "Angelina's Birthday Party\nHour 6";
Labels.en.level10 = "Camero's Malibu Resort Pool Party\nHour 1";
Labels.en.level11 = "Camero's Malibu Resort Pool Party\nHour 2";
Labels.en.level12 = "Camero's Malibu Resort Pool Party\nHour 3";
Labels.en.level13 = "Camero's Malibu Resort Pool Party\nHour 4";
Labels.en.level14 = "Camero's Malibu Resort Pool Party\nHour 5";
Labels.en.level15 = "Camero's Malibu Resort Pool Party\nHour 6";
Labels.en.level20 = "Film Festival Actor's Ball\nHour 1";
Labels.en.level21 = "Film Festival Actor's Ball\nHour 2";
Labels.en.level22 = "Film Festival Actor's Ball\nHour 3";
Labels.en.level23 = "Film Festival Actor's Ball\nHour 4";
Labels.en.level24 = "Film Festival Actor's Ball\nHour 5";
Labels.en.level25 = "Film Festival Actor's Ball\nHour 6";
Labels.en.loading = "Loading";
Labels.en.welcome = "WELCOME";
Labels.en.restart_level = "RESTART LEVEL";
Labels.en.select_level = "SELECT LEVEL";
Labels.en.return_to_main_menu = "EXIT TO MAIN MENU";
Labels.en.start = "START";
Labels.en.options = "OPTIONS";
Labels.en.play = "PLAY";
Labels.en.music_volume = "MUSIC VOLUME";
Labels.en.sound_volume = "SOUNDS VOLUME";
Labels.en.back = "BACK";
Labels.en.menu = "MENU";
Labels.en.pause = "PAUSE";
Labels.en.back_game = "RETURN TO GAME";
Labels.en.back_menu = "BACK TO MENU";
Labels.en.finish = "FINISH GAME";
Labels.en.level_complete = "LEVEL COMPLETE";
Labels.en.game_complete = "GAME COMPLETE";
Labels.en.game_over = "GAME OVER";
Labels.en.game_over_text = "If our tips are anything\nto go by we are not\ngoing to get a good\nsurvey rating.\n\n\tLets try this again.";
Labels.en.game_over_vip_text = "Make sure to chat\nit up more with\nthe stars this time.\n\nLet's give this\nanother try.";
Labels.en.restart_text = "Are you shure want\nto restart the level?";
Labels.en.leave_text = "Your game session\nwill be saved\nupon leaving";
Labels.en.ok = "OK";
Labels.en.yes = "YES";
Labels.en.leave = "LEAVE";
Labels.en.leave_game = "LEAVE GAME";
Labels.en.cancel = "CANCEL";
Labels.en.cont = "CONTINUE GAME";
Labels.en.restart = "RESTERT LEVEL";
Labels.en.exit = "EXIT";
Labels.en.exit_text = "Are you shure want\nto exit from the game?";
Labels.en.vip_talk_reached = "VIP talk reached!";
Labels.en.about = "ABOUT THE SHOW";
COL_TUTORS = 2;
tutor = new Array();
tutor_steps = new Array();
tutor_steps[0] = 14;
tutor_steps[1] = 9;
var _local3 = 0;
while (_local3 < COL_TUTORS) {
tutor[_local3] = new Array();
var _local2 = 0;
while (_local2 < tutor_steps[_local3]) {
tutor[_local3][_local2] = new Object();
_local2++;
}
_local3++;
}
tutor[0][0].action = {type:"addVisitor", character:"bred", place:"entrance"};
tutor[0][0].arrows = null;
tutor[0][0].hint = null;
tutor[0][0].complete = {action:"wait", time:0.5};
tutor[0][1].action = {type:"genWish", character:"bred", wish:"sit", place:"couch_2_1"};
tutor[0][1].arrows = [{_x:148, _y:306, type:"arrow_left_down"}, {_x:375, _y:115, type:"arrow_right_down"}];
tutor[0][1].hint = {_x:321, _y:242, text:"\tWe have our first visitor, Brad. Look at the bubble above his head to see where he wants to sit. Drag him to the green pillowed couch."};
tutor[0][1].complete = {action:"drag", character:"bred", place:"couch_2_1", time:0.5};
tutor[0][2].action = {type:"genWish", character:"bred", wish:"eat", provision:"chicken"};
tutor[0][2].arrows = [{_x:78, _y:179, type:"arrow_left_up"}];
tutor[0][2].hint = {_x:321, _y:242, text:"\tNow that Brad is comfortable a bubble appeared for food. Get it for him by clicking on the plate of chicken by the kitchen."};
tutor[0][2].complete = {action:"clickprovision", provision:"chicken", empty:false, time:0.5};
tutor[0][3].action = null;
tutor[0][3].arrows = [{_x:375, _y:115, type:"arrow_right_down"}];
tutor[0][3].hint = {_x:321, _y:242, text:"\tGreat! Now that you have picked it up, click on Brad to deliver it to him."};
tutor[0][3].complete = {action:"clickcharacter", character:"bred", time:5};
tutor[0][4].action = {type:"genWish", character:"bred", wish:"eat", provision:"cocktail"};
tutor[0][4].arrows = [{_x:378, _y:28, type:"arrow_right_up"}];
tutor[0][4].hint = {_x:321, _y:242, text:"\tNow a bubble has appeard for a drink. Click on the drink at the bar to get it for him."};
tutor[0][4].complete = {action:"clickprovision", provision:"cocktail", empty:false, time:0.5};
tutor[0][5].action = null;
tutor[0][5].arrows = [{_x:348, _y:177, type:"arrow_right_up"}];
tutor[0][5].hint = {_x:321, _y:242, text:"\tYou can not serve a guest anything if there are dirty dishes in front of them. Click on the plate to remove it."};
tutor[0][5].complete = {action:"clickprovision", provision:"chicken", empty:true, time:0.5};
tutor[0][6].action = null;
tutor[0][6].arrows = [{_x:417, _y:102, type:"arrow_left_down"}];
tutor[0][6].hint = {_x:321, _y:242, text:"\tGreat! Now you can serve him his drink."};
tutor[0][6].complete = {action:"clickcharacter", character:"bred", time:5};
tutor[0][7].action = null;
tutor[0][7].arrows = [{_x:348, _y:177, type:"arrow_right_up"}];
tutor[0][7].hint = {_x:321, _y:242, text:"\tPick up the empty cocktail glass once he is done."};
tutor[0][7].complete = {action:"clickprovision", provision:"cocktail", empty:true, time:0.5};
tutor[0][8].action = null;
tutor[0][8].arrows = [{_x:485, _y:116, type:"arrow_left_up"}];
tutor[0][8].hint = {_x:321, _y:242, text:"\tNow you can throw the dirty dishes away in the trash. If you ever pick up the wrong dish to serve a guest you can also throw it in the trash."};
tutor[0][8].complete = {action:"clickdustbin", name:"bar_dustbin", time:0.5};
tutor[0][9].action = {type:"genWish", character:"bred", wish:"talk", about:"cinema", place:"talk_area_0"};
tutor[0][9].arrows = [{_x:416, _y:109, type:"arrow_left_down"}, {_x:304, _y:294, type:"arrow_right_down"}];
tutor[0][9].hint = {_x:10, _y:50, text:"\tGuests love to mingle and chat. There are special conversation areas for this. Up to four people can talk in one area. Drag him there."};
tutor[0][9].complete = {action:"drag", character:"bred", place:"talk_area_0", time:0.1};
tutor[0][10].action = {type:"addVisitor", character:"britney", place:"entrance"};
tutor[0][10].arrows = null;
tutor[0][10].hint = null;
tutor[0][10].complete = {action:"wait", time:0.5};
tutor[0][11].action = {type:"genWish", character:"britney", wish:"talk", about:"cinema", place:"talk_area_0"};
tutor[0][11].arrows = [{_x:148, _y:306, type:"arrow_left_down"}, {_x:304, _y:294, type:"arrow_right_down"}];
tutor[0][11].hint = {_x:10, _y:50, text:"\tGood! Britney just arrived. She wants to talk about the same thing as Brad. Match people with the same conversation interests to start them talking."};
tutor[0][11].complete = {action:"drag", character:"britney", place:"talk_area_0", time:5};
tutor[0][12].action = {type:"genWish", character:"bred", wish:"dance", place:"dance_floor", use_progress:true};
tutor[0][12].arrows = [{_x:480, _y:300, type:"arrow_right_down"}];
tutor[0][12].hint = {_x:10, _y:50, text:"\tThe dance icon has appeared over Brad. Pay attention to the green meter around the icon. It shows his mood. Drag Brad to the dance floor before the meter falls to earn more tips."};
tutor[0][12].complete = {action:"drag", character:"bred", place:"dance_floor", time:3};
tutor[0][13].action = null;
tutor[0][13].arrows = [{_x:50, _y:50, type:"arrow_left_up"}, {_x:300, _y:470, type:"arrow_right_down"}];
tutor[0][13].hint = {_x:321, _y:242, text:"\tGood work! Keep an eye on the clock and the tip meter. Get at least enough tip money for the bronze star before time runs out. Good luck!\nClick mouse button..."};
tutor[0][13].complete = {action:"click"};
tutor[1][0].action = null;
tutor[1][0].arrows = null;
tutor[1][0].hint = {_x:321, _y:242, text:"\tIt's all about who you know. How many people you need to talk with is shown by the star conversation bubbles below. You must complete these by the end of the stage.\nClick mouse button..."};
tutor[1][0].complete = {action:"click", time:0.5};
tutor[1][1].action = {type:"addVisitor", character:"clint", place:"entrance"};
tutor[1][1].arrows = null;
tutor[1][1].hint = null;
tutor[1][1].complete = {action:"wait", time:0.5};
tutor[1][2].action = {type:"genWish", character:"clint", wish:"talk", about:"money", place:"chairs_vip"};
tutor[1][2].arrows = [{_x:148, _y:306, type:"arrow_left_down"}, {_x:192, _y:110, type:"arrow_left_up"}];
tutor[1][2].hint = {_x:321, _y:242, text:"\tNow grab the waiter and put them in the other VIP chair so they can chat."};
tutor[1][2].complete = {action:"drag", character:"clint", place:"chairs_vip", time:0.5};
tutor[1][3].action = null;
tutor[1][3].arrows = [{_x:260, _y:300, type:"arrow_right_down"}, {_x:192, _y:110, type:"arrow_left_up"}];
tutor[1][3].hint = {_x:321, _y:242, text:"\tYour staff can talk with anyone who has a conversation bubble over their head so lets make Clint comfortable in one of the VIP chairs."};
tutor[1][3].complete = {action:"dragman", place:"chairs_vip", time:5};
tutor[1][4].action = {type:"genWish", character:"clint", wish:"dance", place:"dance_floor"};
tutor[1][4].arrows = [{_x:463, _y:404, type:"arrow_right_down"}, {_x:192, _y:110, type:"arrow_left_up"}];
tutor[1][4].hint = {_x:50, _y:260, text:"\tGreat! Your team is getting a chance to mingle with the Hollywood elite! Now drag Clint to the dance floor."};
tutor[1][4].complete = {action:"drag", character:"clint", place:"dance_floor", time:2};
tutor[1][5].action = {type:"addVisitor", character:"amanda", place:"entrance"};
tutor[1][5].arrows = null;
tutor[1][5].hint = null;
tutor[1][5].complete = {action:"wait", time:0.5};
tutor[1][6].action = {type:"genWish", character:"amanda", wish:"talk", about:"fashion", place:"chairs_vip"};
tutor[1][6].arrows = [{_x:148, _y:306, type:"arrow_left_down"}, {_x:192, _y:110, type:"arrow_left_up"}];
tutor[1][6].hint = {_x:321, _y:242, text:"\tLet's grab another guest and move them to the VIP chair."};
tutor[1][6].complete = {action:"drag", character:"amanda", place:"chairs_vip", time:0.5};
tutor[1][7].action = null;
tutor[1][7].arrows = [{_x:35, _y:85, type:"arrow_left_down"}, {_x:192, _y:110, type:"arrow_left_up"}];
tutor[1][7].hint = {_x:321, _y:242, text:"\tVisitors can talk with any member of your team. Let's get your cook into a conversation. Move him to the empty VIP chair."};
tutor[1][7].complete = {action:"dragcock", place:"chairs_vip", time:5};
tutor[1][8].action = null;
tutor[1][8].arrows = [{_x:150, _y:450, type:"arrow_left_down"}];
tutor[1][8].hint = {_x:321, _y:242, text:"\tGreat! Make sure you finish all VIP conversations before time runs out to move on! Also, keep your team happy by giving them all a chance to chat!\nClick mouse button..."};
tutor[1][8].complete = {action:"click", time:0};
COL_STAGES = 3;
COL_LEVELS = 4;
fireworks = new Array();
levels = new Array();
_local3 = 0;
while (_local3 < COL_STAGES) {
fireworks[_local3] = new Object();
levels[_local3] = new Array();
var _local2 = 0;
while (_local2 < COL_LEVELS) {
levels[_local3][_local2] = new Object();
levels[_local3][_local2].themes = new Array();
levels[_local3][_local2].eat_places = new Array();
levels[_local3][_local2].events = new Array();
levels[_local3][_local2].visitors = new Array();
levels[_local3][_local2].car = new Object();
_local2++;
}
_local3++;
}
fireworks[0] = {_x:466, _y:417};
fireworks[1] = {_x:227, _y:303};
fireworks[2] = {_x:351, _y:179};
levels[0][0].car = {x:460, y:435, flip:false};
levels[0][1].car = {x:485, y:427, flip:false};
levels[0][2].car = {x:510, y:419, flip:false};
levels[0][3].car = {x:535, y:411, flip:false};
levels[0][4].car = {x:560, y:403, flip:false};
levels[0][5].car = {x:535, y:390, flip:false};
levels[1][0].car = {x:299, y:303, flip:false};
levels[1][1].car = {x:326, y:294, flip:false};
levels[1][2].car = {x:353, y:285, flip:false};
levels[1][3].car = {x:380, y:276, flip:false};
levels[1][4].car = {x:348, y:256, flip:false};
levels[1][5].car = {x:321, y:238, flip:false};
levels[2][0].car = {x:359, y:197, flip:false};
levels[2][1].car = {x:390, y:187, flip:false};
levels[2][2].car = {x:419, y:176, flip:false};
levels[2][3].car = {x:448, y:167, flip:false};
levels[2][4].car = {x:430, y:153, flip:false};
levels[2][5].car = {x:408, y:140, flip:false};
levels[0][0].vip_goals = 0;
levels[0][1].vip_goals = 0;
levels[0][2].vip_goals = 2;
levels[0][3].vip_goals = 3;
levels[0][4].vip_goals = 3;
levels[0][5].vip_goals = 3;
levels[1][0].vip_goals = 2;
levels[1][1].vip_goals = 2;
levels[1][2].vip_goals = 3;
levels[1][3].vip_goals = 3;
levels[1][4].vip_goals = 3;
levels[1][5].vip_goals = 3;
levels[2][0].vip_goals = 3;
levels[2][1].vip_goals = 3;
levels[2][2].vip_goals = 3;
levels[2][3].vip_goals = 3;
levels[2][4].vip_goals = 3;
levels[2][5].vip_goals = 4;
levels[0][0].room = "room0";
levels[0][0].time = 130;
levels[0][0].goals = [110, 150, 180];
levels[0][0].screen = "screen00";
levels[0][0].screen_text = Labels[LANG].level00;
levels[0][0].background = "background0";
levels[0][0].themes = ["cinema", "fashion"];
levels[0][0].eat_places = ["couch_2_1", "couch_3"];
levels[0][0].events[0] = [{action:"addTutor", tutor_number:0}];
levels[0][0].events[5] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][0].events[13] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][0].events[24] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][0].events[37] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][0].events[52] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][0].events[74] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][0].events[100] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][0].events[105] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][1].room = "room0";
levels[0][1].time = 120;
levels[0][1].goals = [110, 150, 180];
levels[0][1].screen = "screen00";
levels[0][1].screen_text = Labels[LANG].level01;
levels[0][1].background = "background0";
levels[0][1].themes = ["cinema", "fashion", "sport"];
levels[0][1].eat_places = ["couch_2_1", "couch_3"];
levels[0][1].events[0] = [{action:"addVisitor", character:"bred", place:"dance_floor", action_time:45}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:60}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:25}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:500}];
levels[0][1].events[5] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][1].events[15] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][1].events[30] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][1].events[45] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][1].events[75] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][1].events[100] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][2].room = "room0";
levels[0][2].time = 130;
levels[0][2].goals = [120, 170, 240];
levels[0][2].screen = "screen00";
levels[0][2].screen_text = Labels[LANG].level02;
levels[0][2].background = "background0";
levels[0][2].themes = ["cinema", "fashion", "sport", "money"];
levels[0][2].eat_places = ["couch_2_1", "couch_3"];
levels[0][2].events[1] = [{action:"addTutor", tutor_number:1}];
levels[0][2].events[0] = [{action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}];
levels[0][2].events[5] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][2].events[15] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][2].events[25] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][2].events[35] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][2].events[45] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][2].events[65] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][2].events[55] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][2].events[75] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][2].events[115] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][3].room = "room0";
levels[0][3].time = 130;
levels[0][3].goals = [135, 190, 270];
levels[0][3].screen = "screen00";
levels[0][3].screen_text = Labels[LANG].level03;
levels[0][3].background = "background0";
levels[0][3].themes = ["cinema", "fashion", "sport", "money"];
levels[0][3].eat_places = ["couch_2_1", "couch_3"];
levels[0][3].events[0] = [{action:"addVisitor", character:"amanda", place:"dance_floor", action_time:35}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:5}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:67}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:80}];
levels[0][3].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][3].events[15] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][3].events[40] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][3].events[90] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][3].events[55] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][3].events[100] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][4].room = "room0";
levels[0][4].time = 135;
levels[0][4].goals = [140, 190, 280];
levels[0][4].screen = "screen00";
levels[0][4].screen_text = Labels[LANG].level04;
levels[0][4].background = "background0";
levels[0][4].themes = ["cinema", "fashion", "sport", "money"];
levels[0][4].eat_places = ["couch_2_1", "couch_3"];
levels[0][4].events[0] = [{action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:500}];
levels[0][4].events[7] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][4].events[15] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][4].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][4].events[35] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][4].events[40] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][4].events[115] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][4].events[50] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][4].events[65] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][4].events[75] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][4].events[80] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][4].events[110] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][4].events[95] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][5].room = "room0";
levels[0][5].time = 140;
levels[0][5].goals = [145, 195, 290];
levels[0][5].screen = "screen00";
levels[0][5].screen_text = Labels[LANG].level05;
levels[0][5].background = "background0";
levels[0][5].themes = ["cinema", "fashion", "sport", "money"];
levels[0][5].eat_places = ["couch_2_1", "couch_3"];
levels[0][5].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:7}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:35}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:5}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:20}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:55}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:40}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}];
levels[0][5].events[75] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[0][5].events[50] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][5].events[95] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[0][5].events[65] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[0][5].events[115] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[0][5].events[130] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][0].room = "room1";
levels[1][0].time = 145;
levels[1][0].goals = [160, 250, 320];
levels[1][0].screen = "screen01";
levels[1][0].screen_text = Labels[LANG].level10;
levels[1][0].background = "background1";
levels[1][0].themes = ["cinema", "fashion", "sport", "money"];
levels[1][0].eat_places = ["couch_21", "couch_31"];
levels[1][0].events[15] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][0].events[8] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][0].events[4] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][0].events[25] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][0].events[55] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][0].events[49] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][0].events[89] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][0].events[76] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][0].events[67] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][0].events[105] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][0].events[138] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][0].events[125] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][1].room = "room1";
levels[1][1].time = 150;
levels[1][1].goals = [180, 275, 360];
levels[1][1].screen = "screen01";
levels[1][1].screen_text = Labels[LANG].level11;
levels[1][1].background = "background1";
levels[1][1].themes = ["cinema", "fashion", "sport", "money"];
levels[1][1].eat_places = ["couch_21", "couch_31"];
levels[1][1].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:85}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:5}];
levels[1][1].events[35] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][1].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][1].events[75] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][1].events[60] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][1].events[45] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][1].events[140] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][1].events[130] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][1].events[120] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][1].events[95] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][1].events[110] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][2].room = "room1";
levels[1][2].time = 155;
levels[1][2].goals = [190, 290, 380];
levels[1][2].screen = "screen01";
levels[1][2].screen_text = Labels[LANG].level12;
levels[1][2].background = "background1";
levels[1][2].themes = ["cinema", "fashion", "sport", "money"];
levels[1][2].eat_places = ["couch_21", "couch_31"];
levels[1][2].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:65}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:135}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}];
levels[1][2].events[80] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][2].events[90] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][2].events[105] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][2].events[115] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][2].events[145] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][2].events[5] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][2].events[15] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][2].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][2].events[35] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][2].events[45] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][2].events[55] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][3].room = "room1";
levels[1][3].time = 160;
levels[1][3].goals = [210, 300, 420];
levels[1][3].screen = "screen01";
levels[1][3].screen_text = Labels[LANG].level13;
levels[1][3].background = "background1";
levels[1][3].themes = ["cinema", "fashion", "sport", "money"];
levels[1][3].eat_places = ["couch_21", "couch_31"];
levels[1][3].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:95}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:107}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:6}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:16}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}];
levels[1][3].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][3].events[37] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][3].events[43] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][3].events[57] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][3].events[69] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][3].events[75] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][3].events[85] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][3].events[120] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][3].events[130] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][3].events[145] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][3].events[155] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][4].room = "room1";
levels[1][4].time = 165;
levels[1][4].goals = [220, 325, 440];
levels[1][4].screen = "screen01";
levels[1][4].screen_text = Labels[LANG].level14;
levels[1][4].background = "background1";
levels[1][4].themes = ["cinema", "fashion", "sport", "money"];
levels[1][4].eat_places = ["couch_21", "couch_31"];
levels[1][4].events[0] = [{action:"addVisitor", character:"bred", place:"dance_floor", action_time:5}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:90}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:105}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:155}];
levels[1][4].events[115] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][4].events[125] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][4].events[130] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][4].events[145] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][4].events[25] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][4].events[35] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][4].events[45] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][4].events[57] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][4].events[68] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][4].events[79] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][5].room = "room1";
levels[1][5].time = 170;
levels[1][5].goals = [240, 350, 480];
levels[1][5].screen = "screen01";
levels[1][5].screen_text = Labels[LANG].level15;
levels[1][5].background = "background1";
levels[1][5].themes = ["cinema", "fashion", "sport", "money"];
levels[1][5].eat_places = ["couch_21", "couch_31"];
levels[1][5].events[0] = [{action:"addVisitor", character:"bred", place:"dance_floor", action_time:150}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:160}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:47}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:59}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:65}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}];
levels[1][5].events[78] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][5].events[89] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][5].events[5] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][5].events[35] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[1][5].events[12] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][5].events[25] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][5].events[100] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[1][5].events[125] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[1][5].events[115] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[1][5].events[140] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][0].room = "room2";
levels[2][0].time = 165;
levels[2][0].goals = [230, 350, 460];
levels[2][0].screen = "screen02";
levels[2][0].screen_text = Labels[LANG].level20;
levels[2][0].background = "background2";
levels[2][0].themes = ["cinema", "fashion", "sport", "money"];
levels[2][0].eat_places = ["couch_22", "couch_32"];
levels[2][0].events[30] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][0].events[43] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][0].events[50] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][0].events[93] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][0].events[105] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][0].events[125] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][0].events[115] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][0].events[135] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][0].events[5] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][0].events[12] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][0].events[60] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][0].events[70] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][0].events[80] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][1].room = "room2";
levels[2][1].time = 170;
levels[2][1].goals = [240, 360, 480];
levels[2][1].screen = "screen02";
levels[2][1].screen_text = Labels[LANG].level21;
levels[2][1].background = "background2";
levels[2][1].themes = ["cinema", "fashion", "sport", "money"];
levels[2][1].eat_places = ["couch_22", "couch_32"];
levels[2][1].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:45}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:15}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:5}];
levels[2][1].events[23] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][1].events[34] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][1].events[56] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][1].events[135] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][1].events[150] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][1].events[160] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][1].events[123] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][1].events[110] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][1].events[63] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][1].events[70] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][1].events[80] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][1].events[95] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][2].room = "room2";
levels[2][2].time = 145;
levels[2][2].goals = [160, 250, 320];
levels[2][2].screen = "screen02";
levels[2][2].screen_text = Labels[LANG].level22;
levels[2][2].background = "background2";
levels[2][2].themes = ["cinema", "fashion", "sport", "money"];
levels[2][2].eat_places = ["couch_22", "couch_32"];
levels[2][2].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:160}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:75}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:85}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:95}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:105}];
levels[2][2].events[6] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][2].events[15] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][2].events[32] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][2].events[155] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][2].events[140] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][2].events[130] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][2].events[115] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][2].events[45] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][2].events[55] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][2].events[65] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][3].room = "room2";
levels[2][3].time = 180;
levels[2][3].goals = [260, 370, 520];
levels[2][3].screen = "screen02";
levels[2][3].screen_text = Labels[LANG].level23;
levels[2][3].background = "background2";
levels[2][3].themes = ["cinema", "fashion", "sport", "money"];
levels[2][3].eat_places = ["couch_22", "couch_32"];
levels[2][3].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:35}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:25}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:10}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:5}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:65}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}];
levels[2][3].events[40] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][3].events[50] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][3].events[70] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][3].events[83] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][3].events[90] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][3].events[102] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][3].events[137] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][3].events[115] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][3].events[125] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][3].events[150] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][3].events[165] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][4].room = "room2";
levels[2][4].time = 185;
levels[2][4].goals = [265, 380, 530];
levels[2][4].screen = "screen02";
levels[2][4].screen_text = Labels[LANG].level24;
levels[2][4].background = "background2";
levels[2][4].themes = ["cinema", "fashion", "sport", "money"];
levels[2][4].eat_places = ["couch_22", "couch_32"];
levels[2][4].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:500}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:10}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:5}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:130}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:145}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:160}];
levels[2][4].events[25] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][4].events[35] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][4].events[45] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][4].events[55] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][4].events[125] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][4].events[115] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][4].events[105] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][4].events[90] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][4].events[65] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][4].events[70] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][4].events[80] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][5].room = "room2";
levels[2][5].time = 185;
levels[2][5].goals = [270, 390, 540];
levels[2][5].screen = "screen02";
levels[2][5].screen_text = Labels[LANG].level25;
levels[2][5].background = "background2";
levels[2][5].themes = ["cinema", "fashion", "sport", "money"];
levels[2][5].eat_places = ["couch_22", "couch_32"];
levels[2][5].events[0] = [{action:"addVisitor", character:"britney", place:"dance_floor", action_time:35}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:45}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:70}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:55}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:60}, {action:"addVisitor", character:"britney", place:"dance_floor", action_time:110}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:125}, {action:"addVisitor", character:"clint", place:"dance_floor", action_time:135}, {action:"addVisitor", character:"bred", place:"dance_floor", action_time:150}, {action:"addVisitor", character:"amanda", place:"dance_floor", action_time:165}];
levels[2][5].events[5] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][5].events[15] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][5].events[25] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
levels[2][5].events[30] = [{action:"addVisitor", character:"bred", place:"entrance", action_time:0}];
levels[2][5].events[80] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][5].events[85] = [{action:"addVisitor", character:"britney", place:"entrance", action_time:0}];
levels[2][5].events[95] = [{action:"addVisitor", character:"amanda", place:"entrance", action_time:0}];
levels[2][5].events[100] = [{action:"addVisitor", character:"clint", place:"entrance", action_time:0}];
}
var logo_enabled = true;
var TIMER_INTERVAL = 30;
var ONE_SECOND = 1000;
var WISH_TIME_MIN = 23;
var WISH_TIME_DELTA = 2;
var WORK_TIME = 10;
var IDLE_TIME = 2;
var FRAME_RATE = 12;
var SEARCH_DIST = 50;
var MAX_SCORE = 10;
var MAX_SCORE_PERCENT = 75;
var SOUND_DEPTH = 15997;
var MUSIC_DEPTH = 15998;
var STAGE_BG_DEPTH = 0;
var MAX_DEPTH = 14000;
var DRAG_DEPTH = 14400;
var INTERFACE_DEPTH = 15000;
var MAIN_MENU_DEPTH = 15500;
var FAKE_DEPTH = 15999;
var DELTA_DEPTH = 30;
}
Symbol 3834 MovieClip [__Packages.Level] Frame 0
class Level
{
var target_mc, W, H, DX, DY, X0, Y0, MAX_DEPTH, DELTA_DEPTH, last_check_pos, check_pos, level_set, events, visitors, lost_visitors, visit_count, lost_count, text_manager, start_timer, room, man, woman, barman, cock, maintimer, level_interface, tutorManager, next_level_timer, pole, depths, s;
function Level (_target_mc, _ls) {
target_mc = _target_mc;
W = target_mc.game_set.W;
H = target_mc.game_set.H;
DX = target_mc.game_set.DX;
DY = target_mc.game_set.DY;
X0 = target_mc.game_set.X0;
Y0 = target_mc.game_set.Y0;
MAX_DEPTH = target_mc.game_set.MAX_DEPTH;
DELTA_DEPTH = target_mc.game_set.DELTA_DEPTH;
last_check_pos = new Object();
check_pos = new Object();
level_set = new Object();
level_set = _ls;
target_mc.eventManager.addListener(this);
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_CHARACTERS) {
target_mc.CreateEmptyMovieClip("setka", 15910);
}
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_PLACES) {
target_mc.CreateEmptyMovieClip("setka", 15910);
target_mc.AttachMovie("test_bg", "net", 15900, {_alpha:30});
}
events = new Array();
events = level_set.events;
visitors = new Array();
lost_visitors = new Array();
visit_count = 0;
lost_count = 0;
text_manager = new PopUpTextManager(target_mc, this);
showScreen();
}
function remove() {
Mouse.removeListener(this);
target_mc.eventManager.removeListener(this);
target_mc.bg.removeMovieClip();
}
function showScreen() {
target_mc.level_begin();
target_mc.AttachMovie(level_set.screen, "bg", target_mc.game_set.STAGE_BG_DEPTH);
text_manager.addText(level_set.screen_text, 70, 0, 250, 640, 80, target_mc.game_set.level_preview_format);
target_mc.bg.cacheAsBitmap = true;
start_timer = setInterval(this, "startlevel", 3000);
}
function startlevel() {
target_mc.game_music();
target_mc.sets.setProp("score", 0);
target_mc.ingamemenu.show();
clearInterval(start_timer);
target_mc.bg.removeMovieClip();
target_mc.AttachMovie(level_set.background, "bg", target_mc.game_set.STAGE_BG_DEPTH);
target_mc.bg.cacheAsBitmap = true;
createDepths();
createpole();
switch (level_set.room) {
case "room0" :
room = new Room0(target_mc, this);
break;
case "room1" :
room = new Room1(target_mc, this);
break;
case "room2" :
room = new Room2(target_mc, this);
}
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_CHARACTERS) {
drawSetka(target_mc.setka, 10, 10);
}
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_PLACES) {
showpole();
}
man = new Man(target_mc, this, "man", "man");
var _local2 = room.findCharacterPosition(null, null, "main_character", null);
man.setPosition(_local2);
woman = new Person(target_mc, this, "woman", "woman");
_local2 = room.getCheckPointPosition("bar", "neutral");
woman.setPosition(_local2);
barman = new Barman(target_mc, this, "barman", "barman");
_local2 = room.findCharacterPosition(null, null, "bar", null);
barman.setPosition(_local2);
cock = new Cock(target_mc, this, "cock", "cock");
_local2 = room.findCharacterPosition(null, null, "kitchen", null);
cock.setPosition(_local2);
maintimer = new MainTimer(target_mc, this, level_set.time, events);
level_interface = new LevelInterface(target_mc, this);
}
function finishlevel() {
tutorManager.finish();
stop_all_timers();
remove();
man.remove();
delete man;
woman.remove();
delete woman;
barman.remove();
delete barman;
cock.remove();
delete cock;
removeVisitors();
room.destroy();
delete room;
level_interface.remove();
delete level_interface;
text_manager.remove();
delete text_manager;
}
function addTutor(obj) {
tutor = true;
tutorManager = new Tutor(target_mc, this, target_mc.game_set.tutor[obj.tutor_number], target_mc.game_set.tutor_steps[obj.tutor_number]);
}
function removeTutor() {
delete tutorManager;
tutor = false;
}
function addVisitor(obj) {
var _local2 = room.findCharacterPosition(null, null, obj.place, null);
if (_local2 != null) {
visitors[visit_count] = new Visitor(target_mc, this, obj.character + visit_count, obj.character);
visitors[visit_count].setPosition(_local2);
visitors[visit_count].changePose(visitors[visit_count].getPose(_local2));
room.setEmptyCharacterPosition(visitors[visit_count].position.x, visitors[visit_count].position.y, false);
visitors[visit_count].generateWishes(obj.action_time);
visit_count++;
} else {
lost_visitors[lost_count] = setInterval(this, "addLostVisitor", 2000, lost_count, obj);
lost_count++;
}
}
function getVisitorByName(character) {
var _local2 = 0;
while (_local2 < visit_count) {
if (visitors[_local2].character == character) {
return(visitors[_local2]);
}
_local2++;
}
return(visitors[0]);
}
function removeVisitors() {
var _local2 = 0;
while (_local2 < visit_count) {
visitors[_local2].remove();
delete visitors[_local2];
_local2++;
}
delete visitors;
}
function time_is_over() {
stop_all_timers();
if (getScore() >= level_set.goals[0]) {
if (level_interface.vip_count < level_set.vip_goals) {
target_mc.game_over_type = "vip";
game_over();
} else {
level_complete();
}
} else {
target_mc.game_over_type = "score";
game_over();
}
}
function level_complete() {
target_mc.level_complete();
target_mc.ingamemenu.hide();
var _local3 = target_mc.sets.data.current_stage;
var _local2 = target_mc.sets.data.current_level;
if (getScore() >= level_set.goals[2]) {
if (target_mc.sets.getProp(("goals" + _local3) + _local2) < 3) {
target_mc.sets.setProp(("goals" + _local3) + _local2, 3);
}
} else if (getScore() >= level_set.goals[1]) {
if (target_mc.sets.getProp(("goals" + _local3) + _local2) < 2) {
target_mc.sets.setProp(("goals" + _local3) + _local2, 2);
}
} else if (getScore() >= level_set.goals[0]) {
if (target_mc.sets.getProp(("goals" + _local3) + _local2) < 1) {
target_mc.sets.setProp(("goals" + _local3) + _local2, 1);
}
}
text_manager.addText(target_mc.game_set.Labels[target_mc.game_set.LANG].level_complete, 100, 0, 210, 640, 80, target_mc.game_set.level_format);
next_level_timer = setInterval(this, "go_to_next_level", 5000);
}
function game_over() {
target_mc.level_failed();
target_mc.go_lose();
}
function go_to_next_level() {
clearInterval(next_level_timer);
finishlevel();
target_mc.next_level();
}
function stop_all_timers() {
clearInterval(woman.frame_timer);
clearInterval(woman.talk_timer);
clearInterval(woman.idle_action_timer);
woman.animator.cancel();
woman.removeEvents();
clearInterval(man.frame_timer);
clearInterval(man.talk_timer);
man.removeEvents();
clearInterval(barman.frame_timer);
clearInterval(barman.talk_timer);
clearInterval(barman.work_timer);
barman.removeEvents();
clearInterval(cock.frame_timer);
clearInterval(cock.talk_timer);
clearInterval(cock.work_timer);
cock.removeEvents();
var _local2 = 0;
while (_local2 < visit_count) {
clearInterval(visitors[_local2].frame_timer);
clearInterval(visitors[_local2].wish_timer);
clearInterval(visitors[_local2].progress_timer);
visitors[_local2].removeEvents();
_local2++;
}
room.removeEvents();
_local2 = 0;
while (_local2 < lost_count) {
clearInterval(lost_visitors[_local2]);
_local2++;
}
}
function getScore() {
return(target_mc.sets.data.score);
}
function addScore(val) {
if ((target_mc.sets.data.score < level_set.goals[0]) && ((target_mc.sets.data.score + val) >= level_set.goals[0])) {
target_mc.goal_money_bronze();
}
if ((target_mc.sets.data.score < level_set.goals[1]) && ((target_mc.sets.data.score + val) >= level_set.goals[1])) {
target_mc.goal_money_silver();
}
if ((target_mc.sets.data.score < level_set.goals[2]) && ((target_mc.sets.data.score + val) >= level_set.goals[2])) {
target_mc.goal_money_gold();
}
target_mc.sets.setProp("score", target_mc.sets.data.score + val);
level_interface.update();
}
function addLostVisitor(lost_num, obj) {
clearInterval(lost_visitors[lost_num]);
addVisitor(obj);
}
function addCheckPointTarget(objLink, objType, objName, objCheckerPosition, objCheckPoint, objPlace, objExtent, objCheckerDepth) {
last_check_pos.objLink = check_pos.objLink;
check_pos.objLink = objLink;
var _local2 = room.getCheckPointPosition(objPlace, objCheckPoint);
if (check_pos.objLink != last_check_pos.objLink) {
woman.event_add_check_point(objCheckerPosition, objCheckerDepth + 1, objType);
woman.event_add_target({link:objLink, position:_local2, type:objType, name:objName, checkerPosition:objCheckerPosition, checkPoint:objCheckPoint, place:objPlace, extent:objExtent, checkerDepth:objCheckerDepth});
}
}
function drawSetka(obj, dw, dh) {
obj.lineStyle(0, 0, 20);
var _local2 = 0;
while (_local2 <= (target_mc.game_set.ROOT_W / dw)) {
obj.moveTo(_local2 * dw, 0);
obj.lineTo(_local2 * dw, target_mc.game_set.ROOT_H);
_local2++;
}
_local2 = 0;
while (_local2 <= (target_mc.game_set.ROOT_H / dh)) {
obj.moveTo(0, _local2 * dh);
obj.lineTo(target_mc.game_set.ROOT_W, _local2 * dh);
_local2++;
}
}
function show() {
}
function hide() {
}
function traceArray(_arr) {
trace("============");
var _local3;
var _local1 = 0;
while (_local1 < _arr.length) {
if (_local1 < 10) {
_local3 = (" " + _local1) + ":";
} else {
_local3 = _local1 + ":";
}
var _local2 = 0;
while (_local2 < _arr[_local1].length) {
_local3 = _local3 + (" " + _arr[_local1][_local2]);
if (_arr[_local1][_local2] < 10) {
_local3 = _local3 + " ";
}
_local2++;
}
trace(_local3);
_local1++;
}
trace("============");
}
function createpole() {
pole = new Array();
var _local3 = 0;
while (_local3 < W) {
pole[_local3] = new Array();
var _local2 = 0;
while (_local2 < H) {
pole[_local3][_local2] = false;
_local2++;
}
_local3++;
}
}
function createDepths() {
depths = new Array();
var _local3 = 0;
while (_local3 < W) {
depths[_local3] = new Array();
_local3++;
}
st = 0;
_local3 = 0;
while (_local3 < W) {
var _local2 = 0;
while (_local2 <= _local3) {
x = _local2;
y = _local3 - _local2;
depths[x][y] = st++;
_local2++;
}
_local3++;
}
_local3 = 1;
while (_local3 < W) {
var _local2 = 0;
while (_local2 < (W - _local3)) {
x = _local2 + _local3;
y = (W - _local2) - 1;
depths[x][y] = st++;
_local2++;
}
_local3++;
}
}
function calcDepth(pi, pj, dt) {
return((MAX_DEPTH - (depths[pi][pj] * DELTA_DEPTH)) + dt);
}
function find_near_obj(x, y) {
var _local4 = new Object();
for (var _local9 in room.places) {
var _local2 = room.places[_local9].minposition.x;
var _local6 = room.places[_local9].maxposition.x;
var _local3 = room.places[_local9].minposition.y;
var _local5 = room.places[_local9].maxposition.y;
if (((((x + 1) == _local2) && (y >= _local3)) && (y <= _local5)) || ((((y + 1) == _local3) && (x >= _local2)) && (x <= _local6))) {
_local4.x = _local2;
_local4.y = _local3;
_local4.depth = room.places[_local9].depth + room.places[_local9].OUT;
return(_local4);
}
}
return(null);
}
function addBox(i, j) {
s = 100 + (random(2) * 100);
target_mc.AttachMovie("box" + random(2), (("box_" + i) + "_") + j, calcDepth(i, j, 0), {_x:screenX(i, j), _y:screenY(i, j), _xscale:s, _yscale:s});
}
function showpole() {
var _local3 = 0;
while (_local3 < W) {
var _local2 = 0;
while (_local2 < H) {
drawcell(target_mc.setka, _local3, _local2, pole[_local3][_local2]);
_local2++;
}
_local3++;
}
}
function screenX(x, y) {
return(X0 + ((x - y) * DX));
}
function screenY(x, y) {
return(Y0 + (((-x) - y) * DY));
}
function stageX(sx, sy) {
return(Math.floor(0.5 * (((Y0 - sy) / DY) - ((X0 - sx) / DX))));
}
function stageY(sx, sy) {
return(Math.floor(0.5 * (((Y0 - sy) / DY) + ((X0 - sx) / DX))));
}
function drawcell(obj, x, y, flag) {
obj.lineStyle(0, 16711680, 10);
obj.moveTo(screenX(x, y), screenY(x, y));
if (flag) {
obj.beginFill(16711680, 20);
}
obj.lineTo(screenX(x, y + 1), screenY(x, y + 1));
obj.lineTo(screenX(x + 1, y + 1), screenY(x + 1, y + 1));
obj.lineTo(screenX(x + 1, y), screenY(x + 1, y));
obj.lineTo(screenX(x, y), screenY(x, y));
if (flag) {
obj.endFill();
}
}
function findway(pos1, pos2, arr, w, h) {
var _local6 = new Buffer();
var _local13 = new Buffer();
var _local2 = new Array();
var _local5 = 0;
while (_local5 < w) {
_local2[_local5] = new Array();
var _local3 = 0;
while (_local3 < h) {
_local2[_local5][_local3] = 99;
_local3++;
}
_local5++;
}
var _local15 = 0;
var _local14 = 0;
pos1.l = 0;
_local2[pos1.x][pos1.y] = 0;
_local6.push(pos1);
while (((c = _local6.pop())) != null) {
if ((((c.x - 1) >= 0) and (!arr[c.x - 1][c.y])) and (_local2[c.x - 1][c.y] > (_local2[c.x][c.y] + 1))) {
_local2[c.x - 1][c.y] = _local2[c.x][c.y] + 1;
_local6.push({x:c.x - 1, y:c.y, l:_local2[c.x - 1][c.y]});
}
if ((((c.x + 1) < w) and (!arr[c.x + 1][c.y])) and (_local2[c.x + 1][c.y] > (_local2[c.x][c.y] + 1))) {
_local2[c.x + 1][c.y] = _local2[c.x][c.y] + 1;
_local6.push({x:c.x + 1, y:c.y, l:_local2[c.x + 1][c.y]});
}
if ((((c.y - 1) >= 0) and (!arr[c.x][c.y - 1])) and (_local2[c.x][c.y - 1] > (_local2[c.x][c.y] + 1))) {
_local2[c.x][c.y - 1] = _local2[c.x][c.y] + 1;
_local6.push({x:c.x, y:c.y - 1, l:_local2[c.x][c.y - 1]});
}
if ((((c.y + 1) < h) and (!arr[c.x][c.y + 1])) and (_local2[c.x][c.y + 1] > (_local2[c.x][c.y] + 1))) {
_local2[c.x][c.y + 1] = _local2[c.x][c.y] + 1;
_local6.push({x:c.x, y:c.y + 1, l:_local2[c.x][c.y + 1]});
}
}
var _local1 = new Object();
_local1 = pos2;
while ((_local1.x != pos1.x) or (_local1.y != pos1.y)) {
_local13.push({x:_local1.x, y:_local1.y, l:_local2[_local1.x][_local1.y]});
tx = _local1.x;
ty = _local1.y;
if ((((_local1.y - 1) >= 0) and (!arr[_local1.x][_local1.y - 1])) and (_local2[_local1.x][_local1.y - 1] < _local2[_local1.x][_local1.y])) {
_local1.y = _local1.y - 1;
} else if ((((_local1.y + 1) < h) and (!arr[_local1.x][_local1.y + 1])) and (_local2[_local1.x][_local1.y + 1] < _local2[_local1.x][_local1.y])) {
_local1.y = _local1.y + 1;
} else if ((((_local1.x - 1) >= 0) and (!arr[_local1.x - 1][_local1.y])) and (_local2[_local1.x - 1][_local1.y] < _local2[_local1.x][_local1.y])) {
_local1.x = _local1.x - 1;
} else if ((((_local1.x + 1) < w) and (!arr[_local1.x + 1][_local1.y])) and (_local2[_local1.x + 1][_local1.y] < _local2[_local1.x][_local1.y])) {
_local1.x = _local1.x + 1;
} else {
break;
}
_local2[tx][ty] = "<>";
}
_local13.reverse();
return(_local13.getData());
}
var pause = false;
var tutor = false;
}
Symbol 3835 MovieClip [__Packages.LevelInterface] Frame 0
class LevelInterface
{
var target_mc, parent, clocks, progress_bar, score_panel, btn_panel, goals, score_txt, shad, vip_goals, vip_count, vip_checkers;
function LevelInterface (_target_mc, _par) {
target_mc = _target_mc;
parent = _par;
clocks = target_mc.AttachMovie("clocks", "clocks", target_mc.game_set.INTERFACE_DEPTH, {_x:0, _y:0});
clocks.cacheAsBitmap = true;
progress_bar = target_mc.AttachMovie("progress_bar", "progress_bar", target_mc.game_set.INTERFACE_DEPTH + 1, {_x:102, _y:480});
progress_bar.cacheAsBitmap = true;
score_panel = target_mc.AttachMovie("ingame_panel", "score_panel", target_mc.game_set.INTERFACE_DEPTH + 2, {_x:25, _y:480});
score_panel.cacheAsBitmap = true;
btn_panel = target_mc.AttachMovie("ingame_panel", "btn_panel", target_mc.game_set.INTERFACE_DEPTH + 3, {_x:595, _y:480});
btn_panel.cacheAsBitmap = true;
goals = target_mc.AttachMovie("goals", "goals", target_mc.game_set.INTERFACE_DEPTH + 4, {_x:-5, _y:485});
goals.cacheAsBitmap = true;
goals.gotoAndStop(1);
score_txt = target_mc.CreateTextField("score_txt", target_mc.game_set.INTERFACE_DEPTH + 5, 5, 452, 80, 30);
score_txt.setTextFormat(target_mc.game_set.score_format);
score_txt.setNewTextFormat(target_mc.game_set.score_format);
score_txt.type = "dynamic";
score_txt.selectable = false;
score_txt.embedFonts = true;
shad = new flash.filters.DropShadowFilter(1, 45, 0, 100, 2, 2, 1, 3, false, false, false);
score_txt.filters = [shad];
score1_txt = target_mc.CreateTextField("score1_txt", target_mc.game_set.INTERFACE_DEPTH + 6, 315, 465, 40, 30);
score1_txt.setTextFormat(target_mc.game_set.goal_format);
score1_txt.setNewTextFormat(target_mc.game_set.goal_format);
score1_txt.type = "dynamic";
score1_txt.selectable = false;
score1_txt.embedFonts = true;
score1_txt.filters = [shad];
score1_txt.text = "$" + parent.level_set.goals[0];
score2_txt = target_mc.CreateTextField("score2_txt", target_mc.game_set.INTERFACE_DEPTH + 7, 385, 465, 40, 30);
score2_txt.setTextFormat(target_mc.game_set.goal_format);
score2_txt.setNewTextFormat(target_mc.game_set.goal_format);
score2_txt.type = "dynamic";
score2_txt.selectable = false;
score2_txt.embedFonts = true;
score2_txt.filters = [shad];
score2_txt.text = "$" + parent.level_set.goals[1];
score3_txt = target_mc.CreateTextField("score3_txt", target_mc.game_set.INTERFACE_DEPTH + 8, 455, 465, 40, 30);
score3_txt.setTextFormat(target_mc.game_set.goal_format);
score3_txt.setNewTextFormat(target_mc.game_set.goal_format);
score3_txt.type = "dynamic";
score3_txt.selectable = false;
score3_txt.embedFonts = true;
score3_txt.filters = [shad];
score3_txt.text = "$" + parent.level_set.goals[2];
vip_goals = parent.level_set.vip_goals;
vip_count = 0;
vip_checkers = new Array();
var _local2 = 0;
while (_local2 < vip_goals) {
vip_checkers[_local2] = target_mc.AttachMovie("vip_checker", "vip_checker_" + _local2, target_mc.game_set.INTERFACE_DEPTH + (10 + _local2), {_x:100 + (_local2 * 20), _y:470});
vip_checkers[_local2].gotoAndStop(1);
vip_checkers[_local2].cacheAsBitmap = true;
_local2++;
}
update();
}
function remove() {
clocks.removeMovieClip();
progress_bar.removeMovieClip();
score_panel.removeMovieClip();
btn_panel.removeMovieClip();
goals.removeMovieClip();
score_txt.removeTextField();
score1_txt.removeTextField();
score2_txt.removeTextField();
score3_txt.removeTextField();
var _local2 = 0;
while (_local2 < vip_goals) {
vip_checkers[_local2].removeMovieClip();
_local2++;
}
}
function showTime() {
clocks.gotoAndStop(1 + parent.maintimer.getTime());
if (parent.pause) {
clocks.clock_pause._visible = true;
} else {
clocks.clock_pause._visible = false;
}
}
function addVipGoal() {
if (vip_goals > 0) {
target_mc.vip_talk();
parent.text_manager.addText(target_mc.game_set.Labels[target_mc.game_set.LANG].vip_talk_reached, 20, 100, 420, 200, 30, target_mc.game_set.money_format);
vip_checkers[vip_count].gotoAndStop(2);
vip_count++;
}
}
function showScore() {
score_txt.text = "$" + parent.getScore();
}
function showProgress() {
var _local3 = 100 * (progress_bar.star_0._x / progress_bar.star_2._x);
var _local2 = 100 * (progress_bar.star_1._x / progress_bar.star_2._x);
var _local5 = _local2 - _local3;
var _local4 = 100 - _local2;
if (parent.getScore() <= parent.level_set.goals[0]) {
progress_bar.progress_mask._xscale = (target_mc.sets.data.score / parent.level_set.goals[0]) * _local3;
} else if (parent.getScore() <= parent.level_set.goals[1]) {
progress_bar.progress_mask._xscale = _local3 + (((target_mc.sets.data.score - parent.level_set.goals[0]) / (parent.level_set.goals[1] - parent.level_set.goals[0])) * _local5);
} else {
progress_bar.progress_mask._xscale = _local2 + (((target_mc.sets.data.score - parent.level_set.goals[1]) / (parent.level_set.goals[2] - parent.level_set.goals[1])) * _local4);
}
if (parent.getScore() >= parent.level_set.goals[0]) {
progress_bar.star_0.gotoAndStop(2);
goals.gotoAndStop(2);
}
if (parent.getScore() >= parent.level_set.goals[1]) {
progress_bar.star_1.gotoAndStop(2);
goals.gotoAndStop(3);
}
if (parent.getScore() >= parent.level_set.goals[2]) {
progress_bar.star_2.gotoAndStop(2);
goals.gotoAndStop(4);
}
}
function update() {
showTime();
showScore();
showProgress();
}
}
Symbol 3836 MovieClip [__Packages.PopUpTextManager] Frame 0
class PopUpTextManager
{
var target_mc, parent, texts, timers, counters, show_time, counter, shad, blur;
function PopUpTextManager (v_target_mc, v_parent) {
target_mc = v_target_mc;
parent = v_parent;
texts = new Array();
timers = new Array();
counters = new Array();
show_time = new Array();
counter = 0;
shad = new flash.filters.DropShadowFilter(1, 45, 0, 100, 2, 2, 1, 3, false, false, false);
blur = new flash.filters.BlurFilter(2, 2, 1);
}
function addText(text, show_time, x, y, w, h, format, moving) {
texts[counter] = target_mc.CreateTextField("popuptext_" + counter, target_mc.getNextHighestDepth(), x, y, w, h);
texts[counter].selectable = false;
texts[counter].multiline = true;
texts[counter].type = "dynamic";
texts[counter].setTextFormat(format);
texts[counter].setNewTextFormat(format);
texts[counter].embedFonts = true;
texts[counter].filters = [shad];
texts[counter].text = text;
texts[counter]._alpha = 0;
counters[counter] = 0;
this.show_time[counter] = show_time;
timers[counter] = setInterval(this, "fade_in", target_mc.game_set.TIMER_INTERVAL, counter, moving);
counter++;
}
function fade_in(num, moving) {
if (texts[num]._alpha >= 100) {
clearInterval(timers[num]);
timers[num] = setInterval(this, "no_fade", target_mc.game_set.TIMER_INTERVAL, num, moving);
} else {
texts[num]._alpha = texts[num]._alpha + da;
if (moving != undefined) {
texts[num]._y = texts[num]._y - moving;
}
}
}
function no_fade(num, moving) {
if (counters[num] >= show_time[num]) {
clearInterval(timers[num]);
timers[num] = setInterval(this, "fade_out", target_mc.game_set.TIMER_INTERVAL, num, moving);
} else {
counters[num]++;
if (moving != undefined) {
texts[num]._y = texts[num]._y - moving;
}
}
}
function fade_out(num, moving) {
if (texts[num]._alpha <= 0) {
clearInterval(timers[num]);
texts[num].removeTextField();
} else {
texts[num]._alpha = texts[num]._alpha - da;
if (moving != undefined) {
texts[num]._y = texts[num]._y - moving;
}
}
}
function remove() {
var _local2 = 0;
while (_local2 < counter) {
clearInterval(timers[_local2]);
texts[_local2].removeTextField();
_local2++;
}
counter = 0;
}
var da = 10;
}
Symbol 3837 MovieClip [__Packages.MainTimer] Frame 0
class MainTimer
{
var target_mc, parent, len, interval, events, timer;
function MainTimer (_target_mc, _par, _len, _events) {
target_mc = _target_mc;
parent = _par;
len = _len;
interval = target_mc.game_set.ONE_SECOND;
events = _events;
step_maintimer();
timer = setInterval(this, "step_maintimer", interval);
}
function getTime() {
return(Math.floor((counter / len) * 60));
}
function step_maintimer() {
if ((!parent.pause) && (!parent.tutor)) {
if (counter > len) {
clearInterval(timer);
finish_maintimer();
} else {
if (events[counter] != undefined) {
for (var _local3 in events[counter]) {
var _local2 = events[counter][_local3].action;
parent[_local2](events[counter][_local3]);
}
}
parent.level_interface.update();
counter++;
}
}
}
function finish_maintimer() {
parent.time_is_over();
}
var counter = 0;
}
Symbol 3838 MovieClip [__Packages.Tutor] Frame 0
class Tutor
{
var col_steps, steps, target_mc, parent, arrows, counter, current, onMouseDown, wait_timer, tutor_window;
function Tutor (_target_mc, _par, _steps, _col_steps) {
Mouse.addListener(this);
col_steps = _col_steps;
steps = _steps;
target_mc = _target_mc;
parent = _par;
arrows = new Array();
init();
}
function init() {
counter = 0;
next_step();
}
function next_step() {
current = steps[counter];
show_step();
if ((current.complete == null) || (current.complete.action == "wait")) {
step_complete();
}
if (current.complete.action == "click") {
onMouseDown = function () {
delete this.onMouseDown;
trace(this + " on mouse down");
this.step_complete();
};
}
}
function step_complete() {
if ((current.complete.action != "wait") && (current.complete.action != "click")) {
hide_step();
}
if (current.complete.time != undefined) {
clearInterval(wait_timer);
wait_timer = setInterval(this, "wait", current.complete.time * 1000);
} else {
wait();
}
}
function wait() {
if (!parent.pause) {
if ((current.complete.action == "wait") || (current.complete.action == "click")) {
hide_step();
}
clearInterval(wait_timer);
if (createplate) {
var _local2 = parent.getVisitorByName(current.action.character);
_local2.setWishComplete(current.action);
delete createplate;
} else if (completetalk) {
var _local2 = parent.getVisitorByName(current.action.character);
_local2.wishComplete();
delete completetalk;
} else if (manVip) {
parent.man.talkComplete();
delete manVip;
} else if (cockVip) {
parent.cock.talkComplete();
delete cockVip;
}
counter++;
if (counter < col_steps) {
next_step();
} else {
finish();
}
}
}
function show_step() {
if (current.action != null) {
switch (current.action.type) {
case "addVisitor" :
parent.addVisitor({character:current.action.character, place:current.action.place, action_time:0});
break;
case "genWish" :
var _local3 = parent.getVisitorByName(current.action.character);
_local3.setWish(current.action);
}
}
if (current.arrows != null) {
var _local2 = 0;
while (_local2 < current.arrows.length) {
arrows[_local2] = target_mc.AttachMovie(current.arrows[_local2].type, (current.arrows[_local2].type + "_") + _local2, target_mc.getNextHighestDepth(), current.arrows[_local2]);
_local2++;
}
}
if (current.hint != null) {
tutor_window = target_mc.AttachMovie("tutor_window", "tutor_window", target_mc.getNextHighestDepth(), current.hint);
tutor_window.tutor_text.setNewTextFormat(target_mc.game_set.tutor_format);
tutor_window.tutor_text.embedFonts = true;
tutor_window.tutor_text.multiline = true;
tutor_window.tutor_text.text = current.hint.text;
}
}
function hide_step() {
if (current.arrows != null) {
var _local2 = 0;
while (_local2 < current.arrows.length) {
arrows[_local2].removeMovieClip();
_local2++;
}
}
if (current.hint != null) {
tutor_window.removeMovieClip();
}
}
function show(bool) {
if (current.arrows != null) {
var _local2 = 0;
while (_local2 < current.arrows.length) {
arrows[_local2]._visible = bool;
_local2++;
}
}
if (current.hint != null) {
tutor_window._visible = bool;
}
}
function finish() {
hide_step();
parent.removeTutor();
}
var createplate = false;
var completetalk = false;
var manVip = false;
var cockVip = false;
}
Symbol 3839 MovieClip [__Packages.Room] Frame 0
class Room
{
var target_mc, parent, places, check_points;
function Room (_target_mc, _par) {
target_mc = _target_mc;
parent = _par;
places = new Array();
check_points = new Object();
}
function addPlace(place) {
places.push(place);
}
function create() {
for (var _local2 in places) {
places[_local2].create();
}
}
function destroy() {
for (var _local2 in places) {
places[_local2].destroy();
}
}
function removeEvents() {
for (var _local2 in places) {
places[_local2].removeEvents();
}
}
function show() {
for (var _local2 in places) {
places[_local2].show();
}
}
function hide() {
for (var _local2 in places) {
places[_local2].hide();
}
}
function findPlaceByName(place) {
for (var _local3 in places) {
if (places[_local3].placename == place) {
return(places[_local3]);
}
}
}
function findFullProvision(name) {
for (var _local4 in places) {
for (var _local3 in places[_local4].provision) {
if (((places[_local4].provision[_local3].name == name) && (places[_local4].provision[_local3].isExist())) && (!places[_local4].provision[_local3].empty)) {
return(true);
}
}
}
return(false);
}
function getCheckPointPosition(place, check_point) {
for (var _local6 in places) {
if (places[_local6].placename == place) {
return({x:places[_local6].check_points[check_point].x, y:places[_local6].check_points[check_point].y, place:places[_local6].placename});
}
}
return(null);
}
function getProvisionByPlaceAndCheckPoint(place, check_point) {
for (var _local5 in places) {
if (places[_local5].placename == place) {
for (var _local2 in places[_local5].provision) {
if (places[_local5].provision[_local2].check_point == check_point) {
return(places[_local5].provision[_local2]);
}
}
}
}
return(null);
}
function getNeutralPosition(place) {
for (var _local6 in places) {
if (places[_local6].placename == place) {
if (places[_local6].check_points.neutral != undefined) {
return({x:places[_local6].check_points.neutral.x, y:places[_local6].check_points.neutral.y, place:places[_local6].placename});
}
if ((places[_local6].check_points.neutral_0 != undefined) && (places[_local6].check_points.neutral_1 != undefined)) {
var _local2 = random(2);
return({x:places[_local6].check_points["neutral_" + _local2].x, y:places[_local6].check_points["neutral_" + _local2].y, place:places[_local6].placename});
}
}
}
return(null);
}
function getCharacterCheckPoint(x, y) {
for (var _local5 in places) {
for (var _local2 in places[_local5].characters) {
if ((Math.abs(x - places[_local5].characters[_local2].position.x) < 2) && (Math.abs(y - places[_local5].characters[_local2].position.y) < 2)) {
return(places[_local5].characters[_local2].check_point);
}
}
}
return(null);
}
function getCharacterPosition(place) {
for (var _local7 in places) {
if (places[_local7].placename == place) {
var _local2 = random(places[_local7].characters.length);
return({x:places[_local7].characters[_local2].position.x, y:places[_local7].characters[_local2].position.y, depth:places[_local7].depth});
}
}
return(null);
}
function setEmptyCharacterPosition(x, y, val) {
for (var _local6 in places) {
for (var _local3 in places[_local6].characters) {
if ((Math.abs(x - places[_local6].characters[_local3].position.x) < 2) && (Math.abs(y - places[_local6].characters[_local3].position.y) < 2)) {
places[_local6].characters[_local3].empty = val;
}
}
}
}
function countCharacterPlaces(place) {
var _local2 = 0;
for (var _local5 in places) {
if (places[_local5].placename == place) {
for (var _local3 in places[_local5].characters) {
if (places[_local5].characters[_local3].empty) {
_local2++;
}
}
}
}
return(_local2);
}
function distance(a, b) {
return(Math.sqrt((a * a) + (b * b)));
}
function findCharacterPosition(x, y, place, action, isempty) {
var _local2 = 0;
if (isempty == undefined) {
isempty = true;
}
if (((x != null) && (y != null)) && (action != null)) {
var _local5 = target_mc.game_set.SEARCH_DIST;
var _local6 = -1;
var _local7 = -1;
for (var _local18 in places) {
if (places[_local18].placeaction == action) {
for (_local2 in places[_local18].characters) {
if ((distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y) < _local5) && (places[_local18].characters[_local2].empty == isempty)) {
_local5 = distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y);
_local6 = _local18;
_local7 = _local2;
}
}
}
}
if (_local7 > -1) {
return({x:places[_local6].characters[_local7].position.x, y:places[_local6].characters[_local7].position.y, stand:places[_local6].characters[_local7].poses.stand, back:places[_local6].characters[_local7].poses.back, flip:places[_local6].characters[_local7].poses.flip, depth:places[_local6].characters[_local7].depth, placeaction:places[_local6].placeaction, placename:places[_local6].placename});
}
} else if (((x != null) && (y != null)) && (place != null)) {
var _local5 = target_mc.game_set.SEARCH_DIST;
var _local6 = -1;
var _local7 = -1;
for (var _local18 in places) {
if (places[_local18].placename == place) {
for (_local2 in places[_local18].characters) {
if ((distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y) < _local5) && (places[_local18].characters[_local2].empty == isempty)) {
_local5 = distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y);
_local6 = _local18;
_local7 = _local2;
}
}
}
}
if (_local7 > -1) {
return({x:places[_local6].characters[_local7].position.x, y:places[_local6].characters[_local7].position.y, stand:places[_local6].characters[_local7].poses.stand, back:places[_local6].characters[_local7].poses.back, flip:places[_local6].characters[_local7].poses.flip, depth:places[_local6].characters[_local7].depth, placeaction:places[_local6].placeaction, placename:places[_local6].placename});
}
} else if ((x != null) && (y != null)) {
var _local5 = target_mc.game_set.SEARCH_DIST;
var _local6 = -1;
var _local7 = -1;
for (var _local18 in places) {
for (_local2 in places[_local18].characters) {
if ((distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y) < _local5) && (places[_local18].characters[_local2].empty == isempty)) {
_local5 = distance(x - places[_local18].characters[_local2].position.x, y - places[_local18].characters[_local2].position.y);
_local6 = _local18;
_local7 = _local2;
}
}
}
if (_local7 > -1) {
return({x:places[_local6].characters[_local7].position.x, y:places[_local6].characters[_local7].position.y, stand:places[_local6].characters[_local7].poses.stand, back:places[_local6].characters[_local7].poses.back, flip:places[_local6].characters[_local7].poses.flip, depth:places[_local6].characters[_local7].depth, placeaction:places[_local6].placeaction, placename:places[_local6].placename});
}
} else if (place != null) {
for (var _local18 in places) {
if (places[_local18].placename == place) {
var _local4 = 0;
_local2 = random(places[_local18].characters.length);
while ((!places[_local18].characters[_local2].empty) && (_local4 <= places[_local18].characters.length)) {
_local4++;
_local2++;
if (_local2 == places[_local18].characters.length) {
_local2 = 0;
}
}
if (places[_local18].characters[_local2].empty) {
return({x:places[_local18].characters[_local2].position.x, y:places[_local18].characters[_local2].position.y, stand:places[_local18].characters[_local2].poses.stand, back:places[_local18].characters[_local2].poses.back, flip:places[_local18].characters[_local2].poses.flip, depth:places[_local18].characters[_local2].depth, placeaction:places[_local18].placeaction, placename:places[_local18].placename});
}
}
}
} else if (action != null) {
for (var _local18 in places) {
if (places[_local18].placeaction == action) {
var _local4 = 0;
_local2 = random(places[_local18].characters.length);
while ((!places[_local18].characters[_local2].empty) && (_local4 <= places[_local18].characters.length)) {
_local4++;
_local2++;
if (_local2 == places[_local18].characters.length) {
_local2 = 0;
}
}
if (places[_local18].characters[_local2].empty) {
return({x:places[_local18].characters[_local2].position.x, y:places[_local18].characters[_local2].position.y, stand:places[_local18].characters[_local2].poses.stand, back:places[_local18].characters[_local2].poses.back, flip:places[_local18].characters[_local2].poses.flip, depth:places[_local18].characters[_local2].depth, placeaction:places[_local18].placeaction, placename:places[_local18].placename});
}
}
}
}
return(null);
}
}
Symbol 3840 MovieClip [__Packages.Room0] Frame 0
class Room0 extends Room
{
var addPlace, target_mc, parent, create;
function Room0 (_target_mc, _par) {
super(_target_mc, _par);
addPlace(new Bar(target_mc, parent));
addPlace(new Arch(target_mc, parent));
addPlace(new RecicleBin(target_mc, parent));
addPlace(new Chairs_vip(target_mc, parent));
addPlace(new Kitchen(target_mc, parent));
addPlace(new Kitchen_dustbin(target_mc, parent));
addPlace(new Couch_2_1(target_mc, parent));
addPlace(new Couch_3(target_mc, parent));
addPlace(new Dance_floor(target_mc, parent));
addPlace(new Dance_rest(target_mc, parent));
addPlace(new Drag(target_mc, parent));
addPlace(new Entrance(target_mc, parent));
addPlace(new Main_character(target_mc, parent));
addPlace(new Talk_area_0(target_mc, parent));
addPlace(new Talk_area_1(target_mc, parent));
create();
}
}
Symbol 3841 MovieClip [__Packages.Place] Frame 0
class Place
{
var target_mc, parent, sprites, characters, position, minposition, maxposition, provision, dustbin, check_points, wish, placename, depth;
function Place (v_target_mc, _par) {
target_mc = v_target_mc;
parent = _par;
sprites = new Array();
characters = new Array();
position = new Object();
minposition = new Object();
maxposition = new Object();
provision = new Array();
dustbin = new Array();
check_points = new Object();
}
function create() {
for (var _local2 in sprites) {
target_mc.AttachMovie(sprites[_local2].id, sprites[_local2].newid, sprites[_local2].depth, sprites[_local2].initObj);
target_mc[sprites[_local2].newid].cacheAsBitmap = true;
}
for (var _local2 in provision) {
provision[_local2].create();
}
for (var _local2 in dustbin) {
dustbin[_local2].create();
}
}
function destroy() {
for (var _local2 in sprites) {
target_mc[sprites[_local2].newid].removeMovieClip();
}
delete sprites;
for (var _local2 in provision) {
provision[_local2].hide();
}
delete provision;
for (var _local2 in dustbin) {
dustbin[_local2].hide();
}
delete dustbin;
}
function removeEvents() {
for (var _local2 in provision) {
delete provision[_local2]._mc.onPress;
delete provision[_local2]._mc.onMouseMove;
delete provision[_local2]._mc.onRelease;
delete provision[_local2]._mc.onReleaseOutside;
delete provision[_local2]._mc.onRollOver;
delete provision[_local2]._mc.onRollOut;
}
for (var _local2 in dustbin) {
delete dustbin[_local2]._mc.onPress;
delete dustbin[_local2]._mc.onMouseMove;
delete dustbin[_local2]._mc.onRelease;
delete dustbin[_local2]._mc.onReleaseOutside;
delete dustbin[_local2]._mc.onRollOver;
delete dustbin[_local2]._mc.onRollOut;
}
}
function show() {
}
function hide() {
}
function setWish(str) {
wish = str;
}
function addSprite(_id, _newid, _depth, _initObj) {
sprites.push({id:_id, newid:_newid, depth:_depth, initObj:_initObj});
}
function addCharacter(pos, _poses, _check_point, _depth) {
characters.push({position:pos, poses:_poses, check_point:_check_point, depth:_depth, empty:true});
}
function addProvision(place, name, dontshow, _position, _check_point, _depth) {
provision.push(new Provision(place, target_mc, parent, name, dontshow, _check_point, _position, _depth));
}
function addDustBin(place, name, _position, _check_point, _depth) {
dustbin.push(new DustBin(place, target_mc, parent, name, _check_point, _position, _depth));
}
function addCheck_point(name, _position) {
check_points[name] = _position;
check_points[name].placename = placename;
}
function getCheck_points() {
return(check_points);
}
function setPosition(pos, minpos, maxpos) {
position.x = pos.x;
position.y = pos.y;
depth = parent.calcDepth(position.x, position.y, 0);
minposition.x = minpos.x;
minposition.y = minpos.y;
maxposition.x = maxpos.x;
maxposition.y = maxpos.y;
var _local3 = minposition.x;
while (_local3 <= maxposition.x) {
var _local2 = minposition.y;
while (_local2 <= maxposition.y) {
parent.pole[_local3][_local2] = true;
_local2++;
}
_local3++;
}
}
function showTalkTheme() {
var _local3 = new Object();
var _local4 = "default";
_local3.money = false;
_local3.fashion = false;
_local3.sport = false;
_local3.cinema = false;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((parent.visitors[_local2].cur_wish.status == "realize") && (parent.visitors[_local2].position.placename == placename)) {
_local3[parent.visitors[_local2].cur_wish.about] = true;
}
_local2++;
}
var _local5 = 0;
for (var _local6 in _local3) {
if (_local3[_local6]) {
_local5++;
_local4 = _local6;
}
}
if (_local5 != 1) {
_local4 = "default";
}
target_mc[sprites[0].newid].gotoAndStop(_local4);
}
var BACK = 0;
var IN_BACK = 3;
var FRONT = 13;
var IN_FRONT = 16;
var OUT = 26;
}
Symbol 3842 MovieClip [__Packages.Provision] Frame 0
class Provision
{
var target_mc, parent, name, dontshow, empty, depth, id, position, check_point, place, exist, _mc;
function Provision (_place, _target_mc, _par, v_name, v_dontshow, _check_point, _pos, _depth) {
target_mc = _target_mc;
parent = _par;
name = v_name;
dontshow = v_dontshow;
empty = false;
depth = _depth;
id = depth;
position = new Object();
position.x = _pos.x;
position.y = _pos.y;
check_point = _check_point;
place = _place;
exist = false;
}
function prepare() {
if (((name == "cake") || (name == "chicken")) || (name == "salad")) {
parent.cock.event_add_provision(this);
} else {
parent.barman.event_add_provision(this);
}
}
function set_props(_place, v_name, v_dontshow, v_empty, _check_point, _pos, _depth) {
name = v_name;
dontshow = v_dontshow;
exist = !dontshow;
empty = v_empty;
depth = _depth;
position.x = _pos.x;
position.y = _pos.y;
check_point = _check_point;
place = _place;
}
function get_props() {
return({place:place, name:name, dontshow:dontshow, empty:empty, check_point:check_point, position:position, depth:depth});
}
function create() {
if (!dontshow) {
show();
}
}
function show() {
if (empty) {
_mc = target_mc.AttachMovie(name + "_empty", (name + "_empty_") + id, depth, {_x:position.x, _y:position.y});
} else {
_mc = target_mc.AttachMovie(name + "_full", (name + "_full_") + id, depth, {_x:position.x, _y:position.y});
}
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_CHARACTERS) {
_mc.attachMovie("center", "center", _mc.getNextHighestDepth());
}
_mc.hitArea = _mc.hit;
_mc.hit._visible = false;
_mc.sel._visible = false;
exist = true;
_mc.papa = this;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (((this.papa.parent.tutorManager.current.complete.action == "clickprovision") && (this.papa.parent.tutorManager.current.complete.provision == this.papa.name)) && (this.papa.parent.tutorManager.current.complete.empty == this.papa.empty)) {
this.sel._visible = true;
}
} else {
this.sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (((this.papa.parent.tutorManager.current.complete.action == "clickprovision") && (this.papa.parent.tutorManager.current.complete.provision == this.papa.name)) && (this.papa.parent.tutorManager.current.complete.empty == this.papa.empty)) {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (((this.papa.parent.tutorManager.current.complete.action == "clickprovision") && (this.papa.parent.tutorManager.current.complete.provision == this.papa.name)) && (this.papa.parent.tutorManager.current.complete.empty == this.papa.empty)) {
this.papa.parent.addCheckPointTarget(this.papa, "provision", this.papa.name, this.papa.position, this.papa.check_point, this.papa.place, this.papa.empty, this.papa.depth);
}
} else {
this.papa.parent.addCheckPointTarget(this.papa, "provision", this.papa.name, this.papa.position, this.papa.check_point, this.papa.place, this.papa.empty, this.papa.depth);
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (((this.papa.parent.tutorManager.current.complete.action == "clickprovision") && (this.papa.parent.tutorManager.current.complete.provision == this.papa.name)) && (this.papa.parent.tutorManager.current.complete.empty == this.papa.empty)) {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
}
function isExist() {
return(exist);
}
function hide() {
_mc.removeMovieClip();
exist = false;
}
}
Symbol 3843 MovieClip [__Packages.DustBin] Frame 0
class DustBin
{
var target_mc, parent, name, empty, depth, id, position, check_point, place, dontshow, _mc;
function DustBin (_place, _target_mc, _par, v_name, _check_point, _pos, _depth) {
target_mc = _target_mc;
parent = _par;
name = v_name;
empty = false;
depth = _depth;
id = depth;
position = new Object();
position.x = _pos.x;
position.y = _pos.y;
check_point = _check_point;
place = _place;
}
function get_props() {
return({place:place, name:name, dontshow:dontshow, empty:empty, check_point:check_point, position:position, depth:depth});
}
function create() {
show();
}
function show() {
_mc = target_mc.AttachMovie("dustbin_hitarea", "dustbin_hitarea_" + id, depth, {_x:position.x, _y:position.y});
_mc.papa = this;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if ((this.papa.parent.tutorManager.current.complete.action == "clickdustbin") && (this.papa.parent.tutorManager.current.complete.name == this.papa.name)) {
this.papa.target_mc[this.papa.name].sel._visible = true;
}
} else {
this.papa.target_mc[this.papa.name].sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if ((this.papa.parent.tutorManager.current.complete.action == "clickdustbin") && (this.papa.parent.tutorManager.current.complete.name == this.papa.name)) {
this.papa.target_mc[this.papa.name].sel._visible = false;
}
} else {
this.papa.target_mc[this.papa.name].sel._visible = false;
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if ((this.papa.parent.tutorManager.current.complete.action == "clickdustbin") && (this.papa.parent.tutorManager.current.complete.name == this.papa.name)) {
this.papa.parent.addCheckPointTarget(this.papa, "dustbin", this.papa.name, this.papa.position, this.papa.check_point, this.papa.place, this.papa.empty, this.papa.depth);
}
} else {
this.papa.parent.addCheckPointTarget(this.papa, "dustbin", this.papa.name, this.papa.position, this.papa.check_point, this.papa.place, this.papa.empty, this.papa.depth);
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if ((this.papa.parent.tutorManager.current.complete.action == "clickdustbin") && (this.papa.parent.tutorManager.current.complete.name == this.papa.name)) {
this.papa.target_mc[this.papa.name].sel._visible = false;
}
} else {
this.papa.target_mc[this.papa.name].sel._visible = false;
}
}
};
}
function hide() {
_mc.removeMovieClip();
}
}
Symbol 3844 MovieClip [__Packages.Bar] Frame 0
class Bar extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Bar (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar";
placeaction = "work";
setPosition({x:17, y:13}, {x:17, y:12}, {x:17, y:15});
addCharacter({x:460, y:110}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("bar", "bar", depth + FRONT);
addProvision("bar", "cocktail", false, {x:375, y:30}, "drink_0", depth + IN_FRONT);
addProvision("bar", "martini", false, {x:400, y:42.5}, "drink_1", (depth + IN_FRONT) + 2);
addProvision("bar", "wine", false, {x:425, y:59.375}, "drink_2", (depth + IN_FRONT) + 4);
addCheck_point("drink_0", {x:16, y:15});
addCheck_point("drink_1", {x:16, y:14});
addCheck_point("drink_2", {x:16, y:13});
addCheck_point("neutral", {x:16, y:11});
}
}
Symbol 3845 MovieClip [__Packages.Arch] Frame 0
class Arch extends Place
{
var placename, setPosition, addSprite, parent, position;
function Arch (_target_mc, _par) {
super(_target_mc, _par);
placename = "arch";
setPosition({x:18, y:8}, {x:17, y:8}, {x:18, y:10});
addSprite("cake", "cake", parent.calcDepth(position.x, position.y, 0));
addSprite("background_arch", "background_arch", parent.calcDepth(position.x, position.y, 1));
}
}
Symbol 3846 MovieClip [__Packages.RecicleBin] Frame 0
class RecicleBin extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function RecicleBin (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar_dustbin";
placeaction = "none";
setPosition({x:17, y:12}, {x:17, y:12}, {x:17, y:12});
addSprite("bar_dustbin", "bar_dustbin", depth + FRONT);
addDustBin("bar_dustbin", "bar_dustbin", {x:450, y:120}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:16, y:12});
}
}
Symbol 3847 MovieClip [__Packages.Chairs_vip] Frame 0
class Chairs_vip extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK;
function Chairs_vip (_target_mc, _par) {
super(_target_mc, _par);
placename = "chairs_vip";
placeaction = "talk";
setPosition({x:12, y:16}, {x:12, y:16}, {x:15, y:17});
addCharacter({x:160, y:155}, {stand:false, flip:true, back:false}, "none", depth + IN_BACK);
addCharacter({x:225, y:140}, {stand:false, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addSprite("chair_vip_1", "chair_vip_1", depth + BACK);
addSprite("chair_vip_2", "chair_vip_2", (depth + BACK) + 1);
addSprite("table_vip", "table_vip", (depth + BACK) + 2);
}
}
Symbol 3848 MovieClip [__Packages.Kitchen] Frame 0
class Kitchen extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Kitchen (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen";
placeaction = "work";
setPosition({x:7, y:16}, {x:6, y:16}, {x:9, y:16});
addCharacter({x:25, y:200}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("kitchen", "kitchen", depth + FRONT);
addProvision("kitchen", "cake", false, {x:19.375, y:201.875}, "food_0", depth + IN_FRONT);
addProvision("kitchen", "chicken", false, {x:51.25, y:181.875}, "food_1", (depth + IN_FRONT) + 2);
addProvision("kitchen", "salad", false, {x:80.625, y:164.375}, "food_2", (depth + IN_FRONT) + 4);
addCheck_point("food_0", {x:7, y:15});
addCheck_point("food_1", {x:8, y:15});
addCheck_point("food_2", {x:9, y:15});
addCheck_point("neutral", {x:6, y:14});
}
}
Symbol 3849 MovieClip [__Packages.Kitchen_dustbin] Frame 0
class Kitchen_dustbin extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function Kitchen_dustbin (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen_dustbin";
placeaction = "none";
setPosition({x:6, y:15}, {x:6, y:15}, {x:6, y:15});
addSprite("kitchen_dustbin", "kitchen_dustbin", depth + FRONT);
addDustBin("kitchen_dustbin", "kitchen_dustbin", {x:0, y:270}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:6, y:14});
}
}
Symbol 3850 MovieClip [__Packages.Couch_2_1] Frame 0
class Couch_2_1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_2_1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_2_1";
placeaction = "eat";
setPosition({x:13, y:11}, {x:13, y:11}, {x:14, y:12});
addCharacter({x:390, y:190}, {stand:false, flip:false, back:false}, "character_0", depth + IN_BACK);
addCharacter({x:410, y:205}, {stand:false, flip:false, back:false}, "character_1", (depth + IN_BACK) + 2);
addSprite("couch_2_1", "couch_2_1", depth + BACK);
addSprite("couch_2_1_table", "couch_2_1_table", depth + FRONT);
addProvision("couch_2_1", "empty", true, {x:345, y:178.75}, "provision_0", depth + IN_FRONT);
addProvision("couch_2_1", "empty", true, {x:367.5, y:191.25}, "provision_1", (depth + IN_FRONT) + 2);
addCheck_point("character_0", {x:12, y:12});
addCheck_point("provision_0", {x:12, y:12});
addCheck_point("character_1", {x:12, y:11});
addCheck_point("provision_1", {x:12, y:11});
addCheck_point("neutral_0", {x:14, y:13});
addCheck_point("neutral_1", {x:14, y:10});
}
}
Symbol 3851 MovieClip [__Packages.Couch_3] Frame 0
class Couch_3 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_3 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_3";
placeaction = "eat";
setPosition({x:9, y:12}, {x:9, y:12}, {x:11, y:13});
addCharacter({x:245, y:240}, {stand:false, flip:true, back:false}, "character_0", (depth + IN_BACK) + 1);
addCharacter({x:223, y:253}, {stand:false, flip:true, back:false}, "character_1", (depth + IN_BACK) + 4);
addCharacter({x:201, y:266}, {stand:false, flip:true, back:false}, "character_2", (depth + IN_BACK) + 7);
addSprite("couch_3", "couch_3", (depth + BACK) + 1);
addSprite("couch_3_table", "couch_3_table", (depth + FRONT) + 1);
addProvision("couch_3", "empty", true, {x:262, y:222}, "provision_0", (depth + IN_FRONT) + 1);
addProvision("couch_3", "empty", true, {x:240, y:235}, "provision_1", (depth + IN_FRONT) + 4);
addProvision("couch_3", "empty", true, {x:218, y:248}, "provision_2", (depth + IN_FRONT) + 7);
addCheck_point("character_0", {x:11, y:11});
addCheck_point("provision_0", {x:11, y:11});
addCheck_point("character_1", {x:10, y:11});
addCheck_point("provision_1", {x:10, y:11});
addCheck_point("character_2", {x:9, y:11});
addCheck_point("provision_2", {x:9, y:11});
addCheck_point("neutral_0", {x:12, y:13});
addCheck_point("neutral_1", {x:8, y:13});
}
}
Symbol 3852 MovieClip [__Packages.Dance_floor] Frame 0
class Dance_floor extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK;
function Dance_floor (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_floor";
placeaction = "dance";
setPosition({x:6, y:5}, {x:6, y:5}, {x:6, y:6});
addCharacter({x:570, y:425}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addCharacter({x:535, y:435}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 1);
addCharacter({x:620, y:440}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 2);
addCharacter({x:572, y:440}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 3);
addCharacter({x:524, y:445}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 4);
addCharacter({x:490, y:448}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 5);
addCharacter({x:476, y:450}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 6);
addCharacter({x:440, y:455}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 7);
addCharacter({x:400, y:460}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 8);
addCharacter({x:428, y:460}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 9);
addCharacter({x:380, y:480}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 10);
addCharacter({x:520, y:480}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 11);
addCharacter({x:570, y:485}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 12);
addCharacter({x:620, y:490}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 13);
addCharacter({x:480, y:490}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 14);
addSprite("music", "music", depth + BACK);
}
}
Symbol 3853 MovieClip [__Packages.Dance_rest] Frame 0
class Dance_rest extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth;
function Dance_rest (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_rest";
placeaction = "idle";
setPosition({x:13, y:5}, {x:13, y:5}, {x:13, y:5});
addCharacter({x:590, y:250}, {stand:true, flip:false, back:false}, "none", depth + IN_FRONT);
addCharacter({x:580, y:260}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 1);
addCharacter({x:570, y:265}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:555, y:300}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 3);
addCharacter({x:540, y:310}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:620, y:315}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 5);
addCharacter({x:550, y:320}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:610, y:325}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 7);
addCharacter({x:600, y:345}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 8);
}
}
Symbol 3854 MovieClip [__Packages.Drag] Frame 0
class Drag extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth;
function Drag (_target_mc, _par) {
super(_target_mc, _par);
placename = "drag";
placeaction = "drag";
setPosition({x:0, y:0}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:0, y:0}, {stand:true, flip:false, back:false, drag:true}, "none", depth + IN_FRONT);
}
}
Symbol 3855 MovieClip [__Packages.Entrance] Frame 0
class Entrance extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, FRONT;
function Entrance (_target_mc, _par) {
super(_target_mc, _par);
placename = "entrance";
placeaction = "idle";
setPosition({x:5, y:10}, {x:5, y:5}, {x:5, y:15});
addCharacter({x:110, y:405}, {stand:true, flip:false, back:false}, "none", depth + IN_FRONT);
addCharacter({x:150, y:430}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 1);
addCharacter({x:70, y:425}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:115, y:455}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 3);
addCharacter({x:40, y:455}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addSprite("door_left", "door_left", depth + FRONT);
addSprite("door_right", "door_right", (depth + FRONT) + 1);
addSprite("facade", "facade", (depth + FRONT) + 2);
}
}
Symbol 3856 MovieClip [__Packages.Main_character] Frame 0
class Main_character extends Place
{
var placename, placeaction, setPosition, addCharacter, depth, addCheck_point;
function Main_character (_target_mc, _par) {
super(_target_mc, _par);
placename = "main_character";
placeaction = "idle";
setPosition({x:7, y:8}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:280, y:400}, {stand:true, flip:false, back:false}, "none", depth);
addCheck_point("neutral", {x:7, y:8});
}
}
Symbol 3857 MovieClip [__Packages.Talk_area_0] Frame 0
class Talk_area_0 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_0 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_0";
placeaction = "talk";
setPosition({x:9, y:8}, {x:8, y:7}, {x:10, y:9});
addCharacter({x:395, y:340}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:345, y:315}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:305, y:345}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:345, y:370}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet", "carpet", depth + BACK, {_x:parent.screenX(8.25, 7.25), _y:parent.screenY(8.25, 7.25)});
}
}
Symbol 3858 MovieClip [__Packages.Talk_area_1] Frame 0
class Talk_area_1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_1";
placeaction = "talk";
setPosition({x:13, y:8}, {x:12, y:7}, {x:14, y:9});
addCharacter({x:525, y:265}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:475, y:240}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:435, y:270}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:475, y:295}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet", "carpet_1", depth + BACK, {_x:parent.screenX(12.25, 7.25), _y:parent.screenY(12.25, 7.25)});
}
}
Symbol 3859 MovieClip [__Packages.Room1] Frame 0
class Room1 extends Room
{
var addPlace, target_mc, parent, create;
function Room1 (_target_mc, _par) {
super(_target_mc, _par);
addPlace(new Bar1(target_mc, parent));
addPlace(new Arch1(target_mc, parent));
addPlace(new RecicleBin1(target_mc, parent));
addPlace(new Chairs_vip1(target_mc, parent));
addPlace(new Kitchen1(target_mc, parent));
addPlace(new Kitchen_dustbin1(target_mc, parent));
addPlace(new Couch_21(target_mc, parent));
addPlace(new Couch_31(target_mc, parent));
addPlace(new Dance_floor1(target_mc, parent));
addPlace(new Dance_rest1(target_mc, parent));
addPlace(new Drag1(target_mc, parent));
addPlace(new Entrance1(target_mc, parent));
addPlace(new Main_character1(target_mc, parent));
addPlace(new Talk_area_2(target_mc, parent));
addPlace(new Talk_area_3(target_mc, parent));
create();
}
}
Symbol 3860 MovieClip [__Packages.Bar1] Frame 0
class Bar1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Bar1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar";
placeaction = "work";
setPosition({x:15, y:8}, {x:15, y:8}, {x:15, y:10});
addCharacter({x:530, y:210}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("bar1", "bar1", depth + FRONT);
addProvision("bar", "cocktail", false, {x:470, y:155}, "drink_0", depth + IN_FRONT);
addProvision("bar", "martini", false, {x:500, y:170}, "drink_1", (depth + IN_FRONT) + 2);
addProvision("bar", "wine", false, {x:530, y:190}, "drink_2", (depth + IN_FRONT) + 4);
addCheck_point("drink_0", {x:14, y:10});
addCheck_point("drink_1", {x:14, y:9});
addCheck_point("drink_2", {x:14, y:8});
addCheck_point("neutral", {x:15, y:6});
}
}
Symbol 3861 MovieClip [__Packages.Arch1] Frame 0
class Arch1 extends Place
{
var placename, setPosition, addSprite, parent, position;
function Arch1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "arch";
setPosition({x:0, y:0}, {x:0, y:0}, {x:0, y:0});
addSprite("palm_left", "palm_left", parent.calcDepth(position.x, position.y, 0));
addSprite("palm_right", "palm_right", parent.calcDepth(position.x, position.y, 1));
}
}
Symbol 3862 MovieClip [__Packages.RecicleBin1] Frame 0
class RecicleBin1 extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function RecicleBin1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar_dustbin";
placeaction = "none";
setPosition({x:15, y:11}, {x:15, y:11}, {x:15, y:11});
addSprite("dustbin_bar1", "dustbin_bar1", depth + FRONT);
addDustBin("bar_dustbin", "dustbin_bar1", {x:440, y:170}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:14, y:11});
}
}
Symbol 3863 MovieClip [__Packages.Chairs_vip1] Frame 0
class Chairs_vip1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT;
function Chairs_vip1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "chairs_vip";
placeaction = "talk";
setPosition({x:12, y:15}, {x:12, y:15}, {x:14, y:16});
addCharacter({x:208, y:170}, {stand:false, flip:true, back:false}, "none", depth + IN_BACK);
addCharacter({x:273, y:170}, {stand:false, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addSprite("vip_chairs1", "vip_chairs1", depth + BACK);
addSprite("vip_table1", "vip_table1", depth + FRONT);
addSprite("vip_ambrella", "vip_ambrella", (depth + BACK) + 1);
}
}
Symbol 3864 MovieClip [__Packages.Kitchen1] Frame 0
class Kitchen1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Kitchen1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen";
placeaction = "work";
setPosition({x:7, y:16}, {x:6, y:16}, {x:9, y:16});
addCharacter({x:25, y:230}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("kitchen1", "kitchen1", depth + FRONT);
addProvision("kitchen", "cake", false, {x:19.375, y:201.875}, "food_0", depth + IN_FRONT);
addProvision("kitchen", "chicken", false, {x:51.25, y:181.875}, "food_1", (depth + IN_FRONT) + 2);
addProvision("kitchen", "salad", false, {x:80.625, y:164.375}, "food_2", (depth + IN_FRONT) + 4);
addCheck_point("food_0", {x:7, y:15});
addCheck_point("food_1", {x:8, y:15});
addCheck_point("food_2", {x:9, y:15});
addCheck_point("neutral", {x:6, y:15});
}
}
Symbol 3865 MovieClip [__Packages.Kitchen_dustbin1] Frame 0
class Kitchen_dustbin1 extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function Kitchen_dustbin1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen_dustbin";
placeaction = "none";
setPosition({x:5, y:15}, {x:5, y:15}, {x:5, y:15});
addSprite("dustbin_kitchen1", "kitchen_dustbin1", depth + FRONT);
addDustBin("kitchen_dustbin", "kitchen_dustbin1", {x:0, y:290}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:5, y:14});
}
}
Symbol 3866 MovieClip [__Packages.Couch_21] Frame 0
class Couch_21 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_21 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_21";
placeaction = "eat";
setPosition({x:6, y:9}, {x:6, y:9}, {x:7, y:10});
addCharacter({x:215, y:370}, {stand:false, flip:false, back:false}, "character_0", depth + IN_BACK);
addCharacter({x:240, y:393}, {stand:false, flip:false, back:false}, "character_1", (depth + IN_BACK) + 2);
addSprite("couch_2", "couch_2", depth + BACK);
addSprite("couch_2_table", "couch_2_table", depth + FRONT);
addSprite("couch_2_up", "couch_2_up", (depth + BACK) + 1);
addProvision("couch_21", "empty", true, {x:175, y:340}, "provision_0", depth + IN_FRONT);
addProvision("couch_21", "empty", true, {x:205, y:355}, "provision_1", (depth + IN_FRONT) + 2);
addCheck_point("character_0", {x:5, y:10});
addCheck_point("provision_0", {x:5, y:10});
addCheck_point("character_1", {x:5, y:9});
addCheck_point("provision_1", {x:5, y:9});
addCheck_point("neutral_0", {x:7, y:11});
addCheck_point("neutral_1", {x:7, y:8});
}
}
Symbol 3867 MovieClip [__Packages.Couch_31] Frame 0
class Couch_31 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_31 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_31";
placeaction = "eat";
setPosition({x:5, y:12}, {x:5, y:12}, {x:7, y:13});
addCharacter({x:125, y:330}, {stand:false, flip:true, back:false}, "character_0", (depth + IN_BACK) + 1);
addCharacter({x:103, y:343}, {stand:false, flip:true, back:false}, "character_1", (depth + IN_BACK) + 4);
addCharacter({x:81, y:356}, {stand:false, flip:true, back:false}, "character_2", (depth + IN_BACK) + 7);
addSprite("couch_1", "couch_1", depth + BACK);
addSprite("couch_1_table", "couch_1_table", depth + FRONT);
addSprite("couch_1_up", "couch_1_up", (depth + BACK) + 1);
addProvision("couch_31", "empty", true, {x:140, y:293}, "provision_0", (depth + IN_FRONT) + 1);
addProvision("couch_31", "empty", true, {x:115, y:310}, "provision_1", (depth + IN_FRONT) + 4);
addProvision("couch_31", "empty", true, {x:90, y:327}, "provision_2", (depth + IN_FRONT) + 7);
addCheck_point("character_0", {x:7, y:11});
addCheck_point("provision_0", {x:7, y:11});
addCheck_point("character_1", {x:6, y:11});
addCheck_point("provision_1", {x:6, y:11});
addCheck_point("character_2", {x:5, y:11});
addCheck_point("provision_2", {x:5, y:11});
addCheck_point("neutral_0", {x:8, y:13});
addCheck_point("neutral_1", {x:4, y:13});
}
}
Symbol 3868 MovieClip [__Packages.Dance_floor1] Frame 0
class Dance_floor1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK;
function Dance_floor1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_floor";
placeaction = "dance";
setPosition({x:6, y:5}, {x:0, y:0}, {x:9, y:7});
addCharacter({x:470, y:390}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addCharacter({x:440, y:410}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 1);
addCharacter({x:500, y:420}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addCharacter({x:530, y:430}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 3);
addCharacter({x:410, y:430}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 4);
addCharacter({x:470, y:440}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 5);
addCharacter({x:430, y:460}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 6);
addCharacter({x:530, y:460}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 7);
addCharacter({x:380, y:470}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 8);
addCharacter({x:500, y:470}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 9);
addCharacter({x:410, y:480}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 10);
addCharacter({x:530, y:480}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 11);
addCharacter({x:470, y:490}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 12);
addCharacter({x:350, y:490}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 13);
addCharacter({x:590, y:490}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 14);
addSprite("dancefloor1", "dancefloor1", depth + BACK);
}
}
Symbol 3869 MovieClip [__Packages.Dance_rest1] Frame 0
class Dance_rest1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT;
function Dance_rest1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_rest";
placeaction = "idle";
setPosition({x:12, y:4}, {x:10, y:0}, {x:14, y:4});
addCharacter({x:590, y:290}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addCharacter({x:540, y:330}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 1);
addCharacter({x:560, y:340}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addCharacter({x:590, y:340}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 3);
addCharacter({x:560, y:350}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 4);
addCharacter({x:480, y:350}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 5);
addCharacter({x:560, y:360}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 6);
addCharacter({x:620, y:370}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 7);
addCharacter({x:530, y:370}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 8);
addSprite("bridge1", "bridge1", depth + BACK);
addSprite("bridge_rail1", "bridge_rail1", depth + FRONT);
}
}
Symbol 3870 MovieClip [__Packages.Drag1] Frame 0
class Drag1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth;
function Drag1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "drag";
placeaction = "drag";
setPosition({x:0, y:0}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:0, y:0}, {stand:true, flip:false, back:false, drag:true}, "none", depth + IN_FRONT);
}
}
Symbol 3871 MovieClip [__Packages.Entrance1] Frame 0
class Entrance1 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth;
function Entrance1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "entrance";
placeaction = "idle";
setPosition({x:14, y:12}, {x:14, y:12}, {x:15, y:13});
addCharacter({x:380, y:135}, {stand:true, flip:false, back:false}, "none", depth + IN_FRONT);
addCharacter({x:410, y:135}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 1);
addCharacter({x:330, y:135}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:390, y:170}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 3);
addCharacter({x:345, y:170}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
}
}
Symbol 3872 MovieClip [__Packages.Main_character1] Frame 0
class Main_character1 extends Place
{
var placename, placeaction, setPosition, addCharacter, depth, addCheck_point;
function Main_character1 (_target_mc, _par) {
super(_target_mc, _par);
placename = "main_character";
placeaction = "idle";
setPosition({x:15, y:14}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:160, y:175}, {stand:true, flip:false, back:false}, "none", depth);
addCheck_point("neutral", {x:15, y:14});
}
}
Symbol 3873 MovieClip [__Packages.Talk_area_2] Frame 0
class Talk_area_2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_2";
placeaction = "talk";
setPosition({x:11, y:11}, {x:11, y:11}, {x:12, y:12});
addCharacter({x:365, y:220}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:315, y:195}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:275, y:225}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:315, y:250}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet1", "carpet", depth + BACK, {_x:parent.screenX(10.875, 11), _y:parent.screenY(10.875, 11)});
}
}
Symbol 3874 MovieClip [__Packages.Talk_area_3] Frame 0
class Talk_area_3 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_3 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_3";
placeaction = "talk";
setPosition({x:11, y:8}, {x:11, y:8}, {x:12, y:9});
addCharacter({x:475, y:285}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:425, y:260}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:385, y:290}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:425, y:315}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet1", "carpet_1", depth + BACK, {_x:parent.screenX(10.875, 7.5), _y:parent.screenY(10.875, 7.5)});
}
}
Symbol 3875 MovieClip [__Packages.Room2] Frame 0
class Room2 extends Room
{
var addPlace, target_mc, parent, create;
function Room2 (_target_mc, _par) {
super(_target_mc, _par);
addPlace(new Bar2(target_mc, parent));
addPlace(new RecicleBin2(target_mc, parent));
addPlace(new Chairs_vip2(target_mc, parent));
addPlace(new Kitchen2(target_mc, parent));
addPlace(new Kitchen_dustbin2(target_mc, parent));
addPlace(new Couch_22(target_mc, parent));
addPlace(new Couch_32(target_mc, parent));
addPlace(new Dance_floor2(target_mc, parent));
addPlace(new Dance_rest2(target_mc, parent));
addPlace(new Drag2(target_mc, parent));
addPlace(new Entrance2(target_mc, parent));
addPlace(new Main_character2(target_mc, parent));
addPlace(new Talk_area_4(target_mc, parent));
addPlace(new Talk_area_5(target_mc, parent));
create();
}
}
Symbol 3876 MovieClip [__Packages.Bar2] Frame 0
class Bar2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Bar2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar";
placeaction = "work";
setPosition({x:17, y:7}, {x:17, y:7}, {x:17, y:10});
addCharacter({x:610, y:191}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("bar2", "bar2", (depth + FRONT) + 1);
addSprite("bar2", "bar2_column", depth + FRONT);
addProvision("bar", "cocktail", false, {x:545, y:131}, "drink_0", depth + IN_FRONT);
addProvision("bar", "martini", false, {x:571, y:148}, "drink_1", (depth + IN_FRONT) + 2);
addProvision("bar", "wine", false, {x:594, y:162}, "drink_2", (depth + IN_FRONT) + 4);
addCheck_point("drink_0", {x:16, y:9});
addCheck_point("drink_1", {x:16, y:8});
addCheck_point("drink_2", {x:16, y:7});
addCheck_point("neutral", {x:15, y:7});
}
}
Symbol 3877 MovieClip [__Packages.RecicleBin2] Frame 0
class RecicleBin2 extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function RecicleBin2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "bar_dustbin";
placeaction = "none";
setPosition({x:16, y:6}, {x:16, y:6}, {x:16, y:6});
addSprite("bar2_dustbin", "bar2_dustbin", depth + FRONT);
addDustBin("bar_dustbin", "bar2_dustbin", {x:605, y:238}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:15, y:7});
}
}
Symbol 3878 MovieClip [__Packages.Chairs_vip2] Frame 0
class Chairs_vip2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT;
function Chairs_vip2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "chairs_vip";
placeaction = "talk";
setPosition({x:8, y:17}, {x:8, y:17}, {x:10, y:18});
addCharacter({x:30, y:193}, {stand:false, flip:true, back:false}, "none", depth + IN_BACK);
addCharacter({x:106, y:175}, {stand:false, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addSprite("vip2_chair", "vip2_chair", depth + BACK);
addSprite("vip2_border", "vip2_border", depth + FRONT);
}
}
Symbol 3879 MovieClip [__Packages.Kitchen2] Frame 0
class Kitchen2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, FRONT, addProvision, IN_FRONT, addCheck_point;
function Kitchen2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen";
placeaction = "work";
setPosition({x:17, y:11}, {x:17, y:11}, {x:17, y:14});
addCharacter({x:490, y:118}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addSprite("kitchen2", "kitchen2", depth + FRONT);
addSprite("kitchen2_column", "kitchen2_column", (depth + FRONT) + 1);
addProvision("kitchen", "cake", false, {x:428, y:64}, "food_0", depth + IN_FRONT);
addProvision("kitchen", "chicken", false, {x:453, y:78}, "food_1", (depth + IN_FRONT) + 2);
addProvision("kitchen", "salad", false, {x:477, y:93}, "food_2", (depth + IN_FRONT) + 4);
addCheck_point("food_0", {x:16, y:11});
addCheck_point("food_1", {x:16, y:12});
addCheck_point("food_2", {x:16, y:13});
addCheck_point("neutral", {x:15, y:14});
}
}
Symbol 3880 MovieClip [__Packages.Kitchen_dustbin2] Frame 0
class Kitchen_dustbin2 extends Place
{
var placename, placeaction, setPosition, addSprite, FRONT, depth, addDustBin, addCheck_point;
function Kitchen_dustbin2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "kitchen_dustbin";
placeaction = "none";
setPosition({x:16, y:14}, {x:16, y:14}, {x:16, y:14});
addSprite("kitchen2_dustbin", "kitchen2_dustbin", depth + FRONT);
addDustBin("kitchen_dustbin", "kitchen2_dustbin", {x:370, y:97}, "provision", (depth + FRONT) + 1);
addCheck_point("provision", {x:15, y:14});
}
}
Symbol 3881 MovieClip [__Packages.Couch_22] Frame 0
class Couch_22 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_22 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_22";
placeaction = "eat";
setPosition({x:7, y:11}, {x:7, y:11}, {x:8, y:12});
addCharacter({x:150, y:322}, {stand:false, flip:true, back:false}, "character_0", depth + IN_BACK);
addCharacter({x:235, y:324}, {stand:false, flip:false, back:false}, "character_1", (depth + IN_BACK) + 2);
addSprite("couch_22", "couch_22", depth + BACK);
addSprite("couch_22_table", "couch_22_table", depth + FRONT);
addProvision("couch_22", "empty", true, {x:160, y:288}, "provision_0", depth + IN_FRONT);
addProvision("couch_22", "empty", true, {x:190, y:290}, "provision_1", (depth + IN_FRONT) + 2);
addCheck_point("character_0", {x:6, y:13});
addCheck_point("provision_0", {x:6, y:13});
addCheck_point("character_1", {x:9, y:13});
addCheck_point("provision_1", {x:9, y:13});
addCheck_point("neutral_0", {x:6, y:13});
addCheck_point("neutral_1", {x:9, y:10});
}
}
Symbol 3882 MovieClip [__Packages.Couch_32] Frame 0
class Couch_32 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK, FRONT, addProvision, IN_FRONT, addCheck_point;
function Couch_32 (_target_mc, _par) {
super(_target_mc, _par);
placename = "couch_32";
placeaction = "eat";
setPosition({x:12, y:11}, {x:12, y:11}, {x:14, y:12});
addCharacter({x:309, y:227}, {stand:false, flip:true, back:false}, "character_0", (depth + IN_BACK) + 1);
addCharacter({x:344, y:203}, {stand:false, flip:true, back:false}, "character_1", (depth + IN_BACK) + 4);
addCharacter({x:421, y:207}, {stand:false, flip:false, back:false}, "character_2", (depth + IN_BACK) + 7);
addSprite("couch_32", "couch_32", depth + BACK);
addSprite("couch_32_table", "couch_32_table", depth + FRONT);
addProvision("couch_32", "empty", true, {x:325, y:190}, "provision_0", (depth + IN_FRONT) + 1);
addProvision("couch_32", "empty", true, {x:354, y:174}, "provision_1", (depth + IN_FRONT) + 4);
addProvision("couch_32", "empty", true, {x:373, y:169}, "provision_2", (depth + IN_FRONT) + 7);
addCheck_point("character_0", {x:10, y:12});
addCheck_point("provision_0", {x:10, y:12});
addCheck_point("character_1", {x:14, y:12});
addCheck_point("provision_1", {x:14, y:12});
addCheck_point("character_2", {x:14, y:10});
addCheck_point("provision_2", {x:14, y:10});
addCheck_point("neutral_0", {x:10, y:12});
addCheck_point("neutral_1", {x:14, y:10});
}
}
Symbol 3883 MovieClip [__Packages.Dance_floor2] Frame 0
class Dance_floor2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth, addSprite, BACK;
function Dance_floor2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_floor";
placeaction = "dance";
setPosition({x:1, y:1}, {x:1, y:1}, {x:14, y:4});
addCharacter({x:620, y:359}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addCharacter({x:567, y:378}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 1);
addCharacter({x:613, y:381}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 2);
addCharacter({x:626, y:412}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 3);
addCharacter({x:586, y:412}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 4);
addCharacter({x:538, y:412}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 5);
addCharacter({x:617, y:459}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 6);
addCharacter({x:538, y:459}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 7);
addCharacter({x:487, y:459}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 8);
addCharacter({x:577, y:454}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 9);
addCharacter({x:624, y:486}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 10);
addCharacter({x:586, y:486}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 11);
addCharacter({x:556, y:485}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 12);
addCharacter({x:515, y:485}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 13);
addCharacter({x:468, y:485}, {stand:true, flip:true, back:false}, "none", (depth + IN_BACK) + 14);
addSprite("music2", "music2", depth + BACK);
}
}
Symbol 3884 MovieClip [__Packages.Dance_rest2] Frame 0
class Dance_rest2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_BACK, depth;
function Dance_rest2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "dance_rest";
placeaction = "idle";
setPosition({x:10, y:5}, {x:10, y:5}, {x:12, y:6});
addCharacter({x:548, y:456}, {stand:true, flip:false, back:false}, "none", depth + IN_BACK);
addCharacter({x:415, y:310}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 1);
addCharacter({x:387, y:323}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 2);
addCharacter({x:426, y:325}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 3);
addCharacter({x:470, y:326}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 4);
addCharacter({x:509, y:334}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 5);
addCharacter({x:406, y:345}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 6);
addCharacter({x:442, y:347}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 7);
addCharacter({x:522, y:346}, {stand:true, flip:false, back:false}, "none", (depth + IN_BACK) + 8);
}
}
Symbol 3885 MovieClip [__Packages.Drag2] Frame 0
class Drag2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth;
function Drag2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "drag";
placeaction = "drag";
setPosition({x:0, y:0}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:0, y:0}, {stand:true, flip:false, back:false, drag:true}, "none", depth + IN_FRONT);
}
}
Symbol 3886 MovieClip [__Packages.Entrance2] Frame 0
class Entrance2 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK;
function Entrance2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "entrance";
placeaction = "idle";
setPosition({x:1, y:9}, {x:1, y:9}, {x:2, y:11});
addCharacter({x:69, y:391}, {stand:true, flip:false, back:false}, "none", depth + IN_FRONT);
addCharacter({x:120, y:390}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 1);
addCharacter({x:21, y:439}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:60, y:439}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 3);
addCharacter({x:110, y:438}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 4);
addSprite("entrance2", "entrance2", depth + BACK);
}
}
Symbol 3887 MovieClip [__Packages.Main_character2] Frame 0
class Main_character2 extends Place
{
var placename, placeaction, setPosition, addCharacter, depth, addCheck_point;
function Main_character2 (_target_mc, _par) {
super(_target_mc, _par);
placename = "main_character";
placeaction = "idle";
setPosition({x:0, y:0}, {x:0, y:0}, {x:0, y:0});
addCharacter({x:198, y:429}, {stand:true, flip:false, back:false}, "none", depth);
addCheck_point("neutral", {x:15, y:14});
}
}
Symbol 3888 MovieClip [__Packages.Talk_area_4] Frame 0
class Talk_area_4 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_4 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_4";
placeaction = "talk";
setPosition({x:7, y:7}, {x:7, y:7}, {x:8, y:8});
addCharacter({x:360, y:374}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:269, y:374}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:313, y:348}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:312, y:401}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet2", "carpet", depth + BACK, {_x:parent.screenX(6.875, 7), _y:parent.screenY(6.875, 7)});
}
}
Symbol 3889 MovieClip [__Packages.Talk_area_5] Frame 0
class Talk_area_5 extends Place
{
var placename, placeaction, setPosition, addCharacter, IN_FRONT, depth, addSprite, BACK, parent;
function Talk_area_5 (_target_mc, _par) {
super(_target_mc, _par);
placename = "talk_area_5";
placeaction = "talk";
setPosition({x:12, y:8}, {x:12, y:8}, {x:13, y:9});
addCharacter({x:506, y:267}, {stand:true, flip:false, back:true}, "none", (depth + IN_FRONT) + 2);
addCharacter({x:409, y:265}, {stand:true, flip:true, back:false}, "none", (depth + IN_FRONT) + 4);
addCharacter({x:458, y:240}, {stand:true, flip:false, back:false}, "none", (depth + IN_FRONT) + 6);
addCharacter({x:459, y:294}, {stand:true, flip:true, back:true}, "none", (depth + IN_FRONT) + 8);
addSprite("carpet2", "carpet_1", depth + BACK, {_x:parent.screenX(11.875, 7.5), _y:parent.screenY(11.875, 7.5)});
}
}
Symbol 3890 MovieClip [__Packages.Man] Frame 0
class Man
{
var target_mc, parent, character, id, _mc, cur_pose, poses, posesdef, status, position, frame_timer, check_points, targets, steps, ocupied, drag, talk, action, talk_timer, counter_to_wish, depth;
function Man (v_target_mc, v_parent, v_id, v_character) {
target_mc = v_target_mc;
parent = v_parent;
character = v_character;
id = v_id;
target_mc.eventManager.addListener(this);
_mc = target_mc.CreateEmptyMovieClip(id, target_mc.getNextHighestDepth());
_mc.cacheAsBitmap = true;
_mc.papa = this;
cur_pose = new Object();
poses = new Array();
posesdef = new Object();
posesdef.DRAG = character + "_drag_mc";
posesdef.SIT_IDLE = character + "_sit_idle_mc";
posesdef.SIT_IDLE_FLIP = character + "_sit_idle_flip_mc";
posesdef.SIT_TALK = character + "_sit_talk_mc";
posesdef.SIT_TALK_FLIP = character + "_sit_talk_flip_mc";
posesdef.STAND_IDLE = character + "_stand_idle_mc";
_mc.attachMovie("shadow", "shadow_mc", _mc.getNextHighestDepth());
_mc.shadow_mc.cacheAsBitmap = true;
_mc.attachMovie("character_selection", "sel", _mc.getNextHighestDepth());
_mc.sel.cacheAsBitmap = true;
_mc.sel._visible = false;
for (var _local2 in posesdef) {
poses[posesdef[_local2]] = _mc.attachMovie(posesdef[_local2], posesdef[_local2], _mc.getNextHighestDepth(), {_x:0, _y:0});
poses[posesdef[_local2]].cacheAsBitmap = true;
poses[posesdef[_local2]]._visible = false;
poses[posesdef[_local2]].gotoAndStop(1);
}
_mc.attachMovie("hitarea", "hitarea", _mc.getNextHighestDepth());
_mc.hitArea = _mc.hitarea;
_mc.hitarea._visible = false;
status = new Object();
status = {state:"stand", action:"idle", flip:false};
position = new Object();
_mc.direction = poses[posesdef.STAND_IDLE];
frame_timer = setInterval(this, "next_frame", Math.round(1000 / target_mc.game_set.FRAME_RATE));
changePose(getPose(status));
check_points = new Buffer();
targets = new Buffer();
steps = new Buffer();
ocupied = false;
_mc.useHandCursor = true;
drag = false;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragman") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragman") {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
_mc.onPress = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragman") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.papa.target_mc.drag();
this.drag = true;
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && this.posefinded) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.papa.target_mc.drag();
this.drag = true;
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && (this.posefinded)) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragman") {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
this.papa.parent.tutorManager.manVip = true;
trace("vip complete!!!");
this.papa.parent.tutorManager.step_complete();
}
}
}
} else {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
}
}
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragman") {
this.sel._visible = false;
this.onRelease();
}
} else {
this.sel._visible = false;
this.onRelease();
}
}
};
}
function remove() {
target_mc.eventManager.removeListener(this);
_mc.removeMovieClip();
}
function removeEvents() {
delete _mc.onPress;
delete _mc.onMouseMove;
delete _mc.onRelease;
delete _mc.onReleaseOutside;
delete _mc.onRollOver;
delete _mc.onRollOut;
}
function moveBack() {
position.placename = "main_character";
setXY();
setDepth();
status.state = "stand";
status.action = "idle";
status.flip = false;
changePose(getPose(status));
}
function saveOldPosition() {
}
function checkTalkRealize() {
var _local3 = false;
if (countTalkers() > 0) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.wish == "talk")) && (parent.visitors[_local2].cur_wish.status == "wait")) {
parent.visitors[_local2].wishRealize();
_local3 = true;
}
_local2++;
}
if (_local3) {
talkRealize();
}
}
}
function countTalkers() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (parent.visitors[_local2].position.placename == "chairs_vip") {
_local3++;
}
_local2++;
}
return(_local3);
}
function talkRealize() {
talk = "realize";
action = "talk";
status.action = "talk";
changePose(getPose(status));
ocupied = true;
_mc.useHandCursor = false;
clearInterval(talk_timer);
counter_to_wish = target_mc.game_set.WISH_TIME_MIN + random(target_mc.game_set.WISH_TIME_DELTA);
talk_timer = setInterval(this, "count_to_talk_complete", target_mc.game_set.ONE_SECOND);
}
function count_to_talk_complete() {
if (!parent.pause) {
if (counter_to_wish <= 1) {
clearInterval(talk_timer);
talkComplete();
} else {
counter_to_wish--;
}
}
}
function talkComplete() {
parent.level_interface.addVipGoal();
status.action = "idle";
talk = "complete";
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.status == "realize")) {
parent.visitors[_local2].wishComplete();
}
_local2++;
}
parent.room.setEmptyCharacterPosition(_mc._x, _mc._y, true);
moveBack();
}
function getPose(pose) {
var _local2 = character;
if (pose.state != undefined) {
status.state = pose.state;
status.action = pose.action;
status.flip = pose.flip;
}
_local2 = _local2 + ("_" + status.state);
switch (status.action) {
case "idle" :
_local2 = _local2 + "_idle";
break;
case "none" :
_local2 = _local2 + "_idle";
break;
case "talk" :
_local2 = _local2 + "_talk";
}
if (status.flip) {
_local2 = _local2 + "_flip";
}
_local2 = _local2 + "_mc";
return(_local2);
}
function changePose(pose) {
if (!_mc.drag) {
_mc.olddirection = _mc.direction;
}
_mc.direction._visible = false;
if (pose != undefined) {
_mc.direction = poses[pose];
}
_mc.direction._visible = true;
if ((status.state == "sit") && (pose != posesdef.DRAG)) {
_mc.shadow_mc._visible = false;
} else {
_mc.shadow_mc._visible = true;
}
}
function next_frame() {
if (!parent.pause) {
if (_mc.direction._currentframe < _mc.direction._totalframes) {
_mc.direction.gotoAndStop(_mc.direction._currentframe + 1);
} else {
_mc.direction.gotoAndStop(1);
}
}
}
function setDragPosition(pos, without_depth) {
if (pos != undefined) {
_mc._x = pos.x;
_mc._y = pos.y;
depth = pos.depth;
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
} else if ((without_depth == undefined) || (without_depth)) {
setDepth(depth);
}
}
function setPosition(pos, without_depth) {
position.x = pos.x;
position.y = pos.y;
position.depth = pos.depth;
position.placeaction = pos.placeaction;
position.placename = pos.placename;
setXY();
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
}
function setXY() {
_mc._x = position.x;
_mc._y = position.y;
}
function setDepth(depth) {
if (depth != undefined) {
this.depth = depth;
_mc.swapDepths(depth);
} else {
var _local2 = parent.room.findCharacterPosition(null, null, "main_character", null);
_mc.swapDepths(_local2.depth);
}
}
var totalframes = 15;
var framesrate = 30;
var dx = 0;
var dy = -5;
var delta_depth = 10;
}
Symbol 3891 MovieClip [__Packages.Buffer] Frame 0
class Buffer
{
var array, front, back;
function Buffer () {
array = new Array();
front = 0;
back = 0;
}
function push(val) {
array[back++] = val;
}
function pop() {
if (front < back) {
return(array[front++]);
}
return(null);
}
function reverse() {
array.reverse();
}
function getData() {
return(array);
}
function getFront() {
return(front);
}
function getBack() {
return(back);
}
function setData(s_arr) {
var _local2 = 0;
while (_local2 < s_arr.length) {
if (typeof(s_arr[_local2]) == "object") {
var _local4 = new Object();
for (var _local5 in s_arr[_local2]) {
_local4[_local5] = s_arr[_local2][_local5];
}
push(_local4);
} else {
push(s_arr[_local2]);
}
_local2++;
}
}
function show() {
trace("=== front");
var _local2 = front;
while (_local2 < back) {
if (typeof(array[_local2]) == "movieclip") {
trace((_local2 + ": ") + array[_local2]);
} else {
var _local3 = _local2 + ": ";
for (var _local4 in array[_local2]) {
_local3 = _local3 + (((_local4 + "=") + array[_local2][_local4]) + " ");
}
trace(_local3);
}
_local2++;
}
trace("=== back");
}
}
Symbol 3892 MovieClip [__Packages.Person] Frame 0
class Person
{
var target_mc, parent, character, id, hand1, hand2, status, _mc, cur_pose, poses, posesdef, frame_timer, check_points, targets, steps, action, ocupied, drag, position, talk, talk_timer, counter_to_wish, walkframes, depth, x, y, oldtargetposition, targetposition, bad, idle_action_timer, nextposition, animator, nextx, nexty, sdx, sdy, framescount, counter_to_action;
function Person (v_target_mc, v_parent, v_id, v_character) {
target_mc = v_target_mc;
parent = v_parent;
character = v_character;
id = v_id;
hand1 = new Object();
hand2 = new Object();
status.colhands = 0;
target_mc.eventManager.addListener(this);
_mc = target_mc.CreateEmptyMovieClip(id, target_mc.getNextHighestDepth());
_mc.cacheAsBitmap = true;
_mc.papa = this;
cur_pose = new Object();
poses = new Array();
posesdef = new Object();
posesdef.DRAG = character + "_drag_mc";
posesdef.SIT_IDLE = character + "_sit_idle_mc";
posesdef.SIT_IDLE_FLIP = character + "_sit_idle_flip_mc";
posesdef.SIT_TALK = character + "_sit_talk_mc";
posesdef.SIT_TALK_FLIP = character + "_sit_talk_flip_mc";
posesdef.STAND_IDLE = character + "_stand_idle_mc";
posesdef.STAND_IDLE_ONE_HAND = character + "_stand_idle_one_hand_mc";
posesdef.STAND_IDLE_TWO_HAND = character + "_stand_idle_two_hand_mc";
posesdef.STAND_WALK_FRONT = character + "_stand_walk_front_mc";
posesdef.STAND_WALK_FRONT_FLIP = character + "_stand_walk_front_flip_mc";
posesdef.STAND_WALK_FRONT_ONE_HAND = character + "_stand_walk_front_one_hand_mc";
posesdef.STAND_WALK_FRONT_ONE_HAND_FLIP = character + "_stand_walk_front_one_hand_flip_mc";
posesdef.STAND_WALK_FRONT_TWO_HAND = character + "_stand_walk_front_two_hand_mc";
posesdef.STAND_WALK_FRONT_TWO_HAND_FLIP = character + "_stand_walk_front_two_hand_flip_mc";
posesdef.STAND_WALK_BACK = character + "_stand_walk_back_mc";
posesdef.STAND_WALK_BACK_FLIP = character + "_stand_walk_back_flip_mc";
posesdef.STAND_WALK_BACK_ONE_HAND = character + "_stand_walk_back_one_hand_mc";
posesdef.STAND_WALK_BACK_ONE_HAND_FLIP = character + "_stand_walk_back_one_hand_flip_mc";
posesdef.STAND_WALK_BACK_TWO_HAND = character + "_stand_walk_back_two_hand_mc";
posesdef.STAND_WALK_BACK_TWO_HAND_FLIP = character + "_stand_walk_back_two_hand_flip_mc";
_mc.attachMovie("shadow", "shadow_mc", _mc.getNextHighestDepth());
_mc.shadow_mc.cacheAsBitmap = true;
_mc.attachMovie("character_selection", "sel", _mc.getNextHighestDepth());
_mc.sel.cacheAsBitmap = true;
_mc.sel._visible = false;
for (var _local2 in posesdef) {
poses[posesdef[_local2]] = _mc.attachMovie(posesdef[_local2], posesdef[_local2], _mc.getNextHighestDepth(), {_x:0, _y:0});
poses[posesdef[_local2]].cacheAsBitmap = true;
poses[posesdef[_local2]]._visible = false;
poses[posesdef[_local2]].gotoAndStop(1);
}
_mc.attachMovie("hitarea", "hitarea", _mc.getNextHighestDepth());
_mc.hitArea = _mc.hitarea;
_mc.hitarea._visible = false;
status = new Object();
status = {state:"stand", action:"idle", direction:"none", hands:0, flip:false};
_mc.direction = poses[posesdef.STAND_IDLE];
frame_timer = setInterval(this, "next_frame", Math.round(1000 / target_mc.game_set.FRAME_RATE));
changePose(getPose(status));
check_points = new Buffer();
targets = new Buffer();
steps = new Buffer();
action = "none";
ocupied = false;
_mc.useHandCursor = true;
drag = false;
_mc.onRollOver = function () {
if ((!this.papa.parent.pause) && (!this.papa.parent.tutor)) {
if (((this.papa.action == "none") || (this.papa.action == "idle")) || (this.papa.action == "wait")) {
this.sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if ((!this.papa.parent.pause) && (!this.papa.parent.tutor)) {
this.sel._visible = false;
}
};
_mc.onPress = function () {
if ((!this.papa.parent.pause) && (!this.papa.parent.tutor)) {
if (((this.papa.action == "none") || (this.papa.action == "idle")) || (this.papa.action == "wait")) {
this.papa.action = "idle";
this.drag = true;
this.papa.target_mc.drag();
this.papa.saveOldPosition();
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "idle";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && (this.posefinded)) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
};
_mc.onRelease = function () {
if ((!this.papa.parent.pause) && (!this.papa.parent.tutor)) {
delete this.onMouseMove;
if (((this.papa.action == "none") || (this.papa.action == "idle")) || (this.papa.action == "wait")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
this.papa.event_next_target();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
}
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
this.sel._visible = false;
this.onRelease();
}
};
}
function remove() {
destroy_targets();
target_mc.eventManager.removeListener(this);
_mc.removeMovieClip();
}
function removeEvents() {
delete _mc.onPress;
delete _mc.onMouseMove;
delete _mc.onRelease;
delete _mc.onReleaseOutside;
delete _mc.onRollOver;
delete _mc.onRollOut;
}
function moveBack() {
action = "idle";
position.placename = "idle";
setXY();
setDepth();
status.state = "stand";
status.action = "idle";
status.flip = false;
changePose(getPose(status));
}
function saveOldPosition() {
}
function checkTalkRealize() {
var _local3 = false;
if (countTalkers() > 0) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.wish == "talk")) && (parent.visitors[_local2].cur_wish.status == "wait")) {
parent.visitors[_local2].wishRealize();
_local3 = true;
}
_local2++;
}
if (_local3) {
talkRealize();
}
}
}
function countTalkers() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (parent.visitors[_local2].position.placename == "chairs_vip") {
_local3++;
}
_local2++;
}
return(_local3);
}
function talkRealize() {
talk = "realize";
action = "talk";
status.action = "talk";
changePose(getPose(status));
ocupied = true;
_mc.useHandCursor = false;
clearInterval(talk_timer);
counter_to_wish = target_mc.game_set.WISH_TIME_MIN + random(target_mc.game_set.WISH_TIME_DELTA);
talk_timer = setInterval(this, "count_to_talk_complete", target_mc.game_set.ONE_SECOND);
}
function count_to_talk_complete() {
if (!parent.pause) {
if (counter_to_wish <= 1) {
clearInterval(talk_timer);
talkComplete();
} else {
counter_to_wish--;
}
}
}
function talkComplete() {
parent.level_interface.addVipGoal();
action = "none";
talk = "complete";
parent.room.setEmptyCharacterPosition(_mc._x, _mc._y, true);
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.status == "realize")) {
parent.visitors[_local2].wishComplete();
}
_local2++;
}
moveBack();
event_next_target();
}
function getPose(pose) {
var _local2 = character;
if (pose.state != undefined) {
status.state = pose.state;
status.action = pose.action;
status.direction = pose.direction;
status.hands = pose.hands;
status.flip = pose.flip;
}
_local2 = _local2 + ("_" + status.state);
_local2 = _local2 + ("_" + status.action);
if (status.state == "stand") {
switch (status.direction) {
case "front" :
_local2 = _local2 + "_front";
break;
case "back" :
_local2 = _local2 + "_back";
}
switch (status.hands) {
case 1 :
_local2 = _local2 + "_one_hand";
break;
case 2 :
_local2 = _local2 + "_two_hand";
}
}
if (status.flip) {
_local2 = _local2 + "_flip";
}
_local2 = _local2 + "_mc";
return(_local2);
}
function changePose(pose) {
if (!_mc.drag) {
_mc.olddirection = _mc.direction;
}
_mc.direction._visible = false;
if (pose != undefined) {
_mc.direction = poses[pose];
}
_mc.direction._visible = true;
if ((status.state == "sit") && (pose != posesdef.DRAG)) {
_mc.shadow_mc._visible = false;
} else {
_mc.shadow_mc._visible = true;
}
if (status.hands > 0) {
var _local2 = hand1.name;
if (hand1.empty) {
_local2 = _local2 + "_empty";
}
_mc.direction.hand1.gotoAndStop(_local2);
_mc.direction.hand1.c.hit._visible = false;
}
if (status.hands == 2) {
var _local2 = hand2.name;
if (hand2.empty) {
_local2 = _local2 + "_empty";
}
_mc.direction.hand2.gotoAndStop(_local2);
_mc.direction.hand2.c.hit._visible = false;
}
}
function next_frame() {
if (!parent.pause) {
if (!walkframes) {
if (_mc.direction._currentframe < _mc.direction._totalframes) {
_mc.direction.gotoAndStop(_mc.direction._currentframe + 1);
} else {
_mc.direction.gotoAndStop(1);
}
updateAfterEvent();
}
}
}
function setDragPosition(pos, without_depth) {
if (pos != undefined) {
_mc._x = pos.x;
_mc._y = pos.y;
depth = pos.depth;
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
} else if ((without_depth == undefined) || (without_depth)) {
setDepth(depth);
}
}
function setPosition(pos) {
position = pos;
setXY();
setDepth();
}
function setXY() {
x = parent.screenX(position.x, position.y) + dx;
y = parent.screenY(position.x, position.y) + dy;
_mc._x = x;
_mc._y = y;
}
function setDepth(depth) {
if (depth != undefined) {
_mc.swapDepths(depth);
} else if (((tobj = parent.find_near_obj(position.x, position.y))) != null) {
_mc.swapDepths(tobj.depth);
} else {
_mc.swapDepths(parent.calcDepth(position.x, position.y, delta_depth));
}
}
function event_add_check_point(obj, depth, type) {
if (type == "visitor") {
var _local3 = target_mc.attachMovie("check_point", "check_point_" + check_points.getBack(), depth, {_x:obj.x - 10, _y:obj.y - 70});
} else if (type == "dustbin") {
var _local3 = target_mc.attachMovie("check_point", "check_point_" + check_points.getBack(), depth, {_x:obj.x + 7, _y:obj.y - 20});
} else {
var _local3 = target_mc.attachMovie("check_point", "check_point_" + check_points.getBack(), depth, {_x:obj.x + 5, _y:obj.y - 5});
}
check_points.push(_local3);
}
function event_add_target(obj) {
targets.push(obj);
if ((action == "none") || (action == "wait")) {
event_next_target();
}
}
function event_check_point_finish() {
var _local2 = check_points.pop();
_local2.removeMovieClip();
}
function destroy_targets() {
while (((mc = check_points.pop())) != null) {
mc.removeMovieClip();
}
oldtargetposition = targetposition;
while (((targetposition = targets.pop())) != null) {
}
}
function event_target_finish() {
var _local2 = true;
if (parent.tutor) {
_local2 = false;
if ((targetposition.type == "provision") && (parent.tutorManager.current.complete.action == "clickprovision")) {
_local2 = true;
} else if ((targetposition.type == "dustbin") && (parent.tutorManager.current.complete.action == "clickdustbin")) {
_local2 = true;
} else if ((targetposition.type == "visitor") && (parent.tutorManager.current.complete.action == "clickcharacter")) {
parent.tutorManager.createplate = true;
_local2 = true;
}
if (_local2) {
parent.tutorManager.step_complete();
}
if (((targetposition.type != "provision") && (targetposition.type != "dustbin")) && (targetposition.type != "visitor")) {
_local2 = true;
}
}
if (_local2) {
_mc.useHandCursor = true;
event_check_point_finish();
bad = false;
if (targetposition.type == "provision") {
switch (status.hands) {
case 0 :
hand1 = targetposition.link.get_props();
if (!hand1.empty) {
targetposition.link.prepare();
}
status.hands = 1;
targetposition.link.hide();
changePose(getPose(status));
break;
case 1 :
hand2 = targetposition.link.get_props();
if (!hand2.empty) {
targetposition.link.prepare();
}
status.hands = 2;
targetposition.link.hide();
changePose(getPose(status));
break;
default :
badTarget();
}
} else if (targetposition.type == "dustbin") {
switch (status.hands) {
case 0 :
badTarget();
break;
case 1 :
target_mc.dustbin();
status.hands = 0;
changePose(getPose(status));
break;
default :
target_mc.dustbin();
if ((hand1.empty && (hand2.empty)) || ((!hand1.empty) && (!hand2.empty))) {
status.hands = 0;
} else if (hand1.empty) {
status.hands = 1;
swapHands();
} else {
status.hands = 1;
}
changePose(getPose(status));
}
} else if (targetposition.type == "visitor") {
switch (status.hands) {
case 0 :
badTarget();
break;
case 1 :
if ((targetposition.name == hand1.name) && (!hand1.empty)) {
var _local3 = getLink();
if (_local3.isExist()) {
badTarget();
} else {
status.hands = 0;
changePose(getPose(status));
targetposition.link.wishRealize();
}
} else {
badTarget();
}
break;
default :
if ((targetposition.name == hand1.name) && (!hand1.empty)) {
var _local3 = getLink();
if (_local3.isExist()) {
badTarget();
} else {
status.hands = 1;
swapHands();
changePose(getPose(status));
targetposition.link.wishRealize();
}
} else if ((targetposition.name == hand2.name) && (!hand2.empty)) {
var _local3 = getLink();
if (_local3.isExist()) {
badTarget();
} else {
status.hands = 1;
changePose(getPose(status));
targetposition.link.wishRealize();
}
} else {
badTarget();
}
}
}
event_next_target();
}
}
function swapHands() {
for (var _local2 in hand2) {
hand1[_local2] = hand2[_local2];
}
}
function getLink() {
var _local2 = targetposition.checkPoint;
switch (_local2) {
case "character_0" :
_local2 = "provision_0";
break;
case "character_1" :
_local2 = "provision_1";
break;
case "character_2" :
_local2 = "provision_2";
break;
case "character_3" :
_local2 = "provision_3";
break;
case "character_4" :
_local2 = "provision_4";
}
return(parent.room.getProvisionByPlaceAndCheckPoint(targetposition.place, _local2));
}
function badTarget() {
target_mc.bad_action();
bad = true;
destroy_targets();
parent.last_check_pos.objLink = null;
parent.check_pos.objLink = null;
wait_start();
action = "none";
status.direction = "none";
status.action = "idle";
status.flip = false;
changePose(getPose(status));
}
function event_next_target() {
if (targetposition != null) {
oldtargetposition = targetposition;
}
if (((targetposition = targets.pop())) != null) {
clearInterval(idle_action_timer);
if (action == "wait") {
action = "walk_idle";
} else {
action = "walk";
}
steps.setData(parent.findway(position, targetposition.position, parent.pole, parent.W, parent.H));
_mc.useHandCursor = false;
event_next_step();
} else {
if ((action != "none") && (action != "walk_idle")) {
wait_start();
action = "wait";
} else {
action = "none";
}
status.action = "idle";
status.direction = "none";
status.flip = false;
changePose(getPose(status));
}
}
function event_step_finish() {
event_next_step();
}
function event_next_step() {
if (((nextposition = steps.pop())) != null) {
animator = new Animator(parent, target_mc.eventManager, totalframes, framesrate, "anim_start_step", "anim_do_step", "anim_stop_step");
} else {
event_target_finish();
}
}
function calcDirection() {
if (nextposition.x == position.x) {
if (nextposition.y < position.y) {
status.action = "walk";
status.direction = "front";
status.flip = true;
} else {
status.action = "walk";
status.direction = "back";
status.flip = true;
}
} else if (nextposition.x < position.x) {
status.action = "walk";
status.direction = "front";
status.flip = false;
} else {
status.action = "walk";
status.direction = "back";
status.flip = false;
}
changePose(getPose(status));
}
function anim_start_step() {
walkframes = true;
nextx = parent.screenX(nextposition.x, nextposition.y) + dx;
nexty = parent.screenY(nextposition.x, nextposition.y) + dy;
sdx = (nextx - x) / totalframes;
sdy = (nexty - y) / totalframes;
calcDirection();
framescount = 0;
}
function anim_do_step() {
_mc._x = _mc._x + sdx;
_mc._y = _mc._y + sdy;
framescount = framescount + 2;
if (framescount > (totalframes / 2)) {
position = nextposition;
setDepth();
}
_mc.direction.gotoAndStop(framescount);
updateAfterEvent();
}
function anim_stop_step() {
walkframes = false;
x = _mc._x;
y = _mc._y;
event_step_finish();
}
function wait_start() {
clearInterval(idle_action_timer);
counter_to_action = target_mc.game_set.IDLE_TIME;
idle_action_timer = setInterval(this, "count_to_wish", target_mc.game_set.ONE_SECOND);
}
function count_to_wish() {
if (!parent.pause) {
if (counter_to_action == 1) {
clearInterval(idle_action_timer);
wait_end();
} else {
counter_to_action--;
}
}
}
function wait_end() {
clearInterval(idle_action_timer);
var _local2 = parent.room.getNeutralPosition(oldtargetposition.position.place);
if (_local2 != null) {
event_add_check_point({x:-100, y:-100}, 16050, "neutral");
event_add_target({type:"neutral", position:_local2});
}
}
function idle() {
}
var totalframes = 8;
var framesrate = 40;
var dx = 0;
var dy = -5;
var delta_depth = 28;
}
Symbol 3893 MovieClip [__Packages.Animator] Frame 0
class Animator
{
var parent, dispatcher, counter, steps, interval, start_event, move_event, stop_event, timer, work;
function Animator (_par, v_dispatcher, v_steps, v_interval, v_start_event, v_move_event, v_stop_event) {
parent = _par;
dispatcher = v_dispatcher;
counter = 0;
steps = v_steps;
interval = v_interval;
start_event = v_start_event;
move_event = v_move_event;
stop_event = v_stop_event;
dispatcher.broadcastMessage(start_event);
clearInterval(timer);
timer = setInterval(this, "do_action", interval);
work = true;
}
function do_action() {
if (!parent.pause) {
if (counter >= steps) {
counter = 0;
clearInterval(timer);
work = false;
dispatcher.broadcastMessage(stop_event);
updateAfterEvent();
} else {
counter++;
dispatcher.broadcastMessage(move_event);
updateAfterEvent();
}
}
}
function cancel() {
work = false;
clearInterval(timer);
}
}
Symbol 3894 MovieClip [__Packages.Barman] Frame 0
class Barman
{
var target_mc, parent, character, id, _mc, provision, cur_pose, poses, posesdef, status, position, frame_timer, check_points, targets, steps, ocupied, drag, workstart, talk, action, talk_timer, counter_to_wish, depth, current, work_timer, work_progress;
function Barman (v_target_mc, v_parent, v_id, v_character) {
target_mc = v_target_mc;
parent = v_parent;
character = v_character;
id = v_id;
target_mc.eventManager.addListener(this);
_mc = target_mc.CreateEmptyMovieClip(id, target_mc.getNextHighestDepth());
_mc.cacheAsBitmap = true;
_mc.papa = this;
provision = new Buffer();
cur_pose = new Object();
poses = new Array();
posesdef = new Object();
posesdef.DRAG = character + "_drag_mc";
posesdef.SIT_IDLE = character + "_sit_idle_mc";
posesdef.SIT_IDLE_FLIP = character + "_sit_idle_flip_mc";
posesdef.SIT_TALK = character + "_sit_talk_mc";
posesdef.SIT_TALK_FLIP = character + "_sit_talk_flip_mc";
posesdef.STAND_IDLE = character + "_stand_idle_mc";
posesdef.STAND_WORK = character + "_stand_work_mc";
_mc.attachMovie("shadow", "shadow_mc", _mc.getNextHighestDepth());
_mc.shadow_mc.cacheAsBitmap = true;
_mc.attachMovie("character_selection", "sel", _mc.getNextHighestDepth());
_mc.sel.cacheAsBitmap = true;
_mc.sel._visible = false;
for (var _local2 in posesdef) {
poses[posesdef[_local2]] = _mc.attachMovie(posesdef[_local2], posesdef[_local2], _mc.getNextHighestDepth(), {_x:0, _y:0});
poses[posesdef[_local2]].cacheAsBitmap = true;
poses[posesdef[_local2]]._visible = false;
poses[posesdef[_local2]].gotoAndStop(1);
}
_mc.attachMovie("hitarea", "hitarea", _mc.getNextHighestDepth());
_mc.hitArea = _mc.hitarea;
_mc.hitarea._visible = false;
status = new Object();
status = {state:"stand", action:"idle", flip:false};
position = new Object();
_mc.direction = poses[posesdef.STAND_IDLE];
frame_timer = setInterval(this, "next_frame", Math.round(1000 / target_mc.game_set.FRAME_RATE));
changePose(getPose(status));
check_points = new Buffer();
targets = new Buffer();
steps = new Buffer();
ocupied = false;
_mc.useHandCursor = true;
drag = false;
workstart = false;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragbarman") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragbarman") {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
_mc.onPress = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragbarman") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.drag = true;
this.papa.target_mc.drag();
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && this.posefinded) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.drag = true;
this.papa.target_mc.drag();
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && (this.posefinded)) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragbarman") {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
}
}
}
} else {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
}
}
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragbarman") {
this.sel._visible = false;
this.onRelease();
}
} else {
this.sel._visible = false;
this.onRelease();
}
}
};
}
function remove() {
target_mc.eventManager.removeListener(this);
_mc.removeMovieClip();
}
function removeEvents() {
delete _mc.onPress;
delete _mc.onMouseMove;
delete _mc.onRelease;
delete _mc.onReleaseOutside;
delete _mc.onRollOver;
delete _mc.onRollOut;
}
function moveBack() {
position.placename = "bar";
setXY();
setDepth();
status.state = "stand";
status.action = "idle";
status.flip = false;
changePose(getPose(status));
if (!workstart) {
event_next_provision();
}
}
function saveOldPosition() {
}
function checkTalkRealize() {
var _local3 = false;
if (countTalkers() > 0) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.wish == "talk")) && (parent.visitors[_local2].cur_wish.status == "wait")) {
parent.visitors[_local2].wishRealize();
_local3 = true;
}
_local2++;
}
if (_local3) {
talkRealize();
}
}
}
function countTalkers() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (parent.visitors[_local2].position.placename == "chairs_vip") {
_local3++;
}
_local2++;
}
return(_local3);
}
function talkRealize() {
talk = "realize";
action = "talk";
status.action = "talk";
changePose(getPose(status));
ocupied = true;
_mc.useHandCursor = false;
clearInterval(talk_timer);
counter_to_wish = target_mc.game_set.WISH_TIME_MIN + random(target_mc.game_set.WISH_TIME_DELTA);
talk_timer = setInterval(this, "count_to_talk_complete", target_mc.game_set.ONE_SECOND);
}
function count_to_talk_complete() {
if (!parent.pause) {
if (counter_to_wish <= 1) {
clearInterval(talk_timer);
talkComplete();
} else {
counter_to_wish--;
}
}
}
function talkComplete() {
parent.level_interface.addVipGoal();
status.action = "idle";
talk = "complete";
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.status == "realize")) {
parent.visitors[_local2].wishComplete();
}
_local2++;
}
parent.room.setEmptyCharacterPosition(_mc._x, _mc._y, true);
moveBack();
}
function getPose(pose) {
var _local2 = character;
if (pose.state != undefined) {
status.state = pose.state;
status.action = pose.action;
status.flip = pose.flip;
}
_local2 = _local2 + ("_" + status.state);
switch (status.action) {
case "idle" :
_local2 = _local2 + "_idle";
break;
case "none" :
_local2 = _local2 + "_idle";
break;
case "talk" :
_local2 = _local2 + "_talk";
break;
case "work" :
_local2 = _local2 + "_work";
}
if (status.flip) {
_local2 = _local2 + "_flip";
}
_local2 = _local2 + "_mc";
return(_local2);
}
function changePose(pose) {
if (!_mc.drag) {
_mc.olddirection = _mc.direction;
}
_mc.direction._visible = false;
_mc.direction.gotoAndStop(1);
if (pose != undefined) {
_mc.direction = poses[pose];
}
_mc.direction._visible = true;
if ((status.state == "sit") && (pose != posesdef.DRAG)) {
_mc.shadow_mc._visible = false;
} else {
_mc.shadow_mc._visible = true;
}
}
function next_frame() {
if (!parent.pause) {
if (_mc.direction._currentframe < _mc.direction._totalframes) {
_mc.direction.gotoAndStop(_mc.direction._currentframe + 1);
} else {
_mc.direction.gotoAndStop(1);
}
}
}
function setDragPosition(pos, without_depth) {
if (pos != undefined) {
_mc._x = pos.x;
_mc._y = pos.y;
depth = pos.depth;
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
} else if ((without_depth == undefined) || (without_depth)) {
setDepth(depth);
}
}
function setPosition(pos, without_depth) {
position.x = pos.x;
position.y = pos.y;
position.depth = pos.depth;
position.placeaction = pos.placeaction;
position.placename = pos.placename;
setXY();
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
}
function setXY() {
_mc._x = position.x;
_mc._y = position.y;
}
function setDepth(depth) {
if (depth != undefined) {
this.depth = depth;
_mc.swapDepths(depth);
} else {
var _local2 = parent.room.findCharacterPosition(null, null, "bar", null);
_mc.swapDepths(_local2.depth);
}
}
function event_add_provision(obj) {
provision.push(obj);
if (status.action == "idle") {
event_next_provision();
}
}
function event_next_provision() {
if (((current = provision.pop())) != null) {
status.action = "work";
clearInterval(work_timer);
workstart = true;
work_progress = 0;
work_timer = setInterval(this, "prepare", target_mc.game_set.ONE_SECOND);
} else {
status.state = "stand";
status.action = "idle";
status.flip = false;
}
changePose(getPose(status));
}
function event_provision_finish() {
current.show();
workstart = false;
clearInterval(work_timer);
event_next_provision();
}
function prepare() {
if (!parent.pause) {
if (status.action == "idle") {
status.action = "work";
changePose(getPose());
}
if (status.action == "work") {
work_progress++;
if (work_progress == target_mc.game_set.WORK_TIME) {
event_provision_finish();
}
}
}
}
var totalframes = 15;
var framesrate = 30;
var dx = 0;
var dy = -5;
var delta_depth = 10;
}
Symbol 3895 MovieClip [__Packages.Cock] Frame 0
class Cock
{
var target_mc, parent, character, id, _mc, provision, cur_pose, poses, posesdef, status, position, frame_timer, check_points, targets, steps, ocupied, drag, workstart, talk, action, talk_timer, counter_to_wish, depth, current, work_timer, work_progress;
function Cock (v_target_mc, v_parent, v_id, v_character) {
target_mc = v_target_mc;
parent = v_parent;
character = v_character;
id = v_id;
target_mc.eventManager.addListener(this);
_mc = target_mc.CreateEmptyMovieClip(id, target_mc.getNextHighestDepth());
_mc.cacheAsBitmap = true;
_mc.papa = this;
provision = new Buffer();
cur_pose = new Object();
poses = new Array();
posesdef = new Object();
posesdef.DRAG = character + "_drag_mc";
posesdef.SIT_IDLE = character + "_sit_idle_mc";
posesdef.SIT_IDLE_FLIP = character + "_sit_idle_flip_mc";
posesdef.SIT_TALK = character + "_sit_talk_mc";
posesdef.SIT_TALK_FLIP = character + "_sit_talk_flip_mc";
posesdef.STAND_IDLE = character + "_stand_idle_mc";
posesdef.STAND_WORK = character + "_stand_work_mc";
_mc.attachMovie("shadow", "shadow_mc", _mc.getNextHighestDepth());
_mc.shadow_mc.cacheAsBitmap = true;
_mc.attachMovie("character_selection", "sel", _mc.getNextHighestDepth());
_mc.sel.cacheAsBitmap = true;
_mc.sel._visible = false;
for (var _local2 in posesdef) {
poses[posesdef[_local2]] = _mc.attachMovie(posesdef[_local2], posesdef[_local2], _mc.getNextHighestDepth(), {_x:0, _y:0});
poses[posesdef[_local2]].cacheAsBitmap = true;
poses[posesdef[_local2]]._visible = false;
poses[posesdef[_local2]].gotoAndStop(1);
}
_mc.attachMovie("hitarea", "hitarea", _mc.getNextHighestDepth());
_mc.hitArea = _mc.hitarea;
_mc.hitarea._visible = false;
status = new Object();
status = {state:"stand", action:"idle", flip:false};
position = new Object();
_mc.direction = poses[posesdef.STAND_IDLE];
frame_timer = setInterval(this, "next_frame", Math.round(1000 / target_mc.game_set.FRAME_RATE));
changePose(getPose(status));
check_points = new Buffer();
targets = new Buffer();
steps = new Buffer();
ocupied = false;
_mc.useHandCursor = true;
drag = false;
workstart = false;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragcock") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.sel._visible = true;
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragcock") {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
_mc.onPress = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragcock") {
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.papa.target_mc.drag();
this.drag = true;
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && this.posefinded) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
} else if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.papa.status.action = "none";
this.papa.target_mc.drag();
this.drag = true;
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, true);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, "chairs_vip", null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
if (!tmp.stand) {
this.papa.status.state = "sit";
} else {
this.papa.status.state = "stand";
}
this.papa.status.action = "none";
this.papa.status.flip = tmp.flip;
this.papa.setDragPosition(tmp, false);
this.papa.changePose(this.papa.getPose(this.papa.status));
}
if ((tmp.stand == undefined) && (this.posefinded)) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragcock") {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
this.papa.parent.tutorManager.cockVip = true;
this.papa.parent.tutorManager.step_complete();
}
}
}
} else {
delete this.onMouseMove;
if (((this.papa.status.action == "none") || (this.papa.status.action == "idle")) || (this.papa.status.action == "work")) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setDragPosition();
this.papa.parent.room.setEmptyCharacterPosition(this._x, this._y, false);
this.papa.position.placename = "chairs_vip";
this.papa.checkTalkRealize();
}
}
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.action == "dragcock") {
this.sel._visible = false;
this.onRelease();
}
} else {
this.sel._visible = false;
this.onRelease();
}
}
};
}
function remove() {
target_mc.eventManager.removeListener(this);
_mc.removeMovieClip();
}
function removeEvents() {
delete _mc.onPress;
delete _mc.onMouseMove;
delete _mc.onRelease;
delete _mc.onReleaseOutside;
delete _mc.onRollOver;
delete _mc.onRollOut;
}
function moveBack() {
position.placename = "kitchen";
setXY();
setDepth();
status.state = "stand";
status.action = "idle";
status.flip = false;
changePose(getPose(status));
if (!workstart) {
event_next_provision();
}
}
function saveOldPosition() {
}
function checkTalkRealize() {
var _local3 = false;
if (countTalkers() > 0) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.wish == "talk")) && (parent.visitors[_local2].cur_wish.status == "wait")) {
parent.visitors[_local2].wishRealize();
_local3 = true;
}
_local2++;
}
if (_local3) {
talkRealize();
}
}
}
function countTalkers() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (parent.visitors[_local2].position.placename == "chairs_vip") {
_local3++;
}
_local2++;
}
return(_local3);
}
function talkRealize() {
talk = "realize";
action = "talk";
status.action = "talk";
changePose(getPose(status));
ocupied = true;
_mc.useHandCursor = false;
clearInterval(talk_timer);
counter_to_wish = target_mc.game_set.WISH_TIME_MIN + random(target_mc.game_set.WISH_TIME_DELTA);
talk_timer = setInterval(this, "count_to_talk_complete", target_mc.game_set.ONE_SECOND);
}
function count_to_talk_complete() {
if (!parent.pause) {
if (counter_to_wish <= 1) {
clearInterval(talk_timer);
talkComplete();
} else {
counter_to_wish--;
}
}
}
function talkComplete() {
parent.level_interface.addVipGoal();
status.action = "idle";
talk = "complete";
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((parent.visitors[_local2].position.placename == "chairs_vip") && (parent.visitors[_local2].cur_wish.status == "realize")) {
parent.visitors[_local2].wishComplete();
}
_local2++;
}
parent.room.setEmptyCharacterPosition(_mc._x, _mc._y, true);
moveBack();
}
function getPose(pose) {
var _local2 = character;
if (pose.state != undefined) {
status.state = pose.state;
status.action = pose.action;
status.flip = pose.flip;
}
_local2 = _local2 + ("_" + status.state);
switch (status.action) {
case "idle" :
_local2 = _local2 + "_idle";
break;
case "none" :
_local2 = _local2 + "_idle";
break;
case "talk" :
_local2 = _local2 + "_talk";
break;
case "work" :
_local2 = _local2 + "_work";
}
if (status.flip) {
_local2 = _local2 + "_flip";
}
_local2 = _local2 + "_mc";
return(_local2);
}
function changePose(pose) {
if (!_mc.drag) {
_mc.olddirection = _mc.direction;
}
_mc.direction._visible = false;
if (pose != undefined) {
_mc.direction = poses[pose];
}
_mc.direction._visible = true;
if ((status.state == "sit") && (pose != posesdef.DRAG)) {
_mc.shadow_mc._visible = false;
} else {
_mc.shadow_mc._visible = true;
}
}
function next_frame() {
if (!parent.pause) {
if (_mc.direction._currentframe < _mc.direction._totalframes) {
_mc.direction.gotoAndStop(_mc.direction._currentframe + 1);
} else {
_mc.direction.gotoAndStop(1);
}
}
}
function setDragPosition(pos, without_depth) {
if (pos != undefined) {
_mc._x = pos.x;
_mc._y = pos.y;
depth = pos.depth;
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
} else if ((without_depth == undefined) || (without_depth)) {
setDepth(depth);
}
}
function setPosition(pos, without_depth) {
position.x = pos.x;
position.y = pos.y;
position.depth = pos.depth;
position.placeaction = pos.placeaction;
position.placename = pos.placename;
setXY();
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
}
function setXY() {
_mc._x = position.x;
_mc._y = position.y;
}
function setDepth(depth) {
if (depth != undefined) {
this.depth = depth;
_mc.swapDepths(depth);
} else {
var _local2 = parent.room.findCharacterPosition(null, null, "kitchen", null);
_mc.swapDepths(_local2.depth);
}
}
function event_add_provision(obj) {
provision.push(obj);
if (status.action == "idle") {
event_next_provision();
}
}
function event_next_provision() {
if (((current = provision.pop())) != null) {
status.action = "work";
clearInterval(work_timer);
workstart = true;
work_progress = 0;
work_timer = setInterval(this, "prepare", target_mc.game_set.ONE_SECOND);
} else {
status.state = "stand";
status.action = "idle";
status.flip = false;
}
changePose(getPose(status));
}
function event_provision_finish() {
current.show();
workstart = false;
clearInterval(work_timer);
event_next_provision();
}
function prepare() {
if (!parent.pause) {
if (status.action == "idle") {
status.action = "work";
changePose(getPose());
}
if (status.action == "work") {
work_progress++;
if (work_progress == target_mc.game_set.WORK_TIME) {
event_provision_finish();
}
}
}
}
var totalframes = 15;
var framesrate = 30;
var dx = 0;
var dy = -5;
var delta_depth = 10;
}
Symbol 3896 MovieClip [__Packages.Visitor] Frame 0
class Visitor
{
var target_mc, parent, character, id, _mc, oldposition, position, cur_pose, poses, posesdef, frame_timer, action, cur_action, cur_wish, ocupied, wishes, food, themes, eat_places, wish_count, wish_timer, counter_to_wish, not_wish, free_themes, free_talk, progress_timer, x, y, depth;
function Visitor (v_target_mc, v_parent, v_id, v_character) {
target_mc = v_target_mc;
parent = v_parent;
character = v_character;
id = v_id;
_mc = target_mc.CreateEmptyMovieClip(id, target_mc.getNextHighestDepth());
_mc.cacheAsBitmap = true;
oldposition = new Object();
position = new Object();
cur_pose = new Object();
poses = new Array();
posesdef = new Object();
posesdef.DANCE = character + "_stand_dance_mc";
posesdef.DANCE_FLIP = character + "_stand_dance_flip_mc";
posesdef.DRAG = character + "_drag_mc";
posesdef.SIT_ATTENTION = character + "_sit_attention_mc";
posesdef.SIT_ATTENTION_FLIP = character + "_sit_attention_flip_mc";
posesdef.SIT_EAT = character + "_sit_eat_mc";
posesdef.SIT_EAT_FLIP = character + "_sit_eat_flip_mc";
posesdef.SIT_IDLE = character + "_sit_idle_mc";
posesdef.SIT_IDLE_FLIP = character + "_sit_idle_flip_mc";
posesdef.SIT_TALK = character + "_sit_talk_mc";
posesdef.SIT_TALK_FLIP = character + "_sit_talk_flip_mc";
posesdef.STAND_ATTENTION = character + "_stand_attention_mc";
posesdef.STAND_ATTENTION_FLIP = character + "_stand_attention_flip_mc";
posesdef.STAND_IDLE = character + "_stand_idle_mc";
posesdef.STAND_IDLE_FLIP = character + "_stand_idle_flip_mc";
posesdef.STAND_IDLE_BACK = character + "_stand_idle_back_mc";
posesdef.STAND_IDLE_BACK_FLIP = character + "_stand_idle_back_flip_mc";
posesdef.STAND_TALK = character + "_stand_talk_mc";
posesdef.STAND_TALK_FLIP = character + "_stand_talk_flip_mc";
posesdef.STAND_TALK_BACK = character + "_stand_talk_back_mc";
posesdef.STAND_TALK_BACK_FLIP = character + "_stand_talk_back_flip_mc";
_mc.attachMovie("shadow", "shadow_mc", _mc.getNextHighestDepth());
_mc.shadow_mc.cacheAsBitmap = true;
_mc.attachMovie("character_selection", "sel", _mc.getNextHighestDepth());
_mc.sel.cacheAsBitmap = true;
_mc.sel._visible = false;
for (var _local2 in posesdef) {
poses[posesdef[_local2]] = _mc.attachMovie(posesdef[_local2], posesdef[_local2], _mc.getNextHighestDepth(), {_x:0, _y:0});
poses[posesdef[_local2]].cacheAsBitmap = true;
poses[posesdef[_local2]]._visible = false;
poses[posesdef[_local2]].gotoAndStop(1);
}
_mc.attachMovie("hitarea", "hitarea", _mc.getNextHighestDepth());
_mc.hitArea = _mc.hitarea;
_mc.hitarea._visible = false;
_mc.attachMovie("wish_mc", "wish_mc", _mc.getNextHighestDepth(), {_x:_mc._x, _y:_mc._y - 120});
_mc.wish_mc.icons.gotoAndStop(1);
_mc.wish_mc.progress.gotoAndStop(1);
_mc.wish_mc._visible = false;
if (target_mc.game_set.game_version == target_mc.game_set.GAME_VERSION_DEBUG_CHARACTERS) {
_mc.attachMovie("center", "center", _mc.getNextHighestDepth());
}
_mc.olddirection = (_mc.direction = poses[posesdef.STAND_IDLE]);
poses[posesdef.STAND_IDLE]._visible = true;
frame_timer = setInterval(this, "next_frame", Math.round(1000 / target_mc.game_set.FRAME_RATE));
action = "none";
_mc.papa = this;
_mc.drag = false;
cur_action = "idle";
cur_wish.status = "wait";
cur_wish.about = "none";
ocupied = true;
_mc.useHandCursor = false;
_mc.onRollOver = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.character == this.papa.character) {
if (!this.papa.ocupied) {
this.sel._visible = true;
}
if ((this.papa.cur_wish.wish == "eat") && (this.papa.cur_action == "attention")) {
this.sel._visible = true;
}
}
} else {
if (!this.papa.ocupied) {
this.sel._visible = true;
}
if ((this.papa.cur_wish.wish == "eat") && (this.papa.cur_action == "attention")) {
this.sel._visible = true;
}
}
}
};
_mc.onRollOut = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.character == this.papa.character) {
this.sel._visible = false;
}
} else {
this.sel._visible = false;
}
}
};
_mc.onPress = function () {
if (!this.papa.parent.pause) {
if (this.papa.parent.tutor) {
if (this.papa.parent.tutorManager.current.complete.character == this.papa.character) {
if (!this.papa.ocupied) {
this.papa.target_mc.drag();
this.drag = true;
this.papa.saveOldPosition();
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.direction.gotoAndPlay(1);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, this.papa.parent.tutorManager.current.complete.place, null);
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
this.papa.setPosition(tmp);
this.papa.changePose(this.papa.getPose(tmp, false));
}
if ((tmp.stand == undefined) && this.posefinded) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
} else if (!this.papa.ocupied) {
this.papa.target_mc.drag();
this.drag = true;
this.papa.saveOldPosition();
this.direction._visible = false;
this.direction = this.papa.poses[this.papa.posesdef.DRAG];
this.direction._visible = true;
this.direction.gotoAndPlay(1);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
this.dx = _xmouse - this._x;
this.dy = _ymouse - this._y;
this.posefinded = false;
this.startDrag(false);
this.onMouseMove = function () {
if (!this.papa.parent.pause) {
delete tmp;
if (this.papa.cur_wish.wish_sit) {
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, this.papa.cur_wish.about, null);
} else {
var tmp = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, null, this.papa.cur_wish.wish);
}
if (tmp.stand != undefined) {
this.posefinded = true;
this.stopDrag();
this.papa.setPosition(tmp);
this.papa.changePose(this.papa.getPose(tmp, false));
}
if ((tmp.stand == undefined) && (this.posefinded)) {
this.posefinded = false;
this.papa.changePose(this.papa.posesdef.DRAG);
this._x = _xmouse - this.dx;
this._y = _ymouse - this.dy;
this.startDrag(false);
this.swapDepths(this.papa.target_mc.game_set.DRAG_DEPTH);
}
}
};
}
}
};
_mc.onRelease = function () {
if (!this.papa.parent.pause) {
delete this.onMouseMove;
if ((!this.papa.ocupied) && (this.drag)) {
if (this.papa.parent.tutor && ((this.papa.cur_wish.wish == "talk") || (this.papa.cur_wish.wish == "dance"))) {
if ((this.papa.parent.tutorManager.current.complete.character == this.papa.character) && (this.papa.position.placename == this.papa.parent.tutorManager.current.complete.place)) {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.parent.tutorManager.step_complete();
this.papa.setPosition(this.papa.position);
if (this.papa.cur_wish.wish_sit) {
var _local2 = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, this.papa.cur_wish.about, null);
} else {
var _local2 = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, null, this.papa.cur_wish.wish);
}
this.papa.changePose(this.papa.getPose(_local2, false));
this.papa.parent.room.setEmptyCharacterPosition(this.papa.oldposition.x, this.papa.oldposition.y, true);
this.papa.parent.room.setEmptyCharacterPosition(this.papa.position.x, this.papa.position.y, false);
this.papa.checkWishRealize();
}
}
} else {
this.drag = false;
this.stopDrag();
if (!this.posefinded) {
this.papa.moveBack();
this.papa.target_mc.bad_vip_talk();
} else {
this.papa.setPosition(this.papa.position);
if (this.papa.cur_wish.wish_sit) {
var _local2 = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, this.papa.cur_wish.about, null);
} else {
var _local2 = this.papa.parent.room.findCharacterPosition(_xmouse - this.dx, _ymouse - this.dy, null, this.papa.cur_wish.wish);
}
this.papa.changePose(this.papa.getPose(_local2, false));
this.papa.parent.room.setEmptyCharacterPosition(this.papa.oldposition.x, this.papa.oldposition.y, true);
this.papa.parent.room.setEmptyCharacterPosition(this.papa.position.x, this.papa.position.y, false);
this.papa.checkWishRealize();
}
}
} else if (this.papa.parent.tutor) {
if ((this.papa.parent.tutorManager.current.complete.action == "clickcharacter") && (this.papa.parent.tutorManager.current.complete.character == this.papa.character)) {
if (((this.papa.cur_wish.wish == "eat") && (this.papa.cur_action == "attention")) && (this.papa.position.placename != "chairs_vip")) {
this.papa.parent.addCheckPointTarget(this.papa, "visitor", this.papa.cur_wish.about, this.papa.position, this.papa.parent.room.getCharacterCheckPoint(this.papa.position.x, this.papa.position.y), this.papa.position.placename, false, this.getDepth());
}
}
} else if (((this.papa.cur_wish.wish == "eat") && (this.papa.cur_action == "attention")) && (this.papa.position.placename != "chairs_vip")) {
this.papa.parent.addCheckPointTarget(this.papa, "visitor", this.papa.cur_wish.about, this.papa.position, this.papa.parent.room.getCharacterCheckPoint(this.papa.position.x, this.papa.position.y), this.papa.position.placename, false, this.getDepth());
}
}
};
_mc.onReleaseOutside = function () {
if (!this.papa.parent.pause) {
this.sel._visible = false;
this.onRelease();
}
};
}
function remove() {
target_mc.eventManager.removeListener(this);
_mc.removeMovieClip();
}
function removeEvents() {
delete _mc.onPress;
delete _mc.onMouseMove;
delete _mc.onRelease;
delete _mc.onReleaseOutside;
delete _mc.onRollOver;
delete _mc.onRollOut;
}
function generateWishes(action_time) {
wishes = new Array();
food = new Array();
themes = new Array();
eat_places = new Array();
cur_wish = new Object();
cur_action = position.placeaction;
cur_wish.wish = position.placeaction;
cur_wish.status = "idle";
cur_wish.about = "none";
cur_wish.wish_sit = false;
changePose(getPose());
wish_count = 0;
wishes = ["eat", "talk", "dance", "eat", "talk", "dance", "eat", "talk", "dance", "eat", "talk", "dance"];
food = ["cake", "salad", "chicken", "wine", "martini", "cocktail"];
themes = parent.level_set.themes;
eat_places = parent.level_set.eat_places;
mixWishes();
ocupied = true;
_mc.useHandCursor = false;
_mc.wish_mc._visible = false;
clearInterval(wish_timer);
counter_to_wish = action_time;
if (action_time > 0) {
not_wish = true;
} else {
not_wish = false;
}
free_themes = new Array();
free_talk = true;
wish_timer = setInterval(this, "count_to_wish", target_mc.game_set.ONE_SECOND + (random(10) * 10));
}
function count_to_wish() {
if (!parent.pause) {
if (!parent.tutor) {
if (counter_to_wish <= 1) {
clearInterval(wish_timer);
if (not_wish) {
not_wish = false;
wishComplete();
} else {
generateWish();
}
} else {
counter_to_wish--;
}
}
}
}
function mixWishes() {
var _local4 = 0;
while (_local4 < wishes.length) {
var _local3 = random(wishes.length);
var _local2 = random(wishes.length);
var _local5 = wishes[_local3];
wishes[_local3] = wishes[_local2];
wishes[_local2] = _local5;
_local4++;
}
}
function getWish() {
if (wish_count == wishes.length) {
wish_count = 0;
}
return(wishes[wish_count++]);
}
function newWish() {
ocupied = true;
_mc.useHandCursor = false;
_mc.wish_mc._visible = false;
cur_action = "idle";
if (position.placename == "dance_floor") {
var _local2 = parent.room.findCharacterPosition(null, null, "dance_rest", null);
if (_local2 != null) {
saveOldPosition();
setPosition(_local2);
parent.room.setEmptyCharacterPosition(oldposition.x, oldposition.y, true);
parent.room.setEmptyCharacterPosition(position.x, position.y, false);
}
}
changePose(getPose());
cur_wish.status = "wait";
cur_wish.about = "none";
clearInterval(wish_timer);
counter_to_wish = target_mc.game_set.IDLE_TIME;
wish_timer = setInterval(this, "count_to_wish", target_mc.game_set.ONE_SECOND + (random(10) * 10));
}
function setWishComplete(obj) {
if (cur_wish.wish == "eat") {
var _local2 = parent.room.getCharacterCheckPoint(position.x, position.y);
switch (_local2) {
case "character_0" :
_local2 = "provision_0";
break;
case "character_1" :
_local2 = "provision_1";
break;
case "character_2" :
_local2 = "provision_2";
break;
case "character_3" :
_local2 = "provision_3";
break;
case "character_4" :
_local2 = "provision_4";
}
var _local3 = parent.room.getProvisionByPlaceAndCheckPoint(position.placename, _local2);
var _local4 = _local3.get_props();
_local3.set_props(_local4.place, cur_wish.about, false, true, _local2, _local4.position, _local4.depth);
_local3.show();
cur_action = "idle";
changePose(getPose());
}
}
function setWish(obj) {
target_mc.visitor_wish();
ocupied = false;
_mc.useHandCursor = true;
switch (obj.wish) {
case "sit" :
cur_wish.wish = "eat";
cur_wish.status = "wait";
cur_wish.wish_sit = true;
cur_wish.about = obj.place;
break;
case "eat" :
cur_wish.wish = "eat";
cur_wish.status = "wait";
cur_wish.wish_sit = false;
cur_wish.about = obj.provision;
ocupied = true;
break;
case "talk" :
cur_wish.wish = "talk";
cur_wish.status = "wait";
cur_wish.wish_sit = false;
cur_wish.about = obj.about;
break;
case "dance" :
cur_wish.wish = "dance";
cur_wish.status = "wait";
cur_wish.wish_sit = false;
cur_wish.about = "dance";
}
cur_action = "attention";
changePose(getPose());
_mc.wish_mc._visible = true;
_mc.wish_mc.icons.gotoAndStop(cur_wish.about);
_mc.wish_mc.progress.gotoAndStop(1);
if (obj.use_progress) {
clearInterval(progress_timer);
progress_timer = setInterval(this, "go_progress", target_mc.game_set.ONE_SECOND);
}
}
function generateWish() {
target_mc.visitor_wish();
clearInterval(wish_timer);
var _local3;
ocupied = false;
_mc.useHandCursor = true;
checkTalkThemes();
if (((cur_wish.wish == "eat") && (cur_wish.status == "wait")) && (position.placeaction == "eat")) {
cur_wish.status = "wait";
cur_wish.wish_sit = false;
cur_wish.about = findFood();
ocupied = true;
_mc.useHandCursor = true;
} else {
_local3 = checkTalk();
if (_local3 != null) {
cur_wish.wish = "talk";
cur_wish.status = "wait";
cur_wish.wish_sit = false;
cur_wish.about = _local3;
} else {
selectWish();
}
}
if (position.placename == "dance_floor") {
var _local2 = parent.room.findCharacterPosition(null, null, "dance_rest", null);
if (_local2 != null) {
saveOldPosition();
setPosition(_local2);
changePose(getPose(_local2, false));
parent.room.setEmptyCharacterPosition(oldposition.x, oldposition.y, true);
parent.room.setEmptyCharacterPosition(position.x, position.y, false);
}
}
cur_action = "attention";
changePose(getPose());
_mc.wish_mc._visible = true;
_mc.wish_mc.icons.gotoAndStop(cur_wish.about);
_mc.wish_mc.progress.gotoAndStop(1);
clearInterval(progress_timer);
progress_timer = setInterval(this, "go_progress", target_mc.game_set.ONE_SECOND);
}
function getProgress() {
var _local2 = ((_mc.wish_mc.progress._totalframes - _mc.wish_mc.progress._currentframe) / (_mc.wish_mc.progress._totalframes - 1)) * 100;
if (_local2 >= target_mc.game_set.MAX_SCORE_PERCENT) {
return(target_mc.game_set.MAX_SCORE);
}
return(Math.round((_local2 / target_mc.game_set.MAX_SCORE_PERCENT) * target_mc.game_set.MAX_SCORE));
}
function giveMoney() {
var _local2 = getProgress();
if (_local2 > 0) {
target_mc.visitor_good_mood();
parent.text_manager.addText("$" + _local2, 20, _mc._x - 40, _mc._y - 40, 80, 30, target_mc.game_set.money_format, 3);
parent.addScore(_local2);
}
}
function go_progress() {
if (!parent.pause) {
if (_mc.wish_mc.progress._currentframe < _mc.wish_mc.progress._totalframes) {
_mc.wish_mc.progress.nextFrame();
} else {
clearInterval(progress_timer);
}
}
}
function findFood() {
var _local2 = new Array();
var _local4 = 0;
var _local3 = 0;
while (_local3 < food.length) {
_local2[_local3] = parent.room.findFullProvision(food[_local3]);
if (_local2[_local3]) {
_local2[_local3] = !anybodyWishProvision(food[_local3]);
}
if (_local2[_local3]) {
_local4++;
}
_local3++;
}
if (_local4 == 0) {
return(food[random(food.length)]);
}
_local3 = random(food.length);
while (!_local2[_local3]) {
_local3++;
if (_local3 >= food.length) {
_local3 = 0;
}
}
return(food[_local3]);
}
function checkTalkThemes() {
var _local3 = 0;
var _local2 = 0;
while (_local2 < themes.length) {
free_themes[_local2] = checkTalkTheme(themes[_local2]);
if (free_themes[_local2]) {
_local3++;
}
_local2++;
}
if (_local3 == 0) {
free_talk = false;
} else {
free_talk = true;
}
}
function checkTalkTheme(theme) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2] != this) && (parent.visitors[_local2].position.placename == position.placename)) && (parent.visitors[_local2].cur_wish.about == theme)) {
return(false);
}
_local2++;
}
return(true);
}
function selectWish() {
do {
cur_wish.wish = getWish();
} while (((cur_wish.wish == "talk") && (!free_talk)) || ((cur_wish.wish == "dance") && ((position.placename == "dance_rest") || (position.placename == "dance_floor"))));
cur_wish.status = "wait";
switch (cur_wish.wish) {
case "eat" :
if (position.placeaction == "eat") {
cur_wish.about = findFood();
cur_wish.wish_sit = false;
ocupied = true;
_mc.useHandCursor = false;
} else {
var _local3 = 0;
do {
cur_wish.about = eat_places[random(eat_places.length)];
_local3++;
} while ((parent.room.countCharacterPlaces(cur_wish.about) <= countEaters(cur_wish.about)) && (_local3 <= 5));
if (_local3 > 5) {
selectWish();
} else {
cur_wish.wish_sit = true;
}
}
break;
case "talk" :
var _local2 = random(themes.length);
while (!free_themes[_local2]) {
_local2++;
if (_local2 >= themes.length) {
_local2 = 0;
}
}
cur_wish.about = themes[_local2];
cur_wish.wish_sit = false;
break;
default :
cur_wish.about = cur_wish.wish;
cur_wish.wish_sit = false;
}
}
function isWaitTalk(about) {
if (((cur_wish.wish == "talk") && (cur_wish.status == "wait")) && (cur_wish.about == about)) {
return(true);
}
return(null);
}
function checkTalk() {
var _local5 = 0;
var _local3 = 0;
while (_local3 < themes.length) {
var _local4 = 0;
if (free_themes[_local3]) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2] != this) && (parent.visitors[_local2].isWaitTalk(themes[_local3]))) && (parent.visitors[_local2].position.placename != position.placename)) {
_local5 = _local3;
_local4++;
}
_local2++;
}
if (_local4 == 1) {
return(themes[_local5]);
}
}
_local3++;
}
return(null);
}
function anybodyWishProvision(name) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2] != this) && (parent.visitors[_local2].cur_wish.about == name)) && (parent.visitors[_local2].cur_action == "attention")) {
return(true);
}
_local2++;
}
return(false);
}
function countEaters(about) {
var _local3 = 0;
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2] != this) && (parent.visitors[_local2].cur_wish.about == about)) && (parent.visitors[_local2].cur_action == "attention")) {
_local3++;
}
_local2++;
}
return(_local3);
}
function countTalkers(place, about) {
var _local3 = 0;
if (place != "chairs_vip") {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((parent.visitors[_local2] != this) && (parent.visitors[_local2].cur_wish.about == about)) && (parent.visitors[_local2].position.placename == place)) {
_local3++;
}
_local2++;
}
} else {
if (parent.woman.position.placename == place) {
_local3++;
}
if (parent.man.position.placename == place) {
_local3++;
}
if (parent.barman.position.placename == place) {
_local3++;
}
if (parent.cock.position.placename == place) {
_local3++;
}
}
return(_local3);
}
function checkWishRealize() {
if (cur_wish.wish == "talk") {
if (countTalkers(position.placename, cur_wish.about) > 0) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if ((((parent.visitors[_local2] != this) && (parent.visitors[_local2].cur_wish.about == cur_wish.about)) && (parent.visitors[_local2].position.placename == position.placename)) && (parent.visitors[_local2].cur_wish.status == "wait")) {
parent.visitors[_local2].wishRealize();
}
_local2++;
}
if (parent.woman.position.placename == position.placename) {
parent.woman.talkRealize();
} else if (parent.barman.position.placename == position.placename) {
parent.barman.talkRealize();
} else if (parent.man.position.placename == position.placename) {
parent.man.talkRealize();
} else if (parent.cock.position.placename == position.placename) {
parent.cock.talkRealize();
}
wishRealize();
parent.room.findPlaceByName(position.placename).showTalkTheme();
}
} else {
wishRealize();
}
}
function wishRealize() {
if (parent.tutor) {
if (parent.tutorManager.current.complete.character == character) {
parent.tutorManager.step_complete();
giveMoney();
if (cur_wish.wish_sit) {
cur_wish.wish_sit = false;
_mc.wish_mc._visible = false;
ocupied = true;
} else {
switch (cur_wish.wish) {
case "eat" :
cur_wish.status = "realize";
cur_action = "eat";
break;
case "talk" :
cur_wish.status = "realize";
cur_action = "talk";
parent.tutorManager.completetalk = true;
parent.tutorManager.place = position.place;
parent.tutorManager.about = cur_wish.about;
break;
case "dance" :
cur_wish.status = "realize";
cur_action = "dance";
break;
default :
cur_action = "idle";
}
_mc.wish_mc._visible = false;
var _local2 = parent.room.findCharacterPosition(position.x, position.y, null, cur_wish.wish, false);
changePose(getPose(_local2));
ocupied = true;
_mc.useHandCursor = false;
}
} else if (cur_wish.wish == "talk") {
giveMoney();
if (cur_wish.wish_sit) {
cur_wish.wish_sit = false;
_mc.wish_mc._visible = false;
ocupied = true;
} else {
switch (cur_wish.wish) {
case "eat" :
cur_wish.status = "realize";
cur_action = "eat";
break;
case "talk" :
cur_wish.status = "realize";
cur_action = "talk";
break;
case "dance" :
cur_wish.status = "realize";
cur_action = "dance";
break;
default :
cur_action = "idle";
}
_mc.wish_mc._visible = false;
var _local2 = parent.room.findCharacterPosition(position.x, position.y, null, cur_wish.wish, false);
changePose(getPose(_local2));
ocupied = true;
_mc.useHandCursor = false;
}
}
} else {
giveMoney();
if (cur_wish.wish_sit) {
cur_wish.wish_sit = false;
newWish();
} else {
switch (cur_wish.wish) {
case "eat" :
cur_wish.status = "realize";
cur_action = "eat";
break;
case "talk" :
cur_wish.status = "realize";
cur_action = "talk";
break;
case "dance" :
cur_wish.status = "realize";
cur_action = "dance";
break;
default :
cur_action = "idle";
}
_mc.wish_mc._visible = false;
var _local2 = parent.room.findCharacterPosition(position.x, position.y, null, cur_wish.wish, false);
changePose(getPose(_local2));
ocupied = true;
_mc.useHandCursor = false;
clearInterval(wish_timer);
counter_to_wish = target_mc.game_set.WISH_TIME_MIN + random(target_mc.game_set.WISH_TIME_DELTA);
wish_timer = setInterval(this, "count_to_wish_complete", target_mc.game_set.ONE_SECOND + (random(10) * 10));
}
}
}
function count_to_wish_complete() {
if (!parent.pause) {
if (counter_to_wish <= 1) {
clearInterval(wish_timer);
wishComplete();
} else {
counter_to_wish--;
}
}
}
function wishComplete() {
clearInterval(wish_timer);
cur_action = "idle";
cur_wish.status = "complete";
if ((cur_wish.wish == "dance") || (position.placename == "dance_floor")) {
var _local4 = parent.room.findCharacterPosition(null, null, "dance_rest", null);
if (_local4 != null) {
saveOldPosition();
setPosition(_local4);
changePose(getPose(_local4, false));
parent.room.setEmptyCharacterPosition(oldposition.x, oldposition.y, true);
parent.room.setEmptyCharacterPosition(position.x, position.y, false);
}
}
if (cur_wish.wish == "talk") {
endTalk(position.placename, cur_wish.about);
parent.room.findPlaceByName(position.placename).showTalkTheme();
}
if (cur_wish.wish == "eat") {
var _local2 = parent.room.getCharacterCheckPoint(position.x, position.y);
switch (_local2) {
case "character_0" :
_local2 = "provision_0";
break;
case "character_1" :
_local2 = "provision_1";
break;
case "character_2" :
_local2 = "provision_2";
break;
case "character_3" :
_local2 = "provision_3";
break;
case "character_4" :
_local2 = "provision_4";
}
var _local3 = parent.room.getProvisionByPlaceAndCheckPoint(position.placename, _local2);
var _local5 = _local3.get_props();
_local3.set_props(_local5.place, cur_wish.about, false, true, _local2, _local5.position, _local5.depth);
_local3.show();
}
cur_wish.wish = "none";
cur_wish.about = "none";
newWish();
}
function endTalk(place, about) {
var _local2 = 0;
while (_local2 < parent.visit_count) {
if (((((parent.visitors[_local2] != this) && (parent.visitors[_local2].position.placename == place)) && (parent.visitors[_local2].cur_wish.wish == "talk")) && (parent.visitors[_local2].cur_wish.about == about)) && (parent.visitors[_local2].cur_wish.status == "realize")) {
parent.visitors[_local2].wishComplete();
}
_local2++;
}
}
function getPose(pose, useaction) {
var _local2 = character;
if (pose.stand != undefined) {
cur_pose.stand = pose.stand;
cur_pose.back = pose.back;
cur_pose.flip = pose.flip;
}
if (cur_pose.stand) {
_local2 = _local2 + "_stand";
} else {
_local2 = _local2 + "_sit";
}
if (useaction || (useaction == undefined)) {
switch (cur_action) {
case "idle" :
_local2 = _local2 + "_idle";
break;
case "none" :
_local2 = _local2 + "_idle";
break;
case "eat" :
_local2 = _local2 + "_eat";
break;
case "talk" :
_local2 = _local2 + "_talk";
break;
case "dance" :
_local2 = _local2 + "_dance";
break;
case "attention" :
_local2 = _local2 + "_attention";
}
if (cur_pose.stand && (cur_action == "attention")) {
cur_pose.back = false;
cur_pose.flip = false;
}
} else {
_local2 = _local2 + "_idle";
}
if (cur_pose.back) {
_local2 = _local2 + "_back";
}
if (cur_pose.flip) {
_local2 = _local2 + "_flip";
}
_local2 = _local2 + "_mc";
return(_local2);
}
function changePose(pose) {
if (!_mc.drag) {
_mc.olddirection = _mc.direction;
}
if ((!cur_pose.stand) && (pose != posesdef.DRAG)) {
_mc.shadow_mc._visible = false;
} else {
_mc.shadow_mc._visible = true;
}
_mc.direction._visible = false;
if (pose != undefined) {
_mc.direction = poses[pose];
}
_mc.direction._visible = true;
}
function next_frame() {
if (!parent.pause) {
if (_mc.direction._currentframe < _mc.direction._totalframes) {
_mc.direction.gotoAndStop(_mc.direction._currentframe + 1);
} else {
_mc.direction.gotoAndStop(1);
}
}
}
function saveOldPosition() {
oldposition.x = position.x;
oldposition.y = position.y;
oldposition.depth = position.depth;
oldposition.placeaction = position.placeaction;
oldposition.placename = position.placename;
}
function setPosition(pos, without_depth) {
position.x = pos.x;
position.y = pos.y;
position.depth = pos.depth;
position.placeaction = pos.placeaction;
position.placename = pos.placename;
setXY();
if ((without_depth == undefined) || (without_depth)) {
setDepth(pos.depth);
}
}
function moveBack() {
position.x = oldposition.x;
position.y = oldposition.y;
position.depth = oldposition.depth;
position.placeaction = oldposition.placeaction;
position.placename = oldposition.placename;
setXY();
setDepth(position.depth);
_mc.direction._visible = false;
_mc.direction = _mc.olddirection;
_mc.direction._visible = true;
}
function setXY() {
x = position.x;
y = position.y;
_mc._x = x;
_mc._y = y;
}
function setDepth(depth) {
if (depth != undefined) {
this.depth = depth;
_mc.swapDepths(depth);
} else {
this.depth = target_mc.game_set.DRAG_DEPTH;
_mc.swapDepths(depth);
}
}
function idle() {
}
var totalframes = 15;
var framesrate = 30;
var dx = 0;
var dy = 0;
var delta_depth = 10;
}
Symbol 3897 MovieClip [__Packages.StartMenu] Frame 0
class StartMenu extends UserMenu
{
var depth, startdepth, addSprite, addCaption, target_mc, addButton, addLevelRadioButton;
function StartMenu (_target_mc, _depth) {
super(_target_mc, _depth);
}
function show() {
depth = startdepth;
addSprite({id:"map", newid:"map"}, {});
addSprite({id:"greeting", newid:"greeting"}, {_x:380, _y:50});
addSprite({id:"logo", newid:"logo"}, {_x:300, _y:110});
addCaption({newid:"capt0", text:target_mc.game_set.Labels[target_mc.game_set.LANG].select_level, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:410, _y:55, _width:210, _height:40});
addButton({id:"button_small_mc", newid:"new_game1", funct:"go_game"}, {_x:450, _y:440});
addCaption({newid:"capt1", text:target_mc.game_set.Labels[target_mc.game_set.LANG].play, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:470, _y:446, _width:160, _height:40});
addButton({id:"button_small_mc", newid:"back1", funct:"go_start_main"}, {_x:0, _y:440});
addCaption({newid:"capt2", text:target_mc.game_set.Labels[target_mc.game_set.LANG].back, format:target_mc.game_set.button_format, embed:true, useShadow:true}, {_x:20, _y:446, _width:160, _height:40});
var _local3 = 0;
while (_local3 <= target_mc.sets.data.max_stage) {
var _local2 = 0;
while (_local2 < target_mc.game_set.COL_LEVELS) {
var _local5 = false;
var _local4 = true;
if ((_local3 == target_mc.sets.data.current_stage) && (_local2 == target_mc.sets.data.current_level)) {
_local5 = true;
}
if (_local3 < target_mc.sets.data.max_stage) {
_local4 = false;
} else if (_local2 <= target_mc.sets.data.max_level) {
_local4 = false;
}
addLevelRadioButton({num_s:_local3, num_l:_local2, id:"dot_mc", newid:(("dot_mc_" + _local3) + "_") + _local2, checked:_local5, locked:_local4, goal:target_mc.sets.data[("goals" + _local3) + _local2], flip:target_mc.game_set.levels[_local3][_local2].car.flip, funct:"select_level"}, {_x:target_mc.game_set.levels[_local3][_local2].car.x, _y:target_mc.game_set.levels[_local3][_local2].car.y});
_local2++;
}
_local3++;
}
addSprite({id:"firework", newid:"firework"}, target_mc.game_set.fireworks[target_mc.sets.data.current_stage]);
}
}