Section 1
//Color (fl.motion.Color)
package fl.motion {
import flash.geom.*;
import flash.display.*;
public class Color extends ColorTransform {
private var _tintColor:Number;// = 0
private var _tintMultiplier:Number;// = 0
public function Color(_arg1:Number=1, _arg2:Number=1, _arg3:Number=1, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0, _arg7:Number=0, _arg8:Number=0){
super(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8);
}
public function get brightness():Number{
return ((this.redOffset) ? (1 - this.redMultiplier) : (this.redMultiplier - 1));
}
public function set brightness(_arg1:Number):void{
if (_arg1 > 1){
_arg1 = 1;
} else {
if (_arg1 < -1){
_arg1 = -1;
};
};
var _local2:Number = (1 - Math.abs(_arg1));
var _local3:Number = 0;
if (_arg1 > 0){
_local3 = (_arg1 * 0xFF);
};
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = _local2));
this.redOffset = (this.greenOffset = (this.blueOffset = _local3));
}
public function setTint(_arg1:uint, _arg2:Number):void{
this._tintColor = _arg1;
this._tintMultiplier = _arg2;
this.redMultiplier = (this.greenMultiplier = (this.blueMultiplier = (1 - _arg2)));
var _local3:uint = ((_arg1 >> 16) & 0xFF);
var _local4:uint = ((_arg1 >> 8) & 0xFF);
var _local5:uint = (_arg1 & 0xFF);
this.redOffset = Math.round((_local3 * _arg2));
this.greenOffset = Math.round((_local4 * _arg2));
this.blueOffset = Math.round((_local5 * _arg2));
}
public function get tintColor():uint{
return (this._tintColor);
}
public function set tintColor(_arg1:uint):void{
this.setTint(_arg1, this.tintMultiplier);
}
private function deriveTintColor():uint{
var _local1:Number = (1 / this.tintMultiplier);
var _local2:uint = Math.round((this.redOffset * _local1));
var _local3:uint = Math.round((this.greenOffset * _local1));
var _local4:uint = Math.round((this.blueOffset * _local1));
var _local5:uint = (((_local2 << 16) | (_local3 << 8)) | _local4);
return (_local5);
}
public function get tintMultiplier():Number{
return (this._tintMultiplier);
}
public function set tintMultiplier(_arg1:Number):void{
this.setTint(this.tintColor, _arg1);
}
private function parseXML(_arg1:XML=null):Color{
var _local3:XML;
var _local4:String;
var _local5:uint;
if (!_arg1){
return (this);
};
var _local2:XML = _arg1.elements()[0];
if (!_local2){
return (this);
};
for each (_local3 in _local2.attributes()) {
_local4 = _local3.localName();
if (_local4 == "tintColor"){
_local5 = (Number(_local3.toString()) as uint);
this.tintColor = _local5;
} else {
this[_local4] = Number(_local3.toString());
};
};
return (this);
}
public static function fromXML(_arg1:XML):Color{
return (Color(new (Color).parseXML(_arg1)));
}
public static function interpolateTransform(_arg1:ColorTransform, _arg2:ColorTransform, _arg3:Number):ColorTransform{
var _local4:Number = (1 - _arg3);
var _local5:ColorTransform = new ColorTransform(((_arg1.redMultiplier * _local4) + (_arg2.redMultiplier * _arg3)), ((_arg1.greenMultiplier * _local4) + (_arg2.greenMultiplier * _arg3)), ((_arg1.blueMultiplier * _local4) + (_arg2.blueMultiplier * _arg3)), ((_arg1.alphaMultiplier * _local4) + (_arg2.alphaMultiplier * _arg3)), ((_arg1.redOffset * _local4) + (_arg2.redOffset * _arg3)), ((_arg1.greenOffset * _local4) + (_arg2.greenOffset * _arg3)), ((_arg1.blueOffset * _local4) + (_arg2.blueOffset * _arg3)), ((_arg1.alphaOffset * _local4) + (_arg2.alphaOffset * _arg3)));
return (_local5);
}
public static function interpolateColor(_arg1:uint, _arg2:uint, _arg3:Number):uint{
var _local4:Number = (1 - _arg3);
var _local5:uint = ((_arg1 >> 24) & 0xFF);
var _local6:uint = ((_arg1 >> 16) & 0xFF);
var _local7:uint = ((_arg1 >> 8) & 0xFF);
var _local8:uint = (_arg1 & 0xFF);
var _local9:uint = ((_arg2 >> 24) & 0xFF);
var _local10:uint = ((_arg2 >> 16) & 0xFF);
var _local11:uint = ((_arg2 >> 8) & 0xFF);
var _local12:uint = (_arg2 & 0xFF);
var _local13:uint = ((_local5 * _local4) + (_local9 * _arg3));
var _local14:uint = ((_local6 * _local4) + (_local10 * _arg3));
var _local15:uint = ((_local7 * _local4) + (_local11 * _arg3));
var _local16:uint = ((_local8 * _local4) + (_local12 * _arg3));
var _local17:uint = ((((_local13 << 24) | (_local14 << 16)) | (_local15 << 8)) | _local16);
return (_local17);
}
}
}//package fl.motion
Section 2
//PropTween (greensock.core.PropTween)
package greensock.core {
public final class PropTween {
public var target:Object;
public var property:String;
public var start:Number;
public var change:Number;
public var name:String;
public var priority:int;
public var isPlugin:Boolean;
public var nextNode:PropTween;
public var prevNode:PropTween;
public function PropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number, _arg5:String, _arg6:Boolean, _arg7:PropTween=null, _arg8:int=0){
this.target = _arg1;
this.property = _arg2;
this.start = _arg3;
this.change = _arg4;
this.name = _arg5;
this.isPlugin = _arg6;
if (_arg7){
_arg7.prevNode = this;
this.nextNode = _arg7;
};
this.priority = _arg8;
}
}
}//package greensock.core
Section 3
//SimpleTimeline (greensock.core.SimpleTimeline)
package greensock.core {
public class SimpleTimeline extends TweenCore {
protected var _firstChild:TweenCore;
protected var _lastChild:TweenCore;
public var autoRemoveChildren:Boolean;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
public function insert(_arg1:TweenCore, _arg2=0):TweenCore{
if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_arg1.cachedPaused){
_arg1.cachedPauseTime = (_arg1.cachedStartTime + ((this.rawTime - _arg1.cachedStartTime) / _arg1.cachedTimeScale));
};
if (_lastChild){
_lastChild.nextNode = _arg1;
} else {
_firstChild = _arg1;
};
_arg1.prevNode = _lastChild;
_lastChild = _arg1;
_arg1.nextNode = null;
_arg1.cachedOrphan = false;
return (_arg1);
}
public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_lastChild == _arg1){
_lastChild = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_firstChild == _arg1){
_firstChild = _arg1.nextNode;
};
};
_arg1.cachedOrphan = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local5:Number;
var _local6:TweenCore;
var _local4:TweenCore = _firstChild;
this.cachedTotalTime = _arg1;
this.cachedTime = _arg1;
while (_local4) {
_local6 = _local4.nextNode;
if (((_local4.active) || ((((((_arg1 >= _local4.cachedStartTime)) && (!(_local4.cachedPaused)))) && (!(_local4.gc)))))){
if (!_local4.cachedReversed){
_local4.renderTime(((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local4.cacheIsDirty) ? _local4.totalDuration : _local4.cachedTotalDuration;
_local4.renderTime((_local5 - ((_arg1 - _local4.cachedStartTime) * _local4.cachedTimeScale)), _arg2, false);
};
};
_local4 = _local6;
};
}
public function get rawTime():Number{
return (this.cachedTotalTime);
}
}
}//package greensock.core
Section 4
//TweenCore (greensock.core.TweenCore)
package greensock.core {
import greensock.*;
public class TweenCore {
protected var _delay:Number;
protected var _hasUpdate:Boolean;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var active:Boolean;
public var gc:Boolean;
public var initted:Boolean;
public var timeline:SimpleTimeline;
public var cachedStartTime:Number;
public var cachedTime:Number;
public var cachedTotalTime:Number;
public var cachedDuration:Number;
public var cachedTotalDuration:Number;
public var cachedTimeScale:Number;
public var cachedPauseTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
public var prevNode:TweenCore;
public var cachedOrphan:Boolean;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var data;
public static const version:Number = 1.64;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2)!=null) ? _arg2 : {};
if (this.vars.isGSVars){
this.vars = this.vars.vars;
};
this.cachedDuration = (this.cachedTotalDuration = _arg1);
_delay = (this.vars.delay) ? Number(this.vars.delay) : 0;
this.cachedTimeScale = (this.vars.timeScale) ? Number(this.vars.timeScale) : 1;
this.active = Boolean((((((_arg1 == 0)) && ((_delay == 0)))) && (!((this.vars.immediateRender == false)))));
this.cachedTotalTime = (this.cachedTime = 0);
this.data = this.vars.data;
if (!_classInitted){
if (isNaN(TweenLite.rootFrame)){
TweenLite.initClass();
_classInitted = true;
} else {
return;
};
};
var _local3:SimpleTimeline = ((this.vars.timeline is SimpleTimeline)) ? this.vars.timeline : (this.vars.useFrames) ? TweenLite.rootFramesTimeline : TweenLite.rootTimeline;
_local3.insert(this, _local3.cachedTotalTime);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function pause():void{
this.paused = true;
}
public function resume():void{
this.paused = false;
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function reverse(_arg1:Boolean=true):void{
this.reversed = true;
if (_arg1){
this.paused = false;
} else {
if (this.gc){
this.setEnabled(true, false);
};
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (!_arg1){
renderTime(this.totalDuration, _arg2, false);
return;
};
if (this.timeline.autoRemoveChildren){
this.setEnabled(false, false);
} else {
this.active = false;
};
if (!_arg2){
if (((((this.vars.onComplete) && ((this.cachedTotalTime >= this.cachedTotalDuration)))) && (!(this.cachedReversed)))){
this.vars.onComplete.apply(null, this.vars.onCompleteParams);
} else {
if (((((this.cachedReversed) && ((this.cachedTotalTime == 0)))) && (this.vars.onReverseComplete))){
this.vars.onReverseComplete.apply(null, this.vars.onReverseCompleteParams);
};
};
};
}
public function invalidate():void{
}
public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
this.gc = !(_arg1);
if (_arg1){
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
if (((!(_arg2)) && (this.cachedOrphan))){
this.timeline.insert(this, (this.cachedStartTime - _delay));
};
} else {
this.active = false;
if (((!(_arg2)) && (!(this.cachedOrphan)))){
this.timeline.remove(this, true);
};
};
return (false);
}
public function kill():void{
setEnabled(false, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (this.cachedPaused) ? this.cachedPauseTime : this.timeline.cachedTotalTime;
if (this.cachedReversed){
_local4 = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
this.cachedStartTime = (_local3 - ((_local4 - _arg1) / this.cachedTimeScale));
} else {
this.cachedStartTime = (_local3 - (_arg1 / this.cachedTimeScale));
};
if (!this.timeline.cacheIsDirty){
setDirtyCache(false);
};
if (this.cachedTotalTime != _arg1){
renderTime(_arg1, _arg2, false);
};
};
}
public function get delay():Number{
return (_delay);
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set duration(_arg1:Number):void{
var _local2:Number = (_arg1 / this.cachedDuration);
this.cachedDuration = (this.cachedTotalDuration = _arg1);
if (((((this.active) && (!(this.cachedPaused)))) && (!((_arg1 == 0))))){
this.setTotalTime((this.cachedTotalTime * _local2), true);
};
setDirtyCache(false);
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get currentTime():Number{
return (this.cachedTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set startTime(_arg1:Number):void{
if (((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc))))){
this.timeline.insert(this, (_arg1 - _delay));
} else {
this.cachedStartTime = _arg1;
};
}
public function get reversed():Boolean{
return (this.cachedReversed);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
this.cachedPauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - this.cachedPauseTime));
this.cachedPauseTime = NaN;
setDirtyCache(false);
};
this.cachedPaused = _arg1;
this.active = Boolean(((((!(this.cachedPaused)) && ((this.cachedTotalTime > 0)))) && ((this.cachedTotalTime < this.cachedTotalDuration))));
};
if (((!(_arg1)) && (this.gc))){
this.setTotalTime(this.cachedTotalTime, false);
this.setEnabled(true, false);
};
}
}
}//package greensock.core
Section 5
//Back (greensock.easing.Back)
package greensock.easing {
public class Back {
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=1.70158):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 * 0.5) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package greensock.easing
Section 6
//Elastic (greensock.easing.Elastic)
package greensock.easing {
public class Elastic {
private static const _2PI:Number = 6.28318530717959;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) + _arg3) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((((!(_arg5)) || ((((_arg3 > 0)) && ((_arg5 < _arg3)))))) || ((((_arg3 < 0)) && ((_arg5 < -(_arg3))))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / _2PI) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * _2PI) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package greensock.easing
Section 7
//Linear (greensock.easing.Linear)
package greensock.easing {
public class Linear {
public static const power:uint = 0;
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package greensock.easing
Section 8
//Quad (greensock.easing.Quad)
package greensock.easing {
public class Quad {
public static const power:uint = 1;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return (((((_arg3 * 0.5) * _arg1) * _arg1) + _arg2));
};
--_arg1;
return ((((-(_arg3) * 0.5) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package greensock.easing
Section 9
//Strong (greensock.easing.Strong)
package greensock.easing {
public class Strong {
public static const power:uint = 4;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return ((((((((_arg3 * 0.5) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package greensock.easing
Section 10
//TweenEvent (greensock.events.TweenEvent)
package greensock.events {
import flash.events.*;
public class TweenEvent extends Event {
public static const VERSION:Number = 1.1;
public static const START:String = "start";
public static const UPDATE:String = "change";
public static const COMPLETE:String = "complete";
public static const REVERSE_COMPLETE:String = "reverseComplete";
public static const REPEAT:String = "repeat";
public static const INIT:String = "init";
public function TweenEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function clone():Event{
return (new TweenEvent(this.type, this.bubbles, this.cancelable));
}
}
}//package greensock.events
Section 11
//AutoAlphaPlugin (greensock.plugins.AutoAlphaPlugin)
package greensock.plugins {
import greensock.*;
public class AutoAlphaPlugin extends TweenPlugin {
protected var _target:Object;
protected var _ignoreVisible:Boolean;
public static const API:Number = 1;
public function AutoAlphaPlugin(){
this.propName = "autoAlpha";
this.overwriteProps = ["alpha", "visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package greensock.plugins
Section 12
//BevelFilterPlugin (greensock.plugins.BevelFilterPlugin)
package greensock.plugins {
import greensock.*;
import flash.filters.*;
public class BevelFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "highlightColor", "highlightAlpha", "shadowColor", "shadowAlpha", "blurX", "blurY", "strength", "quality"];
public function BevelFilterPlugin(){
this.propName = "bevelFilter";
this.overwriteProps = ["bevelFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BevelFilter;
initFilter(_arg2, new BevelFilter(0, 0, 0xFFFFFF, 0.5, 0, 0.5, 2, 2, 0, ((_arg2.quality) || (2))), _propNames);
return (true);
}
}
}//package greensock.plugins
Section 13
//BezierPlugin (greensock.plugins.BezierPlugin)
package greensock.plugins {
import greensock.*;
public class BezierPlugin extends TweenPlugin {
protected var _target:Object;
protected var _orientData:Array;
protected var _orient:Boolean;
protected var _future:Object;
protected var _beziers:Object;
public static const API:Number = 1;
protected static const _RAD2DEG:Number = 57.2957795130823;
public function BezierPlugin(){
_future = {};
super();
this.propName = "bezier";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
protected function init(_arg1:TweenLite, _arg2:Array, _arg3:Boolean):void{
var _local6:int;
var _local7:String;
var _local8:Object;
_target = _arg1.target;
var _local4:Object = ((_arg1.vars.isTV)==true) ? _arg1.vars.exposedVars : _arg1.vars;
if (_local4.orientToBezier == true){
_orientData = [["x", "y", "rotation", 0, 0.01]];
_orient = true;
} else {
if ((_local4.orientToBezier is Array)){
_orientData = _local4.orientToBezier;
_orient = true;
};
};
var _local5:Object = {};
_local6 = 0;
while (_local6 < _arg2.length) {
for (_local7 in _arg2[_local6]) {
if (_local5[_local7] == undefined){
_local5[_local7] = [_arg1.target[_local7]];
};
if (typeof(_arg2[_local6][_local7]) == "number"){
_local5[_local7].push(_arg2[_local6][_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_arg2[_local6][_local7])));
};
};
_local6 = (_local6 + 1);
};
for (_local7 in _local5) {
this.overwriteProps[this.overwriteProps.length] = _local7;
if (_local4[_local7] != undefined){
if (typeof(_local4[_local7]) == "number"){
_local5[_local7].push(_local4[_local7]);
} else {
_local5[_local7].push((_arg1.target[_local7] + Number(_local4[_local7])));
};
_local8 = {};
_local8[_local7] = true;
_arg1.killVars(_local8, false);
delete _local4[_local7];
};
};
_beziers = parseBeziers(_local5, _arg3);
}
override public function killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:int;
var _local7:Number;
var _local8:Object;
var _local9:Number;
var _local10:Number;
var _local11:Array;
var _local12:Number;
var _local13:Object;
var _local14:Boolean;
_changeFactor = _arg1;
if (_arg1 == 1){
for (_local3 in _beziers) {
_local2 = (_beziers[_local3].length - 1);
_target[_local3] = _beziers[_local3][_local2][2];
};
} else {
for (_local3 in _beziers) {
_local6 = _beziers[_local3].length;
if (_arg1 < 0){
_local2 = 0;
} else {
if (_arg1 >= 1){
_local2 = (_local6 - 1);
} else {
_local2 = ((_local6 * _arg1) >> 0);
};
};
_local5 = ((_arg1 - (_local2 * (1 / _local6))) * _local6);
_local4 = _beziers[_local3][_local2];
if (this.round){
_local7 = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
if (_local7 > 0){
_target[_local3] = ((_local7 + 0.5) >> 0);
} else {
_target[_local3] = ((_local7 - 0.5) >> 0);
};
} else {
_target[_local3] = (_local4[0] + (_local5 * (((2 * (1 - _local5)) * (_local4[1] - _local4[0])) + (_local5 * (_local4[2] - _local4[0])))));
};
};
};
if (_orient){
_local2 = _orientData.length;
_local8 = {};
while (_local2--) {
_local11 = _orientData[_local2];
_local8[_local11[0]] = _target[_local11[0]];
_local8[_local11[1]] = _target[_local11[1]];
};
_local13 = _target;
_local14 = this.round;
_target = _future;
this.round = false;
_orient = false;
_local2 = _orientData.length;
while (_local2--) {
_local11 = _orientData[_local2];
this.changeFactor = (_arg1 + ((_local11[4]) || (0.01)));
_local12 = ((_local11[3]) || (0));
_local9 = (_future[_local11[0]] - _local8[_local11[0]]);
_local10 = (_future[_local11[1]] - _local8[_local11[1]]);
_local13[_local11[2]] = ((Math.atan2(_local10, _local9) * _RAD2DEG) + _local12);
};
_target = _local13;
this.round = _local14;
_orient = true;
};
}
public static function parseBeziers(_arg1:Object, _arg2:Boolean=false):Object{
var _local3:int;
var _local4:Array;
var _local5:Object;
var _local6:String;
var _local7:Object = {};
if (_arg2){
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 2){
_local5[_local5.length] = [_local4[0], (_local4[1] - ((_local4[2] - _local4[0]) / 4)), _local4[1]];
_local3 = 1;
while (_local3 < (_local4.length - 1)) {
_local5[_local5.length] = [_local4[_local3], (_local4[_local3] + (_local4[_local3] - _local5[(_local3 - 1)][1])), _local4[(_local3 + 1)]];
_local3 = (_local3 + 1);
};
} else {
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
} else {
for (_local6 in _arg1) {
_local4 = _arg1[_local6];
_local5 = [];
_local7[_local6] = _local5;
if (_local4.length > 3){
_local5[_local5.length] = [_local4[0], _local4[1], ((_local4[1] + _local4[2]) / 2)];
_local3 = 2;
while (_local3 < (_local4.length - 2)) {
_local5[_local5.length] = [_local5[(_local3 - 2)][2], _local4[_local3], ((_local4[_local3] + _local4[(_local3 + 1)]) / 2)];
_local3 = (_local3 + 1);
};
_local5[_local5.length] = [_local5[(_local5.length - 1)][2], _local4[(_local4.length - 2)], _local4[(_local4.length - 1)]];
} else {
if (_local4.length == 3){
_local5[_local5.length] = [_local4[0], _local4[1], _local4[2]];
} else {
if (_local4.length == 2){
_local5[_local5.length] = [_local4[0], ((_local4[0] + _local4[1]) / 2), _local4[1]];
};
};
};
};
};
return (_local7);
}
}
}//package greensock.plugins
Section 14
//BezierThroughPlugin (greensock.plugins.BezierThroughPlugin)
package greensock.plugins {
import greensock.*;
public class BezierThroughPlugin extends BezierPlugin {
public static const API:Number = 1;
public function BezierThroughPlugin(){
this.propName = "bezierThrough";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), true);
return (true);
}
}
}//package greensock.plugins
Section 15
//BlurFilterPlugin (greensock.plugins.BlurFilterPlugin)
package greensock.plugins {
import greensock.*;
import flash.filters.*;
public class BlurFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["blurX", "blurY", "quality"];
public function BlurFilterPlugin(){
this.propName = "blurFilter";
this.overwriteProps = ["blurFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = BlurFilter;
initFilter(_arg2, new BlurFilter(0, 0, ((_arg2.quality) || (2))), _propNames);
return (true);
}
}
}//package greensock.plugins
Section 16
//ColorMatrixFilterPlugin (greensock.plugins.ColorMatrixFilterPlugin)
package greensock.plugins {
import greensock.*;
import flash.filters.*;
public class ColorMatrixFilterPlugin extends FilterPlugin {
protected var _matrix:Array;
protected var _matrixTween:EndArrayPlugin;
public static const API:Number = 1;
private static var _propNames:Array = [];
protected static var _idMatrix:Array = [1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1, 0];
protected static var _lumR:Number = 0.212671;
protected static var _lumG:Number = 0.71516;
protected static var _lumB:Number = 0.072169;
public function ColorMatrixFilterPlugin(){
this.propName = "colorMatrixFilter";
this.overwriteProps = ["colorMatrixFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = ColorMatrixFilter;
var _local4:Object = _arg2;
initFilter({remove:_arg2.remove, index:_arg2.index, addFilter:_arg2.addFilter}, new ColorMatrixFilter(_idMatrix.slice()), _propNames);
_matrix = ColorMatrixFilter(_filter).matrix;
var _local5:Array = [];
if (((!((_local4.matrix == null))) && ((_local4.matrix is Array)))){
_local5 = _local4.matrix;
} else {
if (_local4.relative == true){
_local5 = _matrix.slice();
} else {
_local5 = _idMatrix.slice();
};
_local5 = setBrightness(_local5, _local4.brightness);
_local5 = setContrast(_local5, _local4.contrast);
_local5 = setHue(_local5, _local4.hue);
_local5 = setSaturation(_local5, _local4.saturation);
_local5 = setThreshold(_local5, _local4.threshold);
if (!isNaN(_local4.colorize)){
_local5 = colorize(_local5, _local4.colorize, _local4.amount);
};
};
_matrixTween = new EndArrayPlugin();
_matrixTween.init(_matrix, _local5);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
_matrixTween.changeFactor = _arg1;
ColorMatrixFilter(_filter).matrix = _matrix;
super.changeFactor = _arg1;
}
public static function colorize(_arg1:Array, _arg2:Number, _arg3:Number=1):Array{
if (isNaN(_arg2)){
return (_arg1);
};
if (isNaN(_arg3)){
_arg3 = 1;
};
var _local4:Number = (((_arg2 >> 16) & 0xFF) / 0xFF);
var _local5:Number = (((_arg2 >> 8) & 0xFF) / 0xFF);
var _local6:Number = ((_arg2 & 0xFF) / 0xFF);
var _local7:Number = (1 - _arg3);
var _local8:Array = [(_local7 + ((_arg3 * _local4) * _lumR)), ((_arg3 * _local4) * _lumG), ((_arg3 * _local4) * _lumB), 0, 0, ((_arg3 * _local5) * _lumR), (_local7 + ((_arg3 * _local5) * _lumG)), ((_arg3 * _local5) * _lumB), 0, 0, ((_arg3 * _local6) * _lumR), ((_arg3 * _local6) * _lumG), (_local7 + ((_arg3 * _local6) * _lumB)), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local8, _arg1));
}
public static function setThreshold(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Array = [(_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), (_lumR * 0x0100), (_lumG * 0x0100), (_lumB * 0x0100), 0, (-256 * _arg2), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function setHue(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 * (Math.PI / 180));
var _local3:Number = Math.cos(_arg2);
var _local4:Number = Math.sin(_arg2);
var _local5:Array = [((_lumR + (_local3 * (1 - _lumR))) + (_local4 * -(_lumR))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * -(_lumG))), ((_lumB + (_local3 * -(_lumB))) + (_local4 * (1 - _lumB))), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * 0.143)), ((_lumG + (_local3 * (1 - _lumG))) + (_local4 * 0.14)), ((_lumB + (_local3 * -(_lumB))) + (_local4 * -0.283)), 0, 0, ((_lumR + (_local3 * -(_lumR))) + (_local4 * -((1 - _lumR)))), ((_lumG + (_local3 * -(_lumG))) + (_local4 * _lumG)), ((_lumB + (_local3 * (1 - _lumB))) + (_local4 * _lumB)), 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1];
return (applyMatrix(_local5, _arg1));
}
public static function setBrightness(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = ((_arg2 * 100) - 100);
return (applyMatrix([1, 0, 0, 0, _arg2, 0, 1, 0, 0, _arg2, 0, 0, 1, 0, _arg2, 0, 0, 0, 1, 0, 0, 0, 0, 0, 1], _arg1));
}
public static function setSaturation(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
var _local3:Number = (1 - _arg2);
var _local4:Number = (_local3 * _lumR);
var _local5:Number = (_local3 * _lumG);
var _local6:Number = (_local3 * _lumB);
var _local7:Array = [(_local4 + _arg2), _local5, _local6, 0, 0, _local4, (_local5 + _arg2), _local6, 0, 0, _local4, _local5, (_local6 + _arg2), 0, 0, 0, 0, 0, 1, 0];
return (applyMatrix(_local7, _arg1));
}
public static function setContrast(_arg1:Array, _arg2:Number):Array{
if (isNaN(_arg2)){
return (_arg1);
};
_arg2 = (_arg2 + 0.01);
var _local3:Array = [_arg2, 0, 0, 0, (128 * (1 - _arg2)), 0, _arg2, 0, 0, (128 * (1 - _arg2)), 0, 0, _arg2, 0, (128 * (1 - _arg2)), 0, 0, 0, 1, 0];
return (applyMatrix(_local3, _arg1));
}
public static function applyMatrix(_arg1:Array, _arg2:Array):Array{
var _local6:int;
var _local7:int;
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (_arg2);
};
var _local3:Array = [];
var _local4:int;
var _local5:int;
_local6 = 0;
while (_local6 < 4) {
_local7 = 0;
while (_local7 < 5) {
if (_local7 == 4){
_local5 = _arg1[(_local4 + 4)];
} else {
_local5 = 0;
};
_local3[(_local4 + _local7)] = (((((_arg1[_local4] * _arg2[_local7]) + (_arg1[(_local4 + 1)] * _arg2[(_local7 + 5)])) + (_arg1[(_local4 + 2)] * _arg2[(_local7 + 10)])) + (_arg1[(_local4 + 3)] * _arg2[(_local7 + 15)])) + _local5);
_local7 = (_local7 + 1);
};
_local4 = (_local4 + 5);
_local6 = (_local6 + 1);
};
return (_local3);
}
}
}//package greensock.plugins
Section 17
//ColorTransformPlugin (greensock.plugins.ColorTransformPlugin)
package greensock.plugins {
import flash.display.*;
import flash.geom.*;
import greensock.*;
public class ColorTransformPlugin extends TintPlugin {
public static const API:Number = 1;
public function ColorTransformPlugin(){
this.propName = "colorTransform";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local5:String;
var _local6:Number;
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = _arg1.transform.colorTransform;
for (_local5 in _arg2) {
if ((((_local5 == "tint")) || ((_local5 == "color")))){
if (_arg2[_local5] != null){
_local4.color = int(_arg2[_local5]);
};
} else {
if ((((((_local5 == "tintAmount")) || ((_local5 == "exposure")))) || ((_local5 == "brightness")))){
} else {
_local4[_local5] = _arg2[_local5];
};
};
};
if (!isNaN(_arg2.tintAmount)){
_local6 = (_arg2.tintAmount / (1 - (((_local4.redMultiplier + _local4.greenMultiplier) + _local4.blueMultiplier) / 3)));
_local4.redOffset = (_local4.redOffset * _local6);
_local4.greenOffset = (_local4.greenOffset * _local6);
_local4.blueOffset = (_local4.blueOffset * _local6);
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - _arg2.tintAmount)));
} else {
if (!isNaN(_arg2.exposure)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = (0xFF * (_arg2.exposure - 1))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = 1));
} else {
if (!isNaN(_arg2.brightness)){
_local4.redOffset = (_local4.greenOffset = (_local4.blueOffset = Math.max(0, ((_arg2.brightness - 1) * 0xFF))));
_local4.redMultiplier = (_local4.greenMultiplier = (_local4.blueMultiplier = (1 - Math.abs((_arg2.brightness - 1)))));
};
};
};
_ignoreAlpha = Boolean(((!((_arg3.vars.alpha == undefined))) && ((_arg2.alphaMultiplier == undefined))));
init((_arg1 as DisplayObject), _local4);
return (true);
}
}
}//package greensock.plugins
Section 18
//DropShadowFilterPlugin (greensock.plugins.DropShadowFilterPlugin)
package greensock.plugins {
import greensock.*;
import flash.filters.*;
public class DropShadowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["distance", "angle", "color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout", "hideObject"];
public function DropShadowFilterPlugin(){
this.propName = "dropShadowFilter";
this.overwriteProps = ["dropShadowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = DropShadowFilter;
initFilter(_arg2, new DropShadowFilter(0, 45, 0, 0, 0, 0, 1, ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout, _arg2.hideObject), _propNames);
return (true);
}
}
}//package greensock.plugins
Section 19
//EndArrayPlugin (greensock.plugins.EndArrayPlugin)
package greensock.plugins {
import greensock.*;
public class EndArrayPlugin extends TweenPlugin {
protected var _a:Array;
protected var _info:Array;
public static const API:Number = 1;
public function EndArrayPlugin(){
_info = [];
super();
this.propName = "endArray";
this.overwriteProps = ["endArray"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
public function init(_arg1:Array, _arg2:Array):void{
_a = _arg1;
var _local3:int = _arg2.length;
while (_local3--) {
if (((!((_arg1[_local3] == _arg2[_local3]))) && (!((_arg1[_local3] == null))))){
_info[_info.length] = new ArrayTweenInfo(_local3, _a[_local3], (_arg2[_local3] - _a[_local3]));
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local3:ArrayTweenInfo;
var _local4:Number;
var _local2:int = _info.length;
if (this.round){
while (_local2--) {
_local3 = _info[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
if (_local4 > 0){
_a[_local3.index] = ((_local4 + 0.5) >> 0);
} else {
_a[_local3.index] = ((_local4 - 0.5) >> 0);
};
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package greensock.plugins
class ArrayTweenInfo {
public var index:uint;
public var start:Number;
public var change:Number;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 20
//FilterPlugin (greensock.plugins.FilterPlugin)
package greensock.plugins {
import greensock.core.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _target:Object;
protected var _type:Class;
protected var _filter:BitmapFilter;
protected var _index:int;
protected var _remove:Boolean;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
protected function initFilter(_arg1:Object, _arg2:BitmapFilter, _arg3:Array):void{
var _local5:String;
var _local6:int;
var _local7:HexColorsPlugin;
var _local4:Array = _target.filters;
var _local8:Object = ((_arg1 is BitmapFilter)) ? {} : _arg1;
_index = -1;
if (_local8.index != null){
_index = _local8.index;
} else {
_local6 = _local4.length;
while (_local6--) {
if ((_local4[_local6] is _type)){
_index = _local6;
break;
};
};
};
if ((((((_index == -1)) || ((_local4[_index] == null)))) || ((_local8.addFilter == true)))){
_index = ((_local8.index)!=null) ? _local8.index : _local4.length;
_local4[_index] = _arg2;
_target.filters = _local4;
};
_filter = _local4[_index];
if (_local8.remove == true){
_remove = true;
this.onComplete = onCompleteTween;
};
_local6 = _arg3.length;
while (_local6--) {
_local5 = _arg3[_local6];
if ((((_local5 in _arg1)) && (!((_filter[_local5] == _arg1[_local5]))))){
if ((((((_local5 == "color")) || ((_local5 == "highlightColor")))) || ((_local5 == "shadowColor")))){
_local7 = new HexColorsPlugin();
_local7.initColor(_filter, _local5, _filter[_local5], _arg1[_local5]);
_tweens[_tweens.length] = new PropTween(_local7, "changeFactor", 0, 1, _local5, false);
} else {
if ((((((((_local5 == "quality")) || ((_local5 == "inner")))) || ((_local5 == "knockout")))) || ((_local5 == "hideObject")))){
_filter[_local5] = _arg1[_local5];
} else {
addTween(_filter, _local5, _filter[_local5], _arg1[_local5], _local5);
};
};
};
};
}
public function onCompleteTween():void{
var _local1:Array;
var _local2:int;
if (_remove){
_local1 = _target.filters;
if (!(_local1[_index] is _type)){
_local2 = _local1.length;
while (_local2--) {
if ((_local1[_local2] is _type)){
_local1.splice(_local2, 1);
break;
};
};
} else {
_local1.splice(_index, 1);
};
_target.filters = _local1;
};
}
override public function set changeFactor(_arg1:Number):void{
var _local3:PropTween;
var _local2:int = _tweens.length;
var _local4:Array = _target.filters;
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
if (!(_local4[_index] is _type)){
_local2 = (_index = _local4.length);
while (_local2--) {
if ((_local4[_local2] is _type)){
_index = _local2;
break;
};
};
};
_local4[_index] = _filter;
_target.filters = _local4;
}
}
}//package greensock.plugins
Section 21
//FrameLabelPlugin (greensock.plugins.FrameLabelPlugin)
package greensock.plugins {
import flash.display.*;
import greensock.*;
public class FrameLabelPlugin extends FramePlugin {
public static const API:Number = 1;
public function FrameLabelPlugin(){
this.propName = "frameLabel";
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if ((!(_arg3.target) is MovieClip)){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
var _local4:Array = _target.currentLabels;
var _local5:String = _arg2;
var _local6:int = _target.currentFrame;
var _local7:int = _local4.length;
while (_local7--) {
if (_local4[_local7].name == _local5){
_local6 = _local4[_local7].frame;
break;
};
};
if (this.frame != _local6){
addTween(this, "frame", this.frame, _local6, "frame");
};
return (true);
}
}
}//package greensock.plugins
Section 22
//FramePlugin (greensock.plugins.FramePlugin)
package greensock.plugins {
import flash.display.*;
import greensock.*;
public class FramePlugin extends TweenPlugin {
public var frame:int;
protected var _target:MovieClip;
public static const API:Number = 1;
public function FramePlugin(){
this.propName = "frame";
this.overwriteProps = ["frame", "frameLabel"];
this.round = true;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is MovieClip))) || (isNaN(_arg2)))){
return (false);
};
_target = (_arg1 as MovieClip);
this.frame = _target.currentFrame;
addTween(this, "frame", this.frame, _arg2, "frame");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.gotoAndStop(this.frame);
}
}
}//package greensock.plugins
Section 23
//GlowFilterPlugin (greensock.plugins.GlowFilterPlugin)
package greensock.plugins {
import greensock.*;
import flash.filters.*;
public class GlowFilterPlugin extends FilterPlugin {
public static const API:Number = 1;
private static var _propNames:Array = ["color", "alpha", "blurX", "blurY", "strength", "quality", "inner", "knockout"];
public function GlowFilterPlugin(){
this.propName = "glowFilter";
this.overwriteProps = ["glowFilter"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_type = GlowFilter;
initFilter(_arg2, new GlowFilter(0xFFFFFF, 0, 0, 0, ((_arg2.strength) || (1)), ((_arg2.quality) || (2)), _arg2.inner, _arg2.knockout), _propNames);
return (true);
}
}
}//package greensock.plugins
Section 24
//HexColorsPlugin (greensock.plugins.HexColorsPlugin)
package greensock.plugins {
import greensock.*;
public class HexColorsPlugin extends TweenPlugin {
protected var _colors:Array;
public static const API:Number = 1;
public function HexColorsPlugin(){
this.propName = "hexColors";
this.overwriteProps = [];
_colors = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
for (_local4 in _arg2) {
initColor(_arg1, _local4, uint(_arg1[_local4]), uint(_arg2[_local4]));
};
return (true);
}
public function initColor(_arg1:Object, _arg2:String, _arg3:uint, _arg4:uint):void{
var _local5:Number;
var _local6:Number;
var _local7:Number;
if (_arg3 != _arg4){
_local5 = (_arg3 >> 16);
_local6 = ((_arg3 >> 8) & 0xFF);
_local7 = (_arg3 & 0xFF);
_colors[_colors.length] = [_arg1, _arg2, _local5, ((_arg4 >> 16) - _local5), _local6, (((_arg4 >> 8) & 0xFF) - _local6), _local7, ((_arg4 & 0xFF) - _local7)];
this.overwriteProps[this.overwriteProps.length] = _arg2;
};
}
override public function killProps(_arg1:Object):void{
var _local2:int = (_colors.length - 1);
while (_local2 > -1) {
if (_arg1[_colors[_local2][1]] != undefined){
_colors.splice(_local2, 1);
};
_local2--;
};
super.killProps(_arg1);
}
override public function set changeFactor(_arg1:Number):void{
var _local3:Array;
var _local2:int = _colors.length;
while (--_local2 > -1) {
_local3 = _colors[_local2];
_local3[0][_local3[1]] = ((((_local3[2] + (_arg1 * _local3[3])) << 16) | ((_local3[4] + (_arg1 * _local3[5])) << 8)) | (_local3[6] + (_arg1 * _local3[7])));
};
}
}
}//package greensock.plugins
Section 25
//RemoveTintPlugin (greensock.plugins.RemoveTintPlugin)
package greensock.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package greensock.plugins
Section 26
//RoundPropsPlugin (greensock.plugins.RoundPropsPlugin)
package greensock.plugins {
import greensock.*;
import greensock.core.*;
public class RoundPropsPlugin extends TweenPlugin {
protected var _tween:TweenLite;
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = ["roundProps"];
this.round = true;
this.priority = -1;
this.onInitAllProps = _initAllProps;
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_tween = _arg3;
this.overwriteProps = this.overwriteProps.concat((_arg2 as Array));
return (true);
}
protected function _initAllProps():void{
var _local1:String;
var _local2:String;
var _local4:PropTween;
var _local3:Array = _tween.vars.roundProps;
var _local5:int = _local3.length;
while (--_local5 > -1) {
_local1 = _local3[_local5];
_local4 = _tween.cachedPT1;
while (_local4) {
if (_local4.name == _local1){
if (_local4.isPlugin){
_local4.target.round = true;
} else {
add(_local4.target, _local1, _local4.start, _local4.change);
_removePropTween(_local4);
_tween.propTweenLookup[_local1] = _tween.propTweenLookup.roundProps;
};
} else {
if (((((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))) && (!(_local4.target.round)))){
_local2 = ((" " + _local4.target.overwriteProps.join(" ")) + " ");
if (_local2.indexOf(((" " + _local1) + " ")) != -1){
_local4.target.round = true;
};
};
};
_local4 = _local4.nextNode;
};
};
}
protected function _removePropTween(_arg1:PropTween):void{
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_tween.cachedPT1 == _arg1){
_tween.cachedPT1 = _arg1.nextNode;
};
};
if (((_arg1.isPlugin) && (_arg1.target.onDisable))){
_arg1.target.onDisable();
};
}
public function add(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
addTween(_arg1, _arg2, _arg3, (_arg3 + _arg4), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package greensock.plugins
Section 27
//ShortRotationPlugin (greensock.plugins.ShortRotationPlugin)
package greensock.plugins {
import greensock.*;
public class ShortRotationPlugin extends TweenPlugin {
public static const API:Number = 1;
public function ShortRotationPlugin(){
this.propName = "shortRotation";
this.overwriteProps = [];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
var _local4:String;
if (typeof(_arg2) == "number"){
return (false);
};
for (_local4 in _arg2) {
initRotation(_arg1, _local4, _arg1[_local4], ((typeof(_arg2[_local4]))=="number") ? Number(_arg2[_local4]) : (_arg1[_local4] + Number(_arg2[_local4])));
};
return (true);
}
public function initRotation(_arg1:Object, _arg2:String, _arg3:Number, _arg4:Number):void{
var _local5:Number = ((_arg4 - _arg3) % 360);
if (((_arg4 - _arg3) % 360) != (_local5 % 180)){
_local5 = ((_local5)<0) ? (_local5 + 360) : (_local5 - 360);
};
addTween(_arg1, _arg2, _arg3, (_arg3 + _local5), _arg2);
this.overwriteProps[this.overwriteProps.length] = _arg2;
}
}
}//package greensock.plugins
Section 28
//TintPlugin (greensock.plugins.TintPlugin)
package greensock.plugins {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import greensock.core.*;
public class TintPlugin extends TweenPlugin {
protected var _transform:Transform;
protected var _ct:ColorTransform;
protected var _ignoreAlpha:Boolean;
public static const API:Number = 1;
protected static var _props:Array = ["redMultiplier", "greenMultiplier", "blueMultiplier", "alphaMultiplier", "redOffset", "greenOffset", "blueOffset", "alphaOffset"];
public function TintPlugin(){
this.propName = "tint";
this.overwriteProps = ["tint"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg1 is DisplayObject)){
return (false);
};
var _local4:ColorTransform = new ColorTransform();
if (((!((_arg2 == null))) && (!((_arg3.vars.removeTint == true))))){
_local4.color = uint(_arg2);
};
_ignoreAlpha = true;
init((_arg1 as DisplayObject), _local4);
return (true);
}
public function init(_arg1:DisplayObject, _arg2:ColorTransform):void{
var _local4:String;
_transform = _arg1.transform;
_ct = _transform.colorTransform;
var _local3:int = _props.length;
while (_local3--) {
_local4 = _props[_local3];
if (_ct[_local4] != _arg2[_local4]){
_tweens[_tweens.length] = new PropTween(_ct, _local4, _ct[_local4], (_arg2[_local4] - _ct[_local4]), "tint", false);
};
};
}
override public function set changeFactor(_arg1:Number):void{
var _local2:ColorTransform;
updateTweens(_arg1);
if (_ignoreAlpha){
_local2 = _transform.colorTransform;
_ct.alphaMultiplier = _local2.alphaMultiplier;
_ct.alphaOffset = _local2.alphaOffset;
};
_transform.colorTransform = _ct;
}
}
}//package greensock.plugins
Section 29
//TweenPlugin (greensock.plugins.TweenPlugin)
package greensock.plugins {
import greensock.*;
import greensock.core.*;
public class TweenPlugin {
public var propName:String;
public var overwriteProps:Array;
public var round:Boolean;
public var priority:int;// = 0
public var activeDisable:Boolean;
public var onInitAllProps:Function;
public var onComplete:Function;
public var onEnable:Function;
public var onDisable:Function;
protected var _tweens:Array;
protected var _changeFactor:Number;// = 0
public static const VERSION:Number = 1.4;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
protected function addTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String=null):void{
var _local6:Number;
if (_arg4 != null){
_local6 = ((typeof(_arg4))=="number") ? (Number(_arg4) - _arg3) : Number(_arg4);
if (_local6 != 0){
_tweens[_tweens.length] = new PropTween(_arg1, _arg2, _arg3, _local6, ((_arg5) || (_arg2)), false);
};
};
}
protected function updateTweens(_arg1:Number):void{
var _local3:PropTween;
var _local4:Number;
var _local2:int = _tweens.length;
if (this.round){
while (--_local2 > -1) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
if (_local4 > 0){
_local3.target[_local3.property] = ((_local4 + 0.5) >> 0);
} else {
_local3.target[_local3.property] = ((_local4 - 0.5) >> 0);
};
};
} else {
while (--_local2 > -1) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
public function killProps(_arg1:Object):void{
var _local2:int = this.overwriteProps.length;
while (--_local2 > -1) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (--_local2 > -1) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
private static function onTweenEvent(_arg1:String, _arg2:TweenLite):Boolean{
var _local4:Boolean;
var _local5:Array;
var _local6:int;
var _local3:PropTween = _arg2.cachedPT1;
if (_arg1 == "onInitAllProps"){
_local5 = [];
_local6 = 0;
while (_local3) {
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local7 = _temp1;
_local5[_local7] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
while (--_local6 > -1) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_local3 = (_arg2.cachedPT1 = _local5[0]);
};
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
_local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
return (_local4);
}
public static function activate(_arg1:Array):Boolean{
var _local3:Object;
TweenLite.onPluginEvent = TweenPlugin.onTweenEvent;
var _local2:int = _arg1.length;
while (_local2--) {
if (_arg1[_local2].hasOwnProperty("API")){
_local3 = new ((_arg1[_local2] as Class));
TweenLite.plugins[_local3.propName] = _arg1[_local2];
};
};
return (true);
}
}
}//package greensock.plugins
Section 30
//VisiblePlugin (greensock.plugins.VisiblePlugin)
package greensock.plugins {
import greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _tween:TweenLite;
protected var _visible:Boolean;
protected var _initVal:Boolean;
public static const API:Number = 1;
public function VisiblePlugin(){
this.propName = "visible";
this.overwriteProps = ["visible"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
_tween = _arg3;
_initVal = _target.visible;
_visible = Boolean(_arg2);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
if ((((_arg1 == 1)) && ((((_tween.cachedDuration == _tween.cachedTime)) || ((_tween.cachedTime == 0)))))){
_target.visible = _visible;
} else {
_target.visible = _initVal;
};
}
}
}//package greensock.plugins
Section 31
//VolumePlugin (greensock.plugins.VolumePlugin)
package greensock.plugins {
import greensock.*;
import flash.media.*;
public class VolumePlugin extends TweenPlugin {
protected var _target:Object;
protected var _st:SoundTransform;
public static const API:Number = 1;
public function VolumePlugin(){
this.propName = "volume";
this.overwriteProps = ["volume"];
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((((isNaN(_arg2)) || (_arg1.hasOwnProperty("volume")))) || (!(_arg1.hasOwnProperty("soundTransform"))))){
return (false);
};
_target = _arg1;
_st = _target.soundTransform;
addTween(_st, "volume", _st.volume, _arg2, "volume");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_target.soundTransform = _st;
}
}
}//package greensock.plugins
Section 32
//OverwriteManager (greensock.OverwriteManager)
package greensock {
import greensock.core.*;
public final class OverwriteManager {
public static const version:Number = 6.1;
public static const NONE:int = 0;
public static const ALL_IMMEDIATE:int = 1;
public static const AUTO:int = 2;
public static const CONCURRENT:int = 3;
public static const ALL_ONSTART:int = 4;
public static const PREEXISTING:int = 5;
public static var mode:int;
public static var enabled:Boolean;
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.6){
throw (new Error("Warning: Your TweenLite class needs to be updated to work with OverwriteManager (or you may need to clear your ASO files). Please download and install the latest version from http://www.tweenlite.com."));
};
TweenLite.overwriteManager = OverwriteManager;
mode = _arg1;
enabled = true;
return (mode);
}
public static function manageOverwrites(_arg1:TweenLite, _arg2:Object, _arg3:Array, _arg4:int):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local13:int;
var _local14:Number;
var _local15:Number;
var _local16:TweenCore;
var _local17:Number;
var _local18:SimpleTimeline;
if (_arg4 >= 4){
_local13 = _arg3.length;
_local5 = 0;
while (_local5 < _local13) {
_local7 = _arg3[_local5];
if (_local7 != _arg1){
if (_local7.setEnabled(false, false)){
_local6 = true;
};
} else {
if (_arg4 == 5){
break;
};
};
_local5++;
};
return (_local6);
};
var _local8:Number = (_arg1.cachedStartTime + 1E-10);
var _local9:Array = [];
var _local10:Array = [];
var _local11:int;
var _local12:int;
_local5 = _arg3.length;
while (--_local5 > -1) {
_local7 = _arg3[_local5];
if ((((((_local7 == _arg1)) || (_local7.gc))) || (((!(_local7.initted)) && (((_local8 - _local7.cachedStartTime) <= 2E-10)))))){
} else {
if (_local7.timeline != _arg1.timeline){
if (!getGlobalPaused(_local7)){
var _temp1 = _local11;
_local11 = (_local11 + 1);
var _local19 = _temp1;
_local10[_local19] = _local7;
};
} else {
if ((((((((_local7.cachedStartTime <= _local8)) && ((((_local7.cachedStartTime + _local7.totalDuration) + 1E-10) > _local8)))) && (!(_local7.cachedPaused)))) && (!((((_arg1.cachedDuration == 0)) && (((_local8 - _local7.cachedStartTime) <= 2E-10))))))){
var _temp2 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp2;
_local9[_local19] = _local7;
};
};
};
};
if (_local11 != 0){
_local14 = _arg1.cachedTimeScale;
_local15 = _local8;
_local18 = _arg1.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.cachedStartTime);
_local18 = _local18.timeline;
};
_local8 = (_local14 * _local15);
_local5 = _local11;
while (--_local5 > -1) {
_local16 = _local10[_local5];
_local14 = _local16.cachedTimeScale;
_local15 = _local16.cachedStartTime;
_local18 = _local16.timeline;
while (_local18) {
_local14 = (_local14 * _local18.cachedTimeScale);
_local15 = (_local15 + _local18.cachedStartTime);
_local18 = _local18.timeline;
};
_local17 = (_local14 * _local15);
if ((((_local17 <= _local8)) && ((((((_local17 + (_local16.totalDuration * _local14)) + 1E-10) > _local8)) || ((_local16.cachedDuration == 0)))))){
var _temp3 = _local12;
_local12 = (_local12 + 1);
_local19 = _temp3;
_local9[_local19] = _local16;
};
};
};
if (_local12 == 0){
return (_local6);
};
_local5 = _local12;
if (_arg4 == 2){
while (--_local5 > -1) {
_local7 = _local9[_local5];
if (_local7.killVars(_arg2)){
_local6 = true;
};
if ((((_local7.cachedPT1 == null)) && (_local7.initted))){
_local7.setEnabled(false, false);
};
};
} else {
while (--_local5 > -1) {
if (TweenLite(_local9[_local5]).setEnabled(false, false)){
_local6 = true;
};
};
};
return (_local6);
}
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
var _local2:Boolean;
while (_arg1) {
if (_arg1.cachedPaused){
_local2 = true;
break;
};
_arg1 = _arg1.timeline;
};
return (_local2);
}
}
}//package greensock
Section 33
//TweenLite (greensock.TweenLite)
package greensock {
import flash.display.*;
import greensock.core.*;
import flash.events.*;
import greensock.plugins.*;
import flash.utils.*;
public class TweenLite extends TweenCore {
public var target:Object;
public var propTweenLookup:Object;
public var ratio:Number;// = 0
public var cachedPT1:PropTween;
protected var _ease:Function;
protected var _overwrite:int;
protected var _overwrittenProps:Object;
protected var _hasPlugins:Boolean;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.62;
public static var plugins:Object = {};
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public static var defaultEase:Function = TweenLite.easeOut;
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var rootTimeline:SimpleTimeline;
public static var rootFramesTimeline:SimpleTimeline;
public static var masterList:Dictionary = new Dictionary(false);
private static var _shape:Shape = new Shape();
protected static var _reservedProps:Object = {ease:1, delay:1, overwrite:1, onComplete:1, onCompleteParams:1, useFrames:1, runBackwards:1, startAt:1, onUpdate:1, onUpdateParams:1, onStart:1, onStartParams:1, onInit:1, onInitParams:1, onReverseComplete:1, onReverseCompleteParams:1, onRepeat:1, onRepeatParams:1, proxiedEase:1, easeParams:1, yoyo:1, onCompleteListener:1, onUpdateListener:1, onStartListener:1, onReverseCompleteListener:1, onRepeatListener:1, orientToBezier:1, timeScale:1, immediateRender:1, repeat:1, repeatDelay:1, timeline:1, data:1, paused:1};
public function TweenLite(_arg1:Object, _arg2:Number, _arg3:Object){
var _local5:TweenLite;
super(_arg2, _arg3);
if (_arg1 == null){
throw (new Error("Cannot tween a null object."));
};
this.target = _arg1;
if ((((this.target is TweenCore)) && (this.vars.timeScale))){
this.cachedTimeScale = 1;
};
propTweenLookup = {};
_ease = defaultEase;
_overwrite = (((!((Number(_arg3.overwrite) > -1))) || (((!(overwriteManager.enabled)) && ((_arg3.overwrite > 1)))))) ? overwriteManager.mode : int(_arg3.overwrite);
var _local4:Array = masterList[_arg1];
if (!_local4){
masterList[_arg1] = [this];
} else {
if (_overwrite == 1){
for each (_local5 in _local4) {
if (!_local5.gc){
_local5.setEnabled(false, false);
};
};
masterList[_arg1] = [this];
} else {
_local4[_local4.length] = this;
};
};
if (((this.active) || (this.vars.immediateRender))){
renderTime(0, false, true);
};
}
protected function init():void{
var _local1:String;
var _local2:int;
var _local3:*;
var _local4:Boolean;
var _local5:Array;
var _local6:PropTween;
if (this.vars.onInit){
this.vars.onInit.apply(null, this.vars.onInitParams);
};
if (typeof(this.vars.ease) == "function"){
_ease = this.vars.ease;
};
if (this.vars.easeParams){
this.vars.proxiedEase = _ease;
_ease = easeProxy;
};
this.cachedPT1 = null;
this.propTweenLookup = {};
for (_local1 in this.vars) {
if ((((_local1 in _reservedProps)) && (!((((_local1 == "timeScale")) && ((this.target is TweenCore))))))){
} else {
if ((((_local1 in plugins)) && (new ((plugins[_local1] as Class)).onInitTween(this.target, this.vars[_local1], this)))){
this.cachedPT1 = new PropTween(_local3, "changeFactor", 0, 1, ((_local3.overwriteProps.length)==1) ? _local3.overwriteProps[0] : "_MULTIPLE_", true, this.cachedPT1);
if (this.cachedPT1.name == "_MULTIPLE_"){
_local2 = _local3.overwriteProps.length;
while (--_local2 > -1) {
this.propTweenLookup[_local3.overwriteProps[_local2]] = this.cachedPT1;
};
} else {
this.propTweenLookup[this.cachedPT1.name] = this.cachedPT1;
};
if (_local3.priority){
this.cachedPT1.priority = _local3.priority;
_local4 = true;
};
if (((_local3.onDisable) || (_local3.onEnable))){
_notifyPluginsOfEnabled = true;
};
_hasPlugins = true;
} else {
this.cachedPT1 = new PropTween(this.target, _local1, Number(this.target[_local1]), ((typeof(this.vars[_local1]))=="number") ? (Number(this.vars[_local1]) - this.target[_local1]) : Number(this.vars[_local1]), _local1, false, this.cachedPT1);
this.propTweenLookup[_local1] = this.cachedPT1;
};
};
};
if (_local4){
onPluginEvent("onInitAllProps", this);
};
if (this.vars.runBackwards){
_local6 = this.cachedPT1;
while (_local6) {
_local6.start = (_local6.start + _local6.change);
_local6.change = -(_local6.change);
_local6 = _local6.nextNode;
};
};
_hasUpdate = Boolean(!((this.vars.onUpdate == null)));
if (_overwrittenProps){
killVars(_overwrittenProps);
if (this.cachedPT1 == null){
this.setEnabled(false, false);
};
};
if ((((((((_overwrite > 1)) && (this.cachedPT1))) && (masterList[this.target]))) && ((_local5.length > 1)))){
if (overwriteManager.manageOverwrites(this, this.propTweenLookup, _local5, _overwrite)){
init();
};
};
this.initted = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Boolean;
var _local5:Number = this.cachedTime;
if (_arg1 >= this.cachedDuration){
this.cachedTotalTime = (this.cachedTime = this.cachedDuration);
this.ratio = 1;
_local4 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime >= 0){
_arg3 = true;
_local4 = true;
};
_rawPrevTime = _arg1;
};
};
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local4 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
this.ratio = _ease(_arg1, 0, 1, this.cachedDuration);
};
};
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
if (((!(_local4)) && (this.cachedTime))){
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (((!((this.cachedTime == 0))) || ((this.cachedDuration == 0)))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
var _local6:PropTween = this.cachedPT1;
while (_local6) {
_local6.target[_local6.property] = (_local6.start + (this.ratio * _local6.change));
_local6 = _local6.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_local4) && (!(this.gc)))){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
public function killVars(_arg1:Object, _arg2:Boolean=true):Boolean{
var _local3:String;
var _local4:PropTween;
var _local5:Boolean;
if (_overwrittenProps == null){
_overwrittenProps = {};
};
for (_local3 in _arg1) {
if ((_local3 in propTweenLookup)){
_local4 = propTweenLookup[_local3];
if (((_local4.isPlugin) && ((_local4.name == "_MULTIPLE_")))){
_local4.target.killProps(_arg1);
if (_local4.target.overwriteProps.length == 0){
_local4.name = "";
};
if (((!((_local3 == _local4.target.propName))) || ((_local4.name == "")))){
delete propTweenLookup[_local3];
};
};
if (_local4.name != "_MULTIPLE_"){
if (_local4.nextNode){
_local4.nextNode.prevNode = _local4.prevNode;
};
if (_local4.prevNode){
_local4.prevNode.nextNode = _local4.nextNode;
} else {
if (this.cachedPT1 == _local4){
this.cachedPT1 = _local4.nextNode;
};
};
if (((_local4.isPlugin) && (_local4.target.onDisable))){
_local4.target.onDisable();
if (_local4.target.activeDisable){
_local5 = true;
};
};
delete propTweenLookup[_local3];
};
};
if (((_arg2) && (!((_arg1 == _overwrittenProps))))){
_overwrittenProps[_local3] = 1;
};
};
return (_local5);
}
override public function invalidate():void{
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
this.cachedPT1 = null;
_overwrittenProps = null;
_hasUpdate = (this.initted = (this.active = (_notifyPluginsOfEnabled = false)));
this.propTweenLookup = {};
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:Array;
if (_arg1){
_local3 = TweenLite.masterList[this.target];
if (!_local3){
TweenLite.masterList[this.target] = [this];
} else {
_local3[_local3.length] = this;
};
};
super.setEnabled(_arg1, _arg2);
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
return (onPluginEvent((_arg1) ? "onEnable" : "onDisable", this));
};
return (false);
}
protected function easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
public static function initClass():void{
rootFrame = 0;
rootTimeline = new SimpleTimeline(null);
rootFramesTimeline = new SimpleTimeline(null);
rootTimeline.cachedStartTime = (getTimer() * 0.001);
rootFramesTimeline.cachedStartTime = rootFrame;
rootTimeline.autoRemoveChildren = true;
rootFramesTimeline.autoRemoveChildren = true;
_shape.addEventListener(Event.ENTER_FRAME, updateAll, false, 0, true);
if (overwriteManager == null){
overwriteManager = {mode:1, enabled:false};
};
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenLite(_arg1, _arg2, _arg3));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenLite{
return (new TweenLite(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
protected static function updateAll(_arg1:Event=null):void{
var _local2:Dictionary;
var _local3:Object;
var _local4:Array;
var _local5:int;
rootTimeline.renderTime((((getTimer() * 0.001) - rootTimeline.cachedStartTime) * rootTimeline.cachedTimeScale), false, false);
rootFrame = (rootFrame + 1);
rootFramesTimeline.renderTime(((rootFrame - rootFramesTimeline.cachedStartTime) * rootFramesTimeline.cachedTimeScale), false, false);
if (!(rootFrame % 60)){
_local2 = masterList;
for (_local3 in _local2) {
_local4 = _local2[_local3];
_local5 = _local4.length;
while (--_local5 > -1) {
if (TweenLite(_local4[_local5]).gc){
_local4.splice(_local5, 1);
};
};
if (_local4.length == 0){
delete _local2[_local3];
};
};
};
}
public static function killTweensOf(_arg1:Object, _arg2:Boolean=false, _arg3:Object=null):void{
var _local4:Array;
var _local5:int;
var _local6:TweenLite;
if ((_arg1 in masterList)){
_local4 = masterList[_arg1];
_local5 = _local4.length;
while (--_local5 > -1) {
_local6 = _local4[_local5];
if (!_local6.gc){
if (_arg2){
_local6.complete(false, false);
};
if (_arg3 != null){
_local6.killVars(_arg3);
};
if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){
_local6.setEnabled(false, false);
};
};
};
if (_arg3 == null){
delete masterList[_arg1];
};
};
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
}
}//package greensock
Section 34
//TweenMax (greensock.TweenMax)
package greensock {
import flash.display.*;
import greensock.core.*;
import flash.events.*;
import greensock.plugins.*;
import greensock.events.*;
import flash.utils.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _repeat:int;// = 0
protected var _repeatDelay:Number;// = 0
protected var _cyclesComplete:int;// = 0
protected var _easePower:int;
protected var _easeType:int;
public var yoyo:Boolean;
public static const version:Number = 11.68;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public static var killTweensOf:Function = TweenLite.killTweensOf;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
public function TweenMax(_arg1:Object, _arg2:Number, _arg3:Object){
super(_arg1, _arg2, _arg3);
if (TweenLite.version < 11.2){
throw (new Error("TweenMax error! Please update your TweenLite class or try deleting your ASO files. TweenMax requires a more recent version. Download updates at http://www.TweenMax.com."));
};
this.yoyo = Boolean(this.vars.yoyo);
_repeat = uint(this.vars.repeat);
_repeatDelay = (this.vars.repeatDelay) ? Number(this.vars.repeatDelay) : 0;
this.cacheIsDirty = true;
if (((((((((((this.vars.onCompleteListener) || (this.vars.onInitListener))) || (this.vars.onUpdateListener))) || (this.vars.onStartListener))) || (this.vars.onRepeatListener))) || (this.vars.onReverseCompleteListener))){
initDispatcher();
if ((((_arg2 == 0)) && ((_delay == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
};
};
if (((this.vars.timeScale) && (!((this.target is TweenCore))))){
this.cachedTimeScale = this.vars.timeScale;
};
}
override protected function init():void{
var _local1:TweenMax;
if (this.vars.startAt){
this.vars.startAt.overwrite = 0;
this.vars.startAt.immediateRender = true;
_local1 = new TweenMax(this.target, 0, this.vars.startAt);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.INIT));
};
super.init();
if ((_ease in fastEaseLookup)){
_easeType = fastEaseLookup[_ease][0];
_easePower = fastEaseLookup[_ease][1];
};
}
override public function invalidate():void{
this.yoyo = Boolean((this.vars.yoyo == true));
_repeat = (this.vars.repeat) ? Number(this.vars.repeat) : 0;
_repeatDelay = (this.vars.repeatDelay) ? Number(this.vars.repeatDelay) : 0;
_hasUpdateListener = false;
if (((((!((this.vars.onCompleteListener == null))) || (!((this.vars.onUpdateListener == null))))) || (!((this.vars.onStartListener == null))))){
initDispatcher();
};
setDirtyCache(true);
super.invalidate();
}
public function updateTo(_arg1:Object, _arg2:Boolean=false):void{
var _local4:String;
var _local5:Number;
var _local6:Number;
var _local7:PropTween;
var _local8:Number;
var _local3:Number = this.ratio;
if (((((_arg2) && (!((this.timeline == null))))) && ((this.cachedStartTime < this.timeline.cachedTime)))){
this.cachedStartTime = this.timeline.cachedTime;
this.setDirtyCache(false);
if (this.gc){
this.setEnabled(true, false);
} else {
this.timeline.insert(this, (this.cachedStartTime - _delay));
};
};
for (_local4 in _arg1) {
this.vars[_local4] = _arg1[_local4];
};
if (this.initted){
if (_arg2){
this.initted = false;
} else {
if (((_notifyPluginsOfEnabled) && (this.cachedPT1))){
onPluginEvent("onDisable", this);
};
if ((this.cachedTime / this.cachedDuration) > 0.998){
_local5 = this.cachedTime;
this.renderTime(0, true, false);
this.initted = false;
this.renderTime(_local5, true, false);
} else {
if (this.cachedTime > 0){
this.initted = false;
init();
_local6 = (1 / (1 - _local3));
_local7 = this.cachedPT1;
while (_local7) {
_local8 = (_local7.start + _local7.change);
_local7.change = (_local7.change * _local6);
_local7.start = (_local8 - _local7.change);
_local7 = _local7.nextNode;
};
};
};
};
};
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Object = {};
_local4[_arg1] = _arg2;
updateTo(_local4, !(_arg3));
}
public function killProperties(_arg1:Array):void{
var _local2:Object = {};
var _local3:int = _arg1.length;
while (--_local3 > -1) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local6:Boolean;
var _local7:Boolean;
var _local8:Boolean;
var _local10:Number;
var _local11:int;
var _local12:int;
var _local13:Number;
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTotalTime;
if (_arg1 >= _local4){
this.cachedTotalTime = _local4;
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local6 = true;
if (this.cachedDuration == 0){
if ((((((_arg1 == 0)) || ((_rawPrevTime < 0)))) && (!((_rawPrevTime == _arg1))))){
_arg3 = true;
};
_rawPrevTime = _arg1;
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if (this.cachedDuration == 0){
if (_rawPrevTime >= 0){
_arg3 = true;
_local6 = true;
};
_rawPrevTime = _arg1;
};
} else {
if ((((_arg1 == 0)) && (!(this.initted)))){
_arg3 = true;
};
};
this.cachedTotalTime = (this.cachedTime = (this.ratio = 0));
if (((this.cachedReversed) && (!((_local5 == 0))))){
_local6 = true;
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
_local8 = true;
};
};
if (_repeat != 0){
_local10 = (this.cachedDuration + _repeatDelay);
_local11 = _cyclesComplete;
_cyclesComplete = ((this.cachedTotalTime / _local10) >> 0);
if (_cyclesComplete == (this.cachedTotalTime / _local10)){
_cyclesComplete--;
};
if (_local11 != _cyclesComplete){
_local7 = true;
};
if (_local6){
if (((this.yoyo) && ((_repeat % 2)))){
this.cachedTime = (this.ratio = 0);
};
} else {
if (_arg1 > 0){
this.cachedTime = (((this.cachedTotalTime / _local10) - _cyclesComplete) * _local10);
if (((this.yoyo) && ((_cyclesComplete % 2)))){
this.cachedTime = (this.cachedDuration - this.cachedTime);
} else {
if (this.cachedTime >= this.cachedDuration){
this.cachedTime = this.cachedDuration;
this.ratio = 1;
_local8 = false;
};
};
if (this.cachedTime <= 0){
this.cachedTime = (this.ratio = 0);
_local8 = false;
};
} else {
_cyclesComplete = 0;
};
};
};
if ((((_local5 == this.cachedTotalTime)) && (!(_arg3)))){
return;
};
if (!this.initted){
init();
};
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
if (_local8){
if (_easeType){
_local12 = _easePower;
_local13 = (this.cachedTime / this.cachedDuration);
if (_easeType == 2){
_local13 = (1 - _local13);
this.ratio = _local13;
while (--_local12 > -1) {
this.ratio = (_local13 * this.ratio);
};
this.ratio = (1 - this.ratio);
} else {
if (_easeType == 1){
this.ratio = _local13;
while (--_local12 > -1) {
this.ratio = (_local13 * this.ratio);
};
} else {
if (_local13 < 0.5){
_local13 = (_local13 * 2);
this.ratio = _local13;
while (--_local12 > -1) {
this.ratio = (_local13 * this.ratio);
};
this.ratio = (this.ratio * 0.5);
} else {
_local13 = ((1 - _local13) * 2);
this.ratio = _local13;
while (--_local12 > -1) {
this.ratio = (_local13 * this.ratio);
};
this.ratio = (1 - (0.5 * this.ratio));
};
};
};
} else {
this.ratio = _ease(this.cachedTime, 0, 1, this.cachedDuration);
};
};
if ((((((_local5 == 0)) && (((!((this.cachedTotalTime == 0))) || ((this.cachedDuration == 0)))))) && (!(_arg2)))){
if (this.vars.onStart){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.START));
};
};
var _local9:PropTween = this.cachedPT1;
while (_local9) {
_local9.target[_local9.property] = (_local9.start + (this.ratio * _local9.change));
_local9 = _local9.nextNode;
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((_hasUpdateListener) && (!(_arg2)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.UPDATE));
};
if (((((_local7) && (!(_arg2)))) && (!(this.gc)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
if (((_local6) && (!(this.gc)))){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
override public function complete(_arg1:Boolean=false, _arg2:Boolean=false):void{
super.complete(_arg1, _arg2);
if (((!(_arg2)) && (_dispatcher))){
if ((((this.cachedTotalTime == this.cachedTotalDuration)) && (!(this.cachedReversed)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.COMPLETE));
} else {
if (((this.cachedReversed) && ((this.cachedTotalTime == 0)))){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REVERSE_COMPLETE));
};
};
};
}
protected function initDispatcher():void{
if (_dispatcher == null){
_dispatcher = new EventDispatcher(this);
};
if ((this.vars.onInitListener is Function)){
_dispatcher.addEventListener(TweenEvent.INIT, this.vars.onInitListener, false, 0, true);
};
if ((this.vars.onStartListener is Function)){
_dispatcher.addEventListener(TweenEvent.START, this.vars.onStartListener, false, 0, true);
};
if ((this.vars.onUpdateListener is Function)){
_dispatcher.addEventListener(TweenEvent.UPDATE, this.vars.onUpdateListener, false, 0, true);
_hasUpdateListener = true;
};
if ((this.vars.onCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.COMPLETE, this.vars.onCompleteListener, false, 0, true);
};
if ((this.vars.onRepeatListener is Function)){
_dispatcher.addEventListener(TweenEvent.REPEAT, this.vars.onRepeatListener, false, 0, true);
};
if ((this.vars.onReverseCompleteListener is Function)){
_dispatcher.addEventListener(TweenEvent.REVERSE_COMPLETE, this.vars.onReverseCompleteListener, false, 0, true);
};
}
public function addEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false, _arg4:int=0, _arg5:Boolean=false):void{
if (_dispatcher == null){
initDispatcher();
};
if (_arg1 == TweenEvent.UPDATE){
_hasUpdateListener = true;
};
_dispatcher.addEventListener(_arg1, _arg2, _arg3, _arg4, _arg5);
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
public function set currentProgress(_arg1:Number):void{
if (_cyclesComplete == 0){
setTotalTime((this.duration * _arg1), false);
} else {
setTotalTime(((this.duration * _arg1) + (_cyclesComplete * this.cachedDuration)), false);
};
}
public function get totalProgress():Number{
return ((this.cachedTotalTime / this.totalDuration));
}
public function set totalProgress(_arg1:Number):void{
setTotalTime((this.totalDuration * _arg1), false);
}
override public function set currentTime(_arg1:Number):void{
if (_cyclesComplete == 0){
} else {
if (((this.yoyo) && (((_cyclesComplete % 2) == 1)))){
_arg1 = ((this.duration - _arg1) + (_cyclesComplete * (this.cachedDuration + _repeatDelay)));
} else {
_arg1 = (_arg1 + (_cyclesComplete * (this.duration + _repeatDelay)));
};
};
setTotalTime(_arg1, false);
}
override public function get totalDuration():Number{
if (this.cacheIsDirty){
this.cachedTotalDuration = ((_repeat)==-1) ? 999999999999 : ((this.cachedDuration * (_repeat + 1)) + (_repeatDelay * _repeat));
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((this.cachedPauseTime) || ((this.cachedPauseTime == 0)))) ? this.cachedPauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function get repeat():int{
return (_repeat);
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function from(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg3));
}
public static function fromTo(_arg1:Object, _arg2:Number, _arg3:Object, _arg4:Object):TweenMax{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (new TweenMax(_arg1, _arg2, _arg4));
}
public static function allTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
var i:int;
var varsDup:Object;
var p:String;
var onCompleteProxy:Function;
var onCompleteParamsProxy:Array;
var targets = _arg1;
var duration = _arg2;
var vars = _arg3;
var stagger = _arg4;
var onCompleteAll = _arg5;
var onCompleteAllParams = _arg6;
var l:int = targets.length;
var a:Array = [];
if (vars.isGSVars){
vars = vars.vars;
};
var curDelay:Number = (("delay" in vars)) ? Number(vars.delay) : 0;
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
var lastIndex:int = (l - 1);
i = 0;
while (i < l) {
varsDup = {};
for (p in vars) {
varsDup[p] = vars[p];
};
varsDup.delay = curDelay;
if ((((i == lastIndex)) && (!((onCompleteAll == null))))){
varsDup.onComplete = function ():void{
if (onCompleteProxy != null){
onCompleteProxy.apply(null, onCompleteParamsProxy);
};
onCompleteAll.apply(null, onCompleteAllParams);
};
};
a[i] = new TweenMax(targets[i], duration, varsDup);
curDelay = (curDelay + stagger);
i = (i + 1);
};
return (a);
}
public static function allFrom(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Number=0, _arg5:Function=null, _arg6:Array=null):Array{
_arg3.runBackwards = true;
if (!("immediateRender" in _arg3)){
_arg3.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6));
}
public static function allFromTo(_arg1:Array, _arg2:Number, _arg3:Object, _arg4:Object, _arg5:Number=0, _arg6:Function=null, _arg7:Array=null):Array{
_arg4.startAt = _arg3;
if (_arg3.immediateRender){
_arg4.immediateRender = true;
};
return (allTo(_arg1, _arg2, _arg4, _arg5, _arg6, _arg7));
}
public static function delayedCall(_arg1:Number, _arg2:Function, _arg3:Array=null, _arg4:Boolean=false):TweenMax{
return (new TweenMax(_arg2, 0, {delay:_arg1, onComplete:_arg2, onCompleteParams:_arg3, immediateRender:false, useFrames:_arg4, overwrite:0}));
}
public static function getTweensOf(_arg1:Object):Array{
var _local4:int;
var _local5:int;
var _local2:Array = masterList[_arg1];
var _local3:Array = [];
if (_local2){
_local4 = _local2.length;
_local5 = 0;
while (--_local4 > -1) {
if (!TweenLite(_local2[_local4]).gc){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local6 = _temp1;
_local3[_local6] = _local2[_local4];
};
};
};
return (_local3);
}
public static function isTweening(_arg1:Object):Boolean{
var _local4:TweenLite;
var _local2:Array = getTweensOf(_arg1);
var _local3:int = _local2.length;
while (--_local3 > -1) {
_local4 = _local2[_local3];
if (((_local4.active) || ((((_local4.cachedStartTime == _local4.timeline.cachedTime)) && (_local4.timeline.active))))){
return (true);
};
};
return (false);
}
public static function getAllTweens():Array{
var _local4:Array;
var _local5:int;
var _local1:Dictionary = masterList;
var _local2:int;
var _local3:Array = [];
for each (_local4 in _local1) {
_local5 = _local4.length;
while (--_local5 > -1) {
if (!TweenLite(_local4[_local5]).gc){
var _temp1 = _local2;
_local2 = (_local2 + 1);
var _local8 = _temp1;
_local3[_local8] = _local4[_local5];
};
};
};
return (_local3);
}
public static function killAll(_arg1:Boolean=false, _arg2:Boolean=true, _arg3:Boolean=true):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (--_local6 > -1) {
_local5 = (_local4[_local6].target == _local4[_local6].vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
if (_arg1){
_local4[_local6].complete(false);
} else {
_local4[_local6].setEnabled(false, false);
};
};
};
}
public static function killChildTweensOf(_arg1:DisplayObjectContainer, _arg2:Boolean=false):void{
var _local4:Object;
var _local5:DisplayObjectContainer;
var _local3:Array = getAllTweens();
var _local6:int = _local3.length;
while (--_local6 > -1) {
_local4 = _local3[_local6].target;
if ((_local4 is DisplayObject)){
_local5 = _local4.parent;
while (_local5) {
if (_local5 == _arg1){
if (_arg2){
_local3[_local6].complete(false);
} else {
_local3[_local6].setEnabled(false, false);
};
};
_local5 = _local5.parent;
};
};
};
}
public static function pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(true, _arg1, _arg2);
}
public static function resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(false, _arg1, _arg2);
}
private static function changePause(_arg1:Boolean, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local5:Boolean;
var _local4:Array = getAllTweens();
var _local6:int = _local4.length;
while (--_local6 > -1) {
_local5 = (TweenLite(_local4[_local6]).target == TweenLite(_local4[_local6]).vars.onComplete);
if ((((_local5 == _arg3)) || (!((_local5 == _arg2))))){
TweenCore(_local4[_local6]).paused = _arg1;
};
};
}
public static function get globalTimeScale():Number{
return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale);
}
public static function set globalTimeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
if (TweenLite.rootTimeline == null){
TweenLite.to({}, 0, {});
};
var _local2:SimpleTimeline = TweenLite.rootTimeline;
var _local3:Number = (getTimer() * 0.001);
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
_local2 = TweenLite.rootFramesTimeline;
_local3 = TweenLite.rootFrame;
_local2.cachedStartTime = (_local3 - (((_local3 - _local2.cachedStartTime) * _local2.cachedTimeScale) / _arg1));
TweenLite.rootFramesTimeline.cachedTimeScale = (TweenLite.rootTimeline.cachedTimeScale = _arg1);
}
TweenPlugin.activate([AutoAlphaPlugin, EndArrayPlugin, FramePlugin, RemoveTintPlugin, TintPlugin, VisiblePlugin, VolumePlugin, BevelFilterPlugin, BezierPlugin, BezierThroughPlugin, BlurFilterPlugin, ColorMatrixFilterPlugin, ColorTransformPlugin, DropShadowFilterPlugin, FrameLabelPlugin, GlowFilterPlugin, HexColorsPlugin, RoundPropsPlugin, ShortRotationPlugin, {}]);
}
}//package greensock
Section 35
//AchievementList (Instance.constant.AchievementList)
package Instance.constant {
import flash.events.*;
import Instance.events.*;
public class AchievementList {
public static const ACHIEVEMENT_DATA = [{codeName:"awesome security", notice:"Any three countries have at least 5 securities with max level", listenerType:VisitorEvent.END_PROMOTE, clearCondition:"maxSecurity(3) >= 5"}, {codeName:"celebration", notice:"Have at least 100 statified visitor.", listenerType:ShopGameEvent.UPDATE, clearCondition:"statisfied >= 100"}, {codeName:"cool janitors", notice:"Any three countries have at least 5 janitors with max level", listenerType:VisitorEvent.END_PROMOTE, clearCondition:"maxJanitor(3) >= 5"}, {codeName:"entrepreneur", notice:"Unlock the second country.", listenerType:ShopGameEvent.MISSION_COMPLETE, clearCondition:"cityUnlock >= 2"}, {codeName:"i like being here", notice:"Have at least 30 statified visitor.", listenerType:ShopGameEvent.UPDATE, clearCondition:"statisfied >= 30"}, {codeName:"independent mall", notice:"Have all kind of booth in one country (Includeing Hall)", listenerType:ShopGameEvent.BOOTH_CREATED, clearCondition:"boothComplete"}, {codeName:"loser of the years", notice:"Popularity is not more than 5% during three days", listenerType:"special", clearCondition:"popularity <= 5"}, {codeName:"mall of the month", notice:"Complete all mission in two countries.", listenerType:ShopGameEvent.MISSION_COMPLETE, clearCondition:"completeMission >= 2"}, {codeName:"mall rulers", notice:"Complete all mission in four countries.", listenerType:ShopGameEvent.MISSION_COMPLETE, clearCondition:"completeMission >= 4"}, {codeName:"my favorite mall", notice:"Have at least 60 statified visitors.", listenerType:ShopGameEvent.UPDATE, clearCondition:"statisfied >= 60"}, {codeName:"nice to meet you", notice:"Enter the credit.", listenerType:"special", clearCondition:"none"}, {codeName:"on the spot", notice:"All special visitors already visit your mall in any country.", listenerType:ShopGameEvent.VISITOR_ARRIVE, clearCondition:"spVisitorComplete"}, {codeName:"perfect technician", notice:"Any three countries have at least 5 electrician with max level", listenerType:VisitorEvent.END_PROMOTE, clearCondition:"maxElectrician(3) >= 5"}, {codeName:"punish indiscipliner", notice:"Neutralize 5 villain visitor at each country", listenerType:VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL, clearCondition:"villainAllCountry >= 5"}, {codeName:"secret achievement", notice:"Secret achievement. Find It", listenerType:ShopGameEvent.VISITOR_ARRIVE, clearCondition:"secretAchievement", unlockedNotice:"I see the legend coming."}, {codeName:"special mall", notice:"Any 4 special visitors already come to your mall in any country.", listenerType:ShopGameEvent.VISITOR_ARRIVE, clearCondition:"spVisitor >= 4"}, {codeName:"super developer", notice:"Upgrade the building 20 times without leaving country.", listenerType:BoothEvent.END_UPGRADE, clearCondition:"upgradeBooth >= 20"}, {codeName:"super mall", notice:"Purchase any 10 extra upgrade in one country.", listenerType:ShopGameEvent.PURCHASE_EXTRA_UPGRADE, clearCondition:"extraUpgrade >= 10"}, {codeName:"thanks to segway", notice:"Catch a bandit by segwayed security.", listenerType:VisitorEvent.BEGIN_ARRESTED, clearCondition:"extraType(Segway)"}, {codeName:"the billionaire", notice:"Have $99,999,999 cash in all countries.", listenerType:ShopGameEvent.CASH_UPDATE, clearCondition:"cashAll >= 99999999"}, {codeName:"the director", notice:"Unlock all countries.", listenerType:ShopGameEvent.MISSION_COMPLETE, clearCondition:"cityUnlock >= 5"}, {codeName:"the dream team", notice:"All countries have 3 employees from each type with max level", listenerType:VisitorEvent.END_PROMOTE, clearCondition:"maxEmployee(5) >= 3"}, {codeName:"the millionaire", notice:"Have $1,000,000 cash in all countries.", listenerType:ShopGameEvent.CASH_UPDATE, clearCondition:"cashAll >= 1000000"}, {codeName:"the romans", notice:"Play at Italy.", listenerType:ShopGameEvent.PLAY_THE_GAME, clearCondition:"country == mapItaly"}, {codeName:"the shiek", notice:"Play at Arabia.", listenerType:ShopGameEvent.PLAY_THE_GAME, clearCondition:"country == mapArabian"}, {codeName:"trouble coming", notice:"Your current mall have 5 build with electricity problem", listenerType:ShopGameEvent.UPDATE, clearCondition:"brokenBooth >= 5"}, {codeName:"ultimate mall", notice:"Purchase any 20 extra upgrade in one country.", listenerType:ShopGameEvent.PURCHASE_EXTRA_UPGRADE, clearCondition:"extraUpgrade >= 20"}, {codeName:"ultimate restaurant", notice:"Have 5 kinds of food center booth in one country.", listenerType:ShopGameEvent.BOOTH_CREATED, clearCondition:"foodCenterType >= 5"}, {codeName:"what have you done", notice:"10 visitors leave your mall with the worst mood in one day.", listenerType:ShopGameEvent.VISITOR_LEAVE, clearCondition:"leavingAngry >= 10"}, {codeName:"your highness", notice:"Complete all mission in all countries.", listenerType:ShopGameEvent.MISSION_COMPLETE, clearCondition:"completeMission >= 5"}];
public static function getAchievementByName(_arg1:String):Object{
var _local2:* = null;
var _local3:* = 0;
while (_local3 < ACHIEVEMENT_DATA.length) {
if (ACHIEVEMENT_DATA[_local3].codeName == _arg1){
_local2 = ACHIEVEMENT_DATA[_local3];
break;
};
_local3++;
};
return (_local2);
}
public static function checkAchievementGain(_arg1:Object, _arg2:Object):Boolean{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local3:* = false;
var _local4:* = _arg2.clearCondition;
var _local5:* = new Array();
while (_local4.indexOf(" ") >= 0) {
_local7 = _local4.substr(0, _local4.indexOf(" "));
_local4 = _local4.substr((_local4.indexOf(" ") + 1));
_local5.push(_local7);
};
if (_local4.length > 0){
_local5.push(_local4);
};
var _local6:* = 0;
while (_local6 < _local5.length) {
if (["cityUnlock", "statisfied", "popularity", "completeMission", "spVisitor", "extraUpgrade", "upgradeBooth", "country", "brokenBooth", "foodCenterType", "leavingAngry", "villainAllCountry", "cashAll"].indexOf(_local5[_local6]) >= 0){
_local8 = 0;
switch (_local5[_local6]){
case "cityUnlock":
_local8 = _arg1.cityUnlocked.length;
break;
case "statisfied":
_local8 = MissionList.getStatisfiedVisitor(_arg1.currentGameplay).length;
break;
case "popularity":
_local8 = Math.round(_arg1.currentGameplay.popularity);
break;
case "completeMission":
_local8 = _arg1.getNumberCompleteMission();
break;
case "villainAllCountry":
_local8 = _arg1.getLowestVillainCaptured();
break;
case "spVisitor":
_local8 = _arg1.getSpecialVisitorAlreadyVisit();
break;
case "upgradeBooth":
_local8 = _arg1.upgradeTime;
break;
case "extraUpgrade":
_local8 = _arg1.currentGameplay.upgradePurchaseList.length;
break;
case "cashAll":
_local8 = _arg1.getLowestCash();
break;
case "country":
_local11 = _arg1.currentGameplay.main;
_local8 = _local11.country;
break;
case "brokenBooth":
_local8 = _arg1.currentGameplay.getBrokenBooth().length;
break;
case "foodCenterType":
_local8 = _arg1.getKindOfFoodCenter();
break;
case "leavingAngry":
_local8 = _arg1.currentGameplay.lostVisitor;
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = ((_local8 as Number)) ? Number(_local5[_local6]) : _local5[_local6];
_local3 = ((_local9)=="==") ? (_local8 == _local10) : ((_local9)=="<") ? (_local8 < _local10) : ((_local9)==">") ? (_local8 > _local10) : ((_local9)=="<=") ? (_local8 <= _local10) : ((_local9)==">=") ? (_local8 >= _local10) : false;
} else {
if (["boothComplete", "spVisitorComplete", "secretAchievement"].indexOf(_local5[_local6]) >= 0){
switch (_local5[_local6]){
case "boothComplete":
_local3 = ((_arg1.currentGameplay.haveAllBooth()) && (!((_arg1.currentGameplay.hall == null))));
break;
case "spVisitorComplete":
_local3 = (_arg1.getSpecialVisitorAlreadyVisit() >= VisitorList.SPECIAL_VISITOR_LIST.length);
break;
case "secretAchievement":
_local3 = _arg1.secretAchievementComplete();
break;
};
} else {
if (_local5[_local6].indexOf("(") >= 0){
_local12 = _local5[_local6].substr(0, _local5[_local6].indexOf("("));
_local13 = _local5[_local6].substring((_local5[_local6].indexOf("(") + 1), _local5[_local6].indexOf(")"));
if (["maxSecurity", "maxJanitor", "maxElectrician", "maxEmployee"].indexOf(_local12) >= 0){
_local8 = 0;
_local14 = _arg1.getMaxLevelEmployeeNumber("janitor", Number(_local13));
_local15 = _arg1.getMaxLevelEmployeeNumber("electrician", Number(_local13));
_local16 = _arg1.getMaxLevelEmployeeNumber("security", Number(_local13));
_local17 = _arg1.getMaxLevelEmployeeNumber("entertainer", Number(_local13));
switch (_local12){
case "maxJanitor":
_local8 = _local14;
break;
case "maxElectrician":
_local8 = _local15;
break;
case "maxSecurity":
_local8 = _local16;
break;
case "maxEmployee":
_local8 = Math.min(Math.min(_local14, _local15), Math.min(_local16, _local17));
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local3 = ((_local9)=="==") ? (_local8 == _local10) : ((_local9)=="<") ? (_local8 < _local10) : ((_local9)==">") ? (_local8 > _local10) : ((_local9)=="<=") ? (_local8 <= _local10) : ((_local9)==">=") ? (_local8 >= _local10) : false;
} else {
if (["extraType"].indexOf(_local12) >= 0){
_local18 = _local13.replace(/_/g, " ");
switch (_local12){
case "extraType":
_local3 = _arg1.currentGameplay.checkUpgradeByName(_local18);
break;
};
};
};
};
};
};
_local6++;
};
return (_local3);
}
}
}//package Instance.constant
Section 36
//BGMList (Instance.constant.BGMList)
package Instance.constant {
import Instance.*;
public class BGMList {
public static const COUNTRY_LIST = [ShopText.MAP_INDIA, ShopText.MAP_RUSIA, ShopText.MAP_ARABIAN, ShopText.MAP_ITALY, ShopText.MAP_BRITAIN];
public static const MUSIC_COUNTRY_LIST = [{intro:BGMIndia1, bgm:[BGMIndia2]}, {intro:BGMRusia, bgm:[BGMRusia]}, {intro:BGMArab, bgm:[BGMArab]}, {intro:BGMItaly, bgm:[BGMItaly]}, {intro:BGMLondon1, bgm:[BGMLondon2]}];
public static const EVENT_LIST = [BoothHall.ELEC_EXPO, BoothHall.CAR_SHOW, BoothHall.LIVE_CONCERT, BoothHall.ORCHESTRA, "World Map", "Main Menu"];
public static const MUSIC_EVENT_LIST = [{intro:BGMEventElecExpo, bgm:[BGMEventElecExpo]}, {intro:BGMEventCarShow, bgm:[BGMEventCarShow]}, {intro:BGMEventLiveConcert, bgm:[BGMEventLiveConcert]}, {intro:null, bgm:[BGMEventBachMinuetinG, BGMEventBethoveenMinuetinG, BGMEventBocheriniMinuet, BGMEventDanceOfTheKnights]}, {intro:BGMWorldMap1, bgm:[BGMWorldMap1, BGMWorldMap2]}, {intor:BGMMainMenu, bgm:[BGMMainMenu]}];
public static function getMusicAt(_arg1:String, _arg2:Boolean=false):Class{
var _local5:*;
var _local3:* = null;
var _local4:* = COUNTRY_LIST.indexOf(_arg1);
if ((_local4 in MUSIC_COUNTRY_LIST)){
if (((_arg2) && (!((MUSIC_COUNTRY_LIST[_local4].intro == null))))){
_local3 = MUSIC_COUNTRY_LIST[_local4].intro;
} else {
_local5 = Math.floor((Math.random() * MUSIC_COUNTRY_LIST[_local4].bgm.length));
_local3 = MUSIC_COUNTRY_LIST[_local4].bgm[_local5];
};
} else {
_local4 = EVENT_LIST.indexOf(_arg1);
if ((_local4 in MUSIC_EVENT_LIST)){
if (((_arg2) && (!((MUSIC_EVENT_LIST[_local4].intro == null))))){
_local3 = MUSIC_EVENT_LIST[_local4].intro;
} else {
_local5 = Math.floor((Math.random() * MUSIC_EVENT_LIST[_local4].bgm.length));
_local3 = MUSIC_EVENT_LIST[_local4].bgm[_local5];
};
};
};
return (_local3);
}
public static function compareBGM(_arg1:Class, _arg2:String):Boolean{
var _local3:* = false;
var _local4:* = COUNTRY_LIST.indexOf(_arg2);
if ((_local4 in MUSIC_COUNTRY_LIST)){
_local3 = (((MUSIC_COUNTRY_LIST[_local4].intro == _arg1)) || ((MUSIC_COUNTRY_LIST[_local4].bgm.indexOf(_arg1) >= 0)));
} else {
_local4 = EVENT_LIST.indexOf(_arg2);
if ((_local4 in MUSIC_EVENT_LIST)){
_local3 = (((MUSIC_EVENT_LIST[_local4].intro == _arg1)) || ((MUSIC_EVENT_LIST[_local4].bgm.indexOf(_arg1) >= 0)));
};
};
return (_local3);
}
}
}//package Instance.constant
Section 37
//BoothList (Instance.constant.BoothList)
package Instance.constant {
import Instance.modules.*;
public class BoothList {
public static const BOOTH_AVAILABLE = [BoothDrugStore, BoothTattoo, BoothBabyShop, BoothGadget, BoothBookstore, BoothBoutique, BoothSalon, BoothMusic, BoothToyStore, BoothSport, BoothJewelry, BoothSupermarket, BoothCake, BoothIceCream, BoothBurger, BoothCandy, BoothSushi, BoothSteak, BoothCafe, BoothLiquor, BoothArcade, BoothCinema];
public static const BOOTH_PRICE = [3000, 3000, 3000, 3500, 6000, 8000, 8000, 10000, 12000, 14000, 18000, 35000, 3000, 3500, 6000, 8000, 12000, 18000, 18000, 20000, 30000, 27000];
public static const BOOTH_BOUGHT_CHANCE = [70, 30, 60, 20, 60, 60, 20, 40, 50, 55, 20, 90, 70, 40, 50, 60, 65, 80, 75, 50, 75, 85];
public static const BOOTH_ITEM_TRESHOLD = [3, 2, 2, 1, 3, 2, 2, 1, 2, 3, 1, 10, 4, 4, 3, 3, 2, 2, 2, 1, 2, 2];
public static const AVERAGE_PRICE = [[2, 3, 4], [4, 6, 8], [3, 5, 7], [5, 8, 10], [5, 10, 15], [7, 12, 18], [10, 15, 20], [10, 12, 14], [12, 15, 20], [15, 20, 25], [30, 40, 50], [15, 20, 25], [3, 5, 7], [5, 7, 9], [8, 10, 12], [9, 11, 13], [10, 12, 15], [15, 17, 20], [16, 18, 20], [18, 20, 22], [20, 22, 24], [28, 30, 32]];
public static const MAX_VISITOR = [[5, 10, 15], [5, 10, 15], [5, 10, 15], [5, 10, 15], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [20, 35, -1], [5, 10, 15], [-1, -1, -1], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [10, 20, 30], [20, 35, 50], [20, 35, 50]];
public static const UPGRADE_COST = [[1500, 2000], [1500, 2000], [1500, 2000], [1700, 2500], [3500, 4000], [5000, 6000], [5000, 6000], [6500, 8000], [7000, 9000], [8000, 10000], [10000, 15000], [20000, 25000], [1500, 2000], [1700, 2500], [3500, 4000], [5000, 6000], [8000, 10000], [10000, 15000], [10000, 15000], [12500, 17500], [20000, 25000], [15000, 20000]];
public static const BOOTH_NAME = ["DrugStore", "Tattoo", "BabyShop", "Gadget", "Bookstore", "Boutique", "Salon", "Music", "ToyStore", "Sport", "Jewelry", "Supermarket", "Cake", "IceCream", "Burger", "Candy", "Sushi", "Steak", "Cafe", "Liquor", "Arcade", "Cinema"];
public static const BOOTH_SHOW_TEXT = ["Drug Store", "Tattoo", "Baby Shop", "Gadget", "Bookstore", "Boutique", "Salon", "Music Store", "Toy Store", "Sport Store", "Jewelry", "Supermarket", "Cake Shop", "Ice Cream", "Burger", "Candy Castle", "Sushi Bar", "Steak Bar", "Cafe", "Liquor", "Arcade", "Cinema"];
public static const FACILITY_LIST = [FacilityRestroom, FacilityElevator, FacilityEscalator, FacilityATM, FacilityTerrace, FacilityParkingLot, FacilitySubway];
public static const FACILITY_PRICE = [1500, 3000, 2000, 8000, 7500, 10000, 15000];
public static const FACILITY_UPGRADE = [[750, 1800], [1500, 2000], [1000, 1500], [4000, 5000], null, [7500, 9000], null];
public static const EXPAND_COST = [1000, 1500, 2000];
public static const FACILITY_NAME = ["Restroom", "Elevator", "Escalator", "ATM", "Terrace", "ParkingLot", "Subway"];
public static const FACILITY_SHOWN_NAME = ["Restroom", "Elevator", "Escalator", "ATM", "Terrace", "Parking Lot", "Subway"];
public static const FACILITY_MAX_VISITOR = [[5, 10, 15], [10, 15, 20], [-1, -1, -1], [-1, -1, -1], [8, 8, 8], [-1, -1, -1], [-1, -1, -1]];
public static const PARKING_COST = [0, 10, 40];
public static const HALL_PRICE = 55000;
public static const HALL_UPGRADE = [35000, 40000];
public static const HALL_EVENT_TYPE = ["Electronic Expo", "Car Show", "Live Concert", "Orchestra"];
public static const HALL_ITEM_PRICE = [[30, 40, 50], [500, 600, 700], [0, 0, 0], [0, 0, 0]];
public static const HALL_TICKET_PRICE = [[10, 20, 30], [50, 75, 100], [100, 150, 200], [150, 300, 450]];
public static const HALL_ADD_EVENT_PRICE = [[1000, 1250, 1500], [1200, 1500, 1700], [1400, 1700, 2000], [1500, 2000, 2500]];
public static const BOOTH_ON_LEVEL = [[BoothDrugStore, BoothBabyShop, BoothBookstore, BoothBoutique, BoothSalon, BoothJewelry, BoothSupermarket, BoothIceCream, BoothCake, BoothBurger, BoothCafe], [BoothTattoo, BoothCandy, BoothLiquor, BoothArcade], [BoothGadget, BoothSteak, BoothCinema], [BoothMusic, BoothToyStore], [BoothSport, BoothSushi]];
public static const GENERAL_STORE_LIST = [BoothDrugStore, BoothTattoo, BoothBabyShop, BoothGadget, BoothBookstore, BoothBoutique, BoothSalon, BoothMusic, BoothToyStore, BoothSport, BoothJewelry, BoothSupermarket];
public static const FOOD_CENTER_LIST = [BoothCake, BoothIceCream, BoothBurger, BoothCandy, BoothSushi, BoothSteak, BoothCafe, BoothLiquor];
public static const ENTERTAINMENT_LIST = [BoothArcade, BoothCinema];
public static function compareNameByType(_arg1:Class):String{
var _local2:* = BOOTH_AVAILABLE.indexOf(_arg1);
if ((_local2 in BOOTH_NAME)){
return (BOOTH_NAME[_local2]);
};
_local2 = FACILITY_LIST.indexOf(_arg1);
if ((_local2 in FACILITY_NAME)){
return (FACILITY_NAME[_local2]);
};
return ("");
}
public static function compareShowNameByType(_arg1:Class):String{
var _local2:* = BOOTH_AVAILABLE.indexOf(_arg1);
if (_local2 >= 0){
return (BOOTH_SHOW_TEXT[_local2]);
};
_local2 = FACILITY_LIST.indexOf(_arg1);
if (_local2 >= 0){
return (FACILITY_SHOWN_NAME[_local2]);
};
return ("");
}
public static function compareTypeByName(_arg1:String):Class{
var _local2:* = null;
var _local3:* = BOOTH_NAME.indexOf(_arg1);
if ((_local3 in BOOTH_AVAILABLE)){
_local2 = BOOTH_AVAILABLE[_local3];
} else {
_local3 = FACILITY_NAME.indexOf(_arg1);
if ((_local3 in FACILITY_LIST)){
_local2 = FACILITY_LIST[_local3];
};
};
return (_local2);
}
public static function comparePriceByType(_arg1:Class):Number{
var _local2:* = BOOTH_AVAILABLE.indexOf(_arg1);
if ((_local2 in BOOTH_PRICE)){
return (BOOTH_PRICE[_local2]);
};
_local2 = FACILITY_LIST.indexOf(_arg1);
if ((_local2 in FACILITY_PRICE)){
return (FACILITY_PRICE[_local2]);
};
if (_arg1 == Hall){
return (HALL_PRICE);
};
return (0);
}
public static function getAverageItemPriceByType(_arg1:Class, _arg2:int=0):Number{
var _local3:* = BOOTH_AVAILABLE.indexOf(_arg1);
if ((_local3 in BOOTH_AVAILABLE)){
if ((_arg2 in AVERAGE_PRICE)){
return (AVERAGE_PRICE[_local3][_arg2]);
};
return (0);
//unresolved jump
};
return (0);
}
public static function getUpgradeCost(_arg1:Class, _arg2:Number=0):Number{
var _local3:* = BOOTH_AVAILABLE.indexOf(_arg1);
var _local4:* = 0;
if ((_local3 in UPGRADE_COST)){
if ((_arg2 in UPGRADE_COST[_local3])){
_local4 = UPGRADE_COST[_local3][_arg2];
};
} else {
_local3 = FACILITY_LIST.indexOf(_arg1);
if ((_local3 in FACILITY_UPGRADE)){
if ((_arg2 in FACILITY_UPGRADE[_local3])){
_local4 = FACILITY_UPGRADE[_local3][_arg2];
};
} else {
if (_arg1 == Hall){
if ((_arg2 in HALL_UPGRADE)){
_local4 = HALL_UPGRADE[_arg2];
};
};
};
};
return (_local4);
}
public static function getBoughtChance(_arg1:Class):Number{
var _local2:* = BOOTH_AVAILABLE.indexOf(_arg1);
if (_local2 >= 0){
return (BOOTH_BOUGHT_CHANCE[_local2]);
};
return (0);
}
public static function getItemTreshold(_arg1:Class):Number{
var _local2:* = BOOTH_AVAILABLE.indexOf(_arg1);
if (_local2 >= 0){
return (BOOTH_ITEM_TRESHOLD[_local2]);
};
return (0);
}
public static function getMaxVisitor(_arg1:Class, _arg2:int=0):Number{
var _local3:* = BOOTH_AVAILABLE.indexOf(_arg1);
if (_local3 >= 0){
if ((_arg2 in MAX_VISITOR[_local3])){
return (MAX_VISITOR[_local3][_arg2]);
};
return (-1);
} else {
_local3 = FACILITY_LIST.indexOf(_arg1);
if (_local3 >= 0){
if ((_arg2 in FACILITY_MAX_VISITOR[_local3])){
return (FACILITY_MAX_VISITOR[_local3][_arg2]);
};
return (-1);
//unresolved jump
};
};
return (!NULL!);
}
public static function getExpandCost(_arg1:Number):Number{
if ((_arg1 in EXPAND_COST)){
return (EXPAND_COST[_arg1]);
};
return (0);
}
public static function getUpgradeEffect(_arg1:Object):String{
var _local3:*;
var _local4:*;
var _local5:*;
var _local2:* = "";
if (_arg1.boothLevel < _arg1.MAX_LEVEL){
_local3 = BOOTH_AVAILABLE.indexOf(Utility.getClass(_arg1));
if (_local3 >= 0){
if ((_local3 in AVERAGE_PRICE)){
if ((_arg1.boothLevel in AVERAGE_PRICE[_local3])){
if ((_local2 is BoothCinema)){
_local2 = "Ticket = ";
} else {
_local2 = "Average Price = ";
};
_local2 = (_local2 + ("$" + Utility.numberToMoney(AVERAGE_PRICE[_local3][_arg1.boothLevel])));
};
};
if ((_arg1 is BoothIceCream)){
_local2 = (_local2 + "\nQueue serve faster.");
} else {
if ((_local3 in MAX_VISITOR)){
if ((_arg1.boothLevel in MAX_VISITOR[_local3])){
_local4 = MAX_VISITOR[_local3][_arg1.boothLevel];
_local2 = (_local2 + ("\n" + ((_local4)>0) ? (("Capacity = " + _local4) + ".") : "Unlimited capacity."));
};
};
if ((_arg1 is BoothSupermarket)){
_local2 = (_local2 + "\nQueue serve faster.");
};
};
} else {
_local5 = FACILITY_LIST.indexOf(Utility.getClass(_arg1));
if ((_arg1 is FacilityRestroom)){
if ((_local5 in FACILITY_MAX_VISITOR)){
_local2 = ("Capacity per room = " + FACILITY_MAX_VISITOR[_local5][_arg1.boothLevel]);
};
} else {
if ((_arg1 is FacilityElevator)){
_local2 = "Maximum Passanger = &elevatorCapacity";
_local2 = (_local2 + "\nRoom move faster.");
_local2 = (_local2 + ("\nExpand cost = $" + Utility.numberToMoney(getExpandCost(_arg1.boothLevel))));
} else {
if ((_arg1 is FacilityEscalator)){
_local2 = "Stairs move faster";
} else {
if ((_arg1 is FacilityATM)){
_local2 = "Queue serve faster";
_local2 = (_local2 + "\nReduce electricity trouble.\nAlarm more sensitive.");
} else {
if ((_arg1 is FacilityParkingLot)){
if (_arg1.boothLevel == 2){
_local2 = (_local2 + "Becomes VIP parking");
};
_local2 = ("Visitor parking here pay " + PARKING_COST[_arg1.boothLevel]);
};
};
};
};
};
};
if ((_local3 in BOOTH_AVAILABLE)){
_local2 = (_local2 + "\nReduce electricity trouble.\nAlarm more sensitive.");
};
} else {
_local2 = "Upgrade already maxed";
};
return (_local2);
}
public static function getHallItemPrice(_arg1:String):Array{
var _local2:* = [];
var _local3:* = HALL_EVENT_TYPE.indexOf(_arg1);
if ((_local3 in HALL_ITEM_PRICE)){
_local2 = HALL_ITEM_PRICE[_local3].concat();
};
return (_local2);
}
public static function getHallTicketPrice(_arg1:String):Array{
var _local2:* = [];
var _local3:* = HALL_EVENT_TYPE.indexOf(_arg1);
if ((_local3 in HALL_TICKET_PRICE)){
_local2 = HALL_TICKET_PRICE[_local3].concat();
};
return (_local2);
}
public static function getHallAddEventPrice(_arg1:String):Array{
var _local2:* = [];
var _local3:* = HALL_EVENT_TYPE.indexOf(_arg1);
if ((_local3 in HALL_ADD_EVENT_PRICE)){
_local2 = HALL_ADD_EVENT_PRICE[_local3].concat();
};
return (_local2);
}
}
}//package Instance.constant
Section 38
//ComboList (Instance.constant.ComboList)
package Instance.constant {
import flash.display.*;
public class ComboList {
public static const BOOTH_AVAILABLE_LIST = [BoothDrugStore, BoothTattoo, BoothBabyShop, BoothGadget, BoothBookstore, BoothBoutique, BoothSalon, BoothMusic, BoothToyStore, BoothSport, BoothJewelry, BoothSupermarket, BoothCake, BoothIceCream, BoothBurger, BoothCandy, BoothSushi, BoothSteak, BoothCafe, BoothLiquor, BoothArcade, BoothCinema, Hall, FacilityRestroom, FacilityElevator, FacilityATM];
public static const COMBO_AVAILABLE = [[0, 0, -2, 0, 0, 0, -3, 0, 0, 2, 0, -2, -1, -2, -2, 0, -3, -2, 0, -1, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 2, 0, -1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0], [-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, -2, -1, -1, 0, -2, -2, -1, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 2, 3, 1, 0, 0, 2], [0, 2, 0, 3, 0, 0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 0, 0, 0, 0], [0, 0, 0, 0, 0, 2, 1, 0, 0, 0, 2, 0, 0, -2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2], [-3, -1, 0, 0, 0, 1, 0, 0, 0, -1, 1, 0, -2, -2, -1, -1, -1, -1, -1, -1, 0, 0, 0, -3, 0, 2], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0], [0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0], [2, 0, 0, 0, 2, 0, -1, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0], [0, 1, 0, 0, 0, 2, 1, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 3], [-2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2, 2, 2, 2, 2, 2, 0, 0, 0, -1, 0, 3], [-1, 0, -2, 0, 0, 0, -2, 0, 0, 0, 0, 2, 0, 1, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0], [-2, 0, -1, 0, 0, -2, -2, 0, 2, 2, 0, 2, 1, 2, 2, 3, 2, 2, 2, 1, 1, 3, 0, -1, 0, 0], [-2, 0, -1, 0, 0, 0, -1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 2, 0, -2, 0, 0], [0, 0, 0, 0, 0, 0, -1, 0, 2, 0, 0, 2, 0, 3, 0, 0, 0, 0, 0, 1, 3, 0, 0, 0, 0, 0], [-3, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 2, 0, 0, 0, 0, 0, -2, 0, 0], [-2, 0, -2, 0, 0, 0, -1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 2, 0, 1, 2, 0, 0, 0, -2, 0, 0], [0, -2, -1, 1, 0, 0, -1, 0, 0, 0, 0, 2, 0, 2, 0, 0, 0, 1, 0, 3, -2, 1, 0, 1, 0, 2], [-1, 0, 0, 0, 0, 0, -1, 0, 0, 0, 0, 2, 0, 1, 0, 1, 0, 2, 3, 0, 0, 1, 0, 1, 0, 1], [0, 0, 0, 2, 1, 0, 0, 0, 2, 0, 0, 0, 0, 1, 0, 3, 0, 0, -2, 0, 0, 0, 0, 1, 1, 1], [0, 0, 0, 3, 2, 0, 0, 0, 0, 0, 0, 0, 2, 3, 2, 0, 0, 0, 1, 1, 0, 0, 0, 2, 2, 2], [0, 0, 0, 1, 0, 0, 0, 3, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 2, 2], [0, 0, 0, 0, 0, 0, -3, 0, 0, 2, 0, -1, -2, -1, -2, 0, -2, -2, 1, 1, 1, 2, 0, 0, 2, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 2, 2, 0, 1], [0, 0, 0, 2, 0, 2, 2, 0, 0, 0, 3, 3, 0, 0, 0, 0, 0, 0, 2, 1, 1, 2, 3, 0, 1, 0]];
public static function getRelationOf(_arg1:Class, _arg2:Class):Number{
var _local3:* = 0;
var _local4:* = BOOTH_AVAILABLE_LIST.indexOf(_arg1);
var _local5:* = BOOTH_AVAILABLE_LIST.indexOf(_arg2);
if ((_local4 in COMBO_AVAILABLE)){
if ((_local5 in COMBO_AVAILABLE[_local4])){
_local3 = COMBO_AVAILABLE[_local4][_local5];
};
};
return (_local3);
}
}
}//package Instance.constant
Section 39
//ConversationList (Instance.constant.ConversationList)
package Instance.constant {
import Instance.modules.*;
import Instance.*;
public class ConversationList {
public static const TRANSPORT_PROBLEM = ["How I can reach &fn.", "I can't reach my destination yet.", "Wierd! There is no elevator\nnor escalator to access &fn."];
public static const CANT_GO_HOME = ["Help me! I was trapped here!", "Where the way to go home.", "I miss my home.", "Please help me to get out\nfrom this wierd mall!"];
public static const SEARCH_TOILET = ["I need to wash my hand.", "Nature's call. Have to hurry.", "I have to go to restroom."];
public static const NO_TOILET = [["No more restroom here? Too Bad.", "It's a great mall&spbut lack of restrooms."], ["I'll just go home&spand pee there.", "This mall will be good&spif more restrooms exist."], ["This mall is suck,&speven toilets are too little.", "Weird mall with less restroom."], ["Damn! Idiot architect has&spforgot to build more restroom.", "This is a suck mall that does not&spconsider the needs of visitor's sanitation."]];
public static const NO_ATM = ["Enough for today.&spI ran out of money.", "I wish I brought more money.", "I have to save my money.&spBetter go home now."];
public static const SEARCH_ATM = ["My money has runs out.", "I'll take my money from ATM&spso I can shop more", "Need to take money immediately!"];
public static const WANT_GO_HOME = [["Great mall but&spI have to go home now.", "Wonderful. I'll come&spback here next time."], ["Enough for today.", "I'd better to go home now."], ["This mall is suck.", "Maybe I won't come here again&spfor long time."], ["This is the worst place&spI have ever visited", "I will never come here anymore&spfor the entire of my life."]];
public static const SEARCH_DESTINATION = [["I think I got cold.", "I need lots of pills.", "Have to buy antibiotics&spfor my niece.", "Have to buy antibiotics&spfor my nephew.", "Have to buy antibiotics&spfor my daughter.", "Have to buy antibiotics&spfor my son.", "Have to buy medicine&spfor my niece.", "Have to buy medicine&spfor my nephew.", "Have to buy medicine&spfor my daughter.", "Have to buy medicine&spfor my son.", "Have to buy vitamin&spfor my niece.", "Have to buy vitamin&spfor my nephew.", "Have to buy vitamin&spfor my daughter.", "Have to buy vitamin&spfor my son.", "*coughing*", "*sneezing*"], ["Tribal tattoo would&splook nice on mine.", "I want a new tattoo&spon my back.", "Desperately want&spa tattoo on my neck.", "Body painting....&spSeems good."], ["New cloth for my child&spwill be nice.", "I want to buy pacifier.", "My baby diapers&spare running out."], ["My phone has broken.", "A new tablet would be cool.", "I think I need to&spbuy few battery for my phone."], ["Going to be a book-o-holic today.", "On the mood of reading romance story.", "Got to buy cooking magazines.", "New novel has been released."], ["Need &btqgen for tonight.", "Victoria's dress looks beautiful.", "My suit have just torn."], ["Need a haircut immediately!", "My nails need some treatment.", "Desperately want to dye my hair."], ["I want to buy a guitar.", "We need a new drum for our band.", "I want to practice violin&spbut I don't have violin.", "My trumpet has broken. Need to repair this."], ["My daughter wants a teddy bear.", "Need new toys for my son.", "New robot models have been launched.", "I need to complete&spthe 35th Super Ranger collection figure."], ["Need a new soccer ball.", "My baseball bat has broken.&spNeed a new one.", "I need a basket ball.", "I want a pair of shoes&splike David Backem's."], ["I want to buy a golden necklace.", "I'm searching for a pair&spof earrings for her gift.", "Need a diamond ring to propose &jwlgen.", "New bracelet will look good on me."], ["I want to buy fruits.", "I need spices.", "Today's menu is salad.", "I had to shop for household monthly."], ["Strawberry cake sounds yummy.", "My sister loves cakes.", "My brother loves cakes.", "Cream Cake... hmm."], ["I want a cup of&spvanilla sundae.", "I want a cup of&spchoco sundae.", "I want a cup of&spstrawberry sundae.", "Gelato ice cream...hmm.", "I want something&spsweet and cool."], ["A bite of delicious burger..hmmm.", "Cheese burger wanted!", "I miss american hotdog.", "I want french fries."], ["My child loves sweets.", "Some candies for&spher would be nice.", "Some candies for&sphim would be nice.", "Buy some milky candies for my grandma.", "I want something sweet."], ["Japanese food sounds good.", "I want a sushi!!!", "Salmon sushi looks tasty."], ["Need to satisfy&spmy stomach with some meat.", "Grill ribs sounds good.", "Black pepper steak wanted!", "Steak..steak..steak..."], ["Hmm.. Suddenly want&spsome caramel macchiato.", "Time to hang out..and&spa cup of capuccino.", "I'll just enjoy a glass of frapuccino."], ["Beer...Beer...Beer...", "Need some liquors for&sptonight's celebration.", "My babe would like a&spbottle of wine for dinner."], ["I want to play all day.", "Play a shooting game sounds great.", "Heard that they've opened&spa new arcade machine.", "I'll improve my Dance Dance Restoration&spskill today and beat my last score."], ["Tom Crush is starring on James Blonde.", "Hairy Potter is on the cinema.", "Transformen the movie in 3D now.", "Here comes AveRangers movie!!&spAsemble!!"]];
public static const WALKING_AROUND = ["I still have no destination yet.", "Maybe I'll just walking around&spbefore decide my next destination.", "Let see what available in this mall."];
public static var SEARCH_HALL = new Array();
public static var ANSWER_GREETING_1 = [[{comment:"Perfect!", nextComment:null}, {comment:"Great!", nextComment:null}], [{comment:"I'm fine!", nextComment:null}, {comment:"Not bad.", nextComment:null}], [{comment:"I'm not good today.", nextComment:null}, {comment:"I feel sick!", nextComment:null}], [{comment:"Don't talk with me now!\nI'm in bad mood!", nextComment:null}]];
public static var ANSWER_GREETING_2 = [[{comment:"Shoping of course.", nextComment:null}], [{comment:"I'm looking something tasty.", nextComment:null}], [{comment:"I was stress in home.\nMaybe I can enjoy somewhere else.", nextComment:null}], [{comment:"I don't know what\nI'm doing here.", nextComment:null}], [{comment:"Just walking around.", nextComment:null}]];
public static var ANSWER_GREETING_3 = [[{comment:"I wish to go &ds.&cn", nextComment:null}], [{comment:"Nowhere. I just walking around", nextComment:null}], [{comment:"I have to go home now."}]];
public static var TOILET_HURRY = [{comment:"Sorry! I'm in urgent.", nextComment:null}, {comment:"Nature's call. Sorry!", nextComment:null}];
public static var GREETING = [{comment:"Hi! How are you?", nextComment:ANSWER_GREETING_1}, {comment:"Hi pal!\nWhat are you doing here?", nextComment:ANSWER_GREETING_2}, {comment:"Hello!\nWhere are you going?", nextComment:ANSWER_GREETING_3}];
public static var ANSWER_TERRACE_1_1 = [{comment:"That's right.", nextComment:[{comment:"When they're suitable,\npopularity will be increased.", nextComment:[{comment:"But if they're not suitable,\npopularity will be decreased.", nextComment:null}]}], sameSpeaker:true}];
public static var ANSWER_TERRACE_1_2 = [{comment:"Oh really?", nextComment:[{comment:"I wish I can met anyone here", nextComment:null}], sameSpeaker:true}];
public static var ANSWER_TERRACE_1_3_1 = [{comment:"Don't worry about it.", nextComment:[{comment:"They can be neutralized\nby security.", nextComment:null, tipsCode:"antiVillain"}], sameSpeaker:true}];
public static var ANSWER_TERRACE_1_3 = [{comment:"I often see them throw dump anywhere.", nextComment:ANSWER_TERRACE_1_3_1}];
public static var ANSWER_TERRACE_1_4 = [{comment:"Don't worry.\nYou can use ATM.", nextComment:null, tipsCode:"atmFunction"}];
public static var ANSWER_TERRACE_1_5 = [{comment:"That's right. But when hiring staff their\nwork area will be set at the spesific floor.", nextComment:null, tipsCode:"shiftKey"}];
public static var ANSWER_TERRACE_1 = [{comment:"Each booth has compatibility one to another.", nextComment:ANSWER_TERRACE_1_1, tipsCode:"boothCompatibility"}, {comment:"Any celebrities will come this mall\nif several conditions are fulfilled.", nextComment:ANSWER_TERRACE_1_2, tipsCode:"specialVisitorArrival"}, {comment:"Someone with red bandanda is a bad person.", nextComment:ANSWER_TERRACE_1_3, sameSpeaker:true}, {comment:"If I bring more money I can spend more.", nextComment:[{comment:"But I'm afraid to bring too much.", nextComment:ANSWER_TERRACE_1_4}], sameSpeaker:true}, {comment:"By hold SHIFT key when when building or hiring staff\ncan make duplicate repeat the action quickly", nextComment:ANSWER_TERRACE_1_5}];
public static var ANSWER_TERRACE_2_1 = [{comment:"Because we can find restroom faster.", nextComment:[{comment:"It's waste time if have to go up and down\njust to find a restroom.", nextComment:[{comment:"Hey! You're right!", nextComment:null}]}], sameSpeaker:true, tipsCode:"restroomEffectiveity"}];
public static var ANSWER_TERRACE_2_2 = [{comment:"Restroom and food booth is not\nsuitable because of stink or something.", nextComment:[{comment:"Oh.. I see", nextComment:null}], tipsCode:"restroomNotCompatible"}];
public static var ANSWER_TERRACE_2_3 = [{comment:"They are people you know. They're entertainers.\nThey're hired to make us happy.", nextComment:[{comment:"Hmmm. I think there are\npeople like that too here.", nextComment:null}], tipsCode:"entertainer"}];
public static var ANSWER_TERRACE_2 = [{comment:"They build restroom at each floor.\nWhy they're doing that?", nextComment:ANSWER_TERRACE_2_1}, {comment:"They never build restroom and\nfood booth in the adjacent.", nextComment:ANSWER_TERRACE_2_2}, {comment:"They have many stuffed animals.\nWhat are they anyway?", nextComment:ANSWER_TERRACE_2_3}];
public static var ANSWER_TERRACE_3_FIN = [{comment:"Everything has adventage\nand disadventage.", nextComment:null, tipsCode:"elevatorAndEscalator"}];
public static var ANSWER_TERRACE_3_1 = [{comment:"But it has limited capacity.", nextComment:ANSWER_TERRACE_3_FIN}];
public static var ANSWER_TERRACE_3_2 = [{comment:"But it moves slowly.", nextComment:ANSWER_TERRACE_3_FIN}];
public static var ANSWER_TERRACE_3 = [{comment:"Elevator. Because it moves faster.", nextComment:ANSWER_TERRACE_3_1}, {comment:"Escalator. Because I don't need to wait.", nextComment:ANSWER_TERRACE_3_2}];
public static var TERRACE = [{comment:"Hey do you know about this?", nextComment:ANSWER_TERRACE_1, sameSpeaker:true}, {comment:"I heard rumor about\nnext town mall.", nextComment:ANSWER_TERRACE_2, sameSpeaker:true}, {comment:"Which one do you like better?\nElevator or Escalator?", nextComment:ANSWER_TERRACE_3}];
public static function getRandomConversation(_arg1:Object, _arg2:Object):Object{
var _local3:* = null;
var _local4:* = null;
if (_arg2 == GREETING){
_local4 = _arg2;
} else {
if (_arg2 == ANSWER_GREETING_1){
if (_arg1.needToGo()){
_local4 = TOILET_HURRY;
} else {
_local4 = _arg2[(3 - _arg1.statification)];
};
} else {
if (_arg2 == ANSWER_GREETING_2){
if (_arg1.needToGo()){
_local4 = TOILET_HURRY;
} else {
if (BoothList.GENERAL_STORE_LIST.indexOf(_arg1.currentDestination) >= 0){
_local4 = _arg2[0];
} else {
if (BoothList.FOOD_CENTER_LIST.indexOf(_arg1.currentDestination) >= 0){
_local4 = _arg2[1];
} else {
if (BoothList.ENTERTAINMENT_LIST.indexOf(_arg1.currentDestination) >= 0){
_local4 = _arg2[2];
} else {
if (_arg1.destinationTargetList.length > 0){
_local4 = _arg2[3];
} else {
_local4 = _arg2[4];
};
};
};
};
};
} else {
if (_arg2 == ANSWER_GREETING_3){
if (_arg1.currentDestination != null){
_local4 = _arg2[0];
} else {
if (_arg1.goHome){
_local4 = _arg2[2];
} else {
_local4 = _arg2[1];
};
};
} else {
_local4 = _arg2;
};
};
};
};
var _local5:* = Utility.cloning(_local4[Math.floor((Math.random() * _local4.length))]);
var _local6:* = _local5.comment;
if (_arg1.destinationTargetList.length > 0){
_local6 = _local6.replace(/&ds/g, ("to " + BoothList.compareShowNameByType(_arg1.destinationTargetList[0]).toLowerCase()));
if (!_arg1.needToGo()){
if ((((_arg1.currentDestination == null)) || ((_arg1.currentDestination is FacilityTerrace)))){
_local6 = _local6.replace(/&cn/g, "\nBut I have not found it yet.");
} else {
if ((_arg1.currentDestination is _arg1.destinationTargetList[0])){
_local6 = _local6.replace(/&cn/g, "\nI need something there");
} else {
_local6 = _local6.replace(/&cn/g, "\nBut I have to go somewhere else.");
};
};
} else {
_local6 = _local6.replace(/&cn/g, "\nBut I will search a restroom first.");
};
} else {
if (((!((_arg1.currentDestination == null))) && (!((_arg1.currentDestination is FacilityTerrace))))){
_local6 = _local6.replace(/&ds/g, ("to " + BoothList.compareShowNameByType(Utility.getClass(_arg1.currentDestination)).toLowerCase()));
if (_arg1.needToGo()){
_local6 = _local6.replace(/&cn/g, "\nBut I will search a restroom first.");
} else {
if ((_arg1.currentDestination is FacilityATM)){
_local6 = _local6.replace(/&cn/g, "\nLooks like the money that I brought was not enough.");
} else {
_local6 = _local6.replace(/&cn/g, "\nThere seems to be something good there.");
};
};
} else {
if (!_arg1.goHome){
_local6 = _local6.replace(/&ds/g, "anywhere");
_local6 = _local6.replace(/&cn/g, "");
} else {
_local6 = _local6.replace(/&ds/g, "home");
_local6 = _local6.replace(/&cn/g, "");
};
};
};
_local5.comment = _local6;
_local3 = _local5;
return (_local3);
}
public static function getSingleConversation(_arg1:Object, _arg2:Array):String{
var _local5:*;
var _local6:*;
var _local3:* = _arg1.world;
var _local4:* = "";
if (!(_arg1 as VisitorSpecial)){
_local4 = ((_arg2.length > 0)) ? _arg2[Math.floor((Math.random() * _arg2.length))] : "";
if (_arg2 == TRANSPORT_PROBLEM){
_local5 = ((_arg1.restRoomTarget)!=null) ? _arg1.restRoomTarget.onFloor : ((_arg1.currentDestination)!=null) ? _arg1.currentDestination.onFloor : null;
_local6 = ((_local5)==null) ? "ground floor" : ("floor " + (_local3.floorList.indexOf(_local5) + 1));
_local4 = _local4.replace(/&fn/g, _local6);
} else {
if (SEARCH_DESTINATION.indexOf(_arg2) >= 0){
_local4 = _local4.replace(/&btqgen/g, (_arg1.gender) ? "tuxedo" : "gown");
_local4 = _local4.replace(/&jwlgen/g, (_arg1.gender) ? "her" : "him");
};
};
} else {
_local4 = SpecialVisitorConversation.getSingleConversation(_arg1, _arg2);
};
return (_local4);
}
public static function getConversationDestinationArray(_arg1:Object):Array{
var _local2:* = new Array();
if (!(_arg1 as VisitorSpecial)){
_local2 = getDestinationArray(_arg1);
} else {
_local2 = SpecialVisitorConversation.getConversationDestinationArray(_arg1);
};
return (_local2);
}
public static function getDestinationArray(_arg1:Object):Array{
var _local3:*;
var _local2:* = new Array();
if ((((_arg1.currentDestination is Hall)) && (!((_arg1.currentDestination.currentEvent == BoothHall.NONE))))){
if ((_arg1.currentDestination.currentEvent in SEARCH_HALL)){
_local2 = SEARCH_HALL[_arg1.currentDestination.currentEvent];
};
} else {
if (_arg1.destinationTargetList.length > 0){
_local3 = BoothList.BOOTH_AVAILABLE.indexOf(_arg1.destinationTargetList[0]);
if ((_local3 in SEARCH_DESTINATION)){
_local2 = SEARCH_DESTINATION[_local3];
};
} else {
if (((!((_arg1.currentDestination == null))) && (!((_arg1.currentDestination is FacilityTerrace))))){
_local3 = BoothList.BOOTH_AVAILABLE.indexOf(Utility.getClass(_arg1.currentDestination));
if ((_local3 in SEARCH_DESTINATION)){
_local2 = SEARCH_DESTINATION[_local3];
};
} else {
_local2 = WALKING_AROUND;
};
};
};
return (_local2);
}
public static function getHomeConversationArray(_arg1:Object):Array{
var _local2:* = new Array();
if (!(_arg1 as VisitorSpecial)){
_local2 = WANT_GO_HOME[(3 - _arg1.statification)];
} else {
_local2 = SpecialVisitorConversation.getHomeConversationArray(_arg1);
};
return (_local2);
}
public static function getNotFoundRestroomArray(_arg1:Object):Array{
var _local2:* = new Array();
if (!(_arg1 as VisitorSpecial)){
_local2 = NO_TOILET[(3 - _arg1.statification)];
} else {
_local2 = SpecialVisitorConversation.getHomeConversationArray(_arg1);
};
return (_local2);
}
public static function getInitialConversation(_arg1:Array):Object{
var _local2:* = null;
if (_arg1.length >= 0){
_local2 = _arg1[Math.floor((Math.random() * _arg1.length))];
};
return (_local2);
}
public static function getConversationType(_arg1:String):Array{
var _local2:* = new Array();
if (_arg1 == "Greet"){
_local2 = GREETING.concat();
} else {
if (_arg1 == "Terrace"){
_local2 = TERRACE.concat();
if (Calculate.chance(60)){
if ((2 in _local2)){
_local2.splice(2, 1);
};
};
};
};
return (_local2);
}
SEARCH_HALL["Car Show"] = ["I love car stuffs", "Car exhibition is the&spreason why I came here today", "I want to see the cars,&spI think they're cool"];
SEARCH_HALL["Electronic Expo"] = ["I heard that there is electronic sale here", "The New OhPad5 has been released.&spI should check it on the exhibition", "Need new LCD TV", "My speaker has just broken"];
SEARCH_HALL["Live Concert"] = ["I hope I can make it to the live concert", "Sinking Park is on stage, man!", "I heard the live was cool,&spI need to see them myself"];
SEARCH_HALL["Orchestra"] = ["Hurry, hurry,&spI can't miss the glamorous orchestra", "The conductor is a famous one,&spI have to see the concert", "The harmony sounds so elegant"];
}
}//package Instance.constant
Section 40
//DefaultSetting (Instance.constant.DefaultSetting)
package Instance.constant {
import flash.display.*;
public class DefaultSetting {
public static const QUALITY = StageQuality.HIGH;
public static const VOLUME = 0.8;
public static const TUTORIAL_SHOWN = true;
public static const CAMERA_SHOWN = true;
}
}//package Instance.constant
Section 41
//FavoriteList (Instance.constant.FavoriteList)
package Instance.constant {
import flash.display.*;
import Instance.modules.*;
public class FavoriteList {
public static const COUNTRY_LIST = [ShopText.MAP_INDIA, ShopText.MAP_RUSIA, ShopText.MAP_ARABIAN, ShopText.MAP_ITALY, ShopText.MAP_BRITAIN];
public static const COUNTRY_FAVORITE_LIST = [[BoothBurger, BoothBurger, BoothBurger, BoothSupermarket, BoothSupermarket, BoothSupermarket, null, null, null, null], [BoothTattoo, BoothTattoo, BoothCandy, BoothCandy, BoothArcade, BoothArcade, BoothLiquor, null, null], [BoothLiquor, BoothLiquor, BoothSteak, BoothSteak, BoothSteak, BoothCinema, BoothCinema, BoothGadget, null], [BoothSport, BoothSport, BoothSushi, BoothSushi, BoothSteak, BoothLiquor, BoothMusic, BoothMusic, BoothMusic, null], [BoothMusic, BoothMusic, BoothBoutique, BoothBoutique, BoothBoutique, BoothToyStore, BoothToyStore, BoothSalon, BoothSalon, null]];
public static const VISITOR_TYPE_LIST = [VisitorAfro, VisitorAfroFemale, VisitorArabian, VisitorAsianFemale, VisitorAsianMale, VisitorAwam, VisitorBlondie, VisitorBrewok, VisitorCheerGirl, VisitorHiphop, VisitorIndiaFemale, VisitorIndiaMale, VisitorKutungan, VisitorNegroFemale, VisitorNegroMale, VisitorNerd, VisitorPunk, VisitorReggae, VisitorTeenGirl, VisitorWenart];
public static const VISITOR_FAVORITE_LIST = [[BoothCinema, BoothCinema, BoothCinema, BoothSteak, BoothSteak, BoothSteak, BoothMusic, BoothMusic, null, null], [BoothCafe, BoothCafe, BoothCafe, BoothCafe, BoothBabyShop, BoothBabyShop, BoothBabyShop, BoothSupermarket, BoothSupermarket, null], [BoothJewelry, BoothJewelry, BoothJewelry, BoothJewelry, BoothSteak, BoothSteak, BoothSteak, null, null], [BoothCandy, BoothCandy, BoothCandy, BoothCandy, BoothIceCream, BoothIceCream, BoothIceCream, BoothBabyShop, BoothBabyShop, null], [BoothSushi, BoothSushi, BoothSushi, BoothSushi, BoothToyStore, BoothToyStore, BoothToyStore, BoothToyStore, BoothBoutique, null], [BoothBurger, BoothBurger, BoothBurger, BoothBurger, BoothBookstore, BoothBookstore, BoothGadget, BoothGadget, null, null], [BoothBoutique, BoothBoutique, BoothBoutique, BoothBoutique, BoothSalon, BoothSalon, BoothSalon, BoothSalon, BoothBabyShop, null], [BoothBurger, BoothBurger, BoothBurger, BoothBurger, BoothBurger, BoothIceCream, BoothIceCream, BoothTattoo, null], [BoothBoutique, BoothBoutique, BoothSalon, BoothSalon, BoothJewelry, BoothCafe, BoothCafe, null, null], [BoothTattoo, BoothTattoo, BoothTattoo, BoothLiquor, BoothLiquor, BoothCafe, BoothCafe, BoothCinema, BoothCinema, null], [BoothBoutique, BoothBoutique, BoothBoutique, BoothBoutique, BoothSalon, BoothSalon, BoothSalon, BoothCake, BoothCinema, null], [BoothBookstore, BoothBookstore, BoothBookstore, BoothBookstore, BoothSushi, BoothSushi, BoothSushi, BoothSupermarket, BoothSupermarket, null], [BoothSushi, BoothSushi, BoothSushi, BoothSport, BoothSport, BoothSport, BoothArcade, BoothArcade, BoothBurger, null], [BoothSupermarket, BoothSupermarket, BoothSupermarket, BoothSupermarket, BoothSalon, BoothSalon, BoothIceCream, BoothIceCream, null, null], [BoothSupermarket, BoothSupermarket, BoothSupermarket, BoothSport, BoothSport, BoothSport, BoothSteak, BoothSteak, BoothSteak, null], [BoothBookstore, BoothBookstore, BoothBookstore, BoothBookstore, BoothCake, BoothCake, BoothSushi, BoothSushi, BoothDrugStore, null], [BoothArcade, BoothArcade, BoothArcade, BoothBurger, BoothBurger, BoothBurger, BoothIceCream, BoothIceCream, BoothIceCream, null], [BoothCafe, BoothCafe, BoothCafe, BoothDrugStore, BoothDrugStore, BoothDrugStore, BoothSalon, BoothSalon, BoothSalon, null], [BoothMusic, BoothMusic, BoothMusic, BoothCandy, BoothCandy, BoothCandy, BoothSport, BoothSport, BoothSport, null], [BoothArcade, BoothArcade, BoothArcade, BoothArcade, BoothToyStore, BoothToyStore, BoothToyStore, BoothToyStore, BoothCafe, null]];
public static var SPECIAL_VISITOR_FAVORITE_LIST:Array = new Array();
public static function getRandomFavorite(_arg1:MovieClip):Class{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local2:* = null;
var _local3:* = VISITOR_TYPE_LIST.indexOf(Utility.getClass(_arg1));
if ((_local3 in VISITOR_FAVORITE_LIST)){
_local7 = Math.floor((Math.random() * VISITOR_FAVORITE_LIST[_local3].length));
_local8 = VISITOR_FAVORITE_LIST[_local3][_local7];
};
var _local4:* = _arg1.world;
var _local5:* = _local4.main;
var _local6:* = COUNTRY_LIST.indexOf(_local5.country);
if ((_local6 in COUNTRY_FAVORITE_LIST)){
_local9 = Math.floor((Math.random() * COUNTRY_FAVORITE_LIST[_local6].length));
_local10 = COUNTRY_FAVORITE_LIST[_local6][_local9];
};
if (Calculate.chance(60)){
_local2 = _local8;
} else {
_local2 = _local10;
};
return (_local2);
}
public static function getSpecialFavorite(_arg1:Class):Array{
var _local2:* = new Array();
if ((_arg1 in SPECIAL_VISITOR_FAVORITE_LIST)){
_local2 = SPECIAL_VISITOR_FAVORITE_LIST[_arg1].concat();
};
return (_local2);
}
SPECIAL_VISITOR_FAVORITE_LIST[VisitorAlnord] = [BoothSport, BoothSport, BoothSport, BoothSteak, BoothSteak, BoothDrugStore, BoothDrugStore, BoothCinema, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorChuckNourish] = [BoothArcade, BoothArcade, BoothArcade, BoothSport, BoothSport, BoothSport, BoothBurger, BoothBurger, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorDustbinBiebir] = [BoothBabyShop, BoothBabyShop, BoothBabyShop, BoothSalon, BoothSalon, BoothSalon, BoothCandy, BoothCandy, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorKateCentertown] = [BoothJewelry, BoothJewelry, BoothJewelry, BoothJewelry, BoothCafe, BoothCafe, BoothCafe, BoothBoutique, BoothBoutique, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorKatyBerry] = [BoothSalon, BoothSalon, BoothSalon, BoothSalon, BoothMusic, BoothMusic, BoothDrugStore, BoothDrugStore, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorKezya] = [BoothMusic, BoothMusic, BoothMusic, BoothIceCream, BoothIceCream, BoothLiquor, BoothLiquor, BoothBookstore, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorLadyGogo] = [BoothArcade, BoothArcade, BoothArcade, BoothSushi, BoothSushi, BoothTattoo, BoothTattoo, BoothCandy, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorMeleeCyrus] = [BoothJewelry, BoothJewelry, BoothJewelry, BoothBoutique, BoothBoutique, BoothLiquor, BoothLiquor, BoothCake, BoothCake, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorMrPeanut] = [BoothToyStore, BoothToyStore, BoothSupermarket, BoothSupermarket, BoothCinema, BoothArcade, null, null, null, null];
SPECIAL_VISITOR_FAVORITE_LIST[VisitorSteveWork] = [BoothGadget, BoothGadget, BoothGadget, BoothBookstore, BoothBookstore, BoothCinema, BoothCinema, null, null, null];
}
}//package Instance.constant
Section 42
//MissionList (Instance.constant.MissionList)
package Instance.constant {
public class MissionList {
public static var MISSION_DATA:Array = new Array();
public static function getMission(_arg1:String, _arg2:uint):Object{
var _local3:* = null;
if ((_arg1 in MISSION_DATA)){
if ((_arg2 in MISSION_DATA[_arg1])){
_local3 = MISSION_DATA[_arg1][_arg2];
};
};
return (_local3);
}
public static function isLastMission(_arg1:String, _arg2:uint):Object{
var _local3:* = false;
if ((_arg1 in MISSION_DATA)){
_local3 = (_arg2 == (MISSION_DATA[_arg1].length - 1));
};
return (_local3);
}
public static function isAllMissionComplete(_arg1:String, _arg2:uint):Object{
var _local3:* = false;
if ((_arg1 in MISSION_DATA)){
_local3 = (_arg2 > (MISSION_DATA[_arg1].length - 1));
};
return (_local3);
}
public static function checkMission(_arg1:Object, _arg2:Object):Boolean{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local3:* = false;
var _local4:* = _arg2.condition;
var _local5:* = new Array();
while (_local4.indexOf(" ") >= 0) {
_local7 = _local4.substr(0, _local4.indexOf(" "));
_local4 = _local4.substr((_local4.indexOf(" ") + 1));
_local5.push(_local7);
};
if (_local4.length > 0){
_local5.push(_local4);
};
var _local6:* = 0;
while (_local6 < _local5.length) {
if (["booth", "visitor", "janitor", "electrician", "security", "entertainer", "staff", "restroom", "elevator", "escalator", "upperEscalator", "atm", "terrace", "statisfied", "extra", "parking", "subway"].indexOf(_local5[_local6]) >= 0){
_local8 = new Array();
switch (_local5[_local6]){
case "booth":
_local8 = _arg1.boothList.concat();
break;
case "visitor":
_local8 = _arg1.visitorList.concat(_arg1.visitorVillainList.concat(_arg1.visitorSpecialList));
break;
case "janitor":
_local8 = _arg1.janitorList.concat();
break;
case "electrician":
_local8 = _arg1.electricianList.concat();
break;
case "security":
_local8 = _arg1.securityList.concat();
break;
case "entertainer":
_local8 = _arg1.entertainerList.concat();
break;
case "staff":
_local8 = _arg1.janitorList.concat(_arg1.electricianList.concat(_arg1.securityList.concat(_arg1.entertainerList)));
break;
case "restroom":
_local8 = _arg1.restroomList.concat();
break;
case "elevator":
_local8 = _arg1.elevatorList.concat();
break;
case "escalator":
_local8 = _arg1.escalatorList.concat();
break;
case "upperEscalator":
_local8 = getUpperEscalator(_arg1);
break;
case "atm":
_local8 = _arg1.atmList.concat();
break;
case "terrace":
_local8 = _arg1.terraceList.concat();
break;
case "parking":
_local8 = _arg1.parkingList.concat();
break;
case "subway":
_local8 = _arg1.subwayList.concat();
break;
case "statisfied":
_local8 = getStatisfiedVisitor(_arg1);
break;
case "extra":
_local8 = _arg1.upgradePurchaseList.concat();
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local6++;
_local3 = ((_local9)=="==") ? (_local8.length == _local10) : ((_local9)=="<") ? (_local8.length < _local10) : ((_local9)==">") ? (_local8.length > _local10) : ((_local9)=="<=") ? (_local8.length <= _local10) : ((_local9)==">=") ? (_local8.length >= _local10) : false;
} else {
if (["banditCaptured", "popularity", "spVisitor", "villainCaptured", "cash", "profit", "comboFound", "floorNum", "banditCapturedOneNight", "transfer", "hallLevel"].indexOf(_local5[_local6]) >= 0){
_local11 = 0;
switch (_local5[_local6]){
case "banditCaptured":
_local11 = _arg1.banditCaptured;
break;
case "banditCapturedOneNight":
_local11 = _arg1.banditCaptured;
break;
case "popularity":
_local11 = Math.round(_arg1.popularity);
break;
case "villainCaptured":
_local11 = _arg1.villainCaptured;
break;
case "cash":
_local11 = _arg1.cash;
break;
case "profit":
_local11 = _arg1.profit;
break;
case "floorNum":
_local11 = _arg1.countFloorNumber();
break;
case "spVisitor":
_local11 = _arg1.numberSpecialVisitorVisitToday();
break;
case "transfer":
_local11 = _arg1.getCurrentTransferAmount();
break;
case "hallLevel":
_local11 = _arg1.getCurrentHallLevel();
break;
case "comboFound":
_local11 = _arg1.missionVar;
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local6++;
_local3 = ((_local9)=="==") ? (_local11 == _local10) : ((_local9)=="<") ? (_local11 < _local10) : ((_local9)==">") ? (_local11 > _local10) : ((_local9)=="<=") ? (_local11 <= _local10) : ((_local9)==">=") ? (_local11 >= _local10) : false;
} else {
if (["hall", "boothComplete", "extraComplete", "safeYourMall", "spVisitorComplete"].indexOf(_local5[_local6]) >= 0){
switch (_local5[_local6]){
case "hall":
_local3 = !((_arg1.hall == null));
break;
case "boothComplete":
_local3 = _arg1.haveAllBooth();
break;
case "extraComplete":
_local3 = _arg1.haveAllExtraUpgrade();
break;
case "safeYourMall":
_local3 = _arg1.yourMallIsSafeToday();
break;
case "spVisitorComplete":
_local3 = _arg1.haveAllSpecialVisitor();
break;
};
_local6++;
} else {
if (_local5[_local6].indexOf("(") >= 0){
_local12 = _local5[_local6].substr(0, _local5[_local6].indexOf("("));
_local13 = _local5[_local6].substring((_local5[_local6].indexOf("(") + 1), _local5[_local6].indexOf(")"));
if (["boothFloor", "staffLevel", "boothLevel", "boothType", "elevatorLevel", "escalatorLevel", "parkingLevel"].indexOf(_local12) >= 0){
_local8 = new Array();
switch (_local12){
case "boothFloor":
_local8 = getBoothOnFloor(_arg1, _local13);
break;
case "staffLevel":
_local8 = getStaffLevel(_arg1, _local13);
break;
case "boothLevel":
_local8 = getBoothLevel(_arg1, _local13);
break;
case "elevatorLevel":
_local8 = getElevatorLevel(_arg1, _local13);
break;
case "escalatorLevel":
_local8 = getEscalatorLevel(_arg1, _local13);
break;
case "boothType":
_local8 = _arg1.getBoothOf(BoothList.compareTypeByName(_local13));
break;
case "parkingLevel":
_local8 = getParkingLevel(_arg1, _local13);
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local6++;
_local3 = ((_local9)=="==") ? (_local8.length == _local10) : ((_local9)=="<") ? (_local8.length < _local10) : ((_local9)==">") ? (_local8.length > _local10) : ((_local9)=="<=") ? (_local8.length <= _local10) : ((_local9)==">=") ? (_local8.length >= _local10) : false;
} else {
if (["runEvent", "extraExcept"].indexOf(_local12) >= 0){
_local14 = _local13.replace(/_/g, " ");
switch (_local12){
case "extraExcept":
_local15 = _arg1.upgradePurchaseList.concat();
_local16 = _local15.indexOf(_arg1.getUpgradeByName(_local14));
if ((_local16 in _local15)){
_local15.splice(_local16, 1);
};
_local11 = _local15.length;
break;
case "runEvent":
_local11 = _arg1.getRunEvent(_local14);
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local6++;
_local3 = ((_local9)=="==") ? (_local11 == _local10) : ((_local9)=="<") ? (_local11 < _local10) : ((_local9)==">") ? (_local11 > _local10) : ((_local9)=="<=") ? (_local11 <= _local10) : ((_local9)==">=") ? (_local11 >= _local10) : false;
} else {
if (["extraType", "spVisitorType", "hallEvent", "boothCompleteLevel"].indexOf(_local12) >= 0){
_local14 = _local13.replace(/_/g, " ");
switch (_local12){
case "extraType":
_local3 = _arg1.checkUpgradeByName(_local14);
break;
case "spVisitorType":
_local3 = _arg1.haveSpecialVisitorByName(_local14);
break;
case "hallEvent":
_local3 = _arg1.haveCurrentEvent(_local14);
break;
case "boothCompleteLevel":
_local3 = _arg1.haveAllBooth(Number(_local14));
break;
};
_local6++;
} else {
if (_local13.indexOf(",") >= 0){
_local17 = new Array();
_local14 = _local13.replace(/_/g, " ");
while (_local14.indexOf(",") >= 0) {
_local17.push(_local14.substr(0, _local14.indexOf(",")));
_local14 = _local14.substr((_local14.indexOf(",") + 1));
};
if (_local14.length > 0){
_local17.push(_local14);
};
switch (_local12){
case "boothLevelType":
_local8 = _arg1.getBoothTypeByLevel(BoothList.compareTypeByName(_local17[0]), Number(_local17[1]));
break;
};
_local6++;
_local9 = _local5[_local6];
_local6++;
_local10 = Number(_local5[_local6]);
_local6++;
_local3 = ((_local9)=="==") ? (_local8.length == _local10) : ((_local9)=="<") ? (_local8.length < _local10) : ((_local9)==">") ? (_local8.length > _local10) : ((_local9)=="<=") ? (_local8.length <= _local10) : ((_local9)==">=") ? (_local8.length >= _local10) : false;
} else {
_local6++;
};
};
};
};
} else {
if (_local5[_local6] == "||"){
if (_local3){
break;
};
} else {
if (_local5[_local6] == "&&"){
if (!_local3){
break;
};
};
};
_local6++;
};
};
};
};
};
return (_local3);
}
public static function getStatisfiedVisitor(_arg1:Object):Array{
var _local2:* = new Array();
var _local3:* = _arg1.visitorList.concat(_arg1.visitorVillainList.concat(_arg1.visitorSpecialList));
var _local4:* = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].statification == 3){
_local2.push(_local3[_local4]);
};
_local4++;
};
return (_local2);
}
public static function getBoothOnFloor(_arg1:Object, _arg2:int):Array{
var _local5:*;
var _local3:* = new Array();
var _local4:* = 0;
while (_local4 < _arg1.boothList.length) {
_local5 = _arg1.boothList[_local4];
if (_arg1.floorList.indexOf(_local5.onFloor) == _arg2){
_local3.push(_local5);
};
_local4++;
};
return (_local3);
}
public static function getStaffLevel(_arg1:Object, _arg2:uint):Array{
var _local6:*;
var _local3:* = new Array();
var _local4:* = _arg1.janitorList.concat(_arg1.electricianList.concat(_arg1.securityList.concat(_arg1.entertainerList)));
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.employeeLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public static function getBoothLevel(_arg1:Object, _arg2:uint):Array{
var _local6:*;
var _local3:* = new Array();
var _local4:* = _arg1.boothList;
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.boothLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public static function getEscalatorLevel(_arg1:Object, _arg2:uint):Array{
var _local6:*;
var _local3:* = new Array();
var _local4:* = _arg1.escalatorList;
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.boothLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public static function getElevatorLevel(_arg1:Object, _arg2:uint):Array{
var _local6:*;
var _local3:* = new Array();
var _local4:* = _arg1.elevatorList;
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.boothLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public static function getParkingLevel(_arg1:Object, _arg2:uint):Array{
var _local6:*;
var _local3:* = new Array();
var _local4:* = _arg1.parkingList;
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.boothLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public static function getUpperEscalator(_arg1:Object):Array{
var _local4:*;
var _local2:* = [];
var _local3:* = 0;
while (_local3 < _arg1.escalatorList.length) {
_local4 = _arg1.escalatorList[_local3];
if (_local4.y <= 0){
_local2.push(_local4);
};
_local3++;
};
return (_local2);
}
MISSION_DATA[ShopText.MAP_INDIA] = [{note:"Build a booth", condition:"booth >= 1", reward:50}, {note:"Have a visitor visits your mall", condition:"visitor >= 1", reward:100}, {note:"Hire a janitor", condition:"janitor >= 1", reward:100}, {note:"Hire an electrician", condition:"electrician >= 1", reward:100}, {note:"Build 3 booths", condition:"booth >= 3", reward:500}, {note:"Build a parking lot (now it's free)", condition:"parking >= 1", reward:500}, {note:"Build a restroom", condition:"restroom >= 1", reward:200}, {note:"Hire a security", condition:"security >= 1", reward:100}, {note:"Build an elevator/escalator to access upper floor", condition:"elevator >= 1 || upperEscalator >= 1", reward:200}, {note:"Build a booth at first floor", condition:"boothFloor(0) >= 1", reward:200}, {note:"Hire an entertainer", condition:"entertainer >= 1", reward:100}, {note:"Make at least a visitor happy", condition:"statisfied >= 1", reward:700}, {note:"Raise your popularity to 25%", condition:"popularity >= 25", reward:1000}, {note:"Have 20 visitors visit your mall", condition:"visitor >= 20", reward:1000}, {note:"Catch a bandit", condition:"banditCaptured >= 1", reward:1500}, {note:"Have one of your staff promoted", condition:"staffLevel(2) >= 1", reward:500}, {note:"Build a Terrace", condition:"terrace >= 1", reward:500}, {note:"Build an ATM", condition:"atm >= 1", reward:500}, {note:"A special visitor visits your mall", condition:"spVisitor >= 1", reward:1500}, {note:"Purchase an extra upgrade other than Basement Lv 1", condition:"extraExcept(Basement_Lv_1) >= 1", reward:2000}, {note:"Neutralized a villain visitor", condition:"villainCaptured >= 1", reward:1500}, {note:"Have one of your booth upgraded", condition:"boothLevel(2) >= 1", reward:2000}, {note:"Raise your popularity to 50%", condition:"popularity >= 50", reward:3000}, {note:"Earn $10,000 profit", condition:"profit >= 10000", reward:"Unlock Rusia"}];
MISSION_DATA[ShopText.MAP_RUSIA] = [{note:"Build tattoo shop", condition:"boothType(Tattoo) >= 1", reward:100}, {note:"Build Candy Castle", condition:"boothType(Candy) >= 1", reward:200}, {note:"Raise your popularity to 25%", condition:"popularity >= 25", reward:500}, {note:"Build 3 floors", condition:"floorNum >= 3", reward:1000}, {note:"Hire 4 entertainers", condition:"entertainer >= 4", reward:1500}, {note:"Have 30 visitors visit your mall", condition:"visitor >= 30", reward:2000}, {note:"Catch 3 bandits in one night", condition:"banditCapturedOneNight >= 3", reward:3000}, {note:"Promote 2 staffs", condition:"staffLevel(2) >= 2", reward:1000}, {note:"Build Liquor Shop", condition:"boothType(Liquor) >= 1", reward:400}, {note:"Purchase Super Mop (Extra Upgrade)", condition:"extraType(Super_Mop)", reward:2000}, {note:"Build an Arcade", condition:"boothType(Arcade) >= 1", reward:700}, {note:"Purchase Basement Lv 1 (Extra Upgrade)", condition:"extraType(Basement_Lv_1)", reward:7500}, {note:"Being visited by Lady Gogo", condition:"spVisitorType(Lady_Gogo)", reward:2000}, {note:"Purchase Super Shoes (Extra upgrades)", condition:"extraType(Super_Shoes)", reward:3000}, {note:"Have 5 upgraded booths", condition:"boothLevel(2) >= 5", reward:5000}, {note:"Purchase Special Trolley (Extra upgrades)", condition:"extraType(Special_Trolley)", reward:5000}, {note:"Build hall", condition:"hall", reward:5000}, {note:"Upgrade an Arcade to Lv.3", condition:"boothLevelType(Arcade,3) >= 1", reward:5000}, {note:"Hold Car Show Event", condition:"hallEvent(Car_Show)", reward:1500}, {note:"Earn $20,000 profit", condition:"profit >= 10000", reward:"Unlock Arabia"}];
MISSION_DATA[ShopText.MAP_ARABIAN] = [{note:"Build a gadget shop", condition:"boothType(Gadget) >= 1", reward:100}, {note:"Raise your popularity to 25%", condition:"popularity >= 25", reward:1000}, {note:"Have 7 booths", condition:"booth >= 7", reward:1000}, {note:"Upgrade an escalator to lv.3", condition:"escalatorLevel(3) >= 1", reward:300}, {note:"Hire 10 staffs", condition:"staff >= 10", reward:500}, {note:"Catch 5 bandits in one night", condition:"banditCapturedOneNight >= 5", reward:5000}, {note:"Promote 4 staffs", condition:"staffLevel(2) >= 4", reward:2000}, {note:"Have 2 upgraded elevators", condition:"elevatorLevel(2) >= 2", reward:200}, {note:"Hire 10 securities", condition:"security >= 10", reward:2500}, {note:"Neutralize 10 villain visitors", condition:"villainCaptured >= 10", reward:7500}, {note:"Purchase Generator Set (extra upgrade)", condition:"extraType(Generator_Set)", reward:6000}, {note:"Earn $15,000 profit", condition:"profit >= 15000", reward:5000}, {note:"Purchase Cool Mannequin (Extra Upgrade)", condition:"extraType(Cool_Mannequin)", reward:4000}, {note:"Build cinema & Steak Resto", condition:"boothType(Cinema) >= 1 && boothType(Steak) >= 1", reward:4500}, {note:"Catch 15 bandit", condition:"banditCaptured >= 15", reward:15000}, {note:"Make at least 30 visitors happy", condition:"statisfied >= 30", reward:10000}, {note:"Raise your popularity to 50%", condition:"popularity >= 50", reward:5000}, {note:"Build 4 parking lots", condition:"parking >= 4", reward:8000}, {note:"Upgrade any parking lot to VIP parking", condition:"parkingLevel(3) >= 1", reward:5000}, {note:"Build a subway", condition:"subway >= 1", reward:10000}, {note:"Earn $25,000 profit", condition:"profit >= 25000", reward:"Unlock Italy"}];
MISSION_DATA[ShopText.MAP_ITALY] = [{note:"Build music shop and toy shop", condition:"boothType(Music) >= 1 && boothType(ToyStore) >= 1", reward:500}, {note:"Catch 8 bandits in one night", condition:"banditCapturedOneNight >= 8", reward:12000}, {note:"Have 12 booths in your mall", condition:"booth >= 12", reward:5000}, {note:"Raise your popularity to 50%", condition:"popularity >= 50", reward:3000}, {note:"Have 8 upgraded booths ", condition:"boothLevel(2) >= 8", reward:8000}, {note:"Build 4 floor", condition:"floorNum >= 4", reward:2000}, {note:"Hire 30 employees", condition:"staff >= 30", reward:4500}, {note:"Purchase Wagyu Red Meat (Extra Upgrade)", condition:"extraType(Wagyu_Red_Meat)", reward:5500}, {note:"Earn $17,500 profit", condition:"profit >= 17500", reward:7500}, {note:"Neutralize 20 villain visitors", condition:"villainCaptured >= 20", reward:12000}, {note:"Purchase Prohibition Sign (Extra Upgrade)", condition:"extraType(Prohibition_Sign)", reward:7500}, {note:"Build 6 parking lot", condition:"parking >= 6", reward:10000}, {note:"Send at least $50,000 to your previous mall at once", condition:"transfer >= 50000", reward:10000}, {note:"Hold Event Orchestra", condition:"hallEvent(Orchestra)", reward:2000}, {note:"Have 10 escalator fully upgraded", condition:"escalatorLevel(3) >= 10", reward:5000}, {note:"Purchase Red Carpet (extra Upgrade)", condition:"extraType(Red_Carpet)", reward:8000}, {note:"Hold car show event at least for 4 days", condition:"runEvent(Car_Show) >= 4", reward:8000}, {note:"Upgrade your hall to lv.2", condition:"hallLevel >= 2", reward:15000}, {note:"Make at least 40 visitors happy", condition:"statisfied >= 40", reward:15000}, {note:"Visited by Alnord Swasanasegar", condition:"spVisitorType(Alnord_Swasanasegar)", reward:7500}, {note:"Earn $30.000 profit", condition:"profit >= 30000", reward:"Unlock U.K"}];
MISSION_DATA[ShopText.MAP_BRITAIN] = [{note:"Build sport shop and sushi bar", condition:"boothType(Sport) >= 1 && boothType(Sushi) >= 1", reward:500}, {note:"Make at least 4 good relation combo", condition:"comboFound >= 4", reward:2500}, {note:"Have 3 floor", condition:"floorNum >= 3", reward:3500}, {note:"Have 40 visitors visit your mall", condition:"visitor >= 4", reward:4000}, {note:"Earn $15,000 profit", condition:"profit >= 15000", reward:5000}, {note:"Purchase Amazing LCD TV (Extra Upgrade)", condition:"extraType(Amazing_LCD_TV)", reward:7000}, {note:"Have 8 VIP parking", condition:"parkingLevel(3) >= 8", reward:15000}, {note:"Visited by 5 special visitor in a day", condition:"spVisitor >= 5", reward:17000}, {note:"Buy Da Vinci's Art (Extra Upgrade)", condition:"extraType(Da_Vinci's_Art)", reward:10000}, {note:"Upgrade Hall to Max Level", condition:"hallLevel >= 3", reward:18000}, {note:"Earn $30,000 profit", condition:"profit >= 30000", reward:12000}, {note:"Build 8 floor", condition:"floorNum >= 8", reward:15000}, {note:"Have all kind of your booths", condition:"boothComplete", reward:20000}, {note:"Have all kind of upgraded booths", condition:"boothCompleteLevel(2)", reward:25000}, {note:"Purchase Broadcast (Extra Upgrade)", condition:"extraType(Broadcast)", reward:20000}, {note:"Purchase all your Extra Upgrades", condition:"extraComplete", reward:50000}, {note:"Make 50 visitors happy", condition:"statisfied >= 50", reward:25000}, {note:"Visited by all special visitors", condition:"spVisitorComplete", reward:50000}, {note:"Catch 30 bandits in one night", condition:"banditCapturedOneNight >= 30", reward:75000}, {note:"Earn $1.000.000 cash", condition:"cash >= 1000000", reward:"Final Mission"}];
}
}//package Instance.constant
Section 43
//Notice (Instance.constant.Notice)
package Instance.constant {
public class Notice {
public static const CANT_BUILD = "Cannot build there";
public static const NOT_ENOUGH_CASH = "Not enough cash";
public static const CANT_DESTROY = "Cannot destroy this escalator
you need at least one escalator
to access the basement";
public static const REACH_LIMIT = "This build already reach limit";
}
}//package Instance.constant
Section 44
//RelationList (Instance.constant.RelationList)
package Instance.constant {
public class RelationList {
public static const BTN_CLASS_LIST = [UI_ButtonDrugStore, UI_ButtonTattoo, UI_ButtonBabyShop, UI_ButtonGadget, UI_ButtonBookstore, UI_ButtonBoutique, UI_ButtonSalon, UI_ButtonMusic, UI_ButtonToyStore, UI_ButtonSport, UI_ButtonJewelry, UI_ButtonSupermarket, UI_ButtonCake, UI_ButtonIceCream, UI_ButtonBurger, UI_ButtonCandy, UI_ButtonSushi, UI_ButtonSteak, UI_ButtonCafe, UI_ButtonLiquor, UI_ButtonHall, UI_ButtonArcade, UI_ButtonCinema, UI_ButtonRestroom, UI_ButtonElevator, UI_ButtonEscalator, UI_ButtonATM, UI_ButtonTerrace, UI_ButtonParkingLot, UI_ButtonSubway];
public static const BOOTH_CLASS_LIST = [BoothDrugStore, BoothTattoo, BoothBabyShop, BoothGadget, BoothBookstore, BoothBoutique, BoothSalon, BoothMusic, BoothToyStore, BoothSport, BoothJewelry, BoothSupermarket, BoothCake, BoothIceCream, BoothBurger, BoothCandy, BoothSushi, BoothSteak, BoothCafe, BoothLiquor, Hall, BoothArcade, BoothCinema, FacilityRestroom, FacilityElevator, FacilityEscalator, FacilityATM, FacilityTerrace, FacilityParkingLot, FacilitySubway];
public static const BUILD_CLASS_LIST = [BuildDrugStore, BuildTattoo, BuildBabyShop, BuildGadget, BuildBookstore, BuildBoutique, BuildSalon, BuildMusic, BuildToyStore, BuildSport, BuildJewelry, BuildSupermarket, BuildCake, BuildIceCream, BuildBurger, BuildCandy, BuildSushi, BuildSteak, BuildCafe, BuildLiquor, BuildHall, BuildArcade, BuildCinema, BuildRestroom, BuildElevator, BuildEscalator, BuildATM, BuildTerrace, BuildParkingLot, BuildSubway];
public static const BUILD_NOTE = ["Sell medicine and health supplies. Has small size but the item price here is very cheap.", "Place for body painting. Has small size and good price but cannot attract much customer.", "Sell baby's supplies and needs. Has small size and cheap price.", "Sell electronic device. Has small size and moderate item price but rare chance a visitor to buy a lot.", "Sell many kind of book. Has medium size and moderate item price.", "Sell elegant or casual clothes. Has medium size and moderate item price. Favor by girls or women.", "Place for people where his or her want to change hair style. Has medium size Favor by girls.", "Sell instrument equipment. Has medium size and moderate item price.", "Sell kid's toys and action figures Has medium size and expensive price.", "Sell sport tool and item. Has medium size and expensive price. Favor by men.", "Sell rings, necklaces and bracelet. Has medium size and very expensive item price but visitor won't buy a lot.", "Sell many kind of supplies and needs. Has large size and moderate item price. Visitor often to buy much here.", "Sell bread and cake. Also sell tart cake. Has Small size and cheap price.", "Sell ice cream. Has Small size. Has no maximum visitor capacity but enable serve only one visitor at same time. Doesn't give many revenue but has many good relations with other booth especially food center.", "Sell burgers and french fries. Has medium size and good food price. Many people like to buy here.", "Sell candies and many kind of sweet things. Has medium size and little expensive food.", "Sell Japanesse Food. Has medium size and expensive food price.", "Sell bbq and hot plates. Has medium size and very expensive food price.", "Places where young people hangs out. Has medium size and very expensive food price. Able to increase mood.", "Sell a alcoholic drinks and beer. Has medium size. Drinks here is really really very expensive.", "Hold Event to boost popularity. Effect depending the running event.", "Good entertainment place.Has large size. Gain profit when visitor play here instead of out from here. Boost visitor's mood.", "Show movie from any countries. Has large size. Gain profit when visitor enters here instead exit here and get additional income as long visitor here. Boost visitor's mood.", "Support building. Visitors don't need to leave your mall when they need to go.", "Support building. Transport between floors. Able to expand.", "Support building. Transport between nearest floors. No waiting and no limit.", "Support building. Visitors don't need to go home when their money has run out.", "Support building. Visitors may regain their mood when they have no destination. Some hint may appear there.\nCan't be upgraded", "Support building. Visitors with car are able to visit your mall. They will bring more money than regular visitor.\nCan be build only at basement.\nCan be entered by up to two cars.", "Support building. Train may come and drops many visitor. Can be build only at basement and can't be upgraded. You may build up to two subway."];
public static const LOCKED_NOTE = ["", "Locked Tattoo", "", "Locked Gadget.", "", "", "", "Locked Music Store", "????", "????", "", "", "", "", "", "Locked Candy Castle", "????", "????", "", "????", "", "????", "????", "", "", "", "", "", "Purchase basement lv 1 (extra upgrade).", "Purchase basement lv 2 (extra upgrade)."];
public static const HIRE_NOTE = ["Solution for dirty mall and trash on the floor.", "Solution for electricity problem and alarm disfunction.", "Solution for villain visitor and bandit during night.", "Make visitor happy."];
public static const HIRE_BUTTON_LIST = [UI_ButtonJanitor, UI_ButtonElectrician, UI_ButtonSecurity, UI_ButtonEntertainer];
public static const HIRE_CLASS_LIST = [HireJanitor, HireElectrician, HireSecurity, HireEntertainer];
public static const HIRE_TYPE_LIST = [CrewJanitor, CrewElectrician, CrewSecurity, CrewEntertainer];
public static const HIRE_SHOW_NAME = ["Janitor", "Electrician", "Security", "Entertainer"];
public static const TOGGLE_BUTTON_LIST = [UI_ButtonMailBox, UI_ButtonSelect, UI_ButtonDrag, UI_ButtonShop, UI_ButtonFood, UI_ButtonEntertainment, UI_ButtonEmployee, UI_ButtonFacility, UI_ButtonExtra, UI_ButtonStatistic];
public static const TOGGLE_BUTTON_NOTE = ["Hints", "Select", "Drag", "Booths", "Food", "Entertainment", "Staff", "Facilities", "Extra", "Statistic"];
public static function getNoteByType(_arg1:Class):String{
var _local4:*;
var _local2:* = "";
var _local3:* = BOOTH_CLASS_LIST.indexOf(_arg1);
if (_local3 >= 0){
if ((_local3 in BUILD_NOTE)){
_local2 = BUILD_NOTE[_local3];
};
} else {
_local4 = HIRE_BUTTON_LIST.indexOf(_arg1);
if (_local4 >= 0){
if ((_local4 in HIRE_NOTE)){
_local2 = HIRE_NOTE[_local4];
};
};
};
return (_local2);
}
public static function getLockedNoteByType(_arg1:Class):String{
var _local2:* = "";
var _local3:* = BTN_CLASS_LIST.indexOf(_arg1);
if (_local3 >= 0){
if ((_local3 in LOCKED_NOTE)){
_local2 = LOCKED_NOTE[_local3];
};
};
return (_local2);
}
public static function getRelationOf(_arg1:Class):Class{
var _local4:*;
var _local2:* = null;
var _local3:* = BTN_CLASS_LIST.indexOf(_arg1);
if ((_local3 in BOOTH_CLASS_LIST)){
_local2 = BOOTH_CLASS_LIST[_local3];
} else {
_local4 = HIRE_BUTTON_LIST.indexOf(_arg1);
if ((_local4 in HIRE_TYPE_LIST)){
_local2 = HIRE_TYPE_LIST[_local4];
};
};
return (_local2);
}
}
}//package Instance.constant
Section 45
//ShopText (Instance.constant.ShopText)
package Instance.constant {
public class ShopText {
public static const MAP_BRITAIN = "mapBritain";
public static const MAP_INDIA = "mapIndia";
public static const MAP_ITALY = "mapItaly";
public static const MAP_RUSIA = "mapRusia";
public static const MAP_ARABIAN = "mapArabian";
public static const MAP_LIST = [MAP_INDIA, MAP_RUSIA, MAP_ARABIAN, MAP_ITALY, MAP_BRITAIN];
public static function convertToCountry(_arg1:String):String{
var _local2:* = _arg1;
switch (_arg1){
case MAP_BRITAIN:
_local2 = "U.K";
break;
case MAP_INDIA:
_local2 = "India";
break;
case MAP_ITALY:
_local2 = "Italy";
break;
case MAP_RUSIA:
_local2 = "Rusia";
break;
case MAP_ARABIAN:
_local2 = "Arabia";
break;
};
return (_local2);
}
}
}//package Instance.constant
Section 46
//SpecialVisitorConversation (Instance.constant.SpecialVisitorConversation)
package Instance.constant {
import Instance.modules.*;
import Instance.*;
public class SpecialVisitorConversation {
public static var TRANSPORT_PROBLEM:Array = new Array();
public static var CANT_GO_HOME:Array = new Array();
public static var SEARCH_TOILET:Array = new Array();
public static var NO_TOILET:Array = new Array();
public static var NO_ATM:Array = new Array();
public static var SEARCH_ATM:Array = new Array();
public static var WANT_GO_HOME:Array = new Array();
public static var SEARCH_DESTINATION:Array = new Array();
public static var SEARCH_HALL:Array = new Array();
public static var WALKING_AROUND:Array = new Array();
public static function getSingleConversation(_arg1:Object, _arg2:Array):String{
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local3:* = _arg1.world;
var _local4:* = "";
var _local5:* = Utility.getClass(_arg1);
var _local6:* = new Array();
switch (_arg2){
case ConversationList.TRANSPORT_PROBLEM:
if ((_local5 in TRANSPORT_PROBLEM)){
_local6 = TRANSPORT_PROBLEM[_local5];
};
break;
case ConversationList.CANT_GO_HOME:
if ((_local5 in CANT_GO_HOME)){
_local6 = CANT_GO_HOME[_local5];
};
break;
case ConversationList.SEARCH_TOILET:
if ((_local5 in SEARCH_TOILET)){
_local6 = SEARCH_TOILET[_local5];
};
break;
case ConversationList.NO_ATM:
if ((_local5 in NO_ATM)){
_local6 = NO_ATM[_local5];
};
break;
case ConversationList.SEARCH_ATM:
if ((_local5 in SEARCH_ATM)){
_local6 = SEARCH_ATM[_local5];
};
break;
default:
_local6 = _arg2;
};
_local4 = ((_local6.length > 0)) ? _local6[Math.floor((Math.random() * _local6.length))] : "";
if (_arg2 == ConversationList.TRANSPORT_PROBLEM){
_local8 = ((_arg1.restRoomTarget)!=null) ? _arg1.restRoomTarget.onFloor : ((_arg1.currentDestination)!=null) ? _arg1.currentDestination.onFloor : null;
_local9 = ((_local8)==null) ? "ground floor" : ("floor " + (_local3.floorList.indexOf(_local8) + 1));
_local4 = _local4.replace(/&fn/g, _local9);
_local10 = _local3.floorList.indexOf(_local8);
_local11 = _local3.floorList.indexOf(_arg1.onFloor);
_local9 = ((_local10)>_local11) ? "up" : "down";
_local4 = _local4.replace(/&go/g, _local9);
} else {
if (ConversationList.SEARCH_DESTINATION.indexOf(_arg2) >= 0){
_local4 = _local4.replace(/&btqgen/g, (_arg1.gender) ? "tuxedo" : "gown");
_local4 = _local4.replace(/&jwlgen/g, (_arg1.gender) ? "her" : "him");
};
};
var _local7:* = "";
if (_arg1.destinationTargetList.length > 0){
_local7 = BoothList.compareShowNameByType(_arg1.destinationTargetList[0]);
} else {
if (_arg1.currentDestination != null){
_local7 = BoothList.compareShowNameByType(Utility.getClass(_arg1.currentDestination));
};
};
_local4 = _local4.replace(/&cd/g, _local7);
return (_local4);
}
public static function getConversationDestinationArray(_arg1:Object):Array{
var _local4:*;
var _local2:* = new Array();
var _local3:* = Utility.getClass(_arg1);
if ((((_arg1.currentDestination is Hall)) && (!((_arg1.currentDestination.currentEvent == BoothHall.NONE))))){
if ((_local3 in SEARCH_HALL)){
if ((_arg1.currentDestination.currentEvent in SEARCH_HALL[_local3])){
_local2 = SEARCH_HALL[_local3][_arg1.currentDestination.currentEvent];
} else {
if (("other" in SEARCH_HALL[_local3])){
_local2 = SEARCH_HALL[_local3]["other"];
} else {
_local2 = ConversationList.getDestinationArray(_arg1);
};
};
};
} else {
if ((_local3 in SEARCH_DESTINATION)){
if (_arg1.destinationTargetList.length > 0){
if ((_arg1.destinationTargetList[0] in SEARCH_DESTINATION[_local3])){
_local2 = SEARCH_DESTINATION[_local3][_arg1.destinationTargetList[0]];
} else {
if (("other" in SEARCH_DESTINATION[_local3])){
_local2 = SEARCH_DESTINATION[_local3]["other"];
} else {
_local2 = ConversationList.getDestinationArray(_arg1);
};
};
} else {
if (_arg1.currentDestination != null){
_local4 = Utility.getClass(_arg1.currentDestination);
if ((_local4 in SEARCH_DESTINATION[_local3])){
_local2 = SEARCH_DESTINATION[_local3][_local4];
} else {
if (("other" in SEARCH_DESTINATION[_local3])){
_local2 = SEARCH_DESTINATION[_local3]["other"];
} else {
ConversationList.getDestinationArray(_arg1);
};
};
} else {
if ((_local3 in WALKING_AROUND)){
_local2 = WALKING_AROUND[_local3];
} else {
_local2 = ConversationList.WALKING_AROUND;
};
};
};
} else {
_local2 = ConversationList.getDestinationArray(_arg1);
};
};
return (_local2);
}
public static function getHomeConversationArray(_arg1:Object):Array{
var _local2:* = new Array();
var _local3:* = Utility.getClass(_arg1);
if ((_local3 in WANT_GO_HOME)){
_local2 = WANT_GO_HOME[_local3][(3 - _arg1.statification)];
} else {
_local2 = ConversationList.WANT_GO_HOME[(3 - _arg1.statification)];
};
return (_local2);
}
public static function getNotFoundRestroomArray(_arg1:Object):Array{
var _local2:* = new Array();
var _local3:* = Utility.getClass(_arg1);
if ((_local3 in NO_TOILET)){
_local2 = NO_TOILET[_local3][(3 - _arg1.statification)];
} else {
_local2 = ConversationList.NO_TOILET[(3 - _arg1.statification)];
};
return (_local2);
}
TRANSPORT_PROBLEM[VisitorDustbinBiebir] = ["My destination yet at &fn.", "Tragedy I can't visit my destination", "I can't reach my destination yet."];
TRANSPORT_PROBLEM[VisitorAlnord] = ["Need to go &go."];
TRANSPORT_PROBLEM[VisitorLadyGogo] = ["Cannot find the way", "I think I`m lost here"];
TRANSPORT_PROBLEM[VisitorKatyBerry] = ["Where is the way?", "I`m lost!"];
TRANSPORT_PROBLEM[VisitorChuckNourish] = ["No one mess with Chuck,&spshow me the way!", "Chuck Nourish was lost."];
TRANSPORT_PROBLEM[VisitorMeleeCyrus] = ["Cannot find my way.", "Silly,&spcannot visit my destination."];
TRANSPORT_PROBLEM[VisitorKezya] = ["Go insane go insane,&spcannot find the way!", "Where we are?"];
TRANSPORT_PROBLEM[VisitorKateCentertown] = ["By the order of the future queen,&spshow me the way!", "I demand thou to show me the way"];
TRANSPORT_PROBLEM[VisitorMrPeanut] = ["*mumble mumble*", "*gibberish gibberish*", "????"];
TRANSPORT_PROBLEM[VisitorSteveWork] = ["Destination error", "I need a GPS"];
CANT_GO_HOME[VisitorDustbinBiebir] = ["Mommy! I scared!", "I want to go home.", "I miss my home.", "Baby! If I die here,\nplease blame this mall."];
CANT_GO_HOME[VisitorAlnord] = ["Can't go home", "I'll terminate this mall&spimmediatelly"];
CANT_GO_HOME[VisitorLadyGogo] = ["I was born this way, not was born&spin this mall, I wanna go home"];
CANT_GO_HOME[VisitorKatyBerry] = ["Where is the&spway to go home?", "I`m lost!&spI missed my home."];
CANT_GO_HOME[VisitorChuckNourish] = ["Let me home,&spor I`ll use my mighty chop!", "Chuck want to go home!"];
CANT_GO_HOME[VisitorMeleeCyrus] = ["Cannot find my way to home.", "Silly,&spcannot go home."];
TRANSPORT_PROBLEM[VisitorKezya] = ["Go insane go insane,&spcannot find the way back!", "Where the exit?"];
TRANSPORT_PROBLEM[VisitorKateCentertown] = ["Trap here?&spHow can it be?"];
CANT_GO_HOME[VisitorMrPeanut] = ["*panicking*", "@#$%!@&*?!!"];
CANT_GO_HOME[VisitorSteveWork] = ["I cannot go home,&spI stil have to work on my iPhone 5s", "Even my path finding algorithm&spcan't find way back."];
SEARCH_TOILET[VisitorDustbinBiebir] = ["Baby! I need private time."];
SEARCH_TOILET[VisitorAlnord] = ["Nature's call."];
SEARCH_TOILET[VisitorMrPeanut] = ["Toilet..."];
SEARCH_TOILET[VisitorSteveWork] = ["iPoo!! iPiss!! iToilet!!"];
NO_TOILET[VisitorDustbinBiebir] = [["I enjoyed here but I need a private time."], ["Private time. But I have to go home."], ["This mall is suck&speven even toilet is not exist.", "Wierd!mall without restroom."], ["Damn! How could they&spforgot to build a restroom.", "I never visited worst place like this before&speven toilet is not exist."]];
NO_TOILET[VisitorAlnord] = [["Nature's call.&spI'll be back."], ["Nature's call.&spI'll be back."], ["Nature's call.&spHasta la vista baby."], ["Nature's call.&spHasta la vista baby."]];
NO_TOILET[VisitorMrPeanut] = [["Pee..."], ["Pee..."], ["*mumble mumble*"], ["P@#$%ee..."]];
NO_TOILET[VisitorSteveWork] = [["I`ll use my iToilet at&spmy office then, bye"], ["I`ll use my iToilet at&spmy office then, bye"], ["I`ll use my iToilet at&spmy office then, bye"], ["I`ll use my iToilet at&spmy office then, bye"]];
NO_ATM[VisitorDustbinBiebir] = ["My money is runs out.&spHow can it be..!?", "I forgot to bring more money.", "I spent my money too much.&spBetter go home now."];
NO_ATM[VisitorAlnord] = ["Cash is run out."];
NO_ATM[VisitorKateCentertown] = ["Looks like I spent&spto much money today."];
NO_ATM[VisitorMrPeanut] = ["$$$ ??"];
NO_ATM[VisitorSteveWork] = ["Cannot find ATM, Cannot sell&spmy iPad5 prototype for bucks either"];
SEARCH_ATM[VisitorDustbinBiebir] = ["Oh baby! My money is run out.", "My money is run out&spbut no problem just take from ATM."];
SEARCH_ATM[VisitorAlnord] = ["Need more cash."];
SEARCH_ATM[VisitorKateCentertown] = ["Looks like an ATM exist here."];
SEARCH_ATM[VisitorMrPeanut] = ["No $$ More $$"];
SEARCH_ATM[VisitorSteveWork] = ["Even rich man&spruns out money sometime."];
WANT_GO_HOME[VisitorDustbinBiebir] = [["I enjoy here.&spI'll come back here latter baby."], ["Time to go home baby."], ["If I stay here bit longer it&spwill be bad for my reputation."], ["I never visited worst place like this before"]];
WANT_GO_HOME[VisitorAlnord] = [["I'll be back."], ["I'll be back.", "Now.. This is time.."], ["Hasta la vista baby."], ["Hasta la vista baby."]];
WANT_GO_HOME[VisitorChuckNourish] = [["I`m pleased,&spChuck approved."], ["I`m pleased."], ["Chuck disapproved."], ["I`ll destroy this crappy mall&spsomeday with my karate kick."]];
WANT_GO_HOME[VisitorMrPeanut] = [["^_^"], ["*happy*"], ["*mumbling*"], ["@#$%"]];
WANT_GO_HOME[VisitorSteveWork] = [["iHappy,&sptime to go home"], ["Time to go home"], ["iGohome!"], ["iGohome!"]];
SEARCH_DESTINATION[VisitorDustbinBiebir] = new Array();
SEARCH_DESTINATION[VisitorDustbinBiebir][BoothBabyShop] = ["Nostalgia. I want to&spwear diaper again.", "I want to buy pacifier.", "Wow Baby Baby Baby WoW.&spI have to go to baby shop"];
SEARCH_DESTINATION[VisitorDustbinBiebir][BoothSalon] = ["Need new model for my hair&spso more girls will be attracted by me", "My nails need some treatment."];
SEARCH_DESTINATION[VisitorDustbinBiebir][BoothCandy] = ["I want candy.", "I want to chew a gum"];
SEARCH_DESTINATION[VisitorDustbinBiebir]["other"] = ["Looks like something good there."];
SEARCH_DESTINATION[VisitorAlnord] = new Array();
SEARCH_DESTINATION[VisitorAlnord][BoothSport] = ["Need more weight."];
SEARCH_DESTINATION[VisitorAlnord][BoothSteak] = ["Need more meat."];
SEARCH_DESTINATION[VisitorAlnord][BoothDrugStore] = ["Need more pill."];
SEARCH_DESTINATION[VisitorAlnord][BoothCinema] = ["I want watch my movie."];
SEARCH_DESTINATION[VisitorAlnord][BoothSupermarket] = ["My home supply is run out."];
SEARCH_DESTINATION[VisitorAlnord][BoothIceCream] = ["Need to cool my body."];
SEARCH_DESTINATION[VisitorAlnord][BoothArcade] = ["This is play time."];
SEARCH_DESTINATION[VisitorAlnord][BoothBoutique] = ["New clothes,&spgive it to me now."];
SEARCH_DESTINATION[VisitorAlnord]["other"] = ["Destination confirmed."];
SEARCH_DESTINATION[VisitorLadyGogo] = new Array();
SEARCH_DESTINATION[VisitorLadyGogo][BoothArcade] = ["I just wanna dance."];
SEARCH_DESTINATION[VisitorLadyGogo][BoothSushi] = ["I want something&spraw raw aw-aw-awww!!!!"];
SEARCH_DESTINATION[VisitorLadyGogo][BoothTattoo] = ["My left arm already have tattoo&spmay be now is my right arm's turn."];
SEARCH_DESTINATION[VisitorLadyGogo][BoothLiquor] = ["Happy in the club&spwith a bottle of red wine."];
SEARCH_DESTINATION[VisitorKatyBerry] = new Array();
SEARCH_DESTINATION[VisitorKatyBerry][BoothSalon] = ["My hair need some treatment."];
SEARCH_DESTINATION[VisitorKatyBerry][BoothMusic] = ["Need new instrument for my new song."];
SEARCH_DESTINATION[VisitorKatyBerry][BoothDrugStore] = ["Had a throat problem.&spNot good for my voice."];
SEARCH_DESTINATION[VisitorChuckNourish] = new Array();
SEARCH_DESTINATION[VisitorChuckNourish][BoothSport] = ["My training tools has broken.&spNeed the new one."];
SEARCH_DESTINATION[VisitorChuckNourish][BoothArcade] = ["Chuck needs to practice&spshoting skill."];
SEARCH_DESTINATION[VisitorChuckNourish][BoothBurger] = ["I like fast food.&spMaybe I'll get some."];
SEARCH_DESTINATION[VisitorMeleeCyrus] = new Array();
SEARCH_DESTINATION[VisitorMeleeCyrus][BoothJewelry] = ["New diamond will&spbe good for me."];
SEARCH_DESTINATION[VisitorMeleeCyrus][BoothMusic] = ["Need new instrument for my new song."];
SEARCH_DESTINATION[VisitorMrPeanut] = new Array();
SEARCH_DESTINATION[VisitorMrPeanut][BoothSupermarket] = ["Shop..Shop..Shop.."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothCafe] = ["Coffee BEAN.."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothArcade] = ["Play..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothCinema] = ["Movie..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothToyStore] = ["Toy..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothBabyShop] = ["Baby..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothBookstore] = ["Reading..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothCandy] = ["Candy..."];
SEARCH_DESTINATION[VisitorMrPeanut][BoothSteak] = ["Steak..."];
SEARCH_DESTINATION[VisitorMrPeanut]["other"] = ["&cd..."];
SEARCH_DESTINATION[VisitorSteveWork] = new Array();
SEARCH_DESTINATION[VisitorSteveWork][BoothGadget] = ["Let see if my new product&sphas been release.", "There are new technologies&spthat can compete my product."];
SEARCH_DESTINATION[VisitorSteveWork][BoothCinema] = ["Bixar studio release new CG movie.", "Maybe I'll get inspiration&spby watching movie."];
SEARCH_DESTINATION[VisitorSteveWork][BoothBookstore] = ["Reading book to reasearch new technology.", "I hear my new iProduct appeard&spin TechnoBest Magazine."];
SEARCH_DESTINATION[VisitorSteveWork][BoothToyStore] = ["New Figure Bizz Darkyear release."];
SEARCH_HALL[VisitorDustbinBiebir] = new Array();
SEARCH_HALL[VisitorDustbinBiebir]["Live Concert"] = ["I want to sing 'My Baby Baby' song."];
SEARCH_HALL[VisitorAlnord] = new Array();
SEARCH_HALL[VisitorAlnord]["Car Show"] = ["New car model released."];
SEARCH_HALL[VisitorAlnord]["other"] = ["Destination Confirmed"];
SEARCH_HALL[VisitorLadyGogo] = new Array();
SEARCH_HALL[VisitorLadyGogo]["Live Concert"] = ["Live concert? I want to sing too."];
SEARCH_HALL[VisitorKatyBerry] = new Array();
SEARCH_HALL[VisitorKatyBerry]["Live Concert"] = ["We can dance until we die.&spWe'll be young forever!"];
SEARCH_HALL[VisitorChuckNourish] = new Array();
SEARCH_HALL[VisitorAlnord]["Car Show"] = ["I want new car for the&spreplacement at my next movie."];
SEARCH_HALL[VisitorMeleeCyrus] = new Array();
SEARCH_HALL[VisitorMeleeCyrus]["Live Concert"] = ["When I look at Live Concert&spsuddenly I want to sing."];
SEARCH_HALL[VisitorKezya] = new Array();
SEARCH_HALL[VisitorKezya]["Live Concert"] = ["I can dance and I can really, really sing.&spSo I want show in Live Concert"];
SEARCH_HALL[VisitorKateCentertown] = new Array();
SEARCH_HALL[VisitorKateCentertown]["Orchestra"] = ["I heard a classical music.&spThey must be hold Orchestra."];
SEARCH_HALL[VisitorMrPeanut] = new Array();
SEARCH_HALL[VisitorMrPeanut]["other"] = ["Hall..???"];
SEARCH_HALL[VisitorSteveWork] = new Array();
SEARCH_HALL[VisitorSteveWork]["Electronic Expo"] = ["My product iDevice in show&spI want to see it."];
WALKING_AROUND[VisitorAlnord] = ["Confirm new target."];
WALKING_AROUND[VisitorLadyGogo] = ["I will go anywhere&spas long as it's free."];
WALKING_AROUND[VisitorChuckNourish] = ["Chuck will walk a little bit."];
WALKING_AROUND[VisitorKateCentertown] = ["Walking around is good&spfor the princess"];
WALKING_AROUND[VisitorMrPeanut] = ["...."];
WALKING_AROUND[VisitorSteveWork] = ["Still searching new destination."];
}
}//package Instance.constant
Section 47
//TipsList (Instance.constant.TipsList)
package Instance.constant {
public class TipsList {
public static const TIPS_AVAILABLE = [{tipsCode:"scrollScreen", header:"How to scroll screen", info:"Click hand symbol and drag it on the screen. You can also use W,A,S,D or arrow keys to scroll."}, {tipsCode:"boothCompatibility", header:"Building's Compatibility", info:"Each build has compatibility each other. Good or bad will affect to your mall's popularity. For example Cake Shop and Ice Cream booth are have a good compatibility. So build carefully."}, {tipsCode:"visitorNeed", header:"Find your visitor want", info:"Click on visitors to find out what they want and their favourite."}, {tipsCode:"employeePlacement", header:"Place Your Staff's Work Area", info:"Staff should better work at single floor. Click on them to pinpoint their work area."}, {tipsCode:"employeeSchedule", header:"Set Your Staff Work Time", info:"Click on your staff to set your staff work time. When set in day they will work during 9am to 7pm and night they will work during 7pm to 5 am. Entertainer has different worktime."}, {tipsCode:"entertainer", header:"Entertainer", info:"Hire entertainer to raise your visitors mood. Their work time is 10am to 4pm during day and 4 pm to 10pm during night."}, {tipsCode:"shiftKey", header:"SHIFT Key", info:"Hold SHIFT key when building or hiring staff to quickly duplicate repeat the action. When hiring staff their work area will be set at the spesific floor."}, {tipsCode:"promoteEmployee", header:"Promote Your Employee", info:"Staff gain experience during their work time and gain more when doing something. Only staff with max experience can be promoted. Promote them will effects their performances but their sallaries will be increased too."}, {tipsCode:"useParameterButton", header:"Parameter Detail", info:"Click the yellow button at the top to find person or booth. You can see visitor's detail and promote your employee easily."}, {tipsCode:"upgradeBooth", header:"Upgrade Your booth", info:"Upgrade your booth to increase the revenue. Look at the statistic to know the best seller booths, then upgrade it."}, {tipsCode:"minimap", header:"Mini Map", info:"Use mini map to see your mall condition. It's also for a fast-drag. Mini map can be found at the 2nd blue button from the right."}, {tipsCode:"elevatorAndEscalator", header:"Elevator and Escalator", info:"Elevator has better speed and can access more than 2 floors but escalator has unlimited capacity and can access only 2 floors. When your mall has reached 3 floors, elevators would be necessary. But if it just 2 floor, escalator is better."}, {tipsCode:"elevatorExpand", header:"Expand an Elevator", info:"Build new elevator above your old elevator doesn't make it connect each other. To expand your elevator, drag your elevator to the right floor."}, {tipsCode:"transferMode", header:"Transfer Your Cash", info:"Don't forget to transfer money from the previous mall as often as possible. It helps you to fullfill your mission faster."}, {tipsCode:"restroomEffectiveity", header:"Restroom at Each Floor", info:"Build restroom in every floor to save visitors time."}, {tipsCode:"restroomNotCompatible", header:"Restroom with Food Center", info:"Give space between restroom and food center booth, because many of them have bad compatibility."}, {tipsCode:"extraUpgrade", header:"Extra Upgrade", info:"Extra upgrade is expensive but can help you to make the better mall. Purchase them wisely."}, {tipsCode:"atmFunction", header:"ATM", info:"Each visitor has its current cash. If their cash is run out they will go home immidieately. Build ATM to hold them."}, {tipsCode:"specialVisitorArrival", header:"Special Visitor", info:"Special Visitors bring a lot of money and shop more. But they visit only when certain condition fulfilled."}, {tipsCode:"antiVillain", header:"Neutrailze Villain", info:"Beware of the visitor with red headband, they waste trash averywhere. You need security to neutralize them."}];
}
}//package Instance.constant
Section 48
//Tutorial (Instance.constant.Tutorial)
package Instance.constant {
import Instance.modules.*;
public class Tutorial {
public static const TUTOR_BEGINING_TUTORIAL = "tutorBeginingTutor";
public static const TUTOR_BUILD_BOOTH = "tutorBuildBooth";
public static const TUTOR_BUILD_FOOD_CENTER = "tutorBuildFoodCenter";
public static const TUTOR_BUILD_ENTERTAINMENT = "tutorBuildEntertainer";
public static const TUTOR_HIRE_STAFF = "tutorHireStaff";
public static const TUTOR_HIRE_JANITOR = "tutorHireJanitor";
public static const TUTOR_HIRE_ELECTRICIAN = "tutorHireElectrician";
public static const TUTOR_HIRE_SECURITY = "tutorHireSecurity";
public static const TUTOR_PARKING_LOT_INFO = "tutorParkingLotInfo";
public static const TUTOR_PURCHASE_BASEMENT = "tutorPurchaseBasement";
public static const TUTOR_FACILITY = "tutorFacility";
public static const TUTOR_BUILD_PARKING_LOT = "tutorBuildParkingLot";
public static const TUTOR_RESTROOM = "tutorRestroom";
public static const TUTOR_ATM = "tutorAtm";
public static const TUTOR_PARKING_LOT = "tutorParkingLot";
public static const TUTOR_SUBWAY = "tutorSubway";
public static const TUTOR_EXPAND_ELEVATOR = "tutorExpandElevator";
public static const TUTOR_VISITOR_NEED = "tutorVisitorNeed";
public static const TUTOR_PARAMETER_BUTTON = "tutorParameterButton";
public static const TUTOR_PROMOTE_STAFF_WARNING = "tutorPromoteStaffWarning";
public static const TUTOR_STAFF_DETAIL = "tutorStaffDetail";
public static const TUTOR_VISITOR_DETAIL = "tutorVisitorDetail";
public static const TUTOR_END_MISSION = "tutorEndMission";
public static const TUTOR_MOVE_COUNTRY = "tutorMoveCountry";
public static const TUTOR_TRANSFER = "tutorTransfer";
public static const TUTOR_MINI_MAP = "tutorMiniMap";
public static const TUTOR_TEXT_BEGINING_TUTORIAL = "I am here to assist you. Im sure this place will become great with you in charge!";
public static const TUTOR_TEXT_BUILD_BOOTH = "The &grBooth menu%ft allows you to build shops.
Shops will generate revenue.";
public static const TUTOR_TEXT_BUILD_FOOD_CENTER = "The &grFood menu%ft allows you to build restaurants.
Restaurants generate revenue and make visitors happy.";
public static const TUTOR_TEXT_BUILD_ENTERTAINMENT = "The &grEntertainment menu%ft allows you to build attractions.
Making your mall populair and visitors happy.";
public static const TUTOR_TEXT_HIRE_STAFF = "The &grStaff menu%ft allows you to hire staff.
Needed to run the shopping mall smoothtly.";
public static const TUTOR_TEXT_HIRE_JANITOR = "Eww! The floor is &rddirty%ft.
Hire a &grjanitor%ft to fix the problem.";
public static const TUTOR_TEXT_HIRE_ELECTRICIAN = "Oh no, there is a &rdpower outrage%ft.
Hire an &grelectrician%ft to repair the problem.";
public static const TUTOR_TEXT_HIRE_SECURITY = "Someone &rdrobbed%ft a shop!
Hire a &grsecurity agent%ft to secure the mall.";
public static const TUTOR_TEXT_PARKING_LOT_INFO = "Did you know that you can build an &grunderground parking%ft or &grsubways%ft? Press on the &grextra%ft button to get started!";
public static const TUTOR_TEXT_PURCHASE_BASEMENT = "Now purchase &grBasement Lv 1%ft.
Don't worry, it's &grfree%ft as a starter bonus.";
public static const TUTOR_TEXT_ALREADY_PURCHASE_BASEMENT = "You already purchase it?
What a pity.
Actually you'll get &grfree%ft as a starter bonus.";
public static const TUTOR_TEXT_FACILITY = "The &grFacility menu%ft allows you to build facilities.
Visitors will stay longer in the mall with sufficient facilities.";
public static const TUTOR_TEXT_BUILD_PARKING_LOT = "Click here to build a &grparking booth%ft.";
public static const TUTOR_TEXT_RESTROOM = "You should build a restroom to make the customer stay longer, otherwise they will &rdgo away%ft.";
public static const TUTOR_TEXT_ATM = "Visitors can stay longer with a ATM machine.";
public static const TUTOR_TEXT_PARKING_LOT = "Great, now visitors with a car can visit our shops as well!";
public static const TUTOR_TEXT_SUBWAY = "Amazing!
The subway will increase the visitor count.";
public static const TUTOR_TEXT_EXPAND_ELEVATOR = "Elevator can be expanded by &grpulling it to the higher or lower floor%ft.";
public static const TUTOR_TEXT_VISITOR_NEED = "You can click on any visitor to see their wishes. It is important to keep all customers happy!";
public static const TUTOR_TEXT_PARAMETER_BUTTON = "You can see &grvisitor's detail%ft, and also &grpromote%ft or &rdfire%ft your staffs by using the &grthis button%ft up there, without searching them within people's &rdcrowd%ft.";
public static const TUTOR_TEXT_PROMOTE_STAFF_WARNING = "Promoted staff works more efficient but also costs more &rdsalary%ft.";
public static const TUTOR_TEXT_STAFF_DETAIL = "The &grstaff menu%ft allows you to promote staff memebers and change their work schedule.";
public static const TUTOR_TEXT_VISITOR_DETAIL = "The &grvisitor menu%ft allows you to see your visitor's wishes.";
public static const TUTOR_TEXT_END_MISSION = "Wow you did it! You just finish &grall mission%ft in this country.
Maybe it is time to &grmove to another country%ft?";
public static const TUTOR_TEXT_MOVE_COUNTRY = "Click here to return to the world map.";
public static const TUTOR_TEXT_TRANSFER = "Did you know that it is possible to &grtransfer cash%ft from previous countries and vice versa?";
public static const TUTOR_TEXT_MINI_MAP = "The &grmini map%ft can be used for scrolling and information.";
public static const TUTORIAL_LIST = [TUTOR_BEGINING_TUTORIAL, TUTOR_BUILD_BOOTH, TUTOR_BUILD_FOOD_CENTER, TUTOR_BUILD_ENTERTAINMENT, TUTOR_HIRE_STAFF, TUTOR_HIRE_JANITOR, TUTOR_HIRE_ELECTRICIAN, TUTOR_HIRE_SECURITY, TUTOR_PARKING_LOT_INFO, TUTOR_PURCHASE_BASEMENT, TUTOR_FACILITY, TUTOR_BUILD_PARKING_LOT, TUTOR_RESTROOM, TUTOR_ATM, TUTOR_PARKING_LOT, TUTOR_SUBWAY, TUTOR_EXPAND_ELEVATOR, TUTOR_VISITOR_NEED, TUTOR_PARAMETER_BUTTON, TUTOR_PROMOTE_STAFF_WARNING, TUTOR_STAFF_DETAIL, TUTOR_VISITOR_DETAIL, TUTOR_END_MISSION, TUTOR_MOVE_COUNTRY, TUTOR_TRANSFER, TUTOR_MINI_MAP];
public static const TUTORIAL_REQUIRMENT = [{tutorHeader:"Begining Tutorial", tutorText:TUTOR_TEXT_BEGINING_TUTORIAL, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true}, {tutorHeader:"Build Booth", tutorText:TUTOR_TEXT_BUILD_BOOTH, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, appearAgain:true, skipable:true}, {tutorHeader:"Build Food Center", tutorText:TUTOR_TEXT_BUILD_FOOD_CENTER, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, appearAgain:true, skipable:true}, {tutorHeader:"Build Entertainment", tutorText:TUTOR_TEXT_BUILD_ENTERTAINMENT, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, appearAgain:true, skipable:true}, {tutorHeader:"Hire Staff", tutorText:TUTOR_TEXT_HIRE_STAFF, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, appearAgain:true, skipable:true}, {tutorHeader:"Hire Janitor", tutorText:TUTOR_TEXT_HIRE_JANITOR, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, skipable:true}, {tutorHeader:"Hire Electrician", tutorText:TUTOR_TEXT_HIRE_ELECTRICIAN, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, skipable:true}, {tutorHeader:"Hire Security", tutorText:TUTOR_TEXT_HIRE_SECURITY, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:120, skipable:true}, {tutorHeader:"Parking Lot info", tutorText:TUTOR_TEXT_PARKING_LOT_INFO, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, nextShowWithoutSkip:true}, {tutorHeader:"Purchase Basement", tutorText:TUTOR_TEXT_PURCHASE_BASEMENT, numArrow:1, arrowAngle:[135], arrowPos:[[0, 0]], tutorialDelay:60, skipable:true}, {tutorHeader:"Facility", tutorText:TUTOR_TEXT_FACILITY, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, appearAgain:true, skipable:true}, {tutorHeader:"Build Parking Lot", tutorText:TUTOR_TEXT_BUILD_PARKING_LOT, numArrow:1, arrowAngle:[-135], arrowPos:[[0, 0]], tutorialDelay:60, skipable:true}, {tutorHeader:"Restroom", tutorText:TUTOR_TEXT_RESTROOM, numArrow:1, arrowAngle:[-135], arrowPos:[[0, 0]], tutorialDelay:60, skipable:true}, {tutorHeader:"ATM", tutorText:TUTOR_TEXT_ATM, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true}, {tutorHeader:"Parking Lot", tutorText:TUTOR_TEXT_PARKING_LOT, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true}, {tutorHeader:"Subway", tutorText:TUTOR_TEXT_SUBWAY, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true}, {tutorHeader:"Expand Elevator", tutorText:TUTOR_TEXT_EXPAND_ELEVATOR, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tipsAdd:"elevatorExpand"}, {tutorHeader:"Visitor Need", tutorText:TUTOR_TEXT_VISITOR_NEED, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tipsAdd:"visitorNeed"}, {tutorHeader:"Parameter Detail", tutorText:TUTOR_TEXT_PARAMETER_BUTTON, numArrow:1, arrowAngle:[10], arrowPos:[[344, 45]], tutorialDelay:60, skipable:true, tipsAdd:"useParameterButton"}, {tutorHeader:"Promote Staff Warning", tutorText:TUTOR_TEXT_PROMOTE_STAFF_WARNING, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tipsAdd:"promoteEmployee"}, {tutorHeader:"Staff Detail", tutorText:TUTOR_TEXT_STAFF_DETAIL, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true}, {tutorHeader:"Visitor Detail", tutorText:TUTOR_TEXT_VISITOR_DETAIL, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tipsAdd:"visitorNeed"}, {tutorHeader:"End Mission", tutorText:TUTOR_TEXT_END_MISSION, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tutorNext:TUTOR_MOVE_COUNTRY, nextShowWithoutSkip:true}, {tutorHeader:"Move Country", tutorText:TUTOR_TEXT_MOVE_COUNTRY, numArrow:1, arrowAngle:[45], arrowPos:[[590, 50]], tutorialDelay:60, skipable:true}, {tutorHeader:"Transfer", tutorText:TUTOR_TEXT_TRANSFER, numArrow:1, arrowAngle:[155], arrowPos:[[490, 451]], tutorialDelay:60, skipable:true, tipsAdd:"transferMode"}, {tutorHeader:"Mini Map", tutorText:TUTOR_TEXT_MINI_MAP, numArrow:0, arrowAngle:[], arrowPos:[], tutorialDelay:60, skipable:true, tipsAdd:"minimap"}];
public static function getTutorialRequirment(_arg1:String):Object{
var _local2:* = null;
var _local3:* = TUTORIAL_LIST.indexOf(_arg1);
if ((_local3 in TUTORIAL_REQUIRMENT)){
_local2 = Utility.cloning(TUTORIAL_REQUIRMENT[_local3]);
};
return (_local2);
}
public static function getTutorialType(_arg1:Object):String{
var _local2:* = "";
var _local3:* = TUTORIAL_REQUIRMENT.indexOf(_arg1);
if ((_local3 in TUTORIAL_LIST)){
_local2 = Utility.cloning(TUTORIAL_LIST[_local3]);
};
return (_local2);
}
}
}//package Instance.constant
Section 49
//UpgradeList (Instance.constant.UpgradeList)
package Instance.constant {
public class UpgradeList {
public static const UPGRADE_AVAILABLE = [{header:"Special Trolley", description:"Make visitor bring more money so they're able to buy more items.", unlock:1, price:30000}, {header:"Cute Shoping Bag", description:"Make Visitor to visit other shop often.", unlock:1, price:15000}, {header:"Super Mop", description:"Janitor clean faster.", unlock:1, price:25000}, {header:"Basement Lv 1", description:"Enable to access level 1 basement and parking lot.", unlock:1, price:20000}, {header:"Basement Lv 2", description:"Enable to access level 2 basement and subway.", unlock:3, price:35000, requirmentInfo:"Require: Basement Lv 1"}, {header:"Basement Lv 3", description:"Enable to access level 3 basement and visitor's mood increase faster.", unlock:4, price:50000, requirmentInfo:"Require: Basement Lv 2"}, {header:"Expert Bin", description:"Reduces trashes thrown by visitors, except the villain ones.", unlock:2, price:45000}, {header:"Super Shoes", description:"Allow securities to dash.", unlock:1, price:30000}, {header:"Fine Battery", description:"Electrician repair booth faster.", unlock:2, price:55000}, {header:"Amazing LCD TV", description:"Increace each visitor's patience.", unlock:3, price:70000}, {header:"Super Vitamin", description:"Employee's stamina reduce slower.", unlock:3, price:90000}, {header:"Free Wi-Fi", description:"Reduce chance visitors to go home.", unlock:3, price:70000}, {header:"Wagyu Red Meat", description:"Visitors buy more item at burger store or steak n grill.", unlock:3, price:45000}, {header:"Cool Mannequin", description:"Visitors buy more item at boutique.", unlock:2, price:20000}, {header:"Glamorous Speaker", description:"More visitors interest to your hall.", unlcok:5, price:120000}, {header:"Red Carpet", description:"Increase chance special visitor to visit your mall.", unlock:4, price:55000}, {header:"Sensitive Alarm", description:"Alarm rung often when being robbed.", unlock:4, price:80000}, {header:"Strong Wire", description:"Elevator move faster.", unlock:5, price:75000}, {header:"Deluxe Elevator", description:"Increase each elevator's maximum capacity.", unlock:4, price:60000}, {header:"Prohibition Sign", description:"Reduce number villain visitor to come your mall.", unlock:3, price:50000}, {header:"Royal Sugar", description:"Visitors buy more item at cafe, cake, ice cream or candy shop.", unlock:2, price:50000}, {header:"Segway", description:"Securities don't lose stamina while walking or running.", unlock:4, price:95000}, {header:"Generator Set", description:"Reduce electricity trouble.", unlock:1, price:45000}, {header:"Motivation", description:"Increase experience gain of each employee.", unlock:2, price:20000}, {header:"Awsome CCTV", description:"Reduce number of bandit.", unlock:4, price:50000}, {header:"Da Vinci's Art", description:"Visitor's mood increased every time.", unlock:4, price:100000}, {header:"Broadcast", description:"Boost popularity gain", unlock:5, price:150000}, {header:"Pearl Soap", description:"Visitor mood increase after exit from restroom", unlock:5, price:30000}, {header:"Super Engine", description:"Escalator move faster", unlock:5, price:30000}, {header:"Air Refresher", description:"Reduce number of trash", unlock:4, price:75000}];
public static function getUpgradeByName(_arg1:String):Object{
var _local2:* = null;
var _local3:* = 0;
while (_local3 < UPGRADE_AVAILABLE.length) {
if (UPGRADE_AVAILABLE[_local3].header == _arg1){
_local2 = UPGRADE_AVAILABLE[_local3];
break;
};
_local3++;
};
return (_local2);
}
}
}//package Instance.constant
Section 50
//VisitorList (Instance.constant.VisitorList)
package Instance.constant {
import Instance.modules.*;
public class VisitorList {
public static const VISITOR_TYPE_LIST = [VisitorAfro, VisitorAfroFemale, VisitorBlondie, VisitorAwam, VisitorBrewok, VisitorCheerGirl, VisitorHiphop, VisitorNegroFemale, VisitorNegroMale, VisitorNerd, VisitorPunk, VisitorReggae, VisitorTeenGirl, VisitorWenart];
public static const VISITOR_VILLAIN_LIST = [VisitorAfroVillain, VisitorAwamVillain, VisitorBlondieVillain, VisitorPunkVillain, VisitorWenartVillain];
public static const RELATION_VILLAIN_LIST = [VisitorAfro, VisitorAwam, VisitorBlondie, VisitorPunk, VisitorWenart];
public static const MALE_LIST = [VisitorAfro, VisitorAfroVillain, VisitorAwam, VisitorBrewok, VisitorHiphop, VisitorNegroMale, VisitorPunk, VisitorReggae, VisitorWenart, VisitorIndiaMale, VisitorAsianMale, VisitorArabian, VisitorBussinessman, VisitorAlnord, VisitorChuckNourish, VisitorDustbinBiebir, VisitorMrPeanut, VisitorSteveWork];
public static const FEMALE_LIST = [VisitorAfroFemale, VisitorBlondie, VisitorCheerGirl, VisitorNegroFemale, VisitorNerd, VisitorTeenGirl, VisitorBlondieVillain, VisitorAsianFemale, VisitorIndiaFemale, VisitorKateCentertown, VisitorKatyBerry, VisitorKezya, VisitorLadyGogo, VisitorMeleeCyrus];
public static const SPECIAL_VISITOR_LIST = [VisitorAlnord, VisitorChuckNourish, VisitorDustbinBiebir, VisitorKateCentertown, VisitorKatyBerry, VisitorKezya, VisitorLadyGogo, VisitorMeleeCyrus, VisitorMrPeanut, VisitorSteveWork];
public static const SPECIAL_VISITOR_NAME = ["Alnord Swasanasegar", "Chuck Nourish", "Dustbin Biebir", "Kate Centertown", "Katy Berry", "Kezya", "Lady Gogo", "Melee Cyrus", "Mr.Peanut", "Steve Work"];
public static const SPECIAL_VISITOR_CAR_TYPE = ["Gray Skyline", "Green Jeep", "Blue Skyline", "Ferari", "Ferari", "Green Skyline", "Brown Skyline", "Blue Skyline", "Green VW", "Nothing"];
public static const SPECIAL_VISITOR_MUST_HAVE_CAR = [VisitorAlnord, VisitorKateCentertown, VisitorLadyGogo, VisitorMrPeanut];
public static const NORMAL = "normal";
public static const VILLAIN = "villain";
public static const SPECIAL = "special";
public static const STAFF_AVAILABLE = [CrewJanitor, CrewElectrician, CrewSecurity, CrewEntertainer];
public static const STAFF_NAME = ["Janitor", "Electrician", "Security", "Entertainer"];
public static const STAFF_PRICE = [120, 150, 180, 200];
public static const STAFF_WAGE = [[30, 55, 80], [45, 75, 115], [60, 90, 130], [75, 100, 150]];
public static const STAFF_PROMOTE = [[90, 100], [100, 120], [120, 150], [150, 180]];
public static var VISITOR_ORIGIN:Array = new Array();
public static var VISITOR_ORIGIN_TYPE:Array = new Array();
public static var BANDIT_ON_COUNTRY:Array = new Array();
public static var CRIME_INCREMENT:Array = new Array();
public static function getRandomVisitorList(_arg1:String=""):Class{
var _local2:* = ((_arg1 in VISITOR_ORIGIN)) ? VISITOR_ORIGIN[_arg1] : [];
var _local3:* = VISITOR_TYPE_LIST.concat(_local2);
var _local4:* = Math.floor((Math.random() * _local3.length));
return (_local3[_local4]);
}
public static function getRandomFemaleVisitorList(_arg1:String=""):Class{
var _local6:*;
var _local2:* = ((_arg1 in VISITOR_ORIGIN)) ? VISITOR_ORIGIN[_arg1] : [];
var _local3:* = VISITOR_TYPE_LIST.concat(_local2);
var _local4:* = 0;
while (_local4 < MALE_LIST.length) {
_local6 = _local3.indexOf(MALE_LIST[_local4]);
if ((_local6 in _local3)){
_local3.splice(_local6, 1);
};
_local4++;
};
var _local5:* = Math.floor((Math.random() * _local3.length));
return (_local3[_local5]);
}
public static function getRandomMaleVisitorList(_arg1:String=""):Class{
var _local6:*;
var _local2:* = ((_arg1 in VISITOR_ORIGIN)) ? VISITOR_ORIGIN[_arg1] : [];
var _local3:* = VISITOR_TYPE_LIST.concat(_local2);
var _local4:* = 0;
while (_local4 < FEMALE_LIST.length) {
_local6 = _local3.indexOf(FEMALE_LIST[_local4]);
if ((_local6 in _local3)){
_local3.splice(_local6, 1);
};
_local4++;
};
var _local5:* = Math.floor((Math.random() * _local3.length));
return (_local3[_local5]);
}
public static function getRandomVillainList():Class{
var _local1:* = Math.floor((Math.random() * VISITOR_VILLAIN_LIST.length));
return (VISITOR_VILLAIN_LIST[_local1]);
}
public static function compareGenderByType(_arg1:Class):Boolean{
var _local2:* = (((MALE_LIST.indexOf(_arg1) >= 0)) || ((FEMALE_LIST.indexOf(_arg1) < 0)));
return (_local2);
}
public static function compareTypeOfVisitor(_arg1:Class):String{
var _local2:* = ((VISITOR_VILLAIN_LIST.indexOf(_arg1))>=0) ? VILLAIN : NORMAL;
return (_local2);
}
public static function compareVillainVisitorType(_arg1:Class):Class{
var _local2:* = null;
var _local3:* = VISITOR_VILLAIN_LIST.indexOf(_arg1);
if ((_local3 in RELATION_VILLAIN_LIST)){
_local2 = RELATION_VILLAIN_LIST[_local3];
};
return (_local2);
}
public static function compareNameByType(_arg1:Class):String{
var _local2:* = "";
var _local3:* = STAFF_AVAILABLE.indexOf(_arg1);
if ((_local3 in STAFF_NAME)){
_local2 = STAFF_NAME[_local3];
};
return (_local2);
}
public static function compareTypeByName(_arg1:String):Class{
var _local2:* = null;
var _local3:* = STAFF_NAME.indexOf(_arg1);
if ((_local3 in STAFF_AVAILABLE)){
_local2 = STAFF_AVAILABLE[_local3];
};
return (_local2);
}
public static function comparePriceByType(_arg1:Class):Number{
var _local2:* = STAFF_AVAILABLE.indexOf(_arg1);
if (_local2 >= 0){
return (STAFF_PRICE[_local2]);
};
return (0);
}
public static function compareWageByType(_arg1:Class, _arg2:int=0):Number{
var _local3:* = STAFF_AVAILABLE.indexOf(_arg1);
if (_local3 >= 0){
return (STAFF_WAGE[_local3][_arg2]);
};
return (0);
}
public static function getPromotionCost(_arg1:Class, _arg2:int=0):Number{
var _local3:* = STAFF_AVAILABLE.indexOf(_arg1);
if ((_local3 in STAFF_PROMOTE)){
if ((_arg2 in STAFF_PROMOTE)){
return (STAFF_PROMOTE[_local3][_arg2]);
};
return (0);
//unresolved jump
};
return (0);
}
public static function getSpecialVisitorName(_arg1:Class):String{
var _local2:* = "Unknown";
var _local3:* = SPECIAL_VISITOR_LIST.indexOf(_arg1);
if ((_local3 in SPECIAL_VISITOR_NAME)){
_local2 = SPECIAL_VISITOR_NAME[_local3];
};
return (_local2);
}
public static function getSpecialVisitorType(_arg1:String):Class{
var _local2:* = null;
var _local3:* = SPECIAL_VISITOR_NAME.indexOf(_arg1);
if ((_local3 in SPECIAL_VISITOR_LIST)){
_local2 = SPECIAL_VISITOR_LIST[_local3];
};
return (_local2);
}
public static function getFansOf(_arg1:Object):Class{
var _local6:*;
var _local2:* = null;
var _local3:* = new Array();
var _local4:* = SPECIAL_VISITOR_LIST.concat();
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_arg1.specialVisitorFans.indexOf(_local6) < 0){
switch (_local6){
case VisitorDustbinBiebir:
if (Calculate.chance(30)){
if (!_arg1.gender){
_local3.push(_local6);
};
};
break;
case VisitorKatyBerry:
if (Calculate.chance(30)){
if (_arg1.gender){
_local3.push(_local6);
};
};
break;
case VisitorMrPeanut:
if (Calculate.chance(40)){
_local3.push(_local6);
};
break;
default:
if (Calculate.chance(15)){
_local3.push(_local6);
};
};
};
_local5++;
};
if (Calculate.chance(30)){
if (!_arg1.gender){
if (_arg1.specialVisitorFans.indexOf(VisitorDustbinBiebir) < 0){
_local3.push(VisitorDustbinBiebir);
};
} else {
if (_arg1.gender){
if (_arg1.specialVisitorFans.indexOf(VisitorKatyBerry) < 0){
_local3.push(VisitorKatyBerry);
};
};
};
};
if (Calculate.chance(40)){
if (_arg1.specialVisitorFans.indexOf(VisitorMrPeanut) < 0){
_local3.push(VisitorMrPeanut);
};
};
if (Calculate.chance(15)){
};
if (_local3.length > 0){
_local2 = _local3[Math.floor((Math.random() * _local3.length))];
};
return (_local2);
}
public static function getUpgradeEffect(_arg1:Object):String{
var _local2:* = "";
if (_arg1.employeeLevel < _arg1.MAX_LEVEL){
if ((_arg1 is CrewJanitor)){
_local2 = "Clean faster.";
} else {
if ((_arg1 is CrewElectrician)){
_local2 = "Repair faster.";
} else {
if ((_arg1 is CrewSecurity)){
_local2 = "Increase line of sight\nRun faster.";
} else {
if ((_arg1 is CrewEntertainer)){
_local2 = "Increase visitor's mood faster.";
};
};
};
};
if (_arg1.SPEED_LV != null){
if (_arg1.SPEED_LV[_arg1.employeeLevel] > _arg1.SPEED_LV[(_arg1.employeeLevel - 1)]){
_local2 = (_local2 + "\nWalk faster.");
};
};
_local2 = (_local2 + "\nStamina decrease slower.");
_local2 = (_local2 + ("\nWage per shift = " + compareWageByType(Utility.getClass(_arg1), _arg1.employeeLevel)));
} else {
_local2 = "Level Max.";
};
return (_local2);
}
public static function isMustHaveCar(_arg1:Class):Boolean{
var _local2:* = false;
var _local3:* = SPECIAL_VISITOR_MUST_HAVE_CAR.indexOf(_arg1);
_local2 = (_local3 >= 0);
return (_local2);
}
public static function getCarType(_arg1:Class):String{
var _local2:* = "random";
var _local3:* = SPECIAL_VISITOR_LIST.indexOf(_arg1);
if ((_local3 in SPECIAL_VISITOR_CAR_TYPE)){
_local2 = SPECIAL_VISITOR_CAR_TYPE[_local3];
};
return (_local2);
}
public static function getRandomBanditOnCountry(_arg1:String):Class{
var _local3:*;
var _local2:* = null;
if ((_arg1 in BANDIT_ON_COUNTRY)){
_local3 = Math.floor((Math.random() * BANDIT_ON_COUNTRY[_arg1].length));
_local2 = BANDIT_ON_COUNTRY[_arg1][_local3];
};
return (_local2);
}
public static function getCrimeIncrement(_arg1:String):Number{
var _local2:* = 0;
if ((_arg1 in CRIME_INCREMENT)){
_local2 = CRIME_INCREMENT[_arg1];
};
return (_local2);
}
VISITOR_ORIGIN[ShopText.MAP_INDIA] = [VisitorIndiaFemale, VisitorIndiaMale];
VISITOR_ORIGIN[ShopText.MAP_RUSIA] = [VisitorAsianFemale, VisitorAsianMale];
VISITOR_ORIGIN[ShopText.MAP_ARABIAN] = [VisitorArabian];
VISITOR_ORIGIN[ShopText.MAP_ITALY] = [VisitorBussinessman];
VISITOR_ORIGIN[ShopText.MAP_BRITAIN] = [VisitorAsianFemale, VisitorAsianMale, VisitorBussinessman];
VISITOR_ORIGIN_TYPE["India"] = [VisitorIndiaFemale, VisitorIndiaMale];
VISITOR_ORIGIN_TYPE["Asian"] = [VisitorAsianFemale, VisitorAsianMale];
VISITOR_ORIGIN_TYPE["Arabic"] = [VisitorArabian];
BANDIT_ON_COUNTRY[ShopText.MAP_INDIA] = [BanditNormal];
BANDIT_ON_COUNTRY[ShopText.MAP_RUSIA] = [BanditNormal, BanditNormal, BanditNinja];
BANDIT_ON_COUNTRY[ShopText.MAP_ARABIAN] = [BanditNormal, BanditNinja, BanditNinja];
BANDIT_ON_COUNTRY[ShopText.MAP_ITALY] = [BanditNormal, BanditNinja, BanditNinja, BanditGlider, BanditGlider];
BANDIT_ON_COUNTRY[ShopText.MAP_BRITAIN] = [BanditNormal, BanditNormal, BanditNinja, BanditNinja, BanditNinja, BanditGlider, BanditGlider, BanditGlider, BanditUltimate];
CRIME_INCREMENT[ShopText.MAP_INDIA] = 0.5;
CRIME_INCREMENT[ShopText.MAP_RUSIA] = 0.75;
CRIME_INCREMENT[ShopText.MAP_ARABIAN] = 1;
CRIME_INCREMENT[ShopText.MAP_ITALY] = 1.5;
CRIME_INCREMENT[ShopText.MAP_BRITAIN] = 2;
}
}//package Instance.constant
Section 51
//WorldMapRelation (Instance.constant.WorldMapRelation)
package Instance.constant {
import flash.display.*;
public class WorldMapRelation {
public static const BTN_NAME = ["btnIndia", "btnRusia", "btnArabian", "btnItaly", "btnBritain"];
public static const COUNTRY_LIST = [ShopText.MAP_INDIA, ShopText.MAP_RUSIA, ShopText.MAP_ARABIAN, ShopText.MAP_ITALY, ShopText.MAP_BRITAIN];
public static const LANDMARK_LIST = [WorldMapIndiaLandmark, WorldMapRusiaLandmark, WorldMapDubaiLandmark, WorldMapItalyLandmark, WorldMapLondonLandmark];
public static function getLandmarkByName(_arg1:String):Class{
var _local2:* = null;
var _local3:* = BTN_NAME.indexOf(_arg1);
if ((_local3 in LANDMARK_LIST)){
_local2 = LANDMARK_LIST[_local3];
};
return (_local2);
}
public static function getCountryByName(_arg1:String):String{
var _local2:* = "";
var _local3:* = BTN_NAME.indexOf(_arg1);
if ((_local3 in COUNTRY_LIST)){
_local2 = COUNTRY_LIST[_local3];
};
return (_local2);
}
}
}//package Instance.constant
Section 52
//BonusEvent (Instance.events.BonusEvent)
package Instance.events {
import flash.events.*;
public class BonusEvent extends Event {
var _amount:Number;
public static const TAKEN = "taken";
public function BonusEvent(_arg1:String, _arg2:Number=0){
super(_arg1, true, true);
_amount = _arg2;
}
override public function clone():Event{
return (new BonusEvent(type));
}
public function get amount():Number{
return (_amount);
}
}
}//package Instance.events
Section 53
//BoothEvent (Instance.events.BoothEvent)
package Instance.events {
import flash.events.*;
public class BoothEvent extends Event {
var _boothLevel:int;
public static const BEGIN_UPGRADE = "beginUpgrade";
public static const END_UPGRADE = "endUpgrade";
public static const BEFORE_FLASHING_UPGRADE = "beforeFlashingUpgrade";
public static const AFTER_FLASHING_UPGRADE = "afterFlashingUpgrade";
public static const BOOTH_CLICK = "boothClick";
public static const BECOMES_ROBBED = "becomesRobbed";
public static const ALARM_TRIGGERED = "alarmTrigger";
public static const ELEVATOR_EXPANDED = "elevatorExpanded";
public static const CREATED = "created";
public static const DESTROYED = "destroyed";
public static const DOOR_OPENED = "doorOpened";
public static const DOOR_CLOSED = "doorClosed";
public static const ICE_CREAM_SERVE = "iceCreamServe";
public static const HALL_CHANGE_DAY = "hallChangeDay";
public static const VISITOR_UPDATE = "boothVisitorUpdate";
public function BoothEvent(_arg1:String, _arg2:int=0){
super(_arg1, true, true);
_boothLevel = _arg2;
}
override public function clone():Event{
return (new BoothEvent(type, _boothLevel));
}
public function get boothLevel():int{
return (_boothLevel);
}
}
}//package Instance.events
Section 54
//InformationTableEvent (Instance.events.InformationTableEvent)
package Instance.events {
import flash.events.*;
public class InformationTableEvent extends Event {
var _lastX:Number;
var _lastY:Number;
public static const ON_CLOSE = "onClose";
public function InformationTableEvent(_arg1:String, _arg2:Number=0, _arg3:Number=0){
super(_arg1, true, true);
_lastX = _arg2;
_lastY = _arg3;
}
override public function clone():Event{
return (new InformationTableEvent(type, _lastX, _lastY));
}
public function get lastX():Number{
return (_lastX);
}
public function get lastY():Number{
return (_lastY);
}
}
}//package Instance.events
Section 55
//ParameterDetailEvent (Instance.events.ParameterDetailEvent)
package Instance.events {
import flash.events.*;
public class ParameterDetailEvent extends Event {
var _param:int;
public static const CHANGE_CATEGORY = "changeCategory";
public static const CHANGE_PAGE = "changePage";
public function ParameterDetailEvent(_arg1:String, _arg2:int=0){
super(_arg1, true, true);
_param = _arg2;
}
override public function clone():Event{
return (new ParameterDetailEvent(type, _param));
}
public function get param():int{
return (_param);
}
}
}//package Instance.events
Section 56
//SectorPanelEvent (Instance.events.SectorPanelEvent)
package Instance.events {
import flash.events.*;
public class SectorPanelEvent extends Event {
public static const SECTOR_ITEM_ACTIVE = "sectorItemActive";
public static const SECTOR_ITEM_DEACTIVE = "sectorItemDeactive";
public static const SECTOR_PANEL_ON_SHOW = "sectorItemOnShow";
public static const SECTOR_PANEL_ON_HIDE = "sectorItemOnHide";
public function SectorPanelEvent(_arg1:String){
super(_arg1, true, true);
}
override public function clone():Event{
return (new SectorPanelEvent(type));
}
}
}//package Instance.events
Section 57
//ShopCommandEvent (Instance.events.ShopCommandEvent)
package Instance.events {
import flash.events.*;
public class ShopCommandEvent extends Event {
var _command:String;
public static const CALL_COMMAND = "callCommand";
public static const RETURN_TO_WORLD_MAP = "returnToWorldMap";
public static const RETURN_TO_MAIN_MENU = "returnToMainMenu";
public function ShopCommandEvent(_arg1:String, _arg2:String=""){
super(_arg1, true, true);
_command = _arg2;
}
override public function clone():Event{
return (new ShopCommandEvent(type, _command));
}
public function get command():String{
return (_command);
}
}
}//package Instance.events
Section 58
//ShopFrameEvent (Instance.events.ShopFrameEvent)
package Instance.events {
import flash.events.*;
public class ShopFrameEvent extends Event {
var _frameNumber:int;
var _frameLabel:String;
public static const ENTER_SOME_FRAME = "enterSomeFrame";
public function ShopFrameEvent(_arg1:String, _arg2:int, _arg3:String=""){
super(_arg1, true, true);
_frameNumber = _arg2;
_frameLabel = _arg3;
}
override public function clone():Event{
return (new ShopFrameEvent(type, _frameNumber, _frameLabel));
}
public function get frameNumber():int{
return (_frameNumber);
}
public function get frameLabel():String{
return (_frameLabel);
}
}
}//package Instance.events
Section 59
//ShopGameEvent (Instance.events.ShopGameEvent)
package Instance.events {
import flash.events.*;
public class ShopGameEvent extends Event {
var _gameMode:String;
var _country:String;
var _speed:int;
public static const BEGIN_GAME = "beginGame";
public static const BEGIN_LOAD_GAME = "beginLoadGame";
public static const BACK_TO_MENU = "backToMenu";
public static const NEW_GAME = "newGame";
public static const LOAD_GAME = "loadGame";
public static const START_GAME = "startGame";
public static const UPDATE = "update";
public static const SPEED_CHANGE = "speedChange";
public static const POSITION_CHANGE = "positionChange";
public static const SCROLL_WITH_MOUSE = "scrollWithMouse";
public static const SCROLL_WITH_KEY = "scrollWithKey";
public static const HIRE_STAFF = "hireStaff";
public static const FIRE_STAFF = "fireStaff";
public static const DETAIL_SHOWN = "detailShown";
public static const VISITOR_ARRIVE = "visitorArrive";
public static const VISITOR_LEAVE = "visitorLeave";
public static const BOOTH_CREATED = "boothCreated";
public static const BOOTH_DESTROYED = "boothDestroyed";
public static const CANCEL_BUILD = "cancelBuild";
public static const CASH_UPDATE = "cashUpdate";
public static const HALL_ON_UPDATE = "hallOnUpdate";
public static const ALARM_STOPPED = "alarmStopped";
public static const POPULARITY_UPDATE = "popularityUpdate";
public static const PURCHASE_EXTRA_UPGRADE = "purchaseExtraUpgrade";
public static const NEW_MISSION_SET = "newMissionSet";
public static const MISSION_CLEAR = "missionClear";
public static const MISSION_CHANGE = "missionChange";
public static const MISSION_COMPLETE = "missionComplete";
public static const CHANGE_DAY = "changeDay";
public static const COMBO_FOUND = "comboFound";
public static const PLAY_THE_GAME = "playTheGame";
public static const ACHIEVEMENT_UNLOCKED = "achievementUnlocked";
public static const SFX_VOLUME_CHANGE = "sfxVolumeChange";
public function ShopGameEvent(_arg1:String, _arg2:String=null, _arg3:String=null, _arg4:int=1, _arg5:Number=0){
super(_arg1, true, true);
_gameMode = _arg2;
_country = _arg3;
_speed = _arg4;
}
override public function clone():Event{
return (new ShopGameEvent(type, _gameMode, _country, _speed));
}
public function get gameMode():String{
return (_gameMode);
}
public function get country():String{
return (_country);
}
public function get speed():int{
return (_speed);
}
}
}//package Instance.events
Section 60
//SliderBarEvent (Instance.events.SliderBarEvent)
package Instance.events {
import flash.events.*;
public class SliderBarEvent extends Event {
public static const CHANGE_POSITION = "changePosition";
public function SliderBarEvent(_arg1:String){
super(_arg1, true, true);
}
override public function clone():Event{
return (new SliderBarEvent(type));
}
}
}//package Instance.events
Section 61
//ToggleButtonEvent (Instance.events.ToggleButtonEvent)
package Instance.events {
import flash.events.*;
public class ToggleButtonEvent extends Event {
public static const ACTIVATE = "doActivate";
public static const DEACTIVATE = "doDeactivate";
public static const FORCE_ACTIVATE = "forceActivate";
public static const FORCE_DEACTIVATE = "forceDeactivate";
public function ToggleButtonEvent(_arg1:String){
super(_arg1, true, true);
}
override public function clone():Event{
return (new ToggleButtonEvent(type));
}
}
}//package Instance.events
Section 62
//TutorialEvent (Instance.events.TutorialEvent)
package Instance.events {
import flash.events.*;
public class TutorialEvent extends Event {
public static const TUTORIAL_END = "tutorialEnd";
public function TutorialEvent(_arg1:String){
super(_arg1);
}
override public function clone():Event{
return (new TutorialEvent(type));
}
}
}//package Instance.events
Section 63
//VisitorEvent (Instance.events.VisitorEvent)
package Instance.events {
import flash.display.*;
import flash.events.*;
public class VisitorEvent extends Event {
var _booth:MovieClip;
var _related:MovieClip;
public static const VISITOR_CLICK = "visitorClick";
public static const BEGIN_PROMOTE = "beginPromote";
public static const END_PROMOTE = "endPromote";
public static const BEFORE_FLASHING_PROMOTE = "beforeFlashingPromote";
public static const AFTER_FLASHING_PROMOTE = "afterFlashingPromote";
public static const BEGIN_FIRE = "beginFire";
public static const ON_OUT_WORLD = "onOutWorld";
public static const OUT_BY_CAR = "outByCar";
public static const ENTER_BOOTH = "enterBooth";
public static const EXIT_BOOTH = "exitBooth";
public static const BECOMES_ENTER_ELEVATOR = "becomesEnterElevator";
public static const ENTER_ELEVATOR = "enterElevator";
public static const BECOMES_EXIT_ELEVATOR = "becomesExitElevator";
public static const OUT_ELEVATOR = "outElevator";
public static const ENTER_ESCALATOR = "enterEscalator";
public static const OUT_ESCALATOR = "outEscalator";
public static const ARRESTED = "arrested";
public static const BEGIN_ARRESTED = "beginArrested";
public static const REACH_EDGE = "reachEdge";
public static const SECURITY_FINISH_ACTION = "securityFinishAction";
public static const EXP_GAIN = "expGain";
public static const STAMINA_UPDATE = "staminaUpdate";
public static const MOOD_UPDATE = "staminaUpdate";
public static const GO_HOME_UPDATE = "goHomeUpdate";
public static const TRANSFORM_TO_NORMAL = "transformToNormal";
public static const BEGIN_TRANSFORM_TO_NORMAL = "beginTransformToNormal";
public static const CAR_LOST = "carLost";
public static const TRAIN_DROP_VISITOR = "trainDropVisitor";
public function VisitorEvent(_arg1:String, _arg2:MovieClip=null, _arg3:MovieClip=null){
super(_arg1, true, true);
_booth = _arg2;
_related = _arg3;
}
override public function clone():Event{
return (new VisitorEvent(type, _booth));
}
public function get booth():MovieClip{
return (_booth);
}
public function get related():MovieClip{
return (_related);
}
}
}//package Instance.events
Section 64
//Calculate (Instance.modules.Calculate)
package Instance.modules {
public class Calculate {
public static function chance(_arg1:Number):Boolean{
var _local2:* = (Math.random() * 100);
return ((_local2 <= _arg1));
}
}
}//package Instance.modules
Section 65
//GenerateName (Instance.modules.GenerateName)
package Instance.modules {
import Instance.constant.*;
public class GenerateName {
static var listNamaDepanMale:Array = new Array();
static var listNamaBelakangMale:Array = new Array();
static var listNamaDepanFemale:Array = new Array();
static var listNamaBelakangFemale:Array = new Array();
static var nameListMaleFrontCountry:Array = new Array();
static var nameListFemaleFrontCountry:Array = new Array();
static var nameListMaleBackCountry:Array = new Array();
static var nameListFemaleBackCountry:Array = new Array();
public function GenerateNama():void{
}
public static function getNameMale(_arg1:String=""):String{
var _local2:* = "";
var _local3:* = "";
if ((_arg1 in nameListMaleFrontCountry)){
_local2 = nameListMaleFrontCountry[_arg1][randRange(0, (nameListMaleFrontCountry[_arg1].length - 1))];
} else {
_local2 = listNamaDepanMale[randRange(0, (listNamaDepanMale.length - 1))];
};
if ((_arg1 in nameListMaleBackCountry)){
_local3 = nameListMaleBackCountry[_arg1][randRange(0, (nameListMaleBackCountry[_arg1].length - 1))];
} else {
_local3 = listNamaBelakangMale[randRange(0, (listNamaBelakangMale.length - 1))];
};
var _local4:* = ((_local2 + " ") + _local3);
return (_local4);
}
public static function getNameFemale(_arg1:String=""):String{
var _local2:* = "";
var _local3:* = "";
if ((_arg1 in nameListFemaleFrontCountry)){
_local2 = nameListFemaleFrontCountry[_arg1][randRange(0, (nameListFemaleFrontCountry[_arg1].length - 1))];
} else {
_local2 = listNamaDepanFemale[randRange(0, (listNamaDepanFemale.length - 1))];
};
if ((_arg1 in nameListFemaleBackCountry)){
_local3 = nameListFemaleBackCountry[_arg1][randRange(0, (nameListFemaleBackCountry[_arg1].length - 1))];
} else {
_local3 = listNamaBelakangFemale[randRange(0, (listNamaBelakangFemale.length - 1))];
};
var _local4:* = ((_local2 + " ") + _local3);
return (_local4);
}
static function randRange(_arg1:Number, _arg2:Number):Number{
var _local3:Number = (Math.floor((((Math.random() * _arg2) - _arg1) + 1)) + _arg1);
return (_local3);
}
listNamaDepanMale.push("Marco");
listNamaDepanMale.push("Delbert");
listNamaDepanMale.push("Felipe");
listNamaDepanMale.push("Randolph");
listNamaDepanMale.push("Dominic");
listNamaDepanMale.push("Pete");
listNamaDepanMale.push("Johnathan");
listNamaDepanMale.push("Jonathon");
listNamaDepanMale.push("Robin");
listNamaDepanMale.push("Rudolph");
listNamaDepanMale.push("Pete");
listNamaDepanMale.push("Rudy");
listNamaDepanMale.push("Archie");
listNamaDepanMale.push("Alton");
listNamaDepanMale.push("Malcolm");
listNamaDepanMale.push("Sam");
listNamaDepanMale.push("Dean");
listNamaDepanMale.push("Lewis");
listNamaDepanMale.push("Dan");
listNamaDepanMale.push("Vernon");
listNamaDepanMale.push("Derrick");
listNamaDepanMale.push("Wesley");
listNamaDepanMale.push("Ricardo");
listNamaDepanMale.push("Maurice");
listNamaDepanMale.push("Brent");
listNamaDepanMale.push("Herman");
listNamaDepanMale.push("Hector");
listNamaDepanMale.push("Roberto");
listNamaDepanMale.push("Rick");
listNamaDepanMale.push("Pedro");
listNamaDepanMale.push("Corey");
listNamaDepanMale.push("Lewis");
listNamaDepanMale.push("Greg");
listNamaDepanMale.push("Danniel");
listNamaDepanMale.push("Arnold");
listNamaDepanMale.push("Jacky");
listNamaDepanMale.push("Jason");
listNamaDepanMale.push("Elvis");
listNamaDepanMale.push("Lionel");
listNamaDepanMale.push("Wayne");
listNamaDepanMale.push("Ryan");
listNamaDepanMale.push("Patrick");
listNamaDepanMale.push("Eugene");
listNamaDepanMale.push("Pete");
listNamaDepanMale.push("Richard");
listNamaDepanMale.push("Kenny");
listNamaDepanMale.push("West");
listNamaDepanMale.push("Tukul");
listNamaDepanMale.push("Jimy");
listNamaDepanMale.push("Jack");
listNamaDepanMale.push("Adolf");
listNamaDepanMale.push("Alonso");
listNamaDepanMale.push("Anderson");
listNamaDepanMale.push("Andreas");
listNamaDepanMale.push("Benjamin");
listNamaDepanMale.push("Robbie");
listNamaDepanMale.push("Brad");
listNamaDepanMale.push("Carl");
listNamaDepanMale.push("Russel");
listNamaDepanMale.push("Dammien");
listNamaDepanMale.push("Fernando");
listNamaDepanMale.push("Erick");
listNamaDepanMale.push("Hommer");
listNamaDepanMale.push("Patrick");
listNamaDepanMale.push("Sandy");
listNamaDepanMale.push("Mick");
listNamaDepanMale.push("Bruce");
listNamaDepanMale.push("Bradley");
listNamaDepanMale.push("Howard");
listNamaDepanMale.push("John");
listNamaDepanMale.push("David");
listNamaDepanMale.push("Barrack");
listNamaDepanMale.push("Aaron");
listNamaBelakangMale.push("Wollard");
listNamaBelakangMale.push("Langstaff");
listNamaBelakangMale.push("Selander");
listNamaBelakangMale.push("Shoults");
listNamaBelakangMale.push("Theall");
listNamaBelakangMale.push("Kine");
listNamaBelakangMale.push("Gudiel");
listNamaBelakangMale.push("Lousteau");
listNamaBelakangMale.push("Sonnen");
listNamaBelakangMale.push("Reeb");
listNamaBelakangMale.push("Payden");
listNamaBelakangMale.push("Angstadt");
listNamaBelakangMale.push("Gaby");
listNamaBelakangMale.push("Nordby");
listNamaBelakangMale.push("Fennessey");
listNamaBelakangMale.push("Wenning");
listNamaBelakangMale.push("Kittell");
listNamaBelakangMale.push("Stagnaro");
listNamaBelakangMale.push("Bosma");
listNamaBelakangMale.push("Favero");
listNamaBelakangMale.push("Tessmer");
listNamaBelakangMale.push("Cleavenger");
listNamaBelakangMale.push("Hopf");
listNamaBelakangMale.push("Kulinski");
listNamaBelakangMale.push("Knappenberger");
listNamaBelakangMale.push("Ory");
listNamaBelakangMale.push("Ramiez");
listNamaBelakangMale.push("Sward");
listNamaBelakangMale.push("Bonier");
listNamaBelakangMale.push("Coday");
listNamaBelakangMale.push("Rossow");
listNamaBelakangMale.push("Warf");
listNamaBelakangMale.push("Haffey");
listNamaBelakangMale.push("Lanz");
listNamaBelakangMale.push("Vanbuskirk");
listNamaBelakangMale.push("Nordquist");
listNamaBelakangMale.push("Bassi");
listNamaBelakangMale.push("Barwick");
listNamaBelakangMale.push("Keleher");
listNamaBelakangMale.push("Angeles");
listNamaBelakangMale.push("Pires");
listNamaBelakangMale.push("Mutchler");
listNamaBelakangMale.push("Dicken");
listNamaBelakangMale.push("Helmick");
listNamaBelakangMale.push("Peffer");
listNamaBelakangMale.push("Cousar");
listNamaBelakangMale.push("Devoe");
listNamaBelakangMale.push("Ronco");
listNamaBelakangMale.push("Kreiner");
listNamaBelakangMale.push("Tannenbaum");
listNamaBelakangMale.push("Steinhauer");
listNamaBelakangMale.push("Michaelis");
listNamaBelakangMale.push("Luebke");
listNamaBelakangMale.push("Crossen");
listNamaBelakangMale.push("Jerkins");
listNamaBelakangMale.push("Gilmour");
listNamaBelakangMale.push("Norrell");
listNamaBelakangMale.push("Mccurley");
listNamaBelakangMale.push("Baumgardner");
listNamaBelakangMale.push("Orlowski");
listNamaBelakangMale.push("Arwana");
listNamaBelakangMale.push("Lanser");
listNamaDepanFemale.push("Juana");
listNamaDepanFemale.push("Alberta");
listNamaDepanFemale.push("Thelma");
listNamaDepanFemale.push("Myrtle");
listNamaDepanFemale.push("June");
listNamaDepanFemale.push("Georgia");
listNamaDepanFemale.push("Monica");
listNamaDepanFemale.push("Elizabeth");
listNamaDepanFemale.push("Margarita");
listNamaDepanFemale.push("Cathy");
listNamaDepanFemale.push("Josephine");
listNamaDepanFemale.push("Wilkie");
listNamaDepanFemale.push("Virginia");
listNamaDepanFemale.push("Kayla");
listNamaDepanFemale.push("Gloria");
listNamaDepanFemale.push("Colleen");
listNamaDepanFemale.push("Esther");
listNamaDepanFemale.push("Cathy");
listNamaDepanFemale.push("Miracle");
listNamaDepanFemale.push("Springs");
listNamaDepanFemale.push("Sylvia");
listNamaDepanFemale.push("Tara");
listNamaDepanFemale.push("Eva");
listNamaDepanFemale.push("Cassandra");
listNamaDepanFemale.push("Crystal");
listNamaDepanFemale.push("Pam");
listNamaDepanFemale.push("Carrie");
listNamaDepanFemale.push("Annie");
listNamaDepanFemale.push("Veronica");
listNamaDepanFemale.push("Ann");
listNamaDepanFemale.push("Elaine");
listNamaDepanFemale.push("Angela");
listNamaDepanFemale.push("Olivia");
listNamaDepanFemale.push("Gloria");
listNamaDepanFemale.push("Ruth");
listNamaDepanFemale.push("Yvette");
listNamaDepanFemale.push("Vivian");
listNamaDepanFemale.push("Parry");
listNamaDepanFemale.push("Luz");
listNamaDepanFemale.push("Edelman");
listNamaDepanFemale.push("Latoya");
listNamaDepanFemale.push("Lillian");
listNamaDepanFemale.push("Nora");
listNamaDepanFemale.push("Verna");
listNamaDepanFemale.push("Ogrady");
listNamaDepanFemale.push("Ramona");
listNamaDepanFemale.push("Irma");
listNamaDepanFemale.push("Minnie");
listNamaDepanFemale.push("Loretta");
listNamaDepanFemale.push("Edith");
listNamaDepanFemale.push("June");
listNamaDepanFemale.push("Crystal");
listNamaDepanFemale.push("Alice");
listNamaDepanFemale.push("Cora");
listNamaDepanFemale.push("Beth");
listNamaDepanFemale.push("Sheri");
listNamaDepanFemale.push("Juanita");
listNamaDepanFemale.push("Cindy");
listNamaDepanFemale.push("Michelle");
listNamaDepanFemale.push("Josephine");
listNamaDepanFemale.push("Joanne");
listNamaDepanFemale.push("Leslie");
listNamaDepanFemale.push("Lindsay");
listNamaDepanFemale.push("Britney");
listNamaDepanFemale.push("Kim");
listNamaDepanFemale.push("Pearl");
listNamaDepanFemale.push("Marriah");
listNamaDepanFemale.push("Virgine");
listNamaDepanFemale.push("Katty");
listNamaDepanFemale.push("Qory");
listNamaDepanFemale.push("Anna");
listNamaDepanFemale.push("Marlyn");
listNamaDepanFemale.push("Maddona");
listNamaDepanFemale.push("Venessa");
listNamaDepanFemale.push("Agnes");
listNamaDepanFemale.push("Alicia");
listNamaDepanFemale.push("Amber");
listNamaDepanFemale.push("Andrea");
listNamaDepanFemale.push("Cameron");
listNamaDepanFemale.push("Chelsea");
listNamaBelakangFemale.push("Gaston");
listNamaBelakangFemale.push("Santiago");
listNamaBelakangFemale.push("Ceasar");
listNamaBelakangFemale.push("Milton");
listNamaBelakangFemale.push("Haley");
listNamaBelakangFemale.push("Gamble");
listNamaBelakangFemale.push("Dicarlo");
listNamaBelakangFemale.push("Squire");
listNamaBelakangFemale.push("Leech");
listNamaBelakangFemale.push("Christenson");
listNamaBelakangFemale.push("Deese");
listNamaBelakangFemale.push("Dalrymple");
listNamaBelakangFemale.push("Shaffer");
listNamaBelakangFemale.push("Graybill");
listNamaBelakangFemale.push("Frisbie");
listNamaBelakangFemale.push("Miranda");
listNamaBelakangFemale.push("Magill");
listNamaBelakangFemale.push("Su");
listNamaBelakangFemale.push("Jasper");
listNamaBelakangFemale.push("Hightower");
listNamaBelakangFemale.push("Mcclellan");
listNamaBelakangFemale.push("Priester");
listNamaBelakangFemale.push("Hadden");
listNamaBelakangFemale.push("Beck");
listNamaBelakangFemale.push("Main");
listNamaBelakangFemale.push("Bourgeois");
listNamaBelakangFemale.push("Merida");
listNamaBelakangFemale.push("Johansen");
listNamaBelakangFemale.push("Blank");
listNamaBelakangFemale.push("Stith");
listNamaBelakangFemale.push("Alsup");
listNamaBelakangFemale.push("Carleton");
listNamaBelakangFemale.push("Burris");
listNamaBelakangFemale.push("Winslow");
listNamaBelakangFemale.push("Hyden");
listNamaBelakangFemale.push("Eugene");
listNamaBelakangFemale.push("Milam");
listNamaBelakangFemale.push("Willie");
listNamaBelakangFemale.push("Knowles");
listNamaBelakangFemale.push("Cabrera");
listNamaBelakangFemale.push("Rayford");
listNamaBelakangFemale.push("Lynn");
listNamaBelakangFemale.push("Hibbard");
listNamaBelakangFemale.push("Borg");
listNamaBelakangFemale.push("Womble");
listNamaBelakangFemale.push("Scheller");
listNamaBelakangFemale.push("Gwinn");
listNamaBelakangFemale.push("Boling");
listNamaBelakangFemale.push("Vanderpool");
listNamaBelakangFemale.push("Mccary");
listNamaBelakangFemale.push("Melchor");
listNamaBelakangFemale.push("Hadley");
listNamaBelakangFemale.push("Sisson");
nameListMaleFrontCountry["India"] = new Array();
nameListFemaleFrontCountry["India"] = new Array();
nameListMaleBackCountry["India"] = new Array();
nameListFemaleBackCountry["India"] = new Array();
nameListMaleBackCountry["Asian"] = new Array();
nameListFemaleBackCountry["Asian"] = new Array();
nameListMaleFrontCountry["India"] = ["Karan", "Gopinath", "Atulavikrama", "Kumaragupta", "Bhuvanapati", "Khetan", "Jayasnava", "Dharmayasas", "Anandatman", "Devarama", "Sudhir", "Carudarsana", "Guruvayur", "Istika", "Adambara", "Hemai", "Bhaumiratna", "Vij", "Bansika", "Dustara", "Chaila", "Avidosa", "Andhraka", "Ekayasti", "Bhadriraju", "Anup", "Anila", "Kalidas", "Sridhar", "Arja", "Arkakara", "Dayanidhi", "Arunopala", "Gunottama", "Koti", "Indraghosa", "Bindumat", "Deepthi", "Anudatta", "Aswathanarayana", "Bhadrasrenya", "Ekayavan", "Cunanda", "Amarajita", "Bharat", "Biswanath", "Hima", "Kuhuk", "Sewam", "Devasoma Mayekar"];
nameListMaleBackCountry["India"] = ["Varghese", "Sukhjinder", "Daruka", "Kumble", "Sajid", "Guneratne", "Rupesh", "Chauhan", "Eknath", "Pillalamarri", "Mahale", "Richa", "Sridevan", "Vipul", "Seri", "Padmesh", "Waman", "Samrat", "Sudevi", "Surti", "Subbarayan", "Sornam", "Sathiamoorthy", "Vijayagopalan", "Sen", "Vyapari", "Nachiketa", "Palshikar", "Chellappa", "Ponnekanti", "Sanghi", "Mahadeo", "Udaya", "Mayuri", "Chaterju", "Sabeena", "Vamshi", "Vipul", "Gajendra", "Sangameswar", "Santanu", "Adani", "Thulasidas", "Ghazali", "Tumkur", "Lata", "Shinu", "Naidoo", "Puliyur", "Mayekar"];
nameListFemaleFrontCountry["India"] = ["Bellamkonda", "Ayati", "Malar", "Guruvira", "Cakramardika", "Balaji", "Jaivati", "Ahu", "Anaga", "Rohena", "Amruth", "Rakesh", "Carudarsana", "Arkasuta", "Satya", "Devavati", "Banasri", "Kamalah", "Heena", "Amardeep", "Gamin", "Gitika", "Puspa", "Jitya", "Kavita", "Kirmi", "Ahalya", "Anila", "Janasruti", "Cchandra", "Chanda", "Atyuha", "Adibuddha", "Krsana", "Andika", "Apurani", "Kalidindi", "Laxminarasimha", "Bhrigu", "Aroga", "Arihan", "Carusila", "Jivika", "Ibha", "Divolka", "Alakaravati", "Devarapalli", "Sarala", "Atibala", "Dyuksa"];
nameListFemaleBackCountry["India"] = ["Vasumati", "Gavaskar", "Guha", "Malipeddi", "Vasi", "Engineer", "Sita", "Harbir", "Chellaiah", "Sugriva", "Thirunarayan", "Yegammai", "Nagedwaran", "Prashun", "Suji", "Poduri", "Punati", "Tyagi", "Santhanam", "Sita", "Duleepsinhji", "Subrahmanyam", "Palia", "Kishen", "Varun", "Kachwaha", "Mehendale", "Dua", "Valli", "Boparai", "Maji", "Naagesh", "Tikoo", "Priti", "Dhawan", "Matu", "Shraddha", "Raychaudhari", "Chatterji", "Nagappa", "Shrestha", "Narasimhan", "Nirupa", "Vattyam", "Vikul", "Chippada", "Jayaram", "Kodumudi", "Ujjwala", "Hiranandani"];
nameListMaleFrontCountry["Asian"] = listNamaDepanMale.concat();
nameListMaleFrontCountry["Asian"].push("Jin");
nameListFemaleFrontCountry["Asian"] = listNamaDepanFemale.concat();
nameListMaleBackCountry["Asian"] = ["Tseng", "Wong", "Chen", "Chao", "Tsui", "Hsiung", "Lo", "Li", "Lee", "Chang", "Tuan", "Yuan", "Chien", "Chin", "Lin", "Wu", "Wei", "Kung", "Hung", "Long", "Ling", "Lau", "Shen", "Chu", "Wan", "Liang", "Ho", "Lai", "Yeh", "Yeoh", "Tao", "Yen", "Sung", "Sun"];
nameListFemaleBackCountry["Asian"] = ["Tseng", "Wong", "Chen", "Chao", "Tsui", "Hsiung", "Lo", "Li", "Lee", "Chang", "Tuan", "Yuan", "Chien", "Chin", "Lin", "Wu", "Wei", "Kung", "Hung", "Long", "Ling", "Lau", "Shen", "Chu", "Wan", "Liang", "Ho", "Lai", "Yeh", "Yeoh", "Tao", "Yen", "Sung", "Sun"];
nameListMaleFrontCountry["Arabic"] = ["Ihsaan", "Yasir", "Haady", "Tareef", "Qays", "Jaabir", "Faaris", "Mutasim", "Baasit", "Suhayb", "Fiqaar", "Ibraheem", "Naseem", "Mutaal", "Imaad", "Raatib", "Suoud", "Is-haaq", "Houd", "Nabhan", "Muhannad", "Faris", "Haani", "Tamam", "Jamaal", "Jawad", "Ghaalib", "Razaaq", "Naer", "Ismaael", "Wadood", "Ossama", "Mujaahid", "Taahir", "Thaabit", "Ghaazi", "Subhy", "Anees", "Zakiy", "Bilal", "Safwan", "Abaan", "Vicr", "Haytham", "Fazal", "Haaroon", "Umaarah", "Baasit"];
nameListMaleBackCountry["Arabic"] = ["Mossadegh", "Mohammad", "Mahallati-Al-Bin", "Asgapur", "Mazlum", "Jafari", "Abid", "Shafaq", "Haseeb", "Naushad-Ali", "Al-Habash", "Fahandizh", "Kordiyeh", "Ba/'albaki", "Al-Owairan", "Mohammad", "Andoni", "Khandil", "Elahi", "Ikram", "Al-Mehalel", "Asif", "Alzeshi", "Al-Sharani", "Razmara", "Hussain", "Qashqai", "Mumtazi", "Al-Farran", "Jafari", "Kazimi", "Amer", "Khandil", "Jahanpur", "Ba/'albaki", "Al-Deayea", "Abid", "Hejazi", "Al-Halou", "Billah", "Salim", "Asir", "Habibi", "Shariati", "Madari", "Fazal-Mahmood", "Madani", "Ala", "Al-ul-Yazdi"];
}
}//package Instance.modules
Section 66
//ShopFilter (Instance.modules.ShopFilter)
package Instance.modules {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.filters.*;
import greensock.plugins.*;
public class ShopFilter {
public static function setGrayScale(_arg1:DisplayObject):void{
var _local9:Array;
var _local2:Number = 0.2225;
var _local3:Number = 0.7169;
var _local4:Number = 0.0606;
var _local5:Array = [_local2, _local3, _local4, 0, 0, _local2, _local3, _local4, 0, 0, _local2, _local3, _local4, 0, 0, 0, 0, 0, 1, 0];
var _local6:ColorMatrixFilter = new ColorMatrixFilter(_local5);
var _local7:* = false;
var _local8:* = 0;
while (_local8 < _arg1.filters.length) {
if ((_arg1.filters[_local8] is ColorMatrixFilter)){
_local7 = true;
break;
};
_local8++;
};
if (!_local7){
_local9 = _arg1.filters.concat();
_local9.push(_local6);
_arg1.filters = _local9.concat();
};
}
public static function removeGrayScale(_arg1:DisplayObject):void{
var _local3:*;
var _local4:*;
var _local2:* = 0;
while (_local2 < _arg1.filters.length) {
if ((_arg1.filters[_local2] is ColorMatrixFilter)){
_local3 = _arg1.filters[_local2];
_local4 = _arg1.filters.concat();
_local4.splice(_local2, 1);
_arg1.filters = _local4.concat();
break;
};
_local2++;
};
}
public static function setGlowing(_arg1:DisplayObject, _arg2:uint=0xFF0000, _arg3:Number=1, _arg4:Number=6, _arg5:Number=2){
var _local6:GlowFilter = new GlowFilter(_arg2, _arg3, _arg4, _arg4, _arg5);
var _local7:* = null;
var _local8:* = 0;
var _local9:* = 0;
while (_local9 < _arg1.filters.length) {
if ((_arg1.filters[_local9] is GlowFilter)){
_local7 = _arg1.filters[_local9];
_local8 = _local9;
break;
};
_local9++;
};
var _local10:* = _arg1.filters.concat();
if (_local7 != null){
if (((((((((!((_local7.color == _arg2))) || (!((_local7.alpha == _arg3))))) || (!((_local7.blurX == _arg4))))) || (!((_local7.blurY == _arg4))))) || (!((_local7.strength == _arg5))))){
_local10[_local8] = _local6;
};
} else {
_local10.push(_local6);
};
_arg1.filters = _local10.concat();
}
public static function removeGlowing(_arg1:DisplayObject, _arg2:uint=0xFF0000, _arg3:Number=1, _arg4:Number=6, _arg5:Number=2){
var _local7:*;
var _local8:*;
var _local6:* = 0;
while (_local6 < _arg1.filters.length) {
if ((_arg1.filters[_local6] is GlowFilter)){
_local7 = _arg1.filters[_local6];
_local8 = _arg1.filters.concat();
_local8.splice(_local6, 1);
_arg1.filters = _local8.concat();
break;
};
_local6++;
};
}
public static function flashing(_arg1:DisplayObject, _arg2:uint=0xFF0000, _arg3:Number=0.5, _arg4:Number=0.5):void{
TweenPlugin.activate([ColorTransformPlugin]);
TweenLite.to(_arg1, _arg4, {colorTransform:{tint:_arg2, tintAmount:_arg3}, onComplete:deflashing, onCompleteParams:[_arg1, _arg2, _arg3, _arg4]});
}
public static function deflashing(_arg1:DisplayObject, _arg2:uint=0xFF0000, _arg3:Number=0.5, _arg4:Number=0.5):void{
TweenPlugin.activate([ColorTransformPlugin]);
TweenLite.to(_arg1, _arg4, {colorTransform:{tint:null, tintAmount:0}, onComplete:flashing, onCompleteParams:[_arg1, _arg2, _arg3, _arg4]});
}
public static function stopFlashing(_arg1):void{
TweenLite.killTweensOf(_arg1);
_arg1.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
}
}//package Instance.modules
Section 67
//Utility (Instance.modules.Utility)
package Instance.modules {
import flash.display.*;
import flash.geom.*;
import flash.utils.*;
import fl.motion.*;
public class Utility {
public function pointInLine(_arg1:Point, _arg2:Point, _arg3:Point):Boolean{
return ((_arg1.x == ((((_arg1.y - _arg2.y) / (_arg3.y - _arg2.y)) * (_arg3.x - _arg2.x)) - _arg2.x)));
}
public static function getClass(_arg1:Object):Class{
return (Class(getDefinitionByName(getQualifiedClassName(_arg1))));
}
public static function cloning(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
var _local3:* = _local2.readObject();
return (_local3);
}
public static function crop(_arg1:DisplayObject, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number):Bitmap{
var _local6:Rectangle = new Rectangle(0, 0, _arg4, _arg5);
var _local7:Bitmap = new Bitmap(new BitmapData(_arg4, _arg5, true, 0), PixelSnapping.ALWAYS, true);
_local7.bitmapData.draw(_arg1, new Matrix(1, 0, 0, 1, -(_arg2), -(_arg3)), null, null, _local6, true);
return (_local7);
}
public static function numberToOrdinal(_arg1:int):String{
var _local2:* = "";
if (((((_arg1 % 100) > 10)) && ((_arg1 < 20)))){
_local2 = (_arg1 + "th");
} else {
if ((_arg1 % 10) == 1){
_local2 = (_arg1 + "st");
} else {
if ((_arg1 % 10) == 2){
_local2 = (_arg1 + "nd");
} else {
if ((_arg1 % 10) == 3){
_local2 = (_arg1 + "rd");
} else {
_local2 = (_arg1 + "th");
};
};
};
};
return (_local2);
}
public static function numberToMoney(_arg1:Number):String{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = "";
if (Math.abs(_arg1) >= 1000){
_local3 = (Math.floor((Math.abs(_arg1) / 1000)) * ((_arg1 >= 0)) ? 1 : -1);
_local4 = (Math.abs(_arg1) % 1000);
_local5 = numberToMoney(_local3);
_local6 = (_local4 + "");
while (_local6.length < 3) {
_local6 = ("0" + _local6);
};
_local2 = ((_local5 + ",") + _local6);
} else {
_local2 = (_arg1 + "");
};
return (_local2);
}
public static function numberToDate(_arg1:Number):String{
var _local2:* = ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec"];
if ((_arg1 in _local2)){
return (_local2[_arg1]);
};
return ("???");
}
public static function timeStringConversion(_arg1:Number, _arg2:Number):String{
var _local3:* = "";
var _local4:* = ((_arg1)>=12) ? "pm" : "am";
var _local5:* = (("" + ((_arg1)>12) ? (_arg1 - 12) : _arg1) + "");
var _local6:* = (("" + _arg2) + "");
while (_local5.length < 2) {
_local5 = ("0" + _local5);
};
while (_local6.length < 2) {
_local6 = ("0" + _local6);
};
_local3 = ((((_local5 + ":") + _local6) + "") + _local4);
return (_local3);
}
public static function rotateByPoint(_arg1:DisplayObject, _arg2:Number, _arg3:Point=null):void{
var _local4:* = _arg1.localToGlobal(_arg3);
_arg1.rotation = _arg2;
var _local5:* = _arg1.globalToLocal(_local4);
var _local6:* = (_arg3.x - _local5.x);
var _local7:* = (_arg3.y - _local5.y);
_arg1.x = (_arg1.x - _local6);
_arg1.y = (_arg1.y - _local7);
}
public static function clearArray(_arg1:Array):void{
_arg1 = [];
}
public static function getIndexOf(_arg1:Array, _arg2:Object):Object{
var _local4:*;
var _local3:* = null;
for (_local4 in _arg1) {
if (_arg1[_local4] == _arg2){
_local3 = _local4;
break;
};
};
return (_local3);
}
public static function getMinIndex(_arg1:Array):int{
var _local3:*;
var _local4:*;
var _local2:* = -1;
if (_arg1.length > 0){
_local3 = _arg1[0];
_local2 = 0;
_local4 = 1;
while (_local4 < _arg1.length) {
if (_arg1[_local4] < _local3){
_local3 = _arg1[_local4];
_local2 = _local4;
};
_local4++;
};
};
return (_local2);
}
}
}//package Instance.modules
Section 68
//BuildSymbol (Instance.ui.BuildSymbol)
package Instance.ui {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
public class BuildSymbol extends MovieClip {
public var upperPosition:MovieClip;
public var buildBody:MovieClip;
public var buildBody2:MovieClip;
public var lowerPosition:MovieClip;
public var buildBody1:MovieClip;
var _gridX:uint;
var _gridY:uint;
var _canBuild:Boolean;
var _buildRelation:Class;
var _world:MovieClip;
public function BuildSymbol(){
_gridX = 1;
_gridY = 1;
_canBuild = false;
this.alpha = 0.6;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
var _local2:* = this.parent.globalToLocal(new Point(stage.mouseX, (stage.mouseY + (this.height / 2))));
this.x = _local2.x;
this.y = _local2.y;
addEventListener(Event.ENTER_FRAME, UpdatePosition);
}
function UpdatePosition(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (this.parent != null){
_local2 = _world.globalToLocal(new Point((stage.mouseX - (this.width / 2)), (stage.mouseY + (this.height / 2))));
_local2.x = (Math.round((_local2.x / _gridX)) * _gridX);
_local2.y = (Math.round((_local2.y / _gridY)) * _gridY);
_local3 = this.parent.globalToLocal(_world.localToGlobal(_local2));
this.x = (_local3.x + (this.width / 2));
this.y = _local3.y;
} else {
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
};
}
public function set gridX(_arg1:uint):void{
_gridX = Math.max(_arg1, 1);
}
public function get gridX():uint{
return (_gridX);
}
public function set gridY(_arg1:uint):void{
_gridY = Math.max(_arg1, 1);
}
public function get gridY():uint{
return (_gridY);
}
public function set canBuild(_arg1:Boolean):void{
_canBuild = _arg1;
if (_canBuild){
this.transform.colorTransform = new ColorTransform(1, 1, 1, this.alpha, 0, 0, 0, 0);
} else {
this.transform.colorTransform = new ColorTransform(1, 0, 0, this.alpha, 0, 0, 0, 0);
};
}
public function get canBuild():Boolean{
return (_canBuild);
}
public function set buildRelation(_arg1:Class):void{
_buildRelation = _arg1;
}
public function get buildRelation():Class{
return (_buildRelation);
}
public function set world(_arg1:MovieClip):void{
_world = _arg1;
}
}
}//package Instance.ui
Section 69
//DialogBox (Instance.ui.DialogBox)
package Instance.ui {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.*;
public class DialogBox extends MovieClip {
public var iconPosition:MovieClip;
var _relation:MovieClip;
var _iconClip:MovieClip;
var _delay:Number;
var ctr:Number;
public function DialogBox(){
_relation = null;
_iconClip = null;
_delay = 0;
ctr = 0;
this.visible = false;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (_relation != null){
if (_relation.parent != null){
_local2 = this.parent;
_local3 = _local2.globalToLocal(_relation.parent.localToGlobal(new Point(_relation.parent.x, _relation.parent.y)));
this.x = _local3.x;
this.y = (_local3.y - _relation.theBody.height);
addEventListener(Event.ENTER_FRAME, correctPosition);
if (_delay > 0){
stage.addEventListener(ShopGameEvent.UPDATE, tick);
};
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
};
};
}
function removedFromStage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, correctPosition);
if (_delay > 0){
stage.removeEventListener(ShopGameEvent.UPDATE, tick);
};
}
function correctPosition(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (this.parent != null){
if (_relation.parent != null){
this.visible = true;
_local2 = this.parent;
_local3 = _local2.globalToLocal(_relation.parent.localToGlobal(new Point(_relation.x, _relation.y)));
this.x = _local3.x;
this.y = (_local3.y - _relation.theBody.height);
} else {
this.parent.removeChild(this);
};
} else {
removeEventListener(Event.ENTER_FRAME, correctPosition);
};
}
function tick(_arg1:ShopGameEvent):void{
if (_delay > 0){
ctr++;
if (ctr >= _delay){
stage.removeEventListener(ShopGameEvent.UPDATE, tick);
this.parent.removeChild(this);
};
};
}
public function set relation(_arg1:MovieClip):void{
_relation = _arg1;
if ((_relation as HumanObject)){
_relation.dialogBox = this;
};
}
public function get relation():MovieClip{
return (_relation);
}
public function set iconClip(_arg1:MovieClip):void{
if (_iconClip != null){
if (getChildByName(_iconClip.name) != null){
removeChild(_iconClip);
};
};
_iconClip = _arg1;
if (_iconClip != null){
_iconClip.x = iconPosition.x;
_iconClip.y = iconPosition.y;
addChild(_iconClip);
};
}
public function get iconClip():MovieClip{
return (_iconClip);
}
public function set delay(_arg1:Number):void{
_delay = _arg1;
if (_delay > 0){
ctr = 0;
if (stage != null){
stage.addEventListener(ShopGameEvent.UPDATE, tick);
};
} else {
if (stage != null){
stage.removeEventListener(ShopGameEvent.UPDATE, tick);
};
};
}
public function get delay():Number{
return (_delay);
}
}
}//package Instance.ui
Section 70
//DialogTextBox (Instance.ui.DialogTextBox)
package Instance.ui {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.*;
import flash.text.*;
public class DialogTextBox extends DialogBox {
public var textPart:MovieClip;
public var rightPart:MovieClip;
public var bottomPart:MovieClip;
public var leftBottomPart:MovieClip;
public var leftPart:MovieClip;
public var topPart:MovieClip;
public var rightTopPart:MovieClip;
public var legendText:TextField;
public var rightBottomPart:MovieClip;
public var leftTopPart:MovieClip;
public var pointPart:MovieClip;
var _text:String;
var _animate:Boolean;
var currentLength:int;
public function DialogTextBox(){
_text = "";
_animate = false;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
override function Initialize(_arg1:Event):void{
super.Initialize(_arg1);
legendText.autoSize = TextFieldAutoSize.CENTER;
legendText.mouseEnabled = false;
if (_animate){
currentLength = 0;
legendText.text = "";
addEventListener(Event.ENTER_FRAME, AppearText);
} else {
legendText.text = _text;
correctTextSize();
};
}
function AppearText(_arg1:Event):void{
var _local2:* = relation.world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
if (legendText.text.length < _text.length){
legendText.text = _text.substr(0, currentLength);
correctTextSize();
currentLength++;
} else {
removeEventListener(Event.ENTER_FRAME, AppearText);
break;
};
_local3++;
};
}
function correctTextSize():void{
legendText.x = (-(legendText.width) / 2);
legendText.y = (-(legendText.height) - 6);
textPart.x = legendText.x;
textPart.y = legendText.y;
textPart.width = legendText.width;
textPart.height = legendText.height;
topPart.x = legendText.x;
topPart.y = (legendText.y - 5);
topPart.width = legendText.width;
bottomPart.x = legendText.x;
bottomPart.width = legendText.width;
leftPart.x = (legendText.x - 5);
leftPart.y = legendText.y;
leftPart.height = legendText.height;
rightPart.x = ((legendText.x + legendText.width) - (rightPart.width - 5));
rightPart.y = legendText.y;
rightPart.height = legendText.height;
leftTopPart.x = leftPart.x;
leftTopPart.y = topPart.y;
leftBottomPart.x = leftPart.x;
rightTopPart.x = ((legendText.x + legendText.width) - 1);
rightTopPart.y = topPart.y;
rightBottomPart.x = ((legendText.x + legendText.width) - 1);
}
override function tick(_arg1:ShopGameEvent):void{
if (legendText.text.length >= _text.length){
super.tick(_arg1);
};
}
public function set animate(_arg1:Boolean):void{
_animate = _arg1;
}
public function get animate():Boolean{
return (_animate);
}
public function set text(_arg1:String):void{
_text = _arg1;
if (!_animate){
legendText.text = _text;
} else {
if (this.parent != null){
currentLength = 0;
legendText.text = "";
addEventListener(Event.ENTER_FRAME, AppearText);
};
};
}
public function get text():String{
return (_text);
}
public function getShownText():String{
return (legendText.text);
}
}
}//package Instance.ui
Section 71
//DoorSymbol (Instance.ui.DoorSymbol)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
public class DoorSymbol extends MovieClip {
var _doorSpeed:int;
var ctr:int;
public function DoorSymbol(){
stop();
addEventListener(Event.ADDED_TO_STAGE, Initialize);
_doorSpeed = 1;
ctr = 0;
}
function Initialize(_arg1:Event):void{
stage.addEventListener(ShopGameEvent.SPEED_CHANGE, changeDoorSpeed);
}
function changeDoorSpeed(_arg1:ShopGameEvent):void{
_doorSpeed = _arg1.speed;
}
function OpenAnimate(_arg1:Event):void{
var _local2:* = 0;
while (_local2 < _doorSpeed) {
if (((!((currentLabel == "Open"))) || ((ctr < 3)))){
nextFrame();
};
if (currentLabel == "Open"){
if (ctr < 3){
ctr++;
} else {
removeEventListener(Event.ENTER_FRAME, OpenAnimate);
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
break;
};
};
_local2++;
};
}
function CloseAnimate(_arg1:Event):void{
var _local2:*;
if (currentLabel != "Close1"){
_local2 = 0;
while (_local2 < _doorSpeed) {
nextFrame();
if (currentFrame >= totalFrames){
gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, CloseAnimate);
dispatchEvent(new BoothEvent(BoothEvent.DOOR_CLOSED));
break;
};
_local2++;
};
} else {
removeEventListener(Event.ENTER_FRAME, CloseAnimate);
};
}
public function closeTheDoor():void{
ctr = 0;
addEventListener(Event.ENTER_FRAME, CloseAnimate);
}
public function openTheDoor():void{
addEventListener(Event.ENTER_FRAME, OpenAnimate);
}
public function set doorSpeed(_arg1:int):void{
_doorSpeed = _arg1;
}
public function get doorSpeed():int{
return (_doorSpeed);
}
}
}//package Instance.ui
Section 72
//HireSymbol (Instance.ui.HireSymbol)
package Instance.ui {
import flash.geom.*;
import flash.events.*;
public class HireSymbol extends BuildSymbol {
override function UpdatePosition(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (this.parent != null){
_local2 = _world.globalToLocal(new Point(stage.mouseX, stage.mouseY));
_local2.x = (Math.round((_local2.x / _gridX)) * _gridX);
_local3 = 0;
_local4 = 0;
while (_local4 < (_world.floorList.length - 1)) {
_local6 = _world.floorList[_local4];
if ((((((_local2.y < _local6.y)) && ((_local2.x >= (_local6.x - (_local6.width / 2)))))) && ((_local2.x <= (_local6.x + (_local6.width / 2)))))){
_local3 = _local6.y;
} else {
break;
};
_local4++;
};
_local2.y = _local3;
_local5 = this.parent.globalToLocal(_world.localToGlobal(_local2));
this.x = _local5.x;
this.y = _local5.y;
} else {
removeEventListener(Event.ENTER_FRAME, UpdatePosition);
};
}
}
}//package Instance.ui
Section 73
//SectorPanel (Instance.ui.SectorPanel)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
public class SectorPanel extends MovieClip {
public var btnSecurity:UI_ButtonSecurity;
public var lockedSymbol11:MovieClip;
public var itemNumber11:MovieClip;
public var lockedSymbol3:MovieClip;
public var itemNumber0:MovieClip;
public var btnIceCream:UI_ButtonIceCream;
public var lockedSymbol10:MovieClip;
public var itemNumber10:MovieClip;
public var itemNumber7:MovieClip;
public var btnCake:UI_ButtonCake;
public var btnHall:UI_ButtonHall;
public var btnBoutique:UI_ButtonBoutique;
public var itemNumber6:MovieClip;
public var btnLiquor:UI_ButtonLiquor;
public var btnMusicShop:UI_ButtonMusic;
public var itemNumber5:MovieClip;
public var btnEscalator:UI_ButtonEscalator;
public var btnEntertainer:UI_ButtonEntertainer;
public var btnArcade:UI_ButtonArcade;
public var btnCinema:UI_ButtonCinema;
public var btnBabyShop:UI_ButtonBabyShop;
public var btnBookStore:UI_ButtonBookstore;
public var itemNumber4:MovieClip;
public var btnJewelry:UI_ButtonJewelry;
public var btnBurger:UI_ButtonBurger;
public var btnCandy:UI_ButtonCandy;
public var lockedSymbol8:MovieClip;
public var lockedSymbol9:MovieClip;
public var itemNumber9:MovieClip;
public var btnTattoo:UI_ButtonTattoo;
public var btnElevator:UI_ButtonElevator;
public var itemNumber8:MovieClip;
public var btnDrugStore:UI_ButtonDrugStore;
public var btnAtm:UI_ButtonATM;
public var btnParkingLot:UI_ButtonParkingLot;
public var staffNumber0:MovieClip;
public var btnGadget:UI_ButtonGadget;
public var btnSalon:UI_ButtonSalon;
public var lockedSymbol4:MovieClip;
public var staffNumber1:MovieClip;
public var lockedSymbol5:MovieClip;
public var btnSushi:UI_ButtonSushi;
public var btnRestroom:UI_ButtonRestroom;
public var staffNumber2:MovieClip;
public var lockedSymbol6:MovieClip;
public var staffNumber3:MovieClip;
public var lockedSymbol7:MovieClip;
public var btnJanitor:UI_ButtonJanitor;
public var lockedSymbol0:MovieClip;
public var itemNumber3:MovieClip;
public var btnSteak:UI_ButtonSteak;
public var btnCafe:UI_ButtonCafe;
public var btnTerrace:UI_ButtonTerrace;
public var btnToyStore:UI_ButtonToyStore;
public var btnSportShop:UI_ButtonSport;
public var btnSupermarket:UI_ButtonSupermarket;
public var lockedSymbol1:MovieClip;
public var itemNumber2:MovieClip;
public var btnSubway:UI_ButtonSubway;
public var btnElectrician:UI_ButtonElectrician;
public var lockedSymbol2:MovieClip;
public var itemNumber1:MovieClip;
var toggleButtonList:Array;
public function SectorPanel(){
var _local2:*;
toggleButtonList = new Array();
super();
var _local1:* = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as ToggleButton)){
_local2.addEventListener(ToggleButtonEvent.ACTIVATE, toggleButtonOnActivate);
toggleButtonList.push(_local2);
};
_local1++;
};
}
function toggleButtonOnActivate(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
deactiveAllButton(_local2);
_local2.addEventListener(ToggleButtonEvent.DEACTIVATE, toggleButtonOnDeactivate);
_local2.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, toggleButtonOnDeactivate);
_local2.dispatchEvent(new SectorPanelEvent(SectorPanelEvent.SECTOR_ITEM_ACTIVE));
}
function toggleButtonOnDeactivate(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.dispatchEvent(new SectorPanelEvent(SectorPanelEvent.SECTOR_ITEM_DEACTIVE));
}
function deactiveAllButton(_arg1:DisplayObject=null):void{
var _local2:* = 0;
while (_local2 < toggleButtonList.length) {
if (toggleButtonList[_local2] != _arg1){
toggleButtonList[_local2].isActive = false;
};
_local2++;
};
}
public function closeSector():void{
dispatchEvent(new SectorPanelEvent(SectorPanelEvent.SECTOR_PANEL_ON_HIDE));
deactiveAllButton();
}
}
}//package Instance.ui
Section 74
//ShopEmpireCCTV (Instance.ui.ShopEmpireCCTV)
package Instance.ui {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.modules.*;
import greensock.easing.*;
public class ShopEmpireCCTV extends MovieClip {
const FRAME_WIDTH = 240;
const FRAME_HEIGHT = 150;
public var border:MovieClip;
public var btnTurnOff:SimpleButton;
public var screen:MovieClip;
var captured:DisplayObject;
var mainCap:Object;
var bitmap:Bitmap;
var bgBitmap:Bitmap;
var landBitmap:Bitmap;
var capturedPos:Point;
var backPos:Point;
var landPos:Point;
var frameWidth:Number;
var frameHeight:Number;
var areaWidth:Number;
var areaHeight:Number;
var scale:Number;
var screenContainer:MovieClip;
var skyColor:uint;
public function ShopEmpireCCTV(_arg1=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=240, _arg7:Number=150){
screenContainer = new MovieClip();
captureBitmap(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6, _arg7);
addChildAt(screenContainer, 1);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
TweenLite.from(screenContainer, 0.5, {y:(FRAME_HEIGHT / 2), scaleY:0, ease:Elastic.easeInOut});
}
public function captureBitmap(_arg1=null, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0, _arg5:Number=0, _arg6:Number=240, _arg7:Number=150):void{
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
if (_arg1 != null){
captured = _arg1;
capturedPos = new Point(_arg2, _arg3);
frameWidth = _arg6;
frameHeight = _arg7;
_local8 = (_arg4 / frameWidth);
_local9 = (_arg5 / frameHeight);
scale = Math.max(_local8, _local9);
if (scale < 1){
scale = 1;
};
areaWidth = (frameWidth * scale);
areaHeight = (frameHeight * scale);
if ((capturedPos.y + areaHeight) > 272){
capturedPos.y = (-(areaHeight) + 272);
};
_local10 = captured;
if (_local10.main != null){
mainCap = _local10.main;
skyColor = mainCap.skyColor;
_local11 = new MovieClip();
_local11.graphics.clear();
_local11.graphics.beginFill(skyColor);
_local11.graphics.drawRect(0, 0, areaWidth, areaHeight);
_local11.graphics.endFill();
screenContainer.addChild(_local11);
_local12 = captured.localToGlobal(new Point((capturedPos.x + (areaWidth / 2)), capturedPos.y));
if (mainCap.landmark != null){
_local13 = mainCap.landmark.globalToLocal(new Point((_local12.x * 0.5), _local12.y));
landPos = new Point((_local13.x - (areaWidth / 2)), _local13.y);
landBitmap = Utility.crop(mainCap.landmark, landPos.x, landPos.y, areaWidth, areaHeight);
screenContainer.addChild(landBitmap);
};
if (mainCap.backContainer != null){
_local14 = mainCap.backContainer.globalToLocal(new Point((_local12.x * 0.75), _local12.y));
backPos = new Point((_local14.x - (areaWidth / 2)), _local14.y);
bgBitmap = Utility.crop(mainCap.backContainer, backPos.x, backPos.y, areaWidth, areaHeight);
screenContainer.addChild(bgBitmap);
};
};
bitmap = Utility.crop(captured, capturedPos.x, capturedPos.y, areaWidth, areaHeight);
screenContainer.addChild(bitmap);
screenContainer.scaleX = (1 / scale);
screenContainer.scaleY = (1 / scale);
addEventListener(Event.ENTER_FRAME, Animate);
};
}
public function maskOn(_arg1:MovieClip){
screenContainer.mask = _arg1;
}
public function turnOff():void{
TweenLite.to(screenContainer, 0.5, {y:(FRAME_HEIGHT / 2), scaleY:0, ease:Elastic.easeInOut, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
function Animate(_arg1:Event):void{
var _local2:*;
if (this.parent != null){
if (captured != null){
while (screenContainer.numChildren > 0) {
screenContainer.removeChildAt(0);
};
_local2 = new MovieClip();
_local2.graphics.clear();
_local2.graphics.beginFill(skyColor);
_local2.graphics.drawRect(0, 0, areaWidth, areaHeight);
_local2.graphics.endFill();
screenContainer.addChild(_local2);
if (landBitmap != null){
landBitmap = Utility.crop(mainCap.landmark, landPos.x, landPos.y, areaWidth, areaHeight);
screenContainer.addChild(landBitmap);
};
if (bgBitmap != null){
bgBitmap = Utility.crop(mainCap.backContainer, backPos.x, backPos.y, areaWidth, areaHeight);
screenContainer.addChild(bgBitmap);
};
bitmap = Utility.crop(captured, capturedPos.x, capturedPos.y, areaWidth, areaHeight);
screenContainer.addChild(bitmap);
};
} else {
removeEventListener(Event.ENTER_FRAME, Animate);
};
}
}
}//package Instance.ui
Section 75
//SliderBar (Instance.ui.SliderBar)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
public class SliderBar extends MovieClip {
public const HORIZONTAL = "horizontal";
public const VERTICAL = "vertical";
public var slideArea:MovieClip;
public var slideIndicator:MovieClip;
public var indicatorSign:MovieClip;
var _slideMode:String;
var _grid:int;
public function SliderBar(){
_slideMode = HORIZONTAL;
_grid = 0;
slideArea.buttonMode = true;
slideArea.tabEnabled = false;
slideIndicator.buttonMode = true;
slideIndicator.tabEnabled = false;
slideIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragIndicator);
slideArea.addEventListener(MouseEvent.MOUSE_DOWN, holdDown);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function dragIndicator(_arg1:MouseEvent):void{
if (this.enabled){
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseIndicator);
};
}
function holdDown(_arg1:MouseEvent):void{
var _local2:*;
if (this.enabled){
if (_slideMode == HORIZONTAL){
slideIndicator.x = mouseX;
if (_grid > 0){
_local2 = (slideArea.width / _grid);
slideIndicator.x = (slideArea.x + (Math.round(((slideIndicator.x - slideArea.x) / _local2)) * _local2));
};
} else {
slideIndicator.y = mouseY;
if (_grid > 0){
_local2 = (slideArea.height / _grid);
slideIndicator.y = (slideArea.y + (Math.round(((slideIndicator.y - slideArea.y) / _local2)) * _local2));
};
};
dispatchEvent(new SliderBarEvent(SliderBarEvent.CHANGE_POSITION));
dragIndicator(_arg1);
};
}
function moveIndicator(_arg1:MouseEvent):void{
if (_slideMode == HORIZONTAL){
slideIndicator.x = mouseX;
} else {
slideIndicator.y = mouseY;
};
correctPosition();
dispatchEvent(new SliderBarEvent(SliderBarEvent.CHANGE_POSITION));
}
function releaseIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseIndicator);
}
public function getPosition():Number{
var _local1:* = 0;
if (_slideMode == HORIZONTAL){
_local1 = ((slideIndicator.x - slideArea.x) / slideArea.width);
} else {
if (_slideMode == VERTICAL){
_local1 = ((slideIndicator.y - slideArea.y) / slideArea.height);
};
};
if (_grid > 0){
_local1 = (_local1 * _grid);
};
return (_local1);
}
function Initialize(_arg1:Event):void{
correctPosition();
}
function correctPosition():void{
var _local1:*;
if (_slideMode == HORIZONTAL){
slideIndicator.x = ((slideIndicator.x)<slideArea.x) ? slideArea.x : ((slideIndicator.x)>(slideArea.x + slideArea.width)) ? (slideArea.x + slideArea.width) : slideIndicator.x;
slideIndicator.y = slideArea.y;
if (_grid > 0){
_local1 = (slideArea.width / _grid);
slideIndicator.x = (slideArea.x + (Math.round(((slideIndicator.x - slideArea.x) / _local1)) * _local1));
};
} else {
slideIndicator.x = slideArea.x;
slideIndicator.y = ((slideIndicator.y)<slideArea.y) ? slideArea.y : ((slideIndicator.y)>(slideArea.y + slideArea.height)) ? (slideArea.y + slideArea.height) : slideIndicator.y;
if (_grid > 0){
_local1 = (slideArea.height / _grid);
slideIndicator.y = (slideArea.y + (Math.round(((slideIndicator.y - slideArea.y) / _local1)) * _local1));
};
};
}
public function setPosition(_arg1:Number):void{
if (_slideMode == HORIZONTAL){
if (_grid > 0){
slideIndicator.x = (slideArea.x + (slideArea.width * Math.round((_arg1 / _grid))));
} else {
slideIndicator.x = (slideArea.x + (slideArea.width * _arg1));
};
} else {
if (_grid > 0){
slideIndicator.y = (slideArea.y + (slideArea.height * Math.round((_arg1 / _grid))));
} else {
slideIndicator.y = (slideArea.y + (slideArea.height * _arg1));
};
};
dispatchEvent(new SliderBarEvent(SliderBarEvent.CHANGE_POSITION));
}
public function set grid(_arg1:int):void{
_grid = _arg1;
}
public function get grid():int{
return (_grid);
}
public function set slideMode(_arg1:String){
_slideMode = _arg1;
correctPosition();
}
}
}//package Instance.ui
Section 76
//TabBar (Instance.ui.TabBar)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class TabBar extends MovieClip {
public var LabelText:TextField;
var _active:Boolean;
var _activeTextColor:uint;// = 0
var _inActiveTextColor:uint;// = 0xFFFFFF
public function TabBar(){
this.buttonMode = true;
this.tabEnabled = false;
LabelText.mouseEnabled = false;
_active = true;
stop();
addEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(MouseEvent.CLICK, onClick);
}
function onClick(_arg1:MouseEvent):void{
}
function Initialize(_arg1:Event):void{
checkActive();
}
function checkActive():void{
if (_active){
gotoAndStop("Active");
LabelText.textColor = _activeTextColor;
} else {
gotoAndStop("Inactive");
LabelText.textColor = _inActiveTextColor;
};
}
public function set active(_arg1:Boolean):void{
_active = _arg1;
checkActive();
}
public function get active():Boolean{
return (_active);
}
public function setText(_arg1:String):void{
LabelText.text = _arg1;
}
public function set activeTextColor(_arg1:uint):void{
_activeTextColor = _arg1;
checkActive();
}
public function get activeTextColor():uint{
return (_activeTextColor);
}
public function set inActiveTextColor(_arg1:uint):void{
_inActiveTextColor = _arg1;
checkActive();
}
public function get inActiveTextColor():uint{
return (_inActiveTextColor);
}
}
}//package Instance.ui
Section 77
//ToggleButton (Instance.ui.ToggleButton)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
import flash.text.*;
public class ToggleButton extends MovieClip {
public var amount:TextField;
public var arrowPos:MovieClip;
public var somethingNew:MovieClip;
var _isActive:Boolean;
public function ToggleButton(){
this.buttonMode = true;
this.tabChildren = false;
this.tabEnabled = false;
_isActive = false;
stop();
addEventListener(MouseEvent.CLICK, DoToggle);
addEventListener(MouseEvent.MOUSE_OVER, DoOver);
addEventListener(MouseEvent.MOUSE_OUT, DoOut);
}
function DoToggle(_arg1:MouseEvent):void{
_isActive = !(_isActive);
if (_isActive){
if (this.totalFrames >= 4){
gotoAndStop(4);
} else {
gotoAndStop(2);
};
dispatchEvent(new ToggleButtonEvent(ToggleButtonEvent.ACTIVATE));
} else {
if (this.totalFrames >= 3){
gotoAndStop(3);
} else {
gotoAndStop(1);
};
dispatchEvent(new ToggleButtonEvent(ToggleButtonEvent.DEACTIVATE));
};
}
function DoOver(_arg1:MouseEvent):void{
if (!_isActive){
if (this.totalFrames >= 3){
gotoAndStop(3);
};
} else {
if (this.totalFrames >= 4){
gotoAndStop(4);
};
};
}
function DoOut(_arg1:MouseEvent):void{
if (!_isActive){
gotoAndStop(1);
} else {
gotoAndStop(2);
};
}
public function set isActive(_arg1:Boolean):void{
_isActive = _arg1;
if (_isActive){
gotoAndStop(2);
dispatchEvent(new ToggleButtonEvent(ToggleButtonEvent.FORCE_ACTIVATE));
} else {
gotoAndStop(1);
dispatchEvent(new ToggleButtonEvent(ToggleButtonEvent.FORCE_DEACTIVATE));
};
}
public function get isActive():Boolean{
return (_isActive);
}
public function enableButton():void{
buttonMode = true;
addEventListener(MouseEvent.CLICK, DoToggle);
addEventListener(MouseEvent.MOUSE_OVER, DoOver);
addEventListener(MouseEvent.MOUSE_OUT, DoOut);
}
public function disableButton():void{
buttonMode = false;
removeEventListener(MouseEvent.CLICK, DoToggle);
removeEventListener(MouseEvent.MOUSE_OVER, DoOver);
removeEventListener(MouseEvent.MOUSE_OUT, DoOut);
}
public function setEnabledButton(_arg1:Boolean):void{
if (_arg1){
enableButton();
} else {
disableButton();
};
}
}
}//package Instance.ui
Section 78
//TutorialText (Instance.ui.TutorialText)
package Instance.ui {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class TutorialText extends MovieClip {
public var left:MovieClip;
public var notice:TextField;
public var top:MovieClip;
public var topLeft:MovieClip;
public var right:MovieClip;
public var bottomLeft:MovieClip;
public var topRight:MovieClip;
public var bottom:MovieClip;
public var center:MovieClip;
public var bottomRight:MovieClip;
var _alignment:String;
var _text:String;
var _readAsHtml:Boolean;
var _animate:Boolean;
var _mouseRelative:String;
var customFormat:Array;
var animatedText:String;
var tempAnimatedText:String;
var _textComplete:Boolean;
var _animationSpeed:Number;
var speedTemp:Number;
public static const NONE = "none";
public static const CENTER = "center";
public static const SIDE = "side";
public static const TOP_DOWN = "topDown";
public static const CORNER = "corner";
public function TutorialText(){
_alignment = TextFieldAutoSize.LEFT;
_text = "";
_readAsHtml = false;
_animate = false;
_mouseRelative = NONE;
_animationSpeed = 1;
speedTemp = 0;
customFormat = new Array();
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
if (_alignment == TextFormatAlign.JUSTIFY){
notice.autoSize = TextFieldAutoSize.LEFT;
} else {
notice.autoSize = _alignment;
};
if (!_readAsHtml){
notice.text = _text;
} else {
notice.htmlText = _text;
};
var _local2:* = notice.getTextFormat();
_local2.align = _alignment;
notice.setTextFormat(_local2);
correctSize(notice.width, notice.height);
if (mouseRelative != NONE){
correctPosition();
stage.addEventListener(MouseEvent.MOUSE_MOVE, correctMousePosition);
};
if (_animate){
animatedText = _text;
tempAnimatedText = "";
if (readAsHtml){
notice.htmlText = "";
} else {
notice.text = "";
};
speedTemp = 0;
addEventListener(Event.ENTER_FRAME, AnimateText);
};
_textComplete = !(_animate);
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
function removedFromStage(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, correctMousePosition);
}
function correctMousePosition(_arg1:MouseEvent):void{
correctPosition();
}
function correctPosition():void{
var _local1:* = stage.mouseX;
var _local2:* = stage.mouseY;
if ((((_mouseRelative == CENTER)) || ((_mouseRelative == TOP_DOWN)))){
this.x = (_local1 - (this.width / 2));
} else {
if ((((_mouseRelative == SIDE)) || ((_mouseRelative == CORNER)))){
if (_local1 > (stage.stageWidth / 2)){
this.x = ((_local1 - this.width) - 5);
} else {
this.x = (_local1 + 5);
};
};
};
if ((((_mouseRelative == CENTER)) || ((_mouseRelative == SIDE)))){
this.y = (_local2 - (this.height / 2));
} else {
if ((((_mouseRelative == TOP_DOWN)) || ((_mouseRelative == CORNER)))){
if (_local2 > (stage.stageHeight / 2)){
this.y = ((_local2 - this.height) - 5);
} else {
this.y = (_local2 + 5);
};
};
};
}
function correctSize(_arg1:Number, _arg2:Number):void{
topLeft.x = 0;
topLeft.y = 0;
top.x = (topLeft.x + topLeft.width);
top.y = 0;
top.width = _arg1;
topRight.x = (top.x + top.width);
topRight.y = 0;
left.x = 0;
left.y = (topLeft.y + topLeft.height);
left.height = _arg2;
center.x = (left.x + left.width);
center.y = (top.y + top.height);
center.width = _arg1;
center.height = _arg2;
right.x = (center.x + center.width);
right.y = (topLeft.y + topLeft.height);
right.height = _arg2;
bottomLeft.x = 0;
bottomLeft.y = (left.y + left.height);
bottom.x = (bottomLeft.x + bottomLeft.width);
bottom.y = (center.y + center.height);
bottom.width = _arg1;
bottomRight.x = (bottom.x + bottom.width);
bottomRight.y = (right.y + right.height);
notice.x = center.x;
notice.y = center.y;
}
function AnimateText(_arg1:Event):void{
var _local3:*;
var _local2:* = tempAnimatedText;
while (speedTemp < _animationSpeed) {
if (animatedText.length > 0){
if (readAsHtml){
if (animatedText.charAt(0) != "<"){
_local2 = (_local2 + animatedText.charAt(0));
animatedText = animatedText.substr(1);
} else {
_local3 = animatedText.indexOf(">");
_local2 = (_local2 + animatedText.substring(0, (_local3 + 1)));
animatedText = animatedText.substr((_local3 + 1));
};
notice.htmlText = _local2;
tempAnimatedText = _local2;
} else {
_local2 = notice.text;
_local2 = (_local2 + animatedText.charAt(0));
animatedText = animatedText.substr(1);
notice.text = _local2;
};
} else {
_textComplete = true;
removeEventListener(Event.ENTER_FRAME, AnimateText);
break;
};
speedTemp++;
};
speedTemp = (speedTemp - _animationSpeed);
}
public function set alignment(_arg1:String):void{
_alignment = _arg1;
}
public function get alignment():String{
return (_alignment);
}
public function set text(_arg1:String):void{
_text = _arg1;
}
public function get text():String{
return (_text);
}
public function set readAsHtml(_arg1:Boolean):void{
_readAsHtml = _arg1;
}
public function get readAsHtml():Boolean{
return (_readAsHtml);
}
public function set animate(_arg1:Boolean):void{
_animate = _arg1;
}
public function get animate():Boolean{
return (_animate);
}
public function set mouseRelative(_arg1:String):void{
_mouseRelative = _arg1;
}
public function get mouseRelative():String{
return (_mouseRelative);
}
public function get textComplete():Boolean{
return (_textComplete);
}
public function set animationSpeed(_arg1:Number):void{
_animationSpeed = _arg1;
}
public function get animationSpeed():Number{
return (_animationSpeed);
}
}
}//package Instance.ui
Section 79
//AchievementPage (Instance.AchievementPage)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import flash.text.*;
public class AchievementPage extends MovieClip {
public var achieve_mall_rulers:MovieClip;
public var achieve_cool_janitors:MovieClip;
public var achieve_punish_indiscipliner:MovieClip;
public var achieve_the_billionaire:MovieClip;
public var achieve_entrepreneur:MovieClip;
public var achieve_the_director:MovieClip;
public var achieve_your_highness:MovieClip;
public var achievementNotice:TextField;
public var achieve_super_mall:MovieClip;
public var btnClose:SimpleButton;
public var achieve_the_dream_team:MovieClip;
public var cloneNotice:TextField;
public var achieve_super_developer:MovieClip;
public var achieve_awesome_security:MovieClip;
public var achieve_celebration:MovieClip;
public var achieve_independent_mall:MovieClip;
public var achieve_the_shiek:MovieClip;
public var achieve_ultimate_restaurant:MovieClip;
public var achieve_on_the_spot:MovieClip;
public var achieve_my_favorite_mall:MovieClip;
public var achieve_what_have_you_done:MovieClip;
public var achieve_nice_to_meet_you:MovieClip;
public var achieve_i_like_being_here:MovieClip;
public var achieve_mall_of_the_month:MovieClip;
public var achieve_perfect_technician:MovieClip;
public var achieve_secret_achievement:MovieClip;
public var maskNotice:MovieClip;
public var achieve_the_romans:MovieClip;
public var achieve_the_millionaire:MovieClip;
public var achieve_trouble_coming:MovieClip;
public var achieve_loser_of_the_years:MovieClip;
public var achieve_thanks_to_segway:MovieClip;
public var achieve_ultimate_mall:MovieClip;
public var achieve_special_mall:MovieClip;
var theRoot:Object;
var achievementList:Array;
var noticePos:Point;
public function AchievementPage(){
var _local2:*;
achievementList = new Array();
noticePos = new Point();
super();
var _local1:* = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((((_local2 as MovieClip)) && ((_local2.name.substr(0, "achieve".length) == "achieve")))){
achievementList.push(_local2);
_local2.stop();
};
_local1++;
};
cloneNotice.autoSize = TextFieldAutoSize.LEFT;
cloneNotice.visible = false;
achievementNotice.autoSize = TextFieldAutoSize.LEFT;
noticePos = new Point(achievementNotice.x, achievementNotice.y);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
checkAchievementUnlocked();
theRoot.addEventListener(ShopGameEvent.ACHIEVEMENT_UNLOCKED, updateAchievement);
TweenLite.from(this, 0.5, {alpha:0, scaleX:0, scaleY:0});
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function removed(_arg1:Event):void{
var _local3:*;
var _local2:* = 0;
while (_local2 < achievementList.length) {
_local3 = achievementList[_local2];
_local3.removeEventListener(MouseEvent.MOUSE_OVER, showUnlockedNotification);
_local3.removeEventListener(MouseEvent.MOUSE_OVER, showLockedNotification);
_local3.removeEventListener(MouseEvent.MOUSE_OUT, hideUnlockedNotification);
_local3.removeEventListener(MouseEvent.MOUSE_OUT, hideLockedNotification);
_local2++;
};
theRoot.removeEventListener(ShopGameEvent.ACHIEVEMENT_UNLOCKED, updateAchievement);
}
function updateAchievement(_arg1:ShopGameEvent):void{
checkAchievementUnlocked();
}
function checkAchievementUnlocked():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (theRoot.achievementData.data.completeAchievement){
_local1 = 0;
while (_local1 < achievementList.length) {
_local2 = achievementList[_local1];
_local3 = _local2.name.substr("achieve_".length).replace(/_/g, " ");
if (theRoot.achievementData.data.completeAchievement.indexOf(_local3) >= 0){
if (_local2.currentFrame != 2){
_local2.removeEventListener(MouseEvent.MOUSE_OVER, showLockedNotification);
_local2.gotoAndStop(2);
_local2.addEventListener(MouseEvent.MOUSE_OVER, showUnlockedNotification);
};
} else {
_local2.gotoAndStop(1);
_local2.addEventListener(MouseEvent.MOUSE_OVER, showLockedNotification);
};
_local1++;
};
};
}
function showUnlockedNotification(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _local2.name.substr("achieve_".length).replace(/_/g, " ");
var _local4:* = AchievementList.getAchievementByName(_local3);
if (_local4 != null){
if (_local4.unlockedNotice != null){
achievementNotice.text = _local4.unlockedNotice;
} else {
achievementNotice.text = (_local4.notice + " (unlocked)");
};
};
checkNoticeWidth();
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 40, 40, 40, 0);
_local2.addEventListener(MouseEvent.MOUSE_OUT, hideUnlockedNotification);
}
function showLockedNotification(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _local2.name.substr("achieve_".length).replace(/_/g, " ");
var _local4:* = AchievementList.getAchievementByName(_local3);
if (_local4 != null){
achievementNotice.text = _local4.notice;
};
checkNoticeWidth();
_local2.addEventListener(MouseEvent.MOUSE_OUT, hideLockedNotification);
}
function hideUnlockedNotification(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
achievementNotice.text = "";
checkNoticeWidth();
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
_local2.removeEventListener(MouseEvent.MOUSE_OUT, hideUnlockedNotification);
}
function hideLockedNotification(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
achievementNotice.text = "";
checkNoticeWidth();
_local2.removeEventListener(MouseEvent.MOUSE_OUT, hideLockedNotification);
}
function checkNoticeWidth():void{
TweenLite.killTweensOf(achievementNotice);
removeEventListener(Event.ENTER_FRAME, moveNotice);
achievementNotice.x = noticePos.x;
achievementNotice.y = noticePos.y;
if (achievementNotice.width > maskNotice.width){
cloneNotice.text = achievementNotice.text;
cloneNotice.visible = true;
cloneNotice.x = ((achievementNotice.x + achievementNotice.width) + (maskNotice.width / 2));
cloneNotice.y = noticePos.y;
TweenLite.to(achievementNotice, 1.2, {onComplete:addEventListener, onCompleteParams:[Event.ENTER_FRAME, moveNotice]});
} else {
cloneNotice.visible = false;
};
}
function moveNotice(_arg1:Event):void{
achievementNotice.x = (achievementNotice.x - 2);
cloneNotice.x = (cloneNotice.x - 2);
if ((achievementNotice.x + achievementNotice.width) <= maskNotice.x){
achievementNotice.x = ((cloneNotice.x + cloneNotice.width) + (maskNotice.width / 2));
};
if ((cloneNotice.x + cloneNotice.width) <= maskNotice.x){
cloneNotice.x = ((achievementNotice.x + achievementNotice.width) + (maskNotice.width / 2));
};
}
}
}//package Instance
Section 80
//Bandit (Instance.Bandit)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class Bandit extends HumanObject {
var _stealing:Boolean;
var _hiding:Boolean;
var _arrested:Boolean;
var _securityLocked:Array;
var _securityChase:Array;
var hideCtr:int;
var stealTime:int;
var stealBountyTime:int;
var stolenBooth:Array;
var swapDelay:int;
var cancelEnterElevatorDelay:int;
var breakLock:MovieClip;
var _bounty:Number;
var boothBounty:Number;
var vision:Object;
var theRoot:Object;
protected var _experienceCarrier:Number;
public function Bandit(){
stolenBooth = new Array();
super();
stop();
_speed = 3;
_runModifier = 2;
_stealing = false;
_arrested = false;
this.alpha = 0.6;
_hiding = true;
_securityLocked = new Array();
_securityChase = new Array();
_experienceCarrier = 10;
_bounty = 0;
boothBounty = 0;
hideCtr = 0;
stealTime = 30;
stealBountyTime = (stealTime - 5);
theBody = this.getChildByName("hitBody");
vision = this.getChildByName("sight");
swapDelay = 0;
cancelEnterElevatorDelay = 0;
breakLock = null;
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.REACH_EDGE, SwapDirrection);
addEventListener(VisitorEvent.BECOMES_ENTER_ELEVATOR, CheckWhenEnterElevator);
}
override function Initialize(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
var _local2:* = root;
theRoot = _local2.mainProgram;
var _local3:* = _world;
searchDestination();
_local3.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
_local3.main.addEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
}
function gameplayRemoved(_arg1:Event):void{
var _local2:* = _world;
_local2.main.removeEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.REACH_EDGE, SwapDirrection);
removeEventListener(VisitorEvent.BECOMES_ENTER_ELEVATOR, CheckWhenEnterElevator);
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(Event.ADDED_TO_STAGE, initAgain);
}
function initAgain(_arg1:Event):void{
var _local2:* = _world;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.REACH_EDGE, SwapDirrection);
addEventListener(VisitorEvent.BECOMES_ENTER_ELEVATOR, CheckWhenEnterElevator);
removeEventListener(Event.ADDED_TO_STAGE, initAgain);
_local2.main.addEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
}
function CheckWhenEnterElevator(_arg1:VisitorEvent):void{
var _local6:*;
var _local2:* = _arg1.booth;
var _local3:* = false;
var _local4:* = null;
var _local5:* = 0;
while (_local5 < _local2.visitorList.length) {
_local6 = _local2.visitorList[_local5];
if ((_local6 is CrewSecurity)){
_local3 = true;
if (!_local6.action){
_local4 = _local6;
break;
};
};
_local5++;
};
if (_local3){
if (_local4 != null){
_local4.catchTheBandit(this);
_local4.forcedExit = true;
} else {
waitingElevator = false;
cancelEnterElevatorDelay = 5;
transportTarget = null;
_running = true;
if (_dirrection == LEFT){
this.dirrection = RIGHT;
} else {
this.dirrection = LEFT;
};
this.walk = true;
};
};
}
function SwapDirrection(_arg1:VisitorEvent):void{
if (_dirrection == LEFT){
this.dirrection = RIGHT;
} else {
this.dirrection = LEFT;
};
swapDelay = 10;
}
function searchDestination():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = _world;
if (_local1 != null){
if (Calculate.chance(Math.max((100 - (stolenBooth.length * 20)), 10))){
_local2 = _local1.boothList.concat(_local1.atmList);
_local3 = new Array();
_local4 = 0;
while (_local4 < _local2.length) {
if (stolenBooth.indexOf(_local2[_local4]) < 0){
_local3.push(_local2[_local4]);
};
_local4++;
};
if (_local3.length > 0){
_local5 = Math.floor((Math.random() * _local3.length));
_currentDestination = _local3[_local5];
} else {
goHome = true;
_currentDestination = null;
};
} else {
goHome = true;
_currentDestination = null;
};
};
}
override function beginEnterBooth():void{
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_currentDestination.banditList.push(this);
breakLock = new legenddialoguebox();
breakLock.iconClip = new legendlockbreaking();
breakLock.relation = this;
var _local1:* = _world;
_local1.addDialogBox(breakLock);
}
override function tick(_arg1:ShopGameEvent):void{
if (!_arrested){
if (_stealing){
stealingProgress();
} else {
chaseCheck();
hidingCheck();
openDoorCheck();
worldTimeCheck();
};
};
}
override protected function removeTick(_arg1:VisitorEvent):void{
super.removeTick(_arg1);
removeEventListener(VisitorEvent.REACH_EDGE, SwapDirrection);
}
override protected function movingWhenWalk():void{
var _local1:*;
if (_securityChase.length > 0){
if (!_walk){
this.walk = true;
};
};
if (((_walk) && (!(_insideBooth)))){
_local1 = 0;
if (_running){
_local1 = _runModifier;
};
this.x = (this.x + (this.scaleX * (_speed + _local1)));
if (!(_securityChase.length > 0)){
limitnessMove();
};
checkEdge();
};
}
function chaseCheck():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (!((_rideElevator) || (stealing))){
if (cancelEnterElevatorDelay > 0){
cancelEnterElevatorDelay--;
};
_local2 = 0;
while (_local2 < _local1.securityList.length) {
_local3 = _local1.securityList[_local2];
if (!((_local3.rideElevator) || (_local3.goHome))){
_local4 = _securityLocked.indexOf(_local3);
if (_local4 < 0){
if (_local3.hitBody.hitTestObject(this.vision)){
_securityLocked.push(_local3);
};
};
};
_local2++;
};
_local2 = 0;
while (_local2 < _securityLocked.length) {
_local3 = _securityLocked[_local2];
if (_local3.banditLocked.indexOf(this) >= 0){
if (_securityChase.indexOf(_local3) < 0){
_securityChase.push(_local3);
};
};
_local2++;
};
};
}
function getStolenBountyOf(_arg1:MovieClip):Number{
var _local2:* = 0;
if (!(_arg1 is FacilityATM)){
_local2 = BoothList.getAverageItemPriceByType(Utility.getClass(_arg1), (_arg1.boothLevel - 1));
_local2 = (_local2 + Math.round((((Math.random() * _local2) / 10) - (_local2 / 20))));
} else {
_local2 = 50;
};
var _local3:* = _world;
_local2 = Math.round((_local2 * (1 + (_local3.popularity / 150))));
return (_local2);
}
function stealingProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (((_stealing) && ((_currentDestination.banditInside.indexOf(this) >= 0)))){
_local1 = _world;
if ((((stealTime > 0)) && (!(_local1.alarmTrigger)))){
stealTime--;
if (Calculate.chance(30)){
_local2 = (Math.floor((Math.random() * 3)) - 1);
stealTime = (stealTime + _local2);
if (_local2 > 0){
_currentDestination.boothBroken = (_currentDestination.boothBroken + (((Math.random() * 15) + 5) / (10 * _currentDestination.boothLevel)));
_currentDestination.dispatchEvent(new BoothEvent(BoothEvent.BECOMES_ROBBED, _currentDestination.boothLevel));
boothBounty = (boothBounty + (Math.floor(((Math.random() * 4) + 1)) * getStolenBountyOf(_currentDestination)));
};
};
if (stealTime <= stealBountyTime){
_currentDestination.boothBroken = (_currentDestination.boothBroken + (((Math.random() * 15) + 5) / (10 * _currentDestination.boothLevel)));
_currentDestination.dispatchEvent(new BoothEvent(BoothEvent.BECOMES_ROBBED, _currentDestination.boothLevel));
boothBounty = (boothBounty + (Math.floor(((Math.random() * 4) + 1)) * getStolenBountyOf(_currentDestination)));
stealBountyTime = (stealBountyTime - 5);
};
} else {
_local3 = _currentDestination.body.enterance;
_local4 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
if (stolenBooth.indexOf(_currentDestination) < 0){
stolenBooth.push(_currentDestination);
};
this.x = _local4.x;
this.y = _local4.y;
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
_currentDestination.openTheDoor();
_stealing = false;
stealTime = 30;
stealBountyTime = (stealTime - 5);
};
};
}
function stopEnterBooth():void{
if (((!((breakLock == null))) && (!((breakLock.parent == null))))){
breakLock.parent.removeChild(breakLock);
breakLock = null;
};
}
function worldTimeCheck():void{
var _local1:*;
var _local2:*;
if (!((((_insideBooth) || (_rideElevator))) || (_rideEscalator))){
_local1 = _world;
if ((((((_local1.gameHour >= 5)) || ((((_local1.gameHour >= 4)) && ((_local1.gameMinute >= 30)))))) && ((_local1.gameHour < 22)))){
if (_currentDestination != null){
_local2 = _currentDestination.banditList.indexOf(this);
if (_local2 >= 0){
_currentDestination.banditList.splice(_local2, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
goHome = true;
_currentDestination = null;
floorTarget = null;
};
};
}
function openDoorCheck():void{
if (_currentDestination != null){
if (_currentDestination.banditList.indexOf(this) >= 0){
if (_currentDestination.lockedDoor > 0){
_currentDestination.lockedDoor--;
if (_currentDestination.lockedDoor <= 0){
_currentDestination.openTheDoor();
};
};
};
};
}
function hidingCheck():void{
var _local1:* = _world;
if (((((((_local1.alarmTrigger) || (((!((_currentDestination == null))) && ((_currentDestination.banditList.indexOf(this) >= 0)))))) || (_rideElevator))) || ((_securityChase.length > 0)))){
if (_hiding){
hiding = false;
};
} else {
if (!_hiding){
if (hideCtr > 0){
hideCtr--;
} else {
hiding = true;
};
};
};
}
function WalkingCheck(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (_local2 != null){
_local3 = 0;
while (_local3 < _local2.gameSpeed) {
if (this.parent != null){
if (!_arrested){
if (!_stealing){
if (!_rideElevator){
if (!((((_local2.alarmTrigger) || ((_securityChase.length > 0)))) || ((cancelEnterElevatorDelay > 0)))){
lookingBoothProgress();
goHomeProgress();
};
};
if (securityChase.length <= 0){
swapDelay = 0;
lookingTransportProgress();
waitingElevatorProgress();
};
runAwayProgress();
};
movingWhenWalk();
};
} else {
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
break;
};
_local3++;
};
};
}
override function limitnessMove():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if ((((((transportTarget == null)) && (!(_rideElevator)))) && (!(((((((_goHome) || (_local1.alarmTrigger))) || ((_securityChase.length > 0)))) && ((_onFloor == null))))))){
_local2 = null;
if (_onFloor == null){
_local2 = _local1.floorList[0];
} else {
_local3 = _local1.floorList.indexOf(_onFloor);
if (_local3 >= 0){
if (((_local3 + 1) in _local1.floorList)){
_local2 = _local1.floorList[(_local3 + 1)];
};
};
};
if (_local2 != null){
if (this.x <= (_local2.x - (_local2.width / 2))){
this.dirrection = RIGHT;
} else {
if (this.x >= (_local2.x + (_local2.width / 2))){
this.dirrection = LEFT;
};
};
};
};
}
function searchNearestPursuer():MovieClip{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = null;
var _local4:* = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
var _local5:* = _local2.floorList.indexOf(_onFloor);
var _local6:* = 0;
while (_local6 < _securityChase.length) {
_local7 = _securityChase[_local6];
if (_local3 == null){
_local3 = _local7;
} else {
if (_local3.onFloor == _onFloor){
_local8 = _local2.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local9 = _local2.globalToLocal(_local7.parent.localToGlobal(new Point(_local7.x, _local7.y)));
if (_local3.hitBody.hitTestObject(this.vision)){
if (_local7.hitBody.hitTestObject(this.vision)){
if (Math.abs((_local4.x - _local8.x)) > Math.abs((_local4.x - _local9.x))){
_local3 = _local7;
};
};
} else {
if (_local7.hitBody.hitTestObject(this.vision)){
_local3 = _local7;
} else {
if (Math.abs((_local4.x - _local8.x)) > Math.abs((_local4.x - _local9.x))){
_local3 = _local7;
};
};
};
} else {
if (_local7.onFloor == _onFloor){
_local3 = _local7;
} else {
_local10 = _local2.floorList.indexOf(_local10);
_local11 = _local2.floorList.indexOf(_local11);
if (Math.abs((_local11 - _local5)) > Math.abs((_local10 - _local5))){
_local3 = _local7;
};
};
};
};
_local6++;
};
_local1 = _local3;
return (_local1);
}
function runAwayProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (!_rideElevator){
_local1 = _world;
checkSecurityOutRange();
if (swapDelay > 0){
swapDelay--;
};
if (_securityChase.length > 0){
running = true;
_local2 = searchNearestPursuer();
if (_local2 != null){
if (!((_local2.rideElevator) || (_local2.examine))){
waitingElevator = false;
if ((transportTarget is FacilityElevator)){
transportTarget = null;
};
if (_currentDestination != null){
_local3 = _currentDestination.banditList.indexOf(this);
if (_local3 >= 0){
_currentDestination.banditList.splice(_local3, 1);
stopEnterBooth();
};
};
if (swapDelay <= 0){
if (!_rideEscalator){
if (_local2.x < this.x){
if (_dirrection != RIGHT){
swapDelay = 10;
this.dirrection = RIGHT;
};
} else {
if (_local2.x > this.x){
if (_dirrection != LEFT){
swapDelay = 10;
this.dirrection = LEFT;
};
};
};
} else {
_local4 = this.parent.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local4.x > this.x){
if (this.scaleX == 1){
swapDelay = 10;
};
this.scaleX = -1;
} else {
if (_local4.x < this.y){
if (this.scaleX == -1){
swapDelay = 10;
};
this.scaleY = 1;
};
};
};
};
if (!rideElevator){
if (!_walk){
this.walk = true;
};
};
};
};
} else {
if (_local1.alarmTrigger){
if (_currentDestination != null){
_local5 = _currentDestination.banditList.indexOf(this);
if (_local5 >= 0){
_currentDestination.banditList.splice(_local5, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
running = true;
floorTarget = null;
if (!_rideElevator){
if (!waitingElevator){
if (!_walk){
this.walk = true;
};
} else {
if (_onFloor == null){
waitingElevator = false;
transportTarget = null;
};
};
};
} else {
if (cancelEnterElevatorDelay <= 0){
running = false;
};
};
};
};
}
function checkSecurityOutRange():void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local1:* = _world;
var _local2:* = new Array();
var _local3:* = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
var _local4:* = _local1.floorList.indexOf(_onFloor);
var _local5:* = 0;
while (_local5 < _securityLocked.length) {
_local6 = _securityLocked[_local5];
if (_securityChase.indexOf(_local6) < 0){
if (_local6.onFloor != _onFloor){
_local2.push(_local6);
} else {
_local7 = _local1.globalToLocal(_local6.parent.localToGlobal(new Point(_local6.x, _local6.y)));
if (((!(this.vision.hitTestObject(_local6.theBody))) && ((Math.abs((_local7.x - _local3.x)) > (this.vision.width / 2))))){
_local2.push(_local6);
};
};
};
_local5++;
};
_local5 = 0;
while (_local5 < _securityChase.length) {
_local6 = _securityChase[_local5];
if (_local6.banditLocked.indexOf(this) < 0){
_local2.push(_local6);
} else {
_local8 = _local1.floorList.indexOf(_local6.onFloor);
_local9 = Math.abs((_local8 - _local4));
if (_local9 > 1){
_local2.push(_local6);
} else {
_local7 = _local1.globalToLocal(_local6.parent.localToGlobal(new Point(_local6.x, _local6.y)));
_local10 = Math.max((Math.abs((_local7 - _local3)) - (_local9 * 50)), 0);
if (_local10 > (_local6.sight.width * 2)){
_local2.push(_local6);
};
};
};
_local5++;
};
while (_local2.length > 0) {
_local11 = _local2.pop();
_local12 = _securityLocked.indexOf(_local11);
if (_local12 >= 0){
_securityLocked.splice(_local12, 1);
};
_local12 = _securityChase.indexOf(_local11);
if (_local12 >= 0){
_securityChase.splice(_local12, 1);
};
};
}
function EnterTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if (((!(_arrested)) && ((_securityChase.length <= 0)))){
enterBooth(_local2);
};
_local2.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_local2.closeTheDoor();
}
function enterBooth(_arg1:MovieClip):void{
this.visible = false;
_stealing = true;
_insideBooth = true;
var _local2:* = _arg1.banditList.indexOf(this);
if (_local2 >= 0){
_arg1.banditList.splice(_local2, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_arg1.banditInside.push(this);
dispatchEvent(new VisitorEvent(VisitorEvent.ENTER_BOOTH, _arg1));
}
function ArrestedCheck(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (this.parent != null){
_local2 = this.getChildByName("body");
if (_local2){
_local2.stop();
_local3 = _world;
_local4 = 0;
while (_local4 < _local3.gameSpeed) {
if (_local2.currentLabel == "Disappear"){
_local5 = _local3.globalToLocal(this.parent.localToGlobal(new Point(this.x, (this.y - this.theBody.height))));
_local6 = getBonus();
_local3.addCash(_bounty, _local5);
if (_bounty > _local3.miscOutReport){
_local3.miscInReport = (_local3.miscInReport + (_bounty - _local3.miscOutReport));
_local3.miscOutReport = 0;
} else {
_local3.miscOutReport = (_local3.miscOutReport - _bounty);
};
_local3.addBonus(_local6, _local5);
};
if (_local2.currentFrame >= _local2.totalFrames){
removeEventListener(Event.ENTER_FRAME, ArrestedCheck);
dispatchEvent(new VisitorEvent(VisitorEvent.ARRESTED));
break;
};
_local2.nextFrame();
_local4++;
};
};
} else {
removeEventListener(Event.ENTER_FRAME, ArrestedCheck);
};
}
function getBonus():Number{
return (Math.round(Math.max(10, (_bounty / 10))));
}
function exitBooth(_arg1:MovieClip):void{
var _local5:*;
var _local2:* = _world;
this.visible = true;
this.walk = true;
var _local3:* = _arg1.banditInside.indexOf(this);
if (_local3 >= 0){
_arg1.banditInside.splice(_local3, 1);
};
var _local4:* = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, (this.y - this.theBody.height))));
_local2.addCash(-(boothBounty), _local4, false);
_local2.miscOutReport = (_local2.miscOutReport + boothBounty);
_bounty = (_bounty + boothBounty);
boothBounty = 0;
_insideBooth = false;
searchDestination();
if ((((theRoot.tutorialPass.indexOf(Tutorial.TUTOR_HIRE_SECURITY) < 0)) && ((_local2.securityList.length <= 0)))){
if (_bounty > 0){
_local5 = _local2.main;
_local5.setNewTutor(Tutorial.TUTOR_HIRE_SECURITY);
_local5.GameInterface.activeCCTV(_local2, _arg1);
};
};
dispatchEvent(new VisitorEvent(VisitorEvent.EXIT_BOOTH, _arg1));
}
function ExitTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
exitBooth(_currentDestination);
this.hiding = false;
_local2.removeEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
var _local3:* = _arg1.target;
_local3.closeTheDoor();
}
function set hiding(_arg1:Boolean):void{
if (((_arg1) && (!(_hiding)))){
TweenLite.to(this, 0.2, {alpha:0.6});
};
_hiding = _arg1;
if (!_hiding){
this.alpha = 1;
hideCtr = 10;
};
}
function get hiding():Boolean{
return (_hiding);
}
public function set arrested(_arg1:Boolean):void{
var _local2:*;
var _local3:*;
var _local4:*;
_arrested = _arg1;
if (_arrested){
gotoAndStop("Arrested");
this.hiding = false;
if (_currentDestination != null){
_local4 = _currentDestination.banditList.indexOf(this);
if (_local4 >= 0){
_currentDestination.banditList.splice(_local4, 1);
stopEnterBooth();
};
};
_insideBooth = false;
if (((!((transportTarget == null))) && (!(((_rideElevator) || (_rideEscalator)))))){
transportTarget = null;
};
_local2 = _world;
_local3 = _local2.banditList.indexOf(this);
if ((_local3 in _local2.banditList)){
_local2.banditList.splice(_local3, 1);
};
_local2.main.removeEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.REACH_EDGE, SwapDirrection);
removeEventListener(VisitorEvent.BECOMES_ENTER_ELEVATOR, CheckWhenEnterElevator);
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(Event.ENTER_FRAME, ArrestedCheck);
dispatchEvent(new VisitorEvent(VisitorEvent.BEGIN_ARRESTED));
};
}
public function get arrested():Boolean{
return (_arrested);
}
public function get stealing():Boolean{
return (_stealing);
}
public function get experienceCarrier():Number{
return (_experienceCarrier);
}
public function get securityLocked():Array{
return (_securityLocked);
}
public function get securityChase():Array{
return (_securityChase);
}
public function get bounty():Number{
return (_bounty);
}
}
}//package Instance
Section 81
//BanditPro (Instance.BanditPro)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class BanditPro extends Bandit {
public var body:MovieClip;
public var hitBody:MovieClip;
public var sight:MovieClip;
var ninjitsuCharge:uint;
var ninjitsuProgress:int;
var ninjitsuUpperTarget:Boolean;
var _flying:Boolean;
var flyingHome:Boolean;
var landingProgress:int;
var prepareFlightProgress:int;
public function BanditPro(){
ninjitsuCharge = 0;
ninjitsuProgress = 0;
ninjitsuUpperTarget = false;
flyingHome = false;
prepareFlightProgress = 0;
landingProgress = 0;
_experienceCarrier = 15;
}
override function Initialize(_arg1:Event):void{
var _local3:*;
super.Initialize(_arg1);
if (((!((_currentDestination == null))) && (!((_currentDestination.onFloor == null))))){
this.flying = true;
this.onFloor = _currentDestination.onFloor;
floorTarget = _onFloor;
_local3 = ((this.x < this.onFloor.x)) ? ((this.onFloor.x - (this.onFloor.width / 2)) + 5) : ((this.onFloor.x + (this.onFloor.width / 2)) - 5);
this.y = (this.onFloor.y - (Math.abs((this.x - _local3)) * 0.5));
};
var _local2:* = _world;
_local2.containerVisitor[(_local2.floorList.indexOf(this.onFloor) + 1)].addChild(this);
}
override function tick(_arg1:ShopGameEvent):void{
if (((!(_arrested)) && (!(_flying)))){
if (ninjitsuProgress <= 0){
super.tick(_arg1);
simulateNinjitsu();
} else {
if (this.walk){
this.walk = false;
};
};
};
}
override function WalkingCheck(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (!_flying){
if (prepareFlightProgress > 0){
prepareFlightProgress = Math.max(0, (prepareFlightProgress - _local2.gameSpeed));
if (prepareFlightProgress <= 0){
this.flying = true;
flyingHome = true;
_local3 = 0;
while (_local3 < _securityChase.length) {
_securityChase[_local3].addEventListener(VisitorEvent.REACH_EDGE, removeMeFromTarget);
_local3++;
};
};
} else {
if (landingProgress > 0){
landingProgress = Math.max(0, (landingProgress - _local2.gameSpeed));
if (landingProgress <= 0){
this.walk = _walk;
};
} else {
if (ninjitsuProgress > 0){
ninjitsuProgress = Math.max((ninjitsuProgress - _local2.gameSpeed), 0);
if (ninjitsuProgress <= 0){
doNinjitsu();
};
} else {
super.WalkingCheck(_arg1);
};
};
};
} else {
flyingCheck();
};
}
function simulateNinjitsu():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
if (ninjitsuCharge > 0){
ninjitsuCharge--;
} else {
if (!((((_rideElevator) || (_rideEscalator))) || (_insideBooth))){
_local2 = 0;
_local3 = checkNinjitsuAvailableUp();
_local4 = checkNinjitsuAvailableLow();
if (securityChase.length > 0){
if (((((_goHome) && (!((this.onFloor == null))))) && (!((Math.abs((this.x - this.onFloor.x)) >= ((this.onFloor.width / 2) - 75)))))){
if (((_local3) || (_local4))){
_local2 = 90;
if (((_local3) && (_local4))){
ninjitsuUpperTarget = Calculate.chance(50);
} else {
ninjitsuUpperTarget = ((_local3) && (!(_local4)));
};
};
};
} else {
if (_securityLocked.length <= 0){
if (!((_goHome) || (_local1.alarmTrigger))){
if (_onFloor != floorTarget){
_local5 = _local1.floorList.indexOf(_onFloor);
_local6 = _local1.floorList.indexOf(floorTarget);
ninjitsuUpperTarget = (_local5 < _local6);
if (((((ninjitsuUpperTarget) && (_local3))) || (((!(ninjitsuUpperTarget)) && (_local4))))){
_local2 = 70;
};
};
};
};
};
if (Calculate.chance(_local2)){
ninjitsuProgress = 50;
hiding = false;
if (transportTarget != null){
transportTarget = null;
elevatorRoomTarget = null;
waitingElevator = false;
};
};
};
};
}
function checkNinjitsuAvailableUp():Boolean{
var _local4:*;
var _local1:* = false;
var _local2:* = _world;
var _local3:* = _local2.floorList.indexOf(_onFloor);
if (_local3 < (_local2.floorList.length - 2)){
if (((_local3 + 1) in _local2.floorList)){
_local4 = _local2.floorList[(_local3 + 1)];
if ((((this.x >= ((_local4.x - (_local4.width / 2)) + 5))) && ((this.x <= ((_local4.x + (_local4.width / 2)) - 5))))){
_local1 = true;
};
};
};
return (_local1);
}
function checkNinjitsuAvailableLow():Boolean{
var _local1:* = false;
var _local2:* = _world;
if (_onFloor != null){
_local1 = true;
};
return (_local1);
}
function doNinjitsu():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
ninjitsuCharge = 25;
if (!arrested){
if (this.parent != null){
_local1 = new fx_ninjitsuSmoke();
_local1.x = this.x;
_local1.y = (this.y - hitBody.height);
_local2 = this.parent.getChildIndex(this);
this.parent.addChildAt(_local1, _local2);
_local3 = _world;
_local4 = _local3.floorList.indexOf(_onFloor);
if (ninjitsuUpperTarget){
if (((_local4 + 1) in _local3.floorList)){
_local4 = (_local4 + 1);
};
} else {
if (((_local4 - 1) in _local3.floorList)){
_local4--;
} else {
_local4 = -1;
};
};
if ((_local4 in _local3.floorList)){
_onFloor = _local3.floorList[_local4];
} else {
_onFloor = null;
};
_local3.containerVisitor[(_local4 + 1)].addChild(this);
this.y = ((_onFloor)!=null) ? _onFloor.y : 0;
_securityChase = [];
this.hiding = !(_local3.alarmTrigger);
};
};
}
override function SwapDirrection(_arg1:VisitorEvent):void{
var _local2:* = _world;
if (!((((_goHome) || (_local2.alarmTrigger))) || ((securityChase.length > 0)))){
super.SwapDirrection(_arg1);
} else {
if ((((prepareFlightProgress == 0)) && (!(_flying)))){
prepareFlightProgress = 50;
this.walk = false;
};
};
}
override function limitnessMove():void{
var _local1:* = _world;
if (!_flying){
if (!((((_goHome) || ((securityChase.length > 0)))) || (_local1.alarmTrigger))){
super.limitnessMove();
};
};
}
override function worldTimeCheck():void{
var _local1:*;
var _local2:*;
if (!((((_insideBooth) || (_rideElevator))) || (_rideEscalator))){
_local1 = _world;
if ((((((_local1.gameHour >= 5)) || ((((_local1.gameHour >= 4)) && ((_local1.gameMinute >= 30)))))) && ((_local1.gameHour < 22)))){
if (_currentDestination != null){
_local2 = _currentDestination.banditList.indexOf(this);
if (_local2 >= 0){
_currentDestination.banditList.splice(_local2, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
goHome = true;
_currentDestination = null;
};
};
}
function removeMeFromTarget(_arg1:VisitorEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.banditLocked.indexOf(this) >= 0){
_local2.banditLocked.splice(_local2.banditLocked.indexOf(this), 1);
};
_local2.removeEventListener(VisitorEvent.REACH_EDGE, removeMeFromTarget);
}
override protected function goHomeProgress():void{
if (_goHome){
if (!_insideBooth){
if (_currentDestination != null){
_currentDestination = null;
};
if (!_walk){
this.walk = true;
};
};
};
}
override function runAwayProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (!_rideElevator){
_local1 = _world;
checkSecurityOutRange();
if (_securityChase.length > 0){
running = true;
_local2 = searchNearestPursuer();
if (_local2 != null){
if (!((_local2.rideElevator) || (_local2.examine))){
waitingElevator = false;
if ((transportTarget is FacilityElevator)){
transportTarget = null;
};
if (_currentDestination != null){
_local3 = _currentDestination.banditList.indexOf(this);
if (_local3 >= 0){
_currentDestination.banditList.splice(_local3, 1);
stopEnterBooth();
};
};
if (swapDelay > 0){
swapDelay--;
} else {
if (!_rideEscalator){
if (_local2.x < this.x){
if (_dirrection != RIGHT){
swapDelay = 10;
this.dirrection = RIGHT;
};
} else {
if (_local2.x > this.x){
if (_dirrection != LEFT){
swapDelay = 10;
this.dirrection = LEFT;
};
};
};
} else {
_local4 = this.parent.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local4.x > this.x){
if (this.scaleX == 1){
swapDelay = 10;
};
this.scaleX = -1;
} else {
if (_local4.x < this.y){
if (this.scaleX == -1){
swapDelay = 10;
};
this.scaleY = 1;
};
};
};
};
if (!rideElevator){
if (!_walk){
this.walk = true;
};
};
};
};
} else {
if (_local1.alarmTrigger){
if (_currentDestination != null){
_local5 = _currentDestination.banditList.indexOf(this);
if (_local5 >= 0){
_currentDestination.banditList.splice(_local5, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
running = true;
if (!_rideElevator){
if (!waitingElevator){
if (!_walk){
this.walk = true;
};
} else {
if (_onFloor == null){
waitingElevator = false;
transportTarget = null;
};
};
};
} else {
if (cancelEnterElevatorDelay <= 0){
running = false;
};
};
};
};
}
function flyingCheck():void{
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.gameSpeed) {
if (_onFloor != null){
if (this.x < ((_onFloor.x - (_onFloor.width / 2)) + 5)){
this.dirrection = (flyingHome) ? LEFT : RIGHT;
} else {
if (this.x > ((_onFloor.x + (_onFloor.width / 2)) - 5)){
this.dirrection = (flyingHome) ? RIGHT : LEFT;
};
};
this.x = (this.x + (this.scaleX * (_speed * 0.7)));
if (!flyingHome){
this.y = (this.y + ((_speed * 0.7) * 0.5));
checkFlyDistance();
if (this.y >= _onFloor.y){
landingProgress = 12;
this.y = _onFloor.y;
this.flying = false;
break;
};
} else {
this.y = (this.y - ((_speed * 0.7) * 0.5));
if (this.body.currentLabel != "Fly"){
this.body.gotoAndStop("Fly");
};
};
};
_local2++;
};
}
function checkFlyDistance():void{
if (!flyingHome){
if (this.currentLabel == "Flying"){
if (Math.abs((this.y - this.onFloor.y)) < 24){
if (this.body.currentLabel != "PrepareLanding"){
this.body.gotoAndStop("PrepareLanding");
};
} else {
if (this.body.currentLabel != "Fly"){
this.body.gotoAndStop("Fly");
};
};
};
};
}
override protected function checkEdge():void{
if (!_flying){
super.checkEdge();
};
}
public function set flying(_arg1:Boolean):void{
_flying = _arg1;
if (_flying){
this.gotoAndStop("Flying");
} else {
if (this.currentLabel == "Flying"){
this.body.gotoAndStop("Landing");
};
};
}
public function get flying():Boolean{
return (_flying);
}
override function getBonus():Number{
return (Math.round((Math.max(10, (_bounty / 10)) * 1.8)));
}
override function hidingCheck():void{
var _local1:* = _world;
if (((((((((_local1.alarmTrigger) || (((!((_currentDestination == null))) && ((_currentDestination.banditList.indexOf(this) >= 0)))))) || (_rideElevator))) || ((_securityChase.length > 0)))) || ((ninjitsuProgress > 0)))){
if (_hiding){
hiding = false;
};
} else {
if (!_hiding){
if (hideCtr > 0){
hideCtr--;
} else {
hiding = true;
};
};
};
}
}
}//package Instance
Section 82
//BanditStandart (Instance.BanditStandart)
package Instance {
import flash.display.*;
public class BanditStandart extends Bandit {
public var body:MovieClip;
public var hitBody:MovieClip;
public var sight:MovieClip;
}
}//package Instance
Section 83
//BonusObject (Instance.BonusObject)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class BonusObject extends ShopEmpireObject {
public var idle:MovieClip;
public var taken:MovieClip;
public var coinBody:MovieClip;
var speedX:Number;
var speedY:Number;
var vanishDelay:uint;
var _bonusValue:Number;
public function BonusObject(){
stop();
this.buttonMode = true;
this.tabEnabled = false;
vanishDelay = 30;
}
override function Initialize(_arg1:Event):void{
speedY = -(Math.round(((Math.random() * 2) + 1)));
speedX = (Math.round((Math.random() * 4)) - 2);
addEventListener(Event.ENTER_FRAME, moveBonus);
addEventListener(MouseEvent.MOUSE_OVER, bonusTaken);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function getNearestFloor():MovieClip{
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.floorList.length) {
_local4 = _local2.floorList[_local3];
if ((((this.x >= (_local4.x - (_local4.width / 2)))) && ((this.x <= (_local4.x + (_local4.width / 2)))))){
if (_local4.y > this.y){
if (_local1 == null){
_local1 = _local4;
} else {
_local5 = Math.abs((this.y - _local4.y));
_local6 = Math.abs((this.y - _local1.y));
if (_local5 < _local6){
_local1 = _local4;
};
};
};
};
_local3++;
};
return (_local1);
}
function moveBonus(_arg1:Event):void{
var _local4:*;
var _local5:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
this.x = (this.x + speedX);
_local4 = getNearestFloor();
this.y = (this.y + speedY);
speedY = (speedY + 0.5);
_local5 = 0;
if (_local4 != null){
_local5 = _local4.y;
};
if (this.y >= _local5){
this.y = _local5;
_local2.addEventListener(ShopGameEvent.UPDATE, vanishingProgress);
addEventListener(Event.ENTER_FRAME, vanishingCheck);
removeEventListener(Event.ENTER_FRAME, moveBonus);
break;
};
_local3++;
};
}
function vanishingProgress(_arg1:ShopGameEvent):void{
if (vanishDelay-- <= 0){
this.parent.removeChild(this);
};
}
function vanishingCheck(_arg1:Event):void{
if (vanishDelay <= 10){
if (this.alpha == 1){
this.alpha = 0;
} else {
this.alpha = 1;
};
};
}
function removed(_arg1:Event):void{
var _local2:* = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, vanishingProgress);
removeEventListener(Event.ENTER_FRAME, moveBonus);
removeEventListener(MouseEvent.MOUSE_OVER, bonusTaken);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function bonusTaken(_arg1:MouseEvent):void{
var _local2:* = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, vanishingProgress);
_local2.addCash(_bonusValue, new Point(this.x, this.y));
_local2.miscInReport = (_local2.miscInReport + _bonusValue);
this.gotoAndStop("taken");
this.buttonMode = false;
this.mouseEnabled = false;
this.mouseChildren = false;
this.alpha = 1;
removeEventListener(Event.ENTER_FRAME, vanishingCheck);
removeEventListener(Event.ENTER_FRAME, moveBonus);
removeEventListener(MouseEvent.MOUSE_OVER, bonusTaken);
dispatchEvent(new BonusEvent(BonusEvent.TAKEN, _bonusValue));
}
public function set bonusValue(_arg1:Number):void{
_bonusValue = _arg1;
}
public function get bonusValue():Number{
return (_bonusValue);
}
}
}//package Instance
Section 84
//Booth (Instance.Booth)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.media.*;
public class Booth extends ShopEmpireObject {
public const MAX_LEVEL = 3;
public const TOTAL_LOCKED = 10;
public var body:MovieClip;
public var colArea:MovieClip;
protected var _boothOpen:Boolean;
protected var _boothBroken:Number;
protected var _doorOpen:Boolean;
protected var _brokenTreshold:Number;
protected var _boothName:String;
protected var _boothLevel:uint;
protected var _boothIsBroken:Boolean;
protected var _visitorList:Array;
protected var _banditList:Array;
protected var _banditInside:Array;
protected var _onFloor:MovieClip;
protected var _lockedDoor:uint;
protected var toLongHold:Boolean;
protected var _alarmTrigger:Boolean;
protected var alarmDisfunction:MovieClip;
protected var _visitorVisit:Number;
protected var _revenue:Number;
protected var _upgradeAble:Boolean;
var _technicianDuty:MovieClip;
var _serveTime:Number;
var holdCounter:int;
var onUpgrade:Boolean;
protected var _extraContainer:MovieClip;
var closeDoorIsOpen:Boolean;
var closeDoorIsClose:Boolean;
var _hasConversation:Boolean;
var openDoorStat:Boolean;
var closeDoorStat:Boolean;
var alarmChannel:SoundChannel;
var alarmTransform:SoundTransform;
var theRoot:Object;
public function Booth(){
_visitorList = new Array();
_banditList = new Array();
_banditInside = new Array();
_boothOpen = true;
_boothBroken = 0;
_doorOpen = false;
_boothLevel = 1;
_brokenTreshold = 70;
_serveTime = 10;
_extraContainer = new MovieClip();
_alarmTrigger = false;
_boothName = "";
_visitorVisit = 0;
_revenue = 0;
_upgradeAble = true;
alarmTransform = new SoundTransform();
alarmChannel = new SoundChannel();
stop();
addChild(_extraContainer);
holdCounter = 0;
toLongHold = false;
onUpgrade = false;
closeDoorIsOpen = false;
closeDoorIsClose = false;
openDoorStat = false;
closeDoorStat = false;
addEventListener(MouseEvent.MOUSE_DOWN, boothOnMouseDown);
alarmDisfunction = new legendalarmdisfunction();
super();
}
override function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
var _local3:* = _world;
colArea.addEventListener(MouseEvent.CLICK, boothOnClick);
gotoAndStop(_boothLevel);
addEventListener(Event.ENTER_FRAME, firstInit);
_local3.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function firstInit(_arg1:Event):void{
if (body != null){
body.mouseEnabled = false;
body.mouseChildren = false;
if (_boothOpen){
body.gotoAndStop("Open");
} else {
body.gotoAndStop("Close");
};
addChild(_extraContainer);
removeEventListener(Event.ENTER_FRAME, firstInit);
};
}
function removed(_arg1:Event):void{
var _local2:* = _world;
colArea.removeEventListener(MouseEvent.CLICK, boothOnClick);
removeEventListener(Event.ENTER_FRAME, firstInit);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
if (alarmDisfunction.parent != null){
alarmDisfunction.parent.removeChild(alarmDisfunction);
};
stopAlarm();
}
function boothOnMouseDown(_arg1:MouseEvent):void{
addEventListener(Event.ENTER_FRAME, countToLong);
stage.addEventListener(MouseEvent.MOUSE_UP, resetToLong);
}
function countToLong(_arg1:Event):void{
holdCounter++;
if (holdCounter > 7){
toLongHold = true;
removeEventListener(Event.ENTER_FRAME, countToLong);
};
}
function resetToLong(_arg1:MouseEvent):void{
addEventListener(Event.ENTER_FRAME, countDownToLong);
removeEventListener(Event.ENTER_FRAME, countToLong);
stage.removeEventListener(MouseEvent.MOUSE_UP, resetToLong);
}
function countDownToLong(_arg1:Event):void{
holdCounter--;
if (holdCounter <= 0){
holdCounter = 0;
toLongHold = false;
removeEventListener(Event.ENTER_FRAME, countDownToLong);
};
}
public function openTheDoor():void{
if (!openDoorStat){
openDoorStat = true;
addEventListener(Event.ENTER_FRAME, CheckDoorOpen);
};
}
function CheckDoorOpen(_arg1:Event):void{
if (body){
if (_boothOpen){
if (body.door){
body.door.openTheDoor();
} else {
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
};
} else {
if ((((this is BoothSushi)) || (!((this.body.closedDoor == null))))){
addEventListener(Event.ENTER_FRAME, ClosedDoorOnOpen);
} else {
if (body.door){
body.door.openTheDoor();
} else {
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
};
};
};
openDoorStat = false;
addEventListener(BoothEvent.DOOR_OPENED, DoorOnOpen);
removeEventListener(Event.ENTER_FRAME, CheckDoorOpen);
};
}
function ClosedDoorOnOpen(_arg1:Event):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
closeDoorIsOpen = true;
if ((this is BoothSushi)){
_local4 = (this.body.OPEN_RIGHT_POS - this.body.CLOSE_RIGHT_POS);
_local5 = (this.body.OPEN_LEFT_POS - this.body.CLOSE_LEFT_POS);
this.body.rightDoor.x = (this.body.rightDoor.x + (_local4 / 12));
this.body.leftDoor.x = (this.body.leftDoor.x + (_local5 / 12));
if ((((this.body.rightDoor.x >= this.body.OPEN_RIGHT_POS)) && ((this.body.leftDoor.x <= this.body.OPEN_LEFT_POS)))){
this.body.rightDoor.x = this.body.OPEN_RIGHT_POS;
this.body.leftDoor.x = this.body.OPEN_LEFT_POS;
removeEventListener(Event.ENTER_FRAME, ClosedDoorOnOpen);
closeDoorIsOpen = false;
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
break;
};
} else {
if (this.body.closedDoor != null){
_local6 = this.body.OPEN_POS;
this.body.closedDoor.y = (this.body.closedDoor.y + (_local6 / 12));
if (this.body.closedDoor.y <= this.body.OPEN_POS){
this.body.closedDoor.y = this.body.OPEN_POS;
removeEventListener(Event.ENTER_FRAME, ClosedDoorOnOpen);
closeDoorIsOpen = false;
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
break;
};
};
};
_local3++;
};
}
function ClosedDoorOnClose(_arg1:Event):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
if (!closeDoorIsOpen){
closeDoorIsClose = true;
if ((this is BoothSushi)){
_local4 = (this.body.OPEN_RIGHT_POS - this.body.CLOSE_RIGHT_POS);
_local5 = (this.body.OPEN_LEFT_POS - this.body.CLOSE_LEFT_POS);
this.body.rightDoor.x = (this.body.rightDoor.x - (_local4 / 12));
this.body.leftDoor.x = (this.body.leftDoor.x - (_local5 / 12));
if ((((this.body.rightDoor.x <= this.body.CLOSE_RIGHT_POS)) && ((this.body.leftDoor.x >= this.body.CLOSE_LEFT_POS)))){
this.body.rightDoor.x = this.body.CLOSE_RIGHT_POS;
this.body.leftDoor.x = this.body.CLOSE_LEFT_POS;
removeEventListener(Event.ENTER_FRAME, ClosedDoorOnClose);
closeDoorIsClose = false;
break;
};
} else {
if (this.body.closedDoor != null){
_local6 = this.body.OPEN_POS;
this.body.closedDoor.y = (this.body.closedDoor.y - (_local6 / 12));
if (this.body.closedDoor.y >= 0){
this.body.closedDoor.y = 0;
removeEventListener(Event.ENTER_FRAME, ClosedDoorOnClose);
closeDoorIsClose = false;
break;
};
};
};
};
_local3++;
};
}
function closedDoorOpened():void{
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
}
public function closeTheDoor():void{
if (!closeDoorStat){
closeDoorStat = true;
addEventListener(Event.ENTER_FRAME, CheckDoorClose);
};
}
function CheckDoorClose(_arg1:Event):void{
if (body){
if (_boothOpen){
if (body.door){
body.door.closeTheDoor();
} else {
dispatchEvent(new BoothEvent(BoothEvent.DOOR_CLOSED));
};
} else {
if ((((this is BoothSushi)) || (!((this.body.closedDoor == null))))){
addEventListener(Event.ENTER_FRAME, ClosedDoorOnClose);
} else {
if (body.door){
body.door.closeTheDoor();
};
};
};
closeDoorStat = false;
addEventListener(BoothEvent.DOOR_CLOSED, DoorOnClose);
removeEventListener(Event.ENTER_FRAME, CheckDoorClose);
};
}
function DoorOnOpen(_arg1:BoothEvent):void{
removeEventListener(BoothEvent.DOOR_OPENED, DoorOnOpen);
}
function DoorOnClose(_arg1:BoothEvent):void{
removeEventListener(BoothEvent.DOOR_CLOSED, DoorOnClose);
}
function boothOnClick(_arg1:MouseEvent):void{
var _local2:*;
if (!toLongHold){
_local2 = _world;
if ((((_local2.buildSymbol == null)) && ((_local2.hireSymbol == null)))){
dispatchEvent(new BoothEvent(BoothEvent.BOOTH_CLICK));
};
};
}
public function upgradeBooth():void{
dispatchEvent(new BoothEvent(BoothEvent.BEGIN_UPGRADE, _boothLevel));
onUpgrade = true;
TweenLite.to(this, 0.25, {tint:0xFFFFFF, onComplete:endFlashing});
}
function endFlashing():void{
_boothLevel++;
dispatchEvent(new BoothEvent(BoothEvent.BEFORE_FLASHING_UPGRADE, _boothLevel));
gotoAndStop(_boothLevel);
TweenLite.to(this, 0.5, {tint:null, onStart:initFrame, onComplete:completeUpgrade});
}
function initFrame():void{
body.mouseEnabled = false;
body.mouseChildren = false;
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
if (_boothOpen){
if (_boothIsBroken){
body.gotoAndPlay("Broken");
} else {
body.gotoAndStop("Open");
};
} else {
body.gotoAndStop("Close");
};
if (_alarmTrigger){
ShopFilter.flashing(this.body);
};
addChild(_extraContainer);
}
function completeUpgrade():void{
dispatchEvent(new BoothEvent(BoothEvent.END_UPGRADE, _boothLevel));
}
function tick(_arg1:ShopGameEvent):void{
var _local3:*;
var _local2:* = _world;
if (!(this is FacilityTerrace)){
if (!onUpgrade){
if (_boothOpen){
if (theRoot.dayPass > 7){
_local3 = ((((Math.random() * 5) + 5) / (50 * _boothLevel)) * (0.3 * theRoot.numberCountryData()));
if (_local2.checkUpgradeByName("Generator Set")){
_local3 = (_local3 * 0.75);
};
boothBroken = (boothBroken + _local3);
};
};
if ((((_local2.gameHour >= 22)) || ((_local2.gameHour < 9)))){
if (_boothOpen){
if (_visitorList.length <= 0){
_boothOpen = false;
body.gotoAndStop("Close");
};
};
} else {
if (!_boothOpen){
if ((((_local2.gameHour >= 10)) || (Calculate.chance(((_local2.gameMinute / 60) * 100))))){
_boothOpen = true;
body.gotoAndStop("Open");
};
};
};
checkIceCreamServe();
};
if (!_boothOpen){
if (_banditList.length <= 0){
if (lockedDoor < TOTAL_LOCKED){
if (Calculate.chance(50)){
_lockedDoor++;
};
};
};
};
checkAlarmDisfunction();
};
}
function checkAlarmDisfunction():void{
var _local1:*;
var _local2:*;
if (((boothIsBroken) && (!(_boothOpen)))){
if (alarmDisfunction.parent == null){
_local1 = _world;
_local2 = new Point();
if (body){
_local2 = _local1.globalToLocal(body.localToGlobal(new Point(body.enterance.x, (body.enterance.y - body.enterance.height))));
};
alarmDisfunction.x = _local2.x;
alarmDisfunction.y = _local2.y;
_local1.containerLegend.addChild(alarmDisfunction);
};
} else {
if (alarmDisfunction.parent != null){
alarmDisfunction.parent.removeChild(alarmDisfunction);
};
};
}
function checkIceCreamServe():void{
if ((this is BoothIceCream)){
if (_visitorList.length > 0){
if (_serveTime > 0){
_serveTime = (_serveTime - ((Math.random() * _boothLevel) + 1));
} else {
dispatchEvent(new BoothEvent(BoothEvent.ICE_CREAM_SERVE, _boothLevel));
};
};
};
}
public function destroy():Boolean{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
var _local2:* = true;
if ((this is FacilityEscalator)){
_local3 = this.parent;
_local4 = (_local1.containerBEscalator.indexOf(_local3) >= 0);
if (_local4){
_local2 = (_local3.numChildren > 1);
};
};
if (_local2){
_local5 = 0;
while (_local5 < _visitorList.length) {
if (_visitorList[_local5].visible){
if (_visitorList[_local5].parent != null){
_local6 = _local1.globalToLocal(_visitorList[_local5].parent.localToGlobal(new Point(_visitorList[_local5].x, _visitorList[_local5].y)));
_visitorList[_local5].x = _local6.x;
_visitorList[_local5].y = _local6.y;
_visitorList[_local5].correctFloor();
_local1.containerVisitor[(_local1.floorList.indexOf(_onFloor) + 1)].addChild(_visitorList[_local5]);
};
} else {
if (_visitorList[_local5].parent != null){
_local6 = _local1.globalToLocal(_visitorList[_local5].parent.localToGlobal(new Point(_visitorList[_local5].x, _visitorList[_local5].y)));
_visitorList[_local5].x = _local6.x;
_visitorList[_local5].y = _local6.y;
_visitorList[_local5].correctFloor();
_visitorList[_local5].x = (this.x + Math.round(((Math.random() * this.colArea.width) - (this.colArea.width / 2))));
_local1.containerVisitor[(_local1.floorList.indexOf(_onFloor) + 1)].addChild(_visitorList[_local5]);
};
};
_local5++;
};
_visitorList = [];
dispatchEvent(new BoothEvent(BoothEvent.DESTROYED));
_local1.miscInReport = (_local1.miscInReport + _revenue);
this.parent.removeChild(this);
} else {
_local1.showNotification(Notice.CANT_DESTROY);
};
return (_local2);
}
public function needToRepair():Boolean{
var _local1:* = (_boothBroken >= (_brokenTreshold - 10));
return (_local1);
}
public function set boothBroken(_arg1:Number):void{
_boothBroken = Math.min(100, _arg1);
_boothIsBroken = (_boothBroken >= _brokenTreshold);
if (_boothBroken >= _brokenTreshold){
if (body){
if (body.currentLabel == "Open"){
body.gotoAndPlay("Broken");
};
};
} else {
if (_boothOpen){
if (body){
if (body.currentLabel != "Open"){
body.gotoAndStop("Open");
};
};
};
};
}
public function get boothBroken():Number{
return (_boothBroken);
}
public function set visitorList(_arg1:Array):void{
_visitorList = _arg1;
}
public function get visitorList():Array{
return (_visitorList);
}
public function set banditList(_arg1:Array):void{
_banditList = _arg1;
}
public function get banditList():Array{
return (_banditList);
}
public function set banditInside(_arg1:Array):void{
_banditInside = _arg1;
}
public function get banditInside():Array{
return (_banditInside);
}
public function set boothLevel(_arg1:uint):void{
if (_arg1 <= 0){
_boothLevel = 1;
} else {
_boothLevel = _arg1;
};
}
public function get boothLevel():uint{
return (_boothLevel);
}
public function get boothIsBroken():Boolean{
return (_boothIsBroken);
}
public function set boothOpen(_arg1:Boolean):void{
_boothOpen = _arg1;
if (_boothOpen){
lockedDoor = 0;
body.gotoAndStop("Open");
} else {
lockedDoor = TOTAL_LOCKED;
body.gotoAndStop("Close");
};
}
public function get boothOpen():Boolean{
return (_boothOpen);
}
public function set onFloor(_arg1:MovieClip):void{
_onFloor = _arg1;
}
public function get onFloor():MovieClip{
return (_onFloor);
}
public function set extraContainer(_arg1:MovieClip):void{
_extraContainer = _arg1;
}
public function get extraContainer():MovieClip{
return (_extraContainer);
}
public function set technicianDuty(_arg1:MovieClip):void{
_technicianDuty = _arg1;
}
public function get technicianDuty():MovieClip{
return (_technicianDuty);
}
public function set lockedDoor(_arg1:uint):void{
_lockedDoor = _arg1;
}
public function get lockedDoor():uint{
return (_lockedDoor);
}
public function set alarmTrigger(_arg1:Boolean):void{
if (((_arg1) && (!(_alarmTrigger)))){
ShopFilter.flashing(this.body);
playAlarm();
};
_alarmTrigger = _arg1;
if (!_alarmTrigger){
ShopFilter.stopFlashing(this.body);
stopAlarm();
};
}
function playAlarm():void{
_world.removeEventListener(ShopGameEvent.POSITION_CHANGE, posAlarmChange);
alarmChannel.removeEventListener(Event.SOUND_COMPLETE, alarmCompleteCheck);
var _local1:* = new SFXAlarm();
var _local2:* = getDistanceMod();
alarmTransform.volume = (theRoot.sfxVolume * _local2);
alarmChannel = _local1.play(0, 0, alarmTransform);
alarmChannel.addEventListener(Event.SOUND_COMPLETE, alarmCompleteCheck);
_world.addEventListener(ShopGameEvent.POSITION_CHANGE, posAlarmChange);
theRoot.addEventListener(ShopGameEvent.SFX_VOLUME_CHANGE, changeVolume);
}
function changeVolume(_arg1:ShopGameEvent):void{
var _local2:* = getDistanceMod();
alarmTransform.volume = (theRoot.sfxVolume * _local2);
alarmChannel.soundTransform = alarmTransform;
}
function stopAlarm():void{
theRoot.removeEventListener(ShopGameEvent.SFX_VOLUME_CHANGE, changeVolume);
_world.removeEventListener(ShopGameEvent.POSITION_CHANGE, posAlarmChange);
alarmChannel.removeEventListener(Event.SOUND_COMPLETE, alarmCompleteCheck);
alarmChannel.stop();
}
function posAlarmChange(_arg1:ShopGameEvent):void{
var _local2:* = getDistanceMod();
alarmTransform.volume = (theRoot.sfxVolume * _local2);
alarmChannel.soundTransform = alarmTransform;
}
function alarmCompleteCheck(_arg1:Event):void{
playAlarm();
}
function getDistanceMod():Number{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = 1;
if (theRoot != null){
_local2 = localToGlobal(new Point(this.x, this.y));
_local3 = (_local2.x - theRoot.centerPoint.x);
_local4 = (_local2.y - theRoot.centerPoint.y);
_local5 = Math.sqrt(((_local3 * _local3) + (_local4 * _local4)));
if (_local5 > 300){
_local1 = (300 / _local5);
if (_local1 < 0.2){
_local1 = 0;
};
};
};
return (_local1);
}
public function get alarmTrigger():Boolean{
return (_alarmTrigger);
}
public function set boothName(_arg1:String):void{
_boothName = _arg1;
}
public function get boothName():String{
return (_boothName);
}
public function set serveTime(_arg1:Number):void{
_serveTime = _arg1;
}
public function maxCapacity():Boolean{
var _local1:* = false;
var _local2:* = getMaxCapacity();
if (_local2 > 0){
_local1 = (_visitorList.length >= _local2);
};
return (_local1);
}
public function getMaxCapacity():Number{
var _local1:* = BoothList.getMaxVisitor(Utility.getClass(this), (_boothLevel - 1));
return (_local1);
}
public function set visitorVisit(_arg1:Number):void{
_visitorVisit = _arg1;
}
public function get visitorVisit():Number{
return (_visitorVisit);
}
public function set revenue(_arg1:Number):void{
_revenue = _arg1;
}
public function get revenue():Number{
return (_revenue);
}
public function set upgradeAble(_arg1:Boolean):void{
_upgradeAble = _arg1;
}
public function get upgradeAble():Boolean{
return (_upgradeAble);
}
public function set hasConversation(_arg1:Boolean):void{
_hasConversation = _arg1;
}
public function get hasConversation():Boolean{
return (_hasConversation);
}
}
}//package Instance
Section 85
//BoothHall (Instance.BoothHall)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class BoothHall extends Booth {
public var hallEmpty:MovieClip;
public var hallColArea:MovieClip;
public var hallBody:MovieClip;
var _currentEvent:String;
var _dayEventLeft:int;
var _stillBooking:Boolean;
var _addEventCost:Number;
var _dayPassEvent:int;
var clipEvent:MovieClip;
public static const NONE = "none";
public static const CAR_SHOW = "Car Show";
public static const ELEC_EXPO = "Electronic Expo";
public static const LIVE_CONCERT = "Live Concert";
public static const ORCHESTRA = "Orchestra";
public function BoothHall(){
_currentEvent = NONE;
_dayEventLeft = 0;
_boothOpen = false;
_stillBooking = false;
_addEventCost = 0;
_dayPassEvent = 0;
clipEvent = null;
}
override function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
var _local3:* = _world;
gotoAndStop(_boothLevel);
addEventListener(Event.ENTER_FRAME, firstInit);
_local3.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function firstInit(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (((((!((hallBody == null))) && (!((hallEmpty == null))))) && (!((hallColArea == null))))){
hallBody.mouseEnabled = false;
hallBody.mouseChildren = false;
hallEmpty.mouseEnabled = false;
hallEmpty.mouseChildren = false;
hallColArea.addEventListener(MouseEvent.CLICK, super.boothOnClick);
setDisplayEvent(false);
_local2 = _world;
_local3 = _local2.main;
if (_boothOpen){
if (_local3.runningMission != null){
if (_local3.runningMission.condition.substr(0, "runEvent".length) == "runEvent"){
_dayPassEvent++;
};
};
_local4 = BGMList.getMusicAt(_currentEvent, true);
if (_local4 != null){
theRoot.bgm = new (_local4);
} else {
theRoot.bgm = null;
};
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:_local3.correctSoundChannel, onComplete:_local3.changeSound, onCompleteParams:[_local4]});
};
if (clipEvent != null){
_local5 = 0;
while (_local5 < clipEvent.numChildren) {
_local6 = clipEvent.getChildAt(_local5);
if ((_local6 as MovieClip)){
if (_local6 != clipEvent.closedSymbol){
if (_boothOpen){
_local6.visible = true;
_local6.alpha = 1;
} else {
_local6.visible = false;
_local6.alpha = 0;
};
} else {
if (_boothOpen){
_local6.visible = false;
_local6.alpha = 0;
} else {
_local6.visible = true;
_local6.alpha = 1;
};
};
};
_local5++;
};
};
addChild(_extraContainer);
removeEventListener(Event.ENTER_FRAME, firstInit);
};
}
override function removed(_arg1:Event):void{
var _local2:* = _world;
removeEventListener(Event.ENTER_FRAME, firstInit);
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
hallColArea.removeEventListener(MouseEvent.CLICK, super.boothOnClick);
}
function setDisplayEvent(_arg1:Boolean=true):void{
if (_currentEvent == NONE){
hallBody.visible = false;
clipEvent = null;
} else {
hallBody.visible = true;
hallBody.carShow.visible = (_currentEvent == CAR_SHOW);
hallBody.electronicExpo.visible = (_currentEvent == ELEC_EXPO);
hallBody.liveConcert.visible = (_currentEvent == LIVE_CONCERT);
hallBody.orchestra.visible = (_currentEvent == ORCHESTRA);
if (_currentEvent == CAR_SHOW){
clipEvent = hallBody.carShow;
} else {
if (_currentEvent == ELEC_EXPO){
clipEvent = hallBody.electronicExpo;
} else {
if (_currentEvent == LIVE_CONCERT){
clipEvent = hallBody.liveConcert;
} else {
if (_currentEvent == ORCHESTRA){
clipEvent = hallBody.orchestra;
};
};
};
};
checkCurrentDayTime(_arg1);
};
}
function checkCurrentDayTime(_arg1:Boolean=true):void{
var _local2:*;
if (_arg1){
_local2 = _world;
_stillBooking = (_local2.gameHour >= 15);
if (_local2.gameHour >= 15){
if (_arg1){
_local2.showNotification("Event will be started tomorow.");
};
boothOpen = false;
} else {
if (_local2.gameHour < 12){
if (_arg1){
_local2.showNotification("Event will begin soon");
};
boothOpen = false;
} else {
startTheEvent(true);
};
};
};
}
override function initFrame():void{
hallBody.mouseEnabled = false;
hallBody.mouseChildren = false;
hallEmpty.mouseEnabled = false;
hallEmpty.mouseChildren = false;
setDisplayEvent();
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
addChild(_extraContainer);
}
public function setCurrentEvent(_arg1:String):void{
var _local2:* = _world;
var _local3:* = _local2.main;
_currentEvent = _arg1;
if (_currentEvent != NONE){
setDisplayEvent();
hallBody.alpha = 1;
TweenLite.from(hallBody, 0.5, {alpha:0});
} else {
if (_boothOpen){
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:_local3.correctSoundChannel, onComplete:_local3.changeSound, onCompleteParams:[null]});
};
_boothOpen = false;
hallBody.alpha = 1;
TweenLite.to(hallBody, 0.5, {alpha:0, onComplete:setDisplayEvent});
};
}
override public function openTheDoor():void{
dispatchEvent(new BoothEvent(BoothEvent.DOOR_OPENED));
}
override public function closeTheDoor():void{
}
override function tick(_arg1:ShopGameEvent):void{
var _local2:*;
if (currentEvent != NONE){
_local2 = _world;
if (!_stillBooking){
if (_boothOpen){
if (_local2.gameHour >= 19){
startTheEvent(false);
};
} else {
if ((((_local2.gameHour >= 12)) && ((_local2.gameHour < 15)))){
startTheEvent(true);
};
};
if ((((_local2.gameHour == 0)) && ((_local2.gameMinute == 0)))){
_dayEventLeft--;
if (_dayEventLeft <= 0){
setCurrentEvent(NONE);
};
dispatchEvent(new BoothEvent(BoothEvent.HALL_CHANGE_DAY));
};
} else {
if ((((_local2.gameHour == 0)) && ((_local2.gameMinute == 0)))){
_stillBooking = false;
dispatchEvent(new BoothEvent(BoothEvent.HALL_CHANGE_DAY));
};
};
};
}
public function set currentEvent(_arg1:String):void{
_currentEvent = _arg1;
}
public function get currentEvent():String{
return (_currentEvent);
}
public function set dayEventLeft(_arg1:int):void{
_dayEventLeft = _arg1;
}
public function get dayEventLeft():int{
return (_dayEventLeft);
}
public function set dayPassEvent(_arg1:int):void{
_dayPassEvent = _arg1;
}
public function get dayPassEvent():int{
return (_dayPassEvent);
}
public function set stillBooking(_arg1:Boolean):void{
_stillBooking = _arg1;
}
public function get stillBooking():Boolean{
return (_stillBooking);
}
public function startTheEvent(_arg1:Boolean):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _world;
var _local3:* = _local2.main;
if (_currentEvent != NONE){
_boothOpen = _arg1;
if (_boothOpen){
if (_local3.runningMission != null){
if (_local3.runningMission.condition.substr(0, "runEvent".length) == "runEvent"){
_dayPassEvent++;
};
};
_local4 = BGMList.getMusicAt(_currentEvent, true);
if (_local4 != null){
theRoot.bgm = new (_local4);
} else {
theRoot.bgm = null;
};
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:_local3.correctSoundChannel, onComplete:_local3.changeSound, onCompleteParams:[_local4]});
} else {
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:_local3.correctSoundChannel, onComplete:_local3.changeSound, onCompleteParams:[null]});
};
if (clipEvent != null){
_local5 = 0;
while (_local5 < clipEvent.numChildren) {
_local6 = clipEvent.getChildAt(_local5);
if ((_local6 as MovieClip)){
if (_local6 != clipEvent.closedSymbol){
if (_boothOpen){
_local6.visible = true;
_local6.alpha = 1;
TweenLite.from(_local6, 1, {alpha:0});
} else {
TweenLite.to(_local6, 1, {autoAlpha:0});
};
} else {
if (_boothOpen){
TweenLite.to(_local6, 1, {autoAlpha:0});
} else {
_local6.visible = true;
_local6.alpha = 1;
TweenLite.from(_local6, 1, {alpha:0});
};
};
};
_local5++;
};
};
} else {
_boothOpen = false;
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:_local3.correctSoundChannel, onComplete:_local3.changeSound, onCompleteParams:[null]});
};
}
override public function set boothOpen(_arg1:Boolean):void{
var _local2:*;
var _local3:*;
_boothOpen = _arg1;
if (clipEvent != null){
_local2 = 0;
while (_local2 < clipEvent.numChildren) {
_local3 = clipEvent.getChildAt(_local2);
if ((_local3 as MovieClip)){
if (_local3 != clipEvent.closedSymbol){
_local3.visible = _boothOpen;
} else {
_local3.visible = !(_boothOpen);
};
};
_local2++;
};
};
}
public function getItemPrice():Number{
var _local1:* = 0;
var _local2:* = BoothList.getHallItemPrice(_currentEvent);
if (_local2.length > 0){
_local1 = _local2[(_boothLevel - 1)];
if (_currentEvent == CAR_SHOW){
_local1 = (_local1 + Math.round((((Math.random() * _local1) / 20) - (_local1 / 40))));
} else {
if (_currentEvent == ELEC_EXPO){
_local1 = (_local1 + Math.round((((Math.random() * _local1) / 10) - (_local1 / 20))));
};
};
};
return (_local1);
}
public function getTicketPrice():Number{
var _local1:* = 0;
var _local2:* = BoothList.getHallTicketPrice(_currentEvent);
if (_local2.length > 0){
_local1 = _local2[(_boothLevel - 1)];
};
return (_local1);
}
public function getAddEventPrice(_arg1:String):Number{
var _local2:* = 0;
var _local3:* = BoothList.getHallAddEventPrice(_arg1);
if (_local3.length > 0){
_local2 = _local3[(_boothLevel - 1)];
};
return (_local2);
}
public function set addEventCost(_arg1:Number):void{
_addEventCost = _arg1;
}
public function get addEventCost():Number{
return (_addEventCost);
}
override public function maxCapacity():Boolean{
return (false);
}
}
}//package Instance
Section 86
//CarObject (Instance.CarObject)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class CarObject extends ShopEmpireObject {
const MAX_SPEED = 5;
public var body:MovieClip;
public var wheel:MovieClip;
var _carType:String;
var _carTypeList:Array;
var _containerDriver:MovieClip;
var _parking:MovieClip;
var _onFloor:MovieClip;
var parkingAngle:Boolean;
var beginParkingAngle:Boolean;
var moveSpeed:Number;
var targetPoint:Point;
var targetAngleClip:MovieClip;
var angleMotion:Number;
var scaleShouldBe:Number;
var angleRad:Number;
var _dirrecttion:String;
var driverExitDelay:int;
var _colorCode:uint;
var _carHeight:Number;
var justEnter:Boolean;
public function CarObject(){
_carTypeList = new Array();
super();
_carType = "random";
var _local1:* = 0;
while (_local1 < this.body.totalFrames) {
_carTypeList.push(this.body.currentLabel);
this.body.nextFrame();
_local1++;
};
_containerDriver = new MovieClip();
addChildAt(_containerDriver, 0);
_containerDriver.visible = false;
_carHeight = this.height;
moveSpeed = 5;
parkingAngle = false;
targetPoint = null;
driverExitDelay = 12;
}
override function Initialize(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
if (_carTypeList.indexOf(_carType) < 0){
this.body.gotoAndStop(Math.ceil((Math.random() * this.body.totalFrames)));
this.wheel.gotoAndStop(this.body.currentFrame);
_carType = this.body.currentLabel;
} else {
this.body.gotoAndStop(_carType);
this.wheel.gotoAndStop(this.body.currentFrame);
};
_carHeight = this.height;
if (_carType == "Ferari"){
_containerDriver.visible = true;
_containerDriver.y = -12;
};
searchParkingArea();
if (_parking != null){
initEnterance();
justEnter = true;
parkingAngle = true;
beginParkingAngle = true;
_parking.addEventListener(BoothEvent.DESTROYED, checkDestroyed);
};
addEventListener(Event.ENTER_FRAME, MovingCar);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
addEventListener(Event.ADDED_TO_STAGE, addAgain);
addEventListener(MouseEvent.CLICK, carOnClick);
}
function initEnterance():void{
var _local1:* = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.upperEnterance.x, _parking.upperEnterance.y)));
var _local2:* = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.lowerEnterance.x, _parking.lowerEnterance.y)));
var _local3:* = (_local1.x - _local2.x);
var _local4:* = (_local1.y - _local2.y);
var _local5:* = Math.atan2(_local4, _local3);
this.x = (_local1.x + (Math.cos(_local5) * this.width));
this.y = (_local1.y + (Math.sin(_local5) * this.width));
this.rotation = ((_local5 * 180) / Math.PI);
this.scaleX = -1;
this.onFloor = parking.onFloor;
_parking.enteranceContainer.addChild(this);
}
function MovingCar(_arg1:Event):void{
var _local4:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
if (_containerDriver.numChildren > 0){
_local4 = _containerDriver.getChildAt(0);
_local4.scaleX = 1;
checkEnteringParking();
checkExitParking();
spinTheWheel();
};
_local3++;
};
}
function spinTheWheel():void{
var _local1:* = this.wheel.fWheel;
var _local2:* = this.wheel.bWheel;
var _local3:* = Math.abs(_local1.y);
var _local4:* = Math.abs(_local2.y);
var _local5:* = (Math.PI * (_local3 * 2));
var _local6:* = (Math.PI * (_local4 * 2));
_local1.rotation = (_local1.rotation + (360 * (moveSpeed / _local5)));
_local2.rotation = (_local2.rotation + (360 * (moveSpeed / _local6)));
}
function searchParkingArea():void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = [];
var _local3:* = 0;
while (_local3 < _local1.parkingList.length) {
_local4 = true;
_local5 = 0;
while (_local5 < _local1.parkingList[_local3].carQueue.length) {
if (_local1.parkingList[_local3].carQueue[_local5] == null){
_local4 = false;
break;
};
_local5++;
};
if (!_local4){
_local2.push(_local1.parkingList[_local3]);
};
_local3++;
};
if (_local2.length > 0){
_local6 = _local2[Math.floor((Math.random() * _local2.length))];
_local7 = [];
_local3 = 0;
while (_local3 < _local6.carQueue.length) {
if (_local6.carQueue[_local3] == null){
_local7.push(_local3);
};
_local3++;
};
_local6.carQueue[_local7[Math.floor((Math.random() * _local7.length))]] = this;
this.parking = _local6;
};
}
function checkEnteringParking():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local1:* = _world;
var _local2:* = null;
if (this.containerDriver.numChildren > 0){
_local2 = this.containerDriver.getChildAt(0);
};
if (((!((_local2 == null))) && (!(_local2.goHome)))){
if (!justEnter){
if (_parking != null){
if (parking.parkingBody != null){
if (!parkingAngle){
this.rotation = 0;
_local3 = parking.carQueue.indexOf(this);
if ((_local3 in parking.carQueue)){
_local4 = parking.parkingBody.getChildByName(("parking" + _local3));
};
this.x = (this.x + moveSpeed);
if (this.x <= _local4.x){
if (Math.abs((this.x - _local4.x)) <= 15){
if (Math.abs((this.x - _local4.x)) <= 5){
this.x = _local4.x;
moveSpeed = 0;
arriveParking();
} else {
moveSpeed--;
moveSpeed = Math.min(MAX_SPEED, Math.max(1, moveSpeed));
};
};
} else {
moveSpeed--;
moveSpeed = Math.max(-(MAX_SPEED), moveSpeed);
};
} else {
_local5 = _parking.globalToLocal(_parking.parkingBody.localToGlobal(new Point(_parking.parkingBody.enterPosUpper.x, _parking.parkingBody.enterPosUpper.y)));
_local6 = _parking.globalToLocal(_parking.parkingBody.localToGlobal(new Point(_parking.parkingBody.enterPos.x, _parking.parkingBody.enterPos.y)));
_local7 = (_local6.x - _local5.x);
_local8 = (_local6.y - _local5.y);
_local9 = Math.atan2(_local8, _local7);
_local10 = (this.x - _local6.x);
_local11 = (this.y - _local6.y);
if (beginParkingAngle){
_local12 = Math.sqrt(((_local10 * _local10) + (_local11 * _local11)));
this.x = (_local6.x - (Math.cos(_local9) * _local12));
this.y = (_local6.y - (Math.sin(_local9) * _local12));
this.rotation = ((_local9 * 180) / Math.PI);
beginParkingAngle = false;
} else {
moveSpeed++;
moveSpeed = Math.min(MAX_SPEED, Math.max(1, moveSpeed));
this.x = (this.x + (Math.cos(_local9) * moveSpeed));
this.y = (this.y + (Math.sin(_local9) * moveSpeed));
_local13 = this.wheel.fWheel;
_local14 = _parking.globalToLocal(_local13.parent.localToGlobal(new Point(_local13.x, 0)));
_local15 = this.wheel.bWheel;
_local16 = _parking.globalToLocal(_local15.parent.localToGlobal(new Point(_local15.x, 0)));
if (_local16.x < _local6.x){
if (_local14.y > _local6.y){
_local17 = Math.abs((_local13.x - _local15.x));
_local18 = (_local6.y - _local16.y);
_local19 = Math.sqrt(((_local17 * _local17) - (_local18 * _local18)));
_local20 = Math.atan2(_local18, _local19);
_local21 = ((_local20 * 180) / Math.PI);
Utility.rotateByPoint(this, _local21, this.globalToLocal(this.wheel.localToGlobal(new Point(_local15.x, 0))));
};
} else {
parkingAngle = false;
this.rotation = 0;
this.y = 0;
};
};
};
};
};
} else {
_local22 = ((this.rotation * Math.PI) / 180);
this.x = (this.x - (Math.cos(_local22) * moveSpeed));
this.y = (this.y - (Math.sin(_local22) * moveSpeed));
_local23 = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.lowerEnterance.x, _parking.lowerEnterance.y)));
if (this.x < (_local23.x - this.width)){
this.x = ((-(_parking.width) / 2) - this.width);
this.y = 0;
this.rotation = 0;
this.scaleX = 1;
_parking.extraContainer.addChild(this);
justEnter = false;
};
};
};
}
function checkExitParking():void{
var _local3:*;
var _local4:*;
var _local1:* = _world;
var _local2:* = null;
if (this.containerDriver.numChildren > 0){
_local2 = this.containerDriver.getChildAt(0);
};
if (((!((_local2 == null))) && (_local2.goHome))){
if (!justEnter){
if (parking != null){
moveSpeed++;
moveSpeed = Math.min(MAX_SPEED, Math.max(1, moveSpeed));
this.x = (this.x + moveSpeed);
if (this.x > ((_parking.width / 2) + (this.width / 2))){
leaveMall();
};
};
} else {
_local3 = ((this.rotation * Math.PI) / 180);
this.x = (this.x + (Math.cos(_local3) * moveSpeed));
this.y = (this.y + (Math.sin(_local3) * moveSpeed));
_local4 = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.upperEnterance.x, _parking.upperEnterance.y)));
if (this.x > (_local4.x + this.width)){
leaveWorld();
};
};
};
}
function arriveParking():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = _world;
if (driverExitDelay-- <= 0){
if (_containerDriver.numChildren > 0){
_local2 = _containerDriver.getChildAt(0);
_local3 = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
_local2.x = _local3.x;
_local2.y = _local3.y;
_local2.onFloor = parking.onFloor;
_local4 = _local1.basementList.indexOf(_local2.onFloor);
_local1.containerBVisitor[_local4].addChild(_local2);
_local2.rideCar = false;
targetPoint = null;
targetAngleClip = null;
parking.carList.push(this);
parking.parkingContainer.addChild(this);
_local5 = parking.getParkingCost();
_local2.payTime(_local5);
_local1.miscInReport = (_local1.miscInReport + _local5);
};
driverExitDelay = 12;
};
}
public function rideToGoHome(_arg1:MovieClip):void{
var _local2:* = _world;
_arg1.rideCar = true;
_arg1.walk = false;
_arg1.x = 0;
_arg1.y = 0;
_arg1.scaleX = 1;
_containerDriver.addChild(_arg1);
var _local3:* = parking.carQueue.indexOf(this);
if ((_local3 in parking.carQueue)){
parking.carQueue[_local3] = null;
};
var _local4:* = parking.carList.indexOf(this);
if ((_local4 in parking.carList)){
parking.carList.splice(_local4, 1);
};
parking.extraContainer.addChild(this);
}
function leaveMall():void{
var _local7:*;
var _local1:* = _world;
var _local2:* = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.upperEnterance.x, _parking.upperEnterance.y)));
var _local3:* = _parking.enteranceContainer.globalToLocal(_parking.localToGlobal(new Point(_parking.lowerEnterance.x, _parking.lowerEnterance.y)));
var _local4:* = (_local2.x - _local3.x);
var _local5:* = (_local2.y - _local3.y);
var _local6:* = Math.atan2(_local5, _local4);
this.x = _local3.x;
this.y = _local3.y;
this.rotation = ((_local6 * 180) / Math.PI);
this.scaleX = 1;
this.onFloor = parking.onFloor;
_parking.enteranceContainer.addChild(this);
justEnter = true;
if (_containerDriver.numChildren > 0){
_local7 = _containerDriver.getChildAt(0);
_local7.dispatchEvent(new VisitorEvent(VisitorEvent.OUT_BY_CAR));
};
}
function leaveWorld():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (_containerDriver.numChildren > 0){
_local2 = _containerDriver.getChildAt(0);
_local3 = _local1.carList.indexOf(this);
if ((_local3 in _local1.carList)){
_local1.carList.splice(_local3, 1);
};
if (_local2 != null){
_local2.dispatchEvent(new VisitorEvent(VisitorEvent.ON_OUT_WORLD));
};
this.parent.removeChild(this);
};
}
function addAgain(_arg1:Event):void{
addEventListener(Event.ENTER_FRAME, MovingCar);
}
function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, MovingCar);
}
function carOnClick(_arg1:MouseEvent):void{
var _local2:*;
if (_containerDriver.numChildren > 0){
_local2 = _containerDriver.getChildAt(0);
if (_local2 != null){
_local2.dispatchEvent(new VisitorEvent(VisitorEvent.VISITOR_CLICK));
};
};
}
function checkDestroyed(_arg1:BoothEvent):void{
leaveWorld();
if (this.parent != null){
this.parent.removeChild(this);
};
}
public function set carType(_arg1:String):void{
_carType = _arg1;
}
public function get carType():String{
return (_carType);
}
public function get containerDriver():MovieClip{
return (_containerDriver);
}
public function set parking(_arg1:MovieClip):void{
_parking = _arg1;
}
public function get parking():MovieClip{
return (_parking);
}
public function set onFloor(_arg1:MovieClip):void{
_onFloor = _arg1;
}
public function get onFloor():MovieClip{
return (_onFloor);
}
public function set colorCode(_arg1:uint):void{
_colorCode = _arg1;
}
public function get colorCode():uint{
return (_colorCode);
}
public function get carHeight():Number{
return (_carHeight);
}
}
}//package Instance
Section 87
//Conversation (Instance.Conversation)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.ui.*;
public class Conversation {
var speaker1:MovieClip;
var speaker2:MovieClip;
var sentenceList;
var speakerList;
var tipsList;
var delayList;
var _world:MovieClip;
var bubbleText:MovieClip;
var _inTerrace:MovieClip;
public function Conversation(_arg1:MovieClip, _arg2:MovieClip){
sentenceList = new Array();
speakerList = new Array();
tipsList = new Array();
delayList = new Array();
super();
speaker1 = _arg1;
speaker2 = _arg2;
bubbleText = null;
}
public function addText(_arg1:String, _arg2:MovieClip, _arg3:String=null, _arg4:Number=5):void{
sentenceList.push(_arg1);
speakerList.push(_arg2);
tipsList.push(_arg3);
delayList.push(_arg4);
}
public function run():void{
if (_world != null){
_world.addEventListener(ShopGameEvent.UPDATE, runConversation);
_world.addEventListener(Event.REMOVED_FROM_STAGE, worldIsRemove);
};
}
function worldIsRemove(_arg1:Event):void{
var _local2:* = speaker1.friendList.indexOf(speaker1.meetFriend);
if ((_local2 in speaker1.friendList)){
speaker1.friendList.splice(_local2, 1);
if (!speaker1.walk){
speaker1.walk = true;
};
};
speaker1.meetFriend = null;
_local2 = speaker2.friendList.indexOf(speaker2.meetFriend);
if ((_local2 in speaker2.friendList)){
speaker2.friendList.splice(_local2, 1);
if (!speaker2.walk){
speaker2.walk = true;
};
};
speaker2.meetFriend = null;
if (_inTerrace != null){
_inTerrace.hasConversation = false;
};
_world.removeEventListener(ShopGameEvent.UPDATE, runConversation);
_world.removeEventListener(Event.REMOVED_FROM_STAGE, worldIsRemove);
}
function createBubbleText():void{
var _local1:*;
if ((((sentenceList.length > 0)) && ((speakerList.length > 0)))){
if (((!((_world == null))) && (!((speakerList[0].parent == null))))){
bubbleText = new LegendDialogTextBox();
_local1 = _world.globalToLocal(speakerList[0].parent.localToGlobal(new Point(speakerList[0].x, speakerList[0].y)));
bubbleText.x = _local1.x;
bubbleText.y = (_local1.y - speakerList[0].hitBody.height);
bubbleText.animate = true;
bubbleText.text = sentenceList[0];
bubbleText.relation = speakerList[0];
if (tipsList[0] != null){
_world.theRoot.addNewTips(tipsList[0]);
};
_world.containerConversation.addChild(bubbleText);
} else {
bubbleText = null;
};
} else {
bubbleText = null;
};
}
function runConversation(_arg1:ShopGameEvent):void{
var _local2:*;
if (!((speaker1.walk) || (speaker2.walk))){
if (bubbleText == null){
createBubbleText();
if (bubbleText == null){
_local2 = speaker1.friendList.indexOf(speaker1.meetFriend);
if ((_local2 in speaker1.friendList)){
speaker1.friendList.splice(_local2, 1);
if (!speaker1.insideBooth){
if (!speaker1.walk){
speaker1.walk = true;
};
};
};
speaker1.meetFriend = null;
_local2 = speaker2.friendList.indexOf(speaker2.meetFriend);
if ((_local2 in speaker2.friendList)){
speaker2.friendList.splice(_local2, 1);
if (!speaker2.insideBooth){
if (!speaker2.walk){
speaker2.walk = true;
};
};
};
speaker2.meetFriend = null;
if (_inTerrace != null){
_inTerrace.hasConversation = false;
};
_world.removeEventListener(ShopGameEvent.UPDATE, runConversation);
};
} else {
if (bubbleText.getShownText().length >= bubbleText.text.length){
var _local3 = delayList;
var _local4:int;
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
if (_local3[_local4] <= 0){
sentenceList.shift();
speakerList.shift();
tipsList.shift();
delayList.shift();
bubbleText.parent.removeChild(bubbleText);
createBubbleText();
};
};
};
};
}
public function set world(_arg1:MovieClip):void{
_world = _arg1;
}
public function set inTerrace(_arg1:MovieClip):void{
_inTerrace = _arg1;
if (_inTerrace != null){
_inTerrace.hasConversation = true;
_inTerrace.addEventListener(BoothEvent.DESTROYED, terraceIsDestroyed);
};
}
function terraceIsDestroyed(_arg1:BoothEvent):void{
var _local2:* = speaker1.friendList.indexOf(speaker1.meetFriend);
if ((_local2 in speaker1.friendList)){
speaker1.friendList.splice(_local2, 1);
if (!speaker1.walk){
speaker1.walk = true;
};
};
speaker1.meetFriend = null;
_local2 = speaker2.friendList.indexOf(speaker2.meetFriend);
if ((_local2 in speaker2.friendList)){
speaker2.friendList.splice(_local2, 1);
if (!speaker2.walk){
speaker2.walk = true;
};
};
speaker2.meetFriend = null;
if (_inTerrace != null){
_inTerrace.hasConversation = false;
};
_world.removeEventListener(ShopGameEvent.UPDATE, runConversation);
}
}
}//package Instance
Section 88
//Elevator (Instance.Elevator)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
public class Elevator extends Booth {
public var elevatorRoom:MovieClip;
public var elevatorBody:ElevatorBody;
public var elevatorWire:MovieClip;
var _roomList;
var _waitingList;
var roomTarget;
var expandSymbol:MovieClip;
var expandList;
var expandIsBelow:Boolean;
var expandUp:MovieClip;
var expandDown:MovieClip;
var isDoorOpened:Boolean;
var moveUp:Boolean;
var openDoorDelay:int;
var visitorContainer:MovieClip;
var visitorGoingOut;
var visitorWillEnter;
var inOutExecute;
var roomStop;
public function Elevator(){
_roomList = new Array();
_waitingList = new Array();
roomTarget = new Array();
expandList = new Array();
visitorGoingOut = new Array();
visitorWillEnter = new Array();
inOutExecute = uint;
roomStop = Object;
super();
expandSymbol = new ExpandSymbol();
expandSymbol.alpha = 0.6;
expandUp = new UI_ExpandElevator();
expandDown = new UI_ExpandElevator();
expandDown.scaleY = -1;
expandIsBelow = false;
isDoorOpened = false;
moveUp = false;
openDoorDelay = 0;
inOutExecute = 0;
var _local1:* = getChildIndex(elevatorRoom);
visitorContainer = new MovieClip();
visitorContainer.x = elevatorRoom.x;
visitorContainer.y = elevatorRoom.y;
addChildAt(visitorContainer, (_local1 + 1));
}
override function Initialize(_arg1:Event):void{
addEventListener(MouseEvent.CLICK, super.boothOnClick);
addEventListener(MouseEvent.MOUSE_DOWN, beginExpand);
addEventListener(Event.ENTER_FRAME, movingElevator);
_roomList.push(elevatorBody);
_waitingList.push(new Array());
elevatorBody.gotoAndStop(_boothLevel);
addEventListener(Event.ENTER_FRAME, checkVisitorInOut);
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
}
public function InitFromLoad():void{
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(MouseEvent.CLICK, super.boothOnClick);
addEventListener(MouseEvent.MOUSE_DOWN, beginExpand);
addEventListener(Event.ENTER_FRAME, movingElevator);
addEventListener(Event.ENTER_FRAME, checkVisitorInOut);
}
function beginExpand(_arg1:MouseEvent):void{
var _local4:*;
var _local2:* = _world;
var _local3:* = _local2.globalToLocal(localToGlobal(new Point(0, elevatorWire.y)));
if (((_local3.y - elevatorWire.height) - 12) > -(_local2.gameHeight)){
_local4 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, ((elevatorWire.y - elevatorWire.height) - 12))));
expandUp.x = _local4.x;
expandUp.y = (_local4.y - 10);
_local2.main.mouseContainer.addChild(expandUp);
};
if (_local3.y < 0){
_local4 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, elevatorWire.y)));
expandDown.x = _local4.x;
expandDown.y = (_local4.y + 10);
_local2.main.mouseContainer.addChild(expandDown);
};
_local2.addEventListener(ShopGameEvent.POSITION_CHANGE, changeExpandArrow);
stage.addEventListener(Event.ENTER_FRAME, expandElevator);
stage.addEventListener(MouseEvent.MOUSE_UP, finishExpand);
}
function changeExpandArrow(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (expandUp.parent != null){
_local3 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, ((elevatorWire.y - elevatorWire.height) - 12))));
expandUp.x = _local3.x;
expandUp.y = (_local3.y - 10);
};
if (expandDown.parent != null){
_local3 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, elevatorWire.y)));
expandDown.x = _local3.x;
expandDown.y = (_local3.y - 10);
};
}
function expandElevator(_arg1:Event):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local2:* = _world;
var _local3:* = globalToLocal(new Point(stage.mouseX, stage.mouseY));
if (_local3.y < ((elevatorWire.y - elevatorWire.height) - 12)){
if (expandSymbol.parent == null){
_local2.main.mouseContainer.addChild(expandSymbol);
};
_local6 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, ((elevatorWire.y - elevatorWire.height) - 12))));
expandSymbol.x = _local6.x;
expandSymbol.y = _local6.y;
expandSymbol.wireSymbol.height = (Math.round((Math.abs((_local3.y - ((elevatorWire.y - elevatorWire.height) - 12))) / 12)) * 12);
_local7 = Math.floor((expandSymbol.wireSymbol.height / 84));
if (_local7 <= 0){
expandSymbol.transform.colorTransform = new ColorTransform(1, 0, 0, expandSymbol.alpha, 0, 0, 0, 0);
} else {
if (expandList.length < _local7){
_local8 = new ExpandElevatorSymbol();
_local8.alpha = 0.6;
_local8.x = 0;
_local8.y = (-84 * expandList.length);
_local8.gotoAndStop(_boothLevel);
expandSymbol.addChild(_local8);
expandList.push(_local8);
};
expandSymbol.transform.colorTransform = new ColorTransform(1, 1, 1, expandSymbol.alpha, 0, 0, 0, 0);
};
if (expandList.length > _local7){
_local9 = expandList.pop();
_local9.parent.removeChild(_local9);
};
expandIsBelow = false;
} else {
if (_local3.y > elevatorWire.y){
if (expandSymbol.parent == null){
_local2.main.mouseContainer.addChild(expandSymbol);
};
_local6 = _local2.main.mouseContainer.globalToLocal(localToGlobal(new Point(0, elevatorWire.y)));
expandSymbol.x = _local6.x;
expandSymbol.y = _local6.y;
expandSymbol.wireSymbol.height = (Math.round((Math.abs((Math.min(globalToLocal(_local2.localToGlobal(new Point(0, 0))).y, _local3.y) - elevatorWire.y)) / 12)) * 12);
expandSymbol.wireSymbol.scaleY = (expandSymbol.wireSymbol.scaleY * -1);
_local7 = Math.floor((expandSymbol.wireSymbol.height / 84));
if (_local7 <= 0){
expandSymbol.transform.colorTransform = new ColorTransform(1, 0, 0, expandSymbol.alpha, 0, 0, 0, 0);
} else {
if (expandList.length < _local7){
_local8 = new ExpandElevatorSymbol();
_local8.alpha = 0.6;
_local8.x = 0;
_local8.y = (84 * (expandList.length + 1));
_local8.gotoAndStop(_boothLevel);
expandSymbol.addChild(_local8);
expandList.push(_local8);
};
expandSymbol.transform.colorTransform = new ColorTransform(1, 1, 1, expandSymbol.alpha, 0, 0, 0, 0);
};
if (expandList.length > _local7){
_local9 = expandList.pop();
_local9.parent.removeChild(_local9);
};
expandIsBelow = true;
} else {
if (expandSymbol.parent != null){
if (expandSymbol.parent != null){
expandSymbol.parent.removeChild(expandSymbol);
};
};
};
};
var _local4:* = false;
var _local5:* = 0;
while (_local5 < expandList.length) {
if (!_local4){
_local4 = !(_local2.collitionCheck(expandList[_local5]));
};
if (!_local4){
expandList[_local5].transform.colorTransform = new ColorTransform(1, 1, 1, expandList[_local5].alpha, 0, 0, 0, 0);
} else {
expandList[_local5].transform.colorTransform = new ColorTransform(1, 0, 0, expandList[_local5].alpha, 0, 0, 0, 0);
};
_local5++;
};
}
function finishExpand(_arg1:MouseEvent):void{
var _local7:*;
if (expandSymbol.parent != null){
expandSymbol.parent.removeChild(expandSymbol);
};
var _local2:* = _world;
var _local3:* = false;
var _local4:* = false;
var _local5:* = 0;
var _local6:* = 0;
while (_local6 < expandList.length) {
if (!_local4){
if (!_local3){
_local3 = !(_local2.collitionCheck(expandList[_local6]));
};
if (!_local3){
_local7 = BoothList.getExpandCost((this.boothLevel - 1));
if ((_local2.cash - _local5) >= _local7){
addBody(expandIsBelow, true);
_local5 = (_local5 + _local7);
} else {
_local2.showNotification(Notice.NOT_ENOUGH_CASH);
_local4 = true;
};
};
};
expandList[_local6].parent.removeChild(expandList[_local6]);
_local6++;
};
expandList = [];
if (_local5 > 0){
_local2.addCash(-(_local5));
};
if (expandUp.parent != null){
expandUp.parent.removeChild(expandUp);
};
if (expandDown.parent != null){
expandDown.parent.removeChild(expandDown);
};
_local2.removeEventListener(ShopGameEvent.POSITION_CHANGE, changeExpandArrow);
stage.removeEventListener(Event.ENTER_FRAME, expandElevator);
stage.removeEventListener(MouseEvent.MOUSE_UP, finishExpand);
dispatchEvent(new BoothEvent(BoothEvent.ELEVATOR_EXPANDED));
}
override function endFlashing():void{
_boothLevel++;
dispatchEvent(new BoothEvent(BoothEvent.BEFORE_FLASHING_UPGRADE, _boothLevel));
var _local1:* = 0;
while (_local1 < _roomList.length) {
_roomList[_local1].gotoAndStop(_boothLevel);
_local1++;
};
TweenLite.to(this, 0.5, {tint:null, onStart:initFrame, onComplete:super.completeUpgrade});
}
override function initFrame():void{
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
}
override function tick(_arg1:ShopGameEvent):void{
}
function checkVisitorInOut(_arg1:Event):void{
var _local4:*;
var _local5:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
if (inOutExecute > 0){
inOutExecute--;
} else {
if (visitorGoingOut.length > 0){
_local4 = visitorGoingOut.pop();
removeVisitor(_local4);
inOutExecute = 5;
} else {
if (visitorWillEnter.length > 0){
if (!this.maxCapacity()){
_local4 = visitorWillEnter.shift();
insertVisitor(_local4);
inOutExecute = 5;
} else {
_local5 = 0;
while (_local5 < visitorWillEnter.length) {
visitorWillEnter[_local5].waitingElevatorAgain();
_local5++;
};
visitorWillEnter = [];
};
};
};
};
_local3++;
};
}
function addBody(_arg1:Boolean=false, _arg2:Boolean=false){
var _local3:* = new ElevatorBody();
_local3.gotoAndStop(_boothLevel);
if (!_arg1){
_local3.y = ((_roomList[(_roomList.length - 1)].y - 72) - 12);
_roomList.push(_local3);
_waitingList.push(new Array());
} else {
_local3.y = ((_roomList[0].y + 72) + 12);
_roomList.unshift(_local3);
_waitingList.unshift(new Array());
};
this.addChild(_local3);
elevatorWire.y = _roomList[0].y;
elevatorWire.height = this.height;
var _local4:* = _world;
var _local5:* = _local4.globalToLocal(localToGlobal(new Point(_local3.x, _local3.y)));
var _local6:* = new ElevatorBody();
_local6.x = _local5.x;
_local6.y = _local5.y;
_local4.removeEmptyAndPillar(_local6);
_local4.createPillar(_local6);
_local4.createFloor(_local6);
if (_arg2){
checkRelation(_local3);
};
}
function checkRelation(_arg1:MovieClip):void{
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local2:* = _world;
var _local3:* = _local2.boothList.concat(_local2.atmList.concat(_local2.restroomList));
var _local4:Array = [];
var _local5:* = 0;
var _local6:* = 2;
if (_local2.hall != null){
_local3.push(_local2.hall);
};
var _local7:* = 0;
while (_local7 < _local3.length) {
_local8 = _local3[_local7];
if (_local8 != this){
_local9 = _local2.globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local10 = _local9.x;
_local11 = _local8.x;
if (_local8.colArea != null){
_local12 = _local8.colArea;
} else {
if ((_local8 is Hall)){
_local12 = _local8.hallColArea;
} else {
if ((_local8 is FacilityRestroom)){
_local12 = _local8;
} else {
_local12 = null;
};
};
};
if (_arg1.x < _local8.x){
_local10 = (_local10 + (this.width / 2));
_local11 = (_local11 - (_local12.width / 2));
} else {
_local10 = (_local10 - (this.width / 2));
_local11 = (_local11 + (_local12.width / 2));
};
if (Math.abs((_local10 - _local11)) <= 84){
if (_local9.y == _local8.y){
_local13 = ComboList.getRelationOf(Utility.getClass(this), Utility.getClass(_local8));
if (_local13 != 0){
if (_local10 < _local11){
_local14 = (_local10 + (Math.abs((_local10 - _local11)) / 2));
} else {
_local14 = (_local11 + (Math.abs((_local10 - _local11)) / 2));
};
_local4.push({related:_local8, mod:_local13, pos:new Point(_local14, (_local8.y - 36))});
};
_local5++;
};
};
};
if (_local5 >= _local6){
break;
};
_local7++;
};
while (_local4.length > 0) {
_local15 = _local4.shift();
if (_local15.mod != 0){
_local16 = ((_local15.mod)>0) ? new fxgoodrelation() : new fxbadrelation();
_local16.x = _local15.pos.x;
_local16.y = _local15.pos.y;
_local2.containerBonus.addChild(_local16);
_local17 = (_local16.y - 50);
if (_local15.mod > 0){
TweenLite.to(_local16, 0.8, {y:_local17, ease:Linear.easeNone, onComplete:TweenLite.to, onCompleteParams:[_local16, 0.4, {y:(_local17 - 25), alpha:0, ease:Linear.easeNone, onComplete:_local16.parent.removeChild, onCompleteParams:[_local16]}]});
} else {
TweenLite.from(_local16, 0.4, {y:_local17, onComplete:TweenLite.to, onCompleteParams:[_local16, 0.4, {delay:0.4, alpha:0, ease:Linear.easeNone, onComplete:_local16.parent.removeChild, onCompleteParams:[_local16]}]});
};
};
_local2.boothPopularity = (_local2.boothPopularity + (_local15.mod * 0.8));
};
}
function hitElevatorBody(_arg1:DisplayObject):Boolean{
var _local2:* = false;
var _local3:* = 0;
while (_local3 < _roomList.length) {
if (_arg1.hitTestObject(_roomList[_local3])){
_local2 = true;
break;
};
_local3++;
};
return (_local2);
}
public function get roomList():Array{
return (_roomList);
}
public function get waitingList():Array{
return (_waitingList);
}
function movingElevator(_arg1:Event):void{
var _local5:*;
var _local2:* = _world;
var _local3:* = 0;
if (_local2.checkUpgradeByName("Strong Wire")){
_local3 = 1;
};
var _local4:* = 0;
while (_local4 < _local2.gameSpeed) {
if (roomTarget.length > 0){
_local5 = 0;
while (_local5 < (_boothLevel + _local3)) {
if (!isDoorOpened){
isDoorOpened = checkRoomTarget();
};
if (!isDoorOpened){
if (elevatorRoom.y >= _roomList[0].y){
moveUp = true;
} else {
if (elevatorRoom.y <= _roomList[(_roomList.length - 1)].y){
moveUp = false;
};
};
if (moveUp){
elevatorRoom.y = (elevatorRoom.y - 2);
} else {
elevatorRoom.y = (elevatorRoom.y + 2);
};
visitorContainer.y = elevatorRoom.y;
} else {
break;
};
_local5++;
};
};
_local4++;
};
}
function checkRoomTarget():Boolean{
var _local3:*;
var _local1:* = false;
var _local2:* = 0;
while (_local2 < roomTarget.length) {
_local3 = roomTarget[_local2];
if (elevatorRoom.y == _local3.y){
elevatorDoorOpen(_local3);
_local1 = true;
break;
};
_local2++;
};
return (_local1);
}
function elevatorDoorOpen(_arg1:MovieClip):void{
_arg1.addEventListener(Event.ENTER_FRAME, DoorOpenAnimation);
}
function DoorOpenAnimation(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _arg1.currentTarget;
if (_local2.parent != null){
_local3 = _world;
_local4 = 0;
while (_local4 < (_local3.gameSpeed * _boothLevel)) {
_local2.doorLeft.x--;
_local2.doorRight.x++;
if ((((_local2.doorLeft.x <= 10)) && ((_local2.doorRight.x >= 10)))){
_local5 = roomTarget.indexOf(_local2);
if (_local5 >= 0){
_local6 = roomTarget.splice(_local5, 1);
roomStop = _local6[0];
};
openDoorDelay = 10;
_local2.addEventListener(Event.ENTER_FRAME, delayAfterOpen);
_local2.removeEventListener(Event.ENTER_FRAME, DoorOpenAnimation);
break;
};
_local4++;
};
} else {
_local2.removeEventListener(Event.ENTER_FRAME, DoorOpenAnimation);
};
}
function delayAfterOpen(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.currentTarget;
if (_local2.parent != null){
_local3 = _world;
_local4 = 0;
while (_local4 < _local3.gameSpeed) {
if (openDoorDelay < 0){
roomStop = null;
_local2.addEventListener(Event.ENTER_FRAME, DoorCloseAnimation);
_local2.removeEventListener(Event.ENTER_FRAME, delayAfterOpen);
break;
};
if (canBeEntered()){
if ((((visitorGoingOut.length <= 0)) && (((this.maxCapacity()) || ((visitorWillEnter.length <= 0)))))){
openDoorDelay--;
};
} else {
openDoorDelay--;
};
_local4++;
};
} else {
_local2.removeEventListener(Event.ENTER_FRAME, delayAfterOpen);
};
}
function DoorCloseAnimation(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.currentTarget;
if (_local2.parent != null){
_local3 = _world;
_local4 = 0;
while (_local4 < (_local3.gameSpeed * _boothLevel)) {
_local2.doorLeft.x++;
_local2.doorRight.x--;
if ((((_local2.doorLeft.x >= 0)) && ((_local2.doorRight.x <= 0)))){
checkRoomMove();
isDoorOpened = false;
_local2.removeEventListener(Event.ENTER_FRAME, DoorCloseAnimation);
dispatchEvent(new BoothEvent(BoothEvent.DOOR_CLOSED));
break;
};
_local4++;
};
} else {
_local2.removeEventListener(Event.ENTER_FRAME, DoorOpenAnimation);
};
}
function checkRoomMove():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (roomTarget.length > 0){
_local1 = (elevatorRoom.y > roomTarget[0].y);
_local2 = false;
_local3 = 1;
while (_local3 < roomTarget.length) {
if (elevatorRoom.y > roomTarget[_local3].y){
if (!_local1){
_local2 = true;
break;
};
} else {
if (elevatorRoom.y < roomTarget[_local3].y){
if (_local1){
_local2 = true;
break;
};
};
};
_local3++;
};
if (!_local2){
moveUp = _local1;
};
};
}
public function applyRoomTarget(_arg1:MovieClip):void{
if (_arg1 != null){
if (roomTarget.indexOf(_arg1) < 0){
if (roomStop != _arg1){
roomTarget.push(_arg1);
};
};
if (roomTarget.length == 1){
if (roomTarget[0].y > elevatorRoom.y){
moveUp = false;
} else {
if (roomTarget[0].y < elevatorRoom.y){
moveUp = true;
};
};
};
};
}
public function roomTargetIsAvailable(_arg1:MovieClip):Boolean{
return ((roomTarget.indexOf(_arg1) >= 0));
}
public function canBeEntered():Boolean{
return ((((openDoorDelay > 0)) && ((openDoorDelay < 10))));
}
public function justOpen():Boolean{
return ((openDoorDelay >= 10));
}
public function insertVisitor(_arg1:MovieClip):void{
var _local4:*;
_arg1.x = ((Math.random() * 10) - 5);
_arg1.y = 0;
_visitorList.push(_arg1);
visitorContainer.addChild(_arg1);
var _local2:* = visitorWillEnter.indexOf(_arg1);
if (_local2 >= 0){
visitorWillEnter.splice(_local2, 1);
};
var _local3:* = 0;
while (_local3 < _waitingList) {
_local4 = _waitingList[_local3].indexOf(_arg1);
if ((_local4 in _waitingList)){
_waitingList.splice(_local4, 1);
};
_local3++;
};
_arg1.dispatchEvent(new VisitorEvent(VisitorEvent.ENTER_ELEVATOR, this));
dispatchEvent(new BoothEvent(BoothEvent.VISITOR_UPDATE));
}
public function visitorExit(_arg1:MovieClip):void{
if (visitorGoingOut.indexOf(_arg1) < 0){
visitorGoingOut.push(_arg1);
};
}
public function visitorEnter(_arg1:MovieClip):void{
if (visitorWillEnter.indexOf(_arg1) < 0){
visitorWillEnter.push(_arg1);
};
}
public function cancelInsert(_arg1:MovieClip):void{
var _local4:*;
var _local2:* = visitorWillEnter.indexOf(_arg1);
if (_local2 >= 0){
visitorWillEnter.splice(_local2, 1);
};
var _local3:* = 0;
while (_local3 < _waitingList) {
_local4 = _waitingList[_local3].indexOf(_arg1);
if ((_local4 in _waitingList)){
_waitingList.splice(_local4, 1);
};
_local3++;
};
}
public function removeVisitor(_arg1:MovieClip):void{
var _local2:* = _world;
var _local3:* = new Point(0, 0);
if (_arg1.parent != null){
_local3 = _local2.globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
};
_arg1.x = _local3.x;
_arg1.y = _local3.y;
var _local4:* = null;
var _local5:* = 0;
while (_local5 < _local2.floorList.length) {
if (_arg1.y == _local2.floorList[_local5].y){
_local4 = _local2.floorList[_local5];
break;
};
_local5++;
};
_arg1.onFloor = _local4;
_local2.containerVisitor[(_local2.floorList.indexOf(_arg1.onFloor) + 1)].addChild(_arg1);
var _local6:* = _visitorList.indexOf(_arg1);
if (_local6 >= 0){
_visitorList.splice(_local6, 1);
};
_local6 = visitorGoingOut.indexOf(_arg1);
if (_local6 >= 0){
visitorGoingOut.splice(_local6, 1);
};
_arg1.dispatchEvent(new VisitorEvent(VisitorEvent.OUT_ELEVATOR, this));
dispatchEvent(new BoothEvent(BoothEvent.VISITOR_UPDATE));
}
public function getRoomFloorIndex(_arg1:int):int{
var _local5:*;
var _local6:*;
var _local2:* = _world;
var _local3:* = new Point(0, 0);
if (_roomList[_arg1].parent != null){
_local3 = _local2.globalToLocal(_roomList[_arg1].parent.localToGlobal(new Point(_roomList[_arg1].x, _roomList[_arg1].y)));
};
var _local4:* = 0;
if (_local3.y != 0){
_local5 = 0;
while (_local5 < _local2.floorList.length) {
_local6 = _local2.floorList[_local5];
if (_local3.y == _local6.y){
_local4 = (_local5 + 1);
break;
};
_local5++;
};
};
return (_local4);
}
public function canAccessFloor(_arg1:MovieClip):Boolean{
var _local5:*;
var _local2:* = false;
var _local3:* = _world;
var _local4:* = 0;
while (_local4 < _roomList.length) {
_local5 = _local3.globalToLocal(_roomList[_local4].parent.localToGlobal(new Point(_roomList[_local4].x, _roomList[_local4].y)));
if (_arg1 == null){
_local2 = (_local5.y == 0);
} else {
_local2 = (_local5.y == _arg1.y);
};
if (_local2){
break;
};
_local4++;
};
return (_local2);
}
override public function getMaxCapacity():Number{
var _local1:* = _world;
var _local2:* = BoothList.getMaxVisitor(Utility.getClass(this), (_boothLevel - 1));
if (_local1.checkUpgradeByName("Deluxe Elevator")){
_local2 = (_local2 * 2);
};
return (_local2);
}
public function willBeEnteredBy(_arg1:Object):Boolean{
return ((visitorWillEnter.indexOf(_arg1) >= 0));
}
}
}//package Instance
Section 89
//Employee (Instance.Employee)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
public class Employee extends HumanObject {
public const MAX_LEVEL = 3;
const EXP_GAIN_IDLE = 30;
var _employeeLevel:int;
protected var _doSomething:Boolean;
protected var bodyClip:Object;
var changeCommandChance:Number;
var _onUpgrade:Boolean;
protected var lastFrame:Number;
protected var lastLabel:String;
var _workArea:Number;
var _startWorkTime:Number;
var _finishWorkTime:Number;
var _inHome:Boolean;
var _arrival:Boolean;
protected var _experience:Number;
var maxExperience:Number;
var idleCtr:Number;
var lvUpSymbol:MovieClip;
var tiredSymbol:MovieClip;
var _targetPoint:Point;
var _paid:Number;
var needToPaid:Boolean;
public function Employee(){
_employeeLevel = 1;
changeCommandChance = 30;
_onUpgrade = false;
_paid = 0;
needToPaid = false;
lastFrame = 0;
lastLabel = "";
_workArea = -1;
_startWorkTime = 9;
_finishWorkTime = 19;
_inHome = false;
_arrival = false;
_experience = 0;
_targetPoint = null;
maxExperience = 100;
idleCtr = 0;
addEventListener(ShopFrameEvent.ENTER_SOME_FRAME, checkNewBodyClip);
}
override function Initialize(_arg1:Event):void{
var _local2:* = _world;
lastFrame = this.bodyClip.currentFrame;
if ((this is CrewSecurity)){
if (_local2.checkUpgradeByName("Segway")){
this.gotoAndStop((3 + _employeeLevel));
} else {
this.gotoAndStop(_employeeLevel);
};
} else {
this.gotoAndStop(_employeeLevel);
};
floorTarget = _onFloor;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, checkStatusOnUpgrade);
addEventListener(VisitorEvent.STAMINA_UPDATE, checkCurrentCondition);
addEventListener(MouseEvent.CLICK, EmployeeOnClick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function removed(_arg1:Event):void{
var _local2:* = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, checkStatusOnUpgrade);
removeEventListener(VisitorEvent.STAMINA_UPDATE, checkCurrentCondition);
removeEventListener(ShopFrameEvent.ENTER_SOME_FRAME, checkNewBodyClip);
removeEventListener(MouseEvent.CLICK, EmployeeOnClick);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
addEventListener(Event.ADDED_TO_STAGE, addedAgain);
}
function addedAgain(_arg1:Event):void{
var _local2:* = _world;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, checkStatusOnUpgrade);
addEventListener(VisitorEvent.STAMINA_UPDATE, checkCurrentCondition);
addEventListener(ShopFrameEvent.ENTER_SOME_FRAME, checkNewBodyClip);
addEventListener(MouseEvent.CLICK, EmployeeOnClick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
removeEventListener(Event.ADDED_TO_STAGE, addedAgain);
}
function EmployeeOnClick(_arg1:MouseEvent):void{
var _local2:* = _world;
if ((((_local2.buildSymbol == null)) && ((_local2.hireSymbol == null)))){
dispatchEvent(new VisitorEvent(VisitorEvent.VISITOR_CLICK));
};
}
function checkCurrentCondition(_arg1:VisitorEvent):void{
var _local2:* = _world;
if (recovery){
if (tiredSymbol == null){
if ((((_dialogBox == null)) || ((_dialogBox == lvUpSymbol)))){
tiredSymbol = new legenddialoguebox();
tiredSymbol.iconClip = new LegendTired();
tiredSymbol.relation = this;
_local2.addDialogBox(tiredSymbol);
};
};
} else {
if (tiredSymbol != null){
if (tiredSymbol.parent != null){
tiredSymbol.parent.removeChild(tiredSymbol);
};
tiredSymbol = null;
};
};
}
function checkNewBodyClip(_arg1:ShopFrameEvent):void{
setNewBodyClip();
bodyClip.gotoAndStop(lastFrame);
this.walk = _walk;
}
override function dialogBoxRemoved(_arg1:Event):void{
var _local3:*;
super.dialogBoxRemoved(_arg1);
var _local2:* = _arg1.currentTarget;
if (_local2 != lvUpSymbol){
if (lvUpSymbol != null){
lvUpSymbol.relation = this;
_local3 = _world;
_local3.addDialogBox(lvUpSymbol);
};
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, dialogBoxRemoved);
};
}
public function promote():void{
dispatchEvent(new VisitorEvent(VisitorEvent.BEGIN_PROMOTE));
if (lvUpSymbol != null){
if (lvUpSymbol.parent != null){
lvUpSymbol.parent.removeChild(lvUpSymbol);
};
lvUpSymbol = null;
};
_onUpgrade = true;
this.stamina = 100;
TweenLite.to(this, 0.25, {tint:0xFFFFFF, onComplete:endFlashing});
}
public function fire():void{
var _local1:* = _world;
_local1.removeEventListener(ShopGameEvent.UPDATE, tick);
_local1.removeEventListener(ShopGameEvent.UPDATE, InHomeProgress);
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, checkStatusOnUpgrade);
removeEventListener(MouseEvent.CLICK, EmployeeOnClick);
dispatchEvent(new VisitorEvent(VisitorEvent.BEGIN_FIRE));
this.parent.removeChild(this);
}
function endFlashing():void{
_employeeLevel++;
this.experience = 0;
dispatchEvent(new VisitorEvent(VisitorEvent.BEFORE_FLASHING_PROMOTE));
lastLabel = bodyClip.currentLabel;
lastFrame = (bodyClip.body) ? bodyClip.body.currentFrame : 0;
gotoAndStop(_employeeLevel);
TweenLite.to(this, 0.5, {tint:null, onStart:initFrame, onComplete:completeUpgrade});
}
function initFrame():void{
_onUpgrade = false;
setNewBodyClip();
bodyClip.gotoAndStop(lastLabel);
dispatchEvent(new VisitorEvent(VisitorEvent.AFTER_FLASHING_PROMOTE));
}
override function limitnessMove():void{
var _local1:* = _world;
if (_local1.floorList.length > 0){
if (_targetPoint == null){
super.limitnessMove();
};
} else {
if (((!(_goHome)) && ((_targetPoint == null)))){
if (this.x <= (_local1.mostLeft + 108)){
this.dirrection = RIGHT;
};
if (this.x >= (_local1.mostRight - 108)){
this.dirrection = LEFT;
};
};
};
}
public function correctCurrentAnimation():void{
TweenLite.to(this, 0.2, {tint:null, onComplete:initFrame});
}
function setNewBodyClip():void{
bodyClip = getChildByName("body");
}
function completeUpgrade():void{
dispatchEvent(new VisitorEvent(VisitorEvent.END_PROMOTE));
}
function checkStatusOnUpgrade(_arg1:VisitorEvent):void{
}
function searchTarget():void{
}
public function set employeeLevel(_arg1:int):void{
_employeeLevel = _arg1;
maxExperience = (50 + (_employeeLevel * 50));
}
public function get employeeLevel():int{
return (_employeeLevel);
}
function WalkingCheck(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (_local2 != null){
_local3 = 0;
while (_local3 < _local2.gameSpeed) {
if (!_inHome){
if ((((((this is CrewSecurity)) && (!(_inHome)))) || (((!((this is CrewSecurity))) && (!(_goHome)))))){
lookingTargetProgress();
};
goHomeProgress();
lookingTransportProgress();
waitingElevatorProgress();
movingWhenWalk();
};
_local3++;
};
};
}
function lookingTargetProgress():void{
}
override function tick(_arg1:ShopGameEvent):void{
var _local2:* = _world;
if ((((_local2.gameHour == _finishWorkTime)) && ((_local2.gameMinute == 0)))){
needToPaid = true;
};
if (!recovery){
if (!doSomething){
randomActionWhenNoTarget();
checkWorkFloor();
if (((!(_goHome)) && ((_targetPoint == null)))){
searchTarget();
};
workTimeCheck();
};
};
checkStamina();
checkIdleExp();
}
function checkIdleExp():void{
var _local1:*;
var _local2:*;
if (!_goHome){
idleCtr++;
_local1 = EXP_GAIN_IDLE;
_local2 = _world;
if (_local2.checkUpgradeByName("Motivation")){
_local1 = Math.round((EXP_GAIN_IDLE / 2));
};
if (idleCtr >= _local1){
this.experience++;
idleCtr = 0;
};
};
}
function InHomeProgress(_arg1:ShopGameEvent):void{
var _local2:* = _world;
workTimeCheck();
checkStamina();
if (!_inHome){
this.visible = true;
_local2.removeEventListener(ShopGameEvent.UPDATE, InHomeProgress);
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
};
}
function checkStamina():void{
if (!_inHome){
if (!recovery){
if (_walk){
if (_running){
stamina = (stamina - ((Math.random() + 3) / (_employeeLevel * 3)));
} else {
if (Calculate.chance((10 / _employeeLevel))){
stamina = (stamina - (Math.random() * 0.5));
};
};
};
} else {
if (Calculate.chance((30 + (20 * _employeeLevel)))){
stamina = (stamina + ((Math.random() * 3) + 5));
};
};
} else {
stamina = (stamina + ((Math.random() * 0.3) + 0.1));
if (stamina > recoveryStamina){
recoveryStamina = Math.min(stamina, 80);
};
};
}
function homeSafe(_arg1:VisitorEvent):void{
var _local2:* = _world;
_inHome = true;
this.visible = false;
if (_walk){
this.walk = false;
};
removeEventListener(VisitorEvent.ON_OUT_WORLD, homeSafe);
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
_local2.addEventListener(ShopGameEvent.UPDATE, InHomeProgress);
}
function workTimeCheck():void{
var _local1:* = _world;
if (!((_rideElevator) || (_rideEscalator))){
if (_startWorkTime > _finishWorkTime){
if ((((_local1.gameHour >= _finishWorkTime)) && ((_local1.gameHour < _startWorkTime)))){
if (!_arrival){
this.goHome = true;
};
} else {
this.goHome = false;
_arrival = false;
_inHome = false;
};
} else {
if (_startWorkTime < _finishWorkTime){
if ((((_local1.gameHour >= _startWorkTime)) && ((_local1.gameHour < _finishWorkTime)))){
this.goHome = false;
_arrival = false;
_inHome = false;
} else {
if (!_arrival){
this.goHome = true;
};
};
} else {
this.goHome = false;
};
};
};
if (needToPaid){
payTime();
};
var _local2:* = (_startWorkTime - 1);
if (_local2 < 0){
_local2 = (24 + _local2);
};
if (_local2 > _startWorkTime){
if (_local1.gameHour >= _local2){
if (_inHome){
if (Calculate.chance(((_local1.gameMinute / 60) * 100))){
this.goHome = false;
_arrival = true;
_inHome = false;
};
};
};
} else {
if ((((_local1.gameHour >= _local2)) && ((_local1.gameHour < _startWorkTime)))){
if (_inHome){
if (Calculate.chance(((_local1.gameMinute / 60) * 100))){
this.goHome = false;
_arrival = true;
_inHome = false;
};
};
};
};
}
public function getWage():Number{
var _local1:* = VisitorList.compareWageByType(Utility.getClass(this), (_employeeLevel - 1));
var _local2:* = 10;
if (_finishWorkTime > _startWorkTime){
_local2 = (_finishWorkTime - _startWorkTime);
} else {
_local2 = ((24 - _startWorkTime) + _finishWorkTime);
};
if (_local2 >= 20){
_local1 = (Math.round((_local1 * 0.9)) * 2);
};
return (_local1);
}
public function payTime():void{
var _local1:* = _world;
var _local2:* = getWage();
var _local3:* = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, (this.y - this.theBody.height))));
_local1.addCash(-(_local2), _local3);
_paid = (_paid + _local2);
needToPaid = false;
}
function checkWorkFloor():void{
var _local1:*;
if ((((((((((_currentDestination == null)) && (!(doSomething)))) && (!(_rideElevator)))) && (!(_rideEscalator)))) && (!(_goHome)))){
if (_workArea != -1){
if (transportTarget != null){
_local1 = _world;
if ((((((_workArea == 0)) && ((_onFloor == null)))) || ((_workArea == (_local1.floorList.indexOf(_onFloor) + 1))))){
(transportTarget == null);
waitingElevator = false;
if (!_walk){
this.walk = true;
};
};
};
};
};
}
function randomActionWhenNoTarget():void{
var _local1:*;
var _local2:*;
var _local3:*;
if ((((((((((((transportTarget == null)) && (!(doSomething)))) && (!(((_rideElevator) || (_rideEscalator)))))) && ((((_currentDestination == null)) || (((!((_currentDestination == null))) && (!((_currentDestination.onFloor == _onFloor))))))))) && (((!(_goHome)) || (((_goHome) && (!((_onFloor == null))))))))) && ((((_targetPoint == null)) || (((!((_targetPoint == null))) && (!((searchFloorTargetByPoint(_targetPoint) == _onFloor))))))))){
_local1 = _world;
_local2 = _local1.floorList.indexOf(_onFloor);
if (((((_local2 + 1) == _workArea)) || ((_workArea == -1)))){
if (!_walk){
this.walk = true;
};
if (changeCommandChance < 30){
changeCommandChance = (changeCommandChance + (Math.floor((Math.random() * 2)) + 1));
};
if (Calculate.chance(changeCommandChance)){
changeCommandChance = 0;
if (Calculate.chance(40)){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
if (!_walk){
this.walk = true;
};
} else {
if (_workArea == -1){
_local3 = (Math.floor((Math.random() * _local1.floorList.length)) - 1);
if (_local3 < 0){
floorTarget = null;
} else {
floorTarget = _local1.floorList[_local3];
};
} else {
if (!_walk){
this.walk = true;
};
};
};
};
} else {
if (_workArea == 0){
floorTarget = null;
} else {
floorTarget = _local1.floorList[(_workArea - 1)];
};
};
};
}
public function get doSomething():Boolean{
return (_doSomething);
}
override public function set walk(_arg1:Boolean):void{
_walk = _arg1;
if (((_walk) && (!(recovery)))){
if (bodyClip.currentLabel != "Walk"){
bodyClip.gotoAndStop("Walk");
};
} else {
if (bodyClip.currentLabel != "Standby"){
bodyClip.gotoAndStop("Standby");
};
};
}
public function get onUpgrade():Boolean{
return (_onUpgrade);
}
public function set workArea(_arg1:Number):void{
_workArea = _arg1;
var _local2:* = _world;
var _local3:* = Math.max((_local2.floorList.length - 1), 0);
if (_workArea > _local3){
_workArea = -1;
} else {
if (_workArea < -1){
_workArea = _local3;
};
};
}
public function get workArea():Number{
return (_workArea);
}
public function set startWorkTime(_arg1:Number):void{
_startWorkTime = _arg1;
}
public function get startWorkTime():Number{
return (_startWorkTime);
}
public function set finishWorkTime(_arg1:Number):void{
_finishWorkTime = _arg1;
}
public function get finishWorkTime():Number{
return (_finishWorkTime);
}
override public function set goHome(_arg1:Boolean):void{
var _local2:* = (_arg1 == _goHome);
super.goHome = _arg1;
if (!_local2){
if (_goHome){
addEventListener(VisitorEvent.ON_OUT_WORLD, homeSafe);
} else {
removeEventListener(VisitorEvent.ON_OUT_WORLD, homeSafe);
};
};
}
public function set inHome(_arg1:Boolean):void{
_inHome = _arg1;
}
public function get inHome():Boolean{
return (_inHome);
}
public function get arrival():Boolean{
return (_arrival);
}
public function set experience(_arg1:Number):void{
var _local2:*;
if (_employeeLevel < MAX_LEVEL){
if ((((_arg1 >= maxExperience)) && ((_experience < maxExperience)))){
lvUpSymbol = new legenddialoguebox();
lvUpSymbol.iconClip = new legendneedtolevelup();
if (_dialogBox == null){
lvUpSymbol.relation = this;
_local2 = _world;
_local2.addDialogBox(lvUpSymbol);
};
};
};
_experience = _arg1;
if (_experience > maxExperience){
_experience = maxExperience;
};
dispatchEvent(new VisitorEvent(VisitorEvent.EXP_GAIN));
}
public function get experience():Number{
return (_experience);
}
public function showExpSymbol():void{
var _local1:*;
lvUpSymbol = new legenddialoguebox();
lvUpSymbol.iconClip = new legendneedtolevelup();
if (_dialogBox == null){
lvUpSymbol.relation = this;
_local1 = _world;
_local1.addDialogBox(lvUpSymbol);
};
}
public function expPercentage():Number{
return ((_experience / maxExperience));
}
public function canBePromoted():Boolean{
return ((((_employeeLevel < MAX_LEVEL)) && ((_experience >= maxExperience))));
}
public function clearAllDestination():void{
}
public function clearDestination():void{
var _local1:*;
if (transportTarget != null){
if (!((_rideElevator) || (_rideEscalator))){
if ((transportTarget is FacilityEscalator)){
transportTarget.removeVisitorFromList(this);
} else {
if ((transportTarget is FacilityElevator)){
_local1 = transportTarget.visitorList.indexOf(this);
if (_local1 >= 0){
transportTarget.visitorList.splice(_local1, 1);
};
};
};
waitingElevator = false;
elevatorRoomTarget = null;
transportTarget = null;
};
};
}
public function set targetPoint(_arg1:Point):void{
var _local3:*;
_targetPoint = _arg1;
if (!((((_insideBooth) || (_rideElevator))) || (_rideEscalator))){
this.clearDestination();
};
var _local2:* = searchFloorTargetByPoint(_targetPoint);
if (_local2 == null){
workArea = 0;
} else {
_local3 = _world;
workArea = (_local3.floorList.indexOf(_local2) + 1);
};
}
public function get targetPoint():Point{
return (_targetPoint);
}
public function searchFloorTargetByPoint(_arg1:Point):MovieClip{
var _local3:*;
var _local4:*;
var _local5:*;
var _local2:* = null;
if (_targetPoint != null){
if (_targetPoint.y != 0){
_local3 = _world;
_local4 = 0;
while (_local4 < _local3.floorList.length) {
_local5 = _local3.floorList[_local4];
if (_local5.y == _targetPoint.y){
_local2 = _local5;
break;
};
_local4++;
};
};
};
return (_local2);
}
override public function set stamina(_arg1:Number):void{
var _local3:*;
var _local2:* = 0;
if (_arg1 < _stamina){
_local3 = _world;
if (_local3.checkUpgradeByName("Super Vitamin")){
_local2 = (_arg1 - _stamina);
_local2 = (_local2 * 0.8);
};
};
super.stamina = (_arg1 + _local2);
}
public function set paid(_arg1:Number):void{
_paid = _arg1;
}
public function get paid():Number{
return (_paid);
}
}
}//package Instance
Section 90
//Escalator (Instance.Escalator)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
public class Escalator extends Booth {
public var colEscalator:MovieClip;
public var colBuild:MovieClip;
public var colElevator:MovieClip;
public var escalatorBody:MovieClip;
public var upperPosition:MovieClip;
public var lowerPosition:MovieClip;
var visitorContainerUp:MovieClip;
var visitorContainerDown:MovieClip;
var goUpVisitorList:Array;
var goDownVisitorList:Array;
public function Escalator(){
goUpVisitorList = new Array();
goDownVisitorList = new Array();
super();
var _local1:* = getChildIndex(escalatorBody);
visitorContainerUp = new MovieClip();
visitorContainerDown = new MovieClip();
addChildAt(visitorContainerUp, _local1);
addChildAt(visitorContainerDown, _local1);
}
override function Initialize(_arg1:Event):void{
gotoAndStop(_boothLevel);
addEventListener(Event.ENTER_FRAME, firstInit);
addEventListener(Event.ENTER_FRAME, movingEscalator);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function firstInit(_arg1:Event):void{
if (((((!((escalatorBody == null))) && (!((colBuild == null))))) && (!((colEscalator == null))))){
escalatorBody.mouseEnabled = false;
escalatorBody.mouseChildren = false;
colBuild.mouseEnabled = false;
colBuild.mouseChildren = false;
colEscalator.addEventListener(MouseEvent.CLICK, boothOnClick);
removeEventListener(Event.ENTER_FRAME, firstInit);
};
}
override function removed(_arg1:Event):void{
colEscalator.removeEventListener(MouseEvent.CLICK, boothOnClick);
removeEventListener(Event.ENTER_FRAME, firstInit);
removeEventListener(Event.ENTER_FRAME, movingEscalator);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function boothOnClick(_arg1:MouseEvent):void{
var _local2:*;
if (!toLongHold){
_local2 = _world;
if ((((_local2.buildSymbol == null)) && ((_local2.hireSymbol == null)))){
if (colEscalator.hitTestPoint(stage.mouseX, stage.mouseY, true)){
dispatchEvent(new BoothEvent(BoothEvent.BOOTH_CLICK));
};
};
};
}
function movingEscalator(_arg1:Event):void{
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
moveUpVisitor();
moveDownVisitor();
correctPosition();
_local3++;
};
}
function moveUpVisitor():void{
var _local4:*;
var _local1:* = 0.4;
var _local2:* = _world;
if (_local2.checkUpgradeByName("Super Engine")){
_local1 = 0.8;
};
var _local3:* = 0;
while (_local3 < goUpVisitorList.length) {
_local4 = 0;
while (_local4 < _boothLevel) {
goUpVisitorList[_local3].x = (goUpVisitorList[_local3].x + _local1);
if ((((goUpVisitorList[_local3].x >= upperPosition.x)) || ((goUpVisitorList[_local3].x < lowerPosition.x)))){
goUpVisitorList[_local3].dispatchEvent(new VisitorEvent(VisitorEvent.OUT_ESCALATOR, this));
break;
};
_local4++;
};
_local3++;
};
}
function moveDownVisitor():void{
var _local4:*;
var _local1:* = 0.4;
var _local2:* = _world;
if (_local2.checkUpgradeByName("Super Engine")){
_local1 = 0.8;
};
var _local3:* = 0;
while (_local3 < goDownVisitorList.length) {
_local4 = 0;
while (_local4 < _boothLevel) {
goDownVisitorList[_local3].x = (goDownVisitorList[_local3].x - _local1);
if ((((goDownVisitorList[_local3].x <= lowerPosition.x)) || ((goDownVisitorList[_local3].x > upperPosition.x)))){
goDownVisitorList[_local3].dispatchEvent(new VisitorEvent(VisitorEvent.OUT_ESCALATOR, this));
break;
};
_local4++;
};
_local3++;
};
}
function correctPosition():void{
var _local5:*;
var _local1:* = ((lowerPosition.x + (lowerPosition.width / 2)) - ((upperPosition.x - (upperPosition.width / 2)) - 5));
var _local2:* = (lowerPosition.y - upperPosition.y);
var _local3:* = goUpVisitorList.concat(goDownVisitorList);
var _local4:* = 0;
while (_local4 < _local3.length) {
_local5 = ((lowerPosition.x - _local3[_local4].x) / _local1);
_local3[_local4].y = ((lowerPosition.y - (_local2 * _local5)) - 5);
if (_local3[_local4].y > (lowerPosition.y - 2)){
_local3[_local4].y = (lowerPosition.y - 2);
} else {
if (_local3[_local4].y < (upperPosition.y - 2)){
_local3[_local4].y = (upperPosition.y - 2);
};
};
_local4++;
};
}
override function initFrame():void{
escalatorBody.mouseEnabled = false;
escalatorBody.mouseChildren = false;
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
}
public function addVisitor(_arg1:MovieClip, _arg2:Boolean):void{
if (_arg2){
goUpVisitorList.push(_arg1);
_arg1.x = lowerPosition.x;
_arg1.y = lowerPosition.y;
_arg1.scaleX = 1;
visitorContainerUp.addChild(_arg1);
} else {
goDownVisitorList.push(_arg1);
_arg1.x = upperPosition.x;
_arg1.y = upperPosition.y;
_arg1.scaleX = -1;
visitorContainerDown.addChild(_arg1);
};
}
function removeVisitor(_arg1:MovieClip):void{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local2:* = _world;
var _local3:* = goUpVisitorList.indexOf(_arg1);
var _local4:* = Math.abs((_arg1.y - upperPosition.y));
var _local5:* = Math.abs((_arg1.y - lowerPosition.y));
var _local6:* = ((_local4)<_local5) ? upperPosition : lowerPosition;
if (_local3 >= 0){
_local7 = _local2.globalToLocal(localToGlobal(new Point(_local6.x, _local6.y)));
_arg1.x = _local7.x;
_arg1.y = _local7.y;
goUpVisitorList.splice(_local3, 1);
_local8 = null;
_local9 = 0;
while (_local9 < _local2.floorList.length) {
if (_arg1.y == _local2.floorList[_local9].y){
_local8 = _local2.floorList[_local9];
break;
};
_local9++;
};
_local10 = false;
if (_local8 == null){
_local9 = 0;
while (_local9 < _local2.basementList.length) {
if (_arg1.y == _local2.basementList[_local9].y){
_local8 = _local2.basementList[_local9];
_local10 = true;
break;
};
_local9++;
};
};
_arg1.onFloor = _local8;
if (_local10){
_local2.containerBVisitor[_local2.basementList.indexOf(_arg1.onFloor)].addChild(_arg1);
} else {
_local2.containerVisitor[(_local2.floorList.indexOf(_arg1.onFloor) + 1)].addChild(_arg1);
};
};
_local3 = goDownVisitorList.indexOf(_arg1);
if (_local3 >= 0){
_local7 = _local2.globalToLocal(localToGlobal(new Point(_local6.x, _local6.y)));
_arg1.x = _local7.x;
_arg1.y = _local7.y;
goDownVisitorList.splice(_local3, 1);
_local8 = null;
_local9 = 0;
while (_local9 < _local2.floorList.length) {
if (_arg1.y == _local2.floorList[_local9].y){
_local8 = _local2.floorList[_local9];
break;
};
_local9++;
};
_local10 = false;
if (_local8 == null){
_local9 = 0;
while (_local9 < _local2.basementList.length) {
if (_arg1.y == _local2.basementList[_local9].y){
_local8 = _local2.basementList[_local9];
_local10 = true;
break;
};
_local9++;
};
};
_arg1.onFloor = _local8;
if (_local10){
_local2.containerBVisitor[_local2.basementList.indexOf(_arg1.onFloor)].addChild(_arg1);
} else {
_local2.containerVisitor[(_local2.floorList.indexOf(_arg1.onFloor) + 1)].addChild(_arg1);
};
};
}
public function removeVisitorFromList(_arg1:MovieClip):void{
var _local4:*;
var _local5:*;
var _local2:* = _world;
var _local3:* = goUpVisitorList.indexOf(_arg1);
if (_local3 >= 0){
_local4 = _local2.globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_arg1.x = _local4.x;
_arg1.y = _local4.y;
goUpVisitorList.splice(_local3, 1);
_arg1.correctFloor();
_local5 = (_local2.basementList.indexOf(_arg1.onFloor) >= 0);
if (_local5){
_local2.containerBVisitor[_local2.basementList.indexOf(_arg1.onFloor)].addChild(_arg1);
} else {
_local2.containerVisitor[(_local2.floorList.indexOf(_arg1.onFloor) + 1)].addChild(_arg1);
};
};
_local3 = goDownVisitorList.indexOf(_arg1);
if (_local3 >= 0){
_local4 = _local2.globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_arg1.x = _local4.x;
_arg1.y = _local4.y;
goDownVisitorList.splice(_local3, 1);
_local5 = (_local2.basementList.indexOf(_arg1.onFloor) >= 0);
if (_local5){
_local2.containerBVisitor[_local2.basementList.indexOf(_arg1.onFloor)].addChild(_arg1);
} else {
_local2.containerVisitor[(_local2.floorList.indexOf(_arg1.onFloor) + 1)].addChild(_arg1);
};
};
}
public function getBottomIndex():int{
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
var _local2:* = _local1.globalToLocal(lowerPosition.parent.localToGlobal(new Point(lowerPosition.x, lowerPosition.y)));
var _local3:* = 0;
if (_local2.y != 0){
_local4 = false;
_local5 = 0;
while (_local5 < _local1.floorList.length) {
_local6 = _local1.floorList[_local5];
if (_local2.y == _local6.y){
_local3 = (_local5 + 1);
_local4 = true;
break;
};
_local5++;
};
if (!_local4){
_local5 = 0;
while (_local5 < _local1.basementList.length) {
_local6 = _local1.basementList[_local5];
if (_local2.y == _local6.y){
_local3 = (_local5 - 1);
_local4 = true;
break;
};
_local5++;
};
};
};
return (_local3);
}
public function getTopIndex():int{
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
var _local2:* = _local1.globalToLocal(upperPosition.parent.localToGlobal(new Point(upperPosition.x, upperPosition.y)));
var _local3:* = 0;
if (_local2.y != 0){
_local4 = false;
_local5 = 0;
while (_local5 < _local1.floorList.length) {
_local6 = _local1.floorList[_local5];
if (_local2.y == _local6.y){
_local3 = (_local5 + 1);
_local4 = true;
break;
};
_local5++;
};
if (!_local4){
_local5 = 0;
while (_local5 < _local1.basementList.length) {
_local6 = _local1.basementList[_local5];
if (_local2.y == _local6.y){
_local3 = (_local5 - 1);
_local4 = true;
break;
};
_local5++;
};
};
};
return (_local3);
}
public function isHitVisitor(_arg1:Point):Boolean{
var _local2:* = ((visitorContainerUp.hitTestPoint(_arg1.x, _arg1.y, true)) || (visitorContainerDown.hitTestPoint(_arg1.x, _arg1.y, true)));
return (_local2);
}
}
}//package Instance
Section 91
//FlyingBandit (Instance.FlyingBandit)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class FlyingBandit extends Bandit {
public var body:MovieClip;
public var hitBody:MovieClip;
public var sight:MovieClip;
var _flying:Boolean;
var flyingHome:Boolean;
var landingProgress:int;
var prepareFlightProgress:int;
public function FlyingBandit(){
flyingHome = false;
prepareFlightProgress = 0;
landingProgress = 0;
_experienceCarrier = 12;
}
override function Initialize(_arg1:Event):void{
var _local3:*;
super.Initialize(_arg1);
if (((!((_currentDestination == null))) && (!((_currentDestination.onFloor == null))))){
this.flying = true;
this.onFloor = _currentDestination.onFloor;
floorTarget = _onFloor;
_local3 = ((this.x < this.onFloor.x)) ? ((this.onFloor.x - (this.onFloor.width / 2)) + 5) : ((this.onFloor.x + (this.onFloor.width / 2)) - 5);
this.y = (this.onFloor.y - (Math.abs((this.x - _local3)) * 0.5));
};
var _local2:* = _world;
_local2.containerVisitor[(_local2.floorList.indexOf(this.onFloor) + 1)].addChild(this);
}
override function SwapDirrection(_arg1:VisitorEvent):void{
var _local2:* = _world;
if (!((((_goHome) || (_local2.alarmTrigger))) || ((securityChase.length > 0)))){
super.SwapDirrection(_arg1);
} else {
if ((((prepareFlightProgress == 0)) && (!(_flying)))){
prepareFlightProgress = 60;
this.walk = false;
};
};
}
override function limitnessMove():void{
var _local1:* = _world;
if (!_flying){
if (!((((_goHome) || ((securityChase.length > 0)))) || (_local1.alarmTrigger))){
super.limitnessMove();
};
};
}
override function worldTimeCheck():void{
var _local1:*;
var _local2:*;
if (!((((_insideBooth) || (_rideElevator))) || (_rideEscalator))){
_local1 = _world;
if ((((((_local1.gameHour >= 5)) || ((((_local1.gameHour >= 4)) && ((_local1.gameMinute >= 30)))))) && ((_local1.gameHour < 22)))){
if (_currentDestination != null){
_local2 = _currentDestination.banditList.indexOf(this);
if (_local2 >= 0){
_currentDestination.banditList.splice(_local2, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
goHome = true;
_currentDestination = null;
};
};
}
override function WalkingCheck(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (!_flying){
if (prepareFlightProgress > 0){
prepareFlightProgress = Math.max(0, (prepareFlightProgress - _local2.gameSpeed));
if (prepareFlightProgress <= 0){
this.flying = true;
flyingHome = true;
_local3 = 0;
while (_local3 < _securityChase.length) {
_securityChase[_local3].addEventListener(VisitorEvent.REACH_EDGE, removeMeFromTarget);
_local3++;
};
};
} else {
if (landingProgress > 0){
landingProgress = Math.max(0, (landingProgress - _local2.gameSpeed));
if (landingProgress <= 0){
this.walk = _walk;
};
} else {
super.WalkingCheck(_arg1);
};
};
} else {
flyingCheck();
};
}
function removeMeFromTarget(_arg1:VisitorEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.banditLocked.indexOf(this) >= 0){
_local2.banditLocked.splice(_local2.banditLocked.indexOf(this), 1);
};
_local2.removeEventListener(VisitorEvent.REACH_EDGE, removeMeFromTarget);
}
override protected function goHomeProgress():void{
if (_goHome){
if (!_insideBooth){
if (_currentDestination != null){
_currentDestination = null;
};
if (!_walk){
this.walk = true;
};
};
};
}
override function runAwayProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (!_rideElevator){
_local1 = _world;
checkSecurityOutRange();
if (_securityChase.length > 0){
running = true;
_local2 = searchNearestPursuer();
if (_local2 != null){
if (!((_local2.rideElevator) || (_local2.examine))){
waitingElevator = false;
if ((transportTarget is FacilityElevator)){
transportTarget = null;
};
if (_currentDestination != null){
_local3 = _currentDestination.banditList.indexOf(this);
if (_local3 >= 0){
_currentDestination.banditList.splice(_local3, 1);
stopEnterBooth();
};
};
if (swapDelay > 0){
swapDelay--;
} else {
if (!_rideEscalator){
if (_local2.x < this.x){
if (_dirrection != RIGHT){
swapDelay = 10;
this.dirrection = RIGHT;
};
} else {
if (_local2.x > this.x){
if (_dirrection != LEFT){
swapDelay = 10;
this.dirrection = LEFT;
};
};
};
} else {
_local4 = this.parent.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local4.x > this.x){
if (this.scaleX == 1){
swapDelay = 10;
};
this.scaleX = -1;
} else {
if (_local4.x < this.y){
if (this.scaleX == -1){
swapDelay = 10;
};
this.scaleY = 1;
};
};
};
};
if (!rideElevator){
if (!_walk){
this.walk = true;
};
};
};
};
} else {
if (_local1.alarmTrigger){
if (_currentDestination != null){
_local5 = _currentDestination.banditList.indexOf(this);
if (_local5 >= 0){
_currentDestination.banditList.splice(_local5, 1);
stopEnterBooth();
};
_currentDestination.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
};
running = true;
if (!_rideElevator){
if (!waitingElevator){
if (!_walk){
this.walk = true;
};
} else {
if (_onFloor == null){
waitingElevator = false;
transportTarget = null;
};
};
};
} else {
if (cancelEnterElevatorDelay <= 0){
running = false;
};
};
};
};
}
function flyingCheck():void{
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.gameSpeed) {
if (_onFloor != null){
if (this.x < ((_onFloor.x - (_onFloor.width / 2)) + 5)){
this.dirrection = (flyingHome) ? LEFT : RIGHT;
} else {
if (this.x > ((_onFloor.x + (_onFloor.width / 2)) - 5)){
this.dirrection = (flyingHome) ? RIGHT : LEFT;
};
};
this.x = (this.x + (this.scaleX * (_speed * 0.7)));
if (!flyingHome){
this.y = (this.y + ((_speed * 0.7) * 0.5));
checkFlyDistance();
if (this.y >= _onFloor.y){
landingProgress = 12;
this.y = _onFloor.y;
this.flying = false;
break;
};
} else {
this.y = (this.y - ((_speed * 0.7) * 0.5));
if (this.body.currentLabel != "Fly"){
this.body.gotoAndStop("Fly");
};
};
};
_local2++;
};
}
function checkFlyDistance():void{
if (!flyingHome){
if (this.currentLabel == "Flying"){
if (Math.abs((this.y - this.onFloor.y)) < 24){
if (this.body.currentLabel != "PrepareLanding"){
this.body.gotoAndStop("PrepareLanding");
};
} else {
if (this.body.currentLabel != "Fly"){
this.body.gotoAndStop("Fly");
};
};
};
};
}
override protected function checkEdge():void{
if (!_flying){
super.checkEdge();
};
}
public function set flying(_arg1:Boolean):void{
_flying = _arg1;
if (_flying){
this.gotoAndStop("Flying");
} else {
if (this.currentLabel == "Flying"){
this.body.gotoAndStop("Landing");
};
};
}
public function get flying():Boolean{
return (_flying);
}
override function getBonus():Number{
return (Math.round((Math.max(10, (_bounty / 10)) * 1.5)));
}
}
}//package Instance
Section 92
//Gameplay (Instance.Gameplay)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
import flash.text.*;
import flash.ui.*;
public class Gameplay extends MovieClip {
const GAME_EXECUTE = 9;
const MAX_VISITOR = 150;
const ALARM_DELAY = 20;
var _gameSpeed:int;
var _gameHour:int;
var _gameMinute:int;
var ctr:int;
var _mostLeft:Number;
var _mostRight:Number;
var _mostBottom:Number;
var _bottomPosition:Number;
var _gameHeight:Number;
var leftKeyIsPressed1:Boolean;
var leftKeyIsPressed2:Boolean;
var rightKeyIsPressed1:Boolean;
var rightKeyIsPressed2:Boolean;
var upKeyIsPressed1:Boolean;
var upKeyIsPressed2:Boolean;
var downKeyIsPressed1:Boolean;
var downKeyIsPressed2:Boolean;
var bgScreen:MovieClip;
var containerBackground:MovieClip;
var _containerEmpty:MovieClip;
var _containerBooth:MovieClip;
var _containerPillar:MovieClip;
var _containerFloor:MovieClip;
var _containerBasement:MovieClip;
var _containerCar:MovieClip;
var _containerCarSlope:MovieClip;
var _containerSlope:MovieClip;
var _containerBEscalator:Array;
var _containerBVisitor:Array;
var _containerEscalator:Array;
var _containerTrash:Array;
var _containerVisitor:Array;
var containerBuildLimit:MovieClip;
var _containerLegend:MovieClip;
var _containerConversation:MovieClip;
var _containerBonus:MovieClip;
var leftLimitClip:MovieClip;
var rightLimitClip:MovieClip;
var sky:MovieClip;
var _buildSymbol:MovieClip;
var _hireSymbol:MovieClip;
var currentEntertainerFrame:int;
var _emptyList:Array;
var _boothList:Array;
var _elevatorList:Array;
var _restroomList:Array;
var _atmList:Array;
var _parkingList:Array;
var _subwayList:Array;
var _escalatorList:Array;
var _terraceList:Array;
var _facilityList:Array;
var _pillarList:Array;
var _floorList:Array;
var _basementList:Array;
var _trashList:Array;
var _carList:Array;
var _hall:MovieClip;
var _basementBG:Array;
var _visitorList:Array;
var _visitorVillainList:Array;
var _visitorSpecialList:Array;
var _specialVisitorCanAppear:Array;
var specialVisitorVisitToday:Array;
var _specialVisitorAlreadyVisit:Array;
var _banditList:Array;
var _janitorList:Array;
var _electricianList:Array;
var _securityList:Array;
var _entertainerList:Array;
var _chanceVisitorAppear:Number;
var _popularity:Number;
var _boothPopularity:Number;
var _visitorPopularity:Number;
var _boothCompletionPopularity:Number;
var _nextDayPopularity:Number;
var _main:MovieClip;
var _maxVisitor:int;
var _alarmTrigger:Boolean;
var _humanFocus:MovieClip;
var alarmDelay:int;
var triggerBooth:MovieClip;
var _canScroll:Boolean;
var _cash:Number;
var _cashSpent:Number;
var _extraUpgradeList:Array;
var _upgradePurchaseList:Array;
var _buildBoothReport:Number;
var _buildFacilityReport:Number;
var _upgradeReport:Number;
var _hireReport:Number;
var _extraReport:Number;
var _transferInReport:Number;
var _transferOutReport:Number;
var _miscInReport:Number;
var _miscOutReport:Number;
var _lastBoothReport:Array;
var _lastBuildBoothReport:Number;
var _lastBuildFacilityReport:Number;
var _lastUpgradeReport:Number;
var _lastHireReport:Number;
var _lastStaffReport:Array;
var _lastExtraReport:Number;
var _lastTransferInReport:Number;
var _lastTransferOutReport:Number;
var _lastMiscInReport:Number;
var _lastMiscOutReport:Number;
var _lastHallIsExist:Boolean;
var _lastHallVisitorVisit:Number;
var _lastHallRevenue:Number;
var _lastHallEventCost:Number;
var _profit:Number;
var banditDelay:int;
var lastNotification:String;
var _banditCaptured:int;
var _villainCaptured:int;
var _totalBanditCaptured:int;
var _totalVillainCaptured:int;
var _crime:Number;
var _yourMallIsSafe:Boolean;
var _lostVisitor:Number;
var movingStaff:MovieClip;
var _firstVisit:Boolean;
var _missionActive:uint;
var _missionVar:Number;
var achieveDay:uint;
public var theRoot:Object;
var justSelect:Boolean;
public function Gameplay(){
_containerBEscalator = new Array();
_containerBVisitor = new Array();
_containerEscalator = new Array();
_containerTrash = new Array();
_containerVisitor = new Array();
_emptyList = new Array();
_boothList = new Array();
_elevatorList = new Array();
_restroomList = new Array();
_atmList = new Array();
_parkingList = new Array();
_subwayList = new Array();
_escalatorList = new Array();
_terraceList = new Array();
_facilityList = new Array();
_pillarList = new Array();
_floorList = new Array();
_basementList = new Array();
_trashList = new Array();
_carList = new Array();
_basementBG = new Array();
_visitorList = new Array();
_visitorVillainList = new Array();
_visitorSpecialList = new Array();
_specialVisitorCanAppear = new Array();
specialVisitorVisitToday = new Array();
_specialVisitorAlreadyVisit = new Array();
_banditList = new Array();
_janitorList = new Array();
_electricianList = new Array();
_securityList = new Array();
_entertainerList = new Array();
_extraUpgradeList = new Array();
_upgradePurchaseList = new Array();
_lastBoothReport = new Array();
_lastStaffReport = new Array();
super();
_gameSpeed = 1;
_gameHour = 9;
_gameMinute = 0;
_gameHeight = 1584;
_buildSymbol = null;
_hireSymbol = null;
_chanceVisitorAppear = 0;
_popularity = 0;
_boothPopularity = 0;
_visitorPopularity = 0;
_boothCompletionPopularity = 0;
_maxVisitor = 0;
_alarmTrigger = false;
_canScroll = true;
_cash = 50000;
_cashSpent = 0;
_nextDayPopularity = 0;
_buildBoothReport = 0;
_buildFacilityReport = 0;
_upgradeReport = 0;
_hireReport = 0;
_extraReport = 0;
_transferInReport = 0;
_transferOutReport = 0;
_miscInReport = 0;
_miscOutReport = 0;
_lastBoothReport = [];
_lastBuildBoothReport = 0;
_lastBuildFacilityReport = 0;
_lastUpgradeReport = 0;
_lastHireReport = 0;
_lastStaffReport.push({staffType:"Janitor", single:"", multi:"s", staffNumber:0, staffPaid:0});
_lastStaffReport.push({staffType:"Electrician", single:"", multi:"s", staffNumber:0, staffPaid:0});
_lastStaffReport.push({staffType:"Securit", single:"y", multi:"ies", staffNumber:0, staffPaid:0});
_lastStaffReport.push({staffType:"Entertainer", single:"", multi:"s", staffNumber:0, staffPaid:0});
_lastExtraReport = 0;
_lastTransferInReport = 0;
_lastTransferOutReport = 0;
_lastMiscInReport = 0;
_lastMiscOutReport = 0;
_lastHallIsExist = false;
_lastHallVisitorVisit = 0;
_lastHallRevenue = 0;
_lastHallEventCost = 0;
alarmDelay = ALARM_DELAY;
triggerBooth = null;
banditDelay = 15;
lastNotification = "";
_firstVisit = true;
_banditCaptured = 0;
_villainCaptured = 0;
_totalBanditCaptured = 0;
_totalVillainCaptured = 0;
_profit = 0;
_crime = 0;
_yourMallIsSafe = false;
_missionVar = 0;
_lostVisitor = 0;
containerBackground = new MovieClip();
addChild(containerBackground);
_containerEmpty = new MovieClip();
addChild(_containerEmpty);
_containerBooth = new MovieClip();
addChild(_containerBooth);
_containerPillar = new MovieClip();
addChild(_containerPillar);
_containerFloor = new MovieClip();
addChild(_containerFloor);
_containerBasement = new MovieClip();
addChild(_containerBasement);
_containerCarSlope = new MovieClip();
addChild(_containerCarSlope);
_containerSlope = new MovieClip();
addChild(_containerSlope);
_containerCar = new MovieClip();
addChild(_containerCar);
_containerEscalator.push(new MovieClip());
addChild(_containerEscalator[0]);
_containerTrash.push(new MovieClip());
addChild(_containerTrash[0]);
_containerVisitor.push(new MovieClip());
addChild(_containerVisitor[0]);
containerBuildLimit = new MovieClip();
addChild(containerBuildLimit);
containerBuildLimit.mouseChildren = false;
containerBuildLimit.mouseEnabled = false;
_containerLegend = new MovieClip();
addChild(_containerLegend);
_containerLegend.mouseChildren = false;
_containerLegend.mouseEnabled = false;
_containerConversation = new MovieClip();
addChild(_containerConversation);
_containerConversation.mouseChildren = false;
_containerConversation.mouseEnabled = false;
_containerBonus = new MovieClip();
addChild(_containerBonus);
_missionActive = 0;
leftKeyIsPressed1 = false;
leftKeyIsPressed2 = false;
rightKeyIsPressed1 = false;
rightKeyIsPressed2 = false;
upKeyIsPressed1 = false;
upKeyIsPressed2 = false;
downKeyIsPressed1 = false;
downKeyIsPressed2 = false;
currentEntertainerFrame = 0;
ctr = 0;
createStreet();
destroyStreet();
addEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(BoothEvent.BECOMES_ROBBED, checkBoothRobbed);
addEventListener(VisitorEvent.ARRESTED, banditIsArrested);
addEventListener(VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL, villainIsArrested);
addEventListener(VisitorEvent.BEGIN_FIRE, fireStaff);
}
function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
addEventListener(Event.ENTER_FRAME, UpdateGameTime);
addEventListener(Event.ENTER_FRAME, ScrollScreen);
stage.addEventListener(KeyboardEvent.KEY_DOWN, keyboardIsDown);
stage.addEventListener(KeyboardEvent.KEY_UP, keyboardIsUp);
stage.addEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelScroll);
addEventListener(Event.ENTER_FRAME, checkEscalatorCanClick);
setExtraUpgradeList();
createStreet();
createBackground();
createBasement();
firstParkingLot();
_bottomPosition = (main.screenArea.height - 90);
_gameSpeed = 1;
_firstVisit = false;
var _local3:* = 0;
while (_local3 < _boothList.length) {
_boothList[_local3].addEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _restroomList.length) {
_restroomList[_local3].addEventListener(BoothEvent.DESTROYED, restroomOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _elevatorList.length) {
_elevatorList[_local3].addEventListener(BoothEvent.DESTROYED, elevatorOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _escalatorList.length) {
_escalatorList[_local3].addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _atmList.length) {
_atmList[_local3].addEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _terraceList.length) {
_terraceList[_local3].addEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local3++;
};
_local3 = 0;
while (_local3 < _parkingList.length) {
_parkingList[_local3].addEventListener(BoothEvent.DESTROYED, parkingLotOnDestroyed);
_local3++;
};
if (_hall != null){
_hall.addEventListener(BoothEvent.DESTROYED, hallOnDestroyed);
};
while (_containerLegend.numChildren > 0) {
_containerLegend.removeChildAt(0);
};
while (_containerConversation.numChildren > 0) {
_containerConversation.removeChildAt(0);
};
var _local4:* = _janitorList.concat(_electricianList.concat(_securityList.concat(_entertainerList)));
_local3 = 0;
while (_local3 < _local4.length) {
if (_local4[_local3].canBePromoted()){
_local4[_local3].showExpSymbol();
};
_local3++;
};
if (!theRoot.achievementIsGain(AchievementList.getAchievementByName("loser of the years"))){
achieveDay = 0;
addEventListener(ShopGameEvent.CHANGE_DAY, checkSuccessAchievement);
addEventListener(ShopGameEvent.POPULARITY_UPDATE, checkFailAchievement);
};
addEventListener(Event.REMOVED_FROM_STAGE, removedCheck);
}
function checkSuccessAchievement(_arg1:ShopGameEvent):void{
if (AchievementList.checkAchievementGain(theRoot, AchievementList.getAchievementByName("loser of the years"))){
achieveDay++;
if (achieveDay >= 3){
theRoot.unlockAchievement("loser of the years");
removeEventListener(ShopGameEvent.CHANGE_DAY, checkSuccessAchievement);
removeEventListener(ShopGameEvent.POPULARITY_UPDATE, checkFailAchievement);
};
};
}
function checkFailAchievement(_arg1:ShopGameEvent):void{
if (!AchievementList.checkAchievementGain(theRoot, AchievementList.getAchievementByName("loser of the years"))){
achieveDay = 0;
};
}
function firstCheck():void{
var _local1:*;
if (_firstVisit){
_local1 = theRoot.cityUnlocked.length;
if (_local1 == 1){
upgradePurchaseList.push(getUpgradeByName("Basement Lv 1"));
};
};
}
function firstParkingLot():void{
var _local1:*;
if (((_firstVisit) && ((0 in _basementList)))){
_local1 = new FacilityEscalator();
_local1.world = this;
_local1.x = 0;
_local1.y = _basementList[0].y;
_local1.scaleX = 1;
sortAddEscalator(_local1);
_escalatorList.push(_local1);
_facilityList.push(_local1);
_local1.addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local1.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
this.boothPopularity = (this.boothPopularity + 10);
};
}
function setExtraUpgradeList():void{
var _local3:*;
var _local4:*;
_extraUpgradeList = UpgradeList.UPGRADE_AVAILABLE.concat();
var _local1:* = theRoot.cityUnlocked.length;
var _local2:* = 0;
while (_local2 < UpgradeList.UPGRADE_AVAILABLE.length) {
_local3 = UpgradeList.UPGRADE_AVAILABLE[_local2];
if (_local3.unlock > _local1){
_local4 = _extraUpgradeList.indexOf(_local3);
if (_local4 >= 0){
_extraUpgradeList.splice(_local4, 1);
};
};
_local2++;
};
}
function removedCheck(_arg1:Event):void{
destroyStreet();
removeEventListener(Event.ENTER_FRAME, UpdateGameTime);
removeEventListener(Event.ENTER_FRAME, ScrollScreen);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyboardIsDown);
stage.removeEventListener(KeyboardEvent.KEY_UP, keyboardIsUp);
stage.removeEventListener(MouseEvent.MOUSE_WHEEL, mouseWheelScroll);
removeEventListener(Event.ENTER_FRAME, checkEscalatorCanClick);
removeEventListener(Event.REMOVED_FROM_STAGE, removedCheck);
removeEventListener(ShopGameEvent.CHANGE_DAY, checkSuccessAchievement);
removeEventListener(ShopGameEvent.POPULARITY_UPDATE, checkFailAchievement);
disableMissionListener();
this.gameSpeed = 0;
var _local2:* = 0;
while (_local2 < _boothList.length) {
_boothList[_local2].removeEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _restroomList.length) {
_restroomList[_local2].removeEventListener(BoothEvent.DESTROYED, restroomOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _elevatorList.length) {
_elevatorList[_local2].removeEventListener(BoothEvent.DESTROYED, elevatorOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _escalatorList.length) {
_escalatorList[_local2].removeEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _atmList.length) {
_atmList[_local2].removeEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _terraceList.length) {
_terraceList[_local2].removeEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
_local2++;
};
_local2 = 0;
while (_local2 < _parkingList.length) {
_parkingList[_local2].removeEventListener(BoothEvent.DESTROYED, parkingLotOnDestroyed);
_local2++;
};
if (_hall != null){
_hall.removeEventListener(BoothEvent.DESTROYED, hallOnDestroyed);
};
theRoot = null;
}
function destroyStreet():void{
while (containerBackground.numChildren > 0) {
containerBackground.removeChildAt(0);
};
}
function createStreet():void{
var _local1:* = new dll_Street();
_local1.x = 0;
_local1.y = 0;
var _local2:* = _main;
var _local3:* = (((!((_local2 == null))) && ((_local2.country == ShopText.MAP_ARABIAN)))) ? dll_Tree2 : dll_Tree1;
containerBackground.addChild(_local1);
addObject(dll_streetlamp, _local1.x, _local1.y);
addObject(_local3, (_local1.x - (_local1.width / 2)), _local1.y);
var _local4:* = _local1;
var _local5:* = _local1;
_mostLeft = (_local1.x - (_local1.width / 2));
_mostRight = (_local1.x + (_local1.width / 2));
var _local6:* = 0;
while (_local6 < 3) {
_local1 = new dll_Street();
_local1.x = (_local4.x + _local4.width);
_local1.y = 0;
containerBackground.addChild(_local1);
_local4 = _local1;
_mostRight = (_local1.x + (_local1.width / 2));
addObject(dll_streetlamp, _local1.x, _local1.y);
addObject(_local3, (_local1.x - (_local1.width / 2)), _local1.y);
_local1 = new dll_Street();
_local1.x = (_local5.x - _local5.width);
_local1.y = 0;
containerBackground.addChild(_local1);
_local5 = _local1;
_mostLeft = (_local1.x - (_local1.width / 2));
addObject(dll_streetlamp, _local1.x, _local1.y);
addObject(_local3, (_local1.x - (_local1.width / 2)), _local1.y);
_local6++;
};
addObject(_local3, _mostRight, _local1.y);
_local1 = new dll_Sky();
_local1.x = 0;
_local1.y = -(_gameHeight);
_local1.width = this.width;
_local1.visible = false;
addChild(_local1);
sky = _local1;
leftLimitClip = new MovieClip();
leftLimitClip.x = (_mostLeft + 108);
leftLimitClip.y = (84 * 3);
leftLimitClip.graphics.clear();
leftLimitClip.graphics.beginFill(0xFFFFFF);
leftLimitClip.graphics.drawRect(-108, -((_gameHeight + (84 * 3))), 100, (_gameHeight + (84 * 3)));
leftLimitClip.graphics.endFill();
leftLimitClip.visible = false;
containerBuildLimit.addChild(leftLimitClip);
rightLimitClip = new MovieClip();
rightLimitClip.x = (_mostRight - 108);
rightLimitClip.y = (84 * 3);
rightLimitClip.graphics.clear();
rightLimitClip.graphics.beginFill(0xFFFFFF);
rightLimitClip.graphics.drawRect(108, -((_gameHeight + (84 * 3))), 100, (_gameHeight + (84 * 3)));
rightLimitClip.graphics.endFill();
rightLimitClip.visible = false;
containerBuildLimit.addChild(rightLimitClip);
containerBuildLimit.graphics.clear();
containerBuildLimit.graphics.lineStyle(1, 0xFF0000);
var _local7:* = true;
var _local8:* = (84 * 3);
while (_local8 > -(_gameHeight)) {
if (_local7){
containerBuildLimit.graphics.moveTo((_mostLeft + 108), _local8);
containerBuildLimit.graphics.lineTo((_mostLeft + 108), (_local8 - 12));
containerBuildLimit.graphics.moveTo((_mostRight - 108), _local8);
containerBuildLimit.graphics.lineTo((_mostRight - 108), (_local8 - 12));
};
_local7 = !(_local7);
_local8 = (_local8 - 12);
};
_local1 = new dll_ground();
_local1.x = 0;
_local1.y = 12;
_local1.groundBottom.height = 250;
containerBackground.addChild(_local1);
_local4 = _local1;
_local5 = _local1;
_local6 = 0;
while (_local6 < 3) {
_local1 = new dll_ground();
_local1.x = (_local4.x + _local4.width);
_local1.y = 12;
containerBackground.addChild(_local1);
_local1.groundBottom.height = 250;
_local4 = _local1;
_local1 = new dll_ground();
_local1.x = (_local5.x - _local5.width);
_local1.y = 12;
containerBackground.addChild(_local1);
_local1.groundBottom.height = 250;
_local5 = _local1;
_local6++;
};
_mostBottom = ((24 + 12) + 72);
}
function createBackground():void{
var _local2:*;
var _local3:*;
var _local1:* = _main;
switch (_local1.country){
case ShopText.MAP_INDIA:
_local2 = GameBackground2;
break;
case ShopText.MAP_RUSIA:
_local2 = GameBackground3;
break;
case ShopText.MAP_ARABIAN:
_local2 = GameBackground1;
break;
case ShopText.MAP_ITALY:
_local2 = GameBackground3;
break;
case ShopText.MAP_BRITAIN:
_local2 = GameBackground1;
break;
default:
_local3 = new GameBackground1();
};
_local3 = new (_local2);
_local3.x = 0;
_local3.y = 0;
var _local4:* = -(_local3.width);
var _local5:* = _local3.width;
_local1.backContainer.addChild(_local3);
var _local6:* = Math.abs((_mostRight - mostLeft));
while (_local1.backContainer.width < (_local6 * 0.75)) {
_local3 = new (_local2);
_local3.x = _local4;
_local3.y = 0;
_local4 = (_local4 - _local3.width);
_local1.backContainer.addChild(_local3);
_local3 = new (_local2);
_local3.x = _local5;
_local3.y = 0;
_local5 = (_local5 + _local3.width);
_local1.backContainer.addChild(_local3);
};
}
function createBasement():void{
_basementBG = [];
if (checkUpgradeByName("Basement Lv 1")){
addBasementParkingLevel1();
};
if (checkUpgradeByName("Basement Lv 2")){
addBasementParkingLevel2();
};
if (checkUpgradeByName("Basement Lv 3")){
addBasementParkingLevel3();
};
}
function addBasementParkingLevel1(_arg1:Boolean=false):void{
var _local3:*;
var _local4:*;
var _local2:* = new BasementParkingLotEmpty();
_local2.x = 0;
_local2.y = (12 + 72);
_local2.mouseEnabled = false;
_local2.mouseChildren = false;
_basementBG.push(_local2);
containerBackground.addChild(_local2);
if (_arg1){
TweenLite.from(_local2.maskArea, 0.8, {height:0, ease:Linear.easeNone});
};
if (_basementList.length <= 0){
_local2 = new Floor();
_local2.y = (12 + 72);
_local2.setWidth(816);
_containerBasement.addChild(_local2);
_basementList.push(_local2);
_local3 = getChildIndex(_containerVisitor[0]);
_containerBVisitor.push(new MovieClip());
addChildAt(_containerBVisitor[(_containerBVisitor.length - 1)], (_local3 + 1));
_containerBEscalator.push(new MovieClip());
addChildAt(_containerBEscalator[(_containerBEscalator.length - 1)], (_local3 + 1));
if (_arg1){
_local4 = new FacilityEscalator();
_local4.world = this;
_local4.x = 0;
_local4.y = _local2.y;
_local4.scaleX = 1;
sortAddEscalator(_local4);
_escalatorList.push(_local4);
_facilityList.push(_local4);
_local4.addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local4.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
TweenLite.from(_local2, 0.8, {y:12, ease:Linear.easeNone});
};
};
}
function addBasementParkingLevel2(_arg1:Boolean=false):void{
var _local3:*;
var _local4:*;
var _local2:* = new BasementParkingLotEmpty();
_local2.x = 0;
_local2.y = ((12 + 72) * 2);
_local2.mouseEnabled = false;
_local2.mouseChildren = false;
_basementBG.push(_local2);
containerBackground.addChild(_local2);
if (_arg1){
TweenLite.from(_local2.maskArea, 0.8, {height:0, ease:Linear.easeNone});
};
if (_basementList.length == 1){
_local2 = new Floor();
_local2.y = ((12 + 72) * 2);
_local2.setWidth(816);
_containerBasement.addChild(_local2);
_basementList.push(_local2);
_local3 = getChildIndex(_containerBVisitor[0]);
_containerBVisitor.push(new MovieClip());
addChildAt(_containerBVisitor[(_containerBVisitor.length - 1)], (_local3 + 1));
_containerBEscalator.push(new MovieClip());
addChildAt(_containerBEscalator[(_containerBEscalator.length - 1)], (_local3 + 1));
if (_arg1){
_local4 = new FacilityEscalator();
_local4.world = this;
_local4.x = 0;
_local4.y = _local2.y;
_local4.scaleX = 1;
sortAddEscalator(_local4);
_escalatorList.push(_local4);
_facilityList.push(_local4);
_local4.addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local4.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
TweenLite.from(_local2, 0.8, {y:(12 + 72), ease:Linear.easeNone});
};
};
_mostBottom = (_mostBottom + (12 + 72));
}
function addBasementParkingLevel3(_arg1:Boolean=false):void{
var _local3:*;
var _local4:*;
var _local2:* = new BasementParkingLotEmpty();
_local2.x = 0;
_local2.y = ((12 + 72) * 3);
_local2.mouseEnabled = false;
_local2.mouseChildren = false;
_basementBG.push(_local2);
containerBackground.addChild(_local2);
if (_arg1){
TweenLite.from(_local2.maskArea, 0.8, {height:0, ease:Linear.easeNone});
};
if (_basementList.length == 2){
_local2 = new Floor();
_local2.y = ((12 + 72) * 3);
_local2.setWidth(816);
_containerBasement.addChild(_local2);
_basementList.push(_local2);
_local3 = getChildIndex(_containerBVisitor[1]);
_containerBVisitor.push(new MovieClip());
addChildAt(_containerBVisitor[(_containerBVisitor.length - 1)], (_local3 + 1));
_containerBEscalator.push(new MovieClip());
addChildAt(_containerBEscalator[(_containerBEscalator.length - 1)], (_local3 + 1));
if (_arg1){
_local4 = new FacilityEscalator();
_local4.world = this;
_local4.x = 0;
_local4.y = _local2.y;
_local4.scaleX = 1;
sortAddEscalator(_local4);
_escalatorList.push(_local4);
_facilityList.push(_local4);
_local4.addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local4.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
TweenLite.from(_local2, 0.8, {y:((12 + 72) * 2), ease:Linear.easeNone});
};
};
_mostBottom = (_mostBottom + (12 + 72));
}
function banditIsArrested(_arg1:VisitorEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _banditList.indexOf(_local2);
if (_local3 >= 0){
_banditList.splice(_local3, 1);
};
_local2.parent.removeChild(_local2);
var _local4:* = _main;
this.crime = (this.crime + VisitorList.getCrimeIncrement(_local4.country));
_totalBanditCaptured++;
}
function villainIsArrested(_arg1:VisitorEvent):void{
_totalVillainCaptured++;
}
public function addExtraUpgrade(_arg1:Object):void{
var _local3:*;
var _local4:*;
_upgradePurchaseList.push(_arg1);
theRoot.playSound(SFXPromote);
var _local2:* = _main;
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 3){
addBasementParkingLevel1(true);
_local2.GameInterface.activeCCTVOnPoint(this, new Point(0, (84 + 20)), (_local2.GameInterface.CCTV_WIDTH * 1.5), (_local2.GameInterface.CCTV_HEIGHT * 1.5));
};
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 4){
addBasementParkingLevel2(true);
_local2.GameInterface.activeCCTVOnPoint(this, new Point(0, ((84 * 2) + 20)), (_local2.GameInterface.CCTV_WIDTH * 1.5), (_local2.GameInterface.CCTV_HEIGHT * 1.5));
};
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 5){
addBasementParkingLevel3(true);
_local2.GameInterface.activeCCTVOnPoint(this, new Point(0, ((84 * 3) + 20)), (_local2.GameInterface.CCTV_WIDTH * 1.5), (_local2.GameInterface.CCTV_HEIGHT * 1.5));
};
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 21){
for (_local3 in _securityList) {
_local4 = _securityList[_local3];
_local4.checkCurrentAnimation();
_local4.gotoAndStop((_local4.employeeLevel + 3));
_local4.correctCurrentAnimation();
};
};
dispatchEvent(new ShopGameEvent(ShopGameEvent.PURCHASE_EXTRA_UPGRADE, null, null, UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1)));
}
function fireStaff(_arg1:VisitorEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _janitorList.indexOf(_local2);
var _local4:* = _electricianList.indexOf(_local2);
var _local5:* = _securityList.indexOf(_local2);
var _local6:* = _entertainerList.indexOf(_local2);
if (_local3 >= 0){
_janitorList.splice(_local3, 1);
};
if (_local4 >= 0){
_electricianList.splice(_local4, 1);
};
if (_local5 >= 0){
_securityList.splice(_local5, 1);
};
if (_local6 >= 0){
_entertainerList.splice(_local6, 1);
};
_local2.dispatchEvent(new ShopGameEvent(ShopGameEvent.FIRE_STAFF));
}
function addObject(_arg1:Class, _arg2:Number, _arg3:Number):void{
var _local4:* = new (_arg1);
_local4.x = _arg2;
_local4.y = _arg3;
containerBackground.addChildAt(_local4, 0);
}
function UpdateGameTime(_arg1:Event):void{
var _local2:*;
var _local3:*;
ctr = (ctr + _gameSpeed);
if (ctr >= 9){
ctr = (ctr - 9);
_gameMinute++;
if (_gameMinute >= 60){
_gameHour++;
if (_gameHour >= 24){
_gameHour = 0;
};
_gameMinute = 0;
};
loadMaxVisitor();
_local2 = 0;
_local3 = 0;
if ((((_gameHour >= 10)) && ((_gameHour < 12)))){
_local2 = 1;
_local3 = 1;
} else {
if ((((_gameHour >= 12)) && ((_gameHour < 15)))){
_local2 = 3;
_local3 = 2;
} else {
if ((((_gameHour >= 15)) && ((_gameHour < 18)))){
_local2 = 2;
_local3 = 3;
} else {
if ((((_gameHour >= 18)) && ((_gameHour < 21)))){
_local2 = 4;
_local3 = 2;
};
};
};
};
_chanceVisitorAppear = ((_popularity * ((_local2 + ((Math.random() * (_local3 * 2)) - _local3)) / 2)) * 0.75);
if ((((((_chanceVisitorAppear < 5)) && ((_gameHour >= 10)))) && ((_gameHour < 21)))){
_chanceVisitorAppear = 5;
};
if (((!((_hall == null))) && (_hall.boothOpen))){
_chanceVisitorAppear = (_chanceVisitorAppear * 1.2);
};
_chanceVisitorAppear = (_chanceVisitorAppear * (_maxVisitor / (_maxVisitor + getNumberVisitor())));
checkSpecialVisitor();
createRandomVisitor();
createBandit();
checkAlarm();
if ((((_gameHour == 0)) && ((_gameMinute == 0)))){
popularity = (popularity + _nextDayPopularity);
_nextDayPopularity = 0;
};
if ((((_gameHour == 22)) && ((_gameMinute == 0)))){
_yourMallIsSafe = true;
};
dispatchEvent(new ShopGameEvent(ShopGameEvent.UPDATE));
};
}
function checkAlarm():void{
if (_alarmTrigger){
if ((((alarmDelay-- <= 0)) || ((_banditList.length <= 0)))){
_alarmTrigger = false;
triggerBooth.alarmTrigger = false;
triggerBooth = null;
dispatchEvent(new ShopGameEvent(ShopGameEvent.ALARM_STOPPED));
};
};
}
function checkEscalatorCanClick(_arg1:Event):void{
var _local4:*;
var _local2:* = null;
var _local3:* = 0;
while (_local3 < _escalatorList.length) {
_local4 = _escalatorList[_local3];
_local4.parent.mouseEnabled = false;
_local4.parent.mouseChildren = false;
if (((_local4.colEscalator.hitTestPoint(stage.mouseX, stage.mouseY, true)) || (_local4.isHitVisitor(new Point(stage.mouseX, stage.mouseY))))){
_local2 = _local4.parent;
};
_local3++;
};
if (_local2 != null){
_local2.mouseEnabled = true;
_local2.mouseChildren = true;
};
}
function checkSpecialVisitor():void{
var _local2:*;
var _local3:*;
var _local1:* = 0;
while (_local1 < VisitorList.SPECIAL_VISITOR_LIST.length) {
_local2 = VisitorList.SPECIAL_VISITOR_LIST[_local1];
if (_specialVisitorCanAppear.indexOf(_local2) < 0){
if (checkSpecialVisitorAvailable(_local2)){
_specialVisitorCanAppear.push(_local2);
};
} else {
if (!checkSpecialVisitorAvailable(_local2)){
_local3 = _specialVisitorCanAppear.indexOf(_local2);
if ((_local3 in _specialVisitorCanAppear)){
_specialVisitorCanAppear.splice(_local3, 1);
};
};
};
_local1++;
};
}
function checkSpecialVisitorAvailable(_arg1:Class):Boolean{
var _local2:* = false;
var _local3:* = ((!(haveSpecialVisitorOf(_arg1))) && ((specialVisitorVisitToday.indexOf(_arg1) < 0)));
var _local4:* = false;
if (_arg1 == VisitorAlnord){
_local4 = (((((((((((popularity >= 45)) && ((((((_totalBanditCaptured >= 25)) && ((_totalVillainCaptured >= 10)))) || (((_totalBanditCaptured + _totalVillainCaptured) >= 100)))))) && (freeParkingLotIsAvailable()))) && (checkUpgradeByName("Red Carpet")))) && ((theRoot.numberCountryData() >= 4)))) && ((((_gameHour >= 10)) && ((_gameHour < 20)))));
};
if (_arg1 == VisitorChuckNourish){
_local4 = (((((((popularity >= 40)) && (((_totalBanditCaptured + totalVillainCaptured) >= 15)))) && ((_securityList.length >= 5)))) && ((((_gameHour >= 11)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorDustbinBiebir){
_local4 = (((((popularity >= 30)) && (haveAnyBuildOf([BoothBabyShop, BoothSalon, BoothCandy])))) && ((((_gameHour >= 12)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorKateCentertown){
_local4 = (((((((((popularity >= 30)) && (freeParkingLotIsAvailable()))) && ((getJanitorTotalLevel() >= 10)))) && ((_restroomList.length >= 5)))) && ((((_gameHour >= 12)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorKatyBerry){
_local4 = (((((popularity >= 30)) && (haveAnyBuildOf([BoothSalon, BoothMusic, BoothDrugStore])))) && ((((_gameHour >= 12)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorKezya){
_local4 = (((((((((popularity >= 30)) && ((numberKindOfBooth() >= 5)))) && (haveAnyBuildOf([BoothMusic])))) && (haveAnyBuildOf([BoothLiquor])))) && ((((_gameHour >= 12)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorLadyGogo){
_local4 = (((((((((((popularity >= 20)) && (haveAnyBuildOf([BoothArcade])))) && (haveAnyBuildOf([BoothTattoo, BoothSushi, BoothCandy])))) && ((_boothList.length >= 5)))) && (freeParkingLotIsAvailable()))) && ((((_gameHour >= 12)) && ((_gameHour < 19)))));
};
if (_arg1 == VisitorMeleeCyrus){
_local4 = (((((((((popularity >= 35)) && (haveAnyBuildOf([BoothJewelry])))) && (haveAnyBuildOf([BoothBoutique])))) && ((_boothList.length >= 5)))) && ((((_gameHour >= 12)) && ((_gameHour < 20)))));
};
if (_arg1 == VisitorMrPeanut){
_local4 = ((((((freeParkingLotIsAvailable()) && ((numberKindOfBooth() >= 8)))) && ((theRoot.numberCountryData() >= 2)))) && ((((_gameHour >= 10)) && ((_gameHour < 21)))));
};
if (_arg1 == VisitorSteveWork){
_local4 = (((((((popularity >= 25)) && (haveAnyBuildOf([BoothGadget])))) && (haveAnyBuildOf([BoothCinema])))) && ((((_gameHour >= 14)) && ((_gameHour < 20)))));
};
_local2 = ((_local3) && (_local4));
return (_local2);
}
public function getJanitorTotalLevel():Number{
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < _janitorList.length) {
_local1 = (_local1 + _janitorList[_local2].employeeLevel);
_local2++;
};
return (_local1);
}
public function numberKindOfBooth():Number{
var _local3:*;
var _local1:* = new Array();
var _local2:* = 0;
while (_local2 < _boothList.length) {
_local3 = Utility.getClass(_boothList[_local2]);
if (_local1.indexOf(_local3) < 0){
_local1.push(_local3);
};
_local2++;
};
return (_local1.length);
}
public function freeParkingLotIsAvailable():Boolean{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = false;
var _local2:* = 0;
while (_local2 < _parkingList.length) {
_local3 = _parkingList[_local2];
_local4 = false;
_local5 = 0;
while (_local5 < _local3.carQueue.length) {
_local6 = _local3.carQueue[_local5];
if (_local6 == null){
_local4 = true;
break;
};
_local5++;
};
if (_local4){
_local1 = true;
break;
};
_local2++;
};
return (_local1);
}
public function haveAnyBuildOf(_arg1:Array):Boolean{
var _local2:* = false;
var _local3:* = _boothList.concat(_facilityList);
if (hall != null){
_local3.push(hall);
};
var _local4:* = 0;
while (_local4 < _local3.length) {
if (_arg1.indexOf(Utility.getClass(_local3[_local4])) >= 0){
_local2 = true;
break;
};
_local4++;
};
return (_local2);
}
public function haveSpecialVisitorOf(_arg1:Class):Boolean{
var _local2:* = false;
var _local3:* = 0;
while (_local3 < _visitorSpecialList.length) {
if ((_visitorSpecialList[_local3] is _arg1)){
_local2 = true;
break;
};
_local3++;
};
return (_local2);
}
function createRandomVisitor():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = main;
var _local2:* = _local1.country;
if (getNumberVisitor() < _maxVisitor){
_local3 = 0;
if (_specialVisitorCanAppear.length > 0){
_local3 = Math.max((6 * _specialVisitorCanAppear.length), Math.max((15 - (_visitorSpecialList.length * 2)), 5));
if (checkUpgradeByName("Red Carpet")){
_local3 = (_local3 * 1.5);
};
};
if (Calculate.chance(_local3)){
addSpecialVisitor(true);
} else {
_local4 = 0;
while (_local4 < 3) {
if (Calculate.chance((_chanceVisitorAppear - (_local4 * 20)))){
_local5 = Math.min(Math.max(((_cashSpent - 50000) / 5000), 0), 20);
if (theRoot.dayPass > 7){
if (checkUpgradeByName("Prohibition Sign")){
_local5 = (_local5 * 0.75);
};
if (haveSpecialVisitorOf(VisitorChuckNourish)){
_local5 = (_local5 * 0.8);
};
if (haveSpecialVisitorOf(VisitorAlnord)){
_local5 = (_local5 * 0.5);
};
} else {
_local5 = 0;
};
if (Calculate.chance(_local5)){
addVisitor(VisitorList.getRandomVillainList(), true);
} else {
addVisitor(VisitorList.getRandomVisitorList(_local2), true);
};
};
_local4++;
};
if (Calculate.chance(_chanceVisitorAppear)){
createExtraVisitor();
};
};
};
}
public function getNumberVisitor():Number{
return (((_visitorList.length + _visitorVillainList.length) + _visitorSpecialList.length));
}
function createExtraVisitor():void{
var _local1:* = main;
var _local2:* = _local1.country;
if (haveSpecialVisitorOf(VisitorDustbinBiebir)){
if (Calculate.chance(15)){
addVisitor(VisitorList.getRandomFemaleVisitorList(_local2), true);
};
};
if (haveSpecialVisitorOf(VisitorKatyBerry)){
if (Calculate.chance(15)){
addVisitor(VisitorList.getRandomMaleVisitorList(_local2), true);
};
};
}
function createBandit():void{
var _local1:*;
var _local2:*;
if ((((_gameHour >= 22)) || ((((_gameHour < 5)) && ((((_gameHour < 4)) || ((_gameMinute < 30)))))))){
if ((((banditDelay-- <= 0)) && (!(_alarmTrigger)))){
_local1 = 1;
if (checkUpgradeByName("Awsome CCTV")){
_local1 = 0.75;
};
_local2 = (30 + ((_crime / 100) * 60));
if (Calculate.chance((_local2 * _local1))){
addBandit(getRandomBandit());
};
banditDelay = (15 - Math.round(((_crime / 100) * 10)));
};
};
}
function getRandomBandit():Class{
var _local1:* = null;
var _local2:* = _main;
_local1 = VisitorList.getRandomBanditOnCountry(_local2.country);
return (_local1);
}
function addVisitor(_arg1:Class, _arg2:Boolean=false):void{
var _local3:* = new (_arg1);
var _local4:* = Math.floor((Math.random() * 2));
_local3.world = this;
_local3.mayHaveCar = _arg2;
if (_local4 == 0){
_local3.x = _mostLeft;
_local3.dirrection = HumanObject.RIGHT;
} else {
_local3.x = _mostRight;
_local3.dirrection = HumanObject.LEFT;
};
_local3.walk = true;
_containerVisitor[0].addChild(_local3);
_local3.addEventListener(VisitorEvent.ON_OUT_WORLD, visitorOutWorld);
if (VisitorList.compareTypeOfVisitor(_arg1) == VisitorList.NORMAL){
_visitorList.push(_local3);
} else {
if (VisitorList.compareTypeOfVisitor(_arg1) == VisitorList.VILLAIN){
_visitorVillainList.push(_local3);
};
};
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_ARRIVE));
}
function addSpecialVisitor(_arg1:Boolean=false):void{
var _local2:* = Math.floor((Math.random() * _specialVisitorCanAppear.length));
specialVisitorVisitToday.push(_specialVisitorCanAppear[_local2]);
if (_specialVisitorAlreadyVisit.indexOf(_specialVisitorCanAppear[_local2]) < 0){
_specialVisitorAlreadyVisit.push(_specialVisitorCanAppear[_local2]);
};
var _local3:* = new (_specialVisitorCanAppear[_local2]);
var _local4:* = Math.floor((Math.random() * 2));
_local3.world = this;
_local3.mayHaveCar = _arg1;
if (_local4 == 0){
_local3.x = _mostLeft;
_local3.dirrection = HumanObject.RIGHT;
} else {
_local3.x = _mostRight;
_local3.dirrection = HumanObject.LEFT;
};
_local3.walk = true;
_containerVisitor[0].addChild(_local3);
_local3.addEventListener(VisitorEvent.ON_OUT_WORLD, visitorOutWorld);
_visitorSpecialList.push(_local3);
showNotification((_local3.visitorName + " arrive"));
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_ARRIVE));
}
public function createCar(_arg1:MovieClip, _arg2:String="random"):void{
var _local3:* = new Cars();
_local3.world = this;
_arg1.car = _local3;
_local3.x = _arg1.x;
_local3.carType = _arg2;
_local3.scaleX = _arg1.scaleX;
_local3.onFloor = null;
_containerCar.addChild(_local3);
_arg1.x = 0;
_arg1.y = 0;
_arg1.rideCar = true;
_arg1.walk = false;
_arg1.scaleX = 1;
_carList.push(_local3);
_local3.containerDriver.addChild(_arg1);
}
function addBandit(_arg1:Class):void{
var _local2:*;
var _local3:*;
if (_arg1 != null){
_local2 = new (_arg1);
_local3 = Math.floor((Math.random() * 2));
_local2.world = this;
if (_local3 == 0){
_local2.x = _mostLeft;
_local2.dirrection = HumanObject.RIGHT;
} else {
_local2.x = _mostRight;
_local2.dirrection = HumanObject.LEFT;
};
_local2.walk = true;
_containerVisitor[0].addChild(_local2);
_local2.addEventListener(VisitorEvent.ON_OUT_WORLD, visitorOutWorld);
_banditList.push(_local2);
};
}
function addTrash(_arg1:Number, _arg2:Number, _arg3:Number){
var _local8:*;
var _local9:*;
var _local4:Boolean;
var _local5:* = null;
var _local6:* = 0;
if (checkUpgradeByName("Air Refresher")){
_arg3 = (_arg3 * 0.5);
};
if (haveSpecialVisitorOf(VisitorKateCentertown)){
_arg3 = (_arg3 * 0.8);
};
var _local7:* = 0;
while (_local7 < _trashList.length) {
_local8 = _trashList[_local7];
if ((((_local8.janitorOnDuty == null)) || (((!((_local8.janitorOnDuty == null))) && (!(_local8.janitorOnDuty.cleaning)))))){
if (_local8.y == _arg2){
if (_local5 == null){
_local5 = _local8;
} else {
if (Math.abs((_local5.x - _arg1)) > Math.abs((_local8.x - _arg1))){
_local5 = _local8;
} else {
if (Math.abs((_local5.x - _arg1)) == Math.abs((_local8.x - _arg1))){
if (Calculate.chance(50)){
_local5 = _local8;
};
};
};
};
};
};
_local7++;
};
if (_local5 != null){
if (Math.abs((_local5.x - _arg1)) <= 75){
_local4 = false;
if (_local5.trashLevel < 10){
_local5.x = _arg1;
};
_local5.trashLevel = (_local5.trashLevel + _arg3);
};
};
if (_local4){
_local9 = new Trash();
_local9.world = this;
_local9.x = _arg1;
_local9.y = _arg2;
_local9.trashLevel = _arg3;
if (_local9.y == 0){
_local9.onFloor = null;
} else {
_local7 = 0;
while (_local7 < _floorList.length) {
if (_floorList[_local7].y == _local9.y){
_local9.onFloor = _floorList[_local7];
break;
};
_local7++;
};
};
_containerTrash[(_floorList.indexOf(_local9.onFloor) + 1)].addChild(_local9);
_trashList.push(_local9);
};
}
public function visitorOutWorld(_arg1:VisitorEvent):void{
var _local2:* = _arg1.target;
_local2.removeEventListener(VisitorEvent.ON_OUT_WORLD, visitorOutWorld);
if (_local2.statification == 0){
_lostVisitor++;
};
var _local3:* = _visitorList.indexOf(_local2);
if (_local3 >= 0){
_visitorList.splice(_local3, 1);
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_LEAVE));
};
_local3 = _visitorVillainList.indexOf(_local2);
if (_local3 >= 0){
_visitorVillainList.splice(_local3, 1);
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_LEAVE));
};
_local3 = _visitorSpecialList.indexOf(_local2);
if (_local3 >= 0){
_visitorSpecialList.splice(_local3, 1);
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_LEAVE));
};
var _local4:* = _banditList.indexOf(_local2);
if (_local4 >= 0){
_banditList.splice(_local4, 1);
};
if ((_local2 as Bandit)){
if (_local2.bounty > 0){
_yourMallIsSafe = false;
};
};
_local2.parent.removeChild(_local2);
}
function checkBoothRobbed(_arg1:BoothEvent):void{
var _local3:*;
var _local2:* = _arg1.target;
if (!_local2.boothIsBroken){
_local3 = (_local2.boothLevel * 20);
if (checkUpgradeByName("Sensitive Alarm")){
_local3 = (_local3 + 20);
};
if (Calculate.chance(_local3)){
triggerBooth = _local2;
triggerBooth.alarmTrigger = true;
_alarmTrigger = true;
alarmDelay = ALARM_DELAY;
triggerBooth.dispatchEvent(new BoothEvent(BoothEvent.ALARM_TRIGGERED));
};
};
}
function keyboardIsDown(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.LEFT){
if (!leftKeyIsPressed1){
leftKeyIsPressed1 = true;
};
};
if (_local2 == 65){
if (!leftKeyIsPressed2){
leftKeyIsPressed2 = true;
};
};
if (_local2 == Keyboard.RIGHT){
if (!rightKeyIsPressed1){
rightKeyIsPressed1 = true;
};
};
if (_local2 == 68){
if (!rightKeyIsPressed2){
rightKeyIsPressed2 = true;
};
};
if (_local2 == Keyboard.UP){
if (!upKeyIsPressed1){
upKeyIsPressed1 = true;
};
};
if (_local2 == 87){
if (!upKeyIsPressed2){
upKeyIsPressed2 = true;
};
};
if (_local2 == Keyboard.DOWN){
if (!downKeyIsPressed1){
downKeyIsPressed1 = true;
};
};
if (_local2 == 83){
if (!downKeyIsPressed2){
downKeyIsPressed2 = true;
};
};
}
function keyboardIsUp(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.LEFT){
if (leftKeyIsPressed1){
leftKeyIsPressed1 = false;
};
};
if (_local2 == 65){
if (leftKeyIsPressed2){
leftKeyIsPressed2 = false;
};
};
if (_local2 == Keyboard.RIGHT){
if (rightKeyIsPressed1){
rightKeyIsPressed1 = false;
};
};
if (_local2 == 68){
if (rightKeyIsPressed2){
rightKeyIsPressed2 = false;
};
};
if (_local2 == Keyboard.UP){
if (upKeyIsPressed1){
upKeyIsPressed1 = false;
};
};
if (_local2 == 87){
if (upKeyIsPressed2){
upKeyIsPressed2 = false;
};
};
if (_local2 == Keyboard.DOWN){
if (downKeyIsPressed1){
downKeyIsPressed1 = false;
};
};
if (_local2 == 83){
if (downKeyIsPressed2){
downKeyIsPressed2 = false;
};
};
}
function ScrollScreen(_arg1:Event):void{
var _local2:*;
if (_humanFocus == null){
if (_canScroll){
if (leftKeyIsPressed1){
this.x = (this.x + 15);
};
if (leftKeyIsPressed2){
this.x = (this.x + 15);
};
if (rightKeyIsPressed1){
this.x = (this.x - 15);
};
if (rightKeyIsPressed2){
this.x = (this.x - 15);
};
if (upKeyIsPressed1){
this.y = (this.y + 15);
};
if (upKeyIsPressed2){
this.y = (this.y + 15);
};
if (downKeyIsPressed1){
this.y = (this.y - 15);
};
if (downKeyIsPressed2){
this.y = (this.y - 15);
};
if (((((((((((((((upKeyIsPressed1) || (upKeyIsPressed2))) || (leftKeyIsPressed1))) || (leftKeyIsPressed2))) || (rightKeyIsPressed1))) || (rightKeyIsPressed2))) || (downKeyIsPressed1))) || (downKeyIsPressed2))){
dispatchEvent(new ShopGameEvent(ShopGameEvent.SCROLL_WITH_KEY));
};
};
} else {
if (_humanFocus.parent != null){
_local2 = this.globalToLocal(_humanFocus.parent.localToGlobal(new Point(_humanFocus.x, _humanFocus.y)));
this.x = (-(_local2.x) + (stage.stageWidth / 2));
this.y = ((-(_local2.y) + _bottomPosition) - 20);
};
};
}
function mouseWheelScroll(_arg1:MouseEvent):void{
trace(_arg1.delta);
}
function checkCollitionBuilding(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
if (((!((_local2.parent == null))) && (!((_local2 == null))))){
if ((_local2 is BuildEscalator)){
_local2.canBuild = escalatorCollitionCheck(_local2);
} else {
if ((((_local2 is BuildParkingLot)) || ((_local2 is BuildSubway)))){
_local2.canBuild = parkingLotCollitionCheck(_local2);
} else {
_local2.canBuild = collitionCheck(_local2);
};
};
} else {
_local2.removeEventListener(Event.ENTER_FRAME, checkCollitionBuilding);
};
}
function parkingLotCollitionCheck(_arg1:DisplayObject):Boolean{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local2:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
var _local3:* = false;
var _local4:* = _arg1;
var _local5:* = 0;
while (_local5 < _basementList.length) {
if (_local2.y == _basementList[_local5].y){
_local3 = true;
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _basementBG.length) {
_local6 = _basementBG[_local5];
_local7 = 0;
while (_local7 < _local6.unbuildableClip.length) {
_local8 = _local6.unbuildableClip[_local7];
if (_local4.buildBody.hitTestObject(_local8)){
_local9 = globalToLocal(_local8.parent.localToGlobal(new Point(_local8.x, _local8.y)));
if (_local2.y != _local9.y){
_local3 = false;
break;
} else {
if (Math.abs((_local2.x - _local9.x)) < ((_local8.width / 2) + (_local4.width / 2))){
_local3 = false;
break;
};
};
};
_local7++;
};
if (!_local3){
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _parkingList.length) {
if (_local4.buildBody.hitTestObject(_parkingList[_local5].parkingColArea)){
if (_local2.y != _parkingList[_local5].y){
_local3 = false;
break;
} else {
if (Math.abs((_local2.x - _parkingList[_local5].x)) < ((_parkingList[_local5].parkingColArea.width / 2) + (_local4.width / 2))){
_local3 = false;
break;
};
};
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _subwayList.length) {
if (_local4.buildBody.hitTestObject(_subwayList[_local5].subwayColArea)){
if (_local2.y != _subwayList[_local5].y){
_local3 = false;
break;
} else {
if (Math.abs((_local2.x - _subwayList[_local5].x)) < ((_subwayList[_local5].subwayColArea.width / 2) + (_local4.width / 2))){
_local3 = false;
break;
};
};
};
_local5++;
};
};
};
};
return (((_local3) && (!(((_arg1.hitTestObject(leftLimitClip)) || (_arg1.hitTestObject(rightLimitClip)))))));
}
function collitionCheck(_arg1:DisplayObject){
var _local5:*;
var _local2:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
var _local3:* = (((((_local2.y == 0)) || ((_arg1 is ExpandElevatorSymbol)))) && (!(((_arg1.hitTestObject(leftLimitClip)) || (_arg1.hitTestObject(rightLimitClip))))));
var _local4:* = _arg1;
if (!_local3){
_local5 = 0;
while (_local5 < _floorList.length) {
if ((((((_local2.y == _floorList[_local5].y)) && (((_local2.x - (_arg1.width / 2)) >= (_floorList[_local5].x - (_floorList[_local5].width / 2)))))) && (((_local2.x + (_arg1.width / 2)) <= (_floorList[_local5].x + (_floorList[_local5].width / 2)))))){
_local3 = true;
break;
};
_local5++;
};
};
if (_local3){
_local3 = !(_arg1.hitTestObject(sky));
};
if (_local3){
if (!(_arg1 is BuildElevator)){
if (hall != null){
_local3 = !(_local4.buildBody.hitTestObject(_hall.hallColArea));
};
if (_local3){
_local5 = 0;
while (_local5 < _boothList.length) {
if (_local4.buildBody.hitTestObject(_boothList[_local5].colArea)){
_local3 = false;
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _elevatorList.length) {
if (_elevatorList[_local5].hitElevatorBody(_local4.buildBody)){
_local3 = false;
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _restroomList.length) {
if (_local4.buildBody.hitTestObject(_restroomList[_local5])){
_local3 = false;
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _atmList.length) {
if (_local4.buildBody.hitTestObject(_atmList[_local5].colArea)){
_local3 = false;
break;
};
_local5++;
};
if (_local3){
_local5 = 0;
while (_local5 < _terraceList.length) {
if (_local4.buildBody.hitTestObject(_terraceList[_local5].colArea)){
_local3 = false;
break;
};
_local5++;
};
};
};
};
};
};
} else {
_local3 = elevatorCollitionCheck(_arg1);
};
};
return (_local3);
}
function escalatorCollitionCheck(_arg1:DisplayObject):Boolean{
var _local10:*;
var _local2:* = _arg1;
var _local3:* = globalToLocal(new Point(_arg1.x, _arg1.y));
var _local4:* = globalToLocal(_local2.localToGlobal(new Point(_local2.lowerPosition.x, _local2.lowerPosition.y)));
var _local5:* = globalToLocal(_local2.localToGlobal(new Point(_local2.upperPosition.x, _local2.upperPosition.y)));
var _local6:* = -1;
var _local7:* = (((_local3.y == 0)) && (!(((_arg1.hitTestObject(leftLimitClip)) || (_arg1.hitTestObject(rightLimitClip))))));
var _local8:* = false;
if (!_local7){
_local10 = 0;
while (_local10 < _floorList.length) {
if ((((((_local4.y == _floorList[_local10].y)) && (((_local3.x - (_local2.width / 2)) >= (_floorList[_local10].x - (_floorList[_local10].width / 2)))))) && (((_local3.x + (_local2.width / 2)) <= (_floorList[_local10].x + (_floorList[_local10].width / 2)))))){
_local7 = true;
_local6 = _local10;
break;
};
_local10++;
};
};
if (_local7){
if (((_local6 + 1) in _floorList)){
if ((((((_local5.y == _floorList[(_local6 + 1)].y)) && (((_local3.x - (_local2.buildBody.width / 2)) >= (_floorList[(_local6 + 1)].x - (_floorList[(_local6 + 1)].width / 2)))))) && (((_local3.x + (_local2.buildBody.width / 2)) <= (_floorList[(_local6 + 1)].x + (_floorList[(_local6 + 1)].width / 2)))))){
_local8 = true;
};
};
} else {
_local10 = 0;
while (_local10 < _basementList.length) {
if ((((((_local4.y == _basementList[_local10].y)) && (((_local3.x - (_local2.width / 2)) >= (((_basementList[_local10].x - (_basementList[_local10].width / 2)) + 108) + 12))))) && (((_local3.x + (_local2.width / 2)) <= (((_basementList[_local10].x + (_basementList[_local10].width / 2)) - 108) - 12))))){
_local7 = true;
_local6 = _local10;
break;
};
_local10++;
};
if (_local7){
if (_local6 == 0){
if (_local5.y == 0){
_local8 = true;
};
} else {
if ((((((_local5.y == _basementList[(_local6 - 1)].y)) && (((_local3.x - (_local2.buildBody.width / 2)) >= (_basementList[(_local6 - 1)].x - (_basementList[(_local6 - 1)].width / 2)))))) && (((_local3.x + (_local2.buildBody.width / 2)) <= (_basementList[(_local6 - 1)].x + (_basementList[(_local6 - 1)].width / 2)))))){
_local8 = true;
};
};
};
};
var _local9:* = ((_local7) && (_local8));
if (_local9){
_local10 = 0;
while (_local10 < _elevatorList.length) {
if (_elevatorList[_local10].hitElevatorBody(_local2.buildBody)){
_local9 = false;
break;
};
_local10++;
};
if (_local9){
_local10 = 0;
while (_local10 < _escalatorList.length) {
if (_local2.buildBody.hitTestObject(_escalatorList[_local10].colBuild)){
_local9 = false;
break;
};
_local10++;
};
};
};
return (_local9);
}
function elevatorCollitionCheck(_arg1:DisplayObject):Boolean{
var _local4:*;
var _local2:* = true;
var _local3:* = _arg1;
if (hall != null){
_local2 = !(((_local3.buildBody1.hitTestObject(hall.hallColArea)) || (_local3.buildBody2.hitTestObject(hall.hallColArea))));
};
if (_local2){
_local4 = 0;
while (_local4 < _boothList.length) {
if (((_local3.buildBody1.hitTestObject(_boothList[_local4].colArea)) || (_local3.buildBody2.hitTestObject(_boothList[_local4].colArea)))){
_local2 = false;
break;
};
_local4++;
};
if (_local2){
_local4 = 0;
while (_local4 < _elevatorList.length) {
if (((_elevatorList[_local4].hitElevatorBody(_local3.buildBody1)) || (_elevatorList[_local4].hitElevatorBody(_local3.buildBody2)))){
_local2 = false;
break;
};
_local4++;
};
if (_local2){
_local4 = 0;
while (_local4 < _restroomList.length) {
if (((_local3.buildBody1.hitTestObject(_restroomList[_local4])) || (_local3.buildBody2.hitTestObject(_restroomList[_local4])))){
_local2 = false;
break;
};
_local4++;
};
if (_local2){
_local4 = 0;
while (_local4 < _atmList.length) {
if (((_local3.buildBody1.hitTestObject(_atmList[_local4].colArea)) || (_local3.buildBody2.hitTestObject(_atmList[_local4].colArea)))){
_local2 = false;
break;
};
_local4++;
};
if (_local2){
_local4 = 0;
while (_local4 < _terraceList.length) {
if (((_local3.buildBody1.hitTestObject(_terraceList[_local4].colArea)) || (_local3.buildBody2.hitTestObject(_terraceList[_local4].colArea)))){
_local2 = false;
break;
};
_local4++;
};
if (_local2){
_local4 = 0;
while (_local4 < _escalatorList.length) {
if (((_local3.buildBody1.hitTestObject(_escalatorList[_local4].colElevator)) || (_local3.buildBody2.hitTestObject(_escalatorList[_local4].colElevator)))){
_local2 = false;
break;
};
_local4++;
};
};
};
};
};
};
};
return (_local2);
}
public function set gameHour(_arg1:int):void{
_gameHour = _arg1;
}
public function set gameMinute(_arg1:int):void{
_gameMinute = _arg1;
}
public function get gameHour():int{
return (_gameHour);
}
public function get gameMinute():int{
return (_gameMinute);
}
public function set gameSpeed(_arg1:int):void{
_gameSpeed = _arg1;
}
public function get gameSpeed():int{
return (_gameSpeed);
}
public function get mostLeft():Number{
return (_mostLeft);
}
public function get mostRight():Number{
return (_mostRight);
}
public function get mostBottom():Number{
return (_mostBottom);
}
public function get bottomPosition():Number{
return (_bottomPosition);
}
public function get gameHeight():Number{
return (_gameHeight);
}
public function set crime(_arg1:Number):void{
_crime = Math.min(_arg1, 100);
}
public function get crime():Number{
return (_crime);
}
public function set yourMallIsSafe(_arg1:Boolean):void{
_yourMallIsSafe = _arg1;
}
public function get yourMallIsSafe():Boolean{
return (_yourMallIsSafe);
}
override public function set x(_arg1:Number):void{
super.x = _arg1;
dispatchEvent(new ShopGameEvent(ShopGameEvent.POSITION_CHANGE));
}
override public function set y(_arg1:Number):void{
super.y = _arg1;
dispatchEvent(new ShopGameEvent(ShopGameEvent.POSITION_CHANGE));
}
public function createBuildSymbol(_arg1:Class):void{
_buildSymbol = new (_arg1);
_buildSymbol.gridX = 12;
_buildSymbol.gridY = 12;
_buildSymbol.world = this;
_buildSymbol.addEventListener(Event.ENTER_FRAME, checkCollitionBuilding);
}
public function destroyBuildSymbol(_arg1:Class):void{
if ((_buildSymbol is _arg1)){
_buildSymbol.parent.removeChild(_buildSymbol);
_buildSymbol = null;
dispatchEvent(new ShopGameEvent(ShopGameEvent.CANCEL_BUILD));
};
}
public function createHireSymbol(_arg1:Class):void{
_hireSymbol = new (_arg1);
_hireSymbol.grid = 12;
_hireSymbol.world = this;
checkEntertainerFrame();
}
function checkEntertainerFrame():void{
if ((_hireSymbol is HireEntertainer)){
if (currentEntertainerFrame == 0){
currentEntertainerFrame = Math.ceil((Math.random() * _hireSymbol.totalFrames));
} else {
currentEntertainerFrame++;
if (currentEntertainerFrame > _hireSymbol.totalFrames){
currentEntertainerFrame = 1;
};
};
_hireSymbol.gotoAndStop(currentEntertainerFrame);
};
}
public function destroyHireSymbol(_arg1:Class):void{
if ((_hireSymbol is _arg1)){
_hireSymbol.parent.removeChild(_hireSymbol);
_hireSymbol = null;
dispatchEvent(new ShopGameEvent(ShopGameEvent.CANCEL_BUILD));
};
}
public function showNotification(_arg1:String):void{
if (_arg1 != lastNotification){
main.addNotification(_arg1);
lastNotification = _arg1;
TweenLite.to(this, 1, {onComplete:resetNotification});
};
}
function resetNotification():void{
lastNotification = "";
}
public function buildProgress():Boolean{
var _local1:* = false;
var _local2:* = BoothList.comparePriceByType(_buildSymbol.buildRelation);
var _local3:* = _main;
if ((_buildSymbol is BuildElevator)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = collitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
_local1 = true;
addElevator(_buildSymbol);
addCash(-(_local2));
_buildFacilityReport = (_buildFacilityReport + _local2);
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_EXPAND_ELEVATOR) < 0){
_local3.setNewTutor(Tutorial.TUTOR_EXPAND_ELEVATOR);
};
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if ((_buildSymbol is BuildRestroom)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = collitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
_local1 = true;
addRestroom(_buildSymbol);
addCash(-(_local2));
_buildFacilityReport = (_buildFacilityReport + _local2);
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if ((_buildSymbol is BuildEscalator)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = escalatorCollitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
_local1 = true;
addEscalator(_buildSymbol);
addCash(-(_local2));
_buildFacilityReport = (_buildFacilityReport + _local2);
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if ((_buildSymbol is BuildHall)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = collitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
_local1 = true;
addHall(_buildSymbol);
addCash(-(_local2));
_buildBoothReport = (_buildBoothReport + _local2);
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if ((_buildSymbol is BuildParkingLot)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = parkingLotCollitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (((((!((_local3.getRunningMission() == null))) && ((_local3.getRunningMission().note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))) && ((parkingList.length <= 0)))){
_local2 = 0;
};
if (_cash >= _local2){
_local1 = true;
addParkingLot(_buildSymbol);
addCash(-(_local2));
_buildFacilityReport = (_buildFacilityReport + _local2);
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_PARKING_LOT) < 0){
_local3.setNewTutor(Tutorial.TUTOR_PARKING_LOT);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if ((_buildSymbol is BuildSubway)){
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = parkingLotCollitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
if (_subwayList.length < 2){
_local1 = true;
addSubway(_buildSymbol);
addCash(-(_local2));
_buildFacilityReport = (_buildFacilityReport + _local2);
} else {
showNotification(Notice.REACH_LIMIT);
};
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
} else {
if (((!((_buildSymbol == null))) && (!((_buildSymbol.parent == null))))){
_buildSymbol.canBuild = collitionCheck(_buildSymbol);
if (_buildSymbol.canBuild){
if (_cash >= _local2){
_local1 = true;
addBooth(_buildSymbol);
addCash(-(_local2));
if ([BuildATM, BuildTerrace].indexOf(Utility.getClass(_buildSymbol)) >= 0){
_buildFacilityReport = (_buildFacilityReport + _local2);
} else {
_buildBoothReport = (_buildBoothReport + _local2);
};
if ((_buildSymbol is BuildATM)){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_ATM) < 0){
_local3.setNewTutor(Tutorial.TUTOR_ATM);
};
};
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
_local1 = false;
showNotification(Notice.CANT_BUILD);
};
};
};
};
};
};
};
};
return (_local1);
}
function hireProgress():Boolean{
var _local1:* = false;
var _local2:* = VisitorList.comparePriceByType(_hireSymbol.buildRelation);
if (_cash >= _local2){
addStaff(_hireSymbol);
addCash(-(_local2));
checkEntertainerFrame();
_hireReport = (_hireReport + _local2);
_local1 = true;
} else {
showNotification(Notice.NOT_ENOUGH_CASH);
};
return (_local1);
}
function addElevator(_arg1:MovieClip):void{
var _local2:* = new FacilityElevator();
_local2.world = this;
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.x = _local3.x;
_local2.y = _local3.y;
_containerBooth.addChild(_local2);
_elevatorList.push(_local2);
_facilityList.push(_local2);
removeEmptyAndPillar(_local2);
createPillar(_local2);
createFloor(_local2);
_local2.addBody();
_local2.addEventListener(BoothEvent.DESTROYED, elevatorOnDestroyed);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function addRestroom(_arg1:MovieClip):void{
var _local4:*;
var _local2:* = new FacilityRestroom();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
if (_local2.y == 0){
_local2.onFloor = null;
} else {
_local4 = 0;
while (_local4 < _floorList.length) {
if (_local2.y == floorList[_local4].y){
_local2.onFloor = floorList[_local4];
break;
};
_local4++;
};
};
_containerBooth.addChild(_local2);
_restroomList.push(_local2);
_facilityList.push(_local2);
removeEmptyAndPillar(_local2);
_local2.addEventListener(BoothEvent.DESTROYED, restroomOnDestroyed);
createPillar(_local2);
createFloor(_local2);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function addEscalator(_arg1:MovieClip):void{
var _local2:* = new FacilityEscalator();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
_local2.scaleX = _arg1.scaleX;
sortAddEscalator(_local2);
_escalatorList.push(_local2);
_facilityList.push(_local2);
_local2.addEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
public function sortAddEscalator(_arg1:MovieClip):void{
var _local5:*;
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < _floorList.length) {
_local5 = _floorList[_local3];
if (_arg1.y == _local5.y){
_local2 = (_local3 + 1);
break;
};
_local3++;
};
var _local4:* = false;
if (_local2 == 0){
_local3 = 0;
while (_local3 < _basementList.length) {
_local5 = _basementList[_local3];
if (_arg1.y == _local5.y){
_local2 = _local3;
_local4 = true;
break;
};
_local3++;
};
};
if (!_local4){
_containerEscalator[_local2].addChild(_arg1);
} else {
_containerBEscalator[_local2].addChild(_arg1);
};
}
function addBooth(_arg1:MovieClip):void{
var _local4:*;
var _local2:* = new _arg1.buildRelation();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
if (_local2.y == 0){
_local2.onFloor = null;
} else {
_local4 = 0;
while (_local4 < _floorList.length) {
if (_local2.y == floorList[_local4].y){
_local2.onFloor = floorList[_local4];
break;
};
_local4++;
};
};
_containerBooth.addChild(_local2);
_local2.boothOpen = (((gameHour >= 9)) && ((gameHour < 22)));
if ((_local2 is FacilityATM)){
_atmList.push(_local2);
_facilityList.push(_local2);
} else {
if ((_local2 is FacilityTerrace)){
_terraceList.push(_local2);
_facilityList.push(_local2);
} else {
_local2.name = compareName(_local2);
_local2.boothName = _local2.name;
_boothList.push(_local2);
};
};
_local2.addEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
removeEmptyAndPillar(_local2);
createPillar(_local2);
createFloor(_local2);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function addHall(_arg1:MovieClip):void{
var _local4:*;
var _local2:* = new Hall();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
if (_local2.y == 0){
_local2.onFloor = null;
} else {
_local4 = 0;
while (_local4 < _floorList.length) {
if (_local2.y == floorList[_local4].y){
_local2.onFloor = floorList[_local4];
break;
};
_local4++;
};
};
_containerBooth.addChild(_local2);
removeEmptyAndPillar(_local2);
hall = _local2;
_local2.addEventListener(BoothEvent.DESTROYED, hallOnDestroyed);
createPillar(_local2);
createFloor(_local2);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function addParkingLot(_arg1:MovieClip):void{
var _local2:* = new FacilityParkingLot();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
var _local4:* = 0;
while (_local4 < _basementList.length) {
if (_local2.y == basementList[_local4].y){
_local2.onFloor = basementList[_local4];
break;
};
_local4++;
};
_containerBooth.addChild(_local2);
_parkingList.push(_local2);
_facilityList.push(_local2);
_local2.addEventListener(BoothEvent.DESTROYED, parkingLotOnDestroyed);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function addSubway(_arg1:MovieClip):void{
var _local2:* = new FacilitySubway();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
var _local4:* = 0;
while (_local4 < _basementList.length) {
if (_local2.y == basementList[_local4].y){
_local2.onFloor = basementList[_local4];
break;
};
_local4++;
};
_containerBooth.addChild(_local2);
_subwayList.push(_local2);
_facilityList.push(_local2);
_local2.addEventListener(BoothEvent.DESTROYED, subwayOnDestroyed);
_local2.dispatchEvent(new BoothEvent(BoothEvent.CREATED));
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_CREATED));
}
function compareName(_arg1:MovieClip):String{
var _local5:*;
var _local2:* = BoothList.compareNameByType(Utility.getClass(_arg1));
var _local3:* = 1;
var _local4:* = 0;
while (_local4 < _boothList.length) {
_local5 = _boothList[_local4];
if (_local5.name == ((_local2 + "") + _local3)){
_local3++;
};
_local4++;
};
_local2 = ((_local2 + "") + _local3);
return (_local2);
}
function boothOnDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _boothList.indexOf(_local2);
if (_local3 >= 0){
_boothList.splice(_local3, 1);
};
var _local4:* = _atmList.indexOf(_local2);
if (_local4 >= 0){
_atmList.splice(_local4, 1);
};
var _local5:* = _terraceList.indexOf(_local2);
if (_local5 >= 0){
_terraceList.splice(_local5, 1);
};
var _local6:* = _facilityList.indexOf(_local2);
if (_local6 >= 0){
_facilityList.splice(_local6, 1);
};
var _local7:* = (_local2.x - (_local2.colArea.width / 2));
var _local8:* = (_local2.x + (_local2.colArea.width / 2));
createEmptySpace(_local7, _local8, _local2.y);
_local2.removeEventListener(BoothEvent.DESTROYED, boothOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function restroomOnDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _restroomList.indexOf(_local2);
if (_local3 >= 0){
_restroomList.splice(_local3, 1);
};
var _local4:* = _facilityList.indexOf(_local2);
if (_local4 >= 0){
_facilityList.splice(_local4, 1);
};
var _local5:* = (_local2.x - (_local2.restroomBody.width / 2));
var _local6:* = (_local2.x + (_local2.restroomBody.width / 2));
createEmptySpace(_local5, _local6, _local2.y);
_local2.removeEventListener(BoothEvent.DESTROYED, restroomOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function hallOnDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
hall = null;
var _local3:* = (_local2.x - (_local2.hallColArea.width / 2));
var _local4:* = (_local2.x + (_local2.hallColArea.width / 2));
createEmptySpace(_local3, _local4, _local2.y);
_local2.removeEventListener(BoothEvent.DESTROYED, hallOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function escalatorOnDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _escalatorList.indexOf(_local2);
if (_local3 >= 0){
_escalatorList.splice(_local3, 1);
};
var _local4:* = _facilityList.indexOf(_local2);
if (_local4 >= 0){
_facilityList.splice(_local4, 1);
};
_local2.removeEventListener(BoothEvent.DESTROYED, escalatorOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function elevatorOnDestroyed(_arg1:BoothEvent):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local2:* = _arg1.target;
var _local3:* = _elevatorList.indexOf(_local2);
if (_local3 >= 0){
_elevatorList.splice(_local3, 1);
};
var _local4:* = _facilityList.indexOf(_local2);
if (_local4 >= 0){
_facilityList.splice(_local4, 1);
};
var _local5:* = 0;
while (_local5 < _local2.roomList.length) {
_local6 = _local2.roomList[_local5];
_local7 = globalToLocal(_local6.parent.localToGlobal(new Point(_local6.x, _local6.y)));
_local8 = (_local7.x - (_local2.width / 2));
_local9 = (_local7.x + (_local2.width / 2));
createEmptySpace(_local8, _local9, _local7.y);
_local5++;
};
_local2.removeEventListener(BoothEvent.DESTROYED, elevatorOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function parkingLotOnDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _parkingList.indexOf(_local2);
if (_local3 >= 0){
_parkingList.splice(_local3, 1);
};
var _local4:* = _parkingList.indexOf(_local2);
if (_local4 >= 0){
_facilityList.splice(_local4, 1);
};
_local2.removeEventListener(BoothEvent.DESTROYED, parkingLotOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function subwayOnDestroyed(_arg1:Event):void{
var _local2:* = _arg1.target;
var _local3:* = _subwayList.indexOf(_local2);
if (_local3 >= 0){
_subwayList.splice(_local3, 1);
};
var _local4:* = _facilityList.indexOf(_local2);
if (_local4 >= 0){
_facilityList.splice(_local4, 1);
};
_local2.removeEventListener(BoothEvent.DESTROYED, subwayOnDestroyed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BOOTH_DESTROYED));
}
function addStaff(_arg1:MovieClip):void{
var _local4:*;
var _local2:* = new _arg1.buildRelation();
var _local3:* = globalToLocal(_arg1.parent.localToGlobal(new Point(_arg1.x, _arg1.y)));
_local2.world = this;
_local2.x = _local3.x;
_local2.y = _local3.y;
_local2.dirrection = ((_arg1.scaleX == 1)) ? HumanObject.RIGHT : HumanObject.LEFT;
if (_local2.y == 0){
_local2.onFloor = null;
} else {
_local4 = 0;
while (_local4 < _floorList.length) {
if (_local2.y == floorList[_local4].y){
_local2.onFloor = floorList[_local4];
break;
};
_local4++;
};
};
if ((_local2 is CrewJanitor)){
_janitorList.push(_local2);
} else {
if ((_local2 is CrewElectrician)){
_electricianList.push(_local2);
} else {
if ((_local2 is CrewSecurity)){
_securityList.push(_local2);
} else {
if ((_local2 is CrewEntertainer)){
_entertainerList.push(_local2);
_local2.model = _arg1.currentFrame;
};
};
};
};
_containerVisitor[(_floorList.indexOf(_local2.onFloor) + 1)].addChild(_local2);
_local2.dispatchEvent(new ShopGameEvent(ShopGameEvent.HIRE_STAFF));
}
public function removeEmptyAndPillar(_arg1:MovieClip):void{
var _local4:*;
var _local5:*;
var _local2:* = new Array();
var _local3:* = 0;
while (_local3 < _emptyList.length) {
if (_emptyList[_local3].y == _arg1.y){
if ((((_emptyList[_local3].x >= (_arg1.x - (_arg1.width / 2)))) && ((_emptyList[_local3].x <= (_arg1.x + (_arg1.width / 2)))))){
_local2.push(_emptyList[_local3]);
};
};
_local3++;
};
_local3 = 0;
while (_local3 < _pillarList.length) {
if (_pillarList[_local3].y == _arg1.y){
if ((((_pillarList[_local3].x >= (_arg1.x - (_arg1.width / 2)))) && ((_pillarList[_local3].x <= (_arg1.x + (_arg1.width / 2)))))){
_local2.push(_pillarList[_local3]);
};
};
_local3++;
};
while (_local2.length > 0) {
_local4 = _local2.pop();
_local5 = _emptyList.indexOf(_local4);
if (_local5 >= 0){
_emptyList.splice(_local5, 1);
};
_local5 = _pillarList.indexOf(_local4);
if (_local5 >= 0){
_pillarList.splice(_local5, 1);
};
if (_local4.parent != null){
_local4.parent.removeChild(_local4);
};
};
}
public function createPillar(_arg1:MovieClip):void{
addPillar(((_arg1.x - (_arg1.width / 2)) - 6), _arg1.y);
addPillar(((_arg1.x + (_arg1.width / 2)) + 6), _arg1.y);
}
public function addPillar(_arg1:Number, _arg2:Number):void{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local3:* = false;
var _local4:* = 0;
while (_local4 < _pillarList.length) {
if ((((_arg1 == _pillarList[_local4].x)) && ((_arg2 == _pillarList[_local4].y)))){
_local3 = true;
break;
};
_local4++;
};
if (!_local3){
_local5 = new Pillar();
_local5.x = _arg1;
_local5.y = _arg2;
_local6 = [];
_local4 = 0;
while (_local4 < _emptyList.length) {
if ((((_local5.x == _emptyList.x)) && ((_local5.y == _emptyList.y)))){
_local6.push(_emptyList[_local4]);
};
_local4++;
};
while (_local6.length > 0) {
_local7 = _local6.shift();
_local8 = _emptyList.indexOf(_local7);
if ((_local8 in _emptyList)){
_emptyList.splice(_local8, 1);
_local7.parent.removeChild(_local7);
};
};
_containerPillar.addChild(_local5);
_pillarList.push(_local5);
};
}
public function createFloor(_arg1:MovieClip):void{
addFloor(_arg1.x, ((_arg1.y - (Math.round((_arg1.height / 12)) * 12)) - 12), (Math.round(((_arg1.width + 24) / 12)) * 12));
}
public function addFloor(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local4:* = false;
var _local5:* = null;
var _local6:* = 0;
while (_local6 < _floorList.length) {
if (_arg2 == _floorList[_local6].y){
_local5 = _floorList[_local6];
_local4 = true;
break;
};
_local6++;
};
if (!_local4){
_local7 = new Floor();
_local7.x = _arg1;
_local7.y = _arg2;
_local7.middleFloor.width = (_arg3 - (16 * 2));
_local7.leftFloor.x = ((-(_local7.middleFloor.width) / 2) - 16);
_local7.rightFloor.x = ((_local7.middleFloor.width / 2) + 16);
_containerFloor.addChild(_local7);
_floorList.push(_local7);
sortFloor(_floorList);
_local8 = getChildIndex(_containerEscalator[(_containerEscalator.length - 1)]);
_containerVisitor.push(new MovieClip());
addChildAt(_containerVisitor[(_containerVisitor.length - 1)], _local8);
_containerTrash.push(new MovieClip());
addChildAt(_containerTrash[(_containerTrash.length - 1)], _local8);
_containerEscalator.push(new MovieClip());
addChildAt(_containerEscalator[(_containerEscalator.length - 1)], _local8);
} else {
_local9 = Math.min((_local5.x - (_local5.width / 2)), (_arg1 - (_arg3 / 2)));
_local10 = Math.max((_local5.x + (_local5.width / 2)), (_arg1 + (_arg3 / 2)));
_local5.middleFloor.width = (Math.abs((_local10 - _local9)) - (16 * 2));
_local5.leftFloor.x = ((-(_local5.middleFloor.width) / 2) - 16);
_local5.rightFloor.x = ((_local5.middleFloor.width / 2) + 16);
_local5.x = (_local9 + (_local5.width / 2));
createEmptySpace(_local9, _local10, (_arg2 + 84));
};
}
public function countFloor():void{
var _local3:*;
while (_containerVisitor.length > 0) {
_local3 = _containerVisitor.pop();
_local3.parent.removeChild(_local3);
};
while (_containerTrash.length > 0) {
_local3 = _containerTrash.pop();
_local3.parent.removeChild(_local3);
};
while (_containerEscalator.length > 0) {
_local3 = _containerEscalator.pop();
_local3.parent.removeChild(_local3);
};
var _local1:* = (getChildIndex(_containerFloor) + 1);
var _local2:* = 0;
while (_local2 < _floorList.length) {
_containerVisitor.push(new MovieClip());
addChildAt(_containerVisitor[_local2], _local1);
_containerTrash.push(new MovieClip());
addChildAt(_containerTrash[_local2], _local1);
_containerEscalator.push(new MovieClip());
addChildAt(_containerEscalator[_local2], _local1);
_local2++;
};
}
public function createEmptySpace(_arg1:Number, _arg2:Number, _arg3:Number):void{
var _local4:* = (_arg1 + 6);
while (_local4 < _arg2) {
addEmptySpace(_local4, _arg3);
_local4 = (_local4 + 12);
};
}
function sortFloor(_arg1:Array):void{
var _local3:*;
var _local4:*;
var _local2:* = 0;
while (_local2 < (_arg1.length - 1)) {
_local3 = (_local2 + 1);
while (_local3 < _arg1.length) {
if (_arg1[_local2].y < _arg1[_local3].y){
_local4 = _arg1[_local2];
_arg1[_local2] = _arg1[_local3];
_arg1[_local3] = _local4;
};
_local3++;
};
_local2++;
};
}
function addEmptySpace(_arg1:Number, _arg2:Number):void{
var _local7:*;
var _local3:* = false;
var _local4:* = localToGlobal(new Point(_arg1, (_arg2 - 1)));
var _local5:Array = new Array();
_local5 = _boothList.concat(_atmList);
_local5 = _local5.concat(_restroomList);
_local5 = _local5.concat(_terraceList);
var _local6:* = 0;
while (_local6 < _local5.length) {
if (_local5[_local6].hitTestPoint(_local4.x, _local4.y, true)){
_local3 = true;
break;
};
_local6++;
};
if (!_local3){
_local6 = 0;
while (_local6 < _elevatorList.length) {
if (_elevatorList[_local6].hitTestPoint(_local4.x, _local4.y, true)){
_local3 = true;
break;
};
_local6++;
};
};
if (!_local3){
_local6 = 0;
while (_local6 < _pillarList.length) {
if (_pillarList[_local6].hitTestPoint(_local4.x, _local4.y, true)){
_local3 = true;
break;
};
_local6++;
};
if (!_local3){
_local6 = 0;
while (_local6 < _emptyList.length) {
if (_emptyList[_local6].hitTestPoint(_local4.x, _local4.y, true)){
_local3 = true;
break;
};
_local6++;
};
};
};
if (!_local3){
_local7 = new EmptySpace();
_local7.x = _arg1;
_local7.y = _arg2;
_containerEmpty.addChild(_local7);
_emptyList.push(_local7);
};
}
function checkTransformVillain(_arg1:VisitorEvent):void{
this.humanFocus = _arg1.related;
}
public function addConversation(_arg1, _arg2, _arg3:String="Greet", _arg4=null):void{
var _local5:* = new Conversation(_arg1, _arg2);
_local5.world = this;
if (_arg4 != null){
_local5.inTerrace = _arg4;
};
var _local6:* = _arg1;
var _local7:* = ConversationList.getConversationType(_arg3);
var _local8:* = _local7[Math.floor((Math.random() * _local7.length))];
_local5.addText(_local8.comment, _local6, _local8.tipsCode);
while (_local8.nextComment != null) {
if (!_local8.sameSpeaker){
_local6 = ((_local6)==_arg1) ? _arg2 : _arg1;
};
_local8 = ConversationList.getRandomConversation(_local6, _local8.nextComment);
_local5.addText(_local8.comment, _local6, _local8.tipsCode);
};
_local5.run();
}
public function set buildSymbol(_arg1:MovieClip):void{
_buildSymbol = _arg1;
}
public function get buildSymbol():MovieClip{
return (_buildSymbol);
}
public function set hireSymbol(_arg1:MovieClip):void{
_hireSymbol = _arg1;
}
public function get hireSymbol():MovieClip{
return (_hireSymbol);
}
public function get boothList():Array{
return (_boothList);
}
public function get elevatorList():Array{
return (_elevatorList);
}
public function get restroomList():Array{
return (_restroomList);
}
public function get atmList():Array{
return (_atmList);
}
public function get parkingList():Array{
return (_parkingList);
}
public function get subwayList():Array{
return (_subwayList);
}
public function get terraceList():Array{
return (_terraceList);
}
public function get visitorList():Array{
return (_visitorList);
}
public function get visitorSpecialList():Array{
return (_visitorSpecialList);
}
public function set specialVisitorAlreadyVisit(_arg1:Array):void{
_specialVisitorAlreadyVisit = _arg1;
}
public function get specialVisitorAlreadyVisit():Array{
return (_specialVisitorAlreadyVisit);
}
public function get visitorVillainList():Array{
return (_visitorVillainList);
}
public function get banditList():Array{
return (_banditList);
}
public function get pillarList():Array{
return (_pillarList);
}
public function get floorList():Array{
return (_floorList);
}
public function get basementList():Array{
return (_basementList);
}
public function get emptyList():Array{
return (_emptyList);
}
public function get escalatorList():Array{
return (_escalatorList);
}
public function set main(_arg1:MovieClip):void{
_main = _arg1;
}
public function get main():MovieClip{
return (_main);
}
public function get containerCar():MovieClip{
return (_containerCar);
}
public function get containerSlope():MovieClip{
return (_containerSlope);
}
public function get containerCarSlope():MovieClip{
return (_containerCarSlope);
}
public function get containerVisitor():Array{
return (_containerVisitor);
}
public function get containerBVisitor():Array{
return (_containerBVisitor);
}
public function get containerEscalator():Array{
return (_containerEscalator);
}
public function get containerBEscalator():Array{
return (_containerBEscalator);
}
public function get containerTrash():Array{
return (_containerTrash);
}
public function get containerBooth():MovieClip{
return (_containerBooth);
}
public function get containerEmpty():MovieClip{
return (_containerEmpty);
}
public function get containerPillar():MovieClip{
return (_containerPillar);
}
public function get containerFloor():MovieClip{
return (_containerFloor);
}
public function get containerBasement():MovieClip{
return (_containerBasement);
}
public function get containerLegend():MovieClip{
return (_containerLegend);
}
public function get containerConversation():MovieClip{
return (_containerConversation);
}
public function get containerBonus():MovieClip{
return (_containerBonus);
}
public function set alarmTrigger(_arg1:Boolean):void{
_alarmTrigger = _arg1;
}
public function get alarmTrigger():Boolean{
return (_alarmTrigger);
}
public function get janitorList():Array{
return (_janitorList);
}
public function get electricianList():Array{
return (_electricianList);
}
public function get securityList():Array{
return (_securityList);
}
public function get entertainerList():Array{
return (_entertainerList);
}
public function get facilityList():Array{
return (_facilityList);
}
public function set trashList(_arg1:Array):void{
_trashList = _arg1;
}
public function get trashList():Array{
return (_trashList);
}
public function set carList(_arg1:Array):void{
_carList = _arg1;
}
public function get carList():Array{
return (_carList);
}
public function set humanFocus(_arg1:MovieClip):void{
if (_humanFocus != null){
_humanFocus.removeEventListener(VisitorEvent.TRANSFORM_TO_NORMAL, checkTransformVillain);
};
_humanFocus = _arg1;
if (_humanFocus != null){
_humanFocus.addEventListener(VisitorEvent.TRANSFORM_TO_NORMAL, checkTransformVillain);
};
}
public function get humanFocus():MovieClip{
return (_humanFocus);
}
public function set canScroll(_arg1:Boolean):void{
_canScroll = _arg1;
}
public function get canScroll():Boolean{
return (_canScroll);
}
public function addDialogBox(_arg1:MovieClip):void{
if ((_arg1 is LegendDialogTextBox)){
_containerConversation.addChild(_arg1);
} else {
_containerLegend.addChild(_arg1);
};
}
public function set cash(_arg1:Number):void{
_cash = _arg1;
dispatchEvent(new ShopGameEvent(ShopGameEvent.CASH_UPDATE));
}
public function get cash():Number{
return (_cash);
}
public function set cashSpent(_arg1:Number):void{
_cashSpent = _arg1;
}
public function get cashSpent():Number{
return (_cashSpent);
}
public function addCash(_arg1:Number, _arg2:Point=null, _arg3=true):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
if (_arg1 != 0){
if (_arg2 != null){
_local4 = new CashSymbol();
if (_arg1 > 0){
_local4.cashText.textColor = 65074;
} else {
_local4.cashText.textColor = 0xFF0000;
};
_local4.cashText.autoSize = TextFieldAutoSize.CENTER;
_local4.cashText.text = ("$" + Utility.numberToMoney(_arg1));
_local4.x = _arg2.x;
_local4.y = _arg2.y;
_containerLegend.addChild(_local4);
TweenLite.to(_local4, 1, {y:(_arg2.y - 50), onComplete:fadeClip, onCompleteParams:[_local4, 0.5, 0.5], ease:Strong.easeOut});
this.cash = (this.cash + _arg1);
if ((((_arg1 < 0)) && (_arg3))){
this.cashSpent = (this.cashSpent + Math.abs(_arg1));
};
if (theRoot != null){
_local5 = localToGlobal(_arg2);
_local6 = (_local5.x - theRoot.centerPoint.x);
_local7 = (_local5.y - theRoot.centerPoint.y);
_local8 = Math.sqrt(((_local6 * _local6) + (_local7 * _local7)));
_local9 = 1;
if (_local8 > 300){
_local9 = (100 / (_local8 - 200));
if (_local9 < 0.2){
_local9 = 0;
};
};
theRoot.playSound(SFXCashUpdate, _local9);
};
} else {
_main.addCash(_arg1);
};
};
}
public function addBonus(_arg1:Number, _arg2:Point):void{
var _local7:*;
var _local3:* = (Math.floor((_arg1 / 100)) * 100);
var _local4:* = (_arg1 % 100);
var _local5:* = Math.round((_local4 / 10));
var _local6:* = 0;
while (_local6 < _local5) {
_local7 = new BanditDropCoin();
_local7.world = this;
_local7.x = _arg2.x;
_local7.y = _arg2.y;
_local7.bonusValue = 10;
_containerBonus.addChild(_local7);
_local6++;
};
if (_local3 > 0){
_local7 = new BanditDropBundle();
_local7.world = this;
_local7.x = _arg2.x;
_local7.y = _arg2.y;
_local7.bonusValue = _local3;
_containerBonus.addChild(_local7);
};
}
function fadeClip(_arg1:MovieClip, _arg2:Number=1, _arg3:Number=0.5){
TweenLite.to(_arg1, _arg3, {alpha:0, delay:_arg2, onComplete:_arg1.parent.removeChild, onCompleteParams:[_arg1]});
}
public function set hall(_arg1:MovieClip):void{
_hall = _arg1;
dispatchEvent(new ShopGameEvent(ShopGameEvent.HALL_ON_UPDATE));
}
public function get hall():MovieClip{
return (_hall);
}
public function set popularity(_arg1:Number):void{
var _local2:* = _popularity;
_popularity = Math.min(Math.max(_arg1, 0), 100);
dispatchEvent(new ShopGameEvent(ShopGameEvent.POPULARITY_UPDATE));
}
public function get popularity():Number{
return (_popularity);
}
public function set nextDayPopularity(_arg1:Number):void{
_nextDayPopularity = _arg1;
}
public function get nextDayPopularity():Number{
return (_nextDayPopularity);
}
public function get maxVisitor():int{
return (_maxVisitor);
}
public function countAverageMood():Number{
var _local1:* = _visitorList.concat(_visitorVillainList);
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < _local1.length) {
_local2 = (_local2 + _local1[_local3].mood);
_local3++;
};
if (_local1.length > 0){
return ((_local2 / _local1.length));
};
return (100);
}
public function countSecurityEffectivity():Number{
var _local3:*;
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < _securityList.length) {
_local3 = _securityList[_local2];
_local1 = (_local1 + _local3.employeeLevel);
_local2++;
};
return (Math.min((_local1 / _maxVisitor), 1));
}
public function countJanitorEffectivity():Number{
var _local3:*;
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < _janitorList.length) {
_local3 = _janitorList[_local2];
_local1 = (_local1 + _local3.employeeLevel);
_local2++;
};
return (Math.min((_local1 / _maxVisitor), 1));
}
public function countElectricianEffectivity():Number{
var _local3:*;
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < _electricianList.length) {
_local3 = _electricianList[_local2];
_local1 = (_local1 + _local3.employeeLevel);
_local2++;
};
return (Math.min((_local1 / _maxVisitor), 1));
}
public function countEntertainerEffectivity():Number{
var _local3:*;
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < _entertainerList.length) {
_local3 = _entertainerList[_local2];
_local1 = (_local1 + _local3.employeeLevel);
_local2++;
};
return (Math.min((_local1 / _maxVisitor), 1));
}
public function set extraUpgradeList(_arg1:Array):void{
_extraUpgradeList = _arg1;
}
public function get extraUpgradeList():Array{
return (_extraUpgradeList);
}
public function set upgradePurchaseList(_arg1:Array):void{
_upgradePurchaseList = _arg1;
}
public function get upgradePurchaseList():Array{
return (_upgradePurchaseList);
}
public function setMovingMode(_arg1:MovieClip):void{
createHireSymbol(UI_MoveStaff);
_hireSymbol.alpha = 1;
main.addBuildSymbol(_hireSymbol);
_hireSymbol.addEventListener(Event.REMOVED_FROM_STAGE, canceledMoving);
movingStaff = _arg1;
justSelect = true;
stage.addEventListener(MouseEvent.CLICK, moveStaff);
stage.addEventListener(KeyboardEvent.KEY_UP, cancelMoveStaff);
}
function moveStaff(_arg1:MouseEvent):void{
if (!justSelect){
if (movingStaff != null){
if (!main.mouseHitInterface()){
movingStaff.targetPoint = globalToLocal(new Point(_hireSymbol.x, _hireSymbol.y));
};
_hireSymbol.parent.removeChild(_hireSymbol);
_hireSymbol = null;
stage.removeEventListener(MouseEvent.CLICK, moveStaff);
stage.removeEventListener(KeyboardEvent.KEY_UP, cancelMoveStaff);
};
} else {
justSelect = false;
};
}
function cancelMoveStaff(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
_hireSymbol.parent.removeChild(_hireSymbol);
_hireSymbol = null;
stage.removeEventListener(MouseEvent.CLICK, moveStaff);
stage.removeEventListener(KeyboardEvent.KEY_UP, cancelMoveStaff);
};
}
function canceledMoving(_arg1:Event):void{
movingStaff = null;
}
public function checkUpgradeIndex(_arg1:int):Boolean{
var _local2:* = (_upgradePurchaseList.indexOf(UpgradeList.UPGRADE_AVAILABLE[_arg1]) >= 0);
return (_local2);
}
public function checkUpgradeByName(_arg1:String):Boolean{
var _local2:* = false;
var _local3:* = 0;
while (_local3 < _upgradePurchaseList.length) {
if (_upgradePurchaseList[_local3].header == _arg1){
_local2 = true;
break;
};
_local3++;
};
return (_local2);
}
public function getUpgradeByName(_arg1:String):Object{
var _local2:* = null;
var _local3:* = 0;
while (_local3 < _extraUpgradeList.length) {
if (_extraUpgradeList[_local3].header == _arg1){
_local2 = _extraUpgradeList[_local3];
break;
};
_local3++;
};
return (_local2);
}
public function resetDay():void{
var _local3:*;
_profit = 0;
_lastBoothReport = [];
var _local1:* = 0;
while (_local1 < _boothList.length) {
_local3 = _boothList[_local1];
_lastBoothReport.push({boothName:_local3.boothName, visit:_local3.visitorVisit, revenue:_local3.revenue});
_profit = (_profit + _local3.revenue);
_local3.visitorVisit = 0;
_local3.revenue = 0;
_local1++;
};
_lastStaffReport = [];
var _local2:* = 0;
_local1 = 0;
while (_local1 < _janitorList.length) {
_local2 = (_local2 + _janitorList[_local1].paid);
_janitorList[_local1].paid = 0;
_local1++;
};
_lastStaffReport.push({staffType:"Janitor", single:"", multi:"s", staffNumber:_janitorList.length, staffPaid:_local2});
_profit = (_profit - _local2);
_local2 = 0;
_local1 = 0;
while (_local1 < _electricianList.length) {
_local2 = (_local2 + _electricianList[_local1].paid);
_electricianList[_local1].paid = 0;
_local1++;
};
_lastStaffReport.push({staffType:"Electrician", single:"", multi:"s", staffNumber:_electricianList.length, staffPaid:_local2});
_profit = (_profit - _local2);
_local2 = 0;
_local1 = 0;
while (_local1 < _securityList.length) {
_local2 = (_local2 + _securityList[_local1].paid);
_securityList[_local1].paid = 0;
_local1++;
};
_lastStaffReport.push({staffType:"Securit", single:"y", multi:"ies", staffNumber:_securityList.length, staffPaid:_local2});
_profit = (_profit - _local2);
_local2 = 0;
_local1 = 0;
while (_local1 < _entertainerList.length) {
_local2 = (_local2 + _entertainerList[_local1].paid);
_entertainerList[_local1].paid = 0;
_local1++;
};
_lastStaffReport.push({staffType:"Entertainer", single:"", multi:"s", staffNumber:_electricianList.length, staffPaid:_local2});
_profit = (_profit - _local2);
_lastBuildBoothReport = _buildBoothReport;
_profit = (_profit - _lastBuildBoothReport);
_lastBuildFacilityReport = _buildFacilityReport;
_profit = (_profit - _lastBuildFacilityReport);
_lastUpgradeReport = _upgradeReport;
_profit = (_profit - _lastUpgradeReport);
_lastHireReport = _hireReport;
_profit = (_profit - _lastHireReport);
_lastExtraReport = _extraReport;
_profit = (_profit - _lastExtraReport);
_lastTransferInReport = _transferInReport;
_profit = (_profit + _lastTransferInReport);
_lastTransferOutReport = _transferOutReport;
_profit = (_profit - _lastTransferOutReport);
_lastMiscInReport = _miscInReport;
_profit = (_profit + _lastMiscInReport);
_lastMiscOutReport = _miscOutReport;
_profit = (_profit - _lastMiscOutReport);
_buildBoothReport = 0;
_buildFacilityReport = 0;
_upgradeReport = 0;
_hireReport = 0;
_extraReport = 0;
_transferInReport = 0;
_transferOutReport = 0;
_miscInReport = 0;
_miscOutReport = 0;
if (hall != null){
_lastHallVisitorVisit = hall.visitorVisit;
_lastHallRevenue = hall.revenue;
_profit = (_profit + _lastHallRevenue);
_lastHallEventCost = hall.addEventCost;
_profit = (_profit - _lastHallEventCost);
hall.visitorVisit = 0;
hall.revenue = 0;
hall.addEventCost = 0;
_lastHallIsExist = true;
} else {
_lastHallIsExist = false;
};
specialVisitorVisitToday = [];
if (theRoot != null){
theRoot.dayPass++;
if (theRoot.transferCountdown > 0){
theRoot.transferCountdown--;
};
};
_lostVisitor = 0;
dispatchEvent(new ShopGameEvent(ShopGameEvent.CHANGE_DAY));
}
public function set lastBoothReport(_arg1:Array):void{
_lastBoothReport = _arg1;
}
public function get lastBoothReport():Array{
return (_lastBoothReport);
}
public function set lastStaffReport(_arg1:Array):void{
_lastStaffReport = _arg1;
}
public function get lastStaffReport():Array{
return (_lastStaffReport);
}
public function set buildBoothReport(_arg1:Number):void{
_buildBoothReport = _arg1;
}
public function get buildBoothReport():Number{
return (_buildBoothReport);
}
public function set lastBuildBoothReport(_arg1:Number):void{
_lastBuildBoothReport = _arg1;
}
public function get lastBuildBoothReport():Number{
return (_lastBuildBoothReport);
}
public function set buildFacilityReport(_arg1:Number):void{
_buildFacilityReport = _arg1;
}
public function get buildFacilityReport():Number{
return (_buildFacilityReport);
}
public function set lastBuildFacilityReport(_arg1:Number):void{
_lastBuildFacilityReport = _arg1;
}
public function get lastBuildFacilityReport():Number{
return (_lastBuildFacilityReport);
}
public function set upgradeReport(_arg1:Number):void{
_upgradeReport = _arg1;
}
public function get upgradeReport():Number{
return (_upgradeReport);
}
public function set lastUpgradeReport(_arg1:Number):void{
_lastUpgradeReport = _arg1;
}
public function get lastUpgradeReport():Number{
return (_lastUpgradeReport);
}
public function set hireReport(_arg1:Number):void{
_hireReport = _arg1;
}
public function get hireReport():Number{
return (_hireReport);
}
public function set lastHireReport(_arg1:Number):void{
_lastHireReport = _arg1;
}
public function get lastHireReport():Number{
return (_lastHireReport);
}
public function set miscInReport(_arg1:Number):void{
_miscInReport = _arg1;
}
public function get miscInReport():Number{
return (_miscInReport);
}
public function set lastMiscInReport(_arg1:Number):void{
_lastMiscInReport = _arg1;
}
public function get lastMiscInReport():Number{
return (_lastMiscInReport);
}
public function set miscOutReport(_arg1:Number):void{
_miscOutReport = _arg1;
}
public function get miscOutReport():Number{
return (_miscOutReport);
}
public function set lastMiscOutReport(_arg1:Number):void{
_lastMiscOutReport = _arg1;
}
public function get lastMiscOutReport():Number{
return (_lastMiscOutReport);
}
public function set transferInReport(_arg1:Number):void{
_transferInReport = _arg1;
}
public function get transferInReport():Number{
return (_transferInReport);
}
public function set lastTransferInReport(_arg1:Number):void{
_lastTransferInReport = _arg1;
}
public function get lastTransferInReport():Number{
return (_lastTransferInReport);
}
public function set transferOutReport(_arg1:Number):void{
_transferOutReport = _arg1;
}
public function get transferOutReport():Number{
return (_transferOutReport);
}
public function set lastTransferOutReport(_arg1:Number):void{
_lastTransferOutReport = _arg1;
}
public function get lastTransferOutReport():Number{
return (_lastTransferOutReport);
}
public function set extraReport(_arg1:Number):void{
_extraReport = _arg1;
}
public function get extraReport():Number{
return (_extraReport);
}
public function set lastExtraReport(_arg1:Number):void{
_lastExtraReport = _arg1;
}
public function get lastExtraReport():Number{
return (_lastExtraReport);
}
public function set lastHallIsExist(_arg1:Boolean):void{
_lastHallIsExist = _arg1;
}
public function get lastHallIsExist():Boolean{
return (_lastHallIsExist);
}
public function set lastHallVisitorVisit(_arg1:Number):void{
_lastHallVisitorVisit = _arg1;
}
public function get lastHallVisitorVisit():Number{
return (_lastHallVisitorVisit);
}
public function set lastHallRevenue(_arg1:Number):void{
_lastHallRevenue = _arg1;
}
public function get lastHallRevenue():Number{
return (_lastHallRevenue);
}
public function set lastHallEventCost(_arg1:Number):void{
_lastHallEventCost = _arg1;
}
public function get lastHallEventCost():Number{
return (_lastHallEventCost);
}
public function set boothPopularity(_arg1:Number):void{
_boothPopularity = _arg1;
correctPopularity();
}
public function get boothPopularity():Number{
return (_boothPopularity);
}
public function set visitorPopularity(_arg1:Number):void{
_visitorPopularity = Math.max(-250, Math.min(100, _arg1));
correctPopularity();
}
public function get visitorPopularity():Number{
return (_visitorPopularity);
}
public function set boothCompletionPopularity(_arg1:Number):void{
_boothCompletionPopularity = _arg1;
correctPopularity();
}
public function get boothCompletionPopularity():Number{
return (_boothCompletionPopularity);
}
public function get basementBG():Array{
return (_basementBG);
}
public function getConversationNumberOnScreen():uint{
var _local5:*;
var _local1:* = 0;
var _local2:* = _main;
var _local3:* = _local2.screenArea;
var _local4:* = 0;
while (_local4 < _containerConversation.numChildren) {
_local5 = _containerConversation.getChildAt(_local4);
if (_local5.hitTestObject(_local3)){
_local1++;
};
_local4++;
};
return (_local1);
}
function correctPopularity():void{
popularity = (((Math.min(_boothPopularity, 100) * 0.3) + (_boothCompletionPopularity * 0.4)) + (_visitorPopularity * 0.3));
}
public function set firstVisit(_arg1:Boolean):void{
_firstVisit = _arg1;
}
public function get firstVisit():Boolean{
return (_firstVisit);
}
public function setBanditCapturedMission(_arg1:Boolean=false):void{
var _local2:* = _main;
_local2.setCountMission(_banditCaptured);
if (_arg1){
addEventListener(ShopGameEvent.UPDATE, checkArrestedOneNight);
};
addEventListener(VisitorEvent.BEGIN_ARRESTED, checkArrestedMission);
}
public function setVillainCapturedMission():void{
var _local1:* = _main;
_local1.setCountMission(_villainCaptured);
addEventListener(VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL, checkArrestedMission);
}
public function setComboMission():void{
var _local1:* = _main;
_local1.setCountMission(_missionVar);
_local1.addEventListener(ShopGameEvent.COMBO_FOUND, checkComboMission);
}
function checkArrestedMission(_arg1:VisitorEvent):void{
var _local2:* = _main;
if (_arg1.type == VisitorEvent.BEGIN_ARRESTED){
_banditCaptured++;
_local2.setCountMission(_banditCaptured);
} else {
if (_arg1.type == VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL){
_villainCaptured++;
_local2.setCountMission(_villainCaptured);
};
};
}
function checkComboMission(_arg1:ShopGameEvent):void{
var _local2:* = _main;
_missionVar++;
_local2.setCountMission(_missionVar);
}
public function setStatificationMission():void{
var _local1:* = _main;
_local1.setCountMission(MissionList.getStatisfiedVisitor(this).length);
addEventListener(ShopGameEvent.UPDATE, checkStatificationMission);
}
public function setRunningEventMission():void{
var _local1:* = _main;
_local1.setCountMission(getRunEvent());
addEventListener(ShopGameEvent.UPDATE, checkRunningEventMission);
}
public function setSafeMallMission():void{
var _local1:* = _main;
_local1.setExtraTextMission(((" (" + (_yourMallIsSafe) ? "Safe" : "Unsafe") + ")"));
addEventListener(ShopGameEvent.UPDATE, checkSafeMallMission);
}
function checkStatificationMission(_arg1:ShopGameEvent):void{
var _local2:* = _main;
_local2.setCountMission(MissionList.getStatisfiedVisitor(this).length);
}
function checkRunningEventMission(_arg1:ShopGameEvent):void{
var _local2:* = _main;
_local2.setCountMission(getRunEvent());
}
function checkSafeMallMission(_arg1:ShopGameEvent):void{
var _local2:* = _main;
_local2.setExtraTextMission(((" (" + (_yourMallIsSafe) ? "Safe" : "Unsafe") + ")"));
}
function checkArrestedOneNight(_arg1:ShopGameEvent):void{
var _local2:*;
if ((((gameHour == 9)) && ((gameMinute == 0)))){
_banditCaptured = 0;
_local2 = _main;
_local2.setCountMission(_banditCaptured);
};
}
public function disableMissionListener():void{
removeEventListener(VisitorEvent.BEGIN_ARRESTED, checkArrestedMission);
removeEventListener(VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL, checkArrestedMission);
removeEventListener(ShopGameEvent.UPDATE, checkRunningEventMission);
removeEventListener(ShopGameEvent.UPDATE, checkStatificationMission);
removeEventListener(ShopGameEvent.UPDATE, checkArrestedOneNight);
removeEventListener(ShopGameEvent.UPDATE, checkSafeMallMission);
removeEventListener(ShopGameEvent.COMBO_FOUND, checkComboMission);
}
public function set banditCaptured(_arg1:int):void{
_banditCaptured = _arg1;
}
public function get banditCaptured():int{
return (_banditCaptured);
}
public function set villainCaptured(_arg1:int):void{
_villainCaptured = _arg1;
}
public function get villainCaptured():int{
return (_villainCaptured);
}
public function set missionActive(_arg1:uint):void{
_missionActive = _arg1;
}
public function get missionActive():uint{
return (_missionActive);
}
public function set totalBanditCaptured(_arg1:int):void{
_totalBanditCaptured = Math.min(_arg1, 999);
}
public function get totalBanditCaptured():int{
return (_totalBanditCaptured);
}
public function set totalVillainCaptured(_arg1:int):void{
_totalVillainCaptured = Math.min(_arg1, 999);
}
public function get totalVillainCaptured():int{
return (_totalVillainCaptured);
}
public function set profit(_arg1:Number):void{
_profit = _arg1;
}
public function get profit():Number{
return (_profit);
}
public function countBoothOf(_arg1:Class):Number{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = 0;
_local3 = _boothList.concat(_facilityList);
_local4 = 0;
while (_local4 < _local3.length) {
if ((_local3[_local4] is _arg1)){
_local2++;
};
_local4++;
};
return (_local2);
}
public function countStaffOf(_arg1:Class):Number{
var _local2:*;
_local2 = 0;
if (_arg1 == CrewJanitor){
_local2 = _janitorList.length;
} else {
if (_arg1 == CrewElectrician){
_local2 = _electricianList.length;
} else {
if (_arg1 == CrewSecurity){
_local2 = _securityList.length;
} else {
if (_arg1 == CrewEntertainer){
_local2 = _entertainerList.length;
};
};
};
};
return (_local2);
}
public function getBoothOf(_arg1:Class):Array{
var _local2:*;
var _local3:*;
_local2 = new Array();
if (_arg1 != null){
_local3 = 0;
while (_local3 < _boothList.length) {
if ((_boothList[_local3] is _arg1)){
_local2.push(_boothList[_local3]);
};
_local3++;
};
};
return (_local2);
}
public function getRandomBoothOf(_arg1:Class):Object{
var _local2:*;
var _local3:*;
_local2 = null;
_local3 = getBoothOf(_arg1);
if (_local3.length > 0){
_local2 = _local3[Math.floor((Math.random() * _local3.length))];
} else {
_local2 = _boothList[Math.floor((Math.random() * _boothList.length))];
};
return (_local2);
}
public function countFloorNumber():Number{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
_local1 = 0;
_local2 = false;
_local3 = (_floorList.length - 1);
while (_local3 > 0) {
_local4 = _floorList[_local3];
if (haveBoothOn(_local4)){
_local2 = true;
_local1 = (_local3 + 2);
break;
};
_local3--;
};
if (!_local2){
if (haveBoothOn(null)){
_local1 = 1;
};
};
return (_local1);
}
function haveBoothOn(_arg1:Object):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = false;
if (_hall != null){
if (_hall.onFloor == _arg1){
_local2 = true;
};
};
if (!_local2){
_local3 = _boothList.concat(_restroomList.concat(_atmList.concat(_terraceList)));
_local4 = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].onFloor == _arg1){
_local2 = true;
break;
};
_local4++;
};
};
return (_local2);
}
public function haveSpecialVisitorByName(_arg1:String):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = false;
_local3 = 0;
while (_local3 < _visitorSpecialList.length) {
_local4 = _visitorSpecialList[_local3];
if (_local4.visitorName == _arg1){
_local2 = true;
break;
};
_local3++;
};
return (_local2);
}
public function getBoothTypeByLevel(_arg1:Class, _arg2:int):Array{
var _local3:*;
var _local4:*;
var _local5:*;
_local3 = new Array();
_local4 = getBoothOf(_arg1);
_local5 = 0;
while (_local5 < _local4.length) {
if (_local4[_local5].boothLevel >= _arg2){
_local3.push(_local4[_local5]);
};
_local5++;
};
return (_local3);
}
public function haveCurrentEvent(_arg1:String):Boolean{
var _local2:*;
_local2 = false;
if (_hall != null){
_local2 = ((_hall.boothOpen) && ((_hall.currentEvent == _arg1)));
};
return (_local2);
}
public function numberSpecialVisitorVisitToday():Number{
return (specialVisitorVisitToday.length);
}
public function getCurrentTransferAmount():Number{
var _local1:*;
var _local2:*;
_local1 = 0;
if (theRoot.transferData != null){
_local2 = _main;
if (theRoot.transferData.fromCountry == _local2.country){
_local1 = theRoot.transferData.amount;
};
};
return (_local1);
}
public function getCurrentHallLevel():int{
var _local1:*;
_local1 = 0;
if (_hall != null){
_local1 = _hall.boothLevel;
};
return (_local1);
}
public function getRunEvent(_arg1:String=""):int{
var _local2:*;
_local2 = 0;
if (_hall != null){
if ((((_arg1 == "")) || ((_arg1 == _hall.currentEvent)))){
_local2 = _hall.dayPassEvent;
};
};
return (_local2);
}
public function haveAllBooth(_arg1:uint=1):Boolean{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local2 = false;
_local3 = BoothList.BOOTH_AVAILABLE.concat();
_local4 = 0;
while (_local4 < _boothList.length) {
_local5 = _boothList[_local4];
if (_local5.boothLevel >= _arg1){
_local6 = _local3.indexOf(Utility.getClass(_local5));
if (_local6 >= 0){
_local3.splice(_local6, 1);
};
if (_local3.length <= 0){
_local2 = true;
break;
};
};
_local4++;
};
return (_local2);
}
public function haveAllExtraUpgrade():Boolean{
var _local1:*;
_local1 = (_upgradePurchaseList.length >= UpgradeList.UPGRADE_AVAILABLE.length);
return (_local1);
}
public function haveAllSpecialVisitor():Boolean{
var _local1:*;
_local1 = (_specialVisitorAlreadyVisit.length >= VisitorList.SPECIAL_VISITOR_LIST.length);
return (_local1);
}
public function yourMallIsSafeToday():Boolean{
var _local1:*;
_local1 = (((((_gameHour == 9)) && ((_gameMinute == 0)))) && (_yourMallIsSafe));
return (_local1);
}
public function set missionVar(_arg1:Number):void{
_missionVar = _arg1;
}
public function get missionVar():Number{
return (_missionVar);
}
public function getEmployeeTypeByLevel(_arg1:String="all", _arg2:uint=1):Array{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
_local3 = new Array();
_local4 = new Array();
if (_arg1 == "janitor"){
_local4 = _janitorList.concat();
} else {
if (_arg1 == "electrician"){
_local4 = _electricianList.concat();
} else {
if (_arg1 == "security"){
_local4 = _securityList.concat();
} else {
if (_arg1 == "entertainer"){
_local4 = _entertainerList.concat();
} else {
if (_arg1 == "all"){
_local4 = _janitorList.concat(_electricianList.concat(_securityList.concat(_entertainerList)));
};
};
};
};
};
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
if (_local6.employeeLevel >= _arg2){
_local3.push(_local6);
};
_local5++;
};
return (_local3);
}
public function getBrokenBooth():Array{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = new Array();
_local2 = _boothList.concat(_atmList);
_local3 = 0;
while (_local3 < _local2.length) {
if (_local2[_local3].boothIsBroken){
_local1.push(_local2[_local3]);
};
_local3++;
};
return (_local1);
}
public function get lostVisitor():Number{
return (_lostVisitor);
}
public function loadMaxVisitor():void{
var _local1:*;
var _local2:*;
var _local3:*;
_local1 = 0;
_local2 = 60;
if (checkUpgradeByName("Basement Lv 1")){
_local2 = (_local2 - 6);
};
if (checkUpgradeByName("Basement Lv 2")){
_local2 = (_local2 - 18);
};
_local3 = 0;
while (_local3 < _floorList.length) {
_local1 = (_local1 + Math.round((_floorList[_local3].width / _local2)));
_local3++;
};
_maxVisitor = Math.min(_local1, MAX_VISITOR);
if (((!((_hall == null))) && (_hall.boothOpen))){
if (checkUpgradeByName("Glamorous Speaker")){
_maxVisitor = Math.round((_maxVisitor * 1.4));
} else {
_maxVisitor = Math.round((_maxVisitor * 1.2));
};
};
}
}
}//package Instance
Section 93
//HumanObject (Instance.HumanObject)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
public class HumanObject extends ShopEmpireObject {
protected var debugStat;
protected var _walk:Boolean;
protected var _running:Boolean;
protected var _dirrection:String;
protected var _speed:Number;
protected var _runModifier:Number;
protected var _mood:Number;
protected var lastMood:Number;
protected var _rideElevator:Boolean;
protected var _rideEscalator:Boolean;
protected var _goHome:Boolean;
protected var _rideCar:Boolean;
protected var _car:MovieClip;
protected var _destinationTargetList:Array;
protected var _currentDestination:MovieClip;
protected var _onFloor:MovieClip;
protected var _insideBooth:Boolean;
protected var _forcedExit:Boolean;
protected var floorTarget:MovieClip;
protected var _transportTarget:MovieClip;
protected var elevatorRoomTarget:MovieClip;
protected var waitingElevator:Boolean;
protected var waitingTreshold:Number;
protected var _theBody:Object;
protected var reachDestination:Boolean;
protected var _stamina:Number;
protected var recovery:Boolean;
protected var _recoveryStamina:Number;
protected var _dialogBox:MovieClip;
public static const RIGHT = "right";
public static const LEFT = "left";
public function HumanObject(){
_walk = false;
_dirrection = RIGHT;
_onFloor = null;
transportTarget = null;
waitingElevator = false;
_rideElevator = false;
_rideEscalator = false;
_goHome = false;
_running = false;
_insideBooth = false;
_forcedExit = false;
_dialogBox = null;
_stamina = 100;
_car = null;
_rideCar = false;
_recoveryStamina = 80;
recovery = false;
reachDestination = false;
waitingTreshold = 500;
addEventListener(VisitorEvent.OUT_ESCALATOR, outFromEscalator);
addEventListener(VisitorEvent.OUT_ELEVATOR, outFromElevator);
addEventListener(VisitorEvent.ENTER_ELEVATOR, enteringElevator);
addEventListener(Event.ADDED_TO_STAGE, InitWorld);
}
function InitWorld(_arg1:Event):void{
var _local2:* = _world;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, checkRemoved);
}
function checkRemoved(_arg1:Event):void{
var _local2:* = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, checkRemoved);
}
protected function removeTick(_arg1:VisitorEvent):void{
var _local2:* = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
}
function tick(_arg1:ShopGameEvent):void{
}
function lookingBoothProgress():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (!((_goHome) || (_insideBooth))){
if (_currentDestination != null){
if (_onFloor == _currentDestination.onFloor){
if (!((_rideElevator) || (_rideEscalator))){
if (!(_currentDestination is Hall)){
if (_currentDestination.body){
_local2 = _currentDestination.body.enterance;
};
} else {
if (_currentDestination.hallBody){
_local2 = _currentDestination.hallBody.enterance;
};
};
if (_local2){
if (!theBody.hitTestObject(_local2)){
_local3 = _local1.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local3.x < this.x){
this.dirrection = LEFT;
} else {
if (_local3.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
reachDestination = false;
} else {
if (_walk){
this.walk = false;
};
if (!reachDestination){
beginEnterBooth();
reachDestination = true;
};
};
};
};
} else {
if (floorTarget != _currentDestination.onFloor){
floorTarget = _currentDestination.onFloor;
};
};
};
};
}
function transportTargetIsDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if ((_local2 is FacilityElevator)){
_rideElevator = false;
waitingElevator = false;
} else {
if ((_local2 is FacilityEscalator)){
_rideEscalator = false;
_local2.removeVisitorFromList(this);
};
};
reachDestination = false;
correctFloor();
this.transportTarget = null;
if (!_walk){
this.walk = true;
};
}
public function correctFloor(){
var _local5:*;
var _local1:* = _world;
var _local2:* = Math.abs(this.y);
var _local3:* = null;
var _local4:* = 0;
while (_local4 < (_local1.floorList.length - 1)) {
_local5 = Math.abs((_local1.floorList[_local4].y - this.y));
if (_local5 < _local2){
_local2 = _local5;
_local3 = _local1.floorList[_local4];
if (_local2 == 0){
break;
};
} else {
break;
};
_local4++;
};
if (_local3 == null){
_local4 = 0;
while (_local4 < _local1.basementList.length) {
_local5 = Math.abs((_local1.basementList[_local4].y - this.y));
if (_local5 < _local2){
_local2 = _local5;
_local3 = _local1.basementList[_local4];
if (_local2 == 0){
break;
};
} else {
break;
};
_local4++;
};
};
_onFloor = _local3;
if (_local3 != null){
this.y = _local3.y;
} else {
this.y = 0;
};
}
function limitnessMove():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if ((((((_transportTarget == null)) && (!(_rideElevator)))) && (!(((_goHome) && ((_onFloor == null))))))){
_local2 = null;
if (_onFloor == null){
_local2 = _local1.floorList[0];
} else {
_local3 = _local1.floorList.indexOf(_onFloor);
if (_local3 >= 0){
if (((_local3 + 1) in _local1.floorList)){
_local2 = _local1.floorList[(_local3 + 1)];
};
};
};
if (_local2 != null){
if (this.x <= (_local2.x - (_local2.width / 2))){
this.dirrection = RIGHT;
} else {
if (this.x >= (_local2.x + (_local2.width / 2))){
this.dirrection = LEFT;
};
};
};
};
}
function beginEnterBooth():void{
}
public function insideMall():Boolean{
var _local4:*;
var _local5:*;
var _local1:* = _world;
var _local2:* = null;
var _local3:* = false;
if (!_rideCar){
if (_onFloor == null){
_local2 = _local1.floorList[0];
} else {
_local4 = _local1.floorList.indexOf(_onFloor);
if (_local4 >= 0){
if (((_local4 + 1) in _local1.floorList)){
_local2 = _local1.floorList[(_local4 + 1)];
};
};
};
if (((!((_local2 == null))) && (!((this.parent == null))))){
_local5 = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
_local3 = (((_local5.x > (_local2.x - (_local2.width / 2)))) && ((_local5.x < (_local2.x + (_local2.width / 2)))));
};
};
return (_local3);
}
protected function goHomeProgress():void{
var _local2:*;
var _local1:* = _world;
if (!((_rideElevator) || (_rideEscalator))){
if (_goHome){
if (!_insideBooth){
if (_currentDestination != null){
if (_currentDestination.technicianOnDuty == this){
_currentDestination.technicianOnDuty = null;
};
_currentDestination = null;
};
};
if (car == null){
floorTarget = null;
if (_onFloor == null){
if (_transportTarget != null){
_transportTarget.removeEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
transportTarget = null;
};
if (!_walk){
this.walk = true;
};
};
} else {
floorTarget = car.onFloor;
if (_onFloor == car.onFloor){
if (_transportTarget != null){
_transportTarget.removeEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
transportTarget = null;
waitingElevator = false;
};
_local2 = _local1.globalToLocal(car.parent.localToGlobal(new Point(car.x, car.y)));
if (Math.abs((this.x - _local2.x)) > 5){
this.dirrection = ((_local2.x)<this.x) ? LEFT : RIGHT;
if (!_walk){
this.walk = true;
};
} else {
car.rideToGoHome(this);
};
} else {
if (_onFloor == null){
if (((!((_transportTarget == null))) && ((_transportTarget is FacilityElevator)))){
_transportTarget.removeEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
transportTarget = null;
waitingElevator = false;
};
};
};
};
};
};
}
protected function lookingTransportProgress():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
if (!((_rideElevator) || (_rideEscalator))){
if (_onFloor != floorTarget){
if (_transportTarget == null){
this.transportTarget = searchTransport();
};
} else {
this.transportTarget = null;
waitingElevator = false;
};
};
if (_transportTarget != null){
if ((_transportTarget is FacilityElevator)){
if (!((_rideElevator) || (_rideEscalator))){
if (!theBody.hitTestObject(elevatorRoomTarget.enterance)){
_local2 = _local1.globalToLocal(elevatorRoomTarget.localToGlobal(new Point(elevatorRoomTarget.enterance.x, elevatorRoomTarget.enterance.y)));
if (_local2.y == this.y){
if (_local2.x < this.x){
this.dirrection = LEFT;
} else {
if (_local2.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
} else {
if (_transportTarget != null){
_transportTarget.removeEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
};
transportTarget = null;
waitingElevator = false;
};
} else {
if (!waitingElevator){
this.walk = false;
_local3 = _transportTarget.roomList.indexOf(elevatorRoomTarget);
if ((_local3 in _transportTarget.waitingList)){
_transportTarget.waitingList[_local3].push(this);
};
_transportTarget.applyRoomTarget(elevatorRoomTarget);
waitingElevator = true;
waitingTreshold = 500;
};
};
} else {
if (_walk){
this.walk = false;
};
if (_transportTarget != null){
if (!_transportTarget.roomTargetIsAvailable(elevatorRoomTarget)){
_transportTarget.applyRoomTarget(elevatorRoomTarget);
};
if ((((((elevatorRoomTarget == null)) || (((!((elevatorRoomTarget == null))) && ((_transportTarget.elevatorRoom.y == elevatorRoomTarget.y)))))) || (_forcedExit))){
if (_transportTarget.justOpen()){
dispatchEvent(new VisitorEvent(VisitorEvent.BECOMES_EXIT_ELEVATOR, _transportTarget));
} else {
if (_transportTarget.canBeEntered()){
if (_forcedExit){
_transportTarget.removeVisitor(this);
} else {
_transportTarget.visitorExit(this);
};
};
};
};
};
};
} else {
if ((_transportTarget is FacilityEscalator)){
_local4 = 0;
_local5 = 0;
if (_onFloor != null){
_local4 = _onFloor.y;
};
if (floorTarget != null){
_local5 = floorTarget.y;
};
_local6 = (_local4 > _local5);
if (!((_rideEscalator) || (_rideElevator))){
_local7 = _transportTarget.upperPosition;
if (_local6){
_local7 = _transportTarget.lowerPosition;
};
if (!theBody.hitTestObject(_local7)){
_local2 = _local1.globalToLocal(_local7.parent.localToGlobal(new Point(_local7.x, _local7.y)));
if (_local2.y == this.y){
if (_local2.x < this.x){
this.dirrection = LEFT;
} else {
if (_local2.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
} else {
this.transportTarget = null;
waitingElevator = false;
};
} else {
if (_walk){
this.walk = false;
};
_transportTarget.addVisitor(this, _local6);
_rideEscalator = true;
};
};
};
};
};
}
function outFromEscalator(_arg1:VisitorEvent):void{
var _local2:* = _arg1.booth;
_local2.removeVisitor(this);
_rideEscalator = false;
this.transportTarget = null;
reachDestination = false;
}
function outFromElevator(_arg1:VisitorEvent):void{
this.transportTarget = null;
_rideElevator = false;
this.walk = true;
reachDestination = false;
if (_forcedExit){
floorTarget = _onFloor;
};
_forcedExit = false;
}
function enteringElevator(_arg1:VisitorEvent):void{
var _local2:*;
_local2 = _arg1.booth;
_rideElevator = true;
waitingElevator = false;
reachDestination = false;
elevatorRoomTarget = searchElevatorRoomTarget(_local2);
_local2.applyRoomTarget(elevatorRoomTarget);
}
function waitingElevatorProgress():void{
if (waitingElevator){
if (_transportTarget != null){
if ((_transportTarget is FacilityElevator)){
if (_walk){
this.walk = false;
};
if (((!(_transportTarget.roomTargetIsAvailable(elevatorRoomTarget))) && (!(_transportTarget.maxCapacity())))){
_transportTarget.applyRoomTarget(elevatorRoomTarget);
};
if (_transportTarget.elevatorRoom.y == elevatorRoomTarget.y){
if (_transportTarget.justOpen()){
dispatchEvent(new VisitorEvent(VisitorEvent.BECOMES_ENTER_ELEVATOR, _transportTarget));
} else {
if (_transportTarget.canBeEntered()){
_transportTarget.visitorEnter(this);
};
};
};
};
};
};
}
protected function searchElevatorRoomTarget(_arg1:Object):MovieClip{
var _local10:*;
var _local11:*;
var _local2:* = null;
var _local3:* = _world;
var _local4:Array = new Array();
var _local5:* = _arg1;
var _local6:* = 0;
if (((!((floorTarget == null))) && ((_local3.floorList.indexOf(floorTarget) >= 0)))){
_local6 = floorTarget.y;
};
var _local7:* = _local3.floorList.indexOf(_onFloor);
var _local8:* = _local3.floorList.indexOf(floorTarget);
var _local9:* = 0;
while (_local9 < _local5.roomList.length) {
_local10 = _local3.globalToLocal(_local5.roomList[_local9].parent.localToGlobal(new Point(_local5.roomList[_local9].x, _local5.roomList[_local9].y)));
if (_local10.y == _local6){
_local2 = _local5.roomList[_local9];
break;
} else {
if (_local2 != elevatorRoomTarget){
if (_local7 > _local8){
if (_local10.y < _local6){
_local4.push(_local5.roomList[_local9]);
};
} else {
if (_local7 < _local8){
if (_local10.y > _local6){
_local4.push(_local5.roomList[_local9]);
};
};
};
};
};
_local9++;
};
if (_local2 == null){
if (_local4.length > 0){
_local11 = Math.floor((Math.random() * _local4.length));
_local2 = _local4[_local11];
};
};
return (_local2);
}
protected function searchTransport():MovieClip{
var _local5:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = _local2.floorList.indexOf(_onFloor);
var _local4:* = (_local2.floorList.indexOf(floorTarget) - (_local2.basementList.indexOf(floorTarget) + 1));
if (!(this as Employee)){
if ((Math.abs((_local4 - _local3)) - 1) == 0){
_local5 = 80;
} else {
if (waitingTreshold <= 0){
_local5 = 90;
} else {
_local5 = 40;
};
};
} else {
_local5 = 90;
};
if (_local2.basementList.indexOf(_onFloor) < 0){
if (Calculate.chance(_local5)){
_local1 = searchEscalator();
if (_local1 == null){
_local1 = searchElevator();
};
} else {
_local1 = searchElevator();
if (_local1 == null){
_local1 = searchEscalator();
};
};
} else {
_local1 = searchEscalator();
};
return (_local1);
}
function searchElevator():MovieClip{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:Array = new Array();
var _local4:Array = new Array();
var _local5:Array = new Array();
var _local6:* = 0;
while (_local6 < _local2.elevatorList.length) {
_local7 = _local2.elevatorList[_local6];
_local8 = 0;
while (_local8 < _local7.roomList.length) {
_local9 = _local2.globalToLocal(_local7.roomList[_local8].parent.localToGlobal(new Point(_local7.roomList[_local8].x, _local7.roomList[_local8].y)));
if (_local9.y == this.y){
_local3.push(_local7);
_local4.push(_local7.roomList[_local8]);
_local5.push(_local7.waitingList[_local8]);
break;
};
_local8++;
};
_local6++;
};
if (_local3.length > 0){
_local10 = new Array();
_local11 = new Array();
_local12 = new Array();
_local6 = 0;
while (_local6 < _local3.length) {
_local7 = _local3[_local6];
_local13 = false;
_local8 = 0;
while (_local8 < _local7.roomList.length) {
_local9 = _local2.globalToLocal(_local7.roomList[_local8].parent.localToGlobal(new Point(_local7.roomList[_local8].x, _local7.roomList[_local8].y)));
_local14 = 0;
if (floorTarget != null){
_local14 = floorTarget.y;
};
if (_local9.y == _local14){
_local13 = true;
_local11.push(_local7);
_local12.push(_local7.waitingList[_local8]);
break;
};
_local8++;
};
if (!_local13){
_local10.push(_local7);
};
_local6++;
};
if (_local11.length > 0){
_local15 = _local12[0];
_local16 = 0;
_local6 = 1;
while (_local6 < _local12.length) {
_local17 = _local12[_local6];
if (_local15.length > _local17.length){
_local15 = _local17;
_local16 = _local6;
} else {
if (_local15.length == _local17.length){
if (Calculate.chance(50)){
_local15 = _local17;
_local16 = _local6;
};
};
};
_local6++;
};
} else {
_local18 = _local2.floorList.indexOf(_onFloor);
_local19 = _local2.floorList.indexOf(floorTarget);
_local6 = 0;
while (_local6 < _local10.length) {
_local7 = _local10[_local6];
_local20 = _local3.indexOf(_local7);
_local21 = _local3[_local20].roomList.indexOf(_local4[_local20]);
if (_local19 < _local18){
if (_local21 <= 0){
_local3.splice(_local20, 1);
_local4.splice(_local20, 1);
};
} else {
if (_local19 > _local18){
if (_local21 >= (_local3[_local20].roomList.length - 1)){
_local3.splice(_local20, 1);
_local4.splice(_local20, 1);
};
};
};
_local6++;
};
if (_local3.length > 0){
_local16 = Math.floor((Math.random() * _local3.length));
};
};
if ((_local16 in _local3)){
_local1 = _local3[_local16];
elevatorRoomTarget = _local4[_local16];
};
};
return (_local1);
}
function searchEscalator():MovieClip{
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:Array = new Array();
var _local4:* = 0;
var _local5:* = 0;
if (_onFloor != null){
_local4 = _onFloor.y;
};
if (floorTarget != null){
_local5 = floorTarget.y;
};
var _local6:* = (_local4 > _local5);
var _local7:* = 0;
while (_local7 < _local2.escalatorList.length) {
_local8 = _local2.escalatorList[_local7];
_local9 = _local8.upperPosition;
if (_local6){
_local9 = _local8.lowerPosition;
};
_local10 = _local2.globalToLocal(_local9.parent.localToGlobal(new Point(_local9.x, _local9.y)));
if (_local10.y == this.y){
_local3.push(_local8);
};
_local7++;
};
if (_local3.length > 0){
_local1 = _local3[0];
_local7 = 1;
while (_local7 < _local3.length) {
_local11 = _local3[_local7].upperPosition;
_local12 = _local1.upperPosition;
if (_local6){
_local11 = _local3[_local7].lowerPosition;
_local12 = _local1.lowerPosition;
};
_local13 = _local2.globalToLocal(_local11.parent.localToGlobal(new Point(_local11.x, _local11.y)));
_local14 = _local2.globalToLocal(_local12.parent.localToGlobal(new Point(_local12.x, _local12.y)));
if (Math.abs((this.x - _local14.x)) > Math.abs((this.x - _local13.x))){
_local1 = _local3[_local7];
} else {
if (Math.abs((this.x - _local14.x)) == Math.abs((this.x - _local13.x))){
if (Calculate.chance(50)){
_local1 = _local3[_local7];
};
};
};
_local7++;
};
};
return (_local1);
}
protected function movingWhenWalk():void{
var _local1:*;
var _local2:*;
if (((((_walk) && (!(recovery)))) && (!(_rideCar)))){
_local1 = 0;
_local2 = ((stamina)>=60) ? 1 : (stamina / 60);
if (_running){
_local1 = (_runModifier * _local2);
} else {
_local1 = (-((5 - Math.floor((stamina / (stamina / 3))))) / 5);
};
this.x = (this.x + (this.scaleX * (_speed + _local1)));
limitnessMove();
checkEdge();
};
}
protected function checkEdge():void{
var _local1:* = _world;
if (_onFloor != null){
if (this.parent.parent == _local1){
if (this.x > (_onFloor.x + (_onFloor.width / 2))){
this.x = (_onFloor.x + (_onFloor.width / 2));
dispatchEvent(new VisitorEvent(VisitorEvent.REACH_EDGE));
};
if (this.x < (_onFloor.x - (_onFloor.width / 2))){
this.x = (_onFloor.x - (_onFloor.width / 2));
dispatchEvent(new VisitorEvent(VisitorEvent.REACH_EDGE));
};
};
};
}
public function waitingElevatorAgain():void{
if ((_transportTarget is FacilityElevator)){
_transportTarget.addEventListener(BoothEvent.VISITOR_UPDATE, waitMore);
};
}
function waitMore(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if ((_local2 is FacilityElevator)){
if (!_local2.maxCapacity()){
_local2.applyRoomTarget(elevatorRoomTarget);
_local2.removeEventListener(BoothEvent.VISITOR_UPDATE, waitMore);
};
};
}
public function set walk(_arg1:Boolean):void{
_walk = _arg1;
if (_walk){
gotoAndStop("Walk");
} else {
gotoAndStop("Standby");
};
}
public function get walk():Boolean{
return (_walk);
}
public function set dirrection(_arg1:String):void{
_dirrection = _arg1;
if (_dirrection == RIGHT){
this.scaleX = 1;
} else {
if (_dirrection == LEFT){
this.scaleX = -1;
};
};
}
override public function set x(_arg1:Number):void{
var _local2:*;
var _local3:*;
super.x = _arg1;
if (_world){
_local2 = _world;
if (!_rideCar){
if (((!((this.parent == null))) && ((this.parent.parent == _local2)))){
_local3 = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
if ((((_local3.x < (_local2.mostLeft - 10))) || ((_local3.x > (_local2.mostRight + 10))))){
dispatchEvent(new VisitorEvent(VisitorEvent.ON_OUT_WORLD));
};
};
};
};
}
public function set rideElevator(_arg1:Boolean):void{
_rideElevator = _arg1;
}
public function get rideElevator():Boolean{
return (_rideElevator);
}
public function set rideEscalator(_arg1:Boolean):void{
_rideEscalator = _arg1;
}
public function get rideEscalator():Boolean{
return (_rideEscalator);
}
public function set onFloor(_arg1:MovieClip):void{
_onFloor = _arg1;
}
public function get onFloor():MovieClip{
return (_onFloor);
}
public function set runModifier(_arg1:Number):void{
_runModifier = _arg1;
}
public function get runModifier():Number{
return (_runModifier);
}
public function set running(_arg1:Boolean):void{
_running = _arg1;
}
public function get running():Boolean{
return (_running);
}
public function set currentDestination(_arg1:MovieClip):void{
_currentDestination = _arg1;
}
public function get currentDestination():MovieClip{
return (_currentDestination);
}
public function set transportTarget(_arg1:MovieClip):void{
var _local2:* = (_transportTarget == _arg1);
if (!_local2){
if (_transportTarget != null){
if ((_transportTarget is FacilityElevator)){
_transportTarget.cancelInsert(this);
};
_transportTarget.removeEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
};
};
_transportTarget = _arg1;
if (!_local2){
if (_transportTarget != null){
_transportTarget.addEventListener(BoothEvent.DESTROYED, transportTargetIsDestroyed);
};
};
}
public function get transportTarget():MovieClip{
return (_transportTarget);
}
public function set insideBooth(_arg1:Boolean):void{
_insideBooth = _arg1;
}
public function get insideBooth():Boolean{
return (_insideBooth);
}
public function resetFloorTarget():void{
floorTarget = _onFloor;
}
public function set forcedExit(_arg1:Boolean):void{
_forcedExit = _arg1;
}
public function set goHome(_arg1:Boolean):void{
_goHome = _arg1;
dispatchEvent(new VisitorEvent(VisitorEvent.GO_HOME_UPDATE));
}
public function get goHome():Boolean{
return (_goHome);
}
function dialogBoxRemoved(_arg1:Event):void{
_dialogBox = null;
}
public function set dialogBox(_arg1:MovieClip):void{
_dialogBox = _arg1;
if (_dialogBox != null){
_dialogBox.addEventListener(Event.REMOVED_FROM_STAGE, dialogBoxRemoved);
};
}
public function get dialogBox():MovieClip{
return (_dialogBox);
}
public function set theBody(_arg1:Object):void{
_theBody = _arg1;
}
public function get theBody():Object{
return (_theBody);
}
public function set stamina(_arg1:Number):void{
_stamina = Math.max(Math.min(_arg1, 100), 0);
if (_stamina <= 0){
recovery = true;
recoveryStamina = (recoveryStamina - ((Math.random() * 5) + 10));
recoveryStamina = Math.max(recoveryStamina, 30);
} else {
if (_stamina >= recoveryStamina){
recovery = false;
};
};
dispatchEvent(new VisitorEvent(VisitorEvent.STAMINA_UPDATE));
}
public function get stamina():Number{
return (_stamina);
}
public function set recoveryStamina(_arg1:Number):void{
_recoveryStamina = _arg1;
}
public function get recoveryStamina():Number{
return (_recoveryStamina);
}
public function set mood(_arg1:Number):void{
_mood = Math.min(Math.max(_arg1, 0), 100);
dispatchEvent(new VisitorEvent(VisitorEvent.MOOD_UPDATE));
lastMood = _mood;
}
public function get mood():Number{
return (_mood);
}
public function set rideCar(_arg1:Boolean):void{
_rideCar = _arg1;
}
public function get rideCar():Boolean{
return (_rideCar);
}
public function set car(_arg1:MovieClip):void{
_car = _arg1;
}
public function get car():MovieClip{
return (_car);
}
}
}//package Instance
Section 94
//InformationTable (Instance.InformationTable)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
public class InformationTable extends MovieClip {
public var visitorName:TextField;
public var itemPriceHeader:TextField;
public var wagePerDay:TextField;
public var star1:MovieClip;
public var btnChangeModel:SimpleButton;
public var staffType:TextField;
public var star2:MovieClip;
public var upgradeMask:MovieClip;
public var workTimeDial:MovieClip;
public var star3:MovieClip;
public var revenue:TextField;
public var favoriteList:TextField;
public var boothType:TextField;
public var btnClose:SimpleButton;
public var numberWomenHeader:TextField;
public var elevatorExpand:TextField;
public var numberVisitor:TextField;
public var totalVisitor:TextField;
public var currentWorkArea:TextField;
public var btnConfirmWorkTime:SimpleButton;
public var btnDestroy:SimpleButton;
public var commentSlider:UI_VisitorInfoSlider;
public var btnMove:SimpleButton;
public var staminaBar:MovieClip;
public var statificationMeter:MovieClip;
public var currentCash:TextField;
public var btnConfirmWorkArea:SimpleButton;
public var promotionCost:TextField;
public var upgradeCost:TextField;
public var commentMask:MovieClip;
public var numberVisitorHeader:TextField;
public var boothName:TextField;
public var upgradeSlider:UI_BoothInfoSlider;
public var currentWorkTime:TextField;
public var upgradeEffect:TextField;
public var commentInfo:TextField;
public var numberWomen:TextField;
public var facilityType:TextField;
public var workAreaDial:MovieClip;
public var expBar:MovieClip;
public var averageItemPrice:TextField;
public var btnUpgrade:SimpleButton;
public var dragArea:MovieClip;
var _relation:MovieClip;
var starList:Array;
var dragPos:Point;
public function InformationTable(){
var _local2:*;
starList = new Array();
super();
if (((((star1) && (star2))) && (star3))){
starList.push(star1);
starList.push(star2);
starList.push(star3);
};
var _local1:* = 0;
while (_local1 < starList.length) {
starList[_local1].gotoAndStop("Inactive");
_local1++;
};
addEventListener(Event.ADDED_TO_STAGE, Initialize);
if (btnUpgrade){
btnUpgrade.addEventListener(MouseEvent.CLICK, UpgradeProgress);
};
if (btnDestroy != null){
btnDestroy.addEventListener(MouseEvent.CLICK, DestroyProgress);
};
btnClose.addEventListener(MouseEvent.CLICK, CloseProgress);
dragArea.addEventListener(MouseEvent.MOUSE_DOWN, StartDrag);
_local1 = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as SimpleButton)){
_local2.tabEnabled = false;
};
_local1++;
};
dragPos = new Point(0, 0);
}
function Initialize(_arg1:Event):void{
var _local2:*;
if ((_relation as Booth)){
_local2 = 0;
while (_local2 < _relation.boothLevel) {
if ((_local2 in starList)){
starList[_local2].gotoAndStop("Active");
};
_local2++;
};
_relation.addEventListener(BoothEvent.END_UPGRADE, afterUpgradeCheck);
if (_relation.boothLevel >= _relation.MAX_LEVEL){
btnUpgrade.enabled = false;
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
} else {
if ((_relation as Employee)){
_local2 = 0;
while (_local2 < _relation.employeeLevel) {
if ((_local2 in starList)){
starList[_local2].gotoAndStop("Active");
};
_local2++;
};
_relation.addEventListener(VisitorEvent.END_PROMOTE, afterPromoteCheck);
if (!_relation.canBePromoted()){
btnUpgrade.enabled = false;
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
};
};
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function UpgradeProgress(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (btnUpgrade.enabled){
_local2 = _relation.world;
if ((_relation as Booth)){
_local3 = BoothList.getUpgradeCost(Utility.getClass(_relation), (_relation.boothLevel - 1));
if ((_relation is FacilityElevator)){
_local3 = (_local3 + (Math.max((_relation.roomList.length - 2), 0) * (BoothList.getExpandCost(_relation.boothLevel) - BoothList.getExpandCost((_relation.boothLevel - 1)))));
};
if (_local2.cash >= _local3){
_relation.upgradeBooth();
_local2.addCash(-(_local3));
_local2.upgradeReport = (_local2.upgradeReport + _local3);
starList[_relation.boothLevel].gotoAndPlay("Transform");
btnUpgrade.enabled = false;
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
_local2.showNotification(Notice.NOT_ENOUGH_CASH);
};
} else {
if ((_relation as Employee)){
_local3 = VisitorList.getPromotionCost(Utility.getClass(_relation), (_relation.employeeLevel - 1));
if (_local2.cash >= _local3){
_relation.promote();
_local2.addCash(-(_local3));
_relation.paid = (_relation.paid + _local3);
starList[_relation.employeeLevel].gotoAndPlay("Transform");
btnUpgrade.enabled = false;
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
_local2.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
};
};
}
function afterUpgradeCheck(_arg1:BoothEvent):void{
if (_arg1.boothLevel < _relation.MAX_LEVEL){
btnUpgrade.enabled = true;
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
}
function afterPromoteCheck(_arg1:VisitorEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.canBePromoted()){
btnUpgrade.enabled = true;
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
}
function DestroyProgress(_arg1:MouseEvent):void{
if ((_relation as Booth)){
if (_relation.destroy()){
CloseProgress(_arg1);
};
} else {
if ((_relation as Employee)){
_relation.fire();
CloseProgress(_arg1);
};
};
}
function StartDrag(_arg1:MouseEvent):void{
dragPos = globalToLocal(new Point(stage.mouseX, stage.mouseY));
stage.addEventListener(MouseEvent.MOUSE_MOVE, DragProgress);
stage.addEventListener(MouseEvent.MOUSE_UP, StopDrag);
}
function DragProgress(_arg1:MouseEvent):void{
this.x = (stage.mouseX - dragPos.x);
this.y = (stage.mouseY - dragPos.y);
}
function StopDrag(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, DragProgress);
stage.removeEventListener(MouseEvent.MOUSE_UP, StopDrag);
}
function CloseProgress(_arg1:MouseEvent):void{
closeTable();
}
public function closeTable():void{
dispatchEvent(new InformationTableEvent(InformationTableEvent.ON_CLOSE, this.x, this.y));
if (this.parent != null){
this.parent.removeChild(this);
};
}
public function set relation(_arg1:MovieClip):void{
_relation = _arg1;
}
public function get relation():MovieClip{
return (_relation);
}
function removed(_arg1:Event):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, DragProgress);
stage.removeEventListener(MouseEvent.MOUSE_UP, StopDrag);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
}
}//package Instance
Section 95
//MainGameplay (Instance.MainGameplay)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import fl.motion.*;
import flash.ui.*;
public class MainGameplay extends MovieClip {
const DAY_SKY_COLOR = 9884669;
const NIGHT_SKY_COLOR = 1975592;
const NOTIFICATION_X = 630;
const NOTIFICATION_Y = 410;
public var GameInterface:UI_GameInterface;
public var screenArea:MovieClip;
public var tutorialPart:MovieClip;
public var noticeArea:MovieClip;
var _country:String;
var gameplay:MovieClip;
var gameHour:int;
var gameMinute:int;
var gameCounter:int;
var interfaceOnOver:Boolean;
var lastCoordinate:Point;
var bgContainer:MovieClip;
var _backContainer:MovieClip;
var _landmark:MovieClip;
var _skyColor:uint;
var noticeContainer:MovieClip;
var buildContainer:MovieClip;
var mouseContainer:MovieClip;
var mouseCursor:MovieClip;
var buttonContainer:MovieClip;
var tutorialContainer:MovieClip;
var menuContainer:MovieClip;
var helpContainer:MovieClip;
var holdShift:Boolean;
var skipConfirm:Boolean;
var infoPos:Point;
var infoClip:MovieClip;
var confirmWhenHire:Boolean;
var btnCancel;
var btnReverse;
var saveNote;
var workTimeSetting;
var saveNotePosition:Point;
var menuInGame:MovieClip;
var menuPos:Point;
var confirmationOnExit:MovieClip;
var notice:MovieClip;
var help:MovieClip;
var _boothAvailable:Array;
var notificationList;
var tutorialDelay:int;
var tutorArrow:Array;
var tutorText:MovieClip;
var tutorTextDelay:int;
var tutorialTemp:int;
var tutorialTempArray:Array;
var tutorTarget:Object;
var tutorType:String;
var tutorNextTarget:Array;
var tutorNextType:Array;
var tutorReq:Object;
var tutorFulfilledType:String;
var _runningMission:Object;
var _missionIsSuccess:Boolean;
var _environtment:Number;
var theRoot;
var descriptionText;// = ""
var visitorText;// = ""
var incomeText;// = ""
var expenditureText;// = ""
var profitText;// = ""
var totalProfit;// = 0
public function MainGameplay(){
_boothAvailable = new Array();
notificationList = new Array();
tutorArrow = new Array();
tutorNextTarget = new Array();
tutorNextType = new Array();
super();
var _local1:* = root;
theRoot = _local1.mainProgram;
TweenLite.from(this, 0.8, {tint:0xFFFFFF});
gameHour = 9;
gameMinute = 0;
gameCounter = 0;
var _local2:* = new Gameplay();
_local2.main = this;
stage.addEventListener(ShopGameEvent.UPDATE, UpdateGame);
stage.addEventListener(ShopGameEvent.SPEED_CHANGE, UpdateSpeed);
gameplay = _local2;
gameplay.x = (screenArea.width / 2);
gameplay.y = gameplay.bottomPosition;
gameplay.gameHour = gameHour;
gameplay.gameMinute = gameMinute;
if (theRoot.cityUnlocked.length <= 1){
gameplay.cash = 55000;
};
gameplay.addEventListener(ShopGameEvent.POSITION_CHANGE, FixPosition);
gameplay.addEventListener(ShopGameEvent.CASH_UPDATE, updateCash);
gameplay.addEventListener(ShopGameEvent.HALL_ON_UPDATE, checkHallCondition);
_backContainer = new MovieClip();
addChildAt(_backContainer, 0);
_landmark = new GameLandmark();
_landmark.stop();
addChildAt(_landmark, 0);
bgContainer = new MovieClip();
addChildAt(bgContainer, 0);
addEventListener(ShopGameEvent.DETAIL_SHOWN, detailShown);
GameInterface.btnWorldMap.addEventListener(MouseEvent.CLICK, btnWorldMapOnClick);
GameInterface.btnDrag.addEventListener(ToggleButtonEvent.ACTIVATE, btnDragOnActive);
GameInterface.btnMenu.addEventListener(MouseEvent.CLICK, btnMenuOnClick);
GameInterface.btnAchievement.addEventListener(MouseEvent.CLICK, btnAchievementOnClick);
GameInterface.btnQuestionMark.addEventListener(MouseEvent.CLICK, btnQuestionMarkOnClick);
GameInterface.addEventListener(SectorPanelEvent.SECTOR_ITEM_DEACTIVE, cancelSectorItemCommand);
GameInterface.addEventListener(SectorPanelEvent.SECTOR_ITEM_ACTIVE, getSectorItemCommand);
GameInterface.addEventListener(MouseEvent.MOUSE_OVER, showMessageNotice);
GameInterface.cash = gameplay.cash;
addEventListener(BoothEvent.BOOTH_CLICK, BoothMenuAppear);
addEventListener(BoothEvent.BEGIN_UPGRADE, BoothOnUpgrade);
addEventListener(VisitorEvent.VISITOR_CLICK, VisitorMenuAppear);
addEventListener(VisitorEvent.BEGIN_PROMOTE, VisitorOnPromote);
buildContainer = new MovieClip();
buildContainer.mouseEnabled = false;
buildContainer.mouseChildren = false;
holdShift = false;
addChild(buildContainer);
buttonContainer = new MovieClip();
addChild(buttonContainer);
menuContainer = new MovieClip();
addChild(menuContainer);
noticeContainer = new MovieClip();
addChild(noticeContainer);
addChild(noticeArea);
noticeContainer.mask = noticeArea;
tutorialContainer = new MovieClip();
addChild(tutorialContainer);
helpContainer = new MovieClip();
helpContainer.mouseEnabled = false;
addChild(helpContainer);
mouseContainer = new MovieClip();
mouseContainer.mouseEnabled = false;
mouseContainer.mouseChildren = false;
holdShift = false;
addChild(mouseContainer);
menuInGame = new UI_MenuInGame();
confirmationOnExit = new UI_ConfirmationOnExit();
btnCancel = GameInterface.btnCancelBuild;
btnReverse = GameInterface.btnReverseBuild;
workTimeSetting = GameInterface.workTimeSetting;
saveNote = GameInterface.saveNote;
saveNotePosition = new Point(saveNote.x, saveNote.y);
help = new dll_helppage();
help.mouseEnabled = false;
GameInterface.removeChild(btnCancel);
GameInterface.removeChild(btnReverse);
GameInterface.removeChild(workTimeSetting);
GameInterface.removeChild(saveNote);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(BoothEvent.ALARM_TRIGGERED, AlarmOnTriggered);
addEventListener(BoothEvent.CREATED, BoothCreated);
addEventListener(BoothEvent.DESTROYED, BoothDestroyed);
addEventListener(ShopGameEvent.ALARM_STOPPED, AlarmOnStopped);
addEventListener(ShopGameEvent.HIRE_STAFF, checkCurrentStaff);
addEventListener(ShopGameEvent.FIRE_STAFF, checkCurrentStaff);
addEventListener(ShopGameEvent.VISITOR_ARRIVE, checkCurrentVisitor);
addEventListener(ShopGameEvent.VISITOR_LEAVE, checkCurrentVisitor);
addEventListener(ShopGameEvent.BOOTH_CREATED, checkCurrentBooth);
addEventListener(ShopGameEvent.BOOTH_DESTROYED, checkCurrentBooth);
addEventListener(ShopGameEvent.CANCEL_BUILD, cancelBuildProgress);
addEventListener(MouseEvent.CLICK, btnOnClick);
menuInGame.addEventListener(Event.ADDED_TO_STAGE, menuInGameAppear);
menuInGame.addEventListener(Event.REMOVED_FROM_STAGE, menuInGameDisappear);
confirmationOnExit.addEventListener(Event.ADDED_TO_STAGE, confirmationAppear);
confirmationOnExit.addEventListener(Event.REMOVED_FROM_STAGE, confirmationDisappear);
infoPos = new Point((screenArea.width / 2), ((screenArea.height / 2) - 112));
infoClip = null;
screenArea.visible = false;
confirmWhenHire = true;
skipConfirm = false;
drawSky();
tutorialDelay = 3;
tutorTextDelay = 0;
_runningMission = null;
_missionIsSuccess = false;
setBoothAvailable();
environtment = 1;
tutorialPart.parent.removeChild(tutorialPart);
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
function btnOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
if ((_local2 as SimpleButton)){
if (_local2.enabled){
theRoot.playSound(SFXButtonClicked);
} else {
theRoot.playSound(SFXUnableClick);
};
} else {
if ((_local2 as ToggleButton)){
if (_local2.buttonMode){
theRoot.playSound(SFXButtonClicked);
} else {
theRoot.playSound(SFXUnableClick);
};
};
};
}
function removedFromStage(_arg1:Event):void{
GameInterface.btnWorldMap.removeEventListener(MouseEvent.CLICK, btnWorldMapOnClick);
GameInterface.btnDrag.removeEventListener(ToggleButtonEvent.ACTIVATE, btnDragOnActive);
GameInterface.btnMenu.removeEventListener(MouseEvent.CLICK, btnMenuOnClick);
GameInterface.btnAchievement.removeEventListener(MouseEvent.CLICK, btnAchievementOnClick);
GameInterface.btnQuestionMark.removeEventListener(MouseEvent.CLICK, btnQuestionMarkOnClick);
GameInterface.removeEventListener(SectorPanelEvent.SECTOR_ITEM_DEACTIVE, cancelSectorItemCommand);
GameInterface.removeEventListener(SectorPanelEvent.SECTOR_ITEM_ACTIVE, getSectorItemCommand);
GameInterface.removeEventListener(MouseEvent.MOUSE_OVER, showMessageNotice);
stage.removeEventListener(ShopGameEvent.UPDATE, UpdateGame);
stage.removeEventListener(ShopGameEvent.SPEED_CHANGE, UpdateSpeed);
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
removeEventListener(BoothEvent.ALARM_TRIGGERED, AlarmOnTriggered);
removeEventListener(ShopGameEvent.ALARM_STOPPED, AlarmOnStopped);
removeEventListener(ShopGameEvent.HIRE_STAFF, checkCurrentStaff);
removeEventListener(ShopGameEvent.FIRE_STAFF, checkCurrentStaff);
removeEventListener(ShopGameEvent.VISITOR_ARRIVE, checkCurrentVisitor);
removeEventListener(ShopGameEvent.VISITOR_LEAVE, checkCurrentVisitor);
removeEventListener(ShopGameEvent.BOOTH_CREATED, checkCurrentBooth);
removeEventListener(ShopGameEvent.BOOTH_DESTROYED, checkCurrentBooth);
removeEventListener(ShopGameEvent.CANCEL_BUILD, cancelBuildProgress);
removeEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, addUpgradeCounter);
removeEventListener(ShopGameEvent.NEW_MISSION_SET, checkCurrentMission);
removeEventListener(ShopGameEvent.MISSION_CHANGE, changeCurrentMission);
menuInGame.removeEventListener(Event.ADDED_TO_STAGE, menuInGameAppear);
menuInGame.removeEventListener(Event.REMOVED_FROM_STAGE, menuInGameDisappear);
confirmationOnExit.removeEventListener(Event.ADDED_TO_STAGE, confirmationAppear);
confirmationOnExit.removeEventListener(Event.REMOVED_FROM_STAGE, confirmationDisappear);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, showDragCursor);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
stage.removeEventListener(KeyboardEvent.KEY_UP, KeyboardOnKeyUp);
removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
if (((!((mouseCursor == null))) && (!((mouseCursor.parent == null))))){
mouseCursor.parent.removeChild(mouseCursor);
mouseCursor = null;
};
var _local2:* = getChildByName("Ending");
if (_local2 != null){
TweenLite.killTweensOf(_local2);
};
theRoot.removeEventListener(TutorialEvent.TUTORIAL_END, finishTutorial);
theRoot.upgradeTime = 0;
Mouse.show();
}
function addUpgradeCounter(_arg1:BoothEvent):void{
theRoot.upgradeTime++;
}
function showMessageNotice(_arg1:MouseEvent):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local2:* = _arg1.target;
if (_local2.parent == GameInterface.currentSector){
if ((_local2 as ToggleButton)){
_local3 = RelationList.BTN_CLASS_LIST.indexOf(Utility.getClass(_local2));
if (_local3 >= 0){
_local4 = new TutorBar();
_local4.alignment = TextFormatAlign.LEFT;
_local4.readAsHtml = true;
_local4.text = ((((((((("<font color='#fded39'>Build " + ((RelationList.BOOTH_CLASS_LIST[_local3])==Hall) ? "Hall" : BoothList.compareShowNameByType(RelationList.BOOTH_CLASS_LIST[_local3])) + "</font>") + " (<font color = '#df9507'>$ ") + Utility.numberToMoney(BoothList.comparePriceByType(RelationList.BOOTH_CLASS_LIST[_local3]))) + "</font>)") + "\n") + RelationList.getNoteByType(RelationList.BOOTH_CLASS_LIST[_local3])) + ((RelationList.BOOTH_CLASS_LIST[_local3])==Hall) ? ((gameplay.hall)==null) ? "\nLimit one" : "\nAlready build" : "") + ((RelationList.BOOTH_CLASS_LIST[_local3])==FacilitySubway) ? ((gameplay.subwayList.length)<2) ? "" : "\nBuild reach limit" : "");
_local4.mouseRelative = TutorialText.SIDE;
notice = _local4;
mouseContainer.addChild(_local4);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
} else {
_local5 = RelationList.HIRE_BUTTON_LIST.indexOf(Utility.getClass(_local2));
if (_local5 >= 0){
_local4 = new TutorBar();
_local4.alignment = TextFormatAlign.JUSTIFY;
_local4.readAsHtml = true;
_local4.text = (((((((((("<font color='#1ac0e4'>Hire " + RelationList.HIRE_SHOW_NAME[_local5]) + "</font>") + " (<font color = '#df9507'>$ ") + Utility.numberToMoney(VisitorList.STAFF_PRICE[_local5])) + "</font>)") + "\n") + RelationList.getNoteByType(RelationList.HIRE_BUTTON_LIST[_local5])) + "\n<font color = '#df9507'>Wage: $ ") + Utility.numberToMoney(VisitorList.compareWageByType(VisitorList.STAFF_AVAILABLE[_local5]))) + " per day.</font>");
_local4.mouseRelative = TutorialText.SIDE;
notice = _local4;
mouseContainer.addChild(_local4);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
};
};
} else {
if (_local2.name.substr(0, "lockedSymbol".length) == "lockedSymbol"){
if (_local2.related != null){
_local4 = new TutorBarSingle();
_local4.alignment = TextFormatAlign.JUSTIFY;
_local4.readAsHtml = true;
_local4.text = (("" + RelationList.getLockedNoteByType(Utility.getClass(_local2.related))) + "");
_local4.mouseRelative = TutorialText.SIDE;
notice = _local4;
mouseContainer.addChild(_local4);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
};
};
};
} else {
if ((((_local2 as ToggleButton)) && ((GameInterface.toggleButtonList.indexOf(_local2) >= 0)))){
_local3 = RelationList.TOGGLE_BUTTON_LIST.indexOf(Utility.getClass(_local2));
_local4 = new TutorBarSingle();
_local4.alignment = TextFormatAlign.LEFT;
_local4.readAsHtml = false;
_local4.text = RelationList.TOGGLE_BUTTON_NOTE[_local3];
_local4.mouseRelative = TutorialText.SIDE;
notice = _local4;
mouseContainer.addChild(_local4);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
};
};
}
function outFromIcon(_arg1:MouseEvent){
if (notice != null){
if (notice.parent != null){
notice.parent.removeChild(notice);
notice = null;
_arg1.target.removeEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
};
};
}
function updateCash(_arg1:ShopGameEvent):void{
GameInterface.setCashTo(gameplay.cash);
}
function checkHallCondition(_arg1:ShopGameEvent):void{
if (gameplay.hall != null){
GameInterface.entertainmentSector.btnHall.disableButton();
GameInterface.entertainmentSector.btnHall.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
GameInterface.entertainmentSector.btnHall.enableButton();
GameInterface.entertainmentSector.btnHall.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
}
function btnMenuOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = _local2.parent.localToGlobal(new Point((_local2.x + (_local2.width / 2)), _local2.y));
if (menuContainer.getChildByName(menuInGame.name)){
TweenLite.to(menuInGame, 0.5, {x:_local3.x, y:_local3.y, alpha:0, scaleX:0, scaleY:0, onComplete:menuContainer.removeChild, onCompleteParams:[menuInGame]});
} else {
menuInGame.x = menuPos.x;
menuInGame.y = menuPos.y;
menuInGame.scaleX = 1;
menuInGame.scaleY = 1;
menuInGame.alpha = 1;
menuContainer.addChild(menuInGame);
TweenLite.from(menuInGame, 0.5, {x:_local3.x, y:_local3.y, scaleX:0, scaleY:0, alpha:0});
};
};
}
function btnAchievementOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = new UI_AchievementPage();
_local3.x = (theRoot.globalMask.width / 2);
_local3.y = (theRoot.globalMask.height / 2);
_local3.addEventListener(MouseEvent.CLICK, closeAchievement);
addChild(_local3);
};
}
function btnQuestionMarkOnClick(_arg1:MouseEvent):void{
if (helpContainer.getChildByName(help.name)){
helpContainer.removeChild(help);
} else {
helpContainer.addChild(help);
};
}
function closeAchievement(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _arg1.currentTarget;
if (_local2 == _local3.btnClose){
if (_local2.enabled){
_local3.removeEventListener(MouseEvent.CLICK, closeAchievement);
TweenLite.to(_local3, 0.5, {alpha:0, scaleX:0, scaleY:0, onComplete:_local3.parent.removeChild, onCompleteParams:[_local3]});
};
};
}
function menuInGameAppear(_arg1:Event):void{
GameInterface.disableAllButton();
menuInGame.btnResume.addEventListener(MouseEvent.CLICK, resumeGame);
menuInGame.btnClose.addEventListener(MouseEvent.CLICK, resumeGame);
menuInGame.btnOption.addEventListener(MouseEvent.CLICK, enterOption);
menuInGame.btnSave.addEventListener(MouseEvent.CLICK, enterSaveGame);
menuInGame.btnExit.addEventListener(MouseEvent.CLICK, btnExitOnClick);
GameInterface.btnPauseResume.isActive = true;
}
function resumeGame(_arg1:MouseEvent):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = GameInterface.btnMenu;
_local4 = _local3.parent.localToGlobal(new Point((_local3.x + (_local3.width / 2)), _local3.y));
TweenLite.to(menuInGame, 0.5, {x:_local4.x, y:_local4.y, alpha:0, scaleX:0, scaleY:0, onComplete:menuContainer.removeChild, onCompleteParams:[menuInGame]});
};
}
function enterOption(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = new UI_OptionInGame();
_local3.x = (screenArea.width / 2);
_local3.y = (screenArea.height / 2);
_local3.addEventListener(Event.REMOVED_FROM_STAGE, optionRemoved);
menuContainer.addChild(_local3);
TweenLite.from(_local3, 0.5, {scaleX:0, scaleY:0, alpha:0});
GameInterface.btnMenu.enabled = false;
};
}
function enterSaveGame(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = new UISaveGame();
_local3.x = (screenArea.width / 2);
_local3.y = (screenArea.height / 2);
_local3.addEventListener(Event.REMOVED_FROM_STAGE, saveRemoved);
menuContainer.addChild(_local3);
TweenLite.from(_local3, 0.5, {scaleX:0, scaleY:0, alpha:0});
GameInterface.btnMenu.enabled = false;
};
}
function optionRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, optionRemoved);
GameInterface.btnMenu.enabled = true;
GameInterface.soundControl.setMusicVolume(theRoot.bgmVolume);
GameInterface.soundControl.setSFXVolume(theRoot.sfxVolume);
}
function saveRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, optionRemoved);
GameInterface.btnMenu.enabled = true;
}
function btnExitOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
confirmationOnExit.alpha = 1;
confirmationOnExit.scaleX = 1;
confirmationOnExit.scaleY = 1;
menuContainer.addChild(confirmationOnExit);
TweenLite.from(confirmationOnExit, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut});
};
}
function confirmationAppear(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (_arg1.currentTarget == confirmationOnExit){
_local2 = 0;
while (_local2 < GameInterface.numChildren) {
_local3 = GameInterface.getChildAt(_local2);
if ((_local3 as SimpleButton)){
_local3.enabled = false;
};
_local2++;
};
if (menuContainer.getChildByName(menuInGame.name)){
_local2 = 0;
while (_local2 < menuInGame.numChildren) {
_local3 = menuInGame.getChildAt(_local2);
if ((_local3 as SimpleButton)){
_local3.enabled = false;
};
_local2++;
};
};
confirmationOnExit.addEventListener(MouseEvent.CLICK, decideExit);
};
}
function decideExit(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
if ((_local2 as SimpleButton)){
if (_local2.enabled){
if (_local2 == confirmationOnExit.btnYes){
_environtment = theRoot.bgmEnvirontment;
TweenLite.killTweensOf(theRoot);
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:ReturnToMainMenu});
confirmationOnExit.btnYes.enabled = false;
confirmationOnExit.btnNo.enabled = false;
} else {
if (_local2 == confirmationOnExit.btnNo){
TweenLite.to(confirmationOnExit, 0.5, {alpha:0, scaleX:0, scaleY:0, onComplete:menuContainer.removeChild, onCompleteParams:[confirmationOnExit]});
};
};
};
};
}
function confirmationDisappear(_arg1:Event):void{
var _local3:*;
var _local2:* = 0;
while (_local2 < GameInterface.numChildren) {
_local3 = GameInterface.getChildAt(_local2);
if ((_local3 as SimpleButton)){
_local3.enabled = true;
};
_local2++;
};
if (menuContainer.getChildByName(menuInGame.name)){
_local2 = 0;
while (_local2 < menuInGame.numChildren) {
_local3 = menuInGame.getChildAt(_local2);
if ((_local3 as SimpleButton)){
_local3.enabled = true;
};
_local2++;
};
};
}
function VisitorOnPromote(_arg1:VisitorEvent):void{
var _local2:* = _arg1.target;
theRoot.playSound(SFXPromote);
}
function BoothOnUpgrade(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
theRoot.playSound(SFXPromote);
}
function menuInGameDisappear(_arg1:Event):void{
GameInterface.enableAllButton();
GameInterface.btnPauseResume.isActive = false;
menuInGame.btnResume.removeEventListener(MouseEvent.CLICK, resumeGame);
menuInGame.btnClose.removeEventListener(MouseEvent.CLICK, resumeGame);
menuInGame.btnOption.removeEventListener(MouseEvent.CLICK, enterOption);
menuInGame.btnSave.removeEventListener(MouseEvent.CLICK, enterSaveGame);
menuInGame.btnExit.removeEventListener(MouseEvent.CLICK, btnExitOnClick);
}
function Initialize(_arg1:Event):void{
if (theRoot.lastGameplay != null){
gameplay.removeEventListener(ShopGameEvent.POSITION_CHANGE, FixPosition);
gameplay.removeEventListener(ShopGameEvent.CASH_UPDATE, updateCash);
gameplay.removeEventListener(ShopGameEvent.HALL_ON_UPDATE, checkHallCondition);
gameplay = theRoot.lastGameplay;
gameplay.main = this;
gameHour = gameplay.gameHour;
gameMinute = gameplay.gameMinute;
gameplay.addEventListener(ShopGameEvent.POSITION_CHANGE, FixPosition);
gameplay.addEventListener(ShopGameEvent.CASH_UPDATE, updateCash);
gameplay.addEventListener(ShopGameEvent.HALL_ON_UPDATE, checkHallCondition);
gameplay.x = (screenArea.width / 2);
gameplay.y = gameplay.bottomPosition;
};
theRoot.currentGameplay = gameplay;
addEventListener(Event.ENTER_FRAME, firstInit);
theRoot.addEventListener(TutorialEvent.TUTORIAL_END, finishTutorial);
addEventListener(ShopGameEvent.NEW_MISSION_SET, checkCurrentMission);
addEventListener(ShopGameEvent.MISSION_CHANGE, changeCurrentMission);
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, addUpgradeCounter);
initInterface();
drawSky();
menuPos = new Point((screenArea.width / 2), 100);
confirmationOnExit.x = (screenArea.width / 2);
confirmationOnExit.y = (screenArea.height / 2);
stage.addEventListener(MouseEvent.MOUSE_DOWN, MouseDownEvent);
stage.addEventListener(KeyboardEvent.KEY_UP, KeyboardOnKeyUp);
initTutorial();
theRoot.bgm = null;
GameInterface.soundControl.setMusicVolume(theRoot.bgmVolume);
GameInterface.soundControl.setSFXVolume(theRoot.sfxVolume);
}
function initTutorial():void{
theRoot.tutorialActive = "";
GameInterface.addEventListener(ToggleButtonEvent.ACTIVATE, checkHasTutorial);
GameInterface.miniMap.addEventListener(Event.ADDED_TO_STAGE, checkHasTutorial);
addEventListener(VisitorEvent.END_PROMOTE, checkHasTutorial);
addEventListener(BoothEvent.END_UPGRADE, checkHasTutorial);
}
function checkHasTutorial(_arg1:Event):void{
var _local2:* = _arg1.target;
if ((((_local2 as ToggleButton)) && ((_arg1.type == ToggleButtonEvent.ACTIVATE)))){
if (_local2 == GameInterface.btnShop){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_BOOTH) < 0){
setNewTutor(Tutorial.TUTOR_BUILD_BOOTH);
};
} else {
if (_local2 == GameInterface.btnFood){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_FOOD_CENTER) < 0){
setNewTutor(Tutorial.TUTOR_BUILD_FOOD_CENTER);
};
} else {
if (_local2 == GameInterface.btnEntertainment){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_ENTERTAINMENT) < 0){
setNewTutor(Tutorial.TUTOR_BUILD_ENTERTAINMENT);
};
} else {
if (_local2 == GameInterface.btnStaff){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_HIRE_STAFF) < 0){
setNewTutor(Tutorial.TUTOR_HIRE_STAFF);
};
} else {
if (_local2 == GameInterface.btnFacility){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_FACILITY) < 0){
setNewTutor(Tutorial.TUTOR_FACILITY);
} else {
if (runningMission != null){
if (runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase()){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_PARKING_LOT) < 0){
setNewTutor(Tutorial.TUTOR_BUILD_PARKING_LOT);
};
};
};
};
} else {
if (_local2 == GameInterface.btnExtra){
if (runningMission != null){
if (runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase()){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_PURCHASE_BASEMENT) < 0){
setNewTutor(Tutorial.TUTOR_PURCHASE_BASEMENT);
};
};
};
} else {
if (_local2 == GameInterface.btnMiniMap){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_MINI_MAP) < 0){
setNewTutor(Tutorial.TUTOR_MINI_MAP);
};
};
};
};
};
};
};
};
} else {
if (_arg1.type == Event.ADDED_TO_STAGE){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_MINI_MAP) < 0){
if (_arg1.currentTarget == GameInterface.miniMap){
setNewTutor(Tutorial.TUTOR_MINI_MAP);
};
};
} else {
if (_arg1.type == VisitorEvent.END_PROMOTE){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_PROMOTE_STAFF_WARNING) < 0){
setNewTutor(Tutorial.TUTOR_PROMOTE_STAFF_WARNING);
};
} else {
if (_arg1.type == BoothEvent.END_UPGRADE){
if (!theRoot.tipsIsExist("upgradeBooth")){
theRoot.addNewTips("upgradeBooth");
};
};
};
};
};
_arg1.currentTarget.removeEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
_arg1.currentTarget.removeEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
}
function skipTutorialForLatter(_arg1:Event):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if ((((_local2 as ToggleButton)) && ((((_arg1.type == ToggleButtonEvent.DEACTIVATE)) || ((_arg1.type == ToggleButtonEvent.FORCE_DEACTIVATE)))))){
if (theRoot.tutorialActive != ""){
_local3 = -1;
if (((!((tutorReq == null))) && (tutorReq.appearAgain))){
if (_local2 == GameInterface.btnShop){
_local3 = theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_BOOTH);
} else {
if (_local2 == GameInterface.btnFood){
_local3 = theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_FOOD_CENTER);
} else {
if (_local2 == GameInterface.btnEntertainment){
_local3 = theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_ENTERTAINMENT);
} else {
if (_local2 == GameInterface.btnStaff){
_local3 = theRoot.tutorialPass.indexOf(Tutorial.TUTOR_HIRE_STAFF);
} else {
if (_local2 == GameInterface.btnFacility){
_local3 = theRoot.tutorialPass.indexOf(Tutorial.TUTOR_FACILITY);
};
};
};
};
};
if ((_local3 in theRoot.tutorialPass)){
theRoot.tutorialPass.splice(_local3, 1);
};
theRoot.tutorialEnd();
};
};
};
}
function firstInit(_arg1:Event){
var _local2:*;
if (_country != null){
if (MissionList.isAllMissionComplete(_country, gameplay.missionActive)){
if (theRoot.getNumberCompleteMission() < 5){
GameInterface.currentMission.text = "Play on another country";
} else {
GameInterface.currentMission.text = "Thank you for playing";
};
GameInterface.rewardData.text = "-";
} else {
GameInterface.currentMission.text = "";
GameInterface.rewardData.text = "";
};
_local2 = (getChildIndex(_backContainer) + 1);
addChildAt(gameplay, _local2);
if (_landmark != null){
_landmark.gotoAndStop(_country);
};
updateLandmarkTime();
updateBackPosition();
dispatchEvent(new ShopGameEvent(ShopGameEvent.PLAY_THE_GAME));
removeEventListener(Event.ENTER_FRAME, firstInit);
};
}
function updateBackPosition():void{
var _local1:* = gameplay.localToGlobal(new Point(0, 0));
var _local2:* = (_local1.x - (screenArea.width / 2));
_backContainer.x = ((screenArea.width / 2) + (_local2 * 0.75));
_backContainer.y = _local1.y;
_landmark.x = ((screenArea.width / 2) + (_local2 * 0.5));
_landmark.y = _local1.y;
}
function setBoothAvailable():void{
var _local3:*;
var _local4:*;
var _local5:*;
_boothAvailable = BoothList.BOOTH_AVAILABLE.concat();
var _local1:* = theRoot.cityUnlocked.length;
var _local2:* = _local1;
while (_local2 < BoothList.BOOTH_ON_LEVEL.length) {
if ((_local2 in BoothList.BOOTH_ON_LEVEL)){
_local3 = 0;
while (_local3 < BoothList.BOOTH_ON_LEVEL[_local2].length) {
_local4 = BoothList.BOOTH_ON_LEVEL[_local2][_local3];
_local5 = _boothAvailable.indexOf(_local4);
if (_local5 >= 0){
_boothAvailable.splice(_local5, 1);
};
_local3++;
};
};
_local2++;
};
addEventListener(SectorPanelEvent.SECTOR_PANEL_ON_SHOW, sectorPanelShown);
}
function sectorPanelShown(_arg1:SectorPanelEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local2:* = _arg1.target;
var _local3:* = 0;
while (_local3 < _local2.numChildren) {
_local4 = _local2.getChildAt(_local3);
if ((_local4 as ToggleButton)){
_local5 = RelationList.BTN_CLASS_LIST.indexOf(Utility.getClass(_local4));
if ((_local5 in RelationList.BOOTH_CLASS_LIST)){
if (BoothList.BOOTH_AVAILABLE.indexOf(RelationList.BOOTH_CLASS_LIST[_local5]) >= 0){
_local6 = _boothAvailable.indexOf(RelationList.BOOTH_CLASS_LIST[_local5]);
_local4.visible = (_local6 in _boothAvailable);
};
};
};
_local3++;
};
if (_local2 == GameInterface.facilitySector){
_local2.btnParkingLot.visible = gameplay.checkUpgradeByName("Basement Lv 1");
_local2.btnSubway.visible = gameplay.checkUpgradeByName("Basement Lv 2");
};
_local3 = 0;
while (_local3 < _local2.numChildren) {
_local4 = _local2.getChildAt(_local3);
if (_local4.name.substr(0, "itemNumber".length) == "itemNumber"){
if (_local4.related.visible){
_local7 = RelationList.getRelationOf(Utility.getClass(_local4.related));
if (_local7 != null){
_local4.itemNumber.text = gameplay.countBoothOf(_local7);
} else {
_local4.itemNumber.text = "-";
};
} else {
_local4.itemNumber.text = "-";
};
} else {
if (_local4.name.substr(0, "staffNumber".length) == "staffNumber"){
_local7 = RelationList.getRelationOf(Utility.getClass(_local4.related));
_local4.itemNumber.text = gameplay.countStaffOf(_local7);
};
};
_local3++;
};
}
function KeyboardOnKeyUp(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (!_arg1.shiftKey){
if (_local2 == 80){
if (gameplay.canScroll){
if (GameInterface.btnPauseResume.buttonMode){
GameInterface.btnPauseResume.isActive = !(GameInterface.btnPauseResume.isActive);
};
};
};
};
}
function SoundManagement():void{
var _local1:*;
if (theRoot.bgm == null){
if ((((gameplay.gameHour >= 9)) && ((gameplay.gameHour < 22)))){
_local1 = BGMList.getMusicAt(_country, true);
if (_local1 != null){
theRoot.bgm = new (_local1);
};
} else {
theRoot.bgm = new BGMNight();
};
if (theRoot.bgm != null){
theRoot.bgmChannel = theRoot.bgm.play(0, 0, theRoot.bgmTransform);
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
};
} else {
if ((((gameplay.gameHour == 22)) && ((gameplay.gameMinute == 0)))){
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:theRoot.correctSoundChannel, onComplete:changeSound, onCompleteParams:[BGMNight]});
} else {
if ((((gameplay.gameHour == 9)) && ((gameplay.gameMinute == 0)))){
TweenLite.to(theRoot, 1, {bgmEnvirontment:0, onUpdate:theRoot.correctSoundChannel, onComplete:changeSound, onCompleteParams:[null]});
};
};
};
}
public function bgmCompleteCheck(_arg1:Event):void{
var _local2:*;
if (BGMList.compareBGM(Utility.getClass(theRoot.bgm), _country)){
_local2 = BGMList.getMusicAt(_country);
if (_local2 != null){
theRoot.bgm = new (_local2);
};
} else {
if (gameplay.hall != null){
if (BGMList.compareBGM(Utility.getClass(theRoot.bgm), gameplay.hall.currentEvent)){
_local2 = BGMList.getMusicAt(gameplay.hall.currentEvent);
if (_local2 != null){
theRoot.bgm = new (_local2);
};
};
};
};
theRoot.bgmChannel = theRoot.bgm.play(0, 0, theRoot.bgmTransform);
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
}
function updateLandmarkTime():void{
var _local1:*;
if (_landmark != null){
_local1 = _landmark.landmarkBody;
if (_local1 != null){
if (_local1.clock != null){
_local1.clock.hour = gameplay.gameHour;
_local1.clock.minute = gameplay.gameMinute;
};
};
};
}
function UpdateGame(_arg1:ShopGameEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
GameInterface.gameClock.hour = gameplay.gameHour;
GameInterface.gameClock.minute = gameplay.gameMinute;
updateLandmarkTime();
drawSky();
SoundManagement();
TutorialManagement();
MissionManagement();
if (theRoot.transferData != null){
if (gameplay.gameMinute == 0){
theRoot.transferData.transDelay--;
if (theRoot.transferData.transDelay <= 0){
_local2 = theRoot.transferData.targetCountry;
if (_local2 == _country){
addCash(theRoot.transferData.amount);
gameplay.transferInReport = (gameplay.transferInReport + theRoot.transferData.amount);
gameplay.showNotification(("You recieve cash from " + ShopText.convertToCountry(theRoot.transferData.fromCountry)));
} else {
theRoot.countryData[_local2].gameplay.cash = (theRoot.countryData[_local2].gameplay.cash + theRoot.transferData.amount);
theRoot.countryData[_local2].gameplay.transferInReport = (theRoot.countryData[_local2].gameplay.transferInReport + theRoot.transferData.amount);
if (theRoot.transferData.fromCountry != _country){
gameplay.showNotification(((("Your mall at " + ShopText.convertToCountry(theRoot.transferData.targetCountry)) + "\nrecieve cash from ") + ShopText.convertToCountry(theRoot.transferData.fromCountry)));
} else {
gameplay.showNotification((("Your mall at " + ShopText.convertToCountry(theRoot.transferData.targetCountry)) + " recieve cash from here"));
};
};
theRoot.transferData = null;
};
};
};
if ((((gameplay.gameMinute == 0)) || ((gameplay.gameMinute == 30)))){
theRoot.updateCountry(gameplay.gameHour, gameplay.gameMinute, gameplay);
};
if ((((gameplay.gameHour == 0)) && ((gameplay.gameMinute == 0)))){
updateStatistic();
if (GameInterface.budgetPage.reportCheckBox.isActive){
GameInterface.showStatistic(true);
};
gameplay.resetDay();
};
if ((((gameplay.gameHour == 9)) && ((gameplay.gameMinute == 0)))){
theRoot.saveGame(-1);
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_RESTROOM) < 0){
if (gameplay.restroomList.length <= 0){
_local3 = gameplay.visitorList.concat(gameplay.visitorVillainList.concat(gameplay.visitorSpecialList));
_local4 = false;
_local5 = 0;
while (_local5 < _local3.length) {
if (_local3[_local5].needToGo()){
_local4 = true;
break;
};
_local5++;
};
if (_local4){
setNewTutor(Tutorial.TUTOR_RESTROOM);
};
};
};
if ((((theRoot.numberCountryData() > 1)) && ((theRoot.tutorialActive == "")))){
if (gameCounter >= 1500){
if (!theRoot.tipsIsExist("extraUpgrade")){
theRoot.addNewTips("extraUpgrade");
};
} else {
gameCounter++;
};
};
}
function TutorialManagement():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (theRoot.tutorialActive == ""){
if (tutorialDelay > 0){
tutorialDelay--;
} else {
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BEGINING_TUTORIAL) < 0){
setNewTutor(Tutorial.TUTOR_BEGINING_TUTORIAL);
} else {
if (!theRoot.tipsIsExist("employeePlacement")){
if (gameplay.floorList.length >= 3){
theRoot.addNewTips("employeePlacement");
};
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_VISITOR_NEED) < 0){
if (gameplay.visitorList.length >= 3){
setNewTutor(Tutorial.TUTOR_VISITOR_NEED);
};
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_PARAMETER_BUTTON) < 0){
_local1 = ((((((gameplay.visitorList.length + gameplay.visitorVillainList.length) + gameplay.visitorSpecialList.length) + gameplay.janitorList.length) + gameplay.electricianList.length) + gameplay.securityList.length) + gameplay.entertainerList.length);
if (_local1 >= 20){
setNewTutor(Tutorial.TUTOR_PARAMETER_BUTTON);
};
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_HIRE_ELECTRICIAN) < 0){
if (gameplay.electricianList.length <= 0){
_local2 = gameplay.boothList.concat(gameplay.atmList);
_local3 = null;
_local4 = 0;
while (_local4 < _local2.length) {
if (_local2[_local4].boothIsBroken){
_local3 = _local2[_local4];
break;
};
_local4++;
};
if (_local3 != null){
setNewTutor(Tutorial.TUTOR_HIRE_ELECTRICIAN);
GameInterface.activeCCTV(gameplay, _local3);
};
};
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_HIRE_JANITOR) < 0){
if (gameplay.janitorList.length <= 0){
_local2 = gameplay.trashList.concat();
_local5 = null;
_local4 = 0;
while (_local4 < _local2.length) {
if ((((_local2[_local4].trashLevel > 10)) && (_local2[_local4].visible))){
_local5 = _local2[_local4];
break;
};
_local4++;
};
if (_local5 != null){
_local6 = new TutorArrow();
_local6.x = _local5.x;
_local6.y = (_local5.y - 10);
_local6.rotation = 135;
gameplay.containerLegend.addChild(_local6);
TweenLite.to(_local6, 4.8, {onComplete:_local6.parent.removeChild, onCompleteParams:[_local6]});
setNewTutor(Tutorial.TUTOR_HIRE_JANITOR);
GameInterface.activeCCTVOnPoint(gameplay, new Point(_local5.x, (_local5.y + 20)));
};
};
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_TRANSFER) < 0){
if (GameInterface.btnTransfer.enabled){
setNewTutor(Tutorial.TUTOR_TRANSFER);
};
};
};
};
} else {
if (tutorReq != null){
if (theRoot.tutorialTime <= 0){
if (tutorialPart.tutorialTextBox.textIsComplete){
theRoot.tutorialTime = tutorReq.tutorialDelay;
};
};
};
};
}
function gotoNextTutorial(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
if (_local2 == tutorialPart.tutorialTextBox){
removeUpdateTutorialListener();
while ((((tutorNextTarget.length > 0)) && ((tutorNextType.length > 0)))) {
removeGotoNextTutorialListener();
};
nextTutorial();
} else {
removeUpdateTutorialListener();
while ((((tutorNextTarget.length > 0)) && ((tutorNextType.length > 0)))) {
removeGotoNextTutorialListener();
};
if (theRoot.tutorialActive == Tutorial.TUTOR_BUILD_BOOTH){
nextTutorial();
GameInterface.removeEventListener(ToggleButtonEvent.ACTIVATE, buildBoothTutorPass);
} else {
nextTutorial();
};
};
}
function nextTutorial():void{
var _local1:*;
theRoot.tutorialTime = 0;
while (tutorArrow.length > 0) {
_local1 = tutorArrow.shift();
_local1.parent.removeChild(_local1);
};
if (tutorText != null){
if (tutorText.parent != null){
tutorText.parent.removeChild(tutorText);
};
tutorText = null;
};
if (((!((tutorReq == null))) && (!((tutorReq.tutorNext == null))))){
if (theRoot.tutorialPass.indexOf(tutorReq.tutorNext) < 0){
theRoot.tutorialActive = "";
setNewTutor(tutorReq.tutorNext);
};
} else {
theRoot.tutorialEnd();
};
}
function justClickTutorTextCountdown(_arg1:Event):void{
if (tutorTextDelay > 0){
tutorTextDelay--;
} else {
removeEventListener(Event.ENTER_FRAME, justClickTutorTextCountdown);
};
}
function addGotoNextTutorial(_arg1:Object, _arg2:String):void{
tutorNextTarget.push(_arg1);
tutorNextType.push(_arg2);
_arg1.addEventListener(_arg2, gotoNextTutorial);
}
function addUpdateTutorialListener(_arg1:Object, _arg2:String):void{
tutorTarget = _arg1;
tutorType = _arg2;
tutorTarget.addEventListener(tutorType, updateTutorial);
}
function removeGotoNextTutorialListener():void{
var _local1:*;
var _local2:*;
if ((((tutorNextTarget.length > 0)) && ((tutorNextType.length > 0)))){
_local1 = tutorNextTarget.shift();
_local2 = tutorNextType.shift();
_local1.removeEventListener(_local2, gotoNextTutorial);
};
}
function removeUpdateTutorialListener():void{
if (((!((tutorTarget == null))) && (!((tutorType == ""))))){
tutorTarget.removeEventListener(tutorType, updateTutorial);
tutorTarget = null;
tutorType = "";
};
}
function updateTutorial(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (theRoot.tutorialActive != ""){
_local2 = new Point(0, 0);
switch (theRoot.tutorialActive){
case Tutorial.TUTOR_PURCHASE_BASEMENT:
if ((0 in tutorArrow)){
if (GameInterface.upgradeSector.parent != null){
_local3 = null;
_local4 = 0;
while (_local4 < GameInterface.upgradeSector.detailBoxList.length) {
if (GameInterface.upgradeSector.detailBoxList[_local4].upgradeTitle.text == "Basement Lv 1".toUpperCase()){
_local3 = GameInterface.upgradeSector.detailBoxList[_local4];
break;
};
_local4++;
};
};
if (_local3 != null){
if (theRoot.tutorialActive == Tutorial.TUTOR_PURCHASE_BASEMENT){
_local2 = _local3.localToGlobal(new Point((_local3.btnPurchase.x + (_local3.btnPurchase.width / 2)), _local3.btnPurchase.y));
};
};
if ((0 in tutorArrow)){
tutorArrow[0].x = _local2.x;
tutorArrow[0].y = _local2.y;
};
};
break;
case Tutorial.TUTOR_BUILD_PARKING_LOT:
if (GameInterface.currentSector == GameInterface.facilitySector){
_local5 = GameInterface.currentSector;
_local6 = _local5.btnParkingLot;
_local2 = _local5.localToGlobal(new Point((_local6.x + _local6.width), _local6.y));
};
if ((0 in tutorArrow)){
tutorArrow[0].x = _local2.x;
tutorArrow[0].y = _local2.y;
};
break;
};
};
}
function buildBoothTutorPass(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _arg1.target;
if ((((GameInterface.currentSector == GameInterface.shopSector)) || ((GameInterface.currentSector == GameInterface.foodSector)))){
if ((((_local3.parent == GameInterface.currentSector)) && ((_local3 as ToggleButton)))){
nextTutorial();
_local2.removeEventListener(_arg1.type, buildBoothTutorPass);
};
};
}
function checkHitWithBuildSymbol(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
if (_local2.hitTestPoint(stage.mouseX, stage.mouseY, true)){
_local2.alpha = 1;
} else {
if (gameplay.buildSymbol != null){
if (_local2.hitTestObject(gameplay.buildSymbol)){
_local2.alpha = 0.6;
} else {
_local2.alpha = 1;
};
} else {
if (gameplay.hireSymbol != null){
if (_local2.hitTestObject(gameplay.hireSymbol)){
_local2.alpha = 0.6;
} else {
_local2.alpha = 1;
};
} else {
_local2.alpha = 1;
};
};
};
_local2.parent.mouseEnabled = (_local2.alpha == 1);
}
public function setNewTutor(_arg1:String):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
if (theRoot.tutorialActive != ""){
if (tutorReq != null){
if (tutorReq.appearAgain){
_local2 = theRoot.tutorialPass.indexOf(theRoot.tutorialActive);
if ((_local2 in theRoot.tutorialPass)){
theRoot.tutorialPass.splice(_local2, 1);
};
};
tutorReq.tutorNext = _arg1;
tutorReq.nextShowWithoutSkip = true;
};
tutorialPart.stopMessage();
theRoot.tutorialEnd();
} else {
theRoot.tutorialActive = _arg1;
tutorialDelay = 3;
theRoot.tutorialPass.push(theRoot.tutorialActive);
if (theRoot.tutorialActive != ""){
tutorReq = Tutorial.getTutorialRequirment(theRoot.tutorialActive);
if (tutorReq != null){
switch (theRoot.tutorialActive){
case Tutorial.TUTOR_PURCHASE_BASEMENT:
if (gameplay.checkUpgradeByName("Basement Lv 1")){
if (((!((runningMission == null))) && ((runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))){
tutorReq.numArrow = 0;
tutorReq.tutorText = Tutorial.TUTOR_TEXT_ALREADY_PURCHASE_BASEMENT;
};
} else {
addUpdateTutorialListener(gameplay, Event.ENTER_FRAME);
};
break;
case Tutorial.TUTOR_FACILITY:
if (((!((runningMission == null))) && ((runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BUILD_PARKING_LOT) < 0){
tutorReq.tutorNext = Tutorial.TUTOR_BUILD_PARKING_LOT;
tutorReq.nextShowWithoutSkip = true;
};
};
break;
case Tutorial.TUTOR_BUILD_PARKING_LOT:
addUpdateTutorialListener(gameplay, Event.ENTER_FRAME);
break;
case Tutorial.TUTOR_HIRE_JANITOR:
setFlashingOn(GameInterface.staffSector.btnJanitor);
setFlashingOn(GameInterface.btnStaff);
break;
case Tutorial.TUTOR_HIRE_ELECTRICIAN:
setFlashingOn(GameInterface.staffSector.btnElectrician);
setFlashingOn(GameInterface.btnStaff);
break;
case Tutorial.TUTOR_HIRE_SECURITY:
setFlashingOn(GameInterface.staffSector.btnSecurity);
setFlashingOn(GameInterface.btnStaff);
break;
};
if (tutorReq.appearAgain){
switch (theRoot.tutorialActive){
case Tutorial.TUTOR_BUILD_BOOTH:
tutorFulfilledType = BoothEvent.CREATED;
GameInterface.btnShop.addEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
GameInterface.btnShop.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
break;
case Tutorial.TUTOR_BUILD_FOOD_CENTER:
tutorFulfilledType = BoothEvent.CREATED;
GameInterface.btnFood.addEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
GameInterface.btnFood.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
break;
case Tutorial.TUTOR_BUILD_ENTERTAINMENT:
tutorFulfilledType = BoothEvent.CREATED;
GameInterface.btnEntertainment.addEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
GameInterface.btnEntertainment.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
break;
case Tutorial.TUTOR_HIRE_STAFF:
tutorFulfilledType = ShopGameEvent.HIRE_STAFF;
GameInterface.btnStaff.addEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
GameInterface.btnStaff.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
break;
case Tutorial.TUTOR_FACILITY:
tutorFulfilledType = BoothEvent.CREATED;
GameInterface.btnFacility.addEventListener(ToggleButtonEvent.DEACTIVATE, skipTutorialForLatter);
GameInterface.btnFacility.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, skipTutorialForLatter);
break;
};
if (tutorFulfilledType != null){
addEventListener(tutorFulfilledType, checkFulfilledTutor);
addEventListener(TutorialEvent.TUTORIAL_END, stopCheckFulfilled);
};
};
if (tutorReq.tipsAdd){
theRoot.addNewTips(tutorReq.tipsAdd);
};
if (theRoot.tutorialShown){
while (tutorArrow.length < tutorReq.numArrow) {
_local4 = new TutorArrow();
if ((tutorArrow.length in tutorReq.arrowAngle)){
_local4.rotation = tutorReq.arrowAngle[tutorArrow.length];
};
if (((!((tutorReq.arrowPos == null))) && ((tutorArrow.length in tutorReq.arrowPos)))){
_local4.x = tutorReq.arrowPos[tutorArrow.length][0];
_local4.y = tutorReq.arrowPos[tutorArrow.length][1];
};
_local4.mouseEnabled = false;
tutorArrow.push(_local4);
tutorialContainer.addChild(_local4);
};
_local3 = tutorReq.tutorText;
_local3 = _local3.replace(/&gr/g, "<font color = '#3a7a24'>");
_local3 = _local3.replace(/&rd/g, "<font color = '#FF0033'>");
_local3 = _local3.replace(/%ft/g, "</font>");
tutorialPart.text = _local3;
if (getChildByName(tutorialPart.name) == null){
_local5 = getChildIndex(mouseContainer);
addChildAt(tutorialPart, (_local5 - 1));
} else {
tutorialPart.showTutorText();
};
tutorialPart.tutorialTextBox.addEventListener(Event.ENTER_FRAME, checkHitWithBuildSymbol);
if (tutorReq.skipable){
addGotoNextTutorial(tutorialPart.tutorialTextBox, MouseEvent.CLICK);
};
} else {
theRoot.tutorialActive = "";
};
} else {
tutorReq.nextShowWithoutSkip = true;
theRoot.tutorialEnd();
};
};
};
}
function checkFulfilledTutor(_arg1:Event):void{
var _local2:* = _arg1.target;
if (tutorReq != null){
switch (theRoot.tutorialActive){
case Tutorial.TUTOR_BUILD_BOOTH:
tutorReq.appearAgain = !((BoothList.GENERAL_STORE_LIST.indexOf(Utility.getClass(_local2)) >= 0));
break;
case Tutorial.TUTOR_BUILD_FOOD_CENTER:
tutorReq.appearAgain = !((BoothList.FOOD_CENTER_LIST.indexOf(Utility.getClass(_local2)) >= 0));
break;
case Tutorial.TUTOR_BUILD_ENTERTAINMENT:
tutorReq.appearAgain = !((BoothList.ENTERTAINMENT_LIST.indexOf(Utility.getClass(_local2)) >= 0));
break;
case Tutorial.TUTOR_HIRE_STAFF:
tutorReq.appearAgain = false;
break;
case Tutorial.TUTOR_FACILITY:
tutorReq.appearAgain = !((gameplay.facilityList.length > 0));
break;
};
if (!tutorReq.appearAgain){
if (tutorFulfilledType != null){
removeEventListener(tutorFulfilledType, checkFulfilledTutor);
tutorFulfilledType = null;
};
removeEventListener(TutorialEvent.TUTORIAL_END, stopCheckFulfilled);
};
};
}
function stopCheckFulfilled(_arg1:TutorialEvent):void{
if (tutorFulfilledType != null){
removeEventListener(tutorFulfilledType, checkFulfilledTutor);
tutorFulfilledType = null;
};
removeEventListener(TutorialEvent.TUTORIAL_END, stopCheckFulfilled);
}
function MissionManagement():void{
if ((((theRoot.tutorialPass.indexOf(Tutorial.TUTOR_BEGINING_TUTORIAL) >= 0)) && ((theRoot.tutorialActive == "")))){
if (runningMission == null){
runningMission = MissionList.getMission(_country, gameplay.missionActive);
if (runningMission != null){
GameInterface.setCurrentMission(runningMission);
};
};
};
}
public function setFlashingOn(_arg1:DisplayObject):void{
ShopFilter.flashing(_arg1, 0xFFFFFF);
_arg1.addEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
}
function stopFlashing(_arg1:ToggleButtonEvent):void{
ShopFilter.stopFlashing(_arg1.currentTarget);
if (_arg1.currentTarget == GameInterface.btnShop){
ShopFilter.stopFlashing(GameInterface.btnFood);
GameInterface.btnFood.removeEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
};
if (_arg1.currentTarget == GameInterface.btnFood){
ShopFilter.stopFlashing(GameInterface.btnShop);
GameInterface.btnShop.removeEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
};
if (_arg1.currentTarget == GameInterface.facilitySector.btnElevator){
ShopFilter.stopFlashing(GameInterface.facilitySector.btnEscalator);
GameInterface.facilitySector.btnEscalator.removeEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
};
if (_arg1.currentTarget == GameInterface.facilitySector.btnEscalator){
ShopFilter.stopFlashing(GameInterface.facilitySector.btnElevator);
GameInterface.facilitySector.btnElevator.removeEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
};
_arg1.currentTarget.removeEventListener(ToggleButtonEvent.ACTIVATE, stopFlashing);
}
function checkCurrentMission(_arg1:ShopGameEvent):void{
var _local2:*;
if (runningMission != null){
if (runningMission.note.toUpperCase() == "Build a booth".toUpperCase()){
if (!((GameInterface.btnShop.isActive) || (GameInterface.btnFood.isActive))){
setFlashingOn(GameInterface.btnShop);
setFlashingOn(GameInterface.btnFood);
};
} else {
if (runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase()){
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_PARKING_LOT_INFO) < 0){
setNewTutor(Tutorial.TUTOR_PARKING_LOT_INFO);
};
};
};
};
if (MissionList.checkMission(gameplay, runningMission)){
_missionIsSuccess = true;
successCurrentMission();
dispatchEvent(new ShopGameEvent(ShopGameEvent.MISSION_COMPLETE));
} else {
_local2 = ((runningMission.condition.indexOf(" "))>=0) ? runningMission.condition.substr(0, runningMission.condition.indexOf(" ")) : runningMission.condition;
if (["booth", "restroom", "elevator", "escalator", "upperEscalator", "atm", "terrace", "floorNum", "hall", "parking", "subway", "boothComplete"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.BOOTH_CREATED, checkMissionSucceed);
} else {
if (["visitor", "spVisitor", "spVisitorComplete"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.VISITOR_ARRIVE, checkMissionSucceed);
} else {
if (["spVisitorType"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(ShopGameEvent.VISITOR_ARRIVE, checkMissionSucceed);
} else {
if (["janitor", "electrician", "security", "entertainer", "staff"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.HIRE_STAFF, checkMissionSucceed);
} else {
if (["boothFloor", "boothType"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(ShopGameEvent.BOOTH_CREATED, checkMissionSucceed);
} else {
if (["staffLevel"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(VisitorEvent.END_PROMOTE, checkMissionSucceed);
} else {
if (["boothLevel", "boothLevelType", "elevatorLevel", "escalatorLevel", "parkingLevel", "boothCompleteLevel"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(BoothEvent.END_UPGRADE, checkMissionSucceed);
} else {
if (["hallLevel"].indexOf(_local2) >= 0){
addEventListener(BoothEvent.END_UPGRADE, checkMissionSucceed);
} else {
if (["statisfied"].indexOf(_local2) >= 0){
gameplay.setStatificationMission();
addEventListener(ShopGameEvent.UPDATE, checkMissionSucceed);
} else {
if (["transfer"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.UPDATE, checkMissionSucceed);
} else {
if (["safeYourMall"].indexOf(_local2) >= 0){
gameplay.setSafeMallMission();
addEventListener(ShopGameEvent.UPDATE, checkMissionSucceed);
} else {
if (["hallEvent"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(ShopGameEvent.UPDATE, checkMissionSucceed);
} else {
if (["runEvent"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
gameplay.setRunningEventMission();
addEventListener(ShopGameEvent.UPDATE, checkMissionSucceed);
} else {
if (["banditCaptured", "banditCapturedOneNight"].indexOf(_local2) >= 0){
gameplay.setBanditCapturedMission((_local2 == "banditCapturedOneNight"));
addEventListener(VisitorEvent.BEGIN_ARRESTED, checkMissionSucceed);
} else {
if (["villainCaptured"].indexOf(_local2) >= 0){
gameplay.setVillainCapturedMission();
addEventListener(VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL, checkMissionSucceed);
} else {
if (["popularity"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.POPULARITY_UPDATE, checkMissionSucceed);
} else {
if (["extra", "extraComplete"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.PURCHASE_EXTRA_UPGRADE, checkMissionSucceed);
} else {
if (["extraType", "extraExcept"].indexOf(_local2.substr(0, _local2.indexOf("("))) >= 0){
addEventListener(ShopGameEvent.PURCHASE_EXTRA_UPGRADE, checkMissionSucceed);
} else {
if (["cash"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.CASH_UPDATE, checkMissionSucceed);
} else {
if (["profit"].indexOf(_local2) >= 0){
addEventListener(ShopGameEvent.CHANGE_DAY, checkMissionSucceed);
} else {
if (["comboFound"].indexOf(_local2) >= 0){
gameplay.setComboMission();
addEventListener(ShopGameEvent.COMBO_FOUND, checkMissionSucceed);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
}
function changeCurrentMission(_arg1:ShopGameEvent):void{
_missionIsSuccess = false;
gameplay.missionActive++;
gameplay.banditCaptured = 0;
gameplay.villainCaptured = 0;
gameplay.missionVar = 0;
runningMission = null;
if (MissionList.isAllMissionComplete(_country, gameplay.missionActive)){
if (theRoot.getNumberCompleteMission() < 5){
GameInterface.setTextMission("Play on another country");
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_END_MISSION) < 0){
setNewTutor(Tutorial.TUTOR_END_MISSION);
};
} else {
GameInterface.setTextMission("Thank you for playing");
};
};
}
public function getCurrentMission():uint{
if (_missionIsSuccess){
return ((gameplay.missionActive + 1));
};
return (gameplay.missionActive);
}
function checkMissionSucceed(_arg1:Event):void{
if (MissionList.checkMission(gameplay, runningMission)){
_missionIsSuccess = true;
successCurrentMission();
_arg1.currentTarget.removeEventListener(_arg1.type, checkMissionSucceed);
dispatchEvent(new ShopGameEvent(ShopGameEvent.MISSION_COMPLETE));
};
}
function successCurrentMission():void{
var _local1:*;
var _local2:*;
if ((runningMission.reward as Number)){
_local1 = new Point(GameInterface.rewardMask.x, GameInterface.rewardMask.y);
addCash(runningMission.reward, _local1);
gameplay.miscInReport = (gameplay.miscInReport + runningMission.reward);
} else {
if (runningMission.reward == "Unlock Rusia"){
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_RUSIA) < 0){
theRoot.cityUnlocked.push(ShopText.MAP_RUSIA);
};
} else {
if (runningMission.reward == "Unlock Arabia"){
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_ARABIAN) < 0){
theRoot.cityUnlocked.push(ShopText.MAP_ARABIAN);
};
} else {
if (runningMission.reward == "Unlock Italy"){
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_ITALY) < 0){
theRoot.cityUnlocked.push(ShopText.MAP_ITALY);
};
} else {
if (runningMission.reward == "Unlock U.K"){
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_BRITAIN) < 0){
theRoot.cityUnlocked.push(ShopText.MAP_BRITAIN);
};
};
};
};
};
};
if (MissionList.isLastMission(_country, gameplay.missionActive)){
if (theRoot.getNumberCompleteMission() < 5){
_local2 = new fxcompleteallmission();
_local2.x = (theRoot.globalMask.x + (theRoot.globalMask.width / 2));
_local2.y = (theRoot.globalMask.y + (theRoot.globalMask.height / 2));
_local2.mouseEnabled = false;
_local2.alpha = 0.8;
addChild(_local2);
setFlashingOn(GameInterface.btnWorldMap);
} else {
_local2 = new fxending();
_local2.x = (theRoot.globalMask.x + (theRoot.globalMask.width / 2));
_local2.y = (theRoot.globalMask.y + (theRoot.globalMask.height / 2));
_local2.stop();
_local2.name = "Ending";
addChild(_local2);
_local2.linkFacebook.addEventListener(MouseEvent.CLICK, linkToFacebook);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, endingRemoved);
TweenLite.from(_local2, 0.5, {scaleX:0, scaleY:0, onComplete:playEnding, onCompleteParams:[_local2]});
};
};
GameInterface.clearCurrentMission();
gameplay.disableMissionListener();
}
function linkToFacebook(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.facebook.com/Littlegiantworld");
navigateToURL(_local2, "_blank");
}
function endingRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.stop();
_local2.linkFacebook.removeEventListener(MouseEvent.CLICK, linkToFacebook);
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, endingRemoved);
}
function playEnding(_arg1:Object):void{
_arg1.play();
TweenLite.to(_arg1, 20, {onComplete:TweenLite.to, onCompleteParams:[_arg1, 0.5, {scaleX:0, scaleY:0, onComplete:_arg1.parent.removeChild, onCompleteParams:[_arg1]}]});
}
function finishTutorial(_arg1:TutorialEvent):void{
var _local2:*;
removeUpdateTutorialListener();
if ((((((tutorReq == null)) || ((tutorReq.tutorNext == null)))) || (tutorReq.nextShowWithoutSkip))){
while ((((tutorNextTarget.length > 0)) && ((tutorNextType.length > 0)))) {
removeGotoNextTutorialListener();
};
};
if (theRoot.tutorialActive == Tutorial.TUTOR_PARKING_LOT_INFO){
setFlashingOn(GameInterface.btnExtra);
};
if (theRoot.tutorialActive == Tutorial.TUTOR_PURCHASE_BASEMENT){
if (gameplay.checkUpgradeByName("Basement Lv 1")){
setFlashingOn(GameInterface.btnFacility);
};
};
tutorialPart.tutorialTextBox.textIsComplete = false;
if (((!((tutorReq == null))) && (!((tutorReq.tutorNext == null))))){
if (tutorReq.nextShowWithoutSkip){
while (tutorArrow.length > 0) {
_local2 = tutorArrow.shift();
_local2.parent.removeChild(_local2);
};
if (theRoot.tutorialPass.indexOf(tutorReq.tutorNext) < 0){
theRoot.tutorialActive = "";
setNewTutor(tutorReq.tutorNext);
} else {
if (tutorialPart.parent != null){
tutorialPart.tutorialTextBox.removeEventListener(Event.ENTER_FRAME, checkHitWithBuildSymbol);
tutorialPart.disappear();
};
theRoot.tutorialActive = "";
tutorReq = null;
};
} else {
tutorialPart.tutorialTextBox.visible = false;
};
} else {
while (tutorArrow.length > 0) {
_local2 = tutorArrow.shift();
_local2.parent.removeChild(_local2);
};
if (tutorialPart.parent != null){
tutorialPart.tutorialTextBox.removeEventListener(Event.ENTER_FRAME, checkHitWithBuildSymbol);
tutorialPart.disappear();
};
theRoot.tutorialActive = "";
tutorReq = null;
};
}
public function setCountMission(_arg1:int):void{
GameInterface.setCountOf(runningMission, _arg1);
}
public function setExtraTextMission(_arg1:String):void{
GameInterface.setExtraTextOf(runningMission, _arg1);
}
function resetTextForBudget():void{
descriptionText = "";
visitorText = "";
incomeText = "";
expenditureText = "";
profitText = "";
totalProfit = 0;
}
function addTextForBudget(_arg1="", _arg2="", _arg3="", _arg4="", _arg5=""):void{
descriptionText = (descriptionText + _arg1);
visitorText = (visitorText + _arg2);
incomeText = (incomeText + _arg3);
expenditureText = (expenditureText + _arg4);
profitText = (profitText + _arg5);
}
function addSpaceForBudget():void{
addTextForBudget("\n", "\n", "\n", "\n", "\n");
}
function addBudgetList(_arg1="", _arg2=0, _arg3=0, _arg4=0):void{
var _local5:* = _arg1;
var _local6:* = ((_arg2)<0) ? "-" : (("" + _arg2) + "");
var _local7:* = ((_arg3)<0) ? "-" : ("$ " + Utility.numberToMoney(_arg3));
var _local8:* = ((_arg4)<0) ? "-" : ("$ " + Utility.numberToMoney(_arg4));
if (_arg3 > 0){
_local7 = (("<font color='#0000FF'>" + _local7) + "</font>");
};
if (_arg4 > 0){
_local8 = (("<font color='#FF0000'>" + _local8) + "</font>");
};
var _local9:* = (Math.max(_arg3, 0) - Math.max(_arg4, 0));
var _local10:* = ("$ " + Utility.numberToMoney(_local9));
if (_local9 > 0){
_local10 = (("<font color='#0000FF'>" + _local10) + "</font>");
} else {
if (_local9 < 0){
_local10 = (("<font color='#FF0000'>" + _local10) + "</font>");
};
};
totalProfit = (totalProfit + _local9);
addTextForBudget(_local5, _local6, _local7, _local8, _local10);
}
function updateStatistic():void{
var _local5:*;
resetTextForBudget();
addTextForBudget("Booths");
var _local1:* = gameplay.boothList.concat();
_local1.sortOn("boothName");
var _local2:* = 0;
while (_local2 < _local1.length) {
addSpaceForBudget();
_local5 = _local1[_local2];
addBudgetList((" " + _local5.boothName), _local5.visitorVisit, _local5.revenue, -1);
_local2++;
};
addSpaceForBudget();
if (gameplay.hall != null){
addBudgetList("Hall report", gameplay.hall.visitorVisit, gameplay.hall.revenue, gameplay.hall.addEventCost);
addSpaceForBudget();
};
if (gameplay.buildBoothReport > 0){
addSpaceForBudget();
addBudgetList("Build booths", -1, -1, gameplay.buildBoothReport);
};
if (gameplay.buildFacilityReport > 0){
addSpaceForBudget();
addBudgetList("Build facilities", -1, -1, gameplay.buildFacilityReport);
};
if (gameplay.upgradeReport > 0){
addSpaceForBudget();
addBudgetList("Upgrade report", -1, -1, gameplay.upgradeReport);
};
addSpaceForBudget();
addSpaceForBudget();
addBudgetList("Hire new staff", -1, -1, gameplay.hireReport);
addSpaceForBudget();
addTextForBudget("Staff's salaries");
var _local3:* = 0;
var _local4:* = gameplay.janitorList.length;
_local2 = 0;
while (_local2 < _local4) {
_local5 = gameplay.janitorList[_local2];
_local3 = (_local3 + _local5.paid);
_local2++;
};
addSpaceForBudget();
addBudgetList(((((" Janitor" + ((_local4)>1) ? "s" : "") + "(") + _local4) + ")"), -1, -1, _local3);
_local3 = 0;
_local4 = gameplay.electricianList.length;
_local2 = 0;
while (_local2 < _local4) {
_local5 = gameplay.electricianList[_local2];
_local3 = (_local3 + _local5.paid);
_local2++;
};
addSpaceForBudget();
addBudgetList(((((" Electrician" + ((_local4)>1) ? "s" : "") + "(") + _local4) + ")"), -1, -1, _local3);
_local3 = 0;
_local4 = gameplay.securityList.length;
_local2 = 0;
while (_local2 < _local4) {
_local5 = gameplay.securityList[_local2];
_local3 = (_local3 + _local5.paid);
_local2++;
};
addSpaceForBudget();
addBudgetList(((((" Securit" + ((_local4)>1) ? "ies" : "y") + "(") + _local4) + ")"), -1, -1, _local3);
_local3 = 0;
_local4 = gameplay.entertainerList.length;
_local2 = 0;
while (_local2 < _local4) {
_local5 = gameplay.entertainerList[_local2];
_local3 = (_local3 + _local5.paid);
_local2++;
};
addSpaceForBudget();
addBudgetList(((((" Entertainer" + ((_local4)>1) ? "s" : "") + "(") + _local4) + ")"), -1, -1, _local3);
if (gameplay.extraReport != 0){
addSpaceForBudget();
addSpaceForBudget();
addBudgetList("Extra upgrade", -1, -1, gameplay.extraReport);
};
addSpaceForBudget();
if (((!((gameplay.transferInReport == 0))) || (!((gameplay.transferOutReport == 0))))){
addSpaceForBudget();
addBudgetList("Transfer", -1, gameplay.transferInReport, gameplay.transferOutReport);
};
addSpaceForBudget();
addBudgetList("Miscellaneous", -1, gameplay.miscInReport, gameplay.miscOutReport);
GameInterface.budgetPage.descriptionList.text = descriptionText;
GameInterface.budgetPage.visitorList.text = visitorText;
GameInterface.budgetPage.incomeList.htmlText = incomeText;
GameInterface.budgetPage.expenditureList.htmlText = expenditureText;
GameInterface.budgetPage.profitList.htmlText = profitText;
GameInterface.budgetPage.totalEarning.text = Utility.numberToMoney(totalProfit);
gameplay.profit = totalProfit;
if (totalProfit > 0){
GameInterface.budgetPage.totalEarning.textColor = 1543218;
GameInterface.budgetPage.dolarSymbol.textColor = 1543218;
} else {
GameInterface.budgetPage.totalEarning.textColor = 0xFF0000;
GameInterface.budgetPage.dolarSymbol.textColor = 0xFF0000;
};
GameInterface.budgetPage.checkSlideBar();
}
public function changeSound(_arg1:Class):void{
theRoot.bgmEnvirontment = 1;
theRoot.bgmChannel.stop();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
theRoot.bgmTransform.volume = (theRoot.bgmVolume * theRoot.bgmEnvirontment);
if (_arg1 != null){
theRoot.bgm = new (_arg1);
theRoot.bgmChannel = theRoot.bgm.play(0, 0, theRoot.bgmTransform);
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
} else {
theRoot.bgm = null;
};
}
function cancelBuildProgress(_arg1:ShopGameEvent):void{
stage.removeEventListener(MouseEvent.CLICK, buildBuilding);
stage.removeEventListener(KeyboardEvent.KEY_UP, cancelBuildBuilding);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, flipBooth);
stage.removeEventListener(MouseEvent.CLICK, hireStaff);
stage.removeEventListener(KeyboardEvent.KEY_UP, cancelHireStaff);
buttonContainer.removeChild(btnCancel);
btnCancel.removeEventListener(MouseEvent.CLICK, cancelBuildBuildingByMouse);
btnCancel.removeEventListener(MouseEvent.CLICK, cancelHireStaffByMouse);
if (buttonContainer.getChildByName(btnReverse.name)){
buttonContainer.removeChild(btnReverse);
btnReverse.removeEventListener(MouseEvent.CLICK, flipBoothWithMouse);
};
if (buttonContainer.getChildByName(workTimeSetting.name)){
buttonContainer.removeChild(workTimeSetting);
workTimeSetting.btnClose.removeEventListener(MouseEvent.CLICK, cancelHireStaffByMouse);
};
}
function checkCurrentStaff(_arg1:ShopGameEvent):void{
var _local3:*;
var _local2:* = (((gameplay.janitorList.length + gameplay.electricianList.length) + gameplay.securityList.length) + gameplay.entertainerList.length);
GameInterface.btnDetailStaff.amount.text = (("" + _local2) + "");
if (_arg1.type == ShopGameEvent.HIRE_STAFF){
_local3 = _arg1.target;
if (workTimeSetting.getSelectedShift() == 0){
if ((_local3 is CrewEntertainer)){
_local3.startWorkTime = 10;
_local3.finishWorkTime = 16;
} else {
_local3.startWorkTime = 9;
_local3.finishWorkTime = 19;
};
} else {
if (workTimeSetting.getSelectedShift() == 1){
if ((_local3 is CrewEntertainer)){
_local3.startWorkTime = 16;
_local3.finishWorkTime = 22;
} else {
_local3.startWorkTime = 19;
_local3.finishWorkTime = 5;
};
} else {
if ((_local3 is CrewEntertainer)){
_local3.startWorkTime = 10;
_local3.finishWorkTime = 22;
} else {
_local3.startWorkTime = 9;
_local3.finishWorkTime = 5;
};
};
};
if (skipConfirm){
_local3.workArea = (gameplay.floorList.indexOf(_local3.onFloor) + 1);
};
if (!theRoot.tipsIsExist("employeeSchedule")){
theRoot.addNewTips("employeeSchedule");
};
};
}
function checkCurrentVisitor(_arg1:ShopGameEvent):void{
var _local2:* = ((gameplay.visitorList.length + gameplay.visitorVillainList.length) + gameplay.visitorSpecialList.length);
GameInterface.btnDetailVisitor.amount.text = (("" + _local2) + "");
}
function checkCurrentBooth(_arg1:ShopGameEvent):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local2:* = gameplay.boothList.length;
GameInterface.btnDetailBooth.amount.text = (("" + _local2) + "");
var _local3:* = new Array();
var _local4:* = gameplay.boothList.concat(gameplay.facilityList);
if (gameplay.hall != null){
_local4.push(gameplay.hall);
};
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = Utility.getClass(_local4[_local5]);
if (_local3.indexOf(_local6) < 0){
_local3.push(_local6);
};
_local5++;
};
if (GameInterface.currentSector != null){
_local5 = 0;
while (_local5 < GameInterface.currentSector.numChildren) {
_local6 = GameInterface.currentSector.getChildAt(_local5);
if (_local6.name.substr(0, "itemNumber".length) == "itemNumber"){
if (_local6.related.visible){
_local7 = RelationList.BTN_CLASS_LIST.indexOf(Utility.getClass(_local6.related));
if ((_local7 in RelationList.BOOTH_CLASS_LIST)){
_local8 = RelationList.BOOTH_CLASS_LIST[_local7];
_local6.itemNumber.text = gameplay.countBoothOf(_local8);
} else {
_local6.itemNumber.text = "-";
};
} else {
_local6.itemNumber.text = "-";
};
};
_local5++;
};
};
if (gameplay.subwayList.length < 2){
GameInterface.facilitySector.btnSubway.enableButton();
GameInterface.facilitySector.btnSubway.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
GameInterface.facilitySector.btnSubway.disableButton();
GameInterface.facilitySector.btnSubway.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
gameplay.boothCompletionPopularity = ((_local3.length / ((BoothList.BOOTH_AVAILABLE.length + BoothList.FACILITY_LIST.length) + 1)) * 100);
if (_arg1.type == BoothEvent.DESTROYED){
theRoot.playSound(SFXFirework);
};
}
function initInterface():void{
var _local1:* = (((gameplay.janitorList.length + gameplay.electricianList.length) + gameplay.securityList.length) + gameplay.entertainerList.length);
GameInterface.btnDetailStaff.amount.text = (("" + _local1) + "");
var _local2:* = (gameplay.visitorList.length + gameplay.visitorVillainList.length);
GameInterface.btnDetailVisitor.amount.text = (("" + _local2) + "");
var _local3:* = gameplay.boothList.length;
GameInterface.btnDetailBooth.amount.text = (("" + _local3) + "");
GameInterface.miniMap.world = gameplay;
GameInterface.visitorDetail.world = gameplay;
GameInterface.staffDetail.world = gameplay;
GameInterface.boothDetail.world = gameplay;
GameInterface.upgradeSector.world = gameplay;
GameInterface.cash = gameplay.cash;
GameInterface.gameClock.hour = gameHour;
GameInterface.gameClock.minute = gameMinute;
GameInterface.popularityMeter.text = (("" + Math.max(0, Math.min(100, Math.round(gameplay.popularity)))) + "%");
GameInterface.btnTransfer.enabled = (((((theRoot.cityUnlocked.length > 1)) && ((theRoot.numberCountryData() > 1)))) && ((theRoot.transferCountdown <= 0)));
if (GameInterface.btnTransfer.enabled){
GameInterface.btnTransfer.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
GameInterface.btnTransfer.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
initBudget();
addEventListener(ShopGameEvent.POPULARITY_UPDATE, updatePopularity);
addEventListener(ShopGameEvent.PURCHASE_EXTRA_UPGRADE, extraUpgradeCheck);
addEventListener(ShopGameEvent.CHANGE_DAY, changeDayCheck);
}
function changeDayCheck(_arg1:ShopGameEvent):void{
GameInterface.btnTransfer.enabled = (((((theRoot.cityUnlocked.length > 1)) && (theRoot.numberCountryData))) && ((theRoot.transferCountdown <= 0)));
if (GameInterface.btnTransfer.enabled){
GameInterface.btnTransfer.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
GameInterface.btnTransfer.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
GameInterface.dayPassedText.text = ("Day " + theRoot.dayPass);
}
function initBudget():void{
var _local3:*;
resetTextForBudget();
addTextForBudget("Booths");
var _local1:* = gameplay.lastBoothReport.concat();
_local1.sortOn("boothName");
var _local2:* = 0;
while (_local2 < _local1.length) {
addSpaceForBudget();
_local3 = _local1[_local2];
addBudgetList((" " + _local3.boothName), _local3.visit, _local3.revenue, -1);
_local2++;
};
addSpaceForBudget();
if (gameplay.lastHallIsExist){
addBudgetList("Hall report", gameplay.lastHallVisitorVisit, gameplay.lastHallRevenue, gameplay.lastHallEventCost);
addSpaceForBudget();
};
if (gameplay.lastBuildBoothReport > 0){
addSpaceForBudget();
addBudgetList("Build booths", -1, -1, gameplay.lastBuildBoothReport);
};
if (gameplay.lastBuildFacilityReport > 0){
addSpaceForBudget();
addBudgetList("Build facilities", -1, -1, gameplay.lastBuildFacilityReport);
};
if (gameplay.lastUpgradeReport > 0){
addSpaceForBudget();
addBudgetList("Upgrade report", -1, -1, gameplay.lastUpgradeReport);
};
addSpaceForBudget();
addSpaceForBudget();
addBudgetList("Hire new staff", -1, -1, gameplay.lastHireReport);
addSpaceForBudget();
addTextForBudget("Staff's salaries");
_local2 = 0;
while (_local2 < gameplay.lastStaffReport.length) {
_local3 = gameplay.lastStaffReport[_local2];
addSpaceForBudget();
addBudgetList((((((" " + _local3.staffType) + ((_local3.staffNumber)>1) ? _local3.multi : _local3.single) + "(") + _local3.staffNumber) + ")"), -1, -1, _local3.staffPaid);
_local2++;
};
if (gameplay.lastExtraReport != 0){
addSpaceForBudget();
addSpaceForBudget();
addBudgetList("Extra upgrade", -1, -1, gameplay.lastExtraReport);
};
addSpaceForBudget();
if ((((gameplay.lastTransferInReport > 0)) || ((gameplay.lastTransferOutReport > 0)))){
addSpaceForBudget();
addBudgetList("Transfer", -1, gameplay.lastTransferInReport, gameplay.lastTransferOutReport);
};
addSpaceForBudget();
addBudgetList("Miscellaneous", -1, gameplay.lastMiscInReport, gameplay.lastMiscOutReport);
GameInterface.budgetPage.descriptionList.text = descriptionText;
GameInterface.budgetPage.visitorList.text = visitorText;
GameInterface.budgetPage.incomeList.htmlText = incomeText;
GameInterface.budgetPage.expenditureList.htmlText = expenditureText;
GameInterface.budgetPage.profitList.htmlText = profitText;
GameInterface.budgetPage.totalEarning.text = Utility.numberToMoney(totalProfit);
gameplay.profit = totalProfit;
if (totalProfit > 0){
GameInterface.budgetPage.totalEarning.textColor = 1543218;
GameInterface.budgetPage.dolarSymbol.textColor = 1543218;
} else {
GameInterface.budgetPage.totalEarning.textColor = 0xFF0000;
GameInterface.budgetPage.dolarSymbol.textColor = 0xFF0000;
};
GameInterface.budgetPage.checkSlideBar();
}
function updatePopularity(_arg1:ShopGameEvent):void{
GameInterface.popularityMeter.text = (("" + Math.max(0, Math.min(100, Math.round(gameplay.popularity)))) + "%");
}
function extraUpgradeCheck(_arg1:ShopGameEvent):void{
if (_arg1.speed == 3){
GameInterface.facilitySector.btnParkingLot.visible = true;
if (((!((runningMission == null))) && ((runningMission.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))){
setFlashingOn(GameInterface.btnFacility);
setFlashingOn(GameInterface.facilitySector.btnParkingLot);
};
};
if (_arg1.speed == 4){
GameInterface.facilitySector.btnSubway.visible = true;
};
}
function drawSky(){
_skyColor = Color.interpolateColor(NIGHT_SKY_COLOR, DAY_SKY_COLOR, GameInterface.gameClock.daySymbol.alpha);
bgContainer.graphics.clear();
bgContainer.graphics.beginFill(_skyColor);
bgContainer.graphics.drawRect(0, 0, screenArea.width, screenArea.height);
bgContainer.graphics.endFill();
}
function AlarmOnTriggered(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
changeSound(BGMAlarm);
if (!_local2.hitTestObject(screenArea)){
GameInterface.activeCCTV(gameplay, _local2);
};
}
function AlarmOnStopped(_arg1:ShopGameEvent):void{
changeSound(BGMNight);
}
function getSectorItemCommand(_arg1:SectorPanelEvent):void{
var _local3:*;
var _local2:* = RelationList.BTN_CLASS_LIST.indexOf(Utility.getClass(_arg1.target));
if (_local2 >= 0){
gameplay.createBuildSymbol(RelationList.BUILD_CLASS_LIST[_local2]);
theRoot.tutorialEnd();
buildContainer.addChild(gameplay.buildSymbol);
stage.addEventListener(MouseEvent.CLICK, buildBuilding);
stage.addEventListener(KeyboardEvent.KEY_UP, cancelBuildBuilding);
buttonContainer.addChild(btnCancel);
btnCancel.addEventListener(MouseEvent.CLICK, cancelBuildBuildingByMouse);
if ((_arg1.target is UI_ButtonEscalator)){
stage.addEventListener(KeyboardEvent.KEY_DOWN, flipBooth);
buttonContainer.addChild(btnReverse);
btnReverse.addEventListener(MouseEvent.CLICK, flipBoothWithMouse);
};
GameInterface.deactiveAllDetailButton();
GameInterface.hideDetail();
} else {
_local3 = RelationList.HIRE_BUTTON_LIST.indexOf(Utility.getClass(_arg1.target));
if (_local3 >= 0){
gameplay.createHireSymbol(RelationList.HIRE_CLASS_LIST[_local3]);
theRoot.tutorialEnd();
buildContainer.addChild(gameplay.hireSymbol);
stage.addEventListener(MouseEvent.CLICK, hireStaff);
stage.addEventListener(KeyboardEvent.KEY_UP, cancelHireStaff);
buttonContainer.addChild(btnCancel);
btnCancel.addEventListener(MouseEvent.CLICK, cancelHireStaffByMouse);
stage.addEventListener(KeyboardEvent.KEY_DOWN, flipBooth);
buttonContainer.addChild(btnReverse);
if ((gameplay.hireSymbol is HireEntertainer)){
if ((((gameplay.gameHour >= 10)) && ((gameplay.gameHour < 16)))){
workTimeSetting.setWorkTime("Day");
} else {
if ((((gameplay.gameHour >= 16)) && ((gameplay.gameHour < 22)))){
workTimeSetting.setWorkTime("Night");
} else {
workTimeSetting.setWorkTime("Day");
};
};
} else {
if ((((gameplay.gameHour >= 9)) && ((gameplay.gameHour < 19)))){
workTimeSetting.setWorkTime("Day");
} else {
if ((((gameplay.gameHour >= 19)) || ((gameplay.gameHour < 5)))){
workTimeSetting.setWorkTime("Night");
} else {
workTimeSetting.setWorkTime("Day");
};
};
};
workTimeSetting.btnClose.addEventListener(MouseEvent.CLICK, cancelHireStaffByMouse);
buttonContainer.addChild(workTimeSetting);
btnReverse.addEventListener(MouseEvent.CLICK, flipBoothWithMouse);
GameInterface.deactiveAllDetailButton();
GameInterface.hideDetail();
};
};
}
public function addBuildSymbol(_arg1:MovieClip):void{
buildContainer.addChild(_arg1);
}
public function addSaveNote(_arg1:int):void{
var _local2:*;
if (noticeContainer.getChildByName(saveNote.name) == null){
_local2 = "";
if ((_arg1 in theRoot.saveData)){
_local2 = "GAME SAVED";
} else {
_local2 = "AUTO SAVE";
};
saveNote.text = _local2;
saveNote.x = saveNotePosition.x;
saveNote.y = saveNotePosition.y;
saveNote.scaleX = 1;
saveNote.alpha = 1;
noticeContainer.addChild(saveNote);
TweenLite.from(saveNote, 1.4, {x:(theRoot.globalMask.width + 10), ease:Linear.easeNone, onComplete:TweenLite.to, onCompleteParams:[saveNote, 0.9, {scaleX:0.6, onComplete:TweenLite.to, onCompleteParams:[saveNote, 0.9, {scaleX:1, ease:Elastic.easeOut, easeParams:[1, 3], onComplete:TweenLite.to, onCompleteParams:[saveNote, 0.5, {y:(saveNotePosition.y - 50), alpha:0, onComplete:saveNote.parent.removeChild, onCompleteParams:[saveNote]}]}]}]});
};
}
function flipBoothWithMouse(_arg1:MouseEvent):void{
if ((gameplay.buildSymbol is BuildEscalator)){
gameplay.buildSymbol.scaleX = (gameplay.buildSymbol.scaleX * -1);
};
if (gameplay.hireSymbol != null){
gameplay.hireSymbol.scaleX = (gameplay.hireSymbol.scaleX * -1);
};
}
function flipBooth(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.TAB){
if ((gameplay.buildSymbol is BuildEscalator)){
gameplay.buildSymbol.scaleX = (gameplay.buildSymbol.scaleX * -1);
};
if (gameplay.hireSymbol != null){
gameplay.hireSymbol.scaleX = (gameplay.hireSymbol.scaleX * -1);
};
};
}
function cancelSectorItemCommand(_arg1:SectorPanelEvent):void{
var _local3:*;
var _local2:* = RelationList.BTN_CLASS_LIST.indexOf(Utility.getClass(_arg1.target));
if (_local2 >= 0){
gameplay.destroyBuildSymbol(RelationList.BUILD_CLASS_LIST[_local2]);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, flipBooth);
} else {
_local3 = RelationList.HIRE_BUTTON_LIST.indexOf(Utility.getClass(_arg1.target));
if (_local3 >= 0){
gameplay.destroyHireSymbol(RelationList.HIRE_CLASS_LIST[_local3]);
};
};
}
public function mouseHitInterface():Boolean{
return (((((((((((GameInterface.hitTestPoint(stage.mouseX, stage.mouseY, true)) || (btnCancel.hitTestPoint(stage.mouseX, stage.mouseY, true)))) || (btnReverse.hitTestPoint(stage.mouseX, stage.mouseY, true)))) || (workTimeSetting.hitTestPoint(stage.mouseX, stage.mouseY, true)))) || (tutorialPart.hitTestPoint(stage.mouseX, stage.mouseY, true)))) || ((tutorTextDelay > 0))));
}
function buildBuilding(_arg1:MouseEvent):void{
if (!mouseHitInterface()){
if (gameplay.buildProgress()){
if (((_arg1.shiftKey) && (!((gameplay.buildSymbol is BuildHall))))){
if (!holdShift){
stage.addEventListener(KeyboardEvent.KEY_UP, ReleaseShiftKey);
holdShift = true;
};
} else {
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
stage.removeEventListener(MouseEvent.CLICK, buildBuilding);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, flipBooth);
};
};
};
}
function hireStaff(_arg1:MouseEvent):void{
if (!mouseHitInterface()){
skipConfirm = _arg1.shiftKey;
if (gameplay.hireProgress()){
if (_arg1.shiftKey){
if (!holdShift){
stage.addEventListener(KeyboardEvent.KEY_UP, ReleaseShiftKey);
holdShift = true;
};
} else {
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
stage.removeEventListener(MouseEvent.CLICK, hireStaff);
};
};
};
}
function cancelBuildBuilding(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
};
}
function cancelHireStaff(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.ESCAPE){
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
};
}
function cancelBuildBuildingByMouse(_arg1:MouseEvent):void{
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
}
function cancelHireStaffByMouse(_arg1:MouseEvent):void{
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
}
function ReleaseShiftKey(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.SHIFT){
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
holdShift = false;
stage.removeEventListener(KeyboardEvent.KEY_UP, ReleaseShiftKey);
};
}
function BoothMenuAppear(_arg1:BoothEvent):void{
var target:*;
var e = _arg1;
if (GameInterface.btnSelect.isActive){
if (((!((infoClip == null))) && (!((infoClip.parent == null))))){
infoClip.closeTable();
};
if (!(e.target is Hall)){
GameInterface.deactiveAllDetailButton();
GameInterface.hideDetail();
target = e.target;
if (!target.upgradeAble){
addMenuDialog(UIUnupgradeablefacilityinformation, e.target);
} else {
if (BoothList.BOOTH_AVAILABLE.indexOf(Utility.getClass(e.target)) >= 0){
addMenuDialog(UIboothinformation, e.target);
} else {
if (BoothList.FACILITY_LIST.indexOf(Utility.getClass(e.target)) >= 0){
addMenuDialog(UIfacilityinformation, e.target);
};
};
};
} else {
var _local3 = GameInterface;
with (_local3) {
deactiveAllDetailButton(btnDetailBooth);
if (getCurrentDetail() == null){
showDetail(btnDetailBooth);
} else {
if (getCurrentDetail() != boothDetail){
hideDetail(btnDetailBooth);
};
};
btnDetailBooth.isActive = true;
boothDetail.category = 4;
boothDetail.readCategory();
};
};
};
}
function VisitorMenuAppear(_arg1:VisitorEvent):void{
if (GameInterface.btnSelect.isActive){
if (((!((infoClip == null))) && (!((infoClip.parent == null))))){
infoClip.closeTable();
};
GameInterface.deactiveAllDetailButton();
GameInterface.hideDetail();
if ((_arg1.target as Employee)){
if ((_arg1.target is CrewEntertainer)){
addMenuDialog(UIentertainerinformation, _arg1.target);
} else {
addMenuDialog(UIemployeeinformation, _arg1.target);
};
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_STAFF_DETAIL) < 0){
setNewTutor(Tutorial.TUTOR_STAFF_DETAIL);
};
} else {
addMenuDialog(UIvisitorinformation, _arg1.target);
if (theRoot.tutorialPass.indexOf(Tutorial.TUTOR_VISITOR_DETAIL) < 0){
setNewTutor(Tutorial.TUTOR_VISITOR_DETAIL);
};
};
gameplay.humanFocus = _arg1.target;
};
}
function addMenuDialog(_arg1:Class, _arg2:Object){
var _local3:* = new (_arg1);
_local3.relation = _arg2;
_local3.x = infoPos.x;
_local3.y = infoPos.y;
if (_local3.staffCheckBox){
_local3.staffCheckBox.isActive = confirmWhenHire;
_local3.staffCheckBox.addEventListener(MouseEvent.CLICK, changeHireConfirm);
};
GameInterface.addChild(_local3);
infoClip = _local3;
infoClip.addEventListener(InformationTableEvent.ON_CLOSE, saveMenuPosition);
}
function changeHireConfirm(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
confirmWhenHire = _local2.isActive;
}
function detailShown(_arg1:ShopGameEvent):void{
if (((!((infoClip == null))) && (!((infoClip.parent == null))))){
infoClip.closeTable();
};
}
function saveMenuPosition(_arg1:InformationTableEvent):void{
infoPos.x = _arg1.lastX;
infoPos.y = _arg1.lastY;
infoClip.removeEventListener(InformationTableEvent.ON_CLOSE, saveMenuPosition);
if (infoClip.staffCheckBox){
infoClip.staffCheckBox.removeEventListener(MouseEvent.CLICK, changeHireConfirm);
};
gameplay.humanFocus = null;
}
function FixPosition(_arg1:ShopGameEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.removeEventListener(ShopGameEvent.POSITION_CHANGE, FixPosition);
var _local3:* = _local2.localToGlobal(new Point(_local2.mostLeft, 0)).x;
var _local4:* = _local2.localToGlobal(new Point(_local2.mostRight, 0)).x;
if (_local3 > 0){
_local2.x = -(_local2.mostLeft);
};
if (_local4 < screenArea.width){
_local2.x = -((_local2.mostRight - screenArea.width));
};
var _local5:* = _local2.localToGlobal(new Point(0, _local2.mostBottom)).y;
if (_local5 < 412){
_local2.y = -((_local2.mostBottom - 412));
};
if (_local2.y > _local2.gameHeight){
_local2.y = _local2.gameHeight;
};
updateBackPosition();
_local2.addEventListener(ShopGameEvent.POSITION_CHANGE, FixPosition);
}
function MouseDownEvent(_arg1:MouseEvent):void{
if (!mouseHitInterface()){
if (GameInterface.btnDrag.isActive){
lastCoordinate = new Point(_arg1.stageX, _arg1.stageY);
stage.addEventListener(MouseEvent.MOUSE_MOVE, ScrollScreen);
stage.addEventListener(MouseEvent.MOUSE_UP, CancelScrollScreen);
} else {
if (((((((((((GameInterface.btnShop.isActive) || (GameInterface.btnFood.isActive))) || (GameInterface.btnEntertainment.isActive))) || (GameInterface.btnFacility.isActive))) || (GameInterface.btnStaff.isActive))) || (GameInterface.btnMailBox.isActive))){
if ((((gameplay.buildSymbol == null)) && ((gameplay.hireSymbol == null)))){
GameInterface.deactiveAllToggleButton();
GameInterface.btnSelect.isActive = true;
};
};
};
};
}
function ScrollScreen(_arg1:MouseEvent):void{
var _local2:* = (lastCoordinate.x - stage.mouseX);
var _local3:* = (lastCoordinate.y - stage.mouseY);
gameplay.x = (gameplay.x - _local2);
gameplay.y = (gameplay.y - _local3);
lastCoordinate.x = stage.mouseX;
lastCoordinate.y = stage.mouseY;
gameplay.dispatchEvent(new ShopGameEvent(ShopGameEvent.SCROLL_WITH_MOUSE));
}
function CancelScrollScreen(_arg1:MouseEvent):void{
lastCoordinate = null;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, ScrollScreen);
stage.removeEventListener(MouseEvent.MOUSE_UP, CancelScrollScreen);
}
function btnDragOnActive(_arg1:ToggleButtonEvent):void{
mouseCursor = new DragCursor();
mouseCursor.x = stage.mouseX;
mouseCursor.y = stage.mouseY;
mouseCursor.visible = !(mouseHitInterface());
if (mouseCursor.visible){
Mouse.hide();
} else {
Mouse.show();
};
mouseContainer.addChild(mouseCursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE, showDragCursor);
GameInterface.btnDrag.addEventListener(ToggleButtonEvent.DEACTIVATE, btnDragOnDeactive);
GameInterface.btnDrag.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, btnDragOnDeactive);
}
function btnDragOnDeactive(_arg1:ToggleButtonEvent):void{
Mouse.show();
mouseContainer.removeChild(mouseCursor);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, showDragCursor);
GameInterface.btnDrag.removeEventListener(ToggleButtonEvent.DEACTIVATE, btnDragOnDeactive);
GameInterface.btnDrag.removeEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, btnDragOnDeactive);
}
function showDragCursor(_arg1:MouseEvent):void{
mouseCursor.visible = !(mouseHitInterface());
if (mouseCursor.visible){
Mouse.hide();
} else {
Mouse.show();
};
mouseCursor.x = _arg1.stageX;
mouseCursor.y = _arg1.stageY;
}
function UpdateSpeed(_arg1:ShopGameEvent):void{
gameplay.gameSpeed = _arg1.speed;
}
function btnWorldMapOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_environtment = theRoot.bgmEnvirontment;
TweenLite.killTweensOf(theRoot);
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:ReturnToWorldMap});
};
}
function BoothCreated(_arg1:BoothEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local24:*;
var _local2:* = _arg1.target;
if (BoothList.BOOTH_AVAILABLE.indexOf(Utility.getClass(_local2)) >= 0){
gameplay.boothPopularity = (gameplay.boothPopularity + 2);
} else {
if ((_local2 is FacilityParkingLot)){
gameplay.boothPopularity = (gameplay.boothPopularity + 5);
};
};
var _local3:* = FavoriteList.COUNTRY_LIST.indexOf(_country);
if ((_local3 in FavoriteList.COUNTRY_FAVORITE_LIST)){
_local4 = FavoriteList.COUNTRY_FAVORITE_LIST[_local3].concat();
while (_local4.indexOf(Utility.getClass(_local2)) >= 0) {
gameplay.boothPopularity = (gameplay.boothPopularity + 1.2);
_local4.splice(_local4.indexOf(_local2), 1);
};
};
if (!(_local2 is FacilityEscalator)){
_local5 = 0;
_local6 = 2;
if ((_local2 is FacilityElevator)){
_local6 = 4;
};
if (_local2.colArea != null){
_local7 = _local2.colArea;
} else {
if ((_local2 is Hall)){
_local7 = _local2.hallColArea;
} else {
if ((_local2 is FacilityRestroom)){
_local7 = _local2;
} else {
_local7 = _local2;
};
};
};
_local8 = new Array();
_local9 = gameplay.boothList.concat(gameplay.atmList.concat(gameplay.restroomList));
if (gameplay.hall != null){
_local9.push(gameplay.hall);
};
_local10 = 0;
while (_local10 < _local9.length) {
_local11 = _local9[_local10];
if (_local11 != _local2){
_local12 = _local2.x;
_local13 = _local11.x;
if (_local11.colArea != null){
_local14 = _local11.colArea;
} else {
if ((_local11 is Hall)){
_local14 = _local11.hallColArea;
} else {
if ((_local11 is FacilityRestroom)){
_local14 = _local11;
} else {
_local14 = null;
};
};
};
if (_local2.x < _local11.x){
_local12 = (_local12 + (_local7.width / 2));
_local13 = (_local13 - (_local14.width / 2));
} else {
_local12 = (_local12 - (_local7.width / 2));
_local13 = (_local13 + (_local14.width / 2));
};
if (Math.abs((_local12 - _local13)) <= 84){
_local15 = false;
_local15 = ((_local2 is FacilityElevator)) ? _local2.canAccessFloor(_local11.onFloor) : (_local2.onFloor == _local11.onFloor);
if (_local15){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
if (_local12 < _local13){
_local17 = (_local12 + (Math.abs((_local12 - _local13)) / 2));
} else {
_local17 = (_local13 + (Math.abs((_local12 - _local13)) / 2));
};
_local8.push({related:_local11, mod:_local16, pos:new Point(_local17, (_local11.y - 36))});
};
_local5++;
};
};
};
if (_local5 >= _local6){
break;
};
_local10++;
};
if (_local5 < _local6){
_local10 = 0;
while (_local10 < gameplay.elevatorList.length) {
_local11 = gameplay.elevatorList[_local10];
if (_local11 != _local2){
_local12 = _local2.x;
_local13 = _local11.x;
if (_local2.x < _local11.x){
_local12 = (_local12 + (_local7.width / 2));
_local13 = (_local13 - (_local11.width / 2));
} else {
_local12 = (_local12 - (_local7.width / 2));
_local13 = (_local13 + (_local11.width / 2));
};
if (Math.abs((_local12 - _local13)) <= 84){
if ((_local2 is FacilityElevator)){
_local18 = 0;
while (_local18 < _local2.roomList.length) {
_local19 = _local2.getRoomFloorIndex();
_local20 = ((_local19 == 0)) ? null : gameplay.floorList[(_local19 - 1)];
if (_local11.canAccessFloor(_local20)){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
if (_local12 < _local13){
_local17 = (_local12 + (Math.abs((_local12 - _local13)) / 2));
} else {
_local17 = (_local13 + (Math.abs((_local12 - _local13)) / 2));
};
_local21 = ((_local20 == null)) ? (-72 / 2) : (_local20.y - (72 / 2));
_local8.push({related:_local11, mod:_local16, pos:new Point(_local17, _local21)});
};
_local5++;
};
_local18++;
};
} else {
if (_local11.canAccessFloor(_local2.onFloor)){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
if (_local12 < _local13){
_local17 = (_local12 + (Math.abs((_local12 - _local13)) / 2));
} else {
_local17 = (_local13 + (Math.abs((_local12 - _local13)) / 2));
};
_local8.push({related:_local11, mod:_local16, pos:new Point(_local17, (_local2.y - 36))});
};
_local5++;
};
};
};
};
if (_local5 >= _local6){
break;
};
_local10++;
};
};
while (_local8.length > 0) {
_local22 = _local8.shift();
if (_local22.mod != 0){
_local23 = ((_local22.mod)>0) ? new fxgoodrelation() : new fxbadrelation();
_local23.x = _local22.pos.x;
_local23.y = _local22.pos.y;
gameplay.containerBonus.addChild(_local23);
if (_local22.mod > 0){
dispatchEvent(new ShopGameEvent(ShopGameEvent.COMBO_FOUND));
};
_local24 = (_local23.y - 50);
if (_local22.mod > 0){
TweenLite.to(_local23, 0.8, {y:_local24, ease:Linear.easeNone, onComplete:TweenLite.to, onCompleteParams:[_local23, 0.4, {y:(_local24 - 25), alpha:0, ease:Linear.easeNone, onComplete:_local23.parent.removeChild, onCompleteParams:[_local23]}]});
} else {
TweenLite.from(_local23, 0.4, {y:_local24, onComplete:TweenLite.to, onCompleteParams:[_local23, 0.4, {delay:0.4, alpha:0, ease:Linear.easeNone, onComplete:_local23.parent.removeChild, onCompleteParams:[_local23]}]});
};
};
gameplay.boothPopularity = (gameplay.boothPopularity + (_local22.mod * 0.8));
};
};
}
function BoothDestroyed(_arg1:BoothEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local2:* = _arg1.target;
if (BoothList.BOOTH_AVAILABLE.indexOf(Utility.getClass(_local2)) >= 0){
gameplay.boothPopularity = (gameplay.boothPopularity - 2);
} else {
if ((_local2 is FacilityParkingLot)){
gameplay.boothPopularity = (gameplay.boothPopularity - 5);
};
};
var _local3:* = FavoriteList.COUNTRY_LIST.indexOf(_country);
if ((_local3 in FavoriteList.COUNTRY_FAVORITE_LIST)){
_local4 = FavoriteList.COUNTRY_FAVORITE_LIST[_local3].concat();
while (_local4.indexOf(Utility.getClass(_local2)) >= 0) {
gameplay.boothPopularity = (gameplay.boothPopularity - 1.2);
_local4.splice(_local4.indexOf(_local2), 1);
};
};
if (!(_local2 is FacilityEscalator)){
_local5 = 0;
_local6 = 2;
if ((_local2 is FacilityElevator)){
_local6 = (_local2.roomList.length * 2);
};
if (_local2.colArea != null){
_local7 = _local2.colArea;
} else {
if ((_local2 is Hall)){
_local7 = _local2.hallColArea;
} else {
if ((_local2 is FacilityRestroom)){
_local7 = _local2;
} else {
_local7 = _local2;
};
};
};
_local8 = new Array();
_local9 = gameplay.boothList.concat(gameplay.atmList.concat(gameplay.restroomList));
if (gameplay.hall != null){
_local9.push(gameplay.hall);
};
_local10 = 0;
while (_local10 < _local9.length) {
_local11 = _local9[_local10];
if (_local11 != _local2){
_local12 = _local2.x;
_local13 = _local11.x;
if (_local11.colArea != null){
_local14 = _local11.colArea;
} else {
if ((_local11 is Hall)){
_local14 = _local11.hallColArea;
} else {
if ((_local11 is FacilityRestroom)){
_local14 = _local11;
} else {
_local14 = null;
};
};
};
if (_local2.x < _local11.x){
_local12 = (_local12 + (_local7.width / 2));
_local13 = (_local13 - (_local14.width / 2));
} else {
_local12 = (_local12 - (_local7.width / 2));
_local13 = (_local13 + (_local14.width / 2));
};
if (Math.abs((_local12 - _local13)) <= 84){
_local15 = false;
_local15 = ((_local2 is FacilityElevator)) ? _local2.canAccessFloor(_local11.onFloor) : (_local2.onFloor == _local11.onFloor);
if (_local15){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
_local8.push({related:_local11, mod:_local16});
};
_local5++;
};
};
};
if (_local5 >= _local6){
break;
};
_local10++;
};
if (_local5 < _local6){
_local10 = 0;
while (_local10 < gameplay.elevatorList.length) {
_local11 = gameplay.elevatorList[_local10];
if (_local11 != _local2){
_local12 = _local2.x;
_local13 = _local11.x;
if (_local2.x < _local11.x){
_local12 = (_local12 + (_local7.width / 2));
_local13 = (_local13 - (_local11.width / 2));
} else {
_local12 = (_local12 - (_local7.width / 2));
_local13 = (_local13 + (_local11.width / 2));
};
if (Math.abs((_local12 - _local13)) <= 84){
if ((_local2 is FacilityElevator)){
_local17 = 0;
while (_local17 < _local2.roomList.length) {
_local18 = _local2.getRoomFloorIndex;
_local19 = ((_local18 == 0)) ? null : gameplay.floorList[(_local18 - 1)];
if (_local11.canAccessFloor(_local19)){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
_local8.push({related:_local11, mod:_local16});
};
_local5++;
};
_local17++;
};
} else {
if (_local11.canAccessFloor(_local2.onFloor)){
_local16 = ComboList.getRelationOf(Utility.getClass(_local2), Utility.getClass(_local11));
if (_local16 != 0){
_local8.push({related:_local11, mod:_local16});
};
_local5++;
};
};
};
};
if (_local5 >= _local6){
break;
};
_local10++;
};
};
while (_local8.length > 0) {
_local20 = _local8.shift();
gameplay.boothPopularity = (gameplay.boothPopularity - (_local20.mod * 0.8));
};
};
}
public function ReturnToWorldMap():void{
var _local1:*;
theRoot.resetBGM();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
gameplay.missionActive = getCurrentMission();
while ((((tutorNextTarget.length > 0)) && ((tutorNextType.length > 0)))) {
removeGotoNextTutorialListener();
};
if (theRoot.tutorialActive != ""){
_local1 = theRoot.tutorialPass.indexOf(theRoot.tutorialActive);
if ((_local1 in theRoot.tutorialPass)){
theRoot.tutorialPass.splice(_local1, 1);
};
};
theRoot.tutorialDelay = 0;
tutorReq = null;
theRoot.lastCountryName = _country;
theRoot.lastGameplay = gameplay;
theRoot.countryData[_country] = {gameplay:gameplay, updated:false, numberVisitor:gameplay.visitorList.length, numberVillain:gameplay.visitorVillainList.length, numberBandit:gameplay.banditList.length, averageMood:gameplay.countAverageMood()};
dispatchEvent(new ShopCommandEvent(ShopCommandEvent.CALL_COMMAND, ShopCommandEvent.RETURN_TO_WORLD_MAP));
}
public function ReturnToMainMenu():void{
theRoot.resetBGM();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
dispatchEvent(new ShopCommandEvent(ShopCommandEvent.CALL_COMMAND, ShopCommandEvent.RETURN_TO_MAIN_MENU));
}
public function set country(_arg1:String):void{
_country = _arg1;
GameInterface.flagSymbol.gotoAndStop(_country);
}
public function get country():String{
return (_country);
}
public function addCash(_arg1:Number, _arg2:Point=null, _arg3:Boolean=true):void{
var _local4:*;
var _local5:Point;
if (_arg1 != 0){
_local4 = new CashSymbol();
if (_arg1 >= 0){
_local4.cashText.textColor = 65074;
} else {
_local4.cashText.textColor = 0xFF0000;
};
if (_arg2 != null){
_local5 = new Point();
_local5.x = (GameInterface.currentCashShown.x + (GameInterface.currentCashShown.width / 2));
_local5.y = GameInterface.currentCashShown.y;
} else {
_local5 = _arg2;
};
if (((!((_arg2 == null))) || ((_arg1 > 0)))){
_local4.cashText.autoSize = TextFieldAutoSize.CENTER;
_local4.cashText.text = ("$" + Utility.numberToMoney(_arg1));
_local4.x = _local5.x;
_local4.y = _local5.y;
GameInterface.addChild(_local4);
TweenLite.to(_local4, 1, {y:(_local5.y - 50), onComplete:gameplay.fadeClip, onCompleteParams:[_local4, 0.5, 0.5], ease:Strong.easeOut});
};
gameplay.cash = (gameplay.cash + _arg1);
if ((((_arg1 < 0)) && (_arg3))){
gameplay.cashSpent = (gameplay.cashSpent + Math.abs(_arg1));
};
theRoot.playSound(SFXCashUpdate);
};
}
public function addNotification(_arg1:String):void{
var _local2:* = new UI_Notification();
_local2.notice.notificationText.text = _arg1;
_local2.x = NOTIFICATION_X;
_local2.y = (NOTIFICATION_Y + _local2.height);
noticeContainer.addChildAt(_local2, 0);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, notificationRemoved);
notificationList.unshift(_local2);
TweenLite.to(_local2, 0.5, {y:NOTIFICATION_Y, onUpdate:correctNotificationPosition});
if (_arg1 == Notice.NOT_ENOUGH_CASH){
GameInterface.blinkCashText();
};
theRoot.playSound(SFXNotification);
}
function correctNotificationPosition():void{
var _local2:*;
var _local3:*;
var _local1:* = 1;
while (_local1 < notificationList.length) {
_local2 = notificationList[_local1];
_local3 = notificationList[(_local1 - 1)];
_local2.y = (_local3.y - _local3.height);
_local1++;
};
}
function notificationRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = notificationList.indexOf(_local2);
if (_local3 >= 0){
notificationList.splice(_local3, 1);
};
}
public function get boothAvailable():Array{
return (_boothAvailable);
}
public function set runningMission(_arg1:Object):void{
_runningMission = _arg1;
}
public function get runningMission():Object{
return (_runningMission);
}
public function set environtment(_arg1:Number):void{
_environtment = _arg1;
theRoot.bgmEnvirontment = _environtment;
theRoot.correctSoundChannel();
}
public function get environtment():Number{
return (_environtment);
}
public function set backContainer(_arg1:MovieClip):void{
_backContainer = _arg1;
}
public function get backContainer():MovieClip{
return (_backContainer);
}
public function set landmark(_arg1:MovieClip):void{
_landmark = _arg1;
}
public function get landmark():MovieClip{
return (_landmark);
}
public function get skyColor():uint{
return (_skyColor);
}
public function get missionIsSuccess():Boolean{
return (_missionIsSuccess);
}
public function getRunningMission():Object{
return (runningMission);
}
}
}//package Instance
Section 96
//Ninja (Instance.Ninja)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class Ninja extends Bandit {
public var body:MovieClip;
public var hitBody:MovieClip;
public var sight:MovieClip;
var ninjitsuCharge:uint;
var ninjitsuProgress:int;
var ninjitsuUpperTarget:Boolean;
public function Ninja(){
ninjitsuCharge = 0;
ninjitsuProgress = 0;
ninjitsuUpperTarget = false;
_experienceCarrier = 12;
}
override function tick(_arg1:ShopGameEvent):void{
if (!_arrested){
if (ninjitsuProgress <= 0){
super.tick(_arg1);
simulateNinjitsu();
} else {
if (this.walk){
this.walk = false;
};
};
};
}
override function WalkingCheck(_arg1:Event):void{
var _local2:*;
if (ninjitsuProgress > 0){
_local2 = _world;
ninjitsuProgress = Math.max((ninjitsuProgress - _local2.gameSpeed), 0);
if (ninjitsuProgress <= 0){
doNinjitsu();
};
} else {
super.WalkingCheck(_arg1);
};
}
function simulateNinjitsu():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
if (ninjitsuCharge > 0){
ninjitsuCharge--;
} else {
if (!((((_rideElevator) || (_rideEscalator))) || (_insideBooth))){
_local2 = 0;
_local3 = checkNinjitsuAvailableUp();
_local4 = checkNinjitsuAvailableLow();
if (securityChase.length > 0){
if (((_local3) || (_local4))){
_local2 = 90;
if (((_local3) && (_local4))){
ninjitsuUpperTarget = Calculate.chance(50);
} else {
ninjitsuUpperTarget = ((_local3) && (!(_local4)));
};
};
} else {
if (_securityLocked.length <= 0){
if (((_goHome) || (_local1.alarmTrigger))){
if (_local4){
_local2 = 60;
ninjitsuUpperTarget = !(_local4);
};
} else {
if (_onFloor != floorTarget){
_local5 = _local1.floorList.indexOf(_onFloor);
_local6 = _local1.floorList.indexOf(floorTarget);
ninjitsuUpperTarget = (_local5 < _local6);
if (((((ninjitsuUpperTarget) && (_local3))) || (((!(ninjitsuUpperTarget)) && (_local4))))){
_local2 = 70;
};
};
};
};
};
if (Calculate.chance(_local2)){
ninjitsuProgress = 45;
hiding = false;
if (transportTarget != null){
transportTarget = null;
elevatorRoomTarget = null;
waitingElevator = false;
};
};
};
};
}
function checkNinjitsuAvailableUp():Boolean{
var _local4:*;
var _local1:* = false;
var _local2:* = _world;
var _local3:* = _local2.floorList.indexOf(_onFloor);
if (_local3 < (_local2.floorList.length - 2)){
if (((_local3 + 1) in _local2.floorList)){
_local4 = _local2.floorList[(_local3 + 1)];
if ((((this.x >= ((_local4.x - (_local4.width / 2)) + 5))) && ((this.x <= ((_local4.x + (_local4.width / 2)) - 5))))){
_local1 = true;
};
};
};
return (_local1);
}
function checkNinjitsuAvailableLow():Boolean{
var _local1:* = false;
var _local2:* = _world;
if (_onFloor != null){
_local1 = true;
};
return (_local1);
}
function doNinjitsu():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
ninjitsuCharge = 20;
if (!arrested){
if (this.parent != null){
_local1 = new fx_ninjitsuSmoke();
_local1.x = this.x;
_local1.y = (this.y - hitBody.height);
_local2 = this.parent.getChildIndex(this);
this.parent.addChildAt(_local1, _local2);
_local3 = _world;
_local4 = _local3.floorList.indexOf(_onFloor);
if (ninjitsuUpperTarget){
if (((_local4 + 1) in _local3.floorList)){
_local4 = (_local4 + 1);
};
} else {
if (((_local4 - 1) in _local3.floorList)){
_local4--;
} else {
_local4 = -1;
};
};
if ((_local4 in _local3.floorList)){
_onFloor = _local3.floorList[_local4];
} else {
_onFloor = null;
};
_local3.containerVisitor[(_local4 + 1)].addChild(this);
this.y = ((_onFloor)!=null) ? _onFloor.y : 0;
_securityChase = [];
this.hiding = !(_local3.alarmTrigger);
};
};
}
override function hidingCheck():void{
var _local1:* = _world;
if (((((((((_local1.alarmTrigger) || (((!((_currentDestination == null))) && ((_currentDestination.banditList.indexOf(this) >= 0)))))) || (_rideElevator))) || ((_securityChase.length > 0)))) || ((ninjitsuProgress > 0)))){
if (_hiding){
hiding = false;
};
} else {
if (!_hiding){
if (hideCtr > 0){
hideCtr--;
} else {
hiding = true;
};
};
};
}
override function getBonus():Number{
return (Math.round((Math.max(10, (_bounty / 10)) * 1.5)));
}
}
}//package Instance
Section 97
//ParkingLot (Instance.ParkingLot)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.ui.*;
public class ParkingLot extends Booth {
public var parkingBody:MovieClip;
public var parkingColArea:MovieClip;
public var lowerEnterance:MovieClip;
public var maskEnterance:MovieClip;
public var upperEnterance:MovieClip;
public var parkingBorder:MovieClip;
public var maskPark:MovieClip;
var _carList:Array;
var _carQueue:Array;
var _parkingContainer:MovieClip;
var _enteranceContainer:MovieClip;
public function ParkingLot(){
_carList = new Array();
_carQueue = new Array();
super();
var _local1:* = getChildIndex(maskPark);
_extraContainer = new MovieClip();
addChildAt(_extraContainer, _local1);
_parkingContainer = new MovieClip();
_extraContainer.addChildAt(_parkingContainer, 0);
var _local2:* = getChildIndex(maskEnterance);
_enteranceContainer = new MovieClip();
_enteranceContainer.scaleX = 0.25;
_enteranceContainer.scaleY = 0.25;
addChildAt(_enteranceContainer, _local2);
_extraContainer.mask = maskPark;
_enteranceContainer.mask = maskEnterance;
var _local3:* = 0;
while (parkingBody.getChildByName(("parking" + _local3))) {
_carQueue.push(null);
_local3++;
};
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
override function Initialize(_arg1:Event):void{
var _local2:* = _world;
addEventListener(Event.ENTER_FRAME, firstInit);
gotoAndStop(_boothLevel);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function firstInit(_arg1:Event):void{
if (((((((((((((((!((parkingBody == null))) && (!((maskPark == null))))) && (!((parkingBorder == null))))) && (!((upperEnterance == null))))) && (!((lowerEnterance == null))))) && (!((maskEnterance == null))))) && (!((_enteranceContainer == null))))) && (!((parkingColArea == null))))){
parkingBody.mouseEnabled = false;
parkingBody.mouseChildren = false;
maskPark.mouseEnabled = false;
maskPark.mouseChildren = false;
parkingBorder.mouseEnabled = false;
parkingBorder.mouseChildren = false;
upperEnterance.mouseEnabled = false;
upperEnterance.mouseChildren = false;
lowerEnterance.mouseEnabled = false;
lowerEnterance.mouseChildren = false;
maskEnterance.mouseEnabled = false;
maskEnterance.mouseChildren = false;
_enteranceContainer.mouseEnabled = false;
_enteranceContainer.mouseChildren = false;
parkingColArea.addEventListener(MouseEvent.CLICK, boothOnClick);
removeEventListener(Event.ENTER_FRAME, firstInit);
};
}
override public function destroy():Boolean{
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _carList.length) {
_carList[_local2].dispatchEvent(new VisitorEvent(VisitorEvent.CAR_LOST));
_local2++;
};
dispatchEvent(new BoothEvent(BoothEvent.DESTROYED));
this.parent.removeChild(this);
return (true);
}
override function removed(_arg1:Event):void{
addEventListener(Event.ENTER_FRAME, firstInit);
parkingColArea.addEventListener(MouseEvent.CLICK, boothOnClick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function initFrame():void{
parkingBody.mouseEnabled = false;
parkingBody.mouseChildren = false;
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
var _local1:* = getChildIndex(maskPark);
addChildAt(_extraContainer, _local1);
var _local2:* = getChildIndex(maskEnterance);
addChildAt(_enteranceContainer, _local2);
}
override function boothOnClick(_arg1:MouseEvent):void{
var _local2:*;
if (!toLongHold){
_local2 = _world;
if ((((_local2.buildSymbol == null)) && ((_local2.hireSymbol == null)))){
dispatchEvent(new BoothEvent(BoothEvent.BOOTH_CLICK));
};
};
}
public function set carList(_arg1:Array):void{
_carList = _arg1;
}
public function get carList():Array{
return (_carList);
}
public function set carQueue(_arg1:Array):void{
_carQueue = _arg1;
}
public function get carQueue():Array{
return (_carQueue);
}
public function get parkingContainer():MovieClip{
return (_parkingContainer);
}
public function get enteranceContainer():MovieClip{
return (_enteranceContainer);
}
public function getParkingCost():Number{
return (BoothList.PARKING_COST[(_boothLevel - 1)]);
}
}
}//package Instance
Section 98
//Restroom (Instance.Restroom)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class Restroom extends Booth {
public var restroomBody:RestroomBody;
var _menList:Array;
var _womenList:Array;
public function Restroom(){
_menList = new Array();
_womenList = new Array();
super();
}
override function Initialize(_arg1:Event):void{
addEventListener(MouseEvent.CLICK, super.boothOnClick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
restroomBody.gotoAndStop(_boothLevel);
}
override function removed(_arg1:Event):void{
removeEventListener(MouseEvent.CLICK, super.boothOnClick);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function endFlashing():void{
_boothLevel++;
dispatchEvent(new BoothEvent(BoothEvent.BEFORE_FLASHING_UPGRADE, _boothLevel));
restroomBody.gotoAndStop(_boothLevel);
TweenLite.to(this, 0.5, {tint:null, onStart:initFrame, onComplete:super.completeUpgrade});
}
override function initFrame():void{
restroomBody.mouseEnabled = false;
restroomBody.mouseChildren = false;
dispatchEvent(new BoothEvent(BoothEvent.AFTER_FLASHING_UPGRADE, _boothLevel));
onUpgrade = false;
}
override public function destroy():Boolean{
var _local1:* = _world;
var _local2:* = _local1.restroomList.indexOf(this);
if (_local2 >= 0){
_local1.restroomList.splice(_local2, 1);
};
var _local3:* = this.restroomBody.enteranceMenRoom;
var _local4:* = this.restroomBody.enteranceWomenRoom;
var _local5:* = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
var _local6:* = _local1.globalToLocal(_local4.parent.localToGlobal(new Point(_local4.x, _local4.y)));
var _local7:* = 0;
while (_local7 < _visitorList.length) {
if (_menList.indexOf(_visitorList[_local7]) >= 0){
_visitorList[_local7].x = _local5.x;
_visitorList[_local7].y = _local5.y;
};
if (_womenList.indexOf(_visitorList[_local7]) >= 0){
_visitorList[_local7].x = _local6.x;
_visitorList[_local7].y = _local6.y;
};
_local7++;
};
_visitorList = [];
_menList = [];
_womenList = [];
dispatchEvent(new BoothEvent(BoothEvent.DESTROYED));
this.parent.removeChild(this);
return (true);
}
override function tick(_arg1:ShopGameEvent):void{
}
public function entered(_arg1:MovieClip):void{
_visitorList.push(_arg1);
if (_arg1.gender){
_menList.push(_arg1);
} else {
_womenList.push(_arg1);
};
}
public function leaved(_arg1:MovieClip):void{
var _local2:* = _visitorList.indexOf(_arg1);
if (_local2 >= 0){
_visitorList.splice(_local2, 1);
};
var _local3:* = _menList.indexOf(_arg1);
if (_local3 >= 0){
_menList.splice(_local3, 1);
};
var _local4:* = _womenList.indexOf(_arg1);
if (_local4 >= 0){
_womenList.splice(_local4, 1);
};
}
public function roomFull(_arg1:Boolean):Boolean{
var _local2:* = false;
var _local3:* = BoothList.getMaxVisitor(Utility.getClass(this), (_boothLevel - 1));
if (_arg1){
if (_local3 > 0){
_local2 = (_menList.length >= _local3);
};
} else {
if (_local3 > 0){
_local2 = (_womenList.length >= _local3);
};
};
return (_local2);
}
public function get menList():Array{
return (_menList);
}
public function get womenList():Array{
return (_womenList);
}
}
}//package Instance
Section 99
//ShopEmpireObject (Instance.ShopEmpireObject)
package Instance {
import flash.display.*;
import flash.events.*;
public class ShopEmpireObject extends MovieClip {
protected var _world:DisplayObject;
public function ShopEmpireObject(){
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
}
public function set world(_arg1:DisplayObject):void{
_world = _arg1;
}
public function get world():DisplayObject{
return (_world);
}
}
}//package Instance
Section 100
//StaffElectrician (Instance.StaffElectrician)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class StaffElectrician extends Employee {
public const SPEED_LV;
public var body:MovieClip;
public var hitBody:MovieClip;
var _repairing:Boolean;
var repairTime:int;
var repairSymbol:MovieClip;
var repairedBooth:MovieClip;
public function StaffElectrician(){
SPEED_LV = [2, 2, 3];
super();
bodyClip = body;
theBody = hitBody;
repairTime = 15;
_repairing = false;
_speed = 2;
_runModifier = 1;
}
override function Initialize(_arg1:Event):void{
_speed = SPEED_LV[(_employeeLevel - 1)];
super.Initialize(_arg1);
}
override function tick(_arg1:ShopGameEvent):void{
repairingProgress();
super.tick(_arg1);
}
override function setNewBodyClip():void{
bodyClip = body;
}
function repairingProgress():void{
var theWorld:*;
var chanceRepair:*;
var eClip:*;
var pExit:*;
try {
theWorld = _world;
if (((_repairing) && (!((repairedBooth == null))))){
if (repairTime > 0){
if (!recovery){
chanceRepair = ((35 + (20 * _employeeLevel)) * (Math.max(stamina, 10) / 100));
if (theWorld.checkUpgradeByName("Fine Battery")){
chanceRepair = (chanceRepair * 1.2);
};
if (Calculate.chance(chanceRepair)){
repairTime--;
};
if (Calculate.chance((60 / _employeeLevel))){
stamina = (stamina - (Math.random() + 0.5));
};
};
} else {
if (repairedBooth.body != null){
_repairing = false;
repairedBooth.boothBroken = 0;
if ((((((repairedBooth is BoothCafe)) || ((repairedBooth is FacilityATM)))) && (repairedBooth.boothOpen))){
exitBooth(repairedBooth);
} else {
eClip = repairedBooth.body.enterance;
pExit = theWorld.globalToLocal(eClip.parent.localToGlobal(new Point(eClip.x, eClip.y)));
this.x = pExit.x;
this.y = pExit.y;
repairedBooth.addEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
repairedBooth.openTheDoor();
};
};
};
};
} catch(e:Error) {
trace("------------Error-------------");
trace(_repairing);
trace(repairTime);
trace(_currentDestination);
trace(_currentDestination.body.enterance);
};
}
override function searchTarget():void{
if (_currentDestination == null){
if (!((((((_rideElevator) || (_rideEscalator))) || (_repairing))) || (_insideBooth))){
_currentDestination = searchBrokenBooth();
};
};
}
function searchBrokenBooth():MovieClip{
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local22:*;
var _local23:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = _local2.boothList.concat(_local2.atmList);
var _local4:* = new Array();
var _local5:* = _local2.floorList.indexOf(_onFloor);
var _local6:* = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
var _local7:* = 0;
while (_local7 < _local3.length) {
_local9 = _local3[_local7];
if ((((((this.workArea == -1)) || ((((this.workArea == 0)) && ((_local9.onFloor == null)))))) || ((_local9.onFloor == _local2.floorList[(this.workArea - 1)])))){
if (_local9.needToRepair()){
_local4.push(_local9);
};
};
_local7++;
};
var _local8:* = new Array();
if (_local4.length > 0){
_local7 = 0;
while (_local7 < _local4.length) {
_local9 = _local4[_local7];
if (_local9.body != null){
if (_local9.technicianDuty != null){
_local10 = _local9.technicianDuty;
if (!_local10.insideBooth){
if (_onFloor == _local9.onFloor){
if (_local10.onFloor == _local9.onFloor){
_local11 = _local9.body.enterance;
_local12 = _local2.globalToLocal(_local11.parent.localToGlobal(new Point(_local11.x, _local11.y)));
_local13 = _local2.globalToLocal(_local10.parent.localToGlobal(new Point(_local10.x, _local10.y)));
if (Math.abs((_local12.x - _local6.x)) < Math.abs((_local12.x - _local10.x))){
_local8.push(_local9);
};
} else {
_local8.push(_local9);
};
} else {
if (_local10.onFloor != _local9.onFloor){
_local14 = _local2.floorList.indexOf(_local10.onFloor);
_local15 = _local2.floorList.indexOf(_local9.onFloor);
if (Math.abs((_local15 - _local5)) < Math.abs((_local15 - _local14))){
_local8.push(_local9);
};
};
};
};
} else {
_local8.push(_local9);
};
} else {
_local8 = [];
break;
};
_local7++;
};
};
if (_local8.length > 0){
_local16 = null;
_local7 = 0;
while (_local7 < _local8.length) {
_local17 = _local8[_local7];
if (_local16 == null){
_local16 = _local17;
} else {
if (_onFloor == _local17.onFloor){
if (_onFloor == _local16.onFloor){
_local18 = _local17.body.enterance;
_local19 = _local16.body.enterance;
_local20 = _local2.globalToLocal(_local18.parent.localToGlobal(new Point(_local18.x, _local18.y)));
_local21 = _local2.globalToLocal(_local19.parent.localToGlobal(new Point(_local19.x, _local19.y)));
if (Math.abs((_local20.x - this.x)) < Math.abs((_local21.y - this.x))){
_local16 = _local17;
} else {
if (Math.abs((_local20.x - this.x)) == Math.abs((_local21.y - this.x))){
if (Calculate.chance(50)){
_local16 = _local17;
};
};
};
} else {
_local16 = _local17;
};
} else {
if (_onFloor != _local16.onFloor){
_local22 = _local2.floorList.indexOf(_local17.onFloor);
_local23 = _local2.floorList.indexOf(_local16.onFloor);
if (Math.abs((_local22 - _local5)) < Math.abs((_local23 - _local5))){
_local16 = _local17;
};
if (Math.abs((_local22 - _local5)) == Math.abs((_local23 - _local5))){
if (Calculate.chance(50)){
_local16 = _local17;
};
};
};
};
};
_local7++;
};
if (_local16.technicianDuty != null){
_local16.technicianDuty.currentDestination = null;
_local16.technicianDuty = null;
};
_local1 = _local16;
_local1.technicianDuty = this;
};
return (_local1);
}
override function lookingTargetProgress():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (!_goHome){
if (_targetPoint == null){
if (!((_rideElevator) || (_rideEscalator))){
if (_currentDestination != null){
if (_onFloor == _currentDestination.onFloor){
if (transportTarget != null){
transportTarget = null;
waitingElevator = false;
};
if (_currentDestination.body){
if (_currentDestination.body.enterance){
if (!_insideBooth){
if (!theBody.hitTestObject(_currentDestination.body.enterance)){
_local2 = _local1.globalToLocal(_currentDestination.body.localToGlobal(new Point(_currentDestination.body.enterance.x, _currentDestination.body.enterance.y)));
if (_local2.x < this.x){
this.dirrection = LEFT;
} else {
if (_local2.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
reachDestination = false;
} else {
if (_walk){
this.walk = false;
};
if (!reachDestination){
beginEnterBooth();
reachDestination = true;
};
};
} else {
if (!this.visible){
_local3 = _currentDestination.body.enterance;
_local4 = this.parent.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
this.x = _local4.x;
this.y = _local4.y;
};
};
};
};
};
if (floorTarget != _currentDestination.onFloor){
floorTarget = _currentDestination.onFloor;
};
};
};
} else {
if (!((_repairing) || (_insideBooth))){
if (_currentDestination != null){
_currentDestination.technicianDuty = null;
_currentDestination = null;
};
floorTarget = searchFloorTargetByPoint(_targetPoint);
if (!((_rideElevator) || (_rideEscalator))){
if (floorTarget == _onFloor){
if (this.parent.parent == this.world){
if (Math.abs((this.x - targetPoint.x)) > 5){
this.dirrection = ((this.x)<targetPoint.x) ? HumanObject.RIGHT : HumanObject.LEFT;
if (!_walk){
this.walk = true;
};
} else {
_targetPoint = null;
};
};
};
};
};
};
} else {
if (!((_repairing) || (_insideBooth))){
if (_currentDestination != null){
_currentDestination.techincianDuty = null;
_currentDestination = null;
};
};
};
if ((((((_currentDestination == null)) || (_rideElevator))) || (_rideEscalator))){
reachDestination = false;
};
}
override public function fire():void{
if (_currentDestination != null){
if (_currentDestination.techincianDuty == this){
_currentDestination.techincianDuty = null;
};
};
super.fire();
}
function checkOpenCloseCafeOrAtm(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (_insideBooth){
_local2 = _world;
if ((((_currentDestination is BoothCafe)) || ((_currentDestination is FacilityATM)))){
if (_currentDestination.boothOpen){
if (!this.visible){
_local3 = _currentDestination.extraContainer.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local3.x;
this.y = _local3.y;
_currentDestination.extraContainer.addChild(this);
this.visible = true;
};
} else {
if (this.visible){
_local4 = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local4.x;
this.y = _local4.y;
_local2.containerVisitor[(_local2.floorList.indexOf(_onFloor) + 1)].addChild(this);
this.visible = false;
};
removeEventListener(Event.ENTER_FRAME, checkOnCafeOrAtm);
};
};
};
}
function checkOnCafeOrAtm(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (_repairing){
_local2 = _world;
if (repairTime > 0){
if ((((repairedBooth is BoothCafe)) || ((repairedBooth is FacilityATM)))){
_local3 = repairedBooth.body.enterance;
_local4 = 0;
while (_local4 < _local2.gameSpeed) {
if (Math.abs((this.x - _local3.x)) > 3){
if (this.x < _local3.x){
this.dirrection = RIGHT;
} else {
if (this.x > _local3.x){
this.dirrection = LEFT;
};
};
if (this.body.currentLabel != "Walk"){
this.body.gotoAndStop("Walk");
};
repairTime = (15 + ((repairedBooth.boothLevel - 1) * 2));
} else {
if (this.body.currentLabel != "Standby"){
this.body.gotoAndStop("Standby");
removeEventListener(Event.ENTER_FRAME, checkOnCafeOrAtm);
break;
};
};
if (this.body.currentLabel == "Walk"){
this.x = (this.x + (this.scaleX * _speed));
};
_local4++;
};
};
};
};
}
override function beginEnterBooth():void{
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_currentDestination.openTheDoor();
}
function EnterTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
enterBooth(_local2);
_local2.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_local2.closeTheDoor();
}
override function checkStatusOnUpgrade(_arg1:VisitorEvent):void{
var _local2:* = _world;
_speed = SPEED_LV[(_employeeLevel - 1)];
}
function ExitTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
exitBooth(_local2);
_local2.removeEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
_local2.closeTheDoor();
}
function exitBooth(_arg1:MovieClip):void{
var _local4:*;
removeEventListener(Event.ENTER_FRAME, checkOpenCloseCafeOrAtm);
var _local2:* = _world;
this.visible = true;
this.walk = true;
if ((((_arg1 is BoothCafe)) || ((_arg1 is FacilityATM)))){
if (_arg1.boothOpen){
_local4 = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local4.x;
this.y = _local4.y;
_local2.containerVisitor[(_local2.floorList.indexOf(_onFloor) + 1)].addChild(this);
};
};
var _local3:* = (5 + (_arg1.boothLevel * 5));
if (_local2.checkUpgradeByName("Motivation")){
_local3 = (_local3 * 1.2);
};
this.experience = (this.experience + _local3);
if (repairSymbol != null){
if (repairSymbol.parent != null){
repairSymbol.parent.removeChild(repairSymbol);
};
repairSymbol = null;
};
_insideBooth = false;
if (repairedBooth != null){
repairedBooth.technicianDuty = null;
repairedBooth = null;
};
currentDestination = null;
}
override function dialogBoxRemoved(_arg1:Event):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (repairSymbol == null){
super.dialogBoxRemoved(_arg1);
} else {
if (_local2 == repairSymbol){
super.dialogBoxRemoved(_arg1);
} else {
_dialogBox = null;
repairSymbol.relation = this;
_local3 = _world;
_local3.addDialogBox(repairSymbol);
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, dialogBoxRemoved);
};
};
}
override function checkCurrentCondition(_arg1:VisitorEvent):void{
var _local2:*;
if (recovery){
if (tiredSymbol == null){
if ((((((_dialogBox == null)) || ((_dialogBox == lvUpSymbol)))) || ((_dialogBox == repairSymbol)))){
tiredSymbol = new legenddialoguebox();
tiredSymbol.iconClip = new LegendTired();
tiredSymbol.relation = this;
_local2 = _world;
_local2.addDialogBox(tiredSymbol);
};
};
} else {
if (tiredSymbol != null){
tiredSymbol.parent.removeChild(tiredSymbol);
tiredSymbol = null;
};
};
}
function enterBooth(_arg1:MovieClip):void{
var _local2:*;
var _local3:*;
if (!_goHome){
if (!(((_arg1 is BoothCafe)) || ((_arg1 is FacilityATM)))){
this.visible = false;
} else {
if (!_arg1.boothOpen){
this.visible = false;
};
};
repairedBooth = _arg1;
_insideBooth = true;
_repairing = true;
repairSymbol = new legenddialoguebox();
repairSymbol.iconClip = new legendunderconstruction();
if (((!((lvUpSymbol == null))) && (!((lvUpSymbol.parent == null))))){
lvUpSymbol.parent.removeChild(lvUpSymbol);
};
if (_dialogBox == null){
repairSymbol.relation = this;
_local2 = _world;
_local2.addDialogBox(repairSymbol);
};
repairTime = (15 + ((_arg1.boothLevel - 1) * 3));
if ((((_arg1 is BoothCafe)) || ((_arg1 is FacilityATM)))){
if (_arg1.boothOpen){
_local3 = _arg1.extraContainer.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local3.x;
this.y = _local3.y;
_arg1.extraContainer.addChild(this);
addEventListener(Event.ENTER_FRAME, checkOnCafeOrAtm);
};
addEventListener(Event.ENTER_FRAME, checkOpenCloseCafeOrAtm);
};
dispatchEvent(new VisitorEvent(VisitorEvent.ENTER_BOOTH, _arg1));
};
}
function get repairing():Boolean{
return (_repairing);
}
override public function get doSomething():Boolean{
_doSomething = ((_repairing) || (_insideBooth));
return (_doSomething);
}
override public function clearAllDestination():void{
_rideEscalator = false;
_rideElevator = false;
_insideBooth = false;
_repairing = false;
clearDestination();
}
override public function clearDestination():void{
super.clearDestination();
if (!_insideBooth){
if (_currentDestination != null){
_currentDestination.technicianDuty = null;
_currentDestination = null;
};
};
}
}
}//package Instance
Section 101
//StaffEntertainer (Instance.StaffEntertainer)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class StaffEntertainer extends Employee {
public var body:MovieClip;
public var hitBody:MovieClip;
public var funArea:MovieClip;
var _model:uint;
var danceDelay:uint;
var danceProgress:uint;
var _dancing:Boolean;
public function StaffEntertainer(){
bodyClip = body;
theBody = hitBody;
_speed = 2;
_runModifier = 1;
_model = 0;
danceDelay = 0;
danceProgress = 0;
_dancing = false;
lastFrame = 0;
this.funArea.visible = false;
addEventListener(ShopFrameEvent.ENTER_SOME_FRAME, checkRandomModel);
}
override function Initialize(_arg1:Event):void{
var _local2:* = _world;
lastFrame = this.bodyClip.currentFrame;
if ((((_model == 0)) || ((_model > this.totalFrames)))){
this.gotoAndStop(Math.ceil((Math.random() * this.totalFrames)));
} else {
this.gotoAndStop(_model);
};
floorTarget = _onFloor;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, checkStatusOnUpgrade);
addEventListener(VisitorEvent.STAMINA_UPDATE, checkCurrentCondition);
addEventListener(MouseEvent.CLICK, EmployeeOnClick);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
override function tick(_arg1:ShopGameEvent):void{
checkAround();
super.tick(_arg1);
}
override function checkStamina():void{
super.checkStamina();
if (_dancing){
this.stamina = (this.stamina - (((Math.random() * 0.9) + 0.6) / _employeeLevel));
};
if (this.stamina <= 0){
dancing = false;
};
}
function checkAround():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = _world;
if (((!(recovery)) && (this.insideMall()))){
if (!((((((_rideElevator) || (_rideEscalator))) || (_insideBooth))) || (_goHome))){
if (danceDelay > 0){
if (!_dancing){
danceDelay--;
} else {
if (danceProgress > 0){
danceProgress--;
_local2 = (Math.random() * 0.5);
if (_local1.checkUpgradeByName("Motivation")){
_local2 = (_local2 * 1.2);
};
experience = (experience + _local2);
this.parent.addChild(this);
} else {
dancing = false;
};
};
} else {
_local3 = _local1.visitorList.concat(_local1.visitorVillainList);
_local4 = 0;
_local5 = 0;
while (_local5 < _local3.length) {
if (!((((_local3[_local5].insideBooth) || (_local3[_local5].rideElevator))) || (_local3[_local5].rideEscalator))){
if (this.funArea.hitTestObject(_local3[_local5].theBody)){
_local4 = (_local4 + (((100 - _local3[_local5].mood) / 100) * 20));
_local3[_local5].mood = (_local3[_local5].mood + 0.1);
};
};
_local5++;
};
if (Calculate.chance(Math.min(_local4, 80))){
doDancing();
};
};
};
};
if (goHome){
this.dancing = false;
};
}
function doDancing():void{
if (Calculate.chance(((_stamina / 100) * 80))){
this.dancing = true;
danceDelay = 15;
danceProgress = 20;
floorTarget = _onFloor;
};
}
function checkRandomModel(_arg1:ShopFrameEvent):void{
bodyClip = this.body;
bodyClip.gotoAndStop(lastFrame);
this.walk = _walk;
}
override protected function movingWhenWalk():void{
if (!_dancing){
super.movingWhenWalk();
};
}
public function set model(_arg1:uint):void{
_model = _arg1;
}
public function get model():uint{
return (_model);
}
public function getModelType():String{
return (this.currentLabel);
}
public function set dancing(_arg1:Boolean):void{
var _local2:*;
_dancing = _arg1;
if (_dancing){
_local2 = Math.floor((Math.random() * 2));
if (_local2 == 0){
bodyClip.gotoAndStop("Spin Dance");
} else {
bodyClip.gotoAndStop("Flap");
};
} else {
this.walk = _walk;
};
}
public function get dancing():Boolean{
return (_dancing);
}
override public function set walk(_arg1:Boolean):void{
_walk = _arg1;
if (!_dancing){
if (((_walk) && (!(recovery)))){
if (bodyClip.currentLabel != "Walk"){
bodyClip.gotoAndStop("Walk");
};
} else {
if (bodyClip.currentLabel != "Standby"){
bodyClip.gotoAndStop("Standby");
};
};
};
}
public function changeModel():void{
var _local1:* = [];
var _local2:* = 1;
while (_local2 <= this.totalFrames) {
if (_local2 != this.currentFrame){
_local1.push(_local2);
};
_local2++;
};
lastFrame = this.bodyClip.currentFrame;
this.gotoAndStop(_local1[Math.floor((Math.random() * _local1.length))]);
}
override public function get doSomething():Boolean{
_doSomething = _dancing;
return (_doSomething);
}
override public function clearAllDestination():void{
_rideEscalator = false;
_rideElevator = false;
_insideBooth = false;
_dancing = false;
danceProgress = 0;
clearDestination();
}
}
}//package Instance
Section 102
//StaffJanitor (Instance.StaffJanitor)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class StaffJanitor extends Employee {
public const SPEED_LV;
public var body:MovieClip;
public var hitBody:MovieClip;
var _cleaning:Boolean;
var _trashTarget:MovieClip;
var expAdd:Number;
public function StaffJanitor(){
SPEED_LV = [2, 2, 3];
super();
bodyClip = body;
theBody = hitBody;
_cleaning = false;
_speed = 2;
_runModifier = 1;
expAdd = 0;
}
override function Initialize(_arg1:Event):void{
_speed = SPEED_LV[(_employeeLevel - 1)];
super.Initialize(_arg1);
}
override function tick(_arg1:ShopGameEvent):void{
cleaningProgress();
super.tick(_arg1);
}
override function setNewBodyClip():void{
bodyClip = body;
}
function cleaningProgress():void{
var _local1:*;
var _local2:*;
if (((_cleaning) && (!(_onUpgrade)))){
if (!recovery){
if (this.body.currentLabel != "Cleaning"){
this.body.gotoAndStop("Cleaning");
};
if (_trashTarget != null){
if (_trashTarget.parent != null){
_local1 = ((((Math.random() * 2) + 1) * _employeeLevel) * (Math.max(stamina, 10) / 100));
_local2 = _world;
if (_local2.checkUpgradeByName("Super Mop")){
_local1 = (_local1 * 1.2);
};
_trashTarget.trashLevel = (_trashTarget.trashLevel - _local1);
if (Calculate.chance((45 / _employeeLevel))){
stamina = (stamina - (Math.random() + 1));
};
if (trashTarget.trashLevel <= 0){
this.cleaning = false;
_trashTarget = null;
_currentDestination = null;
reachDestination = false;
if (_local2.checkUpgradeByName("Motivation")){
expAdd = (expAdd * 1.2);
};
this.experience = (this.experience + expAdd);
};
};
};
} else {
if (this.body.currentLabel != "Standby"){
this.body.gotoAndStop("Standby");
};
};
};
}
override function searchTarget():void{
if (_trashTarget == null){
_trashTarget = searchTrash();
};
_currentDestination = _trashTarget;
}
function searchTrash():MovieClip{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = new Array();
var _local4:* = _local2.floorList.indexOf(_onFloor);
var _local5:* = 0;
while (_local5 < _local2.trashList.length) {
_local7 = _local2.trashList[_local5];
if ((((((this.workArea == -1)) || ((((this.workArea == 0)) && ((_local7.onFloor == null)))))) || ((_local7.onFloor == _local2.floorList[(this.workArea - 1)])))){
if (_local7.trashLevel > 10){
_local3.push(_local7);
};
};
_local5++;
};
var _local6:* = new Array();
if (_local3.length > 0){
_local5 = 0;
while (_local5 < _local3.length) {
_local7 = _local3[_local5];
if (_local7.janitorOnDuty != null){
_local8 = _local7.janitorOnDuty;
if (!_local8.cleaning){
if (_onFloor == _local7.onFloor){
if (_local8.onFloor == _local7.onFloor){
if (Math.abs((_local7.x - this.x)) < Math.abs((_local7.x - _local8.x))){
_local6.push(_local7);
};
} else {
_local6.push(_local7);
};
} else {
if (_local8.onFloor != _local7.onFloor){
_local9 = _local2.floorList.indexOf(_local8.onFloor);
_local10 = _local2.floorList.indexOf(_local7.onFloor);
if (Math.abs((_local10 - _local4)) < Math.abs((_local10 - _local9))){
_local6.push(_local7);
};
};
};
};
} else {
_local6.push(_local7);
};
_local5++;
};
};
if (_local6.length > 0){
_local11 = null;
_local5 = 0;
while (_local5 < _local6.length) {
_local12 = _local6[_local5];
if (_local11 == null){
_local11 = _local12;
} else {
if (_onFloor == _local12.onFloor){
if (_onFloor == _local11.onFloor){
if (Math.abs((_local12.x - this.x)) < Math.abs((_local11.x - this.x))){
_local11 = _local12;
} else {
if (Math.abs((_local12.x - this.x)) == Math.abs((_local11.x - this.x))){
if (Calculate.chance(50)){
_local11 = _local12;
};
};
};
} else {
_local11 = _local12;
};
} else {
if (_onFloor != _local11.onFloor){
_local13 = _local2.floorList.indexOf(_local12.onFloor);
_local14 = _local2.floorList.indexOf(_local11.onFloor);
if (Math.abs((_local13 - _local4)) < Math.abs((_local14 - _local4))){
_local11 = _local12;
};
if (Math.abs((_local13 - _local4)) == Math.abs((_local14 - _local4))){
if (Calculate.chance(50)){
_local11 = _local12;
};
};
};
};
};
_local5++;
};
if (_local11.janitorOnDuty != null){
_local11.janitorOnDuty.trashTarget = null;
_local11.janitorOnDuty = null;
};
_local1 = _local11;
_local1.janitorOnDuty = this;
};
return (_local1);
}
override function lookingTargetProgress():void{
var _local1:* = _world;
if (!_goHome){
if (_targetPoint == null){
if (!((_rideElevator) || (_rideEscalator))){
if (_trashTarget != null){
if (_onFloor == _trashTarget.onFloor){
if (transportTarget != null){
transportTarget = null;
waitingElevator = false;
};
if (_trashTarget.trashHitBody){
if (!theBody.hitTestObject(_trashTarget.trashHitBody)){
if (_trashTarget.x < this.x){
this.dirrection = LEFT;
} else {
if (_trashTarget.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
reachDestination = false;
} else {
if (_walk){
this.walk = false;
};
if (!reachDestination){
this.cleaning = true;
reachDestination = true;
expAdd = Math.round((_trashTarget.trashLevel / 5));
};
};
};
};
if (floorTarget != _trashTarget.onFloor){
floorTarget = _trashTarget.onFloor;
};
};
};
} else {
if (!_cleaning){
if (_trashTarget != null){
_trashTarget.janitorOnDuty = null;
_trashTarget = null;
};
floorTarget = searchFloorTargetByPoint(_targetPoint);
if (!((_rideElevator) || (_rideEscalator))){
if (floorTarget == _onFloor){
if (this.parent.parent == this.world){
if (Math.abs((this.x - targetPoint.x)) > 5){
this.dirrection = ((this.x)<targetPoint.x) ? HumanObject.RIGHT : HumanObject.LEFT;
if (!_walk){
this.walk = true;
};
} else {
_targetPoint = null;
};
};
};
};
};
};
};
}
override protected function movingWhenWalk():void{
if (!_cleaning){
super.movingWhenWalk();
};
}
function set cleaning(_arg1:Boolean):void{
_cleaning = _arg1;
if (_cleaning){
this.bodyClip.gotoAndStop("Cleaning");
} else {
if (_walk){
this.bodyClip.gotoAndStop("Walk");
} else {
this.bodyClip.gotoAndStop("Standby");
};
};
}
function get cleaning():Boolean{
return (_cleaning);
}
override public function get doSomething():Boolean{
_doSomething = ((_cleaning) || (!((trashTarget == null))));
return (_doSomething);
}
public function set trashTarget(_arg1:MovieClip):void{
_trashTarget = _arg1;
}
public function get trashTarget():MovieClip{
return (_trashTarget);
}
override public function set goHome(_arg1:Boolean):void{
super.goHome = _arg1;
if (_goHome){
if (!_cleaning){
_trashTarget = null;
};
};
}
override function checkStatusOnUpgrade(_arg1:VisitorEvent):void{
var _local2:* = _world;
_speed = SPEED_LV[(_employeeLevel - 1)];
}
override public function clearAllDestination():void{
_rideEscalator = false;
_rideElevator = false;
_insideBooth = false;
_cleaning = false;
clearDestination();
}
override public function clearDestination():void{
super.clearDestination();
if (_currentDestination != null){
_currentDestination = null;
};
if (_trashTarget != null){
if (!_cleaning){
_trashTarget.janitorOnDuty = null;
_trashTarget = null;
};
};
}
override public function fire():void{
if (_trashTarget != null){
if (_trashTarget.janitorOnDuty == this){
_trashTarget.janitorOnDuty = null;
};
};
super.fire();
}
}
}//package Instance
Section 103
//StaffSecurity (Instance.StaffSecurity)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class StaffSecurity extends Employee {
public const SPEED_LV:Array;
const RUN_MOD_LV:Array;
public var body:MovieClip;
public var hitBody:MovieClip;
public var sight:MovieClip;
var _banditLocked:Array;
var _banditCapturedFromBooth:Array;
var _action:Boolean;
var _examine:Boolean;
var _villainDetected:MovieClip;
var examineCtr:int;
var actionTime:uint;
var banditCaptured:MovieClip;
var dashTimer:Number;
var justHired:Boolean;
public function StaffSecurity(){
SPEED_LV = [2, 2, 3];
RUN_MOD_LV = [3, 4, 5];
_banditLocked = new Array();
_banditCapturedFromBooth = new Array();
super();
bodyClip = body;
theBody = hitBody;
_speed = 2;
_runModifier = 2;
_action = false;
_examine = false;
justHired = true;
dashTimer = 0;
this.sight.visible = false;
banditCaptured = null;
actionTime = 0;
addEventListener(VisitorEvent.BECOMES_ENTER_ELEVATOR, CheckWhenEnterElevator);
}
override function Initialize(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local2:* = _world;
_speed = SPEED_LV[(_employeeLevel - 1)];
_runModifier = RUN_MOD_LV[(_employeeLevel - 1)];
_local2.addEventListener(BoothEvent.ALARM_TRIGGERED, checkAlarmTrigger);
if (_local2.alarmTrigger){
if (!_goHome){
_local3 = 0;
while (_local3 < _local2.banditList.length) {
_local4 = _local2.banditList[_local3];
if (_banditLocked.indexOf(_local4) < 0){
_banditLocked.push(_local4);
};
_local3++;
};
};
};
super.Initialize(_arg1);
addEventListener(Event.ENTER_FRAME, dashCheck);
}
override function tick(_arg1:ShopGameEvent):void{
searchVillainProgress();
chaseProgress();
examineProgress();
dashProgress();
super.tick(_arg1);
if (justHired){
justHired = false;
};
}
function dashProgress():void{
var _local2:*;
var _local1:* = _world;
if (!((((_rideElevator) || (_examine))) || (_goHome))){
if (_banditLocked.length > 0){
_local2 = searchNearestBandit();
if (_local2 != null){
if (_local2.securityChase.indexOf(this) >= 0){
if (_local1.checkUpgradeByName("Super Shoes")){
if (dashTimer <= 0){
if (Calculate.chance(((stamina / 100) * 60))){
dashTimer = 60;
};
};
};
} else {
dashTimer = 0;
};
} else {
dashTimer = 0;
};
} else {
dashTimer = 0;
};
} else {
dashTimer = 0;
};
}
function dashCheck(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (((_walk) && (_running))){
if (dashTimer > 0){
dashTimer--;
_local2 = new MovieClip();
if (this.body){
_local4 = Utility.crop(this.body, -12, -30, 24, 30);
_local5 = localToGlobal(new Point(-1, 0)).x;
_local6 = localToGlobal(new Point(1, 0)).x;
_local4.x = -12;
_local4.y = -30;
_local2.addChild(_local4);
};
_local2.alpha = 0.9;
_local2.x = this.x;
_local2.y = this.y;
_local2.scaleX = this.scaleX;
_local3 = this.parent.getChildIndex(this);
this.parent.addChildAt(_local2, _local3);
TweenLite.to(_local2, 0.5, {alpha:0, onComplete:_local2.parent.removeChild, onCompleteParams:[_local2]});
};
};
if ((((banditLocked.length <= 0)) || ((stamina <= 0)))){
dashTimer = 0;
};
}
override function checkStamina():void{
var _local1:* = _world;
if (!_local1.checkUpgradeByName("Segway")){
super.checkStamina();
} else {
if (!recovery){
if (!_walk){
if (!doSomething){
stamina = (stamina + (Math.random() * 0.5));
};
};
} else {
if (Calculate.chance((30 + (20 * _employeeLevel)))){
stamina = (stamina + ((Math.random() * 3) + 5));
};
};
};
if (!_inHome){
if (_action){
stamina = (stamina - ((Math.random() * 2) / (_employeeLevel * 3)));
};
if (((((_walk) && (_running))) && ((dashTimer > 0)))){
stamina = (stamina - ((Math.random() * 2) / (_employeeLevel * 1.5)));
};
};
}
override function setNewBodyClip():void{
bodyClip = body;
}
override function checkStatusOnUpgrade(_arg1:VisitorEvent):void{
var _local2:* = _world;
_speed = SPEED_LV[(_employeeLevel - 1)];
_runModifier = RUN_MOD_LV[(_employeeLevel - 1)];
}
function CheckWhenEnterElevator(_arg1:VisitorEvent):void{
var _local3:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local2:* = _arg1.booth;
_local3 = new Array();
var _local4:* = 0;
while (_local4 < _local2.visitorList.length) {
_local5 = _local2.visitorList[_local4];
if (_local5.parent != null){
if ((_local5 as Bandit)){
_local3.push(_local5);
};
};
_local4++;
};
if (_local3.length > 0){
waitingElevator = false;
transportTarget = null;
doAction(1);
_local6 = 1;
_local7 = _world;
if (_local7.checkUpgradeByName("Motivation")){
_local6 = 1.2;
};
_local8 = 0;
while (_local3.length > 0) {
_local5 = _local3.pop();
_local2.removeVisitor(_local5);
_local5.arrested = true;
_local8 = (_local8 + _local5.experienceCarrier);
};
this.experience = (this.experience + (_local8 * _local6));
};
}
function searchVillainProgress():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (((!(((_rideElevator) || (_examine)))) && ((_villainDetected == null)))){
_local2 = 0;
while (_local2 < _local1.visitorVillainList.length) {
_local3 = _local1.visitorVillainList[_local2];
if (((_local3.throwingTrash) && (!(_local3.captured)))){
if (_local3.theBody.hitTestObject(this.sight)){
_villainDetected = _local3;
break;
};
};
_local2++;
};
};
}
function examineProgress():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (_examine){
if ((examineCtr in _currentDestination.banditInside)){
if (banditCaptured != null){
_local2 = _currentDestination.banditInside.indexOf(banditCaptured);
if (_local2 >= 0){
_banditCapturedFromBooth.push(banditCaptured);
_currentDestination.banditInside.splice(_local2, 1);
};
banditCaptured = null;
} else {
if (Calculate.chance((20 * _employeeLevel))){
_banditCapturedFromBooth.push(_currentDestination.banditInside[examineCtr]);
_currentDestination.banditInside.splice(examineCtr, 1);
} else {
examineCtr++;
};
};
} else {
if (_currentDestination.body != null){
_local3 = _currentDestination.body.enterance;
_local4 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
this.x = _local4.x;
this.y = _local4.y;
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
_currentDestination.openTheDoor();
_examine = false;
};
};
};
}
function checkAlarmTrigger(_arg1:BoothEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (!_goHome){
_local2 = _world;
_local3 = 0;
while (_local3 < _local2.banditList.length) {
_local4 = _local2.banditList[_local3];
if (_banditLocked.indexOf(_local4) < 0){
_banditLocked.push(_local4);
};
_local3++;
};
};
}
function chaseProgress():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = _world;
if (!((_rideElevator) || (_examine))){
_local2 = 0;
while (_local2 < _local1.banditList.length) {
_local3 = _local1.banditList[_local2];
if (!((((((_local3.hiding) || (_local3.insideBooth))) || (_local3.arrested))) || (_local3.rideElevator))){
_local4 = _banditLocked.indexOf(_local3);
if (_local4 < 0){
if (_local3.theBody.hitTestObject(this.sight)){
if (dialogBox == null){
_local5 = new legenddialoguebox();
_local5.iconClip = new legendbanditdetected();
_local5.relation = this;
_local5.delay = 7;
_local1.addDialogBox(_local5);
};
_banditLocked.push(_local3);
};
};
};
_local2++;
};
};
}
override function lookingTargetProgress():void{
if (!_action){
lookingBanditProgress();
lookingVillainProgress();
checkCollitionBandit();
if (_targetPoint != null){
if (!doSomething){
floorTarget = searchFloorTargetByPoint(_targetPoint);
if (!((_rideElevator) || (_rideEscalator))){
if (floorTarget == _onFloor){
if (this.parent.parent == this.world){
if (Math.abs((this.x - targetPoint.x)) > 5){
this.dirrection = ((this.x)<targetPoint.x) ? HumanObject.RIGHT : HumanObject.LEFT;
if (!_walk){
this.walk = true;
};
} else {
_targetPoint = null;
};
};
};
};
};
};
};
}
function checkCollitionBandit():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (!justHired){
_local2 = 0;
while (_local2 < _local1.banditList.length) {
_local3 = _local1.banditList[_local2];
if (((((!(_local3.arrested)) && (!(_local3.hiding)))) && (!(_local3.insideBooth)))){
if (_rideElevator == _local3.rideElevator){
if (((!(_action)) && (_local3.theBody.hitTestObject(this.theBody)))){
catchTheBandit(_local3);
break;
};
};
};
_local2++;
};
};
}
function lookingVillainProgress():void{
if (_villainDetected != null){
if (((_villainDetected.captured) || (!(_villainDetected.insideMall())))){
_villainDetected = null;
};
};
if (_villainDetected != null){
if (!_villainDetected.insideBooth){
if (!((_villainDetected.rideElevator) || (_villainDetected.rideEscalator))){
if (_villainDetected.onFloor == _onFloor){
floorTarget = _villainDetected.onFloor;
if (!((_rideEscalator) || (_rideElevator))){
if (transportTarget != null){
transportTarget = null;
waitingElevator = false;
};
if (!this.theBody.hitTestObject(_villainDetected.theBody)){
if (_villainDetected.x < this.x){
this.dirrection = LEFT;
} else {
if (_villainDetected.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
} else {
catchTheVillain(_villainDetected);
};
};
} else {
_villainDetected = null;
};
} else {
_villainDetected = null;
};
} else {
_villainDetected = null;
};
};
}
function lookingBanditProgress():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
checkBanditIsOutRange();
checkBanditInSameElevator();
if (!((_rideElevator) || (_examine))){
if (_banditLocked.length > 0){
_local1 = searchNearestBandit();
if (_local1 != null){
if (!((_local1.rideElevator) || (_local1.rideEscalator))){
floorTarget = _local1.onFloor;
if (_local1.onFloor == _onFloor){
if (!_rideEscalator){
if (!_local1.insideBooth){
if (!this.theBody.hitTestObject(_local1.theBody)){
if (_local1.x < this.x){
this.dirrection = LEFT;
} else {
if (_local1.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
} else {
catchTheBandit(_local1);
};
} else {
if (_local1.currentDestination.body != null){
_local2 = _local1.currentDestination.body.enterance;
if (!this.theBody.hitTestObject(_local2)){
_local3 = _world;
_local4 = _local3.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local4.x < this.x){
this.dirrection = LEFT;
} else {
if (_local4.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
reachDestination = false;
} else {
if (_walk){
this.walk = false;
};
if (!reachDestination){
banditCaptured = _local1;
_currentDestination = _local1.currentDestination;
beginEnterBooth();
reachDestination = true;
};
};
};
};
if (transportTarget != null){
waitingElevator = false;
transportTarget = null;
};
};
};
} else {
if (_local1.rideEscalator){
if (!this.theBody.hitTestObject(_local1.theBody)){
if (((_rideEscalator) && ((_local1.transportTarget == transportTarget)))){
if (_local1.x < this.x){
this.scaleX = -1;
} else {
if (_local1.x > this.x){
this.scaleX = 1;
};
};
if (!_walk){
this.walk = true;
};
};
} else {
catchTheBandit(_local1);
};
};
if (transportTarget != _local1.transportTarget){
_local5 = checkLegalTransport(_local1.transportTarget);
if (_local5 != null){
waitingElevator = false;
transportTarget = _local5;
};
};
};
};
};
};
}
function checkBanditInSameElevator():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (((!((transportTarget == null))) && ((transportTarget is FacilityElevator)))){
if (_rideElevator){
_local1 = new Array();
_local2 = 0;
while (_local2 < transportTarget.visitorList) {
_local6 = transportTarget.visitorList[_local2];
if ((_local6 as Bandit)){
_local1.push(_local6);
};
_local2++;
};
if (_local1.length > 0){
doAction(1);
};
_local3 = 1;
_local4 = _world;
if (_local4.checkUpgradeByName("Motivation")){
_local3 = 1.2;
};
_local5 = 0;
while (_local1.length > 0) {
_local6 = _local1.pop();
_local6.arrested = true;
transportTarget.removeVisitor(_local6);
_local5 = (_local5 + _local6.experienceCarrier);
};
this.experience = (this.experience + _local5);
};
};
}
function checkBanditIsOutRange():void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local1:* = _world;
var _local2:* = new Array();
var _local3:* = new Array();
var _local4:* = new Array();
var _local5:* = 0;
while (_local5 < _banditLocked.length) {
_local6 = _banditLocked[_local5];
if ((((_local6.parent == null)) || ((_local1.banditList.indexOf(_local6) < 0)))){
_local3.push(_local6);
} else {
if (!_local1.alarmTrigger){
_local7 = _local1.globalToLocal(_local6.parent.localToGlobal(new Point(_local6.x, _local6.y)));
_local8 = _local1.floorList.indexOf(_local6);
_local9 = _local1.floorList.indexOf(this);
_local10 = Math.abs((_local8 - _local9));
_local11 = Math.max((Math.abs((_local7.x - this.x)) - (_local10 * 50)));
if ((((_local10 > 1)) || ((_local11 >= (this.sight.width * 2))))){
_local2.push(_local6);
};
};
if (_local6.arrested){
_local4.push(_local6);
};
};
_local5++;
};
while (_local3.length > 0) {
_local6 = _local3.pop();
_local12 = _banditLocked.indexOf(_local6);
if (_local12 >= 0){
_banditLocked.splice(_local12, 1);
};
};
while (_local2.length > 0) {
_local6 = _local2.pop();
_local12 = _banditLocked.indexOf(_local6);
if (_local12 >= 0){
_banditLocked.splice(_local12, 1);
};
};
while (_local4.length > 0) {
_local6 = _local4.pop();
_local12 = _banditLocked.indexOf(_local6);
if (_local12 >= 0){
_banditLocked.splice(_local12, 1);
};
};
}
override function beginEnterBooth():void{
_insideBooth = true;
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_currentDestination.openTheDoor();
}
function catchTheVillain(_arg1:MovieClip):void{
var _local4:*;
doAction(5);
_arg1.captured = true;
_arg1.securityOnDuty = this;
var _local2:* = _world;
if (_local2.checkUpgradeByName("Motivation")){
this.experience = (this.experience + 9);
} else {
this.experience = (this.experience + 6);
};
var _local3:* = this.parent;
if (_arg1.parent == _local3){
_local4 = _local3.getChildIndex(this);
_local3.addChildAt(_arg1, _local4);
};
_villainDetected = null;
}
function catchTheBandit(_arg1:MovieClip):void{
var _local6:*;
doAction(1);
_arg1.arrested = true;
var _local2:* = 1;
var _local3:* = _world;
if (_local3.checkUpgradeByName("Motivation")){
_local2 = 1.4;
};
this.experience = (this.experience + (_arg1.experienceCarrier * _local2));
var _local4:* = this.parent;
if (_arg1.parent == _local4){
_local6 = _local4.getChildIndex(this);
_local4.addChildAt(_arg1, _local6);
};
var _local5:* = _banditLocked.indexOf(_arg1);
if (_local5 >= 0){
_banditLocked.splice(_local5, 1);
};
}
function checkLegalTransport(_arg1:MovieClip):MovieClip{
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local2:* = _world;
var _local3:* = null;
var _local4:* = false;
var _local5:* = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
if ((_arg1 is FacilityElevator)){
_local6 = 0;
while (_local6 < _arg1.roomList.length) {
_local7 = _local2.globalToLocal(_arg1.roomList[_local6].parent.localToGlobal(new Point(_arg1.roomList[_local6].x, _arg1.roomList[_local6].y)));
if (_local7.y == _local5.y){
elevatorRoomTarget = _arg1.roomList[_local6];
_local4 = true;
break;
};
_local6++;
};
} else {
if ((_arg1 is FacilityEscalator)){
_local8 = _arg1.lowerPosition;
_local9 = _local2.globalToLocal(_local8.parent.localToGlobal(new Point(_local8.x, _local8.y)));
_local10 = _arg1.upperPosition;
_local11 = _local2.globalToLocal(_local10.parent.localToGlobal(new Point(_local10.x, _local10.y)));
if ((((_local9.y == _local5.y)) || ((_local11.y == _local5.y)))){
_local4 = true;
};
};
};
if (_local4){
_local3 = _arg1;
};
return (_local3);
}
function searchNearestBandit():MovieClip{
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:* = _world;
var _local2:* = null;
var _local3:* = null;
var _local4:* = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
var _local5:* = _local1.floorList.indexOf(_onFloor);
var _local6:* = 0;
while (_local6 < _banditLocked.length) {
_local7 = _banditLocked[_local6];
if (_local7.parent != null){
if (_local3 == null){
_local3 = _local7;
} else {
if (_local3.onFloor == _onFloor){
_local8 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local9 = _local1.globalToLocal(_local7.parent.localToGlobal(new Point(_local7.x, _local7.y)));
if (_local3.theBody.hitTestObject(this.sight)){
if (_local7.theBody.hitTestObject(this.sight)){
if (Math.abs((_local4.x - _local8.x)) > Math.abs((_local4.x - _local9.x))){
_local3 = _local7;
};
};
} else {
if (_local7.theBody.hitTestObject(this.sight)){
_local3 = _local7;
} else {
if (Math.abs((_local4.x - _local8.x)) > Math.abs((_local4.x - _local9.x))){
_local3 = _local7;
};
};
};
} else {
if (_local7.onFloor == _onFloor){
_local3 = _local7;
} else {
_local10 = _local1.floorList.indexOf(_local10);
_local11 = _local1.floorList.indexOf(_local11);
if (Math.abs((_local11 - _local5)) > Math.abs((_local10 - _local5))){
_local3 = _local7;
};
};
};
};
};
_local6++;
};
_local2 = _local3;
return (_local2);
}
override function checkIdleExp():void{
if (!_goHome){
if (((_running) && (_walk))){
if (dashTimer > 0){
idleCtr = (idleCtr + 3);
} else {
idleCtr = (idleCtr + 2);
};
} else {
idleCtr++;
};
if (idleCtr >= EXP_GAIN_IDLE){
this.experience++;
idleCtr = (idleCtr - EXP_GAIN_IDLE);
};
};
}
override protected function movingWhenWalk():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (!recovery){
_running = (_banditLocked.length > 0);
if (!((((((_rideElevator) || (reachDestination))) || (_examine))) || (waitingElevator))){
if (((_rideEscalator) && ((_banditLocked.length <= 0)))){
if (_walk){
this.walk = false;
};
} else {
if (!_walk){
this.walk = true;
};
};
} else {
if (_walk){
this.walk = false;
};
};
} else {
if (_walk){
this.walk = false;
};
};
if (((_walk) && (!(_action)))){
_local2 = 0;
_local3 = ((stamina)>=60) ? 1 : (stamina / 60);
if (_running){
if (dashTimer > 0){
_local2 = (_runModifier * 2);
} else {
_local2 = (_runModifier * _local3);
};
} else {
_local2 = (-((5 - Math.floor((stamina / (stamina / 3))))) / 5);
};
_local4 = _speed;
if (_local1.checkUpgradeByName("Segway")){
_local4 = (_local4 * 1.2);
};
this.x = (this.x + (this.scaleX * (_local4 + _local2)));
if (!(_banditLocked.length > 0)){
limitnessMove();
};
checkEdge();
};
}
override protected function goHomeProgress():void{
if (_banditLocked.length <= 0){
super.goHomeProgress();
};
}
override public function get doSomething():Boolean{
_doSomething = (((((((((_banditLocked.length > 0)) || (_action))) || (_examine))) || (_insideBooth))) || (!((_villainDetected == null))));
return (_doSomething);
}
function doAction(_arg1:int=1){
_action = true;
actionTime = _arg1;
this.bodyClip.gotoAndStop("Action");
addEventListener(Event.ENTER_FRAME, checkActionTime);
}
function EnterTheBooth(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_examine = true;
enterBooth(_local2);
_local2.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_local2.closeTheDoor();
}
function ExitTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
exitBooth(_currentDestination);
_local2.removeEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
var _local3:* = _arg1.target;
_local3.closeTheDoor();
}
function enterBooth(_arg1:MovieClip):void{
this.visible = false;
examineCtr = 0;
dispatchEvent(new VisitorEvent(VisitorEvent.ENTER_BOOTH, _arg1));
}
function exitBooth(_arg1:MovieClip):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
dispatchEvent(new VisitorEvent(VisitorEvent.EXIT_BOOTH, _arg1));
var _local2:* = _world;
this.visible = true;
if (_banditCapturedFromBooth.length > 0){
doAction(1);
_local3 = 0;
_local4 = 0;
while (_local4 < _banditCapturedFromBooth.length) {
_local3 = (_local3 + _banditCapturedFromBooth[_local4].experienceCarrier);
_local4++;
};
_local5 = 1;
if (_local2.checkUpgradeByName("Motivation")){
_local5 = 1.4;
};
this.experience = (this.experience + (_local3 * _local5));
};
this.walk = true;
while (_banditCapturedFromBooth.length > 0) {
_local6 = _banditCapturedFromBooth.pop();
_local6.insideBooth = false;
_local6.arrested = true;
_local6.visible = true;
_local6.y = this.y;
_local6.x = (this.x + (Math.floor((Math.random() * 10)) - 5));
_local7 = _banditLocked.indexOf(_local6);
if (_local7 >= 0){
_banditLocked.splice(_local7, 1);
};
};
_currentDestination = null;
_insideBooth = false;
reachDestination = false;
}
function checkActionTime(_arg1:Event):void{
var _local2:*;
var _local3:*;
if (this.parent != null){
_local2 = _world;
if (actionTime > 0){
if (this.bodyClip.currentLabel == "Action"){
if (this.bodyClip.body){
this.bodyClip.body.stop();
_local3 = 0;
while (_local3 < _local2.gameSpeed) {
this.bodyClip.body.nextFrame();
if (this.bodyClip.body.currentFrame >= this.bodyClip.body.totalFrames){
this.bodyClip.body.gotoAndStop(1);
actionTime--;
if (actionTime <= 0){
break;
};
};
_local3++;
};
};
};
} else {
_action = false;
if (this.parent != null){
_walk = !(((((waitingElevator) || (_rideElevator))) || (_rideEscalator)));
if (_walk){
this.bodyClip.gotoAndStop("Walk");
} else {
this.bodyClip.gotoAndStop("Stanby");
};
};
dispatchEvent(new VisitorEvent(VisitorEvent.SECURITY_FINISH_ACTION));
removeEventListener(Event.ENTER_FRAME, checkActionTime);
};
} else {
removeEventListener(Event.ENTER_FRAME, checkActionTime);
};
}
override function endFlashing():void{
var _local1:* = _world;
_employeeLevel++;
this.experience = 0;
dispatchEvent(new VisitorEvent(VisitorEvent.BEFORE_FLASHING_PROMOTE));
lastLabel = bodyClip.currentLabel;
if (bodyClip.body){
lastFrame = bodyClip.body.currentFrame;
} else {
lastFrame = 0;
};
if (_local1.checkUpgradeByName("Segway")){
gotoAndStop((_employeeLevel + 3));
} else {
gotoAndStop(_employeeLevel);
};
TweenLite.to(this, 0.5, {tint:null, onStart:initFrame, onComplete:completeUpgrade});
}
public function checkCurrentAnimation():void{
lastLabel = bodyClip.currentLabel;
if (bodyClip.body){
lastFrame = bodyClip.body.currentFrame;
} else {
lastFrame = 0;
};
}
public function set banditLocked(_arg1:Array):void{
_banditLocked = _arg1;
}
public function get banditLocked():Array{
return (_banditLocked);
}
public function get examine():Boolean{
return (_examine);
}
public function get action():Boolean{
return (_action);
}
override public function set walk(_arg1:Boolean):void{
_walk = _arg1;
if (!_action){
if (((_walk) && (!(recovery)))){
if (bodyClip.currentLabel != "Walk"){
bodyClip.gotoAndStop("Walk");
};
} else {
if (bodyClip.currentLabel != "Standby"){
bodyClip.gotoAndStop("Standby");
};
};
};
}
override public function clearAllDestination():void{
_rideEscalator = false;
_rideElevator = false;
_insideBooth = false;
clearDestination();
}
override public function clearDestination():void{
super.clearDestination();
if (_currentDestination != null){
_examine = false;
_banditLocked = [];
_banditCapturedFromBooth = [];
_villainDetected = null;
if (_insideBooth){
exitBooth(_currentDestination);
} else {
_currentDestination = null;
};
};
}
}
}//package Instance
Section 104
//Subway (Instance.Subway)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.ui.*;
public class Subway extends Booth {
const TRAIN_POS = 6;
public var subwayEnterance:MovieClip;
public var subwayColArea:MovieClip;
public var maskSubway:MovieClip;
public var maskTrain:MovieClip;
public var subwayBorder:MovieClip;
public var subwayBody:MovieClip;
var trainDelay:uint;
var trainContainer:MovieClip;
var onStage:Boolean;
public function Subway(){
var _local1:* = getChildIndex(maskTrain);
trainContainer = new MovieClip();
trainContainer.mask = maskTrain;
addChildAt(trainContainer, _local1);
_local1 = getChildIndex(maskSubway);
_extraContainer = new MovieClip();
addChildAt(_extraContainer, _local1);
_extraContainer.mask = maskSubway;
_upgradeAble = false;
onStage = false;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
override function Initialize(_arg1:Event):void{
maskTrain.mouseEnabled = false;
maskTrain.mouseChildren = false;
subwayBorder.mouseEnabled = false;
subwayBorder.mouseChildren = false;
subwayBody.mouseEnabled = false;
subwayBody.mouseChildren = false;
maskSubway.mouseEnabled = false;
maskSubway.mouseChildren = false;
subwayEnterance.mouseEnabled = false;
subwayEnterance.mouseChildren = false;
subwayColArea.addEventListener(MouseEvent.CLICK, boothOnClick);
trainDelay = 30;
_world.addEventListener(ShopGameEvent.UPDATE, updateTrain);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
onStage = true;
}
function updateTrain(_arg1:ShopGameEvent):void{
var _local3:*;
var _local4:*;
var _local2:* = _world;
if (trainContainer.numChildren <= 0){
if (trainDelay > 0){
_local3 = 0;
_local3 = (((6 - Math.abs((15 - _local2.gameHour))) * 8) + 25);
if (Calculate.chance(_local3)){
trainDelay--;
};
} else {
addTrain();
trainDelay = (Math.round((Math.random() * 10)) + 20);
};
while (_visitorList.length > 0) {
_local4 = _visitorList.pop();
_local4.rideCar = false;
_local4.exitBooth(this);
};
};
}
function addTrain():void{
var _local1:* = _world;
var _local2:* = new SubwayTrain();
_local2.world = _local1;
_local2.trainSubway = this;
_local2.addEventListener(VisitorEvent.TRAIN_DROP_VISITOR, trainDropVisitor);
_local2.y = TRAIN_POS;
if (Calculate.chance(50)){
_local2.x = -(subwayColArea.width);
_local2.scaleX = -1;
} else {
_local2.x = subwayColArea.width;
_local2.scaleX = 1;
};
_local2.carriage = Math.floor(((Math.random() * 2) + 4));
var _local3:* = _local1.maxVisitor;
if (_local1.getNumberVisitor() < Math.min((_local1.maxVisitor * 1.5), _local1.MAX_VISITOR)){
if ((((_local1.gameHour >= 10)) && ((_local1.gameHour < 21)))){
_local2.passanger = Math.max((_local2.carriage * Math.round((Math.random() * ((6 - Math.abs((15 - _local1.gameHour))) * 0.6)))), 3);
} else {
_local2.passanger = 0;
};
} else {
_local2.passanger = 0;
};
trainContainer.addChild(_local2);
}
function trainDropVisitor(_arg1:VisitorEvent):void{
var _local2:* = _arg1.target;
var _local3:* = 0;
while (_local3 < _local2.passanger) {
addVisitor(VisitorList.getRandomVisitorList());
_local3++;
};
_local2.passanger = 0;
}
function addVisitor(_arg1:Class):void{
var _local2:*;
var _local3:*;
if (onStage){
_local2 = _world;
_local3 = new (_arg1);
_local3.world = _local2;
if (Calculate.chance(50)){
_local3.dirrection = HumanObject.RIGHT;
} else {
_local3.dirrection = HumanObject.LEFT;
};
_local3.x = ((Math.random() * subwayEnterance.width) - (subwayEnterance.width / 2));
_local3.onFloor = this.onFloor;
_local3.y = 0;
_local3.walk = false;
_local3.insideBooth = true;
_local3.rideCar = true;
_visitorList.push(_local3);
_extraContainer.addChild(_local3);
_local3.addEventListener(VisitorEvent.ON_OUT_WORLD, _local2.visitorOutWorld);
if (VisitorList.compareTypeOfVisitor(_arg1) == VisitorList.NORMAL){
_local2.visitorList.push(_local3);
} else {
if (VisitorList.compareTypeOfVisitor(_arg1) == VisitorList.VILLAIN){
_local2.visitorVillainList.push(_local3);
};
};
dispatchEvent(new ShopGameEvent(ShopGameEvent.VISITOR_ARRIVE));
};
}
override function removed(_arg1:Event):void{
subwayColArea.removeEventListener(MouseEvent.CLICK, boothOnClick);
_world.removeEventListener(ShopGameEvent.UPDATE, updateTrain);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
onStage = false;
}
}
}//package Instance
Section 105
//Train (Instance.Train)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
public class Train extends ShopEmpireObject {
var _carriage:uint;
var _passanger:uint;
var trainSpeed:Number;
var dropDelay:uint;
var _trainHeadWidth:Number;
var _trainBodyWidth:Number;
var _trainBackWidth:Number;
var _trainSubway:Object;
var arrive:Boolean;
public function Train(){
_carriage = 0;
_passanger = 0;
trainSpeed = 20;
dropDelay = 5;
arrive = false;
}
override function Initialize(_arg1:Event):void{
var _local6:*;
var _local2:* = 0;
var _local3:* = new TrainHead();
_local3.x = 0;
_local3.y = 0;
addChild(_local3);
_trainHeadWidth = _local3.width;
_local2 = (_local2 + _local3.width);
_trainBodyWidth = 0;
var _local4:* = 0;
while (_local4 < _carriage) {
_local6 = new TrainBody();
_local6.x = _local2;
_local6.y = 0;
addChild(_local6);
_local2 = (_local2 + _local6.width);
_trainBodyWidth = (_trainBodyWidth + _local6.width);
_local4++;
};
var _local5:* = new TrainBack();
_local5.x = _local2;
_local5.y = 0;
addChild(_local5);
_trainBackWidth = (_trainBackWidth + _local5.width);
addEventListener(Event.ENTER_FRAME, movingTrain);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function movingTrain(_arg1:Event):void{
var _local4:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < _local2.gameSpeed) {
_local4 = ((this.scaleX)==1) ? (-(_trainSubway.width) / 2) : (_trainSubway.width / 2);
this.x = (this.x - (trainSpeed * this.scaleX));
if (_passanger > 0){
if (Math.abs((this.x + ((this.width / 2) * this.scaleX))) < 60){
if (trainSpeed > 0){
if (trainSpeed > 5){
trainSpeed = (trainSpeed - 5);
} else {
trainSpeed--;
};
} else {
if (!arrive){
arrive = true;
dropDelay = 5;
_local2.addEventListener(ShopGameEvent.UPDATE, dropVisitor);
};
};
};
} else {
if (trainSpeed < 20){
if (trainSpeed < 5){
trainSpeed++;
} else {
trainSpeed = (trainSpeed + 5);
};
};
};
if (_local4 <= 0){
if ((this.x + this.width) < _local4){
this.parent.removeChild(this);
break;
};
} else {
if (_local4 >= 0){
if ((this.x - this.width) > _local4){
this.parent.removeChild(this);
break;
};
};
};
_local3++;
};
}
function dropVisitor(_arg1:ShopGameEvent):void{
var _local2:* = _arg1.currentTarget;
if (dropDelay > 0){
dropDelay--;
} else {
dispatchEvent(new VisitorEvent(VisitorEvent.TRAIN_DROP_VISITOR));
_local2.removeEventListener(ShopGameEvent.UPDATE, dropVisitor);
arrive = false;
};
}
function removed(_arg1:Event):void{
_world.removeEventListener(ShopGameEvent.UPDATE, dropVisitor);
removeEventListener(Event.ENTER_FRAME, movingTrain);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function set carriage(_arg1:uint):void{
_carriage = _arg1;
}
public function get carriage():uint{
return (_carriage);
}
public function set passanger(_arg1:uint):void{
_passanger = _arg1;
}
public function get passanger():uint{
return (_passanger);
}
public function get trainHeadWidth():Number{
return (_trainHeadWidth);
}
public function get trainBodyWidth():Number{
return (_trainBodyWidth);
}
public function get trainBackWidth():Number{
return (_trainBackWidth);
}
public function set trainSubway(_arg1:Object):void{
_trainSubway = _arg1;
}
public function get trainSubway():Object{
return (_trainSubway);
}
}
}//package Instance
Section 106
//Trash (Instance.Trash)
package Instance {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
import Instance.modules.*;
public class Trash extends ShopEmpireObject {
public var trashHitBody:MovieClip;
var _trashLevel:Number;
var _onFloor:MovieClip;
var _janitorOnDuty:MovieClip;
public function Trash(){
_trashLevel = 0;
_janitorOnDuty = null;
stop();
}
override function Initialize(_arg1:Event):void{
var _local2:* = _world;
checkTrashLevel();
}
function checkTrashLevel():void{
var _local1:*;
var _local2:*;
if (_trashLevel > 90){
gotoAndStop("Max Dirty");
} else {
if (_trashLevel > 70){
gotoAndStop("Very Dirty");
} else {
if (_trashLevel > 50){
gotoAndStop("Dirty");
} else {
if (_trashLevel > 30){
gotoAndStop("Looks Dirty");
} else {
if (_trashLevel > 20){
gotoAndStop("Little Dirty");
} else {
gotoAndStop("Not Dirty");
};
};
};
};
};
this.visible = (_trashLevel > 10);
if (_trashLevel <= 0){
_local1 = _world;
_local2 = _local1.trashList.indexOf(this);
if (_local2 >= 0){
_local1.trashList.splice(_local2, 1);
};
this.parent.removeChild(this);
};
}
public function set trashLevel(_arg1:Number){
_trashLevel = Math.min(_arg1, 100);
checkTrashLevel();
}
public function get trashLevel():Number{
return (_trashLevel);
}
public function set onFloor(_arg1:MovieClip){
_onFloor = _arg1;
}
public function get onFloor():MovieClip{
return (_onFloor);
}
public function set janitorOnDuty(_arg1:MovieClip):void{
_janitorOnDuty = _arg1;
}
public function get janitorOnDuty():MovieClip{
return (_janitorOnDuty);
}
}
}//package Instance
Section 107
//UI_Clock (Instance.UI_Clock)
package Instance {
import flash.display.*;
public class UI_Clock extends MovieClip {
public var nightSymbol:MovieClip;
public var shortNeedle:MovieClip;
public var daySymbol:MovieClip;
public var longNeedle:MovieClip;
var _hour:int;
var _minute:int;
function set hour(_arg1:int):void{
while (_arg1 >= 24) {
_arg1 = (_arg1 - 24);
};
_hour = _arg1;
shortNeedle.rotation = ((_hour * 30) + (_minute * 0.5));
if (daySymbol != null){
if ((((_hour >= 17)) && ((_hour < 19)))){
daySymbol.alpha = (1 - (((_hour - 17) / 2) + ((_minute * 1) / 120)));
} else {
if ((((_hour >= 5)) && ((_hour < 7)))){
daySymbol.alpha = (((_hour - 5) / 2) + ((_minute * 1) / 120));
} else {
if ((((_hour >= 19)) || ((_hour < 5)))){
daySymbol.alpha = 0;
} else {
daySymbol.alpha = 1;
};
};
};
};
}
function set minute(_arg1:int):void{
while (_arg1 >= 60) {
_arg1 = (_arg1 - 60);
};
_minute = _arg1;
shortNeedle.rotation = ((_hour * 30) + (_minute * 0.5));
longNeedle.rotation = (_minute * 6);
if (daySymbol != null){
if ((((_hour >= 17)) && ((_hour < 19)))){
daySymbol.alpha = (1 - (((_hour - 17) / 2) + ((_minute * 1) / 120)));
} else {
if ((((_hour >= 5)) && ((_hour < 7)))){
daySymbol.alpha = (((_hour - 5) / 2) + ((_minute * 1) / 120));
} else {
if ((((_hour >= 19)) || ((_hour < 5)))){
daySymbol.alpha = 0;
} else {
daySymbol.alpha = 1;
};
};
};
};
}
function get hour():int{
return (_hour);
}
function get minute():int{
return (_minute);
}
}
}//package Instance
Section 108
//UI_GameInterface (Instance.UI_GameInterface)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.modules.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.text.*;
import Instance.ui.*;
public class UI_GameInterface extends MovieClip {
const CCTV_X = 45;
const CCTV_Y = 60;
const CCTV_WIDTH = 240;
const CCTV_HEIGHT = 150;
const NOTIFICATION_X = 630;
const NOTIFICATION_Y = 410;
public var facilitySector:UI_SectorButtonFacility;
public var btnMailBox:UI_ButtonMailBox;
public var speedButton2x:UI_ButtonSpeed2x;
public var btnCancelBuild:SimpleButton;
public var speedButton1x:UI_ButtonSpeed1x;
public var btnDetailStaff:BtnParameterStaff;
public var btnDetailVisitor:BtnParameterVisitor;
public var saveNote:MovieClip;
public var notice:MovieClip;
public var flagSymbol:MovieClip;
public var transferPanel:MovieClip;
public var tipsPanel:MovieClip;
public var btnQuestionMark:SimpleButton;
public var btnPauseResume:UI_ButtonPauseResume;
public var soundControl:MovieClip;
public var missionMask:MovieClip;
public var btnEntertainment:UI_ButtonEntertainment;
public var btnStatistic:UI_ButtonStatistic;
public var btnTransfer:SimpleButton;
public var upgradeSector:UI_SectorButtonExtraUpgrade;
public var miniMap:UI_Minimap;
public var btnFacility:UI_ButtonFacility;
public var btnLegend:SimpleButton;
public var popularityMeter:TextField;
public var playerName:TextField;
public var btnDrag:UI_ButtonDrag;
public var btnAchievement:SimpleButton;
public var visitorDetail:UI_VisitorDetailInformation;
public var btnShop:UI_ButtonShop;
public var dayPassedText:TextField;
public var btnMiniMap:SimpleButton;
public var btnFood:UI_ButtonFood;
public var legendBox:MovieClip;
public var budgetPage:MovieClip;
public var btnStaff:UI_ButtonEmployee;
public var btnMenu:SimpleButton;
public var btnGamesfree:SimpleButton;
public var blackScreen:MovieClip;
public var entertainmentSector:UI_SectorButtonEntertainment;
public var boothDetail:UI_BoothDetailInformation;
public var btnReverseBuild:SimpleButton;
public var btnWorldMap:SimpleButton;
public var foodSector:UI_SectorButtonFood;
public var shopSector:UI_SectorButtonShop;
public var rewardData:TextField;
public var btnExtra:UI_ButtonExtra;
public var gameClock:UI_Clock;
public var workTimeSetting:MovieClip;
public var staffDetail:UI_StaffDetailInformation;
public var btnDetailBooth:BtnParameterBooth;
public var cashLabel:TextField;
public var currentCashShown:TextField;
public var staffSector:UI_SectorButtonStaff;
public var rewardMask:MovieClip;
public var currentMission:TextField;
public var btnSelect:UI_ButtonSelect;
public var speedButton3x:UI_ButtonSpeed3x;
var _informationClip:MovieClip;
var _toggleButtonList:Array;
var speedButtonList:Array;
var detailButtonList:Array;
var detailShown:MovieClip;
var visitorDetailPosition:Point;
var staffDetailPosition:Point;
var boothDetailPosition:Point;
var miniMapPosition:Point;
var sectorPosition:Number;
var upgradePosition:Point;
var budgetPosition:Point;
var transferPanelPosition:Point;
var legendBoxPosition:Point;
var currentSector:MovieClip;
var blackScreenContainer:MovieClip;
var menuContainer:MovieClip;
var cctvContainer:MovieClip;
var miniMapContainer:MovieClip;
var legendContainer:MovieClip;
var cctv:MovieClip;
var cctvTime:Number;
var theRoot;
var notificationList;
var _cash:Number;
var blinkTextDelay;// = 0
public function UI_GameInterface(){
var _local2:*;
_toggleButtonList = new Array();
speedButtonList = new Array();
detailButtonList = new Array();
blackScreenContainer = new MovieClip();
menuContainer = new MovieClip();
cctvContainer = new MovieClip();
miniMapContainer = new MovieClip();
legendContainer = new MovieClip();
notificationList = new Array();
super();
initToggleButton();
initSpeedButton();
initDetailButton();
visitorDetail.visible = false;
visitorDetailPosition = new Point(visitorDetail.x, visitorDetail.y);
removeChild(visitorDetail);
staffDetail.visible = false;
staffDetailPosition = new Point(staffDetail.x, staffDetail.y);
removeChild(staffDetail);
boothDetail.visible = false;
boothDetailPosition = new Point(boothDetail.x, boothDetail.y);
removeChild(boothDetail);
removeChild(shopSector);
removeChild(foodSector);
removeChild(entertainmentSector);
removeChild(staffSector);
removeChild(facilitySector);
upgradePosition = new Point(upgradeSector.x, upgradeSector.y);
removeChild(upgradeSector);
budgetPosition = new Point(budgetPage.x, budgetPage.y);
budgetPage.relation = this;
removeChild(budgetPage);
transferPanelPosition = new Point(transferPanel.x, transferPanel.y);
removeChild(transferPanel);
removeChild(notice);
tipsPanel.relation = this;
removeChild(tipsPanel);
legendBoxPosition = new Point(legendBox.x, legendBox.y);
removeChild(legendBox);
cctv = null;
cctvTime = 0;
sectorPosition = 38;
currentSector = null;
playerName.mouseEnabled = false;
removeChild(blackScreen);
currentMission.mouseEnabled = false;
currentMission.autoSize = TextFieldAutoSize.CENTER;
rewardData.mouseEnabled = false;
rewardData.autoSize = TextFieldAutoSize.RIGHT;
miniMapPosition = new Point(miniMap.x, miniMap.y);
removeChild(miniMap);
addChildAt(blackScreenContainer, 0);
addChildAt(menuContainer, 0);
addChildAt(legendContainer, 0);
addChildAt(miniMapContainer, 0);
btnMiniMap.addEventListener(MouseEvent.CLICK, btnMiniMapOnClick);
btnTransfer.addEventListener(MouseEvent.CLICK, btnTransferOnClick);
btnLegend.addEventListener(MouseEvent.CLICK, btnLegendOnClick);
btnTransfer.addEventListener(MouseEvent.MOUSE_OVER, btnTransferOnOver);
btnMenu.addEventListener(MouseEvent.MOUSE_OVER, btnOnOver);
btnAchievement.addEventListener(MouseEvent.MOUSE_OVER, btnOnOver);
btnLegend.addEventListener(MouseEvent.MOUSE_OVER, btnOnOver);
legendBox.btnClose.addEventListener(MouseEvent.CLICK, legendBoxBtnCloseOnClick);
var _local1:* = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as SimpleButton)){
_local2.tabEnabled = false;
};
_local1++;
};
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
playerName.text = (theRoot.playerName + "'s MALL");
dayPassedText.text = ("Day " + theRoot.dayPass);
btnGamesfree.addEventListener(MouseEvent.CLICK, theRoot.linkToGamesfree);
stage.addEventListener(ShopGameEvent.SPEED_CHANGE, UpdateSpeed);
}
function UpdateSpeed(_arg1:ShopGameEvent):void{
if (_arg1.speed == 0){
blackScreenContainer.addChild(blackScreen);
} else {
if (blackScreenContainer.getChildByName(blackScreen.name)){
blackScreenContainer.removeChild(blackScreen);
};
};
}
function initToggleButton():void{
_toggleButtonList.push(btnMailBox);
_toggleButtonList.push(btnSelect);
_toggleButtonList.push(btnDrag);
_toggleButtonList.push(btnShop);
_toggleButtonList.push(btnFood);
_toggleButtonList.push(btnEntertainment);
_toggleButtonList.push(btnStaff);
_toggleButtonList.push(btnFacility);
_toggleButtonList.push(btnExtra);
_toggleButtonList.push(btnStatistic);
btnSelect.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, btnSelectSetEnabled);
btnSelect.addEventListener(ToggleButtonEvent.FORCE_ACTIVATE, btnSelectSetDisabled);
var _local1:* = 0;
while (_local1 < toggleButtonList.length) {
toggleButtonList[_local1].addEventListener(ToggleButtonEvent.ACTIVATE, btnToggleOnActive);
if (toggleButtonList[_local1] != btnSelect){
toggleButtonList[_local1].addEventListener(ToggleButtonEvent.DEACTIVATE, btnToggleOnDeactive);
};
if (toggleButtonList[_local1].somethingNew != null){
toggleButtonList[_local1].somethingNew.visible = false;
};
_local1++;
};
btnMailBox.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnMailBox.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnMailBox.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnShop.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnShop.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnShop.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnFood.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnFood.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnFood.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnEntertainment.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnEntertainment.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnEntertainment.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnStaff.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnStaff.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnStaff.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnFacility.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnFacility.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnFacility.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnExtra.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnExtra.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnExtra.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnStatistic.addEventListener(ToggleButtonEvent.ACTIVATE, ShowActiveSector);
btnStatistic.addEventListener(ToggleButtonEvent.DEACTIVATE, HideActiveSector);
btnStatistic.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, HideActiveSector);
btnSelect.isActive = true;
addEventListener(Event.ENTER_FRAME, checkNewThing);
}
function checkNewThing(_arg1:Event):void{
btnMailBox.somethingNew.visible = (theRoot.newTips.length > 0);
}
function initSpeedButton():void{
speedButtonList.push(speedButton1x);
speedButtonList.push(speedButton2x);
speedButtonList.push(speedButton3x);
speedButton1x.isActive = true;
speedButton1x.disableButton();
var _local1:* = 0;
while (_local1 < speedButtonList.length) {
speedButtonList[_local1].addEventListener(ToggleButtonEvent.ACTIVATE, speedBtnOnActive);
speedButtonList[_local1].addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, speedBtnOnDeactive);
_local1++;
};
btnPauseResume.addEventListener(ToggleButtonEvent.ACTIVATE, pauseButtonOnClick);
btnPauseResume.addEventListener(ToggleButtonEvent.DEACTIVATE, resumeButtonOnClick);
btnPauseResume.addEventListener(ToggleButtonEvent.FORCE_ACTIVATE, pauseButtonOnClick);
btnPauseResume.addEventListener(ToggleButtonEvent.FORCE_DEACTIVATE, resumeButtonOnClick);
}
function initDetailButton():void{
detailButtonList.push(btnDetailVisitor);
detailButtonList.push(btnDetailStaff);
detailButtonList.push(btnDetailBooth);
var _local1:* = 0;
while (_local1 < detailButtonList.length) {
detailButtonList[_local1].addEventListener(ToggleButtonEvent.ACTIVATE, btnDetailOnActive);
detailButtonList[_local1].addEventListener(ToggleButtonEvent.DEACTIVATE, btnDetailOnDeactive);
_local1++;
};
}
function btnSelectSetEnabled(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.enableButton();
}
function btnSelectSetDisabled(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.disableButton();
}
function btnToggleOnActive(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
deactiveAllToggleButton(_local2);
if (_local2 == btnSelect){
_local2.disableButton();
};
}
function btnToggleOnDeactive(_arg1:ToggleButtonEvent):void{
btnSelect.isActive = true;
}
public function deactiveAllToggleButton(_arg1:DisplayObject=null):void{
var _local2:* = 0;
while (_local2 < toggleButtonList.length) {
if (toggleButtonList[_local2] != _arg1){
if (toggleButtonList[_local2].isActive){
toggleButtonList[_local2].isActive = false;
};
};
_local2++;
};
}
function btnTransferOnOver(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
notice.text = "Send cash to another country.";
} else {
if (theRoot.numberCountryData() > 1){
notice.text = ((("Transfer available in " + theRoot.transferCountdown) + " day") + ((theRoot.transferCountdown)>1) ? "s." : ".");
} else {
notice.text = "Unlock another country to\naccess this.";
};
};
notice.x = (_local2.x + (_local2.width / 2));
notice.y = _local2.y;
addChild(notice);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
}
function btnOnOver(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
notice.text = ((_local2)==btnMenu) ? "Menu" : ((_local2)==btnAchievement) ? "Achievement" : ((_local2)==btnLegend) ? "Manual" : "";
notice.x = (_local2.x + (_local2.width / 2));
notice.y = _local2.y;
addChild(notice);
_local2.addEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
}
function outFromIcon(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (notice.parent != null){
notice.parent.removeChild(notice);
};
_local2.removeEventListener(MouseEvent.MOUSE_OUT, outFromIcon);
}
function speedBtnOnActive(_arg1:ToggleButtonEvent):void{
var _local3:int;
var _local2:* = _arg1.currentTarget;
deactiveAllSpeedButton(_local2);
_local2.disableButton();
if (!btnPauseResume.isActive){
if (_local2 == speedButton1x){
_local3 = 1;
} else {
if (_local2 == speedButton2x){
_local3 = 2;
} else {
if (_local2 == speedButton3x){
_local3 = 3;
};
};
};
stage.dispatchEvent(new ShopGameEvent(ShopGameEvent.SPEED_CHANGE, null, null, _local3));
};
}
function speedBtnOnDeactive(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.enableButton();
}
function pauseButtonOnClick(_arg1:ToggleButtonEvent):void{
stage.dispatchEvent(new ShopGameEvent(ShopGameEvent.SPEED_CHANGE, null, null, 0));
}
function resumeButtonOnClick(_arg1:ToggleButtonEvent):void{
var _local2:int;
if (speedButton1x.isActive){
_local2 = 1;
} else {
if (speedButton2x.isActive){
_local2 = 2;
} else {
if (speedButton3x.isActive){
_local2 = 3;
};
};
};
stage.dispatchEvent(new ShopGameEvent(ShopGameEvent.SPEED_CHANGE, null, null, _local2));
}
public function deactiveAllSpeedButton(_arg1:DisplayObject=null):void{
var _local2:* = 0;
while (_local2 < speedButtonList.length) {
if (speedButtonList[_local2] != _arg1){
speedButtonList[_local2].isActive = false;
};
_local2++;
};
}
function btnTransferOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (!transferPanel.onTween){
if (getChildByName(transferPanel.name) == null){
transferPanel.x = transferPanelPosition.x;
transferPanel.y = transferPanelPosition.y;
transferPanel.scaleX = 1;
transferPanel.scaleY = 1;
transferPanel.alpha = 1;
addChild(transferPanel);
TweenLite.from(transferPanel, 0.5, {x:(btnTransfer.x + (btnTransfer.width / 2)), y:(btnTransfer.y + (btnTransfer.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:transferPanel.setOnTween, onCompleteParams:[false]});
} else {
transferPanel.setOnTween(true);
TweenLite.to(transferPanel, 0.5, {x:(btnTransfer.x + (btnTransfer.width / 2)), y:(btnTransfer.y + (btnTransfer.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:transferPanel.parent.removeChild, onCompleteParams:[transferPanel]});
};
};
};
}
function btnLegendOnClick(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (!legendBox.onTween){
if (legendContainer.getChildByName(legendBox.name)){
closeLegend();
} else {
openLegend();
};
};
};
}
function legendBoxBtnCloseOnClick(_arg1:Event):void{
closeLegend();
}
function openLegend():void{
legendBox.setOnTween(true);
legendBox.x = legendBoxPosition.x;
legendBox.y = legendBoxPosition.y;
legendBox.scaleX = 1;
legendBox.scaleY = 1;
legendBox.alpha = 1;
legendContainer.addChild(legendBox);
TweenLite.from(legendBox, 0.5, {x:(btnLegend.x + (btnLegend.width / 2)), y:(btnLegend.y + (btnLegend.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:legendBox.setOnTween, onCompleteParams:[false]});
}
function closeLegend():void{
legendBox.setOnTween(true);
TweenLite.to(legendBox, 0.5, {x:(btnLegend.x + (btnLegend.width / 2)), y:(btnLegend.y + (btnLegend.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:legendBox.parent.removeChild, onCompleteParams:[legendBox]});
}
public function closeTransfer():void{
if (getChildByName(transferPanel.name) != null){
transferPanel.setOnTween(true);
TweenLite.to(transferPanel, 0.5, {x:(btnTransfer.x + (btnTransfer.width / 2)), y:(btnTransfer.y + (btnTransfer.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:transferPanel.parent.removeChild, onCompleteParams:[transferPanel]});
};
}
function btnMiniMapOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (miniMap.parent == null){
miniMap.x = miniMapPosition.x;
miniMap.y = miniMapPosition.y;
miniMap.scaleX = 1;
miniMap.scaleY = 1;
miniMapContainer.addChild(miniMap);
TweenLite.from(miniMap, 0.5, {x:_local2.x, y:_local2.y, scaleX:0, scaleY:0});
} else {
TweenLite.to(miniMap, 0.5, {x:_local2.x, y:_local2.y, scaleX:0, scaleY:0, onComplete:miniMap.parent.removeChild, onCompleteParams:[miniMap]});
};
};
}
function btnDetailOnActive(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
beginShowDetail(_local2);
deactiveAllDetailButton(_local2);
if (currentSector != null){
hideSector(currentSector);
};
hideUpgradeSector();
hideStatistic();
hideMailBox();
deactiveAllToggleButton();
btnSelect.isActive = true;
}
function btnDetailOnDeactive(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
hideDetail();
}
public function deactiveAllDetailButton(_arg1:DisplayObject=null){
var _local2:* = 0;
while (_local2 < detailButtonList.length) {
if (detailButtonList[_local2] != _arg1){
detailButtonList[_local2].isActive = false;
};
_local2++;
};
}
function beginShowDetail(_arg1:MovieClip){
if (detailShown != null){
hideDetail(_arg1);
} else {
showDetail(_arg1);
};
}
function showDetail(_arg1:DisplayObject):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1;
if (_local2 == btnDetailVisitor){
detailShown = visitorDetail;
_local3 = new Point(visitorDetailPosition.x, visitorDetailPosition.y);
} else {
if (_local2 == btnDetailStaff){
detailShown = staffDetail;
_local3 = new Point(staffDetailPosition.x, staffDetailPosition.y);
} else {
if (_local2 == btnDetailBooth){
detailShown = boothDetail;
_local3 = new Point(boothDetailPosition.x, boothDetailPosition.y);
} else {
detailShown = null;
};
};
};
if (detailShown != null){
menuContainer.addChild(detailShown);
_local4 = globalToLocal(_local2.localToGlobal(new Point(_local2.arrowPos.x, _local2.arrowPos.y)));
detailShown.visible = true;
detailShown.width = 5;
detailShown.scaleY = 0;
detailShown.x = _local4.x;
detailShown.y = _local4.y;
TweenLite.to(detailShown, 0.25, {y:_local3.y, scaleY:1, onComplete:expandAgain, onCompleteParams:[detailShown, _local3.x]});
detailShown.dispatchEvent(new ShopGameEvent(ShopGameEvent.DETAIL_SHOWN));
};
}
function expandAgain(_arg1:DisplayObject, _arg2:Number):void{
TweenLite.to(_arg1, 0.25, {x:_arg2, scaleX:1, onComplete:detailIsShown, onCompleteParams:[_arg1]});
}
function detailIsShown(_arg1:DisplayObject):void{
var _local2:* = _arg1;
}
public function hideDetail(_arg1:DisplayObject=null):void{
var _local2:*;
var _local3:*;
if (detailShown != null){
_local2 = null;
if (detailShown == visitorDetail){
_local2 = btnDetailVisitor;
};
if (detailShown == staffDetail){
_local2 = btnDetailStaff;
};
if (detailShown == boothDetail){
_local2 = btnDetailBooth;
};
_local3 = globalToLocal(_local2.localToGlobal(new Point(_local2.arrowPos.x, _local2.arrowPos.y)));
TweenLite.to(detailShown, 0.25, {x:_local3.x, width:5, onComplete:hideAgain, onCompleteParams:[detailShown, _local3.y, _arg1]});
};
}
function hideAgain(_arg1:DisplayObject, _arg2:Number, _arg3:DisplayObject=null):void{
TweenLite.to(_arg1, 0.25, {y:_arg2, scaleY:0, onComplete:hideObject, onCompleteParams:[_arg1, _arg3]});
}
function hideObject(_arg1:DisplayObject, _arg2:DisplayObject=null):void{
if (_arg1 != null){
_arg1.visible = false;
};
if (detailShown != null){
if (detailShown.parent != null){
detailShown.parent.removeChild(detailShown);
};
detailShown = null;
};
if (_arg2 != null){
showDetail(_arg2);
};
}
function ShowActiveSector(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2 == btnShop){
showSector(shopSector);
} else {
if (_local2 == btnFood){
showSector(foodSector);
} else {
if (_local2 == btnEntertainment){
showSector(entertainmentSector);
} else {
if (_local2 == btnStaff){
showSector(staffSector);
} else {
if (_local2 == btnFacility){
showSector(facilitySector);
} else {
if (_local2 == btnExtra){
showUpgradeSector();
} else {
if (_local2 == btnStatistic){
showStatistic();
} else {
if (_local2 == btnMailBox){
showMailBox();
};
};
};
};
};
};
};
};
hideDetail();
deactiveAllDetailButton();
}
function HideActiveSector(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2 == btnShop){
hideSector(shopSector);
} else {
if (_local2 == btnFood){
hideSector(foodSector);
} else {
if (_local2 == btnEntertainment){
hideSector(entertainmentSector);
} else {
if (_local2 == btnStaff){
hideSector(staffSector);
} else {
if (_local2 == btnFacility){
hideSector(facilitySector);
} else {
if (_local2 == btnExtra){
hideUpgradeSector();
} else {
if (_local2 == btnStatistic){
hideStatistic();
} else {
if (_local2 == btnMailBox){
hideMailBox();
};
};
};
};
};
};
};
};
}
function showSector(_arg1:DisplayObject):void{
addChildAt(_arg1, 0);
currentSector = (_arg1 as MovieClip);
currentSector.addEventListener(SectorPanelEvent.SECTOR_ITEM_ACTIVE, SectorPanelOnActive);
var _local2:* = currentSector.globalToLocal(new Point(stage.mouseX, stage.mouseY));
if ((((((_local2.x <= currentSector.width)) && ((_local2.y >= 0)))) && ((_local2.y <= currentSector.height)))){
currentSector.x = sectorPosition;
stage.addEventListener(MouseEvent.MOUSE_MOVE, unrevealSector);
} else {
currentSector.x = ((sectorPosition - currentSector.width) + 20);
stage.addEventListener(MouseEvent.MOUSE_MOVE, revealSector);
};
var _local3:* = (currentSector.x - _arg1.width);
TweenLite.from(currentSector, 0.5, {x:_local3});
currentSector.dispatchEvent(new SectorPanelEvent(SectorPanelEvent.SECTOR_PANEL_ON_SHOW));
}
function showUpgradeSector():void{
upgradeSector.x = upgradePosition.x;
upgradeSector.y = upgradePosition.y;
upgradeSector.scaleX = 1;
upgradeSector.scaleY = 1;
upgradeSector.alpha = 1;
menuContainer.addChild(upgradeSector);
TweenLite.from(upgradeSector, 0.5, {x:(btnExtra.x + (btnExtra.width / 2)), y:(btnExtra.y + (btnExtra.height / 2)), scaleX:0, scaleY:0, alpha:0});
}
function hideUpgradeSector():void{
if (menuContainer.getChildByName(upgradeSector.name)){
TweenLite.to(upgradeSector, 0.5, {x:(btnExtra.x + (btnExtra.width / 2)), y:(btnExtra.y + (btnExtra.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:menuContainer.removeChild, onCompleteParams:[upgradeSector]});
};
}
public function showStatistic(_arg1:Boolean=false):void{
if (menuContainer.getChildByName(budgetPage.name) == null){
budgetPage.x = budgetPosition.x;
budgetPage.y = budgetPosition.y;
budgetPage.scaleX = 1;
budgetPage.scaleY = 1;
budgetPage.alpha = 1;
if (_arg1){
menuContainer.addChild(budgetPage);
TweenLite.from(budgetPage, 1, {x:(stage.stageWidth / 2), y:(stage.stageWidth / 2), scaleX:0, scaleY:0, alpha:0});
budgetPage.timerToClose = (10 * 24);
budgetPage.addEventListener(Event.ENTER_FRAME, budgetAutoClose);
budgetPage.addEventListener(Event.REMOVED_FROM_STAGE, budgetIsClosed);
} else {
menuContainer.addChild(budgetPage);
TweenLite.from(budgetPage, 0.5, {x:(btnStatistic.x + (btnStatistic.width / 2)), y:(btnStatistic.y + (btnStatistic.height / 2)), scaleX:0, scaleY:0, alpha:0});
budgetPage.timerToClose = -1;
};
} else {
TweenLite.to(budgetPage, 0.5, {x:budgetPosition.x, y:budgetPosition.y, scaleX:1, scaleY:1, alpha:1});
budgetPage.timerToClose = -1;
};
}
public function hideStatistic(_arg1:Boolean=false):void{
if (menuContainer.getChildByName(budgetPage.name)){
if (_arg1){
TweenLite.to(budgetPage, 1, {x:(stage.stageWidth / 2), y:(stage.stageWidth / 2), scaleX:0, scaleY:0, alpha:0, onComplete:menuContainer.removeChild, onCompleteParams:[budgetPage]});
} else {
TweenLite.to(budgetPage, 0.5, {x:(btnStatistic.x + (btnStatistic.width / 2)), y:(btnStatistic.y + (btnStatistic.height / 2)), scaleX:0, scaleY:0, alpha:0, onComplete:menuContainer.removeChild, onCompleteParams:[budgetPage]});
};
};
}
function showMailBox():void{
tipsPanel.scaleX = 1;
tipsPanel.scaleY = 1;
tipsPanel.alpha = 1;
menuContainer.addChild(tipsPanel);
TweenLite.from(tipsPanel, 0.5, {scaleX:0, scaleY:0, alpha:0});
}
function hideMailBox():void{
if (menuContainer.getChildByName(tipsPanel.name)){
TweenLite.to(tipsPanel, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:menuContainer.removeChild, onCompleteParams:[tipsPanel]});
};
}
function budgetAutoClose(_arg1:Event):void{
if (budgetPage.timerToClose > 0){
budgetPage.timerToClose--;
} else {
if (budgetPage.timerToClose == 0){
budgetPage.removeEventListener(Event.ENTER_FRAME, budgetAutoClose);
hideStatistic(true);
};
};
}
function budgetIsClosed(_arg1:Event):void{
budgetPage.timerToClose = -1;
budgetPage.removeEventListener(Event.ENTER_FRAME, budgetAutoClose);
budgetPage.removeEventListener(Event.REMOVED_FROM_STAGE, budgetIsClosed);
}
public function getCurrentDetail():MovieClip{
return (detailShown);
}
function SectorPanelOnActive(_arg1:SectorPanelEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.removeEventListener(SectorPanelEvent.SECTOR_ITEM_ACTIVE, SectorPanelOnActive);
}
function revealSector(_arg1:MouseEvent):void{
var _local2:*;
if (blackScreenContainer.numChildren <= 0){
_local2 = currentSector.globalToLocal(new Point(stage.mouseX, stage.mouseY));
if ((((((_local2.x <= currentSector.width)) && ((_local2.y >= 0)))) && ((_local2.y <= currentSector.height)))){
TweenLite.to(currentSector, 0.5, {x:sectorPosition});
stage.removeEventListener(MouseEvent.MOUSE_MOVE, revealSector);
stage.addEventListener(MouseEvent.MOUSE_MOVE, unrevealSector);
};
};
}
function unrevealSector(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (blackScreenContainer.numChildren <= 0){
_local2 = currentSector.globalToLocal(new Point(stage.mouseX, stage.mouseY));
if ((((((_local2.x > currentSector.width)) || ((_local2.y < 0)))) || ((_local2.y > currentSector.height)))){
_local3 = ((sectorPosition - currentSector.width) + 20);
TweenLite.to(currentSector, 0.5, {x:_local3});
stage.addEventListener(MouseEvent.MOUSE_MOVE, revealSector);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, unrevealSector);
};
};
}
function hideSector(_arg1:DisplayObject):void{
var _local2:* = _arg1;
if ((_local2 as SectorPanel)){
_local2.closeSector();
_local2.removeEventListener(SectorPanelEvent.SECTOR_ITEM_ACTIVE, SectorPanelOnActive);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, revealSector);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, unrevealSector);
currentSector = null;
};
var _local3:* = (sectorPosition - _arg1.width);
TweenLite.to(_arg1, 0.5, {x:_local3, onComplete:removeObject, onCompleteParams:[_arg1]});
}
function removeObject(_arg1:DisplayObject):void{
if (((!((_arg1 == null))) && (!((_arg1.parent == null))))){
_arg1.parent.removeChild(_arg1);
};
}
function set informationClip(_arg1:MovieClip):void{
_informationClip = _arg1;
}
function get informationClip():MovieClip{
return (_informationClip);
}
public function activeCCTV(_arg1:DisplayObject, _arg2:DisplayObject):void{
var _local3:*;
var _local4:*;
var _local5:*;
if (theRoot.cameraShown){
_local3 = (_arg2.x - ((_arg2.width + 50) / 2));
_local4 = ((_arg2.y - CCTV_HEIGHT) + 20);
if (cctv == null){
_local5 = new UI_CCTV();
_local5.captureBitmap(_arg1, _local3, _local4, (_arg2.width + 50), _arg2.height);
_local5.x = CCTV_X;
_local5.y = CCTV_Y;
_local5.maskOn(_local5.screen);
addChild(_local5);
cctv = _local5;
cctv.btnTurnOff.addEventListener(MouseEvent.CLICK, turnOffCCTV);
addEventListener(Event.ENTER_FRAME, CCTVPlayTime);
} else {
cctv.captureBitmap(_arg1, _local3, _local4, (_arg2.width + 50), _arg2.height);
cctv.x = CCTV_X;
cctv.y = CCTV_Y;
cctv.maskOn(cctv.screen);
};
cctvTime = (5 * 24);
};
}
public function activeCCTVOnPoint(_arg1:DisplayObject, _arg2:Point, _arg3:Number=240, _arg4:Number=150):void{
var _local5:*;
var _local6:*;
var _local7:*;
if (theRoot.cameraShown){
_local5 = (_arg2.x - (_arg3 / 2));
_local6 = (_arg2.y - _arg4);
if (cctv == null){
_local7 = new UI_CCTV();
_local7.captureBitmap(_arg1, _local5, _local6, _arg3, _arg4);
_local7.x = CCTV_X;
_local7.y = CCTV_Y;
_local7.maskOn(_local7.screen);
addChild(_local7);
cctv = _local7;
cctv.btnTurnOff.addEventListener(MouseEvent.CLICK, turnOffCCTV);
addEventListener(Event.ENTER_FRAME, CCTVPlayTime);
} else {
cctv.captureBitmap(_arg1, _local5, _local6, _arg3, _arg4);
cctv.x = CCTV_X;
cctv.y = CCTV_Y;
cctv.maskOn(cctv.screen);
};
cctvTime = (5 * 24);
};
}
function turnOffCCTV(_arg1:MouseEvent):void{
if (cctv != null){
cctv.turnOff();
cctv = null;
removeEventListener(Event.ENTER_FRAME, CCTVPlayTime);
};
}
function CCTVPlayTime(_arg1:Event):void{
if (cctvTime-- <= 0){
if (cctv != null){
cctv.turnOff();
cctv = null;
};
removeEventListener(Event.ENTER_FRAME, CCTVPlayTime);
};
}
public function disableAllButton(_arg1:Array=null):void{
var _local2:* = toggleButtonList.concat(speedButtonList.concat(detailButtonList));
if (_arg1 == null){
_arg1 = [];
};
_local2.push(btnPauseResume);
var _local3:* = 0;
while (_local3 < _local2.length) {
if (_arg1.indexOf(_local2[_local3]) < 0){
if ((_local2[_local3] as ToggleButton)){
_local2[_local3].disableButton();
};
};
_local3++;
};
}
public function enableAllButton():void{
var _local1:* = toggleButtonList.concat(speedButtonList.concat(detailButtonList));
_local1.push(btnPauseResume);
var _local2:* = 0;
while (_local2 < _local1.length) {
if ((_local1[_local2] as ToggleButton)){
_local1[_local2].enableButton();
};
_local2++;
};
}
public function set cash(_arg1:Number):void{
_cash = _arg1;
if (_cash >= 0){
cashLabel.textColor = 2061316;
currentCashShown.textColor = 2061316;
} else {
cashLabel.textColor = 0xFF0000;
currentCashShown.textColor = 0xFF0000;
};
this.currentCashShown.text = (Utility.numberToMoney(_cash) + ".-");
}
public function get cash():Number{
return (_cash);
}
public function setCashTo(_arg1:Number):void{
TweenPlugin.activate([RoundPropsPlugin]);
TweenMax.to(this, 1.5, {cash:_arg1, roundProps:["cash"]});
}
public function addNotification(_arg1:String):void{
var _local2:* = new UI_Notification();
_local2.notice.notificationText.text = _arg1;
_local2.x = NOTIFICATION_X;
_local2.y = (NOTIFICATION_Y + _local2.height);
addChildAt(_local2, 0);
_local2.addEventListener(Event.REMOVED_FROM_STAGE, notificationRemoved);
notificationList.unshift(_local2);
TweenLite.to(_local2, 0.5, {y:NOTIFICATION_Y, onUpdate:correctNotificationPosition});
}
function correctNotificationPosition():void{
var _local2:*;
var _local3:*;
var _local1:* = 1;
while (_local1 < notificationList.length) {
_local2 = notificationList[_local1];
_local3 = notificationList[(_local1 - 1)];
_local2.y = (_local3.y - _local3.height);
_local1++;
};
}
function notificationRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = notificationList.indexOf(_local2);
if (_local3 >= 0){
notificationList.splice(_local3, 1);
};
}
public function blinkCashText():void{
blinkTextDelay = 30;
addEventListener(Event.ENTER_FRAME, blinkText);
}
function blinkText(_arg1:Event):void{
if (blinkTextDelay > 0){
if ((blinkTextDelay % 3) == 0){
if (currentCashShown.textColor == 2061316){
currentCashShown.textColor = 0xFF0000;
} else {
if (currentCashShown.textColor == 0xFF0000){
currentCashShown.textColor = 0xFF;
} else {
currentCashShown.textColor = 2061316;
};
};
};
blinkTextDelay--;
} else {
if (_cash >= 0){
currentCashShown.textColor = 2061316;
} else {
currentCashShown.textColor = 0xFF0000;
};
removeEventListener(Event.ENTER_FRAME, blinkText);
};
cashLabel.textColor = currentCashShown.textColor;
}
public function setCurrentMission(_arg1:Object):void{
currentMission.text = _arg1.note;
currentMission.x = (missionMask.x - (currentMission.textWidth / 2));
rewardData.text = ((_arg1.reward as Number)) ? ("$" + Utility.numberToMoney(_arg1.reward)) : _arg1.reward;
rewardData.y = (missionMask.y - (rewardData.textHeight / 2));
TweenLite.from(currentMission, 0.8, {x:((missionMask.x - (missionMask.width / 2)) - currentMission.width), onComplete:missionSetComplete});
TweenLite.from(rewardData, 0.8, {y:((rewardMask.y - (rewardMask.height / 2)) - rewardData.height), ease:Linear.easeNone});
}
public function setTextMission(_arg1:String, _arg2:String="-"):void{
currentMission.text = _arg1;
currentMission.x = (missionMask.x - (currentMission.textWidth / 2));
rewardData.text = _arg2;
rewardData.y = (missionMask.y - (rewardData.textHeight / 2));
TweenLite.from(currentMission, 0.8, {x:((missionMask.x - (missionMask.width / 2)) - currentMission.width)});
TweenLite.from(rewardData, 0.8, {y:((rewardMask.y - (rewardMask.height / 2)) - rewardData.height), ease:Linear.easeNone});
}
public function setCountOf(_arg1:Object, _arg2:int=0):void{
currentMission.text = (((_arg1.note + " (") + _arg2) + ")");
currentMission.x = (missionMask.x - (currentMission.textWidth / 2));
}
public function setExtraTextOf(_arg1:Object, _arg2:String=""):void{
currentMission.text = (((_arg1.note + "") + _arg2) + "");
currentMission.x = (missionMask.x - (currentMission.textWidth / 2));
}
public function clearCurrentMission():void{
var _local1:* = new UImissionsuccess();
_local1.mouseChildren = false;
_local1.mouseEnabled = false;
_local1.x = ((missionMask.x - (currentMission.textWidth / 2)) - 10);
_local1.y = missionMask.y;
addChild(_local1);
_local1.addEventListener(ShopGameEvent.MISSION_CLEAR, missionLeave);
}
public function get toggleButtonList():Array{
return (_toggleButtonList);
}
function missionLeave(_arg1:ShopGameEvent):void{
TweenLite.to(currentMission, 0.8, {x:((missionMask.x + (missionMask.width / 2)) + currentMission.width), ease:Quad.easeIn, onComplete:changeMission});
TweenLite.to(rewardData, 0.8, {y:((rewardMask.x - (rewardMask.width / 2)) - currentMission.width), ease:Linear.easeNone});
}
function changeMission():void{
dispatchEvent(new ShopGameEvent(ShopGameEvent.MISSION_CHANGE));
}
function missionSetComplete():void{
dispatchEvent(new ShopGameEvent(ShopGameEvent.NEW_MISSION_SET));
}
}
}//package Instance
Section 109
//UI_MainMenu (Instance.UI_MainMenu)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.net.*;
import flash.ui.*;
public class UI_MainMenu extends MovieClip {
const BACK_TO_HEADER = 0;
const GO_TO_PLAY_GAME = 1;
const GO_TO_NEW_GAME = 2;
const GO_TO_LOAD_GAME = 3;
const GO_TO_OPTION = 4;
const GO_TO_CREDIT = 5;
const PLAY_GAME = 6;
public var drawArea:MovieClip;
public var btnCredit:SimpleButton;
public var btnShopEmpire1:SimpleButton;
public var muteButton:MainMenuMuteButton;
public var btnLoadGame:SimpleButton;
public var btnMoreGames:SimpleButton;
public var btnNewGame:SimpleButton;
public var optionTable:UI_OptionInGame;
public var addGameLogo:SimpleButton;
public var lgLogo:SimpleButton;
public var gamesfreeLogo:SimpleButton;
public var CreditPage:MovieClip;
public var loadGameTable:MovieClip;
public var btnPlay:SimpleButton;
public var btnOption:SimpleButton;
public var btnBack:SimpleButton;
var buttonList:Array;
var buttonExecute:int;
var alreadyEnter:Boolean;
var loadTablePosition:Point;
var optionPosition:Point;
public var theRoot;
var _environtment:Number;
public function UI_MainMenu(){
buttonList = new Array();
super();
var _local1:* = root;
theRoot = _local1.mainProgram;
this.addEventListener(Event.ENTER_FRAME, CheckLabel);
stop();
TweenPlugin.activate([TintPlugin]);
TweenLite.from(this, 0.5, {tint:0xFFFFFF, onComplete:finishFlashing});
buttonList = [];
buttonExecute = 0;
alreadyEnter = false;
addEventListener(ShopGameEvent.BEGIN_LOAD_GAME, beginLoadGame);
}
function startBGM():void{
environtment = 1;
var _local1:* = BGMList.getMusicAt("Main Menu", true);
if (_local1 != null){
theRoot.bgm = new (_local1);
};
theRoot.playBGM();
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
}
function bgmCompleteCheck(_arg1:Event):void{
var _local2:*;
if (BGMList.compareBGM(Utility.getClass(theRoot.bgm), "Main Menu")){
_local2 = BGMList.getMusicAt("Main Menu");
if (_local2 != null){
theRoot.bgm = new (_local2);
};
};
theRoot.bgmChannel = theRoot.bgm.play(0, 0, theRoot.bgmTransform);
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
}
function finishFlashing():void{
play();
startBGM();
}
function CheckLabel(_arg1:Event):void{
if (this.currentLabel == "Page1"){
insertMainPageButtonToList();
this.stop();
this.removeEventListener(Event.ENTER_FRAME, CheckLabel);
this.addEventListener(ShopFrameEvent.ENTER_SOME_FRAME, CheckFrame);
};
}
function insertMainPageButtonToList():void{
if (insertToButtonList(btnPlay)){
btnPlay.addEventListener(MouseEvent.CLICK, btnPlayOnClick);
};
if (insertToButtonList(btnOption)){
btnOption.addEventListener(MouseEvent.CLICK, btnOptionOnClick);
};
if (insertToButtonList(btnCredit)){
btnCredit.addEventListener(MouseEvent.CLICK, btnCreditOnClick);
};
if (insertToButtonList(btnShopEmpire1)){
btnShopEmpire1.addEventListener(MouseEvent.CLICK, btnShopEmpire1OnClick);
};
if (insertToButtonList(btnMoreGames)){
btnMoreGames.addEventListener(MouseEvent.CLICK, btnMoreGamesOnClick);
};
}
function insertNewGameButtonToList():void{
if (insertToButtonList(btnNewGame)){
btnNewGame.addEventListener(MouseEvent.CLICK, btnNewGameOnClick);
};
if (insertToButtonList(btnLoadGame)){
btnLoadGame.addEventListener(MouseEvent.CLICK, btnLoadGameOnClick);
};
if (insertToButtonList(btnBack)){
btnBack.addEventListener(MouseEvent.CLICK, btnBackOnClick);
};
}
function setListenerOnLogo(_arg1:Object):void{
_arg1.addEventListener(MouseEvent.CLICK, linkTo);
}
function linkTo(_arg1:MouseEvent):void{
var _local3:URLRequest;
var _local2:* = _arg1.currentTarget;
if (_local2 == gamesfreeLogo){
theRoot.linkToGamesfree(_arg1);
} else {
if (_local2 == lgLogo){
theRoot.linkToLG(_arg1);
} else {
if (_local2 == addGameLogo){
_local3 = new URLRequest("http://www.gamesfree.com/games/exclusive.html");
navigateToURL(_local3, "_blank");
};
};
};
}
function setMute(_arg1:ToggleButtonEvent):void{
theRoot.bgmVolume = 0;
theRoot.sfxVolume = 0;
if (optionTable != null){
optionTable.bgmSlider.setPosition(theRoot.bgmVolume);
optionTable.sfxSlider.setPosition(theRoot.sfxVolume);
optionTable.currentVolume = theRoot.bgmVolume;
optionTable.currentSFXVolume = theRoot.sfxVolume;
};
theRoot.bgmChannel.soundTransform = theRoot.bgmTransform;
theRoot.sfxChannel.soundTransform = theRoot.sfxTransform;
}
function setUnmute(_arg1:ToggleButtonEvent):void{
theRoot.bgmVolume = DefaultSetting.VOLUME;
theRoot.sfxVolume = DefaultSetting.VOLUME;
if (optionTable != null){
optionTable.bgmSlider.setPosition(theRoot.bgmVolume);
optionTable.sfxSlider.setPosition(theRoot.sfxVolume);
optionTable.currentVolume = theRoot.bgmVolume;
optionTable.currentSFXVolume = theRoot.sfxVolume;
};
theRoot.bgmChannel.soundTransform = theRoot.bgmTransform;
theRoot.sfxChannel.soundTransform = theRoot.sfxTransform;
}
function CheckFrame(_arg1:ShopFrameEvent):void{
if (_arg1.frameLabel == "Page1"){
if (alreadyEnter){
insertMainPageButtonToList();
appearButtonList();
} else {
muteButton.isActive = (((theRoot.bgmVolume <= 0)) && ((theRoot.sfxVolume <= 0)));
muteButton.addEventListener(ToggleButtonEvent.ACTIVATE, setMute);
muteButton.addEventListener(ToggleButtonEvent.DEACTIVATE, setUnmute);
TweenLite.from(gamesfreeLogo, 0.4, {scaleX:0, scaleY:0, alpha:0, ease:Back.easeIn, easeParams:[3], onComplete:setListenerOnLogo, onCompleteParams:[gamesfreeLogo]});
TweenLite.from(lgLogo, 0.2, {visible:false, onComplete:setListenerOnLogo, onCompleteParams:[lgLogo]});
TweenLite.from(addGameLogo, 0.3, {visible:false, onComplete:setListenerOnLogo, onCompleteParams:[addGameLogo]});
alreadyEnter = true;
};
} else {
if (_arg1.frameLabel == "Page2"){
loadGameTable.visible = false;
loadTablePosition = new Point(loadGameTable.x, loadGameTable.y);
btnLoadGame.enabled = theRoot.dataIsExist();
if (btnLoadGame.enabled){
btnLoadGame.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnLoadGame.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
insertNewGameButtonToList();
appearButtonList();
} else {
if (_arg1.frameLabel == "Page3"){
optionTable.addEventListener(Event.REMOVED_FROM_STAGE, ClosingOptionPage);
TweenLite.from(optionTable, (6 / 24), {scaleX:0, scaleY:0, alpha:0});
} else {
if (_arg1.frameLabel == "Page4"){
CreditPage.btnClose.addEventListener(MouseEvent.CLICK, ClosingCreditPage);
};
};
};
};
}
function insertToButtonList(_arg1:DisplayObject):Boolean{
var _local2:* = false;
if (buttonList.indexOf(_arg1) < 0){
buttonList.push(_arg1);
_local2 = true;
};
return (_local2);
}
function btnPlayOnClick(_arg1:MouseEvent):void{
buttonExecute = GO_TO_PLAY_GAME;
removeButtonList();
removeMainPageButtonListener();
}
function btnOptionOnClick(_arg1:MouseEvent):void{
buttonExecute = GO_TO_OPTION;
removeButtonList();
removeMainPageButtonListener();
}
function btnCreditOnClick(_arg1:MouseEvent):void{
buttonExecute = GO_TO_CREDIT;
removeButtonList();
removeMainPageButtonListener();
}
function btnShopEmpire1OnClick(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.gamesfree.com/game/shop_empire.html");
navigateToURL(_local2, "_blank");
}
function btnMoreGamesOnClick(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
function removeMainPageButtonListener():void{
btnPlay.removeEventListener(MouseEvent.CLICK, btnPlayOnClick);
btnOption.addEventListener(MouseEvent.CLICK, btnOptionOnClick);
btnCredit.addEventListener(MouseEvent.CLICK, btnCreditOnClick);
}
function btnNewGameOnClick(_arg1:MouseEvent):void{
buttonExecute = GO_TO_NEW_GAME;
var _local2:* = new UI_BarInputDialog();
_local2.x = (drawArea.width / 2);
_local2.y = (drawArea.height / 2);
this.addChild(_local2);
TweenLite.from(_local2, (6 / 24), {alpha:0, scaleX:0, scaleY:0, onComplete:InputDialogAddListener, onCompleteParams:[_local2]});
var _local3:* = 0;
while (_local3 < buttonList.length) {
buttonList[_local3].mouseEnabled = false;
TweenLite.to(buttonList[_local3], (4 / 24), {alpha:0, delay:((_local3 + 2) * (2 / 24))});
_local3++;
};
}
function btnLoadGameOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
buttonExecute = GO_TO_LOAD_GAME;
loadGameTable.visible = true;
loadGameTable.x = loadTablePosition.x;
loadGameTable.y = loadTablePosition.y;
loadGameTable.scaleX = 1;
loadGameTable.scaleY = 1;
loadGameTable.alpha = 1;
TweenLite.from(loadGameTable, (6 / 24), {x:(_local2.x + (_local2.width / 2)), y:_local2.y, alpha:0, scaleX:0, scaleY:0, onComplete:loadGameTable.btnClose.addEventListener, onCompleteParams:[MouseEvent.CLICK, cancelLoadGame]});
_local3 = 0;
while (_local3 < buttonList.length) {
buttonList[_local3].mouseEnabled = false;
TweenLite.to(buttonList[_local3], (4 / 24), {alpha:0, delay:((_local3 + 2) * (2 / 24))});
_local3++;
};
};
}
function cancelLoadGame(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = loadGameTable;
TweenLite.to(_local3, (6 / 24), {x:(btnLoadGame.x + (btnLoadGame.width / 2)), y:btnLoadGame.y, autoAlpha:0, scaleX:0, scaleY:0});
var _local4:* = 0;
while (_local4 < buttonList.length) {
TweenLite.to(buttonList[_local4], (4 / 24), {alpha:1, delay:((_local4 + 2) * (2 / 24)), onComplete:enabledButton, onCompleteParams:[buttonList[_local4]]});
_local4++;
};
_local2.removeEventListener(MouseEvent.CLICK, cancelLoadGame);
}
function InputDialogAddListener(_arg1:DisplayObject):void{
var _local2:* = _arg1;
_local2.btnOK.addEventListener(MouseEvent.CLICK, BeginGame);
_local2.btnCancel.addEventListener(MouseEvent.CLICK, CancelGame);
stage.addEventListener(KeyboardEvent.KEY_UP, confirmName);
}
function confirmName(_arg1:KeyboardEvent):void{
var _local2:*;
if (((!((theRoot == null))) && ((theRoot.playerName.length > 0)))){
_local2 = _arg1.keyCode;
if (_local2 == Keyboard.ENTER){
_environtment = 1;
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:StartGame});
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmName);
};
};
}
function BeginGame(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_environtment = 1;
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:StartGame});
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmName);
};
}
function beginLoadGame(_arg1:ShopGameEvent):void{
_environtment = 1;
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:StartGame, onCompleteParams:[true]});
}
public function StartGame(_arg1:Boolean=false):void{
theRoot.resetBGM();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
if (_arg1){
dispatchEvent(new ShopGameEvent(ShopGameEvent.BEGIN_GAME, ShopGameEvent.LOAD_GAME));
} else {
dispatchEvent(new ShopGameEvent(ShopGameEvent.BEGIN_GAME, ShopGameEvent.NEW_GAME));
};
}
function CancelGame(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _local2.parent;
TweenLite.to(_local3, (6 / 24), {alpha:0, scaleX:0, scaleY:0, onComplete:RemoveDialogFromMenu, onCompleteParams:[_local3]});
var _local4:* = 0;
while (_local4 < buttonList.length) {
TweenLite.to(buttonList[_local4], (4 / 24), {alpha:1, delay:((_local4 + 2) * (2 / 24)), onComplete:enabledButton, onCompleteParams:[buttonList[_local4]]});
_local4++;
};
_local2.removeEventListener(MouseEvent.CLICK, CancelGame);
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmName);
}
function RemoveDialogFromMenu(_arg1:DisplayObject):void{
_arg1.parent.removeChild(_arg1);
}
function btnBackOnClick(_arg1:MouseEvent):void{
buttonExecute = BACK_TO_HEADER;
removeButtonList();
removeNewGameButtonListener();
}
function ClosingCreditPage(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
buttonExecute = BACK_TO_HEADER;
TweenLite.to(CreditPage, 0.5, {alpha:0, scaleX:0, scaleY:0, onComplete:Execution});
_local2.removeEventListener(MouseEvent.CLICK, ClosingCreditPage);
}
function ClosingOptionPage(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
buttonExecute = BACK_TO_HEADER;
Execution();
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, ClosingOptionPage);
}
function removeNewGameButtonListener():void{
btnNewGame.removeEventListener(MouseEvent.CLICK, btnNewGameOnClick);
btnBack.removeEventListener(MouseEvent.CLICK, btnBackOnClick);
}
function appearButtonList():void{
var _local1:* = 0;
while (_local1 < buttonList.length) {
buttonList[_local1].mouseEnabled = true;
buttonList[_local1].tabEnabled = false;
TweenLite.from(buttonList[_local1], (4 / 24), {alpha:0, delay:(_local1 * (2 / 24)), onStart:theRoot.playSound, onStartParams:[SFXButtonAppear]});
_local1++;
};
}
function removeButtonList():void{
var _local1:* = 0;
while (_local1 < buttonList.length) {
buttonList[_local1].mouseEnabled = false;
TweenLite.to(buttonList[_local1], (4 / 24), {alpha:0, delay:(_local1 * (2 / 24)), onComplete:RemoveButtonFromList, onCompleteParams:[buttonList[_local1]]});
_local1++;
};
}
function RemoveButtonFromList(_arg1:DisplayObject):void{
var _local2:* = buttonList.indexOf(_arg1);
if (_local2 >= 0){
buttonList.splice(_local2, 1);
};
if (buttonList.length <= 0){
Execution();
};
}
function Execution():void{
switch (buttonExecute){
case BACK_TO_HEADER:
gotoAndStop("Page1");
break;
case GO_TO_PLAY_GAME:
gotoAndStop("Page2");
break;
case GO_TO_OPTION:
gotoAndStop("Page3");
break;
case GO_TO_CREDIT:
gotoAndStop("Page4");
break;
};
}
function enabledButton(_arg1:DisplayObject){
var _local2:* = _arg1;
_local2.mouseEnabled = true;
}
public function set environtment(_arg1:Number):void{
_environtment = _arg1;
theRoot.bgmEnvirontment = _environtment;
theRoot.correctSoundChannel();
}
public function get environtment():Number{
return (_environtment);
}
}
}//package Instance
Section 110
//UI_Minimap (Instance.UI_Minimap)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
public class UI_Minimap extends ShopEmpireObject {
var drawArea:Shape;
var frameArea:Shape;
var framePos:Point;
var framePos2:Point;
var theRoot:Object;
public function UI_Minimap(){
drawArea = new Shape();
frameArea = new Shape();
framePos = new Point(0, 0);
framePos2 = new Point(0, 0);
super();
drawArea.y = (75 - 21);
addChild(drawArea);
frameArea.y = (75 - 21);
addChild(frameArea);
buttonMode = true;
tabEnabled = false;
addEventListener(Event.REMOVED_FROM_STAGE, Destroyed);
}
override function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
addEventListener(MouseEvent.MOUSE_DOWN, SetFocus);
stage.addEventListener(Event.ENTER_FRAME, UpdateFrame);
stage.addEventListener(ShopGameEvent.UPDATE, tick);
}
function Destroyed(_arg1:Event):void{
removeEventListener(MouseEvent.MOUSE_DOWN, SetFocus);
stage.removeEventListener(Event.ENTER_FRAME, UpdateFrame);
stage.removeEventListener(ShopGameEvent.UPDATE, tick);
}
function ChangeFocus():void{
var _local1:* = _world;
var _local2:* = frameArea.globalToLocal(new Point(stage.mouseX, stage.mouseY));
var _local3:* = new Point();
_local3.x = -(((_local2.x * 12) - (theRoot.globalMask.width / 2)));
_local3.y = -(((_local2.y * 12) - (_local1.bottomPosition / 2)));
_local1.x = _local3.x;
_local1.y = _local3.y;
}
function SetFocus(_arg1:MouseEvent):void{
ChangeFocus();
addEventListener(MouseEvent.MOUSE_MOVE, DragFocus);
stage.addEventListener(MouseEvent.MOUSE_UP, CancelFocus);
}
function DragFocus(_arg1:MouseEvent):void{
ChangeFocus();
}
function CancelFocus(_arg1:MouseEvent):void{
removeEventListener(MouseEvent.MOUSE_MOVE, DragFocus);
stage.removeEventListener(MouseEvent.MOUSE_UP, CancelFocus);
}
function tick(_arg1:ShopGameEvent):void{
drawArea.graphics.clear();
drawFloor();
drawGround();
drawBooth();
drawElevator();
drawRestroom();
drawATM();
drawTerrace();
drawParkingLot();
drawCar();
drawEscalator();
drawVisitor();
drawSpecialVisitor();
drawVillain();
drawJanitor();
drawElectrician();
drawBandit();
drawSecurity();
}
function drawFloor():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.floorList.length) {
_local3 = _local1.floorList[_local2];
_local4 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = 7;
drawArea.graphics.beginFill(0xDDDDDD);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), _local5.y, _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
}
function drawGround():void{
var _local1:* = _world;
drawArea.graphics.beginFill(6829577);
drawArea.graphics.drawRect(-112, 0, 224, 21);
drawArea.graphics.endFill();
var _local2:* = 0;
while (_local2 < _local1.basementList.length) {
drawArea.graphics.beginFill(0xD6D6D6);
drawArea.graphics.drawRect(-111, (7 * _local2), 222, 6);
drawArea.graphics.endFill();
_local2++;
};
}
function drawBooth():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.boothList.length) {
_local3 = _local1.boothList[_local2].colArea;
_local4 = _local1.globalToLocal(_local1.boothList[_local2].localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(4878299);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
if (_local1.hall != null){
_local3 = _local1.hall.hallColArea;
_local4 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(10031513);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
};
}
function drawElevator():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.elevatorList.length) {
_local3 = _local1.elevatorList[_local2];
_local4 = _local1.globalToLocal(_local3.roomList[0].parent.localToGlobal(new Point(_local3.roomList[0].x, _local3.roomList[0].y)));
_local5 = new Point();
_local5.x = Math.round((_local3.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((108 / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(14715924);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
}
function drawRestroom():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.restroomList.length) {
_local3 = _local1.restroomList[_local2];
_local4 = new Point();
_local4.x = Math.round((_local3.x / 12));
_local4.y = Math.round((_local3.y / 12));
_local5 = Math.round((_local3.width / 12));
_local6 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(4905867);
drawArea.graphics.drawRect((_local4.x - (_local5 / 2)), (_local4.y - _local6), _local5, _local6);
drawArea.graphics.endFill();
_local2++;
};
}
function drawATM():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.atmList.length) {
_local3 = _local1.atmList[_local2].colArea;
_local4 = _local1.globalToLocal(_local1.atmList[_local2].localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(0xC8C8C8);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
}
function drawTerrace():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.terraceList.length) {
_local3 = _local1.terraceList[_local2].colArea;
_local4 = _local1.globalToLocal(_local1.terraceList[_local2].localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(13689588);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
}
function drawParkingLot():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.parkingList.length) {
_local3 = _local1.parkingList[_local2].parkingColArea;
_local4 = _local1.globalToLocal(_local1.parkingList[_local2].localToGlobal(new Point(_local3.x, _local3.y)));
_local5 = new Point();
_local5.x = Math.round((_local4.x / 12));
_local5.y = Math.round((_local4.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.height / 12));
drawArea.graphics.beginFill(0xECECEC);
drawArea.graphics.drawRect((_local5.x - (_local6 / 2)), (_local5.y - _local7), _local6, _local7);
drawArea.graphics.endFill();
_local2++;
};
}
function drawCar():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.carList.length) {
if (((!((_local1.carList[_local2].parent == null))) && ((_local1.carList[_local2].parent.scaleX >= 1)))){
_local3 = _local1.carList[_local2];
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = Math.round((_local3.width / 12));
_local7 = Math.round((_local3.carHeight / 12));
drawArea.graphics.beginFill(_local3.colorCode);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 5, 5);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawEscalator():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.escalatorList.length) {
_local3 = _local1.escalatorList[_local2];
_local4 = new Point();
_local5 = new Point();
_local6 = _local1.globalToLocal(_local3.lowerPosition.parent.localToGlobal(new Point(_local3.lowerPosition.x, _local3.lowerPosition.y)));
_local7 = _local1.globalToLocal(_local3.upperPosition.parent.localToGlobal(new Point(_local3.upperPosition.x, _local3.upperPosition.y)));
_local4.x = Math.round((_local6.x / 12));
_local4.y = Math.round((_local6.y / 12));
_local5.x = Math.round((_local7.x / 12));
_local5.y = Math.round((_local7.y / 12));
drawArea.graphics.beginFill(0);
drawArea.graphics.moveTo((_local4.x - 1), _local4.y);
drawArea.graphics.lineTo((_local5.x - 1), _local5.y);
drawArea.graphics.lineTo((_local5.x + 1), _local5.y);
drawArea.graphics.lineTo((_local4.x + 1), _local4.y);
drawArea.graphics.endFill();
_local2++;
};
}
function drawVisitor():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.visitorList.length) {
_local3 = _local1.visitorList[_local2];
if (!((((_local3.visiting) || (_local3.rideElevator))) || (_local3.rideCar))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(0xFFFFFF);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawSpecialVisitor():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.visitorSpecialList.length) {
_local3 = _local1.visitorSpecialList[_local2];
if (!((((_local3.visiting) || (_local3.rideElevator))) || (_local3.rideCar))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(13182896);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawVillain():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.visitorVillainList.length) {
_local3 = _local1.visitorVillainList[_local2];
if (!((_local3.visiting) || (_local3.rideElevator))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(15956072);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawJanitor():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.janitorList.length) {
_local3 = _local1.janitorList[_local2];
if (!((_local3.rideElevator) || (_local3.inHome))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(3507218);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawElectrician():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.electricianList.length) {
_local3 = _local1.electricianList[_local2];
if (!((((_local3.rideElevator) || (_local3.repairing))) || (_local3.inHome))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(15979300);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawBandit():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.banditList.length) {
_local3 = _local1.banditList[_local2];
if (((!(((_local3.rideElevator) || (_local3.stealing)))) && (!(_local3.hiding)))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(9443079);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function drawSecurity():void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
var _local2:* = 0;
while (_local2 < _local1.securityList.length) {
_local3 = _local1.securityList[_local2];
if (!((((_local3.rideElevator) || (_local3.examine))) || (_local3.inHome))){
_local4 = new Point();
_local5 = _local1.globalToLocal(_local3.parent.localToGlobal(new Point(_local3.x, _local3.y)));
_local4.x = Math.round((_local5.x / 12));
_local4.y = Math.round((_local5.y / 12));
_local6 = 2;
_local7 = 3;
drawArea.graphics.beginFill(2372458);
drawArea.graphics.drawRoundRect((_local4.x - (_local6 / 2)), (_local4.y - _local7), _local6, _local7, 2, 1);
drawArea.graphics.endFill();
};
_local2++;
};
}
function UpdateFrame(_arg1:Event):void{
frameArea.graphics.clear();
var _local2:* = _world;
var _local3:* = _local2.globalToLocal(new Point(0, 0));
framePos.x = (_local3.x / 12);
framePos.y = (_local3.y / 12);
var _local4:* = _local2.globalToLocal(new Point(theRoot.globalMask.width, _local2.bottomPosition));
framePos2.x = (_local4.x / 12);
framePos2.y = (_local4.y / 12);
frameArea.graphics.lineStyle(1, 0xFF00);
frameArea.graphics.moveTo(framePos.x, framePos.y);
frameArea.graphics.lineTo(framePos2.x, framePos.y);
frameArea.graphics.lineTo(framePos2.x, framePos2.y);
frameArea.graphics.lineTo(framePos.x, framePos2.y);
frameArea.graphics.lineTo(framePos.x, framePos.y);
}
}
}//package Instance
Section 111
//UI_ParameterDetail (Instance.UI_ParameterDetail)
package Instance {
import flash.display.*;
import flash.events.*;
import Instance.events.*;
import flash.text.*;
import Instance.ui.*;
public class UI_ParameterDetail extends MovieClip {
public var vComment5:TextField;
public var paramButton7:MovieClip;
public var detailBox3:MovieClip;
public var paramButton6:MovieClip;
public var detailBox0:MovieClip;
public var paramButton5:MovieClip;
public var detailBox1:MovieClip;
public var pageInfo:TextField;
public var tabBarJanitor:TabbarJanitor;
public var detailBox6:MovieClip;
public var paramButton4:MovieClip;
public var prevPageButton:SimpleButton;
public var arrowPos:MovieClip;
public var hallDetail:MovieClip;
public var tabBarHall:Tabbarhall;
public var detailBox7:MovieClip;
public var paramButton3:MovieClip;
public var tabBarSpecialVisitor:Tabbar;
public var tabBarEntertainer:TabbarEntertainer;
public var paramButton2:MovieClip;
public var detailBox4:MovieClip;
public var nextPageButton:SimpleButton;
public var btnClose:SimpleButton;
public var paramButton1:MovieClip;
public var detailBox5:MovieClip;
public var paramButton0:MovieClip;
public var workTimeArea5:MovieClip;
public var workTimeArea4:MovieClip;
public var tabBarFacility:Tabbarfacility;
public var tabBarVillainVisitor:Tabbar;
public var workTimeArea7:MovieClip;
public var tabBarFoodCenter:Tabbarfoodstore;
public var vComment2:TextField;
public var workTimeArea6:MovieClip;
public var tabBarGeneralStore:Tabbargeneralstore;
public var tabBarEntertainment:Tabbarentertainment;
public var vComment3:TextField;
public var workTimeArea1:MovieClip;
public var vComment0:TextField;
public var workTimeArea0:MovieClip;
public var vComment1:TextField;
public var workTimeArea3:MovieClip;
public var vComment6:TextField;
public var workTimeArea2:MovieClip;
public var tabBarNormalVisitor:Tabbar;
public var vComment7:TextField;
public var tabBarElectrician:TabbarElectrician;
public var tabBarSecurity:TabbarSecurity;
public var vComment4:TextField;
public var detailBox2:MovieClip;
var tabBarList:Array;
var _detailBoxList:Array;
var _world:MovieClip;
var _category:int;
var _page:int;
var _maxPage:int;// = 1
public function UI_ParameterDetail(){
var _local2:*;
tabBarList = new Array();
_detailBoxList = new Array();
super();
var _local1:* = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as TabBar)){
if (tabBarList.length <= 0){
_local2.active = true;
} else {
_local2.active = false;
};
_local2.addEventListener(MouseEvent.CLICK, tabBarOnClick);
tabBarList.push(_local2);
};
if ((_local2 as SimpleButton)){
_local2.tabEnabled = false;
};
_local1++;
};
nextPageButton.addEventListener(MouseEvent.CLICK, nextPageButtonOnClick);
prevPageButton.addEventListener(MouseEvent.CLICK, prevPageButtonOnClick);
_category = 0;
_page = 0;
}
function nextPageButtonOnClick(_arg1:MouseEvent):void{
dispatchEvent(new ParameterDetailEvent(ParameterDetailEvent.CHANGE_PAGE, (_page + 1)));
}
function prevPageButtonOnClick(_arg1:MouseEvent):void{
dispatchEvent(new ParameterDetailEvent(ParameterDetailEvent.CHANGE_PAGE, (_page - 1)));
}
function tabBarOnClick(_arg1:MouseEvent){
var _local2:* = _arg1.currentTarget;
var _local3:* = 0;
while (_local3 < tabBarList.length) {
tabBarList[_local3].active = (tabBarList[_local3] == _local2);
_local3++;
};
dispatchEvent(new ParameterDetailEvent(ParameterDetailEvent.CHANGE_CATEGORY, tabBarList.indexOf(_local2)));
}
public function set world(_arg1:MovieClip):void{
_world = _arg1;
}
public function get world():MovieClip{
return (_world);
}
public function set category(_arg1:int):void{
_category = _arg1;
var _local2:* = 0;
while (_local2 < tabBarList.length) {
if (_local2 == _category){
tabBarList[_local2].active = true;
} else {
tabBarList[_local2].active = false;
};
_local2++;
};
}
public function get category():int{
return (_category);
}
public function set page(_arg1:int):void{
_page = _arg1;
}
public function get page():int{
return (_page);
}
public function set maxPage(_arg1:int):void{
_maxPage = _arg1;
}
public function get maxPage():int{
return (_maxPage);
}
public function set detailBoxList(_arg1:Array):void{
_detailBoxList = _arg1;
}
public function get detailBoxList():Array{
return (_detailBoxList);
}
}
}//package Instance
Section 112
//UI_WorldMap (Instance.UI_WorldMap)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.text.*;
public class UI_WorldMap extends MovieClip {
public var visitorText:TextField;
public var boothText:TextField;
public var btnRusia:SimpleButton;
public var flagSymbol:MovieClip;
public var LandmarkPosition:MovieClip;
public var countryName:TextField;
public var soundControl:MovieClip;
public var btnIndia:SimpleButton;
public var popularityText:TextField;
public var btnBritain:SimpleButton;
public var visitorHeader:TextField;
public var employeeText:TextField;
public var cashHeader:TextField;
public var employeeHeader:TextField;
public var boothHeader:TextField;
public var profitText:TextField;
public var profitHeader:TextField;
public var linkCatcher:MovieClip;
public var btnItaly:SimpleButton;
public var popularityHeader:TextField;
public var WorldMapBG:MovieClip;
public var btnGamesfree:SimpleButton;
public var cashText:TextField;
public var blackScreen:MovieClip;
public var btnArabian:SimpleButton;
public var btnBack:SimpleButton;
var _selected:String;
var _currentLandmark:MovieClip;
var buttonList:Array;
var _cityUnlocked:Array;
var theRoot:Object;
var _environtment:Number;
public function UI_WorldMap(){
var _local2:*;
super();
btnBack.addEventListener(MouseEvent.CLICK, btnBackOnClick);
buttonList = [btnIndia, btnRusia, btnArabian, btnItaly, btnBritain];
var _local1:* = 0;
while (_local1 < buttonList.length) {
buttonList[_local1].addEventListener(MouseEvent.CLICK, btnCountryOnClick);
buttonList[_local1].addEventListener(MouseEvent.MOUSE_OVER, btnCountryOnOver);
_local1++;
};
_selected = "";
_local1 = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as SimpleButton)){
_local2.tabEnabled = false;
};
_local1++;
};
blackScreen.visible = false;
flagSymbol.visible = false;
countryName.visible = false;
flagSymbol.mouseEnabled = false;
flagSymbol.mouseChildren = false;
countryName.mouseEnabled = false;
flagSymbol.stop();
popularityText.mouseEnabled = false;
visitorText.mouseEnabled = false;
employeeText.mouseEnabled = false;
boothText.mouseEnabled = false;
cashText.mouseEnabled = false;
profitText.mouseEnabled = false;
popularityHeader.mouseEnabled = false;
visitorHeader.mouseEnabled = false;
employeeHeader.mouseEnabled = false;
boothHeader.mouseEnabled = false;
cashHeader.mouseEnabled = false;
profitHeader.mouseEnabled = false;
linkCatcher.visible = false;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
function Initialize(_arg1:Event):void{
var _local2:Array = new Array();
var _local3:* = root;
theRoot = _local3.mainProgram;
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_INDIA) >= 0){
_local2.push(btnIndia);
};
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_RUSIA) >= 0){
_local2.push(btnRusia);
};
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_ARABIAN) >= 0){
_local2.push(btnArabian);
};
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_ITALY) >= 0){
_local2.push(btnItaly);
};
if (theRoot.cityUnlocked.indexOf(ShopText.MAP_BRITAIN) >= 0){
_local2.push(btnBritain);
};
popularityHeader.visible = false;
visitorHeader.visible = false;
employeeHeader.visible = false;
boothHeader.visible = false;
cashHeader.visible = false;
profitHeader.visible = false;
popularityText.visible = false;
visitorText.visible = false;
employeeText.visible = false;
boothText.visible = false;
cashText.visible = false;
profitText.visible = false;
cityUnlocked = _local2;
soundControl.setMusicVolume(theRoot.bgmVolume);
soundControl.setSFXVolume(theRoot.sfxVolume);
btnGamesfree.addEventListener(MouseEvent.CLICK, linkToGamesfree);
TweenLite.from(this, 0.8, {tint:0xFFFFFF, onComplete:startBGM});
}
function linkToGamesfree(_arg1:MouseEvent):void{
var e = _arg1;
try {
theRoot.linkToGamesfree(e);
} catch(e:Error) {
linkCatcher.visible = true;
};
}
function startBGM():void{
environtment = 1;
var _local1:* = BGMList.getMusicAt("World Map", true);
if (_local1 != null){
theRoot.bgm = new (_local1);
};
theRoot.playBGM();
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
}
function bgmCompleteCheck(_arg1:Event):void{
var _local2:*;
if (BGMList.compareBGM(Utility.getClass(theRoot.bgm), "World Map")){
_local2 = BGMList.getMusicAt("World Map");
if (_local2 != null){
theRoot.bgm = new (_local2);
};
};
theRoot.bgmChannel = theRoot.bgm.play(0, 0, theRoot.bgmTransform);
theRoot.bgmChannel.addEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
}
function btnBackOnClick(_arg1:MouseEvent):void{
TweenLite.to(this, 0.8, {tint:0xFFFFFF, environtment:0, onComplete:BackToMainMenu});
}
function BackToMainMenu():void{
theRoot.resetBGM();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BACK_TO_MENU));
}
function StartGame(_arg1:String):void{
theRoot.resetBGM();
theRoot.bgmChannel.removeEventListener(Event.SOUND_COMPLETE, bgmCompleteCheck);
dispatchEvent(new ShopGameEvent(ShopGameEvent.START_GAME, null, _arg1));
}
function btnCountryOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_selected = WorldMapRelation.getCountryByName(_local2.name);
TweenLite.to(this, 0.5, {tint:0xFFFFFF, environtment:0, onComplete:StartGame, onCompleteParams:[_selected]});
};
}
function btnCountryOnOver(_arg1:MouseEvent):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
removeAllGlowing(_local2);
setGlowingOn(_local2);
if (_currentLandmark == null){
revealLandmark(WorldMapRelation.getLandmarkByName(_local2.name));
} else {
if (!(_currentLandmark is WorldMapRelation.getLandmarkByName(_local2.name))){
TweenLite.to(_currentLandmark, 0.2, {y:(LandmarkPosition.y + _currentLandmark.height), ease:Linear.easeNone, onComplete:revealLandmark, onCompleteParams:[WorldMapRelation.getLandmarkByName(_local2.name)]});
};
};
_selected = WorldMapRelation.getCountryByName(_local2.name);
if (ShopText.MAP_LIST.indexOf(_selected) >= 0){
flagSymbol.gotoAndStop(_selected);
countryName.text = ShopText.convertToCountry(_selected);
if ((_selected in theRoot.countryData)){
_local3 = theRoot.countryData[_selected];
_local4 = _local3.gameplay;
popularityText.text = (("" + Math.round(_local4.popularity)) + "%");
visitorText.text = (("" + ((_local3.numberVisitor + _local3.numberVillain) + _local4.visitorSpecialList.length)) + "");
employeeText.text = (("" + (((_local4.janitorList.length + _local4.electricianList.length) + _local4.securityList.length) + _local4.entertainerList.length)) + "");
boothText.text = (("" + _local4.boothList.length) + "");
cashText.text = (("$" + Utility.numberToMoney(_local4.cash)) + "");
profitText.text = (("$" + Utility.numberToMoney(_local4.profit)) + "");
} else {
popularityText.text = "0%";
visitorText.text = "0";
employeeText.text = "0";
boothText.text = "0";
if (_selected == ShopText.MAP_INDIA){
cashText.text = "$55.0000";
} else {
cashText.text = "$50.0000";
};
profitText.text = "$0";
};
};
flagSymbol.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
countryName.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
popularityHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
visitorHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
employeeHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
boothHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
cashHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
profitHeader.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
popularityText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
visitorText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
employeeText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
boothText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
cashText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
profitText.visible = (ShopText.MAP_LIST.indexOf(_selected) >= 0);
_local2.addEventListener(MouseEvent.MOUSE_OUT, btnCountryOnOut);
};
}
function btnCountryOnOut(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
removeAllGlowing();
_local2.removeEventListener(MouseEvent.MOUSE_OUT, btnCountryOnOut);
}
function setGlowingOn(_arg1:DisplayObject):void{
ShopFilter.setGlowing(_arg1, 0xFF8800);
}
function removeAllGlowing(_arg1:DisplayObject=null){
var _local2:* = 0;
while (_local2 < buttonList.length) {
if (buttonList[_local2] != _arg1){
ShopFilter.removeGlowing(buttonList[_local2]);
};
_local2++;
};
}
function deleteCurrentLandmark():void{
if (_currentLandmark != null){
if (_currentLandmark.parent != null){
_currentLandmark.parent.removeChild(_currentLandmark);
};
_currentLandmark = null;
};
}
function revealLandmark(_arg1:Class):void{
deleteCurrentLandmark();
var _local2:* = new (_arg1);
_local2.x = LandmarkPosition.x;
_local2.y = LandmarkPosition.y;
var _local3:* = getChildIndex(LandmarkPosition);
ShopFilter.setGlowing(_local2, 0xFFFFFF, 1, 10, 1000);
addChildAt(_local2, _local3);
TweenLite.from(_local2, 0.2, {y:(LandmarkPosition.y + _local2.height), ease:Linear.easeNone});
_currentLandmark = _local2;
_currentLandmark.mouseChildren = false;
_currentLandmark.mouseEnabled = false;
}
function set cityUnlocked(_arg1:Array):void{
_cityUnlocked = _arg1;
var _local2:* = 0;
while (_local2 < buttonList.length) {
if (_cityUnlocked.indexOf(buttonList[_local2]) >= 0){
setEnabled(buttonList[_local2]);
} else {
setDisabled(buttonList[_local2]);
};
_local2++;
};
}
function get cityUnlocked():Array{
return (_cityUnlocked);
}
function setEnabled(_arg1:SimpleButton):void{
ShopFilter.removeGrayScale(_arg1);
_arg1.enabled = true;
}
function setDisabled(_arg1:SimpleButton):void{
ShopFilter.setGrayScale(_arg1);
_arg1.enabled = false;
}
public function set environtment(_arg1:Number):void{
_environtment = _arg1;
theRoot.bgmEnvirontment = _environtment;
theRoot.correctSoundChannel();
}
public function get environtment():Number{
return (_environtment);
}
}
}//package Instance
Section 113
//VillainVisitor (Instance.VillainVisitor)
package Instance {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
public class VillainVisitor extends Visitor {
public var body:MovieClip;
public var hitBody:MovieClip;
var _throwingTrash:Boolean;
var throwTrashDelay:int;
var _captured:Boolean;
var _securityOnDuty:MovieClip;
public function VillainVisitor(){
_throwingTrash = false;
throwTrashDelay = 0;
delayToThrowTrashAgain = 0;
dirty = ((Math.random() * 20) + 5);
dirtyLevel = ((Math.random() * 10) + 20);
}
override function Initialize(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
var _local2:* = _world;
setFavoriteList();
initDestinationList();
searchDestination();
_initialCash = _currentCash;
lastMood = _mood;
_statification = ((_mood)>=80) ? 3 : ((_mood)>=50) ? 2 : ((_mood)>=20) ? 1 : 0;
_initialCash = _currentCash;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
addEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
addEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
addEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
addEventListener(MouseEvent.CLICK, VisitorOnClick);
}
override function randomActionWhenNoTarget():void{
if (!_throwingTrash){
super.randomActionWhenNoTarget();
};
}
override protected function movingWhenWalk():void{
if (!_throwingTrash){
super.movingWhenWalk();
};
}
override function lookingBoothProgress():void{
if (!_throwingTrash){
super.lookingBoothProgress();
};
}
override protected function lookingTransportProgress():void{
if (!_throwingTrash){
super.lookingTransportProgress();
};
}
override function lookingRestRoomProgress():void{
if (!_throwingTrash){
super.lookingRestRoomProgress();
};
}
override protected function goHomeProgress():void{
if (!_throwingTrash){
super.goHomeProgress();
};
}
override function throwTrashProgress():void{
var _local2:*;
var _local1:* = _world;
if (this.insideMall()){
if (delayToThrowTrashAgain > 0){
delayToThrowTrashAgain--;
} else {
if (!((((((_rideElevator) || (_rideEscalator))) || (_insideBooth))) || (needToGo()))){
if (!_throwingTrash){
if (Calculate.chance(dirty)){
_throwingTrash = true;
this.walk = false;
throwTrashDelay = 3;
};
} else {
if (throwTrashDelay-- <= 0){
_throwingTrash = false;
this.walk = true;
if (_goHome){
delayToThrowTrashAgain = 20;
} else {
delayToThrowTrashAgain = (Math.floor((Math.random() * 7)) + 8);
};
_local2 = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
_local1.addTrash(_local2.x, _local2.y, dirtyLevel);
};
};
} else {
_throwingTrash = false;
};
};
};
}
public function get throwingTrash():Boolean{
return (_throwingTrash);
}
function ArrestedCheck(_arg1:VisitorEvent):void{
TweenLite.to(this, 0.2, {alpha:0, onComplete:transformToNormal});
_arg1.currentTarget.removeEventListener(VisitorEvent.SECURITY_FINISH_ACTION, ArrestedCheck);
dispatchEvent(new VisitorEvent(VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL));
}
function transformToNormal():void{
var _local5:*;
var _local6:*;
var _local1:* = VisitorList.compareVillainVisitorType(Utility.getClass(this));
var _local2:* = new (_local1);
_local2.x = this.x;
_local2.y = this.y;
_local2.onFloor = this.onFloor;
_local2.currentDestination = this.currentDestination;
_local2.restRoomPercentage = this.restRoomPercentage;
_local2.world = this.world;
_local2.walk = false;
_local2.dirrection = _dirrection;
_local2.currentCash = _currentCash;
_local2.initialCash = _initialCash;
_local2.favoriteList = _favoriteList;
_local2.statification = _statification;
_local2.mood = _mood;
_local2.destinationTargetList = this.destinationTargetList.concat();
_local2.visitorName = this.visitorName;
_local2.setNewInit();
var _local3:* = _world;
var _local4:* = this.parent;
if (_local4 != null){
_local5 = _local4.getChildIndex(this);
_local4.addChildAt(_local2, _local5);
_local3.visitorList.push(_local2);
_local2.addEventListener(VisitorEvent.ON_OUT_WORLD, _local3.visitorOutWorld);
this.removeEventListener(VisitorEvent.ON_OUT_WORLD, _local3.visitorOutWorld);
_local4.removeChild(this);
_local6 = _local3.visitorVillainList.indexOf(this);
if (_local6 >= 0){
_local3.visitorVillainList.splice(_local6, 1);
};
TweenLite.from(_local2, 0.3, {alpha:0, onComplete:makeWalk, onCompleteParams:[_local2]});
};
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.OUT_ELEVATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.OUT_ESCALATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
removeEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
removeEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
removeEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
removeEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
removeEventListener(MouseEvent.CLICK, VisitorOnClick);
_local3.main.removeEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
dispatchEvent(new VisitorEvent(VisitorEvent.TRANSFORM_TO_NORMAL, null, _local2));
}
function makeWalk(_arg1:MovieClip):void{
_arg1.walk = true;
}
override function checkExtraBrokenBooth():void{
var _local1:*;
var _local2:*;
if (!(((_currentDestination is Hall)) || ((_currentDestination is FacilityTerrace)))){
if (_currentDestination != null){
if (visitTime > 5){
if (Calculate.chance(30)){
_local1 = (((Math.random() * 15) + 5) / (25 * _currentDestination.boothLevel));
_local2 = _world;
if (_local2.checkUpgradeIndex){
_local1 = (_local1 * 0.6);
};
_currentDestination.boothBroken = (_currentDestination.boothBroken + _local1);
};
};
};
};
}
public function set captured(_arg1:Boolean):void{
var _local2:*;
_captured = _arg1;
if (_captured){
this.walk = false;
waitingElevator = false;
if (transportTarget != null){
transportTarget = null;
};
_local2 = _world;
_local2.removeEventListener(ShopGameEvent.UPDATE, tick);
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
if (securityOnDuty != null){
securityOnDuty.addEventListener(VisitorEvent.SECURITY_FINISH_ACTION, ArrestedCheck);
};
};
}
public function get captured():Boolean{
return (_captured);
}
public function set securityOnDuty(_arg1:MovieClip):void{
_securityOnDuty = _arg1;
if (((!((_securityOnDuty == null))) && (_captured))){
securityOnDuty.addEventListener(VisitorEvent.SECURITY_FINISH_ACTION, ArrestedCheck);
};
}
public function get securityOnDuty():MovieClip{
return (_securityOnDuty);
}
}
}//package Instance
Section 114
//Visitor (Instance.Visitor)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
import Instance.ui.*;
public class Visitor extends HumanObject {
protected var _visiting:Boolean;
protected var _gender:Boolean;
var visitTime:int;
var supermarketCashier:Boolean;
var takeMoney:Boolean;
var takeMoneyProgress:Boolean;
var takeMoneyDelay:Number;
var changeCommandChance:Number;
var searchDestinationCounter:Number;
var lastBrokenBoothReport:MovieClip;
var lastFullBoothReport:MovieClip;
var lastFullRestRoom:MovieClip;
var _restRoomPercentage:Number;
var restRoomIncrementChance:Number;
var _restRoomTarget:MovieClip;
var restRoomUsed:Boolean;
var dirty:Number;
var dirtyLevel:Number;
var dance:Boolean;
var _statification:int;
var itemBoughtPriceList:Array;
var itemBoughtNumberList:Array;
var boughtPriceTotal:Number;
var visitedHall:Boolean;
var visitTreshold:Number;
var justVisit:Boolean;
protected var delayToThrowTrashAgain:int;
protected var _bodyPerimeter:MovieClip;
protected var _friendList:Array;
protected var _meetFriend:MovieClip;
protected var _currentCash:Number;
protected var _lowerCashTreshold:Number;
protected var _initialCash:Number;
protected var _favoriteList:Array;
protected var _transportProblem:Number;
protected var _mayHaveCar:Boolean;
protected var _visitorName:String;
protected var _visitorComment:String;
protected var _specialVisitorFans:Array;
protected var fansDialog:Object;
var cashTarget:Number;
var supermarketQueue:Array;
var searchATMChance:Number;
var takeMoneySymbol:MovieClip;
var entertainerOnView:MovieClip;
var terraceConv:Array;
var lastTerrace:MovieClip;
public function Visitor(){
var _local1:*;
var _local2:*;
itemBoughtPriceList = new Array();
itemBoughtNumberList = new Array();
_friendList = new Array();
_favoriteList = new Array();
_specialVisitorFans = new Array();
terraceConv = new Array();
super();
stop();
_speed = 2;
_runModifier = 2;
_destinationTargetList = new Array();
_mood = 50;
_visiting = false;
_gender = VisitorList.compareGenderByType(Utility.getClass(this));
if ((this as VisitorSpecial)){
_visitorName = VisitorList.getSpecialVisitorName(Utility.getClass(this));
} else {
if (gender){
_visitorName = GenerateName.getNameMale();
} else {
_visitorName = GenerateName.getNameFemale();
};
for (_local2 in VisitorList.VISITOR_ORIGIN_TYPE) {
if (!(this is VisitorBussinessman)){
if (VisitorList.VISITOR_ORIGIN_TYPE[_local2].indexOf(Utility.getClass(this)) >= 0){
if (gender){
_visitorName = GenerateName.getNameMale(_local2);
} else {
_visitorName = GenerateName.getNameFemale(_local2);
};
break;
};
};
};
};
_meetFriend = null;
justVisit = true;
dance = false;
visitedHall = false;
dirty = ((Math.random() * 3) + 1);
dirtyLevel = 2;
visitTime = 30;
supermarketCashier = false;
takeMoney = false;
takeMoneyProgress = false;
takeMoneyDelay = 0;
changeCommandChance = 30;
searchDestinationCounter = 100;
_restRoomPercentage = 0;
_currentCash = (Math.floor(((Math.random() * 80) + 20)) * 10);
_lowerCashTreshold = 10;
_transportProblem = 0;
takeMoneySymbol = null;
searchATMChance = 0;
supermarketQueue = new Array();
restRoomIncrementChance = 5;
_restRoomTarget = null;
_mayHaveCar = false;
_visitorComment = "";
fansDialog = null;
restRoomUsed = false;
entertainerOnView = null;
theBody = getChildByName("hitBody");
_local1 = getChildByName("body");
if (_local1 != null){
_bodyPerimeter = new MovieClip();
_bodyPerimeter.graphics.clear();
_bodyPerimeter.graphics.beginFill(0xFFFFFF);
_bodyPerimeter.graphics.drawRect(-((_local1.width / 2)), -(_local1.height), (_local1.width + 20), _local1.height);
_bodyPerimeter.graphics.endFill();
_bodyPerimeter.visible = false;
addChildAt(_bodyPerimeter, 0);
};
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.OUT_ELEVATOR, CheckRestroomDestination);
addEventListener(VisitorEvent.OUT_ESCALATOR, CheckRestroomDestination);
}
protected function setFavoriteList():void{
var _local9:*;
var _local10:*;
var _local11:*;
var _local1:* = _world;
var _local2:* = _local1.main;
var _local3:* = new Array();
var _local4:* = 0;
while (_local4 < 10) {
_local9 = FavoriteList.getRandomFavorite(this);
if (_local2.boothAvailable.indexOf(_local9) >= 0){
_local3.push(_local9);
} else {
_local3.push(null);
};
_local4++;
};
_local3.sort();
var _local5:Array = new Array();
var _local6:* = -1;
while (_local3.length > 0) {
_local10 = _local3.shift();
if ((((_local6 < 0)) || (_local5[_local6].indexOf(_local10)))){
_local6++;
_local5[_local6] = new Array();
};
_local5[_local6].push(_local10);
};
_local5.sortOn("length", (Array.NUMERIC | Array.DESCENDING));
var _local7:* = new Array();
var _local8:* = 0;
_local4 = 0;
while (_local4 < _local5.length) {
if (_local5[_local4].indexOf(null) < 0){
if (_local8 < 5){
_favoriteList = _favoriteList.concat(_local5[_local4]);
_local8++;
} else {
_local11 = 0;
while (_local11 < _local5[_local4].length) {
_local7.push(null);
_local11++;
};
};
} else {
_local7 = _local7.concat(_local5[_local4]);
};
_local4++;
};
_favoriteList = _favoriteList.concat(_local7);
setSpecialVisitorFans();
}
function setSpecialVisitorFans():void{
var _local2:*;
var _local1:* = 40;
while (((Calculate.chance(_local1)) && ((_specialVisitorFans.length < 3)))) {
_local2 = VisitorList.getFansOf(this);
if (_local2 != null){
_specialVisitorFans.push(_local2);
};
_local1 = (_local1 - 10);
};
}
override function Initialize(_arg1:Event):void{
var _local3:*;
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
var _local2:* = _world;
setFavoriteList();
initDestinationList();
searchDestination();
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addFriend();
lastMood = _mood;
_statification = ((_mood)>=80) ? 3 : ((_mood)>=50) ? 2 : ((_mood)>=20) ? 1 : 0;
if (_local2.checkUpgradeByName("Special Trolley")){
_currentCash = Math.round((_currentCash * 1.75));
};
if (_mayHaveCar){
_local3 = countParkingLot();
if (Calculate.chance(_local3)){
_local2.createCar(this);
};
if (_car != null){
_currentCash = Math.round((_currentCash * 1.5));
_car.addEventListener(VisitorEvent.CAR_LOST, iLostMyCar);
};
};
_currentCash = Math.round((_currentCash * (1 + (_local2.popularity / 150))));
_initialCash = _currentCash;
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
addEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
addEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
addEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
addEventListener(MouseEvent.CLICK, VisitorOnClick);
_local2.main.addEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
_visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
}
function gameplayRemoved(_arg1:Event):void{
var _local2:* = _world;
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.OUT_ELEVATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.OUT_ESCALATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
removeEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
removeEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
removeEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
removeEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
removeEventListener(MouseEvent.CLICK, VisitorOnClick);
_local2.main.removeEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
addEventListener(Event.ADDED_TO_STAGE, initAgain);
}
function initAgain(_arg1:Event):void{
var _local2:* = _world;
addEventListener(Event.ENTER_FRAME, WalkingCheck);
addEventListener(VisitorEvent.OUT_ELEVATOR, CheckRestroomDestination);
addEventListener(VisitorEvent.OUT_ESCALATOR, CheckRestroomDestination);
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
addEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
addEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
addEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
addEventListener(MouseEvent.CLICK, VisitorOnClick);
_local2.main.addEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
removeEventListener(Event.ADDED_TO_STAGE, initAgain);
}
function initMain(_arg1:Event):void{
setFavoriteList();
_arg1.currentTarget.removeEventListener(Event.ADDED_TO_STAGE, initMain);
}
function iLostMyCar(_arg1:Event):void{
_car = null;
}
function countParkingLot():Number{
var _local4:*;
var _local5:*;
var _local1:* = _world;
var _local2:* = 0;
var _local3:* = 0;
while (_local3 < _local1.parkingList.length) {
_local4 = _local1.parkingList[_local3];
_local5 = 0;
while (_local5 < _local4.carQueue.length) {
_local2 = (_local2 + ((_local4.carQueue[_local5])==null) ? 1.5 : 0);
_local5++;
};
_local3++;
};
return (_local2);
}
protected function VisitorOnClick(_arg1:MouseEvent):void{
var _local2:* = _world;
if ((((_local2.buildSymbol == null)) && ((_local2.hireSymbol == null)))){
dispatchEvent(new VisitorEvent(VisitorEvent.VISITOR_CLICK));
};
}
protected function updateNextDayPopularity(_arg1:VisitorEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
if (!justVisit){
_local2 = _world;
_local3 = (((this.mood - 50) / 50) * 2.25);
_local4 = (_local3 * 0.1);
if (_local2.checkUpgradeByName("Boardcast")){
if (_local3 >= 0){
_local3 = (_local3 * 1.2);
};
};
if (_local2.haveSpecialVisitorOf(VisitorLadyGogo)){
if (_local3 >= 0){
_local3 = (_local3 * 1.5);
};
};
if (_local2.haveSpecialVisitorOf(VisitorKezya)){
if (_local3 >= 0){
_local3 = (_local3 * 1.3);
};
};
_local2.visitorPopularity = (_local2.visitorPopularity + (_local3 + ((Math.random() * _local4) - (2 * _local4))));
removeEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
};
}
function InitFromVillain(_arg1:Event):void{
var _local2:* = _world;
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
addEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
addEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
addEventListener(MouseEvent.CLICK, VisitorOnClick);
removeEventListener(Event.ADDED_TO_STAGE, InitFromVillain);
}
public function setNewInit():void{
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
addEventListener(Event.ADDED_TO_STAGE, InitFromVillain);
}
function addFriend():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = _world;
if ((this as VisitorNormal)){
_local2 = 0;
_local3 = 50;
while (Calculate.chance(_local3)) {
_local2++;
_local3 = (_local3 - (Math.floor((Math.random() * 8)) + 3));
};
if (_local1.visitorList.length >= _local2){
_local4 = 0;
while (_local4 < _local2) {
_local5 = Math.floor((Math.random() * _local1.visitorList.length));
_local6 = _local1.visitorList[_local5];
if ((_local6 as VisitorNormal)){
if (_local6.insideMall()){
if (_friendList.indexOf(_local6) < 0){
_friendList.push(_local6);
_local6.addEventListener(VisitorEvent.ON_OUT_WORLD, friendOutWorld);
_local6.friendList.push(this);
addEventListener(VisitorEvent.ON_OUT_WORLD, _local6.friendOutWorld);
};
};
};
_local4++;
};
};
};
}
public function friendOutWorld(_arg1:VisitorEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _friendList.indexOf(_local2);
if ((_local3 in _friendList)){
_friendList.splice(_local3, 1);
};
_local2.removeEventListener(VisitorEvent.ON_OUT_WORLD, friendOutWorld);
}
override protected function removeTick(_arg1:VisitorEvent):void{
super.removeTick(_arg1);
var _local2:* = _world;
removeEventListener(Event.ENTER_FRAME, WalkingCheck);
removeEventListener(VisitorEvent.OUT_ELEVATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.OUT_ESCALATOR, CheckRestroomDestination);
removeEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
removeEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
removeEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
removeEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
removeEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
removeEventListener(MouseEvent.CLICK, VisitorOnClick);
_local2.main.removeEventListener(Event.REMOVED_FROM_STAGE, gameplayRemoved);
}
protected function initDestinationList(){
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (_world != null){
_local1 = _world;
_local2 = Math.floor(((21 - _local1.gameHour) / 2));
_local3 = 0;
_local4 = 0;
while (_local4 < _local2) {
if (Calculate.chance((80 - ((80 / _local2) * _local4)))){
_local3++;
} else {
break;
};
_local4++;
};
_local5 = _favoriteList.concat();
_local4 = 0;
while (_local4 < _local3) {
if (_local5.length > 0){
_local6 = Math.floor((Math.random() * _local5.length));
_local7 = _local5[_local6];
if (_local7 != null){
_destinationTargetList.push(_local7);
while (_local5.indexOf(_local7) >= 0) {
_local5[_local5.indexOf(_local7)] = null;
};
};
} else {
break;
};
_local4++;
};
};
}
protected function searchDestination():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
if (_world != null){
_local1 = _world;
searchDestinationCounter = 100;
reachDestination = false;
if (_currentDestination != null){
_currentDestination.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
};
_local2 = Math.max(Math.min(((22 - _local1.gameHour) / 12), 1), 0);
_local3 = ((_currentCash > _lowerCashTreshold)) ? 100 : ((_currentCash / _lowerCashTreshold) * 100);
if (((Calculate.chance(_local3)) && (!(Calculate.chance(searchATMChance))))){
_local4 = 0;
if (((!((_local1.hall == null))) && (!(visitedHall)))){
if (((!((_local1.hall.currentEvent == BoothHall.NONE))) && (_local1.hall.boothOpen))){
if (_currentCash >= _local1.hall.getTicketPrice()){
_local4 = (50 + (_local1.hall.boothLevel * 10));
if (_local1.checkUpgradeByName("Glamorous Speaker")){
_local4 = (_local4 * 1.2);
};
};
};
};
if (Calculate.chance(_local4)){
_currentDestination = _local1.hall;
} else {
if (_destinationTargetList.length > 0){
_currentDestination = searchBoothOf(_destinationTargetList[0]);
if (_currentDestination == null){
_local5 = 0;
if (_mood <= 50){
_local5 = (((50 - _mood) / 50) * 70);
};
if (Calculate.chance(_local5)){
_currentDestination = searchTerrace();
};
};
} else {
_local6 = (((_mood / 100) * 80) * _local2);
if (_local1.checkUpgradeByName("Cute Shoping Bag")){
_local6 = (_local6 * 1.2);
};
if (Calculate.chance(_local6)){
_local7 = Math.floor((Math.random() * _local1.boothList.length));
_local8 = _local1.boothList[_local7];
if (((!((_local8 == _currentDestination))) && (((!((((_local8 == lastBrokenBoothReport)) && (lastBrokenBoothReport.boothIsBroken)))) && (!((((_local8 == lastFullBoothReport)) && (lastFullBoothReport.maxCapacity())))))))){
_currentDestination = _local8;
lastBrokenBoothReport = null;
} else {
if (Calculate.chance(((((100 - _mood) / 100) * 20) + 40))){
_currentDestination = searchTerrace();
} else {
_currentDestination = null;
};
};
} else {
_local9 = (_local2 * 100);
_local10 = (((100 - _mood) / 100) * 80);
if (_local10 > _local9){
if (Calculate.chance((((_local10 / 100) * 20) + 50))){
_currentDestination = searchTerrace();
} else {
_currentDestination = null;
};
} else {
_currentDestination = null;
};
if (!justVisit){
if (_currentDestination == null){
if (_local1.checkUpgradeByName("Free Wi-Fi")){
_local10 = (_local10 * 0.7);
};
if ((this as VisitorSpecial)){
_local10 = (_local10 * 0.5);
};
_local11 = Math.max(_local9, _local10);
if (Calculate.chance(_local11)){
goHome = true;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getHomeConversationArray(this));
};
};
};
};
};
};
} else {
_currentDestination = searchATM();
if (_currentDestination == null){
goHome = true;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.NO_ATM);
} else {
visitorComment = ConversationList.getSingleConversation(this, ConversationList.SEARCH_ATM);
};
};
if (_currentDestination != null){
if ((_currentDestination is FacilityTerrace)){
lastTerrace = _currentDestination;
} else {
lastTerrace = null;
};
};
if (_currentDestination != null){
_currentDestination.addEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
};
};
}
function searchTerrace():MovieClip{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local1:* = null;
var _local2:* = _world;
var _local3:* = null;
var _local4:* = 0;
while (_local4 < _local2.terraceList.length) {
_local5 = _local2.terraceList[_local4];
if (((!((_local5 == lastTerrace))) && (!((((_local5 == lastFullBoothReport)) && (lastFullBoothReport.maxCapacity())))))){
if (!_local5.maxCapacity()){
if (_local3 == null){
_local3 = _local5;
} else {
if (_local3.onFloor != _onFloor){
if (_local5.onFloor == _onFloor){
_local3 = _local5;
} else {
_local6 = _local2.floorList.indexOf(_local3.onFloor);
_local7 = _local2.floorList.indexOf(_local5.onFloor);
_local8 = _local2.floorList.indexOf(_onFloor);
if (Math.abs((_local7 - _local8)) < Math.abs((_local6 - _local8))){
_local3 = _local5;
} else {
if (Math.abs((_local7 - _local8)) == Math.abs((_local6 - _local8))){
if (Calculate.chance(50)){
_local3 = _local5;
};
};
};
};
} else {
if (_local5.onFloor == _onFloor){
_local9 = _local3.body.enterance;
_local10 = _local3.body.enterance;
_local11 = _local2.globalToLocal(_local9.parent.localToGlobal(new Point(_local9.x, _local9.y)));
_local12 = _local2.globalToLocal(_local10.parent.localToGlobal(new Point(_local10.x, _local10.y)));
if (Math.abs((_local12.x - this.x)) < Math.abs((_local11.x - this.x))){
_local3 = _local5;
} else {
if (Math.abs((_local12.x - this.x)) == Math.abs((_local11.x - this.x))){
if (Calculate.chance(50)){
_local3 = _local5;
};
};
};
};
};
};
};
};
_local4++;
};
_local1 = _local3;
return (_local1);
}
function checkMood(_arg1:VisitorEvent):void{
if ((((_mood >= 80)) && ((lastMood < 80)))){
_statification = 3;
moodDialogAppear();
} else {
if ((((((_mood >= 50)) && ((lastMood < 50)))) || ((((_mood <= 78)) && ((lastMood > 78)))))){
_statification = 2;
moodDialogAppear();
} else {
if ((((((_mood >= 20)) && ((lastMood < 20)))) || ((((_mood <= 48)) && ((lastMood > 48)))))){
_statification = 1;
moodDialogAppear();
} else {
if ((((_mood <= 18)) && ((lastMood > 18)))){
_statification = 0;
moodDialogAppear();
};
};
};
};
}
function moodDialogAppear():void{
var _local1:*;
var _local2:*;
if (((!(((_insideBooth) || (_rideElevator)))) || (((_insideBooth) && ((_currentDestination is Hall)))))){
if (_dialogBox == null){
_local1 = _world;
_local2 = new legenddialoguebox();
_local2.iconClip = ((_statification)==3) ? new legendmoodhappy() : ((_statification)==2) ? new legendmoodnormal() : ((_statification)==1) ? new legendmoodupset() : new legendmoodveryupset();
_local2.relation = this;
_local2.delay = 7;
_local1.addDialogBox(_local2);
};
};
}
function searchATM():MovieClip{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local1:* = null;
var _local2:* = null;
var _local3:* = _world;
var _local4:* = 0;
while (_local4 < _local3.atmList.length) {
_local5 = _local3.atmList[_local4];
if (((!(_local5.boothIsBroken)) && (_local5.boothOpen))){
if (_local2 == null){
_local2 = _local5;
} else {
if (_local2.visitorList.length > _local5.visitorList.length){
_local2 = _local5;
} else {
if (_local2.visitorList.length == _local5.visitorList.length){
if (_local2.onFloor != _onFloor){
if (_local5.onFloor == _onFloor){
_local2 = _local5;
} else {
_local6 = _local3.floorList.indexOf(_local2.onFloor);
_local7 = _local3.floorList.indexOf(_local5.onFloor);
_local8 = _local3.floorList.indexOf(_onFloor);
if (Math.abs((_local7 - _local8)) < Math.abs((_local6 - _local8))){
_local2 = _local5;
} else {
if (Math.abs((_local7 - _local8)) == Math.abs((_local6 - _local8))){
if (Calculate.chance(50)){
_local2 = _local5;
};
};
};
};
} else {
if (_local5.onFloor == _onFloor){
_local9 = _local2.body.enterance;
_local10 = _local2.body.enterance;
_local11 = _local3.globalToLocal(_local9.parent.localToGlobal(new Point(_local9.x, _local9.y)));
_local12 = _local3.globalToLocal(_local10.parent.localToGlobal(new Point(_local10.x, _local10.y)));
if (Math.abs((_local12.x - this.x)) < Math.abs((_local11.x - this.x))){
_local2 = _local5;
} else {
if (Math.abs((_local12.x - this.x)) == Math.abs((_local11.x - this.x))){
if (Calculate.chance(50)){
_local2 = _local5;
};
};
};
};
};
};
};
};
};
_local4++;
};
_local1 = _local2;
return (_local1);
}
function destinationIsDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if (_insideBooth){
this.visible = true;
_visiting = false;
_insideBooth = false;
};
_local2.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
_currentDestination = null;
}
function restRoomTargetIsDestroyed(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if (_insideBooth){
this.visible = true;
restRoomUsed = false;
_insideBooth = false;
};
_local2.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
restRoomTarget = null;
}
override function beginEnterBooth():void{
if (_currentDestination != null){
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_currentDestination.openTheDoor();
};
}
function searchBoothOf(_arg1:Class):MovieClip{
var _local6:*;
var _local2:* = null;
var _local3:* = _world;
var _local4:* = new Array();
var _local5:* = 0;
while (_local5 < _local3.boothList.length) {
if ((_local3.boothList[_local5] is _arg1)){
if (((!((_local3.boothList[_local5] == _currentDestination))) && (_local3.boothList[_local5].boothOpen))){
if (((!((((_local3.boothList[_local5] == lastBrokenBoothReport)) && (lastBrokenBoothReport.boothIsBroken)))) && (!((((_local3.boothList[_local5] == lastFullBoothReport)) && (lastFullBoothReport.maxCapacity())))))){
_local4.push(_local3.boothList[_local5]);
};
};
};
_local5++;
};
if (_local4.length > 0){
_local6 = Math.floor((Math.random() * _local4.length));
_local2 = _local4[_local6];
};
return (_local2);
}
override function tick(_arg1:ShopGameEvent):void{
if (!_rideCar){
if (_visiting){
visitingProgress();
} else {
if (entertainerOnView == null){
checkBoothCondition();
worldTimeCheck();
restRoomCheck();
throwTrashProgress();
randomActionWhenNoTarget();
};
moodManipulation();
};
if (justVisit){
if (this.insideMall()){
justVisit = false;
};
};
};
}
function checkBoothCondition():void{
if (_currentDestination != null){
if (((!(((((_insideBooth) || (_rideElevator))) || (_rideEscalator)))) && ((_meetFriend == null)))){
if (!_currentDestination.boothOpen){
_currentDestination = null;
visitorComment = "";
searchDestination();
if (visitorComment == ""){
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
};
};
};
};
}
function restRoomCheck():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (!restRoomUsed){
if (Calculate.chance(restRoomIncrementChance)){
_restRoomPercentage = (_restRoomPercentage + ((Math.random() * 7) + 3));
};
_restRoomPercentage = Math.min(_restRoomPercentage, 100);
if ((((((((_restRoomPercentage > 70)) && ((restRoomTarget == null)))) && (!(((((((((((_goHome) || (_rideElevator))) || (_rideEscalator))) || (_insideBooth))) || (_visiting))) || (reachDestination)))))) && ((_meetFriend == null)))){
addLegend(legendneedtoilet);
restRoomTarget = searchRestRoom();
if (restRoomTarget == null){
if (_currentDestination != null){
_currentDestination.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
};
_currentDestination = null;
goHome = true;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getNotFoundRestroomArray(this));
} else {
restRoomTarget.addEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
if (restRoomTarget.onFloor == _onFloor){
floorTarget = restRoomTarget.onFloor;
};
visitorComment = ConversationList.getSingleConversation(this, ConversationList.SEARCH_TOILET);
};
};
if ((((_restRoomPercentage > 85)) && (!(_running)))){
_running = true;
};
} else {
if (_restRoomPercentage > 0){
_restRoomPercentage = (_restRoomPercentage - ((Math.random() * 7) + 3));
} else {
restRoomUsed = false;
_restRoomPercentage = 0;
if (_gender){
_local2 = restRoomTarget.restroomBody.enteranceMenRoom;
_local3 = restRoomTarget.restroomBody.menDoor;
} else {
_local2 = restRoomTarget.restroomBody.enteranceWomenRoom;
_local3 = restRoomTarget.restroomBody.womenDoor;
};
_local4 = _local1.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
this.x = _local4.x;
this.y = _local4.y;
_local3.addEventListener(BoothEvent.DOOR_OPENED, ExitRestRoom);
_local3.openTheDoor();
};
};
}
public function removeFromRestRoom():void{
if (restRoomTarget != null){
restRoomTarget.leaved(this);
};
}
function searchRestRoom():MovieClip{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local1:* = null;
var _local2:* = null;
var _local3:* = _world;
var _local4:* = 0;
while (_local4 < _local3.restroomList.length) {
_local5 = _local3.restroomList[_local4];
if (((!(_local5.roomFull(this.gender))) && (!((((_local5 == lastFullRestRoom)) && (lastFullRestRoom.roomFull(this.gender))))))){
if (_local2 == null){
_local2 = _local5;
} else {
if (_local2.onFloor != _onFloor){
if (_local5.onFloor == _onFloor){
_local2 = _local5;
} else {
_local6 = _local3.floorList.indexOf(_local2.onFloor);
_local7 = _local3.floorList.indexOf(_local5.onFloor);
_local8 = _local3.floorList.indexOf(_onFloor);
if (Math.abs((_local7 - _local8)) < Math.abs((_local6 - _local8))){
_local2 = _local5;
} else {
if (Math.abs((_local7 - _local8)) == Math.abs((_local6 - _local8))){
if (Calculate.chance(50)){
_local2 = _local5;
};
};
};
};
} else {
if (_local5.onFloor == _onFloor){
if (gender){
_local9 = _local2.restroomBody.enteranceMenRoom;
_local10 = _local5.restroomBody.enteranceMenRoom;
} else {
_local9 = _local2.restroomBody.enteranceWomenRoom;
_local10 = _local5.restroomBody.enteranceWomenRoom;
};
_local11 = _local3.globalToLocal(_local9.parent.localToGlobal(new Point(_local9.x, _local9.y)));
_local12 = _local3.globalToLocal(_local10.parent.localToGlobal(new Point(_local10.x, _local10.y)));
if (Math.abs((_local12.x - this.x)) < Math.abs((_local11.x - this.x))){
_local2 = _local5;
} else {
if (Math.abs((_local12.x - this.x)) == Math.abs((_local11.x - this.x))){
if (Calculate.chance(50)){
_local2 = _local5;
};
};
};
};
};
};
};
_local4++;
};
_local1 = _local2;
return (_local1);
}
function throwTrashProgress():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (!(this is VisitorKateCentertown)){
if (this.insideMall()){
if (delayToThrowTrashAgain > 0){
delayToThrowTrashAgain--;
} else {
if (!((((((_rideElevator) || (_rideEscalator))) || (_insideBooth))) || (needToGo()))){
_local2 = _local1.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
_local3 = dirty;
if (_local1.checkUpgradeByName("Expert Bin")){
_local3 = (_local3 * 0.7);
};
if (Calculate.chance(_local3)){
_local1.addTrash(_local2.x, _local2.y, dirtyLevel);
if (_goHome){
delayToThrowTrashAgain = 20;
} else {
delayToThrowTrashAgain = (Math.floor((Math.random() * 7)) + 8);
};
};
};
};
};
};
}
function worldTimeCheck():void{
var _local1:*;
if (!_goHome){
_local1 = _world;
if (!((((((((((_insideBooth) || (_rideElevator))) || (_rideEscalator))) || (restRoomUsed))) || (reachDestination))) || (_visiting))){
if ((((_local1.gameHour >= 21)) || ((_local1.gameHour < 9)))){
if ((((((_local1.gameHour >= 22)) || ((_local1.gameHour < 9)))) || (Calculate.chance(((_local1.gameMinute / 60) * 100))))){
goHome = true;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getHomeConversationArray(this));
if (_currentDestination != null){
_currentDestination.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
};
_currentDestination = null;
_destinationTargetList = [];
floorTarget = null;
if (_onFloor == null){
waitingElevator = false;
transportTarget = null;
if (!_walk){
this.walk = true;
};
};
};
};
};
};
}
function randomActionWhenNoTarget():void{
var _local2:*;
var _local1:* = _world;
if (((insideMall()) && (!(this.rideCar)))){
if ((((((((((((transportTarget == null)) && ((_meetFriend == null)))) && (!(((_rideElevator) || (_rideEscalator)))))) && ((((_currentDestination == null)) || (((!((_currentDestination == null))) && (!((_currentDestination.onFloor == _onFloor))))))))) && ((((restRoomTarget == null)) || (((!((restRoomTarget == null))) && (!((restRoomTarget.onFloor == _onFloor))))))))) && (((!(_goHome)) || (((_goHome) && ((((((_car == null)) && (!((_onFloor == null))))) || (((!((_car == null))) && (!((_onFloor == _car.onFloor))))))))))))){
if (!_walk){
this.walk = true;
};
if (changeCommandChance < 30){
changeCommandChance = (changeCommandChance + (Math.random() * 2));
};
if (Calculate.chance(changeCommandChance)){
changeCommandChance = 0;
if (Calculate.chance(40)){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
if (!_walk){
this.walk = true;
};
} else {
if (Calculate.chance(50)){
if ((((((restRoomTarget == null)) && ((_currentDestination == null)))) && (!(_goHome)))){
randomDestinationList();
visitorComment = "";
searchDestination();
if (visitorComment == ""){
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
};
};
} else {
_local2 = (Math.floor((Math.random() * _local1.floorList.length)) - 1);
if (_local2 < 0){
floorTarget = null;
} else {
floorTarget = _local1.floorList[_local2];
};
};
};
};
if (restRoomTarget != null){
if (this.needToGo()){
_local1.visitorPopularity = (_local1.visitorPopularity - (Math.random() + 2));
restRoomTarget = null;
_currentDestination = null;
goHome = true;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getNotFoundRestroomArray(this));
};
} else {
if (_destinationTargetList.length > 0){
if (searchDestinationCounter-- <= 0){
_local1.visitorPopularity = (_local1.visitorPopularity - (Math.random() + 2));
_destinationTargetList.shift();
searchDestinationCounter = 100;
visitorComment = "";
};
if (_currentDestination == null){
searchDestination();
if (visitorComment == ""){
ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
};
};
} else {
if (_currentDestination != null){
if (searchDestinationCounter-- <= 0){
_local1.visitorPopularity = (_local1.visitorPopularity - (Math.random() + 2));
searchDestinationCounter = 100;
searchDestination();
};
} else {
if (_goHome){
if (searchDestinationCounter-- <= 0){
_local1.visitorPopularity = (_local1.visitorPopularity - (Math.random() + 2));
searchDestinationCounter = 100;
};
};
};
};
};
};
};
}
function randomDestinationList():void{
var _local1:*;
var _local2:*;
if (Calculate.chance(60)){
if (_destinationTargetList.length <= 0){
_local1 = Math.floor((Math.random() * _favoriteList.length));
_local2 = _favoriteList[_local1];
if (_local2 != null){
_destinationTargetList.push(_local2);
};
};
};
}
function WalkingCheck(_arg1:Event):void{
var _local3:*;
var _local2:* = _world;
if (_local2 != null){
_local3 = 0;
while (_local3 < _local2.gameSpeed) {
if (this.parent != null){
if (!_rideCar){
if (entertainerOnView == null){
checkOnIceCream();
checkOnCafe();
checkOnAtm();
checkOnHall();
if (!((visiting) || (restRoomUsed))){
meetFriendCheck();
if (_meetFriend == null){
if (_restRoomPercentage < 70){
lookingBoothProgress();
} else {
lookingRestRoomProgress();
};
goHomeProgress();
lookingTransportProgress();
waitingElevatorProgress();
};
};
movingWhenWalk();
} else {
waitingElevatorProgress();
};
};
} else {
break;
};
_local3++;
};
};
}
override function waitingElevatorProgress():void{
var _local1:*;
var _local2:*;
super.waitingElevatorProgress();
if (waitingElevator){
if (((!(_transportTarget.willBeEnteredBy(this))) && ((entertainerOnView == null)))){
_local1 = (Math.random() * 2);
_local2 = _world;
if (_local2.checkUpgradeByName("Amazing LCD TV")){
_local1 = (_local1 * 0.7);
};
waitingTreshold = (waitingTreshold - _local1);
if (waitingTreshold <= 0){
waitingElevator = false;
transportTarget = null;
};
};
};
}
override protected function goHomeProgress():void{
super.goHomeProgress();
if (((_goHome) && (!(_insideBooth)))){
if (restRoomTarget != null){
restRoomTarget.removeEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
restRoomTarget = null;
};
};
}
function meetFriendCheck():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local1:* = _world;
if (this.parent != null){
if (!(((transportTarget is FacilityElevator)) && (transportTarget.willBeEnteredBy(this)))){
if (_meetFriend == null){
if (((!(((((((_insideBooth) || (_rideElevator))) || (_rideEscalator))) || (_rideCar)))) && ((_restRoomPercentage < 70)))){
_local2 = 0;
while (_local2 < _friendList.length) {
_local3 = _friendList[_local2];
if (((((!((_local3.parent == null))) && ((_local3.meetFriend == null)))) && (!((((_local3.transportTarget is FacilityElevator)) && (_local3.transportTarget.willBeEnteredBy(_local3))))))){
if (!((((((_local3.insideBooth) || (_local3.rideElevator))) || (_local3.rideEscalator))) || (_local3.rideCar))){
if (_bodyPerimeter.hitTestObject(_local3.bodyPerimeter)){
_meetFriend = _local3;
_local3.meetFriend = this;
_local1.addConversation(this, _local3);
break;
};
};
};
_local2++;
};
if ((this as VisitorNormal)){
if (_meetFriend == null){
_local2 = 0;
while (_local2 < _local1.visitorSpecialList.length) {
_local3 = _local1.visitorSpecialList[_local2];
if (_local3.parent != null){
if (!((((((_local3.insideBooth) || (_local3.rideElevator))) || (_local3.rideEscalator))) || (_local3.rideCar))){
if (_bodyPerimeter.hitTestObject(_local3.bodyPerimeter)){
if (_specialVisitorFans.indexOf(Utility.getClass(_local3)) >= 0){
_meetFriend = _local3;
if (dialogBox != null){
dialogBox.parent.removeChild(dialogBox);
};
fansDialog = addConversation(("Hey!! It's " + _local3.visitorName));
_local4 = ((Math.random() * 0.5) + 0.2);
if ((_local3 is VisitorMrPeanut)){
_local4 = (_local4 * 1.8);
};
this.mood = (this.mood + _local4);
break;
};
};
};
};
_local2++;
};
};
};
};
} else {
if (transportTarget != null){
if (waitingElevator){
waitingElevator = false;
};
};
if (!(_meetFriend as VisitorSpecial)){
if ((((Math.abs((this.x - _meetFriend.x)) > 30)) || ((Math.abs((this.x - _meetFriend.x)) < 20)))){
if (!_walk){
this.walk = true;
};
} else {
if (_walk){
this.walk = false;
};
};
if (Math.abs((this.x - _meetFriend.x)) >= 20){
if (this.x < _meetFriend.x){
this.dirrection = RIGHT;
} else {
if (this.x > _meetFriend.x){
this.dirrection = LEFT;
};
};
} else {
if (this.x < _meetFriend.x){
this.dirrection = LEFT;
} else {
if (this.x > _meetFriend.x){
this.dirrection = RIGHT;
} else {
if (_meetFriend == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
};
};
};
} else {
if (_walk){
this.walk = false;
};
if (this.x < _meetFriend.x){
this.dirrection = RIGHT;
} else {
if (this.x > _meetFriend.x){
this.dirrection = LEFT;
};
};
};
if ((_meetFriend as VisitorSpecial)){
if (((!((fansDialog == null))) && (!((fansDialog == dialogBox))))){
_local5 = _specialVisitorFans.indexOf(Utility.getClass(_meetFriend));
if ((_local5 in _specialVisitorFans)){
_specialVisitorFans.splice(_local5, 1);
};
fansDialog = null;
};
if (fansDialog == null){
_meetFriend = null;
};
};
};
};
};
}
function lookingRestRoomProgress():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (!((_goHome) || (_insideBooth))){
if (restRoomTarget != null){
if (_onFloor == restRoomTarget.onFloor){
if (!((_rideElevator) || (_rideEscalator))){
if (gender){
_local2 = restRoomTarget.restroomBody.enteranceMenRoom;
} else {
_local2 = restRoomTarget.restroomBody.enteranceWomenRoom;
};
if (!theBody.hitTestObject(_local2)){
_local3 = _local1.globalToLocal(_local2.parent.localToGlobal(new Point(_local2.x, _local2.y)));
if (_local3.x < this.x){
this.dirrection = LEFT;
} else {
if (_local3.x > this.x){
this.dirrection = RIGHT;
};
};
if (!_walk){
this.walk = true;
};
reachDestination = false;
} else {
if (_walk){
this.walk = false;
};
if (!reachDestination){
beginEnterRestRoom();
reachDestination = true;
};
};
};
} else {
if (floorTarget != restRoomTarget.onFloor){
floorTarget = restRoomTarget.onFloor;
};
};
};
} else {
if (!_insideBooth){
if (restRoomTarget != null){
restRoomTarget.removeEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
};
restRoomTarget = null;
};
};
}
function beginEnterRestRoom():void{
var _local1:*;
if (gender){
_local1 = restRoomTarget.restroomBody.menDoor;
} else {
_local1 = restRoomTarget.restroomBody.womenDoor;
};
_local1.addEventListener(BoothEvent.DOOR_OPENED, EnterRestRoom);
_local1.openTheDoor();
}
function EnterRestRoom(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if (restRoomTarget != null){
if (restRoomTarget.roomFull(this.gender)){
lastFullRestRoom = restRoomTarget;
restRoomTarget = null;
reachDestination = false;
if (!_walk){
this.walk = true;
};
} else {
this.visible = false;
restRoomUsed = true;
_insideBooth = true;
restRoomTarget.entered(this);
};
};
_local2.removeEventListener(BoothEvent.DOOR_OPENED, EnterRestRoom);
_local2.closeTheDoor();
}
function ExitRestRoom(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
this.visible = true;
_local2.removeEventListener(BoothEvent.DOOR_OPENED, ExitRestRoom);
restRoomTarget.leaved(this);
_local2.closeTheDoor();
_running = false;
_insideBooth = false;
if (restRoomTarget != null){
restRoomTarget.removeEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
};
var _local3:* = _world;
if (_local3.checkUpgradeByName("Pearl Soap")){
this.mood = (this.mood + ((Math.random() * 3) + 2));
};
lastFullRestRoom = null;
restRoomTarget = null;
restRoomUsed = false;
reachDestination = false;
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
}
function checkBoothBroken():void{
if (visitTime > 5){
if (_currentDestination != null){
if (_currentDestination.boothIsBroken){
visitTime = 5;
};
};
};
}
function exitBoothCheck(_arg1:VisitorEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _arg1.booth;
if (!(((((((((_local2 is BoothSupermarket)) || ((_local2 is FacilityATM)))) || ((_local2 is BoothIceCream)))) || ((_local2 is BoothCinema)))) || ((_local2 is BoothArcade)))){
_local4 = 0;
while ((((itemBoughtNumberList.length > 0)) && ((itemBoughtPriceList.length > 0)))) {
_local4 = (_local4 + (itemBoughtNumberList.shift() * itemBoughtPriceList.shift()));
};
payTime(_local4, _local2);
};
if (_local2.boothIsBroken){
mood = (mood - ((Math.random() * 10) + 10));
};
var _local3:* = _world;
if (_local3.facilityList.indexOf(_local2) < 0){
_local5 = (((this.mood - 50) / 50) * 1.75);
_local6 = (_local5 * 0.1);
if (_local5 > 0){
if (_local3.checkUpgradeByName("Boardcast")){
if (_local5 >= 0){
_local5 = (_local5 * 1.2);
};
};
if ((_local2 is Hall)){
if (_local2.currentEvent == BoothHall.LIVE_CONCERT){
_local5 = (_local5 * 1.5);
} else {
if (_local2.currentEvent == BoothHall.ORCHESTRA){
_local5 = (_local5 * 1.8);
} else {
_local5 = (_local5 * 1.2);
};
};
if (_local5 >= 2){
};
};
};
_local3.visitorPopularity = (_local3.visitorPopularity + (_local5 + ((Math.random() * _local6) - (2 * _local6))));
};
moodDialogAppear();
}
function enterBoothCheck(_arg1:VisitorEvent):void{
}
public function payTime(_arg1:Number, _arg2:MovieClip=null):void{
var _local3:* = _world;
var _local4:* = null;
if (this.parent != null){
_local4 = _local3.globalToLocal(this.parent.localToGlobal(new Point(this.x, (this.y - this.theBody.height))));
};
_local3.addCash(_arg1, _local4);
if (_arg2 != null){
_arg2.revenue = (_arg2.revenue + _arg1);
};
_currentCash = (_currentCash - _arg1);
}
function getBoughtTotal():Number{
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < itemBoughtNumberList.length) {
_local1 = (_local1 + (itemBoughtNumberList[_local2] * itemBoughtPriceList[_local2]));
_local2++;
};
return (_local1);
}
function getBoughtItem():Number{
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < itemBoughtNumberList.length) {
_local1 = (_local1 + itemBoughtNumberList[_local2]);
_local2++;
};
return (_local1);
}
function checkExtraBrokenBooth():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (!(((_currentDestination is Hall)) || ((_currentDestination is FacilityTerrace)))){
if (_currentDestination != null){
if (visitTime > 5){
_local1 = root;
if (_local1.dayPassed > 7){
_local2 = (10 * (0.3 * _local1.numberCountryData()));
_local3 = _world;
if (_local3.checkUpgradeByName("Generator Set")){
_local2 = 5;
};
if (Calculate.chance(_local2)){
_currentDestination.boothBroken = (_currentDestination.boothBroken + (((Math.random() * 5) + 5) / (75 * _currentDestination.boothLevel)));
};
};
};
};
};
}
function visitingProgress():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:Array;
var _local13:*;
var _local14:*;
var _local15:*;
var _local1:* = _world;
if (_visiting){
if (visitTime > 0){
checkExtraBrokenBooth();
checkOnSupermarket();
checkOnIceCreamTick();
checkOnCafeTick();
checkOnAtmTick();
checkOnHallTick();
checkOnTerrace();
checkBoothBroken();
if (visitTime > 5){
if (!(((_currentDestination is FacilityTerrace)) || ((_currentDestination is FacilityTerrace)))){
if (!(((_currentDestination is FacilityATM)) || ((_currentDestination is BoothIceCream)))){
if ((((_currentDestination is BoothCinema)) || ((_currentDestination is BoothArcade)))){
mood = (mood + (((Math.random() * 3) + 2) / 5));
} else {
if ((_currentDestination is BoothCafe)){
mood = (mood + (((Math.random() * 3) + 2) / 10));
};
};
if ((((_local1.gameHour >= 10)) && ((_local1.gameHour < 22)))){
if (_currentDestination != null){
if (!(((_currentDestination is BoothCinema)) || ((_currentDestination is BoothArcade)))){
_local2 = Math.floor(((((1.2 * _mood) + (0.8 * BoothList.getBoughtChance(Utility.getClass(_currentDestination)))) / 2) * 0.8));
if ((((_currentDestination is BoothBurger)) || ((_currentDestination is BoothSteak)))){
if (_local1.checkUpgradeByName("Wagyu Red Meat")){
_local2 = (_local2 * (_local2 * 1.2));
};
};
if ((_currentDestination is BoothBoutique)){
if (_local1.checkUpgradeByName("Cool Mannequin")){
_local2 = (_local2 * (_local2 * 1.2));
};
};
if ((((((_currentDestination is BoothCafe)) || ((_currentDestination is BoothCake)))) || ((_currentDestination is BoothCandy)))){
if (_local1.checkUpgradeByName("Royal Sugar")){
_local2 = (_local2 * (_local2 * 1.2));
};
};
if ((_currentDestination is BoothGadget)){
if (_local1.haveSpecialVisitorOf(VisitorSteveWork)){
_local2 = (_local2 * (_local2 * 1.5));
};
};
_local3 = (1 + (_local1.popularity / 150));
if ((this as VisitorSpecial)){
_local3 = (_local3 * 1.5);
};
_local2 = getRealBoughtChance(_currentDestination, Math.min(95, (_local2 * _local3)));
if (Calculate.chance(Math.max(_local2, 5))){
_local4 = (Math.floor(((Math.random() * 4) * _local3)) + 1);
_local5 = getPriceOf(_currentDestination);
_local6 = _local4;
while (((((_currentCash - getBoughtTotal()) < (_local4 * _local5))) && ((_local4 > 0)))) {
_local4--;
searchATMChance = (searchATMChance + ((1 / _local6) * 100));
};
if (_local4 == 0){
searchATMChance = 100;
visitTime = 5;
} else {
visitTime = (visitTime + (Math.floor((Math.random() * 2)) + 1));
mood = (mood + (((Math.random() * 3) + 2) / 5));
itemBoughtNumberList.push(_local4);
itemBoughtPriceList.push(_local5);
};
};
} else {
if (visitTime < 25){
_local7 = BoothList.getBoughtChance(Utility.getClass(_currentDestination));
_local8 = BoothList.getItemTreshold(Utility.getClass(_currentDestination));
if (Calculate.chance((_local7 * (_local8 / (_local8 + visitTreshold))))){
if ((_currentDestination is BoothArcade)){
_local4 = 1;
_local5 = getPriceOf(_currentDestination);
if ((_currentCash - getBoughtTotal()) < (_local4 * _local5)){
searchATMChance = 100;
visitTime = 5;
} else {
payTime((_local4 * _local5), _currentDestination);
visitTime = (visitTime + (Math.floor((Math.random() * 1.5)) + 0.5));
visitTime = Math.min(24, visitTime);
};
} else {
visitTime = (visitTime + (Math.floor((Math.random() * 2)) + 1));
visitTime = Math.min(24, visitTime);
};
visitTreshold++;
};
} else {
if (visitTime == 25){
if ((_currentDestination is BoothCinema)){
if ((_currentCash - getPriceOf(_currentDestination)) < 0){
searchATMChance = 100;
visitTime = 5;
} else {
payTime(getPriceOf(_currentDestination), _currentDestination);
};
};
} else {
if (visitTime == 28){
if ((_currentDestination is BoothCinema)){
if ((((this is VisitorSteveWork)) || (((_local1.haveSpecialVisitorOf(VisitorSteveWork)) && (Calculate.chance(30)))))){
if ((_currentCash - getPriceOf(_currentDestination)) >= getPriceOf(_currentDestination)){
payTime(getPriceOf(_currentDestination), _currentDestination);
};
};
};
};
};
};
};
};
};
};
};
};
visitTime--;
} else {
if ((((_currentDestination is Hall)) || (!((_currentDestination.body == null))))){
if ((_currentDestination is Hall)){
exitBooth(_currentDestination);
} else {
_local9 = new Point();
if ((_currentDestination is BoothSupermarket)){
_local10 = 0;
while (_local10 < _currentDestination.queue.length) {
_local11 = _currentDestination.queue[_local10].indexOf(this);
if ((_local11 in _currentDestination.queue[_local10])){
_currentDestination.queue[_local10].splice(_local11, 1);
break;
};
_local10++;
};
supermarketCashier = false;
exitBooth(_currentDestination);
} else {
if ((((((((_currentDestination is BoothIceCream)) || ((_currentDestination is BoothCafe)))) || ((_currentDestination is FacilityATM)))) || ((_currentDestination is FacilityTerrace)))){
exitBooth(_currentDestination);
} else {
_local12 = new Array();
_local10 = 0;
while (_currentDestination.body.getChildByName(("exit" + _local10))) {
_local13 = _currentDestination.body.getChildByName(("exit" + _local10));
_local12.push(_local13);
_local10++;
};
if (_local12.length > 0){
_local14 = Math.floor((Math.random() * _local12.length));
_local9 = _local1.globalToLocal(_local12[_local14].parent.localToGlobal(new Point(_local12[_local14].x, _local12[_local14].y)));
_local15 = _currentDestination.body.getChildByName(("exitDoor" + _local14));
if (_local15 != null){
_local15.addEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
_local15.openTheDoor();
};
} else {
_local9 = _local1.globalToLocal(_currentDestination.body.localToGlobal(new Point(_currentDestination.body.enterance.x, _currentDestination.body.enterance.y)));
_currentDestination.addEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
_currentDestination.openTheDoor();
};
this.x = _local9.x;
this.y = _local9.y;
};
};
};
_visiting = false;
};
};
};
}
function getRealBoughtChance(_arg1:MovieClip, _arg2:Number):Number{
var _local3:* = BoothList.getItemTreshold(Utility.getClass(_arg1));
var _local4:* = getBoughtItem();
if ((this is VisitorMeleeCyrus)){
_local4 = (_local4 + 5);
};
if ((this is VisitorKezya)){
_local4 = (_local4 + 2);
};
var _local5:* = (_local3 / (_local4 + _local3));
var _local6:* = (_arg2 * _local5);
return (_local6);
}
function getPriceOf(_arg1:MovieClip):Number{
var _local2:* = BoothList.getAverageItemPriceByType(Utility.getClass(_arg1), (_arg1.boothLevel - 1));
if (!(_arg1 is BoothCinema)){
_local2 = (_local2 + Math.round((((Math.random() * _local2) / 10) - (_local2 / 20))));
};
var _local3:* = _world;
var _local4:* = (1 + (_local3.popularity / 150));
_local2 = Math.round((_local2 * _local4));
return (_local2);
}
function checkOnTerrace():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local1:* = _world;
if ((_currentDestination is FacilityTerrace)){
_local2 = _currentDestination.visitorSit.indexOf(this);
if (_meetFriend == null){
if (visitTime > 5){
this.mood = (this.mood + 0.1);
if (Calculate.chance((((100 - _mood) / 100) * 80))){
this.mood = (this.mood + ((Math.random() * 0.5) + 1));
visitTime = (visitTime + 3);
};
if (_mood >= 60){
if (Calculate.chance(((((_mood - 60) / 40) * 80) + 20))){
visitTime = 5;
};
};
if ((((_local1.gameHour >= 21)) || ((_local1.gameHour < 9)))){
visitTime = 0;
} else {
if (!_currentDestination.hasConversation){
if (Calculate.chance(60)){
if ((this as VisitorNormal)){
_local3 = new Array();
_local4 = 0;
_local5 = _currentDestination.visitorSit.length;
if (_local2 < 4){
_local5 = 4;
} else {
_local4 = 4;
};
_local6 = _local4;
while (_local6 < _local5) {
_local7 = _currentDestination.visitorSit[_local6];
if (((((((((((!((_local7 == null))) && (!((_local7 == this))))) && ((_local7 as VisitorNormal)))) && ((_local7.meetFriend == null)))) && ((terraceConv.indexOf(_local7) < 0)))) && (_local7.canConverence()))){
_local3.push(_currentDestination.visitorSit[_local6]);
};
_local6++;
};
if (_local3.length > 0){
_local8 = Math.floor((Math.random() * _local3.length));
if (_local3[_local8].visiting){
_meetFriend = _local3[_local8];
_local3[_local8].meetFriend = this;
_local1.addConversation(this, _local3[_local8], "Terrace", _currentDestination);
_local3[_local8].addTerraceConv(this);
terraceConv.push(_local3[_local8]);
};
};
};
};
};
};
};
} else {
visitTime++;
};
};
}
public function canConverence():Boolean{
return ((visitTime > 5));
}
public function addTerraceConv(_arg1:MovieClip):void{
if (terraceConv.indexOf(_arg1) < 0){
terraceConv.push(_arg1);
};
}
function checkOnSupermarket():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local1:* = _world;
if (visitTime <= 5){
if ((_currentDestination is BoothSupermarket)){
if (!supermarketCashier){
_local2 = _currentDestination.queue[0];
_local3 = 1;
while (_local3 < _currentDestination.queue.length) {
if (_local2.length > _currentDestination.queue[_local3].length){
_local2 = _currentDestination.queue[_local3];
} else {
if (_local2.length == _currentDestination.queue[_local3].length){
if (Calculate.chance(50)){
_local2 = _currentDestination.queue[_local3];
};
};
};
_local3++;
};
this.dirrection = RIGHT;
_local2.push(this);
_local4 = _currentDestination.queue.indexOf(_local2);
supermarketCashier = true;
_local5 = _currentDestination.body.getChildByName(("exit" + _local4));
this.x = _local5.x;
this.y = _local5.y;
supermarketQueue = _local2;
boughtPriceTotal = 0;
} else {
_local6 = supermarketQueue.indexOf(this);
if (_local6 == 0){
this.visible = true;
if (itemBoughtNumberList.length > 0){
if (visitTime < (5 - (3 - _currentDestination.boothLevel))){
_local7 = (itemBoughtNumberList.shift() * itemBoughtPriceList.shift());
boughtPriceTotal = (boughtPriceTotal + _local7);
visitTime = 5;
};
} else {
if (visitTime == 1){
payTime(boughtPriceTotal, _currentDestination);
};
};
} else {
mood = (mood - (((Math.random() * 2) + 1) / 30));
visitTime = 5;
};
};
};
};
}
function checkOnIceCream():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
if (visiting){
_local1 = _world;
if (visitTime > 0){
if ((_currentDestination is BoothIceCream)){
this.dirrection = RIGHT;
_local2 = _currentDestination.visitorList.indexOf(this);
if (_local2 == 0){
visitTime = 5;
if (!_currentDestination.hasEventListener(BoothEvent.ICE_CREAM_SERVE)){
_local3 = (Math.floor((Math.random() * 10)) + 1);
_local4 = getPriceOf(_currentDestination);
if (_local1.checkUpgradeByName("Royal Sugar")){
_local3 = (_local3 + Math.round((Math.random() * 5)));
};
while ((((_local3 > 0)) && ((_currentCash < (_local3 * _local4))))) {
_local3--;
};
_currentDestination.serveTime = (_local3 * 5);
itemBoughtNumberList.push(_local3);
itemBoughtPriceList.push(_local4);
_currentDestination.addEventListener(BoothEvent.ICE_CREAM_SERVE, hasServe);
};
};
if (_currentDestination.body != null){
_local5 = _currentDestination.body.enterance;
if (_local5 != null){
_local6 = _local1.globalToLocal(_local5.parent.localToGlobal(new Point(_local5.x, _local5.y)));
_local7 = (_local6.x - (_local2 * 24));
if (((!((_onFloor == null))) && ((_local7 < ((_onFloor.x - (_onFloor.width / 2)) + 5))))){
_local7 = ((_onFloor.x - (_onFloor.width / 2)) + 5);
};
if (this.x < _local7){
if (this.currentLabel != "Walk"){
this.gotoAndStop("Walk");
};
this.x++;
} else {
if (this.currentLabel != "Standby"){
this.gotoAndStop("Standby");
};
this.x = _local7;
};
};
};
};
};
};
}
function checkOnIceCreamTick():void{
var _local1:*;
if ((_currentDestination is BoothIceCream)){
_local1 = _currentDestination.visitorList.indexOf(this);
if (_local1 == 0){
mood = (mood + (((Math.random() * 3) + 2) / 15));
} else {
mood = (mood - (((Math.random() * 2) + 3) / 20));
};
};
}
function checkOnCafeTick():void{
if (visitTime > 0){
if ((_currentDestination is BoothCafe)){
if (Calculate.chance(40)){
if (Calculate.chance(50)){
if (this.currentLabel != "Standby"){
this.gotoAndStop("Standby");
};
} else {
if (this.currentLabel != "Walk"){
this.gotoAndStop("Walk");
};
if (Calculate.chance(30)){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
};
};
};
};
};
}
function checkOnCafe():void{
var _local1:*;
var _local2:*;
if (visiting){
_local1 = _world;
if (visitTime > 0){
if ((_currentDestination is BoothCafe)){
if (_currentDestination.body){
_local2 = _currentDestination.body.enterance;
if (_local2 != null){
if (this.x <= (_local2.x - (_local2.width / 2))){
this.dirrection = RIGHT;
} else {
if (this.x >= (_local2.x + (_local2.width / 2))){
this.dirrection = LEFT;
};
};
};
};
if (this.currentLabel == "Walk"){
this.x = (this.x + this.scaleX);
};
};
};
};
}
function checkOnAtm():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (_visiting){
_local1 = _world;
if (visitTime > 0){
if ((_currentDestination is FacilityATM)){
if (_currentDestination.body != null){
if (_currentDestination.queue.indexOf(this) < 0){
if (_currentDestination.body != null){
_local2 = _currentDestination.body.enterance;
if (_local2 != null){
if (this.x <= (_local2.x - (_local2.width / 2))){
this.dirrection = RIGHT;
} else {
if (this.x >= (_local2.x + (_local2.width / 2))){
this.dirrection = LEFT;
};
};
};
};
} else {
_local3 = _currentDestination.queue.indexOf(this);
if (_currentDestination.body != null){
_local4 = _currentDestination.body.getChildByName(("queue" + (_local3 + 1)));
if (_local4 != null){
if (!_local4.hitTestObject(this.theBody)){
if (this.x < _local4.x){
this.dirrection = RIGHT;
} else {
if (this.x > _local4.x){
this.dirrection = LEFT;
};
};
if (this.currentLabel != "Walk"){
this.gotoAndStop("Walk");
};
} else {
if (!takeMoney){
takeMoney = true;
takeMoneySymbol = new legenddialoguebox();
takeMoneySymbol.iconClip = new legendtakemoney();
takeMoneySymbol.relation = this;
_local1.addDialogBox(takeMoneySymbol);
};
if (this.currentLabel != "Standby"){
this.gotoAndStop("Standby");
};
};
};
};
};
};
if (this.currentLabel == "Walk"){
this.x = (this.x + this.scaleX);
};
};
};
};
}
function checkOnAtmTick():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
if (_visiting){
_local1 = _world;
if (visitTime > 0){
if ((_currentDestination is FacilityATM)){
if (_currentDestination.queue.indexOf(this) < 0){
if (Calculate.chance(40)){
if (Calculate.chance(50)){
if (this.currentLabel != "Standby"){
this.gotoAndStop("Standby");
};
} else {
if (this.currentLabel != "Walk"){
this.gotoAndStop("Walk");
};
if (Calculate.chance(30)){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
};
};
};
_local2 = _currentDestination.queue;
_local3 = _currentDestination.visitorList.indexOf(this);
if ((((_local3 == 0)) || ((_local3 == 1)))){
if ((((_local2[0] == null)) && ((_local2[1] == null)))){
_local4 = Math.floor((Math.random() * _local2.length));
_local2[_local4] = this;
} else {
if (_local2[0] == null){
_local2[0] = this;
};
if (_local2[1] == null){
_local2[1] = this;
};
};
} else {
mood = (mood - (((Math.random() * 2) + 3) / 20));
};
} else {
if (visitTime < 5){
visitTime = 5;
};
if (takeMoney){
if (!takeMoneyProgress){
cashTarget = (Math.floor(((((Math.random() * 30) + 50) * (_initialCash / 100)) / 10)) * 10);
takeMoneyDelay = Math.round(((5 + Math.floor((cashTarget / 50))) / _currentDestination.boothLevel));
takeMoneyProgress = true;
} else {
if (takeMoneyDelay > 0){
takeMoneyDelay--;
} else {
if (takeMoneySymbol != null){
takeMoneySymbol.parent.removeChild(takeMoneySymbol);
takeMoneySymbol = null;
};
_currentCash = (_currentCash + cashTarget);
searchATMChance = 0;
_visiting = false;
exitBooth(_currentDestination);
};
};
};
};
};
};
};
}
function checkOnHall():void{
var _local1:*;
var _local2:*;
if (visiting){
_local1 = _world;
if (visitTime > 0){
if ((_currentDestination is Hall)){
_local2 = _currentDestination.hallBody.enterance;
if (this.x <= (_local2.x - (_local2.width / 2))){
if ((((_currentDestination.currentEvent == BoothHall.LIVE_CONCERT)) && (dance))){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
} else {
if (this.x >= (_local2.x + (_local2.width / 2))){
if ((((_currentDestination.currentEvent == BoothHall.LIVE_CONCERT)) && (dance))){
this.dirrection = RIGHT;
} else {
this.dirrection = LEFT;
};
};
};
if (this.currentLabel == "Walk"){
if (!(((_currentDestination.currentEvent == BoothHall.LIVE_CONCERT)) && (dance))){
this.x = (this.x + (this.scaleX * _speed));
} else {
this.x = (this.x - this.scaleX);
};
};
};
};
};
}
function checkOnHallTick():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
if (visitTime > 0){
if ((_currentDestination is Hall)){
if (_currentDestination.boothOpen){
if (Calculate.chance(40)){
if (Calculate.chance(50)){
if (this.currentLabel != "Standby"){
this.gotoAndStop("Standby");
};
if (!(this as VisitorSpecial)){
if (_currentDestination.currentEvent == BoothHall.LIVE_CONCERT){
if (_statification >= 3){
if (Calculate.chance(40)){
dance = true;
if (_dialogBox == null){
addLegend(legendmoodhappy);
};
} else {
dance = false;
};
};
} else {
dance = false;
};
};
} else {
if (this.currentLabel != "Walk"){
this.gotoAndStop("Walk");
};
if (Calculate.chance(30)){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
};
if (!(this as VisitorSpecial)){
if (_currentDestination.currentEvent == BoothHall.LIVE_CONCERT){
if (Calculate.chance(10)){
dance = true;
} else {
dance = false;
};
} else {
dance = false;
};
};
};
};
if (_currentDestination.currentEvent == BoothHall.LIVE_CONCERT){
if (this.currentLabel == "Standby"){
if (dance){
if (_dirrection == RIGHT){
this.dirrection = LEFT;
} else {
this.dirrection = RIGHT;
};
};
};
};
if (visitTime <= 5){
if (_currentDestination.currentEvent == BoothHall.CAR_SHOW){
if (itemBoughtNumberList.length == 0){
_local1 = 1;
_local2 = _currentDestination.getItemPrice();
_local3 = 0;
_local4 = (_currentCash - getBoughtTotal());
_local5 = (_local1 * _local2);
if (_local4 >= _local5){
if (_local4 >= (_local5 * 2)){
_local3 = 70;
} else {
_local3 = (((_local5 - _local4) / _local4) * 70);
};
if (Calculate.chance(((_mood / 100) * _local3))){
itemBoughtNumberList.push(_local1);
itemBoughtPriceList.push(_local2);
};
};
};
};
} else {
if (_currentDestination.currentEvent == BoothHall.ELEC_EXPO){
_local1 = 1;
_local2 = _currentDestination.getItemPrice();
_local7 = 0;
_local4 = (_currentCash - getBoughtTotal());
_local5 = (_local1 * _local2);
if (_local4 >= _local5){
if (_local4 >= (_local5 * 2)){
_local7 = 80;
} else {
_local7 = (((_local5 - _local4) / _local4) * 80);
};
_local8 = ((_local7 * (_mood / 100)) * (3 / (getBoughtItem() + 3)));
if (Calculate.chance(_local8)){
itemBoughtNumberList.push(_local1);
itemBoughtPriceList.push(_local2);
};
};
};
_local6 = (2 / (2 + visitTreshold));
if (_currentDestination.currentEvent == BoothHall.LIVE_CONCERT){
if (Calculate.chance((60 * _local6))){
visitTreshold = (visitTreshold + 2);
visitTime = (visitTime - (Math.floor((Math.random() * 2)) + 1));
if (visitTime < 5){
visitTime = 5;
};
this.mood = (this.mood + (((Math.random() * 2.5) + 1) * (1.5 + (_currentDestination.boothLevel / 2))));
};
} else {
if (_currentDestination.currentEvent == BoothHall.ORCHESTRA){
if (Calculate.chance((75 * _local6))){
visitTreshold = (visitTreshold + 5);
visitTime = (visitTime - (Math.floor((Math.random() * 3)) + 1));
if (visitTime < 5){
visitTime = 5;
};
this.mood = (this.mood + (((Math.random() * 3.5) + 1) * (2.5 + (_currentDestination.boothLevel / 2))));
};
} else {
if (Calculate.chance((50 * _local6))){
visitTreshold++;
if (_currentDestination.currentEvent == BoothHall.ELEC_EXPO){
visitTime = (visitTime + (Math.floor((Math.random() * 2)) + 1));
} else {
visitTime = (visitTime + (Math.floor((Math.random() * 1)) + 0.5));
};
this.mood = (this.mood + ((Math.random() * 1.2) + 0.5));
};
};
};
};
} else {
visitTime = 0;
};
};
};
}
function hasServe(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
_visiting = false;
visitTime = 5;
var _local3:* = 0;
while ((((itemBoughtNumberList.length > 0)) && ((itemBoughtPriceList.length > 0)))) {
_local3 = (_local3 + (itemBoughtNumberList.shift() * itemBoughtPriceList.shift()));
};
exitBooth(_currentDestination);
payTime(_local3, _local2);
_local2.removeEventListener(BoothEvent.ICE_CREAM_SERVE, hasServe);
}
function checkTrash():void{
var _local2:*;
var _local3:*;
var _local1:* = _world;
if (_dialogBox == null){
_local2 = 0;
while (_local2 < _local1.trashList.length) {
_local3 = _local1.trashList[_local2];
if (this.theBody.hitTestObject(_local3.trashHitBody)){
if (Calculate.chance(((_local3.trashLevel <= 10)) ? 0 : _local3.trashLevel)){
mood = (mood - (_local3.trashLevel / 10));
if ((((((this as VisitorNormal)) && ((_local1.getConversationNumberOnScreen() < 5)))) && (Calculate.chance(((_local3.trashLevel <= 20)) ? 0 : ((_local3.trashLevel - 20) / 4))))){
addConversation("eeeeew!!!");
} else {
addLegend(legenditsdirty);
};
break;
};
};
_local2++;
};
};
}
function checkElectricityProblem():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (_dialogBox == null){
_local2 = _local1.boothList.concat(_local1.atmList);
_local3 = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
if (_local4.boothOpen){
if (_local4.boothIsBroken){
if (this.theBody.hitTestObject(_local4.colArea)){
if (Calculate.chance(75)){
mood = (mood - (((Math.random() * 2) + 3) / 3));
addLegend(legendelectricityproblem);
break;
};
};
};
};
_local3++;
};
};
}
function checkIdle():void{
var _local1:*;
var _local2:*;
var _local3:*;
if (_dialogBox == null){
_local1 = _world;
_local2 = _local1.main;
if (_local1.checkUpgradeByName("Da Vinci's Art")){
mood = (mood + ((Math.random() * 0.5) + 0.5));
};
if (!_goHome){
if ((((_currentDestination == null)) && ((restRoomTarget == null)))){
if (_destinationTargetList.length > 0){
if (Calculate.chance(10)){
mood = (mood - (((Math.random() * 2) + 1) / 9));
if (BoothList.GENERAL_STORE_LIST.indexOf(destinationTargetList[0]) >= 0){
addLegend(legendneedmoreshop);
} else {
if (BoothList.FOOD_CENTER_LIST.indexOf(destinationTargetList[0]) >= 0){
addLegend(legendhungry);
} else {
if (BoothList.ENTERTAINMENT_LIST.indexOf(destinationTargetList[0]) >= 0){
addLegend(legendneedentertainment);
};
};
};
};
} else {
mood = (mood + (Math.random() * 0.2));
};
} else {
_local3 = ((restRoomTarget)!=null) ? restRoomTarget.onFloor : ((_currentDestination)!=null) ? _currentDestination.onFloor : null;
if (((!((_local3 == onFloor))) && ((transportTarget == null)))){
if (transportProblem >= 5){
if (Calculate.chance(10)){
mood = (mood - (((Math.random() * 2) + 2) / 8));
transportProblem++;
if (Calculate.chance((transportProblem * 0.5))){
_local1.visitorPopularity = (_local1.visitorPopularity - ((Math.random() * 2) + 1));
};
if (((((this.theBody.hitTestObject(_local2.screenArea)) && ((_local1.getConversationNumberOnScreen() < 5)))) && (Calculate.chance((transportProblem * 0.5))))){
addConversation(ConversationList.getSingleConversation(this, ConversationList.TRANSPORT_PROBLEM));
} else {
addLegend(legendneedmoreelevator);
};
};
};
} else {
transportProblem--;
};
};
} else {
if (((!((onFloor == null))) && ((transportTarget == null)))){
if (transportProblem >= 5){
if (Calculate.chance(10)){
mood = (mood - (((Math.random() * 2) + 2) / 8));
transportProblem++;
if (Calculate.chance((transportProblem * 0.5))){
_local1.visitorPopularity = (_local1.visitorPopularity - ((Math.random() * 2) + 1));
};
if (((((this.theBody.hitTestObject(_local2.screenArea)) && ((_local1.getConversationNumberOnScreen() < 5)))) && (Calculate.chance((transportProblem * 0.5))))){
addConversation(ConversationList.getSingleConversation(this, ConversationList.CANT_GO_HOME));
} else {
addLegend(legendneedmoreelevator);
};
};
};
} else {
transportProblem--;
};
};
};
}
function moodManipulation():void{
if (this.insideMall()){
if (!((((_insideBooth) || (_rideElevator))) || (_rideEscalator))){
if (_meetFriend == null){
checkEntertainer();
if (entertainerOnView == null){
checkTrash();
checkElectricityProblem();
checkIdle();
};
} else {
if (entertainerOnView != null){
entertainerOnView = null;
};
};
} else {
if (entertainerOnView != null){
entertainerOnView = null;
};
};
};
}
function checkEntertainer():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local1:* = _world;
if (((!(_goHome)) && ((restRoomTarget == null)))){
if (entertainerOnView == null){
if (this.restRoomPercentage < 70){
_local2 = 0;
while (_local2 < _local1.entertainerList.length) {
_local3 = _local1.entertainerList[_local2];
if (_local3.funArea.hitTestObject(this.theBody)){
if (_local3.dancing){
_local4 = ((((100 - _mood) / 100) * 75) + 5);
if (Calculate.chance(_local4)){
entertainerOnView = _local3;
this.walk = false;
};
};
};
_local2++;
};
};
} else {
if (((((entertainerOnView.dancing) && (!(entertainerOnView.goHome)))) && (!(((((_rideElevator) || (_rideEscalator))) || (_insideBooth)))))){
this.dirrection = ((entertainerOnView.x)<this.x) ? LEFT : RIGHT;
this.mood = (this.mood + (0.5 + (entertainerOnView.employeeLevel * 0.5)));
} else {
entertainerOnView = null;
};
};
};
}
function addLegend(_arg1:Class):void{
var _local2:* = _world;
var _local3:* = new legenddialoguebox();
_local3.iconClip = new (_arg1);
_local3.relation = this;
_local3.delay = 7;
_local2.addDialogBox(_local3);
}
function addConversation(_arg1:String):Object{
var _local2:* = _world;
var _local3:* = new LegendDialogTextBox();
_local3.animate = true;
_local3.text = _arg1;
_local3.relation = this;
_local3.delay = 7;
_local2.addDialogBox(_local3);
return (_local3);
}
function EnterTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.boothOpen){
if (_local2.boothIsBroken){
lastBrokenBoothReport = _local2;
searchDestination();
if (!_walk){
this.walk = true;
};
} else {
if (_local2.maxCapacity()){
lastFullBoothReport = _local2;
searchDestination();
if (!_walk){
this.walk = true;
};
} else {
if (((!((_local2 is Hall))) || ((((_local2 is Hall)) && ((_currentCash >= _local2.getTicketPrice())))))){
enterBooth(_local2);
} else {
searchATMChance = 99;
searchDestination();
};
};
};
} else {
searchDestination();
};
_local2.removeEventListener(BoothEvent.DOOR_OPENED, EnterTheBooth);
_local2.closeTheDoor();
}
function enterBooth(_arg1:MovieClip):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
if (!(((((((((_arg1 is BoothIceCream)) || ((_arg1 is BoothCafe)))) || ((_arg1 is FacilityATM)))) || ((_arg1 is Hall)))) || ((_arg1 is FacilityTerrace)))){
this.visible = false;
};
_visiting = true;
visitTreshold = 0;
visitTime = 30;
if ((((((((_arg1 is BoothCafe)) || ((_arg1 is FacilityATM)))) || ((_arg1 is Hall)))) || ((_arg1 is BoothSupermarket)))){
_local3 = _arg1.extraContainer.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local3.x;
this.y = _local3.y;
_arg1.extraContainer.addChild(this);
};
if ((_arg1 is Hall)){
payTime(_arg1.getTicketPrice(), _arg1);
};
if ((_arg1 is FacilityTerrace)){
_local4 = new Array();
_local5 = 0;
while (_local5 < _arg1.visitorSit.length) {
if (_arg1.visitorSit[_local5] == null){
_local4.push(_arg1.chairList[_local5]);
};
_local5++;
};
if (_local4.length > 0){
_local6 = Math.floor((Math.random() * _local4.length));
_arg1.visitorSit[_arg1.chairList.indexOf(_local4[_local6])] = this;
this.walk = false;
this.scaleX = 1;
this.x = 0;
this.y = 0;
_local4[_local6].addChild(this);
this.gotoAndStop("Sit");
};
};
_currentDestination = _arg1;
var _local2:* = _currentDestination.visitorList.indexOf(this);
if (_local2 < 0){
_currentDestination.visitorList.push(this);
};
_insideBooth = true;
_arg1.visitorVisit++;
dispatchEvent(new VisitorEvent(VisitorEvent.ENTER_BOOTH, _arg1));
}
public function exitBooth(_arg1:MovieClip):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _world;
this.visible = true;
if (_destinationTargetList.length > 0){
_destinationTargetList.shift();
};
var _local3:* = _arg1.visitorList.indexOf(this);
if (_local3 >= 0){
_arg1.visitorList.splice(_local3, 1);
};
if ((((((((((((_arg1 is BoothCafe)) || ((_arg1 is FacilityATM)))) || ((_arg1 is Hall)))) || ((_arg1 is BoothSupermarket)))) || ((_arg1 is FacilityTerrace)))) || ((_arg1 is FacilitySubway)))){
_local4 = _local2.globalToLocal(this.parent.localToGlobal(new Point(this.x, this.y)));
this.x = _local4.x;
this.y = _local4.y;
_local5 = _local2.basementList.indexOf(_onFloor);
if (_local5 >= 0){
_local2.containerBVisitor[_local5].addChild(this);
} else {
_local2.containerVisitor[(_local2.floorList.indexOf(_onFloor) + 1)].addChild(this);
};
};
if ((_arg1 is FacilityTerrace)){
_arg1.visitorSit[_arg1.visitorSit.indexOf(this)] = null;
};
if ((_arg1 is FacilityATM)){
_local6 = _arg1.queue.indexOf(this);
if ((_local6 in _arg1.queue)){
_arg1.queue[_local6] = null;
};
};
takeMoney = false;
takeMoneyProgress = false;
if ((_arg1 is Hall)){
justVisit = true;
visitedHall = true;
};
_insideBooth = false;
visitorComment = "";
searchDestination();
if (visitorComment == ""){
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
};
this.walk = true;
dispatchEvent(new VisitorEvent(VisitorEvent.EXIT_BOOTH, _arg1));
}
function ExitTheBooth(_arg1:BoothEvent):void{
var _local2:* = _arg1.currentTarget;
exitBooth(_currentDestination);
_local2.removeEventListener(BoothEvent.DOOR_OPENED, ExitTheBooth);
var _local3:* = _arg1.target;
if (!(_local3 is Booth)){
_local3.closeTheDoor();
};
}
function CheckRestroomDestination(_arg1:VisitorEvent):void{
var _local2:*;
if (!((_goHome) || (_insideBooth))){
if (_restRoomPercentage > 70){
if (restRoomTarget != null){
restRoomTarget.removeEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
};
_local2 = restRoomTarget;
restRoomTarget = searchRestRoom();
if (restRoomTarget == null){
if (_currentDestination != null){
_currentDestination.removeEventListener(BoothEvent.DESTROYED, destinationIsDestroyed);
};
_currentDestination = null;
goHome = true;
if (_local2 != null){
visitorComment = ConversationList.getSingleConversation(this, ConversationList.getNotFoundRestroomArray(this));
};
floorTarget = null;
} else {
restRoomTarget.addEventListener(BoothEvent.DESTROYED, restRoomTargetIsDestroyed);
floorTarget = restRoomTarget.onFloor;
if (restRoomTarget.onFloor == _onFloor){
waitingElevator = false;
transportTarget = null;
};
};
};
};
if (!_walk){
this.walk = true;
};
}
public function get visiting():Boolean{
return (_visiting);
}
public function set gender(_arg1:Boolean):void{
_gender = _arg1;
}
public function get gender():Boolean{
return (_gender);
}
public function get bodyPerimeter():MovieClip{
return (_bodyPerimeter);
}
public function set friendList(_arg1:Array):void{
_friendList = _arg1;
}
public function get friendList():Array{
return (_friendList);
}
public function set meetFriend(_arg1:MovieClip):void{
_meetFriend = _arg1;
}
public function get meetFriend():MovieClip{
return (_meetFriend);
}
public function needToGo():Boolean{
return ((_restRoomPercentage >= 85));
}
public function set currentCash(_arg1:Number):void{
_currentCash = _arg1;
}
public function get currentCash():Number{
return (_currentCash);
}
public function set restRoomPercentage(_arg1:Number):void{
_restRoomPercentage = _arg1;
}
public function get restRoomPercentage():Number{
return (_restRoomPercentage);
}
public function set initialCash(_arg1:Number):void{
_initialCash = _arg1;
}
public function get initialCash():Number{
return (_initialCash);
}
public function set destinationTargetList(_arg1:Array):void{
_destinationTargetList = _arg1;
}
public function get destinationTargetList():Array{
return (_destinationTargetList);
}
public function set favoriteList(_arg1:Array):void{
_favoriteList = _arg1;
}
public function get favoriteList():Array{
return (_favoriteList);
}
public function set statification(_arg1:int):void{
_statification = _arg1;
}
public function get statification():int{
return (_statification);
}
public function set restRoomTarget(_arg1:MovieClip):void{
_restRoomTarget = _arg1;
}
public function get restRoomTarget():MovieClip{
return (_restRoomTarget);
}
public function set transportProblem(_arg1:Number):void{
_transportProblem = Math.max(0, Math.min(100, _arg1));
}
public function get transportProblem():Number{
return (_transportProblem);
}
override public function set mood(_arg1:Number):void{
var _local2:* = _world;
var _local3:* = (_arg1 - _mood);
if (_local3 > 0){
if (_local2.checkUpgradeByName("Basement Lv 3")){
_local3 = (_local3 + (_local3 * 0.5));
};
} else {
if (_local3 < 0){
if (_local2.checkUpgradeByName("Amazing LCD TV")){
_local3 = (_local3 + (_local3 * 0.5));
};
};
};
_arg1 = (_mood + _local3);
super.mood = _arg1;
}
public function set mayHaveCar(_arg1:Boolean):void{
_mayHaveCar = _arg1;
}
public function get mayHaveCar():Boolean{
return (_mayHaveCar);
}
public function set visitorComment(_arg1:String):void{
var _local2:*;
var _local3:*;
var _local4:*;
_visitorComment = _arg1;
if (((!((_visitorComment == ""))) && (!(_rideCar)))){
_local2 = _world;
_local3 = _local2.main;
if (_meetFriend == null){
if (this.theBody.hitTestObject(_local3.screenArea)){
_local4 = _visitorComment.replace(/&sp/g, "\n");
if ((this as VisitorSpecial)){
if (((((this.goHome) || (Calculate.chance(30)))) && ((((dialogBox == null)) || (!((dialogBox as DialogTextBox))))))){
addConversation(_local4);
};
} else {
if ((((((_local2.getConversationNumberOnScreen() < 5)) && (Calculate.chance(10)))) && ((dialogBox == null)))){
addConversation(_local4);
};
};
};
};
};
}
public function get visitorComment():String{
return (_visitorComment);
}
public function set visitorName(_arg1:String):void{
_visitorName = _arg1;
}
public function get visitorName():String{
return (_visitorName);
}
public function set specialVisitorFans(_arg1:Array):void{
_specialVisitorFans = _arg1;
}
public function get specialVisitorFans():Array{
return (_specialVisitorFans);
}
}
}//package Instance
Section 115
//VisitorNormal (Instance.VisitorNormal)
package Instance {
import flash.display.*;
public class VisitorNormal extends Visitor {
public var body:MovieClip;
public var hitBody:MovieClip;
}
}//package Instance
Section 116
//VisitorSpecial (Instance.VisitorSpecial)
package Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.text.*;
public class VisitorSpecial extends Visitor {
public var body:MovieClip;
public var hitBody:MovieClip;
public function VisitorSpecial(){
_currentCash = (Math.floor(((Math.random() * 80) + 20)) * 50);
if ((this is VisitorMeleeCyrus)){
_currentCash = Math.round((_currentCash * 1.5));
};
if ((this is VisitorKezya)){
_currentCash = Math.round((_currentCash * 1.2));
};
}
override function Initialize(_arg1:Event):void{
var _local3:*;
var _local4:*;
removeEventListener(Event.ADDED_TO_STAGE, Initialize);
var _local2:* = _world;
setFavoriteList();
initDestinationList();
searchDestination();
_local2.addEventListener(ShopGameEvent.UPDATE, tick);
addFriend();
lastMood = _mood;
_statification = ((_mood)>=80) ? 3 : ((_mood)>=50) ? 2 : ((_mood)>=20) ? 1 : 0;
if (_local2.checkUpgradeByName("Special Trolley")){
_currentCash = Math.round((_currentCash * 1.75));
};
_initialCash = _currentCash;
if (mayHaveCar){
_local3 = (VisitorList.isMustHaveCar(Utility.getClass(this))) ? 100 : Math.min((countParkingLot() * 2), 100);
if (Calculate.chance(_local3)){
_local4 = VisitorList.getCarType(Utility.getClass(this));
if (_local4 != "Nothing"){
_local2.createCar(this, _local4);
};
};
};
addEventListener(VisitorEvent.ON_OUT_WORLD, removeTick);
addEventListener(VisitorEvent.ON_OUT_WORLD, updateNextDayPopularity);
addEventListener(VisitorEvent.EXIT_BOOTH, exitBoothCheck);
addEventListener(VisitorEvent.EXIT_BOOTH, enterBoothCheck);
addEventListener(VisitorEvent.MOOD_UPDATE, checkMood);
addEventListener(MouseEvent.CLICK, VisitorOnClick);
_visitorComment = ConversationList.getSingleConversation(this, ConversationList.getConversationDestinationArray(this));
}
override protected function setFavoriteList():void{
var _local1:* = _world;
var _local2:* = FavoriteList.getSpecialFavorite(Utility.getClass(this));
var _local3:* = [];
var _local4:* = [];
var _local5:* = _local1.main;
var _local6:* = 0;
while (_local6 < _local2.length) {
if (_local5.boothAvailable.indexOf(_local2[_local6]) >= 0){
_local3.push(_local2[_local6]);
} else {
_local4.push(null);
};
_local6++;
};
_favoriteList = _local3.concat(_local4);
}
}
}//package Instance
Section 117
//gamesfre_pre_b_sprite43_224 (puffballPuzzles_fla.gamesfre_pre_b_sprite43_224)
package puffballPuzzles_fla {
import flash.display.*;
public dynamic class gamesfre_pre_b_sprite43_224 extends MovieClip {
}
}//package puffballPuzzles_fla
Section 118
//Car_538 (ShopEmpire2_fla.Car_538)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Car_538 extends MovieClip {
public var tParent;
public function Car_538(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6, 6, frame7, 7, frame8, 8, frame9, 9, frame10, 10, frame11, 11, frame12, 12, frame13);
}
function frame1(){
tParent = this.parent;
tParent.colorCode = 15019804;
}
function frame2(){
tParent = this.parent;
tParent.colorCode = 4556819;
}
function frame3(){
tParent = this.parent;
tParent.colorCode = 9902390;
}
function frame4(){
tParent = this.parent;
tParent.colorCode = 2706346;
}
function frame5(){
tParent = this.parent;
tParent.colorCode = 0x505050;
}
function frame6(){
tParent = this.parent;
tParent.colorCode = 4861195;
}
function frame7(){
tParent = this.parent;
tParent.colorCode = 0x3D5500;
}
function frame8(){
tParent = this.parent;
tParent.colorCode = 15449634;
}
function frame9(){
tParent = this.parent;
tParent.colorCode = 2261483;
}
function frame10(){
tParent = this.parent;
tParent.colorCode = 0x707070;
}
function frame11(){
tParent = this.parent;
tParent.colorCode = 6831884;
}
function frame12(){
tParent = this.parent;
tParent.colorCode = 5400588;
}
function frame13(){
tParent = this.parent;
tParent.colorCode = 5901416;
}
}
}//package ShopEmpire2_fla
Section 119
//dll_bundletaken_607 (ShopEmpire2_fla.dll_bundletaken_607)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class dll_bundletaken_607 extends MovieClip {
public var i;
public var temp;
public function dll_bundletaken_607(){
addFrameScript(0, frame1);
}
public function changeXPos(_arg1:MovieClip, _arg2:Number):void{
_arg1.x = (_arg1.x + _arg2);
}
function frame1(){
i = 0;
while (i < numChildren) {
temp = getChildAt(i);
temp.gotoAndPlay(Math.ceil((Math.random() * temp.totalFrames)));
if (i == 0){
TweenLite.to(temp, 0.7, {y:-45, ease:Back.easeOut, easeParams:[5], onComplete:removeChild, onCompleteParams:[temp]});
} else {
if ((((i == 1)) || ((i == 2)))){
TweenLite.to(temp, 0.65, {y:-20, ease:Back.easeOut, easeParams:[4], onUpdate:changeXPos, onUpdateParams:[temp, (((i % 2))==0) ? -2 : 2], onComplete:removeChild, onCompleteParams:[temp]});
} else {
TweenLite.to(temp, 0.6, {y:-5, ease:Back.easeOut, easeparams:[2], onUpdate:changeXPos, onUpdateParams:[temp, (((i % 2))==0) ? -4 : 4], onComplete:removeChild, onCompleteParams:[temp]});
};
};
i++;
};
}
}
}//package ShopEmpire2_fla
Section 120
//elgi_jalan_58 (ShopEmpire2_fla.elgi_jalan_58)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class elgi_jalan_58 extends MovieClip {
public var myParent;
public var newSE;
public function elgi_jalan_58(){
addFrameScript(0, frame1, 6, frame7);
}
function frame1(){
myParent = this.parent;
newSE = new SE_Intro_Walk();
newSE.play(0, 0, myParent.seTrans);
}
function frame7(){
newSE = new SE_Intro_Walk();
newSE.play(0, 0, myParent.seTrans);
}
}
}//package ShopEmpire2_fla
Section 121
//facilityATMlv_699 (ShopEmpire2_fla.facilityATMlv_699)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class facilityATMlv_699 extends MovieClip {
public const OPEN_POS = -52;
public var queue1:MovieClip;
public var queue2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function facilityATMlv_699(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 122
//facilityATMlv_702 (ShopEmpire2_fla.facilityATMlv_702)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class facilityATMlv_702 extends MovieClip {
public const OPEN_POS = -52;
public var queue1:MovieClip;
public var queue2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function facilityATMlv_702(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 123
//facilityATMlv_705 (ShopEmpire2_fla.facilityATMlv_705)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class facilityATMlv_705 extends MovieClip {
public const OPEN_POS = -52;
public var queue1:MovieClip;
public var queue2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function facilityATMlv_705(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 124
//fxfireworks_789 (ShopEmpire2_fla.fxfireworks_789)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class fxfireworks_789 extends MovieClip {
public var tRoot;
public var theRoot;
public function fxfireworks_789(){
addFrameScript(0, frame1);
}
function frame1(){
tRoot = root;
if (tRoot != null){
theRoot = tRoot.mainProgram;
theRoot.playSound(SFXFirework);
};
}
}
}//package ShopEmpire2_fla
Section 125
//gamesfre_pre_dragon_animation_39 (ShopEmpire2_fla.gamesfre_pre_dragon_animation_39)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class gamesfre_pre_dragon_animation_39 extends MovieClip {
public function gamesfre_pre_dragon_animation_39(){
addFrameScript(120, frame121);
}
function frame121(){
stop();
}
}
}//package ShopEmpire2_fla
Section 126
//gamesfre_pre_mendengus_47 (ShopEmpire2_fla.gamesfre_pre_mendengus_47)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class gamesfre_pre_mendengus_47 extends MovieClip {
public function gamesfre_pre_mendengus_47(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ShopEmpire2_fla
Section 127
//HallPreviewImageCombine_312 (ShopEmpire2_fla.HallPreviewImageCombine_312)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class HallPreviewImageCombine_312 extends MovieClip {
public var liveConcert:MovieClip;
public var carShow:MovieClip;
public var orchestra:MovieClip;
public var electronicExpo:MovieClip;
public var currentEvent:int;
public var onTween:Boolean;
public function HallPreviewImageCombine_312(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function clearTween(_arg1:Object):void{
_arg1.parent.removeChild(_arg1);
onTween = false;
}
public function setCurrentEvent(_arg1:int):void{
var _local3:*;
var _local4:*;
if (numChildren > 0){
_local3 = getChildAt(0);
if (_arg1 < currentEvent){
TweenLite.to(_local3, 0.3, {x:-(_local3.width), onComplete:clearTween, onCompleteParams:[_local3]});
onTween = true;
} else {
TweenLite.to(_local3, 0.3, {x:_local3.width, onComplete:clearTween, onCompleteParams:[_local3]});
onTween = true;
};
};
var _local2:* = root;
currentEvent = _arg1;
if (_local2 != null){
_local4 = _local2.mainProgram;
if (currentEvent >= Math.min(_local4.numberCountryData(), 4)){
currentEvent = 0;
};
if (currentEvent < 0){
currentEvent = Math.min((_local4.numberCountryData() - 1), 3);
};
};
switch (currentEvent){
case 0:
addChildAt(electronicExpo, 0);
break;
case 1:
addChildAt(carShow, 0);
break;
case 2:
addChildAt(liveConcert, 0);
break;
case 3:
addChildAt(orchestra, 0);
break;
};
if (numChildren > 0){
_local3 = getChildAt(0);
_local3.x = 0;
};
}
public function setCurrentEventTo(_arg1:int):void{
removeAllChild();
currentEvent = _arg1;
switch (currentEvent){
case 0:
addChildAt(electronicExpo, 0);
break;
case 1:
addChildAt(carShow, 0);
break;
case 2:
addChildAt(liveConcert, 0);
break;
case 3:
addChildAt(orchestra, 0);
break;
};
}
public function removeAllChild():void{
while (numChildren > 0) {
removeChildAt(0);
};
}
function frame1(){
mouseEnabled = false;
onTween = false;
setCurrentEventTo(0);
stop();
}
function frame2(){
removeAllChild();
setCurrentEvent(currentEvent);
}
function frame3(){
removeAllChild();
setCurrentEvent(currentEvent);
}
}
}//package ShopEmpire2_fla
Section 128
//IntroLittleGiant_56 (ShopEmpire2_fla.IntroLittleGiant_56)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class IntroLittleGiant_56 extends MovieClip {
public var seTrans;
public var vol;
public var newSE;
public function IntroLittleGiant_56(){
addFrameScript(0, frame1, 1, frame2, 81, frame82, 126, frame127);
}
function frame1(){
seTrans = new SoundTransform();
vol = 0.8;
}
function frame2(){
if (((!(vol)) && (!((vol == 0))))){
vol = 1;
};
seTrans.volume = vol;
}
function frame82(){
newSE = new SE_Intro_Explode();
newSE.play(0, 0, seTrans);
}
function frame127(){
stop();
}
}
}//package ShopEmpire2_fla
Section 129
//lalatanimate_170 (ShopEmpire2_fla.lalatanimate_170)
package ShopEmpire2_fla {
import flash.display.*;
import greensock.*;
public dynamic class lalatanimate_170 extends MovieClip {
public var lalat:MovieClip;
public var flyArea:MovieClip;
public function lalatanimate_170(){
addFrameScript(0, frame1);
}
public function flyOver():void{
var _local1:* = ((Math.random() * flyArea.width) - (flyArea.width / 2));
var _local2:* = -((Math.random() * flyArea.height));
TweenLite.to(lalat, 0.1, {x:_local1, y:_local2, onComplete:flyOver});
}
function frame1(){
lalat.x = ((Math.random() * flyArea.width) - (flyArea.width / 2));
lalat.y = -((Math.random() * flyArea.height));
flyOver();
}
}
}//package ShopEmpire2_fla
Section 130
//Legend_391 (ShopEmpire2_fla.Legend_391)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Legend_391 extends MovieClip {
public var slideBar:LegendSlider;
public var legendPage:MovieClip;
public function Legend_391(){
addFrameScript(0, frame1);
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
legendPage.y = (-(_local2.getPosition()) * 120);
}
function frame1(){
slideBar.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package ShopEmpire2_fla
Section 131
//Legend_394 (ShopEmpire2_fla.Legend_394)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Legend_394 extends MovieClip {
public var boxDustbinBiebir:MovieClip;
public var boxChuckNourish:MovieClip;
public var boxKatyBerry:MovieClip;
public var boxSteveWork:MovieClip;
public var boxLadyGogo:MovieClip;
public var boxArnold:MovieClip;
public var boxMrPeanut:MovieClip;
public var boxKezya:MovieClip;
public var boxMeleeCyrus:MovieClip;
public var boxKateCentertown:MovieClip;
public var theRoot;
public var boxList:Array;
public var i;
public function Legend_394(){
addFrameScript(0, frame1);
}
public function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
var _local3:* = 0;
while (_local3 < boxList.length) {
boxList[_local3].visitorIcon.transform.colorTransform = new ColorTransform(0, 0, 0, 1, 0, 0, 0, 0);
boxList[_local3].questionMark.visible = true;
boxList[_local3].visitorName.text = "?????";
ShopFilter.setGrayScale(boxList[_local3].flag_mapIndia);
ShopFilter.setGrayScale(boxList[_local3].flag_mapRusia);
ShopFilter.setGrayScale(boxList[_local3].flag_mapArabian);
ShopFilter.setGrayScale(boxList[_local3].flag_mapItaly);
ShopFilter.setGrayScale(boxList[_local3].flag_mapBritain);
_local3++;
};
var _local4:* = theRoot.currentGameplay.main;
checkSpecialVisitorHasAppear(theRoot.currentGameplay, _local4.country);
for (_local3 in theRoot.countryData) {
if (_local3 != _local4.country){
checkSpecialVisitorHasAppear(theRoot.countryData[_local3].gameplay, _local3);
};
};
theRoot.addEventListener(ShopGameEvent.VISITOR_ARRIVE, checkVisitorCome);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function removed(_arg1:Event):void{
theRoot.removeEventListener(ShopGameEvent.VISITOR_ARRIVE, checkVisitorCome);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function checkSpecialVisitorHasAppear(_arg1:Object, _arg2:String=""):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local3:* = 0;
while (_local3 < _arg1.specialVisitorAlreadyVisit.length) {
_local4 = _arg1.specialVisitorAlreadyVisit[_local3];
_local5 = VisitorList.SPECIAL_VISITOR_LIST.indexOf(_local4);
if ((_local5 in boxList)){
if (boxList[_local5].questionMark.visible){
boxList[_local5].questionMark.visible = false;
boxList[_local5].visitorIcon.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
boxList[_local5].visitorName.text = VisitorList.getSpecialVisitorName(_local4);
};
_local6 = boxList[_local5].getChildByName(("flag_" + _arg2));
if (_local6 != null){
ShopFilter.removeGrayScale(_local6);
};
};
_local3++;
};
}
public function checkVisitorCome(_arg1:ShopGameEvent):void{
var _local2:* = theRoot.currentGameplay.main;
checkSpecialVisitorHasAppear(theRoot.currentGameplay, _local2.country);
}
function frame1(){
boxList = new Array();
boxList.push(boxArnold);
boxList.push(boxChuckNourish);
boxList.push(boxDustbinBiebir);
boxList.push(boxKateCentertown);
boxList.push(boxKatyBerry);
boxList.push(boxKezya);
boxList.push(boxLadyGogo);
boxList.push(boxMeleeCyrus);
boxList.push(boxMrPeanut);
boxList.push(boxSteveWork);
i = 0;
while (i < boxList.length) {
boxList[i].visitorIcon.gotoAndStop((i + 1));
i++;
};
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
}
}//package ShopEmpire2_fla
Section 132
//Legend_395 (ShopEmpire2_fla.Legend_395)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Legend_395 extends MovieClip {
public var visitorName:TextField;
public var questionMark:MovieClip;
public var flag_mapIndia:MovieClip;
public var flag_mapRusia:MovieClip;
public var flag_mapBritain:MovieClip;
public var flag_mapItaly:MovieClip;
public var visitorIcon:MovieClip;
public var flag_mapArabian:MovieClip;
public function Legend_395(){
addFrameScript(0, frame1);
}
function frame1(){
this.mouseChildren = false;
}
}
}//package ShopEmpire2_fla
Section 133
//legenddialogueboxnotice_407 (ShopEmpire2_fla.legenddialogueboxnotice_407)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class legenddialogueboxnotice_407 extends MovieClip {
public var textPart:MovieClip;
public var rightPart:MovieClip;
public var leftBottomPart:MovieClip;
public var bottomPart:MovieClip;
public var leftPart:MovieClip;
public var rightTopPart:MovieClip;
public var topPart:MovieClip;
public var legendText:TextField;
public var rightBottomPart:MovieClip;
public var leftTopPart:MovieClip;
public var pointPart:MovieClip;
public var _text;
public function legenddialogueboxnotice_407(){
addFrameScript(0, frame1);
}
public function set text(_arg1:String):void{
_text = _arg1;
legendText.text = _text;
correctTextSize();
}
public function get text():String{
return (_text);
}
public function correctTextSize():void{
legendText.x = (-(legendText.width) / 2);
legendText.y = (-(legendText.height) - 6);
textPart.x = legendText.x;
textPart.y = legendText.y;
textPart.width = legendText.width;
textPart.height = legendText.height;
topPart.x = legendText.x;
topPart.y = (legendText.y - 5);
topPart.width = legendText.width;
bottomPart.x = legendText.x;
bottomPart.width = legendText.width;
leftPart.x = (legendText.x - 5);
leftPart.y = legendText.y;
leftPart.height = legendText.height;
rightPart.x = ((legendText.x + legendText.width) - (rightPart.width - 5));
rightPart.y = legendText.y;
rightPart.height = legendText.height;
leftTopPart.x = leftPart.x;
leftTopPart.y = topPart.y;
leftBottomPart.x = leftPart.x;
rightTopPart.x = ((legendText.x + legendText.width) - 1);
rightTopPart.y = topPart.y;
rightBottomPart.x = ((legendText.x + legendText.width) - 1);
}
function frame1(){
legendText.autoSize = TextFieldAutoSize.CENTER;
legendText.mouseEnabled = false;
}
}
}//package ShopEmpire2_fla
Section 134
//LinkCatcher_215 (ShopEmpire2_fla.LinkCatcher_215)
package ShopEmpire2_fla {
import flash.display.*;
import flash.events.*;
public dynamic class LinkCatcher_215 extends MovieClip {
public var pCloseButton:SimpleButton;
public function LinkCatcher_215(){
addFrameScript(0, frame1);
}
public function pCloseClick(_arg1:MouseEvent):void{
this.visible = false;
}
function frame1(){
pCloseButton.addEventListener(MouseEvent.CLICK, pCloseClick);
}
}
}//package ShopEmpire2_fla
Section 135
//MainMenu_156 (ShopEmpire2_fla.MainMenu_156)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import Instance.constant.*;
import greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainMenu_156 extends MovieClip {
public var middleBox:MovieClip;
public var youtubeLink:MovieClip;
public var btnClose:SimpleButton;
public var creditText:MovieClip;
public var creditBox:MovieClip;
public var facebookLink:MovieClip;
public var animationCredit:MovieClip;
public var tRoot;
public var theRoot;
public var animationDelay;
public function MainMenu_156(){
addFrameScript(0, frame1);
}
public function expandCreditBox():void{
TweenLite.to(creditBox.middleBox, 0.5, {scaleY:1, onUpdate:correctLowerBox, onComplete:startAnimationCredit});
}
public function correctLowerBox():void{
creditBox.lowerBox.y = (5 + (250 * creditBox.middleBox.scaleY));
}
public function initCreditTextAnimation():void{
creditText.y = ((creditBox.y + creditBox.height) + 10);
TweenLite.to(creditText, 45, {y:((creditBox.y - creditText.height) - 10), onComplete:initCreditTextAnimation, ease:Linear.easeNone});
}
public function startAnimationCredit():void{
initCreditTextAnimation();
animationCredit.playAnimation();
addEventListener(Event.ENTER_FRAME, checkEndOfAnimation);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function checkEndOfAnimation(_arg1:Event):void{
var _local2:* = animationCredit.getChildAt(0);
if (_local2 != null){
if (animationDelay > 0){
if (animationDelay >= 12){
animationCredit.stopAnimation();
};
animationDelay--;
if (animationDelay <= 0){
animationCredit.playAnimation();
};
} else {
if (_local2.currentFrame >= _local2.totalFrames){
if (animationCredit.currentFrame == animationCredit.totalFrames){
animationCredit.gotoAndStop(1);
} else {
animationCredit.nextFrame();
};
animationDelay = 12;
};
};
};
}
public function removed(_arg1:Event):void{
animationCredit.stopAnimation();
removeEventListener(Event.ENTER_FRAME, checkEndOfAnimation);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function linkToFacebook(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.facebook.com/Littlegiantworld");
navigateToURL(_local2, "_blank");
}
public function linkToYoutube(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.youtube.com/user/LittleGiantWorld");
navigateToURL(_local2, "_blank");
}
function frame1(){
tRoot = root;
theRoot = tRoot.mainProgram;
if (!theRoot.achievementIsGain(AchievementList.getAchievementByName("nice to meet you"))){
theRoot.unlockAchievement("nice to meet you");
};
animationDelay = 0;
creditBox.middleBox.scaleY = 0;
correctLowerBox();
animationCredit.stop();
animationCredit.stopAnimation();
creditText.y = 100;
TweenLite.from(this, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:expandCreditBox});
facebookLink.buttonMode = true;
youtubeLink.buttonMode = true;
facebookLink.addEventListener(MouseEvent.CLICK, linkToFacebook);
youtubeLink.addEventListener(MouseEvent.CLICK, linkToYoutube);
}
}
}//package ShopEmpire2_fla
Section 136
//MainMenu_162 (ShopEmpire2_fla.MainMenu_162)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainMenu_162 extends MovieClip {
public function MainMenu_162(){
addFrameScript(0, frame1);
}
public function stopAnimation():void{
var _local1:* = getChildAt(0);
if (_local1 != null){
_local1.stop();
};
}
public function playAnimation():void{
var _local1:* = getChildAt(0);
if (_local1 != null){
_local1.play();
};
}
function frame1(){
}
}
}//package ShopEmpire2_fla
Section 137
//mainmenubegron_99 (ShopEmpire2_fla.mainmenubegron_99)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class mainmenubegron_99 extends MovieClip {
public var mc17:MovieClip;
public var mc18:MovieClip;
public var mc19:MovieClip;
public var mc1:MovieClip;
public var mc2:MovieClip;
public var mc3:MovieClip;
public var mc4:MovieClip;
public var mc10:MovieClip;
public var mc5:MovieClip;
public var mc20:MovieClip;
public var mc11:MovieClip;
public var mc6:MovieClip;
public var mc21:MovieClip;
public var mc12:MovieClip;
public var mc7:MovieClip;
public var mc13:MovieClip;
public var mc8:MovieClip;
public var mc14:MovieClip;
public var mc9:MovieClip;
public var mc15:MovieClip;
public var mc16:MovieClip;
public var clipList:Array;
public function mainmenubegron_99(){
addFrameScript(0, frame1);
}
public function initClipList():void{
var _local1:* = 0;
while (getChildByName(("mc" + (_local1 + 1))) != null) {
clipList.push(getChildByName(("mc" + (_local1 + 1))));
_local1++;
};
}
public function swaping(_arg1:Event):void{
clipList.sortOn("currentFrame", Array.DESCENDING);
var _local2:* = 0;
while (_local2 < clipList.length) {
addChild(clipList[_local2]);
_local2++;
};
}
public function removed(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, swaping);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
function frame1(){
clipList = new Array();
initClipList();
addEventListener(Event.ENTER_FRAME, swaping);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
}
}//package ShopEmpire2_fla
Section 138
//MainProgram_64 (ShopEmpire2_fla.MainProgram_64)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import greensock.easing.*;
import greensock.plugins.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainProgram_64 extends MovieClip {
public var MainGameplay:UI_MainGameplay;
public var MainMenuPage:UI_MainMenu;
public var achievementAnouncement:MovieClip;
public var globalMask:MovieClip;
public var WorldMapPage:UI_WorldMap;
public var playerName:String;
public var bgmTransform:SoundTransform;
public var bgmChannel:SoundChannel;
public var bgm:Sound;
public var bgmEnvirontment:Number;
public var _bgmVolume:Number;
public var sfxTransform:SoundTransform;
public var sfxChannel:SoundChannel;
public var sfx:Sound;
public var _sfxVolume:Number;
public var lastCountryName:String;
public var lastGameplay:MovieClip;
public var currentGameplay:MovieClip;
public var countryData:Array;
public var cityUnlocked:Array;
public var tutorialShown:Boolean;
public var tutorialPass:Array;
public var tutorialActive:String;
public var tutorialTime:int;
public var cameraShown:Boolean;
public var autoSaveData:SharedObject;
public var saveData:Array;
public var achievementData:SharedObject;
public var achievementGain:Array;
public var achievementNotice:Object;
public var dayPass:uint;
public var country:String;
public var transferCountdown:int;
public var transferData:Object;
public var theRoot;
public var centerPoint;
public var upgradeTime;
public var tipsGain:Array;
public var newTips:Array;
public var tGameHour;
public var tGameMinute;
public var i;
public function MainProgram_64(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
public function checkFrame(_arg1:ShopFrameEvent):void{
if (_arg1.frameLabel == "Main Menu"){
resetData();
MainMenuPage.addEventListener(ShopGameEvent.BEGIN_GAME, beginGame);
};
if (_arg1.frameLabel == "World Map"){
WorldMapPage.addEventListener(ShopGameEvent.BACK_TO_MENU, backToMenu);
WorldMapPage.addEventListener(ShopGameEvent.START_GAME, startGame);
};
if (_arg1.frameLabel == "The Game"){
MainGameplay.country = country;
MainGameplay.addEventListener(ShopCommandEvent.CALL_COMMAND, ReadCommand);
};
}
public function beginGame(_arg1:ShopGameEvent):void{
lastCountryName = "";
if (_arg1.gameMode == ShopGameEvent.NEW_GAME){
cityUnlocked = [ShopText.MAP_INDIA];
tutorialPass = [];
tipsGain = ["scrollScreen"];
newTips = [];
transferData = null;
transferCountdown = 0;
};
gotoAndStop("World Map");
}
public function backToMenu(_arg1:ShopGameEvent):void{
gotoAndStop("Main Menu");
}
public function addVisitorOn(_arg1:MovieClip, _arg2:String=""):void{
var _local3:* = VisitorList.getRandomVisitorList(_arg2);
var _local4:* = new (_local3);
var _local5:* = Math.floor((Math.random() * 2));
_local4.world = _arg1;
if (_local5 == 0){
_local4.dirrection = HumanObject.RIGHT;
} else {
_local4.dirrection = HumanObject.LEFT;
};
_local4.walk = true;
_local4.x = (Math.round((Math.random() * Math.abs((_arg1.mostRight - _arg1.mostLeft)))) + _arg1.mostLeft);
_local4.y = 0;
_local4.onFloor = null;
_arg1.containerVisitor[0].addChild(_local4);
_local4.addEventListener(VisitorEvent.ON_OUT_WORLD, _arg1.visitorOutWorld);
_arg1.visitorList.push(_local4);
}
public function addBanditOn(_arg1:MovieClip){
var _local2:* = BanditNormal;
var _local3:* = new (_local2);
var _local4:* = Math.floor((Math.random() * 2));
_local3.world = _arg1;
if (_local4 == 0){
_local3.dirrection = HumanObject.RIGHT;
} else {
_local3.dirrection = HumanObject.LEFT;
};
_local3.walk = true;
_local3.x = (Math.round((Math.random() * Math.abs((_arg1.mostRight - _arg1.mostLeft)))) + _arg1.mostLeft);
_local3.y = 0;
_local3.onFloor = null;
_arg1.containerVisitor[0].addChild(_local3);
_local3.addEventListener(VisitorEvent.ON_OUT_WORLD, _arg1.visitorOutWorld);
_arg1.banditList.push(_local3);
}
public function correctStaffPlaceOn(_arg1:MovieClip):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _arg1.janitorList.concat(_arg1.electricianList.concat(_arg1.securityList.concat(_arg1.entertainerList)));
var _local3:* = 0;
while (_local3 < _local2.length) {
_local4 = _local2[_local3];
_local4.visible = true;
_local4.clearAllDestination();
if (_local4.startWorkTime < _local4.finishWorkTime){
if ((((_arg1.gameHour >= _local4.startWorkTime)) && ((_arg1.gameHour < _local4.finishWorkTime)))){
_local4.goHome = false;
} else {
_local4.goHome = true;
};
} else {
if ((((_arg1.gameHour >= _local4.startWorkTime)) || ((_arg1.gameHour < _local4.finishWorkTime)))){
_local4.goHome = false;
} else {
_local4.goHome = true;
};
};
if (_local4.goHome){
if (Calculate.chance(50)){
_local4.x = (_arg1.mostLeft + 10);
_local4.dirrection = HumanObject.LEFT;
} else {
_local4.x = (_arg1.mostRight - 10);
_local4.dirrection = HumanObject.RIGHT;
};
_local4.y = 0;
_local4.onFloor = null;
_local4.walk = true;
} else {
if (_local4.workArea > 0){
_local4.onFloor = _arg1.floorList[(_local4.workArea - 1)];
} else {
_local4.onFloor = null;
};
if (_local4.onFloor != null){
_local4.y = _local4.onFloor.y;
} else {
_local4.y = 0;
};
_local4.walk = true;
};
if (!_local4.goHome){
if (_arg1.floorList.length > 0){
_local6 = _arg1.floorList[(_arg1.floorList.indexOf(_local4.onFloor) + 1)];
_local4.x = (_local6.x + ((Math.random() * _local6.width) - (_local6.width / 2)));
} else {
_local4.x = ((Math.random() * ((_arg1.mostRight - 108) - (_arg1.mostLeft + 108))) + (_arg1.mostLeft + 108));
};
};
_local5 = (_arg1.floorList.indexOf(_local4.onFloor) + 1);
_arg1.containerVisitor[_local5].addChild(_local4);
_local3++;
};
}
public function updateCountry(_arg1:Number, _arg2:Number, _arg3:Object=null):void{
var _local4:String;
var _local5:*;
for (_local4 in countryData) {
if (countryData[_local4].gameplay != _arg3){
_local5 = countryData[_local4];
if (!_local5.updated){
_local5.updated = true;
clearVisitorOn(_local5);
clearBanditOn(_local5);
clearTrashOn(_local5);
};
if ((((_arg1 >= 22)) || ((_arg1 < 10)))){
_local5.numberVisitor = 0;
_local5.numberVillain = 0;
} else {
countVisitorUpdate(_arg1, _arg2, _local5);
};
if ((((_arg1 >= 22)) || ((_arg1 < 5)))){
countBanditUpdate(_arg1, _arg2, _local5);
} else {
_local5.numberBandit = 0;
};
staffUpdate(_arg1, _arg2, _local5);
boothUpdate(_arg1, _arg2, _local5);
hallUpdate(_arg1, _arg2, _local5);
repairUpdate(_local5);
countCashUpdate(_local5);
if ((((_arg1 == 0)) && ((_arg2 == 0)))){
_local5.gameplay.resetDay();
};
};
};
}
public function repairUpdate(_arg1:Object):void{
var _local2:* = _arg1.gameplay;
var _local3:* = _local2.boothList.concat(_local2.atmList);
var _local4:* = 0;
while (_local4 < _local3.length) {
if (_local3[_local4].needToRepair){
if (Calculate.chance((25 * _local2.countElectricianEffectivity()))){
_local3[_local4].boothBroken = 0;
};
};
_local4++;
};
}
public function hallUpdate(_arg1:Number, _arg2:Number, _arg3:Object):void{
var gh = _arg1;
var gm = _arg2;
var gp = _arg3;
var temp:* = gp.gameplay;
if (temp.hall != null){
if (temp.hall.currentEvent != BoothHall.NONE){
if ((((gh == 0)) && ((gm == 0)))){
var _local5 = temp.hall;
with (_local5) {
if (stillBooking){
stillBooking = false;
} else {
if (dayEventLeft > 0){
dayEventLeft--;
if (dayEventLeft <= 0){
currentEvent = BoothHall.NONE;
};
};
};
};
};
temp.hall.boothOpen = (((gh >= 12)) && ((gh < 19)));
};
};
}
public function staffUpdate(_arg1:Number, _arg2:Number, _arg3:Object):void{
var _local7:*;
var _local4:* = _arg3.gameplay;
var _local5:* = _local4.janitorList.concat(_local4.electricianList.concat(_local4.securityList.concat(_local4.entertainerList)));
var _local6:* = 0;
while (_local6 < _local5.length) {
if (_arg2 == 0){
if (_arg1 == _local5[_local6].finishWorkTime){
_local7 = _local5[_local6].getWage();
_local5[_local6].paid = (_local5[_local6].paid + _local7);
_local4.cash = (_local4.cash - _local7);
};
};
_local6++;
};
}
public function boothUpdate(_arg1:Number, _arg2:Number, _arg3:Object):void{
var _local4:* = _arg3.gameplay;
var _local5:* = _local4.boothList.concat(_local4.atmList);
var _local6:* = 0;
while (_local6 < _local5.length) {
_local5[_local6].boothOpen = (((_arg3.gameHour >= 10)) && ((_arg3.gameHour < 22)));
_local6++;
};
}
public function countCashUpdate(_arg1:Object):void{
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local17:*;
var _local18:*;
var _local19:*;
var _local20:*;
var _local2:* = _arg1.gameplay;
var _local3:* = 0;
var _local4:* = 0;
var _local5:* = 0;
var _local6:* = (1 + (_local2.popularity / 150));
var _local7:* = Utility.getIndexOf(countryData, _arg1);
var _local8:* = 0;
while (_local8 < _local2.boothList.length) {
_local11 = _local2.boothList[_local8];
_local12 = (BoothList.getAverageItemPriceByType(Utility.getClass(_local11), (_local11.boothLevel - 1)) * _local6);
_local4 = (_local4 + _local12);
_local13 = BoothList.getBoughtChance(Utility.getClass(_local11));
_local5 = (_local5 + _local13);
_local8++;
};
if (_local2.boothList.length > 0){
_local5 = (_local5 / _local2.boothList.length);
};
_local8 = 0;
while (_local8 < _local2.atmList.length) {
_local4 = (_local4 + 50);
_local8++;
};
if ((_local2.boothList.length + _local2.atmList.length) > 0){
_local4 = (_local4 / (_local2.boothList.length + _local2.atmList.length));
};
var _local9:* = 0;
_local8 = 0;
while (_local8 < _arg1.numberVisitor) {
_local14 = 0;
if (((((!((_local2.hall == null))) && (_local2.hall.boothOpen))) && (!((_local2.hall.currentEvent == BoothHall.NONE))))){
_local14 = (50 * _arg1.averageMood);
};
if (Calculate.chance(_local14)){
if (Calculate.chance(20)){
_local2.hall.revenue = (_local2.hall.revenue + Math.round(_local2.hall.getTicketPrice()));
_local9 = (_local9 + Math.round(_local2.hall.getTicketPrice()));
};
} else {
if (Calculate.chance(((_arg1.averageMood / 100) * 80))){
_local15 = FavoriteList.COUNTRY_LIST.indexOf(_local7);
_local16 = null;
if ((_local15 in FavoriteList.COUNTRY_FAVORITE_LIST)){
_local18 = Math.floor((Math.random() * FavoriteList.COUNTRY_FAVORITE_LIST[_local15].length));
_local16 = FavoriteList.COUNTRY_FAVORITE_LIST[_local15][_local18];
};
_local17 = _local2.getRandomBoothOf(_local16);
if (_local17 != null){
_local19 = Math.round((BoothList.getAverageItemPriceByType(Utility.getClass(_local17), (_local17.boothLevel - 1)) * _local6));
if (!(_local17 is BoothCinema)){
_local20 = 0;
while (_local20 < 5) {
if (Calculate.chance(_local5)){
_local17.revenue = (_local17.revenue + _local19);
_local9 = (_local9 + _local19);
};
_local20++;
};
if ((((_local17.visitorVisit == 0)) || (Calculate.chance(30)))){
_local17.visitorVisit++;
};
} else {
if (Calculate.chance(15)){
_local17.revenue = (_local17.revenue + _local19);
_local9 = (_local9 + _local19);
_local17.visitorVisit++;
};
if (Calculate.chance(10)){
_local17.boothBroken = (_local17.boothBroken + (((Math.random() * 5) + 5) / (75 * _local17.boothLevel)));
};
};
};
};
};
_local8++;
};
var _local10:* = 0;
_local8 = 0;
while (_local8 < _arg1.numberBandit) {
if (Calculate.chance(30)){
_local10 = (_local10 + Math.round(_local4));
};
_local8++;
};
_local2.miscOutReport = (_local2.miscOutReport + _local10);
_local2.cash = (_local2.cash + _local9);
_local2.cash = (_local2.cash - _local10);
}
public function clearTrashOn(_arg1:Object):void{
var _local3:*;
var _local2:* = _arg1.gameplay;
while (_local2.trashList.length > 0) {
_local3 = _local2.trashList.pop();
_local3.parent.removeChild(_local3);
};
}
public function clearVisitorOn(_arg1:Object):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local2:* = _arg1.gameplay;
while (_local2.visitorList.length > 0) {
_local4 = _local2.visitorList.pop();
if (_local4.transportTarget != null){
if ((_local4.transportTarget is FacilityEscalator)){
_local4.transportTarget.removeVisitorFromList(_local4);
} else {
if ((_local4.transportTarget is FacilityElevator)){
_local5 = _local4.transportTarget.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.transportTarget.visitorList.splice(_local5, 1);
};
};
};
};
if (_local4.currentDestination != null){
_local5 = _local4.currentDestination.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.currentDestination.visitorList.splice(_local5, 1);
};
};
_local4.removeFromRestRoom();
_local4.parent.removeChild(_local4);
};
while (_local2.visitorVillainList.length > 0) {
_local4 = _local2.visitorVillainList.pop();
if (_local4.transportTarget != null){
if ((_local4.transportTarget is FacilityEscalator)){
_local4.transportTarget.removeVisitorFromList(_local4);
} else {
if ((_local4.transportTarget is FacilityElevator)){
_local5 = _local4.transportTarget.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.transportTarget.visitorList.splice(_local5, 1);
};
};
};
};
if (_local4.currentDestination != null){
_local5 = _local4.currentDestination.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.currentDestination.visitorList.splice(_local5, 1);
};
};
_local4.removeFromRestRoom();
_local4.parent.removeChild(_local4);
};
while (_local2.visitorSpecialList.length > 0) {
_local4 = _local2.visitorSpecialList.pop();
if (_local4.transportTarget != null){
if ((_local4.transportTarget is FacilityEscalator)){
_local4.transportTarget.removeVisitorFromList(_local4);
} else {
if ((_local4.transportTarget is FacilityElevator)){
_local5 = _local4.transportTarget.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.transportTarget.visitorList.splice(_local5, 1);
};
};
};
};
if (_local4.currentDestination != null){
_local5 = _local4.currentDestination.visitorList.indexOf(_local4);
if (_local5 >= 0){
_local4.currentDestination.visitorList.splice(_local5, 1);
};
};
_local4.removeFromRestRoom();
_local4.parent.removeChild(_local4);
};
while (_local2.carList.length > 0) {
_local6 = _local2.carList.pop();
_local6.parent.removeChild(_local6);
};
var _local3:* = 0;
while (_local3 < _local2.parkingList) {
_local7 = _local2.parkingList[_local3];
while (_local7.carList.length > 0) {
_local7.carList.pop();
};
_local8 = 0;
while (_local8 < _local7.carQueue.length) {
_local7.carQueue[_local8] = null;
_local8++;
};
_local3++;
};
}
public function clearBanditOn(_arg1:Object):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.gameplay;
while (_local2.banditList.length > 0) {
_local3 = _local2.banditList.pop();
if (_local3.transportTarget != null){
if ((_local3.transportTarget is FacilityEscalator)){
_local3.transportTarget.removeVisitorFromList(_local3);
} else {
if ((_local3.transportTarget is FacilityElevator)){
_local4 = _local3.transportTarget.visitorList.indexOf(_local3);
if (_local4 >= 0){
_local3.transportTarget.visitorList.splice(_local4, 1);
};
};
};
};
if (_local3.currentDestination != null){
_local4 = _local3.currentDestination.banditList.indexOf(_local3);
if (_local4 >= 0){
_local3.currentDestination.banditList.splice(_local4, 1);
};
_local4 = _local3.currentDestination.banditInside.indexOf(_local3);
if (_local4 >= 0){
_local3.currentDestination.banditInside.splice(_local4, 1);
};
};
_local3.parent.removeChild(_local3);
};
}
public function countBanditUpdate(_arg1:Number, _arg2:Number, _arg3:Object):void{
var _local4:* = _arg3.gameplay;
var _local5:* = 0;
var _local6:* = 0;
while (_local6 < 2) {
if (Calculate.chance((30 + Math.floor((_local4.crime / 2))))){
_local5++;
};
_local6++;
};
var _local7:* = 0;
if (_arg2 == 30){
_local7 = Math.round((_arg3.numberBandit * _local4.countSecurityEffectivity()));
};
var _local8:* = 0;
if (_arg2 == 0){
if ((((_arg1 < 5)) && ((_arg1 >= 2)))){
_local8 = Math.round((_arg3.numberBandit * ((_arg1 - 2) / 9)));
};
};
_arg3.numberBandit = (_arg3.numberBandit + Math.max(((_local5 - _local7) - _local8), 0));
}
public function countVisitorUpdate(_arg1:Number, _arg2:Number, _arg3:Object):void{
var _local18:*;
var _local19:*;
var _local20:*;
var _local21:*;
var _local4:* = _arg3.gameplay;
var _local5:* = _arg3.gameplay.popularity;
var _local6:* = 0;
var _local7:* = 0;
_arg3.gameplay.loadMaxVisitor();
if ((((_arg1 >= 10)) && ((_arg1 < 12)))){
_local6 = 1;
_local7 = 1;
} else {
if ((((_arg1 >= 12)) && ((_arg1 < 15)))){
_local6 = 3;
_local7 = 2;
} else {
if ((((_arg1 >= 15)) && ((_arg1 < 18)))){
_local6 = 2;
_local7 = 3;
} else {
if ((((_arg1 >= 18)) && ((_arg1 < 21)))){
_local6 = 4;
_local7 = 2;
};
};
};
};
var _local8:* = Math.max(((_local5 * (_local6 + ((Math.random() * (_local7 * 2)) - _local7))) * 0.75), 3);
_local8 = (_local8 * (_arg3.gameplay.maxVisitor / ((_arg3.gameplay.maxVisitor + _arg3.numberVillain) + _arg3.numberVisitor)));
var _local9:* = 0;
var _local10:* = 0;
if ((_arg3.numberVillain + _arg3.numberVisitor) > 0){
if (_arg2 == 0){
_local18 = (((100 - _arg3.averageMood) + (((Math.random() * _arg3.averageMood) / 5) - (_arg3.averageMood / 10))) / 100);
_local9 = Math.round(((_arg3.numberVisitor + _arg3.numberVillain) * (_local18 * ((_arg1 - 10) / 12))));
_local19 = (_arg3.numberVillain / (_arg3.numberVisitor + _arg3.numberVillain));
_local10 = Math.round((_local9 * (_local19 + ((Math.random() * (_local19 / 2)) - (_local19 / 4)))));
_local9 = (_local9 - _local10);
};
};
var _local11:* = 0;
var _local12:* = 0;
var _local13:* = 0;
var _local14:* = 0;
while (_local14 < 30) {
if (((((_arg3.numberVisitor + _arg3.numberVillain) + _local12) + _local11) - (_local9 + _local10)) < _arg3.gameplay.maxVisitor){
_local20 = 0;
while (_local20 < 3) {
if (Calculate.chance((_local8 - (_local20 * 20)))){
_local21 = Math.min((_arg3.gameplay.cashSpent / 5000), 30);
if (Calculate.chance(_local21)){
_local12++;
} else {
_local11++;
};
_local13 = (_local13 + 50);
};
_local20++;
};
};
_local14++;
};
var _local15:* = (_arg3.averageMood * (_arg3.numberVillain + _arg3.numberVisitor));
_arg3.numberVillain = (_arg3.numberVillain + (_local12 - _local10));
_arg3.numberVisitor = (_arg3.numberVisitor + (_local11 - _local9));
var _local16:* = Math.round((_arg3.numberVillain * (_local4.countSecurityEffectivity() / 2)));
_arg3.numberVillain = (_arg3.numberVillain - _local16);
_arg3.numberVisitor = (_arg3.numberVisitor + _local16);
if (_arg3.numberVillain < 0){
_arg3.numberVillain = 0;
};
if (_arg3.numberVisitor < 0){
_arg3.numberVisitor = 0;
};
_arg3.averageMood = (((_arg3.numberVillain + _arg3.numberVisitor))>0) ? ((_local15 + _local13) / (_arg3.numberVillain + _arg3.numberVisitor)) : 100;
var _local17:* = 0;
_local14 = 0;
while (_local14 < _arg3.numberVisitor) {
_local17 = (_local17 + (Math.random() * 1.5));
_local14++;
};
_local14 = 0;
while (_local14 < _arg3.numberVillain) {
_local17 = (_local17 + ((Math.random() * 2) + 3));
_local14++;
};
if (_arg3.numberVisitor > 0){
_local17 = Math.min(100, (_local17 * (1 - _local4.countJanitorEffectivity())));
if (Calculate.chance(_local17)){
_arg3.averageMood = (_arg3.averageMood - Math.min(1, (_arg3.averageMood * 0.1)));
};
if (Calculate.chance((20 * _local4.countEntertainerEffectivity()))){
_arg3.averageMood = (_arg3.averageMood + ((Math.random() * 2) + 1));
};
_arg3.averageMood = Math.max(Math.min(100, _arg3.averageMood), 0);
};
_local4.visitorPopularity = (_local4.visitorPopularity + ((_arg3.averageMood - 50) / 30));
}
public function startGame(_arg1:ShopGameEvent):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
country = _arg1.country;
if (country != lastCountryName){
_local2 = false;
if (lastGameplay != null){
_local3 = lastGameplay.gameHour;
_local4 = lastGameplay.gameMinute;
_local2 = true;
};
if ((country in countryData)){
_local5 = countryData[country];
lastGameplay = _local5.gameplay;
if (_local5.updated){
_local6 = 0;
while (_local6 < _local5.numberVisitor) {
addVisitorOn(_local5.gameplay, country);
_local6++;
};
_local6 = 0;
while (_local6 < _local5.numberBandit) {
addBanditOn(_local5.gameplay);
_local6++;
};
correctStaffPlaceOn(_local5.gameplay);
};
} else {
if (((!((tGameHour == null))) && (!((tGameMinute == null))))){
_local3 = tGameHour;
_local4 = tGameMinute;
_local2 = true;
};
lastGameplay = new Gameplay();
if (cityUnlocked.length <= 1){
lastGameplay.cash = 55000;
};
};
if (_local2){
lastGameplay.gameHour = _local3;
lastGameplay.gameMinute = _local4;
};
tGameHour = null;
tGameMinute = null;
};
gotoAndStop("The Game");
}
public function ReadCommand(_arg1:ShopCommandEvent):void{
if (_arg1.command == ShopCommandEvent.RETURN_TO_WORLD_MAP){
gotoAndStop("World Map");
} else {
if (_arg1.command == ShopCommandEvent.RETURN_TO_MAIN_MENU){
gotoAndStop("Main Menu");
};
};
}
public function tutorialEnd():void{
tutorialTime = 0;
dispatchEvent(new TutorialEvent(TutorialEvent.TUTORIAL_END));
}
public function createNewGameplay():MovieClip{
return (new Gameplay());
}
public function saveGame(_arg1:int):void{
var _local2:*;
var _local4:String;
if ((_arg1 in saveData)){
_local2 = saveData[_arg1];
} else {
_local2 = autoSaveData;
};
_local2.data.playerName = playerName;
_local2.data.saveTime = new Date();
_local2.data.dayPass = dayPass;
_local2.data.gameHour = currentGameplay.gameHour;
_local2.data.gameMinute = currentGameplay.gameMinute;
_local2.data.cityUnlocked = cityUnlocked.concat();
_local2.data.transferCountdown = transferCountdown;
_local2.data.tipsGain = tipsGain.concat();
_local2.data.newTips = newTips.concat();
_local2.data.tutorialShown = tutorialShown;
_local2.data.cameraShown = cameraShown;
if (transferData != null){
_local2.data.transferData = {fromCountry:transferData.fromCountry, targetCountry:transferData.targetCountry, amount:transferData.amount, transDelay:transferData.transDelay};
} else {
_local2.data.transferData = null;
};
saveTutorialData(_local2);
_local2.data.gameplayData = new Array();
var _local3:* = currentGameplay.main;
_local3.addSaveNote(_arg1);
_local2.data.gameplayData[_local3.country] = {upgradeData:[], floorData:[], basementData:[], boothData:[], facilityData:[], pillarData:[], staffData:[]};
_local2.data.gameplayData[_local3.country].totalBanditCaptured = currentGameplay.totalBanditCaptured;
_local2.data.gameplayData[_local3.country].totalVillainCaptured = currentGameplay.totalVillainCaptured;
_local2.data.gameplayData[_local3.country].banditCaptured = currentGameplay.banditCaptured;
_local2.data.gameplayData[_local3.country].villainCaptured = currentGameplay.villainCaptured;
_local2.data.gameplayData[_local3.country].mission = _local3.getCurrentMission();
_local2.data.gameplayData[_local3.country].crime = currentGameplay.crime;
_local2.data.gameplayData[_local3.country].yourMallIsSafe = currentGameplay.yourMallIsSafe;
_local2.data.gameplayData[_local3.country].missionVar = currentGameplay.missionVar;
savePopularity(_local3.country, currentGameplay, _local2);
saveExtraUpgradeData(_local3.country, currentGameplay, _local2);
saveFloorData(_local3.country, currentGameplay, _local2);
savePillarData(_local3.country, currentGameplay, _local2);
saveBoothData(_local3.country, currentGameplay, _local2);
saveFacilityData(_local3.country, currentGameplay, _local2);
saveHallData(_local3.country, currentGameplay, _local2);
saveStaffData(_local3.country, currentGameplay, _local2);
saveVisitorData(_local3.country, currentGameplay.visitorList.length, _local2);
saveSpecialVisitorData(_local3.country, currentGameplay, _local2);
saveCashData(_local3.country, currentGameplay, _local2);
for (_local4 in countryData) {
if (_local4 != _local3.country){
_local2.data.gameplayData[_local4] = {upgradeData:[], floorData:[], basementData:[], boothData:[], facilityData:[], pillarData:[], staffData:[]};
_local2.data.gameplayData[_local4].totalBanditCaptured = countryData[_local4].gameplay.totalBanditCaptured;
_local2.data.gameplayData[_local4].totalVillainCaptured = countryData[_local4].gameplay.totalVillainCaptured;
_local2.data.gameplayData[_local4].banditCaptured = countryData[_local4].gameplay.banditCaptured;
_local2.data.gameplayData[_local4].villainCaptured = countryData[_local4].gameplay.villainCaptured;
_local2.data.gameplayData[_local4].mission = countryData[_local4].gameplay.missionActive;
_local2.data.gameplayData[_local4].crime = countryData[_local4].gameplay.crime;
_local2.data.gameplayData[_local4].yourMallIsSafe = countryData[_local4].gameplay.yourMallIsSafe;
_local2.data.gameplayData[_local4].missionVar = countryData[_local4].gameplay.missionVar;
savePopularity(_local4, countryData[_local4].gameplay, _local2);
saveExtraUpgradeData(_local4, countryData[_local4].gameplay, _local2);
saveFloorData(_local4, countryData[_local4].gameplay, _local2);
savePillarData(_local4, countryData[_local4].gameplay, _local2);
saveBoothData(_local4, countryData[_local4].gameplay, _local2);
saveFacilityData(_local4, countryData[_local4].gameplay, _local2);
saveHallData(_local4, countryData[_local4].gameplay, _local2);
saveStaffData(_local4, countryData[_local4].gameplay, _local2);
saveVisitorData(_local4, countryData[_local4].numberVisitor, _local2);
saveSpecialVisitorData(_local4, countryData[_local4].gameplay, _local2);
saveCashData(_local4, countryData[_local4].gameplay, _local2);
};
};
}
public function saveTutorialData(_arg1):void{
_arg1.data.tutorialData = new Array();
var _local2:* = 0;
while (_local2 < tutorialPass.length) {
_arg1.data.tutorialData.push(tutorialPass[_local2]);
_local2++;
};
}
public function savePopularity(_arg1:String, _arg2:MovieClip, _arg3):void{
_arg3.data.gameplayData[_arg1].popularityData = {booth:_arg2.boothPopularity, boothCompletion:_arg2.boothCompletionPopularity, visitor:_arg2.visitorPopularity};
}
public function saveExtraUpgradeData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = 0;
while (_local4 < _arg2.upgradePurchaseList.length) {
_arg3.data.gameplayData[_arg1].upgradeData.push(_arg2.upgradePurchaseList[_local4].header);
_local4++;
};
}
public function saveFloorData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local5:*;
var _local6:*;
var _local7:*;
var _local4:* = 0;
while (_local4 < _arg2.floorList.length) {
_local5 = _arg2.floorList[_local4];
_local6 = new Point(_local5.x, _local5.y);
_local7 = _local5.width;
_arg3.data.gameplayData[_arg1].floorData.push({pos:_local6, floorWidth:_local7});
_local4++;
};
_local4 = 0;
while (_local4 < _arg2.basementList.length) {
_local5 = _arg2.basementList[_local4];
_local6 = new Point(_local5.x, _local5.y);
_local7 = _local5.width;
_arg3.data.gameplayData[_arg1].basementData.push({pos:_local6, floorWidth:_local7});
_local4++;
};
}
public function saveBoothData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local5:*;
var _local6:*;
var _local7:*;
var _local4:* = 0;
while (_local4 < _arg2.boothList.length) {
_local5 = _arg2.boothList[_local4];
_local6 = BoothList.compareNameByType(Utility.getClass(_local5));
_local7 = _arg2.floorList.indexOf(_local5.onFloor);
_arg3.data.gameplayData[_arg1].boothData.push({boothType:_local6, idName:_local5.name, boothName:_local5.boothName, boothLevel:_local5.boothLevel, pos:new Point(_local5.x, _local5.y), floorPos:_local7, broken:_local5.boothBroken, revenue:_local5.revenue, visitorVisit:_local5.visitorVisit});
_local4++;
};
}
public function saveFacilityData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local5:*;
var _local6:*;
var _local7:*;
var _local4:* = 0;
while (_local4 < _arg2.facilityList.length) {
_local5 = _arg2.facilityList[_local4];
_local6 = BoothList.compareNameByType(Utility.getClass(_local5));
if ((_local5 is FacilityElevator)){
saveElevator(_arg1, _local5, _arg3);
} else {
if ((_local5 is FacilityEscalator)){
saveEscalator(_arg1, _local5, _arg3);
} else {
if ((_local5 is FacilityParkingLot)){
saveParkingLot(_arg1, _local5, _arg3);
} else {
if ((_local5 is FacilitySubway)){
saveSubway(_arg1, _local5, _arg3);
} else {
_local7 = _arg2.floorList.indexOf(_local5.onFloor);
_arg3.data.gameplayData[_arg1].facilityData.push({boothType:_local6, boothLevel:_local5.boothLevel, broken:_local5.boothBroken, pos:new Point(_local5.x, _local5.y), floorPos:_local7});
};
};
};
};
_local4++;
};
}
public function saveHallData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:*;
var _local5:*;
if (_arg2.hall != null){
_local4 = _arg2.hall;
_local5 = _arg2.floorList.indexOf(_local4.onFloor);
_arg3.data.gameplayData[_arg1].hallData = {boothLevel:_local4.boothLevel, pos:new Point(_local4.x, _local4.y), floorPos:_local5, revenue:_local4.revenue, addEventCost:_local4.addEventCost, currentEvent:_local4.currentEvent, dayEventLeft:_local4.dayEventLeft, dayPassEvent:_local4.dayPassEvent, stillBooking:_local4.stillBooking, visitorVisit:_local4.visitorVisit};
};
}
public function saveElevator(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = new Array();
var _local5:* = _arg2;
var _local6:* = 0;
while (_local6 < _local5.roomList.length) {
_local4.push(new Point(_local5.roomList[_local6].x, _local5.roomList[_local6].y));
_local6++;
};
_arg3.data.gameplayData[_arg1].facilityData.push({boothType:BoothList.compareNameByType(FacilityElevator), boothLevel:_local5.boothLevel, pos:new Point(_local5.x, _local5.y), room:_local4});
}
public function saveEscalator(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = _arg2;
var _local5:* = _local4.parent;
var _local6:* = _local4.world;
var _local7:* = _local6.containerEscalator.indexOf(_local5);
if (!(_local7 in _local6.containerEscalator)){
_local7 = -((_local6.containerBEscalator.indexOf(_local5) + 1));
};
_arg3.data.gameplayData[_arg1].facilityData.push({boothType:BoothList.compareNameByType(FacilityEscalator), boothLevel:_local4.boothLevel, pos:new Point(_local4.x, _local4.y), dirrection:_local4.scaleX, parentContainer:_local7});
}
public function saveParkingLot(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = BoothList.compareNameByType(Utility.getClass(_arg2));
var _local5:* = _arg2.world;
var _local6:* = _local5.basementList.indexOf(_arg2.onFloor);
var _local7:* = _arg2;
_arg3.data.gameplayData[_arg1].facilityData.push({boothType:_local4, boothLevel:_arg2.boothLevel, pos:new Point(_local7.x, _local7.y), floorPos:_local6});
}
public function saveSubway(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = BoothList.compareNameByType(Utility.getClass(_arg2));
var _local5:* = _arg2.world;
var _local6:* = _local5.basementList.indexOf(_arg2.onFloor);
var _local7:* = _arg2;
_arg3.data.gameplayData[_arg1].facilityData.push({boothType:_local4, pos:new Point(_local7.x, _local7.y), floorPos:_local6});
}
public function savePillarData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local5:*;
var _local4:* = 0;
while (_local4 < _arg2.pillarList.length) {
_local5 = _arg2.pillarList[_local4];
_arg3.data.gameplayData[_arg1].pillarData.push({pos:new Point(_local5.x, _local5.y)});
_local4++;
};
}
public function saveStaffData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local6:*;
var _local7:*;
var _local8:*;
var _local4:* = _arg2.janitorList.concat(_arg2.electricianList.concat(_arg2.securityList.concat(_arg2.entertainerList)));
var _local5:* = 0;
while (_local5 < _local4.length) {
_local6 = _local4[_local5];
_local7 = VisitorList.compareNameByType(Utility.getClass(_local6));
_local8 = ((_local6 is CrewEntertainer)) ? _local6.model : -1;
_arg3.data.gameplayData[_arg1].staffData.push({staffType:_local7, employeeLevel:_local6.employeeLevel, workArea:_local6.workArea, startWorkTime:_local6.startWorkTime, finishWorkTime:_local6.finishWorkTime, exp:_local6.experience, recoverySta:_local6.recoveryStamina, stamina:_local6.stamina, paid:_local6.paid, model:_local8});
_local5++;
};
}
public function saveVisitorData(_arg1:String, _arg2:Number, _arg3):void{
_arg3.data.gameplayData[_arg1].numberVisitor = _arg2;
}
public function saveSpecialVisitorData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local5:*;
_arg3.data.gameplayData[_arg1].specialVisitorAlreadyVisit = new Array();
var _local4:* = 0;
while (_local4 < _arg2.specialVisitorAlreadyVisit.length) {
_local5 = _arg2.specialVisitorAlreadyVisit[_local4];
_arg3.data.gameplayData[_arg1].specialVisitorAlreadyVisit.push(VisitorList.getSpecialVisitorName(_local5));
_local4++;
};
}
public function saveCashData(_arg1:String, _arg2:MovieClip, _arg3):void{
var _local4:* = _arg2.cash;
var _local5:* = _arg2.cashSpent;
var _local6:* = _arg2.buildBoothReport;
var _local7:* = _arg2.buildFacilityReport;
var _local8:* = _arg2.upgradeReport;
var _local9:* = _arg2.hireReport;
var _local10:* = _arg2.extraReport;
var _local11:* = _arg2.transferInReport;
var _local12:* = _arg2.transferOutReport;
var _local13:* = _arg2.miscInReport;
var _local14:* = _arg2.miscOutReport;
var _local15:* = new Array();
var _local16:* = 0;
while (_local16 < _arg2.lastBoothReport.length) {
_local15.push({boothName:_arg2.lastBoothReport[_local16].boothName, visit:_arg2.lastBoothReport[_local16].visit, revenue:_arg2.lastBoothReport[_local16].revenue});
_local16++;
};
var _local17:* = _arg2.lastBuildBoothReport;
var _local18:* = _arg2.lastBuildFacilityReport;
var _local19:* = _arg2.lastUpgradeReport;
var _local20:* = _arg2.lastHireReport;
var _local21:* = new Array();
_local16 = 0;
while (_local16 < _arg2.lastStaffReport.length) {
_local21.push({staffType:_arg2.lastStaffReport[_local16].staffType, single:_arg2.lastStaffReport[_local16].single, multi:_arg2.lastStaffReport[_local16].multi, staffNumber:_arg2.lastStaffReport[_local16].staffNumber, staffPaid:_arg2.lastStaffReport[_local16].staffPaid});
_local16++;
};
var _local22:* = _arg2.lastExtraReport;
var _local23:* = _arg2.lastTransferInReport;
var _local24:* = _arg2.lastTransferOutReport;
var _local25:* = _arg2.lastMiscInReport;
var _local26:* = _arg2.lastMiscOutReport;
var _local27:* = _arg2.lastHallIsExist;
var _local28:* = _arg2.lastHallVisitorVisit;
var _local29:* = _arg2.lastHallRevenue;
var _local30:* = _arg2.lastHallEventCost;
_arg3.data.gameplayData[_arg1].cashData = {cash:_local4, cashSpent:_local5, report:{buildBooth:_local6, buildFacility:_local7, upgrade:_local8, hire:_local9, extra:_local10, transferIn:_local11, transferOut:_local12, miscIn:_local13, miscOut:_local14}, lastReport:{booth:_local15, buildBooth:_local17, buildFacility:_local18, upgrade:_local19, hire:_local20, staff:_local21, extra:_local22, transferIn:_local23, transferOut:_local24, miscIn:_local25, miscOut:_local26, hallIsExist:_local27, hallVisitorVisit:_local28, hallRevenue:_local29, hallEventCost:_local30}};
}
public function loadGame(_arg1):void{
var _local2:*;
var _local3:*;
if (_arg1.data.playerName){
playerName = _arg1.data.playerName;
dayPass = _arg1.data.dayPass;
cityUnlocked = _arg1.data.cityUnlocked.concat();
tutorialPass = new Array();
tipsGain = new Array();
newTips = new Array();
tutorialShown = _arg1.data.tutorialShown;
cameraShown = _arg1.data.cameraShown;
transferCountdown = (_arg1.data.transferCountdown) ? _arg1.data.transferCountdown : 0;
if (_arg1.data.transferData != null){
_local2 = _arg1.data.transferData;
transferData = {fromCountry:_local2.fromCountry, targetCountry:_local2.targetCountry, amount:_local2.amount, transDelay:_local2.transDelay};
};
if (_arg1.data.tutorialData){
_local3 = 0;
while (_local3 < _arg1.data.tutorialData.length) {
tutorialPass.push(_arg1.data.tutorialData[_local3]);
_local3++;
};
};
if (_arg1.data.tipsGain){
tipsGain = _arg1.data.tipsGain.concat();
};
if (_arg1.data.newTips){
newTips = _arg1.data.newTips.concat();
};
loadGameplay(_arg1);
loadSpecialVisitorData(_arg1);
loadExtraUpgrade(_arg1);
loadFloorData(_arg1);
loadEmptySpace();
loadPillarData(_arg1);
loadBoothData(_arg1);
loadFacilityData(_arg1);
loadHallData(_arg1);
loadStaffData(_arg1);
loadCashData(_arg1);
};
}
public function countDownTutorial(_arg1:Event):void{
if (tutorialTime > 0){
tutorialTime--;
if (tutorialTime <= 0){
tutorialTime = 0;
tutorialEnd();
};
};
}
public function loadGameplay(_arg1):void{
var _local2:*;
var _local3:*;
countryData = new Array();
for (_local2 in _arg1.data.gameplayData) {
_local3 = new Gameplay();
_local3.firstVisit = false;
countryData[_local2] = {gameplay:_local3, updated:true, numberVisitor:_arg1.data.gameplayData[_local2].numberVisitor, numberVillain:0, numberBandit:0, averageMood:50};
countryData[_local2].gameplay.gameHour = _arg1.data.gameHour;
countryData[_local2].gameplay.gameMinute = _arg1.data.gameMinute;
countryData[_local2].gameplay.boothPopularity = _arg1.data.gameplayData[_local2].popularityData.booth;
countryData[_local2].gameplay.boothCompletionPopularity = _arg1.data.gameplayData[_local2].popularityData.boothCompletion;
countryData[_local2].gameplay.visitorPopularity = _arg1.data.gameplayData[_local2].popularityData.visitor;
countryData[_local2].gameplay.totalBanditCaptured = (_arg1.data.gameplayData[_local2].totalBanditCaptured) ? _arg1.data.gameplayData[_local2].totalBanditCaptured : 0;
countryData[_local2].gameplay.totalVillainCaptured = (_arg1.data.gameplayData[_local2].totalVillainCaptured) ? _arg1.data.gameplayData[_local2].totalVillainCaptured : 0;
countryData[_local2].gameplay.banditCaptured = (_arg1.data.gameplayData[_local2].banditCaptured) ? _arg1.data.gameplayData[_local2].banditCaptured : 0;
countryData[_local2].gameplay.villainCaptured = (_arg1.data.gameplayData[_local2].villainCaptured) ? _arg1.data.gameplayData[_local2].villainCaptured : 0;
countryData[_local2].gameplay.missionActive = _arg1.data.gameplayData[_local2].mission;
countryData[_local2].gameplay.specialVisitorAlreadyVisit = new Array();
countryData[_local2].gameplay.crime = (_arg1.data.gameplayData[_local2].crime) ? _arg1.data.gameplayData[_local2].crime : 0;
countryData[_local2].gameplay.missionVar = (_arg1.data.gameplayData[_local2].missionVar) ? _arg1.data.gameplayData[_local2].missionVar : 0;
countryData[_local2].gameplay.loadMaxVisitor();
};
tGameHour = _arg1.data.gameHour;
tGameMinute = _arg1.data.gameMinute;
}
public function loadSpecialVisitorData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
for (_local2 in _arg1.data.gameplayData) {
if (_arg1.data.gameplayData[_local2].specialVisitorAlreadyVisit != null){
for (_local3 in _arg1.data.gameplayData[_local2].specialVisitorAlreadyVisit) {
_local4 = _arg1.data.gameplayData[_local2].specialVisitorAlreadyVisit[_local3];
countryData[_local2].gameplay.specialVisitorAlreadyVisit.push(VisitorList.getSpecialVisitorType(_local4));
};
};
};
}
public function loadExtraUpgrade(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
for (_local2 in _arg1.data.gameplayData) {
for (_local3 in _arg1.data.gameplayData[_local2].upgradeData) {
_local4 = _arg1.data.gameplayData[_local2].upgradeData[_local3];
countryData[_local2].gameplay.upgradePurchaseList.push(UpgradeList.getUpgradeByName(_local4));
};
};
}
public function loadFloorData(_arg1):void{
var i:*;
var j:*;
var temp:*;
var newClip:*;
var conIndex:*;
var so = _arg1;
for (i in so.data.gameplayData) {
for (j in so.data.gameplayData[i].floorData) {
temp = so.data.gameplayData[i].floorData[j];
countryData[i].gameplay.addFloor(temp.pos.x, temp.pos.y, temp.floorWidth);
};
for (j in so.data.gameplayData[i].basementData) {
temp = so.data.gameplayData[i].basementData[j];
newClip = new Floor();
newClip.x = temp.pos.x;
newClip.y = temp.pos.y;
newClip.setWidth(temp.floorWidth);
var _local7 = countryData[i].gameplay;
with (_local7) {
containerBasement.addChild(newClip);
basementList.push(newClip);
if (j == 0){
conIndex = getChildIndex(containerVisitor[0]);
} else {
conIndex = getChildIndex(containerBVisitor[(j - 1)]);
};
containerBVisitor.push(new MovieClip());
addChildAt(containerBVisitor[(containerBVisitor.length - 1)], (conIndex + 1));
containerBEscalator.push(new MovieClip());
addChildAt(containerBEscalator[(containerBEscalator.length - 1)], (conIndex + 1));
};
};
};
}
public function loadBoothData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
for (_local2 in _arg1.data.gameplayData) {
for (_local3 in _arg1.data.gameplayData[_local2].boothData) {
_local4 = _arg1.data.gameplayData[_local2].boothData[_local3];
_local5 = BoothList.compareTypeByName(_local4.boothType);
_local6 = new (_local5);
_local6.x = _local4.pos.x;
_local6.y = _local4.pos.y;
_local6.boothName = _local4.boothName;
_local6.boothLevel = _local4.boothLevel;
_local6.boothBroken = _local4.broken;
_local6.boothOpen = (((countryData[_local2].gameplay.gameHour >= 9)) && ((countryData[_local2].gameplay.gameHour < 22)));
_local6.name = _local4.idName;
_local6.revenue = _local4.revenue;
_local6.visitorVisit = _local4.visitorVisit;
if ((_local4.floorPos in countryData[_local2].gameplay.floorList)){
_local6.onFloor = countryData[_local2].gameplay.floorList[_local4.floorPos];
} else {
_local6.onFloor = null;
};
_local6.world = countryData[_local2].gameplay;
_local7 = [];
_local8 = 0;
while (_local8 < countryData[_local2].gameplay.emptyList.length) {
_local9 = countryData[_local2].gameplay.emptyList[_local8];
if (_local9.y == _local6.y){
if ((((_local9.x >= (_local6.x - (_local6.colArea.width / 2)))) && ((_local9.x <= (_local6.x + (_local6.colArea.width / 2)))))){
_local7.push(_local9);
};
};
_local8++;
};
removeEmptyList(_local7, countryData[_local2].gameplay.emptyList);
countryData[_local2].gameplay.containerBooth.addChild(_local6);
countryData[_local2].gameplay.boothList.push(_local6);
};
};
}
public function removeEmptyList(_arg1:Array, _arg2:Array):void{
var _local3:*;
var _local4:*;
while (_arg1.length > 0) {
_local3 = _arg1.shift();
_local4 = _arg2.indexOf(_local3);
if (_local4 >= 0){
_arg2.splice(_local4, 1);
};
if (_local3.parent != null){
_local3.parent.removeChild(_local3);
};
};
}
public function loadFacilityData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
for (_local2 in _arg1.data.gameplayData) {
for (_local3 in _arg1.data.gameplayData[_local2].facilityData) {
_local4 = _arg1.data.gameplayData[_local2].facilityData[_local3];
_local5 = BoothList.compareTypeByName(_local4.boothType);
if (_local5 == FacilityElevator){
_local6 = loadElevator(_arg1.data.gameplayData[_local2].facilityData[_local3], _local2);
} else {
if (_local5 == FacilityEscalator){
_local6 = loadEscalator(_arg1.data.gameplayData[_local2].facilityData[_local3], _local2);
} else {
if (_local5 == FacilityParkingLot){
_local6 = loadParkingLot(_arg1.data.gameplayData[_local2].facilityData[_local3], _local2);
} else {
if (_local5 == FacilitySubway){
_local6 = loadSubway(_arg1.data.gameplayData[_local2].facilityData[_local3], _local2);
} else {
_local6 = new (_local5);
_local6.x = _local4.pos.x;
_local6.y = _local4.pos.y;
_local6.boothLevel = _local4.boothLevel;
_local6.boothBroken = _local4.broken;
if ((_local4.floorPos in countryData[_local2].gameplay.floorList)){
_local6.onFloor = countryData[_local2].gameplay.floorList[_local4.floorPos];
} else {
_local6.onFloor = null;
};
_local7 = [];
_local8 = 0;
while (_local8 < countryData[_local2].gameplay.emptyList.length) {
_local9 = countryData[_local2].gameplay.emptyList[_local8];
if (_local9.y == _local6.y){
if (_local6.colArea){
if ((((_local9.x >= (_local6.x - (_local6.colArea.width / 2)))) && ((_local9.x <= (_local6.x + (_local6.colArea.width / 2)))))){
_local7.push(_local9);
};
} else {
if ((((_local9.x >= (_local6.x - (_local6.width / 2)))) && ((_local9.x <= (_local6.x + (_local6.width / 2)))))){
_local7.push(_local9);
};
};
};
_local8++;
};
removeEmptyList(_local7, countryData[_local2].gameplay.emptyList);
if (_local5 == FacilityRestroom){
countryData[_local2].gameplay.restroomList.push(_local6);
} else {
if (_local5 == FacilityATM){
countryData[_local2].gameplay.atmList.push(_local6);
} else {
if (_local5 == FacilityTerrace){
countryData[_local2].gameplay.terraceList.push(_local6);
};
};
};
};
};
};
};
if (_local6 != null){
_local6.world = countryData[_local2].gameplay;
if (!(_local6 is FacilityEscalator)){
countryData[_local2].gameplay.containerBooth.addChild(_local6);
};
countryData[_local2].gameplay.facilityList.push(_local6);
};
};
};
}
public function loadHallData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
for (_local2 in _arg1.data.gameplayData) {
if (_arg1.data.gameplayData[_local2].hallData != null){
_local3 = _arg1.data.gameplayData[_local2].hallData;
_local4 = new Hall();
_local4.x = _local3.pos.x;
_local4.y = _local3.pos.y;
_local4.boothLevel = _local3.boothLevel;
_local4.currentEvent = _local3.currentEvent;
_local4.dayEventLeft = _local3.dayEventLeft;
_local4.dayPassEvent = (_local3.dayPassEvent) ? _local3.dayPassEvent : 0;
_local4.stillBooking = _local3.stillBooking;
_local4.boothOpen = ((((!((_local4.currentEvent == "none"))) && (!(_local4.stillBooking)))) && ((((countryData[_local2].gameplay.gameHour >= 12)) && ((countryData[_local2].gameplay.gameHour < 19)))));
_local4.revenue = _local3.revenue;
_local4.visitorVisit = _local3.visitorVisit;
_local4.addEventCost = _local3.addEventCost;
if ((_local3.floorPos in countryData[_local2].gameplay.floorList)){
_local4.onFloor = countryData[_local2].gameplay.floorList[_local3.floorPos];
} else {
_local4.onFloor = null;
};
_local4.world = countryData[_local2].gameplay;
_local5 = [];
_local6 = 0;
while (_local6 < countryData[_local2].gameplay.emptyList.length) {
_local7 = countryData[_local2].gameplay.emptyList[_local6];
if (_local7.y == _local4.y){
if ((((_local7.x >= (_local4.x - (_local4.hallColArea.width / 2)))) && ((_local7.x <= (_local4.x + (_local4.hallColArea.width / 2)))))){
_local5.push(_local7);
};
};
_local6++;
};
removeEmptyList(_local5, countryData[_local2].gameplay.emptyList);
countryData[_local2].gameplay.containerBooth.addChild(_local4);
countryData[_local2].gameplay.hall = _local4;
};
};
}
public function loadElevator(_arg1:Object, _arg2:String):MovieClip{
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local3:* = new FacilityElevator();
_local3.InitFromLoad();
_local3.elevatorBody.parent.removeChild(_local3.elevatorBody);
_local3.x = _arg1.pos.x;
_local3.y = _arg1.pos.y;
_local3.boothLevel = _arg1.boothLevel;
var _local4:* = 0;
while (_local4 < _arg1.room.length) {
_local5 = new ElevatorBody();
_local5.gotoAndStop(_local3.boothLevel);
_local5.x = _arg1.room[_local4].x;
_local5.y = _arg1.room[_local4].y;
_local3.roomList.push(_local5);
_local3.waitingList.push(new Array());
_local3.addChild(_local5);
_local6 = [];
_local7 = 0;
while (_local7 < countryData[_arg2].gameplay.emptyList.length) {
_local8 = countryData[_arg2].gameplay.emptyList[_local7];
if (_local8.y == (_local3.y + _local5.y)){
if ((((_local8.x >= (_local3.x + (_local5.x - (_local5.width / 2))))) && ((_local8.x <= (_local3.x + (_local5.x + (_local5.width / 2))))))){
_local6.push(_local8);
};
};
_local7++;
};
removeEmptyList(_local6, countryData[_arg2].gameplay.emptyList);
_local4++;
};
_local3.elevatorWire.y = _local3.roomList[0].y;
_local3.elevatorWire.height = _local3.height;
countryData[_arg2].gameplay.elevatorList.push(_local3);
return (_local3);
}
public function loadParkingLot(_arg1:Object, _arg2:String):MovieClip{
var _local3:* = BoothList.compareTypeByName(_arg1.boothType);
var _local4:* = new (_local3);
_local4.x = _arg1.pos.x;
_local4.y = _arg1.pos.y;
_local4.boothLevel = (_arg1.boothLevel) ? _arg1.boothLevel : 1;
if ((_arg1.floorPos in countryData[_arg2].gameplay.basementList)){
_local4.onFloor = countryData[_arg2].gameplay.basementList[_arg1.floorPos];
} else {
_local4.onFloor = null;
};
countryData[_arg2].gameplay.parkingList.push(_local4);
return (_local4);
}
public function loadSubway(_arg1:Object, _arg2:String):MovieClip{
var _local3:* = BoothList.compareTypeByName(_arg1.boothType);
var _local4:* = new (_local3);
_local4.x = _arg1.pos.x;
_local4.y = _arg1.pos.y;
if ((_arg1.floorPos in countryData[_arg2].gameplay.basementList)){
_local4.onFloor = countryData[_arg2].gameplay.basementList[_arg1.floorPos];
} else {
_local4.onFloor = null;
};
countryData[_arg2].gameplay.subwayList.push(_local4);
return (_local4);
}
public function loadEscalator(_arg1:Object, _arg2:String):MovieClip{
var _local3:* = new FacilityEscalator();
_local3.x = _arg1.pos.x;
_local3.y = _arg1.pos.y;
_local3.scaleX = _arg1.dirrection;
_local3.boothLevel = _arg1.boothLevel;
countryData[_arg2].gameplay.escalatorList.push(_local3);
var _local4:* = _arg1.parentContainer;
if (_local4 >= 0){
if ((_local4 in countryData[_arg2].gameplay.containerEscalator)){
countryData[_arg2].gameplay.containerEscalator[_local4].addChild(_local3);
};
} else {
_local4 = (Math.abs(_local4) - 1);
if ((_local4 in countryData[_arg2].gameplay.containerBEscalator)){
countryData[_arg2].gameplay.containerBEscalator[_local4].addChild(_local3);
};
};
return (_local3);
}
public function loadPillarData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
for (_local2 in _arg1.data.gameplayData) {
Utility.clearArray(countryData[_local2].gameplay.pillarList);
while (countryData[_local2].gameplay.containerPillar.numChildren > 0) {
countryData[_local2].gameplay.containerPillar.removeChildAt(0);
};
for (_local3 in _arg1.data.gameplayData[_local2].pillarData) {
_local4 = _arg1.data.gameplayData[_local2].pillarData[_local3];
countryData[_local2].gameplay.addPillar(_local4.pos.x, _local4.pos.y);
};
};
}
public function loadStaffData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
for (_local2 in _arg1.data.gameplayData) {
for (_local3 in _arg1.data.gameplayData[_local2].staffData) {
_local4 = _arg1.data.gameplayData[_local2].staffData[_local3];
_local5 = VisitorList.compareTypeByName(_local4.staffType);
_local6 = new (_local5);
_local6.world = countryData[_local2].gameplay;
_local6.employeeLevel = _local4.employeeLevel;
_local6.workArea = _local4.workArea;
_local6.startWorkTime = _local4.startWorkTime;
_local6.finishWorkTime = _local4.finishWorkTime;
_local6.experience = _local4.exp;
_local6.recoveryStamina = _local4.recoverySta;
_local6.stamina = _local4.stamina;
_local6.paid = _local4.paid;
if ((_local6 is CrewJanitor)){
countryData[_local2].gameplay.janitorList.push(_local6);
} else {
if ((_local6 is CrewElectrician)){
countryData[_local2].gameplay.electricianList.push(_local6);
} else {
if ((_local6 is CrewSecurity)){
countryData[_local2].gameplay.securityList.push(_local6);
} else {
if ((_local6 is CrewEntertainer)){
_local6.model = _local4.model;
countryData[_local2].gameplay.entertainerList.push(_local6);
};
};
};
};
};
};
}
public function loadEmptySpace():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
for (_local1 in countryData) {
_local2 = countryData[_local1].gameplay;
Utility.clearArray(_local2.emptyList);
while (_local2.containerEmpty.numChildren > 0) {
_local2.containerEmpty.removeChildAt(0);
};
for (_local3 in _local2.floorList) {
_local4 = _local2.floorList[_local3];
_local2.createEmptySpace((_local4.x - (_local4.width / 2)), (_local4.x + (_local4.width / 2)), ((_local4.y + _local4.height) + 72));
};
};
}
public function loadCashData(_arg1):void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
for (_local2 in countryData) {
_local3 = countryData[_local2].gameplay;
_local4 = _arg1.data.gameplayData[_local2].cashData;
_local3.profit = 0;
_local3.cash = _local4.cash;
_local3.cashSpent = _local4.cashSpent;
_local3.buildBoothReport = _local4.report.buildBooth;
_local3.buildFacilityReport = _local4.report.buildFacility;
_local3.upgradeReport = _local4.report.upgrade;
_local3.hireReport = _local4.report.hire;
_local3.extraReport = _local4.report.extra;
_local3.transferInReport = _local4.report.transferIn;
_local3.transferOutReport = _local4.report.transferOut;
_local3.miscInReport = _local4.report.miscIn;
_local3.miscOutReport = _local4.report.miscOut;
_local3.lastBoothReport = new Array();
_local5 = 0;
while (_local5 < _local4.lastReport.booth.length) {
_local6 = _local4.lastReport.booth[_local5];
_local3.lastBoothReport.push({boothName:_local6.boothName, visit:_local6.visit, revenue:_local6.revenue});
_local3.profit = (_local3.profit + _local6.revenue);
_local5++;
};
_local3.lastBuildBoothReport = _local4.lastReport.buildBooth;
_local3.profit = (_local3.profit - _local4.lastReport.buildBooth);
_local3.lastBuildFacilityReport = _local4.lastReport.buildFacility;
_local3.profit = (_local3.profit - _local4.lastReport.buildFacility);
_local3.lastUpgradeReport = _local4.lastReport.upgrade;
_local3.profit = (_local3.profit - _local4.lastReport.upgrade);
_local3.lastHireReport = _local4.lastReport.hire;
_local3.profit = (_local3.profit - _local4.lastReport.hire);
_local3.lastStaffReport = new Array();
_local5 = 0;
while (_local5 < _local4.lastReport.staff.length) {
_local6 = _local4.lastReport.staff[_local5];
_local3.lastStaffReport.push({staffType:_local6.staffType, single:_local6.single, multi:_local6.multi, staffNumber:_local6.staffNumber, staffPaid:_local6.staffPaid});
_local3.profit = (_local3.profit - _local6.staffPaid);
_local5++;
};
_local3.lastExtraReport = _local4.lastReport.extra;
_local3.profit = (_local3.profit - _local4.lastReport.extra);
_local3.lastTransferInReport = _local4.lastReport.transferIn;
_local3.profit = (_local3.profit + _local4.lastReport.transferIn);
_local3.lastTransferOutReport = _local4.lastReport.transferOut;
_local3.profit = (_local3.profit - _local4.lastReport.transferOut);
_local3.lastMiscInReport = _local4.lastReport.miscIn;
_local3.profit = (_local3.profit + _local4.lastReport.miscIn);
_local3.lastMiscOutReport = _local4.lastReport.miscOut;
_local3.profit = (_local3.profit - _local4.lastReport.miscOut);
_local3.lastHallIsExist = (_local4.lastReport.hallIsExist) ? _local4.lastReport.hallIsExist : false;
if (_local3.lastHallIsExist){
_local3.lastHallVisitorVisit = _local4.lastReport.hallVisitorVisit;
_local3.lastHallRevenue = _local4.lastReport.hallRevenue;
_local3.lastHallEventCost = _local4.lastReport.hallEventCost;
_local3.profit = (_local3.profit + (_local4.lastReport.hallRevenue) ? _local4.lastReport.hallRevenue : 0);
_local3.profit = (_local3.profit - (_local4.lastReport.hallEventCost) ? _local4.lastReport.hllEventCost : 0);
};
};
}
public function resetData():void{
lastGameplay = null;
countryData = new Array();
cityUnlocked = new Array();
}
public function dataIsExist():Boolean{
var _local2:*;
var _local1:* = false;
if (autoSaveData.data.playerName){
_local1 = true;
} else {
_local2 = 0;
while (_local2 < saveData.length) {
if (saveData[_local2].data.playerName){
_local1 = true;
break;
};
_local2++;
};
};
return (_local1);
}
public function numberCountryData():Number{
var _local4:*;
var _local1:* = 0;
var _local2:* = 0;
while (_local2 < cityUnlocked.length) {
_local4 = cityUnlocked[_local2];
if ((_local4 in countryData)){
_local1++;
};
_local2++;
};
var _local3:* = currentGameplay.main;
if (!(_local3.country in countryData)){
_local1++;
};
return (_local1);
}
public function set bgmVolume(_arg1:Number):void{
_bgmVolume = _arg1;
bgmTransform.volume = (_bgmVolume * bgmEnvirontment);
}
public function get bgmVolume():Number{
return (_bgmVolume);
}
public function set sfxVolume(_arg1:Number):void{
_sfxVolume = _arg1;
dispatchEvent(new ShopGameEvent(ShopGameEvent.SFX_VOLUME_CHANGE));
}
public function get sfxVolume():Number{
return (_sfxVolume);
}
public function playSound(_arg1:Class, _arg2:Number=1):void{
sfx = new (_arg1);
sfxTransform.volume = (sfxVolume * _arg2);
sfx.play(0, 0, sfxTransform);
}
public function playBGM():void{
if (bgm != null){
bgmChannel = bgm.play(0, 0, bgmTransform);
};
}
public function correctSoundChannel():void{
bgmTransform.volume = (bgmEnvirontment * bgmVolume);
bgmChannel.soundTransform = bgmTransform;
}
public function resetBGM():void{
bgmEnvirontment = 1;
bgmChannel.stop();
bgmTransform.volume = (bgmEnvirontment * bgmVolume);
bgm = null;
}
public function unlockAchievement(_arg1:String):void{
var _local2:* = AchievementList.getAchievementByName(_arg1);
if (_local2 != null){
if (!achievementIsGain(_local2)){
achievementGain.push(_local2);
};
};
if (achievementNotice == null){
if (achievementGain.length > 0){
achievementNotice = achievementGain.shift();
announceAchievement(achievementNotice.codeName);
};
};
}
public function announceAchievement(_arg1:String):void{
playSound(SFXAnounceAchievement);
achievementData.data.completeAchievement.push(_arg1);
achievementAnouncement.gotoAndStop(1);
achievementAnouncement.pic.gotoAndStop(_arg1);
achievementAnouncement.visible = true;
achievementAnouncement.rotation = 0;
achievementAnouncement.addEventListener(Event.ENTER_FRAME, checkCloseAchievement);
TweenLite.from(achievementAnouncement, 0.3, {rotation:-90, ease:Linear.easeNone, onComplete:achievementAnouncement.play});
dispatchEvent(new ShopGameEvent(ShopGameEvent.ACHIEVEMENT_UNLOCKED));
}
public function checkCloseAchievement(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
if (_local2.currentFrame >= _local2.totalFrames){
_local2.stop();
_local2.removeEventListener(Event.ENTER_FRAME, checkCloseAchievement);
TweenLite.to(_local2, 0.3, {rotation:-90, delay:1.4, ease:Linear.easeNone, onComplete:checkNextAchievement});
};
}
public function checkNextAchievement(){
if (achievementGain.length > 0){
achievementNotice = achievementGain.shift();
announceAchievement(achievementNotice.codeName);
} else {
achievementNotice = null;
};
}
public function initAchievement():void{
var _local2:*;
if (!achievementData.data.completeAchievement){
achievementData.data.completeAchievement = new Array();
};
var _local1:* = 0;
while (_local1 < AchievementList.ACHIEVEMENT_DATA.length) {
_local2 = AchievementList.ACHIEVEMENT_DATA[_local1];
if (!achievementIsGain(_local2)){
if (_local2.listenerType != "special"){
addEventListener(_local2.listenerType, getAchievementCondition);
};
};
_local1++;
};
}
public function getAchievementCondition(_arg1:Event):void{
var _local4:*;
var _local2:* = _arg1.currentTarget;
var _local3:* = 0;
while (_local3 < AchievementList.ACHIEVEMENT_DATA.length) {
_local4 = AchievementList.ACHIEVEMENT_DATA[_local3];
if (_arg1.type == _local4.listenerType){
if (!achievementIsGain(_local4)){
if (_arg1.type == VisitorEvent.BEGIN_TRANSFORM_TO_NORMAL){
trace(_local4.codeName);
};
if (AchievementList.checkAchievementGain(this, _local4)){
unlockAchievement(_local4.codeName);
};
};
};
_local3++;
};
if (!hasSameListenerAs(_arg1.type)){
_local2.removeEventListener(_arg1.type, getAchievementCondition);
};
}
public function hasSameListenerAs(_arg1:String):Boolean{
var _local4:*;
var _local2:* = false;
var _local3:* = 0;
while (_local3 < AchievementList.ACHIEVEMENT_DATA.length) {
_local4 = AchievementList.ACHIEVEMENT_DATA[_local3];
if (!achievementIsGain(_local4)){
if (_local4.listenerType == _arg1){
_local2 = true;
break;
};
};
_local3++;
};
return (_local2);
}
public function achievementIsGain(_arg1:Object):Boolean{
return ((((((achievementData.data.completeAchievement.indexOf(_arg1.codeName) >= 0)) || ((achievementGain.indexOf(_arg1) >= 0)))) || ((achievementNotice == _arg1))));
}
public function getMaxLevelEmployeeNumber(_arg1:String="all", _arg2:Number=1):Number{
var _local6:*;
var _local7:*;
var _local3:* = 0;
var _local4:* = new Array();
_local4.push(currentGameplay.getEmployeeTypeByLevel(_arg1, 3).length);
var _local5:* = currentGameplay.main;
for (_local6 in countryData) {
if (_local6 != _local5.country){
if (_local4.length < _arg2){
_local4.push(countryData[_local6].gameplay.getEmployeeTypeByLevel(_arg1, 3).length);
} else {
_local7 = Utility.getMinIndex(_local4);
if (_local7 >= 0){
_local4[_local7] = Math.max(_local4[_local7], countryData[_local6].gameplay.getEmployeeTypeByLevel(_arg1, 3).length);
};
};
};
};
if (_local4.length < _arg2){
_local3 = 0;
} else {
_local3 = _local4[0];
_local6 = 1;
while (_local6 < _local4.length) {
_local3 = Math.min(_local3, _local4[_local6]);
_local6++;
};
};
return (_local3);
}
public function getNumberCompleteMission():Number{
var _local3:*;
var _local1:* = 0;
var _local2:* = currentGameplay.main;
if (((MissionList.isAllMissionComplete(_local2.country, currentGameplay.missionActive)) || (((MissionList.isLastMission(_local2.country, currentGameplay.missionActive)) && (_local2.missionIsSuccess))))){
_local1++;
};
for (_local3 in countryData) {
if (_local3 != _local2.country){
if (MissionList.isAllMissionComplete(_local3, countryData[_local3].gameplay.missionActive)){
_local1++;
};
};
};
return (_local1);
}
public function getSpecialVisitorAlreadyVisit():uint{
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:* = 0;
var _local2:* = currentGameplay.main;
var _local3:* = 0;
while (_local3 < VisitorList.SPECIAL_VISITOR_LIST.length) {
_local4 = VisitorList.SPECIAL_VISITOR_LIST[_local3];
_local5 = false;
if (currentGameplay.specialVisitorAlreadyVisit.indexOf(_local4) >= 0){
_local5 = true;
};
if (!_local5){
for (_local6 in countryData) {
if (_local6 != _local2.country){
if (countryData[_local6].gameplay.specialVisitorAlreadyVisit.indexOf(_local4) >= 0){
_local5 = true;
break;
};
};
};
};
if (_local5){
_local1++;
};
_local3++;
};
return (_local1);
}
public function getLowestVillainCaptured():Number{
var _local4:*;
var _local1:* = 0;
_local1 = currentGameplay.totalVillainCaptured;
var _local2:* = 1;
var _local3:* = currentGameplay.main;
for (_local4 in countryData) {
if (_local4 != _local3.country){
_local1 = Math.min(_local1, countryData[_local4].gameplay.totalVillainCaptured);
_local2++;
};
};
if (_local2 < 5){
_local1 = 0;
};
return (_local1);
}
public function getLowestCash():Number{
var _local4:*;
var _local1:* = 0;
_local1 = currentGameplay.cash;
var _local2:* = 1;
var _local3:* = currentGameplay.main;
for (_local4 in countryData) {
if (_local4 != _local3.country){
_local1 = Math.min(_local1, countryData[_local4].gameplay.cash);
_local2++;
};
};
if (_local2 < 5){
_local1 = 0;
};
return (_local1);
}
public function getKindOfFoodCenter():Number{
var _local3:*;
var _local1:* = new Array();
var _local2:* = 0;
while (_local2 < currentGameplay.boothList.length) {
_local3 = currentGameplay.boothList[_local2];
if (BoothList.FOOD_CENTER_LIST.indexOf(Utility.getClass(_local3)) >= 0){
if (_local1.indexOf(Utility.getClass(_local3)) < 0){
_local1.push(Utility.getClass(_local3));
};
};
_local2++;
};
return (_local1.length);
}
public function secretAchievementComplete():Boolean{
var _local2:*;
var _local3:*;
var _local1:* = (cityUnlocked.length >= 5);
if (_local1){
if (currentGameplay.specialVisitorAlreadyVisit.indexOf(VisitorAlnord) < 0){
_local1 = false;
};
_local2 = currentGameplay.main;
if (_local1){
for (_local3 in countryData) {
if (_local3 != _local2.country){
if (countryData[_local3].gameplay.specialVisitorAlreadyVisit.indexOf(VisitorAlnord) < 0){
_local1 = false;
break;
};
};
};
};
};
return (_local1);
}
public function addNewTips(_arg1:String):void{
if (!tipsIsExist(_arg1)){
newTips.push(_arg1);
playSound(SFXNewTips);
};
}
public function tipsIsExist(_arg1:String):Boolean{
return ((((tipsGain.indexOf(_arg1) >= 0)) || ((newTips.indexOf(_arg1) >= 0))));
}
public function linkToLG(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.littlegiantworld.com");
navigateToURL(_local2, "_blank");
}
public function linkToGamesfree(_arg1:Event):void{
var _local2:URLRequest = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
function frame1(){
countryData = new Array();
cityUnlocked = new Array();
tutorialPass = new Array();
saveData = new Array(3);
achievementGain = new Array();
transferCountdown = 0;
centerPoint = new Point((globalMask.x + (globalMask.width / 2)), (globalMask.y + (globalMask.height / 2)));
upgradeTime = 0;
tipsGain = new Array();
newTips = new Array();
tGameHour = null;
tGameMinute = null;
theRoot = root;
stop();
autoSaveData = SharedObject.getLocal("SE2_AutoSave");
i = 0;
while (i < saveData.length) {
saveData[i] = SharedObject.getLocal(("SE2_Save" + i));
i++;
};
this.tabChildren = false;
TweenPlugin.activate([TintPlugin]);
achievementData = SharedObject.getLocal("SE2_Achievement");
initAchievement();
achievementAnouncement.visible = false;
playerName = "PLAYER";
bgmTransform = new SoundTransform();
bgmChannel = new SoundChannel();
bgmEnvirontment = 1;
sfxTransform = new SoundTransform();
sfxChannel = new SoundChannel();
lastGameplay = null;
tutorialActive = "";
tutorialTime = 0;
dayPass = 1;
stage.quality = DefaultSetting.QUALITY;
bgmVolume = DefaultSetting.VOLUME;
sfxVolume = DefaultSetting.VOLUME;
tutorialShown = DefaultSetting.TUTORIAL_SHOWN;
cameraShown = DefaultSetting.CAMERA_SHOWN;
addEventListener(ShopFrameEvent.ENTER_SOME_FRAME, checkFrame);
addEventListener(Event.ENTER_FRAME, countDownTutorial);
nextFrame();
}
function frame2(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame3(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame4(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package ShopEmpire2_fla
Section 139
//MainTimeline (ShopEmpire2_fla.MainTimeline)
package ShopEmpire2_fla {
import flash.geom.*;
import flash.events.*;
import flash.display.*;
import flash.ui.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.text.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var preloaderClip:MovieClip;
public var mainProgram:MovieClip;
public var customContextMenu:ContextMenu;
public var temp;
public var variables2:URLVariables;
public var request2:URLRequest;
public var loader2:URLLoader;
public function MainTimeline(){
addFrameScript(0, frame1);
}
public function loading(_arg1:ProgressEvent):void{
var _local2:Number = _arg1.bytesLoaded;
var _local3:Number = _arg1.bytesTotal;
var _local4:Number = ((_local2 / _local3) * 100);
preloaderClip.preloadPercent = _local4;
}
public function completes(_arg1:Event):void{
if (preloaderClip.loadTreshold < 10){
this.nextFrame();
};
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.removeEventListener(Event.COMPLETE, completes);
}
public function lgLink(_arg1:ContextMenuEvent):void{
var _local2:URLRequest = new URLRequest("http://www.littlegiantworld.com");
navigateToURL(_local2, "_blank");
}
function frame1(){
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
temp = new ContextMenuItem("LITTLEGIANTWORLD");
temp.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, lgLink);
customContextMenu.customItems.push(temp);
contextMenu = customContextMenu;
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, loading);
this.loaderInfo.addEventListener(Event.COMPLETE, completes);
stage.showDefaultContextMenu = false;
stop();
if (loaderInfo.url.substring(0, 4) != "file"){
Security.allowDomain("*");
Security.loadPolicyFile("http://track.g-bot.net/crossdomain.xml");
variables2 = new URLVariables();
variables2.id = "shopempire2";
variables2.ui = loaderInfo.url;
request2 = new URLRequest("http://track.g-bot.net/track.php");
request2.method = "POST";
request2.data = variables2;
loader2 = new URLLoader();
loader2.load(request2);
};
}
}
}//package ShopEmpire2_fla
Section 140
//Menu_136 (ShopEmpire2_fla.Menu_136)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Menu_136 extends MovieClip {
public var btnClose:SimpleButton;
public var slot1:MovieClip;
public var slot2:MovieClip;
public var slot3:MovieClip;
public var autoSaveSlot:MovieClip;
public var tRoot;
public var theRoot;
public var slotList;
public var i;
public var loadData;
public function Menu_136(){
addFrameScript(0, frame1);
}
public function initSlot():void{
if (theRoot.autoSaveData.data.playerName){
autoSaveSlot.gotoAndStop(1);
autoSaveSlot.enabled = true;
autoSaveSlot.setTextSlot(theRoot.autoSaveData);
} else {
autoSaveSlot.gotoAndStop(2);
autoSaveSlot.enabled = false;
};
var _local1:* = 0;
while (_local1 < slotList.length) {
if (theRoot.saveData[_local1].data.playerName){
slotList[_local1].gotoAndStop(1);
slotList[_local1].enabled = true;
slotList[_local1].setTextSlot(theRoot.saveData[_local1]);
} else {
slotList[_local1].gotoAndStop(2);
slotList[_local1].enabled = false;
};
_local1++;
};
}
public function onMouseOver(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = new GlowFilter();
_local3.color = 0xCC0099;
_local3.alpha = 0.8;
_local3.blurX = 10;
_local3.blurY = 10;
_local3.strength = 25;
_local2.filters = [_local3];
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 204, 0, 153, 0);
_local2.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
};
}
public function onMouseOut(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.filters = [];
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
public function onMouseClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if ((slotList.indexOf(_local2) in theRoot.saveData)){
loadData = theRoot.saveData[slotList.indexOf(_local2)];
} else {
loadData = theRoot.autoSaveData;
};
revealConfirmation();
};
}
public function revealConfirmation():void{
var _local1:* = this.parent;
btnClose.enabled = false;
autoSaveSlot.enabled = false;
var _local2:* = 0;
while (_local2 < slotList.length) {
slotList[_local2].enabled = false;
_local2++;
};
var _local3:* = new UI_ConfirmationOnLoad();
_local3.x = (_local1.drawArea.width / 2);
_local3.y = (_local1.drawArea.height / 2);
_local1.addChild(_local3);
TweenLite.from(_local3, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut});
_local3.addEventListener(MouseEvent.CLICK, confirmationLoad);
_local3.addEventListener(Event.REMOVED_FROM_STAGE, confirmationRemoved);
}
public function confirmationLoad(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _arg1.target;
if (_local3 == _local2.btnYes){
theRoot.loadGame(loadData);
dispatchEvent(new ShopGameEvent(ShopGameEvent.BEGIN_LOAD_GAME));
} else {
if (_local3 == _local2.btnNo){
TweenLite.to(_local2, 0.5, {scaleX:0, scaleY:0, onComplete:_local2.parent.removeChild, onCompleteParams:[_local2]});
};
};
}
public function confirmationRemoved(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
btnClose.enabled = true;
if (autoSaveSlot.currentFrame == 1){
autoSaveSlot.enabled = true;
};
var _local3:* = 0;
while (_local3 < slotList.length) {
if (slotList[_local3].currentFrame == 1){
slotList[_local3].enabled = true;
};
_local3++;
};
_local2.removeEventListener(MouseEvent.CLICK, confirmationLoad);
_local2.removeEventListener(Event.REMOVED_FROM_STAGE, confirmationRemoved);
}
function frame1(){
tRoot = this.root;
theRoot = tRoot.mainProgram;
autoSaveSlot.slotNotice.text = "Auto Save";
slot1.slotNotice.text = "Slot 1";
slot2.slotNotice.text = "Slot 2";
slot3.slotNotice.text = "Slot 3";
autoSaveSlot.stop();
autoSaveSlot.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
autoSaveSlot.addEventListener(MouseEvent.CLICK, onMouseClick);
slotList = [slot1, slot2, slot3];
i = 0;
while (i < slotList.length) {
slotList[i].stop();
slotList[i].addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
slotList[i].addEventListener(MouseEvent.CLICK, onMouseClick);
i++;
};
initSlot();
}
}
}//package ShopEmpire2_fla
Section 141
//Menu_137 (ShopEmpire2_fla.Menu_137)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import Instance.modules.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Menu_137 extends MovieClip {
public var gameTime:TextField;
public var shineSlot:MovieClip;
public var slotNotice:TextField;
public var saveTime:TextField;
public var saveDate:TextField;
public var playerName:TextField;
public var i;
public var temp;
public function Menu_137(){
addFrameScript(0, frame1, 1, frame2);
}
public function setTextSlot(_arg1):Boolean{
var saveDateTime:*;
var saveData = _arg1;
var temp:* = true;
try {
playerName.text = saveData.data.playerName;
gameTime.text = (((Utility.timeStringConversion(saveData.data.gameHour, saveData.data.gameMinute) + "\nDay(") + saveData.data.dayPass) + ")");
saveDateTime = saveData.data.saveTime;
saveDate.text = ((((saveDateTime.date + "-") + Utility.numberToDate(saveDateTime.month)) + "-") + saveDateTime.fullYear);
saveTime.text = Utility.timeStringConversion(saveDateTime.hours, saveDateTime.minutes);
} catch(e:Error) {
temp = false;
};
return (temp);
}
function frame1(){
this.buttonMode = true;
this.tabEnabled = false;
shineSlot.mouseEnabled = false;
shineSlot.stop();
i = 0;
while (i < numChildren) {
temp = getChildAt(i);
if ((temp as TextField)){
temp.mouseEnabled = false;
};
i++;
};
}
function frame2(){
this.buttonMode = true;
this.tabEnabled = false;
shineSlot.mouseEnabled = false;
shineSlot.stop();
}
}
}//package ShopEmpire2_fla
Section 142
//Menu_138 (ShopEmpire2_fla.Menu_138)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class Menu_138 extends MovieClip {
public function Menu_138(){
addFrameScript(35, frame36);
}
function frame36(){
stop();
this.visible = false;
}
}
}//package ShopEmpire2_fla
Section 143
//Preloader_1 (ShopEmpire2_fla.Preloader_1)
package ShopEmpire2_fla {
import fl.motion.*;
import flash.geom.*;
import flash.events.*;
import flash.display.*;
import flash.ui.*;
import flash.net.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.media.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.text.*;
import flash.utils.*;
import flash.xml.*;
public dynamic class Preloader_1 extends MovieClip {
public var satpam:MovieClip;
public var drawArea:MovieClip;
public var people1:MovieClip;
public var people2:MovieClip;
public var people3:MovieClip;
public var people4:MovieClip;
public var people5:MovieClip;
public var people6:MovieClip;
public var people7:MovieClip;
public var bandit:MovieClip;
public var people8:MovieClip;
public var people9:MovieClip;
public var sky:MovieClip;
public var people10:MovieClip;
public var gamesfreeLogo:MovieClip;
public var preloadPercent;
public var peopleList;
public var peopleInQueue:Array;
public var peoplePos:Array;
public var exitPeople:Object;
public var date;
public var skyPercent;
public var skyColor;
public var cTrans;
public function Preloader_1(){
addFrameScript(0, frame1);
}
public function peopleModel():void{
var _local1:* = 0;
while (_local1 < peopleList.length) {
peopleList[_local1].gotoAndStop((((_local1 + 1) * 2) - 1));
peoplePos.push(peopleList[_local1].x);
_local1++;
};
peoplePos.push(bandit.x);
}
public function shufflePeople():void{
var _local3:*;
var _local4:*;
var _local1:* = peopleList.concat();
while (_local1.length > 0) {
_local3 = Math.floor((Math.random() * _local1.length));
_local4 = _local1.splice(_local3, 1);
peopleInQueue.push(_local4[0]);
};
peopleInQueue.push(bandit);
var _local2:* = 0;
while (_local2 < peopleInQueue.length) {
peopleInQueue[_local2].x = peoplePos[_local2];
_local2++;
};
}
public function checkPercent(_arg1:Event):void{
var _local3:*;
if (exitPeople == null){
if ((100 - ((peopleInQueue.length - 2) * 10)) <= preloadPercent){
_local3 = peopleInQueue.shift();
if ((_local3.currentFrame % 2) != 0){
_local3.gotoAndStop((_local3.currentFrame + 1));
};
exitPeople = _local3;
exitPeople.addEventListener(Event.ENTER_FRAME, removeFromQueue);
satpam.gotoAndStop(3);
};
};
var _local2:* = 0;
while (_local2 < peopleInQueue.length) {
if (peopleInQueue[_local2].x < peoplePos[_local2]){
peopleInQueue[_local2].x = (peopleInQueue[_local2].x + 2);
if ((peopleInQueue[_local2].currentFrame % 2) != 0){
peopleInQueue[_local2].gotoAndStop((peopleInQueue[_local2].currentFrame + 1));
};
} else {
if ((peopleInQueue[_local2].currentFrame % 2) == 0){
peopleInQueue[_local2].gotoAndStop((peopleInQueue[_local2].currentFrame - 1));
};
};
_local2++;
};
if (bandit.x >= peoplePos[0]){
removeEventListener(Event.ENTER_FRAME, checkPercent);
bandit.scaleX = -1;
bandit.gotoAndStop(2);
satpam.gotoAndStop(2);
addEventListener(Event.ENTER_FRAME, beginingStartGame);
};
}
public function beginingStartGame(_arg1:Event):void{
var _local2:*;
if (bandit.parent != null){
bandit.x = (bandit.x - 6);
if (bandit.x <= -20){
bandit.parent.removeChild(bandit);
};
};
if (satpam.parent != null){
satpam.x = (satpam.x - 6);
if (satpam.x <= -20){
satpam.parent.removeChild(satpam);
};
};
if ((((bandit.parent == null)) && ((satpam.parent == null)))){
removeEventListener(Event.ENTER_FRAME, beginingStartGame);
_local2 = this.parent;
_local2.nextFrame();
};
}
public function removeFromQueue(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.x = (_local2.x + 3);
if ((((((_local2.x >= (drawArea.width - 90))) && ((peopleInQueue.length >= 0)))) && (!(((peopleInQueue[0].currentFrame % 2) == 0))))){
if (_local2 == exitPeople){
exitPeople = null;
};
};
if (_local2.x >= (drawArea.width + 5)){
_local2.removeEventListener(Event.ENTER_FRAME, removeFromQueue);
_local2.parent.removeChild(_local2);
};
}
public function linkToGamesfree(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
function frame1(){
preloadPercent = 0;
peopleList = new Array();
peopleList.push(people1);
peopleList.push(people2);
peopleList.push(people3);
peopleList.push(people4);
peopleList.push(people5);
peopleList.push(people6);
peopleList.push(people7);
peopleList.push(people8);
peopleList.push(people9);
peopleList.push(people10);
peopleInQueue = new Array();
peoplePos = new Array();
bandit.gotoAndStop(1);
satpam.gotoAndStop(1);
peopleModel();
shufflePeople();
date = new Date();
skyPercent = 1;
if ((((date.hours >= 7)) && ((date.hours < 17)))){
skyPercent = 1;
} else {
if ((((date.hours >= 19)) && ((date.hours < 5)))){
skyPercent = 0;
} else {
if ((((date.hours >= 5)) && ((date.hours < 7)))){
if (date.hours == 5){
skyPercent = (date.minutes / 120);
} else {
skyPercent = ((date.minutes + 60) / 120);
};
} else {
if ((((date.hours >= 17)) && ((date.hours < 19)))){
if (date.hours == 17){
skyPercent = ((120 - date.minutes) / 120);
} else {
skyPercent = ((60 - date.minutes) / 120);
};
};
};
};
};
skyColor = Color.interpolateColor(1975592, 9884669, skyPercent);
cTrans = new ColorTransform();
cTrans.color = skyColor;
sky.transform.colorTransform = cTrans;
gamesfreeLogo.buttonMode = true;
gamesfreeLogo.addEventListener(MouseEvent.CLICK, linkToGamesfree);
addEventListener(Event.ENTER_FRAME, checkPercent);
}
}
}//package ShopEmpire2_fla
Section 144
//Preloader_9 (ShopEmpire2_fla.Preloader_9)
package ShopEmpire2_fla {
import flash.events.*;
import flash.display.*;
public dynamic class Preloader_9 extends MovieClip {
public var body:MovieClip;
public function Preloader_9(){
addFrameScript(2, frame3);
}
public function backToFrameOne(_arg1:Event):void{
if (body){
if (body.currentFrame >= body.totalFrames){
removeEventListener(Event.ENTER_FRAME, backToFrameOne);
this.gotoAndStop(1);
};
} else {
removeEventListener(Event.ENTER_FRAME, backToFrameOne);
};
}
function frame3(){
addEventListener(Event.ENTER_FRAME, backToFrameOne);
}
}
}//package ShopEmpire2_fla
Section 145
//shoparcadelv_674 (ShopEmpire2_fla.shoparcadelv_674)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shoparcadelv_674 extends MovieClip {
public const OPEN_POS = -56;
public var closedDoorL:MovieClip;
public var closedDoorR:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shoparcadelv_674(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
if (closedDoorL.y != OPEN_POS){
TweenLite.to(closedDoorL, 0.5, {y:OPEN_POS, delay:(Math.random() * 0.5), onComplete:makeInvisible, onCompleteParams:[closedDoorL]});
};
if (closedDoorR.y != OPEN_POS){
TweenLite.to(closedDoorR, 0.5, {y:OPEN_POS, delay:(Math.random() * 0.5), onComplete:makeInvisible, onCompleteParams:[closedDoorR]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
closedDoorL.visible = true;
closedDoorR.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
TweenLite.to(closedDoorL, 0.5, {y:0, delay:(Math.random() * 0.5)});
TweenLite.to(closedDoorR, 0.5, {y:0, delay:(Math.random() * 0.5)});
}
}
}//package ShopEmpire2_fla
Section 146
//shoparcadelv_677 (ShopEmpire2_fla.shoparcadelv_677)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shoparcadelv_677 extends MovieClip {
public const OPEN_POS = -56;
public var closedDoorL:MovieClip;
public var closedDoorR:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shoparcadelv_677(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
if (closedDoorL.y != OPEN_POS){
TweenLite.to(closedDoorL, 0.5, {y:OPEN_POS, delay:(Math.random() * 0.5), onComplete:makeInvisible, onCompleteParams:[closedDoorL]});
};
if (closedDoorR.y != OPEN_POS){
TweenLite.to(closedDoorR, 0.5, {y:OPEN_POS, delay:(Math.random() * 0.5), onComplete:makeInvisible, onCompleteParams:[closedDoorR]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
closedDoorL.visible = true;
closedDoorR.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
TweenLite.to(closedDoorL, 0.5, {y:0, delay:(Math.random() * 0.5)});
TweenLite.to(closedDoorR, 0.5, {y:0, delay:(Math.random() * 0.5)});
}
}
}//package ShopEmpire2_fla
Section 147
//shoparcadelv_678 (ShopEmpire2_fla.shoparcadelv_678)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shoparcadelv_678 extends MovieClip {
public const OPEN_POS = -56;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shoparcadelv_678(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 148
//shopbabyshoplv_808 (ShopEmpire2_fla.shopbabyshoplv_808)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbabyshoplv_808 extends MovieClip {
public var door:shopbabyshopdoor;
public var enterance:MovieClip;
public function shopbabyshoplv_808(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 149
//shopbabyshoplv_810 (ShopEmpire2_fla.shopbabyshoplv_810)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbabyshoplv_810 extends MovieClip {
public var door:shopbabyshopdoor2;
public var enterance:MovieClip;
public function shopbabyshoplv_810(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 150
//shopbabyshoplv_812 (ShopEmpire2_fla.shopbabyshoplv_812)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbabyshoplv_812 extends MovieClip {
public var door:shopbabyshopdoor3;
public var enterance:MovieClip;
public function shopbabyshoplv_812(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 151
//shopbookstorelv_821 (ShopEmpire2_fla.shopbookstorelv_821)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbookstorelv_821 extends MovieClip {
public var door:shopbookstoredoor1;
public var enterance:MovieClip;
public function shopbookstorelv_821(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 152
//shopbookstorelv_823 (ShopEmpire2_fla.shopbookstorelv_823)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbookstorelv_823 extends MovieClip {
public var door:shopbookstoredoor2;
public var enterance:MovieClip;
public function shopbookstorelv_823(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 153
//shopbookstorelv_825 (ShopEmpire2_fla.shopbookstorelv_825)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopbookstorelv_825 extends MovieClip {
public var door:shopbookstoredoor3;
public var enterance:MovieClip;
public function shopbookstorelv_825(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 154
//shopboutiquelv_828 (ShopEmpire2_fla.shopboutiquelv_828)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopboutiquelv_828 extends MovieClip {
public var door:shopboutiquelv1door;
public var enterance:MovieClip;
public function shopboutiquelv_828(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 155
//shopboutiquelv_830 (ShopEmpire2_fla.shopboutiquelv_830)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopboutiquelv_830 extends MovieClip {
public var door:shopboutiquelv2door;
public var enterance:MovieClip;
public function shopboutiquelv_830(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 156
//shopboutiquelv_832 (ShopEmpire2_fla.shopboutiquelv_832)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopboutiquelv_832 extends MovieClip {
public var door:shopboutiquelv3door;
public var enterance:MovieClip;
public function shopboutiquelv_832(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 157
//shopburgerlv_738 (ShopEmpire2_fla.shopburgerlv_738)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopburgerlv_738 extends MovieClip {
public var door:shopburgerdoor;
public var enterance:MovieClip;
public function shopburgerlv_738(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 158
//shopburgerlv_740 (ShopEmpire2_fla.shopburgerlv_740)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopburgerlv_740 extends MovieClip {
public var door:shopburgerdoor;
public var enterance:MovieClip;
public function shopburgerlv_740(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 159
//shopburgerlv_741 (ShopEmpire2_fla.shopburgerlv_741)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopburgerlv_741 extends MovieClip {
public var door:shopburgerdoor;
public var enterance:MovieClip;
public function shopburgerlv_741(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 160
//shopcafelv_766 (ShopEmpire2_fla.shopcafelv_766)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopcafelv_766 extends MovieClip {
public const OPEN_POS = -54;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopcafelv_766(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 161
//shopcafelv_767 (ShopEmpire2_fla.shopcafelv_767)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopcafelv_767 extends MovieClip {
public const OPEN_POS = -50;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopcafelv_767(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 162
//shopcafelv_768 (ShopEmpire2_fla.shopcafelv_768)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopcafelv_768 extends MovieClip {
public const OPEN_POS = -50;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopcafelv_768(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 163
//shopcakeshoplv_726 (ShopEmpire2_fla.shopcakeshoplv_726)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcakeshoplv_726 extends MovieClip {
public var door:shopcakeshopdoor1;
public var enterance:MovieClip;
public function shopcakeshoplv_726(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 164
//shopcakeshoplv_728 (ShopEmpire2_fla.shopcakeshoplv_728)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcakeshoplv_728 extends MovieClip {
public var door:shopcakeshopdoor2;
public var enterance:MovieClip;
public function shopcakeshoplv_728(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndStop("Broken");
}
}
}//package ShopEmpire2_fla
Section 165
//shopcakeshoplv_730 (ShopEmpire2_fla.shopcakeshoplv_730)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcakeshoplv_730 extends MovieClip {
public var door:shopcakeshopdoor3;
public var enterance:MovieClip;
public function shopcakeshoplv_730(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndStop("Broken");
}
}
}//package ShopEmpire2_fla
Section 166
//shopcandycastlelv_743 (ShopEmpire2_fla.shopcandycastlelv_743)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcandycastlelv_743 extends MovieClip {
public var door:shopcandycastledoor1;
public var enterance:MovieClip;
public function shopcandycastlelv_743(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 167
//shopcandycastlelv_745 (ShopEmpire2_fla.shopcandycastlelv_745)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcandycastlelv_745 extends MovieClip {
public var door:shopcandycastledoor2;
public var enterance:MovieClip;
public function shopcandycastlelv_745(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 168
//shopcandycastlelv_747 (ShopEmpire2_fla.shopcandycastlelv_747)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopcandycastlelv_747 extends MovieClip {
public var door:shopcandycastledoor3;
public var enterance:MovieClip;
public function shopcandycastlelv_747(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 169
//shopdrugstorelv_795 (ShopEmpire2_fla.shopdrugstorelv_795)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopdrugstorelv_795 extends MovieClip {
public var door:shopdrugstoredoor1;
public var enterance:MovieClip;
public function shopdrugstorelv_795(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 170
//shopdrugstorelv_797 (ShopEmpire2_fla.shopdrugstorelv_797)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopdrugstorelv_797 extends MovieClip {
public var door:shopdrugstoredoor2;
public var enterance:MovieClip;
public function shopdrugstorelv_797(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 171
//shopdrugstorelv_799 (ShopEmpire2_fla.shopdrugstorelv_799)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopdrugstorelv_799 extends MovieClip {
public var door:shopdrugstoredoor2;
public var enterance:MovieClip;
public function shopdrugstorelv_799(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 172
//shopgadgetlv_815 (ShopEmpire2_fla.shopgadgetlv_815)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopgadgetlv_815 extends MovieClip {
public var door:shopgadgetdoor;
public var enterance:MovieClip;
public function shopgadgetlv_815(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 173
//shopgadgetlv_818 (ShopEmpire2_fla.shopgadgetlv_818)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopgadgetlv_818 extends MovieClip {
public var door:shopgadgetdoor;
public var enterance:MovieClip;
public function shopgadgetlv_818(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 174
//shopgadgetlv_819 (ShopEmpire2_fla.shopgadgetlv_819)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopgadgetlv_819 extends MovieClip {
public var door:shopgadgetdoor;
public var enterance:MovieClip;
public function shopgadgetlv_819(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 175
//shopicecreamlv_733 (ShopEmpire2_fla.shopicecreamlv_733)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopicecreamlv_733 extends MovieClip {
public var enterance:MovieClip;
public function shopicecreamlv_733(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 176
//shopicecreamlv_735 (ShopEmpire2_fla.shopicecreamlv_735)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopicecreamlv_735 extends MovieClip {
public var enterance:MovieClip;
public function shopicecreamlv_735(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 177
//shopicecreamlv_736 (ShopEmpire2_fla.shopicecreamlv_736)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopicecreamlv_736 extends MovieClip {
public var enterance:MovieClip;
public function shopicecreamlv_736(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 178
//shopjewellerylv_859 (ShopEmpire2_fla.shopjewellerylv_859)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopjewellerylv_859 extends MovieClip {
public var door:shopjewellerydoor1;
public var enterance:MovieClip;
public function shopjewellerylv_859(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 179
//shopjewellerylv_861 (ShopEmpire2_fla.shopjewellerylv_861)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopjewellerylv_861 extends MovieClip {
public var door:shopjewellerydoor2;
public var enterance:MovieClip;
public function shopjewellerylv_861(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 180
//shopjewellerylv_863 (ShopEmpire2_fla.shopjewellerylv_863)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopjewellerylv_863 extends MovieClip {
public var door:shopjewellerydoor3;
public var enterance:MovieClip;
public function shopjewellerylv_863(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 181
//shopliquorlv_770 (ShopEmpire2_fla.shopliquorlv_770)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopliquorlv_770 extends MovieClip {
public var door:shopliquordoor1;
public var enterance:MovieClip;
public function shopliquorlv_770(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 182
//shopliquorlv_772 (ShopEmpire2_fla.shopliquorlv_772)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopliquorlv_772 extends MovieClip {
public var door:shopliquordoor2;
public var enterance:MovieClip;
public function shopliquorlv_772(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 183
//shopliquorlv_774 (ShopEmpire2_fla.shopliquorlv_774)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopliquorlv_774 extends MovieClip {
public var door:shopliquordoor3;
public var enterance:MovieClip;
public function shopliquorlv_774(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 184
//shopmovietheaterlv_681 (ShopEmpire2_fla.shopmovietheaterlv_681)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmovietheaterlv_681 extends MovieClip {
public var exit0:MovieClip;
public var door:shopmovietheaterpintuslide;
public var exit1:MovieClip;
public var exitDoor0:shopmovietheaterpintuslide;
public var exitDoor1:shopmovietheaterpintuslide;
public var enterance:MovieClip;
public function shopmovietheaterlv_681(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 185
//shopmovietheaterlv_683 (ShopEmpire2_fla.shopmovietheaterlv_683)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmovietheaterlv_683 extends MovieClip {
public var exit0:MovieClip;
public var door:shopmovietheaterpintuslide;
public var exit1:MovieClip;
public var exitDoor0:shopmovietheaterpintuslide;
public var exitDoor1:shopmovietheaterpintuslide;
public var enterance:MovieClip;
public function shopmovietheaterlv_683(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 186
//shopmovietheaterlv_684 (ShopEmpire2_fla.shopmovietheaterlv_684)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmovietheaterlv_684 extends MovieClip {
public var exit0:MovieClip;
public var door:shopmovietheaterpintuslide;
public var exit1:MovieClip;
public var exitDoor0:shopmovietheaterpintuslide;
public var exitDoor1:shopmovietheaterpintuslide;
public var enterance:MovieClip;
public function shopmovietheaterlv_684(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 187
//shopmusiclv_842 (ShopEmpire2_fla.shopmusiclv_842)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmusiclv_842 extends MovieClip {
public var door:shopmusiclv1door;
public var enterance:MovieClip;
public function shopmusiclv_842(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 188
//shopmusiclv_844 (ShopEmpire2_fla.shopmusiclv_844)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmusiclv_844 extends MovieClip {
public var door:shopmusiclv2door;
public var enterance:MovieClip;
public function shopmusiclv_844(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 189
//shopmusiclv_846 (ShopEmpire2_fla.shopmusiclv_846)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopmusiclv_846 extends MovieClip {
public var door:shopmusiclv3door;
public var enterance:MovieClip;
public function shopmusiclv_846(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndStop("Broken");
}
}
}//package ShopEmpire2_fla
Section 190
//shopsalonlv_835 (ShopEmpire2_fla.shopsalonlv_835)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopsalonlv_835 extends MovieClip {
public var door:shopsalondoor1;
public var enterance:MovieClip;
public function shopsalonlv_835(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 191
//shopsalonlv_837 (ShopEmpire2_fla.shopsalonlv_837)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopsalonlv_837 extends MovieClip {
public var door:shopsalondoor2;
public var enterance:MovieClip;
public function shopsalonlv_837(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 192
//shopsalonlv_839 (ShopEmpire2_fla.shopsalonlv_839)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsalonlv_839 extends MovieClip {
public const OPEN_POS = -50;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsalonlv_839(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 193
//shopsportlv_854 (ShopEmpire2_fla.shopsportlv_854)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopsportlv_854 extends MovieClip {
public var door:shopsportdoor;
public var enterance:MovieClip;
public function shopsportlv_854(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 194
//shopsportlv_856 (ShopEmpire2_fla.shopsportlv_856)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopsportlv_856 extends MovieClip {
public var door:shopsportdoor;
public var enterance:MovieClip;
public function shopsportlv_856(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 195
//shopsportlv_857 (ShopEmpire2_fla.shopsportlv_857)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shopsportlv_857 extends MovieClip {
public var door:shopsportdoor;
public var enterance:MovieClip;
public function shopsportlv_857(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 196
//shopsteaklv_760 (ShopEmpire2_fla.shopsteaklv_760)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsteaklv_760 extends MovieClip {
public const OPEN_POS = -54;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsteaklv_760(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 197
//shopsteaklv_762 (ShopEmpire2_fla.shopsteaklv_762)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsteaklv_762 extends MovieClip {
public const OPEN_POS = -54;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsteaklv_762(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 198
//shopsteaklv_764 (ShopEmpire2_fla.shopsteaklv_764)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsteaklv_764 extends MovieClip {
public const OPEN_POS = -54;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsteaklv_764(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 199
//shopsupermarketlv_866 (ShopEmpire2_fla.shopsupermarketlv_866)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsupermarketlv_866 extends MovieClip {
public const OPEN_POS = -50;
public var exit0:MovieClip;
public var door:shopsupermarketdoor1;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsupermarketlv_866(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 200
//shopsupermarketlv_869 (ShopEmpire2_fla.shopsupermarketlv_869)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsupermarketlv_869 extends MovieClip {
public const OPEN_POS = -50;
public var exit0:MovieClip;
public var door:shopsupermarketdoor1;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsupermarketlv_869(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 201
//shopsupermarketlv_871 (ShopEmpire2_fla.shopsupermarketlv_871)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsupermarketlv_871 extends MovieClip {
public const OPEN_POS = -50;
public var exit0:MovieClip;
public var exit1:MovieClip;
public var exit2:MovieClip;
public var closedDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsupermarketlv_871(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (closedDoor.y != OPEN_POS){
TweenLite.to(closedDoor, 0.5, {y:OPEN_POS, onComplete:makeInvisible, onCompleteParams:[closedDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
closedDoor.visible = true;
TweenLite.to(closedDoor, 0.5, {y:0});
}
}
}//package ShopEmpire2_fla
Section 202
//shopsushibarlv_750 (ShopEmpire2_fla.shopsushibarlv_750)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsushibarlv_750 extends MovieClip {
public const OPEN_LEFT_POS = -76;
public const OPEN_RIGHT_POS = 58;
public const CLOSE_LEFT_POS = 2;
public const CLOSE_RIGHT_POS = -1;
public var rightDoor:MovieClip;
public var leftDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsushibarlv_750(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (rightDoor.x != OPEN_RIGHT_POS){
TweenLite.to(rightDoor, 0.5, {x:OPEN_RIGHT_POS, onComplete:makeInvisible, onCompleteParams:[rightDoor]});
};
if (leftDoor.x != OPEN_LEFT_POS){
TweenLite.to(leftDoor, 0.5, {x:OPEN_LEFT_POS, onComplete:makeInvisible, onCompleteParams:[leftDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
rightDoor.visible = true;
leftDoor.visible = true;
TweenLite.to(rightDoor, 0.5, {x:CLOSE_RIGHT_POS});
TweenLite.to(leftDoor, 0.5, {x:CLOSE_LEFT_POS});
}
}
}//package ShopEmpire2_fla
Section 203
//shopsushibarlv_754 (ShopEmpire2_fla.shopsushibarlv_754)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsushibarlv_754 extends MovieClip {
public const OPEN_LEFT_POS = -76;
public const OPEN_RIGHT_POS = 58;
public const CLOSE_LEFT_POS = 2;
public const CLOSE_RIGHT_POS = -1;
public var rightDoor:MovieClip;
public var leftDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsushibarlv_754(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (rightDoor.x != OPEN_RIGHT_POS){
TweenLite.to(rightDoor, 0.5, {x:OPEN_RIGHT_POS, onComplete:makeInvisible, onCompleteParams:[rightDoor]});
};
if (leftDoor.x != OPEN_LEFT_POS){
TweenLite.to(leftDoor, 0.5, {x:OPEN_LEFT_POS, onComplete:makeInvisible, onCompleteParams:[leftDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
rightDoor.visible = true;
leftDoor.visible = true;
TweenLite.to(rightDoor, 0.5, {x:CLOSE_RIGHT_POS});
TweenLite.to(leftDoor, 0.5, {x:CLOSE_LEFT_POS});
}
}
}//package ShopEmpire2_fla
Section 204
//shopsushibarlv_758 (ShopEmpire2_fla.shopsushibarlv_758)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class shopsushibarlv_758 extends MovieClip {
public const OPEN_LEFT_POS = -82;
public const OPEN_RIGHT_POS = 72;
public const CLOSE_LEFT_POS = 2;
public const CLOSE_RIGHT_POS = -1;
public var rightDoor:MovieClip;
public var leftDoor:MovieClip;
public var enterance:MovieClip;
public var tParent;
public function shopsushibarlv_758(){
addFrameScript(0, frame1, 30, frame31, 31, frame32);
}
public function makeInvisible(_arg1:DisplayObject):void{
_arg1.visible = false;
}
function frame1(){
tParent = this.parent;
if (tParent.boothOpen){
if (rightDoor.x != OPEN_RIGHT_POS){
TweenLite.to(rightDoor, 0.5, {x:OPEN_RIGHT_POS, onComplete:makeInvisible, onCompleteParams:[rightDoor]});
};
if (leftDoor.x != OPEN_LEFT_POS){
TweenLite.to(leftDoor, 0.5, {x:OPEN_LEFT_POS, onComplete:makeInvisible, onCompleteParams:[leftDoor]});
};
};
}
function frame31(){
gotoAndPlay("Broken");
}
function frame32(){
rightDoor.visible = true;
leftDoor.visible = true;
TweenLite.to(rightDoor, 0.5, {x:CLOSE_RIGHT_POS});
TweenLite.to(leftDoor, 0.5, {x:CLOSE_LEFT_POS});
}
}
}//package ShopEmpire2_fla
Section 205
//shoptattoolv_801 (ShopEmpire2_fla.shoptattoolv_801)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptattoolv_801 extends MovieClip {
public var door:shoptattoodoor1;
public var enterance:MovieClip;
public function shoptattoolv_801(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 206
//shoptattoolv_803 (ShopEmpire2_fla.shoptattoolv_803)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptattoolv_803 extends MovieClip {
public var door:shoptattoodoor2;
public var enterance:MovieClip;
public function shoptattoolv_803(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 207
//shoptattoolv_805 (ShopEmpire2_fla.shoptattoolv_805)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptattoolv_805 extends MovieClip {
public var door:shoptattoodoor3;
public var enterance:MovieClip;
public function shoptattoolv_805(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 208
//shoptoystorelv_849 (ShopEmpire2_fla.shoptoystorelv_849)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptoystorelv_849 extends MovieClip {
public var door:shoptoystoredoor;
public var enterance:MovieClip;
public function shoptoystorelv_849(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 209
//shoptoystorelv_851 (ShopEmpire2_fla.shoptoystorelv_851)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptoystorelv_851 extends MovieClip {
public var door:shoptoystoredoor;
public var enterance:MovieClip;
public function shoptoystorelv_851(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 210
//shoptoystorelv_852 (ShopEmpire2_fla.shoptoystorelv_852)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class shoptoystorelv_852 extends MovieClip {
public var door:shoptoystoredoor;
public var enterance:MovieClip;
public function shoptoystorelv_852(){
addFrameScript(30, frame31);
}
function frame31(){
gotoAndPlay("Broken");
}
}
}//package ShopEmpire2_fla
Section 211
//SplashScreen_37 (ShopEmpire2_fla.SplashScreen_37)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SplashScreen_37 extends MovieClip {
public var lgLogo:MovieClip;
public var gamesfreeLogo:MovieClip;
public function SplashScreen_37(){
addFrameScript(0, frame1, 1, frame2);
}
public function checkEndGamesfree(_arg1:Event):void{
if (gamesfreeLogo.dragonIcon.currentFrame >= gamesfreeLogo.dragonIcon.totalFrames){
removeEventListener(Event.ENTER_FRAME, checkEndGamesfree);
TweenLite.to(gamesfreeLogo, 0.5, {y:240, scaleY:0, ease:Elastic.easeInOut, onComplete:nextFrame});
};
}
public function linkToGamesfree(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.gamesfree.com");
navigateToURL(_local2, "_blank");
}
public function checkEndLG(_arg1:Event):void{
if (lgLogo.currentFrame >= lgLogo.totalFrames){
removeEventListener(Event.ENTER_FRAME, checkEndLG);
TweenLite.to(lgLogo, 0.8, {tint:0xFFFFFF, onComplete:(root as MovieClip).nextFrame});
};
}
public function linkToLG(_arg1:MouseEvent):void{
var _local2:URLRequest = new URLRequest("http://www.littlegiantworld.com");
navigateToURL(_local2, "_blank");
}
function frame1(){
TweenPlugin.activate([TintPlugin]);
stop();
tabChildren = false;
gamesfreeLogo.buttonMode = true;
gamesfreeLogo.addEventListener(MouseEvent.CLICK, linkToGamesfree);
addEventListener(Event.ENTER_FRAME, checkEndGamesfree);
}
function frame2(){
lgLogo.buttonMode = true;
lgLogo.addEventListener(MouseEvent.CLICK, linkToLG);
addEventListener(Event.ENTER_FRAME, checkEndLG);
}
}
}//package ShopEmpire2_fla
Section 212
//spritewalkpeople1_103 (ShopEmpire2_fla.spritewalkpeople1_103)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople1_103 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople1_103(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 213
//spritewalkpeople2_108 (ShopEmpire2_fla.spritewalkpeople2_108)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople2_108 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople2_108(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 214
//spritewalkpeople3_109 (ShopEmpire2_fla.spritewalkpeople3_109)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople3_109 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople3_109(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 215
//spritewalkpeople4_110 (ShopEmpire2_fla.spritewalkpeople4_110)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople4_110 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople4_110(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 216
//spritewalkpeople5_111 (ShopEmpire2_fla.spritewalkpeople5_111)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople5_111 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople5_111(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 217
//spritewalkpeople6_112 (ShopEmpire2_fla.spritewalkpeople6_112)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople6_112 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople6_112(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 218
//spritewalkpeople7_113 (ShopEmpire2_fla.spritewalkpeople7_113)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import greensock.plugins.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class spritewalkpeople7_113 extends MovieClip {
public var mc:MovieClip;
public var model;
public var lastFrame;
public var timer;
public var wait;
public function spritewalkpeople7_113(){
addFrameScript(0, frame1, 61, frame62);
}
public function animate(_arg1:Event):void{
mc.gotoAndStop(model);
if (mc.body){
if ((lastFrame + 1) >= mc.body.totalFrames){
mc.body.gotoAndPlay(1);
} else {
mc.body.gotoAndPlay((lastFrame + 1));
};
lastFrame = mc.body.currentFrame;
};
}
function frame1(){
TweenPlugin.activate([FramePlugin]);
model = Math.ceil((Math.random() * mc.totalFrames));
mc.gotoAndStop(model);
lastFrame = 1;
stop();
timer = ((Math.random() * 2) + 3);
wait = ((Math.random() * 4) + 1);
TweenLite.to(this, timer, {frame:totalFrames, delay:wait, ease:Linear.easeNone});
addEventListener(Event.ENTER_FRAME, animate);
}
function frame62(){
this.gotoAndStop(1);
removeEventListener(Event.ENTER_FRAME, animate);
}
}
}//package ShopEmpire2_fla
Section 219
//SymbolCombinationNotification_969 (ShopEmpire2_fla.SymbolCombinationNotification_969)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class SymbolCombinationNotification_969 extends MovieClip {
public var left:MovieClip;
public var topLeft:MovieClip;
public var top:MovieClip;
public var right:MovieClip;
public var bottomLeft:MovieClip;
public var notificationSymbol:MovieClip;
public var topRight:MovieClip;
public var bottom:MovieClip;
public var notificationText:TextField;
public var center:MovieClip;
public var bottomRight:MovieClip;
public var textWidth;
public var textHeight;
public function SymbolCombinationNotification_969(){
addFrameScript(0, frame1);
}
function frame1(){
notificationText.autoSize = TextFieldAutoSize.CENTER;
notificationText.mouseEnabled = false;
textWidth = Math.max((notificationText.width + 5), 114);
textHeight = Math.max((notificationText.height + 1), 13);
notificationText.x = -(textWidth);
notificationText.y = -(textHeight);
center.width = (textWidth + 10);
center.x = (right.x - center.width);
center.height = ((textHeight - (bottom.height - 2)) - (top.height - 2));
center.y = (bottom.y - center.height);
right.height = center.height;
right.y = center.y;
bottom.width = center.width;
bottom.x = center.x;
top.width = center.width;
top.x = center.x;
top.y = (center.y - top.height);
left.height = center.height;
left.y = center.y;
left.x = (center.x - left.width);
topLeft.x = left.x;
topLeft.y = top.y;
bottomLeft.x = left.x;
topRight.y = top.y;
notificationSymbol.x = left.x;
notificationSymbol.y = (left.y + (left.height / 2));
}
}
}//package ShopEmpire2_fla
Section 220
//SymbolTired_913 (ShopEmpire2_fla.SymbolTired_913)
package ShopEmpire2_fla {
import flash.display.*;
import greensock.*;
public dynamic class SymbolTired_913 extends MovieClip {
public var keringat3:MovieClip;
public var keringat2:MovieClip;
public var keringatArea:MovieClip;
public var keringat1:MovieClip;
public function SymbolTired_913(){
addFrameScript(0, frame1);
}
public function setKeringat(_arg1:MovieClip):void{
_arg1.x = (Math.round((Math.random() * 13)) - 6.5);
_arg1.y = keringatArea.y;
TweenLite.to(_arg1, ((Math.random() * 0.5) + 1), {y:(keringatArea.y + keringatArea.height), onComplete:setKeringat, onCompleteParams:[_arg1]});
}
function frame1(){
setKeringat(keringat1);
setKeringat(keringat2);
setKeringat(keringat3);
}
}
}//package ShopEmpire2_fla
Section 221
//TutorDialog_420 (ShopEmpire2_fla.TutorDialog_420)
package ShopEmpire2_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class TutorDialog_420 extends MovieClip {
public var disableTutorial:TutorDisableTutor;
public var tutorText:TextField;
public var _text:String;
public var animatedText:String;
public var tempAnimatedText:String;
public var isAnimate:Boolean;
public var textIsComplete:Boolean;
public var inDelay:Boolean;
public function TutorDialog_420(){
addFrameScript(0, frame1);
}
public function skipMessage(_arg1:MouseEvent):void{
if (isAnimate){
tutorText.htmlText = _text;
tempAnimatedText = _text;
animatedText = "";
};
}
public function set text(_arg1:String):void{
_text = _arg1;
}
public function animate():void{
isAnimate = true;
textIsComplete = false;
animatedText = _text;
tempAnimatedText = "";
addEventListener(Event.ENTER_FRAME, animateText);
}
public function animateText(_arg1:Event):void{
var _local3:*;
var _local2:* = tempAnimatedText;
if (animatedText.length > 0){
if (animatedText.charAt(0) != "<"){
_local2 = (_local2 + animatedText.charAt(0));
animatedText = animatedText.substr(1);
} else {
_local3 = animatedText.indexOf(">");
_local2 = (_local2 + animatedText.substring(0, (_local3 + 1)));
animatedText = animatedText.substr((_local3 + 1));
};
tutorText.htmlText = _text;
tempAnimatedText = _local2;
} else {
textIsComplete = true;
isAnimate = false;
removeEventListener(Event.ENTER_FRAME, animateText);
};
}
function frame1(){
textIsComplete = false;
inDelay = false;
tutorText.mouseEnabled = false;
buttonMode = true;
addEventListener(MouseEvent.CLICK, skipMessage);
}
}
}//package ShopEmpire2_fla
Section 222
//Tutorial_418 (ShopEmpire2_fla.Tutorial_418)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class Tutorial_418 extends MovieClip {
public var tutorialTextBox:MovieClip;
public var tutorialGirl:MovieClip;
public var _text:String;
public var tutorGirlPosition:Point;
public var theRoot:Object;
public function Tutorial_418(){
addFrameScript(0, frame1);
}
public function set text(_arg1:String):void{
_text = _arg1;
}
public function Initialize(_arg1:Event):void{
var _local2:* = root;
theRoot = _local2.mainProgram;
tutorialGirl.gotoAndStop(1);
tutorialGirl.x = tutorGirlPosition.x;
tutorialGirl.y = tutorGirlPosition.y;
tutorialTextBox.visible = false;
tutorialTextBox.disableTutorial.isActive = !(theRoot.tutorialShown);
TweenLite.from(tutorialGirl, 0.3, {x:640, onComplete:showTutorText});
addEventListener(Event.ENTER_FRAME, checkTextUpdate);
}
public function showTutorText():void{
TweenLite.killTweensOf(tutorialGirl);
tutorialGirl.x = tutorGirlPosition.x;
tutorialGirl.y = tutorGirlPosition.y;
tutorialTextBox.visible = true;
tutorialTextBox.text = _text;
tutorialTextBox.animate();
}
public function checkTextUpdate(_arg1:Event):void{
if (((((tutorialTextBox.isAnimate) && (tutorialTextBox.visible))) && (!(tutorialTextBox.inDelay)))){
if (tutorialGirl.currentFrame < tutorialGirl.totalFrames){
tutorialGirl.nextFrame();
} else {
tutorialGirl.gotoAndStop(1);
};
} else {
tutorialGirl.gotoAndStop(1);
};
}
public function disappear():void{
theRoot.tutorialShown = !(tutorialTextBox.disableTutorial.isActive);
tutorialTextBox.visible = false;
TweenLite.to(tutorialGirl, 0.3, {x:640, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
public function stopMessage():void{
var _local2 = tutorialTextBox;
with (_local2) {
if (isAnimate){
tutorText.htmlText = _text;
tempAnimatedText = _text;
animatedText = "";
};
};
}
function frame1(){
tutorGirlPosition = new Point(tutorialGirl.x, tutorialGirl.y);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
}
}//package ShopEmpire2_fla
Section 223
//UI_BudgetPage_269 (ShopEmpire2_fla.UI_BudgetPage_269)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_BudgetPage_269 extends MovieClip {
public var incomeList:TextField;
public var totalEarning:TextField;
public var dolarSymbol:TextField;
public var reportCheckBox:UI_CheckBox;
public var expenditureList:TextField;
public var btnClose:SimpleButton;
public var profitList:TextField;
public var maskArea:MovieClip;
public var slideBar:UI_BudgetSlider;
public var visitorList:TextField;
public var descriptionList:TextField;
public var timerToClose;
public var relation;
public function UI_BudgetPage_269(){
addFrameScript(0, frame1);
}
public function closeThePage(_arg1:MouseEvent):void{
if (relation != null){
if (relation.btnStatistic.isActive){
relation.btnStatistic.isActive = false;
relation.btnSelect.isActive = true;
} else {
relation.hideStatistic();
};
};
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
descriptionList.y = (maskArea.y - (_local2.getPosition() * (descriptionList.textHeight / descriptionList.numLines)));
visitorList.y = (maskArea.y - (_local2.getPosition() * (visitorList.textHeight / visitorList.numLines)));
incomeList.y = (maskArea.y - (_local2.getPosition() * (incomeList.textHeight / incomeList.numLines)));
expenditureList.y = (maskArea.y - (_local2.getPosition() * (expenditureList.textHeight / expenditureList.numLines)));
profitList.y = (maskArea.y - (_local2.getPosition() * (profitList.textHeight / profitList.numLines)));
}
public function checkSlideBar():void{
slideBar.visible = (descriptionList.numLines > 12);
if (slideBar.visible){
slideBar.grid = (descriptionList.numLines - 12);
};
}
function frame1(){
reportCheckBox.isActive = true;
timerToClose = -1;
btnClose.tabEnabled = false;
btnClose.addEventListener(MouseEvent.CLICK, closeThePage);
descriptionList.autoSize = TextFieldAutoSize.LEFT;
descriptionList.mouseEnabled = false;
visitorList.autoSize = TextFieldAutoSize.CENTER;
visitorList.mouseEnabled = false;
incomeList.autoSize = TextFieldAutoSize.RIGHT;
incomeList.mouseEnabled = false;
expenditureList.autoSize = TextFieldAutoSize.RIGHT;
expenditureList.mouseEnabled = false;
profitList.autoSize = TextFieldAutoSize.RIGHT;
profitList.mouseEnabled = false;
dolarSymbol.mouseEnabled = false;
slideBar.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package ShopEmpire2_fla
Section 224
//UI_ButtonLocked_221 (ShopEmpire2_fla.UI_ButtonLocked_221)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class UI_ButtonLocked_221 extends MovieClip {
public var related;
public function UI_ButtonLocked_221(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package ShopEmpire2_fla
Section 225
//UI_DetailBoxBooth_304 (ShopEmpire2_fla.UI_DetailBoxBooth_304)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_DetailBoxBooth_304 extends MovieClip {
public var star0:MovieClip;
public var star1:MovieClip;
public var star2:MovieClip;
public var boothFloor:TextField;
public var boothType:TextField;
public var btnDestroy:SimpleButton;
public var boothIconPosition:MovieClip;
public var upgradeCost:TextField;
public var boothName:TextField;
public var btnUpgrade:SimpleButton;
public var starSymbol:Array;
public var currentRelation;
public function UI_DetailBoxBooth_304(){
addFrameScript(0, frame1);
}
public function enterChangeNameMode(_arg1:Object):void{
if (boothName.type != TextFieldType.INPUT){
boothName.type = TextFieldType.INPUT;
boothName.textColor = 0;
boothName.background = true;
boothName.maxChars = 12;
boothName.setSelection(0, boothName.maxChars);
currentRelation = _arg1;
stage.addEventListener(KeyboardEvent.KEY_UP, confirmNewName);
};
}
public function confirmNewName(_arg1:KeyboardEvent):void{
var _local3:*;
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.ENTER){
if (currentRelation != null){
currentRelation.boothName = boothName.text;
_local3 = currentRelation.world;
_local3.canScroll = true;
};
exitChangeNameMode();
};
}
public function exitChangeNameMode():void{
var _local1:*;
if (currentRelation != null){
_local1 = currentRelation.world;
};
boothName.type = TextFieldType.DYNAMIC;
boothName.textColor = 0xFFFFFF;
boothName.background = false;
if (stage != null){
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmNewName);
};
}
function frame1(){
btnUpgrade.tabEnabled = false;
btnDestroy.tabEnabled = false;
boothType.mouseEnabled = false;
boothFloor.mouseEnabled = false;
upgradeCost.mouseEnabled = false;
starSymbol = [star0, star1, star2];
currentRelation = null;
}
}
}//package ShopEmpire2_fla
Section 226
//UI_DetailBoxStaff_280 (ShopEmpire2_fla.UI_DetailBoxStaff_280)
package ShopEmpire2_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class UI_DetailBoxStaff_280 extends MovieClip {
public var star0:MovieClip;
public var star1:MovieClip;
public var currentDuty:TextField;
public var star2:MovieClip;
public var staminaBar:MovieClip;
public var expBar:MovieClip;
public var starSymbol:Array;
public var cropContainer;
public var blinkDelay;
public function UI_DetailBoxStaff_280(){
addFrameScript(0, frame1);
}
public function blinkDutyStat(_arg1:Event):void{
if (this.visible){
if (blinkDelay > 0){
blinkDelay--;
} else {
currentDuty.visible = !(currentDuty.visible);
blinkDelay = 24;
};
};
}
function frame1(){
buttonMode = true;
tabEnabled = false;
currentDuty.mouseEnabled = false;
starSymbol = [star0, star1, star2];
cropContainer = new MovieClip();
blinkDelay = 0;
addChildAt(cropContainer, 1);
addEventListener(Event.ENTER_FRAME, blinkDutyStat);
}
}
}//package ShopEmpire2_fla
Section 227
//UI_DetailBoxUpgrade_262 (ShopEmpire2_fla.UI_DetailBoxUpgrade_262)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_DetailBoxUpgrade_262 extends MovieClip {
public var upgradeTitle:TextField;
public var upgradeDescription:TextField;
public var purchaseValue:TextField;
public var boothIconPosition:MovieClip;
public var upgradeSymbol:MovieClip;
public var btnPurchase:SimpleButton;
public function UI_DetailBoxUpgrade_262(){
addFrameScript(0, frame1);
}
function frame1(){
upgradeTitle.mouseEnabled = false;
upgradeDescription.mouseEnabled = false;
purchaseValue.mouseEnabled = false;
btnPurchase.tabEnabled = false;
upgradeSymbol.stop();
}
}
}//package ShopEmpire2_fla
Section 228
//UI_DetailBoxVisitor_301 (ShopEmpire2_fla.UI_DetailBoxVisitor_301)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_DetailBoxVisitor_301 extends MovieClip {
public var visitorName:TextField;
public var statificationMeter:MovieClip;
public var currentCashText:TextField;
public var cropContainer;
public function UI_DetailBoxVisitor_301(){
addFrameScript(0, frame1);
}
function frame1(){
buttonMode = true;
tabEnabled = false;
cropContainer = new MovieClip();
addChildAt(cropContainer, 1);
visitorName.mouseEnabled = false;
currentCashText.mouseEnabled = false;
}
}
}//package ShopEmpire2_fla
Section 229
//UI_DetailHall_309 (ShopEmpire2_fla.UI_DetailHall_309)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_DetailHall_309 extends MovieClip {
public var eventCost:TextField;
public var star1:MovieClip;
public var star2:MovieClip;
public var costHeader:TextField;
public var btnCancelEvent:SimpleButton;
public var star3:MovieClip;
public var numberDayLeft:TextField;
public var btnNextEvent:SimpleButton;
public var btnClose:SimpleButton;
public var durationHeader:TextField;
public var scheduledEvent:TextField;
public var previewHall:MovieClip;
public var btnDestroy:SimpleButton;
public var btnStartEvent:SimpleButton;
public var currentEvent:TextField;
public var upgradeCost:TextField;
public var btnPrevEvent:SimpleButton;
public var duration:TextField;
public var upgradeEffect:TextField;
public var ticketPrice:TextField;
public var durationSlider:MovieClip;
public var hallName:TextField;
public var btnUpgrade:SimpleButton;
public var starSymbol;
public var i;
public var temp;
public var relation;
public function UI_DetailHall_309(){
addFrameScript(0, frame1);
}
public function Initialize(_arg1:Event):void{
var _local4:*;
var _local2:* = root;
var _local3:* = _local2.mainProgram;
hallName.text = (_local3.playerName.toUpperCase() + "'S HALL");
if (relation != null){
upgradeCost.text = (":" + ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$ " + Utility.numberToMoney(BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1)))) : " -");
upgradeEffect.visible = true;
relation.addEventListener(BoothEvent.END_UPGRADE, updateUpgradeCost);
if (relation.currentEvent != BoothHall.NONE){
_local4 = 0;
switch (relation.currentEvent){
case BoothHall.ELEC_EXPO:
_local4 = 0;
break;
case BoothHall.CAR_SHOW:
_local4 = 1;
break;
case BoothHall.LIVE_CONCERT:
_local4 = 2;
break;
case BoothHall.ORCHESTRA:
_local4 = 3;
break;
};
if (previewHall.image.currentEvent != _local4){
previewHall.image.setCurrentEventTo(_local4);
};
};
} else {
upgradeCost.text = ": -";
upgradeEffect.visible = false;
};
}
public function updateDetail(_arg1:MovieClip):void{
if (relation != null){
relation.removeEventListener(BoothEvent.END_UPGRADE, afterUpgradeCheck);
relation.removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterFlashingUpgradeCheck);
relation.removeEventListener(BoothEvent.HALL_CHANGE_DAY, changeDayCheck);
previewHall.removeEventListener(Event.ENTER_FRAME, flashingCheck);
};
relation = _arg1;
if (relation != null){
btnUpgrade.enabled = (relation.boothLevel < relation.MAX_LEVEL);
btnDestroy.enabled = true;
checkCurrentEvent();
previewHall.visible = true;
previewHall.image.gotoAndStop(relation.boothLevel);
relation.addEventListener(BoothEvent.END_UPGRADE, afterUpgradeCheck);
relation.addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterFlashingUpgradeCheck);
relation.addEventListener(BoothEvent.HALL_CHANGE_DAY, changeDayCheck);
previewHall.addEventListener(Event.ENTER_FRAME, flashingCheck);
upgradeCost.text = (":" + ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$ " + Utility.numberToMoney(BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1)))) : " -");
upgradeEffect.visible = (relation.boothLevel < relation.MAX_LEVEL);
checkScheduledEvent();
} else {
btnUpgrade.enabled = false;
btnDestroy.enabled = false;
btnStartEvent.visible = false;
btnCancelEvent.visible = false;
currentEvent.text = "";
ticketPrice.text = ": -";
numberDayLeft.text = "";
scheduledEvent.visible = false;
durationHeader.visible = false;
costHeader.visible = false;
duration.visible = false;
durationSlider.visible = false;
eventCost.visible = false;
previewHall.visible = false;
btnPrevEvent.visible = false;
btnNextEvent.visible = false;
upgradeCost.text = ": -";
upgradeEffect.visible = false;
};
checkCurrentLevel();
if (btnUpgrade.enabled){
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
if (btnDestroy.enabled){
btnDestroy.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnDestroy.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
}
public function updateUpgradeCost(_arg1:BoothEvent):void{
var _local2:* = _arg1.target;
upgradeCost.text = ((_local2.boothLevel)<_local2.MAX_LEVEL) ? ("$" + Utility.numberToMoney(BoothList.getUpgradeCost(Utility.getClass(_local2), (_local2.boothLevel - 1)))) : "-";
upgradeEffect.visible = (relation.boothLevel < relation.MAX_LEVEL);
}
public function changeDayCheck(_arg1:BoothEvent):void{
checkCurrentEvent();
}
public function flashingCheck(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
_local2.transform.colorTransform = relation.transform.colorTransform;
var _local3:* = (durationSlider.getPosition() + 1);
duration.text = ((_local3 + " day") + ((_local3)>1) ? "s" : "");
updateEventCost();
}
public function afterUpgradeCheck(_arg1:BoothEvent):void{
if (_arg1.boothLevel < relation.MAX_LEVEL){
btnUpgrade.enabled = true;
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
btnDestroy.enabled = true;
btnDestroy.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
public function afterFlashingUpgradeCheck(_arg1:BoothEvent):void{
previewHall.image.gotoAndStop(_arg1.boothLevel);
}
public function checkScheduledEvent():void{
var _local1:* = previewHall.image.currentEvent;
switch (_local1){
case 0:
scheduledEvent.text = BoothHall.ELEC_EXPO;
break;
case 1:
scheduledEvent.text = BoothHall.CAR_SHOW;
break;
case 2:
scheduledEvent.text = BoothHall.LIVE_CONCERT;
break;
case 3:
scheduledEvent.text = BoothHall.ORCHESTRA;
break;
};
updateEventCost();
scheduledEvent.visible = true;
durationHeader.visible = true;
costHeader.visible = true;
duration.visible = true;
durationSlider.visible = true;
eventCost.visible = true;
}
public function checkCurrentLevel():void{
var _local1:* = 0;
while (_local1 < starSymbol.length) {
starSymbol[_local1].gotoAndStop("Inactive");
if (relation != null){
if (_local1 < relation.boothLevel){
starSymbol[_local1].gotoAndStop("Active");
};
};
_local1++;
};
}
public function checkCurrentEvent():void{
var _local1:*;
var _local2:*;
if (relation != null){
if (relation.currentEvent == BoothHall.NONE){
currentEvent.text = "No Event";
ticketPrice.text = ": -";
numberDayLeft.text = "";
btnStartEvent.visible = true;
btnCancelEvent.visible = false;
if (root != null){
_local1 = root;
_local2 = _local1.mainProgram;
btnPrevEvent.visible = (_local2.numberCountryData() > 1);
btnNextEvent.visible = (_local2.numberCountryData() > 1);
};
durationSlider.enabled = true;
btnUpgrade.enabled = (relation.boothLevel < relation.MAX_LEVEL);
btnDestroy.enabled = true;
} else {
currentEvent.text = relation.currentEvent;
ticketPrice.text = (":$ " + Utility.numberToMoney(relation.getTicketPrice()));
if (relation.stillBooking){
numberDayLeft.text = "Event will be started tomorrow";
} else {
numberDayLeft.text = ((("Event will end in " + relation.dayEventLeft) + " day") + ((relation.dayEventLeft > 1)) ? "s" : "");
};
btnStartEvent.visible = false;
btnCancelEvent.visible = true;
btnUpgrade.enabled = false;
btnDestroy.enabled = false;
btnPrevEvent.visible = false;
btnNextEvent.visible = false;
durationSlider.enabled = false;
};
if (btnUpgrade.enabled){
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
if (btnDestroy.enabled){
btnDestroy.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnDestroy.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
durationSlider.dayIndicator.buttonMode = durationSlider.enabled;
durationSlider.dayBar.buttonMode = durationSlider.enabled;
if (durationSlider.enabled){
durationSlider.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
durationSlider.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
};
}
public function btnPrevEventOnClick(_arg1:MouseEvent):void{
if (!previewHall.image.onTween){
previewHall.image.setCurrentEvent((previewHall.image.currentEvent - 1));
checkScheduledEvent();
};
}
public function btnNextEventOnClick(_arg1:MouseEvent):void{
if (!previewHall.image.onTween){
previewHall.image.setCurrentEvent((previewHall.image.currentEvent + 1));
checkScheduledEvent();
};
}
public function btnUpgradeOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local4:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (relation != null){
_local3 = BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1));
_local4 = relation.world;
if (_local4.cash >= _local3){
starSymbol[relation.boothLevel].gotoAndPlay("Transform");
relation.upgradeBooth();
_local4.addCash(-(_local3));
_local4.upgradeReport = (_local4.upgradeReport + _local3);
btnUpgrade.enabled = false;
btnDestroy.enabled = false;
btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
btnDestroy.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
_local4.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
};
}
public function btnDestroyOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (relation != null){
relation.removeEventListener(BoothEvent.END_UPGRADE, updateUpgradeCost);
relation.destroy();
};
};
}
public function btnStartEventOnClick(_arg1:MouseEvent):void{
var _local2:*;
var _local3:*;
if (relation != null){
_local2 = relation.world;
_local3 = getEventPrice();
if (_local2.cash >= _local3){
relation.setCurrentEvent(scheduledEvent.text);
relation.dayEventLeft = (durationSlider.getPosition() + 1);
checkCurrentEvent();
relation.addEventCost = _local3;
_local2.addCash(-(_local3));
} else {
_local2.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
}
public function btnCancelEventOnClick(_arg1:MouseEvent):void{
if (relation != null){
relation.dayPassEvent = 0;
relation.setCurrentEvent(BoothHall.NONE);
checkCurrentEvent();
};
}
public function updateEventCost():void{
var _local1:*;
if (relation == null){
eventCost.text = "-";
} else {
_local1 = getEventPrice();
eventCost.text = ("$" + Utility.numberToMoney(_local1));
};
}
public function getEventPrice():Number{
var _local1:*;
var _local2:*;
var _local3:*;
if (relation != null){
_local1 = (durationSlider.getPosition() + 1);
_local2 = (_local1 * relation.getAddEventPrice(scheduledEvent.text));
_local3 = ((5 / 100) * (_local1 - 1));
return ((_local2 - Math.round((_local2 * _local3))));
};
return (0);
}
function frame1(){
starSymbol = new Array(star1, star2, star3);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
i = 0;
while (i < numChildren) {
temp = getChildAt(i);
if ((temp is TextField)){
temp.mouseEnabled = false;
};
if ((temp is SimpleButton)){
temp.tabEnabled = false;
};
i++;
};
btnUpgrade.addEventListener(MouseEvent.CLICK, btnUpgradeOnClick);
btnDestroy.addEventListener(MouseEvent.CLICK, btnDestroyOnClick);
btnStartEvent.addEventListener(MouseEvent.CLICK, btnStartEventOnClick);
btnCancelEvent.addEventListener(MouseEvent.CLICK, btnCancelEventOnClick);
btnPrevEvent.addEventListener(MouseEvent.CLICK, btnPrevEventOnClick);
btnNextEvent.addEventListener(MouseEvent.CLICK, btnNextEventOnClick);
}
}
}//package ShopEmpire2_fla
Section 230
//UI_DialButton_949 (ShopEmpire2_fla.UI_DialButton_949)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class UI_DialButton_949 extends MovieClip {
public var btnUp:SimpleButton;
public var btnDown:SimpleButton;
public function UI_DialButton_949(){
addFrameScript(0, frame1);
}
function frame1(){
btnUp.tabEnabled = false;
btnDown.tabEnabled = false;
}
}
}//package ShopEmpire2_fla
Section 231
//UI_EventSlider_329 (ShopEmpire2_fla.UI_EventSlider_329)
package ShopEmpire2_fla {
import flash.display.*;
import flash.events.*;
public dynamic class UI_EventSlider_329 extends MovieClip {
public var dayBar:MovieClip;
public var dayIndicator:MovieClip;
public var grid;
public var gridScale;
public function UI_EventSlider_329(){
addFrameScript(0, frame1);
}
public function dragIndicator(_arg1:MouseEvent):void{
if (this.enabled){
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseIndicator);
};
}
public function holdDown(_arg1:MouseEvent):void{
if (this.enabled){
dayIndicator.x = mouseX;
dayIndicator.x = (Math.round(((dayIndicator.x - dayBar.x) / gridScale)) * gridScale);
dragIndicator(_arg1);
};
}
public function moveIndicator(_arg1:MouseEvent):void{
dayIndicator.x = mouseX;
if (dayIndicator.x < dayBar.x){
dayIndicator.x = dayBar.x;
} else {
if (dayIndicator.x > (dayBar.x + dayBar.width)){
dayIndicator.x = (dayBar.x + dayBar.width);
} else {
dayIndicator.x = (Math.round(((dayIndicator.x - dayBar.x) / gridScale)) * gridScale);
};
};
}
public function releaseIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseIndicator);
}
public function getPosition():Number{
return ((((dayIndicator.x - dayBar.x) / dayBar.width) * grid));
}
function frame1(){
grid = 6;
gridScale = (dayBar.width / grid);
dayIndicator.buttonMode = true;
dayIndicator.tabEnabled = false;
dayBar.buttonMode = true;
dayBar.tabEnabled = false;
dayIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragIndicator);
dayBar.addEventListener(MouseEvent.MOUSE_DOWN, holdDown);
}
}
}//package ShopEmpire2_fla
Section 232
//UI_GraphicToggle_144 (ShopEmpire2_fla.UI_GraphicToggle_144)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_GraphicToggle_144 extends MovieClip {
public var graphicLow:TextField;
public var graphicMed:TextField;
public var btnGraphicLow:MovieClip;
public var btnGraphicHigh:MovieClip;
public var btnGraphicMed:MovieClip;
public var graphicHigh:TextField;
public function UI_GraphicToggle_144(){
addFrameScript(0, frame1);
}
public function btnQualityOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
graphicLow.textColor = ((_local2)==btnGraphicLow) ? 0xFF0000 : 0x939393;
graphicMed.textColor = ((_local2)==btnGraphicMed) ? 0xFF0000 : 0x939393;
graphicHigh.textColor = ((_local2)==btnGraphicHigh) ? 0xFF0000 : 0x939393;
btnGraphicLow.enabled = !((btnGraphicLow == _local2));
btnGraphicMed.enabled = !((btnGraphicMed == _local2));
btnGraphicHigh.enabled = !((btnGraphicHigh == _local2));
stage.quality = getQualityActive();
};
}
public function btnQualityOnOver(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (_local2 == btnGraphicLow){
graphicLow.textColor = 0;
} else {
if (_local2 == btnGraphicMed){
graphicMed.textColor = 0;
} else {
if (_local2 == btnGraphicHigh){
graphicHigh.textColor = 0;
};
};
};
_local2.addEventListener(MouseEvent.MOUSE_OUT, btnQualityOnOut);
};
}
public function btnQualityOnOut(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
if (_local2 == btnGraphicLow){
graphicLow.textColor = 0x939393;
} else {
if (_local2 == btnGraphicMed){
graphicMed.textColor = 0x939393;
} else {
if (_local2 == btnGraphicHigh){
graphicHigh.textColor = 0x939393;
};
};
};
_local2.removeEventListener(MouseEvent.MOUSE_OUT, btnQualityOnOut);
};
}
public function getQualityActive():String{
var _local1:* = (btnGraphicLow.enabled) ? (btnGraphicMed.enabled) ? (btnGraphicHigh.enabled) ? StageQuality.HIGH : StageQuality.HIGH : StageQuality.MEDIUM : StageQuality.LOW;
return (_local1);
}
public function setQualitySelection():void{
graphicLow.textColor = ((stage.quality)=="LOW") ? 0xFF0000 : 0x939393;
graphicMed.textColor = ((stage.quality)=="MEDIUM") ? 0xFF0000 : 0x939393;
graphicHigh.textColor = ((stage.quality)=="HIGH") ? 0xFF0000 : 0x939393;
btnGraphicLow.enabled = !((stage.quality == "LOW"));
btnGraphicMed.enabled = !((stage.quality == "MEDIUM"));
btnGraphicHigh.enabled = !((stage.quality == "HIGH"));
}
function frame1(){
graphicLow.mouseEnabled = false;
graphicMed.mouseEnabled = false;
graphicHigh.mouseEnabled = false;
btnGraphicLow.buttonMode = true;
btnGraphicLow.tabEnabled = false;
btnGraphicMed.buttonMode = true;
btnGraphicMed.tabEnabled = false;
btnGraphicHigh.buttonMode = true;
btnGraphicHigh.tabEnabled = false;
btnGraphicLow.addEventListener(MouseEvent.CLICK, btnQualityOnClick);
btnGraphicMed.addEventListener(MouseEvent.CLICK, btnQualityOnClick);
btnGraphicHigh.addEventListener(MouseEvent.CLICK, btnQualityOnClick);
btnGraphicLow.addEventListener(MouseEvent.MOUSE_OVER, btnQualityOnOver);
btnGraphicMed.addEventListener(MouseEvent.MOUSE_OVER, btnQualityOnOver);
btnGraphicHigh.addEventListener(MouseEvent.MOUSE_OVER, btnQualityOnOver);
setQualitySelection();
}
}
}//package ShopEmpire2_fla
Section 233
//UI_LegendBox_390 (ShopEmpire2_fla.UI_LegendBox_390)
package ShopEmpire2_fla {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public dynamic class UI_LegendBox_390 extends MovieClip {
public var btnNextPage:SimpleButton;
public var specialVisitorPage:MovieClip;
public var nextPageInfo:TextField;
public var btnClose:SimpleButton;
public var legendHeader:TextField;
public var dialogBoxPage:MovieClip;
public var onTween;
public function UI_LegendBox_390(){
addFrameScript(0, frame1);
}
public function setOnTween(_arg1:Boolean):void{
onTween = _arg1;
}
public function removed(_arg1:Event):void{
onTween = false;
}
public function Initialize(_arg1:Event):void{
if (!getChildByName(dialogBoxPage.name)){
addChild(dialogBoxPage);
};
if (getChildByName(specialVisitorPage.name)){
removeChild(specialVisitorPage);
};
correctHeaderAndPageButton();
}
public function gotoNextPage(_arg1:MouseEvent):void{
if (getChildByName(dialogBoxPage.name)){
removeChild(dialogBoxPage);
addChild(specialVisitorPage);
} else {
if (getChildByName(specialVisitorPage.name)){
removeChild(specialVisitorPage);
addChild(dialogBoxPage);
};
};
correctHeaderAndPageButton();
}
public function correctHeaderAndPageButton():void{
if (getChildByName(dialogBoxPage.name)){
legendHeader.text = "DIALOUGE BOX INFORMATION";
nextPageInfo.text = "Special Visitor List";
} else {
if (getChildByName(specialVisitorPage.name)){
legendHeader.text = "SPECIAL VISITOR LIST";
nextPageInfo.text = "Dialog Box Info";
};
};
}
function frame1(){
onTween = false;
addEventListener(Event.REMOVED_FROM_STAGE, removed);
addEventListener(Event.ADDED_TO_STAGE, Initialize);
btnClose.tabEnabled = false;
btnNextPage.tabEnabled = false;
legendHeader.mouseEnabled = false;
nextPageInfo.mouseEnabled = false;
btnNextPage.addEventListener(MouseEvent.CLICK, gotoNextPage);
}
}
}//package ShopEmpire2_fla
Section 234
//UI_MiniSpeedDial_297 (ShopEmpire2_fla.UI_MiniSpeedDial_297)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class UI_MiniSpeedDial_297 extends MovieClip {
public var btnUp:SimpleButton;
public var btnDown:SimpleButton;
public function UI_MiniSpeedDial_297(){
addFrameScript(0, frame1);
}
function frame1(){
btnUp.tabEnabled = false;
btnDown.tabEnabled = false;
}
}
}//package ShopEmpire2_fla
Section 235
//UI_NumberBooth_222 (ShopEmpire2_fla.UI_NumberBooth_222)
package ShopEmpire2_fla {
import flash.display.*;
import flash.text.*;
public dynamic class UI_NumberBooth_222 extends MovieClip {
public var itemNumber:TextField;
public var related;
public function UI_NumberBooth_222(){
addFrameScript(0, frame1);
}
function frame1(){
}
}
}//package ShopEmpire2_fla
Section 236
//UI_SaveNotification_399 (ShopEmpire2_fla.UI_SaveNotification_399)
package ShopEmpire2_fla {
import flash.display.*;
import greensock.*;
import flash.events.*;
import greensock.easing.*;
import flash.text.*;
public dynamic class UI_SaveNotification_399 extends MovieClip {
public var shadowNotice:TextField;
public var saveNotice:TextField;
public var _text:String;
public function UI_SaveNotification_399(){
addFrameScript(0, frame1);
}
public function turnToWhite():void{
TweenLite.to(saveNotice, 0.2, {tint:0xFFFFFF, onComplete:turnToGreen, ease:Linear.easeNone});
}
public function turnToGreen():void{
TweenLite.to(saveNotice, 0.2, {tint:null, onComplete:turnToWhite, ease:Linear.easeNone});
}
public function Initialize(_arg1:Event):void{
turnToWhite();
addEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function removed(_arg1:Event):void{
TweenLite.killTweensOf(saveNotice);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function set text(_arg1:String):void{
_text = _arg1;
saveNotice.text = _text;
shadowNotice.text = _text;
}
function frame1(){
saveNotice.autoSize = TextFieldAutoSize.LEFT;
shadowNotice.autoSize = TextFieldAutoSize.LEFT;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
}
}//package ShopEmpire2_fla
Section 237
//UI_SectorButtonTips_271 (ShopEmpire2_fla.UI_SectorButtonTips_271)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonTips_271 extends MovieClip {
public var prevPageButton:SimpleButton;
public var pageNumber:TextField;
public var btnClose:SimpleButton;
public var nextPageButton:SimpleButton;
public var maskInfo:MovieClip;
public var sliderBar:UI_TipsSlider;
public var newTips:MovieClip;
public var tipsHeader:TextField;
public var tipsInfo:TextField;
public var page;
public var relation;
public function UI_SectorButtonTips_271(){
addFrameScript(0, frame1);
}
public function Initialize(_arg1:Event):void{
page = 1;
readCategory();
}
public function readCategory():void{
var _local2:*;
var _local3:*;
var _local1:* = TipsList.TIPS_AVAILABLE[(page - 1)];
if (_local1 != null){
_local2 = root;
_local3 = _local2.mainProgram;
if ((((_local3.tipsGain.indexOf(_local1.tipsCode) < 0)) && ((_local3.newTips.indexOf(_local1.tipsCode) < 0)))){
tipsHeader.text = "?????";
tipsInfo.text = "?????";
newTips.visible = false;
} else {
if (_local3.newTips.indexOf(_local1.tipsCode) >= 0){
_local3.tipsGain.push(_local1.tipsCode);
_local3.newTips.splice(_local3.newTips.indexOf(_local1.tipsCode, 1));
newTips.visible = true;
} else {
newTips.visible = false;
};
tipsHeader.text = _local1.header;
tipsInfo.text = _local1.info;
};
};
pageNumber.text = (((("(" + page) + "/") + TipsList.TIPS_AVAILABLE.length) + ")");
sliderBar.setPosition(0);
sliderBar.visible = (tipsInfo.height > maskInfo.height);
}
public function prevPageButtonOnClick(_arg1:MouseEvent):void{
page--;
if (page <= 0){
page = TipsList.TIPS_AVAILABLE.length;
};
readCategory();
}
public function nextPageButtonOnClick(_arg1:MouseEvent):void{
page++;
if (page > TipsList.TIPS_AVAILABLE.length){
page = 1;
};
readCategory();
}
public function closingPage(_arg1:MouseEvent):void{
relation.btnMailBox.isActive = false;
relation.btnSelect.isActive = true;
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
tipsInfo.y = (maskInfo.y - (_local2.getPosition() * (tipsInfo.height - maskInfo.height)));
}
function frame1(){
page = 1;
tipsHeader.mouseEnabled = false;
tipsInfo.mouseEnabled = false;
tipsInfo.autoSize = TextFieldAutoSize.LEFT;
pageNumber.mouseEnabled = false;
pageNumber.autoSize = TextFieldAutoSize.CENTER;
newTips.mouseEnabled = false;
addEventListener(Event.ADDED_TO_STAGE, Initialize);
prevPageButton.addEventListener(MouseEvent.CLICK, prevPageButtonOnClick);
nextPageButton.addEventListener(MouseEvent.CLICK, nextPageButtonOnClick);
btnClose.addEventListener(MouseEvent.CLICK, closingPage);
sliderBar.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package ShopEmpire2_fla
Section 238
//UI_SoundBar_385 (ShopEmpire2_fla.UI_SoundBar_385)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SoundBar_385 extends MovieClip {
public var sfxIndicator:MovieClip;
public var musicIndicator:MovieClip;
public var sfxBar:MovieClip;
public var musicBar:MovieClip;
public function UI_SoundBar_385(){
addFrameScript(0, frame1);
}
public function dragMusicIndicator(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMusicIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMusicIndicator);
}
public function musicBarHoldDown(_arg1:MouseEvent):void{
musicIndicator.x = mouseX;
dragMusicIndicator(_arg1);
updateMusic();
}
public function moveMusicIndicator(_arg1:MouseEvent):void{
musicIndicator.x = mouseX;
if (musicIndicator.x < musicBar.x){
musicIndicator.x = musicBar.x;
} else {
if (musicIndicator.x > (musicBar.x + musicBar.width)){
musicIndicator.x = (musicBar.x + musicBar.width);
};
};
updateMusic();
}
public function updateMusic():void{
var _local1:* = root;
var _local2:* = _local1.mainProgram;
_local2.bgmVolume = getMusicVolume();
_local2.bgmChannel.soundTransform = _local2.bgmTransform;
}
public function releaseMusicIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveMusicIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMusicIndicator);
}
public function dragSFXIndicator(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveSFXIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseSFXIndicator);
}
public function sfxBarHoldDown(_arg1:MouseEvent):void{
sfxIndicator.x = mouseX;
dragSFXIndicator(_arg1);
updateSFX();
}
public function moveSFXIndicator(_arg1:MouseEvent):void{
sfxIndicator.x = mouseX;
if (sfxIndicator.x < sfxBar.x){
sfxIndicator.x = sfxBar.x;
} else {
if (sfxIndicator.x > (sfxBar.x + sfxBar.width)){
sfxIndicator.x = (sfxBar.x + sfxBar.width);
};
};
updateSFX();
}
public function updateSFX():void{
var _local1:* = root;
var _local2:* = _local1.mainProgram;
_local2.sfxVolume = getSFXVolume();
_local2.sfxChannel.soundTransform = _local2.sfxTransform;
}
public function releaseSFXIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveSFXIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseSFXIndicator);
}
public function setMusicVolume(_arg1:Number):void{
musicIndicator.x = ((_arg1 * musicBar.width) + musicBar.x);
}
public function getMusicVolume():Number{
return (((musicIndicator.x - musicBar.x) / musicBar.width));
}
public function setSFXVolume(_arg1:Number):void{
sfxIndicator.x = ((_arg1 * sfxBar.width) + sfxBar.x);
}
public function getSFXVolume():Number{
return (((sfxIndicator.x - sfxBar.x) / sfxBar.width));
}
function frame1(){
musicIndicator.buttonMode = true;
musicIndicator.tabEnabled = false;
musicBar.buttonMode = true;
musicBar.tabEnabled = false;
musicIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragMusicIndicator);
musicBar.addEventListener(MouseEvent.MOUSE_DOWN, musicBarHoldDown);
sfxIndicator.buttonMode = true;
sfxIndicator.tabEnabled = false;
sfxBar.buttonMode = true;
sfxBar.tabEnabled = false;
sfxIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragSFXIndicator);
sfxBar.addEventListener(MouseEvent.MOUSE_DOWN, sfxBarHoldDown);
}
}
}//package ShopEmpire2_fla
Section 239
//UI_SoundBarWorldmap_213 (ShopEmpire2_fla.UI_SoundBarWorldmap_213)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SoundBarWorldmap_213 extends MovieClip {
public var sfxIndicator:MovieClip;
public var musicIndicator:MovieClip;
public var sfxBar:MovieClip;
public var musicBar:MovieClip;
public function UI_SoundBarWorldmap_213(){
addFrameScript(0, frame1);
}
public function dragMusicIndicator(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveMusicIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseMusicIndicator);
}
public function musicBarHoldDown(_arg1:MouseEvent):void{
musicIndicator.x = mouseX;
dragMusicIndicator(_arg1);
updateMusic();
}
public function moveMusicIndicator(_arg1:MouseEvent):void{
musicIndicator.x = mouseX;
if (musicIndicator.x < musicBar.x){
musicIndicator.x = musicBar.x;
} else {
if (musicIndicator.x > (musicBar.x + musicBar.width)){
musicIndicator.x = (musicBar.x + musicBar.width);
};
};
updateMusic();
}
public function updateMusic():void{
var _local1:* = root;
var _local2:* = _local1.mainProgram;
_local2.bgmVolume = getMusicVolume();
_local2.bgmChannel.soundTransform = _local2.bgmTransform;
}
public function releaseMusicIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveMusicIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseMusicIndicator);
}
public function dragSFXIndicator(_arg1:MouseEvent):void{
stage.addEventListener(MouseEvent.MOUSE_MOVE, moveSFXIndicator);
stage.addEventListener(MouseEvent.MOUSE_UP, releaseSFXIndicator);
}
public function sfxBarHoldDown(_arg1:MouseEvent):void{
sfxIndicator.x = mouseX;
dragSFXIndicator(_arg1);
updateSFX();
}
public function moveSFXIndicator(_arg1:MouseEvent):void{
sfxIndicator.x = mouseX;
if (sfxIndicator.x < sfxBar.x){
sfxIndicator.x = sfxBar.x;
} else {
if (sfxIndicator.x > (sfxBar.x + sfxBar.width)){
sfxIndicator.x = (sfxBar.x + sfxBar.width);
};
};
updateSFX();
}
public function updateSFX():void{
var _local1:* = root;
var _local2:* = _local1.mainProgram;
_local2.sfxVolume = getSFXVolume();
_local2.sfxChannel.soundTransform = _local2.sfxTransform;
}
public function releaseSFXIndicator(_arg1:MouseEvent):void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, moveSFXIndicator);
stage.removeEventListener(MouseEvent.MOUSE_UP, releaseSFXIndicator);
}
public function setMusicVolume(_arg1:Number):void{
musicIndicator.x = ((_arg1 * musicBar.width) + musicBar.x);
}
public function getMusicVolume():Number{
return (((musicIndicator.x - musicBar.x) / musicBar.width));
}
public function setSFXVolume(_arg1:Number):void{
sfxIndicator.x = ((_arg1 * sfxBar.width) + sfxBar.x);
}
public function getSFXVolume():Number{
return (((sfxIndicator.x - sfxBar.x) / sfxBar.width));
}
function frame1(){
musicIndicator.buttonMode = true;
musicIndicator.tabEnabled = false;
musicBar.buttonMode = true;
musicBar.tabEnabled = false;
musicIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragMusicIndicator);
musicBar.addEventListener(MouseEvent.MOUSE_DOWN, musicBarHoldDown);
sfxIndicator.buttonMode = true;
sfxIndicator.tabEnabled = false;
sfxBar.buttonMode = true;
sfxBar.tabEnabled = false;
sfxIndicator.addEventListener(MouseEvent.MOUSE_DOWN, dragSFXIndicator);
sfxBar.addEventListener(MouseEvent.MOUSE_DOWN, sfxBarHoldDown);
}
}
}//package ShopEmpire2_fla
Section 240
//UI_TransferPanel_402 (ShopEmpire2_fla.UI_TransferPanel_402)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_TransferPanel_402 extends MovieClip {
public var btnDecreaseAmount:SimpleButton;
public var btnSend:SimpleButton;
public var flagSymbol:MovieClip;
public var transferAmountInfo:TextField;
public var btnIncreaseAmount:SimpleButton;
public var btnNextCountry:SimpleButton;
public var btnPrevCountry:SimpleButton;
public var theRoot;
public var onTween;
public var maxTransfer;
public var transferAmount;
public function UI_TransferPanel_402(){
addFrameScript(0, frame1);
}
public function Initialize(_arg1:Event):void{
var _local3:*;
var _local2:* = root;
theRoot = _local2.mainProgram;
checkCountry();
if (theRoot.cityUnlocked.length <= 2){
btnNextCountry.visible = false;
btnPrevCountry.visible = false;
} else {
_local3 = theRoot.numberCountryData();
btnNextCountry.visible = (_local3 > 2);
btnPrevCountry.visible = (_local3 > 2);
};
if (theRoot.cityUnlocked.length > 3){
maxTransfer = 100000;
} else {
maxTransfer = 50000;
};
onTween = true;
btnNextCountry.addEventListener(MouseEvent.CLICK, btnNextCountryOnClick);
btnPrevCountry.addEventListener(MouseEvent.CLICK, btnPrevCountryOnClick);
btnIncreaseAmount.addEventListener(MouseEvent.CLICK, increaseAmount);
btnDecreaseAmount.addEventListener(MouseEvent.CLICK, decreaseAmount);
btnSend.addEventListener(MouseEvent.CLICK, sendProgress);
setSetting();
addEventListener(Event.REMOVED_FROM_STAGE, removedCheck);
}
public function removedCheck(_arg1:Event):void{
onTween = false;
btnNextCountry.removeEventListener(MouseEvent.CLICK, btnNextCountryOnClick);
btnPrevCountry.removeEventListener(MouseEvent.CLICK, btnPrevCountryOnClick);
btnIncreaseAmount.removeEventListener(MouseEvent.CLICK, increaseAmount);
btnDecreaseAmount.removeEventListener(MouseEvent.CLICK, decreaseAmount);
btnSend.removeEventListener(MouseEvent.CLICK, sendProgress);
removeEventListener(Event.REMOVED_FROM_STAGE, removedCheck);
}
public function checkCountry(_arg1:Boolean=false):void{
var _local2:*;
if (theRoot.cityUnlocked.length > 1){
_local2 = theRoot.currentGameplay.main;
while ((((_local2.country == flagSymbol.currentLabel)) || ((theRoot.cityUnlocked.indexOf(flagSymbol.currentLabel) < 0)))) {
if (_arg1){
if (flagSymbol.currentFrame > 1){
flagSymbol.prevFrame();
} else {
flagSymbol.gotoAndStop(flagSymbol.totalFrames);
};
} else {
if (flagSymbol.currentFrame < flagSymbol.totalFrames){
flagSymbol.nextFrame();
} else {
flagSymbol.gotoAndStop(1);
};
};
};
} else {
if (_local2.country == flagSymbol.currentLabel){
if (_arg1){
if (flagSymbol.currentFrame > 1){
flagSymbol.prevFrame();
} else {
flagSymbol.gotoAndStop(flagSymbol.totalFrames);
};
} else {
if (flagSymbol.currentFrame < flagSymbol.totalFrames){
flagSymbol.nextFrame();
} else {
flagSymbol.gotoAndStop(1);
};
};
};
};
}
public function btnNextCountryOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
flagSymbol.nextFrame();
checkCountry();
};
}
public function btnPrevCountryOnClick(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
flagSymbol.prevFrame();
checkCountry(true);
};
}
public function increaseAmount(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
transferAmount = (transferAmount + 1000);
if (transferAmount > maxTransfer){
transferAmount = 0;
};
setSetting();
};
}
public function decreaseAmount(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
transferAmount = (transferAmount - 1000);
if (transferAmount < 0){
transferAmount = maxTransfer;
};
setSetting();
};
}
public function disableTab():void{
var _local2:*;
var _local1:* = 0;
while (_local1 < numChildren) {
_local2 = getChildAt(_local1);
if ((_local2 as SimpleButton)){
_local2.tabEnabled = false;
};
_local1++;
};
}
public function setSetting():void{
transferAmountInfo.text = Utility.numberToMoney(transferAmount);
btnSend.enabled = (transferAmount > 0);
if (btnSend.enabled){
btnSend.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnSend.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
}
public function setOnTween(_arg1:Boolean):void{
onTween = _arg1;
}
public function sendProgress(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.target;
if (_local2.enabled){
_local3 = theRoot.currentGameplay.main;
if (theRoot.currentGameplay.cash >= transferAmount){
theRoot.currentGameplay.transferOutReport = (theRoot.currentGameplay.transferOutReport + transferAmount);
_local3.addCash(-(transferAmount));
_local3.GameInterface.closeTransfer();
_local3.GameInterface.btnTransfer.enabled = false;
_local3.GameInterface.btnTransfer.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
theRoot.transferData = {fromCountry:_local3.country, targetCountry:flagSymbol.currentLabel, amount:transferAmount, transDelay:36};
theRoot.transferCountdown = 7;
theRoot.currentGameplay.showNotification("Transfer will be arrived in 36 hours.");
} else {
theRoot.currentGameplay.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
}
function frame1(){
onTween = false;
maxTransfer = 50000;
flagSymbol.stop();
transferAmountInfo.mouseEnabled = false;
disableTab();
transferAmount = 0;
setSetting();
addEventListener(Event.ADDED_TO_STAGE, Initialize);
}
}
}//package ShopEmpire2_fla
Section 241
//UI_WorkTimePullDownMenu_295 (ShopEmpire2_fla.UI_WorkTimePullDownMenu_295)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_WorkTimePullDownMenu_295 extends MovieClip {
public var highlightAll:MovieClip;
public var pullDownNight:MovieClip;
public var pullDownAll:MovieClip;
public var highlightDay:MovieClip;
public var pullDownDay:MovieClip;
public var highlightNight:MovieClip;
public var pullDownList;
public var highlightList;
public function UI_WorkTimePullDownMenu_295(){
addFrameScript(0, frame1);
}
public function initPullDown():void{
var _local1:* = 0;
while (_local1 < pullDownList.length) {
pullDownList[_local1].buttonMode = true;
pullDownList[_local1].tabEnabled = false;
pullDownList[_local1].addEventListener(MouseEvent.MOUSE_OVER, pullDownOnOver);
pullDownList[_local1].addEventListener(MouseEvent.MOUSE_OUT, pullDownOnOut);
_local1++;
};
}
public function initHighlight():void{
var _local1:* = 0;
while (_local1 < highlightList.length) {
highlightList[_local1].visible = false;
_local1++;
};
}
public function pullDownOnOver(_arg1:MouseEvent):void{
var _local2:* = pullDownList.indexOf(_arg1.currentTarget);
if ((_local2 in highlightList)){
highlightList[_local2].visible = true;
};
}
public function pullDownOnOut(_arg1:MouseEvent):void{
var _local2:* = pullDownList.indexOf(_arg1.currentTarget);
if ((_local2 in highlightList)){
highlightList[_local2].visible = false;
};
}
function frame1(){
pullDownList = new Array();
pullDownList.push(pullDownDay);
pullDownList.push(pullDownNight);
pullDownList.push(pullDownAll);
highlightList = new Array();
highlightList.push(highlightDay);
highlightList.push(highlightNight);
highlightList.push(highlightAll);
initPullDown();
initHighlight();
}
}
}//package ShopEmpire2_fla
Section 242
//UI_worktimesetting_386 (ShopEmpire2_fla.UI_worktimesetting_386)
package ShopEmpire2_fla {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_worktimesetting_386 extends MovieClip {
public var shiftAll:UIButtonShiftMark;
public var shiftNight:UIButtonShiftMark;
public var borderNight:MovieClip;
public var borderDay:MovieClip;
public var shiftDay:UIButtonShiftMark;
public var btnClose:SimpleButton;
public var borderAll:MovieClip;
public var toggleButtonList;
public var borderButtonList;
public function UI_worktimesetting_386(){
addFrameScript(0, frame1);
}
public function initToggleButton():void{
var _local1:* = 0;
while (_local1 < toggleButtonList.length) {
toggleButtonList[_local1].addEventListener(ToggleButtonEvent.ACTIVATE, toggleButtonIsActivate);
toggleButtonList[_local1].addEventListener(ToggleButtonEvent.FORCE_ACTIVATE, toggleButtonIsActivate);
_local1++;
};
}
public function initBorderButton():void{
var _local1:* = 0;
while (_local1 < borderButtonList.length) {
borderButtonList[_local1].buttonMode = true;
borderButtonList[_local1].addEventListener(MouseEvent.CLICK, activateToggleButton);
_local1++;
};
}
public function toggleButtonIsActivate(_arg1:ToggleButtonEvent):void{
var _local2:* = _arg1.currentTarget;
disableAllToggleButton(_local2);
_local2.disableButton();
var _local3:* = 0;
while (_local3 < borderButtonList.length) {
if (toggleButtonList.indexOf((_local2 == _local3))){
borderButtonList[_local3].enabled = false;
} else {
borderButtonList[_local3].enabled = true;
};
_local3++;
};
}
public function disableAllToggleButton(_arg1:Object=null):void{
var _local3:*;
var _local2:* = 0;
while (_local2 < toggleButtonList.length) {
_local3 = toggleButtonList[_local2];
if (_local3 != _arg1){
_local3.isActive = false;
_local3.enableButton();
};
_local2++;
};
}
public function activateToggleButton(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = toggleButtonList[borderButtonList.indexOf(_local2)];
disableAllToggleButton(_local3);
_local3.isActive = true;
_local3.disableButton();
};
}
public function getSelectedShift():int{
var _local1:* = 0;
if (shiftDay.isActive){
_local1 = 0;
} else {
if (shiftNight.isActive){
_local1 = 1;
} else {
if (shiftAll.isActive){
_local1 = 2;
};
};
};
return (_local1);
}
public function setWorkTime(_arg1:String):void{
disableAllToggleButton();
switch (_arg1){
case "Day":
shiftDay.isActive = true;
break;
case "Night":
shiftNight.isActive = true;
break;
case "All":
shiftAll.isActive = true;
break;
default:
shiftAll.isActive = true;
};
}
function frame1(){
toggleButtonList = new Array();
toggleButtonList.push(shiftDay);
toggleButtonList.push(shiftNight);
toggleButtonList.push(shiftAll);
borderButtonList = new Array();
borderButtonList.push(borderDay);
borderButtonList.push(borderNight);
borderButtonList.push(borderAll);
initToggleButton();
initBorderButton();
}
}
}//package ShopEmpire2_fla
Section 243
//UIParameterDetailStaffButton_289 (ShopEmpire2_fla.UIParameterDetailStaffButton_289)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class UIParameterDetailStaffButton_289 extends MovieClip {
public var promoteButton:SimpleButton;
public var fireButton:SimpleButton;
public function UIParameterDetailStaffButton_289(){
addFrameScript(0, frame1);
}
function frame1(){
promoteButton.tabEnabled = false;
fireButton.tabEnabled = false;
}
}
}//package ShopEmpire2_fla
Section 244
//UIStaffDetailWorkTimeArea_294 (ShopEmpire2_fla.UIStaffDetailWorkTimeArea_294)
package ShopEmpire2_fla {
import flash.display.*;
import greensock.*;
import flash.events.*;
import flash.text.*;
public dynamic class UIStaffDetailWorkTimeArea_294 extends MovieClip {
public var workArea:TextField;
public var workTimePullDownButton:SimpleButton;
public var workTime:TextField;
public var workAreaSpeedDial:MovieClip;
public var workTimePullDown:MovieClip;
public var onTween;
public function UIStaffDetailWorkTimeArea_294(){
addFrameScript(0, frame1);
}
public function pullDownButtonOnClick(_arg1:MouseEvent):void{
if (!onTween){
if (!workTimePullDown.visible){
showWorkTimePullDown();
} else {
hideWorkTimePullDown();
};
};
}
public function showWorkTimePullDown():void{
onTween = true;
workTimePullDown.visible = true;
workTimePullDown.scaleY = 1;
TweenLite.from(workTimePullDown, 0.3, {scaleY:0, onComplete:totalShow});
}
public function totalShow():void{
onTween = false;
}
public function hideWorkTimePullDown():void{
onTween = true;
TweenLite.to(workTimePullDown, 0.3, {scaleY:0, onComplete:hidePullDown});
}
public function hidePullDown():void{
onTween = false;
workTimePullDown.visible = false;
}
function frame1(){
workArea.autoSize = TextFieldAutoSize.LEFT;
workArea.mouseEnabled = false;
workTime.autoSize = TextFieldAutoSize.LEFT;
workTime.mouseEnabled = false;
workTimePullDownButton.tabEnabled = false;
workTimePullDownButton.addEventListener(MouseEvent.CLICK, pullDownButtonOnClick);
workTimePullDown.scaleY = 0;
workTimePullDown.visible = false;
onTween = false;
}
}
}//package ShopEmpire2_fla
Section 245
//UIstar_281 (ShopEmpire2_fla.UIstar_281)
package ShopEmpire2_fla {
import flash.display.*;
public dynamic class UIstar_281 extends MovieClip {
public var activeStar:MovieClip;
public function UIstar_281(){
addFrameScript(0, frame1, 22, frame23);
}
function frame1(){
stop();
}
function frame23(){
stop();
}
}
}//package ShopEmpire2_fla
Section 246
//BanditDropBundle (BanditDropBundle)
package {
import flash.events.*;
import Instance.*;
public dynamic class BanditDropBundle extends BonusObject {
public function BanditDropBundle(){
addFrameScript(1, frame2);
}
public function checkCurrentItem(_arg1:Event):void{
if (coinBody.numChildren <= 0){
this.parent.removeChild(this);
};
}
public function removedFromStage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, checkCurrentItem);
removeEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
function frame2(){
addEventListener(Event.ENTER_FRAME, checkCurrentItem);
addEventListener(Event.REMOVED_FROM_STAGE, removedFromStage);
}
}
}//package
Section 247
//BanditDropCoin (BanditDropCoin)
package {
import greensock.*;
import greensock.easing.*;
import Instance.*;
public dynamic class BanditDropCoin extends BonusObject {
public function BanditDropCoin(){
addFrameScript(1, frame2);
}
function frame2(){
TweenLite.to(this, (taken.totalFrames / 24), {y:(this.y - 20), ease:Back.easeOut, easeParams:[5], onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
}
}//package
Section 248
//BanditGlider (BanditGlider)
package {
import Instance.*;
public dynamic class BanditGlider extends FlyingBandit {
}
}//package
Section 249
//BanditNinja (BanditNinja)
package {
import Instance.*;
public dynamic class BanditNinja extends Ninja {
}
}//package
Section 250
//BanditNormal (BanditNormal)
package {
import Instance.*;
public dynamic class BanditNormal extends BanditStandart {
}
}//package
Section 251
//BanditUltimate (BanditUltimate)
package {
import Instance.*;
public dynamic class BanditUltimate extends BanditPro {
}
}//package
Section 252
//BasementParkingLotEmpty (BasementParkingLotEmpty)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BasementParkingLotEmpty extends MovieClip {
public var unbuildable3:MovieClip;
public var unbuildable2:MovieClip;
public var unbuildable1:MovieClip;
public var unbuildable0:MovieClip;
public var maskArea:MovieClip;
public var unbuildable7:MovieClip;
public var unbuildable6:MovieClip;
public var unbuildable5:MovieClip;
public var unbuildable4:MovieClip;
public var unbuildable9:MovieClip;
public var unbuildable8:MovieClip;
public var unbuildableClip;
public function BasementParkingLotEmpty(){
addFrameScript(0, frame1);
}
function frame1(){
unbuildableClip = new Array();
unbuildableClip.push(unbuildable0);
unbuildableClip.push(unbuildable1);
unbuildableClip.push(unbuildable2);
unbuildableClip.push(unbuildable3);
unbuildableClip.push(unbuildable4);
unbuildableClip.push(unbuildable5);
unbuildableClip.push(unbuildable6);
unbuildableClip.push(unbuildable7);
unbuildableClip.push(unbuildable8);
unbuildableClip.push(unbuildable9);
}
}
}//package
Section 253
//BGMAlarm (BGMAlarm)
package {
import flash.media.*;
public dynamic class BGMAlarm extends Sound {
}
}//package
Section 254
//BGMArab (BGMArab)
package {
import flash.media.*;
public dynamic class BGMArab extends Sound {
}
}//package
Section 255
//BGMEventBachMinuetinG (BGMEventBachMinuetinG)
package {
import flash.media.*;
public dynamic class BGMEventBachMinuetinG extends Sound {
}
}//package
Section 256
//BGMEventBethoveenMinuetinG (BGMEventBethoveenMinuetinG)
package {
import flash.media.*;
public dynamic class BGMEventBethoveenMinuetinG extends Sound {
}
}//package
Section 257
//BGMEventBocheriniMinuet (BGMEventBocheriniMinuet)
package {
import flash.media.*;
public dynamic class BGMEventBocheriniMinuet extends Sound {
}
}//package
Section 258
//BGMEventCarShow (BGMEventCarShow)
package {
import flash.media.*;
public dynamic class BGMEventCarShow extends Sound {
}
}//package
Section 259
//BGMEventDanceOfTheKnights (BGMEventDanceOfTheKnights)
package {
import flash.media.*;
public dynamic class BGMEventDanceOfTheKnights extends Sound {
}
}//package
Section 260
//BGMEventElecExpo (BGMEventElecExpo)
package {
import flash.media.*;
public dynamic class BGMEventElecExpo extends Sound {
}
}//package
Section 261
//BGMEventLiveConcert (BGMEventLiveConcert)
package {
import flash.media.*;
public dynamic class BGMEventLiveConcert extends Sound {
}
}//package
Section 262
//BGMIndia1 (BGMIndia1)
package {
import flash.media.*;
public dynamic class BGMIndia1 extends Sound {
}
}//package
Section 263
//BGMIndia2 (BGMIndia2)
package {
import flash.media.*;
public dynamic class BGMIndia2 extends Sound {
}
}//package
Section 264
//BGMItaly (BGMItaly)
package {
import flash.media.*;
public dynamic class BGMItaly extends Sound {
}
}//package
Section 265
//BGMLondon1 (BGMLondon1)
package {
import flash.media.*;
public dynamic class BGMLondon1 extends Sound {
}
}//package
Section 266
//BGMLondon2 (BGMLondon2)
package {
import flash.media.*;
public dynamic class BGMLondon2 extends Sound {
}
}//package
Section 267
//BGMMainMenu (BGMMainMenu)
package {
import flash.media.*;
public dynamic class BGMMainMenu extends Sound {
}
}//package
Section 268
//BGMNight (BGMNight)
package {
import flash.media.*;
public dynamic class BGMNight extends Sound {
}
}//package
Section 269
//BGMRusia (BGMRusia)
package {
import flash.media.*;
public dynamic class BGMRusia extends Sound {
}
}//package
Section 270
//BGMWorldMap1 (BGMWorldMap1)
package {
import flash.media.*;
public dynamic class BGMWorldMap1 extends Sound {
}
}//package
Section 271
//BGMWorldMap2 (BGMWorldMap2)
package {
import flash.media.*;
public dynamic class BGMWorldMap2 extends Sound {
}
}//package
Section 272
//BoothArcade (BoothArcade)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothArcade extends Booth {
public var interval;
public var intervalL;
public var intervalR;
public function BoothArcade(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
interval = (body.closedDoor.y / body.OPEN_POS);
intervalL = (body.closedDoorL.y / body.OPEN_POS);
intervalR = (body.closedDoorR.y / body.OPEN_POS);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
body.closedDoor.y = (interval * body.OPEN_POS);
if (_arg1.boothLevel < 3){
body.closedDoorL.y = (intervalL * body.OPEN_POS);
body.closedDoorR.y = (intervalR * body.OPEN_POS);
};
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, beforeUpgrade);
interval = 0;
intervalL = 0;
intervalR = 0;
}
}
}//package
Section 273
//BoothBabyShop (BoothBabyShop)
package {
import Instance.*;
public dynamic class BoothBabyShop extends Booth {
}
}//package
Section 274
//BoothBookstore (BoothBookstore)
package {
import Instance.*;
public dynamic class BoothBookstore extends Booth {
}
}//package
Section 275
//BoothBoutique (BoothBoutique)
package {
import Instance.*;
public dynamic class BoothBoutique extends Booth {
}
}//package
Section 276
//BoothBurger (BoothBurger)
package {
import Instance.*;
public dynamic class BoothBurger extends Booth {
}
}//package
Section 277
//BoothCafe (BoothCafe)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothCafe extends Booth {
public var interval;
public function BoothCafe(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
interval = (body.closedDoor.y / body.OPEN_POS);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
body.closedDoor.y = (interval * body.OPEN_POS);
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, beforeUpgrade);
interval = 0;
}
}
}//package
Section 278
//BoothCake (BoothCake)
package {
import Instance.*;
public dynamic class BoothCake extends Booth {
}
}//package
Section 279
//BoothCandy (BoothCandy)
package {
import Instance.*;
public dynamic class BoothCandy extends Booth {
}
}//package
Section 280
//BoothCinema (BoothCinema)
package {
import Instance.*;
public dynamic class BoothCinema extends Booth {
}
}//package
Section 281
//BoothDrugStore (BoothDrugStore)
package {
import Instance.*;
public dynamic class BoothDrugStore extends Booth {
}
}//package
Section 282
//BoothGadget (BoothGadget)
package {
import Instance.*;
public dynamic class BoothGadget extends Booth {
}
}//package
Section 283
//BoothIceCream (BoothIceCream)
package {
import Instance.*;
public dynamic class BoothIceCream extends Booth {
}
}//package
Section 284
//BoothJewelry (BoothJewelry)
package {
import Instance.*;
public dynamic class BoothJewelry extends Booth {
}
}//package
Section 285
//BoothLiquor (BoothLiquor)
package {
import Instance.*;
public dynamic class BoothLiquor extends Booth {
}
}//package
Section 286
//BoothMusic (BoothMusic)
package {
import Instance.*;
public dynamic class BoothMusic extends Booth {
}
}//package
Section 287
//BoothSalon (BoothSalon)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothSalon extends Booth {
public function BoothSalon(){
addFrameScript(0, frame1);
}
public function afterUpgrade(_arg1:BoothEvent):void{
if (_arg1.boothLevel == 3){
if (boothOpen){
body.closedDoor.y = body.OPEN_POS;
} else {
body.closedDoor.y = 0;
};
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
};
}
function frame1(){
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
}
}//package
Section 288
//BoothSport (BoothSport)
package {
import Instance.*;
public dynamic class BoothSport extends Booth {
}
}//package
Section 289
//BoothSteak (BoothSteak)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothSteak extends Booth {
public var interval;
public function BoothSteak(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
interval = (body.closedDoor.y / body.OPEN_POS);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
body.closedDoor.y = (interval * body.OPEN_POS);
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, beforeUpgrade);
interval = 0;
}
}
}//package
Section 290
//BoothSupermarket (BoothSupermarket)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothSupermarket extends Booth {
public var queue;
public var interval;
public function BoothSupermarket(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
interval = (body.closedDoor.y / body.OPEN_POS);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _world;
var _local3:* = 0;
while (_local3 < queue.length) {
_local4 = body.getChildByName(("exit" + _local3));
_local5 = _local2.globalToLocal(_local4.parent.localToGlobal(new Point(_local4.x, _local4.y)));
_local6 = 0;
while (_local6 < queue[_local3].length) {
queue[_local3][_local6].x = _local5.x;
queue[_local3][_local6].y = _local5.y;
_local6++;
};
_local3++;
};
body.closedDoor.y = (interval * body.OPEN_POS);
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, beforeUpgrade);
queue = new Array(3);
queue[0] = new Array();
queue[1] = new Array();
queue[2] = new Array();
interval = 0;
}
}
}//package
Section 291
//BoothSushi (BoothSushi)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class BoothSushi extends Booth {
public var intervalR;
public var intervalL;
public function BoothSushi(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
var _local2:* = (body.OPEN_RIGHT_POS - body.CLOSE_RIGHT_POS);
intervalR = ((body.rightDoor.x - body.CLOSE_RIGHT_POS) / _local2);
_local2 = (body.OPEN_LEFT_POS - body.CLOSE_LEFT_POS);
intervalL = ((body.leftDoor.x - body.CLOSE_LEFT_POS) / _local2);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
var _local2:* = (body.OPEN_RIGHT_POS - body.CLOSE_RIGHT_POS);
body.rightDoor.x = ((intervalR * _local2) + body.CLOSE_RIGHT_POS);
_local2 = (body.OPEN_LEFT_POS - body.CLOSE_LEFT_POS);
body.leftDoor.x = ((intervalL * _local2) + body.CLOSE_LEFT_POS);
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
addEventListener(BoothEvent.BEFORE_FLASHING_UPGRADE, beforeUpgrade);
intervalR = 0;
intervalL = 0;
}
}
}//package
Section 292
//BoothTattoo (BoothTattoo)
package {
import Instance.*;
public dynamic class BoothTattoo extends Booth {
}
}//package
Section 293
//BoothToyStore (BoothToyStore)
package {
import Instance.*;
public dynamic class BoothToyStore extends Booth {
}
}//package
Section 294
//BtnParameterBooth (BtnParameterBooth)
package {
import flash.text.*;
import Instance.ui.*;
public dynamic class BtnParameterBooth extends ToggleButton {
public function BtnParameterBooth(){
addFrameScript(0, frame1);
}
function frame1(){
amount.mouseEnabled = false;
amount.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package
Section 295
//BtnParameterStaff (BtnParameterStaff)
package {
import flash.text.*;
import Instance.ui.*;
public dynamic class BtnParameterStaff extends ToggleButton {
public function BtnParameterStaff(){
addFrameScript(0, frame1);
}
function frame1(){
amount.mouseEnabled = false;
amount.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package
Section 296
//BtnParameterVisitor (BtnParameterVisitor)
package {
import flash.text.*;
import Instance.ui.*;
public dynamic class BtnParameterVisitor extends ToggleButton {
public function BtnParameterVisitor(){
addFrameScript(0, frame1);
}
function frame1(){
amount.mouseEnabled = false;
amount.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package
Section 297
//BuildArcade (BuildArcade)
package {
import Instance.ui.*;
public dynamic class BuildArcade extends BuildSymbol {
public function BuildArcade(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothArcade;
}
}
}//package
Section 298
//BuildATM (BuildATM)
package {
import Instance.ui.*;
public dynamic class BuildATM extends BuildSymbol {
public function BuildATM(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = FacilityATM;
}
}
}//package
Section 299
//BuildBabyShop (BuildBabyShop)
package {
import Instance.ui.*;
public dynamic class BuildBabyShop extends BuildSymbol {
public function BuildBabyShop(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothBabyShop;
}
}
}//package
Section 300
//BuildBookstore (BuildBookstore)
package {
import Instance.ui.*;
public dynamic class BuildBookstore extends BuildSymbol {
public function BuildBookstore(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothBookstore;
}
}
}//package
Section 301
//BuildBoutique (BuildBoutique)
package {
import Instance.ui.*;
public dynamic class BuildBoutique extends BuildSymbol {
public function BuildBoutique(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothBoutique;
}
}
}//package
Section 302
//BuildBurger (BuildBurger)
package {
import Instance.ui.*;
public dynamic class BuildBurger extends BuildSymbol {
public function BuildBurger(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothBurger;
}
}
}//package
Section 303
//BuildCafe (BuildCafe)
package {
import Instance.ui.*;
public dynamic class BuildCafe extends BuildSymbol {
public function BuildCafe(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothCafe;
}
}
}//package
Section 304
//BuildCake (BuildCake)
package {
import Instance.ui.*;
public dynamic class BuildCake extends BuildSymbol {
public function BuildCake(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothCake;
}
}
}//package
Section 305
//BuildCandy (BuildCandy)
package {
import Instance.ui.*;
public dynamic class BuildCandy extends BuildSymbol {
public function BuildCandy(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothCandy;
}
}
}//package
Section 306
//BuildCinema (BuildCinema)
package {
import Instance.ui.*;
public dynamic class BuildCinema extends BuildSymbol {
public function BuildCinema(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothCinema;
}
}
}//package
Section 307
//BuildDrugStore (BuildDrugStore)
package {
import Instance.ui.*;
public dynamic class BuildDrugStore extends BuildSymbol {
public function BuildDrugStore(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothDrugStore;
}
}
}//package
Section 308
//BuildElevator (BuildElevator)
package {
import Instance.ui.*;
public dynamic class BuildElevator extends BuildSymbol {
public function BuildElevator(){
addFrameScript(0, frame1);
}
function frame1(){
this.buildRelation = FacilityElevator;
}
}
}//package
Section 309
//BuildEscalator (BuildEscalator)
package {
import Instance.ui.*;
public dynamic class BuildEscalator extends BuildSymbol {
public function BuildEscalator(){
addFrameScript(0, frame1);
}
function frame1(){
this.buildRelation = FacilityEscalator;
}
}
}//package
Section 310
//BuildGadget (BuildGadget)
package {
import Instance.ui.*;
public dynamic class BuildGadget extends BuildSymbol {
public function BuildGadget(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothGadget;
}
}
}//package
Section 311
//BuildHall (BuildHall)
package {
import Instance.ui.*;
public dynamic class BuildHall extends BuildSymbol {
public function BuildHall(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = Hall;
}
}
}//package
Section 312
//BuildIceCream (BuildIceCream)
package {
import Instance.ui.*;
public dynamic class BuildIceCream extends BuildSymbol {
public function BuildIceCream(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothIceCream;
}
}
}//package
Section 313
//BuildJewelry (BuildJewelry)
package {
import Instance.ui.*;
public dynamic class BuildJewelry extends BuildSymbol {
public function BuildJewelry(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothJewelry;
}
}
}//package
Section 314
//BuildLiquor (BuildLiquor)
package {
import Instance.ui.*;
public dynamic class BuildLiquor extends BuildSymbol {
public function BuildLiquor(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothLiquor;
}
}
}//package
Section 315
//BuildMusic (BuildMusic)
package {
import Instance.ui.*;
public dynamic class BuildMusic extends BuildSymbol {
public function BuildMusic(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothMusic;
}
}
}//package
Section 316
//BuildParkingLot (BuildParkingLot)
package {
import Instance.ui.*;
public dynamic class BuildParkingLot extends BuildSymbol {
public function BuildParkingLot(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = FacilityParkingLot;
}
}
}//package
Section 317
//BuildRestroom (BuildRestroom)
package {
import Instance.ui.*;
public dynamic class BuildRestroom extends BuildSymbol {
public function BuildRestroom(){
addFrameScript(0, frame1);
}
function frame1(){
this.buildRelation = FacilityRestroom;
}
}
}//package
Section 318
//BuildSalon (BuildSalon)
package {
import Instance.ui.*;
public dynamic class BuildSalon extends BuildSymbol {
public function BuildSalon(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothSalon;
}
}
}//package
Section 319
//BuildSport (BuildSport)
package {
import Instance.ui.*;
public dynamic class BuildSport extends BuildSymbol {
public function BuildSport(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothSport;
}
}
}//package
Section 320
//BuildSteak (BuildSteak)
package {
import Instance.ui.*;
public dynamic class BuildSteak extends BuildSymbol {
public function BuildSteak(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothSteak;
}
}
}//package
Section 321
//BuildSubway (BuildSubway)
package {
import Instance.ui.*;
public dynamic class BuildSubway extends BuildSymbol {
public function BuildSubway(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = FacilitySubway;
}
}
}//package
Section 322
//BuildSupermarket (BuildSupermarket)
package {
import Instance.ui.*;
public dynamic class BuildSupermarket extends BuildSymbol {
public function BuildSupermarket(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothSupermarket;
}
}
}//package
Section 323
//BuildSushi (BuildSushi)
package {
import Instance.ui.*;
public dynamic class BuildSushi extends BuildSymbol {
public function BuildSushi(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothSushi;
}
}
}//package
Section 324
//BuildTattoo (BuildTattoo)
package {
import Instance.ui.*;
public dynamic class BuildTattoo extends BuildSymbol {
public function BuildTattoo(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothTattoo;
}
}
}//package
Section 325
//BuildTerrace (BuildTerrace)
package {
import Instance.ui.*;
public dynamic class BuildTerrace extends BuildSymbol {
public function BuildTerrace(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = FacilityTerrace;
}
}
}//package
Section 326
//BuildToyStore (BuildToyStore)
package {
import Instance.ui.*;
public dynamic class BuildToyStore extends BuildSymbol {
public function BuildToyStore(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = BoothToyStore;
}
}
}//package
Section 327
//Cars (Cars)
package {
import Instance.*;
public dynamic class Cars extends CarObject {
}
}//package
Section 328
//CashSymbol (CashSymbol)
package {
import flash.display.*;
import flash.text.*;
public dynamic class CashSymbol extends MovieClip {
public var cashText:TextField;
public function CashSymbol(){
addFrameScript(0, frame1);
}
function frame1(){
cashText.autoSize = TextFieldAutoSize.CENTER;
cashText.x = (-(cashText.width) / 2);
cashText.y = (-(cashText.height) / 2);
}
}
}//package
Section 329
//CrewElectrician (CrewElectrician)
package {
import Instance.events.*;
import Instance.*;
public dynamic class CrewElectrician extends StaffElectrician {
public function CrewElectrician(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame2(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame3(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package
Section 330
//CrewEntertainer (CrewEntertainer)
package {
import Instance.events.*;
import Instance.*;
public dynamic class CrewEntertainer extends StaffEntertainer {
public function CrewEntertainer(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame2(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame3(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame4(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame5(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame6(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package
Section 331
//CrewJanitor (CrewJanitor)
package {
import Instance.events.*;
import Instance.*;
public dynamic class CrewJanitor extends StaffJanitor {
public function CrewJanitor(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
function frame1(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame2(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame3(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package
Section 332
//CrewSecurity (CrewSecurity)
package {
import Instance.events.*;
import Instance.*;
public dynamic class CrewSecurity extends StaffSecurity {
public function CrewSecurity(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame2(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame3(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame4(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame5(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame6(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package
Section 333
//dll_buildLimit (dll_buildLimit)
package {
import flash.display.*;
public dynamic class dll_buildLimit extends MovieClip {
}
}//package
Section 334
//dll_ground (dll_ground)
package {
import flash.display.*;
public dynamic class dll_ground extends MovieClip {
public var groundBottom:MovieClip;
}
}//package
Section 335
//dll_helppage (dll_helppage)
package {
import flash.display.*;
public dynamic class dll_helppage extends MovieClip {
}
}//package
Section 336
//dll_Sky (dll_Sky)
package {
import flash.display.*;
public dynamic class dll_Sky extends MovieClip {
}
}//package
Section 337
//dll_Street (dll_Street)
package {
import flash.display.*;
public dynamic class dll_Street extends MovieClip {
}
}//package
Section 338
//dll_streetlamp (dll_streetlamp)
package {
import flash.display.*;
public dynamic class dll_streetlamp extends MovieClip {
}
}//package
Section 339
//dll_Tree1 (dll_Tree1)
package {
import flash.display.*;
public dynamic class dll_Tree1 extends MovieClip {
}
}//package
Section 340
//dll_Tree2 (dll_Tree2)
package {
import flash.display.*;
public dynamic class dll_Tree2 extends MovieClip {
}
}//package
Section 341
//DragCursor (DragCursor)
package {
import flash.display.*;
public dynamic class DragCursor extends MovieClip {
public function DragCursor(){
addFrameScript(0, frame1);
}
function frame1(){
this.mouseChildren = false;
this.mouseEnabled = false;
}
}
}//package
Section 342
//ElevatorBody (ElevatorBody)
package {
import flash.display.*;
public dynamic class ElevatorBody extends MovieClip {
public var doorRight:MovieClip;
public var doorLeft:MovieClip;
public var enterance:MovieClip;
}
}//package
Section 343
//EmptySpace (EmptySpace)
package {
import flash.display.*;
public dynamic class EmptySpace extends MovieClip {
public function EmptySpace(){
addFrameScript(0, frame1);
}
function frame1(){
this.alpha = 0.9;
}
}
}//package
Section 344
//ExpandElevatorSymbol (ExpandElevatorSymbol)
package {
import flash.display.*;
public dynamic class ExpandElevatorSymbol extends MovieClip {
public var buildBody:MovieClip;
}
}//package
Section 345
//ExpandSymbol (ExpandSymbol)
package {
import flash.display.*;
public dynamic class ExpandSymbol extends MovieClip {
public var wireSymbol:MovieClip;
}
}//package
Section 346
//ExplosionSmall (ExplosionSmall)
package {
import flash.display.*;
public dynamic class ExplosionSmall extends MovieClip {
}
}//package
Section 347
//FacilityATM (FacilityATM)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FacilityATM extends Booth {
public var queue;
public var interval;
public function FacilityATM(){
addFrameScript(0, frame1);
}
public function beforeUpgrade(_arg1:BoothEvent):void{
interval = (body.closedDoor.y / body.OPEN_POS);
addEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
public function afterUpgrade(_arg1:BoothEvent):void{
var _local2:* = _world;
body.closedDoor.y = (interval * body.OPEN_POS);
removeEventListener(BoothEvent.AFTER_FLASHING_UPGRADE, afterUpgrade);
}
function frame1(){
queue = new Array(2);
queue[0] = null;
queue[1] = null;
interval = 0;
}
}
}//package
Section 348
//FacilityElevator (FacilityElevator)
package {
import Instance.*;
public dynamic class FacilityElevator extends Elevator {
}
}//package
Section 349
//FacilityEscalator (FacilityEscalator)
package {
import Instance.*;
public dynamic class FacilityEscalator extends Escalator {
}
}//package
Section 350
//FacilityParkingLot (FacilityParkingLot)
package {
import Instance.*;
public dynamic class FacilityParkingLot extends ParkingLot {
}
}//package
Section 351
//FacilityRestroom (FacilityRestroom)
package {
import Instance.*;
public dynamic class FacilityRestroom extends Restroom {
}
}//package
Section 352
//facilityrestroompintu (facilityrestroompintu)
package {
import Instance.ui.*;
public dynamic class facilityrestroompintu extends DoorSymbol {
}
}//package
Section 353
//FacilitySubway (FacilitySubway)
package {
import Instance.*;
public dynamic class FacilitySubway extends Subway {
}
}//package
Section 354
//FacilityTerrace (FacilityTerrace)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class FacilityTerrace extends Booth {
public var chairList;
public var visitorSit;
public function FacilityTerrace(){
addFrameScript(0, frame1);
}
function frame1(){
this.upgradeAble = false;
chairList = new Array();
chairList.push(body.chair0);
chairList.push(body.chair1);
chairList.push(body.chair2);
chairList.push(body.chair3);
chairList.push(body.chair4);
chairList.push(body.chair5);
chairList.push(body.chair6);
chairList.push(body.chair7);
visitorSit = new Array(8);
}
}
}//package
Section 355
//Floor (Floor)
package {
import flash.display.*;
public dynamic class Floor extends MovieClip {
public var rightFloor:MovieClip;
public var leftFloor:MovieClip;
public var middleFloor:MovieClip;
public function Floor(){
addFrameScript(0, frame1);
}
public function setWidth(_arg1:Number):void{
middleFloor.width = (_arg1 - (leftFloor.width + rightFloor.width));
leftFloor.x = ((-(middleFloor.width) / 2) - leftFloor.width);
rightFloor.x = ((middleFloor.width / 2) + rightFloor.width);
}
function frame1(){
}
}
}//package
Section 356
//fx_ninjitsuSmoke (fx_ninjitsuSmoke)
package {
import flash.display.*;
public dynamic class fx_ninjitsuSmoke extends MovieClip {
public function fx_ninjitsuSmoke(){
addFrameScript(7, frame8);
}
function frame8(){
this.parent.removeChild(this);
stop();
}
}
}//package
Section 357
//fxbadrelation (fxbadrelation)
package {
import flash.display.*;
public dynamic class fxbadrelation extends MovieClip {
}
}//package
Section 358
//fxcompleteallmission (fxcompleteallmission)
package {
import flash.display.*;
public dynamic class fxcompleteallmission extends MovieClip {
public function fxcompleteallmission(){
addFrameScript(110, frame111);
}
function frame111(){
stop();
if (this.parent != null){
this.parent.removeChild(this);
};
}
}
}//package
Section 359
//fxending (fxending)
package {
import flash.display.*;
public dynamic class fxending extends MovieClip {
public var linkFacebook:SimpleButton;
}
}//package
Section 360
//fxgoodrelation (fxgoodrelation)
package {
import flash.display.*;
public dynamic class fxgoodrelation extends MovieClip {
}
}//package
Section 361
//GameBackground1 (GameBackground1)
package {
import flash.display.*;
public dynamic class GameBackground1 extends MovieClip {
}
}//package
Section 362
//GameBackground2 (GameBackground2)
package {
import flash.display.*;
public dynamic class GameBackground2 extends MovieClip {
}
}//package
Section 363
//GameBackground3 (GameBackground3)
package {
import flash.display.*;
public dynamic class GameBackground3 extends MovieClip {
}
}//package
Section 364
//GameLandmark (GameLandmark)
package {
import flash.display.*;
public dynamic class GameLandmark extends MovieClip {
public var landmarkBody:MovieClip;
}
}//package
Section 365
//Hall (Hall)
package {
import Instance.*;
public dynamic class Hall extends BoothHall {
}
}//package
Section 366
//HireElectrician (HireElectrician)
package {
import Instance.ui.*;
public dynamic class HireElectrician extends HireSymbol {
public function HireElectrician(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = CrewElectrician;
}
}
}//package
Section 367
//HireEntertainer (HireEntertainer)
package {
import Instance.ui.*;
public dynamic class HireEntertainer extends HireSymbol {
public function HireEntertainer(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame1(){
buildRelation = CrewEntertainer;
}
function frame2(){
buildRelation = CrewEntertainer;
}
function frame3(){
buildRelation = CrewEntertainer;
}
function frame4(){
buildRelation = CrewEntertainer;
}
function frame5(){
buildRelation = CrewEntertainer;
}
function frame6(){
buildRelation = CrewEntertainer;
}
}
}//package
Section 368
//HireJanitor (HireJanitor)
package {
import Instance.ui.*;
public dynamic class HireJanitor extends HireSymbol {
public function HireJanitor(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = CrewJanitor;
}
}
}//package
Section 369
//HireSecurity (HireSecurity)
package {
import Instance.ui.*;
public dynamic class HireSecurity extends HireSymbol {
public function HireSecurity(){
addFrameScript(0, frame1);
}
function frame1(){
buildRelation = CrewSecurity;
}
}
}//package
Section 370
//Landmark_Clock (Landmark_Clock)
package {
import Instance.*;
public dynamic class Landmark_Clock extends UI_Clock {
}
}//package
Section 371
//legendalarmdisfunction (legendalarmdisfunction)
package {
import flash.display.*;
public dynamic class legendalarmdisfunction extends MovieClip {
}
}//package
Section 372
//legendbanditdetected (legendbanditdetected)
package {
import flash.display.*;
public dynamic class legendbanditdetected extends MovieClip {
}
}//package
Section 373
//LegendDialogTextBox (LegendDialogTextBox)
package {
import Instance.ui.*;
public dynamic class LegendDialogTextBox extends DialogTextBox {
}
}//package
Section 374
//legenddialoguebox (legenddialoguebox)
package {
import Instance.ui.*;
public dynamic class legenddialoguebox extends DialogBox {
}
}//package
Section 375
//legendelectricityproblem (legendelectricityproblem)
package {
import flash.display.*;
public dynamic class legendelectricityproblem extends MovieClip {
}
}//package
Section 376
//legendhungry (legendhungry)
package {
import flash.display.*;
public dynamic class legendhungry extends MovieClip {
}
}//package
Section 377
//legenditsdirty (legenditsdirty)
package {
import flash.display.*;
public dynamic class legenditsdirty extends MovieClip {
}
}//package
Section 378
//legendlockbreaking (legendlockbreaking)
package {
import flash.display.*;
public dynamic class legendlockbreaking extends MovieClip {
}
}//package
Section 379
//legendmoodhappy (legendmoodhappy)
package {
import flash.display.*;
public dynamic class legendmoodhappy extends MovieClip {
}
}//package
Section 380
//legendmoodnormal (legendmoodnormal)
package {
import flash.display.*;
public dynamic class legendmoodnormal extends MovieClip {
}
}//package
Section 381
//legendmoodupset (legendmoodupset)
package {
import flash.display.*;
public dynamic class legendmoodupset extends MovieClip {
}
}//package
Section 382
//legendmoodveryupset (legendmoodveryupset)
package {
import flash.display.*;
public dynamic class legendmoodveryupset extends MovieClip {
}
}//package
Section 383
//legendneedentertainment (legendneedentertainment)
package {
import flash.display.*;
public dynamic class legendneedentertainment extends MovieClip {
public function legendneedentertainment(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 384
//legendneedmoreelevator (legendneedmoreelevator)
package {
import flash.display.*;
public dynamic class legendneedmoreelevator extends MovieClip {
public function legendneedmoreelevator(){
addFrameScript(11, frame12);
}
function frame12(){
stop();
}
}
}//package
Section 385
//legendneedmoreshop (legendneedmoreshop)
package {
import flash.display.*;
public dynamic class legendneedmoreshop extends MovieClip {
}
}//package
Section 386
//legendneedtoilet (legendneedtoilet)
package {
import flash.display.*;
public dynamic class legendneedtoilet extends MovieClip {
}
}//package
Section 387
//legendneedtolevelup (legendneedtolevelup)
package {
import flash.display.*;
public dynamic class legendneedtolevelup extends MovieClip {
}
}//package
Section 388
//LegendSlider (LegendSlider)
package {
import Instance.ui.*;
public dynamic class LegendSlider extends SliderBar {
public function LegendSlider(){
addFrameScript(0, frame1);
}
function frame1(){
this.slideMode = this.VERTICAL;
}
}
}//package
Section 389
//legendtakemoney (legendtakemoney)
package {
import flash.display.*;
public dynamic class legendtakemoney extends MovieClip {
}
}//package
Section 390
//LegendTired (LegendTired)
package {
import flash.display.*;
public dynamic class LegendTired extends MovieClip {
}
}//package
Section 391
//legendunderconstruction (legendunderconstruction)
package {
import flash.display.*;
public dynamic class legendunderconstruction extends MovieClip {
}
}//package
Section 392
//MainMenuMuteButton (MainMenuMuteButton)
package {
import Instance.ui.*;
public dynamic class MainMenuMuteButton extends ToggleButton {
}
}//package
Section 393
//Pillar (Pillar)
package {
import flash.display.*;
public dynamic class Pillar extends MovieClip {
}
}//package
Section 394
//RestroomBody (RestroomBody)
package {
import flash.display.*;
public dynamic class RestroomBody extends MovieClip {
public var womenDoor:facilityrestroompintu;
public var enteranceMenRoom:MovieClip;
public var enteranceWomenRoom:MovieClip;
public var menDoor:facilityrestroompintu;
}
}//package
Section 395
//SE_Intro_Explode (SE_Intro_Explode)
package {
import flash.media.*;
public dynamic class SE_Intro_Explode extends Sound {
}
}//package
Section 396
//SE_Intro_Walk (SE_Intro_Walk)
package {
import flash.media.*;
public dynamic class SE_Intro_Walk extends Sound {
}
}//package
Section 397
//SFXAlarm (SFXAlarm)
package {
import flash.media.*;
public dynamic class SFXAlarm extends Sound {
}
}//package
Section 398
//SFXAnounceAchievement (SFXAnounceAchievement)
package {
import flash.media.*;
public dynamic class SFXAnounceAchievement extends Sound {
}
}//package
Section 399
//SFXButtonAppear (SFXButtonAppear)
package {
import flash.media.*;
public dynamic class SFXButtonAppear extends Sound {
}
}//package
Section 400
//SFXButtonClicked (SFXButtonClicked)
package {
import flash.media.*;
public dynamic class SFXButtonClicked extends Sound {
}
}//package
Section 401
//SFXCashUpdate (SFXCashUpdate)
package {
import flash.media.*;
public dynamic class SFXCashUpdate extends Sound {
}
}//package
Section 402
//SFXFirework (SFXFirework)
package {
import flash.media.*;
public dynamic class SFXFirework extends Sound {
}
}//package
Section 403
//SFXNewTips (SFXNewTips)
package {
import flash.media.*;
public dynamic class SFXNewTips extends Sound {
}
}//package
Section 404
//SFXNotification (SFXNotification)
package {
import flash.media.*;
public dynamic class SFXNotification extends Sound {
}
}//package
Section 405
//SFXPromote (SFXPromote)
package {
import flash.media.*;
public dynamic class SFXPromote extends Sound {
}
}//package
Section 406
//SFXUnableClick (SFXUnableClick)
package {
import flash.media.*;
public dynamic class SFXUnableClick extends Sound {
}
}//package
Section 407
//shopbabyshopdoor (shopbabyshopdoor)
package {
import Instance.ui.*;
public dynamic class shopbabyshopdoor extends DoorSymbol {
}
}//package
Section 408
//shopbabyshopdoor2 (shopbabyshopdoor2)
package {
import Instance.ui.*;
public dynamic class shopbabyshopdoor2 extends DoorSymbol {
}
}//package
Section 409
//shopbabyshopdoor3 (shopbabyshopdoor3)
package {
import Instance.ui.*;
public dynamic class shopbabyshopdoor3 extends DoorSymbol {
}
}//package
Section 410
//shopbookstoredoor1 (shopbookstoredoor1)
package {
import Instance.ui.*;
public dynamic class shopbookstoredoor1 extends DoorSymbol {
}
}//package
Section 411
//shopbookstoredoor2 (shopbookstoredoor2)
package {
import Instance.ui.*;
public dynamic class shopbookstoredoor2 extends DoorSymbol {
}
}//package
Section 412
//shopbookstoredoor3 (shopbookstoredoor3)
package {
import Instance.ui.*;
public dynamic class shopbookstoredoor3 extends DoorSymbol {
}
}//package
Section 413
//shopboutiquelv1door (shopboutiquelv1door)
package {
import Instance.ui.*;
public dynamic class shopboutiquelv1door extends DoorSymbol {
}
}//package
Section 414
//shopboutiquelv2door (shopboutiquelv2door)
package {
import Instance.ui.*;
public dynamic class shopboutiquelv2door extends DoorSymbol {
}
}//package
Section 415
//shopboutiquelv3door (shopboutiquelv3door)
package {
import Instance.ui.*;
public dynamic class shopboutiquelv3door extends DoorSymbol {
}
}//package
Section 416
//shopburgerdoor (shopburgerdoor)
package {
import Instance.ui.*;
public dynamic class shopburgerdoor extends DoorSymbol {
}
}//package
Section 417
//shopcakeshopdoor1 (shopcakeshopdoor1)
package {
import Instance.ui.*;
public dynamic class shopcakeshopdoor1 extends DoorSymbol {
}
}//package
Section 418
//shopcakeshopdoor2 (shopcakeshopdoor2)
package {
import Instance.ui.*;
public dynamic class shopcakeshopdoor2 extends DoorSymbol {
}
}//package
Section 419
//shopcakeshopdoor3 (shopcakeshopdoor3)
package {
import Instance.ui.*;
public dynamic class shopcakeshopdoor3 extends DoorSymbol {
}
}//package
Section 420
//shopcandycastledoor1 (shopcandycastledoor1)
package {
import Instance.ui.*;
public dynamic class shopcandycastledoor1 extends DoorSymbol {
}
}//package
Section 421
//shopcandycastledoor2 (shopcandycastledoor2)
package {
import Instance.ui.*;
public dynamic class shopcandycastledoor2 extends DoorSymbol {
}
}//package
Section 422
//shopcandycastledoor3 (shopcandycastledoor3)
package {
import Instance.ui.*;
public dynamic class shopcandycastledoor3 extends DoorSymbol {
}
}//package
Section 423
//shopdrugstoredoor1 (shopdrugstoredoor1)
package {
import Instance.ui.*;
public dynamic class shopdrugstoredoor1 extends DoorSymbol {
}
}//package
Section 424
//shopdrugstoredoor2 (shopdrugstoredoor2)
package {
import Instance.ui.*;
public dynamic class shopdrugstoredoor2 extends DoorSymbol {
}
}//package
Section 425
//shopgadgetdoor (shopgadgetdoor)
package {
import Instance.ui.*;
public dynamic class shopgadgetdoor extends DoorSymbol {
}
}//package
Section 426
//shopjewellerydoor1 (shopjewellerydoor1)
package {
import Instance.ui.*;
public dynamic class shopjewellerydoor1 extends DoorSymbol {
}
}//package
Section 427
//shopjewellerydoor2 (shopjewellerydoor2)
package {
import Instance.ui.*;
public dynamic class shopjewellerydoor2 extends DoorSymbol {
}
}//package
Section 428
//shopjewellerydoor3 (shopjewellerydoor3)
package {
import Instance.ui.*;
public dynamic class shopjewellerydoor3 extends DoorSymbol {
}
}//package
Section 429
//shopliquordoor1 (shopliquordoor1)
package {
import Instance.ui.*;
public dynamic class shopliquordoor1 extends DoorSymbol {
}
}//package
Section 430
//shopliquordoor2 (shopliquordoor2)
package {
import Instance.ui.*;
public dynamic class shopliquordoor2 extends DoorSymbol {
}
}//package
Section 431
//shopliquordoor3 (shopliquordoor3)
package {
import Instance.ui.*;
public dynamic class shopliquordoor3 extends DoorSymbol {
}
}//package
Section 432
//shopmovietheaterpintuslide (shopmovietheaterpintuslide)
package {
import Instance.ui.*;
public dynamic class shopmovietheaterpintuslide extends DoorSymbol {
}
}//package
Section 433
//shopmusiclv1door (shopmusiclv1door)
package {
import Instance.ui.*;
public dynamic class shopmusiclv1door extends DoorSymbol {
}
}//package
Section 434
//shopmusiclv2door (shopmusiclv2door)
package {
import Instance.ui.*;
public dynamic class shopmusiclv2door extends DoorSymbol {
}
}//package
Section 435
//shopmusiclv3door (shopmusiclv3door)
package {
import Instance.ui.*;
public dynamic class shopmusiclv3door extends DoorSymbol {
}
}//package
Section 436
//shopsalondoor1 (shopsalondoor1)
package {
import Instance.ui.*;
public dynamic class shopsalondoor1 extends DoorSymbol {
}
}//package
Section 437
//shopsalondoor2 (shopsalondoor2)
package {
import Instance.ui.*;
public dynamic class shopsalondoor2 extends DoorSymbol {
}
}//package
Section 438
//shopsportdoor (shopsportdoor)
package {
import Instance.ui.*;
public dynamic class shopsportdoor extends DoorSymbol {
}
}//package
Section 439
//shopsupermarketdoor1 (shopsupermarketdoor1)
package {
import Instance.ui.*;
public dynamic class shopsupermarketdoor1 extends DoorSymbol {
}
}//package
Section 440
//shopsupermarketdoor3 (shopsupermarketdoor3)
package {
import Instance.ui.*;
public dynamic class shopsupermarketdoor3 extends DoorSymbol {
}
}//package
Section 441
//shoptattoodoor1 (shoptattoodoor1)
package {
import Instance.ui.*;
public dynamic class shoptattoodoor1 extends DoorSymbol {
}
}//package
Section 442
//shoptattoodoor2 (shoptattoodoor2)
package {
import Instance.ui.*;
public dynamic class shoptattoodoor2 extends DoorSymbol {
}
}//package
Section 443
//shoptattoodoor3 (shoptattoodoor3)
package {
import Instance.ui.*;
public dynamic class shoptattoodoor3 extends DoorSymbol {
}
}//package
Section 444
//shoptoystoredoor (shoptoystoredoor)
package {
import Instance.ui.*;
public dynamic class shoptoystoredoor extends DoorSymbol {
}
}//package
Section 445
//SubwayTrain (SubwayTrain)
package {
import Instance.*;
public dynamic class SubwayTrain extends Train {
}
}//package
Section 446
//Tabbar (Tabbar)
package {
import Instance.ui.*;
public dynamic class Tabbar extends TabBar {
}
}//package
Section 447
//TabbarElectrician (TabbarElectrician)
package {
import Instance.ui.*;
public dynamic class TabbarElectrician extends TabBar {
}
}//package
Section 448
//TabbarEntertainer (TabbarEntertainer)
package {
import Instance.ui.*;
public dynamic class TabbarEntertainer extends TabBar {
}
}//package
Section 449
//Tabbarentertainment (Tabbarentertainment)
package {
import Instance.ui.*;
public dynamic class Tabbarentertainment extends TabBar {
}
}//package
Section 450
//Tabbarfacility (Tabbarfacility)
package {
import Instance.ui.*;
public dynamic class Tabbarfacility extends TabBar {
}
}//package
Section 451
//Tabbarfoodstore (Tabbarfoodstore)
package {
import Instance.ui.*;
public dynamic class Tabbarfoodstore extends TabBar {
}
}//package
Section 452
//Tabbargeneralstore (Tabbargeneralstore)
package {
import Instance.ui.*;
public dynamic class Tabbargeneralstore extends TabBar {
}
}//package
Section 453
//Tabbarhall (Tabbarhall)
package {
import Instance.ui.*;
public dynamic class Tabbarhall extends TabBar {
}
}//package
Section 454
//TabbarJanitor (TabbarJanitor)
package {
import Instance.ui.*;
public dynamic class TabbarJanitor extends TabBar {
}
}//package
Section 455
//TabbarSecurity (TabbarSecurity)
package {
import Instance.ui.*;
public dynamic class TabbarSecurity extends TabBar {
}
}//package
Section 456
//TrainBack (TrainBack)
package {
import flash.display.*;
public dynamic class TrainBack extends MovieClip {
}
}//package
Section 457
//TrainBody (TrainBody)
package {
import flash.display.*;
public dynamic class TrainBody extends MovieClip {
}
}//package
Section 458
//TrainHead (TrainHead)
package {
import flash.display.*;
public dynamic class TrainHead extends MovieClip {
}
}//package
Section 459
//Trash (Trash)
package {
import Instance.*;
public dynamic class Trash extends Trash {
}
}//package
Section 460
//TutorArrow (TutorArrow)
package {
import flash.display.*;
public dynamic class TutorArrow extends MovieClip {
}
}//package
Section 461
//TutorBar (TutorBar)
package {
import Instance.ui.*;
public dynamic class TutorBar extends TutorialText {
}
}//package
Section 462
//TutorBarSingle (TutorBarSingle)
package {
import Instance.ui.*;
public dynamic class TutorBarSingle extends TutorialText {
}
}//package
Section 463
//TutorDisableTutor (TutorDisableTutor)
package {
import Instance.ui.*;
public dynamic class TutorDisableTutor extends ToggleButton {
}
}//package
Section 464
//TutorNotice (TutorNotice)
package {
import Instance.ui.*;
public dynamic class TutorNotice extends TutorialText {
}
}//package
Section 465
//UI_AchievementPage (UI_AchievementPage)
package {
import Instance.*;
public dynamic class UI_AchievementPage extends AchievementPage {
}
}//package
Section 466
//UI_BarInputDialog (UI_BarInputDialog)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_BarInputDialog extends MovieClip {
public var playerNameInput:TextField;
public var btnOK:SimpleButton;
public var btnCancel:SimpleButton;
public var tRoot;
public var theRoot;
public function UI_BarInputDialog(){
addFrameScript(0, frame1);
}
public function updateText(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
theRoot.playerName = playerNameInput.text;
checkValidationName();
}
public function checkValidationName():void{
if (theRoot.playerName.length > 0){
btnOK.enabled = true;
btnOK.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnOK.enabled = false;
btnOK.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
}
function frame1(){
btnCancel.tabEnabled = false;
btnOK.tabEnabled = false;
tRoot = root;
theRoot = tRoot.mainProgram;
stage.focus = playerNameInput;
checkValidationName();
playerNameInput.text = theRoot.playerName;
playerNameInput.setSelection(0, playerNameInput.maxChars);
playerNameInput.addEventListener(Event.CHANGE, updateText);
}
}
}//package
Section 467
//UI_BoothDetailInformation (UI_BoothDetailInformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_BoothDetailInformation extends UI_ParameterDetail {
public var currentList:Array;
public var i;
public function UI_BoothDetailInformation(){
addFrameScript(0, frame1);
}
public function InitializePage(_arg1:Event):void{
hallDetail.updateDetail(world.hall);
readCategory();
addEventListener(Event.ENTER_FRAME, UpdateFrame);
addEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
public function changeCategory(_arg1:ParameterDetailEvent):void{
if (this.category != _arg1.param){
saveCurrentName();
this.category = _arg1.param;
this.page = 0;
readCategory();
};
}
public function changePage(_arg1:ParameterDetailEvent):void{
saveCurrentName();
if (this.page != _arg1.param){
if (_arg1.param < 0){
this.page = (this.maxPage - 1);
} else {
if (_arg1.param >= this.maxPage){
this.page = 0;
} else {
this.page = _arg1.param;
};
};
};
readCategory();
}
public function checkPageAndCategory(_arg1:ShopGameEvent):void{
readCategory();
}
public function closeTheDetail(_arg1:MouseEvent):void{
world.main.GameInterface.deactiveAllDetailButton();
world.main.GameInterface.hideDetail();
}
public function checkHallCondition(_arg1:ShopGameEvent):void{
hallDetail.updateDetail(world.hall);
}
public function readCategory():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local8:*;
var _local9:*;
var _local10:*;
var _local11:*;
var _local12:*;
var _local13:*;
var _local14:*;
var _local15:*;
var _local16:*;
var _local1:Array = new Array();
if (this.category != 3){
if (this.category != 4){
_local2 = 0;
while (_local2 < world.boothList.length) {
_local3 = world.boothList[_local2];
if (this.category == 0){
if (BoothList.GENERAL_STORE_LIST.indexOf(Utility.getClass(_local3)) >= 0){
_local1.push(_local3);
};
} else {
if (this.category == 1){
if (BoothList.FOOD_CENTER_LIST.indexOf(Utility.getClass(_local3)) >= 0){
_local1.push(_local3);
};
} else {
if (this.category == 2){
if (BoothList.ENTERTAINMENT_LIST.indexOf(Utility.getClass(_local3)) >= 0){
_local1.push(_local3);
};
};
};
};
_local2++;
};
} else {
hallDetail.updateDetail(world.hall);
};
} else {
_local1 = world.facilityList.concat();
};
pageInfo.visible = !((this.category == 4));
hallDetail.visible = (this.category == 4);
arrowPos.visible = !((this.category == 4));
btnClose.visible = !((this.category == 4));
this.maxPage = Math.max(Math.ceil((_local1.length / detailBoxList.length)), 1);
if (this.page >= this.maxPage){
this.page = (this.maxPage - 1);
};
currentList = [];
_local2 = 0;
while (_local2 < detailBoxList.length) {
_local4 = (_local2 + (this.page * detailBoxList.length));
_local5 = detailBoxList[_local2].getChildByName("boothIcon");
if (_local5 != null){
_local5.parent.removeChild(_local5);
};
if ((_local4 in _local1)){
_local6 = RelationList.BOOTH_CLASS_LIST.indexOf(Utility.getClass(_local1[_local4]));
_local7 = new (RelationList.BTN_CLASS_LIST[_local6]);
_local7.x = detailBoxList[_local2].boothIconPosition.x;
_local7.y = detailBoxList[_local2].boothIconPosition.y;
_local7.isActive = true;
_local7.disableButton();
_local7.buttonMode = true;
_local7.name = "boothIcon";
_local8 = detailBoxList[_local2].getChildIndex(detailBoxList[_local2].boothIconPosition);
detailBoxList[_local2].addChildAt(_local7, (_local8 + 1));
detailBoxList[_local2].boothType.text = BoothList.compareShowNameByType(Utility.getClass(_local1[_local4]));
if (BoothList.BOOTH_AVAILABLE.indexOf(Utility.getClass(_local1[_local4])) < 0){
detailBoxList[_local2].boothName.visible = false;
} else {
detailBoxList[_local2].boothName.visible = true;
detailBoxList[_local2].boothName.text = _local1[_local4].boothName;
};
if (!(((_local1[_local4] is FacilityElevator)) || ((_local1[_local4] is FacilityEscalator)))){
if (_local1[_local4].onFloor == null){
detailBoxList[_local2].boothFloor.text = "Ground";
} else {
_local10 = _local1[_local4].world;
_local11 = (_local10.floorList.indexOf(_local1[_local4].onFloor) + 1);
if (_local11 > 0){
detailBoxList[_local2].boothFloor.text = (Utility.numberToOrdinal(_local11) + " Floor");
} else {
_local12 = (_local10.basementList.indexOf(_local1[_local4].onFloor) + 1);
detailBoxList[_local2].boothFloor.text = ("Base " + _local12);
};
};
} else {
_local13 = 0;
_local14 = 0;
if ((_local1[_local4] is FacilityElevator)){
_local13 = _local1[_local4].getRoomFloorIndex(0);
_local14 = _local1[_local4].getRoomFloorIndex((_local1[_local4].roomList.length - 1));
} else {
if ((_local1[_local4] is FacilityEscalator)){
_local13 = _local1[_local4].getBottomIndex();
_local14 = _local1[_local4].getTopIndex();
};
};
_local15 = ((_local13)==0) ? "Ground" : ((_local13)>0) ? (Utility.numberToOrdinal(_local13) + " Floor") : ("Base " + Math.abs(_local13));
_local16 = ((_local14)==0) ? "Ground" : ((_local14)>0) ? (Utility.numberToOrdinal(_local14) + " Floor") : ("Base " + Math.abs(_local14));
detailBoxList[_local2].boothFloor.text = ((_local15 + " to ") + _local16);
};
detailBoxList[_local2].btnUpgrade.enabled = _local1[_local4].upgradeAble;
if (detailBoxList[_local2].btnUpgrade.enabled){
detailBoxList[_local2].btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
detailBoxList[_local2].btnUpgrade.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
_local9 = -1;
if ((((_local1[_local4].boothLevel < _local1[_local4].MAX_LEVEL)) && (_local1[_local4].upgradeAble))){
_local9 = BoothList.getUpgradeCost(Utility.getClass(_local1[_local4]), (_local1[_local4].boothLevel - 1));
if ((_local1[_local4] is FacilityElevator)){
_local9 = (_local9 + (Math.max((_local1[_local4].roomList.length - 2), 0) * (BoothList.getExpandCost(_local1[_local4].boothLevel) - BoothList.getExpandCost((_local1[_local4].boothLevel - 1)))));
};
};
detailBoxList[_local2].upgradeCost.text = ((((_local1[_local4].boothLevel < _local1[_local4].MAX_LEVEL)) && (_local1[_local4].upgradeAble))) ? ("$" + Utility.numberToMoney(_local9)) : "-";
detailBoxList[_local2].visible = true;
currentList.push(_local1[_local4]);
} else {
detailBoxList[_local2].visible = false;
};
detailBoxList[_local2].exitChangeNameMode();
_local2++;
};
pageInfo.text = (((this.page + 1) + "/") + this.maxPage);
nextPageButton.visible = (this.maxPage > 1);
prevPageButton.visible = (this.maxPage > 1);
}
public function saveCurrentName():void{
var _local1:* = 0;
while (_local1 < currentList.length) {
if (detailBoxList[_local1].visible){
if (detailBoxList[_local1].boothName.type == TextFieldType.INPUT){
currentList[_local1].boothName = detailBoxList[_local1].boothName.text;
};
};
_local1++;
};
this.world.canScroll = true;
}
public function detailBoxOnClick(_arg1:MouseEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local2:* = _arg1.target;
var _local3:* = detailBoxList.indexOf(_arg1.currentTarget);
if (_local2 != _arg1.currentTarget){
_local4 = (((((_local2 is SimpleButton)) && (_local2.enabled))) || (!((_local2 is SimpleButton))));
if (_local4){
if (_local2.name == "boothIcon"){
if ((_local3 in currentList)){
currentList[_local3].dispatchEvent(new BoothEvent(BoothEvent.BOOTH_CLICK));
};
} else {
if (_local2.name == "btnUpgrade"){
if ((_local3 in currentList)){
_local5 = BoothList.getUpgradeCost(Utility.getClass(currentList[_local3]), (currentList[_local3].boothLevel - 1));
if ((currentList[_local3] is FacilityElevator)){
_local5 = (_local5 + (Math.max((currentList[_local3].roomList.length - 2), 0) * (BoothList.getExpandCost(currentList[_local3].boothLevel) - BoothList.getExpandCost((currentList[_local3].boothLevel - 1)))));
};
if (world.cash >= _local5){
currentList[_local3].upgradeBooth();
world.addCash(-(_local5));
world.upgradeReport = (world.upgradeReport + _local5);
} else {
world.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
} else {
if (_local2.name == "btnDestroy"){
if ((_local3 in currentList)){
currentList[_local3].destroy();
};
} else {
if (_local2.name == "boothName"){
_local6 = 0;
while (_local6 < detailBoxList.length) {
if (_local6 == _local3){
detailBoxList[_local6].enterChangeNameMode(currentList[_local3]);
} else {
detailBoxList[_local6].exitChangeNameMode();
};
_local6++;
};
this.world.canScroll = false;
};
};
};
};
};
};
}
public function UpdateFrame(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local2:* = 0;
while (_local2 < currentList.length) {
if (detailBoxList[_local2].visible){
_local3 = 0;
while (_local3 < detailBoxList[_local2].starSymbol.length) {
detailBoxList[_local2].starSymbol[_local3].visible = currentList[_local2].upgradeAble;
if (currentList[_local2].upgradeAble){
if (_local3 < currentList[_local2].boothLevel){
detailBoxList[_local2].starSymbol[_local3].gotoAndStop("Active");
} else {
detailBoxList[_local2].starSymbol[_local3].gotoAndStop("Inactive");
};
} else {
detailBoxList[_local2].starSymbol[_local3].gotoAndStop("Inactive");
};
_local3++;
};
_local4 = -1;
if ((((currentList[_local2].boothLevel < currentList[_local2].MAX_LEVEL)) && (currentList[_local2].upgradeAble))){
_local4 = BoothList.getUpgradeCost(Utility.getClass(currentList[_local2]), (currentList[_local2].boothLevel - 1));
if ((currentList[_local2] is FacilityElevator)){
_local4 = (_local4 + (Math.max((currentList[_local2].roomList.length - 2), 0) * (BoothList.getExpandCost(currentList[_local2].boothLevel) - BoothList.getExpandCost((currentList[_local2].boothLevel - 1)))));
};
};
detailBoxList[_local2].upgradeCost.text = ((currentList[_local2].boothLevel)<currentList[_local2].MAX_LEVEL) ? ("$" + Utility.numberToMoney(_local4)) : "-";
_local5 = detailBoxList[_local2].getChildByName("boothIcon");
if (_local5 != null){
_local5.transform.colorTransform = currentList[_local2].transform.colorTransform;
};
};
_local2++;
};
}
public function removePage(_arg1:Event):void{
saveCurrentName();
removeEventListener(Event.ENTER_FRAME, UpdateFrame);
removeEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
function frame1(){
pageInfo.mouseEnabled = false;
currentList = new Array();
detailBoxList.push(detailBox0);
detailBoxList.push(detailBox1);
detailBoxList.push(detailBox2);
detailBoxList.push(detailBox3);
detailBoxList.push(detailBox4);
detailBoxList.push(detailBox5);
i = 0;
while (i < detailBoxList.length) {
detailBoxList[i].addEventListener(MouseEvent.CLICK, detailBoxOnClick);
i++;
};
addEventListener(Event.ADDED_TO_STAGE, InitializePage);
addEventListener(ParameterDetailEvent.CHANGE_CATEGORY, changeCategory);
addEventListener(ParameterDetailEvent.CHANGE_PAGE, changePage);
this.world.addEventListener(ShopGameEvent.BOOTH_CREATED, checkPageAndCategory);
this.world.addEventListener(ShopGameEvent.BOOTH_DESTROYED, checkPageAndCategory);
if (this.world.hall != null){
hallDetail.previewHall.image.gotoAndStop(this.world.hall.boothLevel);
} else {
hallDetail.previewHall.image.gotoAndStop(1);
};
world.addEventListener(ShopGameEvent.HALL_ON_UPDATE, checkHallCondition);
hallDetail.btnClose.addEventListener(MouseEvent.CLICK, closeTheDetail);
btnClose.addEventListener(MouseEvent.CLICK, closeTheDetail);
}
}
}//package
Section 468
//UI_BoothInfoSlider (UI_BoothInfoSlider)
package {
import Instance.ui.*;
public dynamic class UI_BoothInfoSlider extends SliderBar {
public function UI_BoothInfoSlider(){
addFrameScript(0, frame1);
}
function frame1(){
this.slideMode = this.VERTICAL;
}
}
}//package
Section 469
//UI_BudgetSlider (UI_BudgetSlider)
package {
import Instance.ui.*;
public dynamic class UI_BudgetSlider extends SliderBar {
public function UI_BudgetSlider(){
addFrameScript(0, frame1);
}
function frame1(){
this.slideMode = this.VERTICAL;
}
}
}//package
Section 470
//UI_ButtonArcade (UI_ButtonArcade)
package {
import Instance.ui.*;
public dynamic class UI_ButtonArcade extends ToggleButton {
}
}//package
Section 471
//UI_ButtonATM (UI_ButtonATM)
package {
import Instance.ui.*;
public dynamic class UI_ButtonATM extends ToggleButton {
}
}//package
Section 472
//UI_ButtonBabyShop (UI_ButtonBabyShop)
package {
import Instance.ui.*;
public dynamic class UI_ButtonBabyShop extends ToggleButton {
}
}//package
Section 473
//UI_ButtonBookstore (UI_ButtonBookstore)
package {
import Instance.ui.*;
public dynamic class UI_ButtonBookstore extends ToggleButton {
}
}//package
Section 474
//UI_ButtonBoutique (UI_ButtonBoutique)
package {
import Instance.ui.*;
public dynamic class UI_ButtonBoutique extends ToggleButton {
}
}//package
Section 475
//UI_ButtonBurger (UI_ButtonBurger)
package {
import Instance.ui.*;
public dynamic class UI_ButtonBurger extends ToggleButton {
}
}//package
Section 476
//UI_ButtonCafe (UI_ButtonCafe)
package {
import Instance.ui.*;
public dynamic class UI_ButtonCafe extends ToggleButton {
}
}//package
Section 477
//UI_ButtonCake (UI_ButtonCake)
package {
import Instance.ui.*;
public dynamic class UI_ButtonCake extends ToggleButton {
}
}//package
Section 478
//UI_ButtonCandy (UI_ButtonCandy)
package {
import Instance.ui.*;
public dynamic class UI_ButtonCandy extends ToggleButton {
}
}//package
Section 479
//UI_ButtonCinema (UI_ButtonCinema)
package {
import Instance.ui.*;
public dynamic class UI_ButtonCinema extends ToggleButton {
}
}//package
Section 480
//UI_ButtonDrag (UI_ButtonDrag)
package {
import Instance.ui.*;
public dynamic class UI_ButtonDrag extends ToggleButton {
}
}//package
Section 481
//UI_ButtonDrugStore (UI_ButtonDrugStore)
package {
import Instance.ui.*;
public dynamic class UI_ButtonDrugStore extends ToggleButton {
}
}//package
Section 482
//UI_ButtonElectrician (UI_ButtonElectrician)
package {
import Instance.ui.*;
public dynamic class UI_ButtonElectrician extends ToggleButton {
}
}//package
Section 483
//UI_ButtonElevator (UI_ButtonElevator)
package {
import Instance.ui.*;
public dynamic class UI_ButtonElevator extends ToggleButton {
}
}//package
Section 484
//UI_ButtonEmployee (UI_ButtonEmployee)
package {
import Instance.ui.*;
public dynamic class UI_ButtonEmployee extends ToggleButton {
}
}//package
Section 485
//UI_ButtonEntertainer (UI_ButtonEntertainer)
package {
import Instance.ui.*;
public dynamic class UI_ButtonEntertainer extends ToggleButton {
}
}//package
Section 486
//UI_ButtonEntertainment (UI_ButtonEntertainment)
package {
import Instance.ui.*;
public dynamic class UI_ButtonEntertainment extends ToggleButton {
}
}//package
Section 487
//UI_ButtonEscalator (UI_ButtonEscalator)
package {
import Instance.ui.*;
public dynamic class UI_ButtonEscalator extends ToggleButton {
}
}//package
Section 488
//UI_ButtonExtra (UI_ButtonExtra)
package {
import Instance.ui.*;
public dynamic class UI_ButtonExtra extends ToggleButton {
}
}//package
Section 489
//UI_ButtonFacility (UI_ButtonFacility)
package {
import Instance.ui.*;
public dynamic class UI_ButtonFacility extends ToggleButton {
}
}//package
Section 490
//UI_ButtonFood (UI_ButtonFood)
package {
import Instance.ui.*;
public dynamic class UI_ButtonFood extends ToggleButton {
}
}//package
Section 491
//UI_ButtonGadget (UI_ButtonGadget)
package {
import Instance.ui.*;
public dynamic class UI_ButtonGadget extends ToggleButton {
}
}//package
Section 492
//UI_ButtonHall (UI_ButtonHall)
package {
import Instance.ui.*;
public dynamic class UI_ButtonHall extends ToggleButton {
}
}//package
Section 493
//UI_ButtonIceCream (UI_ButtonIceCream)
package {
import Instance.ui.*;
public dynamic class UI_ButtonIceCream extends ToggleButton {
}
}//package
Section 494
//UI_ButtonJanitor (UI_ButtonJanitor)
package {
import Instance.ui.*;
public dynamic class UI_ButtonJanitor extends ToggleButton {
}
}//package
Section 495
//UI_ButtonJewelry (UI_ButtonJewelry)
package {
import Instance.ui.*;
public dynamic class UI_ButtonJewelry extends ToggleButton {
}
}//package
Section 496
//UI_ButtonLiquor (UI_ButtonLiquor)
package {
import Instance.ui.*;
public dynamic class UI_ButtonLiquor extends ToggleButton {
}
}//package
Section 497
//UI_ButtonMailBox (UI_ButtonMailBox)
package {
import Instance.ui.*;
public dynamic class UI_ButtonMailBox extends ToggleButton {
}
}//package
Section 498
//UI_ButtonMusic (UI_ButtonMusic)
package {
import Instance.ui.*;
public dynamic class UI_ButtonMusic extends ToggleButton {
}
}//package
Section 499
//UI_ButtonParkingLot (UI_ButtonParkingLot)
package {
import Instance.ui.*;
public dynamic class UI_ButtonParkingLot extends ToggleButton {
}
}//package
Section 500
//UI_ButtonPauseResume (UI_ButtonPauseResume)
package {
import Instance.ui.*;
public dynamic class UI_ButtonPauseResume extends ToggleButton {
}
}//package
Section 501
//UI_ButtonRestroom (UI_ButtonRestroom)
package {
import Instance.ui.*;
public dynamic class UI_ButtonRestroom extends ToggleButton {
}
}//package
Section 502
//UI_ButtonSalon (UI_ButtonSalon)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSalon extends ToggleButton {
}
}//package
Section 503
//UI_ButtonSecurity (UI_ButtonSecurity)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSecurity extends ToggleButton {
}
}//package
Section 504
//UI_ButtonSelect (UI_ButtonSelect)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSelect extends ToggleButton {
}
}//package
Section 505
//UI_ButtonShop (UI_ButtonShop)
package {
import Instance.ui.*;
public dynamic class UI_ButtonShop extends ToggleButton {
}
}//package
Section 506
//UI_ButtonSpeed1x (UI_ButtonSpeed1x)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSpeed1x extends ToggleButton {
}
}//package
Section 507
//UI_ButtonSpeed2x (UI_ButtonSpeed2x)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSpeed2x extends ToggleButton {
}
}//package
Section 508
//UI_ButtonSpeed3x (UI_ButtonSpeed3x)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSpeed3x extends ToggleButton {
}
}//package
Section 509
//UI_ButtonSport (UI_ButtonSport)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSport extends ToggleButton {
}
}//package
Section 510
//UI_ButtonStatistic (UI_ButtonStatistic)
package {
import Instance.ui.*;
public dynamic class UI_ButtonStatistic extends ToggleButton {
}
}//package
Section 511
//UI_ButtonSteak (UI_ButtonSteak)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSteak extends ToggleButton {
}
}//package
Section 512
//UI_ButtonSubway (UI_ButtonSubway)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSubway extends ToggleButton {
}
}//package
Section 513
//UI_ButtonSupermarket (UI_ButtonSupermarket)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSupermarket extends ToggleButton {
}
}//package
Section 514
//UI_ButtonSushi (UI_ButtonSushi)
package {
import Instance.ui.*;
public dynamic class UI_ButtonSushi extends ToggleButton {
}
}//package
Section 515
//UI_ButtonTattoo (UI_ButtonTattoo)
package {
import Instance.ui.*;
public dynamic class UI_ButtonTattoo extends ToggleButton {
}
}//package
Section 516
//UI_ButtonTerrace (UI_ButtonTerrace)
package {
import Instance.ui.*;
public dynamic class UI_ButtonTerrace extends ToggleButton {
}
}//package
Section 517
//UI_ButtonToyStore (UI_ButtonToyStore)
package {
import Instance.ui.*;
public dynamic class UI_ButtonToyStore extends ToggleButton {
}
}//package
Section 518
//UI_CCTV (UI_CCTV)
package {
import Instance.ui.*;
public dynamic class UI_CCTV extends ShopEmpireCCTV {
}
}//package
Section 519
//UI_CheckBox (UI_CheckBox)
package {
import Instance.ui.*;
public dynamic class UI_CheckBox extends ToggleButton {
}
}//package
Section 520
//UI_Clock (UI_Clock)
package {
import Instance.*;
public dynamic class UI_Clock extends UI_Clock {
}
}//package
Section 521
//UI_ConfirmationOnExit (UI_ConfirmationOnExit)
package {
import flash.display.*;
public dynamic class UI_ConfirmationOnExit extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
public function UI_ConfirmationOnExit(){
addFrameScript(0, frame1);
}
function frame1(){
btnYes.tabEnabled = false;
btnNo.tabEnabled = false;
}
}
}//package
Section 522
//UI_ConfirmationOnLoad (UI_ConfirmationOnLoad)
package {
import flash.display.*;
public dynamic class UI_ConfirmationOnLoad extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
public function UI_ConfirmationOnLoad(){
addFrameScript(0, frame1);
}
function frame1(){
btnYes.tabEnabled = false;
btnNo.tabEnabled = false;
}
}
}//package
Section 523
//UI_ConfirmationOnOverwrite (UI_ConfirmationOnOverwrite)
package {
import flash.display.*;
public dynamic class UI_ConfirmationOnOverwrite extends MovieClip {
public var btnYes:SimpleButton;
public var btnNo:SimpleButton;
public function UI_ConfirmationOnOverwrite(){
addFrameScript(0, frame1);
}
function frame1(){
btnYes.tabEnabled = false;
btnNo.tabEnabled = false;
}
}
}//package
Section 524
//UI_ExpandElevator (UI_ExpandElevator)
package {
import flash.display.*;
public dynamic class UI_ExpandElevator extends MovieClip {
}
}//package
Section 525
//UI_GameInterface (UI_GameInterface)
package {
import Instance.*;
public dynamic class UI_GameInterface extends UI_GameInterface {
}
}//package
Section 526
//UI_MainGameplay (UI_MainGameplay)
package {
import Instance.*;
public dynamic class UI_MainGameplay extends MainGameplay {
}
}//package
Section 527
//UI_MainMenu (UI_MainMenu)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_MainMenu extends UI_MainMenu {
public function UI_MainMenu(){
addFrameScript(16, frame17, 18, frame19, 20, frame21, 22, frame23, 24, frame25, 30, frame31, 31, frame32, 32, frame33, 33, frame34);
}
function frame17(){
btnPlay.tabEnabled = false;
theRoot.playSound(SFXButtonAppear);
}
function frame19(){
btnOption.tabEnabled = false;
theRoot.playSound(SFXButtonAppear);
}
function frame21(){
btnCredit.tabEnabled = false;
theRoot.playSound(SFXButtonAppear);
}
function frame23(){
btnShopEmpire1.tabEnabled = false;
theRoot.playSound(SFXButtonAppear);
}
function frame25(){
btnMoreGames.tabEnabled = false;
theRoot.playSound(SFXButtonAppear);
}
function frame31(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame32(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame33(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
function frame34(){
dispatchEvent(new ShopFrameEvent(ShopFrameEvent.ENTER_SOME_FRAME, this.currentFrame, this.currentLabel));
}
}
}//package
Section 528
//UI_MenuInGame (UI_MenuInGame)
package {
import flash.display.*;
public dynamic class UI_MenuInGame extends MovieClip {
public var btnClose:SimpleButton;
public var btnExit:SimpleButton;
public var btnResume:SimpleButton;
public var btnSave:SimpleButton;
public var btnOption:SimpleButton;
public function UI_MenuInGame(){
addFrameScript(0, frame1);
}
function frame1(){
btnResume.tabEnabled = false;
btnOption.tabEnabled = false;
btnSave.tabEnabled = false;
btnExit.tabEnabled = false;
btnClose.tabEnabled = false;
}
}
}//package
Section 529
//UI_Minimap (UI_Minimap)
package {
import Instance.*;
public dynamic class UI_Minimap extends UI_Minimap {
}
}//package
Section 530
//UI_MoveStaff (UI_MoveStaff)
package {
import Instance.ui.*;
public dynamic class UI_MoveStaff extends HireSymbol {
}
}//package
Section 531
//UI_Notification (UI_Notification)
package {
import flash.display.*;
import flash.geom.*;
import greensock.*;
public dynamic class UI_Notification extends MovieClip {
public var notice:MovieClip;
public var targetX;
public function UI_Notification(){
addFrameScript(0, frame1);
}
function frame1(){
targetX = (globalToLocal(new Point(stage.stageWidth, 0)).x + notice.width);
TweenLite.to(notice, 0.5, {x:targetX, delay:2.5, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
}
}//package
Section 532
//UI_OptionInGame (UI_OptionInGame)
package {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_OptionInGame extends MovieClip {
public var btnSaveAndExit:SimpleButton;
public var bgmSlider:UI_OptionSoundSlider;
public var btnClose:SimpleButton;
public var sfxSlider:UI_OptionSfxSlider;
public var showCameraCheckBox:UI_CheckBox;
public var qualityControl:MovieClip;
public var showTutorialCheckBox:UI_CheckBox;
public var btnSetToDefault:SimpleButton;
public var tRoot;
public var theRoot;
public var currentQuality;
public var currentVolume;
public var currentSFXVolume;
public function UI_OptionInGame(){
addFrameScript(0, frame1);
}
public function closeThisPage(_arg1:MouseEvent):void{
stage.quality = currentQuality;
theRoot.bgmVolume = currentVolume;
theRoot.bgmChannel.soundTransform = theRoot.bgmTransform;
theRoot.sfxVolume = currentSFXVolume;
theRoot.sfxChannel.soundTransform = theRoot.sfxTransform;
TweenLite.to(this, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
public function saveOption(_arg1:MouseEvent):void{
theRoot.tutorialShown = showTutorialCheckBox.isActive;
theRoot.cameraShown = showCameraCheckBox.isActive;
TweenLite.to(this, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
public function setToDefault(_arg1:MouseEvent):void{
stage.quality = DefaultSetting.QUALITY;
bgmSlider.setPosition(DefaultSetting.VOLUME);
sfxSlider.setPosition(DefaultSetting.VOLUME);
theRoot.tutorialShown = DefaultSetting.TUTORIAL_SHOWN;
showTutorialCheckBox.isActive = theRoot.tutorialShown;
theRoot.cameraShown = DefaultSetting.CAMERA_SHOWN;
showTutorialCheckBox.isActive = theRoot.cameraShown;
qualityControl.setQualitySelection();
}
public function soundSliderPositionChange(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.indicatorSign.scaleX = _local2.getPosition();
if (_local2 == bgmSlider){
theRoot.bgmVolume = _local2.getPosition();
theRoot.bgmChannel.soundTransform = theRoot.bgmTransform;
} else {
if (_local2 == sfxSlider){
theRoot.sfxVolume = _local2.getPosition();
theRoot.sfxChannel.soundTransform = theRoot.sfxTransform;
};
};
}
function frame1(){
tRoot = this.root;
theRoot = tRoot.mainProgram;
currentQuality = stage.quality;
currentVolume = theRoot.bgmVolume;
currentSFXVolume = theRoot.sfxVolume;
showTutorialCheckBox.isActive = theRoot.tutorialShown;
showCameraCheckBox.isActive = theRoot.cameraShown;
btnClose.addEventListener(MouseEvent.CLICK, closeThisPage);
btnSaveAndExit.addEventListener(MouseEvent.CLICK, saveOption);
btnSetToDefault.addEventListener(MouseEvent.CLICK, setToDefault);
bgmSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, soundSliderPositionChange);
sfxSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, soundSliderPositionChange);
bgmSlider.setPosition(theRoot.bgmVolume);
sfxSlider.setPosition(theRoot.sfxVolume);
}
}
}//package
Section 533
//UI_OptionSfxSlider (UI_OptionSfxSlider)
package {
import Instance.ui.*;
public dynamic class UI_OptionSfxSlider extends SliderBar {
}
}//package
Section 534
//UI_OptionSoundSlider (UI_OptionSoundSlider)
package {
import Instance.ui.*;
public dynamic class UI_OptionSoundSlider extends SliderBar {
}
}//package
Section 535
//UI_SectorButtonEntertainment (UI_SectorButtonEntertainment)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonEntertainment extends SectorPanel {
public function UI_SectorButtonEntertainment(){
addFrameScript(0, frame1);
}
function frame1(){
itemNumber0.related = btnArcade;
itemNumber1.related = btnCinema;
lockedSymbol0.related = btnArcade;
lockedSymbol1.related = btnCinema;
}
}
}//package
Section 536
//UI_SectorButtonExtraUpgrade (UI_SectorButtonExtraUpgrade)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonExtraUpgrade extends UI_ParameterDetail {
public var currentList:Array;
public var i;
public var currentPage;
public function UI_SectorButtonExtraUpgrade(){
addFrameScript(0, frame1);
}
public function InitializePage(_arg1:Event):void{
readCategory();
world.addEventListener(ShopGameEvent.CASH_UPDATE, checkCurrentCash);
addEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
public function readCategory():void{
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local1:Array = new Array();
_local1 = world.extraUpgradeList.concat();
this.maxPage = Math.max(Math.ceil((_local1.length / detailBoxList.length)), 1);
if (this.page >= this.maxPage){
this.page = (this.maxPage - 1);
};
currentList = [];
i = 0;
while (i < detailBoxList.length) {
_local2 = (i + (this.page * detailBoxList.length));
if ((_local2 in _local1)){
detailBoxList[i].upgradeTitle.text = _local1[_local2].header.toUpperCase();
detailBoxList[i].upgradeDescription.text = _local1[_local2].description;
detailBoxList[i].upgradeSymbol.gotoAndStop(_local1[_local2].header);
if (world.upgradePurchaseList.indexOf(_local1[_local2]) < 0){
if (checkConditionList(_local1[_local2])){
_local4 = world.main;
_local5 = _local1[_local2].price;
_local6 = _local4.getRunningMission();
if (((((!((_local6 == null))) && ((_local6.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))) && ((_local1[_local2].header == "Basement Lv 1")))){
detailBoxList[i].purchaseValue.text = "Free";
_local5 = 0;
} else {
detailBoxList[i].purchaseValue.text = (("$ " + Utility.numberToMoney(_local1[_local2].price)) + ",-");
};
if (world.cash >= _local5){
detailBoxList[i].purchaseValue.textColor = 65074;
detailBoxList[i].upgradeSymbol.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
detailBoxList[i].purchaseValue.textColor = 0xFF0000;
detailBoxList[i].upgradeSymbol.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
detailBoxList[i].btnPurchase.enabled = true;
detailBoxList[i].btnPurchase.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
detailBoxList[i].purchaseValue.text = (_local1[_local2].requirmentInfo) ? _local1[_local2].requirmentInfo : "Need more requirment";
detailBoxList[i].purchaseValue.textColor = 0xFF;
detailBoxList[i].upgradeSymbol.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
detailBoxList[i].btnPurchase.enabled = false;
detailBoxList[i].btnPurchase.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
} else {
detailBoxList[i].upgradeSymbol.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
detailBoxList[i].purchaseValue.text = "Purchased";
detailBoxList[i].purchaseValue.textColor = 14652679;
detailBoxList[i].btnPurchase.enabled = false;
detailBoxList[i].btnPurchase.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
_local3 = detailBoxList[i].purchaseValue.getTextFormat();
_local3.size = (checkConditionList(_local1[_local2])) ? 15 : 10;
detailBoxList[i].purchaseValue.setTextFormat(_local3);
detailBoxList[i].visible = true;
currentList.push(_local1[_local2]);
} else {
detailBoxList[i].visible = false;
};
i++;
};
pageInfo.text = (((this.page + 1) + "/") + this.maxPage);
nextPageButton.visible = (this.maxPage > 1);
prevPageButton.visible = (this.maxPage > 1);
}
public function checkConditionList(_arg1:Object):Boolean{
var _local2:* = true;
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 4){
_local2 = world.checkUpgradeIndex(3);
};
if (UpgradeList.UPGRADE_AVAILABLE.indexOf(_arg1) == 5){
_local2 = world.checkUpgradeIndex(4);
};
return (_local2);
}
public function changePage(_arg1:ParameterDetailEvent):void{
if (this.page != _arg1.param){
if (_arg1.param < 0){
this.page = (this.maxPage - 1);
} else {
if (_arg1.param >= this.maxPage){
this.page = 0;
} else {
this.page = _arg1.param;
};
};
};
readCategory();
}
public function detailBoxOnClick(_arg1:MouseEvent):void{
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local2:* = _arg1.currentTarget;
var _local3:* = _arg1.target;
if ((((_local3 == _local2.btnPurchase)) && (_local3.enabled))){
_local4 = detailBoxList.indexOf(_local2);
if ((_local4 in currentList)){
_local5 = currentList[_local4].price;
_local6 = world.main;
_local7 = _local6.getRunningMission();
if (((((!((_local7 == null))) && ((_local7.note.toUpperCase() == "Build a parking lot (now it's free)".toUpperCase())))) && ((currentList[_local4].header == "Basement Lv 1")))){
_local5 = 0;
};
if (world.cash >= _local5){
_local6.addCash(-(_local5));
world.extraReport = (world.extraReport + _local5);
world.addExtraUpgrade(currentList[_local4]);
readCategory();
closePage(_arg1);
} else {
world.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
};
}
public function checkCurrentCash(_arg1:ShopGameEvent):void{
var _local2:* = 0;
while (_local2 < currentList.length) {
if (world.upgradePurchaseList.indexOf(currentList[_local2]) < 0){
if (checkConditionList(currentList[_local2])){
if (world.cash < currentList[_local2].price){
detailBoxList[_local2].purchaseValue.textColor = 0xFF0000;
detailBoxList[_local2].upgradeSymbol.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
detailBoxList[_local2].purchaseValue.textColor = 65074;
detailBoxList[_local2].upgradeSymbol.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
};
};
_local2++;
};
}
public function removePage(_arg1:Event):void{
world.removeEventListener(ShopGameEvent.CASH_UPDATE, checkCurrentCash);
removeEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
public function closePage(_arg1:MouseEvent):void{
var _local2:* = world.main;
_local2.GameInterface.btnExtra.isActive = false;
_local2.GameInterface.btnSelect.isActive = true;
}
function frame1(){
pageInfo.mouseEnabled = false;
currentList = new Array();
detailBoxList.push(detailBox0);
detailBoxList.push(detailBox1);
detailBoxList.push(detailBox2);
detailBoxList.push(detailBox3);
detailBoxList.push(detailBox4);
detailBoxList.push(detailBox5);
i = 0;
while (i < detailBoxList.length) {
detailBoxList[i].addEventListener(MouseEvent.CLICK, detailBoxOnClick);
i++;
};
currentPage = 0;
addEventListener(ParameterDetailEvent.CHANGE_PAGE, changePage);
addEventListener(Event.ADDED_TO_STAGE, InitializePage);
btnClose.addEventListener(MouseEvent.CLICK, closePage);
}
}
}//package
Section 537
//UI_SectorButtonFacility (UI_SectorButtonFacility)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonFacility extends SectorPanel {
public function UI_SectorButtonFacility(){
addFrameScript(0, frame1);
}
function frame1(){
itemNumber0.related = btnRestroom;
itemNumber1.related = btnElevator;
itemNumber2.related = btnEscalator;
itemNumber3.related = btnAtm;
itemNumber4.related = btnTerrace;
itemNumber5.related = btnParkingLot;
itemNumber6.related = btnSubway;
lockedSymbol0.related = btnParkingLot;
lockedSymbol1.related = btnSubway;
}
}
}//package
Section 538
//UI_SectorButtonFood (UI_SectorButtonFood)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonFood extends SectorPanel {
public function UI_SectorButtonFood(){
addFrameScript(0, frame1);
}
function frame1(){
itemNumber0.related = btnCake;
itemNumber1.related = btnIceCream;
itemNumber2.related = btnBurger;
itemNumber3.related = btnCafe;
itemNumber4.related = btnCandy;
itemNumber5.related = btnLiquor;
itemNumber6.related = btnSteak;
itemNumber7.related = btnSushi;
lockedSymbol0.related = btnCake;
lockedSymbol1.related = btnIceCream;
lockedSymbol2.related = btnBurger;
lockedSymbol3.related = btnCafe;
lockedSymbol4.related = btnCandy;
lockedSymbol5.related = btnLiquor;
lockedSymbol6.related = btnSteak;
lockedSymbol7.related = btnSushi;
}
}
}//package
Section 539
//UI_SectorButtonShop (UI_SectorButtonShop)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonShop extends SectorPanel {
public function UI_SectorButtonShop(){
addFrameScript(0, frame1);
}
function frame1(){
itemNumber0.related = btnDrugStore;
itemNumber1.related = btnBabyShop;
itemNumber2.related = btnBookStore;
itemNumber3.related = btnBoutique;
itemNumber4.related = btnSalon;
itemNumber5.related = btnJewelry;
itemNumber6.related = btnSupermarket;
itemNumber7.related = btnTattoo;
itemNumber8.related = btnGadget;
itemNumber9.related = btnMusicShop;
itemNumber10.related = btnToyStore;
itemNumber11.related = btnSportShop;
lockedSymbol0.related = btnDrugStore;
lockedSymbol1.related = btnBabyShop;
lockedSymbol2.related = btnBookStore;
lockedSymbol3.related = btnBoutique;
lockedSymbol4.related = btnSalon;
lockedSymbol5.related = btnJewelry;
lockedSymbol6.related = btnSupermarket;
lockedSymbol7.related = btnTattoo;
lockedSymbol8.related = btnGadget;
lockedSymbol9.related = btnMusicShop;
lockedSymbol10.related = btnToyStore;
lockedSymbol11.related = btnSportShop;
}
}
}//package
Section 540
//UI_SectorButtonStaff (UI_SectorButtonStaff)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import flash.filters.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import Instance.ui.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_SectorButtonStaff extends SectorPanel {
public function UI_SectorButtonStaff(){
addFrameScript(0, frame1);
}
function frame1(){
staffNumber0.related = btnJanitor;
staffNumber1.related = btnElectrician;
staffNumber2.related = btnSecurity;
staffNumber3.related = btnEntertainer;
}
}
}//package
Section 541
//UI_StaffDetailInformation (UI_StaffDetailInformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import fl.motion.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_StaffDetailInformation extends UI_ParameterDetail {
public var currentList:Array;
public var buttonList;
public var workTimeAreaList;
public var i;
public function UI_StaffDetailInformation(){
addFrameScript(0, frame1);
}
public function InitializePage(_arg1:Event):void{
readCategory();
addEventListener(Event.ENTER_FRAME, UpdateFrame);
addEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
public function changeCategory(_arg1:ParameterDetailEvent):void{
if (this.category != _arg1.param){
this.category = _arg1.param;
this.page = 0;
readCategory();
};
}
public function changePage(_arg1:ParameterDetailEvent):void{
if (this.page != _arg1.param){
if (_arg1.param < 0){
this.page = (this.maxPage - 1);
} else {
if (_arg1.param >= this.maxPage){
this.page = 0;
} else {
this.page = _arg1.param;
};
};
};
readCategory();
}
public function checkPageAndCategory(_arg1:ShopGameEvent):void{
readCategory();
}
public function readCategory():void{
var _local3:*;
var _local1:Array = new Array();
if (this.category == 0){
_local1 = world.janitorList.concat();
} else {
if (this.category == 1){
_local1 = world.electricianList.concat();
} else {
if (this.category == 2){
_local1 = world.securityList.concat();
} else {
if (this.category == 3){
_local1 = world.entertainerList.concat();
};
};
};
};
this.maxPage = Math.max(Math.ceil((_local1.length / detailBoxList.length)), 1);
if (this.page >= this.maxPage){
this.page = (this.maxPage - 1);
};
currentList = [];
var _local2:* = 0;
while (_local2 < detailBoxList.length) {
detailBoxList[_local2].removeEventListener(MouseEvent.CLICK, detailBoxOnClick);
_local3 = (_local2 + (this.page * detailBoxList.length));
if (_local3 < _local1.length){
detailBoxList[_local2].visible = true;
detailBoxList[_local2].addEventListener(MouseEvent.CLICK, detailBoxOnClick);
} else {
detailBoxList[_local2].visible = false;
};
buttonList[_local2].visible = detailBoxList[_local2].visible;
workTimeAreaList[_local2].visible = detailBoxList[_local2].visible;
currentList.push(_local1[_local3]);
_local2++;
};
pageInfo.text = (((this.page + 1) + "/") + this.maxPage);
nextPageButton.visible = (this.maxPage > 1);
prevPageButton.visible = (this.maxPage > 1);
}
public function parameterPromoteButtonOnClick(_arg1:MouseEvent):void{
var _local4:*;
var _local2:* = buttonList.indexOf(_arg1.currentTarget);
var _local3:* = _arg1.target;
if (_local3.name == "promoteButton"){
if (_local3.enabled){
if ((_local2 in currentList)){
_local4 = VisitorList.getPromotionCost(Utility.getClass(currentList[_local2]), (currentList[_local2].employeeLevel - 1));
if (world.cash >= _local4){
currentList[_local2].promote();
world.addCash(-(_local4));
currentList[_local2].paid = (currentList[_local2].paid + _local4);
} else {
world.showNotification(Notice.NOT_ENOUGH_CASH);
};
};
};
} else {
if (_local3.name == "fireButton"){
if (_local3.enabled){
if ((_local2 in currentList)){
currentList[_local2].fire();
};
};
};
};
}
public function updateWorkTimeArea(_arg1:MouseEvent):void{
var _local4:*;
var _local5:*;
var _local2:* = workTimeAreaList.indexOf(_arg1.currentTarget);
var _local3:* = _arg1.target;
if (_local3.name == "btnUp"){
if (_local3.enabled){
if ((_local2 in currentList)){
currentList[_local2].workArea++;
};
};
} else {
if (_local3.name == "btnDown"){
if (_local3.enabled){
if ((_local2 in currentList)){
currentList[_local2].workArea--;
};
};
} else {
_local4 = _arg1.currentTarget;
_local5 = localToGlobal(new Point((detailBoxList[_local2].x + (detailBoxList[_local2].width / 2)), (detailBoxList[_local2].y + (detailBoxList[_local2].height / 2))));
if (_local3.name == "pullDownDay"){
if (((!((_local4.workTime.text == "Day"))) && (!(currentList[_local2].goHome)))){
world.main.addCash(-(currentList[_local2].getWage()), _local5);
};
if ((currentList[_local2] is CrewEntertainer)){
currentList[_local2].startWorkTime = 10;
currentList[_local2].finishWorkTime = 16;
} else {
currentList[_local2].startWorkTime = 9;
currentList[_local2].finishWorkTime = 19;
};
_local4.hideWorkTimePullDown();
} else {
if (_local3.name == "pullDownNight"){
if (((!((_local4.workTime.text == "Night"))) && (!(currentList[_local2].goHome)))){
world.main.addCash(-(currentList[_local2].getWage()), _local5);
};
if ((currentList[_local2] is CrewEntertainer)){
currentList[_local2].startWorkTime = 16;
currentList[_local2].finishWorkTime = 22;
} else {
currentList[_local2].startWorkTime = 19;
currentList[_local2].finishWorkTime = 5;
};
_local4.hideWorkTimePullDown();
} else {
if (_local3.name == "pullDownAll"){
if (((!((_local4.workTime.text == "All"))) && (!(currentList[_local2].goHome)))){
world.main.addCash(-(currentList[_local2].getWage()), _local5);
};
if ((currentList[_local2] is CrewEntertainer)){
currentList[_local2].startWorkTime = 10;
currentList[_local2].finishWorkTime = 22;
} else {
currentList[_local2].startWorkTime = 9;
currentList[_local2].finishWorkTime = 5;
};
_local4.hideWorkTimePullDown();
};
};
};
};
};
}
public function detailBoxOnClick(_arg1:MouseEvent):void{
var _local2:* = detailBoxList.indexOf(_arg1.currentTarget);
if ((_local2 in currentList)){
currentList[_local2].dispatchEvent(new VisitorEvent(VisitorEvent.VISITOR_CLICK));
};
}
public function UpdateFrame(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local6:*;
var _local7:*;
var _local2:* = 0;
while (_local2 < currentList.length) {
if (detailBoxList[_local2].cropContainer.getChildByName("CroppedImage") != null){
detailBoxList[_local2].cropContainer.removeChild(detailBoxList[_local2].cropContainer.getChildByName("CroppedImage"));
};
if (detailBoxList[_local2].visible){
_local3 = Utility.crop(currentList[_local2], -45, -60, 90, 80);
_local3.name = "CroppedImage";
_local4 = currentList[_local2].localToGlobal(new Point(-1, 0)).x;
_local5 = currentList[_local2].localToGlobal(new Point(1, 0)).x;
if (_local4 > _local5){
_local3.scaleX = -1;
} else {
_local3.scaleX = 1;
};
_local3.x = (5 + (_local3.width * Math.max((-1 * _local3.scaleX), 0)));
_local3.y = 4;
_local3.transform.colorTransform = currentList[_local2].transform.colorTransform;
detailBoxList[_local2].cropContainer.addChild(_local3);
_local6 = 0;
while (_local6 < detailBoxList[_local2].starSymbol.length) {
if (_local6 < currentList[_local2].employeeLevel){
detailBoxList[_local2].starSymbol[_local6].gotoAndStop("Active");
} else {
detailBoxList[_local2].starSymbol[_local6].gotoAndStop("Inactive");
};
_local6++;
};
detailBoxList[_local2].staminaBar.maskBox.scaleX = (currentList[_local2].stamina / 100);
_local7 = new ColorTransform();
if (currentList[_local2].stamina > 50){
_local7.color = Color.interpolateColor(0xFF8800, 0xFF00, ((currentList[_local2].stamina - 50) / 50));
detailBoxList[_local2].staminaBar.fillBox.transform.colorTransform = _local7;
} else {
_local7.color = Color.interpolateColor(0xFF0000, 0xFF8800, (currentList[_local2].stamina / 50));
detailBoxList[_local2].staminaBar.fillBox.transform.colorTransform = _local7;
};
if (currentList[_local2].employeeLevel < currentList[_local2].MAX_LEVEL){
detailBoxList[_local2].expBar.maskBox.scaleX = currentList[_local2].expPercentage();
} else {
detailBoxList[_local2].expBar.maskBox.scaleX = 1;
};
detailBoxList[_local2].currentDuty.textColor = (currentList[_local2].inHome) ? 0xFF0000 : (currentList[_local2].goHome) ? 0xFF8800 : (currentList[_local2].arrival) ? 0x8800 : 0xFF00;
detailBoxList[_local2].currentDuty.text = (currentList[_local2].inHome) ? "Out of duty" : (currentList[_local2].goHome) ? "Leaving" : (currentList[_local2].arrival) ? "Arrival" : "On Duty";
};
if (buttonList[_local2].visible){
if (((currentList[_local2].onUpgrade) || (!(currentList[_local2].canBePromoted())))){
buttonList[_local2].promoteButton.enabled = false;
buttonList[_local2].promoteButton.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
} else {
buttonList[_local2].promoteButton.enabled = true;
buttonList[_local2].promoteButton.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
};
if (workTimeAreaList[_local2].visible){
if (currentList[_local2].workArea == -1){
workTimeAreaList[_local2].workArea.text = "All";
} else {
if (currentList[_local2].workArea == 0){
workTimeAreaList[_local2].workArea.text = "Ground";
} else {
workTimeAreaList[_local2].workArea.text = ("Floor " + currentList[_local2].workArea);
};
};
if ((currentList[_local2] is CrewEntertainer)){
if ((((currentList[_local2].startWorkTime == 10)) && ((currentList[_local2].finishWorkTime == 16)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF00;
workTimeAreaList[_local2].workTime.text = "Day";
} else {
if ((((currentList[_local2].startWorkTime == 16)) && ((currentList[_local2].finishWorkTime == 22)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF;
workTimeAreaList[_local2].workTime.text = "Night";
};
};
if ((((currentList[_local2].startWorkTime == 10)) && ((currentList[_local2].finishWorkTime == 22)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF0000;
workTimeAreaList[_local2].workTime.text = "All";
};
} else {
if ((((currentList[_local2].startWorkTime == 9)) && ((currentList[_local2].finishWorkTime == 19)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF00;
workTimeAreaList[_local2].workTime.text = "Day";
} else {
if ((((currentList[_local2].startWorkTime == 19)) && ((currentList[_local2].finishWorkTime == 5)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF;
workTimeAreaList[_local2].workTime.text = "Night";
};
};
if ((((currentList[_local2].startWorkTime == 9)) && ((currentList[_local2].finishWorkTime == 5)))){
workTimeAreaList[_local2].workTime.textColor = 0xFF0000;
workTimeAreaList[_local2].workTime.text = "All";
};
};
};
_local2++;
};
}
public function closeTheDetail(_arg1:MouseEvent):void{
world.main.GameInterface.deactiveAllDetailButton();
world.main.GameInterface.hideDetail();
}
public function removePage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, UpdateFrame);
removeEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
function frame1(){
pageInfo.mouseEnabled = false;
currentList = new Array();
detailBoxList.push(detailBox0);
detailBoxList.push(detailBox1);
detailBoxList.push(detailBox2);
detailBoxList.push(detailBox3);
detailBoxList.push(detailBox4);
detailBoxList.push(detailBox5);
detailBoxList.push(detailBox6);
detailBoxList.push(detailBox7);
buttonList = new Array();
buttonList.push(paramButton0);
buttonList.push(paramButton1);
buttonList.push(paramButton2);
buttonList.push(paramButton3);
buttonList.push(paramButton4);
buttonList.push(paramButton5);
buttonList.push(paramButton6);
buttonList.push(paramButton7);
workTimeAreaList = new Array();
workTimeAreaList.push(workTimeArea0);
workTimeAreaList.push(workTimeArea1);
workTimeAreaList.push(workTimeArea2);
workTimeAreaList.push(workTimeArea3);
workTimeAreaList.push(workTimeArea4);
workTimeAreaList.push(workTimeArea5);
workTimeAreaList.push(workTimeArea6);
workTimeAreaList.push(workTimeArea7);
addEventListener(Event.ADDED_TO_STAGE, InitializePage);
addEventListener(ParameterDetailEvent.CHANGE_CATEGORY, changeCategory);
addEventListener(ParameterDetailEvent.CHANGE_PAGE, changePage);
this.world.addEventListener(ShopGameEvent.HIRE_STAFF, checkPageAndCategory);
this.world.addEventListener(ShopGameEvent.FIRE_STAFF, checkPageAndCategory);
btnClose.addEventListener(MouseEvent.CLICK, closeTheDetail);
i = 0;
while (i < buttonList.length) {
buttonList[i].addEventListener(MouseEvent.CLICK, parameterPromoteButtonOnClick);
i++;
};
i = 0;
while (i < workTimeAreaList.length) {
workTimeAreaList[i].addEventListener(MouseEvent.CLICK, updateWorkTimeArea);
i++;
};
}
}
}//package
Section 542
//UI_TipsSlider (UI_TipsSlider)
package {
import Instance.ui.*;
public dynamic class UI_TipsSlider extends SliderBar {
public function UI_TipsSlider(){
addFrameScript(0, frame1);
}
function frame1(){
this.slideMode = this.VERTICAL;
}
}
}//package
Section 543
//UI_VisitorDetailInformation (UI_VisitorDetailInformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UI_VisitorDetailInformation extends UI_ParameterDetail {
public var currentList:Array;
public var visitorCommentList;
public function UI_VisitorDetailInformation(){
addFrameScript(0, frame1);
}
public function disableVisitorListMouseEnabled():void{
var _local1:* = 0;
while (_local1 < visitorCommentList.length) {
visitorCommentList[_local1].mouseEnabled = false;
_local1++;
};
}
public function InitializePage(_arg1:Event):void{
readCategory();
addEventListener(Event.ENTER_FRAME, UpdateFrame);
addEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
public function changeCategory(_arg1:ParameterDetailEvent):void{
if (this.category != _arg1.param){
this.category = _arg1.param;
this.page = 0;
readCategory();
};
}
public function changePage(_arg1:ParameterDetailEvent):void{
if (this.page != _arg1.param){
if (_arg1.param < 0){
this.page = (this.maxPage - 1);
} else {
if (_arg1.param >= this.maxPage){
this.page = 0;
} else {
this.page = _arg1.param;
};
};
};
readCategory();
}
public function checkPageAndCategory(_arg1:ShopGameEvent):void{
readCategory();
}
public function readCategory():void{
var _local3:*;
var _local1:Array = new Array();
if (this.category == 0){
_local1 = world.visitorList.concat();
} else {
if (this.category == 1){
_local1 = world.visitorSpecialList.concat();
} else {
if (this.category == 2){
_local1 = world.visitorVillainList.concat();
};
};
};
this.maxPage = Math.max(Math.ceil((_local1.length / detailBoxList.length)), 1);
if (this.page >= this.maxPage){
this.page = (this.maxPage - 1);
};
currentList = [];
var _local2:* = 0;
while (_local2 < detailBoxList.length) {
detailBoxList[_local2].removeEventListener(MouseEvent.CLICK, detailBoxOnClick);
_local3 = (_local2 + (this.page * detailBoxList.length));
if (_local3 < _local1.length){
detailBoxList[_local2].visible = true;
detailBoxList[_local2].addEventListener(MouseEvent.CLICK, detailBoxOnClick);
} else {
detailBoxList[_local2].visible = false;
};
visitorCommentList[_local2].visible = detailBoxList[_local2].visible;
currentList.push(_local1[_local3]);
_local2++;
};
pageInfo.text = (((this.page + 1) + "/") + this.maxPage);
nextPageButton.visible = (this.maxPage > 1);
prevPageButton.visible = (this.maxPage > 1);
}
public function detailBoxOnClick(_arg1:MouseEvent):void{
var _local2:* = detailBoxList.indexOf(_arg1.currentTarget);
if ((_local2 in currentList)){
currentList[_local2].dispatchEvent(new VisitorEvent(VisitorEvent.VISITOR_CLICK));
};
}
public function UpdateFrame(_arg1:Event):void{
var _local3:*;
var _local4:*;
var _local5:*;
var _local2:* = 0;
while (_local2 < currentList.length) {
if (detailBoxList[_local2].cropContainer.getChildByName("CroppedImage") != null){
detailBoxList[_local2].cropContainer.removeChild(detailBoxList[_local2].cropContainer.getChildByName("CroppedImage"));
};
if (detailBoxList[_local2].visible){
_local3 = Utility.crop(currentList[_local2], -45, -60, 90, 80);
_local3.name = "CroppedImage";
_local4 = currentList[_local2].localToGlobal(new Point(-1, 0)).x;
_local5 = currentList[_local2].localToGlobal(new Point(1, 0)).x;
if (_local4 > _local5){
_local3.scaleX = -1;
} else {
_local3.scaleX = 1;
};
_local3.x = (5 + (_local3.width * Math.max((-1 * _local3.scaleX), 0)));
_local3.y = 4;
_local3.transform.colorTransform = currentList[_local2].transform.colorTransform;
detailBoxList[_local2].cropContainer.addChild(_local3);
detailBoxList[_local2].visitorName.text = currentList[_local2].visitorName;
detailBoxList[_local2].currentCashText.text = ("$" + Utility.numberToMoney(currentList[_local2].currentCash));
if (detailBoxList[_local2].statificationMeter.currentFrame != (currentList[_local2].statification + 1)){
detailBoxList[_local2].statificationMeter.gotoAndStop((currentList[_local2].statification + 1));
};
visitorCommentList[_local2].text = currentList[_local2].visitorComment.replace(/&sp/g, " ");
};
_local2++;
};
}
public function closeTheDetail(_arg1:MouseEvent):void{
world.main.GameInterface.deactiveAllDetailButton();
world.main.GameInterface.hideDetail();
}
public function removePage(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, UpdateFrame);
removeEventListener(Event.REMOVED_FROM_STAGE, removePage);
}
function frame1(){
tabBarNormalVisitor.setText("NORMAL");
tabBarSpecialVisitor.setText("SPECIAL");
tabBarVillainVisitor.setText("VILLAIN");
pageInfo.mouseEnabled = false;
currentList = new Array();
detailBoxList.push(detailBox0);
detailBoxList.push(detailBox1);
detailBoxList.push(detailBox2);
detailBoxList.push(detailBox3);
detailBoxList.push(detailBox4);
detailBoxList.push(detailBox5);
detailBoxList.push(detailBox6);
detailBoxList.push(detailBox7);
visitorCommentList = new Array();
visitorCommentList.push(vComment0);
visitorCommentList.push(vComment1);
visitorCommentList.push(vComment2);
visitorCommentList.push(vComment3);
visitorCommentList.push(vComment4);
visitorCommentList.push(vComment5);
visitorCommentList.push(vComment6);
visitorCommentList.push(vComment7);
disableVisitorListMouseEnabled();
addEventListener(Event.ADDED_TO_STAGE, InitializePage);
addEventListener(ParameterDetailEvent.CHANGE_CATEGORY, changeCategory);
addEventListener(ParameterDetailEvent.CHANGE_PAGE, changePage);
this.world.addEventListener(ShopGameEvent.VISITOR_ARRIVE, checkPageAndCategory);
this.world.addEventListener(ShopGameEvent.VISITOR_LEAVE, checkPageAndCategory);
btnClose.addEventListener(MouseEvent.CLICK, closeTheDetail);
}
}
}//package
Section 544
//UI_VisitorInfoSlider (UI_VisitorInfoSlider)
package {
import Instance.ui.*;
public dynamic class UI_VisitorInfoSlider extends SliderBar {
public function UI_VisitorInfoSlider(){
addFrameScript(0, frame1);
}
function frame1(){
this.slideMode = this.VERTICAL;
}
}
}//package
Section 545
//UI_WorldMap (UI_WorldMap)
package {
import Instance.*;
public dynamic class UI_WorldMap extends UI_WorldMap {
}
}//package
Section 546
//UIboothinformation (UIboothinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIboothinformation extends InformationTable {
public function UIboothinformation(){
addFrameScript(0, frame1);
}
public function checkUpgradeEffect():void{
upgradeEffect.text = BoothList.getUpgradeEffect(relation);
upgradeSlider.visible = (upgradeEffect.height > upgradeMask.height);
}
public function correctUpgradeCost(_arg1:BoothEvent):void{
upgradeCost.text = ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1)))) : "-";
checkUpgradeEffect();
}
public function boothNameOnClick(_arg1:MouseEvent):void{
if (boothName.type != TextFieldType.INPUT){
setToInput();
};
}
public function confirmChange(_arg1:KeyboardEvent):void{
var _local2:* = _arg1.keyCode;
if (_local2 == Keyboard.ENTER){
setToDynamic();
relation.boothName = boothName.text;
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmChange);
};
}
public function tableOnClose(_arg1:InformationTableEvent):void{
setToDynamic();
relation.boothName = boothName.text;
boothName.removeEventListener(MouseEvent.CLICK, boothNameOnClick);
removeEventListener(InformationTableEvent.ON_CLOSE, tableOnClose);
}
public function setToInput():void{
var _local1:* = relation.world;
_local1.canScroll = false;
boothName.type = TextFieldType.INPUT;
boothName.background = true;
boothName.textColor = 0;
boothName.maxChars = 12;
boothName.setSelection(0, boothName.maxChars);
stage.addEventListener(KeyboardEvent.KEY_UP, confirmChange);
}
public function setToDynamic():void{
var _local1:* = relation.world;
_local1.canScroll = true;
boothName.type = TextFieldType.DYNAMIC;
boothName.background = false;
boothName.textColor = 0xFFFFFF;
stage.removeEventListener(KeyboardEvent.KEY_UP, confirmChange);
}
public function showList():void{
var _local1:* = relation.getMaxCapacity();
numberVisitor.text = ((("" + relation.visitorList.length) + "/") + ((_local1 <= 0)) ? "-" : _local1);
totalVisitor.text = ("" + relation.visitorVisit);
var _local2:* = BoothList.getAverageItemPriceByType(Utility.getClass(relation), (relation.boothLevel - 1));
var _local3:* = relation.world;
if ((relation is BoothCinema)){
_local2 = Math.round((_local2 * (1 + (_local3.popularity / 150))));
};
averageItemPrice.text = ("$" + Utility.numberToMoney(_local2));
revenue.text = ("$" + Utility.numberToMoney(relation.revenue));
}
public function updateList(_arg1:Event):void{
showList();
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
upgradeEffect.y = (upgradeMask.y - (_local2.getPosition() * (upgradeEffect.height - upgradeMask.height)));
}
function frame1(){
boothType.autoSize = TextFieldAutoSize.CENTER;
boothType.mouseEnabled = false;
upgradeEffect.autoSize = TextFieldAutoSize.LEFT;
numberVisitor.mouseEnabled = false;
totalVisitor.mouseEnabled = false;
averageItemPrice.mouseEnabled = false;
revenue.mouseEnabled = false;
upgradeCost.mouseEnabled = false;
itemPriceHeader.mouseEnabled = false;
revenue.autoSize = TextFieldAutoSize.RIGHT;
boothType.text = BoothList.compareShowNameByType(Utility.getClass(this.relation)).toUpperCase();
boothName.text = this.relation.boothName;
upgradeCost.text = ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1)))) : "-";
checkUpgradeEffect();
upgradeEffect.text = BoothList.getUpgradeEffect(relation);
relation.addEventListener(BoothEvent.END_UPGRADE, correctUpgradeCost);
if ((relation is BoothCinema)){
itemPriceHeader.text = "Ticket/person";
} else {
if ((relation is BoothArcade)){
itemPriceHeader.text = "Price/game";
};
};
setToDynamic();
boothName.addEventListener(MouseEvent.CLICK, boothNameOnClick);
addEventListener(Event.ENTER_FRAME, updateList);
addEventListener(InformationTableEvent.ON_CLOSE, tableOnClose);
upgradeSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
showList();
}
}
}//package
Section 547
//UIButtonShiftMark (UIButtonShiftMark)
package {
import Instance.ui.*;
public dynamic class UIButtonShiftMark extends ToggleButton {
}
}//package
Section 548
//UIemployeeinformation (UIemployeeinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIemployeeinformation extends InformationTable {
public var workAreaShown;
public var workTimeShown;
public function UIemployeeinformation(){
addFrameScript(0, frame1);
}
public function UpdateEXPBar(_arg1:VisitorEvent):void{
expBar.expBarFill.scaleX = ((relation.employeeLevel)<relation.MAX_LEVEL) ? relation.expPercentage() : 1;
if (!btnUpgrade.enabled){
if (relation.canBePromoted()){
btnUpgrade.enabled = true;
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
};
}
public function UpdateStaminaBar(_arg1:VisitorEvent):void{
staminaBar.barFill.scaleX = (relation.stamina / 100);
}
public function UpdateWorkArea(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:* = relation.world;
var _local4:* = Math.max((_local3.floorList.length - 1), 0);
if (_local2.name == "btnUp"){
workAreaShown++;
if (workAreaShown > _local4){
workAreaShown = -1;
};
btnConfirmWorkArea.visible = true;
} else {
if (_local2.name == "btnDown"){
workAreaShown--;
if (workAreaShown < -1){
workAreaShown = _local4;
};
btnConfirmWorkArea.visible = true;
};
};
checkWorkArea();
}
public function btnMoveOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = relation.world;
_local3.setMovingMode(relation);
this.closeTable();
};
}
public function promoteUpdate(_arg1:VisitorEvent):void{
wagePerDay.text = (": $" + relation.getWage());
checkPromote();
}
public function UpdateWorkTime(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
if (_local2.name == "btnUp"){
if (workTimeShown == "Day"){
workTimeShown = "Night";
} else {
if (workTimeShown == "Night"){
workTimeShown = "All";
} else {
workTimeShown = "Day";
};
};
btnConfirmWorkTime.visible = true;
} else {
if (_local2.name == "btnDown"){
if (workTimeShown == "Day"){
workTimeShown = "All";
} else {
if (workTimeShown == "Night"){
workTimeShown = "Day";
} else {
workTimeShown = "Night";
};
};
btnConfirmWorkTime.visible = true;
};
};
checkWorkTime();
}
public function checkWorkTime():void{
currentWorkTime.textColor = ((workTimeShown)=="Day") ? 0xFF00 : ((workTimeShown == "Night")) ? 0xFF : 0xFF0000;
currentWorkTime.text = workTimeShown;
}
public function checkWorkArea():void{
if (workAreaShown == -1){
currentWorkArea.text = "All";
} else {
if (workAreaShown == 0){
currentWorkArea.text = "Ground";
} else {
currentWorkArea.text = ("Floor " + workAreaShown);
};
};
}
public function confirmWorkArea(_arg1:MouseEvent):void{
relation.workArea = workAreaShown;
btnConfirmWorkArea.visible = false;
}
public function confirmWorkTime(_arg1:MouseEvent):void{
var _local2:* = "";
if ((((relation.startWorkTime == 9)) && ((relation.finishWorkTime == 19)))){
_local2 = "Day";
} else {
if ((((relation.startWorkTime == 19)) && ((relation.finishWorkTime == 5)))){
_local2 = "Night";
} else {
if ((((relation.startWorkTime == 9)) && ((relation.finishWorkTime == 5)))){
_local2 = "All";
};
};
};
if (_local2 != workTimeShown){
if (!relation.goHome){
relation.payTime();
};
};
if (workTimeShown == "Day"){
relation.startWorkTime = 9;
relation.finishWorkTime = 19;
} else {
if (workTimeShown == "Night"){
relation.startWorkTime = 19;
relation.finishWorkTime = 5;
} else {
if (workTimeShown == "All"){
relation.startWorkTime = 9;
relation.finishWorkTime = 5;
};
};
};
btnConfirmWorkTime.visible = false;
wagePerDay.text = (": $" + Utility.numberToMoney(relation.getWage()));
}
public function checkGoHome(_arg1:VisitorEvent):void{
btnMove.enabled = !(relation.goHome);
if (btnMove.enabled){
btnMove.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnMove.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
upgradeEffect.y = (upgradeMask.y - (_local2.getPosition() * (upgradeEffect.height - upgradeMask.height)));
}
public function checkPromote():void{
upgradeEffect.text = VisitorList.getUpgradeEffect(relation);
upgradeSlider.visible = (upgradeEffect.height > upgradeMask.height);
promotionCost.text = ((relation.employeeLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(VisitorList.getPromotionCost(Utility.getClass(relation), (relation.employeeLevel - 1)))) : "-";
}
function frame1(){
staffType.autoSize = TextFieldAutoSize.CENTER;
staffType.mouseEnabled = false;
currentWorkArea.autoSize = TextFieldAutoSize.LEFT;
currentWorkArea.mouseEnabled = false;
wagePerDay.mouseEnabled = false;
promotionCost.mouseEnabled = false;
upgradeEffect.mouseEnabled = false;
upgradeEffect.autoSize = TextFieldAutoSize.LEFT;
btnConfirmWorkArea.visible = false;
btnConfirmWorkTime.visible = false;
btnMove.enabled = !(relation.goHome);
btnConfirmWorkArea.addEventListener(MouseEvent.CLICK, confirmWorkArea);
btnConfirmWorkTime.addEventListener(MouseEvent.CLICK, confirmWorkTime);
btnMove.addEventListener(MouseEvent.CLICK, btnMoveOnClick);
relation.addEventListener(VisitorEvent.GO_HOME_UPDATE, checkGoHome);
workAreaShown = relation.workArea;
workTimeShown = "Unknown";
if ((((relation.startWorkTime == 9)) && ((relation.finishWorkTime == 19)))){
workTimeShown = "Day";
} else {
if ((((relation.startWorkTime == 19)) && ((relation.finishWorkTime == 5)))){
workTimeShown = "Night";
} else {
if ((((relation.startWorkTime == 9)) && ((relation.finishWorkTime == 5)))){
workTimeShown = "All";
};
};
};
if ((this.relation is CrewJanitor)){
staffType.text = "STAFF: JANITOR";
} else {
if ((this.relation is CrewElectrician)){
staffType.text = "STAFF: ELECTRICIAN";
} else {
if ((this.relation is CrewSecurity)){
staffType.text = "STAFF: SECURITY";
};
};
};
relation.addEventListener(VisitorEvent.EXP_GAIN, UpdateEXPBar);
relation.addEventListener(VisitorEvent.STAMINA_UPDATE, UpdateStaminaBar);
expBar.expBarFill.scaleX = ((relation.employeeLevel < relation.MAX_LEVEL)) ? relation.expPercentage() : 1;
staminaBar.barFill.scaleX = (relation.stamina / 100);
relation.addEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, promoteUpdate);
wagePerDay.text = (": $" + Utility.numberToMoney(relation.getWage()));
checkPromote();
checkWorkArea();
checkWorkTime();
workAreaDial.addEventListener(MouseEvent.CLICK, UpdateWorkArea);
workTimeDial.addEventListener(MouseEvent.CLICK, UpdateWorkTime);
upgradeSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package
Section 549
//UIentertainerinformation (UIentertainerinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIentertainerinformation extends InformationTable {
public var workAreaShown;
public var workTimeShown;
public function UIentertainerinformation(){
addFrameScript(0, frame1);
}
public function UpdateEXPBar(_arg1:VisitorEvent):void{
expBar.expBarFill.scaleX = ((relation.employeeLevel)<relation.MAX_LEVEL) ? relation.expPercentage() : 1;
if (!btnUpgrade.enabled){
if (relation.canBePromoted()){
btnUpgrade.enabled = true;
btnUpgrade.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
};
};
}
public function UpdateStaminaBar(_arg1:VisitorEvent):void{
staminaBar.barFill.scaleX = (relation.stamina / 100);
}
public function UpdateWorkArea(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:* = relation.world;
var _local4:* = Math.max((_local3.floorList.length - 1), 0);
if (_local2.name == "btnUp"){
workAreaShown++;
if (workAreaShown > _local4){
workAreaShown = -1;
};
btnConfirmWorkArea.visible = true;
} else {
if (_local2.name == "btnDown"){
workAreaShown--;
if (workAreaShown < -1){
workAreaShown = _local4;
};
btnConfirmWorkArea.visible = true;
};
};
checkWorkArea();
}
public function btnMoveOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = relation.world;
_local3.setMovingMode(relation);
this.closeTable();
};
}
public function promoteUpdate(_arg1:VisitorEvent):void{
wagePerDay.text = (": $" + relation.getWage());
checkPromote();
}
public function UpdateWorkTime(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
if (_local2.name == "btnUp"){
if (workTimeShown == "Day"){
workTimeShown = "Night";
} else {
if (workTimeShown == "Night"){
workTimeShown = "All";
} else {
workTimeShown = "Day";
};
};
btnConfirmWorkTime.visible = true;
} else {
if (_local2.name == "btnDown"){
if (workTimeShown == "Day"){
workTimeShown = "All";
} else {
if (workTimeShown == "Night"){
workTimeShown = "Day";
} else {
workTimeShown = "Night";
};
};
btnConfirmWorkTime.visible = true;
};
};
checkWorkTime();
}
public function checkWorkTime():void{
currentWorkTime.textColor = ((workTimeShown)=="Day") ? 0xFF00 : ((workTimeShown == "Night")) ? 0xFF : 0xFF0000;
currentWorkTime.text = workTimeShown;
}
public function checkWorkArea():void{
if (workAreaShown == -1){
currentWorkArea.text = "All";
} else {
if (workAreaShown == 0){
currentWorkArea.text = "Ground";
} else {
currentWorkArea.text = ("Floor " + workAreaShown);
};
};
}
public function confirmWorkArea(_arg1:MouseEvent):void{
relation.workArea = workAreaShown;
btnConfirmWorkArea.visible = false;
}
public function confirmWorkTime(_arg1:MouseEvent):void{
var _local2:* = "";
if ((((relation.startWorkTime == 10)) && ((relation.finishWorkTime == 16)))){
_local2 = "Day";
} else {
if ((((relation.startWorkTime == 16)) && ((relation.finishWorkTime == 22)))){
_local2 = "Night";
} else {
if ((((relation.startWorkTime == 10)) && ((relation.finishWorkTime == 22)))){
_local2 = "All";
};
};
};
if (_local2 != workTimeShown){
if (!relation.goHome){
relation.payTime();
};
};
if (workTimeShown == "Day"){
relation.startWorkTime = 10;
relation.finishWorkTime = 16;
} else {
if (workTimeShown == "Night"){
relation.startWorkTime = 16;
relation.finishWorkTime = 22;
} else {
if (workTimeShown == "All"){
relation.startWorkTime = 10;
relation.finishWorkTime = 22;
};
};
};
btnConfirmWorkTime.visible = false;
wagePerDay.text = (": $" + Utility.numberToMoney(relation.getWage()));
}
public function checkGoHome(_arg1:VisitorEvent):void{
btnMove.enabled = !(relation.goHome);
if (btnMove.enabled){
btnMove.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
} else {
btnMove.transform.colorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 0, 0, 0, 0);
};
}
public function changeModelApperance(_arg1:MouseEvent):void{
relation.changeModel();
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
upgradeEffect.y = (upgradeMask.y - (_local2.getPosition() * (upgradeEffect.height - upgradeMask.height)));
}
public function checkPromote():void{
upgradeEffect.text = VisitorList.getUpgradeEffect(relation);
upgradeSlider.visible = (upgradeEffect.height > upgradeMask.height);
promotionCost.text = ((relation.employeeLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(VisitorList.getPromotionCost(Utility.getClass(relation), (relation.employeeLevel - 1)))) : "-";
}
function frame1(){
staffType.autoSize = TextFieldAutoSize.CENTER;
staffType.mouseEnabled = false;
currentWorkArea.autoSize = TextFieldAutoSize.LEFT;
currentWorkArea.mouseEnabled = false;
upgradeEffect.mouseEnabled = false;
upgradeEffect.autoSize = TextFieldAutoSize.LEFT;
wagePerDay.mouseEnabled = false;
btnConfirmWorkArea.visible = false;
btnConfirmWorkTime.visible = false;
btnMove.enabled = !(relation.goHome);
btnConfirmWorkArea.addEventListener(MouseEvent.CLICK, confirmWorkArea);
btnConfirmWorkTime.addEventListener(MouseEvent.CLICK, confirmWorkTime);
btnMove.addEventListener(MouseEvent.CLICK, btnMoveOnClick);
btnChangeModel.addEventListener(MouseEvent.CLICK, changeModelApperance);
relation.addEventListener(VisitorEvent.GO_HOME_UPDATE, checkGoHome);
workAreaShown = relation.workArea;
workTimeShown = "Unknown";
if ((((relation.startWorkTime == 10)) && ((relation.finishWorkTime == 16)))){
workTimeShown = "Day";
} else {
if ((((relation.startWorkTime == 16)) && ((relation.finishWorkTime == 22)))){
workTimeShown = "Night";
} else {
if ((((relation.startWorkTime == 10)) && ((relation.finishWorkTime == 22)))){
workTimeShown = "All";
};
};
};
if ((this.relation is CrewJanitor)){
staffType.text = "STAFF: JANITOR";
} else {
if ((this.relation is CrewElectrician)){
staffType.text = "STAFF: ELECTRICIAN";
} else {
if ((this.relation is CrewSecurity)){
staffType.text = "STAFF: SECURITY";
};
};
};
relation.addEventListener(VisitorEvent.EXP_GAIN, UpdateEXPBar);
relation.addEventListener(VisitorEvent.STAMINA_UPDATE, UpdateStaminaBar);
expBar.expBarFill.scaleX = ((relation.employeeLevel < relation.MAX_LEVEL)) ? relation.expPercentage() : 1;
staminaBar.barFill.scaleX = (relation.stamina / 100);
relation.addEventListener(VisitorEvent.AFTER_FLASHING_PROMOTE, promoteUpdate);
wagePerDay.text = (": $" + Utility.numberToMoney(relation.getWage()));
checkWorkArea();
checkWorkTime();
checkPromote();
workAreaDial.addEventListener(MouseEvent.CLICK, UpdateWorkArea);
workTimeDial.addEventListener(MouseEvent.CLICK, UpdateWorkTime);
upgradeSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package
Section 550
//UIfacilityinformation (UIfacilityinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIfacilityinformation extends InformationTable {
public var initUpgradeCost;
public function UIfacilityinformation(){
addFrameScript(0, frame1);
}
public function showList():void{
numberVisitorHeader.text = ((((relation is FacilityElevator)) || ((relation is FacilityEscalator)))) ? "Passanger" : ((relation is FacilityRestroom)) ? "Gent" : ((relation is FacilityParkingLot)) ? "Current car" : "Current visitor";
numberWomenHeader.visible = (relation is FacilityRestroom);
numberWomen.visible = (relation is FacilityRestroom);
elevatorExpand.visible = (relation is FacilityElevator);
var _local1:* = relation.getMaxCapacity();
if ((relation is FacilityElevator)){
elevatorExpand.text = (("Drag the body to expand\nExpand Cost : " + Utility.numberToMoney(BoothList.getExpandCost((relation.boothLevel - 1)))) + "/room");
};
if ((relation is FacilityRestroom)){
numberVisitor.text = ((("" + relation.menList.length) + "/") + ((_local1 <= 0)) ? "-" : _local1);
numberWomen.text = ((("" + relation.womenList.length) + "/") + ((_local1 <= 0)) ? "-" : _local1);
} else {
if ((relation is FacilityParkingLot)){
numberVisitor.text = (("" + relation.carList.length) + "/2");
} else {
numberVisitor.text = ((("" + relation.visitorList.length) + "/") + ((_local1 <= 0)) ? "-" : _local1);
};
};
}
public function correctUpgradeCost(_arg1:BoothEvent):void{
var _local2:* = BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1));
if ((relation is FacilityElevator)){
_local2 = (_local2 + (Math.max((relation.roomList.length - 2), 0) * (BoothList.getExpandCost(relation.boothLevel) - BoothList.getExpandCost((relation.boothLevel - 1)))));
};
upgradeCost.text = ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(_local2)) : "-";
checkUpgradeEffect();
}
public function checkUpgradeEffect():void{
var _local2:*;
var _local3:*;
var _local1:* = BoothList.getUpgradeEffect(relation);
if ((relation is FacilityElevator)){
_local2 = BoothList.getMaxVisitor(Utility.getClass(relation), relation.boothLevel);
_local3 = relation.world;
if (_local3.checkUpgradeByName("Deluxe Elevator")){
_local2 = (_local2 * 2);
};
_local1 = _local1.replace(/&elevatorCapacity/g, (("" + _local2) + ""));
};
upgradeEffect.text = _local1;
upgradeSlider.visible = (upgradeEffect.height > upgradeMask.height);
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
upgradeEffect.y = (upgradeMask.y - (_local2.getPosition() * (upgradeEffect.height - upgradeMask.height)));
}
public function updateList(_arg1:Event):void{
showList();
}
function frame1(){
numberVisitorHeader.mouseEnabled = false;
numberVisitor.mouseEnabled = false;
numberWomenHeader.mouseEnabled = false;
numberWomen.mouseEnabled = false;
upgradeCost.mouseEnabled = false;
upgradeEffect.mouseEnabled = false;
upgradeEffect.autoSize = TextFieldAutoSize.LEFT;
showList();
checkUpgradeEffect();
facilityType.autoSize = TextFieldAutoSize.CENTER;
upgradeCost.mouseEnabled = false;
facilityType.text = BoothList.compareShowNameByType(Utility.getClass(this.relation)).toUpperCase();
initUpgradeCost = ((relation.boothLevel)<relation.MAX_LEVEL) ? BoothList.getUpgradeCost(Utility.getClass(relation), (relation.boothLevel - 1)) : 0;
if ((relation is FacilityElevator)){
initUpgradeCost = (initUpgradeCost + (Math.max((relation.roomList.length - 2), 0) * (BoothList.getExpandCost(relation.boothLevel) - BoothList.getExpandCost((relation.boothLevel - 1)))));
relation.addEventListener(BoothEvent.ELEVATOR_EXPANDED, correctUpgradeCost);
};
upgradeCost.text = ((relation.boothLevel)<relation.MAX_LEVEL) ? ("$" + Utility.numberToMoney(initUpgradeCost)) : "-";
upgradeSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
relation.addEventListener(BoothEvent.END_UPGRADE, correctUpgradeCost);
addEventListener(Event.ENTER_FRAME, updateList);
}
}
}//package
Section 551
//UImissionsuccess (UImissionsuccess)
package {
import flash.display.*;
import greensock.*;
import Instance.events.*;
import greensock.easing.*;
public dynamic class UImissionsuccess extends MovieClip {
public function UImissionsuccess(){
addFrameScript(0, frame1);
}
public function blinkThis(_arg1:uint):void{
if (_arg1 > 0){
TweenLite.to(this, 0.2, {tint:0xFFFFFF, ease:Linear.easeNone, onComplete:unblinkThis, onCompleteParams:[_arg1]});
} else {
disapearThis();
};
}
public function unblinkThis(_arg1:uint):void{
if (_arg1 > 0){
TweenLite.to(this, 0.2, {tint:null, ease:Linear.easeNone, onComplete:blinkThis, onCompleteParams:[(_arg1 - 1)]});
} else {
disapearThis();
};
}
public function disapearThis():void{
TweenLite.to(this, 0.5, {y:(this.y - 30), alpha:0, rotation:180, delay:0.8, onStart:beginVanish, onComplete:this.parent.removeChild, onCompleteParams:[this]});
}
public function beginVanish():void{
dispatchEvent(new ShopGameEvent(ShopGameEvent.MISSION_CLEAR));
}
function frame1(){
TweenLite.from(this, 1.2, {scaleX:5, scaleY:5, alpha:0, ease:Linear.easeNone, onComplete:blinkThis, onCompleteParams:[3]});
}
}
}//package
Section 552
//UISaveGame (UISaveGame)
package {
import flash.display.*;
import flash.geom.*;
import greensock.*;
import flash.events.*;
import flash.filters.*;
import greensock.easing.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UISaveGame extends MovieClip {
public var btnClose:SimpleButton;
public var slot1:MovieClip;
public var slot2:MovieClip;
public var slot3:MovieClip;
public var tRoot;
public var theRoot;
public var slotStored:uint;
public var slotList;
public var i;
public function UISaveGame(){
addFrameScript(0, frame1);
}
public function firstInit(_arg1:Event):void{
var e = _arg1;
try {
initSlot();
removeEventListener(Event.ENTER_FRAME, firstInit);
} catch(e:Error) {
};
}
public function initSlot():void{
var _local1:* = 0;
while (_local1 < slotList.length) {
slotList[_local1].enabled = true;
if (theRoot.saveData[_local1].data.playerName){
slotList[_local1].gotoAndStop(1);
slotList[_local1].setTextSlot(theRoot.saveData[_local1]);
slotList[_local1].slotNotice.text = ("Slot " + (_local1 + 1));
} else {
slotList[_local1].gotoAndStop(2);
};
_local1++;
};
}
public function closeThisPage(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
TweenLite.to(this, 0.5, {scaleX:0, scaleY:0, onComplete:this.parent.removeChild, onCompleteParams:[this]});
};
}
public function onMouseOver(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = new GlowFilter();
_local3.color = 0xCC0099;
_local3.alpha = 0.8;
_local3.blurX = 10;
_local3.blurY = 10;
_local3.strength = 25;
_local2.filters = [_local3];
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 204, 0, 153, 0);
_local2.addEventListener(MouseEvent.MOUSE_OUT, onMouseOut);
};
}
public function onMouseOut(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
_local2.filters = [];
_local2.transform.colorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
}
public function slotOnClick(_arg1:MouseEvent):void{
var _local3:*;
var _local2:* = _arg1.currentTarget;
if (_local2.enabled){
_local3 = slotList.indexOf(_local2);
if ((_local3 in theRoot.saveData)){
if (theRoot.saveData[_local3].data.playerName){
slotStored = _local3;
revealWarning();
} else {
saveTheGame(_local3);
};
};
};
}
public function saveTheGame(_arg1:int):void{
theRoot.saveGame(_arg1);
slotList[_arg1].shineSlot.play();
slotList[_arg1].gotoAndStop(1);
slotList[_arg1].addEventListener(Event.ENTER_FRAME, updateSaveText);
}
public function updateSaveText(_arg1:Event):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = slotList.indexOf(_local2);
if (_local2.setTextSlot(theRoot.saveData[_local3])){
slotList[_local3].slotNotice.text = ("Slot " + (_local3 + 1));
_local2.removeEventListener(Event.ENTER_FRAME, updateSaveText);
};
}
public function revealWarning():void{
var _local1:* = this.parent;
btnClose.enabled = false;
var _local2:* = 0;
while (_local2 < slotList.length) {
slotList[_local2].enabled = false;
_local2++;
};
var _local3:* = new UI_ConfirmationOnOverwrite();
_local3.x = this.x;
_local3.y = this.y;
_local1.addChild(_local3);
TweenLite.from(_local3, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut});
_local3.addEventListener(MouseEvent.CLICK, confirmationSave);
_local3.addEventListener(Event.REMOVED_FROM_STAGE, confirmationRemoved);
}
public function confirmationSave(_arg1:MouseEvent):void{
var _local2:* = _arg1.currentTarget;
var _local3:* = _arg1.target;
if (_local3 == _local2.btnYes){
saveTheGame(slotStored);
TweenLite.to(_local2, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:_local2.parent.removeChild, onCompleteParams:[_local2]});
} else {
if (_local3 == _local2.btnNo){
TweenLite.to(_local2, 0.5, {scaleX:0, scaleY:0, alpha:0, onComplete:_local2.parent.removeChild, onCompleteParams:[_local2]});
};
};
}
public function confirmationRemoved(_arg1:Event):void{
btnClose.enabled = true;
var _local2:* = 0;
while (_local2 < slotList.length) {
slotList[_local2].enabled = true;
_local2++;
};
}
function frame1(){
tRoot = this.root;
theRoot = tRoot.mainProgram;
slotList = [slot1, slot2, slot3];
i = 0;
while (i < slotList.length) {
slotList[i].stop();
slotList[i].addEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
slotList[i].addEventListener(MouseEvent.CLICK, slotOnClick);
i++;
};
addEventListener(Event.ENTER_FRAME, firstInit);
btnClose.addEventListener(MouseEvent.CLICK, closeThisPage);
}
}
}//package
Section 553
//UIUnupgradeablefacilityinformation (UIUnupgradeablefacilityinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIUnupgradeablefacilityinformation extends InformationTable {
public function UIUnupgradeablefacilityinformation(){
addFrameScript(0, frame1);
}
public function showList():void{
var _local1:* = relation.getMaxCapacity();
numberVisitor.text = ((("" + relation.visitorList.length) + "/") + ((_local1 <= 0)) ? "-" : _local1);
}
function frame1(){
facilityType.autoSize = TextFieldAutoSize.CENTER;
facilityType.text = BoothList.compareShowNameByType(Utility.getClass(this.relation)).toUpperCase();
numberVisitor.mouseEnabled = false;
showList();
}
}
}//package
Section 554
//UIvisitorinformation (UIvisitorinformation)
package {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import Instance.events.*;
import flash.filters.*;
import Instance.constant.*;
import Instance.modules.*;
import Instance.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.utils.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class UIvisitorinformation extends InformationTable {
public function UIvisitorinformation(){
addFrameScript(0, frame1);
}
public function sliderBarChangePosition(_arg1:SliderBarEvent):void{
var _local2:* = _arg1.currentTarget;
commentInfo.y = (commentMask.y - (_local2.getPosition() * (commentInfo.height - commentMask.height)));
}
public function checkUpdate(_arg1:Event):void{
if (statificationMeter.currentFrame != (relation.statification + 1)){
statificationMeter.gotoAndStop((relation.statification + 1));
};
checkState();
}
public function checkRemove(_arg1:Event):void{
this.closeTable();
}
public function removed(_arg1:Event):void{
relation.removeEventListener(Event.REMOVED_FROM_STAGE, checkRemove);
removeEventListener(Event.ENTER_FRAME, checkUpdate);
removeEventListener(Event.REMOVED_FROM_STAGE, removed);
}
public function checkFavoriteList():void{
var _local4:*;
var _local1:* = null;
var _local2:* = "";
var _local3:* = 0;
while (_local3 < relation.favoriteList.length) {
_local4 = relation.favoriteList[_local3];
if (_local4 != _local1){
if (_local2.length > 0){
_local2 = (_local2 + "\n");
};
_local2 = (_local2 + BoothList.compareShowNameByType(_local4));
_local1 = _local4;
};
_local3++;
};
if (_local2.length <= 0){
_local2 = "(none)";
};
favoriteList.text = _local2;
}
public function checkState():void{
currentCash.text = Utility.numberToMoney(relation.currentCash);
commentInfo.text = relation.visitorComment.replace(/&sp/g, " ");
commentSlider.visible = (commentInfo.height > commentMask.height);
}
public function checkTransform(_arg1:VisitorEvent):void{
relation.removeEventListener(VisitorEvent.ON_OUT_WORLD, checkRemove);
relation.removeEventListener(VisitorEvent.OUT_BY_CAR, checkRemove);
relation.removeEventListener(VisitorEvent.TRANSFORM_TO_NORMAL, checkTransform);
relation = _arg1.related;
checkState();
checkFavoriteList();
visitorName.text = relation.visitorName.toUpperCase();
relation.addEventListener(VisitorEvent.ON_OUT_WORLD, checkRemove);
relation.addEventListener(VisitorEvent.OUT_BY_CAR, checkRemove);
relation.addEventListener(VisitorEvent.TRANSFORM_TO_NORMAL, checkTransform);
}
function frame1(){
statificationMeter.gotoAndStop((relation.statification + 1));
commentInfo.autoSize = TextFieldAutoSize.LEFT;
commentInfo.mouseEnabled = false;
favoriteList.autoSize = TextFieldAutoSize.CENTER;
favoriteList.mouseEnabled = false;
currentCash.mouseEnabled = false;
visitorName.mouseEnabled = false;
visitorName.text = relation.visitorName.toUpperCase();
relation.addEventListener(VisitorEvent.ON_OUT_WORLD, checkRemove);
relation.addEventListener(VisitorEvent.OUT_BY_CAR, checkRemove);
relation.addEventListener(VisitorEvent.TRANSFORM_TO_NORMAL, checkTransform);
checkFavoriteList();
checkState();
addEventListener(Event.ENTER_FRAME, checkUpdate);
addEventListener(Event.REMOVED_FROM_STAGE, removed);
commentSlider.addEventListener(SliderBarEvent.CHANGE_POSITION, sliderBarChangePosition);
}
}
}//package
Section 555
//VisitorAfro (VisitorAfro)
package {
import Instance.*;
public dynamic class VisitorAfro extends VisitorNormal {
}
}//package
Section 556
//VisitorAfroFemale (VisitorAfroFemale)
package {
import Instance.*;
public dynamic class VisitorAfroFemale extends VisitorNormal {
}
}//package
Section 557
//VisitorAfroVillain (VisitorAfroVillain)
package {
import Instance.*;
public dynamic class VisitorAfroVillain extends VillainVisitor {
}
}//package
Section 558
//VisitorAlnord (VisitorAlnord)
package {
import Instance.*;
public dynamic class VisitorAlnord extends VisitorSpecial {
}
}//package
Section 559
//VisitorArabian (VisitorArabian)
package {
import Instance.*;
public dynamic class VisitorArabian extends VisitorNormal {
}
}//package
Section 560
//VisitorAsianFemale (VisitorAsianFemale)
package {
import Instance.*;
public dynamic class VisitorAsianFemale extends VisitorNormal {
}
}//package
Section 561
//VisitorAsianMale (VisitorAsianMale)
package {
import Instance.*;
public dynamic class VisitorAsianMale extends VisitorNormal {
}
}//package
Section 562
//VisitorAwam (VisitorAwam)
package {
import Instance.*;
public dynamic class VisitorAwam extends VisitorNormal {
}
}//package
Section 563
//VisitorAwamVillain (VisitorAwamVillain)
package {
import Instance.*;
public dynamic class VisitorAwamVillain extends VillainVisitor {
}
}//package
Section 564
//VisitorBlondie (VisitorBlondie)
package {
import Instance.*;
public dynamic class VisitorBlondie extends VisitorNormal {
}
}//package
Section 565
//VisitorBlondieVillain (VisitorBlondieVillain)
package {
import Instance.*;
public dynamic class VisitorBlondieVillain extends VillainVisitor {
}
}//package
Section 566
//VisitorBrewok (VisitorBrewok)
package {
import Instance.*;
public dynamic class VisitorBrewok extends VisitorNormal {
}
}//package
Section 567
//VisitorBussinessman (VisitorBussinessman)
package {
import Instance.*;
public dynamic class VisitorBussinessman extends VisitorNormal {
}
}//package
Section 568
//VisitorCheerGirl (VisitorCheerGirl)
package {
import Instance.*;
public dynamic class VisitorCheerGirl extends VisitorNormal {
}
}//package
Section 569
//VisitorChuckNourish (VisitorChuckNourish)
package {
import Instance.*;
public dynamic class VisitorChuckNourish extends VisitorSpecial {
}
}//package
Section 570
//VisitorDustbinBiebir (VisitorDustbinBiebir)
package {
import Instance.*;
public dynamic class VisitorDustbinBiebir extends VisitorSpecial {
}
}//package
Section 571
//VisitorHiphop (VisitorHiphop)
package {
import Instance.*;
public dynamic class VisitorHiphop extends VisitorNormal {
}
}//package
Section 572
//VisitorIndiaFemale (VisitorIndiaFemale)
package {
import Instance.*;
public dynamic class VisitorIndiaFemale extends VisitorNormal {
}
}//package
Section 573
//VisitorIndiaMale (VisitorIndiaMale)
package {
import Instance.*;
public dynamic class VisitorIndiaMale extends VisitorNormal {
}
}//package
Section 574
//VisitorKateCentertown (VisitorKateCentertown)
package {
import Instance.*;
public dynamic class VisitorKateCentertown extends VisitorSpecial {
}
}//package
Section 575
//VisitorKatyBerry (VisitorKatyBerry)
package {
import Instance.*;
public dynamic class VisitorKatyBerry extends VisitorSpecial {
}
}//package
Section 576
//VisitorKezya (VisitorKezya)
package {
import Instance.*;
public dynamic class VisitorKezya extends VisitorSpecial {
}
}//package
Section 577
//VisitorKutungan (VisitorKutungan)
package {
import Instance.*;
public dynamic class VisitorKutungan extends VisitorNormal {
}
}//package
Section 578
//VisitorLadyGogo (VisitorLadyGogo)
package {
import Instance.*;
public dynamic class VisitorLadyGogo extends VisitorSpecial {
}
}//package
Section 579
//VisitorMeleeCyrus (VisitorMeleeCyrus)
package {
import Instance.*;
public dynamic class VisitorMeleeCyrus extends VisitorSpecial {
}
}//package
Section 580
//VisitorMrPeanut (VisitorMrPeanut)
package {
import Instance.*;
public dynamic class VisitorMrPeanut extends VisitorSpecial {
}
}//package
Section 581
//VisitorNegroFemale (VisitorNegroFemale)
package {
import Instance.*;
public dynamic class VisitorNegroFemale extends VisitorNormal {
}
}//package
Section 582
//VisitorNegroMale (VisitorNegroMale)
package {
import Instance.*;
public dynamic class VisitorNegroMale extends VisitorNormal {
}
}//package
Section 583
//VisitorNerd (VisitorNerd)
package {
import Instance.*;
public dynamic class VisitorNerd extends VisitorNormal {
}
}//package
Section 584
//VisitorPunk (VisitorPunk)
package {
import Instance.*;
public dynamic class VisitorPunk extends VisitorNormal {
}
}//package
Section 585
//VisitorPunkVillain (VisitorPunkVillain)
package {
import Instance.*;
public dynamic class VisitorPunkVillain extends VillainVisitor {
}
}//package
Section 586
//VisitorReggae (VisitorReggae)
package {
import Instance.*;
public dynamic class VisitorReggae extends VisitorNormal {
}
}//package
Section 587
//VisitorSteveWork (VisitorSteveWork)
package {
import Instance.*;
public dynamic class VisitorSteveWork extends VisitorSpecial {
}
}//package
Section 588
//VisitorTeenGirl (VisitorTeenGirl)
package {
import Instance.*;
public dynamic class VisitorTeenGirl extends VisitorNormal {
}
}//package
Section 589
//VisitorWenart (VisitorWenart)
package {
import Instance.*;
public dynamic class VisitorWenart extends VisitorNormal {
}
}//package
Section 590
//VisitorWenartVillain (VisitorWenartVillain)
package {
import Instance.*;
public dynamic class VisitorWenartVillain extends VillainVisitor {
}
}//package
Section 591
//WorldMapDubaiLandmark (WorldMapDubaiLandmark)
package {
import flash.display.*;
public dynamic class WorldMapDubaiLandmark extends MovieClip {
}
}//package
Section 592
//WorldMapIndiaLandmark (WorldMapIndiaLandmark)
package {
import flash.display.*;
public dynamic class WorldMapIndiaLandmark extends MovieClip {
}
}//package
Section 593
//WorldMapItalyLandmark (WorldMapItalyLandmark)
package {
import flash.display.*;
public dynamic class WorldMapItalyLandmark extends MovieClip {
}
}//package
Section 594
//WorldMapLondonLandmark (WorldMapLondonLandmark)
package {
import flash.display.*;
public dynamic class WorldMapLondonLandmark extends MovieClip {
public var clock:Landmark_Clock;
}
}//package
Section 595
//WorldMapRusiaLandmark (WorldMapRusiaLandmark)
package {
import flash.display.*;
public dynamic class WorldMapRusiaLandmark extends MovieClip {
}
}//package