Section 1
//PropTween (com.greensock.core.PropTween)
package com.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 com.greensock.core
Section 2
//SimpleTimeline (com.greensock.core.SimpleTimeline)
package com.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 com.greensock.core
Section 3
//TweenCore (com.greensock.core.TweenCore)
package com.greensock.core {
import com.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 com.greensock.core
Section 4
//Back (com.greensock.easing.Back)
package com.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 com.greensock.easing
Section 5
//Bounce (com.greensock.easing.Bounce)
package com.greensock.easing {
public class Bounce {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
if (_arg1 < (1 / 2.75)){
return (((_arg3 * ((7.5625 * _arg1) * _arg1)) + _arg2));
};
if (_arg1 < (2 / 2.75)){
_arg1 = (_arg1 - (1.5 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.75)) + _arg2));
};
if (_arg1 < (2.5 / 2.75)){
_arg1 = (_arg1 - (2.25 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.9375)) + _arg2));
};
_arg1 = (_arg1 - (2.625 / 2.75));
return (((_arg3 * (((7.5625 * _arg1) * _arg1) + 0.984375)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg3 - easeOut((_arg4 - _arg1), 0, _arg3, _arg4)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 < (_arg4 * 0.5)){
return (((easeIn((_arg1 * 2), 0, _arg3, _arg4) * 0.5) + _arg2));
};
return ((((easeOut(((_arg1 * 2) - _arg4), 0, _arg3, _arg4) * 0.5) + (_arg3 * 0.5)) + _arg2));
}
}
}//package com.greensock.easing
Section 6
//Cubic (com.greensock.easing.Cubic)
package com.greensock.easing {
public class Cubic {
public static const power:uint = 2;
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _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) + 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) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 * 0.5) * (((_arg1 * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 7
//Elastic (com.greensock.easing.Elastic)
package com.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 com.greensock.easing
Section 8
//Linear (com.greensock.easing.Linear)
package com.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 com.greensock.easing
Section 9
//TweenEvent (com.greensock.events.TweenEvent)
package com.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 com.greensock.events
Section 10
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 11
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 12
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 13
//BezierThroughPlugin (com.greensock.plugins.BezierThroughPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 14
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 15
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 16
//ColorTransformPlugin (com.greensock.plugins.ColorTransformPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.geom.*;
import com.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 com.greensock.plugins
Section 17
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 18
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import com.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 com.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 19
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 20
//FrameLabelPlugin (com.greensock.plugins.FrameLabelPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.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 com.greensock.plugins
Section 21
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.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 com.greensock.plugins
Section 22
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 23
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 24
//RemoveTintPlugin (com.greensock.plugins.RemoveTintPlugin)
package com.greensock.plugins {
public class RemoveTintPlugin extends TintPlugin {
public static const API:Number = 1;
public function RemoveTintPlugin(){
this.propName = "removeTint";
}
}
}//package com.greensock.plugins
Section 25
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.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 com.greensock.plugins
Section 26
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 27
//TintPlugin (com.greensock.plugins.TintPlugin)
package com.greensock.plugins {
import flash.display.*;
import flash.geom.*;
import com.greensock.*;
import com.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 com.greensock.plugins
Section 28
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.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 com.greensock.plugins
Section 29
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 30
//VolumePlugin (com.greensock.plugins.VolumePlugin)
package com.greensock.plugins {
import com.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 com.greensock.plugins
Section 31
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.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 com.greensock
Section 32
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.display.*;
import com.greensock.core.*;
import flash.events.*;
import flash.utils.*;
import com.greensock.plugins.*;
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 com.greensock
Section 33
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.display.*;
import com.greensock.core.*;
import flash.events.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
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 com.greensock
Section 34
//BaseScrollPane (fl.containers.BaseScrollPane)
package fl.containers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.events.*;
public class BaseScrollPane extends UIComponent {
protected var defaultLineScrollSize:Number;// = 4
protected var _maxHorizontalScrollPosition:Number;// = 0
protected var vScrollBar:Boolean;
protected var disabledOverlay:Shape;
protected var hScrollBar:Boolean;
protected var availableWidth:Number;
protected var _verticalPageScrollSize:Number;// = 0
protected var vOffset:Number;// = 0
protected var _verticalScrollBar:ScrollBar;
protected var useFixedHorizontalScrolling:Boolean;// = false
protected var contentWidth:Number;// = 0
protected var contentHeight:Number;// = 0
protected var _horizontalPageScrollSize:Number;// = 0
protected var background:DisplayObject;
protected var _useBitmpScrolling:Boolean;// = false
protected var contentPadding:Number;// = 0
protected var availableHeight:Number;
protected var _horizontalScrollBar:ScrollBar;
protected var contentScrollRect:Rectangle;
protected var _horizontalScrollPolicy:String;
protected var _verticalScrollPolicy:String;
protected static const SCROLL_BAR_STYLES:Object = {upArrowDisabledSkin:"upArrowDisabledSkin", upArrowDownSkin:"upArrowDownSkin", upArrowOverSkin:"upArrowOverSkin", upArrowUpSkin:"upArrowUpSkin", downArrowDisabledSkin:"downArrowDisabledSkin", downArrowDownSkin:"downArrowDownSkin", downArrowOverSkin:"downArrowOverSkin", downArrowUpSkin:"downArrowUpSkin", thumbDisabledSkin:"thumbDisabledSkin", thumbDownSkin:"thumbDownSkin", thumbOverSkin:"thumbOverSkin", thumbUpSkin:"thumbUpSkin", thumbIcon:"thumbIcon", trackDisabledSkin:"trackDisabledSkin", trackDownSkin:"trackDownSkin", trackOverSkin:"trackOverSkin", trackUpSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {repeatDelay:500, repeatInterval:35, skin:"ScrollPane_upSkin", contentPadding:0, disabledAlpha:0.5};
public function BaseScrollPane(){
contentWidth = 0;
contentHeight = 0;
contentPadding = 0;
vOffset = 0;
_maxHorizontalScrollPosition = 0;
_horizontalPageScrollSize = 0;
_verticalPageScrollSize = 0;
defaultLineScrollSize = 4;
useFixedHorizontalScrolling = false;
_useBitmpScrolling = false;
super();
}
protected function handleWheel(_arg1:MouseEvent):void{
if (((((!(enabled)) || (!(_verticalScrollBar.visible)))) || ((contentHeight <= availableHeight)))){
return;
};
_verticalScrollBar.scrollPosition = (_verticalScrollBar.scrollPosition - (_arg1.delta * verticalLineScrollSize));
setVerticalScrollPosition(_verticalScrollBar.scrollPosition);
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _arg1.delta, horizontalScrollPosition));
}
public function get verticalScrollPosition():Number{
return (_verticalScrollBar.scrollPosition);
}
protected function drawDisabledOverlay():void{
if (enabled){
if (contains(disabledOverlay)){
removeChild(disabledOverlay);
};
} else {
disabledOverlay.x = (disabledOverlay.y = contentPadding);
disabledOverlay.width = availableWidth;
disabledOverlay.height = availableHeight;
disabledOverlay.alpha = (getStyleValue("disabledAlpha") as Number);
addChild(disabledOverlay);
};
}
public function set verticalScrollPosition(_arg1:Number):void{
drawNow();
_verticalScrollBar.scrollPosition = _arg1;
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
}
protected function setContentSize(_arg1:Number, _arg2:Number):void{
if ((((((contentWidth == _arg1)) || (useFixedHorizontalScrolling))) && ((contentHeight == _arg2)))){
return;
};
contentWidth = _arg1;
contentHeight = _arg2;
invalidate(InvalidationType.SIZE);
}
public function get horizontalScrollPosition():Number{
return (_horizontalScrollBar.scrollPosition);
}
public function get horizontalScrollBar():ScrollBar{
return (_horizontalScrollBar);
}
override public function set enabled(_arg1:Boolean):void{
if (enabled == _arg1){
return;
};
_verticalScrollBar.enabled = _arg1;
_horizontalScrollBar.enabled = _arg1;
super.enabled = _arg1;
}
public function get verticalLineScrollSize():Number{
return (_verticalScrollBar.lineScrollSize);
}
public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
protected function calculateAvailableSize():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = ScrollBar.WIDTH;
_local2 = (contentPadding = Number(getStyleValue("contentPadding")));
_local3 = ((height - (2 * _local2)) - vOffset);
vScrollBar = (((_verticalScrollPolicy == ScrollPolicy.ON)) || ((((_verticalScrollPolicy == ScrollPolicy.AUTO)) && ((contentHeight > _local3)))));
_local4 = ((width - (vScrollBar) ? _local1 : 0) - (2 * _local2));
_local5 = (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - _local4);
hScrollBar = (((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_local5 > 0)))));
if (hScrollBar){
_local3 = (_local3 - _local1);
};
if (((((((hScrollBar) && (!(vScrollBar)))) && ((_verticalScrollPolicy == ScrollPolicy.AUTO)))) && ((contentHeight > _local3)))){
vScrollBar = true;
_local4 = (_local4 - _local1);
};
availableHeight = (_local3 + vOffset);
availableWidth = _local4;
}
public function get maxVerticalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentHeight - availableHeight)));
}
public function set horizontalScrollPosition(_arg1:Number):void{
drawNow();
_horizontalScrollBar.scrollPosition = _arg1;
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
}
public function get horizontalLineScrollSize():Number{
return (_horizontalScrollBar.lineScrollSize);
}
public function set verticalPageScrollSize(_arg1:Number):void{
_verticalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
public function get verticalScrollPolicy():String{
return (_verticalScrollPolicy);
}
protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function get useBitmapScrolling():Boolean{
return (_useBitmpScrolling);
}
protected function handleScroll(_arg1:ScrollEvent):void{
if (_arg1.target == _verticalScrollBar){
setVerticalScrollPosition(_arg1.position);
} else {
setHorizontalScrollPosition(_arg1.position);
};
}
public function set verticalLineScrollSize(_arg1:Number):void{
_verticalScrollBar.lineScrollSize = _arg1;
}
public function get verticalScrollBar():ScrollBar{
return (_verticalScrollBar);
}
protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
}
public function set horizontalPageScrollSize(_arg1:Number):void{
_horizontalPageScrollSize = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STATE)){
drawLayout();
};
updateChildren();
super.draw();
}
public function set horizontalScrollPolicy(_arg1:String):void{
_horizontalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function configUI():void{
var _local1:Graphics;
super.configUI();
contentScrollRect = new Rectangle(0, 0, 85, 85);
_verticalScrollBar = new ScrollBar();
_verticalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_verticalScrollBar.visible = false;
_verticalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_verticalScrollBar);
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
_horizontalScrollBar = new ScrollBar();
_horizontalScrollBar.direction = ScrollBarDirection.HORIZONTAL;
_horizontalScrollBar.addEventListener(ScrollEvent.SCROLL, handleScroll, false, 0, true);
_horizontalScrollBar.visible = false;
_horizontalScrollBar.lineScrollSize = defaultLineScrollSize;
addChild(_horizontalScrollBar);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
disabledOverlay = new Shape();
_local1 = disabledOverlay.graphics;
_local1.beginFill(0xFFFFFF);
_local1.drawRect(0, 0, width, height);
_local1.endFill();
addEventListener(MouseEvent.MOUSE_WHEEL, handleWheel, false, 0, true);
}
protected function calculateContentWidth():void{
}
public function get verticalPageScrollSize():Number{
if (isNaN(availableHeight)){
drawNow();
};
return (((((_verticalPageScrollSize == 0)) && (!(isNaN(availableHeight))))) ? availableHeight : _verticalPageScrollSize);
}
protected function drawLayout():void{
calculateAvailableSize();
calculateContentWidth();
background.width = width;
background.height = height;
if (vScrollBar){
_verticalScrollBar.visible = true;
_verticalScrollBar.x = ((width - ScrollBar.WIDTH) - contentPadding);
_verticalScrollBar.y = contentPadding;
_verticalScrollBar.height = availableHeight;
} else {
_verticalScrollBar.visible = false;
};
_verticalScrollBar.setScrollProperties(availableHeight, 0, (contentHeight - availableHeight), verticalPageScrollSize);
setVerticalScrollPosition(_verticalScrollBar.scrollPosition, false);
if (hScrollBar){
_horizontalScrollBar.visible = true;
_horizontalScrollBar.x = contentPadding;
_horizontalScrollBar.y = ((height - ScrollBar.WIDTH) - contentPadding);
_horizontalScrollBar.width = availableWidth;
} else {
_horizontalScrollBar.visible = false;
};
_horizontalScrollBar.setScrollProperties(availableWidth, 0, (useFixedHorizontalScrolling) ? _maxHorizontalScrollPosition : (contentWidth - availableWidth), horizontalPageScrollSize);
setHorizontalScrollPosition(_horizontalScrollBar.scrollPosition, false);
drawDisabledOverlay();
}
protected function drawBackground():void{
var _local1:DisplayObject;
_local1 = background;
background = getDisplayObjectInstance(getStyleValue("skin"));
background.width = width;
background.height = height;
addChildAt(background, 0);
if (((!((_local1 == null))) && (!((_local1 == background))))){
removeChild(_local1);
};
}
public function set horizontalLineScrollSize(_arg1:Number):void{
_horizontalScrollBar.lineScrollSize = _arg1;
}
public function get horizontalPageScrollSize():Number{
if (isNaN(availableWidth)){
drawNow();
};
return (((((_horizontalPageScrollSize == 0)) && (!(isNaN(availableWidth))))) ? availableWidth : _horizontalPageScrollSize);
}
public function get maxHorizontalScrollPosition():Number{
drawNow();
return (Math.max(0, (contentWidth - availableWidth)));
}
protected function setStyles():void{
copyStylesToChild(_verticalScrollBar, SCROLL_BAR_STYLES);
copyStylesToChild(_horizontalScrollBar, SCROLL_BAR_STYLES);
}
protected function updateChildren():void{
_verticalScrollBar.enabled = (_horizontalScrollBar.enabled = enabled);
_verticalScrollBar.drawNow();
_horizontalScrollBar.drawNow();
}
public function set verticalScrollPolicy(_arg1:String):void{
_verticalScrollPolicy = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set useBitmapScrolling(_arg1:Boolean):void{
_useBitmpScrolling = _arg1;
invalidate(InvalidationType.STATE);
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, ScrollBar.getStyleDefinition()));
}
}
}//package fl.containers
Section 35
//DataGridCellEditor (fl.controls.dataGridClasses.DataGridCellEditor)
package fl.controls.dataGridClasses {
import fl.controls.listClasses.*;
import fl.controls.*;
public class DataGridCellEditor extends TextInput implements ICellRenderer {
protected var _data:Object;
protected var _listData:ListData;
private static var defaultStyles:Object = {textPadding:1, textFormat:null, upSkin:"DataGridCellEditor_skin"};
public function DataGridCellEditor():void{
}
public function get selected():Boolean{
return (false);
}
public function set listData(_arg1:ListData):void{
_listData = _arg1;
text = _listData.label;
}
public function setMouseState(_arg1:String):void{
}
public function set selected(_arg1:Boolean):void{
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get listData():ListData{
return (_listData);
}
public function get data():Object{
return (_data);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.dataGridClasses
Section 36
//DataGridColumn (fl.controls.dataGridClasses.DataGridColumn)
package fl.controls.dataGridClasses {
import fl.core.*;
import fl.controls.*;
public class DataGridColumn {
private var _headerText:String;
public var editorDataField:String;// = "text"
private var forceImport:DataGridCellEditor;
private var _headerRenderer:Object;
public var sortOptions:uint;// = 0
private var _cellRenderer:Object;
private var _columnName:String;
public var resizable:Boolean;// = true
private var _sortCompareFunction:Function;
private var _visible:Boolean;// = true
public var sortDescending:Boolean;// = false
public var owner:DataGrid;
private var _imeMode:String;
private var _width:Number;// = 100
public var editable:Boolean;// = true
public var itemEditor:Object;// = "fl.controls.dataGridClasses.DataGridCellEditor"
public var explicitWidth:Number;
private var _minWidth:Number;// = 20
private var _labelFunction:Function;
public var sortable:Boolean;// = true
public var colNum:Number;
public var dataField:String;
public function DataGridColumn(_arg1:String=null){
_minWidth = 20;
_width = 100;
_visible = true;
sortable = true;
resizable = true;
editable = true;
itemEditor = "fl.controls.dataGridClasses.DataGridCellEditor";
editorDataField = "text";
sortDescending = false;
sortOptions = 0;
super();
if (_arg1){
dataField = _arg1;
headerText = _arg1;
};
}
public function set headerRenderer(_arg1:Object):void{
_headerRenderer = _arg1;
if (owner){
owner.invalidate(InvalidationType.DATA);
};
}
public function get imeMode():String{
return (_imeMode);
}
public function setWidth(_arg1:Number):void{
_width = _arg1;
}
public function set width(_arg1:Number):void{
var _local2:Boolean;
explicitWidth = _arg1;
if (owner != null){
_local2 = resizable;
resizable = false;
owner.resizeColumn(colNum, _arg1);
resizable = _local2;
} else {
_width = _arg1;
};
}
public function set cellRenderer(_arg1:Object):void{
_cellRenderer = _arg1;
if (owner){
owner.invalidate(InvalidationType.DATA);
};
}
public function get minWidth():Number{
return (_minWidth);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
public function toString():String{
return ("[object DataGridColumn]");
}
public function get visible():Boolean{
return (_visible);
}
public function itemToLabel(_arg1:Object):String{
var data = _arg1;
if (!data){
return (" ");
};
if (labelFunction != null){
return (labelFunction(data));
};
if (owner.labelFunction != null){
return (owner.labelFunction(data, this));
};
if ((((typeof(data) == "object")) || ((typeof(data) == "xml")))){
try {
data = data[dataField];
} catch(e:Error) {
data = null;
};
};
if ((data is String)){
return (String(data));
};
try {
return (data.toString());
} catch(e:Error) {
};
return (" ");
}
public function set minWidth(_arg1:Number):void{
_minWidth = _arg1;
if (_width < _arg1){
_width = _arg1;
};
if (owner){
owner.invalidate(InvalidationType.SIZE);
};
}
public function set headerText(_arg1:String):void{
_headerText = _arg1;
if (owner){
owner.invalidate(InvalidationType.DATA);
};
}
public function set sortCompareFunction(_arg1:Function):void{
_sortCompareFunction = _arg1;
}
public function get width():Number{
return (_width);
}
public function get cellRenderer():Object{
return (_cellRenderer);
}
public function set labelFunction(_arg1:Function):void{
if (_labelFunction == _arg1){
return;
};
_labelFunction = _arg1;
if (owner){
owner.invalidate(InvalidationType.DATA);
};
}
public function get headerText():String{
return (((_headerText)!=null) ? _headerText : dataField);
}
public function get sortCompareFunction():Function{
return (_sortCompareFunction);
}
public function get headerRenderer():Object{
return (_headerRenderer);
}
public function get labelFunction():Function{
return (_labelFunction);
}
public function set visible(_arg1:Boolean):void{
if (_visible != _arg1){
_visible = _arg1;
if (owner){
owner.invalidate(InvalidationType.SIZE);
};
};
}
}
}//package fl.controls.dataGridClasses
Section 37
//HeaderRenderer (fl.controls.dataGridClasses.HeaderRenderer)
package fl.controls.dataGridClasses {
import fl.controls.*;
public class HeaderRenderer extends LabelButton {
public var _column:uint;
private static var defaultStyles:Object = {upSkin:"HeaderRenderer_upSkin", downSkin:"HeaderRenderer_downSkin", overSkin:"HeaderRenderer_overSkin", disabledSkin:"HeaderRenderer_disabledSkin", selectedDisabledSkin:"HeaderRenderer_selectedDisabledSkin", selectedUpSkin:"HeaderRenderer_selectedUpSkin", selectedDownSkin:"HeaderRenderer_selectedDownSkin", selectedOverSkin:"HeaderRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, textPadding:5};
public function HeaderRenderer():void{
focusEnabled = false;
}
public function set column(_arg1:uint):void{
_column = _arg1;
}
public function get column():uint{
return (_column);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local1 = Number(getStyleValue("textPadding"));
textField.height = (textField.textHeight + 4);
textField.visible = (label.length > 0);
_local2 = (textField.textWidth + 4);
_local3 = (textField.textHeight + 4);
_local4 = ((icon)==null) ? 0 : (icon.width + 4);
_local5 = Math.max(0, Math.min(_local2, ((width - (2 * _local1)) - _local4)));
if (icon != null){
icon.x = (((width - _local1) - icon.width) - 2);
icon.y = Math.round(((height - icon.height) / 2));
};
textField.width = _local5;
textField.x = _local1;
textField.y = Math.round(((height - textField.height) / 2));
background.width = width;
background.height = height;
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.dataGridClasses
Section 38
//CellRenderer (fl.controls.listClasses.CellRenderer)
package fl.controls.listClasses {
import fl.controls.*;
import flash.events.*;
public class CellRenderer extends LabelButton implements ICellRenderer {
protected var _data:Object;
protected var _listData:ListData;
private static var defaultStyles:Object = {upSkin:"CellRenderer_upSkin", downSkin:"CellRenderer_downSkin", overSkin:"CellRenderer_overSkin", disabledSkin:"CellRenderer_disabledSkin", selectedDisabledSkin:"CellRenderer_selectedDisabledSkin", selectedUpSkin:"CellRenderer_selectedUpSkin", selectedDownSkin:"CellRenderer_selectedDownSkin", selectedOverSkin:"CellRenderer_selectedOverSkin", textFormat:null, disabledTextFormat:null, embedFonts:null, textPadding:5};
public function CellRenderer():void{
toggle = true;
focusEnabled = false;
}
override protected function toggleSelected(_arg1:MouseEvent):void{
}
override public function get selected():Boolean{
return (super.selected);
}
public function set listData(_arg1:ListData):void{
_listData = _arg1;
label = _listData.label;
setStyle("icon", _listData.icon);
}
override public function set selected(_arg1:Boolean):void{
super.selected = _arg1;
}
public function set data(_arg1:Object):void{
_data = _arg1;
}
public function get listData():ListData{
return (_listData);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
super.setSize(_arg1, _arg2);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = 0;
if (icon != null){
icon.x = _local1;
icon.y = Math.round(((height - icon.height) >> 1));
_local2 = (icon.width + _local1);
};
if (label.length > 0){
textField.visible = true;
_local3 = Math.max(0, ((width - _local2) - (_local1 * 2)));
textField.width = _local3;
textField.height = (textField.textHeight + 4);
textField.x = (_local2 + _local1);
textField.y = Math.round(((height - textField.height) >> 1));
} else {
textField.visible = false;
};
background.width = width;
background.height = height;
}
public function get data():Object{
return (_data);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.listClasses
Section 39
//ICellRenderer (fl.controls.listClasses.ICellRenderer)
package fl.controls.listClasses {
public interface ICellRenderer {
function setSize(_arg1:Number, _arg2:Number):void;
function get listData():ListData;
function get data():Object;
function setMouseState(_arg1:String):void;
function set x(_arg1:Number):void;
function set y(_arg1:Number):void;
function set data(_arg1:Object):void;
function set selected(_arg1:Boolean):void;
function set listData(_arg1:ListData):void;
function get selected():Boolean;
}
}//package fl.controls.listClasses
Section 40
//ListData (fl.controls.listClasses.ListData)
package fl.controls.listClasses {
import fl.core.*;
public class ListData {
protected var _index:uint;
protected var _owner:UIComponent;
protected var _label:String;
protected var _icon:Object;// = null
protected var _row:uint;
protected var _column:uint;
public function ListData(_arg1:String, _arg2:Object, _arg3:UIComponent, _arg4:uint, _arg5:uint, _arg6:uint=0){
_icon = null;
super();
_label = _arg1;
_icon = _arg2;
_owner = _arg3;
_index = _arg4;
_row = _arg5;
_column = _arg6;
}
public function get owner():UIComponent{
return (_owner);
}
public function get label():String{
return (_label);
}
public function get row():uint{
return (_row);
}
public function get index():uint{
return (_index);
}
public function get icon():Object{
return (_icon);
}
public function get column():uint{
return (_column);
}
}
}//package fl.controls.listClasses
Section 41
//IndeterminateBar (fl.controls.progressBarClasses.IndeterminateBar)
package fl.controls.progressBarClasses {
import fl.core.*;
import flash.display.*;
import flash.events.*;
public class IndeterminateBar extends UIComponent {
protected var bar:Sprite;
protected var barMask:Sprite;
protected var patternBmp:BitmapData;
protected var animationCount:uint;// = 0
private static var defaultStyles:Object = {indeterminateSkin:"ProgressBar_indeterminateSkin"};
public function IndeterminateBar(){
animationCount = 0;
super();
setSize(0, 0);
startAnimation();
}
protected function drawBar():void{
var _local1:Graphics;
if (patternBmp == null){
return;
};
_local1 = bar.graphics;
_local1.clear();
_local1.beginBitmapFill(patternBmp);
_local1.drawRect(0, 0, (_width + patternBmp.width), _height);
_local1.endFill();
}
protected function drawMask():void{
var _local1:Graphics;
_local1 = barMask.graphics;
_local1.clear();
_local1.beginFill(0, 0);
_local1.drawRect(0, 0, _width, _height);
_local1.endFill();
}
override public function get visible():Boolean{
return (super.visible);
}
override public function set visible(_arg1:Boolean):void{
if (_arg1){
startAnimation();
} else {
stopAnimation();
};
super.visible = _arg1;
}
protected function startAnimation():void{
addEventListener(Event.ENTER_FRAME, handleEnterFrame, false, 0, true);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawPattern();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawBar();
drawMask();
};
super.draw();
}
override protected function configUI():void{
bar = new Sprite();
addChild(bar);
barMask = new Sprite();
addChild(barMask);
bar.mask = barMask;
}
protected function stopAnimation():void{
removeEventListener(Event.ENTER_FRAME, handleEnterFrame);
}
protected function drawPattern():void{
var _local1:DisplayObject;
_local1 = getDisplayObjectInstance(getStyleValue("indeterminateSkin"));
if (patternBmp){
patternBmp.dispose();
};
patternBmp = new BitmapData((_local1.width << 0), (_local1.height << 0), true, 0);
patternBmp.draw(_local1);
}
protected function handleEnterFrame(_arg1:Event):void{
if (patternBmp == null){
return;
};
animationCount = ((animationCount + 2) % patternBmp.width);
bar.x = -(animationCount);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls.progressBarClasses
Section 42
//BaseButton (fl.controls.BaseButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.events.*;
import flash.utils.*;
public class BaseButton extends UIComponent {
protected var _selected:Boolean;// = false
private var unlockedMouseState:String;
protected var pressTimer:Timer;
protected var mouseState:String;
protected var background:DisplayObject;
private var _mouseStateLocked:Boolean;// = false
protected var _autoRepeat:Boolean;// = false
private static var defaultStyles:Object = {upSkin:"Button_upSkin", downSkin:"Button_downSkin", overSkin:"Button_overSkin", disabledSkin:"Button_disabledSkin", selectedDisabledSkin:"Button_selectedDisabledSkin", selectedUpSkin:"Button_selectedUpSkin", selectedDownSkin:"Button_selectedDownSkin", selectedOverSkin:"Button_selectedOverSkin", focusRectSkin:null, focusRectPadding:null, repeatDelay:500, repeatInterval:35};
public function BaseButton(){
_selected = false;
_autoRepeat = false;
_mouseStateLocked = false;
super();
buttonMode = true;
mouseChildren = false;
useHandCursor = false;
setupMouseEvents();
setMouseState("up");
pressTimer = new Timer(1, 0);
pressTimer.addEventListener(TimerEvent.TIMER, buttonDown, false, 0, true);
}
protected function endPress():void{
pressTimer.reset();
}
public function set mouseStateLocked(_arg1:Boolean):void{
_mouseStateLocked = _arg1;
if (_arg1 == false){
setMouseState(unlockedMouseState);
} else {
unlockedMouseState = mouseState;
};
}
public function get autoRepeat():Boolean{
return (_autoRepeat);
}
public function set autoRepeat(_arg1:Boolean):void{
_autoRepeat = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
mouseEnabled = _arg1;
}
public function get selected():Boolean{
return (_selected);
}
protected function mouseEventHandler(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.MOUSE_DOWN){
setMouseState("down");
startPress();
} else {
if ((((_arg1.type == MouseEvent.ROLL_OVER)) || ((_arg1.type == MouseEvent.MOUSE_UP)))){
setMouseState("over");
endPress();
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
setMouseState("up");
endPress();
};
};
};
}
public function setMouseState(_arg1:String):void{
if (_mouseStateLocked){
unlockedMouseState = _arg1;
return;
};
if (mouseState == _arg1){
return;
};
mouseState = _arg1;
invalidate(InvalidationType.STATE);
}
protected function startPress():void{
if (_autoRepeat){
pressTimer.delay = Number(getStyleValue("repeatDelay"));
pressTimer.start();
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
protected function buttonDown(_arg1:TimerEvent):void{
if (!_autoRepeat){
endPress();
return;
};
if (pressTimer.currentCount == 1){
pressTimer.delay = Number(getStyleValue("repeatInterval"));
};
dispatchEvent(new ComponentEvent(ComponentEvent.BUTTON_DOWN, true));
}
public function set selected(_arg1:Boolean):void{
if (_selected == _arg1){
return;
};
_selected = _arg1;
invalidate(InvalidationType.STATE);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function setupMouseEvents():void{
addEventListener(MouseEvent.ROLL_OVER, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_DOWN, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.MOUSE_UP, mouseEventHandler, false, 0, true);
addEventListener(MouseEvent.ROLL_OUT, mouseEventHandler, false, 0, true);
}
protected function drawLayout():void{
background.width = width;
background.height = height;
}
protected function drawBackground():void{
var _local1:String;
var _local2:DisplayObject;
_local1 = (enabled) ? mouseState : "disabled";
if (selected){
_local1 = (("selected" + _local1.substr(0, 1).toUpperCase()) + _local1.substr(1));
};
_local1 = (_local1 + "Skin");
_local2 = background;
background = getDisplayObjectInstance(getStyleValue(_local1));
addChildAt(background, 0);
if (((!((_local2 == null))) && (!((_local2 == background))))){
removeChild(_local2);
};
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 43
//Button (fl.controls.Button)
package fl.controls {
import fl.core.*;
import flash.display.*;
import fl.managers.*;
public class Button extends LabelButton implements IFocusManagerComponent {
protected var emphasizedBorder:DisplayObject;
protected var _emphasized:Boolean;// = false
private static var defaultStyles:Object = {emphasizedSkin:"Button_emphasizedSkin", emphasizedPadding:2};
public static var createAccessibilityImplementation:Function;
public function Button(){
_emphasized = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
var _local3:*;
super.drawFocus(_arg1);
if (_arg1){
_local2 = Number(getStyleValue("emphasizedPadding"));
if ((((_local2 < 0)) || (!(_emphasized)))){
_local2 = 0;
};
_local3 = getStyleValue("focusRectPadding");
_local3 = ((_local3)==null) ? 2 : _local3;
_local3 = (_local3 + _local2);
uiFocusRect.x = -(_local3);
uiFocusRect.y = -(_local3);
uiFocusRect.width = (width + (_local3 * 2));
uiFocusRect.height = (height + (_local3 * 2));
};
}
public function set emphasized(_arg1:Boolean):void{
_emphasized = _arg1;
invalidate(InvalidationType.STYLES);
}
override protected function draw():void{
if (((isInvalid(InvalidationType.STYLES)) || (isInvalid(InvalidationType.SIZE)))){
drawEmphasized();
};
super.draw();
if (emphasizedBorder != null){
setChildIndex(emphasizedBorder, (numChildren - 1));
};
}
public function get emphasized():Boolean{
return (_emphasized);
}
override protected function initializeAccessibility():void{
if (Button.createAccessibilityImplementation != null){
Button.createAccessibilityImplementation(this);
};
}
protected function drawEmphasized():void{
var _local1:Object;
var _local2:Number;
if (emphasizedBorder != null){
removeChild(emphasizedBorder);
};
emphasizedBorder = null;
if (!_emphasized){
return;
};
_local1 = getStyleValue("emphasizedSkin");
if (_local1 != null){
emphasizedBorder = getDisplayObjectInstance(_local1);
};
if (emphasizedBorder != null){
addChildAt(emphasizedBorder, 0);
_local2 = Number(getStyleValue("emphasizedPadding"));
emphasizedBorder.x = (emphasizedBorder.y = -(_local2));
emphasizedBorder.width = (width + (_local2 * 2));
emphasizedBorder.height = (height + (_local2 * 2));
};
}
public static function getStyleDefinition():Object{
return (UIComponent.mergeStyles(LabelButton.getStyleDefinition(), defaultStyles));
}
}
}//package fl.controls
Section 44
//ButtonLabelPlacement (fl.controls.ButtonLabelPlacement)
package fl.controls {
public class ButtonLabelPlacement {
public static const TOP:String = "top";
public static const LEFT:String = "left";
public static const BOTTOM:String = "bottom";
public static const RIGHT:String = "right";
}
}//package fl.controls
Section 45
//DataGrid (fl.controls.DataGrid)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import fl.controls.dataGridClasses.*;
import flash.utils.*;
import flash.ui.*;
public class DataGrid extends SelectableList implements IFocusManagerComponent {
protected var _showHeaders:Boolean;// = true
protected var _sortIndex:int;// = -1
protected var _minColumnWidth:Number;
protected var _headerRenderer:Object;
public var sortableColumns:Boolean;// = true
protected var activeCellRenderersMap:Dictionary;
protected var _labelFunction:Function;
protected var headerSortArrow:Sprite;
protected var _sortDescending:Boolean;// = false
protected var losingFocus:Boolean;// = false
protected var maxHeaderHeight:Number;// = 25
protected var minColumnWidthInvalid:Boolean;// = false
protected var _rowHeight:Number;// = 20
protected var _cellRenderer:Object;
protected var proposedEditedItemPosition;
public var editable:Boolean;// = false
protected var dragHandlesMap:Dictionary;
protected var header:Sprite;
protected var availableCellRenderersMap:Dictionary;
protected var _columns:Array;
public var resizableColumns:Boolean;// = true
protected var columnStretchStartWidth:Number;
protected var actualRowIndex:int;
protected var _editedItemPosition:Object;
protected var editedItemPositionChanged:Boolean;// = false
protected var actualColIndex:int;
protected var columnStretchCursor:Sprite;
protected var visibleColumns:Array;
protected var headerMask:Sprite;
public var itemEditorInstance:Object;
protected var displayableColumns:Array;
protected var columnStretchIndex:Number;// = -1
protected var columnsInvalid:Boolean;// = true
protected var currentHoveredRow:int;// = -1
protected var isPressed:Boolean;// = false
protected var lastSortIndex:int;// = -1
protected var columnStretchStartX:Number;
protected var _headerHeight:Number;// = 25
protected static const HEADER_STYLES:Object = {disabledSkin:"headerDisabledSkin", downSkin:"headerDownSkin", overSkin:"headerOverSkin", upSkin:"headerUpSkin", textFormat:"headerTextFormat", disabledTextFormat:"headerDisabledTextFormat", textPadding:"headerTextPadding"};
private static var defaultStyles:Object = {headerUpSkin:"HeaderRenderer_upSkin", headerDownSkin:"HeaderRenderer_downSkin", headerOverSkin:"HeaderRenderer_overSkin", headerDisabledSkin:"HeaderRenderer_disabledSkin", headerSortArrowDescSkin:"HeaderSortArrow_descIcon", headerSortArrowAscSkin:"HeaderSortArrow_ascIcon", columnStretchCursorSkin:"ColumnStretch_cursor", columnDividerSkin:null, headerTextFormat:null, headerDisabledTextFormat:null, headerTextPadding:5, headerRenderer:HeaderRenderer, focusRectSkin:null, focusRectPadding:null, skin:"DataGrid_skin"};
public static var createAccessibilityImplementation:Function;
public function DataGrid(){
_rowHeight = 20;
_headerHeight = 25;
_showHeaders = true;
columnsInvalid = true;
minColumnWidthInvalid = false;
columnStretchIndex = -1;
_sortIndex = -1;
lastSortIndex = -1;
_sortDescending = false;
editedItemPositionChanged = false;
isPressed = false;
losingFocus = false;
maxHeaderHeight = 25;
currentHoveredRow = -1;
editable = false;
resizableColumns = true;
sortableColumns = true;
super();
if (_columns == null){
_columns = [];
};
_horizontalScrollPolicy = ScrollPolicy.OFF;
activeCellRenderersMap = new Dictionary(true);
availableCellRenderersMap = new Dictionary(true);
addEventListener(DataGridEvent.ITEM_EDIT_BEGINNING, itemEditorItemEditBeginningHandler, false, -50);
addEventListener(DataGridEvent.ITEM_EDIT_BEGIN, itemEditorItemEditBeginHandler, false, -50);
addEventListener(DataGridEvent.ITEM_EDIT_END, itemEditorItemEditEndHandler, false, -50);
addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
}
override protected function drawList():void{
var _local1:uint;
var _local2:uint;
var _local3:Number;
var _local4:Number;
var _local5:uint;
var _local6:Object;
var _local7:ICellRenderer;
var _local8:Array;
var _local9:DataGridColumn;
var _local10:Boolean;
var _local11:Dictionary;
var _local12:DataGridColumn;
var _local13:Sprite;
var _local14:UIComponent;
var _local15:Array;
var _local16:uint;
var _local17:uint;
var _local18:Number;
var _local19:DataGridColumn;
var _local20:Object;
var _local21:Array;
var _local22:Dictionary;
var _local23:Object;
var _local24:HeaderRenderer;
var _local25:Sprite;
var _local26:Graphics;
var _local27:Boolean;
var _local28:String;
if (showHeaders){
header.visible = true;
header.x = (contentPadding - _horizontalScrollPosition);
header.y = contentPadding;
listHolder.y = (contentPadding + headerHeight);
_local18 = Math.floor((availableHeight - headerHeight));
_verticalScrollBar.setScrollProperties(_local18, 0, (contentHeight - _local18), _verticalScrollBar.pageScrollSize);
} else {
header.visible = false;
listHolder.y = contentPadding;
};
listHolder.x = contentPadding;
contentScrollRect = listHolder.scrollRect;
contentScrollRect.x = _horizontalScrollPosition;
contentScrollRect.y = (vOffset + (Math.floor(_verticalScrollPosition) % rowHeight));
listHolder.scrollRect = contentScrollRect;
listHolder.cacheAsBitmap = useBitmapScrolling;
_local1 = Math.min(Math.max((length - 1), 0), Math.floor((_verticalScrollPosition / rowHeight)));
_local2 = Math.min(Math.max((length - 1), 0), ((_local1 + rowCount) + 1));
_local10 = list.hitTestPoint(stage.mouseX, stage.mouseY);
calculateColumnSizes();
_local11 = (renderedItems = new Dictionary(true));
if (length > 0){
_local5 = _local1;
while (_local5 <= _local2) {
_local11[_dataProvider.getItemAt(_local5)] = true;
_local5++;
};
};
_local3 = 0;
_local12 = (visibleColumns[0] as DataGridColumn);
_local5 = 0;
while (_local5 < displayableColumns.length) {
_local19 = (displayableColumns[_local5] as DataGridColumn);
if (_local19 != _local12){
_local3 = (_local3 + _local19.width);
} else {
break;
};
_local5++;
};
while (header.numChildren > 0) {
header.removeChildAt(0);
};
dragHandlesMap = new Dictionary(true);
_local15 = [];
_local16 = visibleColumns.length;
_local17 = 0;
while (_local17 < _local16) {
_local9 = (visibleColumns[_local17] as DataGridColumn);
_local15.push(_local9.colNum);
if (showHeaders){
_local23 = ((_local9.headerRenderer)!=null) ? _local9.headerRenderer : _headerRenderer;
_local24 = (getDisplayObjectInstance(_local23) as HeaderRenderer);
if (_local24 != null){
_local24.addEventListener(MouseEvent.CLICK, handleHeaderRendererClick, false, 0, true);
_local24.x = _local3;
_local24.y = 0;
_local24.setSize(_local9.width, headerHeight);
_local24.column = _local9.colNum;
_local24.label = _local9.headerText;
header.addChildAt(_local24, _local17);
copyStylesToChild(_local24, HEADER_STYLES);
if ((((((sortIndex == -1)) && ((lastSortIndex == -1)))) || (!((_local9.colNum == sortIndex))))){
_local24.setStyle("icon", null);
} else {
_local24.setStyle("icon", (sortDescending) ? getStyleValue("headerSortArrowAscSkin") : getStyleValue("headerSortArrowDescSkin"));
};
if ((((((_local17 < (_local16 - 1))) && (resizableColumns))) && (_local9.resizable))){
_local25 = new Sprite();
_local26 = _local25.graphics;
_local26.beginFill(0, 0);
_local26.drawRect(0, 0, 3, headerHeight);
_local26.endFill();
_local25.x = ((_local3 + _local9.width) - 2);
_local25.y = 0;
_local25.alpha = 0;
_local25.addEventListener(MouseEvent.MOUSE_OVER, handleHeaderResizeOver, false, 0, true);
_local25.addEventListener(MouseEvent.MOUSE_OUT, handleHeaderResizeOut, false, 0, true);
_local25.addEventListener(MouseEvent.MOUSE_DOWN, handleHeaderResizeDown, false, 0, true);
header.addChild(_local25);
dragHandlesMap[_local25] = _local9.colNum;
};
if ((((((_local17 == (_local16 - 1))) && ((_horizontalScrollPosition == 0)))) && ((availableWidth > (_local3 + _local9.width))))){
_local4 = Math.floor((availableWidth - _local3));
_local24.setSize(_local4, headerHeight);
} else {
_local4 = _local9.width;
};
_local24.drawNow();
};
};
_local20 = ((_local9.cellRenderer)!=null) ? _local9.cellRenderer : _cellRenderer;
_local21 = availableCellRenderersMap[_local9];
_local8 = activeCellRenderersMap[_local9];
if (_local8 == null){
_local8 = [];
activeCellRenderersMap[_local9] = _local8;
};
if (_local21 == null){
_local21 = [];
availableCellRenderersMap[_local9] = _local21;
};
_local22 = new Dictionary(true);
while (_local8.length > 0) {
_local7 = _local8.pop();
_local6 = _local7.data;
if ((((_local11[_local6] == null)) || ((invalidItems[_local6] == true)))){
_local21.push(_local7);
} else {
_local22[_local6] = _local7;
invalidItems[_local6] = true;
};
list.removeChild((_local7 as DisplayObject));
};
if (length > 0){
_local5 = _local1;
while (_local5 <= _local2) {
_local27 = false;
_local6 = _dataProvider.getItemAt(_local5);
if (_local22[_local6] != null){
_local27 = true;
_local7 = _local22[_local6];
delete _local22[_local6];
} else {
if (_local21.length > 0){
_local7 = (_local21.pop() as ICellRenderer);
} else {
_local7 = (getDisplayObjectInstance(_local20) as ICellRenderer);
_local13 = (_local7 as Sprite);
if (_local13 != null){
_local13.addEventListener(MouseEvent.CLICK, handleCellRendererClick, false, 0, true);
_local13.addEventListener(MouseEvent.ROLL_OVER, handleCellRendererMouseEvent, false, 0, true);
_local13.addEventListener(MouseEvent.ROLL_OUT, handleCellRendererMouseEvent, false, 0, true);
_local13.addEventListener(Event.CHANGE, handleCellRendererChange, false, 0, true);
_local13.doubleClickEnabled = true;
_local13.addEventListener(MouseEvent.DOUBLE_CLICK, handleCellRendererDoubleClick, false, 0, true);
if (_local13["setStyle"] != null){
for (_local28 in rendererStyles) {
var _local31 = _local13;
_local31["setStyle"](_local28, rendererStyles[_local28]);
};
};
};
};
};
list.addChild((_local7 as Sprite));
_local8.push(_local7);
_local7.x = _local3;
_local7.y = (rowHeight * (_local5 - _local1));
_local7.setSize(((_local17)==(_local16 - 1)) ? _local4 : _local9.width, rowHeight);
if (!_local27){
_local7.data = _local6;
};
_local7.listData = new ListData(columnItemToLabel(_local9.colNum, _local6), null, this, _local5, _local5, _local17);
if (((_local10) && (isHovered(_local7)))){
_local7.setMouseState("over");
currentHoveredRow = _local5;
} else {
_local7.setMouseState("up");
};
_local7.selected = !((_selectedIndices.indexOf(_local5) == -1));
if ((_local7 is UIComponent)){
_local14 = (_local7 as UIComponent);
_local14.drawNow();
};
_local5++;
};
};
_local3 = (_local3 + _local9.width);
_local17++;
};
_local5 = 0;
while (_local5 < _columns.length) {
if (_local15.indexOf(_local5) == -1){
removeCellRenderersByColumn((_columns[_local5] as DataGridColumn));
};
_local5++;
};
if (editedItemPositionChanged){
editedItemPositionChanged = false;
commitEditedItemPosition(proposedEditedItemPosition);
proposedEditedItemPosition = undefined;
};
invalidItems = new Dictionary(true);
}
protected function itemEditorItemEditBeginningHandler(_arg1:DataGridEvent):void{
if (!_arg1.isDefaultPrevented()){
setEditedItemPosition({columnIndex:_arg1.columnIndex, rowIndex:uint(_arg1.rowIndex)});
} else {
if (!itemEditorInstance){
_editedItemPosition = null;
editable = false;
setFocus();
editable = true;
};
};
}
protected function itemEditorItemEditEndHandler(_arg1:DataGridEvent):void{
var _local2:Boolean;
var _local3:Object;
var _local4:String;
var _local5:Object;
var _local6:String;
var _local7:XML;
var _local8:IFocusManager;
if (!_arg1.isDefaultPrevented()){
_local2 = false;
if (((itemEditorInstance) && (!((_arg1.reason == DataGridEventReason.CANCELLED))))){
_local3 = itemEditorInstance[_columns[_arg1.columnIndex].editorDataField];
_local4 = _columns[_arg1.columnIndex].dataField;
_local5 = _arg1.itemRenderer.data;
_local6 = "";
for each (_local7 in describeType(_local5).variable) {
if (_local4 == _local7.@name.toString()){
_local6 = _local7.@type.toString();
break;
};
};
switch (_local6){
case "String":
if (!(_local3 is String)){
_local3 = _local3.toString();
};
break;
case "uint":
if (!(_local3 is uint)){
_local3 = uint(_local3);
};
break;
case "int":
if (!(_local3 is int)){
_local3 = int(_local3);
};
break;
case "Number":
if (!(_local3 is Number)){
_local3 = Number(_local3);
};
break;
};
if (_local5[_local4] != _local3){
_local2 = true;
_local5[_local4] = _local3;
};
_arg1.itemRenderer.data = _local5;
};
} else {
if (_arg1.reason != DataGridEventReason.OTHER){
if (((itemEditorInstance) && (_editedItemPosition))){
if (selectedIndex != _editedItemPosition.rowIndex){
selectedIndex = _editedItemPosition.rowIndex;
};
_local8 = focusManager;
if ((itemEditorInstance is IFocusManagerComponent)){
_local8.setFocus(InteractiveObject(itemEditorInstance));
};
};
};
};
if ((((_arg1.reason == DataGridEventReason.OTHER)) || (!(_arg1.isDefaultPrevented())))){
destroyItemEditor();
};
}
public function get editedItemPosition():Object{
if (_editedItemPosition){
return ({rowIndex:_editedItemPosition.rowIndex, columnIndex:_editedItemPosition.columnIndex});
};
return (_editedItemPosition);
}
protected function setEditedItemPosition(_arg1:Object):void{
editedItemPositionChanged = true;
proposedEditedItemPosition = _arg1;
if (((_arg1) && (!((_arg1.rowIndex == selectedIndex))))){
selectedIndex = _arg1.rowIndex;
};
invalidate(InvalidationType.DATA);
}
public function set headerHeight(_arg1:Number):void{
maxHeaderHeight = _arg1;
_headerHeight = Math.max(0, _arg1);
invalidate(InvalidationType.SIZE);
}
protected function handleHeaderResizeDown(_arg1:MouseEvent):void{
var _local2:Sprite;
var _local3:Number;
var _local4:DataGridColumn;
_local2 = (_arg1.currentTarget as Sprite);
_local3 = dragHandlesMap[_local2];
_local4 = getColumnAt(_local3);
columnStretchIndex = _local3;
columnStretchStartX = _arg1.stageX;
columnStretchStartWidth = _local4.width;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleHeaderResizeMove, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, handleHeaderResizeUp, false, 0, true);
}
protected function deactivateHandler(_arg1:Event):void{
if (itemEditorInstance){
endEdit(DataGridEventReason.OTHER);
losingFocus = true;
setFocus();
};
}
protected function keyFocusChangeHandler(_arg1:FocusEvent):void{
if ((((((_arg1.keyCode == Keyboard.TAB)) && (!(_arg1.isDefaultPrevented())))) && (findNextItemRenderer(_arg1.shiftKey)))){
_arg1.preventDefault();
};
}
override protected function handleDataChange(_arg1:DataChangeEvent):void{
super.handleDataChange(_arg1);
if (_columns == null){
_columns = [];
};
if (_columns.length == 0){
createColumnsFromDataProvider();
};
}
public function set editedItemPosition(_arg1:Object):void{
var _local2:Object;
_local2 = {rowIndex:_arg1.rowIndex, columnIndex:_arg1.columnIndex};
setEditedItemPosition(_local2);
}
override public function itemToCellRenderer(_arg1:Object):ICellRenderer{
return (null);
}
public function getCellRendererAt(_arg1:uint, _arg2:uint):ICellRenderer{
var _local3:DataGridColumn;
var _local4:Array;
var _local5:uint;
var _local6:ICellRenderer;
_local3 = (_columns[_arg2] as DataGridColumn);
if (_local3 != null){
_local4 = (activeCellRenderersMap[_local3] as Array);
if (_local4 != null){
_local5 = 0;
while (_local5 < _local4.length) {
_local6 = (_local4[_local5] as ICellRenderer);
if (_local6.listData.row == _arg1){
return (_local6);
};
_local5++;
};
};
};
return (null);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (((!(selectable)) || (itemEditorInstance))){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
break;
case Keyboard.SPACE:
if (caretIndex == -1){
caretIndex = 0;
};
scrollToIndex(caretIndex);
doKeySelection(caretIndex, _arg1.shiftKey, _arg1.ctrlKey);
break;
default:
break;
};
_arg1.stopPropagation();
}
protected function handleHeaderResizeUp(_arg1:MouseEvent):void{
var _local2:Sprite;
var _local3:DataGridColumn;
var _local4:HeaderRenderer;
var _local5:uint;
var _local6:DataGridEvent;
_local2 = (_arg1.currentTarget as Sprite);
_local3 = (_columns[columnStretchIndex] as DataGridColumn);
_local5 = 0;
while (_local5 < header.numChildren) {
_local4 = (header.getChildAt(_local5) as HeaderRenderer);
if (((_local4) && ((_local4.column == columnStretchIndex)))){
break;
};
_local5++;
};
_local6 = new DataGridEvent(DataGridEvent.COLUMN_STRETCH, false, true, columnStretchIndex, -1, _local4, (_local3) ? _local3.dataField : null);
dispatchEvent(_local6);
columnStretchIndex = -1;
showColumnStretchCursor(false);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleHeaderResizeMove, false);
stage.removeEventListener(MouseEvent.MOUSE_UP, handleHeaderResizeUp, false);
}
protected function handleHeaderResizeOver(_arg1:MouseEvent):void{
if (columnStretchIndex == -1){
showColumnStretchCursor();
};
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:Boolean;
var _local3:DataGridColumn;
if (_arg1.target != this){
return;
};
if (losingFocus){
losingFocus = false;
return;
};
setIMEMode(true);
super.focusInHandler(_arg1);
if (((editable) && (!(isPressed)))){
_local2 = !((editedItemPosition == null));
if (!_editedItemPosition){
_editedItemPosition = {rowIndex:0, columnIndex:0};
while (_editedItemPosition.columnIndex < _columns.length) {
_local3 = (_columns[_editedItemPosition.columnIndex] as DataGridColumn);
if (((_local3.editable) && (_local3.visible))){
_local2 = true;
break;
};
_editedItemPosition.columnIndex++;
};
};
if (_local2){
setEditedItemPosition(_editedItemPosition);
};
};
if (editable){
addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
addEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler);
};
}
public function createItemEditor(_arg1:uint, _arg2:uint):void{
var _local3:DataGridColumn;
var _local4:ICellRenderer;
var _local5:Sprite;
var _local6:int;
if (displayableColumns.length != _columns.length){
_local6 = 0;
while (_local6 < displayableColumns.length) {
if (displayableColumns[_local6].colNum >= _arg1){
_arg1 = displayableColumns[_local6].colNum;
break;
};
_local6++;
};
if (_local6 == displayableColumns.length){
_arg1 = 0;
};
};
_local3 = (_columns[_arg1] as DataGridColumn);
_local4 = getCellRendererAt(_arg2, _arg1);
if (!itemEditorInstance){
itemEditorInstance = getDisplayObjectInstance(_local3.itemEditor);
itemEditorInstance.tabEnabled = false;
list.addChild(DisplayObject(itemEditorInstance));
};
list.setChildIndex(DisplayObject(itemEditorInstance), (list.numChildren - 1));
_local5 = (_local4 as Sprite);
itemEditorInstance.visible = true;
itemEditorInstance.move(_local5.x, _local5.y);
itemEditorInstance.setSize(_local3.width, rowHeight);
itemEditorInstance.drawNow();
DisplayObject(itemEditorInstance).addEventListener(FocusEvent.FOCUS_OUT, itemEditorFocusOutHandler);
_local5.visible = false;
DisplayObject(itemEditorInstance).addEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler);
stage.addEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true, 0, true);
}
private function itemEditorFocusOutHandler(_arg1:FocusEvent):void{
if (((_arg1.relatedObject) && (contains(_arg1.relatedObject)))){
return;
};
if (!_arg1.relatedObject){
return;
};
if (itemEditorInstance){
endEdit(DataGridEventReason.OTHER);
};
}
override public function get horizontalScrollPolicy():String{
return (_horizontalScrollPolicy);
}
override protected function updateRendererStyles():void{
var _local1:Array;
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:String;
_local1 = [];
for (_local2 in availableCellRenderersMap) {
_local1 = _local1.concat(availableCellRenderersMap[_local2]);
};
for (_local2 in activeCellRenderersMap) {
_local1 = _local1.concat(activeCellRenderersMap[_local2]);
};
_local3 = _local1.length;
_local4 = 0;
while (_local4 < _local3) {
if (_local1[_local4]["setStyle"] == null){
} else {
for (_local5 in updatedRendererStyles) {
_local1[_local4].setStyle(_local5, updatedRendererStyles[_local5]);
};
_local1[_local4].drawNow();
};
_local4++;
};
updatedRendererStyles = {};
}
public function set minColumnWidth(_arg1:Number):void{
_minColumnWidth = _arg1;
columnsInvalid = true;
minColumnWidthInvalid = true;
invalidate(InvalidationType.SIZE);
}
protected function showColumnStretchCursor(_arg1:Boolean=true):void{
if (columnStretchCursor == null){
columnStretchCursor = (getDisplayObjectInstance(getStyleValue("columnStretchCursorSkin")) as Sprite);
columnStretchCursor.mouseEnabled = false;
};
if (_arg1){
Mouse.hide();
stage.addChild(columnStretchCursor);
stage.addEventListener(MouseEvent.MOUSE_MOVE, positionColumnStretchCursor, false, 0, true);
columnStretchCursor.x = stage.mouseX;
columnStretchCursor.y = stage.mouseY;
} else {
stage.removeEventListener(MouseEvent.MOUSE_MOVE, positionColumnStretchCursor, false);
if (stage.contains(columnStretchCursor)){
stage.removeChild(columnStretchCursor);
};
Mouse.show();
};
}
protected function findNextEnterItemRenderer(_arg1:KeyboardEvent):void{
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:DataGridEvent;
if (proposedEditedItemPosition !== undefined){
return;
};
_local2 = _editedItemPosition.rowIndex;
_local3 = _editedItemPosition.columnIndex;
_local4 = (_editedItemPosition.rowIndex + (_arg1.shiftKey) ? -1 : 1);
if ((((_local4 >= 0)) && ((_local4 < length)))){
_local2 = _local4;
};
_local5 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true, _local3, _local2);
_local5.dataField = _columns[_local3].dataField;
dispatchEvent(_local5);
}
protected function mouseFocusChangeHandler(_arg1:MouseEvent):void{
if (((((itemEditorInstance) && (!(_arg1.isDefaultPrevented())))) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){
_arg1.preventDefault();
};
}
public function get imeMode():String{
return (_imeMode);
}
public function editField(_arg1:uint, _arg2:String, _arg3:Object):void{
var _local4:Object;
_local4 = getItemAt(_arg1);
_local4[_arg2] = _arg3;
replaceItemAt(_local4, _arg1);
}
protected function calculateAvailableHeight():Number{
var _local1:Number;
var _local2:Number;
_local1 = Number(getStyleValue("contentPadding"));
_local2 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && ((_maxHorizontalScrollPosition > 0)))))) ? 15 : 0;
return ((((height - (_local1 * 2)) - _local2) - (showHeaders) ? headerHeight : 0));
}
protected function mouseUpHandler(_arg1:MouseEvent):void{
if (((!(enabled)) || (!(selectable)))){
return;
};
isPressed = false;
}
override protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
public function resizeColumn(_arg1:int, _arg2:Number):void{
var _local3:DataGridColumn;
var _local4:int;
var _local5:Number;
var _local6:int;
var _local7:DataGridColumn;
var _local8:DataGridColumn;
var _local9:int;
var _local10:Number;
var _local11:Number;
var _local12:Number;
if (_columns.length == 0){
return;
};
_local3 = (_columns[_arg1] as DataGridColumn);
if (!_local3){
return;
};
if (((!(visibleColumns)) || ((visibleColumns.length == 0)))){
_local3.setWidth(_arg2);
return;
};
if (_arg2 < _local3.minWidth){
_arg2 = _local3.minWidth;
};
if ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((_horizontalScrollPolicy == ScrollPolicy.AUTO)))){
_local3.setWidth(_arg2);
_local3.explicitWidth = _arg2;
} else {
_local4 = getVisibleColumnIndex(_local3);
if (_local4 != -1){
_local5 = 0;
_local6 = visibleColumns.length;
_local9 = (_local4 + 1);
while (_local9 < _local6) {
_local7 = (visibleColumns[_local9] as DataGridColumn);
if (((_local7) && (_local7.resizable))){
_local5 = (_local5 + _local7.width);
};
_local9++;
};
_local11 = ((_local3.width - _arg2) + _local5);
if (_local5){
_local3.setWidth(_arg2);
_local3.explicitWidth = _arg2;
};
_local12 = 0;
_local9 = (_local4 + 1);
while (_local9 < _local6) {
_local7 = (visibleColumns[_local9] as DataGridColumn);
if (_local7.resizable){
_local10 = ((_local7.width * _local11) / _local5);
if (_local10 < _local7.minWidth){
_local10 = _local7.minWidth;
};
_local7.setWidth(_local10);
_local12 = (_local12 + _local7.width);
_local8 = _local7;
};
_local9++;
};
if (_local12 > _local11){
_local10 = ((_local3.width - _local12) + _local11);
if (_local10 < _local3.minWidth){
_local10 = _local3.minWidth;
};
_local3.setWidth(_local10);
} else {
if (_local8){
_local8.setWidth(((_local8.width - _local12) + _local11));
};
};
} else {
_local3.setWidth(_arg2);
_local3.explicitWidth = _arg2;
};
};
columnsInvalid = true;
invalidate(InvalidationType.SIZE);
}
protected function itemEditorItemEditBeginHandler(_arg1:DataGridEvent):void{
var _local2:IFocusManager;
if (stage){
stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
};
if (!_arg1.isDefaultPrevented()){
createItemEditor(_arg1.columnIndex, uint(_arg1.rowIndex));
ICellRenderer(itemEditorInstance).listData = ICellRenderer(editedItemRenderer).listData;
ICellRenderer(itemEditorInstance).data = editedItemRenderer.data;
itemEditorInstance.imeMode = ((columns[_arg1.columnIndex].imeMode)==null) ? _imeMode : columns[_arg1.columnIndex].imeMode;
_local2 = focusManager;
if ((itemEditorInstance is IFocusManagerComponent)){
_local2.setFocus(InteractiveObject(itemEditorInstance));
};
_local2.defaultButtonEnabled = false;
_arg1 = new DataGridEvent(DataGridEvent.ITEM_FOCUS_IN, false, false, _editedItemPosition.columnIndex, _editedItemPosition.rowIndex, itemEditorInstance);
dispatchEvent(_arg1);
};
}
override protected function draw():void{
var _local1:Boolean;
_local1 = !((contentHeight == (rowHeight * length)));
contentHeight = (rowHeight * length);
if (isInvalid(InvalidationType.STYLES)){
setStyles();
drawBackground();
if (contentPadding != getStyleValue("contentPadding")){
invalidate(InvalidationType.SIZE, false);
};
if (((!((_cellRenderer == getStyleValue("cellRenderer")))) || (!((_headerRenderer == getStyleValue("headerRenderer")))))){
_invalidateList();
_cellRenderer = getStyleValue("cellRenderer");
_headerRenderer = getStyleValue("headerRenderer");
};
};
if (isInvalid(InvalidationType.SIZE)){
columnsInvalid = true;
};
if (((isInvalid(InvalidationType.SIZE, InvalidationType.STATE)) || (_local1))){
drawLayout();
drawDisabledOverlay();
};
if (isInvalid(InvalidationType.RENDERER_STYLES)){
updateRendererStyles();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.SIZE, InvalidationType.DATA, InvalidationType.SCROLL, InvalidationType.SELECTED)){
drawList();
};
updateChildren();
validate();
}
override public function set horizontalScrollPolicy(_arg1:String):void{
super.horizontalScrollPolicy = _arg1;
columnsInvalid = true;
}
protected function getVisibleColumnIndex(_arg1:DataGridColumn):int{
var _local2:uint;
_local2 = 0;
while (_local2 < visibleColumns.length) {
if (_arg1 == visibleColumns[_local2]){
return (_local2);
};
_local2++;
};
return (-1);
}
protected function itemRendererContains(_arg1:Object, _arg2:DisplayObject):Boolean{
if (((((!(_arg2)) || (!(_arg1)))) || (!((_arg1 is DisplayObjectContainer))))){
return (false);
};
return (DisplayObjectContainer(_arg1).contains(_arg2));
}
override protected function configUI():void{
var _local1:Graphics;
useFixedHorizontalScrolling = false;
super.configUI();
headerMask = new Sprite();
_local1 = headerMask.graphics;
_local1.beginFill(0, 0.3);
_local1.drawRect(0, 0, 100, 100);
_local1.endFill();
headerMask.visible = false;
addChild(headerMask);
header = new Sprite();
addChild(header);
header.mask = headerMask;
_horizontalScrollPolicy = ScrollPolicy.OFF;
_verticalScrollPolicy = ScrollPolicy.AUTO;
}
public function columnItemToLabel(_arg1:uint, _arg2:Object):String{
var _local3:DataGridColumn;
_local3 = (_columns[_arg1] as DataGridColumn);
if (_local3 != null){
return (_local3.itemToLabel(_arg2));
};
return (" ");
}
protected function endEdit(_arg1:String):Boolean{
var _local2:DataGridEvent;
if (!editedItemRenderer){
return (true);
};
_local2 = new DataGridEvent(DataGridEvent.ITEM_EDIT_END, false, true, editedItemPosition.columnIndex, editedItemPosition.rowIndex, editedItemRenderer, _columns[editedItemPosition.columnIndex].dataField, _arg1);
dispatchEvent(_local2);
return (!(_local2.isDefaultPrevented()));
}
override protected function drawLayout():void{
vOffset = (showHeaders) ? headerHeight : 0;
super.drawLayout();
contentScrollRect = listHolder.scrollRect;
if (showHeaders){
headerHeight = maxHeaderHeight;
if (Math.floor((availableHeight - headerHeight)) <= 0){
_headerHeight = availableHeight;
};
list.y = headerHeight;
contentScrollRect = listHolder.scrollRect;
contentScrollRect.y = (contentPadding + headerHeight);
contentScrollRect.height = (availableHeight - headerHeight);
listHolder.y = (contentPadding + headerHeight);
headerMask.x = contentPadding;
headerMask.y = contentPadding;
headerMask.width = availableWidth;
headerMask.height = headerHeight;
} else {
contentScrollRect.y = contentPadding;
listHolder.y = 0;
};
listHolder.scrollRect = contentScrollRect;
}
protected function commitEditedItemPosition(_arg1:Object):void{
var _local2:ICellRenderer;
var _local3:DataGridEvent;
var _local4:String;
var _local5:int;
if (((!(enabled)) || (!(editable)))){
return;
};
if (((((((((itemEditorInstance) && (_arg1))) && ((itemEditorInstance is IFocusManagerComponent)))) && ((_editedItemPosition.rowIndex == _arg1.rowIndex)))) && ((_editedItemPosition.columnIndex == _arg1.columnIndex)))){
IFocusManagerComponent(itemEditorInstance).setFocus();
return;
};
if (itemEditorInstance){
if (!_arg1){
_local4 = DataGridEventReason.OTHER;
} else {
if (((!(editedItemPosition)) || ((_arg1.rowIndex == editedItemPosition.rowIndex)))){
_local4 = DataGridEventReason.NEW_COLUMN;
} else {
_local4 = DataGridEventReason.NEW_ROW;
};
};
if (((!(endEdit(_local4))) && (!((_local4 == DataGridEventReason.OTHER))))){
return;
};
};
_editedItemPosition = _arg1;
if (!_arg1){
return;
};
actualRowIndex = _arg1.rowIndex;
actualColIndex = _arg1.columnIndex;
if (displayableColumns.length != _columns.length){
_local5 = 0;
while (_local5 < displayableColumns.length) {
if (displayableColumns[_local5].colNum >= actualColIndex){
actualColIndex = displayableColumns[_local5].colNum;
break;
};
_local5++;
};
if (_local5 == displayableColumns.length){
actualColIndex = 0;
};
};
scrollToPosition(actualRowIndex, actualColIndex);
_local2 = getCellRendererAt(actualRowIndex, actualColIndex);
_local3 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGIN, false, true, actualColIndex, actualRowIndex, _local2);
dispatchEvent(_local3);
if (editedItemPositionChanged){
editedItemPositionChanged = false;
commitEditedItemPosition(proposedEditedItemPosition);
proposedEditedItemPosition = undefined;
};
if (!itemEditorInstance){
commitEditedItemPosition(null);
};
}
protected function handleHeaderRendererClick(_arg1:MouseEvent):void{
var _local2:HeaderRenderer;
var _local3:uint;
var _local4:DataGridColumn;
var _local5:uint;
var _local6:DataGridEvent;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as HeaderRenderer);
_local3 = _local2.column;
_local4 = (_columns[_local3] as DataGridColumn);
if (((sortableColumns) && (_local4.sortable))){
_local5 = _sortIndex;
_sortIndex = _local3;
_local6 = new DataGridEvent(DataGridEvent.HEADER_RELEASE, false, true, _local3, -1, _local2, (_local4) ? _local4.dataField : null);
if (((!(dispatchEvent(_local6))) || (!(_selectable)))){
_sortIndex = lastSortIndex;
return;
};
lastSortIndex = _local5;
sortByColumn(_local3);
invalidate(InvalidationType.DATA);
};
}
public function get showHeaders():Boolean{
return (_showHeaders);
}
public function get sortIndex():int{
return (_sortIndex);
}
public function set labelFunction(_arg1:Function):void{
if (_labelFunction == _arg1){
return;
};
_labelFunction = _arg1;
invalidate(InvalidationType.DATA);
}
public function getColumnIndex(_arg1:String):int{
var _local2:uint;
var _local3:DataGridColumn;
_local2 = 0;
while (_local2 < _columns.length) {
_local3 = (_columns[_local2] as DataGridColumn);
if (_local3.dataField == _arg1){
return (_local2);
};
_local2++;
};
return (-1);
}
protected function createColumnsFromDataProvider():void{
var _local1:Object;
var _local2:String;
_columns = [];
if (length > 0){
_local1 = _dataProvider.getItemAt(0);
for (_local2 in _local1) {
addColumn(_local2);
};
};
}
protected function editorMouseDownHandler(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
if (!itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))){
if ((((_arg1.target is ICellRenderer)) && (contains(DisplayObject(_arg1.target))))){
_local2 = (_arg1.target as ICellRenderer);
_local3 = _local2.listData.row;
if (_editedItemPosition.rowIndex == _local3){
endEdit(DataGridEventReason.NEW_COLUMN);
} else {
endEdit(DataGridEventReason.NEW_ROW);
};
} else {
endEdit(DataGridEventReason.OTHER);
};
};
}
public function addColumnAt(_arg1, _arg2:uint):DataGridColumn{
var _local3:DataGridColumn;
var _local4:*;
var _local5:uint;
if (_arg2 < _columns.length){
_columns.splice(_arg2, 0, "");
_local5 = (_arg2 + 1);
while (_local5 < _columns.length) {
_local3 = (_columns[_local5] as DataGridColumn);
_local3.colNum = _local5;
_local5++;
};
};
_local4 = _arg1;
if (!(_local4 is DataGridColumn)){
if ((_local4 is String)){
_local4 = new DataGridColumn(_local4);
} else {
_local4 = new DataGridColumn();
};
};
_local3 = (_local4 as DataGridColumn);
_local3.owner = this;
_local3.colNum = _arg2;
_columns[_arg2] = _local3;
invalidate(InvalidationType.SIZE);
columnsInvalid = true;
return (_local3);
}
public function destroyItemEditor():void{
var _local1:DataGridEvent;
if (itemEditorInstance){
DisplayObject(itemEditorInstance).removeEventListener(KeyboardEvent.KEY_DOWN, editorKeyDownHandler);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, editorMouseDownHandler, true);
_local1 = new DataGridEvent(DataGridEvent.ITEM_FOCUS_OUT, false, false, _editedItemPosition.columnIndex, _editedItemPosition.rowIndex, itemEditorInstance);
dispatchEvent(_local1);
if (((itemEditorInstance) && ((itemEditorInstance is UIComponent)))){
UIComponent(itemEditorInstance).drawFocus(false);
};
list.removeChild(DisplayObject(itemEditorInstance));
DisplayObject(editedItemRenderer).visible = true;
itemEditorInstance = null;
};
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
protected function doKeySelection(_arg1:int, _arg2:Boolean, _arg3:Boolean):void{
var _local4:Boolean;
var _local5:int;
var _local6:Array;
var _local7:int;
var _local8:int;
_local4 = false;
if (_arg2){
_local6 = [];
_local7 = lastCaretIndex;
_local8 = _arg1;
if (_local7 == -1){
_local7 = ((caretIndex)!=-1) ? caretIndex : _arg1;
};
if (_local7 > _local8){
_local8 = _local7;
_local7 = _arg1;
};
_local5 = _local7;
while (_local5 <= _local8) {
_local6.push(_local5);
_local5++;
};
selectedIndices = _local6;
caretIndex = _arg1;
_local4 = true;
} else {
if (_arg3){
caretIndex = _arg1;
} else {
selectedIndex = _arg1;
caretIndex = (lastCaretIndex = _arg1);
_local4 = true;
};
};
if (_local4){
dispatchEvent(new Event(Event.CHANGE));
};
invalidate(InvalidationType.DATA);
}
public function get headerHeight():Number{
return (_headerHeight);
}
public function getColumnCount():uint{
return (_columns.length);
}
protected function sortByColumn(_arg1:int):void{
var _local2:DataGridColumn;
var _local3:Boolean;
var _local4:uint;
_local2 = (columns[_arg1] as DataGridColumn);
if (((((!(enabled)) || (!(_local2)))) || (!(_local2.sortable)))){
return;
};
_local3 = _local2.sortDescending;
_local4 = _local2.sortOptions;
if (_local3){
_local4 = (_local4 | Array.DESCENDING);
} else {
_local4 = (_local4 & ~(Array.DESCENDING));
};
if (_local2.sortCompareFunction != null){
sortItems(_local2.sortCompareFunction, _local4);
} else {
sortItemsOn(_local2.dataField, _local4);
};
_sortDescending = (_local2.sortDescending = !(_local3));
if ((((lastSortIndex >= 0)) && (!((lastSortIndex == sortIndex))))){
_local2 = (columns[lastSortIndex] as DataGridColumn);
if (_local2 != null){
_local2.sortDescending = false;
};
};
}
public function get minColumnWidth():Number{
return (_minColumnWidth);
}
protected function isHovered(_arg1:ICellRenderer):Boolean{
var _local2:uint;
var _local3:Number;
var _local4:Point;
_local2 = Math.min(Math.max((length - 1), 0), Math.floor((_verticalScrollPosition / rowHeight)));
_local3 = ((_arg1.listData.row - _local2) * rowHeight);
_local4 = list.globalToLocal(new Point(0, stage.mouseY));
return ((((_local4.y > _local3)) && ((_local4.y < (_local3 + rowHeight)))));
}
protected function mouseDownHandler(_arg1:MouseEvent):void{
if (((!(enabled)) || (!(selectable)))){
return;
};
isPressed = true;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
header.mouseChildren = _enabled;
}
override protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
var _local4:int;
var _local5:int;
var _local6:int;
_local4 = Math.max(Math.floor((calculateAvailableHeight() / rowHeight)), 1);
_local5 = -1;
_local6 = 0;
switch (_arg1){
case Keyboard.UP:
if (caretIndex > 0){
_local5 = (caretIndex - 1);
};
break;
case Keyboard.DOWN:
if (caretIndex < (length - 1)){
_local5 = (caretIndex + 1);
};
break;
case Keyboard.PAGE_UP:
if (caretIndex > 0){
_local5 = Math.max((caretIndex - _local4), 0);
};
break;
case Keyboard.PAGE_DOWN:
if (caretIndex < (length - 1)){
_local5 = Math.min((caretIndex + _local4), (length - 1));
};
break;
case Keyboard.HOME:
if (caretIndex > 0){
_local5 = 0;
};
break;
case Keyboard.END:
if (caretIndex < (length - 1)){
_local5 = (length - 1);
};
break;
};
if (_local5 >= 0){
doKeySelection(_local5, _arg2, _arg3);
scrollToSelected();
};
}
protected function handleHeaderResizeOut(_arg1:MouseEvent):void{
if (columnStretchIndex == -1){
showColumnStretchCursor(false);
};
}
public function removeAllColumns():void{
if (_columns.length > 0){
removeCellRenderers();
_columns = [];
invalidate(InvalidationType.SIZE);
columnsInvalid = true;
};
}
public function set rowCount(_arg1:uint):void{
var _local2:Number;
var _local3:Number;
_local2 = Number(getStyleValue("contentPadding"));
_local3 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && (hScrollBar))))) ? 15 : 0;
height = ((((rowHeight * _arg1) + (2 * _local2)) + _local3) + (showHeaders) ? headerHeight : 0);
}
protected function removeCellRenderers():void{
var _local1:uint;
_local1 = 0;
while (_local1 < _columns.length) {
removeCellRenderersByColumn((_columns[_local1] as DataGridColumn));
_local1++;
};
}
public function removeColumnAt(_arg1:uint):DataGridColumn{
var _local2:DataGridColumn;
var _local3:uint;
_local2 = (_columns[_arg1] as DataGridColumn);
if (_local2 != null){
removeCellRenderersByColumn(_local2);
_columns.splice(_arg1, 1);
_local3 = _arg1;
while (_local3 < _columns.length) {
_local2 = (_columns[_local3] as DataGridColumn);
if (_local2){
_local2.colNum = _local3;
};
_local3++;
};
invalidate(InvalidationType.SIZE);
columnsInvalid = true;
};
return (_local2);
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
if (_arg1 == _horizontalScrollPosition){
return;
};
contentScrollRect = listHolder.scrollRect;
contentScrollRect.x = _arg1;
listHolder.scrollRect = contentScrollRect;
list.x = 0;
header.x = -(_arg1);
super.setHorizontalScrollPosition(_arg1, true);
invalidate(InvalidationType.SCROLL);
columnsInvalid = true;
}
public function get labelFunction():Function{
return (_labelFunction);
}
override protected function handleCellRendererClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:DataGridColumn;
var _local4:DataGridEvent;
super.handleCellRendererClick(_arg1);
_local2 = (_arg1.currentTarget as ICellRenderer);
if (((((_local2) && (_local2.data))) && (!((_local2 == itemEditorInstance))))){
_local3 = (_columns[_local2.listData.column] as DataGridColumn);
if (((((editable) && (_local3))) && (_local3.editable))){
_local4 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true, _local2.listData.column, _local2.listData.row, _local2, _local3.dataField);
dispatchEvent(_local4);
};
};
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
setIMEMode(false);
if (_arg1.target == this){
super.focusOutHandler(_arg1);
};
if ((((_arg1.relatedObject == this)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){
return;
};
if ((((_arg1.relatedObject == null)) && (itemRendererContains(editedItemRenderer, DisplayObject(_arg1.target))))){
return;
};
if ((((_arg1.relatedObject == null)) && (itemRendererContains(itemEditorInstance, DisplayObject(_arg1.target))))){
return;
};
if (((itemEditorInstance) && (((!(_arg1.relatedObject)) || (!(itemRendererContains(itemEditorInstance, _arg1.relatedObject))))))){
endEdit(DataGridEventReason.OTHER);
removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
removeEventListener(MouseEvent.MOUSE_DOWN, mouseFocusChangeHandler);
};
}
protected function positionColumnStretchCursor(_arg1:MouseEvent):void{
columnStretchCursor.x = _arg1.stageX;
columnStretchCursor.y = _arg1.stageY;
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
if (itemEditorInstance){
endEdit(DataGridEventReason.OTHER);
};
invalidate(InvalidationType.SCROLL);
super.setVerticalScrollPosition(_arg1, true);
}
public function get sortDescending():Boolean{
return (_sortDescending);
}
protected function editorKeyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ESCAPE){
endEdit(DataGridEventReason.CANCELLED);
} else {
if (((_arg1.ctrlKey) && ((_arg1.charCode == 46)))){
endEdit(DataGridEventReason.CANCELLED);
} else {
if ((((_arg1.charCode == Keyboard.ENTER)) && (!((_arg1.keyCode == 229))))){
if (endEdit(DataGridEventReason.NEW_ROW)){
findNextEnterItemRenderer(_arg1);
};
};
};
};
}
override protected function calculateContentWidth():void{
var _local1:int;
var _local2:int;
var _local3:DataGridColumn;
if (_columns.length == 0){
contentWidth = 0;
return;
};
if (minColumnWidthInvalid){
_local1 = _columns.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = (_columns[_local2] as DataGridColumn);
_local3.minWidth = minColumnWidth;
_local2++;
};
minColumnWidthInvalid = false;
};
if (horizontalScrollPolicy == ScrollPolicy.OFF){
contentWidth = availableWidth;
} else {
contentWidth = 0;
_local1 = _columns.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = (_columns[_local2] as DataGridColumn);
if (_local3.visible){
contentWidth = (contentWidth + _local3.width);
};
_local2++;
};
if (((!(isNaN(_horizontalScrollPosition))) && (((_horizontalScrollPosition + availableWidth) > contentWidth)))){
setHorizontalScrollPosition((contentWidth - availableWidth));
};
};
}
override public function get rowCount():uint{
return (Math.ceil((calculateAvailableHeight() / rowHeight)));
}
public function addColumn(_arg1):DataGridColumn{
return (addColumnAt(_arg1, _columns.length));
}
protected function removeCellRenderersByColumn(_arg1:DataGridColumn):void{
var _local2:Array;
if (_arg1 == null){
return;
};
_local2 = activeCellRenderersMap[_arg1];
if (_local2 != null){
while (_local2.length > 0) {
list.removeChild((_local2.pop() as DisplayObject));
};
};
}
override protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:int;
var _local4:String;
var _local5:uint;
var _local6:DataGridColumn;
var _local7:ICellRenderer;
_local2 = (_arg1.target as ICellRenderer);
if (_local2){
_local3 = _local2.listData.row;
if (_arg1.type == MouseEvent.ROLL_OVER){
_local4 = "over";
} else {
if (_arg1.type == MouseEvent.ROLL_OUT){
_local4 = "up";
};
};
if (_local4){
_local5 = 0;
while (_local5 < visibleColumns.length) {
_local6 = (visibleColumns[_local5] as DataGridColumn);
_local7 = getCellRendererAt(_local3, _local6.colNum);
if (_local7){
_local7.setMouseState(_local4);
};
if (_local3 != currentHoveredRow){
_local7 = getCellRendererAt(currentHoveredRow, _local6.colNum);
if (_local7){
_local7.setMouseState("up");
};
};
_local5++;
};
};
};
super.handleCellRendererMouseEvent(_arg1);
}
protected function handleHeaderResizeMove(_arg1:MouseEvent):void{
var _local2:Number;
var _local3:Number;
_local2 = (_arg1.stageX - columnStretchStartX);
_local3 = (columnStretchStartWidth + _local2);
resizeColumn(columnStretchIndex, _local3);
}
public function set rowHeight(_arg1:Number):void{
_rowHeight = Math.max(0, _arg1);
invalidate(InvalidationType.SIZE);
}
protected function scrollToPosition(_arg1:int, _arg2:int):void{
var _local3:Number;
var _local4:Number;
var _local5:uint;
var _local6:Number;
var _local7:DataGridColumn;
var _local8:DataGridColumn;
_local3 = verticalScrollPosition;
_local4 = horizontalScrollPosition;
scrollToIndex(_arg1);
_local6 = 0;
_local7 = (_columns[_arg2] as DataGridColumn);
_local5 = 0;
while (_local5 < displayableColumns.length) {
_local8 = (displayableColumns[_local5] as DataGridColumn);
if (_local8 != _local7){
_local6 = (_local6 + _local8.width);
} else {
break;
};
_local5++;
};
if (horizontalScrollPosition > _local6){
horizontalScrollPosition = _local6;
} else {
if ((horizontalScrollPosition + availableWidth) < (_local6 + _local7.width)){
horizontalScrollPosition = -((availableWidth - (_local6 + _local7.width)));
};
};
if (((!((_local3 == verticalScrollPosition))) || (!((_local4 == horizontalScrollPosition))))){
drawNow();
};
}
protected function findNextItemRenderer(_arg1:Boolean):Boolean{
var _local2:int;
var _local3:int;
var _local4:Boolean;
var _local5:int;
var _local6:int;
var _local7:String;
var _local8:DataGridEvent;
if (!_editedItemPosition){
return (false);
};
if (proposedEditedItemPosition !== undefined){
return (false);
};
_local2 = _editedItemPosition.rowIndex;
_local3 = _editedItemPosition.columnIndex;
_local4 = false;
_local5 = (_arg1) ? -1 : 1;
_local6 = (length - 1);
while (!(_local4)) {
_local3 = (_local3 + _local5);
if ((((_local3 < 0)) || ((_local3 >= _columns.length)))){
_local3 = ((_local3)<0) ? (_columns.length - 1) : 0;
_local2 = (_local2 + _local5);
if ((((_local2 < 0)) || ((_local2 > _local6)))){
setEditedItemPosition(null);
losingFocus = true;
setFocus();
return (false);
};
};
if (((_columns[_local3].editable) && (_columns[_local3].visible))){
_local4 = true;
if (_local2 == _editedItemPosition.rowIndex){
_local7 = DataGridEventReason.NEW_COLUMN;
} else {
_local7 = DataGridEventReason.NEW_ROW;
};
if (((!(itemEditorInstance)) || (endEdit(_local7)))){
_local8 = new DataGridEvent(DataGridEvent.ITEM_EDIT_BEGINNING, false, true, _local3, _local2);
_local8.dataField = _columns[_local3].dataField;
dispatchEvent(_local8);
};
};
};
return (_local4);
}
override public function set dataProvider(_arg1:DataProvider):void{
super.dataProvider = _arg1;
if (_columns == null){
_columns = [];
};
if (_columns.length == 0){
createColumnsFromDataProvider();
};
removeCellRenderers();
}
override public function setSize(_arg1:Number, _arg2:Number):void{
super.setSize(_arg1, _arg2);
columnsInvalid = true;
}
override public function scrollToIndex(_arg1:int):void{
var _local2:int;
var _local3:int;
var _local4:Number;
drawNow();
_local2 = (Math.floor(((_verticalScrollPosition + availableHeight) / rowHeight)) - 1);
_local3 = Math.ceil((_verticalScrollPosition / rowHeight));
if (_arg1 < _local3){
verticalScrollPosition = (_arg1 * rowHeight);
} else {
if (_arg1 >= _local2){
_local4 = ((((_horizontalScrollPolicy == ScrollPolicy.ON)) || ((((_horizontalScrollPolicy == ScrollPolicy.AUTO)) && (hScrollBar))))) ? 15 : 0;
verticalScrollPosition = (((((_arg1 + 1) * rowHeight) - availableHeight) + _local4) + (showHeaders) ? headerHeight : 0);
};
};
}
protected function calculateColumnSizes():void{
var _local1:Number;
var _local2:int;
var _local3:int;
var _local4:Number;
var _local5:DataGridColumn;
var _local6:DataGridColumn;
var _local7:Number;
var _local8:int;
var _local9:Number;
var _local10:int;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
_local4 = 0;
if (_columns.length == 0){
visibleColumns = [];
displayableColumns = [];
return;
};
if (columnsInvalid){
columnsInvalid = false;
visibleColumns = [];
if (minColumnWidthInvalid){
_local2 = _columns.length;
_local3 = 0;
while (_local3 < _local2) {
_columns[_local3].minWidth = minColumnWidth;
_local3++;
};
minColumnWidthInvalid = false;
};
displayableColumns = null;
_local2 = _columns.length;
_local3 = 0;
while (_local3 < _local2) {
if (((displayableColumns) && (_columns[_local3].visible))){
displayableColumns.push(_columns[_local3]);
} else {
if (((!(displayableColumns)) && (!(_columns[_local3].visible)))){
displayableColumns = new Array(_local3);
_local8 = 0;
while (_local8 < _local3) {
displayableColumns[_local8] = _columns[_local8];
_local8++;
};
};
};
_local3++;
};
if (!displayableColumns){
displayableColumns = _columns;
};
if (horizontalScrollPolicy == ScrollPolicy.OFF){
_local2 = displayableColumns.length;
_local3 = 0;
while (_local3 < _local2) {
visibleColumns.push(displayableColumns[_local3]);
_local3++;
};
} else {
_local2 = displayableColumns.length;
_local9 = 0;
_local3 = 0;
while (_local3 < _local2) {
_local5 = (displayableColumns[_local3] as DataGridColumn);
if (((((_local9 + _local5.width) > _horizontalScrollPosition)) && ((_local9 < (_horizontalScrollPosition + availableWidth))))){
visibleColumns.push(_local5);
};
_local9 = (_local9 + _local5.width);
_local3++;
};
};
};
if (horizontalScrollPolicy == ScrollPolicy.OFF){
_local10 = 0;
_local11 = 0;
_local2 = visibleColumns.length;
_local3 = 0;
while (_local3 < _local2) {
_local5 = (visibleColumns[_local3] as DataGridColumn);
if (_local5.resizable){
if (!isNaN(_local5.explicitWidth)){
_local11 = (_local11 + _local5.width);
} else {
_local10++;
_local11 = (_local11 + _local5.minWidth);
};
} else {
_local11 = (_local11 + _local5.width);
};
_local4 = (_local4 + _local5.width);
_local3++;
};
_local13 = availableWidth;
if ((((availableWidth > _local11)) && (_local10))){
_local2 = visibleColumns.length;
_local3 = 0;
while (_local3 < _local2) {
_local5 = (visibleColumns[_local3] as DataGridColumn);
if (((_local5.resizable) && (isNaN(_local5.explicitWidth)))){
_local6 = _local5;
if (_local4 > availableWidth){
_local12 = ((_local6.width - _local6.minWidth) / (_local4 - _local11));
} else {
_local12 = (_local6.width / _local4);
};
_local7 = (_local6.width - ((_local4 - availableWidth) * _local12));
_local14 = _local5.minWidth;
_local5.setWidth(Math.max(_local7, _local14));
};
_local13 = (_local13 - _local5.width);
_local3++;
};
if (((_local13) && (_local6))){
_local6.setWidth((_local6.width + _local13));
};
} else {
_local2 = visibleColumns.length;
_local3 = 0;
while (_local3 < _local2) {
_local6 = (visibleColumns[_local3] as DataGridColumn);
_local12 = (_local6.width / _local4);
_local7 = (availableWidth * _local12);
_local6.setWidth(_local7);
_local6.explicitWidth = NaN;
_local13 = (_local13 - _local7);
_local3++;
};
if (((_local13) && (_local6))){
_local6.setWidth((_local6.width + _local13));
};
};
};
}
public function set showHeaders(_arg1:Boolean):void{
_showHeaders = _arg1;
invalidate(InvalidationType.SIZE);
}
override protected function initializeAccessibility():void{
if (DataGrid.createAccessibilityImplementation != null){
DataGrid.createAccessibilityImplementation(this);
};
}
public function getColumnAt(_arg1:uint):DataGridColumn{
return ((_columns[_arg1] as DataGridColumn));
}
public function get rowHeight():Number{
return (_rowHeight);
}
public function set columns(_arg1:Array):void{
var _local2:uint;
removeCellRenderers();
_columns = [];
_local2 = 0;
while (_local2 < _arg1.length) {
addColumn(_arg1[_local2]);
_local2++;
};
}
public function get editedItemRenderer():ICellRenderer{
if (!itemEditorInstance){
return (null);
};
return (getCellRendererAt(actualRowIndex, actualColIndex));
}
public function get columns():Array{
return (_columns.slice(0));
}
public function spaceColumnsEqually():void{
var _local1:Number;
var _local2:int;
var _local3:DataGridColumn;
drawNow();
if (displayableColumns.length > 0){
_local1 = (availableWidth / displayableColumns.length);
_local2 = 0;
while (_local2 < displayableColumns.length) {
_local3 = (displayableColumns[_local2] as DataGridColumn);
_local3.width = _local1;
_local2++;
};
invalidate(InvalidationType.SIZE);
columnsInvalid = true;
};
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, SelectableList.getStyleDefinition(), ScrollBar.getStyleDefinition()));
}
}
}//package fl.controls
Section 46
//LabelButton (fl.controls.LabelButton)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class LabelButton extends BaseButton implements IFocusManagerComponent {
protected var _labelPlacement:String;// = "right"
protected var _toggle:Boolean;// = false
protected var icon:DisplayObject;
protected var oldMouseState:String;
protected var mode:String;// = "center"
public var textField:TextField;
protected var _label:String;// = "Label"
private static var defaultStyles:Object = {icon:null, upIcon:null, downIcon:null, overIcon:null, disabledIcon:null, selectedDisabledIcon:null, selectedUpIcon:null, selectedDownIcon:null, selectedOverIcon:null, textFormat:null, disabledTextFormat:null, textPadding:5, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function LabelButton(){
_labelPlacement = ButtonLabelPlacement.RIGHT;
_toggle = false;
_label = "Label";
mode = "center";
super();
}
protected function toggleSelected(_arg1:MouseEvent):void{
selected = !(selected);
dispatchEvent(new Event(Event.CHANGE, true));
}
public function get labelPlacement():String{
return (_labelPlacement);
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
if (oldMouseState == null){
oldMouseState = mouseState;
};
setMouseState("down");
startPress();
};
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
override protected function keyUpHandler(_arg1:KeyboardEvent):void{
if (!enabled){
return;
};
if (_arg1.keyCode == Keyboard.SPACE){
setMouseState(oldMouseState);
oldMouseState = null;
endPress();
dispatchEvent(new MouseEvent(MouseEvent.CLICK));
};
}
override public function get selected():Boolean{
return ((_toggle) ? _selected : false);
}
public function set labelPlacement(_arg1:String):void{
_labelPlacement = _arg1;
invalidate(InvalidationType.SIZE);
}
public function set toggle(_arg1:Boolean):void{
if (((!(_arg1)) && (super.selected))){
selected = false;
};
_toggle = _arg1;
if (_toggle){
addEventListener(MouseEvent.CLICK, toggleSelected, false, 0, true);
} else {
removeEventListener(MouseEvent.CLICK, toggleSelected);
};
invalidate(InvalidationType.STATE);
}
public function get label():String{
return (_label);
}
override public function set selected(_arg1:Boolean):void{
_selected = _arg1;
if (_toggle){
invalidate(InvalidationType.STATE);
};
}
override protected function draw():void{
if (textField.text != _label){
label = _label;
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawBackground();
drawIcon();
drawTextFormat();
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
public function get toggle():Boolean{
return (_toggle);
}
override protected function configUI():void{
super.configUI();
textField = new TextField();
textField.type = TextFieldType.DYNAMIC;
textField.selectable = false;
addChild(textField);
}
override protected function drawLayout():void{
var _local1:Number;
var _local2:String;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
_local1 = Number(getStyleValue("textPadding"));
_local2 = ((((icon == null)) && ((mode == "center")))) ? ButtonLabelPlacement.TOP : _labelPlacement;
textField.height = (textField.textHeight + 4);
_local3 = (textField.textWidth + 4);
_local4 = (textField.textHeight + 4);
_local5 = ((icon)==null) ? 0 : (icon.width + _local1);
_local6 = ((icon)==null) ? 0 : (icon.height + _local1);
textField.visible = (label.length > 0);
if (icon != null){
icon.x = Math.round(((width - icon.width) / 2));
icon.y = Math.round(((height - icon.height) / 2));
};
if (textField.visible == false){
textField.width = 0;
textField.height = 0;
} else {
if ((((_local2 == ButtonLabelPlacement.BOTTOM)) || ((_local2 == ButtonLabelPlacement.TOP)))){
_local7 = Math.max(0, Math.min(_local3, (width - (2 * _local1))));
if ((height - 2) > _local4){
_local8 = _local4;
} else {
_local8 = (height - 2);
};
_local3 = _local7;
textField.width = _local3;
_local4 = _local8;
textField.height = _local4;
textField.x = Math.round(((width - _local3) / 2));
textField.y = Math.round(((((height - textField.height) - _local6) / 2) + ((_local2)==ButtonLabelPlacement.BOTTOM) ? _local6 : 0));
if (icon != null){
icon.y = Math.round(((_local2)==ButtonLabelPlacement.BOTTOM) ? (textField.y - _local6) : ((textField.y + textField.height) + _local1));
};
} else {
_local7 = Math.max(0, Math.min(_local3, ((width - _local5) - (2 * _local1))));
_local3 = _local7;
textField.width = _local3;
textField.x = Math.round(((((width - _local3) - _local5) / 2) + ((_local2)!=ButtonLabelPlacement.LEFT) ? _local5 : 0));
textField.y = Math.round(((height - textField.height) / 2));
if (icon != null){
icon.x = Math.round(((_local2)!=ButtonLabelPlacement.LEFT) ? (textField.x - _local5) : ((textField.x + _local3) + _local1));
};
};
};
super.drawLayout();
}
override protected function initializeAccessibility():void{
if (LabelButton.createAccessibilityImplementation != null){
LabelButton.createAccessibilityImplementation(this);
};
}
protected function drawIcon():void{
var _local1:DisplayObject;
var _local2:String;
var _local3:Object;
_local1 = icon;
_local2 = (enabled) ? mouseState : "disabled";
if (selected){
_local2 = (("selected" + _local2.substr(0, 1).toUpperCase()) + _local2.substr(1));
};
_local2 = (_local2 + "Icon");
_local3 = getStyleValue(_local2);
if (_local3 == null){
_local3 = getStyleValue("icon");
};
if (_local3 != null){
icon = getDisplayObjectInstance(_local3);
};
if (icon != null){
addChildAt(icon, 1);
};
if (((!((_local1 == null))) && (!((_local1 == icon))))){
removeChild(_local1);
};
}
public function set label(_arg1:String):void{
_label = _arg1;
if (textField.text != _label){
textField.text = _label;
dispatchEvent(new ComponentEvent(ComponentEvent.LABEL_CHANGE));
};
invalidate(InvalidationType.SIZE);
invalidate(InvalidationType.STYLES);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseButton.getStyleDefinition()));
}
}
}//package fl.controls
Section 47
//ProgressBar (fl.controls.ProgressBar)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.controls.progressBarClasses.*;
public class ProgressBar extends UIComponent {
protected var _direction:String;// = "right"
protected var _mode:String;// = "event"
protected var _value:Number;// = 0
protected var _indeterminate:Boolean;// = true
protected var _minimum:Number;// = 0
protected var _maximum:Number;// = 0
protected var determinateBar:DisplayObject;
protected var _loaded:Number;
protected var _source:Object;
protected var track:DisplayObject;
protected var indeterminateBar:UIComponent;
private static var defaultStyles:Object = {trackSkin:"ProgressBar_trackSkin", barSkin:"ProgressBar_barSkin", indeterminateSkin:"ProgressBar_indeterminateSkin", indeterminateBar:IndeterminateBar, barPadding:0};
public function ProgressBar(){
_direction = ProgressBarDirection.RIGHT;
_indeterminate = true;
_mode = ProgressBarMode.EVENT;
_minimum = 0;
_maximum = 0;
_value = 0;
super();
}
public function get minimum():Number{
return (_minimum);
}
public function get source():Object{
return (_source);
}
public function set minimum(_arg1:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_minimum = _arg1;
invalidate(InvalidationType.DATA);
}
public function get maximum():Number{
return (_maximum);
}
protected function drawBars():void{
var _local1:DisplayObject;
var _local2:DisplayObject;
_local1 = determinateBar;
_local2 = indeterminateBar;
determinateBar = getDisplayObjectInstance(getStyleValue("barSkin"));
addChild(determinateBar);
indeterminateBar = (getDisplayObjectInstance(getStyleValue("indeterminateBar")) as UIComponent);
indeterminateBar.setStyle("indeterminateSkin", getStyleValue("indeterminateSkin"));
addChild(indeterminateBar);
if (((!((_local1 == null))) && (!((_local1 == determinateBar))))){
removeChild(_local1);
};
if (((!((_local2 == null))) && (!((_local2 == determinateBar))))){
removeChild(_local2);
};
}
protected function setupSourceEvents():void{
_source.addEventListener(ProgressEvent.PROGRESS, handleProgress, false, 0, true);
_source.addEventListener(Event.COMPLETE, handleComplete, false, 0, true);
}
public function set maximum(_arg1:Number):void{
setProgress(_value, _arg1);
}
public function set source(_arg1:Object):void{
if (_source == _arg1){
return;
};
if (_mode != ProgressBarMode.MANUAL){
resetProgress();
};
_source = _arg1;
if (_source == null){
return;
};
if (_mode == ProgressBarMode.EVENT){
setupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
}
protected function drawTrack():void{
var _local1:DisplayObject;
_local1 = track;
track = getDisplayObjectInstance(getStyleValue("trackSkin"));
addChildAt(track, 0);
if (((!((_local1 == null))) && (!((_local1 == track))))){
removeChild(_local1);
};
}
protected function handleProgress(_arg1:ProgressEvent):void{
_setProgress(_arg1.bytesLoaded, _arg1.bytesTotal, true);
}
public function set sourceName(_arg1:String):void{
var _local2:DisplayObject;
if (!componentInspectorSetting){
return;
};
if (_arg1 == ""){
return;
};
_local2 = (parent.getChildByName(_arg1) as DisplayObject);
if (_local2 == null){
throw (new Error((("Source clip '" + _arg1) + "' not found on parent.")));
};
source = _local2;
}
protected function resetProgress():void{
if ((((_mode == ProgressBarMode.EVENT)) && (!((_source == null))))){
cleanupSourceEvents();
} else {
if (_mode == ProgressBarMode.POLLED){
removeEventListener(Event.ENTER_FRAME, pollSource);
} else {
if (_source != null){
_source = null;
};
};
};
_minimum = (_maximum = (_value = 0));
}
public function get percentComplete():Number{
return (((((_maximum <= _minimum)) || ((_value <= _minimum)))) ? 0 : Math.max(0, Math.min(100, (((_value - _minimum) / (_maximum - _minimum)) * 100))));
}
public function setProgress(_arg1:Number, _arg2:Number):void{
if (_mode != ProgressBarMode.MANUAL){
return;
};
_setProgress(_arg1, _arg2);
}
protected function pollSource(_arg1:Event):void{
if (_source == null){
return;
};
_setProgress(_source.bytesLoaded, _source.bytesTotal, true);
if ((((_maximum > 0)) && ((_maximum == _value)))){
removeEventListener(Event.ENTER_FRAME, pollSource);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function get indeterminate():Boolean{
return (_indeterminate);
}
public function set value(_arg1:Number):void{
setProgress(_arg1, _maximum);
}
public function set direction(_arg1:String):void{
_direction = _arg1;
invalidate(InvalidationType.DATA);
}
protected function _setProgress(_arg1:Number, _arg2:Number, _arg3:Boolean=false):void{
if ((((_arg1 == _value)) && ((_arg2 == _maximum)))){
return;
};
_value = _arg1;
_maximum = _arg2;
if (((!((_value == _loaded))) && (_arg3))){
dispatchEvent(new ProgressEvent(ProgressEvent.PROGRESS, false, false, _value, _maximum));
_loaded = _value;
};
if (_mode != ProgressBarMode.MANUAL){
setIndeterminate((_arg2 == 0));
};
invalidate(InvalidationType.DATA);
}
public function set mode(_arg1:String):void{
if (_mode == _arg1){
return;
};
resetProgress();
_mode = _arg1;
if ((((_arg1 == ProgressBarMode.EVENT)) && (!((_source == null))))){
setupSourceEvents();
} else {
if (_arg1 == ProgressBarMode.POLLED){
addEventListener(Event.ENTER_FRAME, pollSource, false, 0, true);
};
};
setIndeterminate(!((_mode == ProgressBarMode.MANUAL)));
}
public function reset():void{
var _local1:Object;
_setProgress(0, 0);
_local1 = _source;
_source = null;
source = _local1;
}
override protected function draw():void{
if (isInvalid(InvalidationType.STYLES)){
drawTrack();
drawBars();
invalidate(InvalidationType.STATE, false);
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.STATE)){
indeterminateBar.visible = _indeterminate;
determinateBar.visible = !(_indeterminate);
invalidate(InvalidationType.DATA, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
invalidate(InvalidationType.DATA, false);
};
if (((isInvalid(InvalidationType.DATA)) && (!(_indeterminate)))){
drawDeterminateBar();
};
super.draw();
}
override protected function configUI():void{
super.configUI();
}
protected function drawDeterminateBar():void{
var _local1:Number;
var _local2:Number;
_local1 = (percentComplete / 100);
_local2 = Number(getStyleValue("barPadding"));
determinateBar.width = Math.round(((width - (_local2 * 2)) * _local1));
determinateBar.x = ((_direction)==ProgressBarDirection.LEFT) ? ((width - _local2) - determinateBar.width) : _local2;
}
public function get value():Number{
return (_value);
}
public function set indeterminate(_arg1:Boolean):void{
if (((!((_mode == ProgressBarMode.MANUAL))) || ((_indeterminate == _arg1)))){
return;
};
setIndeterminate(_arg1);
}
protected function setIndeterminate(_arg1:Boolean):void{
if (_indeterminate == _arg1){
return;
};
_indeterminate = _arg1;
invalidate(InvalidationType.STATE);
}
protected function handleComplete(_arg1:Event):void{
_setProgress(_maximum, _maximum, true);
dispatchEvent(_arg1);
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("barPadding"));
track.width = width;
track.height = height;
indeterminateBar.setSize((width - (_local1 * 2)), (height - (_local1 * 2)));
indeterminateBar.move(_local1, _local1);
indeterminateBar.drawNow();
determinateBar.height = (height - (_local1 * 2));
determinateBar.y = _local1;
}
public function get direction():String{
return (_direction);
}
public function get mode():String{
return (_mode);
}
protected function cleanupSourceEvents():void{
_source.removeEventListener(ProgressEvent.PROGRESS, handleProgress);
_source.removeEventListener(Event.COMPLETE, handleComplete);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 48
//ProgressBarDirection (fl.controls.ProgressBarDirection)
package fl.controls {
public class ProgressBarDirection {
public static const RIGHT:String = "right";
public static const LEFT:String = "left";
}
}//package fl.controls
Section 49
//ProgressBarMode (fl.controls.ProgressBarMode)
package fl.controls {
public class ProgressBarMode {
public static const MANUAL:String = "manual";
public static const EVENT:String = "event";
public static const POLLED:String = "polled";
}
}//package fl.controls
Section 50
//ScrollBar (fl.controls.ScrollBar)
package fl.controls {
import fl.core.*;
import flash.events.*;
import fl.events.*;
public class ScrollBar extends UIComponent {
private var _direction:String;// = "vertical"
protected var inDrag:Boolean;// = false
protected var upArrow:BaseButton;
private var _pageScrollSize:Number;// = 0
protected var downArrow:BaseButton;
private var _pageSize:Number;// = 10
private var thumbScrollOffset:Number;
private var _maxScrollPosition:Number;// = 0
private var _scrollPosition:Number;// = 0
protected var track:BaseButton;
private var _minScrollPosition:Number;// = 0
private var _lineScrollSize:Number;// = 1
protected var thumb:LabelButton;
protected static const THUMB_STYLES:Object = {disabledSkin:"thumbDisabledSkin", downSkin:"thumbDownSkin", overSkin:"thumbOverSkin", upSkin:"thumbUpSkin", icon:"thumbIcon", textPadding:0};
public static const WIDTH:Number = 15;
protected static const DOWN_ARROW_STYLES:Object = {disabledSkin:"downArrowDisabledSkin", downSkin:"downArrowDownSkin", overSkin:"downArrowOverSkin", upSkin:"downArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const UP_ARROW_STYLES:Object = {disabledSkin:"upArrowDisabledSkin", downSkin:"upArrowDownSkin", overSkin:"upArrowOverSkin", upSkin:"upArrowUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
protected static const TRACK_STYLES:Object = {disabledSkin:"trackDisabledSkin", downSkin:"trackDownSkin", overSkin:"trackOverSkin", upSkin:"trackUpSkin", repeatDelay:"repeatDelay", repeatInterval:"repeatInterval"};
private static var defaultStyles:Object = {downArrowDisabledSkin:"ScrollArrowDown_disabledSkin", downArrowDownSkin:"ScrollArrowDown_downSkin", downArrowOverSkin:"ScrollArrowDown_overSkin", downArrowUpSkin:"ScrollArrowDown_upSkin", thumbDisabledSkin:"ScrollThumb_upSkin", thumbDownSkin:"ScrollThumb_downSkin", thumbOverSkin:"ScrollThumb_overSkin", thumbUpSkin:"ScrollThumb_upSkin", trackDisabledSkin:"ScrollTrack_skin", trackDownSkin:"ScrollTrack_skin", trackOverSkin:"ScrollTrack_skin", trackUpSkin:"ScrollTrack_skin", upArrowDisabledSkin:"ScrollArrowUp_disabledSkin", upArrowDownSkin:"ScrollArrowUp_downSkin", upArrowOverSkin:"ScrollArrowUp_overSkin", upArrowUpSkin:"ScrollArrowUp_upSkin", thumbIcon:"ScrollBar_thumbIcon", repeatDelay:500, repeatInterval:35};
public function ScrollBar(){
_pageSize = 10;
_pageScrollSize = 0;
_lineScrollSize = 1;
_minScrollPosition = 0;
_maxScrollPosition = 0;
_scrollPosition = 0;
_direction = ScrollBarDirection.VERTICAL;
inDrag = false;
super();
setStyles();
focusEnabled = false;
}
public function get minScrollPosition():Number{
return (_minScrollPosition);
}
public function set minScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _arg1, _maxScrollPosition);
}
public function setScrollPosition(_arg1:Number, _arg2:Boolean=true):void{
var _local3:Number;
_local3 = scrollPosition;
_scrollPosition = Math.max(_minScrollPosition, Math.min(_maxScrollPosition, _arg1));
if (_local3 == _scrollPosition){
return;
};
if (_arg2){
dispatchEvent(new ScrollEvent(_direction, (scrollPosition - _local3), scrollPosition));
};
updateThumb();
}
public function set scrollPosition(_arg1:Number):void{
setScrollPosition(_arg1, true);
}
public function get pageScrollSize():Number{
return (((_pageScrollSize)==0) ? _pageSize : _pageScrollSize);
}
public function set pageSize(_arg1:Number):void{
if (_arg1 > 0){
_pageSize = _arg1;
};
}
public function setScrollProperties(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number=0):void{
this.pageSize = _arg1;
_minScrollPosition = _arg2;
_maxScrollPosition = _arg3;
if (_arg4 >= 0){
_pageScrollSize = _arg4;
};
enabled = (_maxScrollPosition > _minScrollPosition);
setScrollPosition(_scrollPosition, false);
updateThumb();
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
downArrow.enabled = (track.enabled = (thumb.enabled = (upArrow.enabled = ((enabled) && ((_maxScrollPosition > _minScrollPosition))))));
updateThumb();
}
protected function updateThumb():void{
var _local1:Number;
_local1 = ((_maxScrollPosition - _minScrollPosition) + _pageSize);
if ((((((track.height <= 12)) || ((_maxScrollPosition <= _minScrollPosition)))) || ((((_local1 == 0)) || (isNaN(_local1)))))){
thumb.height = 12;
thumb.visible = false;
} else {
thumb.height = Math.max(13, ((_pageSize / _local1) * track.height));
thumb.y = (track.y + ((track.height - thumb.height) * ((_scrollPosition - _minScrollPosition) / (_maxScrollPosition - _minScrollPosition))));
thumb.visible = enabled;
};
}
protected function thumbPressHandler(_arg1:MouseEvent):void{
inDrag = true;
thumbScrollOffset = (mouseY - thumb.y);
thumb.mouseStateLocked = true;
mouseChildren = false;
stage.addEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler, false, 0, true);
}
protected function thumbReleaseHandler(_arg1:MouseEvent):void{
inDrag = false;
mouseChildren = true;
thumb.mouseStateLocked = false;
stage.removeEventListener(MouseEvent.MOUSE_MOVE, handleThumbDrag);
stage.removeEventListener(MouseEvent.MOUSE_UP, thumbReleaseHandler);
}
public function set pageScrollSize(_arg1:Number):void{
if (_arg1 >= 0){
_pageScrollSize = _arg1;
};
}
protected function handleThumbDrag(_arg1:MouseEvent):void{
var _local2:Number;
_local2 = Math.max(0, Math.min((track.height - thumb.height), ((mouseY - track.y) - thumbScrollOffset)));
setScrollPosition((((_local2 / (track.height - thumb.height)) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition));
}
public function set direction(_arg1:String):void{
var _local2:Boolean;
if (_direction == _arg1){
return;
};
_direction = _arg1;
if (isLivePreview){
return;
};
setScaleY(1);
_local2 = (_direction == ScrollBarDirection.HORIZONTAL);
if (((_local2) && (componentInspectorSetting))){
if (rotation == 90){
return;
};
setScaleX(-1);
rotation = -90;
};
if (!componentInspectorSetting){
if (((_local2) && ((rotation == 0)))){
rotation = -90;
setScaleX(-1);
} else {
if (((!(_local2)) && ((rotation == -90)))){
rotation = 0;
setScaleX(1);
};
};
};
invalidate(InvalidationType.SIZE);
}
public function set lineScrollSize(_arg1:Number):void{
if (_arg1 > 0){
_lineScrollSize = _arg1;
};
}
override public function get height():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.width : super.height);
}
protected function scrollPressHandler(_arg1:ComponentEvent):void{
var _local2:Number;
var _local3:Number;
_arg1.stopImmediatePropagation();
if (_arg1.currentTarget == upArrow){
setScrollPosition((_scrollPosition - _lineScrollSize));
} else {
if (_arg1.currentTarget == downArrow){
setScrollPosition((_scrollPosition + _lineScrollSize));
} else {
_local2 = (((track.mouseY / track.height) * (_maxScrollPosition - _minScrollPosition)) + _minScrollPosition);
_local3 = ((pageScrollSize)==0) ? pageSize : pageScrollSize;
if (_scrollPosition < _local2){
setScrollPosition(Math.min(_local2, (_scrollPosition + _local3)));
} else {
if (_scrollPosition > _local2){
setScrollPosition(Math.max(_local2, (_scrollPosition - _local3)));
};
};
};
};
}
public function get pageSize():Number{
return (_pageSize);
}
public function set maxScrollPosition(_arg1:Number):void{
setScrollProperties(_pageSize, _minScrollPosition, _arg1);
}
public function get scrollPosition():Number{
return (_scrollPosition);
}
override public function get enabled():Boolean{
return (super.enabled);
}
override protected function draw():void{
var _local1:Number;
if (isInvalid(InvalidationType.SIZE)){
_local1 = super.height;
downArrow.move(0, Math.max(upArrow.height, (_local1 - downArrow.height)));
track.setSize(WIDTH, Math.max(0, (_local1 - (downArrow.height + upArrow.height))));
updateThumb();
};
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
setStyles();
};
downArrow.drawNow();
upArrow.drawNow();
track.drawNow();
thumb.drawNow();
validate();
}
override protected function configUI():void{
super.configUI();
track = new BaseButton();
track.move(0, 14);
track.useHandCursor = false;
track.autoRepeat = true;
track.focusEnabled = false;
addChild(track);
thumb = new LabelButton();
thumb.label = "";
thumb.setSize(WIDTH, 15);
thumb.move(0, 15);
thumb.focusEnabled = false;
addChild(thumb);
downArrow = new BaseButton();
downArrow.setSize(WIDTH, 14);
downArrow.autoRepeat = true;
downArrow.focusEnabled = false;
addChild(downArrow);
upArrow = new BaseButton();
upArrow.setSize(WIDTH, 14);
upArrow.move(0, 0);
upArrow.autoRepeat = true;
upArrow.focusEnabled = false;
addChild(upArrow);
upArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
downArrow.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
track.addEventListener(ComponentEvent.BUTTON_DOWN, scrollPressHandler, false, 0, true);
thumb.addEventListener(MouseEvent.MOUSE_DOWN, thumbPressHandler, false, 0, true);
enabled = false;
}
public function get direction():String{
return (_direction);
}
public function get lineScrollSize():Number{
return (_lineScrollSize);
}
override public function setSize(_arg1:Number, _arg2:Number):void{
if (_direction == ScrollBarDirection.HORIZONTAL){
super.setSize(_arg2, _arg1);
} else {
super.setSize(_arg1, _arg2);
};
}
public function get maxScrollPosition():Number{
return (_maxScrollPosition);
}
override public function get width():Number{
return (((_direction)==ScrollBarDirection.HORIZONTAL) ? super.height : super.width);
}
protected function setStyles():void{
copyStylesToChild(downArrow, DOWN_ARROW_STYLES);
copyStylesToChild(thumb, THUMB_STYLES);
copyStylesToChild(track, TRACK_STYLES);
copyStylesToChild(upArrow, UP_ARROW_STYLES);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 51
//ScrollBarDirection (fl.controls.ScrollBarDirection)
package fl.controls {
public class ScrollBarDirection {
public static const HORIZONTAL:String = "horizontal";
public static const VERTICAL:String = "vertical";
}
}//package fl.controls
Section 52
//ScrollPolicy (fl.controls.ScrollPolicy)
package fl.controls {
public class ScrollPolicy {
public static const OFF:String = "off";
public static const ON:String = "on";
public static const AUTO:String = "auto";
}
}//package fl.controls
Section 53
//SelectableList (fl.controls.SelectableList)
package fl.controls {
import fl.controls.listClasses.*;
import fl.core.*;
import flash.display.*;
import flash.events.*;
import fl.data.*;
import fl.managers.*;
import fl.events.*;
import flash.utils.*;
import fl.containers.*;
import flash.ui.*;
public class SelectableList extends BaseScrollPane implements IFocusManagerComponent {
protected var invalidItems:Dictionary;
protected var renderedItems:Dictionary;
protected var listHolder:Sprite;
protected var _allowMultipleSelection:Boolean;// = false
protected var lastCaretIndex:int;// = -1
protected var _selectedIndices:Array;
protected var availableCellRenderers:Array;
protected var list:Sprite;
protected var caretIndex:int;// = -1
protected var updatedRendererStyles:Object;
protected var preChangeItems:Array;
protected var activeCellRenderers:Array;
protected var rendererStyles:Object;
protected var _verticalScrollPosition:Number;
protected var _dataProvider:DataProvider;
protected var _horizontalScrollPosition:Number;
private var collectionItemImport:SimpleCollectionItem;
protected var _selectable:Boolean;// = true
private static var defaultStyles:Object = {skin:"List_skin", cellRenderer:CellRenderer, contentPadding:null, disabledAlpha:null};
public static var createAccessibilityImplementation:Function;
public function SelectableList(){
_allowMultipleSelection = false;
_selectable = true;
caretIndex = -1;
lastCaretIndex = -1;
super();
activeCellRenderers = [];
availableCellRenderers = [];
invalidItems = new Dictionary(true);
renderedItems = new Dictionary(true);
_selectedIndices = [];
if (dataProvider == null){
dataProvider = new DataProvider();
};
verticalScrollPolicy = ScrollPolicy.AUTO;
rendererStyles = {};
updatedRendererStyles = {};
}
protected function drawList():void{
}
public function set allowMultipleSelection(_arg1:Boolean):void{
if (_arg1 == _allowMultipleSelection){
return;
};
_allowMultipleSelection = _arg1;
if (((!(_arg1)) && ((_selectedIndices.length > 1)))){
_selectedIndices = [_selectedIndices.pop()];
invalidate(InvalidationType.DATA);
};
}
public function sortItemsOn(_arg1:String, _arg2:Object=null){
return (_dataProvider.sortOn(_arg1, _arg2));
}
public function removeItemAt(_arg1:uint):Object{
return (_dataProvider.removeItemAt(_arg1));
}
public function get selectedItem():Object{
return (((_selectedIndices.length)==0) ? null : _dataProvider.getItemAt(selectedIndex));
}
override protected function keyDownHandler(_arg1:KeyboardEvent):void{
if (!selectable){
return;
};
switch (_arg1.keyCode){
case Keyboard.UP:
case Keyboard.DOWN:
case Keyboard.END:
case Keyboard.HOME:
case Keyboard.PAGE_UP:
case Keyboard.PAGE_DOWN:
moveSelectionVertically(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
case Keyboard.LEFT:
case Keyboard.RIGHT:
moveSelectionHorizontally(_arg1.keyCode, ((_arg1.shiftKey) && (_allowMultipleSelection)), ((_arg1.ctrlKey) && (_allowMultipleSelection)));
_arg1.stopPropagation();
break;
};
}
public function get selectable():Boolean{
return (_selectable);
}
public function itemToCellRenderer(_arg1:Object):ICellRenderer{
var _local2:*;
var _local3:ICellRenderer;
if (_arg1 != null){
for (_local2 in activeCellRenderers) {
_local3 = (activeCellRenderers[_local2] as ICellRenderer);
if (_local3.data == _arg1){
return (_local3);
};
};
};
return (null);
}
public function getNextIndexAtLetter(_arg1:String, _arg2:int=-1):int{
var _local3:int;
var _local4:Number;
var _local5:Number;
var _local6:Object;
var _local7:String;
if (length == 0){
return (-1);
};
_arg1 = _arg1.toUpperCase();
_local3 = (length - 1);
_local4 = 0;
while (_local4 < _local3) {
_local5 = ((_arg2 + 1) + _local4);
if (_local5 > (length - 1)){
_local5 = (_local5 - length);
};
_local6 = getItemAt(_local5);
if (_local6 == null){
break;
};
_local7 = itemToLabel(_local6);
if (_local7 == null){
} else {
if (_local7.charAt(0).toUpperCase() == _arg1){
return (_local5);
};
};
_local4++;
};
return (-1);
}
public function invalidateList():void{
_invalidateList();
invalidate(InvalidationType.DATA);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
list.mouseChildren = _enabled;
}
public function get selectedIndices():Array{
return (_selectedIndices.concat());
}
public function set selectable(_arg1:Boolean):void{
if (_arg1 == _selectable){
return;
};
if (!_arg1){
selectedIndices = [];
};
_selectable = _arg1;
}
public function itemToLabel(_arg1:Object):String{
return (_arg1["label"]);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
_dataProvider.addItemAt(_arg1, _arg2);
invalidateList();
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
return (_dataProvider.replaceItemAt(_arg1, _arg2));
}
protected function handleDataChange(_arg1:DataChangeEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:uint;
_local2 = _arg1.startIndex;
_local3 = _arg1.endIndex;
_local4 = _arg1.changeType;
if (_local4 == DataChangeType.INVALIDATE_ALL){
clearSelection();
invalidateList();
} else {
if (_local4 == DataChangeType.INVALIDATE){
_local5 = 0;
while (_local5 < _arg1.items.length) {
invalidateItem(_arg1.items[_local5]);
_local5++;
};
} else {
if (_local4 == DataChangeType.ADD){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
_selectedIndices[_local5] = (_selectedIndices[_local5] + (_local2 - _local3));
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE){
_local5 = 0;
while (_local5 < _selectedIndices.length) {
if (_selectedIndices[_local5] >= _local2){
if (_selectedIndices[_local5] <= _local3){
delete _selectedIndices[_local5];
} else {
_selectedIndices[_local5] = (_selectedIndices[_local5] - ((_local2 - _local3) + 1));
};
};
_local5++;
};
} else {
if (_local4 == DataChangeType.REMOVE_ALL){
clearSelection();
} else {
if (_local4 == DataChangeType.REPLACE){
} else {
selectedItems = preChangeItems;
preChangeItems = null;
};
};
};
};
};
};
invalidate(InvalidationType.DATA);
}
protected function _invalidateList():void{
availableCellRenderers = [];
while (activeCellRenderers.length > 0) {
list.removeChild((activeCellRenderers.pop() as DisplayObject));
};
}
protected function updateRendererStyles():void{
var _local1:Array;
var _local2:uint;
var _local3:uint;
var _local4:String;
_local1 = availableCellRenderers.concat(activeCellRenderers);
_local2 = _local1.length;
_local3 = 0;
while (_local3 < _local2) {
if (_local1[_local3].setStyle == null){
} else {
for (_local4 in updatedRendererStyles) {
_local1[_local3].setStyle(_local4, updatedRendererStyles[_local4]);
};
_local1[_local3].drawNow();
};
_local3++;
};
updatedRendererStyles = {};
}
public function set selectedItem(_arg1:Object):void{
var _local2:int;
_local2 = _dataProvider.getItemIndex(_arg1);
selectedIndex = _local2;
}
public function sortItems(... _args){
return (_dataProvider.sort.apply(_dataProvider, _args));
}
public function removeAll():void{
_dataProvider.removeAll();
}
protected function handleCellRendererChange(_arg1:Event):void{
var _local2:ICellRenderer;
var _local3:uint;
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
_dataProvider.invalidateItemAt(_local3);
}
protected function moveSelectionVertically(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
override protected function setHorizontalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _horizontalScrollPosition){
return;
};
_local3 = (_arg1 - _horizontalScrollPosition);
_horizontalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.HORIZONTAL, _local3, _arg1));
};
}
public function scrollToSelected():void{
scrollToIndex(selectedIndex);
}
public function invalidateItem(_arg1:Object):void{
if (renderedItems[_arg1] == null){
return;
};
invalidItems[_arg1] = true;
invalidate(InvalidationType.DATA);
}
protected function handleCellRendererClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
var _local4:int;
var _local5:int;
var _local6:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
if (((!(dispatchEvent(new ListEvent(ListEvent.ITEM_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data)))) || (!(_selectable)))){
return;
};
_local4 = selectedIndices.indexOf(_local3);
if (!_allowMultipleSelection){
if (_local4 != -1){
return;
};
_local2.selected = true;
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
} else {
if (_arg1.shiftKey){
_local6 = ((_selectedIndices.length)>0) ? _selectedIndices[0] : _local3;
_selectedIndices = [];
if (_local6 > _local3){
_local5 = _local6;
while (_local5 >= _local3) {
_selectedIndices.push(_local5);
_local5--;
};
} else {
_local5 = _local6;
while (_local5 <= _local3) {
_selectedIndices.push(_local5);
_local5++;
};
};
caretIndex = _local3;
} else {
if (_arg1.ctrlKey){
if (_local4 != -1){
_local2.selected = false;
_selectedIndices.splice(_local4, 1);
} else {
_local2.selected = true;
_selectedIndices.push(_local3);
};
caretIndex = _local3;
} else {
_selectedIndices = [_local3];
lastCaretIndex = (caretIndex = _local3);
};
};
};
dispatchEvent(new Event(Event.CHANGE));
invalidate(InvalidationType.DATA);
}
public function get length():uint{
return (_dataProvider.length);
}
public function get allowMultipleSelection():Boolean{
return (_allowMultipleSelection);
}
protected function onPreChange(_arg1:DataChangeEvent):void{
switch (_arg1.changeType){
case DataChangeType.REMOVE:
case DataChangeType.ADD:
case DataChangeType.INVALIDATE:
case DataChangeType.REMOVE_ALL:
case DataChangeType.REPLACE:
case DataChangeType.INVALIDATE_ALL:
break;
default:
preChangeItems = selectedItems;
break;
};
}
public function getRendererStyle(_arg1:String, _arg2:int=-1):Object{
return (rendererStyles[_arg1]);
}
override protected function setVerticalScrollPosition(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg1 == _verticalScrollPosition){
return;
};
_local3 = (_arg1 - _verticalScrollPosition);
_verticalScrollPosition = _arg1;
if (_arg2){
dispatchEvent(new ScrollEvent(ScrollBarDirection.VERTICAL, _local3, _arg1));
};
}
protected function moveSelectionHorizontally(_arg1:uint, _arg2:Boolean, _arg3:Boolean):void{
}
public function set selectedIndices(_arg1:Array):void{
if (!_selectable){
return;
};
_selectedIndices = ((_arg1)==null) ? [] : _arg1.concat();
invalidate(InvalidationType.SELECTED);
}
public function get selectedIndex():int{
return (((_selectedIndices.length)==0) ? -1 : _selectedIndices[(_selectedIndices.length - 1)]);
}
override protected function draw():void{
super.draw();
}
override protected function configUI():void{
super.configUI();
listHolder = new Sprite();
addChild(listHolder);
listHolder.scrollRect = contentScrollRect;
list = new Sprite();
listHolder.addChild(list);
}
public function addItem(_arg1:Object):void{
_dataProvider.addItem(_arg1);
invalidateList();
}
protected function handleCellRendererMouseEvent(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:String;
_local2 = (_arg1.target as ICellRenderer);
_local3 = ((_arg1.type)==MouseEvent.ROLL_OVER) ? ListEvent.ITEM_ROLL_OVER : ListEvent.ITEM_ROLL_OUT;
dispatchEvent(new ListEvent(_local3, false, false, _local2.listData.column, _local2.listData.row, _local2.listData.index, _local2.data));
}
public function clearRendererStyle(_arg1:String, _arg2:int=-1):void{
delete rendererStyles[_arg1];
updatedRendererStyles[_arg1] = null;
invalidate(InvalidationType.RENDERER_STYLES);
}
protected function handleCellRendererDoubleClick(_arg1:MouseEvent):void{
var _local2:ICellRenderer;
var _local3:uint;
if (!_enabled){
return;
};
_local2 = (_arg1.currentTarget as ICellRenderer);
_local3 = _local2.listData.index;
dispatchEvent(new ListEvent(ListEvent.ITEM_DOUBLE_CLICK, false, true, _local2.listData.column, _local2.listData.row, _local3, _local2.data));
}
public function get rowCount():uint{
return (0);
}
public function isItemSelected(_arg1:Object):Boolean{
return ((selectedItems.indexOf(_arg1) > -1));
}
public function set dataProvider(_arg1:DataProvider):void{
if (_dataProvider != null){
_dataProvider.removeEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange);
_dataProvider.removeEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange);
};
_dataProvider = _arg1;
_dataProvider.addEventListener(DataChangeEvent.DATA_CHANGE, handleDataChange, false, 0, true);
_dataProvider.addEventListener(DataChangeEvent.PRE_DATA_CHANGE, onPreChange, false, 0, true);
clearSelection();
invalidateList();
}
override protected function drawLayout():void{
super.drawLayout();
contentScrollRect = listHolder.scrollRect;
contentScrollRect.width = availableWidth;
contentScrollRect.height = availableHeight;
listHolder.scrollRect = contentScrollRect;
}
public function getItemAt(_arg1:uint):Object{
return (_dataProvider.getItemAt(_arg1));
}
override protected function initializeAccessibility():void{
if (SelectableList.createAccessibilityImplementation != null){
SelectableList.createAccessibilityImplementation(this);
};
}
public function scrollToIndex(_arg1:int):void{
}
public function removeItem(_arg1:Object):Object{
return (_dataProvider.removeItem(_arg1));
}
public function get dataProvider():DataProvider{
return (_dataProvider);
}
public function set maxHorizontalScrollPosition(_arg1:Number):void{
_maxHorizontalScrollPosition = _arg1;
invalidate(InvalidationType.SIZE);
}
public function setRendererStyle(_arg1:String, _arg2:Object, _arg3:uint=0):void{
if (rendererStyles[_arg1] == _arg2){
return;
};
updatedRendererStyles[_arg1] = _arg2;
rendererStyles[_arg1] = _arg2;
invalidate(InvalidationType.RENDERER_STYLES);
}
public function invalidateItemAt(_arg1:uint):void{
var _local2:Object;
_local2 = _dataProvider.getItemAt(_arg1);
if (_local2 != null){
invalidateItem(_local2);
};
}
public function set selectedItems(_arg1:Array):void{
var _local2:Array;
var _local3:uint;
var _local4:int;
if (_arg1 == null){
selectedIndices = null;
return;
};
_local2 = [];
_local3 = 0;
while (_local3 < _arg1.length) {
_local4 = _dataProvider.getItemIndex(_arg1[_local3]);
if (_local4 != -1){
_local2.push(_local4);
};
_local3++;
};
selectedIndices = _local2;
}
public function clearSelection():void{
selectedIndex = -1;
}
override public function get maxHorizontalScrollPosition():Number{
return (_maxHorizontalScrollPosition);
}
public function get selectedItems():Array{
var _local1:Array;
var _local2:uint;
_local1 = [];
_local2 = 0;
while (_local2 < _selectedIndices.length) {
_local1.push(_dataProvider.getItemAt(_selectedIndices[_local2]));
_local2++;
};
return (_local1);
}
public function set selectedIndex(_arg1:int):void{
selectedIndices = ((_arg1)==-1) ? null : [_arg1];
}
public static function getStyleDefinition():Object{
return (mergeStyles(defaultStyles, BaseScrollPane.getStyleDefinition()));
}
}
}//package fl.controls
Section 54
//TextInput (fl.controls.TextInput)
package fl.controls {
import fl.core.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.ui.*;
public class TextInput extends UIComponent implements IFocusManagerComponent {
protected var _html:Boolean;// = false
protected var _savedHTML:String;
protected var background:DisplayObject;
protected var _editable:Boolean;// = true
public var textField:TextField;
private static var defaultStyles:Object = {upSkin:"TextInput_upSkin", disabledSkin:"TextInput_disabledSkin", focusRectSkin:null, focusRectPadding:null, textFormat:null, disabledTextFormat:null, textPadding:0, embedFonts:false};
public static var createAccessibilityImplementation:Function;
public function TextInput(){
_editable = true;
_html = false;
super();
}
override public function drawFocus(_arg1:Boolean):void{
if (focusTarget != null){
focusTarget.drawFocus(_arg1);
return;
};
super.drawFocus(_arg1);
}
public function set imeMode(_arg1:String):void{
_imeMode = _arg1;
}
override protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((((_arg1 == textField)) || (super.isOurFocus(_arg1))));
}
protected function handleKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
dispatchEvent(new ComponentEvent(ComponentEvent.ENTER, true));
};
}
public function set text(_arg1:String):void{
textField.text = _arg1;
_html = false;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
protected function updateTextFieldType():void{
textField.type = (((enabled) && (editable))) ? TextFieldType.INPUT : TextFieldType.DYNAMIC;
textField.selectable = enabled;
}
public function get selectionEndIndex():int{
return (textField.selectionEndIndex);
}
public function get editable():Boolean{
return (_editable);
}
override protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (_arg1.target == this){
stage.focus = textField;
};
_local2 = focusManager;
if (((editable) && (_local2))){
_local2.showFocusIndicator = true;
if (((textField.selectable) && ((textField.selectionBeginIndex == textField.selectionBeginIndex)))){
setSelection(0, textField.length);
};
};
super.focusInHandler(_arg1);
if (editable){
setIMEMode(true);
};
}
public function get selectionBeginIndex():int{
return (textField.selectionBeginIndex);
}
public function set alwaysShowSelection(_arg1:Boolean):void{
textField.alwaysShowSelection = _arg1;
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
updateTextFieldType();
}
protected function setEmbedFont(){
var _local1:Object;
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
}
public function get horizontalScrollPosition():int{
return (textField.scrollH);
}
public function set condenseWhite(_arg1:Boolean):void{
textField.condenseWhite = _arg1;
}
public function set displayAsPassword(_arg1:Boolean):void{
textField.displayAsPassword = _arg1;
}
public function set horizontalScrollPosition(_arg1:int):void{
textField.scrollH = _arg1;
}
public function get restrict():String{
return (textField.restrict);
}
public function get textWidth():Number{
return (textField.textWidth);
}
public function get textHeight():Number{
return (textField.textHeight);
}
public function set editable(_arg1:Boolean):void{
_editable = _arg1;
updateTextFieldType();
}
public function get maxChars():int{
return (textField.maxChars);
}
public function get length():int{
return (textField.length);
}
public function getLineMetrics(_arg1:int):TextLineMetrics{
return (textField.getLineMetrics(_arg1));
}
public function get imeMode():String{
return (_imeMode);
}
override protected function focusOutHandler(_arg1:FocusEvent):void{
super.focusOutHandler(_arg1);
if (editable){
setIMEMode(false);
};
}
public function set htmlText(_arg1:String):void{
if (_arg1 == ""){
text = "";
return;
};
_html = true;
_savedHTML = _arg1;
textField.htmlText = _arg1;
invalidate(InvalidationType.DATA);
invalidate(InvalidationType.STYLES);
}
public function get text():String{
return (textField.text);
}
override public function get enabled():Boolean{
return (super.enabled);
}
public function get condenseWhite():Boolean{
return (textField.condenseWhite);
}
public function get alwaysShowSelection():Boolean{
return (textField.alwaysShowSelection);
}
override protected function draw():void{
var _local1:Object;
if (isInvalid(InvalidationType.STYLES, InvalidationType.STATE)){
drawTextFormat();
drawBackground();
_local1 = getStyleValue("embedFonts");
if (_local1 != null){
textField.embedFonts = _local1;
};
invalidate(InvalidationType.SIZE, false);
};
if (isInvalid(InvalidationType.SIZE)){
drawLayout();
};
super.draw();
}
protected function handleTextInput(_arg1:TextEvent):void{
_arg1.stopPropagation();
dispatchEvent(new TextEvent(TextEvent.TEXT_INPUT, true, false, _arg1.text));
}
override protected function configUI():void{
super.configUI();
tabChildren = true;
textField = new TextField();
addChild(textField);
updateTextFieldType();
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput, false, 0, true);
textField.addEventListener(Event.CHANGE, handleChange, false, 0, true);
textField.addEventListener(KeyboardEvent.KEY_DOWN, handleKeyDown, false, 0, true);
}
public function setSelection(_arg1:int, _arg2:int):void{
textField.setSelection(_arg1, _arg2);
}
public function get displayAsPassword():Boolean{
return (textField.displayAsPassword);
}
public function appendText(_arg1:String):void{
textField.appendText(_arg1);
}
public function set restrict(_arg1:String):void{
if (((componentInspectorSetting) && ((_arg1 == "")))){
_arg1 = null;
};
textField.restrict = _arg1;
}
public function get htmlText():String{
return (textField.htmlText);
}
protected function drawBackground():void{
var _local1:DisplayObject;
var _local2:String;
_local1 = background;
_local2 = (enabled) ? "upSkin" : "disabledSkin";
background = getDisplayObjectInstance(getStyleValue(_local2));
if (background == null){
return;
};
addChildAt(background, 0);
if (((((!((_local1 == null))) && (!((_local1 == background))))) && (contains(_local1)))){
removeChild(_local1);
};
}
override public function setFocus():void{
stage.focus = textField;
}
protected function drawLayout():void{
var _local1:Number;
_local1 = Number(getStyleValue("textPadding"));
if (background != null){
background.width = width;
background.height = height;
};
textField.width = (width - (2 * _local1));
textField.height = (height - (2 * _local1));
textField.x = (textField.y = _local1);
}
public function set maxChars(_arg1:int):void{
textField.maxChars = _arg1;
}
public function get maxHorizontalScrollPosition():int{
return (textField.maxScrollH);
}
protected function drawTextFormat():void{
var _local1:Object;
var _local2:TextFormat;
var _local3:TextFormat;
_local1 = UIComponent.getStyleDefinition();
_local2 = (enabled) ? (_local1.defaultTextFormat as TextFormat) : (_local1.defaultDisabledTextFormat as TextFormat);
textField.setTextFormat(_local2);
_local3 = (getStyleValue((enabled) ? "textFormat" : "disabledTextFormat") as TextFormat);
if (_local3 != null){
textField.setTextFormat(_local3);
} else {
_local3 = _local2;
};
textField.defaultTextFormat = _local3;
setEmbedFont();
if (_html){
textField.htmlText = _savedHTML;
};
}
protected function handleChange(_arg1:Event):void{
_arg1.stopPropagation();
dispatchEvent(new Event(Event.CHANGE, true));
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
}
}//package fl.controls
Section 55
//ComponentShim (fl.core.ComponentShim)
package fl.core {
import flash.display.*;
public dynamic class ComponentShim extends MovieClip {
}
}//package fl.core
Section 56
//InvalidationType (fl.core.InvalidationType)
package fl.core {
public class InvalidationType {
public static const SIZE:String = "size";
public static const ALL:String = "all";
public static const DATA:String = "data";
public static const SCROLL:String = "scroll";
public static const STATE:String = "state";
public static const STYLES:String = "styles";
public static const SELECTED:String = "selected";
public static const RENDERER_STYLES:String = "rendererStyles";
}
}//package fl.core
Section 57
//UIComponent (fl.core.UIComponent)
package fl.core {
import flash.display.*;
import flash.text.*;
import flash.events.*;
import fl.managers.*;
import fl.events.*;
import flash.utils.*;
import flash.system.*;
public class UIComponent extends Sprite {
protected var _enabled:Boolean;// = true
private var _mouseFocusEnabled:Boolean;// = true
protected var startHeight:Number;
protected var _height:Number;
protected var _oldIMEMode:String;// = null
protected var startWidth:Number;
public var focusTarget:IFocusManagerComponent;
protected var errorCaught:Boolean;// = false
protected var uiFocusRect:DisplayObject;
protected var _width:Number;
public var version:String;// = "3.0.0.15"
protected var isFocused:Boolean;// = false
protected var callLaterMethods:Dictionary;
private var _focusEnabled:Boolean;// = true
private var tempText:TextField;
protected var invalidateFlag:Boolean;// = false
protected var _inspector:Boolean;// = false
protected var sharedStyles:Object;
protected var invalidHash:Object;
protected var isLivePreview:Boolean;// = false
protected var _imeMode:String;// = null
protected var instanceStyles:Object;
protected var _x:Number;
protected var _y:Number;
public static var inCallLaterPhase:Boolean = false;
private static var defaultStyles:Object = {focusRectSkin:"focusRectSkin", focusRectPadding:2, textFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), disabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultTextFormat:new TextFormat("_sans", 11, 0, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0), defaultDisabledTextFormat:new TextFormat("_sans", 11, 0x999999, false, false, false, "", "", TextFormatAlign.LEFT, 0, 0, 0, 0)};
public static var createAccessibilityImplementation:Function;
private static var focusManagers:Dictionary = new Dictionary(false);
public function UIComponent(){
version = "3.0.0.15";
isLivePreview = false;
invalidateFlag = false;
_enabled = true;
isFocused = false;
_focusEnabled = true;
_mouseFocusEnabled = true;
_imeMode = null;
_oldIMEMode = null;
errorCaught = false;
_inspector = false;
super();
instanceStyles = {};
sharedStyles = {};
invalidHash = {};
callLaterMethods = new Dictionary();
StyleManager.registerInstance(this);
configUI();
invalidate(InvalidationType.ALL);
tabEnabled = (this is IFocusManagerComponent);
focusRect = false;
if (tabEnabled){
addEventListener(FocusEvent.FOCUS_IN, focusInHandler);
addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler);
addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler);
addEventListener(KeyboardEvent.KEY_UP, keyUpHandler);
};
initializeFocusManager();
addEventListener(Event.ENTER_FRAME, hookAccessibility, false, 0, true);
}
public function drawFocus(_arg1:Boolean):void{
var _local2:Number;
isFocused = _arg1;
if (((!((uiFocusRect == null))) && (contains(uiFocusRect)))){
removeChild(uiFocusRect);
uiFocusRect = null;
};
if (_arg1){
uiFocusRect = (getDisplayObjectInstance(getStyleValue("focusRectSkin")) as Sprite);
if (uiFocusRect == null){
return;
};
_local2 = Number(getStyleValue("focusRectPadding"));
uiFocusRect.x = -(_local2);
uiFocusRect.y = -(_local2);
uiFocusRect.width = (width + (_local2 * 2));
uiFocusRect.height = (height + (_local2 * 2));
addChildAt(uiFocusRect, 0);
};
}
private function callLaterDispatcher(_arg1:Event):void{
var _local2:Dictionary;
var _local3:Object;
if (_arg1.type == Event.ADDED_TO_STAGE){
removeEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher);
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
return;
};
_arg1.target.removeEventListener(Event.RENDER, callLaterDispatcher);
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
return;
};
inCallLaterPhase = true;
_local2 = callLaterMethods;
for (_local3 in _local2) {
_local3();
delete _local2[_local3];
};
inCallLaterPhase = false;
}
private function addedHandler(_arg1:Event):void{
removeEventListener("addedToStage", addedHandler);
initializeFocusManager();
}
protected function getStyleValue(_arg1:String):Object{
return (((instanceStyles[_arg1])==null) ? sharedStyles[_arg1] : instanceStyles[_arg1]);
}
protected function isOurFocus(_arg1:DisplayObject):Boolean{
return ((_arg1 == this));
}
override public function get scaleX():Number{
return ((width / startWidth));
}
override public function get scaleY():Number{
return ((height / startHeight));
}
override public function set height(_arg1:Number):void{
if (_height == _arg1){
return;
};
setSize(width, _arg1);
}
protected function keyDownHandler(_arg1:KeyboardEvent):void{
}
protected function focusInHandler(_arg1:FocusEvent):void{
var _local2:IFocusManager;
if (isOurFocus((_arg1.target as DisplayObject))){
_local2 = focusManager;
if (((_local2) && (_local2.showFocusIndicator))){
drawFocus(true);
isFocused = true;
};
};
}
public function setStyle(_arg1:String, _arg2:Object):void{
if ((((instanceStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
instanceStyles[_arg1] = _arg2;
invalidate(InvalidationType.STYLES);
}
override public function get visible():Boolean{
return (super.visible);
}
public function get componentInspectorSetting():Boolean{
return (_inspector);
}
override public function get x():Number{
return ((isNaN(_x)) ? super.x : _x);
}
override public function get y():Number{
return ((isNaN(_y)) ? super.y : _y);
}
protected function setIMEMode(_arg1:Boolean){
var enabled = _arg1;
if (_imeMode != null){
if (enabled){
IME.enabled = true;
_oldIMEMode = IME.conversionMode;
try {
if (((!(errorCaught)) && (!((IME.conversionMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _imeMode;
};
errorCaught = false;
} catch(e:Error) {
errorCaught = true;
throw (new Error(("IME mode not supported: " + _imeMode)));
};
} else {
if (((!((IME.conversionMode == IMEConversionMode.UNKNOWN))) && (!((_oldIMEMode == IMEConversionMode.UNKNOWN))))){
IME.conversionMode = _oldIMEMode;
};
IME.enabled = false;
};
};
}
public function set enabled(_arg1:Boolean):void{
if (_arg1 == _enabled){
return;
};
_enabled = _arg1;
invalidate(InvalidationType.STATE);
}
public function setSharedStyle(_arg1:String, _arg2:Object):void{
if ((((sharedStyles[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
sharedStyles[_arg1] = _arg2;
if (instanceStyles[_arg1] == null){
invalidate(InvalidationType.STYLES);
};
}
protected function keyUpHandler(_arg1:KeyboardEvent):void{
}
public function set focusEnabled(_arg1:Boolean):void{
_focusEnabled = _arg1;
}
override public function set scaleX(_arg1:Number):void{
setSize((startWidth * _arg1), height);
}
public function get mouseFocusEnabled():Boolean{
return (_mouseFocusEnabled);
}
override public function set scaleY(_arg1:Number):void{
setSize(width, (startHeight * _arg1));
}
protected function getDisplayObjectInstance(_arg1:Object):DisplayObject{
var classDef:Object;
var skin = _arg1;
classDef = null;
if ((skin is Class)){
return ((new (skin) as DisplayObject));
};
if ((skin is DisplayObject)){
(skin as DisplayObject).x = 0;
(skin as DisplayObject).y = 0;
return ((skin as DisplayObject));
};
try {
classDef = getDefinitionByName(skin.toString());
} catch(e:Error) {
try {
classDef = (loaderInfo.applicationDomain.getDefinition(skin.toString()) as Object);
} catch(e:Error) {
};
};
if (classDef == null){
return (null);
};
return ((new (classDef) as DisplayObject));
}
protected function copyStylesToChild(_arg1:UIComponent, _arg2:Object):void{
var _local3:String;
for (_local3 in _arg2) {
_arg1.setStyle(_local3, getStyleValue(_arg2[_local3]));
};
}
protected function beforeComponentParameters():void{
}
protected function callLater(_arg1:Function):void{
if (inCallLaterPhase){
return;
};
callLaterMethods[_arg1] = true;
if (stage != null){
stage.addEventListener(Event.RENDER, callLaterDispatcher, false, 0, true);
stage.invalidate();
} else {
addEventListener(Event.ADDED_TO_STAGE, callLaterDispatcher, false, 0, true);
};
}
protected function createFocusManager():void{
if (focusManagers[stage] == null){
focusManagers[stage] = new FocusManager(stage);
};
}
override public function set visible(_arg1:Boolean):void{
var _local2:String;
if (super.visible == _arg1){
return;
};
super.visible = _arg1;
_local2 = (_arg1) ? ComponentEvent.SHOW : ComponentEvent.HIDE;
dispatchEvent(new ComponentEvent(_local2, true));
}
protected function hookAccessibility(_arg1:Event):void{
removeEventListener(Event.ENTER_FRAME, hookAccessibility);
initializeAccessibility();
}
public function set componentInspectorSetting(_arg1:Boolean):void{
_inspector = _arg1;
if (_inspector){
beforeComponentParameters();
} else {
afterComponentParameters();
};
}
override public function set x(_arg1:Number):void{
move(_arg1, _y);
}
public function drawNow():void{
draw();
}
override public function set y(_arg1:Number):void{
move(_x, _arg1);
}
protected function checkLivePreview():Boolean{
var className:String;
if (parent == null){
return (false);
};
try {
className = getQualifiedClassName(parent);
} catch(e:Error) {
};
return ((className == "fl.livepreview::LivePreviewParent"));
}
protected function focusOutHandler(_arg1:FocusEvent):void{
if (isOurFocus((_arg1.target as DisplayObject))){
drawFocus(false);
isFocused = false;
};
}
public function set mouseFocusEnabled(_arg1:Boolean):void{
_mouseFocusEnabled = _arg1;
}
public function getFocus():InteractiveObject{
if (stage){
return (stage.focus);
};
return (null);
}
protected function validate():void{
invalidHash = {};
}
override public function get height():Number{
return (_height);
}
public function invalidate(_arg1:String="all", _arg2:Boolean=true):void{
invalidHash[_arg1] = true;
if (_arg2){
this.callLater(draw);
};
}
public function get enabled():Boolean{
return (_enabled);
}
protected function getScaleX():Number{
return (super.scaleX);
}
protected function getScaleY():Number{
return (super.scaleY);
}
public function get focusEnabled():Boolean{
return (_focusEnabled);
}
protected function afterComponentParameters():void{
}
protected function draw():void{
if (isInvalid(InvalidationType.SIZE, InvalidationType.STYLES)){
if (((isFocused) && (focusManager.showFocusIndicator))){
drawFocus(true);
};
};
validate();
}
protected function configUI():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
isLivePreview = checkLivePreview();
_local1 = rotation;
rotation = 0;
_local2 = super.width;
_local3 = super.height;
var _local4 = 1;
super.scaleY = _local4;
super.scaleX = _local4;
setSize(_local2, _local3);
move(super.x, super.y);
rotation = _local1;
startWidth = _local2;
startHeight = _local3;
if (numChildren > 0){
removeChildAt(0);
};
}
protected function setScaleX(_arg1:Number):void{
super.scaleX = _arg1;
}
protected function setScaleY(_arg1:Number):void{
super.scaleY = _arg1;
}
private function initializeFocusManager():void{
if (stage == null){
addEventListener(Event.ADDED_TO_STAGE, addedHandler, false, 0, true);
} else {
createFocusManager();
};
}
public function set focusManager(_arg1:IFocusManager):void{
UIComponent.focusManagers[this] = _arg1;
}
public function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
protected function isInvalid(_arg1:String, ... _args):Boolean{
if (((invalidHash[_arg1]) || (invalidHash[InvalidationType.ALL]))){
return (true);
};
while (_args.length > 0) {
if (invalidHash[_args.pop()]){
return (true);
};
};
return (false);
}
public function setSize(_arg1:Number, _arg2:Number):void{
_width = _arg1;
_height = _arg2;
invalidate(InvalidationType.SIZE);
dispatchEvent(new ComponentEvent(ComponentEvent.RESIZE, false));
}
override public function set width(_arg1:Number):void{
if (_width == _arg1){
return;
};
setSize(_arg1, height);
}
public function setFocus():void{
if (stage){
stage.focus = this;
};
}
protected function initializeAccessibility():void{
if (UIComponent.createAccessibilityImplementation != null){
UIComponent.createAccessibilityImplementation(this);
};
}
public function get focusManager():IFocusManager{
var _local1:DisplayObject;
_local1 = this;
while (_local1) {
if (UIComponent.focusManagers[_local1] != null){
return (IFocusManager(UIComponent.focusManagers[_local1]));
};
_local1 = _local1.parent;
};
return (null);
}
override public function get width():Number{
return (_width);
}
public function move(_arg1:Number, _arg2:Number):void{
_x = _arg1;
_y = _arg2;
super.x = Math.round(_arg1);
super.y = Math.round(_arg2);
dispatchEvent(new ComponentEvent(ComponentEvent.MOVE));
}
public function validateNow():void{
invalidate(InvalidationType.ALL, false);
draw();
}
public function getStyle(_arg1:String):Object{
return (instanceStyles[_arg1]);
}
public static function getStyleDefinition():Object{
return (defaultStyles);
}
public static function mergeStyles(... _args):Object{
var _local2:Object;
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:String;
_local2 = {};
_local3 = _args.length;
_local4 = 0;
while (_local4 < _local3) {
_local5 = _args[_local4];
for (_local6 in _local5) {
if (_local2[_local6] != null){
} else {
_local2[_local6] = _args[_local4][_local6];
};
};
_local4++;
};
return (_local2);
}
}
}//package fl.core
Section 58
//DataProvider (fl.data.DataProvider)
package fl.data {
import flash.events.*;
import fl.events.*;
public class DataProvider extends EventDispatcher {
protected var data:Array;
public function DataProvider(_arg1:Object=null){
if (_arg1 == null){
data = [];
} else {
data = getDataFromObject(_arg1);
};
}
protected function dispatchPreChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.PRE_DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
public function invalidateItemAt(_arg1:int):void{
checkIndex(_arg1, (data.length - 1));
dispatchChangeEvent(DataChangeType.INVALIDATE, [data[_arg1]], _arg1, _arg1);
}
public function getItemIndex(_arg1:Object):int{
return (data.indexOf(_arg1));
}
protected function getDataFromObject(_arg1:Object):Array{
var _local2:Array;
var _local3:Array;
var _local4:uint;
var _local5:Object;
var _local6:XML;
var _local7:XMLList;
var _local8:XML;
var _local9:XMLList;
var _local10:XML;
var _local11:XMLList;
var _local12:XML;
if ((_arg1 is Array)){
_local3 = (_arg1 as Array);
if (_local3.length > 0){
if ((((_local3[0] is String)) || ((_local3[0] is Number)))){
_local2 = [];
_local4 = 0;
while (_local4 < _local3.length) {
_local5 = {label:String(_local3[_local4]), data:_local3[_local4]};
_local2.push(_local5);
_local4++;
};
return (_local2);
};
};
return (_arg1.concat());
} else {
if ((_arg1 is DataProvider)){
return (_arg1.toArray());
};
if ((_arg1 is XML)){
_local6 = (_arg1 as XML);
_local2 = [];
_local7 = _local6.*;
for each (_local8 in _local7) {
_arg1 = {};
_local9 = _local8.attributes();
for each (_local10 in _local9) {
_arg1[_local10.localName()] = _local10.toString();
};
_local11 = _local8.*;
for each (_local12 in _local11) {
if (_local12.hasSimpleContent()){
_arg1[_local12.localName()] = _local12.toString();
};
};
_local2.push(_arg1);
};
return (_local2);
//unresolved jump
};
};
throw (new ((!NULL! + !NULL!) + " to Array or DataProvider.").TypeError(!NULL!));
}
public function removeItemAt(_arg1:uint):Object{
var _local2:Array;
checkIndex(_arg1, (data.length - 1));
dispatchPreChangeEvent(DataChangeType.REMOVE, data.slice(_arg1, (_arg1 + 1)), _arg1, _arg1);
_local2 = data.splice(_arg1, 1);
dispatchChangeEvent(DataChangeType.REMOVE, _local2, _arg1, _arg1);
return (_local2[0]);
}
public function addItem(_arg1:Object):void{
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
data.push(_arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], (data.length - 1), (data.length - 1));
}
public function sortOn(_arg1:Object, _arg2:Object=null){
var _local3:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local3 = data.sortOn(_arg1, _arg2);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local3);
}
public function sort(... _args){
var _local2:Array;
dispatchPreChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
_local2 = data.sort.apply(data, _args);
dispatchChangeEvent(DataChangeType.SORT, data.concat(), 0, (data.length - 1));
return (_local2);
}
public function addItems(_arg1:Object):void{
addItemsAt(_arg1, data.length);
}
public function concat(_arg1:Object):void{
addItems(_arg1);
}
public function clone():DataProvider{
return (new DataProvider(data));
}
public function toArray():Array{
return (data.concat());
}
public function get length():uint{
return (data.length);
}
public function addItemAt(_arg1:Object, _arg2:uint):void{
checkIndex(_arg2, data.length);
dispatchPreChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
data.splice(_arg2, 0, _arg1);
dispatchChangeEvent(DataChangeType.ADD, [_arg1], _arg2, _arg2);
}
public function getItemAt(_arg1:uint):Object{
checkIndex(_arg1, (data.length - 1));
return (data[_arg1]);
}
override public function toString():String{
return ((("DataProvider [" + data.join(" , ")) + "]"));
}
public function invalidateItem(_arg1:Object):void{
var _local2:uint;
_local2 = getItemIndex(_arg1);
if (_local2 == -1){
return;
};
invalidateItemAt(_local2);
}
protected function dispatchChangeEvent(_arg1:String, _arg2:Array, _arg3:int, _arg4:int):void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, _arg1, _arg2, _arg3, _arg4));
}
protected function checkIndex(_arg1:int, _arg2:int):void{
if ((((_arg1 > _arg2)) || ((_arg1 < 0)))){
throw (new RangeError((((("DataProvider index (" + _arg1) + ") is not in acceptable range (0 - ") + _arg2) + ")")));
};
}
public function addItemsAt(_arg1:Object, _arg2:uint):void{
var _local3:Array;
checkIndex(_arg2, data.length);
_local3 = getDataFromObject(_arg1);
dispatchPreChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
data.splice.apply(data, [_arg2, 0].concat(_local3));
dispatchChangeEvent(DataChangeType.ADD, _local3, _arg2, ((_arg2 + _local3.length) - 1));
}
public function replaceItem(_arg1:Object, _arg2:Object):Object{
var _local3:int;
_local3 = getItemIndex(_arg2);
if (_local3 != -1){
return (replaceItemAt(_arg1, _local3));
};
return (null);
}
public function removeItem(_arg1:Object):Object{
var _local2:int;
_local2 = getItemIndex(_arg1);
if (_local2 != -1){
return (removeItemAt(_local2));
};
return (null);
}
public function merge(_arg1:Object):void{
var _local2:Array;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
_local2 = getDataFromObject(_arg1);
_local3 = _local2.length;
_local4 = data.length;
dispatchPreChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
_local5 = 0;
while (_local5 < _local3) {
_local6 = _local2[_local5];
if (getItemIndex(_local6) == -1){
data.push(_local6);
};
_local5++;
};
if (data.length > _local4){
dispatchChangeEvent(DataChangeType.ADD, data.slice(_local4, data.length), _local4, (this.data.length - 1));
} else {
dispatchChangeEvent(DataChangeType.ADD, [], -1, -1);
};
}
public function replaceItemAt(_arg1:Object, _arg2:uint):Object{
var _local3:Array;
checkIndex(_arg2, (data.length - 1));
_local3 = [data[_arg2]];
dispatchPreChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
data[_arg2] = _arg1;
dispatchChangeEvent(DataChangeType.REPLACE, _local3, _arg2, _arg2);
return (_local3[0]);
}
public function invalidate():void{
dispatchEvent(new DataChangeEvent(DataChangeEvent.DATA_CHANGE, DataChangeType.INVALIDATE_ALL, data.concat(), 0, data.length));
}
public function removeAll():void{
var _local1:Array;
_local1 = data.concat();
dispatchPreChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
data = [];
dispatchChangeEvent(DataChangeType.REMOVE_ALL, _local1, 0, _local1.length);
}
}
}//package fl.data
Section 59
//SimpleCollectionItem (fl.data.SimpleCollectionItem)
package fl.data {
public dynamic class SimpleCollectionItem {
public var label:String;
public var data:String;
public function toString():String{
return ((((("[SimpleCollectionItem: " + label) + ",") + data) + "]"));
}
}
}//package fl.data
Section 60
//ComponentEvent (fl.events.ComponentEvent)
package fl.events {
import flash.events.*;
public class ComponentEvent extends Event {
public static const HIDE:String = "hide";
public static const BUTTON_DOWN:String = "buttonDown";
public static const MOVE:String = "move";
public static const RESIZE:String = "resize";
public static const ENTER:String = "enter";
public static const LABEL_CHANGE:String = "labelChange";
public static const SHOW:String = "show";
public function ComponentEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false){
super(_arg1, _arg2, _arg3);
}
override public function toString():String{
return (formatToString("ComponentEvent", "type", "bubbles", "cancelable"));
}
override public function clone():Event{
return (new ComponentEvent(type, bubbles, cancelable));
}
}
}//package fl.events
Section 61
//DataChangeEvent (fl.events.DataChangeEvent)
package fl.events {
import flash.events.*;
public class DataChangeEvent extends Event {
protected var _items:Array;
protected var _endIndex:uint;
protected var _changeType:String;
protected var _startIndex:uint;
public static const PRE_DATA_CHANGE:String = "preDataChange";
public static const DATA_CHANGE:String = "dataChange";
public function DataChangeEvent(_arg1:String, _arg2:String, _arg3:Array, _arg4:int=-1, _arg5:int=-1):void{
super(_arg1);
_changeType = _arg2;
_startIndex = _arg4;
_items = _arg3;
_endIndex = ((_arg5)==-1) ? _startIndex : _arg5;
}
public function get changeType():String{
return (_changeType);
}
public function get startIndex():uint{
return (_startIndex);
}
public function get items():Array{
return (_items);
}
override public function clone():Event{
return (new DataChangeEvent(type, _changeType, _items, _startIndex, _endIndex));
}
override public function toString():String{
return (formatToString("DataChangeEvent", "type", "changeType", "startIndex", "endIndex", "bubbles", "cancelable"));
}
public function get endIndex():uint{
return (_endIndex);
}
}
}//package fl.events
Section 62
//DataChangeType (fl.events.DataChangeType)
package fl.events {
public class DataChangeType {
public static const ADD:String = "add";
public static const REMOVE:String = "remove";
public static const REMOVE_ALL:String = "removeAll";
public static const CHANGE:String = "change";
public static const REPLACE:String = "replace";
public static const INVALIDATE:String = "invalidate";
public static const INVALIDATE_ALL:String = "invalidateAll";
public static const SORT:String = "sort";
}
}//package fl.events
Section 63
//DataGridEvent (fl.events.DataGridEvent)
package fl.events {
import flash.events.*;
public class DataGridEvent extends ListEvent {
protected var _itemRenderer:Object;
protected var _reason:String;
protected var _dataField:String;
public static const ITEM_EDIT_BEGIN:String = "itemEditBegin";
public static const ITEM_EDIT_END:String = "itemEditEnd";
public static const ITEM_EDIT_BEGINNING:String = "itemEditBeginning";
public static const HEADER_RELEASE:String = "headerRelease";
public static const ITEM_FOCUS_IN:String = "itemFocusIn";
public static const ITEM_FOCUS_OUT:String = "itemFocusOut";
public static const COLUMN_STRETCH:String = "columnStretch";
public function DataGridEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:Object=null, _arg7:String=null, _arg8:String=null){
super(_arg1, _arg2, _arg3, _arg4, _arg5);
_itemRenderer = _arg6;
_dataField = _arg7;
_reason = _arg8;
}
public function get reason():String{
return (_reason);
}
public function set dataField(_arg1:String):void{
_dataField = _arg1;
}
override public function toString():String{
return (formatToString("DataGridEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "itemRenderer", "dataField", "reason"));
}
public function get dataField():String{
return (_dataField);
}
override public function clone():Event{
return (new DataGridEvent(type, bubbles, cancelable, columnIndex, int(rowIndex), _itemRenderer, _dataField, _reason));
}
public function get itemRenderer():Object{
return (_itemRenderer);
}
}
}//package fl.events
Section 64
//DataGridEventReason (fl.events.DataGridEventReason)
package fl.events {
public final class DataGridEventReason {
public static const OTHER:String = "other";
public static const CANCELLED:String = "cancelled";
public static const NEW_COLUMN:String = "newColumn";
public static const NEW_ROW:String = "newRow";
}
}//package fl.events
Section 65
//ListEvent (fl.events.ListEvent)
package fl.events {
import flash.events.*;
public class ListEvent extends Event {
protected var _index:int;
protected var _item:Object;
protected var _columnIndex:int;
protected var _rowIndex:int;
public static const ITEM_DOUBLE_CLICK:String = "itemDoubleClick";
public static const ITEM_ROLL_OUT:String = "itemRollOut";
public static const ITEM_ROLL_OVER:String = "itemRollOver";
public static const ITEM_CLICK:String = "itemClick";
public function ListEvent(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:int=-1, _arg5:int=-1, _arg6:int=-1, _arg7:Object=null){
super(_arg1, _arg2, _arg3);
_rowIndex = _arg5;
_columnIndex = _arg4;
_index = _arg6;
_item = _arg7;
}
public function get rowIndex():Object{
return (_rowIndex);
}
public function get index():int{
return (_index);
}
public function get item():Object{
return (_item);
}
public function get columnIndex():int{
return (_columnIndex);
}
override public function clone():Event{
return (new ListEvent(type, bubbles, cancelable, _columnIndex, _rowIndex));
}
override public function toString():String{
return (formatToString("ListEvent", "type", "bubbles", "cancelable", "columnIndex", "rowIndex", "index", "item"));
}
}
}//package fl.events
Section 66
//ScrollEvent (fl.events.ScrollEvent)
package fl.events {
import flash.events.*;
public class ScrollEvent extends Event {
private var _position:Number;
private var _direction:String;
private var _delta:Number;
public static const SCROLL:String = "scroll";
public function ScrollEvent(_arg1:String, _arg2:Number, _arg3:Number){
super(ScrollEvent.SCROLL, false, false);
_direction = _arg1;
_delta = _arg2;
_position = _arg3;
}
override public function clone():Event{
return (new ScrollEvent(_direction, _delta, _position));
}
public function get position():Number{
return (_position);
}
override public function toString():String{
return (formatToString("ScrollEvent", "type", "bubbles", "cancelable", "direction", "delta", "position"));
}
public function get delta():Number{
return (_delta);
}
public function get direction():String{
return (_direction);
}
}
}//package fl.events
Section 67
//FocusManager (fl.managers.FocusManager)
package fl.managers {
import fl.core.*;
import fl.controls.*;
import flash.display.*;
import flash.text.*;
import flash.events.*;
import flash.utils.*;
import flash.ui.*;
public class FocusManager implements IFocusManager {
private var focusableObjects:Dictionary;
private var _showFocusIndicator:Boolean;// = true
private var defButton:Button;
private var focusableCandidates:Array;
private var _form:DisplayObjectContainer;
private var _defaultButtonEnabled:Boolean;// = true
private var activated:Boolean;// = false
private var _defaultButton:Button;
private var calculateCandidates:Boolean;// = true
private var lastFocus:InteractiveObject;
private var lastAction:String;
public function FocusManager(_arg1:DisplayObjectContainer){
activated = false;
calculateCandidates = true;
_showFocusIndicator = true;
_defaultButtonEnabled = true;
super();
focusableObjects = new Dictionary(true);
if (_arg1 != null){
_form = _arg1;
addFocusables(DisplayObject(_arg1));
_arg1.addEventListener(Event.ADDED, addedHandler);
_arg1.addEventListener(Event.REMOVED, removedHandler);
activate();
};
}
public function get showFocusIndicator():Boolean{
return (_showFocusIndicator);
}
private function getIndexOfNextObject(_arg1:int, _arg2:Boolean, _arg3:Boolean, _arg4:String):int{
var _local5:int;
var _local6:int;
var _local7:DisplayObject;
var _local8:IFocusManagerGroup;
var _local9:int;
var _local10:DisplayObject;
var _local11:IFocusManagerGroup;
_local5 = focusableCandidates.length;
_local6 = _arg1;
while (true) {
if (_arg2){
_arg1--;
} else {
_arg1++;
};
if (_arg3){
if (((_arg2) && ((_arg1 < 0)))){
break;
};
if (((!(_arg2)) && ((_arg1 == _local5)))){
break;
};
} else {
_arg1 = ((_arg1 + _local5) % _local5);
if (_local6 == _arg1){
break;
};
};
if (isValidFocusCandidate(focusableCandidates[_arg1], _arg4)){
_local7 = DisplayObject(findFocusManagerComponent(focusableCandidates[_arg1]));
if ((_local7 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local7);
_local9 = 0;
while (_local9 < focusableCandidates.length) {
_local10 = focusableCandidates[_local9];
if ((_local10 is IFocusManagerGroup)){
_local11 = IFocusManagerGroup(_local10);
if ((((_local11.groupName == _local8.groupName)) && (_local11.selected))){
_arg1 = _local9;
break;
};
};
_local9++;
};
};
return (_arg1);
};
};
return (_arg1);
}
public function set form(_arg1:DisplayObjectContainer):void{
_form = _arg1;
}
private function addFocusables(_arg1:DisplayObject, _arg2:Boolean=false):void{
var focusable:IFocusManagerComponent;
var io:InteractiveObject;
var doc:DisplayObjectContainer;
var i:int;
var child:DisplayObject;
var o = _arg1;
var skipTopLevel = _arg2;
if (!skipTopLevel){
if ((o is IFocusManagerComponent)){
focusable = IFocusManagerComponent(o);
if (focusable.focusEnabled){
if (((focusable.tabEnabled) && (isTabVisible(o)))){
focusableObjects[o] = true;
calculateCandidates = true;
};
o.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
o.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
} else {
if ((o is InteractiveObject)){
io = (o as InteractiveObject);
if (((((io) && (io.tabEnabled))) && ((findFocusManagerComponent(io) == io)))){
focusableObjects[io] = true;
calculateCandidates = true;
};
io.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
io.addEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
};
};
};
if ((o is DisplayObjectContainer)){
doc = DisplayObjectContainer(o);
o.addEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
if ((((((doc is Stage)) || ((doc.parent is Stage)))) || (doc.tabChildren))){
i = 0;
while (i < doc.numChildren) {
try {
child = doc.getChildAt(i);
if (child != null){
addFocusables(doc.getChildAt(i));
};
} catch(error:SecurityError) {
};
i = (i + 1);
};
};
};
}
private function getChildIndex(_arg1:DisplayObjectContainer, _arg2:DisplayObject):int{
return (_arg1.getChildIndex(_arg2));
}
private function mouseFocusChangeHandler(_arg1:FocusEvent):void{
if ((_arg1.relatedObject is TextField)){
return;
};
_arg1.preventDefault();
}
private function focusOutHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
_local2 = (_arg1.target as InteractiveObject);
}
private function isValidFocusCandidate(_arg1:DisplayObject, _arg2:String):Boolean{
var _local3:IFocusManagerGroup;
if (!isEnabledAndVisible(_arg1)){
return (false);
};
if ((_arg1 is IFocusManagerGroup)){
_local3 = IFocusManagerGroup(_arg1);
if (_arg2 == _local3.groupName){
return (false);
};
};
return (true);
}
public function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject{
var _local2:InteractiveObject;
_local2 = _arg1;
while (_arg1) {
if ((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
};
return (_local2);
}
private function sortFocusableObjectsTabIndex():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))){
focusableCandidates.push(_local2);
};
};
focusableCandidates.sort(sortByTabIndex);
}
private function removeFocusables(_arg1:DisplayObject):void{
var _local2:Object;
var _local3:DisplayObject;
if ((_arg1 is DisplayObjectContainer)){
_arg1.removeEventListener(Event.TAB_CHILDREN_CHANGE, tabChildrenChangeHandler);
_arg1.removeEventListener(Event.TAB_INDEX_CHANGE, tabIndexChangeHandler);
for (_local2 in focusableObjects) {
_local3 = DisplayObject(_local2);
if (DisplayObjectContainer(_arg1).contains(_local3)){
if (_local3 == lastFocus){
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local2];
calculateCandidates = true;
};
};
};
}
private function addedHandler(_arg1:Event):void{
var _local2:DisplayObject;
_local2 = DisplayObject(_arg1.target);
if (_local2.stage){
addFocusables(DisplayObject(_arg1.target));
};
}
private function getTopLevelFocusTarget(_arg1:InteractiveObject):InteractiveObject{
while (_arg1 != InteractiveObject(form)) {
if ((((((((_arg1 is IFocusManagerComponent)) && (IFocusManagerComponent(_arg1).focusEnabled))) && (IFocusManagerComponent(_arg1).mouseFocusEnabled))) && (UIComponent(_arg1).enabled))){
return (_arg1);
};
_arg1 = _arg1.parent;
if (_arg1 == null){
break;
};
};
return (null);
}
private function tabChildrenChangeHandler(_arg1:Event):void{
var _local2:DisplayObjectContainer;
if (_arg1.target != _arg1.currentTarget){
return;
};
calculateCandidates = true;
_local2 = DisplayObjectContainer(_arg1.target);
if (_local2.tabChildren){
addFocusables(_local2, true);
} else {
removeFocusables(_local2);
};
}
public function sendDefaultButtonEvent():void{
defButton.dispatchEvent(new MouseEvent(MouseEvent.CLICK));
}
public function getFocus():InteractiveObject{
var _local1:InteractiveObject;
_local1 = form.stage.focus;
return (findFocusManagerComponent(_local1));
}
private function isEnabledAndVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
var _local3:TextField;
var _local4:SimpleButton;
_local2 = DisplayObject(form).parent;
while (_arg1 != _local2) {
if ((_arg1 is UIComponent)){
if (!UIComponent(_arg1).enabled){
return (false);
};
} else {
if ((_arg1 is TextField)){
_local3 = TextField(_arg1);
if ((((_local3.type == TextFieldType.DYNAMIC)) || (!(_local3.selectable)))){
return (false);
};
} else {
if ((_arg1 is SimpleButton)){
_local4 = SimpleButton(_arg1);
if (!_local4.enabled){
return (false);
};
};
};
};
if (!_arg1.visible){
return (false);
};
_arg1 = _arg1.parent;
};
return (true);
}
public function set defaultButton(_arg1:Button):void{
var _local2:Button;
_local2 = (_arg1) ? Button(_arg1) : null;
if (_local2 != _defaultButton){
if (_defaultButton){
_defaultButton.emphasized = false;
};
if (defButton){
defButton.emphasized = false;
};
_defaultButton = _local2;
defButton = _local2;
if (_local2){
_local2.emphasized = true;
};
};
}
private function deactivateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
}
public function setFocus(_arg1:InteractiveObject):void{
if ((_arg1 is IFocusManagerComponent)){
IFocusManagerComponent(_arg1).setFocus();
} else {
form.stage.focus = _arg1;
};
}
private function setFocusToNextObject(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
if (!hasFocusableObjects()){
return;
};
_local2 = getNextFocusManagerComponent(_arg1.shiftKey);
if (_local2){
setFocus(_local2);
};
}
private function hasFocusableObjects():Boolean{
var _local1:Object;
for (_local1 in focusableObjects) {
return (true);
};
return (false);
}
private function tabIndexChangeHandler(_arg1:Event):void{
calculateCandidates = true;
}
private function sortFocusableObjects():void{
var _local1:Object;
var _local2:InteractiveObject;
focusableCandidates = [];
for (_local1 in focusableObjects) {
_local2 = InteractiveObject(_local1);
if (((((_local2.tabIndex) && (!(isNaN(Number(_local2.tabIndex)))))) && ((_local2.tabIndex > 0)))){
sortFocusableObjectsTabIndex();
return;
};
focusableCandidates.push(_local2);
};
focusableCandidates.sort(sortByDepth);
}
private function keyFocusChangeHandler(_arg1:FocusEvent):void{
showFocusIndicator = true;
if ((((((_arg1.keyCode == Keyboard.TAB)) || ((_arg1.keyCode == 0)))) && (!(_arg1.isDefaultPrevented())))){
setFocusToNextObject(_arg1);
_arg1.preventDefault();
};
}
private function getIndexOfFocusedObject(_arg1:DisplayObject):int{
var _local2:int;
var _local3:int;
_local2 = focusableCandidates.length;
_local3 = 0;
_local3 = 0;
while (_local3 < _local2) {
if (focusableCandidates[_local3] == _arg1){
return (_local3);
};
_local3++;
};
return (-1);
}
public function hideFocus():void{
}
private function removedHandler(_arg1:Event):void{
var _local2:int;
var _local3:DisplayObject;
var _local4:InteractiveObject;
_local3 = DisplayObject(_arg1.target);
if ((((_local3 is IFocusManagerComponent)) && ((focusableObjects[_local3] == true)))){
if (_local3 == lastFocus){
IFocusManagerComponent(lastFocus).drawFocus(false);
lastFocus = null;
};
_local3.removeEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
delete focusableObjects[_local3];
calculateCandidates = true;
} else {
if ((((_local3 is InteractiveObject)) && ((focusableObjects[_local3] == true)))){
_local4 = (_local3 as InteractiveObject);
if (_local4){
if (_local4 == lastFocus){
lastFocus = null;
};
delete focusableObjects[_local4];
calculateCandidates = true;
};
_local3.addEventListener(Event.TAB_ENABLED_CHANGE, tabEnabledChangeHandler);
};
};
removeFocusables(_local3);
}
private function sortByDepth(_arg1:InteractiveObject, _arg2:InteractiveObject):Number{
var _local3:String;
var _local4:String;
var _local5:int;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:DisplayObject;
var _local10:DisplayObject;
_local3 = "";
_local4 = "";
_local8 = "0000";
_local9 = DisplayObject(_arg1);
_local10 = DisplayObject(_arg2);
while (((!((_local9 == DisplayObject(form)))) && (_local9.parent))) {
_local5 = getChildIndex(_local9.parent, _local9);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local3 = (_local7 + _local3);
_local9 = _local9.parent;
};
while (((!((_local10 == DisplayObject(form)))) && (_local10.parent))) {
_local5 = getChildIndex(_local10.parent, _local10);
_local6 = _local5.toString(16);
if (_local6.length < 4){
_local7 = (_local8.substring(0, (4 - _local6.length)) + _local6);
};
_local4 = (_local7 + _local4);
_local10 = _local10.parent;
};
return (((_local3 > _local4)) ? 1 : ((_local3 < _local4)) ? -1 : 0);
}
public function get defaultButton():Button{
return (_defaultButton);
}
private function activateHandler(_arg1:Event):void{
var _local2:InteractiveObject;
_local2 = InteractiveObject(_arg1.target);
if (lastFocus){
if ((lastFocus is IFocusManagerComponent)){
IFocusManagerComponent(lastFocus).setFocus();
} else {
form.stage.focus = lastFocus;
};
};
lastAction = "ACTIVATE";
}
public function showFocus():void{
}
public function set defaultButtonEnabled(_arg1:Boolean):void{
_defaultButtonEnabled = _arg1;
}
public function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject{
var _local2:DisplayObject;
var _local3:String;
var _local4:int;
var _local5:Boolean;
var _local6:int;
var _local7:int;
var _local8:IFocusManagerGroup;
if (!hasFocusableObjects()){
return (null);
};
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
_local2 = form.stage.focus;
_local2 = DisplayObject(findFocusManagerComponent(InteractiveObject(_local2)));
_local3 = "";
if ((_local2 is IFocusManagerGroup)){
_local8 = IFocusManagerGroup(_local2);
_local3 = _local8.groupName;
};
_local4 = getIndexOfFocusedObject(_local2);
_local5 = false;
_local6 = _local4;
if (_local4 == -1){
if (_arg1){
_local4 = focusableCandidates.length;
};
_local5 = true;
};
_local7 = getIndexOfNextObject(_local4, _arg1, _local5, _local3);
return (findFocusManagerComponent(focusableCandidates[_local7]));
}
private function mouseDownHandler(_arg1:MouseEvent):void{
var _local2:InteractiveObject;
if (_arg1.isDefaultPrevented()){
return;
};
_local2 = getTopLevelFocusTarget(InteractiveObject(_arg1.target));
if (!_local2){
return;
};
showFocusIndicator = false;
if (((((!((_local2 == lastFocus))) || ((lastAction == "ACTIVATE")))) && (!((_local2 is TextField))))){
setFocus(_local2);
};
lastAction = "MOUSEDOWN";
}
private function isTabVisible(_arg1:DisplayObject):Boolean{
var _local2:DisplayObjectContainer;
_local2 = _arg1.parent;
while (((((_local2) && (!((_local2 is Stage))))) && (!(((_local2.parent) && ((_local2.parent is Stage))))))) {
if (!_local2.tabChildren){
return (false);
};
_local2 = _local2.parent;
};
return (true);
}
public function get nextTabIndex():int{
return (0);
}
private function keyDownHandler(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.TAB){
lastAction = "KEY";
if (calculateCandidates){
sortFocusableObjects();
calculateCandidates = false;
};
};
if (((((((defaultButtonEnabled) && ((_arg1.keyCode == Keyboard.ENTER)))) && (defaultButton))) && (defButton.enabled))){
sendDefaultButtonEvent();
};
}
private function focusInHandler(_arg1:FocusEvent):void{
var _local2:InteractiveObject;
var _local3:Button;
_local2 = InteractiveObject(_arg1.target);
if (form.contains(_local2)){
lastFocus = findFocusManagerComponent(InteractiveObject(_local2));
if ((lastFocus is Button)){
_local3 = Button(lastFocus);
if (defButton){
defButton.emphasized = false;
defButton = _local3;
_local3.emphasized = true;
};
} else {
if (((defButton) && (!((defButton == _defaultButton))))){
defButton.emphasized = false;
defButton = _defaultButton;
_defaultButton.emphasized = true;
};
};
};
}
private function tabEnabledChangeHandler(_arg1:Event):void{
var _local2:InteractiveObject;
var _local3:Boolean;
calculateCandidates = true;
_local2 = InteractiveObject(_arg1.target);
_local3 = (focusableObjects[_local2] == true);
if (_local2.tabEnabled){
if (((!(_local3)) && (isTabVisible(_local2)))){
if (!(_local2 is IFocusManagerComponent)){
_local2.focusRect = false;
};
focusableObjects[_local2] = true;
};
} else {
if (_local3){
delete focusableObjects[_local2];
};
};
}
public function set showFocusIndicator(_arg1:Boolean):void{
_showFocusIndicator = _arg1;
}
public function get form():DisplayObjectContainer{
return (_form);
}
private function sortByTabIndex(_arg1:InteractiveObject, _arg2:InteractiveObject):int{
return (((_arg1.tabIndex > _arg2.tabIndex)) ? 1 : ((_arg1.tabIndex < _arg2.tabIndex)) ? -1 : sortByDepth(_arg1, _arg2));
}
public function activate():void{
if (activated){
return;
};
form.stage.addEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler, false, 0, true);
form.stage.addEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler, false, 0, true);
form.addEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.addEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.addEventListener(Event.ACTIVATE, activateHandler, false, 0, true);
form.stage.addEventListener(Event.DEACTIVATE, deactivateHandler, false, 0, true);
form.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = true;
if (lastFocus){
setFocus(lastFocus);
};
}
public function deactivate():void{
form.stage.removeEventListener(FocusEvent.MOUSE_FOCUS_CHANGE, mouseFocusChangeHandler);
form.stage.removeEventListener(FocusEvent.KEY_FOCUS_CHANGE, keyFocusChangeHandler);
form.removeEventListener(FocusEvent.FOCUS_IN, focusInHandler, true);
form.removeEventListener(FocusEvent.FOCUS_OUT, focusOutHandler, true);
form.stage.removeEventListener(Event.ACTIVATE, activateHandler);
form.stage.removeEventListener(Event.DEACTIVATE, deactivateHandler);
form.removeEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
form.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHandler, true);
activated = false;
}
public function get defaultButtonEnabled():Boolean{
return (_defaultButtonEnabled);
}
}
}//package fl.managers
Section 68
//IFocusManager (fl.managers.IFocusManager)
package fl.managers {
import fl.controls.*;
import flash.display.*;
public interface IFocusManager {
function getFocus():InteractiveObject;
function deactivate():void;
function set defaultButton(_arg1:Button):void;
function set showFocusIndicator(_arg1:Boolean):void;
function get defaultButtonEnabled():Boolean;
function get nextTabIndex():int;
function get defaultButton():Button;
function get showFocusIndicator():Boolean;
function setFocus(_arg1:InteractiveObject):void;
function activate():void;
function showFocus():void;
function set defaultButtonEnabled(_arg1:Boolean):void;
function hideFocus():void;
function findFocusManagerComponent(_arg1:InteractiveObject):InteractiveObject;
function getNextFocusManagerComponent(_arg1:Boolean=false):InteractiveObject;
}
}//package fl.managers
Section 69
//IFocusManagerComponent (fl.managers.IFocusManagerComponent)
package fl.managers {
public interface IFocusManagerComponent {
function set focusEnabled(_arg1:Boolean):void;
function drawFocus(_arg1:Boolean):void;
function setFocus():void;
function get focusEnabled():Boolean;
function get tabEnabled():Boolean;
function get tabIndex():int;
function get mouseFocusEnabled():Boolean;
}
}//package fl.managers
Section 70
//IFocusManagerGroup (fl.managers.IFocusManagerGroup)
package fl.managers {
public interface IFocusManagerGroup {
function set groupName(_arg1:String):void;
function set selected(_arg1:Boolean):void;
function get groupName():String;
function get selected():Boolean;
}
}//package fl.managers
Section 71
//StyleManager (fl.managers.StyleManager)
package fl.managers {
import fl.core.*;
import flash.text.*;
import flash.utils.*;
public class StyleManager {
private var globalStyles:Object;
private var classToDefaultStylesDict:Dictionary;
private var styleToClassesHash:Object;
private var classToStylesDict:Dictionary;
private var classToInstancesDict:Dictionary;
private static var _instance:StyleManager;
public function StyleManager(){
styleToClassesHash = {};
classToInstancesDict = new Dictionary(true);
classToStylesDict = new Dictionary(true);
classToDefaultStylesDict = new Dictionary(true);
globalStyles = UIComponent.getStyleDefinition();
}
public static function clearComponentStyle(_arg1:Object, _arg2:String):void{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
if (((!((_local4 == null))) && (!((_local4[_arg2] == null))))){
delete _local4[_arg2];
invalidateComponentStyle(_local3, _arg2);
};
}
private static function getClassDef(_arg1:Object):Class{
var component = _arg1;
if ((component is Class)){
return ((component as Class));
};
try {
return ((getDefinitionByName(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
if ((component is UIComponent)){
try {
return ((component.loaderInfo.applicationDomain.getDefinition(getQualifiedClassName(component)) as Class));
} catch(e:Error) {
};
};
};
return (null);
}
public static function clearStyle(_arg1:String):void{
setStyle(_arg1, null);
}
public static function setComponentStyle(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Class;
var _local5:Object;
_local4 = getClassDef(_arg1);
_local5 = getInstance().classToStylesDict[_local4];
if (_local5 == null){
_local5 = (getInstance().classToStylesDict[_local4] = {});
};
if (_local5 == _arg3){
return;
};
_local5[_arg2] = _arg3;
invalidateComponentStyle(_local4, _arg2);
}
private static function setSharedStyles(_arg1:UIComponent):void{
var _local2:StyleManager;
var _local3:Class;
var _local4:Object;
var _local5:String;
_local2 = getInstance();
_local3 = getClassDef(_arg1);
_local4 = _local2.classToDefaultStylesDict[_local3];
for (_local5 in _local4) {
_arg1.setSharedStyle(_local5, getSharedStyle(_arg1, _local5));
};
}
public static function getComponentStyle(_arg1:Object, _arg2:String):Object{
var _local3:Class;
var _local4:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance().classToStylesDict[_local3];
return (((_local4)==null) ? null : _local4[_arg2]);
}
private static function getInstance(){
if (_instance == null){
_instance = new (StyleManager);
};
return (_instance);
}
private static function invalidateComponentStyle(_arg1:Class, _arg2:String):void{
var _local3:Dictionary;
var _local4:Object;
var _local5:UIComponent;
_local3 = getInstance().classToInstancesDict[_arg1];
if (_local3 == null){
return;
};
for (_local4 in _local3) {
_local5 = (_local4 as UIComponent);
if (_local5 == null){
} else {
_local5.setSharedStyle(_arg2, getSharedStyle(_local5, _arg2));
};
};
}
private static function invalidateStyle(_arg1:String):void{
var _local2:Dictionary;
var _local3:Object;
_local2 = getInstance().styleToClassesHash[_arg1];
if (_local2 == null){
return;
};
for (_local3 in _local2) {
invalidateComponentStyle(Class(_local3), _arg1);
};
}
public static function registerInstance(_arg1:UIComponent):void{
var inst:StyleManager;
var classDef:Class;
var target:Class;
var defaultStyles:Object;
var styleToClasses:Object;
var n:String;
var instance = _arg1;
inst = getInstance();
classDef = getClassDef(instance);
if (classDef == null){
return;
};
if (inst.classToInstancesDict[classDef] == null){
inst.classToInstancesDict[classDef] = new Dictionary(true);
target = classDef;
while (defaultStyles == null) {
if (target["getStyleDefinition"] != null){
defaultStyles = target["getStyleDefinition"]();
break;
};
try {
target = (instance.loaderInfo.applicationDomain.getDefinition(getQualifiedSuperclassName(target)) as Class);
} catch(err:Error) {
try {
target = (getDefinitionByName(getQualifiedSuperclassName(target)) as Class);
} catch(e:Error) {
defaultStyles = UIComponent.getStyleDefinition();
break;
};
};
};
styleToClasses = inst.styleToClassesHash;
for (n in defaultStyles) {
if (styleToClasses[n] == null){
styleToClasses[n] = new Dictionary(true);
};
styleToClasses[n][classDef] = true;
};
inst.classToDefaultStylesDict[classDef] = defaultStyles;
inst.classToStylesDict[classDef] = {};
};
inst.classToInstancesDict[classDef][instance] = true;
setSharedStyles(instance);
}
public static function getStyle(_arg1:String):Object{
return (getInstance().globalStyles[_arg1]);
}
private static function getSharedStyle(_arg1:UIComponent, _arg2:String):Object{
var _local3:Class;
var _local4:StyleManager;
var _local5:Object;
_local3 = getClassDef(_arg1);
_local4 = getInstance();
_local5 = _local4.classToStylesDict[_local3][_arg2];
if (_local5 != null){
return (_local5);
};
_local5 = _local4.globalStyles[_arg2];
if (_local5 != null){
return (_local5);
};
return (_local4.classToDefaultStylesDict[_local3][_arg2]);
}
public static function setStyle(_arg1:String, _arg2:Object):void{
var _local3:Object;
_local3 = getInstance().globalStyles;
if ((((_local3[_arg1] === _arg2)) && (!((_arg2 is TextFormat))))){
return;
};
_local3[_arg1] = _arg2;
invalidateStyle(_arg1);
}
}
}//package fl.managers
Section 72
//Color (fl.motion.Color)
package fl.motion {
import flash.display.*;
import flash.geom.*;
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 73
//BitmapUtility (pack.bitmap.BitmapUtility)
package pack.bitmap {
import flash.display.*;
import flash.geom.*;
public class BitmapUtility {
public static function Canvas(_arg1:Number, _arg2:Number, _arg3:Boolean=false, _arg4:Number=0, _arg5:uint=0, _arg6:Boolean=false):Bitmap{
var _local7:Bitmap;
var _local8:BitmapData;
var _local9:Rectangle;
_local7 = new Bitmap();
_local8 = new BitmapData(_arg1, _arg2, true, 0);
_local9 = new Rectangle(0, 0, _arg1, _arg2);
if (_arg6){
_local8.fillRect(_local9, 4292730333);
};
_local7.bitmapData = _local8;
if (_arg3){
_local7.y = -(_arg2);
_local7.x = (-((_arg5 - 1)) * _arg4);
};
_local8 = null;
_local9 = null;
return (_local7);
}
}
}//package pack.bitmap
Section 74
//BlittingSingle (pack.bitmap.BlittingSingle)
package pack.bitmap {
import flash.display.*;
import flash.geom.*;
public class BlittingSingle extends MovieClip {
public var capture:MovieClip;
public var captureBitmapData:BitmapData;
public var areaRectangle:Rectangle;
public var captureArray:Array;
public var currentBlitFrame:int;// = 0
public var WIDTH;
public var HEIGHT:Number;
public var matrix:Matrix;
public function BlittingSingle(_arg1:MovieClip, _arg2:Number=0, _arg3:Number=0, _arg4:Boolean=true, _arg5:Number=0, _arg6:Number=24):void{
capture = _arg1;
WIDTH = _arg2;
HEIGHT = _arg3;
areaRectangle = new Rectangle();
areaRectangle.width = WIDTH;
areaRectangle.height = HEIGHT;
captureArray = [];
if (_arg4){
matrixDefault(_arg5, _arg6);
rendering();
};
}
public function removingAll():void{
captureBitmapData.dispose();
captureBitmapData = null;
areaRectangle = null;
captureArray = null;
capture = null;
}
public function matrixDefault(_arg1:Number, _arg2:Number):void{
matrix = new Matrix(1, 0, 0, 1, _arg1, (_arg2 + 1));
matrix.scale(1, 1);
}
public function matrixI(_arg1:Number=1, _arg2:Number=0, _arg3:Number=0, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0):void{
matrix = new Matrix(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
matrix.scale(1, 1);
}
public function renderingNew(_arg1:Number=1, _arg2:Number=0, _arg3:Number=0, _arg4:Number=1, _arg5:Number=0, _arg6:Number=0):void{
matrix = new Matrix(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
matrix.scale(1, 1);
rendering();
}
public function rendering():void{
var _local1:uint;
var _local2:uint = capture.totalFrames;
_local1 = 1;
while (_local1 <= _local2) {
capture.gotoAndStop(_local1);
captureBitmapData = new BitmapData(areaRectangle.width, areaRectangle.height, true, 0);
captureBitmapData.draw(capture, matrix, null, BlendMode.LAYER, null, true);
captureArray.push(captureBitmapData);
_local1++;
};
capture.gotoAndPlay(1);
capture = null;
}
}
}//package pack.bitmap
Section 75
//Arcade (pack.Instance.Booths.Arcade)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Arcade extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Arcade():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Arcade;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_place");
} else {
mclip.visitor1.anime("center_to_place");
mclip.visitor2.anime("center_to_place");
};
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_place")){
mclip.visitor1.anime("place_to_center");
if (!single){
mclip.visitor2.anime("place_to_center");
};
};
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 76
//Bar (pack.Instance.Booths.Bar)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Bar extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Bar():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Bar;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.setBalon(false);
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.setBalon(false);
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime();
} else {
mclip.visitor1.anime();
mclip.visitor2.anime();
};
mclip.employee.anim();
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function goActivity():void{
}
override public function cekGoOutside():void{
if (mclip.visitor1.visible){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 77
//BaratResto (pack.Instance.Booths.BaratResto)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class BaratResto extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function BaratResto():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.BaratResto;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.setBalon(false);
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.setBalon(false);
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime();
} else {
mclip.visitor1.anime();
mclip.visitor2.anime();
};
mclip.employee.anim();
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function goActivity():void{
}
override public function cekGoOutside():void{
if (mclip.visitor1.visible){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 78
//Booth (pack.Instance.Booths.Booth)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import pack.*;
import pack.bitmap.*;
public class Booth extends Sprite {
private const notSave:Object;
private const saveData:Object;
public var parent_;
public var main;
public var REF:Object;
public var REC:Object;
public var boothSort:Object;
public var parentMapTiles:Object;
public var akuCottage:Boolean;
public var akuMedical:Boolean;
public var akuBar:Boolean;
public var akuJacuzi:Boolean;
public var mclip:MovieClip;
public var onfocus:MovieClip;
public var renderI:MovieClip;
public var renderWallI:MovieClip;
public var buildMC:MovieClip;
public var area:MovieClip;
public var bloking:MovieClip;
public var SIZE_:Number;
public var dimX:Number;
public var dimY:Number;
public var bound1:Number;
public var bound2:Number;
public var rec:Boolean;
public var minibooth:Boolean;
public var restobooth:Boolean;
public var jenis:String;
public var mainJenis:String;
public var paths:Array;
public var pathsGo:Array;
public var pathsInside:Array;
public var insidePoint:Array;
public var map:Array;
public var outPoint:Array;
public var tpointAr:Array;
public var h:uint;
public var k:uint;
public var COLS:uint;
public var ROWS:uint;
public var center:uint;
public var ydepth:uint;
public var dp:Point;
public var base:Point;
public var centered:Point;
public var gainloss:int;
public var up_price:uint;
public var booked_price:uint;
public var expMax:uint;
public var expMaxTotal:uint;
public var max_antri:uint;
public var lastDay_income:uint;
public var jeda_booked:uint;
public var reinitHour:uint;
public var canvasSprite:Sprite;
public var lantaiI:Bitmap;
public var wallI:Bitmap;
public var wall_alpha:Bitmap;
public var closedAnim:Boolean;
public var onSelected:Boolean;
public var onOver:Boolean;
public var canUpgrade:Boolean;
public var moneyUpgrade:Boolean;
public var last_used:int;
public var last_expend:int;
public var uniform_val:uint;
public var treadmill_val:uint;
public var batas_maximumPop:uint;
public var lastPop_kumu:Number;
public var tmpVisitorPopularity:Number;
public var expRateLevel:Number;
public var _ampm:String;
public var persen_usedtimer:Number;
private var _closeTime:uint;
private var _openTime:uint;
private var _minHour:uint;
private var _maxHour:uint;
private var OpenBigger:Boolean;
private var roomlevel:String;
private var nullPt:Point;
private var col_row:String;
private var bantuRand:Number;
public var ptile:Point;
public var id:uint;
public var level_:uint;
public var used:uint;
public var expPoint:uint;
public var nama_tampil:String;
public var single:Boolean;
public var booked:Boolean;
public var canceled:Boolean;
public var idefault:Boolean;
public var builded:Boolean;
public var opened:Boolean;
public var canDestroy:Boolean;
public var adaScenery:Boolean;
public var simpanGaji:Boolean;
public var popularity:Number;
public var todayPop_kumu:Number;
public var akuLobby:Boolean;
public var standbooth:Boolean;
public var akuJroom:Boolean;
public var akuFacility:Boolean;
public var akuRoom:Boolean;
public var akuMinimarket:Boolean;
public var akuPool:Boolean;
public var akuGolf:Boolean;
public var akuHotdog:Boolean;
public var akuBaratResto:Boolean;
public var used_timer:int;
public var total_income:uint;
public var today_income:uint;
public var today_expend:int;
public var today_used:uint;
public var daily_gaji:uint;
public var visitor_antri:Array;
public var customer:Object;
public var max_price:uint;
var total_pay:uint;
var total_tip:uint;
var booked_price_min:uint;
var booked_price_max:uint;
var booked_price_val:uint;
var XP:Array;
var canUp_temp:Boolean;
var expPop_temp:Number;
public function Booth():void{
tpointAr = [];
visitor_antri = [];
notSave = {ob:true, jenis:true, idefault:true, ptile:true, customer:true, visitor_antri:true, antriStand:true};
saveData = {adaScenery:true, idefault:true, builded:true, booked:true, canceled:true, canDestroy:true, expPoint:true, level_:true, opened:true, popularity:true, persen_usedtimer:true, simpanGaji:true, today_used:true, total_income:true, today_income:true, today_expend:true, todayPop_kumu:true, used:true, used_timer:true};
super();
}
public function callREF():void{
mclip = (this["mclip_mc"] as MovieClip);
onfocus = (this["onfocus_mc"] as MovieClip);
bloking = (this["blok"] as MovieClip);
mclip.cacheAsBitmap = true;
onfocus.hiding();
bloking.showing(false);
COLS = REF.COLS;
ROWS = REF.ROWS;
col_row = ((("x" + ROWS) + "_") + COLS);
bloking.gotoAndStop(col_row);
this.mouseChildren = false;
this.mouseEnabled = false;
reservedCheck(false);
initClip();
}
public function hidingFocus():void{
onOver = false;
onfocus.hiding();
if (akuJroom){
areaShowing();
};
notifShowing();
changeColor(onSelected, onOver);
}
public function settingFocus():void{
onOver = true;
if (akuJroom){
areaShowing();
};
notifShowing();
onfocus.showing();
changeColor(onSelected, onOver);
}
public function initial():void{
}
public function initClip():void{
}
public function initProperties():void{
parentMapTiles = parent_["map"]["tiles"];
area = null;
closedAnim = false;
idefault = false;
onSelected = false;
onOver = false;
canUpgrade = false;
moneyUpgrade = false;
jenis = REF.jenis;
mainJenis = REF.mainJenis;
akuLobby = (jenis == "Lobby");
akuRoom = (mainJenis == "Room");
akuFacility = (mainJenis == "Facility");
akuJroom = (jenis == "JanitorRoom");
akuCottage = (jenis == "Cottage");
akuMinimarket = (jenis == "Minimarket");
akuMedical = (jenis == "Medical");
akuPool = (jenis == "Pool");
akuBar = (jenis == "Bar");
akuGolf = (jenis == "Golf");
akuBaratResto = (jenis == "BaratResto");
akuHotdog = (jenis == "Hotdog");
akuJacuzi = (jenis == "Jacuzi");
jeda_booked = 5;
uniform_val = 0;
treadmill_val = 0;
expMaxTotal = 0;
reinitHour = 0;
standbooth = REF.standbooth;
minibooth = (((standbooth) && (!(akuJroom)))) ? true : false;
restobooth = (((((akuBar) || (akuBaratResto))) || ((((jenis == "JapanResto")) || ((jenis == "IndiaResto")))))) ? true : false;
if (minibooth){
expMaxTotal = REF.Xmax;
} else {
h = 0;
while (h < 3) {
expMaxTotal = (expMaxTotal + REF.Exp[h]);
h++;
};
};
if (expMaxTotal == 0){
expMaxTotal = 1000;
};
_closeTime = REF["closed"];
openTime = REF["opened"];
ptile = new Point();
dp = new Point();
nullPt = new Point();
}
public function creating(_arg1, _arg2:Boolean=false, _arg3:Object=null, _arg4:Point=null):void{
var _local5:Number;
var _local6:Number;
parent_ = _arg1;
rec = _arg2;
main = parent_.main;
initial();
initProperties();
SIZE_ = parent_.SIZE_;
renderI = main.RenderBoothTile;
canvasSprite = parent_.tileBoothSprite;
dimX = parent_.dimX;
dimY = parent_.dimY;
renderWallI = main.RenderWall;
wallI = BitmapUtility.Canvas(240, 136);
wall_alpha = BitmapUtility.Canvas(240, 136);
boothSort = null;
if (rec){
REC = _arg3;
REC.ob = this;
ptile.x = _arg4.x;
ptile.y = _arg4.y;
initRecVarsCreated();
} else {
id = main.game.ID[jenis];
var _local9 = main.game.ID;
var _local10 = jenis;
var _local11 = (_local9[_local10] + 1);
_local9[_local10] = _local11;
initFirstVarsCreated();
ptile.x = _arg4.x;
ptile.y = _arg4.y;
};
batas_maximumPop = (REF.drainpop + main.game.EXPAND);
this.name = ((REF.jenis + "_") + id);
base = rumus.findTileCoord_point(ptile, parent_.SIZE_);
this.x = base.x;
this.y = base.y;
var _local7:uint = ((ROWS)>COLS) ? COLS : ROWS;
base = new Point(((ptile.x - ROWS) + 1), ((ptile.y + COLS) - 1));
ydepth = base.y;
_local5 = parentMapTiles[((("tile_" + ((base.x + _local7) - 1)) + "_") + ptile.y)].y;
_local5 = ((_local5)<0) ? (_local5 * -1) : _local5;
_local6 = parentMapTiles[((("tile_" + ((ptile.x - _local7) + 1)) + "_") + ptile.y)].y;
_local6 = ((_local6)<0) ? (_local6 * -1) : _local6;
if (ROWS > COLS){
bound2 = _local6;
} else {
bound1 = _local5;
};
if (ROWS > COLS){
bound1 = _local5;
} else {
bound2 = _local6;
};
centered = new Point();
centered.x = this.x;
centered.x = (centered.x + ((ROWS)==1) ? parent_.SIZE_ : (parent_.SIZE_ * 2.5));
centered.y = (akuLobby) ? (this.y - (parent_.SIZE_ * 0.5)) : (this.y - (this.height - (parent_.SIZE_ * 0.5)));
this.mouseEnabled = false;
this.mouseChildren = false;
var _local8:Number = (-(wallI.height) + 51);
wallI.x = -24;
wallI.y = _local8;
wall_alpha.x = -24;
wall_alpha.y = _local8;
this.addChild(wall_alpha);
this.setChildIndex(wall_alpha, 0);
wall_alpha.visible = false;
this.addChild(wallI);
this.setChildIndex(wallI, 0);
parent_.objContainer.addChild(this);
main.addEventListener(Eventku.REMOVING_ALL, removingAllBooth, false, 0, true);
outPoint = [];
insidePoint = [];
pathsGo = [];
paths = [];
pathsInside = [];
pathsInside["go"] = [];
pathsInside["paths"] = [];
outPoint["MAP"] = [];
insidePoint["MAP"] = [];
acceptTileKhusus();
if (akuJroom){
opened = true;
} else {
map = co.cloning(parent_["map"]["walkable"]);
};
settingMapKhusus();
initInsideAndOutPoint();
khususLobby();
if (akuLobby){
this["notif"].visible = false;
hitungPosisiAntrian();
builded = true;
opened = true;
} else {
placed();
};
if (!rec){
temp_record();
main.countTotalBooth();
if (!akuJroom){
daily_gaji = (REF.salary[(level_ - 1)] * REF.sumStaff);
if (!simpanGaji){
main.game.MISC.StaffSalary = (main.game.MISC.StaffSalary + daily_gaji);
simpanGaji = true;
};
};
};
if (((builded) && (akuLobby))){
drawOnCanvas();
acceptLevelObject();
} else {
if (builded){
endBuildAnimasi();
} else {
mclip.gotoAndStop("_build");
if (col_row == "x2_2"){
buildMC = new BuildProgress1();
} else {
if (col_row == "x2_3"){
buildMC = new BuildProgress2();
} else {
if (col_row == "x3_4"){
buildMC = new BuildProgress3();
} else {
if (col_row == "x1_1"){
buildMC = new BuildProgress4();
} else {
if (col_row == "x3_3"){
buildMC = new BuildProgress5();
} else {
if (col_row == "x4_4"){
buildMC = new BuildProgress6();
};
};
};
};
};
};
this.addChild(buildMC);
main.PlaySound("build");
buildMC.mouseEnabled = false;
buildMC.addEventListener(Event.ENTER_FRAME, buildFunction, false, 0, true);
if (((main.onMouseDestroy) || (main.onGeneralAlpha))){
alphaObject();
} else {
alphaObject(false);
};
};
};
main.realTimeResort(mainJenis);
if (main.game.EXTRA.uniform){
acceptPurchaseUniform();
};
if (main.game.EXTRA.treadmill){
acceptPurchaseTreadmill();
};
if (_openTime == 0){
opened = true;
} else {
main.addEventListener(Eventku.SIANG, openingBooth, false, 0, true);
main.addEventListener(Eventku.MALAM, closingBooth, false, 0, true);
};
main.addEventListener(Eventku.LOAD_AFTER_VISITOR, useDataVisitor, false, 0, true);
main.addEventListener(Eventku.AUTO_SAVED, autoSaved, false, 0, true);
main.addEventListener(Eventku.END_SAVED, endSaved, false, 0, true);
main.addEventListener(Eventku.AFTER_RECLOAD, Boothing, false, 0, true);
}
private function notifShowing():void{
if (akuLobby){
this["notif"].visible = canUpgrade;
if (onOver){
this["notif"].gotoAndStop(2);
} else {
this["notif"].gotoAndStop(1);
};
};
}
public function Boothing(_arg1:Eventku):void{
endDayRecord();
}
public function endDayRecord():void{
lastDay_income = today_income;
last_used = today_used;
last_expend = today_expend;
lastPop_kumu = todayPop_kumu;
reloadDayRecord();
}
public function reloadDayRecord():void{
today_income = 0;
today_used = 0;
today_expend = 0;
todayPop_kumu = 0;
}
private function removeListeners():void{
main.removeEventListener(Eventku.SIANG, openingBooth);
main.removeEventListener(Eventku.MALAM, closingBooth);
main.removeEventListener(Eventku.LOAD_AFTER_VISITOR, useDataVisitor);
main.removeEventListener(Eventku.REMOVING_ALL, removingAllBooth);
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.AFTER_RECLOAD, Boothing);
main.removeEventListener(Eventku.END_SAVED, endSaved);
if (buildMC != null){
buildMC.removeEventListener(Event.ENTER_FRAME, buildFunction);
};
}
public function autoSaved(_arg1:Eventku):void{
var _local2:Boolean;
var _local3:String;
var _local4:uint;
var _local5:Object;
for (_local3 in REC) {
_local2 = saveData[_local3];
if (_local2){
REC[_local3] = this[_local3];
};
};
if (akuJroom){
overrideRecord();
} else {
if (akuLobby){
} else {
if (akuFacility){
REC.daily_gaji = daily_gaji;
REC.single = single;
_local4 = visitor_antri.length;
REC.visitor_antri = [];
h = 0;
while (h < _local4) {
_local5 = visitor_antri[h];
REC.visitor_antri.push(_local5["id"]);
h++;
};
};
};
_local5 = null;
overrideRecord();
};
REC.ob = null;
main.game.objects.booths[name] = null;
REC.boothSort = null;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
REC.boothSort = boothSort;
main.game.objects.booths[name] = this;
}
public function overrideRecord():void{
if (customer == null){
REC.customer = -1;
} else {
REC.customer = customer["id"];
};
}
public function removeOverride():void{
}
public function removingAllBooth(_arg1:Eventku=null):void{
removeOverride();
removeListeners();
parentMapTiles = null;
boothSort = null;
visitor_antri = null;
customer = null;
paths = null;
pathsGo = null;
pathsInside = null;
insidePoint = null;
map = null;
outPoint = null;
tpointAr = null;
REF = null;
canvasSprite = null;
mclip = null;
onfocus = null;
XP = null;
renderI = null;
renderWallI = null;
buildMC = null;
area = null;
if (lantaiI){
lantaiI.bitmapData.dispose();
};
lantaiI = null;
if (wallI){
wallI.bitmapData.dispose();
};
wallI = null;
if (wall_alpha){
wall_alpha.bitmapData.dispose();
};
wall_alpha = null;
if (REC){
REC.ob = null;
};
REC = null;
parent_ = null;
main = null;
}
public function useDataVisitor(_arg1:Eventku):void{
bridgeConnection();
}
public function drawOnCanvas():void{
dp.x = ((((ptile.y - ptile.x) * SIZE_) + dimX) - 25);
dp.y = ((dimY - ((ptile.y + ptile.x) * (SIZE_ * 0.5))) - (84 - 24));
creatingLantai();
if (!standbooth){
wallI.bitmapData.copyPixels(renderWallI.captureArray[((REF.wall + level_) - 2)], renderWallI.areaRectangle, nullPt, null, null, true);
wall_alpha.bitmapData.copyPixels(renderWallI.captureArray[((REF.wall_alpha + level_) - 2)], renderWallI.areaRectangle, nullPt, null, null, true);
};
}
public function clearLantai():void{
parent_.blokCanvas.bitmapData.threshold(renderI.captureArray[(REF.blok - 1)], renderI.areaRectangle, dp, "!=", 0, 0);
canvasSprite.removeChild(lantaiI);
rumus.spliceArrayObject(parent_.lantaiDepth, lantaiI, "ob");
tambahArea(false);
}
public function clearBitmapWallLantai():void{
var _local1:uint;
if (standbooth){
lantaiI.bitmapData.threshold(renderI.captureArray[(REF.fr - 1)], renderI.areaRectangle, nullPt, "!=", _local1, _local1);
} else {
lantaiI.bitmapData.threshold(renderI.captureArray[((REF.fr + level_) - 2)], renderI.areaRectangle, nullPt, "!=", _local1, _local1);
wallI.bitmapData.threshold(renderWallI.captureArray[((REF.wall + level_) - 2)], renderWallI.areaRectangle, nullPt, "!=", _local1, _local1);
wall_alpha.bitmapData.threshold(renderWallI.captureArray[((REF.wall + level_) - 2)], renderWallI.areaRectangle, nullPt, "!=", _local1, _local1);
};
}
public function newBitmapWallLantai():void{
if (standbooth){
lantaiI.bitmapData.copyPixels(renderI.captureArray[(REF.fr - 1)], renderI.areaRectangle, nullPt, null, null, true);
} else {
lantaiI.bitmapData.copyPixels(renderI.captureArray[((REF.fr + level_) - 2)], renderI.areaRectangle, nullPt, null, null, true);
wallI.bitmapData.copyPixels(renderWallI.captureArray[((REF.wall + level_) - 2)], renderWallI.areaRectangle, nullPt, null, null, true);
wall_alpha.bitmapData.copyPixels(renderWallI.captureArray[((REF.wall_alpha + level_) - 2)], renderWallI.areaRectangle, nullPt, null, null, true);
};
}
private function creatingLantai():void{
lantaiI = BitmapUtility.Canvas(240, 136);
if (standbooth){
lantaiI.bitmapData.copyPixels(renderI.captureArray[(REF.fr - 1)], renderI.areaRectangle, nullPt, null, null, true);
} else {
lantaiI.bitmapData.copyPixels(renderI.captureArray[((REF.fr + level_) - 2)], renderI.areaRectangle, nullPt, null, null, true);
};
lantaiI.x = (((ptile.y - ptile.x) * SIZE_) - 25);
lantaiI.y = ((this.y - (3.5 * SIZE_)) - 1.5);
tambahArea();
canvasSprite.addChild(lantaiI);
parent_.lantaiDepth.push({ob:lantaiI, ydepth:ydepth, bound1:bound1, bound2:bound2});
parent_.blokCanvas.bitmapData.copyPixels(renderI.captureArray[(REF.blok - 1)], renderI.areaRectangle, dp, null, null, true);
}
public function wallOnEnter(_arg1:Boolean=true):void{
if (main.onGeneralAlpha){
if (wallI){
wallI.visible = false;
wall_alpha.visible = false;
};
} else {
if (_arg1){
wallOnAlpha();
} else {
wallOnAlpha(false);
};
};
}
public function wallOnEnter_tick():void{
if (!main.onGeneralAlpha){
wallOnAlpha();
};
}
private function wallOnAlpha(_arg1:Boolean=true):void{
if (wallI){
wallI.visible = !(_arg1);
wall_alpha.visible = _arg1;
};
}
public function initFirstVarsCreated():void{
level_ = 1;
canDestroy = false;
builded = false;
opened = false;
booked = false;
canceled = false;
adaScenery = false;
simpanGaji = false;
customer = null;
used_timer = 0;
used = 0;
expPoint = 0;
single = true;
overrideVars();
popularity = 0;
gainloss = 0;
if (!akuLobby){
nama_tampil = (REF.nic + id);
};
total_income = 0;
today_income = 0;
lastDay_income = 0;
today_expend = 0;
last_expend = 0;
today_used = 0;
last_used = 0;
todayPop_kumu = 0;
lastPop_kumu = 0;
daily_gaji = 0;
}
public function changeName(_arg1:String):void{
nama_tampil = _arg1;
}
private function initInsideAndOutPoint():void{
var _local1:String;
var _local2:String;
var _local3:uint;
var _local6:MovieClip;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:uint;
var _local11:uint;
var _local12:Number;
var _local13:Number;
var _local14:Point;
var _local15:Point;
var _local4:Object;
var _local5:Point = new Point();
if (akuJroom){
_local5 = ptile;
_local1 = ((("tile_" + _local5.x) + "_") + _local5.y);
parentMapTiles[_local1].fjenis(1, false);
_local4 = parent_.map.area[_local5.x][_local5.y];
if (!_local4.isi){
_local4.isi = true;
};
_local4.isi_apa = this;
outPoint.push(new Point(ptile.x, (ptile.y - 1)));
outPoint.push(new Point((ptile.x - ROWS), ptile.y));
outPoint.push(new Point(ptile.x, (ptile.y + COLS)));
outPoint.push(new Point((ptile.x + 1), ptile.y));
_local4 = null;
} else {
h = 0;
while (h < ROWS) {
k = 0;
while (k < COLS) {
_local5.x = (ptile.x - h);
_local5.y = (ptile.y + k);
_local2 = ((_local5.x + "_") + _local5.y);
_local1 = ("tile_" + _local2);
parentMapTiles[_local1].fjenis(1, false);
_local4 = parent_["map"]["area"][_local5.x][_local5.y];
if (!_local4.isi){
_local4.isi = true;
};
if ((((jenis == "Pool")) && ((((h == 1)) && ((((k == 1)) || ((k == 2)))))))){
outPoint["MAP"][_local2] = false;
map[_local5.x][_local5.y] = false;
} else {
outPoint["MAP"][_local2] = true;
if (minibooth){
map[_local5.x][_local5.y] = false;
} else {
map[_local5.x][_local5.y] = true;
};
};
_local4.isi_apa = this;
insidePoint["MAP"][_local2] = true;
insidePoint.push(_local5);
_local4 = null;
k++;
};
h++;
};
h = 0;
while (h < ROWS) {
outPoint.push(new Point((ptile.x - h), (ptile.y + COLS)));
h++;
};
h = 0;
while (h < COLS) {
outPoint.push(new Point((ptile.x + 1), (ptile.y + h)));
h++;
};
if (akuLobby){
} else {
h = 0;
while (h < ROWS) {
outPoint.push(new Point((ptile.x - h), (ptile.y - 1)));
h++;
};
h = 0;
while (h < COLS) {
outPoint.push(new Point((ptile.x - ROWS), (ptile.y + h)));
h++;
};
};
};
_local3 = outPoint.length;
h = 0;
while (h < _local3) {
_local1 = ((outPoint[h].x + "_") + outPoint[h].y);
outPoint[_local1] = true;
outPoint["MAP"][_local1] = true;
h++;
};
if (minibooth){
_local6 = null;
_local14 = new Point();
_local3 = tpointAr.length;
h = 0;
while (h < _local3) {
if (h > 0){
_local10 = (ptile.x + tpointAr[h].x);
_local11 = (ptile.y + tpointAr[h].y);
_local15 = new Point(_local10, _local11);
_local1 = ((_local10 + "_") + _local11);
_local6 = parentMapTiles[("tile_" + _local1)];
_local7 = co.angleF(_local6.x, _local6.y, this.x, this.y);
_local12 = co.angleFx(_local7);
_local13 = co.angleFy(_local7);
_local8 = (_local12 * 5);
_local9 = (_local13 * 5);
_local14 = rumus.findTileCoord_point(_local15, parent_.SIZE_, true);
tpointAr["antri"][_local1] = [false, false];
tpointAr["antri_tr"][("tr_" + h)] = _local1;
tpointAr["antri_tr"][_local1] = h;
tpointAr["antri_angle"][_local1] = new Point(_local8, _local9);
tpointAr["antri_point"][_local1] = new Point((_local14.x - _local8), (_local14.y - _local9));
tpointAr["around"].push({hub:h, tile:_local6});
_local6 = null;
};
h++;
};
};
}
public function temp_record():void{
var _local1:uint;
var _local2:uint;
if (akuFacility){
_local1 = main.game.objects.Facility.length;
if (standbooth){
main.game.objects.Facility.push({adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, builded:builded, booked:booked, boothSort:null, canDestroy:canDestroy, canceled:canceled, customer:null, daily_gaji:daily_gaji, expPoint:expPoint, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, single:single, simpanGaji:simpanGaji, today_used:today_used, total_income:total_income, today_income:today_income, today_expend:today_expend, todayPop_kumu:todayPop_kumu, used:used, used_timer:used_timer, visitor_antri:([] as Array), antriStand:(co.cloning(tpointAr["antri"]) as Array)});
} else {
main.game.objects.Facility.push({adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, builded:builded, booked:booked, boothSort:null, canDestroy:canDestroy, canceled:canceled, customer:null, daily_gaji:daily_gaji, expPoint:expPoint, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, persen_usedtimer:persen_usedtimer, single:single, simpanGaji:simpanGaji, today_used:today_used, total_income:total_income, today_income:today_income, today_expend:today_expend, todayPop_kumu:todayPop_kumu, used:used, used_timer:used_timer, visitor_antri:([] as Array)});
};
REC = main.game.objects.Facility[_local1];
main.PlaySound("coin1");
updateMoney("build", null, -(REF.price[0]));
_local2 = 0;
if (RP_createData == null){
_local2 = 1;
main.game.totalRP.Facility = (main.game.totalRP.Facility + _local2);
main.hitungTotalRP(false, _local2);
} else {
if (RP_createData == 0){
_local2 = serbi.ResearchPoint.addPoint[jenis][0];
RP_createData = 1;
main.game.totalRP.Facility = (main.game.totalRP.Facility + _local2);
main.hitungTotalRP(false, _local2);
} else {
_local2 = serbi.ResearchPoint.addPoint[jenis][1];
main.game.totalRP.Facility = (main.game.totalRP.Facility + _local2);
main.hitungTotalRP(false, _local2);
};
};
};
main.adaPathBaru = true;
}
private function miniboothExpMax(_arg1:Boolean=false):uint{
return (((total_minibooth)<120) ? 120 : total_minibooth);
}
public function acceptLevelObject():void{
roomlevel = ("level_" + String(level_));
mclip.gotoAndStop(roomlevel);
roomSelimut();
if (minibooth){
expMax = level_;
} else {
if (level_ < 3){
up_price = REF.price[level_];
expMax = REF.Exp[level_];
} else {
expMax = REF.Exp[(level_ - 1)];
};
};
expRateLevel = (expMax / expMaxTotal);
if (akuJroom){
checkForUpgrade(2);
if (level_ == 3){
main.CheckMissions("janitorRoom_upgrade");
main.CheckMissions("x_janitorRoom");
};
} else {
XP = REF["Exp_add"][(level_ - 1)];
if (akuMinimarket){
booked_price = (4 + level_);
max_price = REF["booked_price"][(level_ - 1)];
} else {
if (minibooth){
booked_price = REF["booked_price"][0];
max_price = REF["booked_price"][1];
} else {
if (!akuLobby){
booked_price = REF["booked_price"][(level_ - 1)];
};
};
};
checkForUpgrade(1);
if (akuLobby){
main.CheckMissions("lobby_upgrade");
if (level_ == 3){
main.CheckMissions("lobby_upgrade2");
};
} else {
if (akuRoom){
parent_.rooms.sortOn("booked_price", Array.NUMERIC);
if (akuCottage){
main.CheckMissions("x_cottageUpgrade");
} else {
main.CheckMissions("x_lodgeUpgrade");
};
main.CheckMissions("x_roomStar");
if (level_ == 3){
if (akuCottage){
main.CheckMissions("x_cottageFullUpgrade");
} else {
main.CheckMissions("x_lodgeFullUpgrade");
};
main.CheckMissions("x_roomUpgrade");
};
} else {
main.CheckMissions("one_facilityUpgrade");
main.CheckMissions("x_facilityUpgrade");
main.CheckMissions("x_facilityStar");
if (akuMedical){
main.CheckMissions("x_medicalUpgrade");
};
if (level_ == 3){
main.CheckMissions("x_facilityUpgrade2");
main.CheckMissions("x_facilityUpgrade3");
if (akuJacuzi){
main.CheckMissions("x_jacuziFullUpgrade");
} else {
if (akuBar){
main.CheckMissions("x_barFullUpgrade");
} else {
if (akuMedical){
main.CheckMissions("x_medicalUpgrade2");
} else {
if (akuPool){
main.CheckMissions("x_poolFullUpgrade");
} else {
if (akuGolf){
main.CheckMissions("x_golfFullUpgrade");
};
};
};
};
};
};
};
};
};
}
public function checkForUpgrade(_arg1:uint=1):void{
canUp_temp = canUpgrade;
if (_arg1 == 1){
if (level_ == 3){
canUpgrade = false;
moneyUpgrade = false;
} else {
if (expPoint >= expMax){
canUpgrade = true;
if (money >= up_price){
moneyUpgrade = true;
} else {
moneyUpgrade = false;
};
if (!standbooth){
main.TampilkanNewTips("upgradeBooth", true);
};
} else {
canUpgrade = false;
};
};
if (!minibooth){
if (canUpgrade){
if (akuLobby){
this["notif"].visible = true;
} else {
createNotifTab(mainJenis, true);
};
} else {
if (akuLobby){
this["notif"].visible = false;
};
};
};
} else {
if (level_ < 3){
canUpgrade = true;
if (money >= up_price){
moneyUpgrade = true;
} else {
moneyUpgrade = false;
};
} else {
canUpgrade = false;
moneyUpgrade = false;
};
};
}
public function createNotifTab(_arg1:String, _arg2:Boolean=false):void{
_arg1 = _arg1.toLowerCase();
main.navigator1.setNotif(_arg1, _arg2);
}
public function buildFunction(_arg1:Event):void{
if (buildMC.build1.cekFinish()){
if (buildMC != null){
buildMC.removeEventListener(Event.ENTER_FRAME, buildFunction);
this.removeChild(buildMC);
buildMC = null;
};
};
if (buildMC == null){
main.PlaySound("cengkling");
endBuildAnimasi();
};
}
public function alphaObject(_arg1:Boolean=true, _arg2:Number=0):void{
if (builded){
if (main["onGeneralAlpha"]){
if (onSelected){
defaultAlphaObject(false);
} else {
if (((onOver) && (main["onMouseDestroy"]))){
defaultAlphaObject(false);
} else {
me_lantai(false, false);
if (wallI){
wallI.visible = false;
wall_alpha.visible = false;
};
};
};
} else {
defaultAlphaObject(_arg1);
};
} else {
if (buildMC != null){
};
};
}
function defaultAlphaObject(_arg1:Boolean):void{
if (((_arg1) || (main["onMouseDestroy"]))){
};
wallOnAlpha(false);
me_lantai();
}
private function me_lantai(_arg1:Boolean=true, _arg2:Boolean=true):void{
mclip.visible = _arg1;
if (lantaiI){
lantaiI.visible = _arg2;
};
}
public function endBuildAnimasi():void{
var _local2:uint;
var _local3:uint;
var _local4:Number;
var _local5:Number;
var _local1:Boolean;
if (!akuLobby){
if (!builded){
_local1 = true;
main.updateRealTime(mainJenis, 1, jenis);
if (minibooth){
main.countMinibooth();
};
};
};
builded = true;
canDestroy = (((!(booked)) && ((visitor_antri.length < 1)))) ? true : false;
acceptLevelObject();
if (level_ > 1){
main.count_upgrade_booth++;
main.CheckAchievements("acv_goodResearch");
};
if (!akuLobby){
_local2 = (akuJroom) ? main["TempList_Pop"][mainJenis].length : main["TempList_Pop"][mainJenis][jenis].length;
_local3 = _local2;
_local4 = REF["pop"][3];
_local5 = REF["pop"][0];
if (popularity == 0){
popularity = ((_local3)<batas_maximumPop) ? co.randomRangeDec(_local4, _local5) : _local4;
};
if (akuJroom){
main["TempList_Pop"][mainJenis].push({ob:this, id:id, popularity:popularity});
boothSort = main["TempList_Pop"][mainJenis][_local2];
} else {
main["TempList_Pop"][mainJenis][jenis].push({ob:this, id:id, popularity:popularity});
boothSort = main["TempList_Pop"][mainJenis][jenis][_local2];
};
REC.boothSort = boothSort;
if (_local1){
main.updatePopularityBooth_onAdd(mainJenis, jenis);
};
};
if (akuRoom){
parent_.rooms[jenis].push(this);
};
addJanitor();
drawOnCanvas();
openOrCloseBooth();
if (onSelected){
if (main.DB_object0.select){
main.DB_object0_active(false);
if (minibooth){
main.DB_object6_active(true, this);
} else {
if (akuJroom){
areaSelectedShowing();
main.DB_object5_active(true, this);
} else {
main.DB_object1_active(true, this);
};
};
};
};
if (((main.tempObject.ada) || (((main["onMouseDestroy"]) || (main["onGeneralAlpha"]))))){
alphaObject();
} else {
alphaObject(false);
};
tutupBoothKhusus();
}
public function getXP(_arg1:Boolean=false):Number{
var _local2:Number = (expPoint / expMax);
if (_arg1){
_local2 = (_local2 * 100);
if (_local2 > 100){
_local2 = 100;
};
};
return (co.RoundDecNumber(_local2, 1));
}
public function openingBooth(_arg1:Eventku):void{
openOrCloseBooth();
}
public function closingBooth(_arg1:Eventku):void{
openOrCloseBooth();
}
function get openTime():uint{
return (_openTime);
}
function set openTime(_arg1:uint){
_openTime = _arg1;
OpenBigger = (_openTime > _closeTime);
if (OpenBigger){
_maxHour = _openTime;
_minHour = _closeTime;
} else {
_maxHour = _closeTime;
_minHour = _openTime;
};
ampm();
}
private function openOrCloseBooth():void{
if (_openTime != 0){
if (OpenBigger){
if ((((hourDay >= _minHour)) && ((hourDay < _maxHour)))){
opened = false;
} else {
opened = true;
};
} else {
if ((((hourDay >= _minHour)) && ((hourDay < _maxHour)))){
opened = true;
} else {
opened = false;
};
};
tutupCalled();
};
}
public function tutupCalled():void{
var _local1:uint;
if (builded){
if (opened){
if (closedAnim){
changeColor(onSelected, onOver);
closedAnim = false;
tutupBoothKhusus();
};
} else {
if (customer == null){
tutupBooth();
} else {
if (customer != null){
if (canceled){
tutupBooth();
} else {
_local1 = (standbooth) ? 1 : 2;
if (customer.boothUsed_counter < _local1){
canceled = true;
};
if (canceled){
tutupBooth();
};
};
};
};
};
};
}
private function tutupBooth():void{
if (!closedAnim){
changeColor(onSelected, onOver);
closedAnim = true;
};
tutupBoothKhusus();
}
public function initRecVarsCreated(_arg1:Boolean=false):void{
var _local2:Boolean;
var _local3:String;
var _local4:uint;
if (!akuLobby){
if (_arg1){
} else {
for (_local3 in REC) {
_local2 = notSave[_local3];
if (!_local2){
this[_local3] = REC[_local3];
};
};
if (standbooth){
tpointAr["antri"] = (co.cloning(REC["antriStand"]) as Array);
};
if (akuFacility){
_local4 = REC.visitor_antri.length;
visitor_antri = new Array(_local4);
};
};
};
}
public function asDefault():void{
idefault = true;
}
public function checkOverRecord(_arg1=null, _arg2:int=-1):void{
var _local3:uint;
var _local4:Array;
var _local5:uint;
if (REC.customer == -1){
customer = null;
} else {
if (REC.customer == _arg2){
customer = _arg1;
};
};
if (akuRoom){
_local3 = parent_.rooms[jenis].indexOf(this);
if (_local3 != -1){
parent_.rooms[jenis].splice(_local3, 1);
};
} else {
if (akuFacility){
_local4 = REC.visitor_antri;
_local5 = _local4.length;
h = 0;
while (h < _local5) {
if (_local4[h] == _arg2){
visitor_antri[h] = _arg1;
break;
};
h++;
};
};
};
}
public function changeColor(_arg1:Boolean, _arg2:Boolean):void{
var _local3:Boolean;
var _local5:Number;
onSelected = _arg1;
onOver = _arg2;
var _local4:Boolean = main.onGeneralAlpha;
if (builded){
if (akuRoom){
_local3 = roomSleeping();
} else {
_local3 = opened;
};
_local5 = (((_arg1) && (!(_arg2)))) ? 0.25 : 0.5;
co.combineColor(mclip, _arg1, _arg2, _local3, _local5);
co.combineColor(wallI, _arg1, _arg2, _local3, _local5);
co.combineColor(wall_alpha, _arg1, _arg2, _local3, _local5);
co.combineColor(lantaiI, _arg1, _arg2, _local3, _local5);
if (_local4){
if (_arg2){
bloking.showing();
} else {
bloking.showing(false);
};
alphaObject();
} else {
bloking.showing(false);
};
};
}
public function removeColorSelected():void{
changeColor(onSelected, false);
}
public function selecting(_arg1:Boolean):void{
onSelected = _arg1;
if (onSelected){
parent_.selectD.showing(this, jenis);
} else {
parent_.selectD.hiding();
};
areaSelectedShowing();
}
public function updateLevel():void{
if (level_ < 3){
clearBitmapWallLantai();
if (level_ == 1){
main.count_upgrade_booth++;
main.CheckAchievements("acv_goodResearch");
};
level_ = (level_ + 1);
if (REF.sumStaff > 0){
if (!akuJroom){
main.game.MISC.StaffSalary = (main.game.MISC.StaffSalary - daily_gaji);
daily_gaji = (REF.salary[(level_ - 1)] * REF.sumStaff);
main.game.MISC.StaffSalary = (main.game.MISC.StaffSalary + daily_gaji);
};
};
largerArea();
acceptLevelObject();
if (!standbooth){
newBitmapWallLantai();
};
checkAnim();
};
}
public function upgradePopularity(_arg1:Boolean=false):void{
if (_arg1){
} else {
popularity = (popularity + REF["pop"][(level_ - 1)]);
};
if (akuLobby){
main.updatePopularityLobby();
} else {
REC.boothSort.popularity = popularity;
main.updatePopularityBooth_onAdd(mainJenis, jenis);
};
}
public function bridgeConnection():void{
initRecVarsCreated(true);
}
public function setTutup(_arg1:Boolean=true):void{
if (_arg1){
co.setBrightness(this, true);
} else {
co.setBrightness(this);
};
}
private function recallCustomer(_arg1:int):void{
k = 0;
while (k < parent_.visitors.length) {
if (parent_.visitors[k].ob["id"] == _arg1){
customer = parent_.visitors[k].ob;
break;
};
k++;
};
}
public function boostMoodVisitor(_arg1:String, _arg2):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:uint;
var _local8:Array;
_local4 = 0;
_local5 = 0;
var _local9:Number = 0;
if (_arg2 != null){
_local9 = _arg2.mood;
};
if (_arg1 == "antri"){
_local8 = serbi.dataOb.Booth.boostMood.antri;
_arg2.boostMood(_arg1, (_local8[(level_ - 1)] * _local9));
} else {
if (_arg1 == "masuk"){
_local8 = serbi.dataOb.Booth.boostMood.masuk;
if (main.game.EXTRA.wifi){
_local5 = 0.05;
};
_local3 = ((_local8[(level_ - 1)] * _arg2.REF.MAX_MOOD) + (_local5 * _local9));
_arg2.boostMood(_arg1, _local3);
} else {
if (_arg1 == "masukFacility"){
_local8 = serbi.dataOb.Booth.boostMood.masuk;
_local6 = co.randomRangeDec(0.0001, _local8[(level_ - 1)], 5);
_local3 = ((_local6 * _arg2.REF.MAX_MOOD) + (_local5 * _local9));
_arg2.boostMood(_arg1, _local3);
} else {
if (_arg1 == "masukRoom0"){
_local5 = 0;
if (akuCottage){
if (main.game.EXTRA.heater){
_local5 = 0.15;
};
} else {
if (main.game.EXTRA.towel){
_local5 = 0.17;
};
};
_local8 = serbi.dataOb.Booth.boostMood.masuk;
_local3 = ((_local8[(level_ - 1)] * _arg2.REF.MAX_MOOD) + (_local5 * _local9));
_arg2.boostMood(_arg1, _local3);
} else {
if (_arg1 == "masukRoom1"){
_local5 = 0;
if (akuCottage){
if (main.game.EXTRA.heater){
_local5 = 0.12;
};
} else {
if (main.game.EXTRA.towel){
_local5 = 0.15;
};
};
_local8 = serbi.dataOb.Booth.boostMood.masuk;
_local6 = co.randomRangeDec(0.005, _local8[(level_ - 1)], 5);
_local3 = ((_local6 * _arg2.REF.MAX_MOOD) + (_local5 * _local9));
_arg2.boostMood(_arg1, _local3);
} else {
if (_arg1 == "checkout"){
_local5 = 0;
_local8 = REF.boostMood.served;
if (level_ == 1){
_local3 = (_local8[0] * _arg2.REF.MAX_MOOD);
} else {
_local3 = (rumus.hitungBoost(_local8[(level_ - 2)], _local8[(level_ - 1)]) * _arg2.REF.MAX_MOOD);
};
if (main.game.EXTRA.wifi){
_local5 = 0.15;
};
_local3 = (_local3 + (_local5 * _local9));
_arg2.boostMood("served", _local3);
} else {
if (_arg1 == "canceled"){
if (standbooth){
_local8 = REF.boostMood.canceled;
_arg2.boostMood(_arg1, (-(rumus.hitungBoost(_local8[0], _local8[1])) * _local9));
} else {
_local8 = REF.boostMood.canceled;
_arg2.boostMood(_arg1, (-(rumus.hitungBoost(_local8[(level_ - 1)][0], _local8[(level_ - 1)][1])) * _local9));
};
} else {
if (_arg1 == "served"){
_local8 = _arg2.REF.likes.Facility;
_local7 = _local8.length;
h = 0;
while (h < _local7) {
if (jenis == _local8[h]){
_local4 = (0.05 + (0.05 * (_local7 - h)));
break;
};
h++;
};
_local5 = 0;
if (standbooth){
_local8 = REF.boostMood.served;
_local3 = (rumus.hitungBoost(_local8[0], _local8[1]) * _arg2.REF.MAX_MOOD);
if (main.game.EXTRA.wifi){
_local5 = 0.025;
};
} else {
_local8 = REF.boostMood.served;
_local3 = (rumus.hitungBoost(_local8[(level_ - 1)][0], _local8[(level_ - 1)][1]) * _arg2.REF.MAX_MOOD);
if (main.game.EXTRA.wifi){
_local5 = 0.1;
};
if (main.game.EXTRA.aid){
if (akuMedical){
if (((_arg2.shortHairedOldLady) || (_arg2.halfBaldOldMan))){
_local5 = (_local5 + 0.25);
} else {
_local5 = (_local5 + 0.05);
};
};
};
};
_local3 = (_local3 + ((_local4 * _local9) + (_local5 * _local9)));
_arg2.boostMood(_arg1, _local3);
} else {
if (_arg1 == "lobby_canceled"){
_arg2.boostMood(_arg1);
} else {
if (_arg1 == "targeted"){
_arg2.boostMood(_arg1);
} else {
if (_arg1 == "antrian"){
_arg2.boostMood(-2.5E-6);
};
};
};
};
};
};
};
};
};
};
};
_local8 = null;
}
public function updateMoney(_arg1:String, _arg2=null, _arg3:int=0, _arg4:Boolean=false, _arg5:Boolean=false):void{
var _local6:int;
if (_arg1 == "visitor"){
total_income = (total_income + _arg3);
today_income = (today_income + _arg3);
_arg2.updateMoney(-(_arg3), _arg4, _arg5);
main.game.MISC.Income = (main.game.MISC.Income + _arg3);
} else {
if (_arg1 == "room"){
if (_arg2.bookedRoom == null){
} else {
_arg2.bookedRoom.total_income = (_arg2.bookedRoom.total_income + _arg3);
_arg2.bookedRoom.today_income = (_arg2.bookedRoom.today_income + _arg3);
};
_arg2.updateMoney(-(_arg3), _arg4, _arg5);
main.game.MISC.Income = (main.game.MISC.Income + _arg3);
} else {
if (_arg1 == "upgrade"){
_local6 = ((_arg3 < 0)) ? -(_arg3) : _arg3;
today_expend = (today_expend + _local6);
main.game.MISC.Expend = (main.game.MISC.Expend + _local6);
} else {
if (_arg1 == "build"){
_local6 = ((_arg3 < 0)) ? -(_arg3) : _arg3;
today_expend = (today_expend + _local6);
main.game.MISC.Expend = (main.game.MISC.Expend + _local6);
main.insertMoneyClip(_arg3, this);
};
};
};
};
main.updateRealTime("money", _arg3);
}
public function ampm(){
if (_openTime == 0){
_ampm = "24 Hours";
} else {
_ampm = (rumus.ampm(_openTime) + "-");
_ampm = (_ampm + ((_closeTime)==0) ? "00.00 am" : rumus.ampm(_closeTime));
};
}
public function upgrade():Boolean{
var _local1:Boolean;
if (main.CheckMoney("", up_price)){
main.PlaySound("upgrade");
updateMoney("upgrade", null, -(up_price));
main.PlaySound("coin1");
updateLevel();
upgradePopularity();
addRP_upgradeLevel();
_local1 = true;
if (akuJroom){
checkForUpgrade(2);
} else {
checkForUpgrade(1);
};
};
return (_local1);
}
public function addRP_upgradeLevel():void{
var _local1:uint;
if (!minibooth){
_local1 = REF.RP_upgrade[(level_ - 1)];
main.game.totalRP[mainJenis] = (main.game.totalRP[mainJenis] + _local1);
main.hitungTotalRP(false, _local1);
if (akuJroom){
main.TampilkanNewTips("upgrade_janitorRoom", true);
};
if (level_ > 1){
addExpPoint("upgrade");
};
};
}
public function addExpPoint(_arg1:String, _arg2:String="", _arg3:String="", _arg4:Boolean=false):void{
var _local6:Number;
var _local5:uint;
if (_arg1 == "used"){
bantuRand = (Math.random() * 100);
if (((((((_arg4) || (akuMedical))) || (akuGolf))) || (akuPool))){
if (_arg2 == "very_happy"){
_local5 = XP[0];
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>83) ? XP[0] : XP[1];
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>88) ? XP[2] : ((bantuRand)>75) ? XP[3] : 1;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>90) ? XP[3] : 1;
} else {
_local5 = 1;
};
};
};
};
} else {
_local5 = 1;
};
expPoint = (expPoint + _local5);
} else {
if (_arg1 == "masukRoom1"){
if (customer){
_arg2 = customer.smiley;
_arg4 = customer.special;
bantuRand = (Math.random() * 100);
if (customer.collects.length > 0){
if (akuCottage){
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>85) ? XP[0] : ((bantuRand)>78) ? XP[1] : ((bantuRand)>73) ? XP[2] : ((bantuRand)>68) ? 1 : ((customer.persenMood)>90) ? 1 : 0;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>88) ? XP[1] : ((bantuRand)>82) ? XP[2] : ((bantuRand)>78) ? XP[3] : ((bantuRand)>74) ? 1 : 0;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>95) ? XP[2] : ((bantuRand)>90) ? XP[3] : ((bantuRand)>84) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>87) ? 1 : 0;
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
};
};
};
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
} else {
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>81) ? XP[0] : ((bantuRand)>74) ? XP[1] : ((bantuRand)>69) ? XP[2] : ((bantuRand)>61) ? 1 : ((customer.persenMood)>90) ? 1 : 0;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>85) ? XP[1] : ((bantuRand)>78) ? XP[2] : ((bantuRand)>74) ? XP[3] : ((bantuRand)>70) ? 1 : 0;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>91) ? XP[2] : ((bantuRand)>86) ? XP[3] : ((bantuRand)>80) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>85) ? 1 : 0;
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
};
};
};
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
};
} else {
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((customer.persenMood)>=90) ? 1 : ((bantuRand)>85) ? XP[0] : ((bantuRand)>78) ? XP[1] : ((bantuRand)>73) ? XP[2] : ((bantuRand)>68) ? 1 : ((customer.persenMood)>90) ? 1 : 0;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>88) ? XP[1] : ((bantuRand)>82) ? XP[2] : ((bantuRand)>78) ? XP[3] : ((bantuRand)>74) ? 1 : 0;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>95) ? XP[2] : ((bantuRand)>90) ? XP[3] : ((bantuRand)>84) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>87) ? 1 : 0;
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
};
};
};
} else {
_local5 = ((bantuRand)>90) ? 1 : 0;
};
};
expPoint = (expPoint + _local5);
};
} else {
if (_arg1 == "upgradeMax"){
} else {
if (_arg1 == "upgrade"){
expPoint = (expPoint + REF.RP_upgrade[(level_ - 1)]);
} else {
if (_arg1 == "satisfy"){
bantuRand = (Math.random() * 100);
if (akuLobby){
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((_arg3)=="checkout") ? XP[0] : ((bantuRand)>80) ? XP[0] : XP[1];
} else {
if (_arg2 == "happy"){
_local5 = ((_arg3)=="checkout") ? XP[1] : ((bantuRand)>80) ? XP[1] : ((bantuRand)>65) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((_arg3)=="checkout") ? XP[2] : ((bantuRand)>80) ? XP[2] : ((bantuRand)>65) ? XP[3] : 1;
} else {
if (_arg2 == "upset"){
_local5 = ((_arg3)=="checkout") ? XP[3] : ((bantuRand)>80) ? XP[3] : ((bantuRand)>75) ? 1 : 0;
} else {
_local5 = ((_arg3)=="checkout") ? 1 : ((bantuRand)>85) ? 1 : 0;
};
};
};
};
} else {
if (_arg2 == "very_happy"){
_local5 = ((_arg3)=="checkout") ? XP[0] : ((bantuRand)>90) ? XP[0] : XP[1];
} else {
if (_arg2 == "happy"){
_local5 = ((_arg3)=="checkout") ? XP[1] : ((bantuRand)>90) ? XP[1] : ((bantuRand)>75) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((_arg3)=="checkout") ? XP[2] : ((bantuRand)>90) ? XP[2] : ((bantuRand)>75) ? XP[3] : 1;
} else {
if (_arg2 == "upset"){
_local5 = ((_arg3)=="checkout") ? XP[3] : ((bantuRand)>90) ? XP[3] : ((bantuRand)>85) ? 1 : 0;
} else {
_local5 = ((_arg3)=="checkout") ? 1 : ((bantuRand)>95) ? 1 : 0;
};
};
};
};
};
} else {
if (akuFacility){
if (minibooth){
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>70) ? XP[0] : 0;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>78) ? XP[0] : 0;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>82) ? XP[0] : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>86) ? XP[0] : 0;
} else {
_local5 = ((bantuRand)>88) ? XP[0] : 0;
};
};
};
};
} else {
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>70) ? XP[0] : 0;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>78) ? XP[0] : 0;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>82) ? XP[0] : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>86) ? XP[0] : 0;
} else {
_local5 = ((bantuRand)>88) ? XP[0] : 0;
};
};
};
};
};
} else {
if (((akuGolf) || (akuMedical))){
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>73) ? XP[0] : ((bantuRand)>65) ? XP[1] : ((customer.persenMood)>85) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>78) ? XP[1] : ((bantuRand)>50) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>75) ? XP[2] : ((bantuRand)>55) ? XP[3] : ((bantuRand)>45) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>78) ? XP[3] : ((bantuRand)>65) ? 1 : 0;
} else {
_local5 = ((bantuRand)>84) ? 1 : 0;
};
};
};
};
} else {
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>83) ? XP[0] : ((bantuRand)>75) ? XP[1] : ((customer.persenMood)>90) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>88) ? XP[1] : ((bantuRand)>55) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>85) ? XP[2] : ((bantuRand)>65) ? XP[3] : ((bantuRand)>45) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>88) ? XP[3] : ((bantuRand)>75) ? 1 : 0;
} else {
_local5 = ((bantuRand)>94) ? 1 : 0;
};
};
};
};
};
} else {
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>80) ? XP[0] : ((bantuRand)>45) ? XP[1] : ((customer.persenMood)>85) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>80) ? XP[1] : ((bantuRand)>55) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>80) ? XP[2] : ((bantuRand)>65) ? XP[3] : ((bantuRand)>40) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>80) ? XP[3] : ((bantuRand)>75) ? 1 : 0;
} else {
_local5 = ((bantuRand)>88) ? 1 : 0;
};
};
};
};
} else {
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>90) ? XP[0] : ((bantuRand)>50) ? XP[1] : ((customer.persenMood)>90) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>90) ? XP[1] : ((bantuRand)>65) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>90) ? XP[2] : ((bantuRand)>75) ? XP[3] : ((bantuRand)>50) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>90) ? XP[3] : ((bantuRand)>85) ? 1 : 0;
} else {
_local5 = ((bantuRand)>98) ? 1 : 0;
};
};
};
};
};
};
};
} else {
if (_arg4){
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>80) ? XP[0] : ((bantuRand)>45) ? XP[1] : ((customer.persenMood)>85) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>80) ? XP[1] : ((bantuRand)>55) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>80) ? XP[2] : ((bantuRand)>65) ? XP[3] : ((bantuRand)>40) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>80) ? XP[3] : ((bantuRand)>75) ? 1 : 0;
} else {
_local5 = ((bantuRand)>85) ? 1 : 0;
};
};
};
};
} else {
if (_arg2 == "very_happy"){
_local5 = ((bantuRand)>90) ? XP[0] : ((bantuRand)>50) ? XP[1] : ((customer.persenMood)>90) ? XP[2] : 1;
} else {
if (_arg2 == "happy"){
_local5 = ((bantuRand)>90) ? XP[1] : ((bantuRand)>65) ? XP[2] : 1;
} else {
if (_arg2 == "neutral"){
_local5 = ((bantuRand)>90) ? XP[2] : ((bantuRand)>75) ? XP[3] : ((bantuRand)>50) ? 1 : 0;
} else {
if (_arg2 == "upset"){
_local5 = ((bantuRand)>90) ? XP[3] : ((bantuRand)>85) ? 1 : 0;
} else {
_local5 = ((bantuRand)>95) ? 1 : 0;
};
};
};
};
};
};
};
if (_local5 > 0){
main.game.totalRP[mainJenis] = (main.game.totalRP[mainJenis] + _local5);
main.hitungTotalRP(false, _local5);
};
_local6 = serbi["dataOb"]["Smiley"][_arg2]["nilai"];
if (_arg4){
_local6 = (_local6 + (0.5 * _local6));
};
tmpVisitorPopularity = ((_local6 * REF["pop"][(level_ - 1)]) * 0.01);
tmpVisitorPopularity = ((main.star)==0) ? (tmpVisitorPopularity * 0.0085) : ((tmpVisitorPopularity * main["star"]) * 0.02);
main.game.MISC.ValueUser = (main.game.MISC.ValueUser + tmpVisitorPopularity);
};
};
};
};
};
calcPopularityXP();
if (akuJroom){
checkForUpgrade(2);
} else {
checkForUpgrade(1);
};
}
public function updatePathVars(_arg1:Point, _arg2:Boolean):void{
map[_arg1.x][_arg1.y] = _arg2;
updatePathArea(_arg1, _arg2);
}
public function destroy(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:String;
var _local6:*;
var _local7:uint;
if (standbooth){
if (akuJroom){
destroyJanitors();
} else {
if (((!(canDestroy)) && (!((customer == null))))){
canceled = true;
_local6 = customer;
out(customer);
_local6.causeOfDestroyBooth();
_local6 = null;
_local7 = visitor_antri.length;
h = 0;
while (h < _local7) {
visitor_antri[h].causeOfDestroyBooth();
h++;
};
};
};
};
var _local4:Point = new Point();
var _local5:Object;
h = 0;
while (h < ROWS) {
k = 0;
while (k < COLS) {
_local4.x = (ptile.x - h);
_local4.y = (ptile.y + k);
_local3 = ((("tile_" + _local4.x) + "_") + _local4.y);
_local5 = parent_["map"]["area"][_local4.x][_local4.y];
if (_local5.isi){
_local5.isi = false;
_local5.isi_apa = null;
};
_local5 = null;
map[_local4.x][_local4.y] = false;
parentMapTiles[_local3].reInit();
k++;
};
h++;
};
addRP_khususDestroy();
parent_.destroyITabs(this, true, false, false);
clearLantai();
if (_arg1){
if (akuJroom){
main.DB_object5_active(false);
} else {
if (standbooth){
main.DB_object6_active(false);
} else {
main.DB_object1_active(false);
};
};
} else {
if (_arg2){
main.warningDestroy_active(false);
};
};
removingAllBooth();
}
public function addRP_khususDestroy():void{
if (akuRoom){
if (main["game"]["RP_khusus.destroy_a_room"] == 0){
main["game"]["RP_khusus.destroy_a_room"] = 1;
var _local1 = main["game"];
var _local2 = "totalRP.Khusus";
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
main.hitungTotalRP(false, 1);
};
} else {
if (akuFacility){
if (standbooth){
if (main["game"]["RP_khusus"]["destroy_a_standbooth"] == 0){
main["game"]["RP_khusus"]["destroy_a_standbooth"] = 2;
main["game"]["totalRP.Khusus"] = (main["game"]["totalRP.Khusus"] + 2);
main.hitungTotalRP(false, 2);
} else {
_local1 = main["game"];
_local2 = "totalRP.Khusus";
_local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
main.hitungTotalRP(false, 1);
};
} else {
if (main["game"]["RP_khusus"]["destroy_a_facility"] == 0){
main["game"]["RP_khusus"]["destroy_a_facility"] = 2;
main["game"]["totalRP.Khusus"] = (main["game"]["totalRP.Khusus"] + 2);
main.hitungTotalRP(false, 1);
} else {
_local1 = main["game"];
_local2 = "totalRP.Khusus";
_local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
main.hitungTotalRP(false, 1);
};
};
};
};
}
private function spliceOnArray(_arg1:Array, _arg2=null):void{
var _local3:int = _arg1.indexOf(_arg2);
if (_local3 != -1){
_arg1.splice(_local3, 1);
};
}
public function removingData():void{
var _local2:int;
parent_.objContainer.removeChild(this);
var _local1:Array;
if (akuRoom){
_local1 = main.TempList_Pop[mainJenis][jenis];
spliceOnArray(_local1, REC.boothSort);
_local2 = parent_.rooms[jenis].indexOf(this);
if (_local2 != -1){
parent_.rooms[jenis].splice(_local2, 1);
};
rumus.spliceArrayObject(main.game.objects[jenis], this, "ob");
popularity = 0;
REC = null;
main.updateRealTime(mainJenis, 0, jenis);
main.updatePopularityBooth_onAdd(mainJenis, jenis, false);
} else {
if (akuFacility){
_local1 = main.TempList_Pop[mainJenis][jenis];
spliceOnArray(_local1, REC.boothSort);
rumus.spliceArrayObject(main.game.objects.Facility, this, "ob");
popularity = 0;
REC = null;
main.updateRealTime(mainJenis, -1, jenis);
main.updatePopularityBooth_onAdd(mainJenis, jenis, false);
} else {
if (akuJroom){
_local1 = main.TempList_Pop[mainJenis];
spliceOnArray(_local1, REC.boothSort);
rumus.spliceArrayObject(main.game.objects.JanitorRoom, this, "ob");
popularity = 0;
REC = null;
main.updateRealTime(mainJenis, 0, jenis);
main.updatePopularityBooth_onAdd(mainJenis, jenis, false);
};
};
};
_local1 = null;
parent_.destinationList[this.name] = null;
parent_.booths[this.name] = null;
delete parent_.booths[this.name];
delete parent_.destinationList[this.name];
}
public function updatePathArea(_arg1:Point, _arg2:Boolean):void{
}
public function roomSelimut():void{
}
public function pushAntrian(_arg1, _arg2:Boolean=false):void{
if (akuRoom){
} else {
if (minibooth){
booked_price_val = _arg1.money;
booked_price_min = ((booked_price_val)<booked_price) ? booked_price_val : booked_price;
booked_price_max = ((booked_price_val)<max_price) ? booked_price_val : max_price;
booked_price_val = ((booked_price_min)==booked_price_max) ? booked_price_min : co.randomRange(booked_price_min, booked_price_max);
_arg1.cost = booked_price_val;
} else {
if (akuMinimarket){
booked_price_val = _arg1.money;
booked_price_min = 5;
booked_price_min = ((booked_price_val)<booked_price) ? booked_price_val : booked_price;
booked_price_max = ((booked_price_val)<max_price) ? booked_price_val : max_price;
booked_price_val = ((booked_price_min)==booked_price_max) ? booked_price_min : co.randomRange(booked_price_min, booked_price_max);
_arg1.cost = booked_price_val;
persen_usedtimer = ((booked_price_val)<(0.3 * max_price)) ? 10 : (booked_price_val / max_price);
} else {
if (akuFacility){
_arg1.cost = booked_price;
};
};
};
};
if (visitor_antri.indexOf(_arg1) == -1){
visitor_antri.push(_arg1);
boostMoodVisitor("antri", _arg1);
};
}
private function priceUsedBooth():void{
}
public function popAntrian(_arg1):void{
if (visitor_antri.indexOf(_arg1) != -1){
visitor_antri.splice(visitor_antri.indexOf(_arg1), 1);
};
}
public function editStartBubu(_arg1:int=0):void{
}
public function entering0(_arg1):void{
var awal:Boolean;
var _visitor = _arg1;
if (akuFacility){
booked = true;
customer = _visitor;
var _local3 = customer;
with (_local3) {
memasuki = true;
insideBooth = true;
antriAtBooth = false;
};
if (standbooth){
jeda_booked = 5;
} else {
jeda_booked = 10;
};
initUsedTimer();
canDestroy = false;
wallOnEnter();
} else {
if (akuRoom){
booked = true;
awal = false;
customer = _visitor;
if (_visitor.bookedRoom != this){
single = customer.single;
customer.startEntering0Room(this);
awal = true;
};
customer.startActivityRoom(awal);
canDestroy = false;
wallOnEnter();
main.CheckMissions("one_stayed");
main.CheckMissions("x_stayed");
main.CheckMissions("xx_stayed");
};
};
}
public function entering():void{
if (akuFacility){
customer.useFacility(this);
boostMoodVisitor("masukFacility", customer);
enteringAnim();
wallOnEnter(false);
} else {
if (akuRoom){
if (customer.isRoomStay(booked_price)){
boostMoodVisitor("masukRoom1", customer);
addExpPoint("masukRoom1", customer.smiley, "", customer.special);
} else {
used = (used + 1);
today_used = (today_used + 1);
addExpPoint("used", customer.smiley, "", customer.special);
boostMoodVisitor("masukRoom0", customer);
};
customer.useRoom(this);
enteringAnim();
reservedCheck(false);
wallOnEnter(false);
};
};
}
public function out(_arg1=null):void{
var ix:uint;
var _visitor = _arg1;
if (akuFacility){
if (booked){
ix = customer.tujuanList["Facility"][jenis];
if (canceled){
main.insertMoneyClip("leaving", this);
boostMoodVisitor("canceled", customer);
} else {
used = (used + 1);
today_used = (today_used + 1);
collectsVisit();
total_pay = customer.cost;
main.insertMoneyClip(total_pay, this);
total_tip = addUangTip(customer);
if (total_tip > 0){
main.insertMoneyClip(total_tip, this, true);
};
total_pay = (total_pay + total_tip);
updateMoney("visitor", customer, total_pay, false, true);
boostMoodVisitor("served", customer);
addExpPoint("used", customer.smiley, "", customer.special);
main.PlaySound("coin1");
customer.balon.setBalon(customer.smiley, -1, false, true);
addExpPoint("satisfy", customer.smiley, "", customer.special);
main.CheckMissions("x_customer");
main.CheckMissions("x_customer2");
main.CheckMissions("x_customer3");
main.CheckMissions("x_customer4");
if (restobooth){
main.CheckMissions("first_meal");
} else {
if (akuMinimarket){
main.CheckMissions("x_buyers");
main.CheckMissions("x_buyers2");
} else {
if (akuMedical){
main.CheckMissions("x_medicine");
main.CheckMissions("x_medicine2");
};
};
};
};
canceled = false;
if (standbooth){
if (customer.onStand_p == 0){
tpointAr["antri"][customer.nama][0] = false;
} else {
tpointAr["antri"][customer.nama][1] = false;
};
customer.onStand = null;
};
var _local3 = customer;
with (_local3) {
memasuki = false;
insideBooth = false;
myob = null;
};
popAntrian(customer);
customer = null;
booked = false;
canDestroy = true;
boothStandby();
wallOnEnter(false);
if (opened){
outAnim(_visitor);
} else {
tutupBooth();
};
};
} else {
if (akuRoom){
_local3 = customer;
with (_local3) {
memasuki = false;
insideRoom = false;
insideBooth = false;
myob = null;
};
boothStandby();
wallOnEnter(false);
reservedCheck();
};
};
}
private function calcPopularityXP():void{
expPop_temp = (expPoint / expMaxTotal);
popularity = (popularity + (expPop_temp * (REF["pop"][(level_ - 1)] * 0.01)));
reupdatePopularity();
}
public function reupdatePopularity():void{
var _local1:Boolean;
if (_local1){
if (reinitHour != hourDay){
if (akuLobby){
main.updatePopularityLobby();
} else {
REC.boothSort.popularity = popularity;
main.updatePopularityBooth_onAdd(mainJenis, jenis);
};
main.CollectsVisitorValues();
reinitHour = hourDay;
};
};
}
public function addUangTip(_arg1, _arg2:Boolean=false):uint{
var _local4:uint;
var _local5:uint;
var _local3:uint;
_local5 = _arg1.REF.tip;
_local4 = ((_arg1.persenMood)>80) ? _local5 : ((_arg1.persenMood)>49) ? (_local5 - 1) : 1;
var _local6:uint = _arg1.money;
_local6 = ((_local6)>_local4) ? _local4 : _local6;
_local3 = 0;
if (_local6 > 0){
_local5 = 0;
if (main.game.EXTRA.wine){
_local5 = co.randomRange(1, _local6);
};
_local3 = (_local3 + _local5);
_local6 = (_arg1.money - _local3);
_local6 = ((_local6)>_local4) ? _local4 : _local6;
_local5 = 0;
if (_arg2){
if (_local6 > 0){
if (_arg1.bookedRoom.akuCottage){
if (main.game.EXTRA.bamboo){
_local5 = co.randomRange(1, _local6);
};
} else {
if (main.game.EXTRA.palm){
_local5 = co.randomRange(1, _local6);
};
};
};
} else {
if (_local6 > 0){
if (akuHotdog){
if (main.game.EXTRA.meat){
_local5 = co.randomRange(1, _local6);
};
} else {
if (akuBaratResto){
if (main.game.EXTRA.irrigation){
_local5 = co.randomRange(1, _local6);
};
};
};
};
};
_local3 = (_local3 + _local5);
};
return (_local3);
}
public function removeBookingData():void{
parent_.rooms[jenis].push(this);
parent_.rooms.sortOn("booked_price", Array.NUMERIC);
reservedCheck(false);
canDestroy = true;
booked = false;
customer = null;
}
public function collectsVisit(_arg1:Boolean=true):void{
var _local2:uint;
var _local3:uint;
if (_arg1){
_local2 = customer.tujuanList["Facility"][jenis];
_local3 = customer.collects.length;
if (_local3 == 0){
customer.collects.push({nama:this.name, jenis:jenis, counter:5, counter2:10});
} else {
if (customer.collects[_local3] != this.name){
customer.collects.push({nama:this.name, jenis:jenis, counter:5, counter2:10});
};
};
};
}
private function recallVisitorAntri(_arg1:Array):void{
var _local2:uint = _arg1.length;
var _local3:uint = parent_.visitors.length;
h = 0;
while (h < _local2) {
k = 0;
while (k < _local3) {
if (parent_.visitors[k].ob["id"] == _arg1[h]){
visitor_antri.push(parent_.visitors[k].ob);
break;
};
k++;
};
h++;
};
}
public function cariTempPoint(_arg1:Point):Point{
var _local2:Point = rumus.findTileCoord_point(_arg1);
return (_local2);
}
public function boothStandby():void{
}
public function removeTempBooked():void{
}
public function outClosed(_arg1):void{
}
public function overrideVars():void{
}
public function acceptTileKhusus():void{
}
public function hitungPosisiAntrian():void{
}
public function placed():void{
}
public function khususLobby():void{
}
public function settingArea():void{
}
public function checkAnim():void{
}
public function outAnim(_arg1):void{
}
public function enteringAnim():void{
single = customer.single;
}
public function goActivity():void{
}
public function cekGoOutside():void{
}
public function tambahArea(_arg1:Boolean=true):void{
}
public function areaShowing():void{
}
public function areaSelectedShowing():void{
}
public function settingMapKhusus():void{
}
public function addJanitor(_arg1:Boolean=false):void{
}
public function largerArea():void{
}
public function tutupBoothKhusus(_arg1:Boolean=false):void{
}
public function roomSleeping():Boolean{
return (opened);
}
public function bridgeContinue():void{
}
public function destroyJanitors():void{
}
public function cekJanitorRoomArea():void{
}
public function reservedCheck(_arg1:Boolean=false):void{
}
public function cekBridgeVisitorRecord(_arg1=null, _arg2:int=-1):void{
}
function get money():uint{
return (main.money);
}
function get RP_rotate():uint{
return (main.game.RP_khusus.rotate_a_booth);
}
function set RP_rotate(_arg1:uint){
main.game.RP_khusus.rotate_a_booth = _arg1;
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + _arg1);
main.hitungTotalRP(false, _arg1);
}
function get RP_goto_facility():uint{
return (main.game.RP_khusus.goto_facility);
}
function set RP_goto_facility(_arg1:uint){
main.game.RP_khusus.goto_facility = _arg1;
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + _arg1);
main.hitungTotalRP(false, _arg1);
}
function get total_minibooth():uint{
return (main.total_minibooth);
}
function get hourDay():uint{
return (main.hourDay);
}
function get dataUsedTimer():uint{
return (customer.dataUsedTimer(jenis));
}
public function get RP_createData(){
return (main.game.RP_createData[jenis]);
}
public function set RP_createData(_arg1:uint){
return ((main.game.RP_createData[jenis] = _arg1));
}
public function acceptRotate():void{
var _local1:int = mclip.scaleX;
mclip.scaleX = (mclip.scaleX * -1);
if (RP_rotate == 0){
RP_rotate = 1;
};
}
public function acceptGoToTarget():void{
if (akuFacility){
if (RP_goto_facility == 0){
RP_goto_facility = 1;
};
};
}
public function acceptPurchaseUniform():void{
if (REF.sumStaff > 0){
uniform_val = 5;
initUsedTimer();
};
}
public function acceptPurchaseTreadmill():void{
if (REF.sumStaff > 0){
treadmill_val = 5;
initUsedTimer();
};
}
function initUsedTimer():void{
if (customer != null){
if (akuMinimarket){
used_timer = ((persen_usedtimer)>1) ? persen_usedtimer : (persen_usedtimer * dataUsedTimer);
} else {
used_timer = dataUsedTimer;
};
used_timer = (used_timer + -((REF.UT[(level_ - 1)] + (uniform_val + treadmill_val))));
if (used_timer < 5){
used_timer = ((dataUsedTimer)<5) ? dataUsedTimer : 5;
};
};
}
public function roomlevelType():String{
if (single){
return ((roomlevel + "_single"));
};
return ((roomlevel + "_double"));
}
}
}//package pack.Instance.Booths
Section 79
//Cottage (pack.Instance.Booths.Cottage)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Cottage extends Booth {
public var onfocus_mc:MovieClip;
public var reserved:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public var sleeping:Boolean;
public var wake:Boolean;
public var temp_booked:Boolean;
public var matikanLampu:Boolean;
public var anime_bubu:Boolean;
public var startBubu:int;// = -1
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Cottage():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Cottage;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
temp_booked = false;
matikanLampu = false;
anime_bubu = false;
}
override public function initClip():void{
mclip.selimut.visible = false;
mclip.visitor1.init();
mclip.visitor2.hiding();
}
override public function overrideVars():void{
sleeping = false;
wake = false;
anime_bubu = false;
nama_tampil = (REF.nic + id);
startBubu = -1;
}
override public function roomSelimut():void{
mclip.selimut.gotoAndStop(roomlevelType());
}
override public function overrideRecord():void{
REC.startBubu = startBubu;
REC.sleeping = sleeping;
REC.single = single;
REC.temp_booked = temp_booked;
REC.wake = wake;
if (customer == null){
REC.customer = -1;
} else {
REC.customer = customer.id;
};
}
override public function reservedCheck(_arg1:Boolean=true):void{
if (_arg1){
reserved.pic.gotoAndStop(_jenisCustomer);
};
reserved.visible = _arg1;
}
override public function removeTempBooked():void{
temp_booked = false;
var _local1 = main.game;
var _local2 = (jenis + "_booked");
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
}
override public function editStartBubu(_arg1:int=0):void{
startBubu = _arg1;
}
override public function placed():void{
}
override public function temp_record():void{
main.adaPathBaru = true;
var _local1:uint = main.game.objects[jenis].length;
main.game.objects[jenis].push({adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, builded:builded, booked:booked, boothSort:null, canDestroy:canDestroy, canceled:canceled, customer:null, expPoint:expPoint, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, single:single, sleeping:sleeping, simpanGaji:simpanGaji, startBubu:startBubu, temp_booked:temp_booked, today_used:today_used, total_income:total_income, today_income:today_income, today_expend:today_expend, todayPop_kumu:todayPop_kumu, used:used, used_timer:used_timer, wake:wake});
REC = main.game.objects[jenis][_local1];
updateMoney("build", null, -(REF.price[0]));
main.PlaySound("coin1");
var _local2:uint;
var _local3 = -1;
var _local4:Array = main.game.RP_createData[jenis];
if (_local4 != null){
_local1 = _local4.length;
h = 0;
while (h < _local1) {
if (_local4[h] == 0){
_local3 = h;
break;
};
h++;
};
if (_local3 == -1){
_local3 = _local1;
} else {
_local4[_local3] = 1;
};
_local2 = serbi.ResearchPoint.addPoint[jenis][_local3];
main.game.totalRP.Room = (main.game.totalRP.Room + _local2);
main.hitungTotalRP(false, _local2);
};
_local4 = null;
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
if (customer.insideRoom){
customer.balon.forceToClose();
enteringAnim();
wallOnEnter(false);
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer["REF"].jenis1;
mclip.visitor2.jenis = customer["REF"].jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (customer.bubu){
ditidurkan();
} else {
matikanLampu = false;
anime_bubu = false;
customer.visible = false;
didudukkan();
};
}
override public function roomSleeping():Boolean{
if (((sleeping) || (matikanLampu))){
return (false);
};
return (true);
}
override public function acceptGoToTarget():void{
if (RP_goto_cottage == 0){
RP_goto_cottage = 1;
};
}
function get RP_goto_cottage():uint{
return (main.game.RP_khusus.goto_cottage);
}
function set RP_goto_cottage(_arg1:uint){
main.game.RP_khusus.goto_cottage = _arg1;
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + _arg1);
main.hitungTotalRP(false, _arg1);
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
public function pakaiSelimut():void{
mclip.selimut.gotoAndStop(roomlevelType());
mclip.selimut.visible = true;
sleeping = true;
}
public function bukaSelimut():void{
mclip.selimut.visible = false;
if (((sleeping) && (!((customer == null))))){
wake = false;
anime_bubu = false;
goActivity();
};
sleeping = false;
matikanLampu = false;
changeColor(onSelected, onOver);
}
public function sleep():void{
if (customer.visible){
customer.visible = false;
mclip.visitor1.anime("center_to_sleep");
if (!single){
mclip.visitor2.anime("center_to_sleep");
};
anime_bubu = true;
} else {
if (mclip.visitor1.visible){
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_duduk")){
mclip.visitor1.anime("duduk_to_sleep");
if (!single){
mclip.visitor2.anime("duduk_to_sleep");
};
anime_bubu = true;
} else {
if ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))){
mclip.visitor1.anime("center_to_sleep");
if (!single){
mclip.visitor2.anime("center_to_sleep");
};
anime_bubu = true;
};
};
};
};
}
override public function boothStandby():void{
mclip.visitor1.standby();
}
override public function goActivity():void{
_label = visitor1label();
if (mclip.visitor1.visible){
if ((((_label == (("v" + _jenisVisitor1) + "_sleep1"))) || ((_label == (("v" + _jenisVisitor1) + "_sleep2"))))){
mclip.visitor1.anime("sleep_to_center");
if (!single){
mclip.visitor2.anime("sleep_to_center");
};
} else {
if (_label == (("v" + _jenisVisitor1) + "_duduk")){
mclip.visitor1.anime("duduk_to_center");
if (!single){
mclip.visitor2.anime("duduk_to_center");
};
};
};
};
}
public function checkDuduk():void{
_label = visitor1label();
if ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))){
didudukkan();
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))){
customer.dir(0, -1);
customer.gerakArah();
mclip.visitor1.hiding();
mclip.visitor2.hiding();
customer.visible = true;
} else {
goActivity();
};
}
function didudukkan():void{
customer.visible = false;
mclip.visitor1.anime("center_to_duduk");
if (!single){
mclip.visitor2.anime("center_to_duduk");
};
}
public function ditidurkan():void{
if (!anime_bubu){
sleep();
};
if (!matikanLampu){
customer.initBubuTimer();
matikanLampu = true;
changeColor(onSelected, onOver);
};
}
}
}//package pack.Instance.Booths
Section 80
//Giftshop (pack.Instance.Booths.Giftshop)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Giftshop extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public function Giftshop():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Giftshop;
callREF();
tpointAr = [new Point(0, 0), new Point(0, -1), new Point(0, 1), new Point(-1, 0), new Point(1, 0)];
center = 0;
max_antri = 5;
tpointAr["antri_tr"] = [];
tpointAr["antri_angle"] = [];
tpointAr["antri"] = [];
tpointAr["antri_point"] = [];
tpointAr["around"] = [];
mclip.employee.mouseEnabled = false;
mclip.employee.visible = false;
}
override public function goActivity():void{
}
override public function bridgeContinue():void{
if (customer != null){
single = customer.single;
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (((customer.memasuki) && (((customer.insideBooth) && ((customer.myob == this)))))){
customer.balon.setBalon(false);
};
};
}
override public function enteringAnim():void{
single = customer.single;
mclip.employee.anim();
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.visible = false;
};
} else {
if (opened){
mclip.employee.visible = true;
} else {
mclip.employee.visible = false;
};
};
}
}
}//package pack.Instance.Booths
Section 81
//Golf (pack.Instance.Booths.Golf)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Golf extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Golf():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Golf;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(-2, 0), new Point(-3, 0), new Point(0, 1), new Point(-3, 1), new Point(0, 2), new Point(-3, 2), new Point(0, 3), new Point(-1, 3), new Point(-2, 3), new Point(-3, 3)];
center = 3;
max_antri = 1;
}
override public function initClip():void{
mclip.visitor1.init();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("anim");
} else {
mclip.visitor1.anime("anim");
mclip.visitor2.anime("anim");
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + String(_jenisVisitor1)) + "_place")){
mclip.visitor1.anime("out");
if (!single){
mclip.visitor2.anime("out");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (((!((mclip.visitor1 == null))) && ((_label == (("v" + String(_jenisVisitor1)) + "_center"))))){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 82
//Gym (pack.Instance.Booths.Gym)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Gym extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Gym():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Gym;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_place");
} else {
mclip.visitor1.anime("center_to_place");
mclip.visitor2.anime("center_to_place");
};
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_place")){
mclip.visitor1.anime("place_to_center");
if (!single){
mclip.visitor2.anime("place_to_center");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 83
//Hotdog (pack.Instance.Booths.Hotdog)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Hotdog extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public function Hotdog():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Hotdog;
callREF();
tpointAr = [new Point(0, 0), new Point(0, -1), new Point(0, 1), new Point(-1, 0), new Point(1, 0)];
center = 0;
max_antri = 5;
tpointAr["antri_tr"] = [];
tpointAr["antri_angle"] = [];
tpointAr["antri"] = [];
tpointAr["antri_point"] = [];
tpointAr["around"] = [];
mclip.employee.mouseEnabled = false;
mclip.employee.visible = false;
}
override public function goActivity():void{
}
override public function bridgeContinue():void{
if (customer != null){
single = customer.single;
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (((customer.memasuki) && (((customer.insideBooth) && ((customer.myob == this)))))){
customer.balon.setBalon(false);
};
};
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.visible = false;
};
} else {
if (opened){
mclip.employee.visible = true;
} else {
mclip.employee.visible = false;
};
};
}
}
}//package pack.Instance.Booths
Section 84
//Icecream (pack.Instance.Booths.Icecream)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Icecream extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public function Icecream():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Icecream;
callREF();
tpointAr = [new Point(0, 0), new Point(0, -1), new Point(0, 1), new Point(-1, 0), new Point(1, 0)];
center = 0;
max_antri = 5;
tpointAr["antri_tr"] = [];
tpointAr["antri_angle"] = [];
tpointAr["antri"] = [];
tpointAr["antri_point"] = [];
tpointAr["around"] = [];
}
override public function initClip():void{
mclip.tutup.visible = false;
}
override public function overrideRecord():void{
if (customer == null){
REC.customer = -1;
} else {
REC.customer = customer.id;
};
REC.antriStand = co.cloning(tpointAr["antri"]);
}
override public function bridgeContinue():void{
if (customer != null){
single = customer.single;
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (((customer.memasuki) && (((customer.insideBooth) && ((customer.myob == this)))))){
customer.balon.setBalon(false);
};
};
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.tutup.visible = true;
};
} else {
if (opened){
mclip.tutup.visible = false;
} else {
mclip.tutup.visible = true;
};
};
}
}
}//package pack.Instance.Booths
Section 85
//IndiaResto (pack.Instance.Booths.IndiaResto)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class IndiaResto extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function IndiaResto():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.IndiaResto;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
public function barkRoom():void{
trace("Room1 class: Bow wow");
}
override public function bridgeContinue():void{
if (customer != null){
single = customer.single;
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.setBalon(false);
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.setBalon(false);
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime();
} else {
mclip.visitor1.anime();
mclip.visitor2.anime();
};
mclip.employee.anim();
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function goActivity():void{
}
override public function cekGoOutside():void{
if (mclip.visitor1.visible){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 86
//Jacuzi (pack.Instance.Booths.Jacuzi)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Jacuzi extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Jacuzi():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Jacuzi;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("anim");
} else {
mclip.visitor1.anime("anim");
mclip.visitor2.anime("anim");
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
_label = visitor1label();
if ((((_label == (("v" + _jenisVisitor1) + "_swim"))) || ((_label == (("v" + _jenisVisitor1) + "_anim"))))){
mclip.visitor1.anime("anim_to_center");
if (!single){
mclip.visitor2.anime("anim_to_center");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 87
//JanitorRoom (pack.Instance.Booths.JanitorRoom)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class JanitorRoom extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public var myJanitor:Array;
public var myArea:Array;
public var sampahArea:Array;
public var tileArea:Array;
public var areaRangeX:uint;
public var areaRangeY:uint;
public var tr_center:uint;
public var gajiPokok_janitor:uint;
public var RP_reachMaxJanitor:Boolean;
public var RP_reachLevelMaxJanitor:Boolean;
private var batasRangeX1:uint;
private var batasRangeX2:uint;
private var batasRangeY1:uint;
private var batasRangeY2:uint;
public function JanitorRoom():void{
}
override public function initial():void{
myArea = [];
sampahArea = [];
tileArea = [];
REF = serbi.dataOb.Booth.JanitorRoom;
callREF();
tpointAr = [];
center = 0;
}
override public function acceptTileKhusus():void{
var _local1:uint = (11 * 0.5);
batasRangeX1 = (ptile.x - _local1);
batasRangeX2 = (ptile.x + _local1);
batasRangeY1 = (ptile.y - _local1);
batasRangeY2 = (ptile.y + _local1);
h = batasRangeX1;
while (h <= batasRangeX2) {
k = batasRangeY1;
while (k <= batasRangeY2) {
tileArea.push(new Point(h, k));
k++;
};
h++;
};
}
override public function temp_record():void{
main.adaPathBaru = true;
var _local1:uint = parent_.main.game.objects.JanitorRoom.length;
parent_.main.game.objects.JanitorRoom.push({adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, builded:builded, boothSort:null, canDestroy:canDestroy, gajiPokok_janitor:gajiPokok_janitor, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, RP_reachMaxJanitor:RP_reachMaxJanitor, RP_reachLevelMaxJanitor:RP_reachLevelMaxJanitor, today_expend:today_expend, todayPop_kumu:todayPop_kumu, myJanitor:[]});
REC = parent_.main.game.objects.JanitorRoom[_local1];
updateMoney("build", null, -(REF.price[0]));
main.PlaySound("coin1");
if (_local1 == 0){
main.createGuideInGame();
};
var _local2:uint;
var _local3 = -1;
var _local4:* = main.game.RP_createData[jenis];
if (_local4 != null){
_local1 = _local4.length;
h = 0;
while (h < _local1) {
if (_local4[h] == 0){
_local3 = h;
break;
};
h++;
};
if (_local3 == -1){
_local3 = _local1;
} else {
_local4[_local3] = 1;
};
_local2 = serbi.ResearchPoint.addPoint[jenis][_local3];
main.game.totalRP[REF.mainJenis] = (main.game.totalRP[REF.mainJenis] + _local2);
main.hitungTotalRP(false, _local2);
};
_local4 = null;
}
override public function initRecVarsCreated(_arg1:Boolean=false):void{
var _local2:Boolean;
var _local3:String;
var _local4:uint;
if (_arg1){
} else {
for (_local3 in REC) {
_local2 = ((!((_local3 == "ob"))) && (((((((!((_local3 == "jenis"))) && (!((_local3 == "idefault"))))) && (!((_local3 == "ptile"))))) && (!((_local3 == "myJanitor"))))));
if (_local2){
this[_local3] = REC[_local3];
};
};
_local4 = REC.myJanitor.length;
myJanitor = new Array(_local4);
};
}
override public function overrideVars():void{
myJanitor = [];
RP_reachMaxJanitor = false;
RP_reachLevelMaxJanitor = false;
gajiPokok_janitor = REF.gaji_pokok[(level_ - 1)];
}
override public function overrideRecord():void{
var _local1:uint;
var _local2:Object;
if (REC){
_local1 = myJanitor.length;
_local2 = null;
REC.myJanitor = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = myJanitor[h];
REC.myJanitor[h] = {id:_local2["id"], nama_tampil:_local2.nama_tampil, today_expend:_local2.today_expend, daily_gaji:_local2.daily_gaji};
h++;
};
_local2 = null;
REC.RP_reachMaxJanitor = RP_reachMaxJanitor;
REC.RP_reachLevelMaxJanitor = RP_reachLevelMaxJanitor;
};
}
override public function tambahArea(_arg1:Boolean=true):void{
if (_arg1){
area = new Area();
area.x = (this.x + SIZE_);
area.y = (this.y - (SIZE_ * 0.5));
area.alpha = 0.35;
canvasSprite.addChild(area);
area.init();
} else {
if (area){
canvasSprite.removeChild(area);
area = null;
};
};
}
override public function settingMapKhusus():void{
var _local1:Boolean;
var _local2:Boolean;
var _local3:uint;
var _local4:uint;
map = [];
_local3 = parent_.ROWS_MAX;
_local4 = parent_.COLS_MAX;
h = 0;
while (h < _local3) {
map[h] = new Array(_local4);
k = 0;
while (k < _local4) {
_local1 = (((h >= batasRangeX1)) && ((h <= batasRangeX2)));
_local2 = (((k >= batasRangeY1)) && ((k <= batasRangeY2)));
if (((_local1) && (_local2))){
map[h][k] = true;
} else {
map[h][k] = false;
};
k++;
};
h++;
};
updateTpointAr();
settingArea();
}
override public function settingArea():void{
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:String;
var _local7:String;
var _local8:String;
var _local9:Boolean;
var _local10:Boolean;
var _local11:Boolean;
var _local12:Boolean;
var _local13:Array;
var _local14:Array;
var _local15:Point;
var _local21:uint;
if (level_ == 1){
areaRangeX = 7;
areaRangeY = 7;
} else {
if (level_ == 2){
areaRangeX = 9;
areaRangeY = 9;
} else {
areaRangeX = 11;
areaRangeY = 11;
};
};
var _local16:uint = (areaRangeX * 0.5);
var _local17:uint = (ptile.x - _local16);
var _local18:uint = (ptile.x + _local16);
var _local19:uint = (ptile.y - _local16);
var _local20:uint = (ptile.y + _local16);
_local6 = ((ptile.x + "_") + ptile.y);
_local8 = ("tile_" + _local6);
_local5 = tileArea.length;
h = 0;
while (h < _local5) {
_local15 = tileArea[h];
_local7 = ((_local15.x + "_") + _local15.y);
_local10 = (((_local15.x >= _local17)) && ((_local15.x <= _local18)));
_local11 = (((_local15.y >= _local19)) && ((_local15.y <= _local20)));
if (((_local10) && (_local11))){
_local9 = map[_local15.x][_local15.y];
_local2 = (Math.abs((ptile.x - h)) + Math.abs((ptile.y - k)));
_local12 = parent_.map.walkable[_local15.x][_local15.y];
if (_local12){
map[_local15.x][_local15.y] = true;
} else {
if (_local7 == _local6){
map[_local15.x][_local15.y] = true;
} else {
map[_local15.x][_local15.y] = false;
};
};
_local8 = ((("tile_" + _local15.x) + "_") + _local15.y);
myArea[_local8] = parentMapTiles[_local8];
_local4 = myArea.length;
myArea.push({tile:_local7, tr:tpointAr[_local7], ptile:_local15, name:_local8});
myArea[("REF" + _local7)] = myArea[_local4];
} else {
map[_local15.x][_local15.y] = false;
};
h++;
};
}
private function updateTpointAr():void{
var _local1:uint;
var _local2:uint;
var _local3:String;
_local1 = tileArea.length;
h = 0;
while (h < _local1) {
_local2 = h;
tpointAr.push(tileArea[h]);
_local3 = ((tileArea[h].x + "_") + tileArea[h].y);
tpointAr[_local3] = _local2;
h++;
};
_local3 = ((ptile.x + "_") + ptile.y);
tr_center = tpointAr[_local3];
}
private function cariAda():int{
var _local1 = -1;
return (_local1);
}
override public function updatePathArea(_arg1:Point, _arg2:Boolean):void{
if (!myArea[((("REF" + _arg1.x) + "_") + _arg1.y)]){
map[_arg1.x][_arg1.y] = false;
};
}
override public function areaShowing():void{
if (((builded) && (!((area == null))))){
if (((onSelected) || (onOver))){
area.showing(level_);
} else {
area.hiding();
};
};
}
override public function areaSelectedShowing():void{
if (((builded) && (!((area == null))))){
if (((onSelected) || (onOver))){
area.showing(level_);
} else {
area.hiding();
};
};
}
override public function largerArea():void{
gajiPokok_janitor = REF.gaji_pokok[(level_ - 1)];
myArea = [];
settingArea();
parent_.findPath(this);
areaSelectedShowing();
}
public function addJanitorExt(_arg1:Boolean=false):Boolean{
var _local2:Boolean;
var _local3:uint = myJanitor.length;
var _local4:uint = REF.hire_price[_local3];
if (((_arg1) && (parent_.main.CheckMoney("", _local4)))){
_local2 = true;
parent_.main.PlaySound("adding");
creatingJanitor(this, _arg1);
if (!RP_reachMaxJanitor){
if (myJanitor.length == 3){
main.game.totalRP[REF.mainJenis] = (main.game.totalRP[REF.mainJenis] + 1);
main.hitungTotalRP(false, 1);
RP_reachMaxJanitor = true;
};
};
};
return (_local2);
}
public function checkRPJanitorMaxLevel():void{
var _local2:Boolean;
var _local3:uint;
var _local1:uint = myJanitor.length;
if (_local1 == 3){
_local2 = true;
if (!RP_reachLevelMaxJanitor){
h = 0;
while (h < _local1) {
if (myJanitor[h].level_ != 3){
_local2 = false;
break;
};
h++;
};
if (_local2){
_local3 = 1;
main.game.totalRP[REF.mainJenis] = (main.game.totalRP[REF.mainJenis] + _local3);
main.hitungTotalRP(false, _local3);
RP_reachLevelMaxJanitor = true;
};
};
};
}
override public function removeOverride():void{
if (REC){
REC.myJanitor = null;
};
if (area){
canvasSprite.removeChild(area);
area = null;
};
myJanitor = null;
myArea = null;
sampahArea = null;
tileArea = null;
}
override public function addJanitor(_arg1:Boolean=false):void{
if (rec){
creatingJanitor(this, _arg1);
} else {
if (!_arg1){
creatingJanitor(this, _arg1);
};
};
}
public function creatingJanitor(_arg1, _arg2:Boolean=false):void{
var _local6:Array;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local3:Janitor;
var _local4:Object;
var _local5:Object = parent_.janitors;
if (((rec) && (!(_arg2)))){
_local6 = REC.myJanitor;
_local7 = _local5.length;
_local8 = _local6.length;
_local10 = 0;
k = 0;
while (k < _local8) {
_local9 = _local6[k]["id"];
h = 0;
while (h < _local7) {
_local4 = _local5[h];
if (_local9 == _local4.id){
_local3 = new Janitor();
myJanitor[_local10] = _local3;
_local3.creating(parent_, _arg1, rec, false, _local4);
_local10++;
break;
};
h++;
};
k++;
};
_local6 = null;
} else {
_local3 = new Janitor();
myJanitor.push(_local3);
if (_arg2){
_local3.creating(parent_, _arg1, false, _arg2, _local5);
} else {
_local3.creating(parent_, _arg1, rec, _arg2, _local5);
};
};
_local5 = null;
_local4 = null;
_local3 = null;
}
public function cekBridgeJanitorRecord(_arg1=null, _arg2:int=-1):void{
var _local3:Boolean;
var _local4:Array = REC.myJanitor;
var _local5:uint = _local4.length;
h = 0;
while (h < _local5) {
if (_local4[h]["id"] == _arg2){
myJanitor[h] = _arg1;
_local3 = true;
break;
};
h++;
};
_local4 = null;
}
public function destroyJanitor(_arg1):void{
var _local2:int = myJanitor.indexOf(_arg1);
if (_local2 != -1){
myJanitor.splice(_local2, 1);
};
}
override public function destroyJanitors():void{
k = myJanitor.length;
h = 0;
while (h < k) {
myJanitor[0].destroy();
h++;
};
}
override public function acceptGoToTarget():void{
if (main.game.RP_khusus.goto_janitorRoom == 0){
main.game.RP_khusus.goto_janitorRoom = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
}
}
}//package pack.Instance.Booths
Section 88
//JapanResto (pack.Instance.Booths.JapanResto)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class JapanResto extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function JapanResto():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.JapanResto;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime();
} else {
mclip.visitor1.anime();
mclip.visitor2.anime();
};
mclip.employee.anim();
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function goActivity():void{
}
override public function cekGoOutside():void{
if (mclip.visitor1.visible){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 89
//Lobby (pack.Instance.Booths.Lobby)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Lobby extends Booth {
public var onfocus_mc:MovieClip;
public var notif:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public var maxQueue_in:uint;// = 8
public var maxQueue_out:uint;// = 5
public var Mwork_in:uint;// = 125
public var Mwork_out:uint;// = 15
public var counter1:int;
public var counter2:uint;
public var door_in:Point;
public var door_out:Point;
public var full_queue_in:Boolean;
public var full_queue_out:Boolean;
public var queue_in:int;
public var queue_out:int;
public var maxIn:uint;
public var queue:Array;
public var posisiAntrian:Array;
public function Lobby():void{
queue = [];
posisiAntrian = [];
super();
}
override public function initial():void{
REF = serbi.dataOb.Booth.Lobby;
callREF();
tpointAr = [new Point(-5, 0), new Point(-3, 0), new Point(-3, 1), new Point(0, -2), new Point(0, -1), new Point(0, 0)];
center = 1;
queue["in"] = [];
posisiAntrian["in"] = [];
posisiAntrian["in_isi"] = [];
posisiAntrian["out"] = [];
posisiAntrian["out_isi"] = [];
opened = true;
nama_tampil = REF.nama;
}
override public function overrideVars():void{
counter1 = 0;
counter2 = 0;
queue_in = 0;
queue_out = 0;
full_queue_in = false;
full_queue_out = false;
queue["in"][0] = [];
queue["in"][1] = [];
queue["in"]["urut"] = [];
queue["out"] = [];
queue["out"]["urut"] = [];
}
override public function acceptTileKhusus():void{
var _local1:String = ((("tile_" + ptile.x) + "_") + (ptile.y - 1));
parentMapTiles[_local1].changeToDefault(((94 + level_) - 1));
_local1 = ((("tile_" + (ptile.x - ROWS)) + "_") + ptile.y);
parentMapTiles[_local1].changeToDefault(((94 + level_) - 1));
}
override public function khususLobby():void{
map[ptile.x][(ptile.y - 1)] = true;
map[(ptile.x - ROWS)][ptile.y] = true;
}
override public function hitungPosisiAntrian():void{
var _local1:Point;
var _local3:uint;
var _local4:uint;
var _local6:MovieClip;
var _local2:Point = new Point();
var _local5:Point = new Point();
door_in = new Point((ptile.x - (ROWS - 1)), (ptile.y - 1));
door_out = new Point((ptile.x - 1), ptile.y);
posisiAntrian["in_isi"][0] = [0];
posisiAntrian["in_isi"][1] = [0];
h = 0;
while (h < maxQueue_out) {
posisiAntrian["out_isi"].push(0);
h++;
};
posisiAntrian["in"][0] = [];
posisiAntrian["in"][1] = [];
maxIn = (maxQueue_in * 0.5);
_local4 = 1;
while (_local4 <= 2) {
_local1 = new Point((ptile.x + tpointAr[_local4].x), (ptile.y + tpointAr[_local4].y));
_local3 = 0;
while (_local3 < maxIn) {
_local2.x = (_local1.x - (_local3 * 0.5));
_local2.y = _local1.y;
_local5 = rumus.findTileCoord_point(_local2, parent_.SIZE_, true);
posisiAntrian["in"][(_local4 - 1)].push(new Point(_local5.x, _local5.y));
_local3++;
};
_local4++;
};
_local4 = 5;
_local1 = new Point((ptile.x + tpointAr[_local4].x), (ptile.y + tpointAr[_local4].y));
_local3 = 0;
while (_local3 < maxQueue_out) {
_local2.x = _local1.x;
_local2.y = (_local1.y - (_local3 * 0.45));
_local5 = rumus.findTileCoord_point(_local2, parent_.SIZE_, true);
posisiAntrian["out"].push(new Point(_local5.x, _local5.y));
_local3++;
};
}
override public function temp_record():void{
parent_.main.game.objects.Lobby = {adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, booked:booked, builded:builded, canDestroy:canDestroy, counter1:counter1, counter2:counter2, daily_gaji:daily_gaji, expPoint:expPoint, full_queue_in:full_queue_in, full_queue_out:full_queue_out, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, queue_in:queue_in, queue_out:queue_out, simpanGaji:simpanGaji, today_income:today_income, today_expend:today_expend, total_income:total_income, todayPop_kumu:todayPop_kumu, used:used, today_used:today_used, in_isi:(co.cloning(posisiAntrian["in_isi"]) as Array), out_isi:(co.cloning(posisiAntrian["out_isi"]) as Array), queue:[]};
REC = parent_.main.game.objects.Lobby;
REC.queue["in"] = [];
REC.queue["out"] = [];
}
override public function overrideRecord():void{
REC.daily_gaji = daily_gaji;
REC.counter1 = counter1;
REC.counter2 = counter2;
REC.full_queue_in = full_queue_in;
REC.full_queue_out = full_queue_out;
REC.in_isi = (co.cloning(posisiAntrian["in_isi"]) as Array);
REC.out_isi = (co.cloning(posisiAntrian["out_isi"]) as Array);
var _local1:uint = queue["in"][0].length;
var _local2:* = null;
REC.queue["in"][0] = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = queue["in"][0][h];
REC.queue["in"][0][h] = _local2.id;
h++;
};
_local1 = queue["in"][1].length;
REC.queue["in"][1] = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = queue["in"][1][h];
REC.queue["in"][1][h] = _local2.id;
h++;
};
_local1 = queue["in"]["urut"].length;
REC.queue["in"]["urut"] = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = queue["in"]["urut"][h];
REC.queue["in"]["urut"][h] = _local2.id;
h++;
};
_local1 = queue["out"].length;
REC.queue["out"] = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = queue["out"][h];
REC.queue["out"][h] = _local2.id;
h++;
};
_local1 = queue["out"]["urut"].length;
REC.queue["out"]["urut"] = new Array(_local1);
h = 0;
while (h < _local1) {
_local2 = queue["out"]["urut"][h];
REC.queue["out"]["urut"][h] = _local2.id;
h++;
};
}
override public function initRecVarsCreated(_arg1:Boolean=false):void{
var _local2:Boolean;
var _local3:String;
var _local4:uint;
if (_arg1){
} else {
for (_local3 in REC) {
_local2 = (_local3 == "ptile");
if (_local2){
} else {
_local2 = ((!((_local3 == "ob"))) && (((((((((!((_local3 == "jenis"))) && (!((_local3 == "idefault"))))) && (!((_local3 == "in_isi"))))) && (!((_local3 == "out_isi"))))) && (!((_local3 == "queue"))))));
if (_local2){
this[_local3] = REC[_local3];
};
};
};
_local4 = REC.queue["in"][0].length;
queue["in"][0] = new Array(_local4);
_local4 = REC.queue["in"][1].length;
queue["in"][1] = new Array(_local4);
_local4 = REC.queue["in"]["urut"].length;
queue["in"]["urut"] = new Array(_local4);
_local4 = REC.queue["out"].length;
queue["out"] = new Array(_local4);
_local4 = REC.queue["out"]["urut"].length;
queue["out"]["urut"] = new Array(_local4);
posisiAntrian["in_isi"] = (co.cloning(REC.in_isi) as Array);
posisiAntrian["out_isi"] = (co.cloning(REC.out_isi) as Array);
};
}
override public function cekBridgeVisitorRecord(_arg1=null, _arg2:int=-1):void{
var _local3:Array;
var _local4:uint;
var _local5:Boolean;
if (_arg2 == -1){
} else {
_local3 = REC.queue["in"][0];
_local4 = _local3.length;
_local5 = false;
h = 0;
while (h < _local4) {
if (_local3[h] == _arg2){
queue["in"][0][h] = _arg1;
_local5 = true;
break;
};
h++;
};
if (!_local5){
_local3 = REC.queue["in"][1];
_local4 = _local3.length;
h = 0;
while (h < _local4) {
if (_local3[h] == _arg2){
queue["in"][1][h] = _arg1;
_local5 = true;
break;
};
h++;
};
};
if (_local5){
_local3 = REC.queue["in"]["urut"];
_local4 = _local3.length;
h = 0;
while (h < _local4) {
if (_local3[h] == _arg2){
queue["in"]["urut"][h] = _arg1;
break;
};
h++;
};
};
if (!_local5){
_local3 = REC.queue["out"];
_local4 = _local3.length;
h = 0;
while (h < _local4) {
if (_local3[h] == _arg2){
queue["out"][h] = _arg1;
_local5 = true;
break;
};
h++;
};
if (_local5){
_local3 = REC.queue["out"]["urut"];
_local4 = _local3.length;
h = 0;
while (h < _local4) {
if (_local3[h] == _arg2){
queue["out"]["urut"][h] = _arg1;
break;
};
h++;
};
};
};
_local3 = null;
};
}
public function checkFull(_arg1:String):Boolean{
if (_arg1 == "in"){
return (full_queue_in);
};
return (full_queue_out);
}
public function checkDataQueue(_arg1:String, _arg2):void{
if (_arg1 == "in"){
queue_in = (queue_in + 1);
if (queue_in >= maxQueue_in){
full_queue_in = true;
queue_in = maxQueue_in;
};
} else {
queue_out = (queue_out + 1);
if (queue_out >= maxQueue_out){
full_queue_out = true;
queue_out = maxQueue_out;
};
};
}
public function addQueue(_arg1:String, _arg2):void{
var _local3:uint;
var _local4:uint;
if (_arg1 == "in"){
_local3 = queue["in"][0].length;
_local4 = queue["in"][1].length;
if (_local3 <= _local4){
queue["in"][0].push(_arg2);
_arg2.tr = 1;
} else {
queue["in"][1].push(_arg2);
_arg2.tr = 2;
};
queue["in"]["urut"].push(_arg2);
} else {
queue["out"].push(_arg2);
queue["out"]["urut"].push(_arg2);
_arg2.tr = 4;
};
}
public function acceptPositionAntri_In(_arg1):void{
var _local2:uint;
var _local3:uint = (_arg1.tr - 1);
var _local4:int = (queue["in"][_local3].length - 1);
_local2 = ((_local4)<0) ? 0 : _local4;
posisiAntrian["in_isi"][_local3][_local2] = 1;
_arg1.nomorAntrianLobby = _local2;
var _local5:Point = posisiAntrian["in"][_local3][_local2];
_arg1.antri_point = new Point(_local5.x, _local5.y);
_arg1.punyaNomorLobby = true;
_arg1.punyaNomorAntrian = true;
}
public function acceptPositionAntri_Out(_arg1):void{
var _local2:uint;
var _local3:int = (queue["out"].length - 1);
_local2 = ((_local3)<0) ? 0 : _local3;
posisiAntrian["out_isi"][_local2] = 1;
_arg1.nomorAntrianLobby = _local2;
_arg1.antri_point = new Point(posisiAntrian["out"][_local2].x, posisiAntrian["out"][_local2].y);
_arg1.punyaNomorLobby = true;
_arg1.punyaNomorAntrian = true;
}
public function checkDilayani(_arg1):Boolean{
var _local2:Boolean;
var _local3:Object;
if (_arg1.checkIn){
_local3 = queue["in"]["urut"][0];
} else {
_local3 = queue["out"]["urut"][0];
};
if (_arg1.nomorAntrianLobby == 0){
if (_arg1 == _local3){
_local2 = true;
};
};
_local3 = null;
return (_local2);
}
public function queueProccessIn(_arg1):void{
var _local2:String;
if (!_arg1.dilayani){
_arg1.dilayani = true;
parent_.main.PlaySound("deskbell");
} else {
counter1 = (counter1 + 1);
if (counter1 >= Mwork_in){
_local2 = _arg1.room_category;
if (_arg1.roomCategoryTersedia_path(_local2)){
main.PlaySound("blub");
_arg1.balon.setBalon(_local2, 7);
boostMoodVisitor("masuk", _arg1);
_arg1.lobby_cek = true;
_arg1.jamCheckIn_lobby = main.hour;
used = (used + 1);
today_used = (today_used + 1);
addExpPoint("used", _arg1.smiley, "", _arg1.special);
main.CheckMissions("x_lobbyUsed");
} else {
if (_arg1.roomCategoryAda_all_path()){
main.PlaySound("blub");
_arg1.balon.setBalon(_local2, 7);
boostMoodVisitor("masuk", _arg1);
_arg1.lobby_cek = true;
_arg1.jamCheckIn_lobby = main.hour;
used = (used + 1);
today_used = (today_used + 1);
addExpPoint("used", _arg1.smiley, "", _arg1.special);
main.CheckMissions("x_lobbyUsed");
} else {
_arg1.cancelFromLobby = true;
boostMoodVisitor("lobby_canceled", _arg1);
};
};
counter1 = 0;
} else {
boostMoodVisitor("antrian", _arg1);
};
};
}
public function popMyAntrianAtLobby_in(_arg1:uint):void{
var _local4:*;
var _local5:uint;
var _local2:uint = (_arg1 - 1);
queue["in"][_local2].splice(0, 1);
queue["in"]["urut"].splice(0, 1);
queue_in = (queue_in - 1);
queue_in = ((queue_in)<0) ? 0 : queue_in;
full_queue_in = false;
posisiAntrian["in_isi"][_local2][0] = 0;
var _local3:uint = queue["in"][_local2].length;
_local5 = 0;
while (_local5 < _local3) {
_local4 = queue["in"][_local2][_local5];
posisiAntrian["in_isi"][_local2][_local5] = 1;
_local4.nomorAntrianLobby = _local5;
_local4.antri_point = new Point(posisiAntrian["in"][_local2][_local5].x, posisiAntrian["in"][_local2][_local5].y);
_local4.changePosisiAntrian();
_local5++;
};
_local4 = null;
_local5 = (_local3 - 1);
while (_local5 < maxIn) {
posisiAntrian["in_isi"][_local2][_local5] = 0;
_local5++;
};
}
private function spliceQueue_in(_arg1):void{
var _local2:uint = (_arg1.tr - 1);
counter1 = 0;
queue["in"][_local2].splice(0, 1);
queue["in"]["urut"].splice(0, 1);
queue_in = (queue_in - 1);
full_queue_in = false;
posisiAntrian["in_isi"][_local2][0] = 0;
}
public function popMyAntrianAtLobby_out():void{
var _local3:uint;
queue["out"].splice(0, 1);
queue["out"]["urut"].splice(0, 1);
queue_out = (queue_out - 1);
queue_out = ((queue_out)<0) ? 0 : queue_out;
full_queue_out = false;
posisiAntrian["out_isi"][0] = 0;
var _local1:uint = queue["out"].length;
if (_local1 == 0){
wallOnEnter(false);
};
var _local2:* = null;
_local3 = 0;
while (_local3 < _local1) {
_local2 = queue["out"][_local3];
posisiAntrian["out_isi"][_local3] = 1;
_local2.nomorAntrianLobby = _local3;
_local2.antri_point = new Point(posisiAntrian["out"][_local3].x, posisiAntrian["out"][_local3].y);
_local2.changePosisiAntrian();
_local2 = null;
_local3++;
};
var _local4:int = (_local1 - 1);
_local4 = ((_local4)<0) ? 0 : _local4;
_local3 = _local4;
while (_local3 < maxQueue_out) {
posisiAntrian["out_isi"][_local3] = 0;
_local3++;
};
}
public function queueProccessOut(_arg1):void{
var _local2:Number;
var _local3:uint;
var _local4:uint;
var _local5:String;
if (!_arg1.dilayani){
_arg1.dilayani = true;
parent_.main.PlaySound("deskbell");
} else {
counter2 = (counter2 + 1);
if (counter2 >= Mwork_out){
counter2 = 0;
_arg1.lobby_checkOut = true;
_local3 = _arg1.spending_temp;
main.insertMoneyClip(_local3, this);
_local4 = addUangTip(_arg1, true);
if (_local4 > 0){
main.insertMoneyClip(_local4, this, true);
};
_local3 = (_local3 + _local4);
updateMoney("room", _arg1, _local3, false, true);
used = (used + 1);
today_used = (today_used + 1);
addExpPoint("used", _arg1.smiley, "", _arg1.special);
parent_.main.PlaySound("coin1");
boostMoodVisitor("checkout", _arg1);
_local5 = _arg1.smiley;
_arg1.balon.setBalon(_local5, -1, false, true);
addExpPoint("satisfy", _local5, "checkout", _arg1.special);
_local2 = (expPoint / expMaxTotal);
popularity = (popularity + (_local2 * (REF.pop[(level_ - 1)] * 0.01)));
reupdatePopularity();
main.TampilkanNewTips("visitor1", true);
main.CheckMissions("x_lobbyUsed");
};
};
}
override public function out(_arg1=null):void{
_arg1.insideBooth = false;
_arg1.myob = null;
}
override public function upgrade():Boolean{
var _local1:Boolean;
if (parent_.main.CheckMoney("", up_price)){
parent_.main.PlaySound("upgrade");
updateMoney("upgrade", null, -(up_price));
parent_.main.PlaySound("coin1");
updateLevel();
upgradePopularity();
addRP_upgradeLevel();
_local1 = true;
checkForUpgrade(1);
};
return (_local1);
}
public function checkQueue_in(_arg1):Boolean{
var _local2:uint = queue["in"][_arg1.tr].length;
if (_local2 < maxQueue_in){
return (true);
};
return (false);
}
public function checkQueue_out(_arg1):Boolean{
var _local2:uint = queue["out"].length;
if (_local2 < maxQueue_out){
return (true);
};
return (false);
}
override public function acceptPurchaseUniform():void{
Mwork_in = (Mwork_in - 15);
Mwork_out = (Mwork_out - 3);
}
override public function acceptPurchaseTreadmill():void{
Mwork_in = (Mwork_in - 10);
Mwork_out = (Mwork_out - 2);
}
}
}//package pack.Instance.Booths
Section 90
//Lodge (pack.Instance.Booths.Lodge)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Lodge extends Booth {
public var onfocus_mc:MovieClip;
public var reserved:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public var sleeping:Boolean;
public var wake:Boolean;
public var temp_booked:Boolean;
public var matikanLampu:Boolean;
public var anime_bubu:Boolean;
public var startBubu:int;// = -1
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Lodge():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Lodge;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1), new Point(0, 2), new Point(-1, 2)];
center = 3;
temp_booked = false;
matikanLampu = false;
anime_bubu = false;
}
override public function initClip():void{
mclip.selimut.visible = false;
mclip.visitor1.init();
mclip.visitor2.hiding();
}
override public function overrideVars():void{
sleeping = false;
wake = false;
anime_bubu = false;
nama_tampil = (REF.nic + id);
startBubu = -1;
}
override public function roomSelimut():void{
mclip.selimut.gotoAndStop(roomlevelType());
}
override public function overrideRecord():void{
REC.startBubu = startBubu;
REC.sleeping = sleeping;
REC.single = single;
REC.temp_booked = temp_booked;
REC.wake = wake;
if (customer == null){
REC.customer = -1;
} else {
REC.customer = customer.id;
};
}
override public function editStartBubu(_arg1:int=0):void{
startBubu = _arg1;
}
override public function placed():void{
}
override public function boothStandby():void{
mclip.visitor1.standby();
}
override public function temp_record():void{
main.adaPathBaru = true;
var _local1:uint = main.game.objects[jenis].length;
main.game.objects[jenis].push({adaScenery:adaScenery, ob:this, jenis:jenis, id:id, idefault:idefault, ptile:ptile, builded:builded, booked:booked, boothSort:null, canDestroy:canDestroy, canceled:canceled, customer:null, expPoint:expPoint, level_:level_, nama_tampil:nama_tampil, opened:opened, popularity:popularity, single:single, sleeping:sleeping, simpanGaji:simpanGaji, startBubu:startBubu, temp_booked:temp_booked, today_used:today_used, total_income:total_income, today_income:today_income, today_expend:today_expend, todayPop_kumu:todayPop_kumu, used:used, used_timer:used_timer, wake:wake});
REC = main.game.objects[jenis][_local1];
updateMoney("build", null, -(REF.price[0]));
main.PlaySound("coin1");
var _local2:uint;
var _local3 = -1;
if (main.game.RP_createData[jenis] != null){
_local1 = main.game.RP_createData[jenis].length;
h = 0;
while (h < _local1) {
if (main.game.RP_createData[jenis][h] == 0){
_local3 = h;
break;
};
h++;
};
if (_local3 == -1){
_local3 = _local1;
} else {
main.game.RP_createData[jenis][_local3] = 1;
};
_local2 = serbi.ResearchPoint.addPoint[jenis][_local3];
main.game.totalRP.Room = (main.game.totalRP.Room + _local2);
main.hitungTotalRP(false, _local2);
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
if (customer.insideRoom){
customer.balon.forceToClose();
enteringAnim();
wallOnEnter(false);
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (customer.bubu){
ditidurkan();
} else {
matikanLampu = false;
anime_bubu = false;
customer.visible = false;
didudukkan();
};
}
override public function reservedCheck(_arg1:Boolean=true):void{
if (_arg1){
reserved.pic.gotoAndStop(_jenisCustomer);
};
reserved.visible = _arg1;
}
override public function removeTempBooked():void{
temp_booked = false;
var _local1 = main.game;
var _local2 = (jenis + "_booked");
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
}
override public function roomSleeping():Boolean{
if (sleeping){
return (false);
};
return (true);
}
override public function acceptGoToTarget():void{
if (RP_goto_lodge == 0){
RP_goto_lodge = 1;
};
}
function get RP_goto_lodge():uint{
return (main.game.RP_khusus.goto_lodge);
}
function set RP_goto_lodge(_arg1:uint){
main.game.RP_khusus.goto_lodge = _arg1;
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + _arg1);
main.hitungTotalRP(false, _arg1);
}
public function pakaiSelimut():void{
mclip.selimut.gotoAndStop(roomlevelType());
mclip.selimut.visible = true;
sleeping = true;
changeColor(onSelected, onOver);
}
public function bukaSelimut():void{
mclip.selimut.visible = false;
if (((sleeping) && (!((customer == null))))){
wake = false;
anime_bubu = false;
customer.jamBangun = 0;
goActivity();
};
sleeping = false;
matikanLampu = false;
changeColor(onSelected, onOver);
}
public function sleep():void{
if (customer.visible){
customer.visible = false;
mclip.visitor1.anime("center_to_sleep");
if (!single){
mclip.visitor2.anime("center_to_sleep");
};
anime_bubu = true;
} else {
if (mclip.visitor1.visible){
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_duduk")){
mclip.visitor1.anime("duduk_to_sleep");
if (!single){
mclip.visitor2.anime("duduk_to_sleep");
};
anime_bubu = true;
} else {
if ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))){
mclip.visitor1.anime("center_to_sleep");
if (!single){
mclip.visitor2.anime("center_to_sleep");
};
anime_bubu = true;
};
};
};
};
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
if (mclip.visitor1.visible){
if ((((_label == (("v" + _jenisVisitor1) + "_sleep1"))) || ((_label == (("v" + _jenisVisitor1) + "_sleep2"))))){
mclip.visitor1.anime("sleep_to_center");
if (!single){
mclip.visitor2.anime("sleep_to_center");
};
} else {
if (_label == (("v" + _jenisVisitor1) + "_duduk")){
mclip.visitor1.anime("duduk_to_center");
if (!single){
mclip.visitor2.anime("duduk_to_center");
};
};
};
};
}
public function checkDuduk():void{
_label = visitor1label();
if ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))){
didudukkan();
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (((!((mclip.visitor1 == null))) && ((((_label == (("v" + _jenisVisitor1) + "_center1"))) || ((_label == (("v" + _jenisVisitor1) + "_center2"))))))){
customer.dir(0, -1);
customer.gerakArah();
mclip.visitor1.hiding();
mclip.visitor2.hiding();
customer.visible = true;
} else {
goActivity();
};
}
function didudukkan():void{
customer.visible = false;
mclip.visitor1.anime("center_to_duduk");
if (!single){
mclip.visitor2.anime("center_to_duduk");
};
}
public function ditidurkan():void{
if (!anime_bubu){
sleep();
};
if (!matikanLampu){
customer.initBubuTimer();
matikanLampu = true;
};
}
}
}//package pack.Instance.Booths
Section 91
//Medical (pack.Instance.Booths.Medical)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Medical extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Medical():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Medical;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(-2, 0), new Point(0, 1), new Point(-1, 1), new Point(-2, 1), new Point(0, 2), new Point(-1, 2), new Point(-2, 2)];
center = 4;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_place");
} else {
mclip.visitor1.anime("center_to_place");
mclip.visitor2.anime("center_to_place");
};
mclip.employee.anim();
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_place")){
mclip.visitor1.anime("place_to_center");
if (!single){
mclip.visitor2.anime("place_to_center");
};
};
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 92
//Minimarket (pack.Instance.Booths.Minimarket)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Minimarket extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Minimarket():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Minimarket;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(-2, 0), new Point(0, 1), new Point(-1, 1), new Point(-2, 1), new Point(0, 2), new Point(-1, 2), new Point(-2, 2)];
center = 5;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_place");
} else {
mclip.visitor1.anime("center_to_place");
mclip.visitor2.anime("center_to_place");
};
mclip.employee.anim();
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_place")){
mclip.visitor1.anime("place_to_center");
if (!single){
mclip.visitor2.anime("place_to_center");
};
};
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
}
}//package pack.Instance.Booths
Section 93
//Pool (pack.Instance.Booths.Pool)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Pool extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Pool():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Pool;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(-2, 0), new Point(0, 1), new Point(-1, 1), new Point(-2, 1), new Point(0, 2), new Point(-1, 2), new Point(-2, 2), new Point(0, 3), new Point(-1, 3), new Point(-2, 3)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("goswim");
} else {
mclip.visitor1.anime("goswim");
mclip.visitor2.anime("anim");
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
_label = visitor1label();
if ((((_label == (("v" + _jenisVisitor1) + "_swim"))) || ((_label == (("v" + _jenisVisitor1) + "_anim"))))){
mclip.visitor1.anime("anim_to_center");
if (!single){
mclip.visitor2.anime("anim_to_center");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (((!((mclip.visitor1 == null))) && ((_label == (("v" + _jenisVisitor1) + "_center"))))){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 94
//Sauna (pack.Instance.Booths.Sauna)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Sauna extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Sauna():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Sauna;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_duduk");
} else {
mclip.visitor1.anime("center_to_duduk");
mclip.visitor2.anime("center_to_duduk");
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + String(_jenisVisitor1)) + "_duduk")){
mclip.visitor1.anime("duduk_to_center");
if (!single){
mclip.visitor2.anime("duduk_to_center");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
}
}//package pack.Instance.Booths
Section 95
//Spa (pack.Instance.Booths.Spa)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Spa extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
private var _label:String;
private var _jenisVisitor1:uint;
private var _jenisCustomer:uint;
public function Spa():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Spa;
callREF();
tpointAr = [new Point(0, 0), new Point(-1, 0), new Point(0, 1), new Point(-1, 1)];
center = 1;
max_antri = 2;
}
override public function initClip():void{
mclip.visitor1.hiding();
mclip.visitor2.hiding();
mclip.employee.hiding();
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.hiding();
};
} else {
if (opened){
mclip.employee.anim2();
} else {
mclip.employee.hiding();
};
};
}
override public function bridgeContinue():void{
if (customer != null){
initializeCustomer();
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (customer.activityInBooth){
customer.balon.hiding();
customer.visible = false;
enteringAnim();
} else {
if (customer.insideBooth){
customer.balon.hiding();
wallOnEnter();
};
};
};
}
function initializeCustomer():void{
single = customer.single;
_jenisCustomer = customer.jenis;
if (single){
_jenisVisitor1 = _jenisCustomer;
} else {
_jenisVisitor1 = customer.REF.jenis1;
mclip.visitor2.jenis = customer.REF.jenis2;
};
mclip.visitor1.jenis = _jenisVisitor1;
}
function visitor1label():String{
return (mclip.visitor1.currentLabel);
}
override public function enteringAnim():void{
initializeCustomer();
if (single){
mclip.visitor1.anime("center_to_place");
} else {
mclip.visitor1.anime("center_to_place");
mclip.visitor2.anime("center_to_place");
};
mclip.employee.anim();
}
override public function goActivity():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_place")){
mclip.visitor1.anime("place_to_center");
if (!single){
mclip.visitor2.anime("place_to_center");
};
};
}
override public function cekGoOutside():void{
_label = visitor1label();
if (_label == (("v" + _jenisVisitor1) + "_center")){
mclip.visitor1.hiding();
mclip.visitor2.hiding();
var _local2 = customer;
with (_local2) {
diry = 0;
dirx = -1;
gerakArah();
visible = true;
};
} else {
goActivity();
};
}
override public function outAnim(_arg1):void{
mclip.employee.anim2();
}
override public function roomSelimut():void{
mclip.selimut.gotoAndStop(level_);
}
}
}//package pack.Instance.Booths
Section 96
//Taco (pack.Instance.Booths.Taco)
package pack.Instance.Booths {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Taco extends Booth {
public var onfocus_mc:MovieClip;
public var mclip_mc:MovieClip;
public var blok:MovieClip;
public function Taco():void{
}
override public function initial():void{
REF = serbi.dataOb.Booth.Taco;
callREF();
tpointAr = [new Point(0, 0), new Point(0, -1), new Point(0, 1), new Point(-1, 0), new Point(1, 0)];
center = 0;
max_antri = 5;
tpointAr["antri_tr"] = [];
tpointAr["antri_angle"] = [];
tpointAr["antri"] = [];
tpointAr["antri_point"] = [];
tpointAr["around"] = [];
mclip.employee.mouseEnabled = false;
mclip.employee.visible = false;
}
override public function goActivity():void{
}
override public function bridgeContinue():void{
if (customer != null){
single = customer.single;
used_timer = (customer.dataUsedTimer(jenis) - REF.UT[(level_ - 1)]);
if (((customer.memasuki) && (((customer.insideBooth) && ((customer.myob == this)))))){
customer.balon.setBalon(false);
};
};
}
override public function tutupBoothKhusus(_arg1:Boolean=false):void{
if (_arg1){
if (!opened){
mclip.employee.visible = false;
};
} else {
if (opened){
mclip.employee.visible = true;
} else {
mclip.employee.visible = false;
};
};
}
}
}//package pack.Instance.Booths
Section 97
//Achievement (pack.Instance.Achievement)
package pack.Instance {
import flash.display.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import pack.*;
import com.greensock.easing.*;
public class Achievement extends MovieClip {
const posisiX:Number = 252;
const posisiY:Number = 65;
public var desc_t:TextField;
public var bonus_t:TextField;
public var main;
public var REC:Object;
public var jenis:String;
public var _data:Object;
public var id:uint;
public var jedaTampil:uint;
public var counter:uint;
public var garbage:Boolean;
public var startplay:Boolean;
public var standby:Boolean;
public var rec:Boolean;
public function Achievement():void{
}
public function creating(_arg1, _arg2:Object=null, _arg3:String=""):void{
var _local4:uint;
main = _arg1;
startplay = false;
standby = false;
jedaTampil = 0;
trace("---new Achievement", _arg3, _arg2, _arg3);
if (_arg2){
rec = true;
} else {
rec = false;
};
if (rec){
REC = _arg2;
REC.ob = this;
jenis = REC.jenis;
counter = REC.counter;
garbage = REC.garbage;
} else {
jenis = _arg3;
counter = 42;
garbage = false;
_local4 = main.game.achievements.length;
main.game.achievements.push({ob:this, jenis:jenis, counter:counter, garbage:garbage});
REC = main.game.achievements[_local4];
};
this.name = ("acv_" + id);
this.visible = false;
if (rec){
if (counter <= 1){
garbage = true;
};
};
if (garbage){
standby = true;
hideAndRemove(false);
} else {
this.x = posisiX;
this.y = posisiY;
description();
main.addChild(this);
main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
main.addEventListener(Eventku.END_SAVED, endSaved);
main.addEventListener(Eventku.REMOVING_ALL, removingAll);
this.addEventListener(Event.ENTER_FRAME, playThis, false, 0, true);
};
this.mouseChildren = false;
this.mouseEnabled = false;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
private function removeListeners():void{
if (main){
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
};
this.removeEventListener(Event.ENTER_FRAME, playThis);
}
public function autoSaved(_arg1:Eventku):void{
REC.garbage = garbage;
REC.counter = counter;
REC.ob = null;
}
private function description():void{
this.gotoAndStop(jenis);
_data = serbi.Achievements[jenis];
var _local1 = (_data["nama"] + "\n");
desc_t.text = _local1;
_local1 = ("+$" + _data["bonus"]);
if (_data["RP"] > 0){
_local1 = (_local1 + (" RP+" + _data["RP"]));
};
bonus_t.text = _local1;
_data = null;
}
public function hiding():void{
this.visible = false;
}
public function isRemoved(_arg1:Boolean=true):void{
if (this.parent != null){
main.removeChild(this);
};
garbage = true;
}
public function playThis(_arg1:Event):void{
if (startplay){
if (standby){
if (counter > 0){
counter--;
} else {
closing();
this.removeEventListener(Event.ENTER_FRAME, playThis);
};
};
} else {
if (main.game.achievements[0].ob == this){
TweenMax.killTweensOf(this, true);
startplay = true;
main.PlaySound("cling");
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.75, {scaleX:1, scaleY:1, ease:Elastic.easeInOut, onComplete:onCompleteOpen});
main.CheckMissions("complete_acv");
};
};
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:onCompleteClosed});
}
public function hideAndRemove(_arg1:Boolean=true):void{
isRemoved(_arg1);
if (_arg1){
removeListeners();
};
if (main){
main.game.achievements.shift();
};
if (REC){
REC.ob = null;
};
main = null;
REC = null;
}
function onCompleteClosed():void{
hideAndRemove();
}
function onCompleteOpen():void{
standby = true;
}
public function removingAll(_arg1:Eventku=null):void{
isRemoved(true);
removeListeners();
TweenMax.killTweensOf(this);
if (REC){
REC.ob = null;
};
REC = null;
main = null;
}
}
}//package pack.Instance
Section 98
//Janitor (pack.Instance.Janitor)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import pack.*;
import pack.Instance.Booths.*;
public class Janitor extends Sprite {
private const savePoint:Object;
private const saveData:Object;
private const notSave:Object;
public var ground:MovieClip;
public var no_t:TextField;
public var balon:MovieClip;
public var onfocus:MovieClip;
public var mclip:MovieClip;
public var parent_;
public var main;
public var REC;
public var REF:Object;
public var randomTag:Object;
public var mapTileREF:Object;
public var mapTilesDATA:Object;
public var parentMapWalkable:Object;
public var onSelected:Boolean;
public var onOver:Boolean;
public var inserted:Boolean;
public var readyAction:Boolean;
public var canDestroy:Boolean;
public var tiles_bag:Array;
public var sampahDATA:Array;
public var bound1:Number;
public var bound2:Number;
public var bantuRand:Number;
public var cariIdx:int;
public var tr_now:int;
public var tr_tujuan:int;
public var ydepth:uint;
public var jeda_frame:uint;
public var randInt:uint;
public var m:uint;
public var smiley:String;
public var smiley_fix:String;
public var nama:String;
private var _size:Number;
private var _tile:Point;
private var day:uint;
private var hourDay:Number;
private var hourDayInt:int;
private var isJamTidur:Boolean;
private var isJamBangun:Boolean;
private var tengahMalam:Boolean;
private var sudahMalam:Boolean;
private var depthKhusus:Array;
private var Tab:Object;
public var sampahTag:Object;
public var targetTag:Object;
public var ptile:Point;
public var vtile:Point;
public var tpoint:Point;
public var gopoint:Point;
public var gtpoint:Point;
public var posisi:Point;
public var doorPoint:Point;
public var randomTile:Point;
public var sampahTile:Point;
public var roomTile:Point;
public var id:uint;
public var level_:uint;
public var jeda_cariDoorLagi:uint;
public var jedaCariSampah:uint;
public var expPoint:uint;
public var expMax:uint;
public var today_expend:uint;
public var istirahatTimer:uint;
public var jedaCariJalan:uint;
public var speed:Number;
public var angle:Number;
public var angleX:Number;
public var angleY:Number;
public var speedX:Number;
public var speedY:Number;
public var speedWork:Number;
public var mood:Number;
public var maxMood:Number;
public var moodPersen:Number;
public var moodMin:Number;
public var nama_tampil:String;
public var jenis:String;
public var gerak:String;
public var arah1:String;
public var arah2:String;
public var dirx:int;
public var diry:int;
public var maxTimer:int;
public var ptimer:int;
public var kelilingTimer:int;
public var up_price:int;
public var daily_gaji:int;
public var jamTidur:int;
public var menitJamTidur:int;
public var jamBangun:int;
public var menitBangun:int;
public var dayBubu:int;
public var truePos:Boolean;
public var moving:Boolean;
public var istirahat:Boolean;
public var bubu:Boolean;
public var garbage:Boolean;
public var insideRoom:Boolean;
public var working:Boolean;
public var canUpgrade:Boolean;
public var adaJalan:Boolean;
public var adaDiTujuan:Boolean;
public var punyaTarget:Boolean;
public var keliling:Boolean;
public var doorBooth:Boolean;
public var memasuki:Boolean;
public var goDoorBooth:Boolean;
public var gotoRoom:Boolean;
public var rec:Boolean;
public var vtile_temp:Point;
public var moodPersen_fix:Number;
public var room;
public function Janitor():void{
depthKhusus = [];
savePoint = {vtile:true, posisi:true, doorPoint:true, gtpoint:true, gopoint:true, sampahTile:true, randomTile:true};
saveData = {angle:true, angleX:true, angleY:true, adaDiTujuan:true, adaJalan:true, bubu:true, dirx:true, diry:true, doorBooth:true, daily_gaji:true, expPoint:true, goDoorBooth:true, garbage:true, gotoRoom:true, insideRoom:true, istirahat:true, jedaCariSampah:true, jeda_cariDoorLagi:true, jamBangun:true, jamTidur:true, keliling:true, kelilingTimer:true, level_:true, mood:true, moving:true, maxTimer:true, menitBangun:true, menitJamTidur:true, punyaTarget:true, ptimer:true, speedX:true, speedY:true, truePos:true, tr_tujuan:true, today_expend:true, working:true};
notSave = {ob:true, jenis:true, sampahTag:true, targetTag:true};
super();
}
public function creating(_arg1, _arg2=null, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Object=null):void{
var _local6:Array;
var _local7:uint;
var _local8:uint;
parent_ = _arg1;
rec = _arg3;
inserted = false;
jenis = "Janitor";
initProperties();
main = parent_.main;
mapTilesDATA = parent_["map"].tiles;
parentMapWalkable = parent_["map"]["walkable"];
sampahDATA = main.game.sampah;
room = _arg2;
roomTile.x = room["ptile"].x;
roomTile.y = room["ptile"].y;
if (rec){
REC = _arg5;
REC.ob = this;
initRecVarsCreated();
updateCoordinate();
} else {
id = main.game.ID.Janitor;
main.game.ID.Janitor++;
_local6 = null;
_local7 = main.game.TempData.ListName["Staff"].length;
if (_local7 == 0){
main.raiseStaffName();
};
_local6 = main.game.TempData.ListName["Staff"];
_local7 = _local6.length;
randInt = co.randomRangeR(_local7);
nama_tampil = _local6[randInt];
_local6.splice(randInt, 1);
_local6 = null;
initFirstVarsCreated();
vtile.x = roomTile.x;
vtile.y = roomTile.y;
_local8 = main.game.janitors.length;
main.game.janitors.push({ob:this, jenis:jenis, id:id, nama_tampil:nama_tampil, angle:angle, angleX:angleX, angleY:angleY, adaDiTujuan:adaDiTujuan, adaJalan:adaJalan, bubu:bubu, dirx:dirx, diry:diry, doorBooth:doorBooth, doorPoint:doorPoint, daily_gaji:daily_gaji, expPoint:expPoint, goDoorBooth:goDoorBooth, garbage:garbage, gotoRoom:gotoRoom, gtpoint:gtpoint, gopoint:gopoint, insideRoom:insideRoom, istirahat:istirahat, jedaCariSampah:jedaCariSampah, jeda_cariDoorLagi:jeda_cariDoorLagi, jamBangun:jamBangun, jamTidur:jamTidur, keliling:keliling, kelilingTimer:kelilingTimer, level_:level_, moving:moving, maxTimer:maxTimer, mood:mood, menitBangun:menitBangun, menitJamTidur:menitJamTidur, posisi:posisi, ptimer:ptimer, punyaTarget:punyaTarget, randomTile:randomTile, speedX:speedX, speedY:speedY, sampahTile:sampahTile, truePos:truePos, tr_tujuan:tr_tujuan, today_expend:today_expend, targetTag:null, vtile:vtile, working:working});
REC = main.game.janitors[_local8];
coordinatePosition();
};
this.name = ("janitor_" + id);
ground.hiding();
parent_.objContainer.addChild(this);
main.addEventListener(Eventku.REMOVING_ALL, removingAll);
canDestroy = true;
this.mouseEnabled = false;
this.mouseChildren = false;
this.cacheAsBitmap = true;
acceptLevelObject();
calculate_tick();
find_vtile();
this.visible = (insideRoom) ? false : true;
parent_.InsertTabs(this);
Tab = parent_["tabs"]["ref"][name];
inserted = true;
main.realTimeResort("employee");
if (_arg4){
updateMoney(-(room.REF.hire_price[(room.myJanitor.length - 1)]));
};
if (rec){
gerakArah();
moodChanging();
} else {
daily_gaji = (room.gajiPokok_janitor + REF.gaji_pokok[(room.level_ - 1)]);
main.game.MISC.JanitorSalary = (main.game.MISC.JanitorSalary + daily_gaji);
gerak = "stand";
arah1 = "front";
arah2 = "R";
moving = false;
gerakArah();
moodChanging();
goFirstMove();
};
main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
main.addEventListener(Eventku.END_SAVED, endSaved);
main.addEventListener(Eventku.AFTER_TICK, activities);
main.addEventListener(Eventku.AFTER_RECLOAD, Boothing);
}
public function autoSaved(_arg1:Eventku):void{
var _local2:Boolean;
var _local3:String;
var _local4:Object;
for (_local3 in REC) {
_local2 = savePoint[_local3];
if (_local2){
if (this[_local3] == null){
REC[_local3] = null;
} else {
REC[_local3] = this[_local3];
};
} else {
_local2 = saveData[_local3];
if (_local2){
REC[_local3] = this[_local3];
} else {
if (_local3 == "targetTag"){
if (targetTag == null){
REC.targetTag = null;
} else {
REC.targetTag = targetTag.tile;
};
};
};
};
};
REC.ob = null;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
public function Boothing(_arg1:Eventku):void{
today_expend = 0;
}
public function useDataBooth(_arg1:Eventku):void{
}
public function initRecVarsCreated():void{
var _local1:Boolean;
var _local2:String;
var _local3:*;
for (_local2 in REC) {
_local1 = savePoint[_local2];
if (_local1){
if (REC[_local2] == null){
this[_local2] = null;
} else {
this[_local2] = new Point(REC[_local2].x, REC[_local2].y);
if (_local2 == "randomTile"){
randomTag = mapTilesDATA[((("tile_" + randomTile.x) + "_") + randomTile.y)];
};
};
} else {
if (!notSave[_local2]){
this[_local2] = REC[_local2];
};
};
};
_local3 = null;
if (REC.targetTag == null){
targetTag = null;
} else {
_local3 = room.myArea[("REF" + REC.targetTag)];
targetTag = _local3;
sampahTag = room.myArea[targetTag.name].sampah;
};
_local3 = null;
maxMood = REF.MAX_MOOD[(level_ - 1)];
}
public function hidingFocus():void{
onOver = false;
onfocus.hiding();
ground.hiding();
changeColor(onSelected, onOver);
}
public function settingFocus():void{
onOver = true;
onfocus.showing();
ground.showing();
changeColor(onSelected, onOver);
}
public function initProperties():void{
_size = parent_.SIZE_;
REC = null;
REF = serbi.dataOb.Employee.Janitor;
onSelected = false;
onOver = false;
gerak = "";
arah1 = "";
arah2 = "";
smiley = "";
smiley_fix = "";
vtile_temp = new Point();
posisi = new Point();
vtile = new Point();
roomTile = new Point();
tpoint = new Point();
gopoint = new Point();
gtpoint = new Point();
_tile = new Point();
tiles_bag = [];
tiles_bag["keep"] = [];
tiles_bag["used"] = [];
jeda_frame = 0;
readyAction = (tengahMalam = false);
mclip.mouseEnabled = false;
onfocus.hiding();
balon.init(this);
no_t.visible = false;
this.mouseEnabled = false;
depthKhusus["14_21"] = true;
depthKhusus["11_23"] = true;
depthKhusus["13_21"] = true;
}
public function initFirstVarsCreated():void{
level_ = 1;
dirx = 0;
diry = 0;
mood = (maxMood = REF.MAX_MOOD[0]);
moving = false;
truePos = false;
istirahat = false;
bubu = false;
garbage = false;
working = false;
adaDiTujuan = false;
punyaTarget = false;
keliling = false;
doorBooth = false;
memasuki = false;
goDoorBooth = false;
gotoRoom = false;
randomTile = null;
sampahTile = null;
sampahTag = null;
randomTag = null;
targetTag = null;
insideRoom = true;
adaDiTujuan = true;
expPoint = 0;
jeda_cariDoorLagi = 0;
istirahatTimer = 0;
jamTidur = 0;
menitJamTidur = 0;
jamBangun = 0;
menitBangun = 0;
dayBubu = -1;
today_expend = 0;
daily_gaji = 0;
setJamBangun();
setJamTidur();
}
private function setJamTidur():void{
jamTidur = co.randomRange(REF["jamTidur"][0], ((REF["jamTidur"][1] + level_) - 1));
menitJamTidur = co.randomRange(10, 59);
}
private function setJamBangun():void{
jamBangun = ((level_)==1) ? co.randomRange(REF["jamBangun"][0], REF["jamBangun"][1]) : co.randomRange(((REF["jamBangun"][0] - level_) - 1), (REF["jamBangun"][1] - 1));
menitBangun = co.randomRange(10, 50);
}
public function updateCoordinate(_arg1:Boolean=true):void{
if (_arg1){
co.setPosition(this, posisi);
};
}
public function gerakArah():void{
gerak = (working) ? "work" : (moving) ? "walk" : "stand";
if (dirx == 0){
if (diry == 1){
arah1 = "back";
arah2 = "R";
} else {
if (diry == -1){
arah1 = "front";
arah2 = "L";
};
};
};
if (diry == 0){
if (dirx == 1){
arah1 = "back";
arah2 = "L";
} else {
if (dirx == -1){
arah1 = "front";
arah2 = "R";
};
};
};
if (mclip.currentLabel != ((gerak + "_") + arah1)){
mclip.gotoAndStop(((gerak + "_") + arah1));
};
mclip.scaleX = ((arah2)=="R") ? 1 : -1;
}
public function coordinatePosition(_arg1:Boolean=true):void{
posisi = rumus.findTileCoord_point(vtile, _size, true);
if (_arg1){
co.setPosition(this, posisi);
};
}
public function dir(_arg1:int, _arg2:int):void{
dirx = _arg1;
diry = _arg2;
}
public function find_vtile(_arg1:Boolean=true):void{
_tile = rumus.findTile(posisi.y, posisi.x, _size, true);
if (((((sameInt(vtile_temp.x)) && (sameInt(vtile_temp.y)))) || (((!((vtile.x == _tile.x))) || (!((vtile.y == _tile.y))))))){
vtile_temp.x = vtile.x;
vtile_temp.y = vtile.y;
vtile.x = _tile.x;
vtile.y = _tile.y;
mapTileREF = room.myArea[((("tile_" + vtile.x) + "_") + vtile.y)];
ydepth = vtile.y;
if (_arg1){
updateDepth();
};
main.MouseOnObject();
};
nama = ((vtile.x + "_") + vtile.y);
tr_now = room.tpointAr[nama];
}
private function sameInt(_arg1:int=0, _arg2:int=0):Boolean{
if (_arg1 == _arg2){
return (true);
};
return (false);
}
public function updateDepth(_arg1:Number=0, _arg2:Number=0, _arg3:Boolean=false):void{
if (_arg3){
bound1 = (bound1 + _arg1);
bound1 = ((bound1)<0) ? (bound1 * -1) : bound1;
bound2 = (bound2 + _arg2);
bound2 = ((bound2)<0) ? (bound2 * -1) : bound2;
} else {
if (depthKhusus[((vtile.x + "_") + vtile.y)]){
bound1 = 407.85;
} else {
bound1 = (mapTileREF.y + _arg1);
};
bound1 = ((bound1)<0) ? (bound1 * -1) : bound1;
bound2 = (mapTileREF.y + _arg2);
bound2 = ((bound2)<0) ? (bound2 * -1) : bound2;
};
if (inserted){
Tab["bound1"] = bound1;
Tab["bound2"] = bound2;
Tab["bound3"] = ydepth;
checkDepth();
};
}
private function checkDepth():void{
parent_.AppliedNewTabs();
}
public function acceptLevelObject():void{
if (level_ < 3){
up_price = REF.price[level_];
expMax = REF.Exp[level_];
} else {
expMax = REF.Exp[(level_ - 1)];
};
var _local1:uint;
if (main["game"]["EXTRA"]["uniform"]){
_local1 = 1;
};
speedWork = (REF["speedWork"][(level_ - 1)] + _local1);
speed = REF["speed"][(level_ - 1)];
checkForUpgrade(1);
}
public function acceptPurchaseUniform():void{
speedWork = (speedWork + 1);
}
public function acceptPurchaseTreadmill():void{
maxMood = (maxMood + 1);
mood = (mood + (0.25 * maxMood));
}
public function checkForUpgrade(_arg1:uint):void{
if (_arg1 == 1){
canUpgrade = ((level_)>=3) ? false : ((expPoint)>=expMax) ? true : false;
} else {
canUpgrade = ((((level_ < 3)) && ((main["money"] >= up_price)))) ? true : false;
};
}
public function moodChanging(_arg1:Boolean=false):void{
moodPersen = ((mood / maxMood) * 100);
moodPersen_fix = co.RoundDecNumber(moodPersen, 1);
var _local2:String = smiley;
smiley = serbi.checkMood(moodPersen_fix);
smiley_fix = smiley;
if (((!(insideRoom)) || (_arg1))){
if (((bubu) || (istirahat))){
smiley = "sleepy";
} else {
if (smiley == "very_upset"){
smiley = "sleepy";
} else {
if (smiley == "upset"){
bantuRand = (Math.random() * 100);
if (bantuRand < 10){
smiley = "sleepy";
};
};
};
if (smiley == "sleepy"){
istirahat = true;
};
};
if (smiley != _local2){
balon.setBalon(smiley, 7);
};
};
}
public function cekStaminaAndMood():Boolean{
var _local1:Boolean;
if (((bubu) || (istirahat))){
_local1 = true;
};
return (_local1);
}
public function boostMood(_arg1:Number=0):void{
if (_arg1 > 0){
mood = (mood + _arg1);
if (mood > maxMood){
mood = maxMood;
};
} else {
moodMin = ((moodPersen)<10) ? 0.25 : ((moodPersen)<20) ? 0.2 : ((moodPersen)<35) ? 0.15 : ((moodPersen)<50) ? 0.1 : ((moodPersen)<75) ? 0.05 : 0.025;
mood = (mood - (working) ? (moodMin + (1 - (0.2 * level_))) : moodMin);
if (mood < 0){
mood = 0;
};
};
moodChanging();
}
public function promote():Boolean{
var _local1:Boolean;
if (main.CheckMoney("", up_price)){
main.PlaySound("upgrade");
updateMoney(-(up_price));
updateLevel();
if (level_ == 3){
room.checkRPJanitorMaxLevel();
main.CheckMissions("x_promote");
main.CheckMissions("x_promote2");
};
_local1 = true;
};
return (_local1);
}
public function updateMoney(_arg1:Number=0, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:Number = Math.abs(_arg1);
today_expend = (today_expend + _local4);
main.game["MISC"]["Expend"] = (main.game["MISC"]["Expend"] + _local4);
main.updateRealTime("money", _arg1);
}
public function updateLevel():void{
var _local1:uint;
var _local2:uint;
if (level_ < 3){
level_ = (level_ + 1);
_local1 = 0;
if (main.game["EXTRA"]["treadmill"]){
_local1 = 1;
};
maxMood = (REF.MAX_MOOD[(level_ - 1)] + _local1);
if (level_ > 1){
_local2 = REF.MAX_MOOD[(level_ - 2)];
boostMood(((maxMood - _local2) + ((0.1 * level_) * mood)));
main.game["MISC"]["JanitorSalary"] = (main.game["MISC"]["JanitorSalary"] - daily_gaji);
daily_gaji = (room["gajiPokok_janitor"] + REF.gaji_pokok[(level_ - 1)]);
main.game["MISC"]["JanitorSalary"] = (main.game["MISC"]["JanitorSalary"] + daily_gaji);
};
};
acceptLevelObject();
}
public function addExpPoint():void{
expPoint = (expPoint + REF.Exp_add[(room.level_ - 1)]);
checkForUpgrade(1);
}
public function goFirstMove():void{
goDoorBooth = (((istirahat) || (bubu))) ? false : true;
jedaCariSampah = 0;
}
private function movingFunction(_arg1:Event):void{
if (!garbage){
if (main.tidakPaused()){
jeda_frame = 0;
while (jeda_frame < main["speed_effect"]) {
if (((garbage) || ((REC == null)))){
break;
} else {
movingActivities();
balon.animation(vtile.x);
};
jeda_frame++;
};
if (!garbage){
gerakArah();
};
};
};
}
private function realtimeJamMalam_Tidur():void{
if (((!(bubu)) && (!((dayBubu == day))))){
if (isJamTidur){
if (main.minuteDay >= menitJamTidur){
oshBubu();
} else {
if (tengahMalam){
oshBubu();
};
};
};
};
}
private function oshBangun():void{
bubu = false;
istirahat = false;
mood = maxMood;
moodChanging(true);
goDoorBooth = true;
}
private function oshBubu():void{
bubu = true;
setJamBangun();
}
private function bubuOkay():void{
if (dayBubu != main["day"]){
dayBubu = main["day"];
};
}
private function insideRoomActivity_tick():void{
if (bubu){
if (isJamBangun){
if (main["minuteDay"] >= menitBangun){
oshBangun();
};
};
} else {
if (istirahat){
if (istirahatTimer > 0){
istirahatTimer--;
};
if (istirahatTimer == 0){
istirahat = false;
mood = maxMood;
moodChanging(true);
goDoorBooth = true;
};
} else {
if (goDoorBooth){
if (doorPoint != null){
if (jeda_cariDoorLagi > 0){
jeda_cariDoorLagi--;
} else {
doorPoint = null;
};
};
};
};
};
}
private function calculate_tick():void{
day = main["day"];
hourDay = main["hourDay"];
hourDayInt = (hourDay | 0);
tengahMalam = (((hourDay >= 0)) && ((hourDay < 5)));
if (((tengahMalam) || ((hourDay > jamTidur)))){
sudahMalam = true;
} else {
sudahMalam = false;
};
isJamTidur = (sudahMalam) ? true : false;
isJamBangun = ((jamBangun)==0) ? false : (isJamTidur) ? false : ((hourDay)>5) ? ((hourDayInt)>=jamBangun) ? true : false : false;
}
private function activities(_arg1:Eventku):void{
calculate_tick();
if (garbage){
destroy();
} else {
if (readyAction){
realtimeJamMalam_Tidur();
if (memasuki){
} else {
if (doorBooth){
} else {
if (insideRoom){
insideRoomActivity_tick();
} else {
if (adaDiTujuan){
} else {
if (keliling){
if (kelilingTimer > 0){
kelilingTimer--;
boostMood();
};
} else {
if (punyaTarget){
if (gotoRoom){
} else {
if (((bubu) || (istirahat))){
if (!insideRoom){
targetSampahGakJadi();
gotoRoom = true;
truePos = false;
};
} else {
if (!adaJalan){
if (jedaCariJalan > 0){
jedaCariJalan--;
};
if (jedaCariJalan == 0){
targetSampahGakJadi();
if (!keliling){
acceptKeliling(2, 4);
};
};
};
};
};
} else {
if (!moving){
if (((bubu) || (istirahat))){
if (((!(gotoRoom)) && (!(insideRoom)))){
gotoRoom = true;
truePos = false;
} else {
if (!adaJalan){
if (jedaCariJalan > 0){
jedaCariJalan--;
};
if (jedaCariJalan == 0){
if (!keliling){
acceptKeliling(2, 4);
};
};
};
};
} else {
if (!punyaTarget){
if (jedaCariSampah > 0){
jedaCariSampah--;
};
if (jedaCariSampah == 0){
if (adaSampahOnArea()){
punyaTarget = true;
moving = false;
truePos = false;
};
if (!punyaTarget){
jedaCariSampah = co.randomRange(2, 4);
acceptKeliling(2, 4);
};
};
};
};
};
};
};
};
};
};
};
} else {
this.addEventListener(Event.ENTER_FRAME, movingFunction, false, 0, true);
readyAction = true;
};
};
}
private function movingActivities():void{
var _local1:int;
if (doorBooth){
if (doorPoint == null){
truePos = false;
findingDoorBooth();
} else {
if (truePos){
goDoorBooth = false;
adaDiTujuan = false;
punyaTarget = false;
keliling = false;
doorBooth = false;
insideRoom = false;
this.visible = true;
doorPoint = null;
acceptKeliling(2, 3);
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePosDoor();
} else {
if (jeda_cariDoorLagi > 0){
if (ifAdaJalan()){
};
};
};
};
};
};
} else {
if (adaDiTujuan){
if (insideRoom){
if (((bubu) || (istirahat))){
} else {
if (goDoorBooth){
doorBooth = true;
truePos = false;
};
};
};
} else {
if (keliling){
if (truePos){
if (kelilingTimer == 0){
checkStandByRandomTag();
truePos = true;
keliling = false;
if (gotoRoom){
truePos = false;
moving = false;
};
} else {
if (ptimer < maxTimer){
ptimer = (ptimer + 1);
} else {
checkStandByRandomTag();
truePos = false;
};
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos();
};
} else {
getRandomJalan();
};
};
} else {
if (punyaTarget){
if (truePos){
_local1 = sampahTag.janitor;
if (working){
if (sampahTag.onCleaning){
sampahTag.timing = (sampahTag.timing - speedWork);
if (sampahTag.timing <= 0){
if (sampahTag.timing < 0){
sampahTag.timing = 0;
};
boostMood();
checkSampahAsGarbage();
sampahTag.isRemoved();
addRPTiapCleanSampah();
targetTagSampahGakJadi();
};
} else {
if (sameInt(_local1, -1)){
sampahTag.onCleaning = true;
sampahTag.janitor = id;
working = true;
} else {
targetTagSampahGakJadi();
};
};
} else {
if (sampahTag.onCleaning){
if (((sameInt(_local1, -1)) || (sameInt(_local1, id)))){
sampahTag.onCleaning = true;
sampahTag.janitor = id;
working = true;
};
} else {
if (((sameInt(_local1, -1)) || (sameInt(_local1, id)))){
sampahTag.onCleaning = true;
sampahTag.janitor = id;
working = true;
} else {
targetTagSampahGakJadi();
};
};
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos();
};
} else {
if (ifSampahStillOnStage()){
if (ifBelumAdaYangBersihin()){
if (ifAdaJalanToSampah()){
} else {
cariJalanTerdekat();
};
};
};
};
};
} else {
if (gotoRoom){
if (truePos){
if (bubu){
bubuOkay();
if (!main["janitorBubu"]){
main.createNotif(7);
main.janitorBubu = true;
};
} else {
if (istirahat){
if (main["hourDay"] < 22){
main.createNotif(8);
};
};
};
if (istirahat){
istirahatTimer = co.randomRange(((REF["istirahatTimer"][0] - level_) - 1), ((REF["istirahatTimer"][1] - level_) - 1));
};
gotoRoom = false;
insideRoom = true;
adaDiTujuan = true;
this.visible = false;
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos();
};
} else {
if (ifAdaJalan()){
} else {
cariJalanTerdekat();
};
};
};
};
};
};
};
};
}
private function ifSampahStillOnStage():Boolean{
var _local1:Boolean;
if (sampahTag == null){
targetTagSampahGakJadi();
} else {
if (!sampahTag.garbage){
_local1 = true;
};
};
return (_local1);
}
private function targetTagSampahGakJadi():void{
punyaTarget = false;
working = false;
truePos = false;
targetTag = null;
sampahTile = null;
sampahTag = null;
}
private function targetSampahGakJadi():void{
if (sampahTag != null){
sampahTag.onTarget = false;
if (sampahTag.timing <= 0){
sampahTag.garbage = true;
};
sampahTag.janitor = -1;
};
targetTagSampahGakJadi();
}
private function ifBelumAdaYangBersihin():Boolean{
var _local1:Boolean;
var _local2:int = sampahTag.janitor;
if (((sameInt(_local2, -1)) || (sameInt(_local2, id)))){
_local1 = true;
} else {
targetTagSampahGakJadi();
};
return (_local1);
}
private function checkIfOnTruePos():void{
var _local1:Point;
if (keliling){
if (randomTile == null){
randomTag = null;
calculateRandomTag();
} else {
if (isSamePoint(vtile, randomTile)){
truePos = true;
} else {
if ((((room.pathsGo[tr_tujuan] == null)) || ((room.pathsGo[tr_tujuan][nama] == null)))){
randomTile = null;
randomTag = null;
calculateRandomTag();
} else {
_local1 = room.pathsGo[tr_tujuan][nama];
dir(_local1.x, _local1.y);
setMoveVariables();
};
};
};
} else {
if (gotoRoom){
truePos = (isSamePoint(vtile, roomTile)) ? true : false;
} else {
if (punyaTarget){
truePos = (isSamePoint(vtile, sampahTile)) ? true : false;
};
};
};
}
private function ifAdaJalanToSampah():Boolean{
var _local3:Point;
var _local1:Boolean;
var _local2:uint = targetTag.tr;
if (room.pathsGo[_local2]){
_local3 = room.pathsGo[_local2][nama];
if (_local3){
_local1 = checkMoveVars(_local3.x, _local3.y);
};
} else {
_local1 = false;
};
adaJalan = _local1;
return (_local1);
}
private function checkMoveVars(_arg1:int, _arg2:int):Boolean{
var _local3:Boolean;
var _local4:Point = new Point((vtile.x + _arg1), (vtile.y + _arg2));
var _local5:Array = room["map"][_local4.x];
if (_local5){
if (_local5[_local4.y]){
dir(_arg1, _arg2);
setMoveVariables();
_local3 = true;
};
};
_local5 = null;
return (_local3);
}
private function setMoveVariables(_arg1:Boolean=false):void{
if (_arg1){
gtpoint.x = vtile.x;
gtpoint.y = vtile.y;
} else {
gtpoint.x = (vtile.x + dirx);
gtpoint.y = (vtile.y + diry);
};
var _local2:* = mapTilesDATA[((("tile_" + gtpoint.x) + "_") + gtpoint.y)];
gopoint = new Point(_local2["centerPoint"].x, _local2["centerPoint"].y);
angle = co.angleF(gopoint.x, gopoint.y, posisi.x, posisi.y);
angleX = co.angleFx(angle);
angleY = co.angleFy(angle);
speedX = (angleX * speed);
speedY = (angleY * speed);
moving = true;
}
private function cariJalanTerdekat():void{
var _local1:Boolean;
if (((parentMapWalkable[(vtile.x + 1)][vtile.y]) && ((vtile.x < tpoint.x)))){
_local1 = checkMoveVars(1, 0);
} else {
if (((parentMapWalkable[(vtile.x - 1)][vtile.y]) && ((vtile.x > tpoint.x)))){
_local1 = checkMoveVars(-1, 0);
} else {
if (((parentMapWalkable[vtile.x][(vtile.y + 1)]) && ((vtile.y < tpoint.y)))){
_local1 = checkMoveVars(0, 1);
} else {
if (((parentMapWalkable[vtile.x][(vtile.y - 1)]) && ((vtile.y > tpoint.y)))){
_local1 = checkMoveVars(0, -1);
} else {
if (jedaCariJalan == 0){
jedaCariJalan = co.randomRange(3, 5);
};
_local1 = false;
};
};
};
};
moving = _local1;
}
private function ifOnNextTile():Boolean{
var _local2:*;
var _local3:Point;
var _local4:Number;
var _local5:Number;
var _local1:Boolean;
if (ifJalanBelumDihapus()){
_local2 = new Point((posisi.x + speedX), (posisi.y + speedY));
_local4 = co.distPos(_local2.x, _local2.y, gopoint.x, gopoint.y);
_local5 = co.distPos(posisi.x, posisi.y, gopoint.x, gopoint.y);
if ((((_local4 <= 2)) || ((_local5 <= 2)))){
posisi.x = gopoint.x;
posisi.y = gopoint.y;
updateCoordinate();
find_vtile();
moving = false;
_local1 = true;
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
};
} else {
_local1 = false;
moving = _local1;
};
return (_local1);
}
private function ifJalanBelumDihapus():Boolean{
var _local1:Boolean;
var _local2:Array = room["map"];
if (doorBooth){
if (doorPoint != null){
if (_local2[doorPoint.x][doorPoint.y]){
_local1 = true;
};
};
} else {
if (_local2[gtpoint.x][gtpoint.y]){
_local1 = true;
} else {
_local1 = false;
};
};
_local2 = null;
return (_local1);
}
private function addRPTiapCleanSampah():void{
main.Janitor_addRPTiapCleanSampah(1);
}
private function checkSampahAsGarbage():void{
if (sampahTag != null){
if (sampahTag.timing <= 0){
sampahTag.garbage = true;
sampahTag.janitor = -1;
};
};
}
private function adaSampahOnArea():Boolean{
var _local2:String;
var _local6:Number;
var _local7:*;
var _local8:int;
var _local10:Object;
var _local1:Boolean;
var _local3:MovieClip;
var _local4:Object;
var _local5:Array = [];
var _local9:uint = room.myArea.length;
m = 0;
while (m < _local9) {
_local4 = room.myArea[m];
_local2 = _local4.name;
_local3 = room.myArea[_local2];
_local10 = _local3.sampah;
if (_local10){
if (!_local10.garbage){
if (!_local10.onTarget){
_local7 = (vtile.x - _local4.ptile.x);
_local7 = ((_local7 < 0)) ? -(_local7) : _local7;
_local8 = (vtile.y - _local4.ptile.y);
_local8 = ((_local8 < 0)) ? -(_local8) : _local8;
_local6 = (_local7 + _local8);
_local5.push({sampah_tag:_local4, jarak_to:_local6});
};
};
};
m++;
};
_local4 = null;
_local3 = null;
_local10 = null;
if (_local5.length > 0){
_local5.sortOn("jarak_to", Array.NUMERIC);
targetTag = _local5[0].sampah_tag;
sampahTag = room.myArea[targetTag.name].sampah;
sampahTag.onTarget = true;
sampahTile = new Point(sampahTag.ptile.x, sampahTag.ptile.y);
_local5 = null;
_local1 = true;
};
return (_local1);
}
private function checkIfOnTruePosDoor():void{
if (isSamePoint(vtile, doorPoint)){
truePos = true;
} else {
if (room.outPoint["MAP"][nama]){
truePos = true;
} else {
truePos = false;
};
};
}
private function ifAdaJalan():Boolean{
var _local2:uint;
var _local3:Array;
var _local4:Point;
var _local1:Boolean;
if (doorBooth){
} else {
if (gotoRoom){
_local2 = room.tr_center;
_local3 = room.pathsGo;
if ((((_local3 == null)) || ((_local3[_local2][nama] == null)))){
_local1 = false;
} else {
_local4 = _local3[_local2][nama];
_local1 = checkMoveVars(_local4.x, _local4.y);
};
_local3 = null;
};
};
adaJalan = _local1;
return (_local1);
}
private function acceptKeliling(_arg1:uint=1, _arg2:uint=1):void{
keliling = true;
kelilingTimer = co.randomRange(_arg2, _arg1);
jedaCariSampah = 0;
truePos = false;
}
private function findingDoorBooth():void{
calculateRandomTag(true);
}
public function findAndKeepTileBag():void{
var _local2:uint;
var _local1:uint = room.myArea.length;
if (tiles_bag["used"].length == _local1){
tiles_bag["used"] = [];
};
var _local3:* = null;
var _local4:Array = [];
var _local5:Array = [];
_local4 = [];
_local5 = [];
_local2 = 0;
while (_local2 < _local1) {
_local3 = room.myArea[_local2];
if (!isSamePoint(_local3.ptile, room.ptile)){
if (adaTilePath(_local3)){
if (tiles_bag["used"].indexOf(_local3) == -1){
_local4.push(_local3);
} else {
_local5.push(_local3);
};
};
};
_local2++;
};
var _local6:uint = _local4.length;
var _local7:uint = ((_local6)<4) ? _local6 : 4;
if (_local7 > 0){
_local2 = 0;
while (_local2 < _local7) {
randInt = co.randomRangeR(_local6);
tiles_bag["keep"].push(_local4[randInt]);
_local4.splice(randInt, 1);
_local6 = _local4.length;
_local2++;
};
} else {
_local6 = _local5.length;
_local7 = ((_local6)<4) ? _local6 : 4;
_local2 = 0;
while (_local2 < _local7) {
randInt = co.randomRangeR(_local6);
tiles_bag["keep"].push(_local5[randInt]);
_local5.splice(randInt, 1);
_local6 = _local5.length;
_local2++;
};
};
_local5 = null;
_local4 = null;
}
private function isSamePoint(_arg1:Point, _arg2:Point):Boolean{
if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){
return (true);
};
return (false);
}
private function getRandomJalan():void{
if (randomTag == null){
if (((keliling) && (((!(moving)) && ((kelilingTimer == 0)))))){
truePos = true;
} else {
calculateRandomTag();
};
} else {
if (randomTag.pathsGo[0][nama]){
moving = true;
} else {
randomTile = null;
randomTag = null;
moving = false;
};
};
}
private function calculateRandomTag(_arg1:Boolean=false):void{
var _local2:*;
var _local3:uint;
var _local4:Boolean;
var _local5:Point;
if (tiles_bag["keep"].length == 0){
findAndKeepTileBag();
};
if (tiles_bag["keep"].length > 0){
_local2 = tiles_bag["keep"][0];
_local3 = 0;
_local4 = true;
if (_local2 != null){
_local3 = _local2.tr;
_local4 = false;
};
if (((_local4) || ((((room.pathsGo == null)) || ((((room.pathsGo[_local3] == null)) || ((room.pathsGo[_local3][nama] == null)))))))){
tiles_bag["keep"].splice(0, 1);
if (tiles_bag["keep"].length == 0){
findAndKeepTileBag();
};
calculateRandomTag();
} else {
if (_arg1){
doorPoint = new Point(_local2.ptile.x, _local2.ptile.y);
tr_tujuan = _local3;
_local5 = room.pathsGo[tr_tujuan][nama];
dir(_local5.x, _local5.y);
setMoveVariables();
jeda_cariDoorLagi = 3;
} else {
ptimer = 0;
maxTimer = co.randomRange(20, 140);
randomTag = _local2;
tr_tujuan = _local3;
_local5 = room.pathsGo[tr_tujuan][nama];
randomTile = new Point(randomTag.ptile.x, randomTag.ptile.y);
dir(_local5.x, _local5.y);
setMoveVariables();
};
};
_local2 = null;
};
}
public function adaTilePath(_arg1):Boolean{
var _local2:Boolean;
var _local3:String = _arg1.tile;
if (room.pathsGo[tr_now]){
if (room.pathsGo[tr_now][_local3]){
_local2 = true;
};
};
return (_local2);
}
private function checkStandByRandomTag():void{
ptimer = 0;
maxTimer = 0;
cariIdx = tiles_bag["keep"].indexOf(randomTag);
if (cariIdx != -1){
tiles_bag["keep"].splice(cariIdx, 1);
};
randomTile = null;
randomTag = null;
}
public function removingAll(_arg1:Eventku=null, _arg2:Boolean=true):void{
if (_arg2){
removeListeners();
};
targetTag = null;
sampahTag = null;
randomTag = null;
room = null;
parentMapWalkable = null;
mapTilesDATA = null;
mapTileREF = null;
REF = null;
parent_ = null;
Tab = null;
depthKhusus = null;
tiles_bag = null;
sampahDATA = null;
if (REC){
REC.ob = null;
};
REC = null;
main = null;
}
private function removeListeners():void{
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
main.removeEventListener(Eventku.AFTER_TICK, activities);
main.removeEventListener(Eventku.AFTER_RECLOAD, Boothing);
this.removeEventListener(Event.ENTER_FRAME, movingFunction);
}
public function destroy():void{
removeListeners();
targetTag = null;
if (sampahTag != null){
sampahTag.onTarget = false;
sampahTag.onCleaning = false;
sampahTag.janitor = -1;
sampahTag = null;
};
room.destroyJanitor(this);
rumus.spliceArrayObject(main.game.janitors, this, "ob");
main.realTimeResort("employee");
if (main.game.RP_khusus.fire_a_janitor == 0){
main.game.RP_khusus.fire_a_janitor = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
parent_.destroyITabs(this, true, false, false);
}
public function removingData():void{
parent_.objContainer.removeChild(this);
removingAll(null, false);
}
public function selecting(_arg1:Boolean):void{
onSelected = _arg1;
if (onSelected){
parent_.selectD.showing(this, "People");
} else {
parent_.selectD.hiding();
};
}
public function acceptGoToTarget():void{
if (main.game.RP_khusus.goto_janitor == 0){
main.game.RP_khusus.goto_janitor = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
}
public function changeColor(_arg1:Boolean, _arg2:Boolean):void{
co.combineColor(mclip, _arg1, _arg2, true);
if (((_arg1) || (_arg2))){
balon.showingPop();
};
}
public function removeColorSelected():void{
changeColor(onSelected, false);
}
}
}//package pack.Instance
Section 99
//Mobil (pack.Instance.Mobil)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import pack.*;
public class Mobil extends MovieClip {
public var parent_;
public var main;
public var REC;
public var mapTileREF;
public var id:uint;
public var io:uint;
public var ROWS:uint;
public var COLS:uint;
public var minsp:uint;
public var ptile:Point;
public var vtile:Point;
public var posisi:Point;
public var outer_point:Point;
public var gtpoint:Point;
public var gopoint:Point;
public var vtile_temp:Point;
public var stop_point:Point;
public var base:Point;
public var enter_point:Point;
public var dirx:int;
public var diry:int;
public var arah:int;
public var jenis:String;
public var parentMapTiles:Array;
public var nama:String;
public var bantuRand:Number;
public var bound1:Number;
public var bound2:Number;
public var angle:Number;
public var angleX:Number;
public var angleY:Number;
public var speedX:Number;
public var speedY:Number;
public var speed:Number;
public var maxVisitor:uint;
public var jeda_turun:uint;
public var jumlahV:uint;
public var jumlah_turun:uint;
public var sub:uint;
public var _line:uint;
public var sub_line:uint;
public var colorb:uint;
public var c:uint;
public var ydepth:uint;
public var jenis_spcVisitor:uint;
public var rec:Boolean;
public var dummy:Boolean;
public var inserted:Boolean;
public var moving:Boolean;
public var truePos:Boolean;
public var movingOut:Boolean;
public var penumpang:Boolean;
public var udahStop:Boolean;
public var readyAction:Boolean;
public var specialVisitor:Boolean;
private var speedMax:Number;
private var _sound:Boolean;// = false
private var jeda_nuruninPenumpang:uint;// = 1
private var acc:Number;// = 0.5
private var hitung_jarak:Number;
private var tmp_point:Point;
public function Mobil():void{
}
public function creating(_arg1, _arg2:String, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Object=null, _arg6:uint=0):void{
var _local8:Number;
var _local9:uint;
inserted = false;
readyAction = false;
parent_ = _arg1;
main = parent_.main;
rec = _arg3;
parentMapTiles = parent_["map"]["tiles"];
jenis = _arg2;
var _local7:uint = (main.popularity * 0.1);
_local7 = ((_local7)<1) ? 1 : _local7;
if (jenis == "Bus"){
ROWS = 1;
COLS = 4;
maxVisitor = ((_local7)>8) ? 8 : _local7;
} else {
ROWS = 1;
COLS = 2;
maxVisitor = ((_local7)>4) ? 4 : _local7;
};
initProperties();
if (rec){
REC = _arg5;
REC.ob = this;
initRecVarsCreated();
} else {
initFirstVarsCreated();
id = main.game.ID.Mobil;
main.game.ID.Mobil++;
dummy = _arg4;
if (dummy){
bantuRand = (Math.random() * 100);
if (bantuRand >= 60){
arah = 1;
_line = 1;
sub_line = 2;
io = 1;
} else {
if (bantuRand < 20){
sub_line = 1;
arah = -1;
_line = 3;
io = 4;
} else {
sub_line = co.randomRange(1, 2);
arah = -1;
_line = 2;
if (sub_line == 1){
io = 3;
} else {
io = 2;
};
};
};
} else {
arah = 1;
_line = 1;
sub_line = 1;
io = 0;
stop_point = new Point(5, 19);
};
if (jenis == "Bus"){
colorb = co.randomRange(1, 2);
this.gotoAndStop((((jenis + "_arah") + String(arah)) + colorb));
} else {
this.gotoAndStop(((jenis + "_arah") + String(arah)));
};
jenis_spcVisitor = _arg6;
if (jenis_spcVisitor > 0){
specialVisitor = true;
jumlahV = 1;
} else {
jumlahV = co.randomRange(1, maxVisitor);
};
ptile = serbi.enterArrayI("car", io, main.game.EXPAND);
updateOuterStage();
initFirstDir();
vtile.x = ptile.x;
vtile.y = ptile.y;
_local9 = main.game["objects"]["Mobil"].length;
main.game.objects.Mobil.push({ob:this, arah:arah, angle:angle, angleX:angleX, angleY:angleY, colorb:colorb, dummy:dummy, dirx:dirx, diry:diry, gopoint:gopoint, gtpoint:gtpoint, id:id, io:io, jenis:jenis, jumlah_turun:jumlah_turun, jumlahV:jumlahV, movingOut:movingOut, moving:moving, posisi:posisi, penumpang:penumpang, speed:speed, speedX:speedX, speedY:speedY, speedMax:speedMax, jenis_spcVisitor:jenis_spcVisitor, truePos:truePos, udahstop:udahStop, vtile:vtile});
REC = main.game.objects.Mobil[_local9];
coordinatePosition();
dir(dirx, diry);
};
this.name = ("mobil_" + id);
parent_.objContainer.addChild(this);
this.cacheAsBitmap = true;
this.mouseChildren = false;
this.mouseEnabled = false;
minsp = ((ROWS)>COLS) ? COLS : ROWS;
find_vtile();
inserted = true;
parent_.InsertTabs(this);
updateDepth();
if (dummy){
main.bus_dummy++;
} else {
main.bus_bonus++;
};
main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
main.addEventListener(Eventku.END_SAVED, endSaved);
main.addEventListener(Eventku.AFTER_TICK, activitiesOnTick);
main.addEventListener(Eventku.REMOVING_ALL, removingAll);
this.addEventListener(Event.ENTER_FRAME, activities, false, 0, true);
}
public function removingAll(_arg1:Eventku=null, _arg2:Boolean=true):void{
if (_arg2){
removeListeners();
};
if (REC){
REC.ob = null;
};
REC = null;
parentMapTiles = null;
parent_;
main = null;
mapTileREF = null;
}
public function autoSaved(_arg1:Eventku):void{
REC["angle"] = angle;
REC.angleX = angleX;
REC.angleY = angleY;
REC.dirx = dirx;
REC.diry = diry;
REC.gopoint = gopoint;
REC.gtpoint = gtpoint;
REC.jumlah_turun = jumlah_turun;
REC.movingOut = movingOut;
REC.moving = moving;
REC.posisi = posisi;
REC.penumpang = penumpang;
REC["speed"] = speed;
REC.speedX = speedX;
REC.speedY = speedY;
REC.speedMax = speedMax;
REC.specialVisitor = specialVisitor;
REC.truePos = truePos;
REC.udahStop = udahStop;
REC.vtile = vtile;
REC.ob = null;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
public function initRecVarsCreated():void{
var _local1:Boolean;
var _local2:String;
for (_local2 in REC) {
_local1 = (((_local2 == "vtile")) || ((((((_local2 == "gtpoint")) || ((_local2 == "gopoint")))) || ((_local2 == "posisi")))));
if (_local1){
if (REC[_local2] == null){
this[_local2] = null;
} else {
this[_local2] = new Point(REC[_local2].x, REC[_local2].y);
};
} else {
this[_local2] = REC[_local2];
};
};
if (dummy){
if (io == 1){
_line = 1;
sub_line = 2;
} else {
if (io == 4){
_line = 3;
sub_line = 1;
} else {
if (io == 2){
_line = 2;
sub_line = 2;
} else {
_line = 2;
sub_line = 1;
};
};
};
} else {
_line = 1;
sub_line = 1;
stop_point = new Point(5, 19);
};
if (jenis_spcVisitor > 0){
specialVisitor = true;
} else {
specialVisitor = false;
};
ptile = serbi.enterArrayI("car", io, main["game"]["EXPAND"]);
updateOuterStage();
updateCoordinate();
if (jenis == "Bus"){
this.gotoAndStop((((jenis + "_arah") + String(arah)) + colorb));
} else {
this.gotoAndStop(((jenis + "_arah") + String(arah)));
};
}
public function initProperties():void{
speed = 2;
speedMax = co.randomRange(7, 10);
gtpoint = new Point();
gopoint = new Point();
posisi = new Point();
stop_point = new Point();
vtile = new Point();
vtile_temp = new Point();
tmp_point = new Point();
base = new Point();
}
public function initFirstVarsCreated():void{
movingOut = false;
moving = false;
truePos = false;
penumpang = false;
udahStop = false;
jumlah_turun = 0;
colorb = 0;
speedX = 0;
speedY = 0;
bound1 = 0;
bound2 = 0;
angle = 0;
angleX = 0;
angleY = 0;
}
private function initFirstDir():void{
if (ptile.x == outer_point.x){
dirx = 0;
diry = ((ptile.y)>outer_point.y) ? -1 : 1;
} else {
if (ptile.y == outer_point.y){
diry = 0;
dirx = ((ptile.x)>outer_point.x) ? -1 : 1;
};
};
}
public function updateOuterStage():void{
outer_point = serbi.outerArrayI("car", io, main["game"]["EXPAND"]);
}
public function overrideProp():void{
}
public function coordinatePosition(_arg1:Boolean=true):void{
posisi = rumus.findTileCoord_point(vtile, parent_["SIZE_"], true);
if (_arg1){
co.setPosition(this, posisi);
};
}
public function updateCoordinate(_arg1:Boolean=true):void{
if (_arg1){
this.x = posisi.x;
this.y = posisi.y;
};
}
public function dir(_arg1:int, _arg2:int):void{
dirx = _arg1;
diry = _arg2;
}
public function find_vtile(_arg1:Boolean=true):void{
var _local2:Point = rumus.findTile(posisi.y, posisi.x, parent_.SIZE_, true);
if ((((((vtile_temp.x == 0)) && ((vtile_temp.y == 0)))) || (((!((vtile.x == _local2.x))) || (!((vtile.y == _local2.y))))))){
vtile_temp.x = vtile.x;
vtile_temp.y = vtile.y;
vtile.x = _local2.x;
vtile.y = _local2.y;
base.x = (vtile.x - (ROWS + 1));
base.y = (vtile.y + (COLS - 1));
if (_arg1){
updateDepth();
};
updateSpeed();
};
nama = ((vtile.x + "_") + vtile.y);
}
public function updateDepth(_arg1:Number=0, _arg2:Number=0, _arg3:Boolean=false):void{
mapTileREF = parentMapTiles[((("tile_" + vtile.x) + "_") + vtile.y)];
bound1 = mapTileREF.y;
bound2 = ((bound1)<0) ? (bound1 * -1) : bound1;
bound1 = bound2;
ydepth = vtile.y;
if (inserted){
parent_["tabs"]["ref"][name]["bound1"] = bound1;
parent_["tabs"]["ref"][name]["bound2"] = bound2;
parent_["tabs"]["ref"][name]["bound3"] = ydepth;
checkDepth();
};
}
private function checkDepth():void{
parent_.AppliedNewTabs();
}
private function updateSpeed(_arg1:Boolean=false):void{
if (_arg1){
if (speed > 2){
speed = (speed - acc);
};
} else {
if (speed < speedMax){
speed = (speed + acc);
if (speed > speedMax){
speed = speedMax;
};
};
};
speedX = (angleX * speed);
speedY = (angleY * speed);
}
public function activities(_arg1:Event):void{
if (readyAction){
if (((main.tidakPaused()) && (!(main["onEndDay"])))){
c = 0;
while (c < main["speed_effect"]) {
if (REC == null){
break;
} else {
movingActivities();
};
c++;
};
};
};
}
public function activitiesOnTick(_arg1:Eventku):void{
var _local2:uint;
if (readyAction){
if (udahStop){
if (penumpang){
if (jumlah_turun < jumlahV){
if (specialVisitor){
parent_.creatingVisitor(jenis_spcVisitor, false, true, false, null);
} else {
parent_.newVisitor(false, true);
};
jumlah_turun++;
if (jumlah_turun >= jumlahV){
if (specialVisitor){
if (!main["RP_specialVisitorDayMobil"]){
_local2 = 4;
main["game"]["totalRP"]["Mobil"] = (main["game"]["totalRP"]["Mobil"] + _local2);
main.hitungTotalRP(false, _local2);
main["RP_specialVisitorDayMobil"] = true;
};
} else {
if (!main["RP_visitorDayMobil"]){
_local2 = 2;
main["game"]["totalRP"]["Mobil"] = (main["game"]["totalRP"]["Mobil"] + _local2);
main.hitungTotalRP(false, _local2);
main["RP_visitorDayMobil"] = true;
};
};
};
} else {
if (jeda_nuruninPenumpang > 0){
jeda_nuruninPenumpang--;
} else {
penumpang = false;
truePos = false;
};
};
};
};
if (truePos){
if (movingOut){
destroy();
};
};
if (!_sound){
if (moving){
main.PlaySound("car1");
_sound = true;
};
};
} else {
readyAction = true;
};
}
public function paksaDestroy():void{
moving = true;
truePos = true;
movingOut = true;
destroy();
}
private function movingActivities():void{
if (truePos){
} else {
if (moving){
bergerak();
} else {
cekMoving();
};
};
}
private function cekMoving():void{
setMoveVariables();
}
private function setMoveVariables():void{
if (dummy){
gtpoint.x = outer_point.x;
gtpoint.y = outer_point.y;
} else {
if (udahStop){
gtpoint.x = outer_point.x;
gtpoint.y = outer_point.y;
} else {
gtpoint.x = stop_point.x;
gtpoint.y = stop_point.y;
};
};
gopoint = rumus.findTileCoord_point(gtpoint, parent_["SIZE_"], true);
angle = co.angleF(gopoint.x, gopoint.y, posisi.x, posisi.y);
angleX = co.angleFx(angle);
angleY = co.angleFy(angle);
speedX = (angleX * speed);
speedY = (angleY * speed);
moving = true;
}
private function bergerak():void{
tmp_point.x = (posisi.x + speedX);
tmp_point.y = (posisi.y + speedY);
hitung_jarak = co.distPos(tmp_point.x, tmp_point.y, gopoint.x, gopoint.y);
find_vtile();
if (hitung_jarak > speed){
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
} else {
moving = false;
posisi.x = gopoint.x;
posisi.y = gopoint.y;
if (dummy){
if (co.isSamePoint(vtile, outer_point)){
truePos = true;
movingOut = true;
};
} else {
if (udahStop){
if (co.isSamePoint(vtile, outer_point)){
truePos = true;
movingOut = true;
};
} else {
if (co.isSamePoint(vtile, stop_point)){
truePos = true;
penumpang = true;
udahStop = true;
jeda_nuruninPenumpang = 2;
main.PlaySound("klakson");
};
};
};
};
}
private function removeListeners():void{
this.removeEventListener(Event.ENTER_FRAME, activities);
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
main.removeEventListener(Eventku.AFTER_TICK, activitiesOnTick);
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
}
public function destroy():void{
removeListeners();
if (dummy){
main.bus_dummy--;
} else {
main.bus_bonus--;
};
rumus.spliceArrayObject(main["game"]["objects"]["Mobil"], this, "ob");
parent_.destroyITabs(this, true, false, false);
}
public function removingData():void{
parent_.objContainer.removeChild(this);
removingAll(null, false);
}
}
}//package pack.Instance
Section 100
//MoneyClip (pack.Instance.MoneyClip)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import pack.*;
import com.greensock.easing.*;
public class MoneyClip extends Sprite {
public var teks_t:TextField;
public var main;
private var _money:int;
private var index:uint;
private var posy:Number;
private var garbage:Boolean;// = false
public function init(_arg1=null, _arg2=null, _arg3:String="", _arg4:Boolean=false):void{
var _local5:Point;
if (_arg2){
main = _arg2;
teks_t.autoSize = TextFieldAutoSize.CENTER;
this.mouseChildren = false;
this.mouseEnabled = false;
if (_arg4){
_local5 = new Point(_arg1.centered.x, (_arg1.centered.y + 15));
} else {
_local5 = _arg1.centered;
};
setPosition(_local5);
isiValue(_arg3, _arg4);
main.MapSprite.otherContainer.addChild(this);
main.addEventListener(Eventku.REMOVING_ALL, removingAll);
};
}
function setPosition(_arg1:Point):void{
this.x = _arg1.x;
posy = _arg1.y;
this.y = posy;
}
function isiValue(_arg1:String, _arg2:Boolean=false):void{
if ((((_arg1 == "leaving")) || ((_arg1 == "closed")))){
teks_t.text = _arg1;
teks_t.textColor = 0xFF0000;
main.PlaySound("puh");
} else {
_money = int(_arg1);
if (_money >= 0){
teks_t.text = ("+$" + _arg1);
if (_arg2){
teks_t.textColor = 0xFF6600;
} else {
teks_t.textColor = 0xCC00;
};
} else {
_money = (_money * -1);
teks_t.text = ("-$" + String(_money));
teks_t.textColor = 0xFF0000;
};
};
TweenMax.to(this, 1.5, {y:(posy - 50), ease:Linear.easeNone, onComplete:completeEnd});
}
function completeEnd():void{
collectsGarbage();
}
function collectsGarbage():void{
main.MapSprite.otherContainer.removeChild(this);
garbage = true;
}
function removingAll(_arg1:Eventku=null):void{
TweenMax.killTweensOf(this);
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
if (!garbage){
collectsGarbage();
trace("paksa buang moneyclip!");
};
main = null;
}
}
}//package pack.Instance
Section 101
//Notif (pack.Instance.Notif)
package pack.Instance {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
import pack.*;
import com.greensock.easing.*;
public class Notif extends MovieClip {
const posisiX:Number = 640;
const posisiY:Array;
public var desc:MovieClip;
public var main;
public var REC;
public var id:uint;
public var jenis:uint;
public var jedaTampil:uint;
public var strings2:String;
public var mainJenis:String;
public var sub:String;
public var strings:String;
public var tampilkan:Boolean;
public var ending:Boolean;
public var hilangkan:Boolean;
public var garbage:Boolean;
public var khusus:Boolean;
public var standby:Boolean;
public var counter:uint;// = 0
public var pos:int;// = -1
public function Notif():void{
posisiY = [70, 90, 110, 130, 150, 170, 190, 210];
super();
}
public function creating(_arg1, _arg2:uint, _arg3:Boolean=false, _arg4:Object=null, _arg5:String="", _arg6:String=""):void{
var _local7:uint;
var _local8:String;
main = _arg1;
tampilkan = false;
standby = true;
jedaTampil = 0;
desc.init();
if (_arg3){
id = _arg4.id;
REC = _arg4;
REC.ob = this;
jenis = REC.jenis;
counter = REC.counter;
garbage = REC.garbage;
ending = REC.ending;
hilangkan = REC.hilangkan;
khusus = REC.khusus;
strings = REC.strings;
strings2 = REC.strings2;
} else {
jenis = _arg2;
id = main.game.ID.Notif;
main.game.ID.Notif++;
strings2 = "";
ending = false;
if (jenis == 99){
counter = 40;
khusus = true;
} else {
if (jenis == 100){
counter = 40;
khusus = true;
} else {
if (jenis > 100){
counter = 80;
khusus = true;
} else {
if ((((((((((jenis == 1)) || ((jenis == 4)))) || ((jenis == 6)))) || ((jenis == 7)))) || ((jenis == 8)))){
khusus = true;
counter = 32;
} else {
khusus = false;
counter = 64;
};
};
};
};
if (jenis == 100){
strings = "YOU ACTIVATE =HIDE BUILDINGS=";
} else {
if (jenis == 101){
strings = "DEFICIT: Manage your money carefully!";
} else {
if (jenis == 102){
strings = ("The government subsidize you $" + _arg5);
} else {
if (jenis == 103){
strings = ("Last subsidy from the government $" + _arg5);
} else {
if (jenis == 104){
strings = "DEFICIT! The Government doesn't subsidized anymore.";
} else {
if (jenis == 1){
strings = "NOT ENOUGH MONEY";
} else {
if (jenis == 99){
if (_arg6 == "Lobby"){
strings = "Your Lobby can be upgrade.";
} else {
strings = (("One of your " + _arg5) + " can be upgrade.");
};
} else {
if (jenis == 2){
if (_arg5 == "Expand"){
strings = "AVAILABLE : Expand Area to Level 2";
} else {
if (_arg5 == "Scenery"){
_local8 = (serbi.dataOb.Scenery[_arg6]["nama"] + " (Plant)");
} else {
_local8 = (((serbi.dataOb.Booth[_arg6]["nama"] + " (") + _arg5) + ")");
};
strings = ("UNLOCKED: " + _local8);
};
} else {
if (jenis == 4){
strings = "NEW MISSION";
} else {
if (jenis == 5){
strings = (("*" + _arg5) + "* is coming..");
strings2 = _arg6;
} else {
if (jenis == 6){
strings = "Can't destroy !";
} else {
if (jenis == 7){
strings = "One of your janitor is sleeping";
} else {
if (jenis == 8){
strings = "One of your janitor is take a rest";
} else {
strings = "New Unlocked From Extra Upgrade";
};
};
};
};
};
};
};
};
};
};
};
};
};
_local7 = main.game.notif.length;
main.game.notif.push({ob:this, id:id, jenis:jenis, counter:counter, garbage:garbage, ending:ending, khusus:khusus, strings:strings, strings2:strings2});
REC = main.game.notif[_local7];
};
this.name = ("notif_" + id);
description();
hiding();
if (_arg3){
if (khusus){
ending = true;
} else {
if (jenis == 5){
ending = true;
};
};
};
if (((ending) || (garbage))){
garbage = true;
hilangkan = true;
tampilkan = false;
} else {
hilangkan = false;
main.Notif_Temp["belum"].push(this);
main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
main.addEventListener(Eventku.END_SAVED, endSaved);
};
this.mouseChildren = false;
this.mouseEnabled = false;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
private function removeListeners():void{
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
}
public function autoSaved(_arg1:Eventku):void{
REC.garbage = garbage;
REC.counter = counter;
REC.ending = ending;
REC.hilangkan = hilangkan;
REC.ob = null;
}
public function callPlay(_arg1:int):void{
if (pos == -1){
pos = _arg1;
this.x = posisiX;
this.y = (posisiY[pos] + 10);
};
if (!tampilkan){
if (jedaTampil > 0){
jedaTampil--;
} else {
tampilkan = true;
TweenMax.killTweensOf(this, true);
alpha = 0;
this.visible = true;
if (counter > 15){
main.PlaySound("notif");
};
TweenMax.to(this, 0.5, {y:posisiY[pos], alpha:1, ease:Bounce.easeInOut});
};
};
}
public function checkUrutan(_arg1:int):void{
if (pos != _arg1){
TweenMax.killTweensOf(this, true);
pos = _arg1;
standby = false;
TweenMax.to(this, 0.25, {y:posisiY[pos], ease:Back.easeIn, onComplete:checkTweenGeser});
} else {
if (counter > 0){
counter--;
} else {
if (((!(hilangkan)) && (standby))){
TweenMax.killTweensOf(this, true);
hilangkan = true;
TweenMax.to(this, 0.5, {x:(posisiX + width), alpha:0, ease:Back.easeIn, onComplete:checkTweenClosed});
};
};
};
}
private function checkTweenGeser():void{
standby = true;
}
private function checkTweenClosed():void{
ending = true;
this.visible = false;
}
public function isRemovedWithListeners():void{
TweenMax.killTweensOf(this);
isRemoved();
removeListeners();
main = null;
if (REC){
REC.ob = null;
};
REC = null;
}
public function isRemoved():void{
if (this.parent != null){
main.removeChild(this);
};
garbage = true;
}
public function buangREF(_arg1:int=-1):void{
if (_arg1 != -1){
main.game.notif.splice(_arg1, 1);
};
removeListeners();
main = null;
if (REC){
REC.ob = null;
};
REC = null;
}
private function description():void{
desc.isi(strings);
if (jenis == 100){
desc.iconic.gotoAndStop("_lg");
desc.x = -((desc.width - 27));
} else {
if (jenis == 5){
desc.iconic.gotoAndStop(strings2);
desc.x = -((desc.width - 25));
} else {
if (jenis == 101){
desc.iconic.gotoAndStop("_money");
} else {
if (jenis == 102){
desc.iconic.gotoAndStop("_bonus");
} else {
if (jenis == 103){
desc.iconic.gotoAndStop("_bonus");
} else {
desc.iconic.gotoAndStop(1);
};
};
};
desc.x = -((desc.width - 15));
};
};
}
public function hiding():void{
this.visible = false;
}
}
}//package pack.Instance
Section 102
//Outer (pack.Instance.Outer)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import pack.*;
public class Outer extends MovieClip {
public var parent_;
public var REF;
public var paths:Array;
public var pathsGo:Array;
public var map:Array;
public var idefault:Boolean;
public var detect:Boolean;
public var ptile:Point;
public var posisi:Point;
public var tpointAr:Array;
public var mainJenis:String;// = "Outer"
public function Outer():void{
tpointAr = [new Point(0, 0)];
super();
}
public function creating(_arg1, _arg2:Point):void{
parent_ = _arg1;
REF = {};
ptile = new Point();
ptile.x = _arg2.x;
ptile.y = _arg2.y;
idefault = true;
this.name = ((("outer_" + ptile.x) + "_") + ptile.y);
pathsGo = [];
paths = [];
map = co.cloning(parent_["map"]["walkable"]);
mapKecuali();
posisi = rumus.findTileCoord_point(ptile, parent_.SIZE_, true);
this.x = posisi.x;
this.y = posisi.y;
parent_.addChild(this);
this.mouseChildren = false;
this.mouseEnabled = false;
REF.mainJenis = "Outer";
}
public function updatePathVars(_arg1:uint=0):void{
if (((!((ptile.y == 1))) && ((ptile.y <= (serbi.EXPAND[_arg1].COLS - 3))))){
detect = true;
};
pathsGo = [];
paths = [];
map = co.cloning(parent_.map.walkable);
mapKecuali();
}
private function mapKecuali():void{
map[10][22] = false;
map[10][23] = false;
map[9][22] = false;
map[9][23] = false;
}
public function removingAll():void{
parent_.removeChild(this);
paths = null;
pathsGo = null;
map = null;
tpointAr = null;
REF = null;
parent_ = null;
}
}
}//package pack.Instance
Section 103
//Plant (pack.Instance.Plant)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import pack.*;
import pack.bitmap.*;
public class Plant extends Sprite {
public var ground:MovieClip;
public var onfocus:MovieClip;
private var renderI:MovieClip;
private var mapTileREF:MovieClip;
private var canvasI:Bitmap;
private var groundI:Bitmap;
private var dp:Point;
public var parent_;
public var REF;
public var mapAreaREF;
public var main;
public var REC;
public var ptile:Point;
public var SIZE_:Number;
public var dimX:Number;
public var dimY:Number;
public var bound1:Number;
public var bound2:Number;
public var pop_rate:Number;
public var jdefault:uint;// = 0
public var idefault:Boolean;// = false
public var rec:Boolean;
public var onSelected:Boolean;
public var onOver:Boolean;
public var onGrass:Boolean;
public var pagar:Boolean;
public var jenis:uint;
public var ydepth:uint;
public var mclip:Sprite;
public var centered:Point;
public var posisi:Point;
public function Plant():void{
}
public function creating(_arg1, _arg2:Object=null, _arg3:uint=0, _arg4:Point=null, _arg5:Boolean=false):void{
var _local6:uint;
var _local7:uint;
var _local8:Boolean;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:Boolean;
var _local14:uint;
parent_ = _arg1;
main = parent_.main;
SIZE_ = parent_.SIZE_;
renderI = main.RenderPlant;
dimX = parent_.dimX;
dimY = parent_.dimY;
canvasI = BitmapUtility.Canvas(70, 50);
groundI = parent_.groundCanvas;
onSelected = false;
onOver = false;
dp = new Point();
pop_rate = 0;
if (_arg2 == null){
rec = false;
ptile = _arg4;
jenis = _arg3;
} else {
rec = true;
REC = _arg2;
REC.ob = this;
idefault = _arg2.idefault;
ptile = _arg4;
jenis = _arg3;
};
if (jenis == 99){
pagar = true;
} else {
pagar = false;
};
this.name = ((("plant_" + ptile.x) + "_") + ptile.y);
mapTileREF = parent_["map"]["tiles"][((("tile_" + ptile.x) + "_") + ptile.y)];
mapAreaREF = parent_["map"]["area"][ptile.x][ptile.y];
mapTileREF.walkable = false;
this.x = mapTileREF.posisi.x;
this.y = mapTileREF.posisi.y;
ydepth = ptile.y;
bound1 = Math.abs(mapTileREF.y);
bound2 = Math.abs(mapTileREF.y);
centered = new Point();
centered.x = (this.x + SIZE_);
centered.y = (this.y - (this.height - SIZE_));
REF = serbi.dataOb.Scenery[("PLANT_" + jenis)];
canvasI.y = -(canvasI.height);
mclip = new Sprite();
mclip.addChild(canvasI);
this.addChild(mclip);
mclip.cacheAsBitmap = true;
setChildIndex(onfocus, (numChildren - 1));
parent_["map"]["walkable"][ptile.x][ptile.y] = false;
if (mapAreaREF.lahan){
mapAreaREF.isi = true;
mapAreaREF.isi_apa = this;
};
if (mapTileREF.plenty){
mapTileREF.planted = true;
};
drawOnCanvas();
if (mapTileREF.REF.mainJenis == 0){
drawGroundOnCanvas();
};
onfocus.hiding();
ground.hiding();
if (_arg5){
parent_.frontContainer.addChild(this);
} else {
parent_.objContainer.addChild(this);
};
this.mouseEnabled = false;
this.mouseChildren = false;
if (!idefault){
if (mapTileREF.REF.mainJenis){
onGrass = true;
} else {
onGrass = false;
};
if (!rec){
_local6 = main.game.objects["Scenery"].length;
main.game.objects["Scenery"].push({ob:this, jenis:jenis, idefault:idefault, ptile:ptile});
REC = main.game.objects["Scenery"][_local6];
main.realTimeResort("scenery");
alphaObject();
_local8 = false;
_local9 = 0;
if (jenis == 3){
_local8 = main.game.EXTRA["wallpaper"];
_local9 = serbi.Extra_Upgrade["wallpaper"]["val"];
} else {
if (jenis == 4){
_local8 = main.game.EXTRA["sauce"];
_local9 = serbi.Extra_Upgrade["sauce"]["val"];
} else {
if ((((jenis == 5)) || ((jenis == 6)))){
_local8 = main.game.EXTRA["leaf"];
_local9 = serbi.Extra_Upgrade["leaf"]["val"];
};
};
};
_local7 = REF.price;
if (_local8){
_local7 = (_local7 - ((_local9 * 0.01) * REF.price));
};
updateMoney(-(_local7));
main.game.MISC.Scenery_Expend = (main.game.MISC.Scenery_Expend + _local7);
main.game.MISC.Expend = (main.game.MISC.Expend + _local7);
var _local15 = main.game.objects.Scenery["Sum"];
var _local16 = (jenis - 1);
var _local17 = (_local15[_local16] + 1);
_local15[_local16] = _local17;
main.updateSceneryPopularity_onAdd(jenis);
_local10 = main.game.objects["Scenery"].length;
_local11 = main.game.totalRP.Scenery;
_local12 = ((_local10 - (_local11 * 7)) / 7);
main.game.totalRP.Scenery = (main.game.totalRP.Scenery + _local12);
if (main.game.RP_khusus.all_scenery == 0){
_local13 = true;
_local14 = 0;
while (_local14 < 8) {
if (main.game.objects.Scenery["Sum"][_local14] == 0){
_local13 = false;
break;
};
_local14++;
};
if (_local13){
main.game.RP_khusus.all_scenery = 1;
main.game.totalRP.Khusus++;
_local12++;
};
};
main.hitungTotalRP(false, _local12);
main.PlaySound("coin1");
};
main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
main.addEventListener(Eventku.END_SAVED, endSaved);
main.addEventListener(Eventku.REMOVING_ALL, removingAll);
} else {
alphaObject(main.onGeneralAlpha);
};
}
public function hidingFocus():void{
onOver = false;
onfocus.hiding();
ground.hiding();
changeColor(onSelected, onOver);
}
public function settingFocus():void{
onOver = true;
onfocus.showing();
ground.showing();
changeColor(onSelected, onOver);
}
private function removeListeners():void{
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
}
public function removingAll(_arg1:Eventku=null):void{
removeListeners();
renderI = null;
mapTileREF;
parent_ = null;
mapAreaREF = null;
mclip = null;
REF = null;
canvasI.bitmapData.dispose();
canvasI = null;
groundI = null;
if (REC){
REC.ob = null;
};
REC = null;
main = null;
}
public function autoSaved(_arg1:Eventku):void{
REC.ob = null;
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
public function drawGroundOnCanvas():void{
if ((((jenis < 10)) || ((jenis == 99)))){
groundI.bitmapData.copyPixels(main.plantedGround, mapTileREF.renderI.areaRectangle, mapTileREF.dp, null, null, true);
};
}
public function drawOnCanvas():void{
var _local1:Point = new Point();
canvasI.bitmapData.copyPixels(renderI.captureArray[(REF.fr - 1)], renderI.areaRectangle, _local1, null, null, true);
}
public function creatingTemp(_arg1:MovieClip, _arg2):Sprite{
renderI = _arg1;
canvasI = BitmapUtility.Canvas(70, 50);
canvasI.bitmapData.copyPixels(renderI.captureArray[(_arg2.fr - 1)], renderI.areaRectangle, dp, null, null, true);
this.visible = false;
var _local3:Sprite = new Sprite();
_local3.addChild(canvasI);
return (_local3);
}
public function alphaObject(_arg1:Boolean=true, _arg2:Number=0.5):void{
if (pagar){
canvasI.visible = (_arg1) ? false : true;
} else {
if (main.onGeneralAlpha){
canvasI.visible = (onSelected) ? true : (((onOver) && (main.onMouseDestroy))) ? true : false;
} else {
canvasI.visible = true;
};
};
}
public function alphaObject_old(_arg1:Boolean=true, _arg2:Number=0.5):void{
if (pagar){
canvasI.visible = (_arg1) ? false : true;
} else {
if (main.onGeneralAlpha){
canvasI.visible = false;
} else {
if (((_arg1) || (main.onMouseDestroy))){
if (canvasI.alpha != 0.5){
canvasI.alpha = 0.5;
};
canvasI.visible = true;
} else {
if (canvasI.alpha != 1){
canvasI.alpha = 1;
};
canvasI.visible = true;
};
};
};
}
public function alphaObject2(_arg1:Boolean=true):void{
if (pagar){
canvasI.visible = (_arg1) ? false : true;
};
}
public function updateMoney(_arg1:Number):void{
main.insertMoneyClip(_arg1, this);
main.updateRealTime("money", _arg1);
}
public function changeColor(_arg1:Boolean, _arg2:Boolean):void{
co.combineColor(mclip, _arg1, _arg2, true);
if (main.onGeneralAlpha){
alphaObject();
};
}
public function removeColorSelected():void{
changeColor(onSelected, false);
}
public function selecting(_arg1:Boolean):void{
onSelected = _arg1;
if (onSelected){
parent_.selectD.showing(this, REF.lbl);
} else {
parent_.selectD.hiding();
};
}
public function reInit():void{
}
public function removingData():void{
parent_.objContainer.removeChild(this);
parent_.plants[((("tile_" + ptile.x) + "_") + ptile.y)] = null;
}
public function destroy(_arg1:Boolean=false, _arg2:Boolean=false):void{
clearGroundBitmap();
mapTileREF.kosongkanTile();
if (!idefault){
rumus.spliceArrayObject(main.game.objects["Scenery"], this, "ob");
main.realTimeResort("scenery");
var _local3 = main.game.objects.Scenery["Sum"];
var _local4 = (jenis - 1);
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
main.updateSceneryPopularity_onAdd(jenis);
if (main.game.RP_khusus["destroy_scenery"] == 0){
main.game.RP_khusus["destroy_scenery"] = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
};
parent_.destroyITabs(this, true, false, false, _arg1);
if (_arg2){
main.DB_object2_active(false);
};
removingAll();
}
public function clearGroundBitmap():void{
groundI.bitmapData.threshold(main.plantedGround, mapTileREF.renderI.areaRectangle, mapTileREF.dp, "!=", 0, 0);
}
public function acceptGoToTarget():void{
if (main.game["RP_khusus"]["goto_scenery"] == 0){
main.game["RP_khusus"]["goto_scenery"] = 1;
var _local1 = main.game["totalRP"];
var _local2 = "Khusus";
var _local3 = (_local1[_local2] + 1);
_local1[_local2] = _local3;
main.hitungTotalRP(false, 1);
};
}
}
}//package pack.Instance
Section 104
//Sampah (pack.Instance.Sampah)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import pack.*;
public class Sampah extends MovieClip {
public var parent_;
public var REC:Object;
public var REF_TILE:Object;
public var id:uint;
public var jenis:uint;
public var janitor:int;
public var tag:String;
public var minMood:Number;
public var timing:Number;
public var ptile:Point;
public var posisi:Point;
public var rec:Boolean;
public var garbage:Boolean;
public var onCleaning:Boolean;
public var onTarget:Boolean;
public var ada:Boolean;
public function Sampah():void{
}
public function creating(_arg1, _arg2:Point=null, _arg3:uint=0, _arg4:Boolean=false, _arg5:Object=null):void{
var _local6:uint;
parent_ = _arg1;
jenis = _arg3;
rec = _arg4;
ptile = new Point();
if (rec){
REC = _arg5;
REC.ob = this;
id = REC["id"];
timing = REC.timing;
tag = REC.tag;
garbage = REC.garbage;
onTarget = REC.onTarget;
onCleaning = REC.onCleaning;
janitor = REC.janitor;
ptile.x = _arg2.x;
ptile.y = _arg2.y;
} else {
onTarget = false;
onCleaning = false;
garbage = false;
janitor = -1;
garbage = false;
id = parent_.main.game.ID.Sampah;
parent_.main.game.ID.Sampah++;
timing = ((jenis)==1) ? 90 : ((jenis)==2) ? 120 : 150;
ptile.x = _arg2.x;
ptile.y = _arg2.y;
tag = ((ptile.x + "_") + ptile.y);
_local6 = parent_.main.game.sampah.length;
parent_.main.game.sampah.push({ob:this, id:id, ptile:ptile, jenis:jenis, timing:timing, tag:tag, garbage:garbage, onTarget:onTarget, onCleaning:onCleaning, janitor:janitor});
REC = parent_.main.game.sampah[_local6];
};
this.name = ("sampah_" + id);
this.gotoAndStop(jenis);
minMood = ((jenis)==1) ? -0.05 : ((jenis)==2) ? -0.075 : -0.1;
posisi = rumus.findTileCoord_point(ptile, parent_.SIZE_, true);
this.x = posisi.x;
this.y = posisi.y;
parent_.tileBoothSprite.addChild(this);
this.mouseChildren = false;
this.mouseEnabled = false;
REF_TILE = parent_["map"]["tiles"][("tile_" + tag)];
REF_TILE.tileKotor(this);
parent_.main.addEventListener(Eventku.AUTO_SAVED, autoSaved);
parent_.main.addEventListener(Eventku.END_SAVED, endSaved);
}
private function removeListeners():void{
parent_.main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
parent_.main.removeEventListener(Eventku.END_SAVED, endSaved);
}
public function autoSaved(_arg1:Eventku):void{
REC.garbage = garbage;
REC.timing = timing;
REC.onTarget = onTarget;
REC.onCleaning = onCleaning;
REC.janitor = janitor;
REC.ob = null;
}
public function endSaved(_arg1:Eventku):void{
if (REC){
REC.ob = this;
};
}
public function isRemovedWithListeners():void{
isRemoved();
removeListeners();
if (REC){
REC.ob = null;
};
REC = null;
parent_ = null;
REF_TILE = null;
}
public function isRemoved():void{
if (this.parent != null){
parent_.tileBoothSprite.removeChild(this);
};
}
public function isRemovedAndCleaned():void{
isRemoved();
REF_TILE.sampahBersih();
removeListeners();
rumus.spliceArrayObject(parent_.main.game.sampah, this, "ob");
REC.ob = null;
REC = null;
parent_ = null;
REF_TILE = null;
}
public function buangREF():void{
removeListeners();
REF_TILE.sampahBersih();
}
}
}//package pack.Instance
Section 105
//TemporaryObject (pack.Instance.TemporaryObject)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import pack.*;
import pack.bitmap.*;
public class TemporaryObject extends MovieClip {
public var area_janitor:MovieClip;
public var ground4x4:MovieClip;
public var ground3x3:MovieClip;
public var ground2x2:MovieClip;
public var ground1x1:MovieClip;
public var ground3x4:MovieClip;
public var ground2x3:MovieClip;
public var parent_:Object;
public var REF:Object;
public var clipBitmap:Bitmap;
public var mtile:Point;
public var ontile:Point;
public var sub:String;
public var SIZE_:Number;
public var index:uint;
public var price:uint;
public var ada:Boolean;
public var notMoney:Boolean;
public var isDestroy:Boolean;
public var truePos:Boolean;
public var single:Boolean;
public var jenis:String;// = ""
public var nama:String;
public var dp:Point;
public var CPOINT:Point;
public var i:uint;
public var ground:MovieClip;
public var pointing:Point;
public var groundR:Array;
public function TemporaryObject():void{
pointing = new Point();
groundR = ["ground1x1", "ground2x2", "ground2x3", "ground3x3", "ground3x4", "ground4x4"];
super();
}
public function init(_arg1):void{
parent_ = _arg1;
SIZE_ = parent_.SIZE_;
mtile = new Point();
CPOINT = new Point();
this.mouseEnabled = false;
this.mouseChildren = false;
this.cacheAsBitmap = true;
empty();
}
public function CathTemp(_arg1, _arg2:String, _arg3:String):void{
ontile = new Point();
ada = true;
REF = _arg1;
jenis = _arg2;
sub = _arg3;
area_janitor.visible = false;
if (jenis == "Tile"){
clipBitmap = drawOnCanvas();
clipBitmap.x = -(SIZE_);
clipBitmap.y = (-(SIZE_) * 0.5);
index = 0;
ground = ground1x1;
single = true;
price = REF["price"];
addChild(clipBitmap);
setChildIndex(clipBitmap, index);
CPOINT = new Point(0, 0);
} else {
if (jenis == "Scenery"){
clipBitmap = drawOnCanvas();
clipBitmap.x = -(SIZE_);
clipBitmap.y = (-(clipBitmap.height) + (SIZE_ * 0.5));
index = (numChildren - 1);
ground = ground1x1;
single = true;
price = parent_.dialog_scenery.pricing[("PLANT_" + _arg3)];
addChild(clipBitmap);
setChildIndex(clipBitmap, index);
CPOINT = new Point(0, 0);
} else {
if (jenis == "Booth"){
if (sub == "Lodge"){
ground = ground2x3;
} else {
if (sub == "Golf"){
ground = ground4x4;
} else {
if (sub == "Pool"){
ground = ground3x4;
} else {
if ((((sub == "Medical")) || ((sub == "Minimarket")))){
ground = ground3x3;
} else {
if (REF.standbooth){
ground = ground1x1;
} else {
ground = ground2x2;
};
};
};
};
};
if (sub == "JanitorRoom"){
area_janitor.visible = true;
};
price = REF.price[0];
CPOINT = new Point(0, 0);
clipBitmap = drawOnCanvas();
clipBitmap.x = (-(SIZE_) * 2);
clipBitmap.y = (-(clipBitmap.height) + 60);
index = 0;
single = false;
addChild(clipBitmap);
if (!REF.standbooth){
setChildIndex(clipBitmap, index);
};
};
};
};
SetGround();
this.visible = true;
}
public function drawOnCanvas():Bitmap{
var _local1:Bitmap;
var _local2:MovieClip;
var _local3:MovieClip;
var _local4:MovieClip;
var _local5:MovieClip;
if (jenis == "Booth"){
_local2 = parent_.RenderBoothTile;
_local3 = parent_.RenderWall;
_local1 = BitmapUtility.Canvas(240, 136);
_local1.bitmapData.copyPixels(_local2.captureArray[(REF.fr - 1)], _local2.areaRectangle, pointing, null, null, true);
if (REF.standbooth){
_local1.bitmapData.copyPixels(_local3.captureArray[(REF.wall - 1)], _local3.areaRectangle, pointing, null, null, true);
} else {
_local1.bitmapData.copyPixels(_local3.captureArray[(REF.wall - 1)], _local3.areaRectangle, pointing, null, null, true);
};
_local1.alpha = 0.5;
_local2 = null;
_local3 = null;
} else {
if (jenis == "Scenery"){
_local4 = parent_.RenderPlant;
_local1 = BitmapUtility.Canvas(70, 50);
_local1.bitmapData.copyPixels(_local4.captureArray[(REF.fr - 1)], _local4.areaRectangle, pointing, null, null, true);
_local1.alpha = 0.7;
_local4 = null;
} else {
_local5 = parent_.RenderTile;
_local1 = BitmapUtility.Canvas(50, 26);
_local1.bitmapData.copyPixels(_local5.captureArray[(REF.fr - 1)], _local5.areaRectangle, pointing, null, null, true);
_local1.alpha = 0.7;
_local5 = null;
};
};
return (_local1);
}
public function SetGround():void{
var _local1:uint = groundR.length;
i = 0;
while (i < _local1) {
if (groundR[i] == ground["name"]){
this[groundR[i]].visible = true;
} else {
this[groundR[i]].visible = false;
};
i++;
};
}
public function groundAnim(_arg1:Boolean=true):void{
if (_arg1){
ground.gotoAndStop("true");
area_janitor.visible = ((sub)=="JanitorRoom") ? true : false;
} else {
ground.gotoAndStop("false");
area_janitor.visible = false;
};
}
public function clearBitmap():void{
clipBitmap.bitmapData.fillRect(clipBitmap.bitmapData.rect, 0);
removeChild(clipBitmap);
clipBitmap.bitmapData.dispose();
clipBitmap = null;
}
public function removingAll():void{
if (clipBitmap != null){
removeChild(clipBitmap);
clipBitmap.bitmapData.dispose();
clipBitmap = null;
};
REF = null;
parent_ = null;
}
public function empty():void{
if (REF != null){
clearBitmap();
};
REF = null;
ada = false;
truePos = false;
isDestroy = false;
single = true;
mtile = new Point();
ontile = new Point();
notMoney = false;
jenis = "";
sub = "";
this.visible = false;
}
public function checkTile(_arg1:Point):Boolean{
var _local2:Boolean;
if (co.isSamePoint(_arg1, ontile)){
_local2 = false;
} else {
ontile.x = _arg1.x;
ontile.y = _arg1.y;
_local2 = true;
};
return (_local2);
}
public function ontileDefault():void{
ontile.x = 0;
ontile.y = 0;
truePos = false;
}
}
}//package pack.Instance
Section 106
//Tile (pack.Instance.Tile)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import pack.*;
import pack.bitmap.*;
public class Tile extends MovieClip {
private var canvasI:Bitmap;
public var parent_;
public var main;
public var REF:Object;
public var REC_PATH:Object;
public var mapAreaREF:Object;
public var sampah:Object;
public var REC:Object;
public var ptile:Point;
public var centerPoint:Point;
public var centered:Point;
public var posisi:Point;
public var dp:Point;
public var SIZE_:Number;
public var dimX:Number;
public var dimY:Number;
public var pop_rate:Number;
public var jdefault:uint;// = 0
public var renderI:MovieClip;
public var jenis:uint;
public var idefault:Boolean;
public var walkable:Boolean;
public var plenty:Boolean;
public var tile_tutorial:Boolean;// = false
public var mapWalkableREF:Boolean;
public var planted:Boolean;// = false
public var ipath:Boolean;
public var adaSampah:Boolean;
public var onOver:Boolean;// = false
public var parentMapWalkable:Array;
public var paths:Array;
public var pathsGo:Array;
public var map:Array;
public var tpointAr:Array;
public var onSelected:Boolean;// = false
public var canDestroy:Boolean;// = true
public function Tile():void{
tpointAr = [new Point(0, 0)];
super();
}
public function init():void{
REC_PATH = null;
}
public function creating(_arg1:Sprite, _arg2:Point, _arg3:uint):void{
parent_ = _arg1;
main = parent_.main;
SIZE_ = parent_.SIZE_;
renderI = main.RenderTile;
canvasI = parent_.tileCanvas;
dimX = parent_.dimX;
dimY = parent_.dimY;
dp = new Point();
ptile = new Point();
ptile.x = _arg2.x;
ptile.y = _arg2.y;
posisi = new Point(((ptile.y - ptile.x) * SIZE_), ((-((ptile.y + ptile.x)) * SIZE_) * 0.5));
centerPoint = rumus.findTileCoord_point(ptile, parent_.SIZE_, true);
centered = centerPoint;
this.x = posisi.x;
this.y = posisi.y;
dp.x = (((ptile.y - ptile.x) * SIZE_) + dimX);
dp.y = (dimY - ((ptile.y + ptile.x) * (SIZE_ * 0.5)));
fjenis(_arg3);
ipath = false;
parentMapWalkable = parent_["map"]["walkable"];
mapAreaREF = parent_["map"]["area"][ptile.x][ptile.y];
mapWalkableREF = parentMapWalkable[ptile.x][ptile.y];
sampahBersih();
main.addEventListener(Eventku.REMOVING_TILE, removingAll);
}
public function fjenis(_arg1:uint, _arg2:Boolean=true):void{
if (jdefault == 0){
jdefault = _arg1;
};
REF = serbi.dataOb.Tile[("TILE_" + _arg1)];
walkable = REF["walkable"];
plenty = REF["plenty"];
jenis = _arg1;
if (_arg2){
drawOnCanvas();
};
}
public function drawOnCanvas():void{
canvasI.bitmapData.copyPixels(renderI.captureArray[(REF.fr - 1)], renderI.areaRectangle, dp, null, null, true);
}
public function clearBitmap():void{
if (jenis != 0){
canvasI.bitmapData.threshold(renderI.captureArray[0], renderI.areaRectangle, dp, "!=", 0, 0);
};
}
public function creatingTemp(_arg1:MovieClip, _arg2):Sprite{
renderI = _arg1;
canvasI = BitmapUtility.Canvas(50, 26);
canvasI.bitmapData.copyPixels(renderI.captureArray[(_arg2.fr - 1)], renderI.areaRectangle, new Point(0, 0), null, null, true);
this.visible = false;
var _local3:Sprite = new Sprite();
_local3.addChild(canvasI);
return (_local3);
}
public function fjenis2(_arg1:uint, _arg2:Boolean=true):void{
jdefault = _arg1;
fjenis(_arg1, _arg2);
}
public function changeToDefault(_arg1:uint, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false):void{
idefault = true;
jdefault = _arg1;
mapAreaREF.idefault = idefault;
if (_arg4){
fjenis2(_arg1, true);
mapWalkableREF = parentMapWalkable[ptile.x][ptile.y];
} else {
clearBitmap();
fjenis(_arg1);
parentMapWalkable[ptile.x][ptile.y] = walkable;
mapWalkableREF = walkable;
ipath = _arg2;
if (((_arg3) && (ipath))){
insertToTilesPath(false);
};
};
}
public function accept_WalkableREF():void{
var _local1:Boolean = mapWalkableREF;
mapWalkableREF = parentMapWalkable[ptile.x][ptile.y];
if (mapWalkableREF != _local1){
parent_.updateTilesPath_all(ptile, mapWalkableREF);
};
}
public function accept_IPath_Expand():void{
if (ipath){
insertToTilesPath(false);
};
}
public function pathing():void{
var _local1:int;
if (ipath){
_local1 = parent_.tilesPath.indexOf(this);
if (_local1 == -1){
insertToTilesPath();
};
};
}
public function changeToBuild(_arg1:uint, _arg2:Boolean=false, _arg3:Object=null):void{
var _local4:uint;
var _local5:uint;
var _local6:Boolean;
var _local7:uint;
if (_arg2){
REC = _arg3;
REC.ob = this;
idefault = idefault;
};
clearBitmap();
fjenis(_arg1);
reklamation();
pop_rate = REF["pop"];
if (((main.game.EXTRA.gardening) && ((REF.mainJenis == 1)))){
pop_rate = (pop_rate + 0.005);
};
if (!_arg2){
_local4 = parent_.tiles.length;
parent_.tiles.push({ob:this, jenis:_arg1, idefault:idefault, ptile:ptile});
REC = parent_.tiles[_local4];
if (!idefault){
main.game.SUM.Tile++;
updateMoney(-(REF.price));
main.game.MISC.Tile_Expend = (main.game.MISC.Tile_Expend + REF.price);
main.game.MISC.Expend = (main.game.MISC.Expend + REF.price);
var _local8 = main.game.objects.TileSum;
var _local9 = (jenis - 1);
var _local10 = (_local8[_local9] + 1);
_local8[_local9] = _local10;
main.updateTilePopularity_onAdd(jenis);
_local5 = 0;
if (main.game.RP_khusus.all_tile == 0){
_local6 = true;
_local7 = 0;
while (_local7 < 8) {
if (main.game.objects.TileSum[_local7] == 0){
_local6 = false;
break;
};
_local7++;
};
if (_local6){
main.game.RP_khusus.all_tile = 1;
main.game.totalRP.Khusus++;
_local5++;
};
};
main.hitungTotalRP(false, _local5);
main.PlaySound("coin1");
};
};
if (walkable){
ipath = true;
insertToTilesPath(!(_arg2));
if (!_arg2){
parent_.updateTilesPath_all(ptile, mapWalkableREF);
main.adaPathBaru = true;
};
};
}
private function removeListeners():void{
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
main.removeEventListener(Eventku.REMOVING_TILE, removingAll);
}
public function autoSaved(_arg1:Eventku):void{
if (REC){
REC.ob = null;
};
}
public function endSaved(_arg1:Eventku):void{
if (REC){
REC.ob = this;
};
}
public function updateOtherTilePath():void{
map = co.cloning(parentMapWalkable);
}
public function updatePathVars(_arg1:Point, _arg2:Boolean):void{
pathsGo = [];
paths = [];
map[_arg1.x][_arg1.y] = _arg2;
}
public function updateTileData():void{
}
public function updateMoney(_arg1:Number):void{
main.insertMoneyClip(_arg1, this);
main.updateRealTime("money", _arg1);
}
public function insertToTilesPath(_arg1:Boolean=true):void{
var _local3:uint;
var _local2:int = parent_.tilesPath.indexOf(this);
if (_local2 == -1){
pathsGo = [];
paths = [];
map = [];
if (_arg1){
map = co.cloning(parentMapWalkable);
};
_local3 = parent_.tilesPath.length;
parent_.tilesPath.push(this);
REC_PATH = parent_.tilesPath[_local3];
};
if (!main.game.Tips.listing["connectTile"].showed){
if ((((parent_.tilesPath.length > 25)) && ((((((main.game.objects.Cottage.length > 0)) || ((main.game.objects.Lodge.length > 0)))) || ((main.game.objects.Facility.length > 0)))))){
main.TampilkanNewTips("connectTile", true);
};
};
}
public function kosongkanTile():void{
if (mapAreaREF.lahan){
mapAreaREF.isi = false;
mapAreaREF.isi_apa = null;
if (plenty){
reklamation();
};
};
}
public function reklamation():void{
if (REF.jenis != jdefault){
mapAreaREF.isi = true;
mapAreaREF.isi_apa = this;
};
mapWalkableREF = walkable;
parentMapWalkable[ptile.x][ptile.y] = mapWalkableREF;
planted = false;
}
public function selecting(_arg1:Boolean):void{
onSelected = _arg1;
if (onSelected){
parent_.selectD.showing(this, "Tile");
} else {
parent_.selectD.hiding();
};
}
public function hidingFocus():void{
onOver = false;
}
public function settingFocus():void{
onOver = true;
}
public function changeColor(_arg1:Boolean, _arg2:Boolean):void{
}
public function removeColorSelected():void{
}
public function reInit():void{
clearBitmap();
fjenis(jdefault);
}
public function removingAll(_arg1:Eventku):void{
removeListeners();
renderI = null;
paths = null;
pathsGo = null;
map = null;
tpointAr = null;
parentMapWalkable = null;
mapAreaREF = null;
sampah = null;
if (REC){
REC.ob = null;
};
REF = null;
REC_PATH = null;
REC = null;
canvasI = null;
parent_ = null;
main = null;
}
public function destroy(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:int;
trace("destroy..", this.name, "onExpand", _arg1, "_fromOutsider", _arg2, idefault, mapAreaREF.isi, walkable);
if (walkable){
_local3 = parent_.tilesPath.indexOf(this);
if (_local3 != -1){
parent_.tilesPath.splice(_local3, 1);
main.game.tilesDat[name] = null;
};
REC = null;
REC_PATH = null;
ipath = false;
pathsGo = null;
paths = null;
map = null;
parent_.destroyITabs(this, false, true, true, _arg1);
};
if (((mapAreaREF.isi) && (!(idefault)))){
main.game.SUM.Tile--;
trace("Tile_Expend>>", main.game.MISC.Tile_Expend, REF.price);
var _local4 = main.game.objects.TileSum;
var _local5 = (jenis - 1);
var _local6 = (_local4[_local5] - 1);
_local4[_local5] = _local6;
main.updateTilePopularity_onAdd(jenis);
if (walkable){
if (main.game.RP_khusus.destroy_tile_walkable == 0){
main.game.RP_khusus.destroy_tile_walkable = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
} else {
if (main.game.RP_khusus.destroy_tile_unwalkable == 0){
main.game.RP_khusus.destroy_tile_unwalkable = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
};
mapAreaREF.isi = false;
mapAreaREF.isi_apa = null;
if (REF.mainJenis == 1){
};
};
trace("\n--------,,,,DESTROY TILE fromOutside?", _arg2, "adaPathBaru?", main.adaPathBaru);
if (_arg2){
main.lemparPath_DB_TilesSceneries();
};
reInit();
rumus.spliceArrayObject(main.game.tiles, this, "ob");
tileJikaLahan();
}
public function tileJikaLahan():void{
if (mapAreaREF.lahan){
drawOnCanvas();
};
}
public function destroy_onExpand():void{
var _local1:int;
if (walkable){
_local1 = parent_.tilesPath.indexOf(this);
if (_local1 != -1){
parent_.tilesPath.splice(_local1, 1);
main.game.tilesDat[name] = null;
};
ipath = false;
pathsGo = null;
paths = null;
map = null;
};
clearBitmap();
}
public function checkIfCanDestroy():void{
var _local1:Point;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Object;
canDestroy = true;
if (adaSampah){
canDestroy = false;
} else {
if (walkable){
_local1 = new Point();
_local2 = parent_.visitors.length;
_local3 = (parent_.ROWS - 7);
_local4 = (parent_.COLS - 7);
_local5 = 0;
while (_local5 < _local2) {
_local6 = parent_.visitors[_local5].ob;
_local1 = _local6.vtile;
if ((((((_local1.x > 7)) && ((_local1.x < _local3)))) && ((((_local1.y > 7)) && ((_local1.y < _local4)))))){
if (isSamePoint(_local1, ptile)){
canDestroy = false;
break;
};
};
_local5++;
};
_local1 = null;
_local6 = null;
};
};
}
private function isSamePoint(_arg1:Point, _arg2:Point):Boolean{
if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){
return (true);
};
return (false);
}
public function createSampah(_arg1:uint=1, _arg2:Boolean=false, _arg3:Object=null):void{
var _local4:Sampah;
if (_arg2){
_local4 = new Sampah();
_local4.creating(parent_, ptile, _arg1, _arg2, _arg3);
} else {
if (((!(adaSampah)) && (walkable))){
_local4 = new Sampah();
_local4.creating(parent_, ptile, _arg1, _arg2, _arg3);
};
};
_local4 = null;
}
public function tileKotor(_arg1:Sampah=null):void{
adaSampah = true;
sampah = _arg1;
}
public function sampahBersih():void{
adaSampah = false;
sampah = null;
}
}
}//package pack.Instance
Section 107
//Visitor (pack.Instance.Visitor)
package pack.Instance {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import pack.*;
import flash.utils.*;
import pack.Instance.Booths.*;
public class Visitor extends Sprite {
private const savePoint:Object;
private const saveKhusus:Object;
private const saveData:Object;
public var ground:MovieClip;
public var no_t:TextField;
public var balon:MovieClip;
public var onfocus:MovieClip;
public var parent_;
public var main;
public var REF:Object;
public var REC:Object;
public var randomTag:Object;
public var mapTilesDATA:Object;
public var SPEC_DATA:Object;
public var rec:Boolean;
public var inserted:Boolean;
public var single:Boolean;
public var onSelected:Boolean;
public var onOver:Boolean;
public var car:Boolean;
public var readyAction:Boolean;
public var sudahMalam:Boolean;
public var tengahMalam:Boolean;
public var halfBaldOldMan:Boolean;
public var shortHairedOldLady:Boolean;
public var special:Boolean;
public var vtile_temp:Point;
public var ptile:Point;
public var outer_point:Point;
public var mapTileREF:MovieClip;
public var mclip:MovieClip;
public var temp_list:Array;
public var tiles_bag:Array;
public var parentMapWalkable:Array;
public var trStandArr:Array;
public var smiley:String;
public var nama:String;
public var gerak:String;
public var arah1:String;
public var arah2:String;
public var gender:String;
public var ydepth:uint;
public var m:uint;
public var n:uint;
public var c:uint;
public var boothUsed_counter:uint;
public var jamMalam:uint;
public var jamPulang:uint;
public var cariIdx:int;
public var hygieneCounter:int;
private var randInt:int;
private var bantuInt:int;
private var bantuRand:Number;
private var bantuUint:uint;
private var temp_point:Point;
public var tip:int;
public var speed:Number;
public var rand:Number;
public var bound1:Number;
public var bound2:Number;
public var persenMood:Number;
private var speedRange:Number;
private var d_selisih1:uint;
private var d_selisih2:uint;
private var isJamTidur:Boolean;
private var isJamBangun:Boolean;
private var sampah_chance:Number;
private var tickTimer:uint;
private var isJamPulang:Boolean;
private var depthKhusus:Array;
private var Tab:Object;
private var hourDay:Number;
private var hourDayInt:uint;
private var minuteDay:uint;
private var day:uint;
private var hygCounter:uint;
public var bookedRoom;// = null
public var destination;
public var temp_destination;
public var collects:Array;
public var nama_tampil:String;
public var room_category:String;
public var dest_category:String;
public var destinationName:String;
public var dummy:Boolean;
public var punyaTujuan:Boolean;
public var adaDiTujuan:Boolean;
public var outLobby:Boolean;
public var lobbyAgain:Boolean;
public var istirahat:Boolean;
public var bubu:Boolean;
public var outCounted:Boolean;
public var insideResort:Boolean;
public var enterResort:Boolean;
public var antriAtBooth:Boolean;
public var antriAtBoothStand:Boolean;
public var activityInBooth:Boolean;
public var afterActivity:Boolean;
public var truePos:Boolean;
public var moving:Boolean;
public var canBookedRoom:Boolean;
public var keliling:Boolean;
public var siapMasukRoom:Boolean;
public var punyaNomorAntrian:Boolean;
public var movingOut:Boolean;
public var cancelFromLobby:Boolean;
public var antriAtLobbyIn:Boolean;
public var antriAtLobbyOut:Boolean;
public var punyaNomorLobby:Boolean;
public var onTRLobby:Boolean;
public var lobby_cek:Boolean;
public var checkIn:Boolean;
public var checkOut:Boolean;
public var dilayani:Boolean;
public var garbage:Boolean;
public var adaJalan:Boolean;
public var lobby_checkOut:Boolean;
public var insideRoom:Boolean;
public var goDoorBooth:Boolean;
public var doorBooth:Boolean;
public var memasuki:Boolean;
public var cantAfford:Boolean;
public var insideBooth:Boolean;
public var jenis:uint;
public var id:uint;
public var enterResortX:uint;
public var jedaCariTujuan:uint;
public var jeda_frame:uint;
public var room_stay:uint;
public var onStand_tr:uint;
public var onStand_p:uint;
public var istirahatTimer:uint;
public var jamEnterResort:uint;
public var jamMaxKeliling:uint;
public var jamMasukRoom:Number;
public var ptimer:uint;
public var maxTimer:uint;
public var chosen:uint;
public var jeda_cariDoorLagi:uint;
public var jedaCariJalan:uint;
public var jedaBackToRoom:uint;
public var io:int;
public var dirx:int;
public var diry:int;
public var tr:int;
public var nomorAntrianLobby:int;
public var jamCheckIn_lobby:int;
public var money:int;
public var visual_money:int;
public var spending_temp:int;
public var dayEnter:int;
public var dayStay:int;
public var cost:int;
public var hourOut:int;
public var kelilingTimer:int;
public var jamTidur:int;
public var menitJamTidur:int;
public var jamBangun:int;
public var menitBangun:int;
public var dayBubu:int;
public var vtile:Point;
public var tpoint:Point;
public var gopoint:Point;
public var gtpoint:Point;
public var posisi:Point;
public var doorPoint:Point;
public var antri_point:Point;
public var randomTile:Point;
public var onStand:Point;
public var maxMood:Number;
public var angle:Number;
public var angleX:Number;
public var angleY:Number;
public var speedX:Number;
public var speedY:Number;
public var _mood:Number;
private var prop:String;
public var tujuanList:Array;
public var myob:Object;
public function Visitor():void{
trStandArr = [];
depthKhusus = [];
collects = [];
savePoint = {vtile:true, posisi:true, tpoint:true, gtpoint:true, gopoint:true, doorPoint:true, randomTile:true, antri_point:true, onStand:true};
saveKhusus = {destination:true, temp_destination:true, bookedRoom:true, myob:true};
saveData = {angle:true, angleX:true, angleY:true, adaJalan:true, adaDiTujuan:true, antriAtBoothStand:true, activityInBooth:true, antriAtLobbyIn:true, antriAtLobbyOut:true, antriAtBooth:true, afterActivity:true, boothUsed_counter:true, bubu:true, checkIn:true, checkOut:true, canBookedRoom:true, cancelFromLobby:true, cost:true, dirx:true, diry:true, destinationName:true, dest_category:true, doorBooth:true, dayBubu:true, dayEnter:true, dayStay:true, dilayani:true, enterResortX:true, enterResort:true, goDoorBooth:true, hygieneCounter:true, hourOut:true, insideResort:true, istiraha:true, insideRoom:true, insideBooth:true, istirahatTimer:true, jedaCariTujuan:true, jedaBackToRoom:true, jeda_cariDoorLagi:true, jamTidur:true, jamBangun:true, jedaCariJalan:true, keliling:true, kelilingTimer:true, lobby_checkOut:true, lobby_cek:true, mood:true, moving:true, money:true, movingOut:true, memasuki:true, maxTimer:true, menitJamTidur:true, menitBangun:true, nomorAntrianLobby:true, onTRLobby:true, onStand_tr:true, onStand_p:true, outCounted:true, punyaNomorLobby:true, ptimer:true, punyaTujuan:true, room_category:true, room_stay:true, speedX:true, speedY:true, siapMasukRoom:true, single:true, spending_temp:true, truePos:true, tr:true, visual_money:true};
super();
}
public function creating(_arg1, _arg2:uint=0, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Object=null):void{
var _local7:uint;
var _local8:Array;
var _local9:uint;
var _local10:uint;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
inserted = false;
jenis = _arg2;
parent_ = _arg1;
rec = _arg3;
car = _arg5;
main = parent_.main;
initProperties();
mapTilesDATA = parent_["map"]["tiles"];
parentMapWalkable = parent_["map"]["walkable"];
if (rec){
REC = _arg6;
REC.ob = this;
initRecVarsCreated();
updateCoordinate();
} else {
id = main.game.ID.Visitor;
main.game.ID.Visitor++;
this.name = ("visitor_" + id);
dummy = _arg4;
if (special){
nama_tampil = serbi.dataOb.Visitor[("Visitor" + jenis)].nick;
} else {
_local8 = null;
if (REF.sex == 0){
_local7 = main.game.TempData.ListName["Male"].length;
if (_local7 == 0){
main.raiseMaleName();
};
_local8 = main.game.TempData.ListName["Male"];
_local7 = _local8.length;
randInt = co.randomRangeR(_local7);
nama_tampil = _local8[randInt];
_local8.splice(randInt, 1);
} else {
if (REF.sex == 1){
_local7 = main.game.TempData.ListName["Female"].length;
if (_local7 == 0){
main.raiseFemaleName();
};
_local8 = main.game.TempData.ListName["Female"];
_local7 = _local8.length;
randInt = co.randomRangeR(_local7);
nama_tampil = _local8[randInt];
_local8.splice(randInt, 1);
} else {
nama_tampil = "Mr/Mrs";
_local7 = main.game.TempData.ListName["Couple"].length;
if (_local7 == 0){
main.raiseCoupleName();
};
_local8 = main.game.TempData.ListName["Couple"];
_local7 = _local8.length;
randInt = co.randomRangeR(_local7);
nama_tampil = (nama_tampil + (" " + _local8[randInt]));
_local8.splice(randInt, 1);
};
};
_local8 = null;
};
_local7 = serbi.enterArray.length;
io = co.randomRangeR(_local7);
if (car){
_local7 = serbi.enterByCar.length;
_local9 = co.randomRangeR(_local7);
ptile = serbi.enterArrayI("bycar", _local9, gameExpand);
} else {
ptile = serbi.enterArrayI("people", io, gameExpand);
};
updateOuterStage();
initFirstVarsCreated();
vtile.x = ptile.x;
vtile.y = ptile.y;
new_record();
if (!dummy){
_local11 = 0;
_local12 = REF.money;
if (popularity <= 5){
_local10 = 225;
_local11 = ((0.05 * _local12) * 5);
} else {
if (popularity <= 10){
_local10 = 350;
_local11 = ((0.07 * _local12) * 5);
} else {
if (popularity <= 15){
_local10 = 400;
_local11 = ((0.15 * _local12) * 2);
} else {
if (popularity <= 20){
_local10 = 575;
_local11 = ((0.2 * _local12) * 2);
} else {
if (popularity <= 25){
_local10 = 650;
_local11 = ((0.3 * _local12) * 2);
} else {
if (popularity <= 35){
_local10 = 700;
_local11 = ((0.35 * _local12) * 2);
} else {
if (popularity <= 40){
_local10 = 750;
_local11 = ((_local12)<10000) ? (0.85 * _local12) : (0.7 * _local12);
} else {
if (popularity <= 50){
_local10 = 850;
_local11 = ((_local12)<10000) ? (0.9 * _local12) : (0.75 * _local12);
} else {
if (popularity <= 60){
_local10 = 1000;
_local11 = ((_local12)<10000) ? (0.95 * _local12) : (0.8 * _local12);
} else {
if (popularity <= 70){
_local10 = 1250;
_local11 = ((_local12)<10000) ? (0.95 * _local12) : (0.85 * _local12);
} else {
if (popularity <= 80){
_local10 = 1400;
_local11 = ((_local12)<10000) ? _local12 : (0.9 * _local12);
} else {
if (popularity <= 90){
_local10 = 1500;
_local11 = ((_local12)<10000) ? _local12 : (0.95 * _local12);
} else {
_local10 = 1700;
};
};
};
};
};
};
};
};
};
};
};
};
_local11 = ((_local11)==0) ? _local12 : ((_local11)>_local12) ? _local12 : _local11;
_local13 = ((_local10)<_local12) ? _local10 : _local12;
_local14 = ((_local10)<_local11) ? _local11 : _local10;
if (special){
_local13 = (_local13 + 1000);
_local14 = ((_local14)<_local13) ? (_local13 + 1) : _local14;
};
_local15 = co.randomRange(_local13, _local14);
updateMoney(_local15, true);
};
coordinatePosition();
};
if (!dummy){
halfBaldOldMan = (serbi.dataOb.Visitor.halfBaldOldMan[("Visitor" + jenis)]) ? true : false;
shortHairedOldLady = (serbi.dataOb.Visitor.shortHairedOldLady[("Visitor" + jenis)]) ? true : false;
};
no_t.text = String(id);
no_t.visible = false;
parent_.objContainer.addChild(this);
main.addEventListener(Eventku.REMOVING_ALL, removingAll, false, 0, true);
this.mouseEnabled = false;
this.mouseChildren = false;
if (insideResort){
bantuInt = (main.hourDay - jamEnterResort);
bantuInt = ((bantuInt)<0) ? (bantuInt + 24) : bantuInt;
tickTimer = main.CounterHour(bantuInt);
};
calculate_tick();
find_vtile();
inserted = true;
parent_.InsertTabs(this);
Tab = parent_.tabs["ref"][name];
if (rec){
gerakArah();
moodChanging();
} else {
parent_.AppliedNewTabs();
goFirstMove();
gerak = "stand";
arah1 = "front";
arah2 = "R";
moving = false;
gerakArah();
moodChanging();
};
initListeners();
if (special){
if (!rec){
if (((enterResort) || (punyaTujuan))){
main.createNotif(5, false, null, nama_tampil, ("special" + jenis));
};
};
SPEC_DATA.ada = true;
if (insideResort){
main.CheckMissions("first_spcVisitor");
main.CheckMissions("x_spcVisitor");
main.CheckAchievements("acv_famousResort");
};
};
}
private function copyPoint(_arg1:Point, _arg2:Point):void{
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
}
private function initListeners():void{
main.addEventListener(Eventku.AUTO_SAVED, autoSaved, false, 0, true);
main.addEventListener(Eventku.END_SAVED, endSaved, false, 0, true);
if (dummy){
main.addEventListener(Eventku.AFTER_TICK, activities_dummy, false, 0, true);
} else {
main.addEventListener(Eventku.AFTER_TICK, activities, false, 0, true);
};
}
function get gameExpand():uint{
return (main.game.EXPAND);
}
function get popularity():Number{
return (main.popularity);
}
public function get mood():Number{
return (_mood);
}
public function set mood(_arg1:Number){
_mood = _arg1;
persenMood = co.RoundDecNumber(((_mood / maxMood) * 100), 1);
}
public function Boothing(_arg1:Eventku):void{
}
public function new_record():void{
var _local1:uint = main.game.visitors.length;
main.game.visitors.push({ob:this, jenis:jenis, id:id, io:io, dummy:dummy, nama_tampil:nama_tampil, car:car, angle:angle, angleX:angleX, angleY:angleY, adaJalan:adaJalan, antriAtBooth:antriAtBooth, adaDiTujuan:adaDiTujuan, afterActivity:afterActivity, activityInBooth:activityInBooth, antriAtBoothStand:antriAtBoothStand, antriAtLobbyIn:antriAtLobbyIn, antriAtLobbyOut:antriAtLobbyOut, boothUsed_counter:boothUsed_counter, bubu:bubu, canBookedRoom:canBookedRoom, checkIn:checkIn, checkOut:checkOut, cost:cost, cancelFromLobby:cancelFromLobby, dirx:dirx, diry:diry, destinationName:destinationName, dest_category:dest_category, doorBooth:doorBooth, dayBubu:dayBubu, dayEnter:dayEnter, dayStay:dayStay, dilayani:dilayani, enterResort:enterResort, enterResortX:enterResortX, goDoorBooth:goDoorBooth, hygieneCounter:hygieneCounter, hourOut:hourOut, istirahat:istirahat, insideRoom:insideRoom, insideResort:insideResort, insideBooth:insideBooth, istirahatTimer:istirahatTimer, jedaCariTujuan:jedaCariTujuan, jedaBackToRoom:jedaBackToRoom, jeda_cariDoorLagi:jeda_cariDoorLagi, jamTidur:jamTidur, jamBangun:jamBangun, jedaCariJalan:jedaCariJalan, jamCheckIn_lobby:jamCheckIn_lobby, jamMaxKeliling:jamMaxKeliling, jamEnterResort:jamEnterResort, jamPulang:jamPulang, jamMasukRoom:jamMasukRoom, keliling:keliling, kelilingTimer:kelilingTimer, lobby_checkOut:lobby_checkOut, lobby_cek:lobby_cek, mood:mood, movingOut:movingOut, moving:moving, money:money, memasuki:memasuki, menitJamTidur:menitJamTidur, menitBangun:menitBangun, maxTimer:maxTimer, nomorAntrianLobby:nomorAntrianLobby, onTRLobby:onTRLobby, onStand_tr:onStand_tr, onStand_p:onStand_p, outCounted:outCounted, punyaNomorLobby:punyaNomorLobby, ptimer:ptimer, punyaTujuan:punyaTujuan, room_category:room_category, room_stay:room_stay, speedX:speedX, speedY:speedY, siapMasukRoom:siapMasukRoom, single:single, spending_temp:spending_temp, truePos:truePos, tr:tr, visual_money:visual_money, tpoint:tpoint, antri_point:antri_point, doorPoint:doorPoint, gtpoint:gtpoint, gopoint:gopoint, posisi:posisi, randomTile:randomTile, vtile:vtile, onStand:null, bookedRoom:null, destination:null, temp_destination:null, myob:null, tujuanList:(co.cloning(tujuanList) as Array)});
REC = main.game.visitors[_local1];
}
public function autoSaved(_arg1:Eventku):void{
var _local2:Boolean;
var _local3:Object;
for (prop in REC) {
_local2 = savePoint[prop];
if (_local2){
if (this[prop] == null){
REC[prop] = null;
} else {
REC[prop] = this[prop];
};
} else {
_local2 = saveData[prop];
if (_local2){
REC[prop] = this[prop];
} else {
_local2 = saveKhusus[prop];
if (_local2){
_local3 = this[prop];
REC[prop] = ((_local3)==null) ? null : _local3.name;
} else {
if (prop == "tujuanList"){
REC.tujuanList = (co.cloning(tujuanList) as Array);
REC.collects = (co.cloning(collects) as Array);
};
};
};
};
};
REC.ob = null;
if (special){
SPEC_DATA.ada = true;
SPEC_DATA.pernah = true;
};
}
public function endSaved(_arg1:Eventku):void{
REC.ob = this;
}
public function useDataBooth(_arg1:Eventku):void{
bridgeConnection();
}
public function updateMoney(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
money = (money + _arg1);
if (_arg2){
visual_money = money;
};
if (_arg3){
visual_money = (visual_money + _arg1);
};
}
public function initProperties():void{
REC = null;
REF = serbi.dataOb.Visitor[("Visitor" + String(jenis))];
maxMood = REF.MAX_MOOD;
sampah_chance = serbi.dataOb.Visitor.HYGIENE_RANGE["chance"][(REF.hygiene - 1)];
onSelected = false;
onOver = false;
temp_list = [];
gerak = "";
arah1 = "";
arah2 = "";
smiley = "";
vtile_temp = new Point();
posisi = new Point();
vtile = new Point();
tpoint = new Point();
gopoint = new Point();
gtpoint = new Point();
temp_point = new Point();
onStand = null;
antri_point = null;
money = 0;
visual_money = 0;
gender = ((REF.sex)==0) ? "his" : ((REF.sex)==1) ? "her" : "their";
single = ((gender)=="their") ? false : true;
hygCounter = REF.hygCounter;
speed = REF["speed"];
speedRange = (speed * 2);
tiles_bag = [];
tiles_bag["keep"] = [];
tiles_bag["used"] = [];
tujuanList = [];
jeda_frame = 0;
jamCheckIn_lobby = 0;
tickTimer = 0;
readyAction = false;
sudahMalam = false;
tengahMalam = false;
jamMalam = co.randomRange(serbi.dataOb.jamTidur[(jenis - 1)][0], serbi.dataOb.jamTidur[(jenis - 1)][1]);
var _local1:String = ("Visitor" + String(jenis));
var _local2:Class = (getDefinitionByName(_local1) as Class);
mclip = new (_local2);
this.addChild(mclip);
if ((((jenis > 24)) && ((jenis <= 29)))){
special = true;
SPEC_DATA = main.game.specialVisitor[_local1];
} else {
special = false;
SPEC_DATA = null;
};
onfocus.hiding();
ground.hiding();
balon.init(this);
this.mouseEnabled = false;
this.mouseChildren = false;
this.cacheAsBitmap = true;
depthKhusus["14_21"] = true;
depthKhusus["14_22"] = true;
depthKhusus["11_23"] = true;
depthKhusus["13_22"] = true;
depthKhusus["13_21"] = true;
}
public function initRecVarsCreated(_arg1:Boolean=false):void{
var _local2:Boolean;
var _local3:String;
var _local4:Object;
var _local5:String;
if (_arg1){
} else {
for (_local3 in REC) {
_local2 = savePoint[_local3];
if (_local2){
_local4 = REC[_local3];
if (_local4 == null){
this[_local3] = null;
} else {
this[_local3] = new Point(_local4.x, _local4.y);
if (_local3 == "randomTile"){
randomTag = mapTilesDATA[((("tile_" + randomTile.x) + "_") + randomTile.y)];
};
};
} else {
_local2 = ((!((_local3 == "ob"))) && (((((((((((((!((_local3 == "ptile"))) && (!((_local3 == "tujuanList"))))) && (!((_local3 == "destination"))))) && (!((_local3 == "temp_destination"))))) && (!((_local3 == "bookedRoom"))))) && (!((_local3 == "myob"))))) && (!((_local3 == "collects"))))));
if (_local2){
_local4 = REC[_local3];
this[_local3] = _local4;
};
};
};
_local4 = null;
this.name = ("visitor_" + id);
tujuanList = co.cloning(REC.tujuanList);
collects = co.cloning(REC.collects);
ptile = serbi.enterArrayI("people", io, gameExpand);
updateOuterStage();
if (((canBookedRoom) || (((((((((((checkIn) || (checkOut))) || (punyaNomorLobby))) || (lobby_cek))) || (lobby_checkOut))) || (cancelFromLobby))))){
parent_.lobby.cekBridgeVisitorRecord(this, id);
};
if (REC.destination == null){
destination = null;
} else {
_local5 = REC.destination;
if (_local5.search("Lobby") != -1){
destination = parent_.lobby;
} else {
if (_local5.search("outer") != -1){
destination = parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)];
} else {
destination = parent_.booths[_local5];
destination.checkOverRecord(this, id);
};
};
};
if (REC.temp_destination == null){
temp_destination = null;
} else {
_local5 = REC.temp_destination;
if (_local5.search("Lobby") != -1){
temp_destination = parent_.lobby;
} else {
if (_local5.search("outer") != -1){
temp_destination = parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)];
} else {
temp_destination = parent_.booths[_local5];
};
};
};
if (REC.bookedRoom == null){
bookedRoom = null;
} else {
_local5 = REC.bookedRoom;
bookedRoom = parent_.booths[_local5];
bookedRoom.checkOverRecord(this, id);
};
if (REC.myob == null){
myob = null;
if (destination != null){
if (insideBooth){
destination.bridgeContinue();
};
};
} else {
_local5 = REC.myob;
if (_local5.search("Lobby") != -1){
myob = parent_.lobby;
} else {
myob = parent_.booths[_local5];
};
myob.checkOverRecord(this, id);
myob.bridgeContinue();
};
};
}
public function bridgeConnection():void{
}
public function hidingFocus():void{
onOver = false;
onfocus.hiding();
ground.hiding();
changeColor(onSelected, onOver);
}
public function settingFocus():void{
onOver = true;
onfocus.showing();
ground.showing();
changeColor(onSelected, onOver);
}
public function updateOuterStage():void{
outer_point = serbi.outerArrayI("people", io, gameExpand);
}
public function initFirstVarsCreated():void{
mood = ((0.55 * maxMood) + (Math.random() * (0.15 * maxMood)));
punyaTujuan = false;
adaDiTujuan = false;
canBookedRoom = false;
outCounted = false;
enterResort = false;
insideResort = false;
movingOut = false;
truePos = false;
moving = false;
destination = null;
temp_destination = null;
dirx = 0;
diry = 0;
enterResortX = 0;
tr = 0;
kelilingTimer = 0;
onStand_tr = 0;
cost = 0;
boothUsed_counter = 0;
nomorAntrianLobby = -1;
dilayani = false;
checkIn = false;
checkOut = false;
keliling = false;
punyaNomorAntrian = false;
memasuki = false;
dest_category = "";
destinationName = "";
randomTile = null;
doorPoint = null;
antriAtLobbyIn = false;
antriAtLobbyOut = false;
punyaNomorLobby = false;
onTRLobby = false;
lobby_cek = false;
outLobby = false;
siapMasukRoom = false;
insideRoom = false;
istirahat = false;
bubu = false;
lobby_checkOut = false;
istirahatTimer = 0;
jamTidur = 0;
menitJamTidur = 0;
jamBangun = 0;
menitBangun = 0;
dayBubu = -1;
jeda_cariDoorLagi = 0;
jedaCariTujuan = 0;
jedaCariJalan = 0;
jedaBackToRoom = 0;
antriAtBooth = false;
antriAtBoothStand = false;
activityInBooth = false;
goDoorBooth = false;
doorBooth = false;
afterActivity = false;
garbage = false;
adaJalan = false;
cantAfford = false;
cancelFromLobby = false;
insideBooth = false;
dayEnter = 0;
room_stay = 0;
spending_temp = 0;
ptimer = 0;
maxTimer = 0;
jamMaxKeliling = 0;
jamEnterResort = 0;
jamPulang = 0;
hygieneCounter = 50;
bookedRoom = null;
myob = null;
if (!dummy){
RListFacility();
};
}
public function RListFacility():void{
var _local1:int;
var _local2:String;
tujuanList["BlackList"] = [];
tujuanList["Room"] = [];
tujuanList["Facility"] = [];
var _local3:uint = REF.likes.Room.length;
m = 0;
while (m < _local3) {
_local1 = tujuanList["Room"].length;
_local2 = REF.likes.Room[m];
tujuanList["Room"].push({jenis:_local2, visit:0, maxVisit:1});
tujuanList["Room"][_local2] = _local1;
m++;
};
tujuanList["Room"].visited = false;
var _local4:Array = [];
_local4 = (co.cloning(REF.likes.Facility) as Array);
var _local5:uint = 7;
while (_local4[0].length > 0) {
if (_local4[0].length == 1){
_local2 = _local4[0][0];
_local1 = tujuanList["Facility"].length;
tujuanList["Facility"].push({jenis:_local2, visit:0, maxVisit:_local5, counter:0});
tujuanList["Facility"][_local2] = _local1;
_local4[0].splice(0, 1);
_local4[1].splice(0, 1);
} else {
rand = (Math.random() * 100);
_local3 = _local4[0].length;
m = 0;
while (m < _local3) {
if (rand <= _local4[1][m]){
_local2 = _local4[0][m];
_local1 = tujuanList["Facility"].length;
if (serbi.dataOb.Booth[_local2].standbooth){
randInt = co.randomRange(_local5, (_local5 + 2));
tujuanList["Facility"].push({jenis:_local2, visit:0, maxVisit:randInt});
} else {
randInt = co.randomRange(_local5, (_local5 + 1));
tujuanList["Facility"].push({jenis:_local2, visit:0, maxVisit:_local5});
_local5--;
};
tujuanList["Facility"][_local2] = _local1;
_local4[0].splice(m, 1);
_local4[1].splice(m, 1);
break;
};
m++;
};
};
};
if (_local5 < 3){
_local5 = 3;
};
_local4 = co.cloning(REF.Other);
while (_local4.length > 0) {
_local3 = _local4.length;
rand = co.randomRangeR(_local3);
_local2 = _local4[rand];
_local1 = tujuanList["Facility"].length;
if (serbi.dataOb.Booth[_local2].standbooth){
randInt = co.randomRange(2, 3);
tujuanList["Facility"].push({jenis:_local2, visit:0, maxVisit:randInt});
} else {
tujuanList["Facility"].push({jenis:_local2, visit:0, maxVisit:_local5});
if (_local5 > 1){
_local5--;
};
};
tujuanList["Facility"][_local2] = _local1;
_local4.splice(rand, 1);
};
tujuanList["Facility"].sortOn("maxVisit", (Array.DESCENDING | Array.NUMERIC));
}
public function coordinatePosition(_arg1:Boolean=true):void{
posisi = rumus.findTileCoord_point(vtile, parent_.SIZE_, true);
if (_arg1){
co.setPosition(this, posisi);
};
}
public function dir(_arg1:int, _arg2:int):void{
dirx = _arg1;
diry = _arg2;
gerakArah();
}
private function sameInt(_arg1:int=0, _arg2:int=0):Boolean{
if (_arg1 == _arg2){
return (true);
};
return (false);
}
public function find_vtile(_arg1:Boolean=true):void{
var _local2:Point = rumus.findTile(posisi.y, posisi.x, parent_.SIZE_, true);
if (((((sameInt(vtile_temp.x)) && (sameInt(vtile_temp.y)))) || (((!(sameInt(vtile.x, _local2.x))) || (!(sameInt(vtile.y, _local2.y))))))){
vtile_temp.x = vtile.x;
vtile_temp.y = vtile.y;
vtile.x = _local2.x;
vtile.y = _local2.y;
mapTileREF = parent_["map"]["tiles"][((("tile_" + vtile.x) + "_") + vtile.y)];
ydepth = vtile.y;
if (mapTileREF == null){
trace("nyantol?", name, destination, ptile, vtile, tpoint, tr);
trace("gtpoint,gopoint", gtpoint, gopoint, nomorAntrianLobby);
};
if (_arg1){
updateDepth();
};
main.MouseOnObject();
if (((mapTileREF.adaSampah) && (!((mapTileREF.sampah == null))))){
boostMood("sampah", mapTileREF.sampah.minMood);
};
};
if (((!(insideResort)) && ((vtile.x > 9)))){
if (!insideResort){
if (jamMaxKeliling == 0){
jamEnterResort = hourDay;
if ((((jamEnterResort > 20)) || ((jamEnterResort < 6)))){
jamMaxKeliling = (REF.old) ? 2 : co.randomRange(3, (REF.maxK * 0.5));
} else {
jamMaxKeliling = (REF.old) ? 2 : co.randomRange(5, REF.maxK);
};
jamPulang = main.CounterHour(jamMaxKeliling);
};
if (REF.old){
main.TampilkanNewTips("visitorOld", true);
} else {
if (special){
main.TampilkanNewTips("specialVisitor", true);
};
};
};
insideResort = true;
if (special){
main.CheckAchievements("acv_famousResort");
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + 2);
main.hitungTotalRP(false, 2);
};
main.realTimeResort("visitor");
if (persenMood > 65){
main.CheckAchievements_spc("mood_visitor");
};
} else {
if (((insideResort) && ((vtile.x <= 9)))){
insideResort = false;
main.realTimeResort("visitor");
ratePopEffect();
};
};
nama = ((vtile.x + "_") + vtile.y);
}
private function ratePopEffect():void{
var _local1:Number;
if (!outCounted){
if (((movingOut) && (!(dummy)))){
outCounted = true;
if (!((cancelFromLobby) && (cantAfford))){
moodChanging();
balon.setBalon(smiley, 7);
_local1 = outResortValue();
if (collects.length == 0){
if (main["popularity_fix"] < 30){
if (persenMood > 74){
_local1 = (_local1 * 0.1);
};
} else {
if (main["popularity_fix"] < 50){
if (persenMood > 40){
_local1 = (_local1 * 0.15);
};
} else {
if (main["popularity_fix"] < 75){
if (persenMood > 30){
_local1 = (_local1 * 0.2);
};
} else {
_local1 = (_local1 * 0.15);
};
};
};
};
main.CollectsOutResortValues(1, _local1);
};
};
};
}
private function outResortValue():Number{
var _local1:Number = serbi.dataOb.Smiley[smiley].nilai;
if (special){
return ((_local1 + (_local1 * 0.5)));
};
return (_local1);
}
public function updateDepth(_arg1:Number=0, _arg2:Number=0, _arg3:Boolean=false):void{
if (_arg3){
bound1 = (bound1 + _arg1);
bound1 = ((bound1)<0) ? (bound1 * -1) : bound1;
bound2 = (bound2 + _arg2);
bound2 = ((bound2)<0) ? (bound2 * -1) : bound2;
} else {
if (depthKhusus[((vtile.x + "_") + vtile.y)]){
bound1 = 407.85;
} else {
bound1 = (mapTileREF.y + _arg1);
};
bound1 = ((bound1)<0) ? (bound1 * -1) : bound1;
bound2 = (mapTileREF.y + _arg2);
bound2 = ((bound2)<0) ? (bound2 * -1) : bound2;
};
if (inserted){
Tab["bound1"] = bound1;
Tab["bound2"] = bound2;
Tab["bound3"] = ydepth;
checkDepth();
};
}
public function goFirstMove():void{
var _local1:uint;
if (dummy){
outResort();
} else {
if (ifCanCheckIn()){
canBookedRoom = true;
newDestination(parent_.lobby);
};
if (!punyaTujuan){
canBookedRoom = false;
bantuRand = (Math.random() * 100);
if (bantuRand > 70){
cobaEnterResortDulu();
} else {
_local1 = tujuanList["Facility"].length;
m = 0;
while (m < _local1) {
prop = tujuanList["Facility"][m].jenis;
if (cariFacility(prop)){
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
break;
};
m++;
};
};
};
if (!punyaTujuan){
if (special){
cobaEnterResortDulu();
} else {
if (car){
cobaEnterResortDulu();
} else {
bantuRand = (Math.random() * 100);
if (bantuRand > 25){
cobaEnterResortDulu();
} else {
outResort();
};
};
};
};
};
}
private function cobaEnterResortDulu():void{
punyaTujuan = true;
enterResort = true;
enterResortX = co.randomRange(12, 14);
outResort();
}
public function ifCanCheckIn():Boolean{
var _local2:String;
var _local3:uint;
var _local1:Boolean;
if (isLobbyFull("in")){
if (!tujuanList["Room"].visited){
_local3 = tujuanList["Room"].length;
m = 0;
while (m < _local3) {
_local2 = tujuanList["Room"][m].jenis;
if (roomCheckList(_local2, m)){
break;
};
m++;
};
};
};
_local1 = punyaTujuan;
return (_local1);
}
private function isLobbyFull(_arg1:String):Boolean{
var _local2:Boolean;
if (_arg1 == "in"){
_local2 = parent_.lobby.checkFull("in");
};
return (!(_local2));
}
public function roomCheckList(_arg1:String, _arg2:uint=0):Boolean{
var _local3:Boolean;
var _local4:Boolean;
var _local5:* = tujuanList["Room"][_arg2];
if (_local5.visit < _local5.maxVisit){
if (_arg2 == 1){
bantuRand = (Math.random() * 100);
if (_arg1 == "Cottage"){
_local3 = ((main["jumlah_cottage"])<1) ? false : ((bantuRand)<=REF["likes"]["Room2"]) ? true : false;
} else {
_local3 = ((main["jumlah_lodge"])<1) ? false : ((bantuRand)<=REF["likes"]["Room2"]) ? true : false;
};
};
if (_local3){
if (roomCategoryTersedia(_arg1)){
room_category = _arg1;
var _local6 = main.game;
var _local7 = (_arg1 + "_booked");
var _local8 = (_local6[_local7] + 1);
_local6[_local7] = _local8;
checkTempBookedCount();
punyaTujuan = true;
_local4 = true;
} else {
_local4 = false;
};
} else {
_local4 = false;
};
};
_local5 = null;
return (_local4);
}
public function checkTempBookedCount():void{
var _local1:Array;
var _local2:uint;
if (room_category != ""){
_local1 = parent_.rooms[room_category];
bantuUint = main.game[(room_category + "_booked")];
_local2 = _local1.length;
if (bantuUint > _local2){
main.game[(room_category + "_booked")] = _local2;
};
_local1 = null;
};
}
public function roomCategoryTersedia(_arg1:String, _arg2:Boolean=true):Boolean{
var _local4:uint;
var _local7:Object;
var _local3:Boolean;
var _local5:uint;
var _local6:uint = parent_["rooms"][_arg1].length;
if (_arg2){
_local5 = main.game[(_arg1 + "_booked")];
};
if (_local5 < _local6){
_local4 = 0;
while (_local4 < _local6) {
_local7 = parent_["rooms"][_arg1][_local4];
if (_arg2){
if (_local7.booked_price <= money){
temp_destination = _local7;
_local3 = true;
break;
};
} else {
if (!_local7.temp_booked){
if (_local7.booked_price <= money){
temp_destination = _local7;
_local3 = true;
break;
};
};
};
_local4++;
};
_local7 = null;
};
return (_local3);
}
public function roomCategoryTersedia_path(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=true):Boolean{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Boolean;
temp_list[_arg1] = [];
temp_list[_arg1] = insertListTemp("Room", _arg1);
if (!_local7){
if (_arg2){
_local5 = temp_list[_arg1]["path_afford"].length;
if (!_local7){
if (_local5 > 0){
temp_destination = temp_list[_arg1]["path"][0]["ob"];
_local7 = true;
return (_local7);
};
};
};
if (_arg3){
_local5 = temp_list[_arg1]["no_path_afford"].length;
if (_local5 > 0){
_local4 = co.randomRangeR(_local5);
temp_destination = temp_list[_arg1]["no_path_afford"][_local4].ob;
_local7 = true;
return (_local7);
};
};
};
return (_local7);
}
public function roomCategoryAda_all():Boolean{
var _local1:String;
var _local2:uint;
var _local3:Boolean;
_local2 = 0;
while (_local2 < 2) {
_local1 = tujuanList["Room"][_local2]["jenis"];
if (roomCategoryTersedia(_local1, false)){
room_category = _local1;
break;
};
_local2++;
};
return (_local3);
}
public function roomCategoryAda(_arg1:String):Boolean{
var _local2:uint = parent_.rooms[_arg1].length;
if (_local2 > 0){
return (true);
};
return (false);
}
public function roomCategoryAda_all_path():Boolean{
var _local1:String;
var _local2:uint;
var _local3:Boolean;
_local2 = 0;
while (_local2 < 2) {
_local1 = tujuanList["Room"][_local2]["jenis"];
if (roomCategoryTersedia_path(_local1)){
room_category = _local1;
break;
};
_local2++;
};
return (_local3);
}
public function cariFacility(_arg1:String, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Boolean=false):Boolean{
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:Boolean;
var _local10:Boolean;
_local6 = tujuanList["Facility"][_arg1];
var _local11:Boolean = (((REF.old) && ((_arg1 == "Medical")))) ? true : (tujuanList["Facility"][_local6].visit < tujuanList["Facility"][_local6].maxVisit);
if (_local11){
if (_arg1 == "Medical"){
bantuRand = (Math.random() * 101);
_local10 = ((bantuRand)<=REF["medical_prob"]) ? true : false;
};
if (_local10){
temp_list[_arg1] = [];
temp_list[_arg1] = insertListTemp("Facility", _arg1);
if (!_local9){
if (_arg2){
_local7 = temp_list[_arg1]["path_afford"].length;
if (!_local9){
if (_local7 > 0){
temp_destination = temp_list[_arg1]["path"][0].ob;
_local9 = true;
return (_local9);
};
};
if (!_local9){
if (!_arg4){
_local8 = temp_list[_arg1]["path"].length;
if (_local8 > 0){
temp_destination = temp_list[_arg1]["path"][0].ob;
_local9 = true;
return (_local9);
};
};
};
};
if (_arg3){
_local7 = temp_list[_arg1]["no_path_afford"].length;
if (_local7 > 0){
_local5 = co.randomRangeR(_local7);
temp_destination = temp_list[_arg1]["no_path_afford"][_local5].ob;
_local9 = true;
};
if (!_local9){
if (!_arg4){
_local7 = temp_list[_arg1]["no_path"].length;
if (_local7 > 0){
_local5 = co.randomRangeR(_local7);
temp_destination = temp_list[_arg1]["no_path"][_local5].ob;
_local9 = true;
};
};
};
};
};
};
};
return (_local9);
}
public function insertListTemp(_arg1:String, _arg2:String, _arg3:Boolean=false):Array{
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:Array;
var _local12:*;
var _local14:Array;
var _local4:Array = [];
_local4["path"] = [];
_local4["path_afford"] = [];
_local4["no_path"] = [];
_local4["no_path_afford"] = [];
var _local13:Boolean;
if (_arg1 == "Room"){
_local14 = parent_.rooms[_arg2];
_local8 = _local14.length;
_local6 = 0;
while (_local6 < _local8) {
_local12 = _local14[_local6];
if (((((_local12.builded) && (!(_local12.temp_booked)))) && (!(_local12.booked)))){
_local5 = (Math.abs((vtile.x - _local12.ptile.x)) + Math.abs((vtile.y - _local12.ptile.y)));
if (adaTilePath(_local12)){
_local4["path"].push({ob:_local12, dmin:_local5});
if (_local12.booked_price <= money){
_local4["path_afford"].push({ob:_local12, dmin:_local5});
};
} else {
_local4["no_path"].push({ob:_local12.ob, dmin:_local5});
if (_local12.booked_price <= money){
_local4["no_path_afford"].push({ob:_local12, dmin:_local5});
};
};
};
_local6++;
};
_local14 = null;
} else {
_local11 = main.game.objects.Facility;
_local8 = _local11.length;
_local9 = tujuanList["BlackList"].length;
_local6 = 0;
while (_local6 < _local8) {
_local12 = _local11[_local6].ob;
_local10 = _local12.visitor_antri.length;
if (_local12.jenis == _arg2){
if (((_local12.builded) && (_local12.opened))){
if (_local10 < _local12.max_antri){
if (ifSyaratCollects(_local12.name, _arg2, _local6)){
_local13 = false;
_local7 = 0;
while (_local7 < _local9) {
if (_local12["name"] == tujuanList["BlackList"][_local7]){
_local13 = true;
break;
};
_local7++;
};
if (!_local13){
_local5 = (Math.abs((vtile.x - _local12.ptile.x)) + Math.abs((vtile.y - _local12.ptile.y)));
if (adaTilePath(_local12)){
_local4["path"].push({ob:_local12, dmin:_local5});
if (_local12.booked_price <= money){
_local4["path_afford"].push({ob:_local12, dmin:_local5});
};
} else {
_local4["no_path"].push({ob:_local12.ob, dmin:_local5});
if (_local12.booked_price <= money){
_local4["no_path_afford"].push({ob:_local12, dmin:_local5});
};
};
};
};
};
};
};
_local6++;
};
};
_local11 = null;
if (_local4["path"].length > 0){
_local4["path"].sortOn("dmin", Array.NUMERIC);
};
if (_local4["path_afford"].length > 0){
_local4["path_afford"].sortOn("dmin", Array.NUMERIC);
};
if (_local4["no_path"].length > 0){
_local4["no_path"].sortOn("dmin", Array.NUMERIC);
};
if (_local4["no_path_afford"].length > 0){
_local4["no_path_afford"].sortOn("dmin", Array.NUMERIC);
};
return (_local4);
}
public function ifSyaratCollects(_arg1:String, _arg2:String, _arg3:uint):Boolean{
var _local4:int;
var _local5:int;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:Number;
var _local12:Number;
var _local13:Number;
var _local14:Number;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local15:Boolean;
_local6 = collects.length;
_local7 = tujuanList["Facility"][_arg2];
var _local16:int = (tujuanList["Facility"].length - _arg3);
_local8 = tujuanList["Facility"][_local7].visit;
_local9 = tujuanList["Facility"][_local7].maxVisit;
_local14 = (_local8 / _local9);
_local14 = ((_local14)>_local9) ? _local9 : _local14;
_local10 = main.game.SUM[_arg2];
_local13 = main.game.popularity.Facility;
if (collects.length == 0){
if (_arg3 < 5){
_local15 = true;
} else {
_local12 = ((_local14 + _local16) + _local13);
_local11 = (Math.random() * 100);
_local15 = ((_local11)<=_local12) ? true : false;
};
return (_local15);
//unresolved jump
};
_local5 = (_local6 - 1);
_local17 = (collects[_local5].nama == _arg1);
_local18 = (collects[_local5].jenis == _arg2);
_local4 = co.getIndexOf(collects, "nama", _arg1, true);
_local19 = (_local8 >= _local9);
if (!_local17){
if (_local4 == -1){
if (_local18){
if (tujuanList["Facility"][_local7].visit > 0){
if (_local19){
_local12 = (_local14 + (_local16 * 0.1));
_local12 = (_local12 + ((_arg3)<5) ? (((_local13 * 0.05) + (popularity * 0.05)) + (mood * 0.01)) : ((_local13 * 0.025) + (popularity * 0.025)));
if (_local12 > 30){
_local12 = 30;
};
} else {
_local12 = (_local14 + (_local16 * 0.5));
_local12 = (_local12 + ((_arg3)<5) ? (((_local13 * 0.5) + (popularity * 0.075)) + (mood * 0.015)) : ((_local13 * 0.05) + (popularity * 0.05)));
if (_local12 > 50){
_local12 = 50;
};
};
_local11 = (Math.random() * 100);
_local15 = ((_local11)<=_local12) ? true : false;
} else {
_local15 = true;
};
} else {
if (_arg3 < 5){
_local15 = true;
} else {
_local12 = ((_local14 + _local16) + _local13);
_local11 = (Math.random() * 100);
_local15 = ((_local11)<=_local12) ? true : false;
};
};
} else {
if (collects[_local4].counter > 0){
collects[_local4].counter = (collects[_local4].counter - 1);
if (collects[_local4].counter <= 0){
collects[_local4].counter = 0;
};
} else {
collects[_local4].counter = 0;
};
if (collects[_local4].counter == 0){
if (_local19){
_local12 = _local14;
_local12 = (_local12 + ((_arg3)<5) ? ((_local16 * 0.1) + (((_local13 * 0.01) + (popularity * 0.05)) + (mood * 0.015))) : ((_local16 * 0.05) + ((_local13 * 0.01) + (popularity * 0.025))));
if (_local12 > 15){
_local12 = 15;
};
} else {
_local12 = (_local14 + ((_local16 * 0.5) + (_local13 * 0.01)));
_local12 = (_local12 + ((_arg3)<5) ? ((popularity * 0.05) + (mood * 0.025)) : (popularity * 0.025));
};
_local11 = (Math.random() * 100);
if (_local11 <= _local12){
_local15 = true;
collects[_local4].counter = 180;
} else {
_local15 = false;
collects[_local4].counter = 24;
};
};
};
} else {
if (collects[_local4].counter2 > 0){
collects[_local4].counter2 = (collects[_local4].counter2 - 1);
if (collects[_local4].counter2 <= 0){
collects[_local4].counter2 = 0;
};
} else {
collects[_local4].counter2 = 0;
};
if (collects[_local4].counter2 == 0){
if (_local19){
_local12 = (_local14 + (_local13 * 0.01));
_local12 = (_local12 + ((_arg3)<5) ? (((_local16 * 0.05) + (popularity * 0.025)) + (mood * 0.015)) : ((_local16 * 0.005) + (popularity * 0.01)));
if (_local12 > 10){
_local12 = 10;
};
} else {
_local12 = (_local14 + ((_local16 * 0.5) + (_local13 * 0.01)));
_local12 = (_local12 + ((_arg3)<5) ? ((popularity * 0.05) + (mood * 0.025)) : (popularity * 0.025));
};
_local11 = (Math.random() * 100);
if (_local11 <= _local12){
_local15 = true;
collects[_local4].counter2 = (_local19) ? 240 : 100;
} else {
_local15 = false;
collects[_local4].counter2 = (_local19) ? 120 : 64;
};
};
};
return (_local15);
}
public function outResort():void{
newDestination(parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)]);
}
public function newDestination(_arg1):void{
destination = _arg1;
if ((destination is Outer)){
dest_category = "Outer";
if (!enterResort){
movingOut = true;
};
tr = 0;
} else {
if (destination.jenis == "Lobby"){
dest_category = "Lobby";
if (bookedRoom == null){
tr = 0;
checkIn = true;
antriAtLobbyIn = false;
punyaNomorLobby = false;
destination.checkDataQueue("in", this);
} else {
tr = 3;
checkOut = true;
antriAtLobbyOut = false;
punyaNomorLobby = false;
destination.checkDataQueue("out", this);
};
dilayani = false;
movingOut = false;
} else {
if (destination.akuRoom){
tr = destination.center;
dest_category = destination.jenis;
boostMood("targeted");
} else {
if (destination.minibooth){
tr = findRandom_tr(true);
dest_category = _arg1.jenis;
boostMood("targeted");
} else {
tr = destination.center;
dest_category = _arg1.jenis;
boostMood("targeted");
};
};
};
};
destinationName = destination.name;
temp_point.x = (destination.tpointAr[tr].x + destination.ptile.x);
temp_point.y = (destination.tpointAr[tr].y + destination.ptile.y);
tpoint.x = temp_point.x;
tpoint.y = temp_point.y;
truePos = false;
moving = false;
punyaTujuan = true;
}
private function findRandom_tr(_arg1:Boolean=false):int{
var _local3:uint;
var _local4:uint;
var _local5:Object;
var _local6:Array;
var _local2 = -1;
if (_arg1){
trStandArr = [];
};
if ((((trStandArr == null)) || (sameInt(trStandArr.length)))){
_local6 = [];
_local6 = _local6.concat(destination.tpointAr["around"]);
while (_local6.length > 0) {
randInt = co.randomRangeR(_local6.length);
trStandArr.push(_local6[randInt]);
_local6.splice(randInt, 1);
};
};
_local3 = trStandArr.length;
if (_local3 > 0){
_local4 = 0;
while (_local4 < _local3) {
_local5 = trStandArr[_local4].tile;
if (((_local5.ipath) && (_local5.pathsGo))){
if (_local5.pathsGo[0]){
_local2 = trStandArr[_local4].hub;
break;
};
};
_local4++;
};
};
_local5 = null;
if (_local2 == -1){
_local2 = 1;
};
return (_local2);
}
public function updateCoordinate(_arg1:Boolean=true):void{
if (_arg1){
co.setPosition(this, posisi);
};
}
public function gerakArah():void{
gerak = (moving) ? "walk" : "stand";
if (dirx == 0){
if (diry == 1){
arah1 = "back";
arah2 = "R";
} else {
if (diry == -1){
arah1 = "front";
arah2 = "L";
};
};
};
if (diry == 0){
if (dirx == 1){
arah1 = "back";
arah2 = "L";
} else {
if (dirx == -1){
arah1 = "front";
arah2 = "R";
};
};
};
var _local1:String = ((gerak + "_") + arah1);
if (mclip.currentLabel != _local1){
mclip.gotoAndStop(_local1);
};
mclip.scaleX = ((arah2)=="R") ? 1 : -1;
}
private function checkDepth():void{
parent_.AppliedNewTabs();
}
private function movingFunction_dummy(_arg1:Event):void{
if (!garbage){
if (main.tidakPaused()){
jeda_frame = 0;
while (jeda_frame < main.speed_effect) {
if (((garbage) || ((REC == null)))){
break;
} else {
movingActivities_dummy();
};
jeda_frame++;
};
if (!garbage){
gerakArah();
};
};
};
}
private function activities_dummy(_arg1:Eventku):void{
calculate_tick();
if (garbage){
if (movingOut){
destroy();
};
} else {
if (readyAction){
} else {
this.addEventListener(Event.ENTER_FRAME, movingFunction_dummy, false, 0, true);
readyAction = true;
};
};
}
private function movingActivities_dummy():void{
if (truePos){
if (movingOut){
punyaTujuan = false;
adaDiTujuan = true;
destination = null;
dest_category = "";
destinationName = "";
garbage = true;
removeMovingFunction();
} else {
moving = false;
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos_dummy();
};
} else {
if (ifTujuanStillOnStage()){
if (ifSyaratTujuanOk()){
if (ifAdaJalan()){
};
};
};
};
};
}
private function movingFunction(_arg1:Event):void{
if (!garbage){
if (main.tidakPaused()){
jeda_frame = 0;
while (jeda_frame < main["speed_effect"]) {
if (((garbage) || ((REC == null)))){
break;
} else {
movingActivities();
balon.animation(vtile.x);
};
jeda_frame++;
};
if (!garbage){
gerakArah();
};
};
};
}
private function oshBangun():void{
bubu = false;
bookedRoom.bukaSelimut();
if (istirahat){
} else {
goDoorBooth = true;
};
}
private function oshBubu():void{
bubu = true;
initBubuTimer();
}
private function insideRoomActivity_tick():void{
if (bubu){
bookedRoom.ditidurkan();
if (isJamBangun){
if (main["minuteDay"] >= menitBangun){
oshBangun();
};
};
} else {
if (istirahat){
if (istirahatTimer > 0){
bookedRoom.checkDuduk();
istirahatTimer--;
};
if (istirahatTimer == 0){
istirahat = false;
goDoorBooth = true;
};
} else {
if (goDoorBooth){
if (doorPoint != null){
if (jeda_cariDoorLagi > 0){
jeda_cariDoorLagi--;
} else {
doorPoint = null;
};
};
};
};
};
}
private function calculate_tick():void{
day = main["day"];
hourDay = main["hourDay"];
hourDayInt = (hourDay | 0);
tengahMalam = (((hourDay >= 0)) && ((hourDay < 5)));
if (((tengahMalam) || ((hourDay > jamMalam)))){
sudahMalam = true;
} else {
sudahMalam = false;
};
isJamTidur = (sudahMalam) ? true : ((hourDayInt)>=jamTidur) ? true : false;
isJamBangun = ((jamBangun)==0) ? false : (isJamTidur) ? false : ((hourDay)>5) ? ((hourDayInt)>=jamBangun) ? true : false : false;
if (insideResort){
tickTimer++;
isJamPulang = (tickTimer >= jamPulang);
};
}
private function realtimeJamMalam_Tidur_RoomStay():void{
if (bookedRoom){
if (!checkOut){
if (hourDay > hourOut){
if (dayStay != day){
dayStay = day;
if ((dayStay - dayEnter) >= room_stay){
goCheckOut();
};
};
};
if (isJamTidur){
if (!bubu){
if (dayBubu != day){
if (main.minuteDay >= menitJamTidur){
oshBubu();
} else {
if (tengahMalam){
oshBubu();
};
};
};
};
};
} else {
if (!adaJalan){
boostMood("cariJalan");
};
};
};
}
private function doorBooth_tick():void{
if (doorPoint == null){
truePos = false;
if (jeda_cariDoorLagi > 0){
jeda_cariDoorLagi--;
findingDoorBooth();
} else {
boostMood("cariJalan");
jeda_cariDoorLagi = 3;
};
} else {
if (jeda_cariDoorLagi > 0){
jeda_cariDoorLagi--;
} else {
doorPoint = null;
boostMood("cariJalan");
};
destination.wallOnEnter_tick();
};
}
private function activities(_arg1:Eventku):void{
var _local2:uint;
calculate_tick();
if (garbage){
if (movingOut){
destroy();
};
} else {
if (readyAction){
if (!enterResort){
realtimeJamMalam_Tidur_RoomStay();
if (((antriAtLobbyIn) || (antriAtLobbyOut))){
} else {
if (lobby_checkOut){
} else {
if (antriAtBooth){
boostMood("antriStand");
} else {
if (antriAtBoothStand){
if (activityInBooth){
boothUsed_counter++;
if (((destination.canceled) || ((boothUsed_counter >= destination.used_timer)))){
goDoorBooth = true;
activityInBooth = false;
boothUsed_counter = 0;
};
} else {
if (!goDoorBooth){
boostMood("antriStand");
} else {
if (boothUsed_counter == 0){
doorBooth = true;
antriAtBoothStand = false;
truePos = false;
};
};
};
} else {
if (siapMasukRoom){
} else {
if (activityInBooth){
boothUsed_counter++;
if (((destination.canceled) || ((boothUsed_counter >= destination.used_timer)))){
goDoorBooth = true;
activityInBooth = false;
boothUsed_counter = 0;
};
} else {
if (doorBooth){
doorBooth_tick();
} else {
if (memasuki){
} else {
if (insideRoom){
insideRoomActivity_tick();
} else {
if (insideBooth){
} else {
if (adaDiTujuan){
if (afterActivity){
};
} else {
if (keliling){
if (kelilingTimer > 0){
kelilingTimer--;
boostMood("keliling");
};
chanceBuangSampah();
} else {
if (movingOut){
if (!moving){
if (adaJalan){
} else {
if (jedaCariJalan > 0){
jedaCariJalan--;
};
if (jedaCariJalan == 0){
if (!keliling){
boostMood("cariJalan");
jedaCariJalan = 3;
acceptKeliling(2, 3);
};
};
};
};
} else {
if (punyaTujuan){
if (destination != null){
if (destination.jenis == "Lobby"){
} else {
if (lobby_cek){
if (destination.booked){
if (!moving){
if (truePos){
if (kelilingTimer == 0){
destination.removeTempBooked();
checkTempBookedCount();
destinationGakJadi();
};
} else {
if (!keliling){
acceptKeliling(2, 3);
};
};
};
} else {
if (!moving){
if (adaJalan){
if (truePos){
kelilingTimer = 0;
truePos = false;
if (ifUangCukup()){
} else {
destination.removeTempBooked();
checkTempBookedCount();
destinationGakJadi();
};
};
} else {
if (truePos){
if (kelilingTimer == 0){
destination.removeTempBooked();
checkTempBookedCount();
destinationGakJadi();
};
} else {
if (jedaCariJalan > 0){
jedaCariJalan--;
};
if (jedaCariJalan == 0){
if (!keliling){
boostMood("cariJalan");
acceptKeliling(2, 3);
};
};
};
};
};
};
} else {
if (destination.akuFacility){
if (antrianBelumMax()){
if (!moving){
if (adaJalan){
if (truePos){
kelilingTimer = 0;
truePos = false;
if (ifUangCukup()){
if (!destination.opened){
destinationGakJadi(true);
};
} else {
destinationGakJadi(true);
};
};
} else {
if (truePos){
if (kelilingTimer == 0){
destinationGakJadi(true);
};
} else {
if (jedaCariJalan > 0){
jedaCariJalan--;
};
if (jedaCariJalan == 0){
if (!keliling){
bantuUint = co.randomRange(0, 3);
acceptKeliling(3, (4 + bantuUint));
};
};
};
if (dest_category != "Outer"){
};
};
};
} else {
if (!moving){
if (truePos){
if (kelilingTimer == 0){
destinationGakJadi(true);
};
} else {
if (!keliling){
acceptKeliling(3, 6);
};
};
};
};
};
};
};
} else {
if (!moving){
if (lobby_cek){
var _local3 = main.game;
var _local4 = (room_category + "_booked");
var _local5 = (_local3[_local4] - 1);
_local3[_local4] = _local5;
checkTempBookedCount();
destinationGakJadi();
} else {
if (cariFacility(dest_category, true, false, true)){
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
} else {
if (cariFacility(dest_category, true, true, true)){
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
} else {
if (truePos){
if (kelilingTimer == 0){
destinationGakJadi(true);
};
} else {
if (!keliling){
acceptKeliling(3, 5);
};
};
};
};
};
};
};
chanceBuangSampah();
} else {
if (!moving){
chanceBuangSampah();
if (bubu){
if (!insideRoom){
temp_destination = bookedRoom;
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(bookedRoom);
};
} else {
if (afterActivity){
if (money > 100){
acceptKeliling(3, 7);
} else {
outResort();
};
afterActivity = false;
} else {
if ((((bookedRoom == null)) && (!(canBookedRoom)))){
bantuUint = 0;
_local2 = collects.length;
if (isJamPulang){
if (REF.old){
bantuUint = (sudahMalam) ? 100 : ((money)<100) ? 100 : 95;
} else {
if (tengahMalam){
bantuUint = ((smiley)=="very_angry") ? 100 : ((money)<250) ? 100 : 90;
} else {
if (sudahMalam){
bantuUint = ((smiley)=="very_angry") ? 100 : ((money)<200) ? 100 : 85;
} else {
bantuUint = ((smiley)=="very_angry") ? ((_local2)<5) ? 80 : 75 : 60;
};
};
};
} else {
if (tengahMalam){
if (REF.old){
bantuUint = ((smiley)=="very_angry") ? 90 : ((money)<250) ? 100 : 80;
} else {
bantuUint = ((smiley)=="very_angry") ? ((_local2)<5) ? 80 : 75 : 60;
};
} else {
if (sudahMalam){
if (REF.old){
bantuUint = ((smiley)=="very_angry") ? ((_local2)<2) ? 65 : ((_local2)<5) ? 30 : 15 : 10;
} else {
bantuUint = ((smiley)=="very_angry") ? ((_local2)<2) ? 45 : ((_local2)<5) ? 15 : 15 : 2;
};
} else {
if (_local2 == 0){
if (smiley == "very_angry"){
bantuRand = (REF.old) ? co.randomRangeDec(0.25, 0.65) : co.randomRangeDec(0.45, 0.75);
if (tickTimer > (jamPulang * bantuRand)){
bantuUint = 40;
};
} else {
bantuRand = (REF.old) ? co.randomRangeDec(0.4, 0.7) : co.randomRangeDec(0.5, 0.8);
if (tickTimer > (jamPulang * bantuRand)){
bantuUint = 40;
};
};
} else {
bantuUint = 1;
};
};
};
};
bantuRand = (Math.random() * 100);
if (bantuRand <= bantuUint){
boostMood("ups");
outResort();
} else {
findDestination();
};
} else {
findDestination();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
} else {
this.addEventListener(Event.ENTER_FRAME, movingFunction, false, 0, true);
readyAction = true;
};
};
}
private function findDestination():void{
var _local1:uint;
if (checkOut){
main.PlaySound("blub2");
balon.setBalon("checkOut", 7);
newDestination(parent_.lobby);
} else {
if (bookedRoom != null){
if (jedaBackToRoom > 0){
jedaBackToRoom--;
};
if (jedaBackToRoom == 0){
istirahat = true;
truePos = false;
temp_destination = bookedRoom;
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(bookedRoom);
};
};
if (!punyaTujuan){
if (jedaCariTujuan > 0){
jedaCariTujuan--;
};
if (jedaCariTujuan == 0){
if (lobby_cek){
if (destination == null){
ifMasihInginCariRoom();
if (!movingOut){
if (roomCategoryTersedia_path(room_category)){
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
var _local2 = main.game;
var _local3 = (room_category + "_booked");
var _local4 = (_local2[_local3] + 1);
_local2[_local3] = _local4;
checkTempBookedCount();
};
};
};
} else {
_local1 = tujuanList["Facility"].length;
m = 0;
while (m < _local1) {
prop = tujuanList["Facility"][m].jenis;
if (cariFacility(prop, true, false, true)){
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
break;
};
m++;
};
if (!punyaTujuan){
m = 0;
while (m < _local1) {
prop = tujuanList["Facility"][m].jenis;
if (cariFacility(prop, true, true, true)){
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(temp_destination);
break;
};
m++;
};
};
};
if (!punyaTujuan){
bantuRand = ((money)<5) ? 0 : ((money)<100) ? (Math.random() * 50) : (Math.random() * 100);
if (bookedRoom != null){
if (bantuRand > 25){
acceptKeliling(3, 5);
} else {
jedaBackToRoom = 0;
istirahat = true;
truePos = false;
temp_destination = bookedRoom;
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(bookedRoom);
};
} else {
if (bantuRand > 10){
boostMood("cariTujuan");
acceptKeliling(3, 7);
};
};
};
};
};
};
}
private function chanceBuangSampah():void{
var _local1:Number;
var _local2:Array;
if (insideResort){
if ((((main["hourDay"] < 22)) && (!(tengahMalam)))){
if (hygieneCounter <= 0){
if (!mapTileREF.adaSampah){
if (!(((vtile.x <= 15)) && ((((vtile.y >= 20)) && ((vtile.y <= 23)))))){
bantuRand = (Math.random() * 51);
_local1 = sampah_chance;
_local1 = (_local1 + ((smiley)=="very_upset") ? ((1 - persenMood) * 4) : ((smiley)=="upset") ? ((1 - persenMood) * 2) : ((smiley)=="neutral") ? (1 - persenMood) : ((smiley)=="very_happy") ? 0 : (1 - persenMood));
if (bantuRand <= _local1){
if (persenMood > 50){
mapTileREF.createSampah(1);
} else {
_local2 = serbi.dataOb["Visitor"]["HYGIENE_RANGE"]["sampah"][(REF.hygiene - 1)];
randInt = co.randomRangeR(_local2.length);
mapTileREF.createSampah(_local2[randInt]);
_local2 = null;
};
main.TampilkanNewTips("createJanitorRoom");
};
};
};
setHygieneCounter();
} else {
hygieneCounter = (hygieneCounter - 1);
};
};
};
}
private function setHygieneCounter():void{
hygieneCounter = ((smiley)=="very_upset") ? (hygCounter * 0.5) : ((smiley)=="upset") ? (hygCounter * 0.75) : hygCounter;
}
public function causeOfDestroyBooth():void{
antri_point = null;
memasuki = false;
antriAtBooth = false;
activityInBooth = false;
truePos = false;
boothUsed_counter = 0;
onStand = null;
doorPoint = null;
antriAtBoothStand = false;
doorBooth = false;
goDoorBooth = false;
adaDiTujuan = false;
punyaTujuan = false;
moving = false;
destinationName = "";
destinationGakJadi();
}
private function destinationGakJadi(_arg1:Boolean=false):void{
adaDiTujuan = false;
punyaTujuan = false;
afterActivity = false;
destination = null;
temp_destination = null;
dest_category = "";
destinationName = "";
jedaCariTujuan = 0;
boostMood("cancel_dest");
if (bookedRoom == null){
if (lobby_cek){
ifMasihInginCariRoom();
};
};
}
private function ifMasihInginCariRoom():void{
d_selisih2 = (main.hour - jamCheckIn_lobby);
d_selisih1 = (tengahMalam) ? 2 : (sudahMalam) ? 3 : 5;
if (d_selisih2 > d_selisih1){
boostMood("ups");
outResort();
};
}
private function acceptKeliling(_arg1:uint=1, _arg2:uint=1):void{
keliling = true;
kelilingTimer = co.randomRange(_arg2, _arg1);
jedaCariTujuan = 0;
truePos = false;
boostMood("keliling");
}
public function goCheckOut():void{
if (bookedRoom != null){
checkOut = true;
if (adaDiTujuan){
if (insideRoom){
goDoorBooth = true;
};
};
};
}
private function processing_antriAtLobbyOut():void{
if (goDoorBooth){
if (truePos){
destination.popMyAntrianAtLobby_out();
goDoorBooth = false;
adaDiTujuan = false;
destination = null;
dest_category = "";
destinationName = "";
jedaCariTujuan = 0;
removeLobbyData();
removeBookedRoomData();
outResort();
} else {
goOutLobby();
};
} else {
destination.queueProccessOut(this);
if (lobby_checkOut){
goDoorBooth = true;
truePos = false;
};
};
}
private function processing_antriAtLobbyIn():void{
if (goDoorBooth){
if (truePos){
destination.popMyAntrianAtLobby_in(tr);
goDoorBooth = false;
adaDiTujuan = false;
destination = null;
dest_category = "";
destinationName = "";
jedaCariTujuan = 0;
if (cancelFromLobby){
removeLobbyData();
boostMood("ups");
outResort();
} else {
temp_destination.temp_booked = true;
removeLobbyData();
newDestination(temp_destination);
};
} else {
goOutLobby();
};
} else {
destination.queueProccessIn(this);
if (cancelFromLobby){
var _local1 = main.game;
var _local2 = (room_category + "_booked");
var _local3 = (_local1[_local2] - 1);
_local1[_local2] = _local3;
canBookedRoom = false;
checkTempBookedCount();
temp_destination = null;
jedaCariTujuan = 0;
goDoorBooth = true;
truePos = false;
} else {
if (lobby_cek){
goDoorBooth = true;
truePos = false;
};
};
};
}
private function processing_keliling():void{
if (truePos){
if (kelilingTimer == 0){
if (ptimer < maxTimer){
ptimer = (ptimer + 1);
} else {
checkStandByRandomTag();
if (movingOut){
moving = false;
truePos = false;
} else {
truePos = true;
};
keliling = false;
IfPengenKeRoom();
};
} else {
if (ptimer < maxTimer){
ptimer = (ptimer + 1);
} else {
checkStandByRandomTag();
truePos = false;
};
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos();
};
} else {
getRandomJalan();
};
};
}
private function processing_atLobby():void{
var _local1:int;
var _local2:int;
if (antriAtLobbyOut){
if (punyaNomorLobby){
if (destination.checkDilayani(this)){
adaDiTujuan = true;
};
} else {
destination.addQueue("out", this);
destination.acceptPositionAntri_Out(this);
punyaNomorLobby = true;
_local1 = (destination.tpointAr[tr].x + destination.ptile.x);
_local2 = (destination.tpointAr[tr].y + destination.ptile.y);
tpoint.x = _local1;
tpoint.y = _local2;
checkMoveVars(destination.pathsGo[tr][nama].x, destination.pathsGo[tr][nama].y, true);
truePos = false;
};
} else {
if (antriAtLobbyIn){
if (punyaNomorLobby){
if (destination.checkDilayani(this)){
adaDiTujuan = true;
};
} else {
destination.addQueue("in", this);
destination.acceptPositionAntri_In(this);
_local1 = (destination.tpointAr[tr].x + destination.ptile.x);
_local2 = (destination.tpointAr[tr].y + destination.ptile.y);
tpoint.x = _local1;
tpoint.y = _local2;
if (isSamePoint(vtile, tpoint)){
moving = true;
onTPointLobby();
} else {
checkMoveVars(destination.pathsGo[tr][nama].x, destination.pathsGo[tr][nama].y, true);
};
truePos = false;
};
} else {
if (checkOut){
truePos = false;
};
};
};
}
private function movingActivities():void{
if (doorBooth){
keluarDariBooth();
} else {
if (adaDiTujuan){
doOnTujuan();
} else {
if (keliling){
processing_keliling();
} else {
if (punyaTujuan){
doSaatPunyaTujuan();
};
};
};
};
}
private function keluarDariBooth():void{
if (doorPoint == null){
if (truePos){
truePos = false;
};
} else {
if (truePos){
goDoorBooth = false;
adaDiTujuan = false;
punyaTujuan = false;
keliling = false;
destination.out();
doorBooth = false;
insideRoom = false;
doorPoint = null;
destination = null;
dest_category = "";
destinationName = "";
if (bookedRoom == null){
jedaCariTujuan = 0;
afterActivity = true;
acceptKeliling(3, 5);
} else {
jedaCariTujuan = 1;
acceptKeliling(3, 5);
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePosDoor();
};
} else {
if (jeda_cariDoorLagi > 0){
if (ifAdaJalan()){
};
};
};
};
};
}
private function doOnTujuan():void{
if (id == 142){
trace("______adaDiTujuan (?)", name, adaDiTujuan, "goDoorBooth(?)", goDoorBooth, "act(?)", activityInBooth);
};
if (insideRoom){
if (goDoorBooth){
if (this.visible){
destination.wallOnEnter_tick();
doorBooth = true;
truePos = false;
} else {
destination.cekGoOutside();
};
};
} else {
if (antriAtLobbyOut){
processing_antriAtLobbyOut();
} else {
if (antriAtLobbyIn){
processing_antriAtLobbyIn();
} else {
if (antriAtBoothStand){
} else {
if (goDoorBooth){
if (this.visible){
destination.wallOnEnter_tick();
doorBooth = true;
truePos = false;
} else {
destination.cekGoOutside();
};
};
};
};
};
};
}
private function doSaatPunyaTujuan():void{
if (id == 142){
trace("...punyaTujuan", destination, dest_category, truePos);
};
if (truePos){
if (dest_category == "Lobby"){
processing_atLobby();
} else {
if (enterResort){
enterResort = false;
punyaTujuan = false;
destination = null;
dest_category = "";
destinationName = "";
adaDiTujuan = false;
jedaCariTujuan = co.randomRange(8, 12);
} else {
if (siapMasukRoom){
if (bookedRoom == null){
destination.temp_booked = false;
if (!destination.booked){
destination.entering0(this);
truePos = true;
siapMasukRoom = false;
};
} else {
destination.entering0(this);
truePos = true;
siapMasukRoom = false;
};
} else {
if (antriAtBooth){
if (sameInt(jeda_frame, (main.speed_effect - 1))){
if (ifCanEnteringBooth()){
destination.entering0(this);
truePos = true;
antriAtBooth = false;
};
};
} else {
if (antriAtBoothStand){
if (memasuki){
destination.entering();
adaDiTujuan = true;
} else {
if (ifCanEnteringBooth()){
destination.entering0(this);
truePos = true;
};
};
} else {
if (memasuki){
if (isSamePoint(vtile, tpoint)){
destination.entering();
adaDiTujuan = true;
} else {
truePos = false;
moving = false;
};
} else {
if (movingOut){
punyaTujuan = false;
adaDiTujuan = true;
destination = null;
dest_category = "";
destinationName = "";
garbage = true;
removeMovingFunction();
} else {
moving = false;
};
};
};
};
};
};
};
} else {
if (antriAtBoothStand){
movingSmall();
} else {
if (punyaNomorLobby){
if (onTRLobby){
movingSmallLobby();
} else {
movingToTR();
};
} else {
if (moving){
if (ifOnNextTile()){
checkIfOnTruePos();
};
} else {
if (ifTujuanStillOnStage()){
if (ifSyaratTujuanOk()){
if (ifAdaJalan()){
} else {
if (!moving){
cariJalanTerdekat();
};
};
} else {
acceptKeliling(2, 3);
};
};
};
};
};
};
}
private function IfPengenKeRoom():void{
if (((bubu) || (istirahat))){
if (!insideRoom){
temp_destination = bookedRoom;
main.PlaySound("blub2");
balon.setBalon(temp_destination.jenis, 7);
newDestination(bookedRoom);
};
};
}
public function onTPointLobby():void{
gtpoint.x = tpoint.x;
gtpoint.y = tpoint.y;
var _local1:* = mapTilesDATA[((("tile_" + gtpoint.x) + "_") + gtpoint.y)];
gopoint.x = _local1["centerPoint"].x;
gopoint.y = _local1["centerPoint"].y;
_local1 = null;
}
public function changePosisiAntrian():void{
truePos = false;
if (checkIn){
dir(1, 0);
} else {
dir(0, 1);
};
gtpoint.x = (vtile.x + dirx);
gtpoint.y = (vtile.y + diry);
var _local1:* = mapTilesDATA[((("tile_" + gtpoint.x) + "_") + gtpoint.y)];
gopoint.x = _local1["centerPoint"].x;
gopoint.y = _local1["centerPoint"].y;
_local1 = null;
angle = co.angleF(antri_point.x, antri_point.y, posisi.x, posisi.y);
angleX = co.angleFx(angle);
angleY = co.angleFy(angle);
speedX = (angleX * speed);
speedY = (angleY * speed);
moving = true;
}
private function removeLobbyData():void{
antriAtLobbyIn = false;
punyaNomorLobby = false;
onTRLobby = false;
punyaNomorAntrian = false;
antriAtLobbyOut = false;
antri_point = null;
checkIn = false;
checkOut = false;
}
private function removeBookedRoomData():void{
bookedRoom.removeBookingData();
bookedRoom = null;
istirahat = false;
bubu = false;
memasuki = false;
}
public function goOutLobby():void{
var _local1:Point;
var _local2:Number;
var _local3:Number;
if (moving){
_local1 = new Point((posisi.x + speedX), (posisi.y + speedY));
_local2 = co.distPos(_local1.x, _local1.y, gopoint.x, gopoint.y);
_local3 = co.distPos(posisi.x, posisi.y, gopoint.x, gopoint.y);
if ((((_local2 <= 2)) || ((_local3 <= 2)))){
posisi.x = gopoint.x;
posisi.y = gopoint.y;
updateCoordinate();
find_vtile();
moving = false;
if (checkIn){
if (isSamePoint(vtile, destination.door_in)){
truePos = true;
} else {
truePos = false;
};
} else {
if (checkOut){
if (isSamePoint(vtile, destination.door_out)){
truePos = true;
} else {
truePos = false;
};
} else {
truePos = false;
};
};
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
moving = true;
};
} else {
if (checkIn){
dir(0, -1);
} else {
dir(-1, 0);
};
setMoveVariables();
};
}
private function isSamePoint(_arg1:Point, _arg2:Point):Boolean{
if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){
return (true);
};
return (false);
}
public function movingToTR():void{
var _local1:Number;
var _local2:Number;
if (moving){
if (isSamePoint(vtile, gtpoint)){
_local1 = co.distPos((posisi.x + speedX), (posisi.y + speedY), gopoint.x, gopoint.y);
_local2 = co.distPos(posisi.x, posisi.y, gopoint.x, gopoint.y);
if ((((_local1 <= 5)) || ((_local2 <= 5)))){
posisi.x = gopoint.x;
posisi.y = gopoint.y;
updateCoordinate();
find_vtile();
moving = false;
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
moving = true;
};
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
if (isSamePoint(vtile, tpoint)){
moving = true;
onTPointLobby();
} else {
checkMoveVars(destination.pathsGo[tr][nama].x, destination.pathsGo[tr][nama].y, true);
};
moving = true;
};
} else {
if (checkIn){
dir(1, 0);
} else {
dir(0, 1);
};
gtpoint.x = (vtile.x + dirx);
gtpoint.y = (vtile.y + diry);
angle = co.angleF(antri_point.x, antri_point.y, posisi.x, posisi.y);
angleX = co.angleFx(angle);
angleY = co.angleFy(angle);
speedX = (angleX * speed);
speedY = (angleY * speed);
onTRLobby = true;
moving = true;
};
}
public function movingAgainToLobby():void{
lobbyAgain = true;
onTRLobby = false;
truePos = false;
var _local1:Point = destination.tpointAr[tr];
var _local2:Point = destination.ptile;
tpoint.x = (_local1.x + _local2.x);
tpoint.y = (_local1.y + _local2.y);
_local1 = destination.pathsGo[tr][nama];
checkMoveVars(_local1.x, _local1.y, true);
moving = false;
_local1 = null;
_local2 = null;
}
public function movingSmallLobby():void{
if (moving){
if (hitungJarakToPlace(antri_point) <= 5){
posisi.x = antri_point.x;
posisi.y = antri_point.y;
updateCoordinate();
moving = false;
truePos = true;
find_vtile(false);
if (checkOut){
if (nomorAntrianLobby <= 2){
bound1 = destination.bound1;
bound2 = destination.bound2;
updateDepth((-(diry) * 0.15), (-(diry) * 0.15), true);
ydepth = vtile.y;
destination.wallOnEnter_tick();
} else {
updateDepth((-(diry) * 0.15), (-(diry) * 0.15));
};
} else {
updateDepth((-(diry) * 0.15), (-(diry) * 0.15));
};
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
};
};
}
public function movingSmall():void{
var _local1:Point;
if (onStand_p == 1){
posisi.x = onStand.x;
posisi.y = onStand.y;
moving = false;
truePos = true;
updateDepth();
} else {
if (moving){
if (hitungJarakToPlace(onStand) <= 20){
posisi.x = onStand.x;
posisi.y = onStand.y;
updateCoordinate();
moving = false;
truePos = true;
updateDepth((-(diry) * 0.15), (-(diry) * 0.15));
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
};
} else {
gtpoint.x = (vtile.x + dirx);
gtpoint.y = (vtile.y + diry);
_local1 = destination.tpointAr["antri_angle"][((vtile.x + "_") + vtile.y)];
angleX = _local1.x;
angleY = _local1.y;
speedX = (angleX * 0.25);
speedY = (angleY * 0.25);
moving = true;
};
};
}
public function hitungJarakToPlace(_arg1:Point):Number{
return (co.distPos((posisi.x + speedX), (posisi.y + speedY), _arg1.x, _arg1.y));
}
private function findingDoorBooth():void{
var _local1:int;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:String;
var _local6:* = null;
var _local7:Boolean;
if (bookedRoom == null){
_local6 = parent_.lobby;
} else {
if (myob == bookedRoom){
_local6 = parent_.lobby;
} else {
_local6 = bookedRoom;
};
};
var _local8:Array = destination.outPoint;
_local4 = _local8.length;
var _local9:Array = destination.pathsInside["paths"];
_local1 = -1;
if (destination.minibooth){
_local3 = 0;
while (_local3 < _local4) {
_local5 = ((_local8[_local3].x + "_") + _local8[_local3].y);
if (destination.tpointAr["antri_tr"][("tr_" + onStand_tr)] == _local5){
chosen = _local3;
adaJalan = true;
break;
};
_local3++;
};
if (adaJalan){
doorPoint = new Point(_local8[chosen].x, _local8[chosen].y);
if (onStand_p == 0){
moving = true;
} else {
moving = false;
truePos = true;
};
};
} else {
_local3 = 0;
while (_local3 < _local4) {
_local5 = ((_local8[_local3].x + "_") + _local8[_local3].y);
if (_local9[_local3][_local5]){
if (_local6.pathsGo[_local6.center][_local5]){
temp_point.x = _local8[_local3].x;
temp_point.y = _local8[_local3].y;
_local2 = (Math.abs((vtile.x - temp_point.x)) + Math.abs((vtile.y - temp_point.y)));
if ((((_local1 == -1)) || ((_local2 < _local1)))){
_local1 = _local2;
chosen = _local3;
};
_local7 = true;
};
};
_local3++;
};
if (_local7){
doorPoint = new Point(_local8[chosen].x, _local8[chosen].y);
_local5 = ((doorPoint.x + "_") + doorPoint.y);
jeda_cariDoorLagi = 3;
} else {
_local1 = -1;
_local3 = 0;
while (_local3 < _local4) {
_local5 = ((_local8[_local3].x + "_") + _local8[_local3].y);
if (_local9[_local3][_local5]){
if (_local9[_local3][nama]){
temp_point.x = _local8[_local3].x;
temp_point.y = _local8[_local3].y;
_local2 = (Math.abs((vtile.x - temp_point.x)) + Math.abs((vtile.y - temp_point.y)));
if ((((_local1 == -1)) || ((_local2 < _local1)))){
_local1 = _local2;
chosen = _local3;
};
_local7 = true;
};
};
if (_local7){
doorPoint = new Point(_local8[chosen].x, _local8[chosen].y);
_local5 = ((doorPoint.x + "_") + doorPoint.y);
jeda_cariDoorLagi = 3;
};
_local3++;
};
};
};
_local9 = null;
_local8 = null;
}
private function getRandomJalan():void{
if (randomTag == null){
if (((!(moving)) && (((keliling) && ((kelilingTimer == 0)))))){
truePos = true;
if (adaJalan){
boostMood("keliling");
} else {
boostMood("cariJalan");
};
} else {
calculateRandomTag();
};
} else {
if (randomTag.pathsGo[0][nama]){
moving = true;
} else {
randomTile = null;
randomTag = null;
moving = false;
};
};
}
private function calculateRandomTag(){
if (tiles_bag["keep"].length == 0){
findAndKeepTileBag();
};
if (tiles_bag["keep"].length > 0){
if ((((tiles_bag["keep"][0] == null)) || ((((tiles_bag["keep"][0].pathsGo == null)) || ((tiles_bag["keep"][0].pathsGo[0][nama] == null)))))){
tiles_bag["keep"].splice(0, 1);
if (tiles_bag["keep"].length == 0){
findAndKeepTileBag();
};
calculateRandomTag();
} else {
ptimer = 0;
maxTimer = 50;
if (main["total_visitorInside"] < 15){
maxTimer = (maxTimer + co.randomRangeR(100));
} else {
if (main["total_visitorInside"] < 30){
maxTimer = (maxTimer + (5 + co.randomRangeR(100)));
} else {
if (main["total_visitorInside"] < 50){
maxTimer = (maxTimer + (10 + co.randomRangeR(100)));
} else {
if (main["total_visitorInside"] < 70){
maxTimer = (maxTimer + (15 + co.randomRangeR(100)));
} else {
maxTimer = (maxTimer + (20 + co.randomRangeR(100)));
};
};
};
};
randomTag = tiles_bag["keep"][0];
randomTile = randomTag.ptile;
dir(randomTag["pathsGo"][0][nama].x, randomTag["pathsGo"][0][nama].y);
setMoveVariables();
};
};
}
private function checkStandByRandomTag():void{
ptimer = 0;
maxTimer = 0;
var _local1:Array = tiles_bag["keep"];
cariIdx = _local1.indexOf(randomTag);
if (cariIdx != -1){
_local1.splice(cariIdx, 1);
};
randomTile = null;
randomTag = null;
_local1 = null;
}
public function findAndKeepTileBag():void{
var _local3:uint;
var _local1:Array = parent_.tilesPath;
var _local2:uint = _local1.length;
if (tiles_bag["used"].length == _local2){
tiles_bag["used"] = [];
};
var _local4:Array = tiles_bag["used"];
var _local5:Array = [];
var _local6:Array = [];
var _local7:* = null;
_local3 = 0;
while (_local3 < _local2) {
_local7 = _local1[_local3];
if (adaTilePath(_local7)){
if (_local4.indexOf(_local7) == -1){
_local5.push(_local7);
} else {
_local6.push(_local7);
};
};
_local3++;
};
var _local8:uint = _local5.length;
var _local9:uint = ((_local8)<4) ? _local8 : 4;
if (_local9 > 0){
_local3 = 0;
while (_local3 < _local9) {
randInt = co.randomRangeR(_local8);
tiles_bag["keep"].push(_local5[randInt]);
_local5.splice(randInt, 1);
_local8 = _local5.length;
_local3++;
};
} else {
_local8 = _local6.length;
_local9 = ((_local8)<4) ? _local8 : 4;
_local3 = 0;
while (_local3 < _local9) {
randInt = co.randomRangeR(_local8);
tiles_bag["keep"].push(_local6[randInt]);
_local6.splice(randInt, 1);
_local8 = _local6.length;
_local3++;
};
};
_local1 = null;
_local4 = null;
_local6 = null;
_local5 = null;
}
public function adaTilePath(_arg1):Boolean{
var _local2:Boolean;
var _local3:uint;
if ((_arg1 is Booth)){
_local3 = _arg1.center;
};
if (_arg1.pathsGo[_local3][nama]){
_local2 = true;
};
return (_local2);
}
private function ifTujuanStillOnStage():Boolean{
var _local1:Boolean;
if (enterResort){
_local1 = true;
} else {
if (destination != null){
if (isDestinationOnList()){
_local1 = true;
};
};
};
return (_local1);
}
private function ifSyaratTujuanOk():Boolean{
var _local1:Boolean;
if (enterResort){
_local1 = true;
} else {
if (dest_category == "Outer"){
_local1 = true;
return (_local1);
};
if (dest_category == "Lobby"){
if (bookedRoom == null){
if (canBookedRoom){
if (destination.checkQueue_in(this)){
if (roomCategoryAda(room_category)){
_local1 = true;
return (_local1);
};
};
};
} else {
if (destination.checkQueue_out(this)){
_local1 = true;
return (_local1);
};
};
} else {
if (destination != null){
if (isDestinationOnList()){
if (destination.akuRoom){
if (siapMasukRoom){
} else {
if (memasuki){
_local1 = true;
return (_local1);
};
if ((((destination.customer == null)) || ((destination.customer == this)))){
if (destination.outPoint["MAP"][nama]){
_local1 = false;
return (_local1);
};
_local1 = true;
return (_local1);
};
};
} else {
if (antriAtBooth){
} else {
if (memasuki){
_local1 = true;
return (_local1);
};
if (antrianBelumMax()){
if (destination.outPoint["MAP"][nama]){
_local1 = false;
return (_local1);
};
_local1 = true;
return (_local1);
};
};
};
};
};
};
};
return (_local1);
}
private function ifAdaJalan():Boolean{
var _local2:int;
var _local3:int;
var _local4:Point;
var _local1:Boolean;
if (enterResort){
if (((sameInt(vtile.x, 8)) && (sameInt(vtile.y, 22)))){
adaJalan = checkMoveVars(0, -1);
_local1 = adaJalan;
return (_local1);
};
if ((((vtile.y >= 20)) && ((vtile.y <= 22)))){
if (vtile.x < enterResortX){
adaJalan = checkMoveVars(1, 0);
_local1 = adaJalan;
return (_local1);
};
} else {
_local4 = destination.pathsGo[tr][nama];
adaJalan = checkMoveVars(_local4.x, _local4.y);
_local1 = adaJalan;
return (_local1);
};
} else {
if (dest_category == "Outer"){
if (lobby_checkOut){
if (isSamePoint(vtile, parent_.lobby.door_out)){
adaJalan = checkMoveVars(0, -1);
_local1 = adaJalan;
return (_local1);
};
_local4 = destination.pathsGo[tr][nama];
adaJalan = checkMoveVars(_local4.x, _local4.y);
_local1 = adaJalan;
return (_local1);
} else {
_local4 = destination.pathsGo[tr][nama];
if (_local4 != null){
adaJalan = checkMoveVars(_local4.x, _local4.y);
_local1 = adaJalan;
return (_local1);
};
};
} else {
if (doorBooth){
if (doorPoint != null){
if (destination.minibooth){
_local4.x = (doorPoint.x - destination.ptile.x);
_local4.y = (doorPoint.y - destination.ptile.y);
adaJalan = checkMoveVars(_local4.x, _local4.y, false, true);
_local1 = adaJalan;
return (_local1);
};
_local4 = destination.pathsInside["go"][chosen][nama];
adaJalan = checkMoveVars(_local4.x, _local4.y, false, true);
_local1 = adaJalan;
return (_local1);
};
} else {
if (dest_category == "Lobby"){
if (destination.pathsGo[tr] != null){
_local4 = destination.pathsGo[tr][nama];
if (_local4 != null){
if (((antriAtLobbyIn) || (antriAtLobbyOut))){
} else {
adaJalan = checkMoveVars(_local4.x, _local4.y, true);
_local1 = adaJalan;
return (_local1);
};
};
};
} else {
if (destination.akuRoom){
if ((((vtile.x == 11)) && ((vtile.y == 22)))){
adaJalan = checkMoveVars(0, -1, true);
_local1 = adaJalan;
return (_local1);
};
_local4 = destination.pathsGo[tr][nama];
if (_local4 != null){
if (siapMasukRoom){
} else {
if (memasuki){
if (isSamePoint(vtile, tpoint)){
truePos = true;
} else {
adaJalan = checkMoveVars(_local4.x, _local4.y, true);
_local1 = adaJalan;
return (_local1);
};
} else {
adaJalan = checkMoveVars(_local4.x, _local4.y, true);
_local1 = adaJalan;
return (_local1);
};
};
};
} else {
if (destination.pathsGo[tr] != null){
_local4 = destination.pathsGo[tr][nama];
if (_local4 != null){
if (antriAtBooth){
} else {
if (memasuki){
if (isSamePoint(vtile, tpoint)){
truePos = true;
} else {
adaJalan = checkMoveVars(_local4.x, _local4.y, true);
_local1 = adaJalan;
return (_local1);
};
} else {
adaJalan = checkMoveVars(_local4.x, _local4.y, true);
_local1 = adaJalan;
return (_local1);
};
};
};
};
};
};
};
};
};
_local4 = null;
adaJalan = _local1;
return (_local1);
}
private function cariJalanTerdekat():void{
var _local2:Object;
var _local1:Boolean;
if (dest_category == "Outer"){
if (enterResort){
} else {
if (jedaCariJalan == 0){
jedaCariJalan = 3;
balon.setBalon(dest_category, 7);
};
_local1 = false;
moving = _local1;
};
} else {
if (insideResort){
if ((((vtile.x < tpoint.x)) && (parentMapWalkable[(vtile.x + 1)][vtile.y]))){
_local1 = checkMoveVars(1, 0);
} else {
if ((((vtile.x > tpoint.x)) && (parentMapWalkable[(vtile.x - 1)][vtile.y]))){
_local1 = checkMoveVars(-1, 0);
} else {
if ((((vtile.y < tpoint.y)) && (parentMapWalkable[vtile.x][(vtile.y + 1)]))){
_local1 = checkMoveVars(0, 1);
} else {
if ((((vtile.y > tpoint.y)) && (parentMapWalkable[vtile.x][(vtile.y - 1)]))){
_local1 = checkMoveVars(0, -1);
} else {
if (jedaCariJalan == 0){
jedaCariJalan = 3;
};
moving = false;
_local1 = false;
};
};
};
};
} else {
if (enterResortX == 0){
enterResortX = 14;
};
if ((((vtile.x == 8)) && ((vtile.y == 22)))){
_local1 = checkMoveVars(0, -1);
} else {
if ((((vtile.y >= 20)) && ((vtile.y <= 22)))){
if (vtile.x < enterResortX){
_local1 = checkMoveVars(1, 0);
};
} else {
_local2 = parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)];
_local1 = checkMoveVars(_local2.pathsGo[0][nama].x, _local2.pathsGo[0][nama].y);
_local2 = null;
};
};
};
};
}
private function checkMoveVars(_arg1:int, _arg2:int, _arg3:Boolean=false, _arg4:Boolean=false):Boolean{
var _local5:Boolean;
var _local6:Point;
_local5 = false;
_local6 = new Point((vtile.x + _arg1), (vtile.y + _arg2));
if (_arg4){
if (destination["map"][_local6.x][_local6.y]){
dir(_arg1, _arg2);
setMoveVariables();
_local5 = true;
};
} else {
if (_arg3){
if (isSamePoint(vtile, tpoint)){
moving = true;
} else {
if (destination["map"][_local6.x][_local6.y]){
dir(_arg1, _arg2);
setMoveVariables();
_local5 = true;
};
};
} else {
if (parentMapWalkable[_local6.x][_local6.y]){
dir(_arg1, _arg2);
setMoveVariables();
_local5 = true;
};
};
};
return (_local5);
}
private function setMoveVariables(_arg1:Boolean=false):void{
var _local2:*;
if (_arg1){
gtpoint.x = vtile.x;
gtpoint.y = vtile.y;
} else {
gtpoint.x = (vtile.x + dirx);
gtpoint.y = (vtile.y + diry);
};
_local2 = mapTilesDATA[((("tile_" + gtpoint.x) + "_") + gtpoint.y)];
gopoint.x = _local2["centerPoint"].x;
gopoint.y = _local2["centerPoint"].y;
_local2 = null;
angle = co.angleF(gopoint.x, gopoint.y, posisi.x, posisi.y);
angleX = co.angleFx(angle);
angleY = co.angleFy(angle);
speedX = (angleX * speed);
speedY = (angleY * speed);
moving = true;
}
private function checkIfOnTruePosDoor():void{
if (isSamePoint(vtile, doorPoint)){
truePos = true;
} else {
truePos = false;
};
}
private function ifOnNextTile():Boolean{
var _local1:Boolean;
var _local2:Point;
var _local3:Point;
var _local4:Number;
var _local5:Number;
_local1 = false;
if (ifJalanBelumDihapus()){
_local2 = new Point((posisi.x + speedX), (posisi.y + speedY));
_local4 = co.distPos(_local2.x, _local2.y, gopoint.x, gopoint.y);
_local5 = co.distPos(posisi.x, posisi.y, gopoint.x, gopoint.y);
if (((!(keliling)) && ((destination is Booth)))){
if (antriAtBooth){
} else {
if ((((_local4 <= 2)) || ((_local5 <= 2)))){
posisi.x = gopoint.x;
posisi.y = gopoint.y;
updateCoordinate();
find_vtile();
moving = false;
_local1 = true;
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
moving = true;
};
};
} else {
if ((((_local4 <= 2)) || ((_local5 <= 2)))){
posisi.x = gopoint.x;
posisi.y = gopoint.y;
updateCoordinate();
find_vtile();
moving = false;
_local1 = true;
} else {
posisi.x = (posisi.x + speedX);
posisi.y = (posisi.y + speedY);
updateCoordinate();
find_vtile();
};
};
} else {
moving = false;
_local1 = moving;
};
return (_local1);
}
private function ifJalanBelumDihapus():Boolean{
var _local1:Boolean;
_local1 = false;
if (doorBooth){
if (doorPoint != null){
if (parentMapWalkable[doorPoint.x][doorPoint.y]){
_local1 = true;
};
};
} else {
if (destination != null){
if (isDestinationOnList()){
if (memasuki){
_local1 = true;
} else {
if (destination["map"][gtpoint.x][gtpoint.y]){
_local1 = true;
};
};
};
} else {
if (parentMapWalkable[gtpoint.x][gtpoint.y]){
_local1 = true;
} else {
_local1 = false;
};
};
};
return (_local1);
}
private function checkIfOnTruePos():void{
var _local1:Point;
if (enterResort){
if ((((vtile.y >= 20)) && ((vtile.y <= 21)))){
if (vtile.x == enterResortX){
truePos = true;
};
} else {
truePos = false;
};
} else {
if (keliling){
if (randomTile == null){
randomTile = null;
randomTag = null;
calculateRandomTag();
} else {
if (isSamePoint(vtile, randomTile)){
truePos = true;
} else {
if ((((randomTag.pathsGo == null)) || ((randomTag.pathsGo[0][nama] == null)))){
randomTile = null;
randomTag = null;
calculateRandomTag();
} else {
_local1 = randomTag.pathsGo[0][nama];
dir(_local1.x, _local1.y);
setMoveVariables();
};
};
};
} else {
if (movingOut){
if (isSamePoint(vtile, outer_point)){
_local1 = serbi.outerArrayI("people", io, gameExpand);
if (outer_point.y == _local1.y){
truePos = true;
} else {
outer_point = new Point(_local1.x, _local1.y);
newDestination(parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)]);
truePos = false;
};
} else {
truePos = false;
};
} else {
if (dest_category == "Outer"){
} else {
if (destination != null){
if (isDestinationOnList()){
if (!afterActivity){
if (siapMasukRoom){
truePos = true;
} else {
if (memasuki){
if (isSamePoint(vtile, tpoint)){
truePos = true;
} else {
truePos = false;
};
} else {
if (antriAtBooth){
truePos = true;
} else {
if (antriAtBoothStand){
} else {
if (((antriAtLobbyIn) || (antriAtLobbyOut))){
} else {
if (dest_category == "Lobby"){
if (isSamePoint(vtile, tpoint)){
if (ifBoothIsOpened()){
if (checkIn){
if (destination.checkQueue_in(this)){
if (roomCategoryAda(room_category)){
truePos = true;
antriAtLobbyIn = true;
moving = false;
};
};
} else {
if (checkOut){
if (destination.checkQueue_out(this)){
truePos = true;
antriAtLobbyOut = true;
moving = false;
} else {
truePos = false;
};
};
};
};
};
} else {
if (destination == null){
truePos = false;
} else {
if (destination.minibooth){
if (isSamePoint(vtile, tpoint)){
if (ifBoothIsOpened()){
if (antrianBelumMax()){
if (ifUangCukup()){
destination.pushAntrian(this);
if (!destination.tpointAr["antri"][nama][0]){
insertAntrianAtStandBooth(0, vtile);
} else {
insertAntrianAtStandBooth(1, vtile);
};
antriAtBoothStand = true;
truePos = false;
};
} else {
gaJadiAntriBooth();
};
} else {
if (ifTerlanjurMasuk()){
} else {
leavingAntriBooth();
};
};
};
} else {
if (destination.akuRoom){
if (destination.outPoint["MAP"][((vtile.x + "_") + vtile.y)]){
cost = destination.booked_price;
truePos = true;
siapMasukRoom = true;
} else {
truePos = false;
};
} else {
if (destination.outPoint["MAP"][((vtile.x + "_") + vtile.y)]){
if (ifBoothIsOpened()){
if (ifUangCukup()){
if (antrianBelumMax()){
destination.pushAntrian(this);
antriAtBooth = true;
truePos = true;
};
} else {
gaJadiAntriBooth();
};
} else {
if (ifTerlanjurMasuk()){
} else {
leavingAntriBooth();
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
_local1 = null;
}
private function checkIfOnTruePos_dummy():void{
var _local1:Point;
if (movingOut){
if (isSamePoint(vtile, outer_point)){
_local1 = serbi.outerArrayI("people", io, gameExpand);
if (outer_point.y == _local1.y){
truePos = true;
} else {
outer_point = new Point(_local1.x, _local1.y);
newDestination(parent_.outers[((("outer_" + outer_point.x) + "_") + outer_point.y)]);
truePos = false;
};
} else {
truePos = false;
};
_local1 = null;
} else {
if (dest_category == "Outer"){
};
};
}
private function isDestinationOnList():Boolean{
if (parent_.destinationList[destinationName]){
return (true);
};
destination = null;
destinationName = "";
return (false);
}
private function insertAntrianAtStandBooth(_arg1:uint, _arg2:Point):void{
var _local3:String;
var _local4:Point;
if (_arg1 == 0){
_local3 = ((_arg2.x + "_") + _arg2.y);
onStand_tr = destination.tpointAr["antri_tr"][_local3];
onStand_p = 0;
_local4 = destination.tpointAr["antri_point"][_local3];
onStand = new Point(_local4.x, _local4.y);
destination.tpointAr["antri"][_local3][0] = true;
} else {
if (_arg1 == 1){
_local3 = ((_arg2.x + "_") + _arg2.y);
onStand_tr = destination.tpointAr["antri_tr"][_local3];
onStand_p = 1;
_local4 = destination.tpointAr["antri_point"][_local3];
onStand = new Point(_local4.x, _local4.y);
destination.tpointAr["antri"][_local3][1] = true;
};
};
_local4 = destination.ptile;
dir((_local4.x - vtile.x), (_local4.y - vtile.y));
}
private function ifTerlanjurMasuk():Boolean{
return (false);
}
private function ifBoothIsOpened():Boolean{
return (destination.opened);
}
private function ifUangCukup():Boolean{
if (destination.booked_price <= money){
return (true);
};
return (false);
}
private function antrianBelumMax():Boolean{
if (destination.visitor_antri.length < destination.max_antri){
return (true);
};
return (false);
}
private function ifAntriDepanBooth():Boolean{
if (destination.booked){
return (true);
};
return (false);
}
private function ifCanEnteringBooth():Boolean{
if (isDestinationOnList()){
if (destination.booked){
return (false);
};
if (destination.booked_price > money){
causeOfDestroyBooth();
leavingAntriBooth(false);
return (false);
};
if (destination.jeda_booked > 0){
destination.jeda_booked--;
return (false);
};
if (destination.minibooth){
destination.jeda_booked = 3;
} else {
destination.jeda_booked = 5;
};
return (true);
//unresolved jump
};
causeOfDestroyBooth();
return (false);
}
private function gaJadiAntriBooth():void{
var _local1:String;
main.PlaySound("blub2");
balon.setBalon("cant", 1, false, true);
_local1 = destination.name;
bantuUint = tujuanList["BlackList"].indexOf(_local1);
if (bantuUint == -1){
tujuanList["BlackList"].push(_local1);
};
acceptKeliling(2, 3);
}
private function leavingAntriBooth(_arg1:Boolean=true):void{
main.PlaySound("blub2");
if (_arg1){
balon.setBalon("leaving", 1, false, true);
} else {
balon.setBalon("cant", 1, false, true);
};
acceptKeliling(2, 3);
}
public function boostMood(_arg1:String, _arg2:Number=0, _arg3:String=""):void{
var _local5:Number;
var _local4:* = null;
if (_arg1 == "served"){
changeMood(_arg2);
} else {
if (_arg1 == "targeted"){
changeMood((serbi.dataOb.Booth.boostMood.targeted * mood));
} else {
if (_arg1 == "lobby_canceled"){
if (cantAfford){
changeMood(0, true);
balon.setBalon("cant", 1, false, true);
main.PlaySound("blub2");
} else {
changeMood((-0.25 * mood), true);
balon.setBalon(smiley, 0, false, true);
main.PlaySound("blub2");
};
} else {
if (_arg1 == "none"){
} else {
if (_arg1 == "cariJalan"){
changeMood(-0.02);
} else {
if (_arg1 == "cariTujuan"){
changeMood(-0.01);
} else {
if (_arg1 == "keliling"){
if (punyaTujuan){
changeMood(-5E-6);
} else {
changeMood(-2.5E-6);
};
} else {
if (_arg1 == "cancel_dest"){
changeMood(-0.04);
} else {
if (_arg1 == "sampah"){
changeMood(_arg2);
} else {
if (_arg1 == "antriStand"){
_local5 = co.randomRangeDec(0.005, 0.007);
changeMood(-(_local5));
} else {
if (_arg1 == "ups"){
_local5 = co.randomRangeDec(0.005, 0.007);
changeMood(-(_local5));
} else {
changeMood(_arg2);
};
};
};
};
};
};
};
};
};
};
};
}
public function changeMood(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
if (_arg2){
bantuRand = (Math.random() * 100);
if (bantuRand <= 15){
_local3 = (0.3 * maxMood);
} else {
if (bantuRand <= 60){
_local3 = (0.5 * maxMood);
} else {
_local3 = (0.6 * maxMood);
};
};
mood = ((_local3)>mood) ? mood : _local3;
} else {
mood = (mood + _arg1);
};
moodChanging();
}
public function moodChanging():void{
var _local1:String;
_local1 = smiley;
smiley = serbi.checkMood(persenMood);
if (smiley != _local1){
if (insideResort){
if (persenMood > 65){
main.CheckAchievements_spc("mood_visitor");
};
};
};
}
public function removingAll(_arg1:Eventku=null, _arg2:Boolean=true):void{
if (_arg2){
removeListeners();
};
SPEC_DATA = null;
randomTag = null;
mapTilesDATA = null;
mclip = null;
parentMapWalkable = null;
Tab = null;
temp_list = null;
tiles_bag = null;
collects = null;
tujuanList = null;
myob = null;
mapTileREF = null;
mclip = null;
trStandArr = null;
depthKhusus = null;
bookedRoom = null;
destination = null;
temp_destination = null;
parent_ = null;
REF = null;
if (REC){
REC.ob = null;
};
REC = null;
main = null;
}
private function removeListeners():void{
removeMovingFunction();
main.removeEventListener(Eventku.REMOVING_ALL, removingAll);
main.removeEventListener(Eventku.AUTO_SAVED, autoSaved);
main.removeEventListener(Eventku.END_SAVED, endSaved);
if (dummy){
main.removeEventListener(Eventku.AFTER_TICK, activities_dummy);
} else {
main.removeEventListener(Eventku.AFTER_TICK, activities);
};
}
private function removeMovingFunction():void{
this.visible = false;
if (dummy){
this.removeEventListener(Event.ENTER_FRAME, movingFunction_dummy);
} else {
this.removeEventListener(Event.ENTER_FRAME, movingFunction);
};
}
public function destroy():void{
removeListeners();
if (special){
SPEC_DATA.ada = false;
SPEC_DATA.pernah = true;
SPEC_DATA.last_visit = main["day"];
SPEC_DATA.last_mood = mood;
if (persenMood > 50){
SPEC_DATA.add_day = co.randomRange(1, 2);
} else {
SPEC_DATA.add_day = co.randomRange(2, 3);
SPEC_DATA.last_mood = (maxMood * 0.5);
};
};
rumus.spliceArrayObject(parent_.visitors, this, "ob");
parent_.destroyITabs(this, true, false, false);
}
public function removingData():void{
parent_.objContainer.removeChild(this);
removingAll(null, false);
}
public function dataUsedTimer(_arg1):uint{
return (serbi.dataOb.usedTimer[_arg1][(jenis - 1)]);
}
public function selecting(_arg1:Boolean):void{
onSelected = _arg1;
if (onSelected){
parent_.selectPeople.showing(this);
} else {
parent_.selectPeople.hiding();
};
}
public function changeColor(_arg1:Boolean, _arg2:Boolean):void{
co.combineColor(mclip, _arg1, _arg2, true);
if (((_arg1) || (_arg2))){
balon.showingPop();
};
}
public function removeColorSelected():void{
changeColor(onSelected, false);
}
public function acceptGoToTarget():void{
if (RP_goto_visitor == 0){
RP_goto_visitor = 1;
};
}
function get RP_goto_visitor():uint{
return (main.game.RP_khusus.goto_visitor);
}
function set RP_goto_visitor(_arg1:uint){
main.game.RP_khusus.goto_visitor = 1;
main.game.totalRP.Khusus = (main.game.totalRP.Khusus + _arg1);
main.hitungTotalRP(false, _arg1);
}
public function useFacility(_arg1:Object=null):void{
balon.forceToClose();
myob = _arg1;
boothUsed_counter = 0;
activityInBooth = true;
if (myob.standbooth){
this.visible = true;
} else {
this.visible = false;
};
}
public function isRoomStay(_arg1:uint=0):Boolean{
if (room_stay == 0){
bantuUint = 1;
if (main["day"] > 1){
if (main["popularity"] > 7){
bantuRand = (Math.random() * 100);
if (bantuRand > 19){
d_selisih1 = ((main["popularity"])<10) ? 1 : REF.room_stay;
n = d_selisih1;
while (n > 0) {
if ((n * _arg1) < money){
bantuUint = n;
break;
};
n--;
};
};
};
};
room_stay = bantuUint;
spending_temp = (room_stay * _arg1);
updateMoney(-(spending_temp));
return (false);
//unresolved jump
};
return (true);
}
public function useRoom(_arg1:Object=null):void{
balon.forceToClose();
myob = _arg1;
insideRoom = true;
memasuki = false;
}
public function startEntering0Room(_arg1):void{
bookedRoom = _arg1;
tujuanList["Room"].visited = true;
dayEnter = main["day"];
dayStay = dayEnter;
bantuUint = parent_.rooms[room_category].indexOf(_arg1);
if (bantuUint != -1){
parent_.rooms[room_category].splice(bantuUint, 1);
};
lobby_cek = false;
var _local2 = main.game;
var _local3 = (room_category + "_booked");
var _local4 = (_local2[_local3] - 1);
_local2[_local3] = _local4;
checkTempBookedCount();
canBookedRoom = false;
jamTidur = co.randomRange(serbi.dataOb.jamTidur[(jenis - 1)][0], serbi.dataOb.jamTidur[(jenis - 1)][1]);
menitJamTidur = co.randomRange(0, 50);
jedaCariTujuan = co.randomRange(10, 15);
jedaBackToRoom = co.randomRange(61, 150);
hourOut = co.randomRange(12, 14);
}
public function startActivityRoom(_arg1:Boolean):void{
var _local2:Array;
if (bubu){
initBubuTimer();
} else {
istirahat = true;
if (_arg1){
istirahatTimer = 15;
} else {
_local2 = serbi.dataOb.istirahatTimer[(jenis - 1)];
istirahatTimer = co.randomRange(_local2[0], _local2[1]);
_local2 = null;
};
};
if (!_arg1){
jedaBackToRoom = co.randomRange(61, 150);
};
memasuki = true;
}
public function initBubuTimer():void{
var _local1:Array;
if (dayBubu != main["day"]){
_local1 = null;
dayBubu = main["day"];
_local1 = serbi.dataOb.jamBangun[(jenis - 1)];
jamBangun = co.randomRange(_local1[0], _local1[1]);
menitBangun = co.randomRange(1, 50);
_local1 = null;
};
}
}
}//package pack.Instance
Section 108
//co (pack.co)
package pack {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import fl.motion.*;
import flash.utils.*;
public class co {
public static function testF(_arg1:String):String{
_arg1 = "tes co";
return (_arg1);
}
public static function barF(_arg1:MovieClip, _arg2:Number):void{
_arg1.bar.width = _arg2;
}
public static function textF(_arg1:TextField, _arg2:String):void{
_arg1.text = _arg2;
}
public static function labelF(_arg1:MovieClip, _arg2:uint, _arg3:String):void{
goF(_arg1, _arg2, _arg3);
}
public static function getGlobalPoint(_arg1:MovieClip, _arg2:MovieClip):Point{
var _local3:Point = new Point(_arg1.x, _arg1.y);
_local3 = _arg1.localToGlobal(_local3);
_local3 = _arg2.globalToLocal(_local3);
return (_local3);
}
public static function enabledF(_arg1:Object, _arg2:uint):void{
var _local3:Boolean = Boolean(_arg2);
if (_arg1.enabled != _local3){
_arg1.enabled = _local3;
};
}
public static function menabledF(_arg1:Object, _arg2:uint):void{
var _local3:Boolean = Boolean(_arg2);
if (_arg1.mouseEnabled != _local3){
_arg1.mouseEnabled = _local3;
};
}
public static function visibleF(_arg1:Object, _arg2:uint):void{
var _local3:Boolean = Boolean(_arg2);
if (_arg1.visible != _local3){
_arg1.visible = _local3;
};
}
public static function goF(_arg1:Object, _arg2:uint, _arg3:String):void{
var _local4:String = _arg1.currentLabel;
if (Boolean(_arg2)){
if (_local4 != _arg3){
_arg1.gotoAndStop(_arg3);
};
} else {
if (_local4 != _arg3){
_arg1.gotoAndPlay(_arg3);
};
};
}
public static function alphaF(_arg1:Object, _arg2:Number):void{
_arg1.alpha = _arg2;
}
public static function findAngle(_arg1:MovieClip, _arg2:MovieClip):Number{
var _local3:Number = 0;
_local3 = angleF(_arg1.x, _arg1.y, _arg2.x, _arg2.y);
return (_local3);
}
public static function angleF(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number = (_arg1 - _arg3);
var _local6:Number = (_arg2 - _arg4);
var _local7:Number = ((Math.atan2(_local6, _local5) * 180) / Math.PI);
return (_local7);
}
public static function angleFx(_arg1:Number):Number{
var _local2:Number = Math.cos(((_arg1 * Math.PI) / 180));
return (_local2);
}
public static function angleFy(_arg1:Number):Number{
var _local2:Number = Math.sin(((_arg1 * Math.PI) / 180));
return (_local2);
}
public static function dist(_arg1:MovieClip, _arg2:MovieClip):Number{
var _local3:Number = Point.distance(new Point(_arg1.x, _arg1.y), new Point(_arg2.x, _arg2.y));
return (_local3);
}
public static function distPos(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
var _local5:Number = Point.distance(new Point(_arg1, _arg2), new Point(_arg3, _arg4));
return (_local5);
}
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 cloningRecord(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
var _local3:* = _local2.readObject();
return (_local3);
}
public static function deepTrace(_arg1, _arg2:int=0):void{
var _local4:int;
var _local5:String;
var _local3 = "";
_local4 = 0;
while (_local4 < _arg2) {
_local3 = (_local3 + "\t");
_local4++;
};
for (_local5 in _arg1) {
trace(((((_local3 + "[") + _local5) + "] -> ") + _arg1[_local5]));
deepTrace(_arg1[_local5], (_arg2 + 1));
};
}
public static function deepCopyIn(_arg1, _arg2):void{
var _local3:uint;
var _local4:String;
var _local5:uint = _arg1.length;
_local3 = 0;
while (_local3 < _local5) {
for (_local4 in _arg1[_local3]) {
if (_local4 != _arg2){
_arg1[_local3][_local4] = _arg1[_local3][_arg2][_local4];
};
};
_local3++;
};
}
public static function deepClone(_arg1, _arg2):void{
var _local4:String;
trace("deepClone:", _arg1, _arg1.length);
var _local3 = "";
for (_local4 in _arg1) {
trace(((((_local3 + "[") + _local4) + "] -> ") + _arg1[_local4]), "target:", _arg1[_arg2][_local4]);
if (_local4 != _arg2){
};
};
}
public static function cloy(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
var _local3:* = _local2.readObject();
trace("src", _arg1, "--", _local3);
}
public static function popArray(_arg1:Array):void{
var _local3:uint;
var _local2:uint = _arg1.length;
_local3 = 0;
while (_local3 < _local2) {
_arg1.pop();
_local3++;
};
}
public static function showArray(_arg1:Array, _arg2:String):void{
var _local3:uint;
var _local4:uint = _arg1.length;
_local3 = 0;
while (_local3 < _local4) {
trace(_arg1[_local3][_arg2]);
_local3++;
};
}
public static function setPosition(_arg1, _arg2:Point=null):void{
if (_arg2 == null){
_arg2 = new Point(0, 0);
};
_arg1.x = _arg2.x;
_arg1.y = _arg2.y;
}
public static function getIndexOf(_arg1:Array, _arg2:String, _arg3:String, _arg4:Boolean=false):int{
var _local5:uint;
var _local6:uint = _arg1.length;
if (_arg4){
_local5 = _local6;
while (_local5 > 0) {
if (_arg1[(_local5 - 1)][_arg2] == _arg3){
return ((_local5 - 1));
};
_local5--;
};
} else {
_local5 = 0;
while (_local5 < _local6) {
if (_arg1[_local5][_arg2] == _arg3){
return (_local5);
};
_local5++;
};
};
return (-1);
}
public static function setBrightness(_arg1, _arg2:Boolean=false, _arg3:Boolean=true, _arg4:int=0, _arg5:int=0, _arg6:int=0):void{
}
public static function combineColor(_arg1, _arg2:Boolean, _arg3:Boolean, _arg4:Boolean, _arg5:Number=0.5, _arg6:Boolean=true):void{
var _local7:Color = new Color();
var _local8:ColorTransform = new ColorTransform();
var _local9:* = _arg1;
if (_local9 != null){
if (((!(_arg2)) && (!(_arg3)))){
if (_arg4){
_local9.transform.colorTransform = _local8;
} else {
_local7.setTint(0, _arg5);
_local9.transform.colorTransform = _local7;
};
} else {
if (((_arg2) && (_arg3))){
if (_arg4){
_local7.setTint(0xFF0099, 0.6);
} else {
_local7.setTint(0x330066, _arg5);
};
} else {
if (_arg2){
if (_arg4){
_local7.setTint(0xFF0000, _arg5);
} else {
_local7.setTint(0x660000, _arg5);
};
} else {
if (_arg3){
if (_arg4){
_local7.setTint(26367, _arg5);
} else {
_local7.setTint(0x660099, _arg5);
};
};
};
};
_local9.transform.colorTransform = _local7;
};
};
}
public static function changeTint(_arg1, _arg2:Boolean=true):void{
var _local3:Color;
var _local4:ColorTransform;
if (_arg2){
_local3 = new Color();
_local3.setTint(0, 0.5);
_arg1.transform.colorTransform = _local3;
} else {
_local4 = new ColorTransform();
_arg1.transform.colorTransform = _local4;
};
}
public static function noneColor(_arg1):void{
var _local2:ColorTransform = new ColorTransform();
_arg1.transform.colorTransform = _local2;
}
public static function createBox_ORD(_arg1, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Number, _arg8:Number, _arg9:Number, _arg10:Boolean=true, _arg11:Boolean=true, _arg12:uint=0, _arg13:int=0):void{
if (_arg10){
_arg1.graphics.lineStyle(_arg12, _arg13);
};
_arg1.graphics.moveTo(_arg2, _arg3);
_arg1.graphics.lineTo(_arg4, _arg5);
_arg1.graphics.lineTo(_arg6, _arg7);
_arg1.graphics.lineTo(_arg8, _arg9);
}
public static function randomRangeR(_arg1:uint):uint{
return (Math.round((Math.random() * (_arg1 - 1))));
}
public static function randomRange(_arg1:int, _arg2:int):int{
return ((Math.floor((Math.random() * ((_arg2 - _arg1) + 1))) + _arg1));
}
public static function randomRangeDec(_arg1:Number, _arg2:Number, _arg3:uint=2):Number{
var _local4:Number = 1;
if (_arg3 != 0){
_local4 = (10 * _arg3);
};
var _local5:Number = (Math.random() * ((_arg2 - _arg1) * _local4));
_local5 = ((_local5 / _local4) + _arg1);
return (RoundDecNumber(_local5, _arg3));
}
public static function RoundDecNumber(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Number{
var _local4:Number = Math.pow(10, _arg2);
if (_arg3){
return ((Math.floor((_arg1 * _local4)) / _local4));
};
return ((Math.round((_arg1 * _local4)) / _local4));
}
public static function RoundDecNumber_ToString(_arg1:Number, _arg2:Number):String{
var _local3:Number = RoundDecNumber(_arg1, _arg2);
return (String(_local3));
}
public static function getIntersect(_arg1:Array, _arg2:Array):Array{
var _local4:uint;
var _local5:uint;
var _local3:Array = [];
var _local6:uint = _arg1.length;
var _local7:uint = _arg2.length;
_local4 = 0;
while (_local4 < _local6) {
_local5 = 0;
while (_local5 < _local7) {
if (_arg1[_local4] == _arg2[_local5]){
_local3[_local3.length] = _arg1[_local4];
};
_local5++;
};
_local4++;
};
return (_local3);
}
public static function removeDuplicates(_arg1:Array, _arg2:Array):Array{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local9:uint;
var _local3:Array = [];
var _local7:uint = _arg1.length;
var _local8:uint = _arg2.length;
_local4 = 0;
while (_local4 < _local7) {
_local9 = _local3.length;
_local5 = 0;
while (_local5 < _local9) {
if (_arg1[_local4] == _local3[_local5]){
//unresolved jump
};
_local5++;
};
_local6 = 0;
while (_local6 < _local8) {
if (_arg1[_local4] == _arg2[_local6]){
//unresolved jump
};
_local6++;
};
_local3.push(_arg1[_local4]);
_local4++;
};
return (_local3);
}
public static function isSamePoint(_arg1:Point, _arg2:Point):Boolean{
if ((((_arg1.x == _arg2.x)) && ((_arg1.y == _arg2.y)))){
return (true);
};
return (false);
}
}
}//package pack
Section 109
//Eventku (pack.Eventku)
package pack {
import flash.events.*;
public class Eventku extends Event {
public static const FPS_TICK = "fpsTick";
public static const AFTER_TICK = "afterTick";
public static const MALAM = "malam";
public static const SIANG = "siang";
public static const REMOVING_ALL = "removingAll";
public static const REMOVING_TILE = "removingTile";
public static const AUTO_SAVED = "autoSaved";
public static const END_SAVED = "endSaved";
public static const AFTER_RECLOAD = "afterRecLoad";
public static const LOAD_AFTER_VISITOR = "loadAfterVisitor";
public static const LOAD_AFTER_BOOTH = "loadAfterBooth";
public static const CHECK_AFTER_MONEY = "checkAfterMoney";
public static const AFTER_FIRST_STAT = "afterFirstStat";
public function Eventku(_arg1:String):void{
super(_arg1, true, true);
}
}
}//package pack
Section 110
//MapContainer (pack.MapContainer)
package pack {
import flash.display.*;
import flash.geom.*;
import flash.events.*;
import pack.bitmap.*;
import flash.utils.*;
import pack.Instance.*;
import pack.Instance.Booths.*;
public class MapContainer extends Sprite {
private const ncolor:Array;
private const DX:Array;
private const DY:Array;
public var borderGuide:MovieClip;
public var selectD:MovieClip;
public var selectPeople:MovieClip;
private var pathSprite:Sprite;
public var accCanvas:Bitmap;
public var tileCanvas:Bitmap;
public var blokCanvas:Bitmap;
public var groundCanvas:Bitmap;
public var gridCanvas:Bitmap;
public var objContainer:Sprite;
public var otherContainer:Sprite;
public var tileBoothSprite:Sprite;
public var frontContainer:Sprite;
public var main;
public var i:int;
public var j:int;
public var SIZE_:uint;
public var ROWS:uint;
public var COLS:uint;
public var ROWS_MAX:uint;
public var COLS_MAX:uint;
public var ROWS_BOUND:uint;
public var COLS_BOUND:uint;
public var panjang:Number;
public var tinggi:Number;
public var dimX:Number;
public var dimY:Number;
public var panjang0:Number;
public var tinggi0:Number;
public var map:Object;
public var plants:Object;
public var lobby:Object;
public var booths:Object;
public var outers:Object;
public var tabs:Array;
public var destinationList:Array;
public var tiles:Array;
public var defaultTiles:Array;
public var tilesPath:Array;
public var visitors:Array;
public var janitors:Array;
public var lantaiDepth:Array;
public var rooms:Array;
public var color_id:uint;// = 0
public var counting_expanding:uint;// = 0
public var boundHorz:Point;
public var boundVert:Point;
public var _point:Point;
public var startStreet:Point;
private var ctr_x:uint;
private var ctr_y:uint;
private var lahan_x:uint;
private var lahan_y:uint;
private var bound_x:uint;
private var bound_y:uint;
private var bound2_x:uint;
private var bound2_y:uint;
private var bound3_x:uint;
private var bound3_y:uint;
private var bound_update_x:uint;
private var bound_update_y:uint;
private var bound2_update_x:uint;
private var bound2_update_y:uint;
private var bound3_update_x:uint;
private var bound3_update_y:uint;
private var boundHorz_update_x:uint;
private var boundHorz_update_y:uint;
private var boundVert_update_x:uint;
private var boundVert_update_y:uint;
private var queue:Array;
private var head:int;
private var tail:int;
private var bantuRand:Number;
private var visitor_list:Array;
public function MapContainer():void{
ncolor = [0xFF0000, 0xFF00];
startStreet = new Point(5, 9);
DX = [1, -1, 0, 0];
DY = [0, 0, 1, -1];
visitor_list = [];
super();
}
public function CatchClipI(_arg1):void{
main = _arg1;
map = main.game.map;
main.game.map = map;
SIZE_ = main.SIZE_;
ROWS_MAX = main.ROWS_MAX;
COLS_MAX = main.COLS_MAX;
ROWS = main.ROWS;
COLS = main.COLS;
panjang = ((ROWS_MAX + COLS_MAX) * SIZE_);
tinggi = (((ROWS_MAX + COLS_MAX) * SIZE_) * 0.5);
updatePanjangNow();
this.y = boundVert.x;
dimX = ((ROWS_MAX - 1) * SIZE_);
dimY = (tinggi - (SIZE_ + 1));
objContainer = new Sprite();
objContainer.name = "objContainer";
tileCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
gridCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
accCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
blokCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
tileCanvas.name = "tileCanvas";
gridCanvas.name = "gridCanvas";
accCanvas.name = "accCanvas";
blokCanvas.name = "accCanvas";
this.graphics.beginBitmapFill(new SandTile(NaN, NaN), null, true, false);
this.graphics.drawRect((tileCanvas.x - 100), (tileCanvas.y - 100), (panjang + 240), (tinggi + 240));
this.graphics.endFill();
tileBoothSprite = new Sprite();
tileBoothSprite.name = "tileBoothSprite";
groundCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
groundCanvas.name = "groundCanvas";
main.showMemoryUsage();
_point = new Point();
map.tiles = [];
map.area = new Array(ROWS_MAX);
map.walkable = new Array(ROWS_MAX);
plants = {};
tabs = main.game.tabs;
tabs["obj"] = [];
tabs["ref"] = [];
tabs["front"] = [];
tabs["front"]["obj"] = [];
tabs["front"]["ref"] = [];
main.game.tabs = tabs;
lobby = main.game.objects.Lobby;
main.game.objects.Lobby = lobby;
destinationList = main.game.destinationList;
main.game.destinationList = destinationList;
tiles = main.game.tiles;
main.game.tiles = tiles;
defaultTiles = [];
lantaiDepth = [];
outers = main.game.objects.outers;
main.game.objects.outers = outers;
tilesPath = [];
booths = main.game.objects.booths;
main.game.objects.booths = booths;
visitors = main.game.visitors;
main.game.visitors = visitors;
janitors = main.game.janitors;
main.game.janitors = janitors;
rooms = [];
rooms["Cottage"] = [];
rooms["Lodge"] = [];
this.addChild(tileCanvas);
this.addChild(groundCanvas);
this.addChild(blokCanvas);
this.addChild(tileBoothSprite);
this.addChild(accCanvas);
this.addChild(objContainer);
this.addChild(gridCanvas);
otherContainer = new Sprite();
this.addChild(otherContainer);
frontContainer = new Sprite();
this.addChild(frontContainer);
mouseDetect(objContainer);
mouseDetect(frontContainer);
mouseDetect(otherContainer);
mouseDetect(selectD);
mouseDetect(selectPeople);
tileBoothSprite.cacheAsBitmap = true;
otherContainer.cacheAsBitmap = true;
frontContainer.cacheAsBitmap = true;
blokCanvas.visible = false;
pathSprite = new Sprite();
pathSprite.x = 0;
pathSprite.y = 0;
mouseDetect(pathSprite);
this.addChild(pathSprite);
this.setChildIndex(borderGuide, (this.numChildren - 1));
this.setChildIndex(selectPeople, (this.numChildren - 1));
this.setChildIndex(selectD, (this.numChildren - 1));
borderGuide.visible = false;
selectD.hiding();
selectPeople.hiding();
selectD.x = 0;
selectD.y = 0;
selectPeople.x = 0;
selectPeople.y = 0;
ShowGrid(false);
ctr_x = 10;
ctr_y = 11;
main.showMemoryUsage();
BuildMap();
this.mouseChildren = false;
this.x = 264;
this.y = 700;
main.showMemoryUsage();
}
public function setBorderGuide(_arg1:String=""):void{
if (_arg1 != ""){
if (_arg1 == "room"){
_point = rumus.findTileCoord_point(new Point(18, 22), SIZE_);
} else {
_point = rumus.findTileCoord_point(new Point(17, 21), SIZE_);
};
borderGuide.x = _point.x;
borderGuide.y = _point.y;
borderGuide.gotoAndStop(_arg1);
borderGuide.visible = true;
} else {
borderGuide.visible = false;
};
}
public function removingAll():void{
removeJedaUpdateResort();
if (tileCanvas != null){
tileCanvas.bitmapData.dispose();
};
if (gridCanvas != null){
gridCanvas.bitmapData.dispose();
};
if (accCanvas != null){
accCanvas.bitmapData.dispose();
};
if (blokCanvas != null){
blokCanvas.bitmapData.dispose();
};
if (groundCanvas != null){
groundCanvas.bitmapData.dispose();
};
tileCanvas = null;
gridCanvas = null;
accCanvas = null;
groundCanvas = null;
blokCanvas = null;
pathSprite.graphics.clear();
pathSprite = null;
this.graphics.clear();
plants = null;
objContainer = null;
otherContainer = null;
frontContainer = null;
tileBoothSprite = null;
defaultTiles = null;
lantaiDepth = null;
tilesPath = null;
rooms = null;
main.showMemoryUsage();
destroy_outers();
main.removeChild(this);
main = null;
}
public function destroy_outers():void{
var _local1:String;
var _local2:Object;
for (_local1 in outers) {
_local2 = outers[_local1];
_local2.removingAll();
};
_local2 = null;
}
private function mouseDetect(_arg1=null, _arg2:Boolean=false):void{
_arg1.mouseEnabled = false;
_arg1.mouseChildren = false;
}
private function updatePanjangNow():void{
var _local1:uint = main.game.EXPAND;
panjang0 = ((ROWS + COLS) * SIZE_);
tinggi0 = (((ROWS + COLS) * SIZE_) * 0.5);
var _local2:Number = (((panjang0 * 0.25) + (4 * SIZE_)) + (25 * _local1));
var _local3:Number = (((-((panjang0 * 0.25)) + 480) + (SIZE_ * 2)) - (50 * _local1));
boundHorz = new Point(_local2, _local3);
_local2 = (600 - (10 * _local1));
_local3 = ((tinggi0 - (6 * SIZE_)) + (12 * _local1));
boundVert = new Point(_local2, _local3);
}
public function updateTilesPath_rec():void{
var _local1:uint = tilesPath.length;
i = 0;
while (i < _local1) {
tilesPath[i].updateOtherTilePath();
findPath(tilesPath[i]);
i++;
};
}
public function updateTilesPath_all(_arg1:Point, _arg2:Boolean):void{
var _local4:uint;
lobby.updatePathVars(_arg1, _arg2);
var _local3:Array = main.game.objects.Cottage;
var _local5:uint = _local3.length;
_local4 = 0;
while (_local4 < _local5) {
_local3[_local4].ob.updatePathVars(_arg1, _arg2);
_local4++;
};
_local3 = main.game.objects.Lodge;
_local5 = _local3.length;
_local4 = 0;
while (_local4 < _local5) {
_local3[_local4].ob.updatePathVars(_arg1, _arg2);
_local4++;
};
_local3 = main.game.objects.Facility;
_local5 = _local3.length;
_local4 = 0;
while (_local4 < _local5) {
_local3[_local4].ob.updatePathVars(_arg1, _arg2);
_local4++;
};
_local3 = main.game.objects.JanitorRoom;
_local5 = _local3.length;
_local4 = 0;
while (_local4 < _local5) {
_local3[_local4].ob.updatePathVars(_arg1, _arg2);
_local4++;
};
_local4 = 0;
while (_local4 < tilesPath.length) {
tilesPath[_local4].updatePathVars(_arg1, _arg2);
_local4++;
};
}
public function updateFindingPath2(_arg1:Boolean=true, _arg2:Boolean=false):void{
trace("! updateFindingPath2");
findPath(lobby);
var _local3:Boolean;
var _local4:Array = main.game.objects.Cottage;
var _local5:uint = _local4.length;
i = 0;
while (i < _local5) {
findPath(_local4[i].ob, _local3);
i++;
};
_local4 = main.game.objects.Lodge;
_local5 = _local4.length;
i = 0;
while (i < _local5) {
findPath(_local4[i].ob, _local3);
i++;
};
_local4 = main.game.objects.Facility;
_local5 = _local4.length;
i = 0;
while (i < _local5) {
findPath(_local4[i].ob, _local3);
i++;
};
_local4 = main.game.objects.JanitorRoom;
_local5 = _local4.length;
i = 0;
while (i < _local5) {
findPath(_local4[i].ob, _local3);
i++;
};
findPath_outers();
if (!_arg2){
findPathTile_update();
};
_local4 = null;
if (_arg1){
trace("doLemparAfterPath ==");
main.doLemparAfterPath();
main.CheckMissions("connect_tiles");
};
}
public function findPathTile_update():void{
var _local1:uint = tilesPath.length;
trace("findPathTile_update:", _local1);
i = 0;
while (i < _local1) {
findPath(tilesPath[i]);
i++;
};
}
public function initObject():void{
updateTilesPath_rec();
CreatingSceneryDefault();
CreatingLobbyDefault();
AppliedNewTabsAlwaysFront();
AppliedNewTabs();
AppliedNewTabs_lantai();
var _local1:uint = serbi.outerArray.length;
var _local2:uint = main.game.EXPAND;
i = 0;
while (i < _local1) {
_point = serbi.outerArray[i];
if (_point.y == 0){
j = 0;
while (j < 3) {
if (j <= _local2){
addingOuter(_point.x, (serbi.EXPAND[j].COLS - 3));
} else {
addingOuter(_point.x, (serbi.EXPAND[j].COLS - 3));
};
j++;
};
} else {
addingOuter(_point.x, _point.y);
};
i++;
};
}
public function detectPath():void{
updateFindingPath2(false, true);
main.isPreEnterGame = true;
}
public function findPath_outers(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:String;
var _local4:Object;
for (_local3 in outers) {
_local4 = outers[_local3];
_local4.updatePathVars(main.game.EXPAND);
if (_local4.detect){
findPath(_local4, _arg2);
};
};
_local4 = null;
}
public function SaveMap():void{
trace("SaveMap...");
}
public function ShowGrid(_arg1:Boolean=true):void{
gridCanvas.visible = _arg1;
}
private function creatingTileUtama(_arg1:Boolean=false):void{
if (_arg1){
i = 10;
while (i <= 18) {
j = 20;
while (j <= 21) {
if (map.tiles[((("tile_" + i) + "_") + j)].ipath){
map.tiles[((("tile_" + i) + "_") + j)].pathing();
};
j++;
};
i++;
};
} else {
i = 10;
while (i <= 18) {
j = 20;
while (j <= 21) {
creatingTile(i, j, 1, true, true, true);
j++;
};
i++;
};
creatingTile(10, 22, 1, true);
creatingTile(10, 23, 1, true);
};
}
public function creatingTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Boolean=false):void{
if (_arg4){
map.tiles[((("tile_" + _arg1) + "_") + _arg2)].changeToDefault(_arg3, _arg5, _arg6);
} else {
addNewTile(_arg1, _arg2, _arg3);
};
}
public function addNewTile(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:Object=null):void{
var _local6:int;
map.tiles[((("tile_" + _arg1) + "_") + _arg2)].changeToBuild(_arg3, _arg4, _arg5);
if (!_arg4){
_local6 = tilesPath.indexOf(map.tiles[((("tile_" + _arg1) + "_") + _arg2)]);
};
}
private function addingOuter(_arg1:int, _arg2:int, _arg3:Boolean=false):void{
var _local4:String = ((("outer_" + _arg1) + "_") + _arg2);
outers[_local4] = new Outer();
outers[_local4].creating(this, new Point(_arg1, _arg2));
outers[_local4].detect = _arg3;
destinationList[_local4] = true;
if (outers[_local4].detect){
findPath(outers[_local4]);
};
}
private function CreatingLobbyDefault():void{
lobby = new Lobby();
lobby.creating(this, main.adaSave, main.game.objects.Lobby, new Point(14, 22));
lobby.asDefault();
InsertTabs(lobby);
destinationList[lobby.name] = true;
}
public function BuildMap():void{
var _local2:Object;
var _local3:Object;
var _local4:Object;
var _local5:MovieClip;
var _local6:uint;
var _local7:uint;
var _local8:uint;
var _local9:uint;
var _local10:uint;
var _local11:String;
var _local12:Boolean;
var _local13:Boolean;
var _local25:Boolean;
var _local26:Boolean;
var _local27:int;
var _local28:int;
var _local1:uint = main.game.EXPAND;
var _local14:Point = new Point();
lahan_x = serbi.EXPAND[_local1].lahan.x;
lahan_y = serbi.EXPAND[_local1].lahan.y;
bound_x = (ctr_x + lahan_x);
bound_y = (ctr_y + lahan_y);
bound2_x = (bound_x + 3);
bound2_y = (bound_y + 3);
bound3_x = (bound2_x + 2);
bound3_y = (bound2_y + 2);
_local7 = (COLS_MAX - 4);
_local8 = (COLS_MAX - COLS);
_local9 = (ROWS_MAX - 5);
_local10 = (ROWS_MAX - ROWS);
var _local15:Array = zmap.MAP.sceneries;
var _local16:Array = zmap.MAP.kepiting;
var _local17:Array = zmap.MAP.tileDefault;
trace("before cache bitmap data on build map");
var _local18:Rectangle = main.RenderTile.areaRectangle;
var _local19:BitmapData = main.RenderTile.captureArray[24];
var _local20:BitmapData = main.RenderTile.captureArray[27];
var _local21:uint = (COLS_MAX + 7);
var _local22 = -5;
var _local23 = -4;
var _local24:int = (ROWS_MAX + 5);
i = _local22;
while (i < _local24) {
_local25 = (((i > -1)) && ((i < ROWS_MAX)));
if (_local25){
map.area[i] = new Array(COLS_MAX);
map.walkable[i] = new Array(COLS_MAX);
};
j = _local23;
while (j < _local21) {
_local11 = ((("tile_" + i) + "_") + j);
_local26 = (((j > -1)) && ((j < COLS_MAX)));
if (((_local25) && (_local26))){
_local14 = new Point(i, j);
_local12 = false;
map.area[i][j] = {};
_local4 = map.area[i][j];
_local4.name = _local11;
map.tiles[_local11] = new Tile();
_local5 = map.tiles[_local11];
_local5.name = _local11;
_local4.isi = false;
_local4.isi_apa = null;
_local4.lahan = false;
_local4.idefault = (_local5.idefault = true);
if ((((i == 4)) || ((i == 5)))){
_local5.creating(this, _local14, 83);
} else {
if ((((j == 5)) || ((j == 6)))){
_local5.creating(this, _local14, 83);
} else {
if ((((j > bound2_y)) && ((j <= bound3_y)))){
_local5.creating(this, _local14, 83);
} else {
if ((((i > bound2_x)) && ((i <= bound3_x)))){
_local5.creating(this, _local14, 83);
} else {
if ((((j > 6)) && ((((((j <= bound2_y)) && ((i > 5)))) && ((i <= bound2_x)))))){
if ((((((i > ctr_x)) && ((i < bound_x)))) && ((((j > ctr_y)) && ((j < bound_y)))))){
_local4.lahan = true;
_local4.idefault = false;
_local5.idefault = false;
_local5.creating(this, _local14, 80);
gridCanvas.bitmapData.copyPixels(_local19, _local18, _local5.dp, null, null, true);
} else {
map.tiles[_local11].creating(this, _local14, 82);
};
} else {
_local5.creating(this, _local14, 0);
};
};
};
};
};
_local6 = _local15[_local11];
if (_local6 != 0){
_local13 = false;
if (i > 5){
if (j >= _local7){
_local13 = true;
creatingPlant0(i, (j - _local8), _local6, true);
} else {
if (j > 6){
if (i >= _local9){
_local13 = true;
creatingPlant0((i - _local10), j, _local6, true);
};
};
};
};
if (!_local13){
creatingPlant0(i, j, _local6, true);
};
};
map.walkable[i][j] = _local5.walkable;
if ((((((i > 0)) && ((i < ROWS)))) && ((((j > 0)) && ((j < COLS)))))){
if (!_local4.lahan){
if ((((i == 6)) && ((((j >= 19)) && ((j <= 22)))))){
map.walkable[i][j] = true;
} else {
if ((((i >= 7)) && ((i <= 9)))){
if (!_local4.isi){
map.walkable[i][j] = true;
};
} else {
map.walkable[i][j] = false;
};
};
};
} else {
map.walkable[i][j] = false;
};
if (map.walkable[i][j]){
_local5.ipath = true;
} else {
_local5.ipath = false;
};
_local3 = _local17[_local11];
if (_local3){
if (_local3.jenis != 0){
_local5.changeToDefault(_local3.jenis, _local3.ipath, true);
};
};
if (_local4.lahan){
_local2 = tiles[main.game.tilesDat[_local11]];
if (_local2 != null){
_local12 = true;
addNewTile(_local2.ptile.x, _local2.ptile.y, _local2.jenis, true, _local2);
};
};
};
if (_local16[_local11]){
if (i > 5){
if (j >= _local7){
_local27 = i;
_local28 = (j - _local8);
} else {
if (j > 6){
if (i >= _local9){
_local27 = (i - _local10);
_local28 = j;
} else {
_local27 = i;
_local28 = j;
};
} else {
_local27 = i;
_local28 = j;
};
};
} else {
_local27 = i;
_local28 = j;
};
_local11 = ((("tile_" + _local27) + "_") + _local28);
_local5 = map.tiles[_local11];
if (_local5 != null){
accCanvas.bitmapData.copyPixels(_local20, _local18, _local5.dp, null, null, true);
} else {
_local14.x = (((_local28 - _local27) * SIZE_) + dimX);
_local14.y = (dimY - ((_local28 + _local27) * (SIZE_ * 0.5)));
accCanvas.bitmapData.copyPixels(_local20, _local18, _local14, null, null, true);
};
};
j++;
};
i++;
};
_local15 = null;
_local17 = null;
_local16 = null;
_local2 = null;
_local3 = null;
_local4 = null;
_local5 = null;
_local19 = null;
_local20 = null;
_local18 = null;
}
public function ObjectForTutorial():void{
var _local1:String;
setBorderGuide("");
j = serbi.tileTutorial.length;
i = 0;
while (i < j) {
_local1 = ("tile_" + serbi.tileTutorial[i]);
map.tiles[_local1].tile_tutorial = true;
i++;
};
}
public function acceptExpanding(_arg1:uint):void{
var _local3:String;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local13:*;
var _local14:Boolean;
var _local15:Object;
var _local16:MovieClip;
var _local17:Boolean;
var _local18:Boolean;
var _local19:Boolean;
var _local20:Boolean;
var _local21:Boolean;
var _local22:Boolean;
var _local23:Boolean;
var _local26:String;
var _local28:uint;
var _local29:uint;
var _local30:uint;
var _local31:uint;
var _local32:uint;
var _local33:uint;
var _local43:Boolean;
var _local44:Boolean;
var _local45:int;
var _local46:int;
counting_expanding = 0;
var _local2:Object = serbi.EXPAND[(_arg1 - 1)];
var _local7:uint = _local2.COLS;
var _local8:uint = _local2.ROWS;
ROWS = main.ROWS;
COLS = main.COLS;
_local4 = (ROWS - _local8);
_local5 = (COLS - _local7);
updatePanjangNow();
_local2 = serbi.EXPAND[_arg1];
lahan_x = _local2.lahan.x;
lahan_y = _local2.lahan.y;
bound_update_x = (ctr_x + lahan_x);
bound_update_y = (ctr_y + lahan_y);
bound2_update_x = (bound_update_x + 3);
bound2_update_y = (bound_update_y + 3);
bound3_update_x = (bound2_update_x + 2);
bound3_update_y = (bound2_update_y + 2);
var _local9:Array = main.game.objects.Mobil;
var _local10:Object;
var _local11:uint = _local9.length;
var _local12:uint;
i = 0;
while (i < _local11) {
_local10 = _local9[i].ob;
if (_local10.io == 4){
_local12++;
};
i++;
};
i = 0;
while (i < _local12) {
_local11 = _local9.length;
j = 0;
while (j < _local11) {
_local10 = _local9[j].ob;
if (_local10.io == 4){
_local10.paksaDestroy();
break;
};
j++;
};
i++;
};
_local10 = null;
_local9 = null;
var _local24:uint = (bound2_y + 1);
var _local25:uint = (bound3_y + 1);
i = ROWS;
while (i < ROWS_MAX) {
j = _local24;
while (j < _local25) {
_local3 = ((("tile_" + i) + "_") + j);
_local21 = true;
buatTileDefaultBaru(_local3, i, j, "kosong");
j++;
};
i++;
};
_local24 = (bound2_x + 1);
_local25 = (bound3_x + 1);
i = _local24;
while (i < _local25) {
j = bound3_update_y;
while (j < COLS_MAX) {
_local3 = ((("tile_" + i) + "_") + j);
_local21 = true;
buatTileDefaultBaru(_local3, i, j, "kosong");
j++;
};
i++;
};
var _local27:Boolean;
_local28 = (_local7 - 4);
_local29 = (COLS - 4);
_local30 = (COLS_MAX - COLS);
_local31 = (_local8 - 5);
_local32 = (ROWS - 5);
_local33 = (ROWS_MAX - ROWS);
var _local34:Array = zmap.MAP.sceneries;
var _local35:Array = zmap.MAP.kepiting;
var _local36:Point = new Point();
var _local37:BitmapData = main.RenderTile.captureArray[27];
var _local38:Rectangle = main.RenderTile.areaRectangle;
var _local39:uint = (COLS + 7);
var _local40 = -5;
var _local41 = -4;
var _local42:int = (ROWS + 5);
accCanvas.bitmapData.dispose();
this.removeChild(accCanvas);
accCanvas = BitmapUtility.Canvas(panjang, tinggi, true, SIZE_, ROWS_MAX);
this.addChildAt(accCanvas, 4);
i = _local40;
while (i < _local42) {
_local43 = (((i > -1)) && ((i < ROWS)));
j = _local41;
while (j < _local39) {
_local44 = (((j > -1)) && ((j < COLS)));
_local3 = ((("tile_" + i) + "_") + j);
_local16 = map.tiles[_local3];
if (((_local43) && (_local44))){
_local17 = false;
_local18 = false;
_local19 = false;
_local20 = false;
_local21 = false;
_local22 = false;
if (i > 5){
if (j >= _local28){
if (plants[_local3] != null){
plants[_local3].destroy(true);
};
} else {
if (i >= _local31){
if (j > 6){
if (plants[_local3] != null){
plants[_local3].destroy(true);
};
};
};
};
};
if ((((j > bound2_update_y)) && ((j <= bound3_update_y)))){
_local19 = true;
};
if (!_local19){
if ((((i > bound2_update_x)) && ((i <= bound3_update_x)))){
_local19 = true;
};
};
if (_local19){
buatTileDefaultBaru(_local3, i, j, "aspal");
_local22 = true;
} else {
if (j > bound2_y){
if (j > bound3_update_y){
if ((((i > bound2_x)) && ((i <= bound3_x)))){
_local21 = true;
};
} else {
if (j <= bound3_y){
if ((((i < 4)) || ((i > bound3_update_x)))){
_local21 = true;
};
};
};
} else {
if (j < 5){
if ((((i > bound2_x)) && ((i <= bound3_x)))){
_local21 = true;
};
};
};
if (_local21){
buatTileDefaultBaru(_local3, i, j, "kosong");
_local22 = true;
} else {
if ((((i > 5)) && ((j > 6)))){
if ((((i <= _local8)) && ((j <= _local7)))){
if (j == bound_y){
if (i > ctr_x){
if (i <= bound_x){
if (plants[_local3] != null){
if (plants[_local3].jenis == 99){
plants[_local3].destroy(true);
};
};
};
};
} else {
if (i == bound_x){
if (j > ctr_y){
if (j < bound_y){
if (plants[_local3] != null){
if (plants[_local3].jenis == 99){
plants[_local3].destroy(true);
};
};
};
};
};
};
if (j >= bound_y){
if (j < bound_update_y){
if (i == ctr_x){
_local20 = true;
} else {
if ((((i > ctr_x)) && ((i < bound_update_x)))){
_local17 = true;
};
};
};
if ((((i <= bound2_update_x)) || ((j <= bound2_update_y)))){
_local18 = true;
};
if (j == bound_update_y){
if ((((i >= ctr_x)) && ((i <= bound_update_x)))){
_local20 = true;
};
} else {
if (i == bound_update_x){
if (j < bound_update_y){
_local20 = true;
};
};
};
} else {
if (i >= bound_x){
if (i < bound_update_x){
if ((((j > ctr_y)) && ((j < bound_update_y)))){
_local17 = true;
};
};
if ((((i <= bound2_update_x)) || ((j <= bound2_update_y)))){
_local18 = true;
};
if (i == bound_update_x){
if ((((j >= ctr_y)) && ((j <= bound_update_y)))){
_local20 = true;
};
} else {
if (j == ctr_y){
if ((((i > bound_x)) && ((i <= bound_update_x)))){
_local20 = true;
};
};
};
};
};
if (_local17){
jadikanLahanBaru(_local3, i, j);
_local22 = true;
} else {
if (_local19){
buatTileDefaultBaru(_local3, i, j, "aspal");
_local22 = true;
} else {
if (_local18){
buatTileDefaultBaru(_local3, i, j, "trotoar");
_local22 = true;
} else {
if (_local21){
buatTileDefaultBaru(_local3, i, j, "kosong");
_local22 = true;
};
};
};
};
};
};
};
if (i > 5){
if (j >= _local29){
_local26 = ((("tile_" + i) + "_") + (j + _local30));
_local6 = _local34[_local26];
if (_local6 > 0){
creatingPlant0(i, j, _local6, true);
};
} else {
if (i >= _local32){
if (j > 6){
_local26 = ((("tile_" + (i + _local33)) + "_") + j);
_local6 = _local34[_local26];
if (_local6 > 0){
creatingPlant0(i, j, _local6, true);
};
};
};
};
};
if (_local20){
creatingPlant0(i, j, 99, true);
};
};
_local15 = map.area[i][j];
_local13 = _local15.lahan;
_local14 = _local15.isi;
_local23 = map.walkable[i][j];
if ((((((i > 0)) && ((i < ROWS)))) && ((((j > 0)) && ((j < COLS)))))){
if (((!(_local13)) && (!(_local14)))){
if ((((i == 6)) && ((((j >= 19)) && ((j <= 22)))))){
} else {
if ((((i >= 7)) && ((i <= 9)))){
map.walkable[i][j] = true;
} else {
if ((((i == ctr_x)) && ((((j > 10)) && ((j < 24)))))){
} else {
map.walkable[i][j] = false;
};
};
};
};
} else {
map.walkable[i][j] = false;
};
if (map.walkable[i][j] != _local23){
if (map.walkable[i][j]){
_local16.ipath = true;
} else {
_local16.ipath = false;
};
_local16.accept_WalkableREF();
};
};
if (_local35[_local3]){
if (i > 5){
if (j >= _local28){
_local45 = i;
_local46 = (j - _local30);
} else {
if (j > 6){
if (i >= _local31){
_local45 = (i - _local33);
_local46 = j;
} else {
_local45 = i;
_local46 = j;
};
} else {
_local45 = i;
_local46 = j;
};
};
} else {
_local45 = i;
_local46 = j;
};
_local3 = ((("tile_" + _local45) + "_") + _local46);
_local16 = map.tiles[_local3];
if (_local16 != null){
accCanvas.bitmapData.copyPixels(_local37, _local38, _local16.dp, null, null, true);
} else {
_local36.x = (((_local46 - _local45) * SIZE_) + dimX);
_local36.y = (dimY - ((_local46 + _local45) * (SIZE_ * 0.5)));
accCanvas.bitmapData.copyPixels(_local37, _local38, _local36, null, null, true);
};
};
j++;
};
i++;
};
_local15 = null;
_local16 = null;
_local34 = null;
_local35 = null;
bound_x = bound_update_x;
bound_y = bound_update_y;
bound2_x = bound2_update_x;
bound2_y = bound2_update_y;
bound3_x = bound3_update_x;
bound3_y = bound3_update_y;
_local2 = null;
_local38 = null;
_local37 = null;
AppliedNewTabs();
AppliedNewTabsAlwaysFront();
trace("acceptExpanding>>new path?", main.adaPathBaru);
pathSprite.graphics.clear();
updateFindingPath2(false);
this.addEventListener(Event.ENTER_FRAME, jedaUpdateResort, false, 0, true);
}
private function jedaUpdateResort(_arg1:Event):void{
var _local2:uint = (counting_expanding / main.FR);
if (_local2 < 2){
counting_expanding++;
} else {
removeJedaUpdateResort();
main.navigator2._selectOnDefault(true);
main.waitLayar.hiding();
};
}
public function removeJedaUpdateResort():void{
this.removeEventListener(Event.ENTER_FRAME, jedaUpdateResort);
}
private function buatTileDefaultBaru(_arg1:String, _arg2:uint, _arg3:uint, _arg4:String):void{
var _local6:uint;
var _local5:* = map.tiles[_arg1];
_local6 = ((_arg4)=="aspal") ? 83 : ((_arg4)=="trotoar") ? 82 : ((_arg4)=="kosong") ? 0 : 0;
if (_local5.jenis != _local6){
_local5.destroy_onExpand();
map.area[_arg2][_arg3].lahan = false;
map.walkable[_arg2][_arg3] = false;
_local5.changeToDefault(_local6, false, false, true);
};
_local5 = null;
}
private function jadikanLahanBaru(_arg1:String, _arg2:uint, _arg3:uint):void{
var _local4:Object = map.tiles[_arg1];
var _local5:Object = map.area[_arg2][_arg3];
if (_local4.jenis != 80){
_local4.destroy_onExpand();
_local4.fjenis2(80, false);
_local5.lahan = true;
_local5.idefault = false;
_local4.idefault = false;
map.walkable[i][j] = _local4.walkable;
_local4.tileJikaLahan();
gridCanvas.bitmapData.copyPixels(main.RenderTile.captureArray[24], main.RenderTile.areaRectangle, _local4.dp, null, null, true);
};
_local4 = null;
_local5 = null;
}
private function CreatingSceneryDefault(_arg1:Boolean=false):void{
if (_arg1){
} else {
j = 11;
i = 10;
while (i <= bound_x) {
creatingPlant0(i, j, 99, true);
i++;
};
i = 10;
j = 12;
while (j <= bound_y) {
if ((((j < 20)) || ((j > 23)))){
creatingPlant0(i, j, 99, true);
};
j++;
};
j = bound_y;
i = 11;
while (i < bound_x) {
creatingPlant0(i, j, 99, true);
i++;
};
i = bound_x;
j = 12;
while (j <= bound_y) {
creatingPlant0(i, j, 99, true);
j++;
};
};
}
private function creatingPlant(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Object=null):void{
creatingPlant0(_arg1, _arg2, _arg3, _arg4, _arg5, _arg6);
AppliedNewTabs();
}
private function creatingPlant0(_arg1:uint, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Object=null):void{
var _local8:Boolean;
var _local7:String = ((("tile_" + _arg1) + "_") + _arg2);
if (plants[_local7] == null){
plants[_local7] = new Plant();
plants[_local7].idefault = (map.area[_arg1][_arg2].idefault = _arg4);
_local8 = false;
if ((((_arg1 <= 3)) || ((_arg2 <= 4)))){
_local8 = true;
} else {
_local8 = false;
};
plants[_local7].creating(this, _arg6, _arg3, new Point(_arg1, _arg2), _local8);
if (_local8){
InsertTabsAlwaysFront(plants[_local7]);
} else {
InsertTabs(plants[_local7]);
};
};
}
public function InsertTabsAlwaysFront(_arg1, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
var _local5:int;
_local3 = _arg1.bound1;
_local4 = _arg1.bound2;
_local5 = _arg1.ydepth;
var _local6:uint = tabs["front"]["obj"].length;
tabs["front"]["obj"].push({mc:_arg1, bound1:_local3, bound2:_local4, bound3:_local5});
tabs["front"]["ref"][_arg1.name] = tabs["front"]["obj"][_local6];
}
public function AppliedNewTabsAlwaysFront():void{
tabs["front"]["obj"].sortOn(["bound1", "bound3", "bound2"], [(Array.DESCENDING | Array.NUMERIC), Array.NUMERIC, Array.NUMERIC]);
SetObjectDepthAlwaysFront(tabs["front"]);
}
public function SetObjectDepthAlwaysFront(_arg1:Array):void{
var _local2:uint;
var _local4:String;
var _local3:uint;
var _local5:Array = _arg1["obj"];
var _local6:uint = _local5.length;
_local2 = 0;
while (_local2 < _local6) {
_local4 = _local5[_local2].mc.name;
if (_arg1["ref"][_local4] != null){
frontContainer.setChildIndex(_local5[_local2].mc, _local3);
_local3++;
};
_local2++;
};
_local5 = null;
}
public function InsertTabs(_arg1, _arg2:Boolean=false):void{
var _local3:uint;
var _local4:Number;
var _local5:int;
_local3 = _arg1.bound1;
_local4 = _arg1.bound2;
_local5 = _arg1.ydepth;
var _local6:uint = tabs["obj"].length;
tabs["obj"].push({mc:_arg1, bound1:_local3, bound2:_local4, bound3:_local5});
tabs["ref"][_arg1.name] = tabs["obj"][_local6];
}
private function SeeTabs(_arg1:Array):void{
}
public function SetObjectDepth(_arg1:Array):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:String;
var _local6:* = null;
_local4 = _arg1["obj"].length;
_local3 = 0;
_local2 = 0;
while (_local2 < _local4) {
_local6 = _arg1["obj"][_local2].mc;
_local5 = _local6.name;
if (tabs["ref"][_local5] != null){
if (_local6.parent != objContainer){
trace("counter:", _local3);
trace("parent", _local6.parent, _local6.parent.name, _local6.parent_.name);
trace((_local6.parent == objContainer), (_local6.parent_ == objContainer), _local6, _local5);
};
objContainer.setChildIndex(_local6, _local3);
_local3++;
};
_local2++;
};
_local6 = null;
}
public function AppliedNewTabs():void{
tabs["obj"].sortOn(["bound1", "bound3", "bound2"], [(Array.DESCENDING | Array.NUMERIC), Array.NUMERIC, Array.NUMERIC]);
SetObjectDepth(tabs);
}
public function AppliedNewTabs_lantai():void{
lantaiDepth.sortOn(["bound1", "bound3", "ydepth"], [(Array.DESCENDING | Array.NUMERIC), Array.NUMERIC, Array.NUMERIC]);
SetObjectDepth_lantai();
}
public function SetObjectDepth_lantai():void{
var _local1:uint;
var _local2:uint;
var _local3:uint = lantaiDepth.length;
_local2 = (tileBoothSprite.numChildren - _local3);
_local1 = 0;
while (_local1 < _local3) {
tileBoothSprite.setChildIndex(lantaiDepth[_local1].ob, _local2);
_local2++;
_local1++;
};
}
public function CreateNewObject(_arg1):void{
var _local2:String = _arg1.jenis;
if (_local2 == "Tile"){
creatingTile(_arg1.mtile.x, _arg1.mtile.y, _arg1.sub);
main.PlaySound("coin1");
} else {
if (_local2 == "Scenery"){
creatingPlant(_arg1.mtile.x, _arg1.mtile.y, _arg1.sub);
} else {
if (_local2 == "Booth"){
creatingBooth(_arg1.sub, _arg1.mtile.x, _arg1.mtile.y);
if (_arg1.sub == "Cottage"){
main.PlaySound("build");
} else {
if (_arg1.sub == "Lodge"){
main.PlaySound("build");
};
};
};
};
};
}
public function destroyITabs(_arg1, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Boolean=true, _arg5:Boolean=false):void{
var _local7:Point;
var _local8:int;
var _local6:Boolean;
if (_arg4){
_local6 = map.walkable[_arg1.ptile.x][_arg1.ptile.y];
_local7 = new Point(_arg1.ptile.x, _arg1.ptile.y);
if (_local6){
_local6 = false;
map.walkable[_arg1.ptile.x][_arg1.ptile.y] = false;
};
};
if (_arg2){
_local8 = tabs["obj"].indexOf(tabs["ref"][_arg1.name]);
tabs["obj"].splice(_local8, 1);
tabs["ref"][_arg1.name] = null;
_arg1.removingData();
if (!_arg5){
AppliedNewTabs();
};
};
if (_arg3){
trace("__ipath on destroyITabs");
updateTilesPath_all(_local7, _local6);
if (!_arg5){
main.adaPathBaru = true;
};
};
}
public function findPathM_update(_arg1, _arg2:Point, _arg3:Boolean):void{
var _local4:String;
for (_local4 in _arg1) {
booths[_local4].updatePathVars(_arg2, _arg3);
findPath(booths[_local4]);
};
}
public function findPathFunction():void{
color_id = 0;
findPath(lobby);
findPathM(booths);
}
public function findPathM(_arg1):void{
var _local2:String;
for (_local2 in _arg1) {
findPath(booths[_local2]);
};
}
public function findPath(_arg1, _arg2:Boolean=false):void{
var _local3:uint;
var _local4:int;
var _local5:int;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:String;
var _local17:String;
var _local18:int;
var _local19:int;
var _local20:Array;
var _local21:Array;
var _local22:Array;
var _local11:Point = new Point();
var _local12:Array = _arg1.tpointAr;
var _local13:Point = _arg1.ptile;
var _local14:Array = _arg1["map"];
var _local15:Array = _arg1.pathsGo;
var _local16:Array = _arg1.paths;
_local3 = _local12.length;
_local4 = 0;
while (_local4 < _local3) {
queue = [];
head = 0;
tail = 0;
_local15[_local4] = [];
_local16[_local4] = [];
_local5 = 0;
while (_local5 < COLS) {
_arg1.paths[_local4][_local5] = [];
_local5++;
};
if ((_arg1 is JanitorRoom)){
_local11 = _local12[_local4];
} else {
_local11 = new Point((_local12[_local4].x + _local13.x), (_local12[_local4].y + _local13.y));
};
do {
_local6 = 0;
while (_local6 < 4) {
_local8 = (_local11.x + DX[_local6]);
_local9 = (_local11.y + DY[_local6]);
if (((_local14[_local8][_local9]) && (!(_local16[_local4][_local8][_local9])))){
var _local23 = tail++;
queue[_local23] = new Point(_local8, _local9);
_local16[_local4][_local8][_local9] = _local11;
};
_local6++;
};
_local11 = queue[head++];
} while (tail >= head);
drawPaths(_arg1, _local4, _arg2);
_local4++;
};
_local12 = null;
_local15 = null;
_local16 = null;
if ((_arg1 is Booth)){
if (_arg1.jenis != "JanitorRoom"){
_local20 = _arg1.outPoint;
_local21 = _arg1.pathsInside["go"];
_local22 = _arg1.pathsInside["paths"];
_local3 = _local20.length;
_local4 = 0;
while (_local4 < _local3) {
queue = [];
head = 0;
tail = 0;
_local21[_local4] = [];
_local22[_local4] = [];
for (_local10 in _local20["MAP"]) {
_local22[_local4][_local10] = null;
};
_local11 = _local20[_local4];
do {
_local6 = 0;
while (_local6 < 4) {
_local8 = (_local11.x + DX[_local6]);
_local9 = (_local11.y + DY[_local6]);
_local17 = ((_local8 + "_") + _local9);
if (((_local20["MAP"][_local17]) && (((!(_local22[_local4][_local17])) && (_local14[_local8][_local9]))))){
_local23 = tail++;
queue[_local23] = new Point(_local8, _local9);
_local22[_local4][_local17] = _local11;
};
_local6++;
};
_local11 = queue[head++];
} while (tail >= head);
drawPathsInside(_arg1, _local4);
_local4++;
};
_local21 = null;
_local22 = null;
_local20 = null;
};
};
_local14 = null;
queue = null;
}
private function drawPathsInside(_arg1:Object, _arg2:int):void{
var _local3:Array;
var _local4:String;
var _local5:int;
var _local6:int;
var _local7:Array = _arg1.pathsInside["paths"][_arg2];
var _local8:Array = _arg1.pathsInside["go"][_arg2];
var _local9:Array = _arg1.map;
for (_local4 in _local7) {
_local3 = _local4.split("_");
_local5 = int(_local3[0]);
_local6 = int(_local3[1]);
if (((_local7[_local4]) && (_local9[_local5][_local6]))){
_local8[_local4] = drawArrow(_arg1, _local5, _local6, _local7[_local4], ncolor[color_id], false, false, true);
};
};
_local9 = null;
_local7 = null;
_local8 = null;
_local3 = null;
}
private function drawPaths(_arg1:Object, _arg2:int, _arg3:Boolean=false):void{
var _local5:uint;
var _local6:uint;
var _local4:Point = new Point();
var _local7:Array = _arg1.map;
var _local8:Array = _arg1.paths[_arg2];
var _local9:Array = _arg1.pathsGo[_arg2];
_local5 = 0;
while (_local5 < COLS) {
_local6 = 0;
while (_local6 < ROWS) {
if (((_local7[_local5][_local6]) && (_local8[_local5][_local6]))){
_local4 = new Point(_local8[_local5][_local6].x, _local8[_local5][_local6].y);
if (_local7[_local4.x][_local4.y]){
_local9[((_local5 + "_") + _local6)] = drawArrow(_arg1, _local5, _local6, _local8[_local5][_local6], ncolor[color_id], _arg3);
};
};
_local6++;
};
_local5++;
};
_local7 = null;
_local8 = null;
_local9 = null;
}
private function drawArrow(_arg1, _arg2:int, _arg3:int, _arg4:Point, _arg5:int, _arg6:Boolean=false, _arg7:Boolean=false, _arg8:Boolean=false):Point{
var _local9:int;
var _local10:int;
var _local13:Number;
var _local14:Number;
var _local15:Point;
var _local16:Point;
var _local17:Number;
var _local18:Point;
var _local19:Number;
var _local20:Number;
_local9 = 0;
_local10 = 0;
var _local11:int = (_arg4.x - _arg2);
if (_local11 > 0){
_local9 = 1;
} else {
if (_local11 < 0){
_local9 = -1;
};
};
var _local12:int = (_arg4.y - _arg3);
if (_local12 > 0){
_local10 = 1;
} else {
if (_local12 < 0){
_local10 = -1;
};
};
if (_arg6){
_local13 = SIZE_;
_local14 = (-(SIZE_) * 0.5);
_local15 = new Point((((_arg3 - _arg2) * SIZE_) + _local13), (((-((_arg3 + _arg2)) * SIZE_) * 0.5) + _local14));
_local16 = rumus.findTileCoord_point(_arg4, SIZE_, false, true);
rumus.findTileCoord_point(_arg4, SIZE_, false, true).x = (_local16.x + _local13);
_local16.y = (_local16.y + _local14);
pathSprite.graphics.lineStyle(0.5, _arg5);
pathSprite.graphics.moveTo(_local15.x, _local15.y);
pathSprite.graphics.lineTo(_local16.x, _local16.y);
_local17 = Math.sqrt((Math.pow((_local16.x - _local15.x), 2) + Math.pow((_local16.y - _local15.y), 2)));
_local18 = new Point(((7 * (_local15.x - _local16.x)) / _local17), ((7 * (_local15.y - _local16.y)) / _local17));
_local19 = (_local15.x + ((_local16.x - _local15.x) / 2));
_local20 = (_local15.y + ((_local16.y - _local15.y) / 2));
pathSprite.graphics.moveTo(_local19, _local20);
pathSprite.graphics.lineTo(((_local19 + (_local18.x * 0.866)) - (_local18.y / 2)), ((_local20 + (_local18.x / 2)) + (_local18.y * 0.866)));
pathSprite.graphics.moveTo(_local19, _local20);
pathSprite.graphics.lineTo(((_local19 + (_local18.x * 0.866)) + (_local18.y / 2)), ((_local20 - (_local18.x / 2)) + (_local18.y * 0.866)));
};
return (new Point(_local9, _local10));
}
public function alphaObjectDefault(_arg1:Boolean=true):void{
j = 11;
i = 10;
while (i <= bound_x) {
alphaObjectDefault_plants(i, j, _arg1);
i++;
};
i = 10;
j = 12;
while (j <= bound_y) {
if ((((j < 20)) || ((j > 23)))){
alphaObjectDefault_plants(i, j, _arg1);
};
j++;
};
j = bound_y;
i = 11;
while (i < bound_x) {
alphaObjectDefault_plants(i, j, _arg1);
i++;
};
i = bound_x;
j = 12;
while (j <= bound_y) {
alphaObjectDefault_plants(i, j, _arg1);
j++;
};
blokCanvas.visible = ((main.onGeneralAlpha)==true) ? true : false;
}
private function alphaObjectDefault_plants(_arg1:uint, _arg2:uint, _arg3:Boolean):void{
var _local4:String = ((("tile_" + _arg1) + "_") + _arg2);
if (plants[_local4] != null){
plants[_local4].alphaObject2(_arg3);
};
}
private function creatingBooth(_arg1:String, _arg2:uint, _arg3:uint, _arg4:Boolean=false, _arg5:Boolean=false, _arg6:Object=null):void{
var _local7:Class = (getDefinitionByName(_arg1) as Class);
var _local8:Booth = new (_local7);
_local8.creating(this, _arg5, _arg6, new Point(_arg2, _arg3));
if (_arg4){
_local8.asDefault();
};
booths[_local8.name] = _local8;
InsertTabs(_local8);
AppliedNewTabs();
AppliedNewTabs_lantai();
destinationList[_local8.name] = true;
_local8 = null;
}
public function createObjectRecord_booth(_arg1:Object=null):void{
creatingBooth(_arg1.jenis, _arg1.ptile.x, _arg1.ptile.y, false, true, _arg1);
}
public function createObjectRecord_Mobil(_arg1:Object=null):void{
creatingCar(_arg1.jenis, false, true, _arg1);
}
public function khususTest(_arg1:Boolean=false, _arg2:uint=1):void{
newMobil();
}
public function newMobil(_arg1:Boolean=true):void{
var _local2:Number = (Math.random() * 100);
if (_local2 > 45){
creatingCar("Bus", _arg1);
} else {
creatingCar("Box", _arg1);
};
}
public function creatingCar(_arg1:String, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null, _arg5:uint=0):void{
var _local6:MovieClip = new Mobil();
_local6.creating(this, _arg1, _arg3, _arg2, _arg4, _arg5);
_local6 = null;
}
public function newVisitorSpecial(_arg1:uint):void{
var _local2:uint;
_local2 = serbi.dataOb.Visitor[("Visitor" + _arg1)].car;
if (_local2 == 1){
creatingCar("Bus", false, false, null, _arg1);
} else {
creatingCar("Box", false, false, null, _arg1);
};
}
public function newVisitor(_arg1:Boolean=false, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local9:Boolean;
var _local13:Boolean;
_local5 = main.game.Cottage_booked;
_local6 = main.game.Lodge_booked;
var _local8:int = (main.checkTotalRooms() - (_local5 + _local6));
var _local10:Number = 0;
var _local11:Number = 0;
var _local12:Array;
_local9 = ((((main["hourDay"] > 20)) || ((main["hourDay"] < 6)))) ? true : ((main["day"])<2) ? true : false;
if (_local8 <= 0){
if (_local9){
_local12 = serbi.dataOb.Visitor.TanpaOld;
_local7 = _local12.length;
_local4 = co.randomRangeR(_local7);
_local4 = _local12[_local4];
} else {
_local4 = co.randomRange(1, 24);
};
} else {
bantuRand = ((main["day"])<8) ? 1 : (Math.random() * 100);
if (bantuRand > 95){
if (_local9){
_local12 = serbi.dataOb.Visitor.TanpaOld;
_local7 = _local12.length;
_local4 = co.randomRangeR(_local7);
_local4 = _local12[_local4];
} else {
_local4 = co.randomRange(1, 24);
};
} else {
if (_local8 > 0){
_local10 = ((main.jumlah_cottage - _local5) / _local8);
_local11 = ((main.jumlah_lodge - _local6) / _local8);
};
_local13 = false;
if (_local10 > _local11){
bantuRand = (Math.random() * 1);
if (_local11 > 0){
_local13 = ((bantuRand)>_local11) ? true : false;
} else {
_local13 = false;
};
} else {
_local13 = true;
};
if (_local13){
_local12 = (_local9) ? serbi.dataOb.Visitor.Lodge_TanpaOld : serbi.dataOb.Visitor.Lodge;
_local7 = _local12.length;
_local4 = co.randomRangeR(_local7);
_local4 = _local12[_local4];
} else {
_local12 = (_local9) ? serbi.dataOb.Visitor.Cottage_TanpaOld : serbi.dataOb.Visitor.Cottage;
_local7 = _local12.length;
_local4 = co.randomRangeR(_local7);
_local4 = _local12[_local4];
};
};
};
_local12 = null;
creatingVisitor(_local4, _arg1, _arg2);
}
public function creatingVisitor(_arg1:uint, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Boolean=false, _arg5:Object=null):void{
var _local6:Visitor = new Visitor();
_local6.creating(this, _arg1, _arg4, _arg2, _arg3, _arg5);
_local6 = null;
}
public function createObjectRecord_visitor(_arg1:Object=null):void{
creatingVisitor(_arg1.jenis, _arg1.dummy, _arg1.car, true, _arg1);
}
public function creatingJanitor(_arg1, _arg2:Boolean=false, _arg3:Boolean=false, _arg4:Object=null):void{
}
public function createObjectRecord(_arg1:String, _arg2:Object=null):void{
var _local3:Point = new Point(_arg2.ptile.x, _arg2.ptile.y);
if (_arg1 == "Scenery"){
creatingPlant(_local3.x, _local3.y, _arg2.jenis, false, true, _arg2);
} else {
if (_arg1 == "tiles"){
addNewTile(_local3.x, _local3.y, _arg2.jenis, true, _arg2);
};
};
}
public function createObjectRecord_sampah(_arg1:Object=null):void{
var _local2:Point = new Point(_arg1.ptile.x, _arg1.ptile.y);
var _local3:String = ((("tile_" + _local2.x) + "_") + _local2.y);
map.tiles[_local3].createSampah(_arg1.jenis, true, _arg1);
}
public function createSampah():void{
var _local1:Point = new Point(main.navigatorX.pos1_t.text, main.navigatorX.pos2_t.text);
var _local2:String = ((("tile_" + _local1.x) + "_") + _local1.y);
map.tiles[_local2].createSampah(1);
}
public function createObjectRecord_janitor(_arg1:Object=null):void{
}
}
}//package pack
Section 111
//Mouse1 (pack.Mouse1)
package pack {
import flash.display.*;
public class Mouse1 extends MovieClip {
private var main:Object;
public var jenis:String;// = ""
public function Mouse1():void{
this.mouseEnabled = false;
this.mouseChildren = false;
}
public function init(_arg1:Object):void{
main = _arg1;
ChangeMouse("none");
}
public function showing(_arg1:Boolean=true):void{
this.visible = _arg1;
}
public function ChangeMouse(_arg1:String="none"):void{
if (jenis != _arg1){
jenis = _arg1;
if (jenis == "none"){
this.gotoAndStop(3);
this.visible = false;
} else {
if (jenis == "drag"){
this.gotoAndStop(1);
} else {
if (jenis == "destroy"){
this.gotoAndStop(2);
};
};
};
};
}
public function removingAll():void{
main = null;
}
}
}//package pack
Section 112
//rumus (pack.rumus)
package pack {
import flash.geom.*;
public class rumus {
public static const SIZE_:Number = 24;
public static function findTileCoord(_arg1:Point=null, _arg2:String="", _arg3:Number=0, _arg4:Boolean=false, _arg5:Boolean=false):Number{
var _local6:Number;
if (_arg3 == 0){
_arg3 = SIZE_;
};
var _local7:Number = 0;
if (_arg2 == "x"){
if (_arg4){
_local7 = _arg3;
};
_local6 = ((_arg1.y - _arg1.x) * _arg3);
_local6 = (_local6 + _local7);
} else {
if (_arg4){
_local7 = (_arg3 * 0.5);
};
_local6 = (((_arg1.y + _arg1.x) * _arg3) * 0.5);
_local6 = (_local6 + _local7);
_local6 = (_local6 * -1);
};
return (_local6);
}
public static function findTileCoord_point(_arg1:Point=null, _arg2:Number=0, _arg3:Boolean=false, _arg4:Boolean=false):Point{
if (_arg2 == 0){
_arg2 = SIZE_;
};
var _local5:Point = new Point();
var _local6:Number = 0;
if (_arg3){
_local6 = _arg2;
};
_local5.x = ((_arg1.y - _arg1.x) * _arg2);
_local5.x = (_local5.x + _local6);
_local6 = 0;
if (_arg3){
_local6 = (_arg2 * 0.5);
};
_local5.y = (((_arg1.y + _arg1.x) * _arg2) * 0.5);
_local5.y = (_local5.y + _local6);
_local5.y = (_local5.y * -1);
return (_local5);
}
public static function findTile(_arg1:Number, _arg2:Number, _arg3:Number=0, _arg4:Boolean=false):Point{
var _local6:*;
var _local7:Number;
var _local8:*;
var _local9:Number;
if (_arg3 == 0){
_arg3 = SIZE_;
};
var _local5:Point = new Point();
_local8 = 0;
_local9 = 0;
_arg2 = (_arg2 + _local8);
_arg1 = (_arg1 + _local9);
_arg1 = (_arg1 * -1);
_local7 = (((2 * _arg1) - _arg2) * 0.5);
_local6 = (_arg2 + _local7);
_local5.x = Math.round((_local7 / _arg3));
if (_arg4){
_local5.y = (Math.round((_local6 / _arg3)) - 1);
} else {
_local5.y = (Math.round((_local6 / _arg3)) - 1);
};
return (_local5);
}
public static function findDepth(_arg1:Object, _arg2:Point){
var _local3:Number = (((_arg1.iso.y - _arg1.depthshift) - _arg1.iso.x) + 10000);
return (_local3);
}
public static function findDepthI(_arg1:Point, _arg2:uint){
var _local3:Number = ((_arg1.x + _arg1.y) + Math.max(_arg1.x, _arg1.y));
if (_arg2 == 1){
return ((_local3 * 0.5));
};
return (((_local3 * 0.5) - 1));
}
public static function findIso(_arg1, _arg2:Point, _arg3:Number):Point{
var _local4:Point = new Point();
_local4.x = (_arg2.x - _arg2.y);
_local4.y = ((_arg2.x + _arg2.y) * 0.5);
_arg1.depthshift = ((_arg3 - (_arg3 / 2)) * 0.5);
return (_local4);
}
public static function findIso2(_arg1, _arg2:Point, _arg3:Number):Point{
var _local4:Point = new Point();
_local4.x = (_arg2.x - _arg2.y);
_local4.y = ((_arg2.x + _arg2.y) * 0.5);
_arg1.depthshift = ((_arg3 - (_arg3 / 2)) * 0.5);
return (_local4);
}
public static function findIsoDepth(_arg1, _arg2:Point, _arg3:Number, _arg4:Point=null){
var _local6:uint;
var _local7:uint;
if (_arg4 == null){
_arg4 = new Point(1, 1);
};
var _local5:Point = new Point();
trace("/n>>findIsoDepth>>", _arg1.name, _arg2, _arg4);
var _local8:uint = _arg4.x;
var _local9:uint = _arg4.y;
_local6 = 0;
while (_local6 < _local8) {
_local7 = 0;
while (_local7 < _local9) {
_local5.x = (_arg2.x - _local6);
_local5.y = (_arg2.y + _local7);
trace("range build>>", _local5);
_local7++;
};
_local6++;
};
}
public static function ampm(_arg1:uint):String{
var _local2:String;
if (_arg1 == 0){
_local2 = "24 Hours";
} else {
if ((((_arg1 >= 0)) && ((_arg1 <= 12)))){
if (_arg1 > 9){
_local2 = (_arg1 + ".00 am");
} else {
_local2 = (("0" + _arg1) + ".00 am");
};
} else {
_arg1 = (_arg1 - 12);
if (_arg1 > 9){
_local2 = (_arg1 + ".00 pm");
} else {
_local2 = (("0" + _arg1) + ".00 pm");
};
};
};
return (_local2);
}
public static function spliceArrayObject(_arg1:Array, _arg2, _arg3:String=null){
var _local4:uint;
var _local5:uint = _arg1.length;
_local4 = 0;
while (_local4 < _local5) {
if (_arg1[_local4][_arg3] == _arg2){
_arg1.splice(_local4, 1);
break;
};
_local4++;
};
}
public static function searchCompareIndex(_arg1:Array, _arg2:Array, _arg3:uint, _arg4:String):int{
var _local6:uint;
var _local5 = -1;
var _local7:uint = _arg1.length;
_local6 = 0;
while (_local6 < _local7) {
if (_arg1[_local6][_arg4] == _arg2[_arg3][_arg4]){
_local5 = _local6;
break;
};
_local6++;
};
return (_local5);
}
public static function searchIndex(_arg1:Array, _arg2:uint, _arg3, _arg4:String):int{
var _local6:uint;
var _local7:uint;
var _local5 = -1;
if (_arg4 == ""){
_local7 = _arg1.length;
_local6 = 0;
while (_local6 < _local7) {
if (_arg1[_local6] == _arg1[_arg2][_arg3]){
_local5 = _local6;
break;
};
_local6++;
};
} else {
_local7 = _arg1[_arg4].length;
_local6 = 0;
while (_local6 < _local7) {
if (_arg1[_arg4][_local6] == _arg1[_arg2][_arg3]){
_local5 = _local6;
break;
};
_local6++;
};
};
return (_local5);
}
public static function hitungBoost(_arg1, _arg2:Number):Number{
var _local3:Number;
_local3 = (_arg1 + (Math.random() * (_arg2 - _arg1)));
return (_local3);
}
}
}//package pack
Section 113
//serbi (pack.serbi)
package pack {
import flash.geom.*;
public class serbi {
public static var m:uint;
public static var n:uint;
public static var EXPAND:Array = [{COLS:37, ROWS:37, lahan:new Point(16, 16)}, {COLS:43, ROWS:43, lahan:new Point(22, 22)}, {COLS:50, ROWS:50, lahan:new Point(29, 29)}];
public static var enterArray:Array = [new Point(7, 3), new Point(8, 3), new Point(9, 3), new Point(7, 0), new Point(8, 0), new Point(9, 0)];
public static var outerArray:Array = [new Point(7, 0), new Point(8, 0), new Point(9, 0), new Point(7, 3), new Point(8, 3), new Point(9, 3)];
public static var enterCar:Array = [new Point(5, 0), new Point(4, 0), new Point(0, 5), new Point(0, 6), new Point(-1, -1)];
public static var outerCar:Array = [new Point(5, 1), new Point(4, 1), new Point(1, 5), new Point(1, 6), new Point(-1, -1)];
public static var enterByCar:Array = [new Point(6, 20), new Point(6, 21), new Point(6, 22), new Point(7, 22)];
public static var tileTutorial:Array = ["16_21", "17_21", "17_22", "17_23", "18_22", "18_23"];
public static var resortName:Array = ["SUMMER ISLAND", "BULABULA RESORT", "FANTASY LAND", "HAPPY PARADISE", "MY WONDERLAND", "HOME SWEET LAND", "GREEN ISLAND", "RAINBOW ISLE", "SILVER PARADISE", "DIAMOND RESORT", "LITTLEGIANT WORLD"];
public static var dataOb:Object = {};
public static var Mission:Object = {};
public static var Achievements:Array = [];
public static var Extra_Upgrade:Object = {};
public static var Unlocked:Object = {};
public static var ResearchPoint:Object = {};
public static var Tips:Object = {};
public static function enterArrayI(_arg1:String, _arg2:uint, _arg3:uint):Point{
var _local5:int;
var _local4:Point = new Point();
if (_arg1 == "car"){
_local4.x = enterCar[_arg2].x;
_local4.y = enterCar[_arg2].y;
_local5 = EXPAND[_arg3].COLS;
_local4.y = ((_local4.y)==0) ? (_local5 - 5) : ((_local4.y)==-1) ? (_local5 - 6) : _local4.y;
_local5 = EXPAND[_arg3].ROWS;
_local4.x = ((_local4.x)==0) ? (_local5 - 3) : ((_local4.x)==-1) ? (_local5 - 6) : _local4.x;
} else {
if (_arg1 == "people"){
_local4.x = enterArray[_arg2].x;
_local4.y = enterArray[_arg2].y;
} else {
if (_arg1 == "bycar"){
_local4.x = enterByCar[_arg2].x;
_local4.y = enterByCar[_arg2].y;
};
};
_local5 = EXPAND[_arg3].COLS;
if (_local4.y == 0){
_local4.y = (_local5 - 3);
};
};
return (_local4);
}
public static function outerArrayI(_arg1:String, _arg2:uint, _arg3:uint):Point{
var _local5:int;
var _local4:Point = new Point();
if (_arg1 == "people"){
_local4.x = outerArray[_arg2].x;
_local4.y = outerArray[_arg2].y;
} else {
_local4.x = outerCar[_arg2].x;
_local4.y = outerCar[_arg2].y;
};
_local5 = EXPAND[_arg3].COLS;
_local4.y = ((_local4.y)==0) ? (_local5 - 3) : ((_local4.y)==-1) ? (_local5 - 6) : _local4.y;
_local5 = EXPAND[_arg3].ROWS;
_local4.x = ((_local4.x)==0) ? (_local5 - 3) : ((_local4.x)==-1) ? 1 : _local4.x;
return (_local4);
}
public static function canceledMood(_arg1:Array, _arg2:Boolean=true):Array{
var _local3:Array = [];
var _local4:uint = _arg1.length;
if (_arg2){
m = 0;
while (m < _local4) {
_local3.push([(_arg1[m][0] / 4), (_arg1[m][1] / 4)]);
m++;
};
} else {
m = 0;
while (m < _local4) {
_local3.push([(_arg1[m] / 2), (_arg1[m] / 2)]);
m++;
};
};
return (_local3);
}
public static function checkMood(_arg1:Number):String{
var _local2:String = ((_arg1)>80) ? "very_happy" : ((_arg1)>65) ? "happy" : ((_arg1)>55) ? "neutral" : ((_arg1)>35) ? "upset" : "very_upset";
return (_local2);
}
public static function removeDuplicates(_arg1:Array, _arg2:Array):Array{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local7:uint;
var _local8:uint;
var _local6:uint = _arg1.length;
var _local9:Array = [];
_local3 = 0;
while (_local3 < _local6) {
_local7 = _local9.length;
_local5 = 0;
while (_local5 < _local7) {
if (_arg1[_local3] == _local9[_local5]){
//unresolved jump
};
_local5++;
};
_local8 = _arg2.length;
_local4 = 0;
while (_local4 < _local8) {
if (_arg1[_local3] == _arg2[_local4]){
//unresolved jump
};
_local4++;
};
_local9.push(_arg1[_local3]);
_local3++;
};
return (_local9);
}
public static function otherFacility(_arg1:Array):Array{
var _local3:String;
var _local4:String;
var _local5:uint;
var _local6:uint;
var _local2:Array = dataOb.listing.concat();
_local5 = _arg1.length;
n = 0;
while (n < _local5) {
_local4 = _arg1[n];
_local6 = _local2.length;
m = 0;
while (m < _local6) {
_local3 = _local2[m];
if (_local3 == _local4){
_local2.splice(m, 1);
break;
};
m++;
};
n++;
};
return (_local2);
}
EXPAND["price"] = [0, 20000, 125000];
dataOb.Scenery = {};
dataOb.Scenery.PLANT_0 = {nama:"EMPTY", lbl:"p_empty", jenis:0, fr:0, price:0, pop:0};
dataOb.Scenery.PLANT_99 = {nama:"CORNER PLANT", lbl:"p_corner", jenis:99, fr:10, price:0, pop:0};
dataOb.Scenery.PLANT_1 = {nama:"CANNA", lbl:"_plant_canna", jenis:1, fr:1, price:35, pop:0.06, unlocked_level:0, unlocked_persen:0};
dataOb.Scenery.PLANT_2 = {nama:"PINELLIA", lbl:"_plant_pinelia", jenis:2, fr:2, price:40, pop:0.07, unlocked_level:0, unlocked_persen:0};
dataOb.Scenery.PLANT_3 = {nama:"WINDMILL PALM", lbl:"_plant_windmill", jenis:3, fr:3, price:40, pop:0.08, unlocked_level:0, unlocked_persen:0};
dataOb.Scenery.PLANT_4 = {nama:"BAMBOO TREE", lbl:"_plant_bamboo", jenis:4, fr:4, price:50, pop:0.09, unlocked_level:0, unlocked_persen:50};
dataOb.Scenery.PLANT_5 = {nama:"CEDAR TREE 1", lbl:"_plant_cedar1", jenis:5, fr:5, price:75, pop:0.105, unlocked_level:1, unlocked_persen:5};
dataOb.Scenery.PLANT_6 = {nama:"CEDAR TREE 2", lbl:"_plant_cedar2", jenis:6, fr:6, price:90, pop:0.115, unlocked_level:1, unlocked_persen:75};
dataOb.Scenery.PLANT_7 = {nama:"PALM TREE", lbl:"_plant_palm", jenis:7, fr:7, price:90, pop:0.14, unlocked_level:2, unlocked_persen:15};
dataOb.Scenery.PLANT_8 = {nama:"MAPLE TREE", lbl:"_plant_maple", jenis:8, fr:8, price:100, pop:0.155, unlocked_level:3, unlocked_persen:0};
dataOb.Scenery.PLANT_9 = {nama:"ACC", lbl:"_trees", jenis:9, fr:0, price:0, pop:0};
dataOb.Scenery.PLANT_10 = {nama:"ACC", lbl:"acc_1", jenis:10, fr:12, price:0, pop:0};
dataOb.Scenery.PLANT_11 = {nama:"ACC", lbl:"acc_2", jenis:11, fr:13, price:0, pop:0};
dataOb.Scenery.PLANT_12 = {nama:"ACC", lbl:"acc_3", jenis:12, fr:14, price:0, pop:0};
dataOb.Scenery.PLANT_13 = {nama:"ACC", lbl:"acc_4", jenis:13, fr:15, price:0, pop:0};
dataOb.Scenery.PLANT_14 = {nama:"ACC", lbl:"acc_5", jenis:13, fr:16, price:0, pop:0};
dataOb.Scenery.PLANT_15 = {nama:"ACC", lbl:"acc_6", jenis:13, fr:17, price:0, pop:0};
dataOb.Scenery.PLANT_16 = {nama:"ACC", lbl:"acc_7", jenis:14, fr:18, price:0, pop:0};
dataOb.Scenery.PLANT_17 = {nama:"ACC", lbl:"acc_8", jenis:15, fr:19, price:0, pop:0};
dataOb.Scenery.listing = ["PLANT_1", "PLANT_2", "PLANT_3", "PLANT_4", "PLANT_5", "PLANT_6", "PLANT_7", "PLANT_8"];
dataOb.Tile = {};
dataOb.Tile.TILE_0 = {nama:"EMPTY TILE", mainJenis:0, lbl:"_empty", jenis:0, fr:24, walkable:false, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_1 = {nama:"TILE 1", mainJenis:0, lbl:"_tile1", jenis:1, fr:10, walkable:true, plenty:false, price:25, pop:0};
dataOb.Tile.TILE_2 = {nama:"TILE 2", mainJenis:0, lbl:"_tile2", jenis:2, fr:11, walkable:true, plenty:false, price:25, pop:0};
dataOb.Tile.TILE_3 = {nama:"TILE 3", mainJenis:0, lbl:"_tile3", jenis:3, fr:12, walkable:true, plenty:false, price:25, pop:0};
dataOb.Tile.TILE_4 = {nama:"TILE 4", mainJenis:0, lbl:"_tile4", jenis:4, fr:13, walkable:true, plenty:false, price:25, pop:0};
dataOb.Tile.TILE_5 = {nama:"GRASS (NO CORNER)", mainJenis:1, lbl:"_tile_grass0", jenis:5, fr:14, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_6 = {nama:"GRASS 1", mainJenis:1, lbl:"_tile_grass1", jenis:6, fr:15, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_7 = {nama:"GRASS 2", mainJenis:1, lbl:"_tile_grass2", jenis:7, fr:16, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_8 = {nama:"GRASS 3", mainJenis:1, lbl:"_tile_grass3", jenis:8, fr:17, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_9 = {nama:"GRASS 4", mainJenis:1, lbl:"_tile_grass4", jenis:9, fr:18, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_10 = {nama:"GRASS 5", mainJenis:1, lbl:"_tile_grass5", jenis:10, fr:19, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_11 = {nama:"GRASS 6", mainJenis:1, lbl:"_tile_grass6", jenis:11, fr:20, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_12 = {nama:"GRASS 7", mainJenis:1, lbl:"_tile_grass7", jenis:12, fr:21, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_13 = {nama:"GRASS 8", mainJenis:1, lbl:"_tile_grass8", jenis:13, fr:22, walkable:false, plenty:true, price:35, pop:0.035};
dataOb.Tile.TILE_15 = {fr:26};
dataOb.Tile.TILE_80 = {nama:"SAND TILE", mainJenis:0, lbl:"_sand", jenis:80, fr:7, walkable:false, plenty:true, price:0, pop:0};
dataOb.Tile.TILE_81 = {nama:"CORNER TILE", mainJenis:0, lbl:"_corner", jenis:81, fr:0, walkable:false, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_82 = {nama:"SIDEWALK TILE", mainJenis:0, lbl:"_trotoar", jenis:82, fr:8, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_83 = {nama:"ASPHALT TILE", mainJenis:0, lbl:"_aspal", jenis:83, fr:9, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_93 = {nama:"OUTER", mainJenis:0, lbl:"_outer", jenis:93, fr:25, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_94 = {nama:"LOBBY TILE 1", mainJenis:0, lbl:"_lobby1", jenis:94, fr:4, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_95 = {nama:"LOBBY TILE 2", mainJenis:0, lbl:"_lobby2", jenis:95, fr:5, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_96 = {nama:"LOBBY TILE 3", mainJenis:0, lbl:"_lobby3", jenis:96, fr:6, walkable:true, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_97 = {nama:"HALANG TILE", mainJenis:0, lbl:"_halang", jenis:97, fr:0, walkable:false, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_98 = {nama:"TEHEL TILE", mainJenis:0, lbl:"_tehel", jenis:98, fr:2, walkable:false, plenty:false, price:0, pop:0};
dataOb.Tile.TILE_99 = {nama:"TEMP TILE", mainJenis:0, lbl:"_temp", jenis:99, fr:3, walkable:false, plenty:false, price:0, pop:0};
dataOb.Booth = {};
dataOb.Booth.boostMood = {targeted:0.02, antri:[0.007, 0.01, 0.0125], masuk:[0.01, 0.0125, 0.0175]};
dataOb.Booth.Lobby = {nama:"LOBBY RESORT", nic:"LOBBY", ROWS:4, COLS:2, fr:1, wall:1, wall_alpha:4, blok:50, standbooth:false, mainJenis:"Lobby", jenis:"Lobby", price:[0, 10000, 20000], booked_price:0, opened:0, closed:0, xpt:0, drainpop:1, sumStaff:2, salary:[36, 60, 72], RP_upgrade:[0, 6, 10], pop:[0, 3, 5, 0], Exp_add:[[2, 1, 1, 1], [4, 3, 2, 1], [6, 5, 2, 1]], Exp:[0, 350, 1000], UT:[0, 0, 0], boostMood:{served:[0.1, 0.2, 0.3]}};
dataOb.Booth.Cottage = {nama:"COTTAGE", nic:"COTTAGE", ROWS:2, COLS:2, fr:4, wall:13, wall_alpha:16, blok:51, standbooth:false, mainJenis:"Room", jenis:"Cottage", price:[1000, 1200, 1440], booked_price:[100, 120, 192], opened:0, closed:0, xpt:10, drainpop:5, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 3, 8], pop:[1, 1.55, 2, 0.5], Exp_add:[[2, 2, 1, 1], [3, 2, 2, 1], [5, 4, 2, 1]], Exp:[0, 12, 28], UT:[0, 0, 0], boostMood:{served:[[0.04, 0.1], [0.055, 0.15], [0.1, 0.2]], canceled:[]}};
dataOb.Booth.Lodge = {nama:"LODGE", nic:"LODGE", ROWS:2, COLS:3, fr:7, wall:7, wall_alpha:10, blok:56, standbooth:false, mainJenis:"Room", jenis:"Lodge", price:[2500, 3000, 4000], booked_price:[250, 300, 480], opened:0, closed:0, xpt:15, drainpop:5, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 4, 9], pop:[1, 1.75, 2.25, 0.75], Exp_add:[[3, 2, 1, 1], [4, 3, 2, 1], [6, 5, 2, 1]], Exp:[0, 13, 30], UT:[0, 0, 0], boostMood:{served:[[0.05, 0.12], [0.075, 0.15], [0.125, 0.25]], canceled:[]}};
dataOb.Booth.Sauna = {nama:"SAUNA", nic:"SAUNA", ROWS:2, COLS:2, fr:41, wall:89, wall_alpha:92, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Sauna", price:[1200, 1440, 1920], booked_price:[24, 29, 77], opened:6, closed:20, xpt:5, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[1, 1, 1, 1], [2, 2, 1, 1], [3, 2, 2, 1]], Exp:[0, 32, 95], UT:[0, 2, 5], boostMood:{served:[[0.025, 0.04], [0.03, 0.05], [0.05, 0.075]], canceled:[]}, extraUpgrade:null};
dataOb.Booth.Gym = {nama:"FITNESS CENTER", nic:"FITNESS C.", ROWS:2, COLS:2, fr:47, wall:101, wall_alpha:104, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Gym", price:[1500, 1800, 2400], booked_price:[30, 36, 96], opened:6, closed:21, xpt:5, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[1, 1, 1, 1], [2, 2, 1, 1], [3, 2, 2, 1]], Exp:[0, 42, 102], UT:[0, 2, 5], boostMood:{served:[[0.03, 0.07], [0.035, 0.075], [0.055, 0.09]], canceled:[]}, extraUpgrade:"treadmill"};
dataOb.Booth.Bar = {nama:"BAR AND LOUNGE", nic:"BAR", ROWS:2, COLS:2, fr:29, wall:65, wall_alpha:68, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Bar", price:[2500, 3000, 4000], booked_price:[50, 60, 160], opened:17, closed:5, xpt:8, drainpop:2, sumStaff:1, salary:[30, 36, 42], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[1, 1, 1, 1], [2, 2, 1, 1], [3, 2, 2, 1]], Exp:[0, 35, 98], UT:[0, 2, 5], boostMood:{served:[[0.035, 0.09], [0.04, 0.1], [0.07, 0.1]], canceled:[]}, extraUpgrade:"leaf"};
dataOb.Booth.Jacuzi = {nama:"JACCUZI", nic:"JACCUZI", ROWS:2, COLS:2, fr:32, wall:71, wall_alpha:74, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Jacuzi", price:[3000, 3600, 4800], booked_price:[60, 72, 192], opened:6, closed:0, xpt:5, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[1, 1, 1, 1], [2, 2, 1, 1], [3, 2, 2, 1]], Exp:[0, 40, 111], UT:[0, 2, 5], boostMood:{served:[[0.03, 0.05], [0.035, 0.06], [0.055, 0.075]], canceled:[]}, extraUpgrade:"heater"};
dataOb.Booth.Arcade = {nama:"ARCADE GAMEZONE", nic:"GAMEZONE", ROWS:2, COLS:2, fr:13, wall:25, wall_alpha:28, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Arcade", price:[4000, 4800, 0x1900], booked_price:[80, 96, 0x0100], opened:10, closed:21, xpt:5, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[2, 1, 1, 1], [3, 2, 1, 1], [4, 3, 2, 1]], Exp:[0, 50, 121], UT:[0, 2, 5], boostMood:{served:[[0.02, 0.04], [0.03, 0.05], [0.05, 0.06]], canceled:[]}, extraUpgrade:"wine"};
dataOb.Booth.IndiaResto = {nama:"INDIA RESTAURANT", nic:"INDIA RESTO", ROWS:2, COLS:2, fr:16, wall:31, wall_alpha:34, blok:51, standbooth:false, mainJenis:"Facility", jenis:"IndiaResto", price:[5000, 6000, 8000], booked_price:[100, 120, 320], opened:8, closed:20, xpt:8, drainpop:2, sumStaff:1, salary:[30, 36, 42], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[2, 1, 1, 1], [3, 2, 1, 1], [4, 3, 2, 1]], Exp:[0, 52, 140], UT:[0, 2, 5], boostMood:{served:[[0.035, 0.07], [0.04, 0.09], [0.065, 0.09]], canceled:[]}, extraUpgrade:"palm"};
dataOb.Booth.Spa = {nama:"SPA AND MASSAGE", nic:"SPA", ROWS:2, COLS:2, fr:44, wall:95, wall_alpha:98, blok:51, standbooth:false, mainJenis:"Facility", jenis:"Spa", price:[6000, 7200, 9600], booked_price:[120, 144, 384], opened:6, closed:21, xpt:8, drainpop:2, sumStaff:1, salary:[38, 45, 53], RP_upgrade:[0, 4, 7], pop:[0.35, 0.5, 0.75, 0.15], Exp_add:[[2, 1, 1, 1], [3, 2, 1, 1], [4, 3, 2, 1]], Exp:[0, 51, 145], UT:[0, 2, 5], boostMood:{served:[[0.035, 0.05], [0.04, 0.07], [0.065, 0.07]], canceled:[]}, extraUpgrade:"towel"};
dataOb.Booth.JapanResto = {nama:"JAPAN RESTAURANT", nic:"JAPAN RESTO", ROWS:2, COLS:2, fr:23, wall:53, wall_alpha:56, blok:51, standbooth:false, mainJenis:"Facility", jenis:"JapanResto", price:[5500, 6600, 8800], booked_price:[110, 132, 352], opened:15, closed:22, xpt:8, drainpop:2, sumStaff:1, salary:[18, 22, 25], RP_upgrade:[0, 3, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[2, 1, 1, 1], [3, 2, 1, 1], [4, 3, 2, 1]], Exp:[0, 50, 142], UT:[0, 2, 5], boostMood:{served:[[0.035, 0.1], [0.04, 0.12], [0.07, 0.12]], canceled:[]}, extraUpgrade:"bamboo"};
dataOb.Booth.BaratResto = {nama:"WEST RESTAURANT", nic:"WEST RESTO", ROWS:2, COLS:2, fr:26, wall:59, wall_alpha:62, blok:51, standbooth:false, mainJenis:"Facility", jenis:"BaratResto", price:[6000, 7200, 9600], booked_price:[120, 144, 384], opened:14, closed:21, xpt:8, drainpop:2, sumStaff:1, salary:[18, 22, 25], RP_upgrade:[0, 4, 7], pop:[0.25, 0.5, 0.75, 0.15], Exp_add:[[2, 1, 1, 1], [3, 2, 1, 1], [4, 3, 2, 1]], Exp:[0, 52, 147], UT:[0, 2, 5], boostMood:{served:[[0.04, 0.08], [0.045, 0.12], [0.075, 0.12]], canceled:[]}, extraUpgrade:"uniform"};
dataOb.Booth.Medical = {nama:"MEDICAL CENTER", nic:"MEDICAL C.", ROWS:3, COLS:3, fr:38, wall:83, wall_alpha:86, blok:52, standbooth:false, mainJenis:"Facility", jenis:"Medical", price:[7500, 9000, 9600], booked_price:[150, 180, 480], opened:7, closed:23, xpt:8, drainpop:1, sumStaff:1, salary:[35, 42, 50], RP_upgrade:[0, 5, 8], pop:[0.65, 0.75, 1, 0.35], Exp_add:[[3, 2, 1, 1], [4, 3, 2, 1], [5, 4, 3, 1]], Exp:[0, 30, 90], UT:[0, 3, 6], boostMood:{served:[[0.03, 0.07], [0.035, 0.075], [0.055, 0.09]], canceled:[]}, extraUpgrade:"aid"};
dataOb.Booth.Minimarket = {nama:"MINIMARKET", nic:"MINI MARKET", ROWS:3, COLS:3, fr:35, wall:77, wall_alpha:80, blok:52, standbooth:false, mainJenis:"Facility", jenis:"Minimarket", price:[8000, 9600, 0x3200], booked_price:[150, 192, 450], opened:0, closed:0, xpt:8, drainpop:2, sumStaff:1, salary:[31, 39, 43], RP_upgrade:[0, 5, 8], pop:[0.6, 0.75, 1, 0.3], Exp_add:[[3, 2, 2, 1], [4, 3, 2, 1], [5, 4, 3, 1]], Exp:[0, 60, 185], UT:[0, 0, 0], boostMood:{served:[[0.035, 0.1], [0.04, 0.12], [0.065, 0.15]], canceled:[]}, extraUpgrade:"irrigation"};
dataOb.Booth.Pool = {nama:"SWIMMING POOL", nic:"POOL", ROWS:3, COLS:4, fr:20, wall:47, wall_alpha:50, blok:54, standbooth:false, mainJenis:"Facility", jenis:"Pool", price:[9000, 10800, 14400], booked_price:[180, 216, 576], opened:6, closed:0, xpt:20, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 6, 9], pop:[0.6, 0.75, 1, 0.3], Exp_add:[[3, 2, 2, 1], [4, 3, 2, 2], [5, 4, 3, 2]], Exp:[0, 73, 191], UT:[0, 4, 7], boostMood:{served:[[0.03, 0.07], [0.035, 0.075], [0.055, 0.09]], canceled:[]}, extraUpgrade:"wifi"};
dataOb.Booth.Golf = {nama:"GOLF YARD", nic:"GOLF", ROWS:4, COLS:4, fr:10, wall:19, wall_alpha:22, blok:53, standbooth:false, mainJenis:"Facility", jenis:"Golf", price:[12000, 14400, 0x4B00], booked_price:[240, 288, 0x0300], opened:6, closed:17, xpt:8, drainpop:2, sumStaff:0, salary:[0, 0, 0], RP_upgrade:[0, 8, 10], pop:[0.75, 0.85, 1, 0.4], Exp_add:[[4, 3, 2, 1], [5, 4, 3, 2], [6, 5, 4, 2]], Exp:[0, 80, 200], UT:[0, 4, 7], boostMood:{served:[[0.04, 0.1], [0.055, 0.12], [0.1, 0.15]], canceled:[]}, extraUpgrade:"gardening"};
dataOb.Booth.Icecream = {nama:"ICE CREAM", nic:"ICE CREAM", ROWS:1, COLS:1, fr:19, wall:37, wall_alpha:38, blok:55, standbooth:true, mainJenis:"Facility", jenis:"Icecream", price:[750, 0, 0], Xmax:120, booked_price:[3, 9, 0], opened:9, closed:20, xpt:8, drainpop:3, sumStaff:1, salary:[9], pop:[0.5, 0, 0, 0.2], Exp_add:[[1]], Exp:[0], UT:[0], boostMood:{served:[0.15, 0.3], canceled:[0.05, 0.075]}, extraUpgrade:null};
dataOb.Booth.Hotdog = {nama:"HOTDOG", nic:"HOTDOG", ROWS:1, COLS:1, fr:19, wall:41, wall_alpha:42, blok:55, standbooth:true, mainJenis:"Facility", jenis:"Hotdog", price:[800, 0, 0], Xmax:110, booked_price:[3, 10, 0], opened:8, closed:19, xpt:8, drainpop:3, sumStaff:1, salary:[10], pop:[0.55, 0, 0, 0.25], Exp_add:[[1]], Exp:[0], UT:[0], boostMood:{served:[0.15, 0.4], canceled:[0.075, 0.09]}, extraUpgrade:"wallpaper"};
dataOb.Booth.Taco = {nama:"TACO", nic:"TACO", ROWS:1, COLS:1, fr:19, wall:39, wall_alpha:40, blok:55, standbooth:true, mainJenis:"Facility", jenis:"Taco", price:[800, 0, 0], Xmax:105, booked_price:[3, 11, 0], opened:12, closed:23, xpt:8, drainpop:3, sumStaff:1, salary:[14], pop:[0.6, 0, 0, 0.3], Exp_add:[[1]], Exp:[0], UT:[0], boostMood:{served:[0.15, 0.4], canceled:[0.075, 0.09]}, extraUpgrade:"sauce"};
dataOb.Booth.Giftshop = {nama:"GIFTSHOP", nic:"GIFTSHOP", ROWS:1, COLS:1, fr:19, wall:43, wall_alpha:44, blok:55, standbooth:true, mainJenis:"Facility", jenis:"Giftshop", price:[900, 0, 0], Xmax:100, booked_price:[4, 13, 0], opened:13, closed:22, xpt:8, drainpop:3, sumStaff:1, salary:[15], pop:[0.7, 0, 0, 0.4], Exp_add:[[1]], Exp:[0], UT:[0], boostMood:{served:[0.1, 0.25], canceled:[0.05, 0.075]}, extraUpgrade:"meat"};
dataOb.Booth.JanitorRoom = {nama:"JANITOR'S ROOM", nic:"JANITOR'S ROOM", ROWS:1, COLS:1, fr:19, wall:45, wall_alpha:46, blok:55, standbooth:true, mainJenis:"JanitorRoom", jenis:"JanitorRoom", price:[300, 500, 800], hire_price:[150, 210, 250], gaji_pokok:[15, 20, 25], opened:0, closed:0, xpt:8, drainpop:3, RP_upgrade:[0, 1, 2], pop:[0.75, 1.25, 1.75, 0.5], Exp_add:[1, 2, 3], Exp:[0, 0, 0], Exp:[0, 0, 0]};
dataOb.Booth.Lobby.boostMood.canceled = canceledMood(dataOb.Booth.Lobby.boostMood.served, false);
dataOb.Booth.Cottage.boostMood.canceled = canceledMood(dataOb.Booth.Cottage.boostMood.served);
dataOb.Booth.Sauna.boostMood.canceled = canceledMood(dataOb.Booth.Sauna.boostMood.served);
dataOb.Booth.Gym.boostMood.canceled = canceledMood(dataOb.Booth.Gym.boostMood.served);
dataOb.Booth.Jacuzi.boostMood.canceled = canceledMood(dataOb.Booth.Jacuzi.boostMood.served);
dataOb.Booth.Arcade.boostMood.canceled = canceledMood(dataOb.Booth.Arcade.boostMood.served);
dataOb.Booth.Spa.boostMood.canceled = canceledMood(dataOb.Booth.Spa.boostMood.served);
dataOb.Booth.Pool.boostMood.canceled = canceledMood(dataOb.Booth.Pool.boostMood.served);
dataOb.Booth.Medical.boostMood.canceled = canceledMood(dataOb.Booth.Medical.boostMood.served);
dataOb.Booth.JapanResto.boostMood.canceled = canceledMood(dataOb.Booth.JapanResto.boostMood.served);
dataOb.Booth.BaratResto.boostMood.canceled = canceledMood(dataOb.Booth.BaratResto.boostMood.served);
dataOb.Booth.IndiaResto.boostMood.canceled = canceledMood(dataOb.Booth.IndiaResto.boostMood.served);
dataOb.Booth.Golf.boostMood.canceled = canceledMood(dataOb.Booth.Golf.boostMood.served);
dataOb.Booth.Bar.boostMood.canceled = canceledMood(dataOb.Booth.Bar.boostMood.served);
dataOb.Booth.Minimarket.boostMood.canceled = canceledMood(dataOb.Booth.Minimarket.boostMood.served);
dataOb.Booth.Lobby.desc = ["For check in dan check out room resort.", "\nGet faster exp. point and service by upgrade this booth for $"];
dataOb.Booth.Cottage.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Lodge.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Sauna.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Gym.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Jacuzi.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Arcade.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Spa.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Pool.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Medical.desc = ["Upgrade this booth for $", "\nGet faster Exp.point\n"];
dataOb.Booth.JapanResto.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.BaratResto.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.IndiaResto.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Golf.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Bar.desc = ["", "\nUpgrade this booth for $"];
dataOb.Booth.Minimarket.desc = ["", "\nUpgrade this booth for $"];
dataOb.Smiley = {};
dataOb.Smiley.very_happy = {nama:"VERY HAPPY", range_a:80, range_b:100, nilai:2};
dataOb.Smiley.happy = {nama:"HAPPY", range_a:65, range_b:80, nilai:1};
dataOb.Smiley.neutral = {nama:"NEUTRAL", range_a:55, range_b:65, nilai:0};
dataOb.Smiley.upset = {nama:"UPSET", range_a:35, range_b:55, nilai:-1.5};
dataOb.Smiley.very_upset = {nama:"VERY UPSET", range_a:0, range_b:35, nilai:-2.5};
dataOb.Smiley.sleepy = {nama:"SLEEPY", range_a:0, range_b:0, nilai:0};
dataOb.listing = ["Icecream", "Hotdog", "Taco", "Giftshop", "Arcade", "Sauna", "Jacuzi", "Gym", "Pool", "Medical", "Minimarket", "Bar", "Spa", "JapanResto", "BaratResto", "IndiaResto", "Golf"];
dataOb.usedTimer = [];
dataOb.usedTimer["Sauna"] = [20, 21, 21, 20, 22, 22, 20, 21, 22, 20, 30, 30, 29, 28, 27, 27, 25, 26, 24, 25, 26, 28, 28, 28, 30, 30, 30, 31, 42];
dataOb.usedTimer["Gym"] = [30, 31, 31, 30, 32, 32, 30, 31, 32, 30, 40, 40, 39, 38, 37, 38, 35, 36, 34, 32, 36, 38, 38, 37, 40, 40, 40, 41, 42];
dataOb.usedTimer["Jacuzi"] = [25, 26, 26, 25, 27, 27, 25, 26, 27, 25, 35, 35, 34, 34, 34, 35, 30, 31, 29, 28, 35, 35, 34, 35, 40, 40, 40, 41, 42];
dataOb.usedTimer["Arcade"] = [25, 26, 26, 25, 27, 27, 25, 26, 27, 26, 35, 35, 34, 33, 33, 35, 30, 31, 29, 28, 35, 35, 34, 35, 32, 32, 35, 35, 35];
dataOb.usedTimer["Spa"] = [35, 36, 36, 35, 37, 37, 35, 36, 37, 36, 45, 45, 42, 44, 43, 43, 40, 41, 39, 42, 42, 45, 44, 45, 45, 45, 44, 45, 45];
dataOb.usedTimer["Pool"] = [50, 51, 51, 50, 52, 52, 50, 51, 50, 48, 60, 60, 55, 56, 55, 57, 55, 56, 54, 55, 54, 61, 58, 60, 60, 60, 60, 60, 60];
dataOb.usedTimer["Medical"] = [30, 31, 31, 30, 32, 32, 30, 31, 30, 31, 40, 40, 40, 37, 38, 39, 35, 36, 34, 37, 38, 42, 40, 41, 40, 40, 41, 40, 40];
dataOb.usedTimer["Golf"] = [80, 81, 81, 79, 82, 82, 80, 81, 81, 79, 90, 90, 90, 85, 88, 87, 85, 85, 84, 82, 80, 90, 80, 85, 80, 80, 85, 80, 80];
dataOb.usedTimer["Minimarket"] = [55, 56, 56, 55, 57, 57, 55, 56, 57, 57, 65, 65, 63, 63, 62, 60, 60, 58, 59, 57, 58, 65, 65, 66, 75, 75, 76, 75, 75];
dataOb.usedTimer["IndiaResto"] = [35, 36, 36, 35, 37, 37, 35, 36, 37, 35, 45, 44, 43, 42, 44, 40, 40, 39, 38, 37, 38, 44, 40, 44, 40, 40, 40, 40, 40];
dataOb.usedTimer["JapanResto"] = [30, 31, 31, 30, 32, 32, 30, 31, 32, 30, 40, 38, 38, 37, 39, 40, 35, 36, 34, 34, 38, 41, 40, 41, 40, 40, 40, 40, 40];
dataOb.usedTimer["BaratResto"] = [40, 41, 41, 40, 42, 42, 40, 41, 42, 40, 50, 49, 48, 47, 46, 43, 45, 44, 43, 42, 38, 47, 46, 45, 35, 35, 35, 40, 40];
dataOb.usedTimer["Bar"] = [40, 41, 41, 40, 42, 42, 40, 41, 42, 40, 50, 49, 48, 48, 46, 43, 45, 44, 42, 43, 38, 48, 45, 45, 35, 35, 35, 40, 40];
dataOb.usedTimer["Icecream"] = [5, 5, 5, 4, 6, 5, 5, 4, 4, 4, 6, 5, 7, 6, 6, 6, 4, 7, 7, 6, 5, 5, 5, 6, 10, 10, 11, 11, 11];
dataOb.usedTimer["Taco"] = [5, 4, 4, 5, 5, 6, 6, 4, 6, 6, 6, 5, 6, 6, 6, 6, 7, 5, 6, 6, 5, 6, 5, 7, 11, 10, 10, 11, 11];
dataOb.usedTimer["Giftshop"] = [5, 5, 5, 4, 6, 6, 5, 5, 4, 5, 6, 5, 7, 6, 6, 6, 4, 6, 7, 6, 4, 5, 5, 7, 11, 11, 11, 11, 11];
dataOb.usedTimer["Hotdog"] = [5, 5, 5, 4, 6, 6, 5, 6, 4, 4, 6, 5, 6, 5, 5, 6, 5, 7, 5, 7, 6, 5, 6, 6, 10, 10, 11, 11, 11];
dataOb.jamTidur = [[20, 21], [20, 22], [21, 23], [21, 23], [21, 23], [21, 23], [21, 23], [21, 23], [21, 23], [21, 23], [20, 21], [20, 21], [20, 22], [19, 21], [19, 21], [20, 21], [21, 23], [21, 23], [21, 23], [21, 23], [19, 23], [19, 21], [20, 21], [20, 21], [19, 22], [19, 22], [19, 22], [19, 22], [19, 22]];
dataOb.istirahatTimer = [[25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [25, 50], [15, 45], [15, 45], [15, 45], [15, 45], [15, 45]];
dataOb.jamBangun = [[6, 8], [5, 8], [6, 8], [5, 8], [5, 8], [6, 8], [6, 7], [6, 8], [5, 8], [5, 7], [7, 9], [7, 9], [7, 8], [8, 9], [8, 9], [7, 9], [6, 8], [6, 7], [6, 8], [6, 8], [5, 9], [7, 8], [7, 9], [7, 9], [8, 10], [8, 10], [8, 10], [8, 10], [8, 10]];
dataOb.Visitor = {};
dataOb.Visitor.Visitor1 = {jenis:1, sex:1, speed:1.15, MAX_MOOD:3, money:5000, room_stay:2, tip:4, hygiene:3, smiley:dataOb.Smiley, hygCounter:40, medical_prob:35, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:10, Facility:[["Arcade", "IndiaResto", "Jacuzi", "Giftshop"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor1.Other = otherFacility(dataOb.Visitor.Visitor1.likes.Facility[0]);
dataOb.Visitor.Visitor2 = {jenis:2, sex:0, speed:1, MAX_MOOD:3, money:5000, room_stay:2, tip:3, hygiene:2, smiley:dataOb.Smiley, hygCounter:39, medical_prob:40, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:10, Facility:[["JapanResto", "Arcade", "Sauna", "Taco"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor2.Other = otherFacility(dataOb.Visitor.Visitor2.likes.Facility);
dataOb.Visitor.Visitor3 = {jenis:3, sex:1, speed:1.8, MAX_MOOD:2, money:6500, room_stay:2, tip:2, hygiene:4, smiley:dataOb.Smiley, hygCounter:38, medical_prob:29, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:9, Facility:[["Pool", "Arcade", "Spa", "JapanResto"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor3.Other = otherFacility(dataOb.Visitor.Visitor3.likes.Facility);
dataOb.Visitor.Visitor4 = {jenis:4, sex:0, speed:1.2, MAX_MOOD:4, money:7000, room_stay:2, tip:3, hygiene:1, smiley:dataOb.Smiley, hygCounter:33, medical_prob:25, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:7, Facility:[["Golf", "BaratResto", "Pool", "Bar"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor4.Other = otherFacility(dataOb.Visitor.Visitor4.likes.Facility);
dataOb.Visitor.Visitor5 = {jenis:5, sex:1, speed:2, MAX_MOOD:3, money:8000, room_stay:2, tip:2, hygiene:5, smiley:dataOb.Smiley, hygCounter:36, medical_prob:25, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:11, Facility:[["Pool", "Jacuzi", "Sauna", "Minimarket"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor5.Other = otherFacility(dataOb.Visitor.Visitor5.likes.Facility);
dataOb.Visitor.Visitor6 = {jenis:6, sex:0, speed:1.5, MAX_MOOD:1, money:8800, room_stay:2, tip:3, hygiene:3, smiley:dataOb.Smiley, hygCounter:32, medical_prob:30, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:9, Facility:[["IndiaResto", "Bar", "Arcade", "Taco"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor6.Other = otherFacility(dataOb.Visitor.Visitor6.likes.Facility);
dataOb.Visitor.Visitor7 = {jenis:7, sex:1, speed:0.95, MAX_MOOD:2, money:9250, room_stay:2, tip:4, hygiene:5, smiley:dataOb.Smiley, hygCounter:37, medical_prob:45, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:10, Facility:[["Giftshop", "Icecream", "Gym", "Sauna"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor7.Other = otherFacility(dataOb.Visitor.Visitor7.likes.Facility);
dataOb.Visitor.Visitor8 = {jenis:8, sex:0, speed:1.5, MAX_MOOD:4, money:9500, room_stay:2, tip:5, hygiene:1, smiley:dataOb.Smiley, hygCounter:32, medical_prob:45, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:10, Facility:[["Bar", "BaratResto", "Jacuzi", "Hotdog"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor8.Other = otherFacility(dataOb.Visitor.Visitor8.likes.Facility);
dataOb.Visitor.Visitor9 = {jenis:9, sex:0, speed:1.4, MAX_MOOD:2, money:9800, room_stay:3, tip:4, hygiene:2, smiley:dataOb.Smiley, hygCounter:36, medical_prob:45, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:10, Facility:[["Arcade", "Gym", "Golf", "Pool"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor9.Other = otherFacility(dataOb.Visitor.Visitor9.likes.Facility);
dataOb.Visitor.Visitor10 = {jenis:10, sex:1, speed:1.35, MAX_MOOD:2, money:10000, room_stay:3, tip:5, hygiene:2, smiley:dataOb.Smiley, hygCounter:35, medical_prob:45, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:3, Facility:[["IndiaResto", "JapanResto", "Sauna", "Minimarket"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor10.Other = otherFacility(dataOb.Visitor.Visitor10.likes.Facility);
dataOb.Visitor.Visitor11 = {jenis:11, sex:0, speed:0.75, MAX_MOOD:2, money:11000, room_stay:2, tip:2, hygiene:2, smiley:dataOb.Smiley, hygCounter:34, medical_prob:95, maxK:8, old:true, likes:{Room:["Cottage", "Lodge"], Room2:11, Facility:[["Jacuzi", "Sauna", "Giftshop", "BaratResto"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor11.Other = otherFacility(dataOb.Visitor.Visitor11.likes.Facility);
dataOb.Visitor.Visitor12 = {jenis:12, sex:1, speed:0.95, MAX_MOOD:3, money:11200, room_stay:3, tip:3, hygiene:3, smiley:dataOb.Smiley, hygCounter:35, medical_prob:85, maxK:8, old:true, likes:{Room:["Lodge", "Cottage"], Room2:11, Facility:[["Icecream", "Pool", "JapanResto", "Sauna"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor12.Other = otherFacility(dataOb.Visitor.Visitor12.likes.Facility);
dataOb.Visitor.Visitor13 = {jenis:13, sex:0, speed:0.6, MAX_MOOD:4, money:12500, room_stay:3, tip:2, hygiene:2, smiley:dataOb.Smiley, hygCounter:34, medical_prob:90, maxK:8, old:true, likes:{Room:["Lodge", "Cottage"], Room2:10, Facility:[["Golf", "Spa", "Medical", "BaratResto"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor13.Other = otherFacility(dataOb.Visitor.Visitor13.likes.Facility);
dataOb.Visitor.Visitor14 = {jenis:14, sex:1, speed:0.8, MAX_MOOD:1, money:13000, room_stay:3, tip:3, hygiene:5, smiley:dataOb.Smiley, hygCounter:33, medical_prob:85, maxK:8, old:true, likes:{Room:["Cottage", "Lodge"], Room2:10, Facility:[["IndiaResto", "Gym", "Giftshop", "Minimarket"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor14.Other = otherFacility(dataOb.Visitor.Visitor14.likes.Facility);
dataOb.Visitor.Visitor15 = {jenis:15, sex:0, speed:0.75, MAX_MOOD:4, money:9500, room_stay:2, tip:4, hygiene:2, smiley:dataOb.Smiley, hygCounter:32, medical_prob:90, maxK:8, old:true, likes:{Room:["Lodge", "Cottage"], Room2:13, Facility:[["Arcade", "Jacuzi", "Taco", "Sauna"], [35, 60, 80, 100]], Other:[]}};
dataOb.Visitor.Visitor15.Other = otherFacility(dataOb.Visitor.Visitor15.likes.Facility);
dataOb.Visitor.Visitor16 = {jenis:16, sex:1, speed:0.7, MAX_MOOD:4, money:9800, room_stay:2, tip:4, hygiene:2, smiley:dataOb.Smiley, hygCounter:35, medical_prob:95, maxK:8, old:true, likes:{Room:["Lodge", "Cottage"], Room2:12, Facility:[["Minimarket", "Hotdog", "Jacuzi", "Spa", "Pool"], [30, 55, 73, 88, 100]], Other:[]}};
dataOb.Visitor.Visitor16.Other = otherFacility(dataOb.Visitor.Visitor16.likes.Facility);
dataOb.Visitor.Visitor17 = {jenis:17, sex:3, jenis1:2, jenis2:1, speed:0.95, MAX_MOOD:3, money:12500, room_stay:1, tip:6, hygiene:3, smiley:dataOb.Smiley, hygCounter:37, medical_prob:75, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:15, Facility:[["Bar", "Hotdog", "Taco", "Giftshop", "Golf", "Gym", "IndiaResto"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor17.Other = otherFacility(dataOb.Visitor.Visitor17.likes.Facility);
dataOb.Visitor.Visitor18 = {jenis:18, sex:3, jenis1:4, jenis2:3, speed:0.95, MAX_MOOD:4, money:13000, room_stay:3, tip:5, hygiene:4, smiley:dataOb.Smiley, hygCounter:38, medical_prob:45, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:15, Facility:[["Bar", "BaratResto", "Spa", "Gym", "Jacuzi", "Gym", "Arcade"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor18.Other = otherFacility(dataOb.Visitor.Visitor18.likes.Facility);
dataOb.Visitor.Visitor19 = {jenis:19, sex:3, jenis1:6, jenis2:5, speed:0.95, MAX_MOOD:3, money:13500, room_stay:2, tip:4, hygiene:5, smiley:dataOb.Smiley, hygCounter:37, medical_prob:60, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:15, Facility:[["BaratResto", "Hotdog", "Taco", "Icecream", "JapanResto", "Spa", "IndiaResto"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor19.Other = otherFacility(dataOb.Visitor.Visitor19.likes.Facility);
dataOb.Visitor.Visitor20 = {jenis:20, sex:3, jenis1:8, jenis2:7, speed:0.95, MAX_MOOD:2, money:13700, room_stay:3, tip:5, hygiene:4, smiley:dataOb.Smiley, hygCounter:36, medical_prob:55, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:15, Facility:[["IndiaResto", "Bar", "Pool", "Jacuzi", "Minimarket", "Hotdog", "Giftshop"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor20.Other = otherFacility(dataOb.Visitor.Visitor20.likes.Facility);
dataOb.Visitor.Visitor21 = {jenis:21, sex:3, jenis1:9, jenis2:10, speed:0.95, MAX_MOOD:3, money:13500, room_stay:3, tip:4, hygiene:3, smiley:dataOb.Smiley, hygCounter:48, medical_prob:50, maxK:12, old:false, likes:{Room:["Cottage", "Lodge"], Room2:15, Facility:[["IndiaResto", "Minimarket", "Golf", "Hotdog", "JapanResto", "Sauna", "Taco"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor21.Other = otherFacility(dataOb.Visitor.Visitor21.likes.Facility);
dataOb.Visitor.Visitor22 = {jenis:22, sex:3, jenis1:11, jenis2:12, speed:1, MAX_MOOD:4, money:14550, room_stay:3, tip:6, hygiene:2, smiley:dataOb.Smiley, hygCounter:33, medical_prob:90, maxK:9, old:true, likes:{Room:["Lodge", "Cottage"], Room2:20, Facility:[["Pool", "BaratResto", "Gym", "Giftshop", "Jacuzi", "Golf", "Sauna"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor22.Other = otherFacility(dataOb.Visitor.Visitor22.likes.Facility);
dataOb.Visitor.Visitor23 = {jenis:23, sex:3, jenis1:13, jenis2:14, speed:0.95, MAX_MOOD:3, money:14500, room_stay:3, tip:7, hygiene:1, smiley:dataOb.Smiley, hygCounter:32, medical_prob:95, maxK:9, old:true, likes:{Room:["Cottage", "Lodge"], Room2:30, Facility:[["Golf", "Medical", "JapanResto", "Taco", "Jacuzi", "Spa", "Sauna"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor23.Other = otherFacility(dataOb.Visitor.Visitor23.likes.Facility);
dataOb.Visitor.Visitor24 = {jenis:24, sex:3, jenis1:15, jenis2:16, speed:0.7, MAX_MOOD:2, money:15000, room_stay:2, tip:4, hygiene:1, smiley:dataOb.Smiley, hygCounter:30, medical_prob:98, maxK:9, old:true, likes:{Room:["Lodge", "Cottage"], Room2:25, Facility:[["Medical", "Golf", "IndiaResto", "Minimarket", "Gym", "Hotdog", "Giftshop"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor24.Other = otherFacility(dataOb.Visitor.Visitor24.likes.Facility);
dataOb.Visitor.Visitor25 = {jenis:25, sex:1, nick:"Ann Hat Away", car:1, speed:0.8, MAX_MOOD:2, money:17000, room_stay:3, tip:12, hygiene:5, smiley:dataOb.Smiley, hygCounter:43, medical_prob:75, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:8, Facility:[["Golf", "Bar", "Pool", "Gym", "Arcade", "Medical", "Taco"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor25.Other = otherFacility(dataOb.Visitor.Visitor25.likes.Facility);
dataOb.Visitor.Visitor26 = {jenis:26, sex:1, nick:"Mr. Rock", car:1, speed:1.4, MAX_MOOD:3, money:18500, room_stay:3, tip:13, hygiene:5, smiley:dataOb.Smiley, hygCounter:43, medical_prob:90, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:6, Facility:[["Minimarket", "Pool", "Golf", "Spa", "Giftshop", "Medical", "Icecream"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor26.Other = otherFacility(dataOb.Visitor.Visitor26.likes.Facility);
dataOb.Visitor.Visitor27 = {jenis:27, sex:1, nick:"Naomi Volts", car:0, speed:0.95, MAX_MOOD:2, money:20000, room_stay:3, tip:14, hygiene:5, smiley:dataOb.Smiley, hygCounter:43, medical_prob:75, maxK:12, old:false, likes:{Room:["Lodge"], Room2:0, Facility:[["Icecream", "Taco", "JapanResto", "IndiaResto", "BaratResto", "Bar", "Hotdog"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor27.Other = otherFacility(dataOb.Visitor.Visitor27.likes.Facility);
dataOb.Visitor.Visitor28 = {jenis:28, sex:1, nick:"Robert Fatinson", car:0, speed:0.5, MAX_MOOD:4, money:24000, room_stay:3, tip:20, hygiene:5, smiley:dataOb.Smiley, hygCounter:43, medical_prob:90, maxK:12, old:false, likes:{Room:["Lodge"], Room2:0, Facility:[["Medical", "Pool", "Spa", "Sauna", "Jacuzi", "IndiaResto", "Icecream"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor28.Other = otherFacility(dataOb.Visitor.Visitor28.likes.Facility);
dataOb.Visitor.Visitor29 = {jenis:29, sex:1, nick:"Jason State", car:1, speed:1.35, MAX_MOOD:3, money:25000, room_stay:3, tip:15, hygiene:5, smiley:dataOb.Smiley, hygCounter:43, medical_prob:80, maxK:12, old:false, likes:{Room:["Lodge", "Cottage"], Room2:0, Facility:[["Minimarket", "Golf", "Arcade", "Giftshop", "JapanResto", "Gym", "Spa"], [20, 35, 50, 70, 80, 90, 100]], Other:[]}};
dataOb.Visitor.Visitor29.Other = otherFacility(dataOb.Visitor.Visitor29.likes.Facility);
dataOb.Visitor.Cottage = [2, 3, 6, 7, 9, 10, 11, 14, 17, 19, 21, 23];
dataOb.Visitor.Lodge = [1, 4, 5, 8, 12, 13, 15, 16, 18, 20, 22, 24];
dataOb.Visitor.Old = [11, 12, 13, 14, 15, 16, 22, 23, 24];
dataOb.Visitor.TanpaOld = [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 17, 18, 19, 20, 21];
dataOb.Visitor.Cottage_TanpaOld = [2, 3, 6, 7, 9, 10, 17, 19, 21];
dataOb.Visitor.Lodge_TanpaOld = [1, 4, 5, 8, 18, 20];
dataOb.Visitor.halfBaldOldMan = {Visitor9:true, Visitor11:true, Visitor15:true, Visitor21:true, Visitor22:true, Visitor24:true};
dataOb.Visitor.shortHairedOldLady = {Visitor12:true, Visitor14:true, Visitor16:true, Visitor22:true, Visitor23:true, Visitor24:true};
dataOb.Visitor.HYGIENE_RANGE = [];
dataOb.Visitor.HYGIENE_RANGE["chance"] = [3, 2.5, 2, 1.5, 1];
dataOb.Visitor.HYGIENE_RANGE["sampah"] = [[1, 2, 2, 3, 3], [1, 2, 2, 2, 3], [1, 1, 2, 2, 3], [1, 1, 1, 2, 2], [1, 1, 1, 1, 2]];
dataOb.Visitor.PROB_RANGE = [50, 40, 30, 25, 15, 5];
dataOb.Visitor.FIRSTNAME_MALE = ["Brian", "Maxwell", "Paul", "Erick", "Ernest", "Nelson", "Matt", "Morgan", "Zach", "Nicholas", "Robert", "Harold", "Bob Harper", "Theodore", "Chartzen", "Godwyn", "Blake", "Rooney", "Jerome", "Brad"];
dataOb.Visitor.SECONDNAME_MALE = ["McBrown", "Tzebaltski", "Bradley", "Ford", "Powell", "Gray", "Ward", "Collins", "Stewart", "Reed", "Bailey", "Cooper", "Rivera", "Stones", "Hudson", "Duncan", "Foster", "Woods", "Simmons", "Michaels", "Phillips", "Martinez", "Thompson", "Harris", "Moore", "Miller", "Jackson", "Jones", "Williams", "Snyder", "Oliver"];
dataOb.Visitor.FIRSTNAME_FEMALE = ["Michelle", "Barbara", "Sabrina", "Debby", "Bernadett", "Alexa", "Alice", "Elvina", "Nadine", "Heather", "Hannah", "Jillian", "Yvonne", "Tabitha", "Jean", "Julia", "Scarlett"];
dataOb.Visitor.SECONDNAME_FEMALE = ["McBrown", "Tzebaltski", "Bradley", "Ford", "Powell", "Gray", "Ward", "Collins", "Stewart", "Reed", "Bailey", "Cooper", "Rivera", "Stones", "Hudson", "Duncan", "Foster", "Woods", "Simmons", "Michaels", "Phillips", "Martinez", "Thompson", "Harris", "Moore", "Miller", "Jackson", "Jones", "Williams", "Snyder", "Oliver"];
dataOb.Visitor.COUPLE_NAME = ["McBrown", "Tzebaltski", "Bradley", "Ford", "Powell", "Gray", "Ward", "Collins", "Stewart", "Reed", "Bailey", "Cooper", "Rivera", "Stones", "Hudson", "Duncan", "Foster", "Woods", "Simmons", "Michaels", "Phillips", "Martinez", "Thompson", "Harris", "Moore", "Miller", "Jackson", "Jones", "Williams", "Snyder", "Oliver"];
dataOb.Employee = {};
dataOb.Employee.Janitor = {nama:"JANITOR", jenis:1, sex:0, MAX_MOOD:[3, 4, 5], smiley:dataOb.Smiley, price:[0, 100, 200], gaji_pokok:[5, 10, 15], pop:[0.25, 0.5, 0.75], speedWork:[1, 1.5, 2], Exp_add:[1, 1, 1], Exp:[0, 0, 0], breakTimer:[50, 40, 30], sleepTimer:125, sleepMinus:[0.25, 0.5, 1], jamTidur:[21, 23], istirahatTimer:[25, 60], jamBangun:[8, 9], speed:[1, 1.5, 2]};
dataOb.Employee.FIRSTNAME = ["Max", "Budi", "Bob", "Agung", "Herry", "Bobby", "Brian", "Morgan", "John", "Jaka"];
dataOb.Employee.SECONDNAME = ["Brown", "Smith", "Power", "Tiger", "Goody", "Smiley", "Smash", "Permata", "Carmen", "Maxwell"];
dataOb.MaximumPembanding = {Pengunjung:[10, 20, 30, 40, 50, 60, 70], Pengguna:[10, 20, 30, 40, 50, 60, 70]};
Mission.build_room = {desc:"Build a room on your resort ", bonus:500, batas:0};
Mission.connect_tiles = {desc:"Connected room with main road ", bonus:500, batas:0};
Mission.put_scenery = {desc:"Put a plant on your resort ", bonus:500, batas:0};
Mission.build_facility = {desc:"Build a facility on your resort ", bonus:750, batas:0};
Mission.scenery_grass = {desc:"Put a plant on grass tile ", bonus:750, batas:0};
Mission.one_stayed = {desc:"Have at least 1 visitor stayed on your resort ", bonus:750, batas:1};
Mission.one_janitor = {desc:"Hire at least 1 cleaning service ", bonus:500, batas:1};
Mission.x_money = {desc:"Total money $2500 ", bonus:1000, batas:2500};
Mission.x_tree = {desc:"Have 12 plants on your resort ", bonus:1000, batas:12};
Mission.x_facilityRoom = {desc:"Have total 8 facilities and rooms on your resort ", bonus:2500, batas:8};
Mission.x_janitor = {desc:"Have 4 cleaning service staffs on your resort ", bonus:1500, batas:4};
Mission.xx_tree = {desc:"Have 20 plants on your resort ", bonus:1000, batas:20};
Mission.x_stayed = {desc:"Have 8 booked rooms on your resort ", bonus:1000, batas:8};
Mission.x_profit = {desc:"Earn $1000 profit at end day ", bonus:1000, batas:0};
Mission.x_room = {desc:"Have 12 rooms on your resort ", bonus:5000, batas:12};
Mission.one_facilityUpgrade = {desc:"Upgrade at least one facility ", bonus:4000, batas:0};
Mission.x_customer = {desc:"Have customers using facility 25 times in a day ", bonus:2000, batas:25};
Mission.first_meal = {desc:"Served your first meal ", bonus:2000, batas:0};
Mission.x_facility = {desc:"Build 5 booth 'types' of facility ", bonus:5000, batas:5};
Mission.janitorRoom_upgrade = {desc:"Have one Janitor's Room with full upgrade ", bonus:2500, batas:0};
Mission.x_promote = {desc:"Have 3 janitors with full promote ", bonus:3000, batas:3};
Mission.x_facilityUpgrade = {desc:"Have 3 facilities with two stars or more ", bonus:5000, batas:3};
Mission.x_maple = {desc:"Have 10 maple trees ", bonus:1200, batas:10};
Mission.x_cottageUpgrade = {desc:"Have 3 Cottages with two stars or more ", bonus:4000, batas:3};
Mission.stars_5 = {desc:"Reach 5 Resort's Stars ", bonus:5000, batas:5};
Mission.one_lodge = {desc:"Have one lodge room ", bonus:1500, batas:0};
Mission.first_spcVisitor = {desc:"Have your first special visitor inside your resort ", bonus:3500, batas:0};
Mission.x_unlocked = {desc:"Have at least 10 booths unlocked ", bonus:1500, batas:10};
Mission.expand1 = {desc:"Expand your resort land ", bonus:5000, batas:0};
Mission.x_profit2 = {desc:"Earn $2500 profit at end day ", bonus:1500, batas:0};
Mission.xx_facility = {desc:"Have total 15 facilities ", bonus:12500, batas:15};
Mission.x_lodge = {desc:"Have at least 4 lodge ", bonus:3000, batas:4};
Mission.x_visitors = {desc:"Have 25 visitors inside your resort ", bonus:3000, batas:25};
Mission.xx_tree2 = {desc:"Have 40 plants on your resort ", bonus:2500, batas:40};
Mission.x_facilityUpgrade2 = {desc:"Have 3 facilities with full upgrade ", bonus:5000, batas:3};
Mission.x_customer2 = {desc:"Have customers using facility 80 times in a day ", bonus:2000, batas:80};
Mission.lobby_upgrade = {desc:"Upgrade your lobby room", bonus:5000, batas:0};
Mission.x_giftshop = {desc:"Have at least 2 Giftshops ", bonus:1000, batas:2};
Mission.spend_1 = {desc:"Spend $15000 money in a day ", bonus:5000, batas:15000};
Mission.xx_stayed = {desc:"Have 15 booked rooms on your resort ", bonus:7000, batas:15};
Mission.x_minibooth = {desc:"Have all kind of minibooths ", bonus:2500, batas:4};
Mission.x_booths = {desc:"Have total 35 facilities and rooms on your resort ", bonus:15000, batas:35};
Mission.x_medical = {desc:"Have at least 1 Medical Center ", bonus:3000, batas:0};
Mission.x_jacuziFullUpgrade = {desc:"Have at least 1 full upgrade Jacuzzi ", bonus:4500, batas:0};
Mission.xx_room = {desc:"Have 20 rooms on your resort ", bonus:6500, batas:20};
Mission.x_janitorRoom = {desc:"Have 4 Janitor's Room with full upgrade ", bonus:3500, batas:4};
Mission.x_medicine = {desc:"'Medical Center(s)' has been used 11 times ", bonus:2500, batas:11};
Mission.x_barFullUpgrade = {desc:"Have at least 1 full upgrade Bar and Lounge ", bonus:3500, batas:0};
Mission.anne_hataway = {desc:"'Ann Hat Away' inside your resort ", bonus:7000, batas:0};
Mission.x_baratResto = {desc:"Have at least 1 West Restaurant ", bonus:2500, batas:0};
Mission.x_cottageFullUpgrade = {desc:"Have at least 3 full upgrade Cottage ", bonus:4500, batas:3};
Mission.x_facilityStar = {desc:"Have 10 facilities with two stars or more ", bonus:8000, batas:10};
Mission.x_roomStar = {desc:"Have 12 rooms with two stars or more ", bonus:4000, batas:12};
Mission.x_customer3 = {desc:"Have customers using facility 110 times in a day ", bonus:7000, batas:110};
Mission.x_facilityUpgrade3 = {desc:"Have 7 facilities with full upgrade ", bonus:7500, batas:7};
Mission.x_minimarket = {desc:"Have at least 2 Minimarket ", bonus:5000, batas:2};
Mission.mr_rock = {desc:"'Mr.Rock' inside your resort ", bonus:7000, batas:0};
Mission.x_couples = {desc:"There are 10 couples inside your resort ", bonus:3000, batas:10};
Mission.x_lodgeUpgrade = {desc:"Have 3 Lodges with two stars or more ", bonus:4500, batas:3};
Mission.x_visitors2 = {desc:"Have 50 visitors inside your resort ", bonus:3250, batas:50};
Mission.expand2 = {desc:"Expand your resort land twice ", bonus:10000, batas:0};
Mission.xx_tree3 = {desc:"Have 70 plants on your resort ", bonus:4000, batas:70};
Mission.x_buyers = {desc:"'Minimarket(s)' has been used 100 times ", bonus:3500, batas:100};
Mission.x_medicine2 = {desc:"'Medical Center(s)' has been used 55 times ", bonus:5000, batas:55};
Mission.x_lodgeFullUpgrade = {desc:"Have at least 1 full upgrade Lodge ", bonus:5000, batas:0};
Mission.x_money2 = {desc:"Total money $100000 ", bonus:10000, batas:100000};
Mission.naomi_volts = {desc:"'Naomi Volts' inside your resort ", bonus:7000, batas:0};
Mission.xx_lodge = {desc:"Have at least 15 lodge ", bonus:5000, batas:15};
Mission.xxx_facility = {desc:"Have 15 booth 'types' of facility ", bonus:10000, batas:15};
Mission.x_customer4 = {desc:"Have customers using facility 200 times in a day ", bonus:2000, batas:200};
Mission.x_booths2 = {desc:"Have total 60 booths ", bonus:15000, batas:60};
Mission.x_lobbyUsed = {desc:"Your Lobby has been used 750 times ", bonus:5000, batas:750};
Mission.x_trash = {desc:"Janitor staffs clean 5 trash in one day ", bonus:3000, batas:5};
Mission.robert = {desc:"'Robert Fatinson' inside your resort ", bonus:7000, batas:0};
Mission.x_roomUpgrade = {desc:"Have 10 rooms with full upgrade ", bonus:15000, batas:10};
Mission.xx_tree4 = {desc:"Have 90 plants on your resort ", bonus:4000, batas:90};
Mission.x_medicalUpgrade = {desc:"Have at least 1 Medical Center with two stars or more ", bonus:4000, batas:0};
Mission.jason = {desc:"'Jason State' inside your resort ", bonus:7000, batas:0};
Mission.all_extraUpgrade = {desc:"Buy all extra upgrades ", bonus:50000, batas:15};
Mission.x_PoolGolf = {desc:"Have Swiming Pool and Golf ", bonus:10000, batas:2};
Mission.x_buyers2 = {desc:"'Minimarket(s)' has been used 250 times ", bonus:6000, batas:250};
Mission.all_booth = {desc:"Build all kind of booth on your resort ", bonus:25000, batas:20};
Mission.x_spcVisitor = {desc:"Have 2 special visitors inside your resort ", bonus:10000, batas:2};
Mission.x_trash2 = {desc:"Janitor staffs clean 10 trash in one day ", bonus:3000, batas:10};
Mission.x_promote2 = {desc:"Have 20 janitors with full promote ", bonus:6000, batas:20};
Mission.x_acv = {desc:"At least 12 achievements completed ", bonus:10000, batas:12};
Mission.xx_tree5 = {desc:"Have 120 plants on your resort ", bonus:4000, batas:120};
Mission.x_medicalUpgrade2 = {desc:"Have at least 1 Medical Center with full upgrade ", bonus:9000, batas:0};
Mission.x_visitors3 = {desc:"Have 75 visitors inside your resort ", bonus:3000, batas:75};
Mission.lobby_upgrade2 = {desc:"Fully upgrade your lobby room ", bonus:10000, batas:0};
Mission.x_poolFullUpgrade = {desc:"Have at least 1 full upgrade Swimming Pool ", bonus:9000, batas:0};
Mission.x_spcVisitor2 = {desc:"Have 3 special visitors inside your resort ", bonus:10000, batas:3};
Mission.complete_acv = {desc:"Achievements completed ", bonus:50000, batas:15};
Mission.complete_mission = {desc:"All missions completed ", bonus:100000, batas:94};
Mission.listing = ["build_room", "connect_tiles", "put_scenery", "build_facility", "scenery_grass", "one_stayed", "one_janitor", "x_money", "x_tree", "x_facilityRoom", "x_janitor", "xx_tree", "x_stayed", "x_profit", "x_room", "one_facilityUpgrade", "x_customer", "first_meal", "x_facility", "janitorRoom_upgrade", "x_promote", "x_facilityUpgrade", "x_maple", "x_cottageUpgrade", "stars_5", "one_lodge", "first_spcVisitor", "x_unlocked", "expand1", "x_profit2", "xx_facility", "x_lodge", "x_visitors", "xx_tree2", "x_facilityUpgrade2", "x_customer2", "lobby_upgrade", "x_giftshop", "spend_1", "xx_stayed", "x_minibooth", "x_booths", "x_medical", "x_jacuziFullUpgrade", "xx_room", "x_janitorRoom", "x_medicine", "x_barFullUpgrade", "anne_hataway", "x_baratResto", "x_cottageFullUpgrade", "x_facilityStar", "x_roomStar", "x_customer3", "x_facilityUpgrade3", "x_minimarket", "mr_rock", "x_couples", "x_lodgeUpgrade", "x_visitors2", "expand2", "xx_tree3", "x_buyers", "x_medicine2", "x_lodgeFullUpgrade", "x_money2", "naomi_volts", "xx_lodge", "xxx_facility", "x_customer4", "x_booths2", "x_lobbyUsed", "x_trash", "robert", "x_roomUpgrade", "xx_tree4", "x_medicalUpgrade", "jason", "all_extraUpgrade", "x_PoolGolf", "x_buyers2", "all_booth", "x_spcVisitor", "x_trash2", "x_promote2", "x_acv", "xx_tree5", "x_medicalUpgrade2", "x_visitors3", "lobby_upgrade2", "x_poolFullUpgrade", "x_spcVisitor2", "complete_acv", "complete_mission"];
Achievements["acv_credit"] = {nama:"ENTER THE CREDIT", desc:"Nice to meet you! :)", bonus:1500, RP:2};
Achievements["acv_goodResort"] = {nama:"GOOD RESORT", desc:"Popularity 17% + 50% visitors happy", bonus:4000, RP:4};
Achievements["acv_loveBeingHere"] = {nama:"I LOVE BEING HERE", desc:"Popularity 50% + 75% visitor happy", bonus:11000, RP:7};
Achievements["acv_goodResearch"] = {nama:"GOOD RESEARCH", desc:"10 booths upgraded", bonus:7500, RP:5};
Achievements["acv_growingResort"] = {nama:"GROWING RESORT", desc:"Unlock 10 booths", bonus:5000, RP:4};
Achievements["acv_rookieResort"] = {nama:"ROOKIE RESORT", desc:"Have 10 visitors inside resort", bonus:1000, RP:3};
Achievements["acv_famousResort"] = {nama:"FAMOUS RESORT", desc:"All special visitors visited your resort", bonus:12000, RP:8};
Achievements["acv_marvelousResort"] = {nama:"MARVELOUS RESORT", desc:"Unlocked all booth types", bonus:15000, RP:7};
Achievements["acv_grandResort"] = {nama:"GRAND RESORT", desc:"Have total 25 booths", bonus:8000, RP:6};
Achievements["acv_awesomeContractor"] = {nama:"AWESOME CONTRACTOR", desc:"Expand Resort to level 2", bonus:10000, RP:8};
Achievements["acv_expertContractor"] = {nama:"EXPERT CONTRACTOR", desc:"Expand Resort to level 3", bonus:15000, RP:9};
Achievements["acv_superDev"] = {nama:"SUPER DEVELOPER", desc:"Popularity 70% + Build all booth types", bonus:17000, RP:9};
Achievements["acv_masterDev"] = {nama:"MASTER DEVELOPER", desc:"Popularity 100% reached + Expert Contractor", bonus:50000, RP:10};
Achievements["acv_greenBucks"] = {nama:"GREEN BUCKS", desc:"Have total money $250.000", bonus:60000, RP:10};
Achievements["acv_bagOfGold"] = {nama:"BAG OF GOLD", desc:"Have total money $500.000", bonus:70000, RP:10};
Extra_Upgrade.treadmill = {name:"Secondhand Treadmill", effect:"Boost staff's stamina", unlocked:"Gym", price:1500, need_star:1};
Extra_Upgrade.leaf = {name:"Garnish Leaf", effect:"Reduce cedar tree price", unlocked:"Bar", price:2800, need_star:2, val:10};
Extra_Upgrade.wallpaper = {name:"Wallpaper", effect:"Reduce palm tree price", unlocked:"Hotdog", price:3250, need_star:3, val:20};
Extra_Upgrade.heater = {name:"Water Heater", effect:"Boost Visitor Mood in Cottage", unlocked:"Jacuzi", price:4250, need_star:3};
Extra_Upgrade.sauce = {name:"Barbeque Sauce", effect:"Reduce bamboo tree prices", unlocked:"Taco", price:3100, need_star:4, val:10};
Extra_Upgrade.wine = {name:"80 years old wine", effect:"Add extra earnings", unlocked:"Arcade", price:4800, need_star:4};
Extra_Upgrade.palm = {name:"Palm Oil", effect:"Add extra earnings Lodge", unlocked:"IndiaResto", price:4500, need_star:5};
Extra_Upgrade.towel = {name:"Luxury Towel", effect:"Boost visitor Mood in Lodge", unlocked:"Spa", price:4500, need_star:5};
Extra_Upgrade.meat = {name:"Minced Meat", effect:"Add extra earnings from Hot Dog", unlocked:"Giftshop", price:3500, need_star:6};
Extra_Upgrade.bamboo = {name:"Bamboo", effect:"Add extra earnings from Cottage", unlocked:"JapanResto", price:4750, need_star:6};
Extra_Upgrade.aid = {name:"First Aid Kit", effect:"Boost half bald old man Mood, short haired old lady Mood", unlocked:"Medical", price:4950, need_star:6};
Extra_Upgrade.uniform = {name:"Cotton Uniform", effect:"Boost staff' experience", unlocked:"BaratResto", price:5000, need_star:7};
Extra_Upgrade.irrigation = {name:"Premium Irrigation", effect:"Extra earnings from West Restaurant", unlocked:"Minimarket", price:5500, need_star:8};
Extra_Upgrade.wifi = {name:"Wi Fi Access", effect:"Boost Visitor Mood", unlocked:"Pool", price:5750, need_star:9};
Extra_Upgrade.gardening = {name:"Ornamental gardening", effect:"Add extra popularity rate to decoration", unlocked:"Golf", price:6500, need_star:10, val:5};
Extra_Upgrade.listing = ["treadmill", "leaf", "wallpaper", "heater", "sauce", "wine", "palm", "towel", "meat", "bamboo", "aid", "uniform", "irrigation", "wifi", "gardening"];
Extra_Upgrade.level_1 = ["treadmill"];
Extra_Upgrade.level_2 = ["leaf"];
Extra_Upgrade.level_3 = ["wallpaper", "heater"];
Extra_Upgrade.level_4 = ["sauce", "wine"];
Extra_Upgrade.level_5 = ["palm", "towel"];
Extra_Upgrade.level_6 = ["meat", "bamboo", "aid"];
Extra_Upgrade.level_7 = ["uniform"];
Extra_Upgrade.level_8 = ["irrigation"];
Extra_Upgrade.level_9 = ["wifi"];
Extra_Upgrade.level_10 = ["gardening"];
Unlocked.level_0 = ["Sauna", "Icecream", "Cottage", "JanitorRoom"];
Unlocked.level_5 = ["Lodge", "Expand1"];
Unlocked.level_8 = ["Expand2"];
ResearchPoint.level_ = [50, 170, 340, 630, 1090, 1500, 2250, 3500, 6500, 10000, 14000];
ResearchPoint.bonusLevel = [500, 700, 1200, 1900, 3100, 5000, 8100, 13100, 21200, 34300, 55500];
ResearchPoint.bonusRP = [5, 10, 15, 25, 40, 60, 100, 175, 300, 500, 750];
ResearchPoint.addPoint = [];
ResearchPoint.addPoint["Expand1"] = 5;
ResearchPoint.addPoint["Expand2"] = 8;
ResearchPoint.addPoint["Cottage"] = [2, 2, 3, 2];
ResearchPoint.addPoint["Lodge"] = [2, 3, 3, 2];
ResearchPoint.addPoint["JanitorRoom"] = [2, 2, 2, 1];
ResearchPoint.addPoint["Medical"] = [2, 2, 1];
ResearchPoint.addPoint["Golf"] = [2, 2, 1];
ResearchPoint.addPoint["Pool"] = [2, 2, 1];
ResearchPoint.addPoint["Minimarket"] = [2, 2, 1];
Tips = {moveStage:"Click hand symbol and drag it on the screen. \nYou can also use A - S - W -D or arrow keys to scroll.", clickOnObject:"Click on object to see it's properties.", scenery1:"Plants can planted on a grass tile.", clearedMission:"Clearing missions will give you additional money.", clickAlphaButton:"Click 'hide buildings' on topright:\n\nTo hide other objects except the visitors.", icon_destroy:"Use 'quick destroy' as the faster way to destroy tiles, plants, or your building.", clickNavigator1:"Click the blue tabs at the top to find plant, person or booth.\nYou can see booth's detail and promote your employee easily.", exploreObject:"All your created objects have an effect to your resort, they can increase your popularity.\nExplore the game to increase your research points.\nIt will affect to your Resort's Stars.", connectTile:"Always connect your booth with walkable tiles, so visitors can find a way to your booth.", shortcut:"Other Shortcuts:\nESC: Finish/Cancel create a new object\n\nV: Select arrow(mouse)\nH: hand symbol(drag)\nQ: Hide/Show buildings", upgradeBooth:"Don't forget to upgrade your booth to increase popularity.", visitorOld:"Old visitors come sometimes shows up in the evening.\nThey realy need a Medical Center to check their health.", clickVisitor:"Click on visitors to find out what they want and their favourite.\nBut you can easily find a visitor or their booth from 'visitors tab' on tab, then click the spesific object.", upgrade_janitorRoom:"By upgrading the Janitor's Room, you will get larger cleaning area.\nYou can hire more janitors.", extraUpgrade:"RESORT UPGRADE is expensive but can help you make a better resort.\nPurchase them wisely, so you can unlock more booth.", upgradeBooth:"Upgrade your booth to increase the revenue.\nLook at the booth experience for the requirement.", expandResort:"EXPAND your resort, to get more area to build new objects.\nYou can expand your resort twice.", specialVisitor:"Special Visitors bring a lot of money and stay longer (if booked a room).\nBut they only visit when certain conditions are met.", createJanitorRoom:"Create Janitor's Room near the garbages, because it has specific cleaning area (janitor's work area).\nYou can expand it by upgrading the booth.", janitor1:"Don't forget to hire more janitor to clean the garbages.\nJanitor gain experience during their work time. Promoting them will increase their performances (and regain stamina), but their sallaries will be increased too.", visitor1:"Each visitor has its current cash and stay longer (if booked a room). \nMake them satisfied and comfort inside your resort, their mood will affect your popularity. \nTrash and bad service can make them dissapointed."};
Tips.listing = ["moveStage", "clickOnObject", "scenery1", "clearedMission", "clickNavigator1", "clickAlphaButton", "icon_destroy", "exploreObject", "connectTile", "shortcut", "upgradeBooth", "clickVisitor", "visitor1", "visitorOld", "specialVisitor", "upgradeBooth", "createJanitorRoom", "upgrade_janitorRoom", "janitor1", "extraUpgrade", "expandResort"];
}
}//package pack
Section 114
//zmap (pack.zmap)
package pack {
public class zmap {
public static var MAP:Object = {};
private static var i:uint = 10;
private static var j:uint;
public static var EXPAND:Array = [{COLS:37, ROWS:37}, {COLS:43, ROWS:43}, {COLS:50, ROWS:50}];
public static var ROWS_MAX:uint = EXPAND[2].ROWS;
public static var COLS_MAX:uint = EXPAND[2].COLS;
private static var nama:String;
public static function ShowDataMap():void{
}
MAP.sceneries = [];
MAP.tileDefault = [];
MAP.kepiting = [];
while (i < 16) {
j = 20;
while (j <= 21) {
nama = ((("tile_" + i) + "_") + j);
MAP.tileDefault[nama] = {jenis:1, ipath:true};
j++;
};
i++;
};
MAP.tileDefault["tile_10_22"] = {jenis:1, ipath:false};
MAP.tileDefault["tile_10_23"] = {jenis:1, ipath:false};
MAP.kepiting["tile_-3_28"] = true;
MAP.kepiting["tile_-5_22"] = true;
MAP.kepiting["tile_-4_22"] = true;
MAP.kepiting["tile_0_19"] = true;
MAP.kepiting["tile_23_-4"] = true;
MAP.kepiting["tile_3_14"] = true;
MAP.kepiting["tile_3_19"] = true;
MAP.kepiting["tile_1_28"] = true;
MAP.kepiting["tile_2_35"] = true;
MAP.kepiting["tile_17_0"] = true;
MAP.kepiting["tile_29_0"] = true;
MAP.kepiting["tile_22_4"] = true;
MAP.kepiting["tile_13_3"] = true;
MAP.kepiting["tile_24_3"] = true;
MAP.kepiting["tile_27_49"] = true;
MAP.kepiting["tile_29_47"] = true;
MAP.kepiting["tile_24_46"] = true;
MAP.kepiting["tile_45_25"] = true;
MAP.kepiting["tile_45_39"] = true;
MAP.kepiting["tile_47_19"] = true;
MAP.kepiting["tile_49_33"] = true;
MAP.kepiting["tile_47_33"] = true;
MAP.kepiting["tile_36_48"] = true;
MAP.kepiting["tile_55_26"] = true;
MAP.kepiting["tile_54_27"] = true;
MAP.kepiting["tile_52_24"] = true;
MAP.kepiting["tile_30_52"] = true;
MAP.kepiting["tile_24_55"] = true;
MAP.kepiting["tile_21_50"] = true;
MAP.kepiting["tile_26_56"] = true;
MAP.kepiting["tile_14_46"] = true;
MAP.sceneries["tile_0_17"] = 15;
MAP.sceneries["tile_0_18"] = 15;
MAP.sceneries["tile_18_0"] = 11;
MAP.sceneries["tile_2_16"] = 10;
MAP.sceneries["tile_2_23"] = 12;
MAP.sceneries["tile_22_3"] = 13;
MAP.sceneries["tile_2_29"] = 13;
MAP.sceneries["tile_2_30"] = 14;
MAP.sceneries["tile_0_26"] = 15;
MAP.sceneries["tile_15_4"] = 16;
MAP.sceneries["tile_14_4"] = 16;
MAP.sceneries["tile_18_1"] = 14;
MAP.sceneries["tile_15_1"] = 17;
MAP.sceneries["tile_21_4"] = 17;
MAP.sceneries["tile_1_21"] = 17;
MAP.sceneries["tile_16_46"] = 12;
MAP.sceneries["tile_17_46"] = 12;
MAP.sceneries["tile_23_48"] = 13;
MAP.sceneries["tile_36_47"] = 11;
MAP.sceneries["tile_30_49"] = 16;
MAP.sceneries["tile_45_16"] = 15;
MAP.sceneries["tile_45_17"] = 13;
MAP.sceneries["tile_48_22"] = 12;
MAP.sceneries["tile_48_23"] = 15;
MAP.sceneries["tile_45_27"] = 16;
MAP.sceneries["tile_45_28"] = 16;
MAP.sceneries["tile_45_35"] = 16;
MAP.sceneries["tile_46_37"] = 14;
MAP.sceneries["tile_46_38"] = 14;
MAP.sceneries["tile_7_8"] = 7;
MAP.sceneries["tile_6_30"] = 7;
MAP.sceneries["tile_19_1"] = 7;
MAP.sceneries["tile_29_7"] = 7;
MAP.sceneries["tile_12_4"] = 7;
MAP.sceneries["tile_16_4"] = 7;
MAP.sceneries["tile_23_4"] = 7;
MAP.sceneries["tile_6_7"] = 7;
MAP.sceneries["tile_7_7"] = 7;
MAP.sceneries["tile_6_8"] = 7;
MAP.sceneries["tile_6_11"] = 7;
MAP.sceneries["tile_6_12"] = 7;
MAP.sceneries["tile_3_11"] = 7;
MAP.sceneries["tile_3_12"] = 7;
MAP.sceneries["tile_3_18"] = 7;
MAP.sceneries["tile_1_23"] = 7;
MAP.sceneries["tile_3_27"] = 7;
MAP.sceneries["tile_3_28"] = 7;
MAP.sceneries["tile_2_22"] = 7;
MAP.sceneries["tile_19_0"] = 7;
MAP.sceneries["tile_23_0"] = 7;
MAP.sceneries["tile_26_3"] = 7;
MAP.sceneries["tile_6_29"] = 7;
MAP.sceneries["tile_6_24"] = 7;
MAP.sceneries["tile_6_25"] = 7;
MAP.sceneries["tile_6_26"] = 7;
MAP.sceneries["tile_2_22"] = 7;
MAP.sceneries["tile_34_4"] = 7;
MAP.sceneries["tile_34_4"] = 7;
MAP.sceneries["tile_34_4"] = 7;
MAP.sceneries["tile_23_49"] = 7;
MAP.sceneries["tile_21_48"] = 7;
MAP.sceneries["tile_19_46"] = 7;
MAP.sceneries["tile_15_46"] = 7;
MAP.sceneries["tile_19_49"] = 7;
MAP.sceneries["tile_45_29"] = 7;
MAP.sceneries["tile_47_27"] = 7;
MAP.sceneries["tile_45_21"] = 7;
MAP.sceneries["tile_48_21"] = 7;
MAP.sceneries["tile_46_17"] = 7;
MAP.sceneries["tile_34_4"] = 7;
MAP.sceneries["tile_35_4"] = 7;
MAP.sceneries["tile_36_4"] = 7;
MAP.sceneries["tile_45_34"] = 7;
MAP.sceneries["tile_45_36"] = 7;
MAP.sceneries["tile_45_37"] = 7;
MAP.sceneries["tile_11_46"] = 7;
MAP.sceneries["tile_11_46"] = 7;
MAP.sceneries["tile_3_35"] = 7;
MAP.sceneries["tile_3_36"] = 7;
MAP.sceneries["tile_3_34"] = 7;
MAP.sceneries["tile_11_46"] = 7;
MAP.sceneries["tile_12_46"] = 7;
MAP.sceneries["tile_10_46"] = 7;
MAP.sceneries["tile_12_77"] = 7;
MAP.sceneries["tile_34_48"] = 7;
MAP.sceneries["tile_32_47"] = 7;
MAP.sceneries["tile_45_12"] = 7;
}
}//package pack
Section 115
//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 116
//acvD_710 (ResortEmpire_fla.acvD_710)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class acvD_710 extends MovieClip {
public var btn_close:SimpleButton;
public var acv_goodResort:MovieClip;
public var acv_goodResearch:MovieClip;
public var desc_t:TextField;
public var acv_rookieResort:MovieClip;
public var acv_awesomeContractor:MovieClip;
public var acv_expertContractor:MovieClip;
public var acv_famousResort:MovieClip;
public var acv_masterDev:MovieClip;
public var acv_loveBeingHere:MovieClip;
public var acv_bagOfGold:MovieClip;
public var acv_marvelousResort:MovieClip;
public var acv_growingResort:MovieClip;
public var acv_greenBucks:MovieClip;
public var acv_credit:MovieClip;
public var acv_superDev:MovieClip;
public var acv_grandResort:MovieClip;
public var blackD:MovieClip;
public var main;
public var clip:MovieClip;
public var k:uint;
public var khusus:Boolean;
public function acvD_710(){
addFrameScript(0, frame1);
}
public function init(_arg1, _arg2:Boolean=false):void{
desc_t.mouseEnabled = false;
main = _arg1;
khusus = _arg2;
closed();
}
public function closed():void{
this.visible = false;
removeListeners();
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
btn_close.removeEventListener(MouseEvent.CLICK, closeFunction);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
main = null;
clip = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
if (khusus){
main.CallAutoPaused();
main.blackD.visible = false;
};
desc_t.text = "";
updateData();
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
btn_close.addEventListener(MouseEvent.CLICK, closeFunction, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
}
public function closeFunction(_arg1:MouseEvent):void{
TweenMax.killTweensOf(this, true);
main.PlaySound("click3");
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
if (khusus){
main.RemoveAutoPaused();
main.IfSedangGuide(false);
main.CallFadeInOutMusic(true, false, main.fadeChangeMusic);
};
}
public function onCompleteClosed():void{
closed();
}
public function updateData():void{
var _local3:String;
var _local1:Object = main.game.ACV;
var _local2:Boolean;
for (_local3 in _local1) {
if (_local3 != "completed"){
_local2 = _local1[_local3];
clip = (this[_local3] as MovieClip);
if (_local2){
clip["locked"].visible = false;
} else {
clip["locked"].visible = true;
};
};
};
_local1 = null;
clip = null;
}
public function overThis(_arg1:MouseEvent):void{
var _local2:String;
var _local3:String;
var _local4:String;
var _local5:Object;
_local2 = _arg1.target.name;
_local4 = "";
_local3 = _local4;
if ((((_local2 == "locked")) || ((_local2 == "btn")))){
_local3 = _arg1.target.parent.name;
};
if (_local3 != ""){
_local5 = serbi.Achievements[_local3];
_local4 = ((_local5["nama"] + ": ") + _local5["desc"]);
};
_local5 = null;
desc_t.text = _local4;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 117
//addJanitor_clip_594 (ResortEmpire_fla.addJanitor_clip_594)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class addJanitor_clip_594 extends MovieClip {
public var btn_janitor:SimpleButton;
public var price_t:TextField;
public var _data:uint;
public function addJanitor_clip_594(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
price_t.mouseEnabled = false;
}
public function isi(_arg1:uint, _arg2:uint):void{
_data = _arg1;
updateData();
if (_arg1 <= _arg2){
setAutoEnabled();
} else {
setAutoEnabled(false);
};
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
public function updateData():void{
price_t.text = ("Add more janitor: $" + parent["selectedOb"].REF.hire_price[_data]);
var _local1:int = parent["selectedOb"].parent_.main.money;
var _local2:uint = parent["selectedOb"].REF.hire_price[_data];
if (_local2 <= _local1){
btn_janitor.alpha = 1;
btn_janitor.mouseEnabled = true;
} else {
btn_janitor.alpha = 0.5;
btn_janitor.mouseEnabled = false;
};
}
public function setAutoEnabled(_arg1:Boolean=true):void{
if (_arg1){
this.alpha = 1;
btn_janitor.alpha = 1;
} else {
this.alpha = 0.5;
btn_janitor.alpha = 0.5;
};
btn_janitor.mouseEnabled = _arg1;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 118
//animasiJam_655 (ResortEmpire_fla.animasiJam_655)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class animasiJam_655 extends MovieClip {
public var pendek:MovieClip;
public var siang:MovieClip;
public var panjang:MovieClip;
public var blinking:MovieClip;
public var malam:MovieClip;
public function animasiJam_655(){
addFrameScript(0, frame1);
}
public function jalanJam(_arg1:Number):void{
panjang.rotation = (_arg1 * 360);
pendek.rotation = (_arg1 * (360 / 12));
}
public function toMalam():void{
malam.visible = true;
siang.visible = false;
}
public function toSiang():void{
malam.visible = false;
siang.visible = true;
}
public function showBlinking(_arg1:Boolean=true):void{
blinking.visible = _arg1;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 119
//asap_guide_854 (ResortEmpire_fla.asap_guide_854)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class asap_guide_854 extends MovieClip {
public function asap_guide_854(){
addFrameScript(0, frame1, 15, frame16);
}
public function hiding():void{
gotoAndStop(1);
visible = false;
}
public function showing(_arg1:Number, _arg2:Number):void{
visible = true;
x = _arg1;
y = _arg2;
gotoAndPlay(2);
}
public function showing0():void{
visible = true;
gotoAndPlay(2);
}
function frame1(){
stop();
}
function frame16(){
stop();
hiding();
}
}
}//package ResortEmpire_fla
Section 120
//autoIsi_text_770 (ResortEmpire_fla.autoIsi_text_770)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class autoIsi_text_770 extends MovieClip {
public var isi_t:TextField;
public var chk:MovieClip;
public function autoIsi_text_770(){
addFrameScript(0, frame1);
}
function frame1(){
isi_t.autoSize = TextFieldAutoSize.CENTER;
}
}
}//package ResortEmpire_fla
Section 121
//AutoPaused_754 (ResortEmpire_fla.AutoPaused_754)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class AutoPaused_754 extends MovieClip {
public var desc:MovieClip;
public function AutoPaused_754(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
public function hiding():void{
this.visible = false;
}
public function closed():void{
this.gotoAndPlay("closed");
}
public function callPlay():void{
this.visible = true;
this.gotoAndPlay("anim");
}
function frame1(){
stop();
}
function frame6(){
stop();
}
function frame12(){
stop();
hiding();
}
}
}//package ResortEmpire_fla
Section 122
//autoPaused_mc_755 (ResortEmpire_fla.autoPaused_mc_755)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class autoPaused_mc_755 extends MovieClip {
public function autoPaused_mc_755(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 123
//AutoSavedClip_769 (ResortEmpire_fla.AutoSavedClip_769)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class AutoSavedClip_769 extends MovieClip {
public var bg_saved:MovieClip;
public var clip:MovieClip;
public function AutoSavedClip_769(){
addFrameScript(0, frame1, 29, frame30, 46, frame47);
}
public function init():void{
this.mouseEnabled = false;
hiding();
}
public function continueAnim(){
this.gotoAndPlay("continue_anim");
}
public function hiding():void{
this.gotoAndStop("stand");
this.visible = false;
clip.isi_t.text = "";
}
public function showing():void{
clip.chk.visible = true;
this.gotoAndPlay("anim");
this.visible = true;
}
public function isi(_arg1:String):void{
clip.isi_t.text = _arg1;
clip.chk.x = (-((clip.isi_t.width / 2)) - 12);
showing();
}
function frame1(){
stop();
clip.chk.visible = false;
}
function frame30(){
stop();
}
function frame47(){
stop();
hiding();
}
}
}//package ResortEmpire_fla
Section 124
//Balon_272 (ResortEmpire_fla.Balon_272)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Balon_272 extends MovieClip {
public var _jenis:String;
public var _timer;
public var _timer2;
public var _syarat:int;
public var _show;
public var _always;
public var _khusus:Boolean;
public var par;
public function Balon_272(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
par = _arg1;
_show = (_always = (_khusus = false));
_timer = (_timer2 = (_syarat = 0));
_jenis = "";
hiding();
}
public function showingKhusus2(_arg1:String):void{
this.gotoAndStop(_arg1);
this.visible = true;
}
public function showingKhusus(_arg1):void{
if (_arg1.balon._jenis != ""){
_jenis = _arg1.balon._jenis;
if (_jenis == _arg1.smiley){
hidingKhusus();
} else {
this.gotoAndStop(_jenis);
this.visible = true;
};
} else {
hidingKhusus();
};
}
public function hidingKhusus():void{
_jenis = "";
this.visible = false;
}
public function hiding():void{
this.visible = false;
_timer2 = 0;
}
public function showing():void{
if (_jenis != ""){
par.main.PlaySound("blub2");
this.visible = true;
};
}
public function showingPop():void{
if (_jenis != ""){
if (_show){
_timer = 15;
} else {
_timer2 = 15;
};
this.visible = true;
};
}
public function setBalon(_arg1:String, _arg2:int=0, _arg3:Boolean=false, _arg4:Boolean=false){
if (((!((_jenis == ""))) && (!((_jenis == _arg1))))){
forceToClose();
};
_syarat = _arg2;
_jenis = _arg1;
_always = _arg3;
_khusus = _arg4;
this.gotoAndStop(_jenis);
if (_khusus){
if (_syarat == 0){
_timer = (200 + Math.round((Math.random() * 100)));
} else {
if (_syarat == -1){
_timer = (15 + Math.round((Math.random() * 15)));
_syarat = 7;
} else {
_syarat = 7;
_timer = (50 + Math.round((Math.random() * 30)));
};
};
} else {
_timer = (50 + Math.round((Math.random() * 20)));
};
}
public function animation(_arg1:uint){
if (_arg1 > _syarat){
if (_timer > 0){
if (!this.visible){
showing();
};
_timer--;
if (_timer2 > 0){
_timer2--;
};
} else {
if (_always){
} else {
_timer = 0;
if (!_show){
_show = true;
};
hiding();
};
};
} else {
if (_timer2 > 0){
_timer2--;
} else {
hiding();
};
};
}
public function forceToClose(){
_timer = 0;
_show = false;
_jenis = "";
_always = false;
_khusus = false;
hiding();
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 125
//balon_line_758 (ResortEmpire_fla.balon_line_758)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class balon_line_758 extends MovieClip {
public var parte:MovieClip;
public var isi2_t:TextField;
public var isi_t:TextField;
public function balon_line_758(){
addFrameScript(0, frame1);
}
public function init():void{
isi_t.text = "";
isi2_t.text = "";
isi_t.autoSize = TextFieldAutoSize.LEFT;
isi2_t.autoSize = TextFieldAutoSize.LEFT;
hiding();
}
public function isi(_arg1:String="", _arg2:String="", _arg3:Boolean=true):void{
isi_t.text = _arg1;
isi2_t.htmlText = _arg2;
var _local4:Number = Math.max(isi_t.width, isi2_t.width);
parte.part2.width = (_local4 - 8);
parte.ind(_arg3);
var _local5:Number = 8.5;
if (_arg3){
isi_t.x = _local5;
isi2_t.x = _local5;
} else {
_local5 = -((4.25 + _local4));
isi_t.x = _local5;
isi2_t.x = _local5;
};
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 126
//balon_old_763 (ResortEmpire_fla.balon_old_763)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class balon_old_763 extends MovieClip {
public var parte:MovieClip;
public var isi_t:TextField;
public function balon_old_763(){
addFrameScript(0, frame1);
}
public function init():void{
isi_t.text = "";
isi_t.autoSize = TextFieldAutoSize.LEFT;
hiding();
}
public function isi(_arg1:String="", _arg2:Boolean=true):void{
isi_t.htmlText = _arg1;
parte.part2.width = (isi_t.width - 8);
parte.ind(_arg2);
if (_arg2){
isi_t.x = 8.5;
} else {
isi_t.x = -((4.25 + isi_t.width));
};
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 127
//balon_parte_line_759 (ResortEmpire_fla.balon_parte_line_759)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class balon_parte_line_759 extends MovieClip {
public var part2:MovieClip;
public var part3:MovieClip;
public function balon_parte_line_759(){
addFrameScript(0, frame1);
}
public function ind(_arg1:Boolean):void{
part3.x = (part2.x + (part2.width - 1));
if (_arg1){
this.scaleX = 1;
this.x = 1.25;
} else {
this.scaleX = -1;
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 128
//balonD_757 (ResortEmpire_fla.balonD_757)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class balonD_757 extends MovieClip {
public var balon_line:MovieClip;
public var balon_single:MovieClip;
public function balonD_757(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
this.mouseChildren = false;
balon_single.init();
balon_line.init();
hiding();
}
public function isi(_arg1:String="", _arg2:Boolean=true):void{
var _local3:Array = _arg1.split("\n");
var _local4 = (_local3.length == 1);
if (_local4){
balon_line.hiding();
balon_single.isi(_arg1, _arg2);
} else {
balon_single.hiding();
balon_line.isi(_local3[0], _local3[1], _arg2);
};
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 129
//BaratRestoemp_297 (ResortEmpire_fla.BaratRestoemp_297)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class BaratRestoemp_297 extends MovieClip {
public function BaratRestoemp_297(){
addFrameScript(0, frame1, 114, frame115);
}
public function hiding():void{
gotoAndStop("stand");
this.visible = false;
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
gotoAndStop("stand");
this.visible = true;
}
function frame1(){
stop();
}
function frame115(){
stop();
gotoAndPlay("anim");
}
}
}//package ResortEmpire_fla
Section 130
//bayang_persen_23 (ResortEmpire_fla.bayang_persen_23)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class bayang_persen_23 extends MovieClip {
public function bayang_persen_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 131
//betaD_796 (ResortEmpire_fla.betaD_796)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class betaD_796 extends MovieClip {
public function betaD_796(){
addFrameScript(0, frame1);
}
public function showing():void{
this.buttonMode = true;
this.visible = true;
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function hiding():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function clickFunction(_arg1:MouseEvent):void{
this["parent"].gotoSponsorWebsite();
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 132
//booth_selimutRoom_cottage_132 (ResortEmpire_fla.booth_selimutRoom_cottage_132)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class booth_selimutRoom_cottage_132 extends MovieClip {
public function booth_selimutRoom_cottage_132(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 133
//booth_selimutSpa_359 (ResortEmpire_fla.booth_selimutSpa_359)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class booth_selimutSpa_359 extends MovieClip {
public function booth_selimutSpa_359(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
}
public function showing(_arg1:uint=1){
this.gotoAndStop(_arg1);
this.visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 134
//border_1x1_35 (ResortEmpire_fla.border_1x1_35)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_1x1_35 extends MovieClip {
public function border_1x1_35(){
addFrameScript(0, frame1);
}
function frame1(){
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 135
//border_2x2_175 (ResortEmpire_fla.border_2x2_175)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_2x2_175 extends MovieClip {
public function border_2x2_175(){
addFrameScript(0, frame1);
}
public function init(){
hiding();
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 136
//border_2x3_173 (ResortEmpire_fla.border_2x3_173)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_2x3_173 extends MovieClip {
public function border_2x3_173(){
addFrameScript(0, frame1);
}
public function init(){
this.mouseEnabled = false;
hiding();
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 137
//border_3x3_171 (ResortEmpire_fla.border_3x3_171)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_3x3_171 extends MovieClip {
public function border_3x3_171(){
addFrameScript(0, frame1);
}
public function init(){
hiding();
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 138
//border_3x4_169 (ResortEmpire_fla.border_3x4_169)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_3x4_169 extends MovieClip {
public function border_3x4_169(){
addFrameScript(0, frame1);
}
public function init(){
hiding();
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 139
//border_4x4_167 (ResortEmpire_fla.border_4x4_167)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_4x4_167 extends MovieClip {
public function border_4x4_167(){
addFrameScript(0, frame1);
}
public function init(){
hiding();
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 140
//border_room_861 (ResortEmpire_fla.border_room_861)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class border_room_861 extends MovieClip {
public function border_room_861(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 141
//Box_inputName_501 (ResortEmpire_fla.Box_inputName_501)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Box_inputName_501 extends MovieClip {
public var input_t:TextField;
public var btn_cancel:SimpleButton;
public var btn_ok:SimpleButton;
public var tutup:MovieClip;
public function Box_inputName_501(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
input_t.restrict = "A-Z a-z";
input_t.alwaysShowSelection = true;
hiding();
}
public function hiding():void{
tutup.hiding();
this.visible = false;
}
public function showing(_arg1:String):void{
input_t.text = _arg1;
tutup.showing();
stage.focus = input_t;
input_t.setSelection(0, 20);
this.visible = true;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 142
//box_over_676 (ResortEmpire_fla.box_over_676)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class box_over_676 extends MovieClip {
public function box_over_676(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
}
public function showing(_arg1, _arg2:Number=0, _arg3:Number=0){
this.x = (_arg1.x + _arg2);
this.y = (_arg1.y + _arg3);
this.visible = true;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 143
//box_xlip_679 (ResortEmpire_fla.box_xlip_679)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class box_xlip_679 extends MovieClip {
public function box_xlip_679(){
addFrameScript(0, frame1, 25, frame26);
}
public function showing():void{
visible = true;
gotoAndPlay("anime");
}
public function hiding():void{
gotoAndStop("stand");
visible = false;
}
function frame1(){
stop();
}
function frame26(){
stop();
hiding();
}
}
}//package ResortEmpire_fla
Section 144
//BoxLoadGame_503 (ResortEmpire_fla.BoxLoadGame_503)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class BoxLoadGame_503 extends MovieClip {
public var btn_cancel:SimpleButton;
public var btn_ok:SimpleButton;
public var tutup:MovieClip;
public var player_t:TextField;
public var day_t:TextField;
public function BoxLoadGame_503(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
hiding();
}
public function hiding():void{
tutup.hiding();
this.visible = false;
}
public function showing():void{
tutup.showing();
this.visible = true;
}
public function isi(_arg1:String, _arg2:uint):void{
player_t.text = _arg1;
day_t.text = ("DAY-" + String(_arg2));
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 145
//btn_alphaOb_626 (ResortEmpire_fla.btn_alphaOb_626)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_alphaOb_626 extends MovieClip {
public var btn_normal:SimpleButton;
public var btn_release:SimpleButton;
public var new_Cottage:MovieClip;
public var onSelected:Boolean;
public function btn_alphaOb_626(){
addFrameScript(0, frame1);
}
public function init():void{
this.buttonMode = true;
this.gotoAndStop("none");
onSelected = false;
hideButton(true);
}
public function onClick():void{
onSelected = !(onSelected);
if (onSelected){
this.gotoAndStop("selected");
hideButton(false, true);
} else {
this.gotoAndStop("none");
hideButton(true);
};
}
public function hideButton(_arg1:Boolean=false, _arg2:Boolean=false):void{
btn_normal.visible = _arg1;
btn_release.visible = _arg2;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 146
//btn_arrowMouse_607 (ResortEmpire_fla.btn_arrowMouse_607)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_arrowMouse_607 extends MovieClip {
public function btn_arrowMouse_607(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 147
//btn_destroy_612 (ResortEmpire_fla.btn_destroy_612)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_destroy_612 extends MovieClip {
public var _locked:MovieClip;
public function btn_destroy_612(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 148
//btn_dragMouse_608 (ResortEmpire_fla.btn_dragMouse_608)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_dragMouse_608 extends MovieClip {
public var _locked:MovieClip;
public function btn_dragMouse_608(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 149
//btn_expand_614 (ResortEmpire_fla.btn_expand_614)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_expand_614 extends MovieClip {
public var _locked:MovieClip;
public function btn_expand_614(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 150
//btn_extra_615 (ResortEmpire_fla.btn_extra_615)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_extra_615 extends MovieClip {
public var _locked:MovieClip;
public function btn_extra_615(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 151
//btn_facility_610 (ResortEmpire_fla.btn_facility_610)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_facility_610 extends MovieClip {
public var _locked:MovieClip;
public function btn_facility_610(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 152
//btn_janitorPos_613 (ResortEmpire_fla.btn_janitorPos_613)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_janitorPos_613 extends MovieClip {
public var _locked:MovieClip;
public function btn_janitorPos_613(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 153
//btn_room_616 (ResortEmpire_fla.btn_room_616)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_room_616 extends MovieClip {
public var _locked:MovieClip;
public function btn_room_616(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 154
//btn_scenery_605 (ResortEmpire_fla.btn_scenery_605)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_scenery_605 extends MovieClip {
public var _locked:MovieClip;
public function btn_scenery_605(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 155
//btn_sound_dragbar_654 (ResortEmpire_fla.btn_sound_dragbar_654)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class btn_sound_dragbar_654 extends MovieClip {
public var dragger:MovieClip;
public var box:MovieClip;
public var main;
public var W:Number;
public var htg:Number;
public function btn_sound_dragbar_654(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
dragger.buttonMode = true;
W = 60;
main = _arg1;
added();
}
public function added():void{
dragger.y = 4;
dragger.x = (main.sfxVol * W);
if (main.sfxVol == 0){
box.width = 0;
} else {
box.width = (dragger.x + 2);
};
}
public function settingDragBar():void{
dragger.y = 4;
if (dragger.x < 0){
dragger.x = 0;
} else {
if (dragger.x > W){
dragger.x = W;
};
};
box.width = (dragger.x + 2);
htg = (dragger.x / W);
if (htg > 0){
main.isMuteAll = false;
};
main.SettingSound(RoundDecNumber(htg, 2));
}
public function RoundDecNumber(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.pow(10, _arg2);
return ((Math.round((_arg1 * _local3)) / _local3));
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 156
//btn_tile_611 (ResortEmpire_fla.btn_tile_611)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_tile_611 extends MovieClip {
public var _locked:MovieClip;
public function btn_tile_611(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 157
//btn_tips_609 (ResortEmpire_fla.btn_tips_609)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class btn_tips_609 extends MovieClip {
public var _locked:MovieClip;
public function btn_tips_609(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
this.buttonMode = true;
}
}
}//package ResortEmpire_fla
Section 158
//buildprogressindoor_178 (ResortEmpire_fla.buildprogressindoor_178)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class buildprogressindoor_178 extends MovieClip {
public function buildprogressindoor_178(){
addFrameScript(0, frame1, 74, frame75);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (this.currentFrame == this.totalFrames){
_local1 = true;
parent.visible = false;
};
return (_local1);
}
function frame1(){
}
function frame75(){
stop();
}
}
}//package ResortEmpire_fla
Section 159
//buildprogressindoor_881 (ResortEmpire_fla.buildprogressindoor_881)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class buildprogressindoor_881 extends MovieClip {
public function buildprogressindoor_881(){
addFrameScript(0, frame1, 74, frame75);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (this.currentFrame == this.totalFrames){
_local1 = true;
parent.visible = false;
};
return (_local1);
}
function frame1(){
}
function frame75(){
stop();
}
}
}//package ResortEmpire_fla
Section 160
//cawang_640 (ResortEmpire_fla.cawang_640)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class cawang_640 extends MovieClip {
public function cawang_640(){
addFrameScript(0, frame1, 44, frame45);
}
public function init():void{
this.mouseChildren = false;
this.mouseEnabled = false;
hiding();
}
public function hiding():void{
this.visible = false;
gotoAndStop("stand");
}
public function showing():void{
this.visible = true;
gotoAndPlay("anime");
}
public function jalankanFlow():void{
hiding();
this["parent"].closingFlowTeks();
}
public function setx():void{
this.x = parent["dyn"].lebar();
}
public function removingAll():void{
}
function frame1(){
stop();
}
function frame45(){
stop();
jalankanFlow();
}
}
}//package ResortEmpire_fla
Section 161
//ClipArcade_275 (ResortEmpire_fla.ClipArcade_275)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipArcade_275 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipArcade_275(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 162
//ClipBar_301 (ResortEmpire_fla.ClipBar_301)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipBar_301 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipBar_301(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 163
//ClipBaratResto_296 (ResortEmpire_fla.ClipBaratResto_296)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipBaratResto_296 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipBaratResto_296(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 164
//ClipCottage_136 (ResortEmpire_fla.ClipCottage_136)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipCottage_136 extends MovieClip {
public var visitor1:MovieClip;
public var selimut:MovieClip;
public var visitor2:MovieClip;
public function ClipCottage_136(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 165
//ClipGiftshop_308 (ResortEmpire_fla.ClipGiftshop_308)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipGiftshop_308 extends MovieClip {
public var employee:MovieClip;
public function ClipGiftshop_308(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ResortEmpire_fla
Section 166
//ClipGolf_145 (ResortEmpire_fla.ClipGolf_145)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipGolf_145 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipGolf_145(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 167
//ClipGym_363 (ResortEmpire_fla.ClipGym_363)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipGym_363 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipGym_363(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 168
//ClipHotdog_312 (ResortEmpire_fla.ClipHotdog_312)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipHotdog_312 extends MovieClip {
public var employee:MovieClip;
public function ClipHotdog_312(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ResortEmpire_fla
Section 169
//ClipIcecream_196 (ResortEmpire_fla.ClipIcecream_196)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipIcecream_196 extends MovieClip {
public var tutup:MovieClip;
public var clip:MovieClip;
public function ClipIcecream_196(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
clip.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 170
//ClipIndiaResto_282 (ResortEmpire_fla.ClipIndiaResto_282)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipIndiaResto_282 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipIndiaResto_282(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 171
//ClipJacuzi_323 (ResortEmpire_fla.ClipJacuzi_323)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipJacuzi_323 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipJacuzi_323(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 172
//ClipJanitor_316 (ResortEmpire_fla.ClipJanitor_316)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipJanitor_316 extends MovieClip {
public function ClipJanitor_316(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 173
//ClipJanitorRoom_306 (ResortEmpire_fla.ClipJanitorRoom_306)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipJanitorRoom_306 extends MovieClip {
public function ClipJanitorRoom_306(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ResortEmpire_fla
Section 174
//ClipJapanResto_290 (ResortEmpire_fla.ClipJapanResto_290)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipJapanResto_290 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipJapanResto_290(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 175
//ClipLobby_190 (ResortEmpire_fla.ClipLobby_190)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipLobby_190 extends MovieClip {
public var emp_lobby1:MovieClip;
public function ClipLobby_190(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ResortEmpire_fla
Section 176
//ClipLodge_44 (ResortEmpire_fla.ClipLodge_44)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipLodge_44 extends MovieClip {
public var visitor1:MovieClip;
public var selimut:MovieClip;
public var visitor2:MovieClip;
public function ClipLodge_44(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 177
//ClipMedical_333 (ResortEmpire_fla.ClipMedical_333)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipMedical_333 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipMedical_333(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 178
//ClipMinimarket_328 (ResortEmpire_fla.ClipMinimarket_328)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipMinimarket_328 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var visitor2:MovieClip;
public function ClipMinimarket_328(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 179
//ClipPool_203 (ResortEmpire_fla.ClipPool_203)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipPool_203 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipPool_203(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 180
//ClipSauna_345 (ResortEmpire_fla.ClipSauna_345)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipSauna_345 extends MovieClip {
public var visitor1:MovieClip;
public var visitor2:MovieClip;
public function ClipSauna_345(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 181
//ClipSpa_351 (ResortEmpire_fla.ClipSpa_351)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipSpa_351 extends MovieClip {
public var visitor1:MovieClip;
public var employee:MovieClip;
public var selimut:MovieClip;
public var visitor2:MovieClip;
public function ClipSpa_351(){
addFrameScript(1, frame2);
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 182
//ClipTaco_200 (ResortEmpire_fla.ClipTaco_200)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ClipTaco_200 extends MovieClip {
public var employee:MovieClip;
public function ClipTaco_200(){
addFrameScript(0, frame1, 2, frame3);
}
function frame1(){
stop();
}
function frame3(){
stop();
}
}
}//package ResortEmpire_fla
Section 183
//contoh_guide_847 (ResortEmpire_fla.contoh_guide_847)
package ResortEmpire_fla {
import flash.display.*;
import com.greensock.*;
public dynamic class contoh_guide_847 extends MovieClip {
public function contoh_guide_847(){
addFrameScript(0, frame1);
}
public function showing(_arg1:String):void{
gotoAndStop(_arg1);
alpha = 0;
visible = true;
TweenMax.to(this, 1, {alpha:1});
}
public function hiding():void{
visible = false;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 184
//creditD_504 (ResortEmpire_fla.creditD_504)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class creditD_504 extends MovieClip {
public var btn_close:SimpleButton;
public var btn_youtube:SimpleButton;
public var btn_fb:SimpleButton;
public var creditMC:MovieClip;
public var main;
public var in_game:Boolean;
public function creditD_504(){
addFrameScript(0, frame1);
}
public function init(_arg1, _arg2:Boolean=false):void{
main = _arg1;
in_game = _arg2;
this.visible = false;
closing();
}
public function closing():void{
creditMC.stopping();
this.visible = false;
removingListeners();
}
public function opened():void{
this.visible = true;
creditMC.anime();
if (in_game){
main.CheckAchievements("acv_credit");
};
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function removingListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
removingListeners();
main = null;
}
public function clickFunction(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if (_local2 == "btn_close"){
main.PlaySound("click3");
closing();
if (in_game){
main.menuD.visible = true;
} else {
main.tutup.showing();
};
} else {
if (_local2 == "btn_fb"){
main.PlaySound("click2");
main.gotoDeveloperFB();
} else {
if (_local2 == "btn_youtube"){
main.PlaySound("click2");
main.gotoDeveloperYoutube();
};
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 185
//creditMC_506 (ResortEmpire_fla.creditMC_506)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class creditMC_506 extends MovieClip {
public var creditTeks:MovieClip;
public var rangka:MovieClip;
public function creditMC_506(){
addFrameScript(0, frame1);
}
public function stopping():void{
TweenMax.killTweensOf(rangka, true);
creditTeks.callDefault();
}
public function anime():void{
stopping();
rangka.scaleX = 0;
rangka.scaleY = 0;
TweenMax.to(rangka, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut, onComplete:onCompleteOpen});
}
public function onCompleteOpen():void{
creditTeks.startPlaying();
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 186
//CreditTeks_508 (ResortEmpire_fla.CreditTeks_508)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class CreditTeks_508 extends MovieClip {
public function CreditTeks_508(){
addFrameScript(0, frame1, 226, frame227);
}
public function callDefault():void{
this.visible = false;
this.gotoAndStop(1);
}
public function startPlaying():void{
anime();
this.visible = true;
}
public function anime():void{
this.gotoAndPlay("anime");
}
function frame1(){
stop();
}
function frame227(){
stop();
anime();
}
}
}//package ResortEmpire_fla
Section 187
//D_extra_664 (ResortEmpire_fla.D_extra_664)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class D_extra_664 extends MovieClip {
public var checklist:MovieClip;
public var btn_purchase:SimpleButton;
public var price_t:TextField;
public var btn_locked:SimpleButton;
public var icon_mc:MovieClip;
public var name_t:TextField;
public var effect_t:TextField;
public var star_unlock:MovieClip;
public var temp_str:String;
public var _locked:Boolean;
public var _data:Object;
public var num:uint;
public function D_extra_664(){
addFrameScript(0, frame1);
}
public function hiding():void{
this.visible = false;
}
public function isi(_arg1, _arg2:uint, _arg3:String, _arg4:Object, _arg5:Boolean=false):void{
_locked = true;
num = _arg2;
_data = _arg4;
if (_arg1.star >= _data.need_star){
_locked = false;
};
name_t.text = _data.name;
effect_t.text = _data.effect;
icon_mc.gotoAndStop(_arg3);
temp_str = _arg3;
if (_arg5){
purchase();
} else {
checklist.visible = false;
if (_locked){
btn_locked.visible = true;
btn_purchase.visible = false;
price_t.visible = false;
star_unlock.isi(_data.need_star);
star_unlock.visible = true;
icon_mc.locked_icon.visible = true;
effect_t.textColor = 0xCCCCCC;
} else {
price_t.text = ("$" + _data.price);
unlocked();
if (_arg1.money >= _data.price){
btn_purchase.mouseEnabled = true;
btn_purchase.alpha = 1;
} else {
btn_purchase.mouseEnabled = false;
btn_purchase.alpha = 0.5;
};
};
};
this.visible = true;
}
public function purchase():void{
btn_locked.visible = false;
btn_purchase.visible = false;
price_t.visible = false;
star_unlock.visible = false;
icon_mc.locked_icon.visible = false;
effect_t.textColor = 0xFFFFFF;
checklist.visible = true;
}
public function unlocked():void{
btn_locked.visible = false;
btn_purchase.visible = true;
price_t.visible = true;
star_unlock.visible = false;
icon_mc.locked_icon.visible = false;
effect_t.textColor = 0xFFFFFF;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 188
//DayAnim_660 (ResortEmpire_fla.DayAnim_660)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DayAnim_660 extends MovieClip {
public var tmp_t:TextField;
public var berita_t:TextField;
public var main;
public var kanan:Number;
public var kiri:Number;
public function DayAnim_660(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
this.mouseEnabled = false;
this.mouseChildren = false;
tmp_t.autoSize = TextFieldAutoSize.LEFT;
tmp_t.visible = false;
hiding();
}
public function hiding():void{
this.visible = false;
tmp_t.text = "";
berita_t.x = 400;
}
public function isiBerita(_arg1:String):void{
TweenMax.killTweensOf(this, true);
tmp_t.text = _arg1;
berita_t.text = _arg1;
kanan = beritaLength();
kiri = (50 - kanan);
this.visible = true;
TweenMax.to(berita_t, 5, {x:kiri, onComplete:dayAnimeComplete});
}
public function dayAnimeComplete():void{
hiding();
main.startNewDay();
}
public function beritaLength():Number{
var _local1:Number = tmp_t.width;
berita_t.x = 400;
return (_local1);
}
public function removingAll():void{
trace("remove dayAnime!!!!");
TweenMax.killTweensOf(berita_t, true);
main = null;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 189
//DB_object_onbuild_589 (ResortEmpire_fla.DB_object_onbuild_589)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object_onbuild_589 extends MovieClip {
public var btn_close:SimpleButton;
public var icon_booth:MovieClip;
public var desc_t:TextField;
public var select:Boolean;
public var selectedOb;
public var posingx:Number;
public var posingy:Number;
public function DB_object_onbuild_589(){
addFrameScript(0, frame1);
}
public function init():void{
desc_t.mouseEnabled = false;
icon_booth.mouseEnabled = false;
select = false;
selectedOb = null;
posingx = 0;
posingy = 0;
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
icon_booth.gotoAndStop(selectedOb.jenis);
select = true;
desc_t.text = selectedOb.REF.nama;
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function clickThis(_arg1:MouseEvent):void{
if (_arg1.target.name == "btn_close"){
this["parent"].PlaySound("click3");
this["parent"].DB_object0_active(false);
this["parent"].IfSedangGuideS(false);
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 190
//DB_object1_579 (ResortEmpire_fla.DB_object1_579)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object1_579 extends MovieClip {
public var btn_close:SimpleButton;
public var salary_t:TextField;
public var star1:MovieClip;
public var star2:MovieClip;
public var icon_booth:MovieClip;
public var price_t:TextField;
public var star3:MovieClip;
public var title_t:TextField;
public var desc_t:TextField;
public var level_t:TextField;
public var used_t:TextField;
public var btn_destroy:SimpleButton;
public var btn_upgrade:SimpleButton;
public var bar_exp:MovieClip;
public var opened_t:TextField;
public var checkIn:MovieClip;
public var persen_t:TextField;
public var exp_t:TextField;
public var select:Boolean;
public var double:Boolean;
public var posingx:Number;
public var posingy:Number;
public var price:uint;
public var up_price:uint;
public var up_booked_price:uint;
public var es:String;
public var level_:uint;
public var selectedOb;
public var mainJenis:String;
public function DB_object1_579(){
addFrameScript(0, frame1);
}
public function init():void{
star1.mouseEnabled = false;
star2.mouseEnabled = false;
star3.mouseEnabled = false;
title_t.mouseEnabled = false;
used_t.mouseEnabled = false;
level_t.mouseEnabled = false;
opened_t.mouseEnabled = false;
exp_t.mouseEnabled = false;
price_t.mouseEnabled = false;
desc_t.mouseEnabled = false;
checkIn.mouseEnabled = false;
checkIn.day_t.mouseEnabled = false;
persen_t.mouseEnabled = false;
icon_booth.mouseEnabled = false;
select = false;
double = false;
selectedOb = null;
posingx = 0;
posingy = 0;
exp_t.visible = false;
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
mainJenis = selectedOb.mainJenis;
btn_destroy.visible = (selectedOb.akuLobby) ? false : true;
icon_booth.gotoAndStop(selectedOb.jenis);
select = true;
title_t.text = selectedOb.nama_tampil;
updateData();
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function updateData():void{
var _local3:uint;
level_ = selectedOb.level_;
level_t.text = ("LEVEL. " + String(level_));
opened_t.text = selectedOb._ampm;
used_t.text = String(selectedOb.used);
var _local1:Number = selectedOb.getXP(true);
persen_t.text = (_local1 + "%");
if (selectedOb.akuLobby){
price_t.text = "-";
} else {
price = selectedOb.booked_price;
if (selectedOb.akuMarket){
price_t.text = ((("$" + String(price)) + " - $") + selectedOb["max_price"]);
} else {
price_t.text = ("$" + String(price));
};
};
if (selectedOb.REF.sumStaff > 0){
salary_t.text = ("$" + String(selectedOb["REF"]["salary"][(level_ - 1)]));
} else {
salary_t.text = "-";
};
if (selectedOb.main.endTutorial){
if (selectedOb.canDestroy){
btn_destroy.alpha = 1;
btn_destroy.mouseEnabled = true;
} else {
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
} else {
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
if (selectedOb.akuRoom){
if (selectedOb.customer == null){
checkIn.day_t.text = "EMPTY";
} else {
checkIn.day_t.text = ("Day " + String(selectedOb.customer.dayEnter));
};
checkIn.visible = true;
} else {
checkIn.visible = false;
};
exp_t.text = (selectedOb.expPoint + "/");
exp_t.appendText(String(selectedOb.expMax));
var _local2:Number = Math.min(75, (_local1 * 0.75));
bar_exp.width = _local2;
if (!selectedOb.akuLobby){
selectedOb.checkForUpgrade();
};
if (selectedOb.canUpgrade){
btn_upgrade.alpha = 1;
btn_upgrade.mouseEnabled = true;
} else {
btn_upgrade.alpha = 0.35;
btn_upgrade.mouseEnabled = false;
};
_local3 = 1;
while (_local3 < 4) {
if (_local3 <= level_){
this[("star" + _local3)].visible = true;
} else {
this[("star" + _local3)].visible = false;
};
_local3++;
};
desc_t.text = "";
up_price = selectedOb["up_price"];
if (selectedOb.akuLobby){
desc_t.appendText("For check in dan check out room resort.");
if (level_ < 3){
desc_t.appendText(("\nGet faster exp. point and service by upgrade this booth for $" + up_price));
};
if (!selectedOb.canUpgrade){
desc_t.appendText(" (not enough money).");
};
} else {
if (level_ < 3){
up_booked_price = selectedOb["REF"]["booked_price"][level_];
desc_t.appendText(("Upgrade this booth for $" + up_price));
if (!selectedOb.canUpgrade){
desc_t.appendText(" (not enough money)");
};
desc_t.appendText(".\nGet faster exp. point and boost visitor's mood.\nPrice/used: $");
if (selectedOb.akuMinimarket){
desc_t.appendText(((String(((4 + level_) + 1)) + " to $") + String(up_booked_price)));
} else {
desc_t.appendText(String(up_booked_price));
};
} else {
desc_t.appendText("\nUpgrade is max.");
};
};
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (380 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function clickThis(_arg1:MouseEvent):void{
es = _arg1.target.name;
if (es == "btn_close"){
this["parent"].PlaySound("click3");
this["parent"].DB_object1_active(false);
this["parent"].IfSedangGuideS(false);
} else {
if (es == "btn_destroy"){
this["parent"].PlaySound("destroy1");
acceptDestroy();
this["parent"].IfSedangGuideS(false);
} else {
if (es == "btn_upgrade"){
acceptUpgrade();
};
};
};
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
double = false;
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function acceptUpgrade():void{
if (selectedOb != null){
if (selectedOb.upgrade()){
updateData();
if (!selectedOb.akuLobby){
this["parent"]["navigator1"].checkMoreUpgrade(mainJenis);
};
};
};
}
public function acceptDestroy():void{
if (selectedOb != null){
if (selectedOb.canUpgrade){
if (!selectedOb.akuLobby){
this["parent"]["navigator1"].checkMoreUpgrade(mainJenis);
};
};
selectedOb.destroy(true);
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 191
//DB_object2_584 (ResortEmpire_fla.DB_object2_584)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import pack.Instance.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object2_584 extends MovieClip {
public var btn_close:SimpleButton;
public var desc2_t:TextField;
public var title_t:TextField;
public var desc_t:TextField;
public var icon_ob:MovieClip;
public var btn_destroy:SimpleButton;
public var pic_plant:MovieClip;
public var pic_tile:MovieClip;
public var select:Boolean;
public var es:String;
public var selectedOb;
public var posingx:Number;
public var posingy:Number;
public function DB_object2_584(){
addFrameScript(0, frame1);
}
public function init():void{
select = false;
selectedOb = null;
posingx = 0;
posingy = 0;
title_t.mouseEnabled = false;
desc_t.mouseEnabled = false;
pic_tile.mouseEnabled = false;
pic_plant.mouseEnabled = false;
icon_ob.mouseEnabled = false;
desc2_t.mouseEnabled = false;
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
title_t.text = selectedOb.REF.nama;
if ((selectedOb is Tile)){
icon_ob.gotoAndStop("Tile");
pic_tile.gotoAndStop(selectedOb.REF.lbl);
pic_tile.visible = true;
pic_plant.visible = false;
if (selectedOb.main.endTutorial){
if (selectedOb.canDestroy){
desc_t.text = "\n\nAvailable to destroy...";
btn_destroy.alpha = 1;
btn_destroy.mouseEnabled = true;
} else {
desc_t.text = "Can't destroy!\nThere's another object on that tile.";
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
} else {
desc_t.text = "\nCan't destroy!\nStill on tutorial.";
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
if (selectedOb.walkable){
desc_t.appendText("\n(Walkable Tile)");
} else {
if (selectedOb.REF.mainJenis == 1){
desc_t.appendText("\nCan planted.\nUnwalkable Tile");
} else {
desc_t.appendText("\n(Unwalkable Tile)");
};
};
desc2_t.text = "";
} else {
icon_ob.gotoAndStop("Scenery");
pic_plant.gotoAndStop(selectedOb.REF.lbl);
pic_tile.visible = false;
pic_plant.visible = true;
desc_t.text = "To make your visitors more comfortable by decorating your own plants.";
desc2_t.text = "(Somehow, it can increase your popularity + research points)";
};
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
this["parent"].CekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
if (selectedOb.REF != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
};
selectedOb = null;
}
public function acceptDestroy():void{
if (selectedOb != null){
selectedOb.destroy(false, true);
};
}
public function clickThis(_arg1:MouseEvent):void{
es = _arg1.target.name;
if (es == "btn_close"){
this["parent"].PlaySound("click3");
this["parent"].DB_object2_active(false);
} else {
if (es == "btn_destroy"){
if ((selectedOb is Tile)){
this["parent"].PlaySound("pop1");
} else {
this["parent"].PlaySound("destroy2");
};
acceptDestroy();
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 192
//DB_object3_572 (ResortEmpire_fla.DB_object3_572)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import pack.Instance.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object3_572 extends MovieClip {
public var btn_close:SimpleButton;
public var star1:MovieClip;
public var star2:MovieClip;
public var star3:MovieClip;
public var title_t:TextField;
public var desc_t:TextField;
public var pic:MovieClip;
public var balon:MovieClip;
public var btn_fire:SimpleButton;
public var bar_stamina:MovieClip;
public var btn_promote:SimpleButton;
public var mood:MovieClip;
public var select:Boolean;
public var tempDrag:Boolean;
public var selectedOb;
public var stamina_str:String;
public var es:String;
public var posingx:Number;
public var posingy:Number;
public function DB_object3_572(){
addFrameScript(0, frame1);
}
public function init():void{
select = false;
tempDrag = true;
selectedOb = null;
posingx = 0;
posingy = 0;
title_t.mouseEnabled = false;
desc_t.mouseEnabled = false;
bar_stamina.mouseEnabled = false;
pic.mouseEnabled = false;
mood.mouseEnabled = false;
star1.mouseEnabled = false;
star2.mouseEnabled = false;
star3.mouseEnabled = false;
balon.mouseEnabled = false;
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.addEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
title_t.text = selectedOb.nama_tampil;
updateData();
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function updateData():void{
var _local2:uint;
mood.gotoAndStop(selectedOb.smiley_fix);
if (((selectedOb.bubu) || (selectedOb.istirahat))){
balon.showingKhusus2("sleepy");
} else {
balon.hiding();
};
var _local1:Number = Math.min(50, (selectedOb.moodPersen * 0.5));
bar_stamina.width = _local1;
stamina_str = "";
if (selectedOb.canDestroy){
btn_fire.alpha = 1;
btn_fire.mouseEnabled = true;
} else {
btn_fire.alpha = 0.35;
btn_fire.mouseEnabled = false;
};
if (selectedOb.canUpgrade){
btn_promote.alpha = 1;
btn_promote.mouseEnabled = true;
if (selectedOb.level_ < 3){
stamina_str = (stamina_str + ("\nPromote price: $" + String(selectedOb.up_price)));
};
} else {
btn_promote.alpha = 0.35;
btn_promote.mouseEnabled = false;
if (selectedOb.level_ < 3){
stamina_str = (stamina_str + "\nCan't promote now...");
};
};
_local2 = 1;
while (_local2 < 4) {
if (_local2 <= selectedOb.level_){
this[("star" + _local2)].visible = true;
} else {
this[("star" + _local2)].visible = false;
};
_local2++;
};
desc_t.text = ("Help you to clean your resort.\n" + stamina_str);
if (((selectedOb.sleepy) && (selectedOb.backRoom))){
desc_t.appendText("\nWanna take a rest.");
};
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
if (selectedOb.REC != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
};
selectedOb = null;
}
public function acceptDestroy():void{
var _local1:*;
if (selectedOb != null){
_local1 = selectedOb;
removeSelectObject();
_local1.destroy();
_local1 = null;
};
}
public function acceptPromote():void{
if (((!((selectedOb == null))) && (selectedOb.promote()))){
updateData();
};
}
public function clickThis(_arg1:MouseEvent):void{
es = _arg1.target.name;
if (es == "btn_close"){
this["parent"].PlaySound("click3");
this["parent"].DB_object3_active(false);
} else {
if (es == "btn_fire"){
this["parent"].PlaySound("fired");
acceptDestroy();
this["parent"].DB_object3_active(false);
} else {
if (es == "btn_promote"){
acceptPromote();
};
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 193
//DB_object4_587 (ResortEmpire_fla.DB_object4_587)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import pack.Instance.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object4_587 extends MovieClip {
public var btn_close:SimpleButton;
public var activityRoom:MovieClip;
public var likes_t:TextField;
public var title_t:TextField;
public var tmp_t:TextField;
public var no_t:TextField;
public var pic:MovieClip;
public var bookedRoom:MovieClip;
public var balon:MovieClip;
public var money_t:TextField;
public var checkIn_t:TextField;
public var mood:MovieClip;
public var select:Boolean;
public var double:Boolean;
public var posingx:Number;
public var posingy:Number;
public var pt:Point;
public var selectedOb;
public var k:uint;
public function DB_object4_587(){
addFrameScript(0, frame1);
}
public function init():void{
pt = new Point();
pic.mouseChildren = false;
tmp_t.mouseEnabled = false;
checkIn_t.mouseEnabled = false;
pic.mouseEnabled = false;
mood.mouseEnabled = false;
title_t.mouseEnabled = false;
likes_t.mouseEnabled = false;
money_t.mouseEnabled = false;
select = false;
double = false;
tmp_t.visible = false;
no_t.visible = false;
posingx = 0;
posingy = 0;
closing();
btn_close.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
btn_close.addEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1, _arg2:Boolean=false):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
title_t.text = selectedOb.nama_tampil.toUpperCase();
pic.gotoAndStop(selectedOb.jenis);
mood.gotoAndStop(selectedOb.smiley);
money_t.text = ("$" + selectedOb.visual_money);
if (selectedOb.bookedRoom == null){
bookedRoom.gotoAndStop("null");
checkIn_t.visible = false;
} else {
bookedRoom.gotoAndStop(selectedOb.bookedRoom.jenis);
checkIn_t.text = ("*Check in @day " + String(selectedOb["dayEnter"]));
checkIn_t.visible = true;
};
if (((selectedOb.memasuki) && (((((((selectedOb.insideBooth) && (!((selectedOb.myob == null))))) && (selectedOb.adaActivity))) && (selectedOb.acceptActivity))))){
activityRoom.gotoAndStop(selectedOb.myob.jenis);
} else {
activityRoom.gotoAndStop("null");
};
tmp_t.text = ("$" + selectedOb.money);
likes_t.text = "";
likes_t.appendText((("- " + serbi.dataOb.Booth[selectedOb.REF.likes.Room[0]].nama) + "\n"));
var _local3:Array = selectedOb.REF.likes.Facility[0];
var _local4:uint = _local3.length;
k = 0;
while (k < _local4) {
likes_t.appendText((("- " + serbi.dataOb.Booth[_local3[k]].nama) + "\n"));
k++;
};
_local3 = null;
balon.showingKhusus(selectedOb);
positioning(_arg2);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function positioning(_arg1:Boolean=false):void{
var _local2:Number;
var _local3:Number;
if (_arg1){
pt.x = this.parent["DB_object1"].x;
pt.y = this.parent["DB_object1"].y;
_local2 = (pt.x + 230);
_local3 = (640 - _local2);
this.x = ((_local3)>200) ? (_local2 + 50) : (_local2 - 520);
this.y = pt.y;
if (posingx == 0){
posingx = this.x;
};
if (posingy == 0){
posingy = this.y;
};
} else {
if (posingx == 0){
this.x = (600 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
};
this["parent"].cekDB_objectPos(this);
}
public function closing():void{
double = false;
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function acceptDestroy():void{
if (selectedOb != null){
selectedOb.destroy();
};
}
public function clickThis(_arg1:MouseEvent):void{
this["parent"].PlaySound("click3");
this["parent"].DB_object4_active(false);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 194
//DB_object5_590 (ResortEmpire_fla.DB_object5_590)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import pack.Instance.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object5_590 extends MovieClip {
public var btn_close:SimpleButton;
public var addJan2:MovieClip;
public var addJan3:MovieClip;
public var star1:MovieClip;
public var area_t:TextField;
public var icon_booth:MovieClip;
public var star2:MovieClip;
public var janitor_t:TextField;
public var star3:MovieClip;
public var title_t:TextField;
public var upgrade_t:TextField;
public var desc_t:TextField;
public var level_t:TextField;
public var _down:MovieClip;
public var btn_destroy:SimpleButton;
public var jan1:MovieClip;
public var jan2:MovieClip;
public var jan3:MovieClip;
public var part1:MovieClip;
public var part2:MovieClip;
public var btn_upgrade:SimpleButton;
public var btn_show:SimpleButton;
public var btn_hide:SimpleButton;
public var btn_rotate:SimpleButton;
public var addJan1:MovieClip;
public var posingx:Number;
public var posingy:Number;
public var h:uint;
public var p:uint;
public var clip:MovieClip;
public var es:String;
public var select:Boolean;
public var tempDrag:Boolean;
public var hideList:Boolean;
public var selectedOb;
public function DB_object5_590(){
addFrameScript(0, frame1);
}
public function init():void{
select = false;
tempDrag = true;
hideList = true;
posingx = 0;
posingy = 0;
p = 0;
part1.mouseEnabled = false;
part2.mouseEnabled = false;
title_t.mouseEnabled = false;
desc_t.mouseEnabled = false;
upgrade_t.mouseEnabled = false;
area_t.mouseEnabled = false;
level_t.mouseEnabled = false;
janitor_t.mouseEnabled = false;
_down.mouseEnabled = false;
icon_booth.mouseEnabled = false;
h = 1;
while (h < 4) {
clip = this[("addJan" + h)];
clip.init();
clip = this[("jan" + h)];
clip.init();
clip = this[("star" + h)];
clip.mouseEnabled = false;
h++;
};
clip = null;
this.visible = false;
removeListeners();
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
h = 1;
while (h < 4) {
clip = this[("jan" + h)];
clip.removingAll();
h++;
};
selectedOb = null;
clip = null;
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
title_t.text = selectedOb.nama_tampil;
icon_booth.gotoAndStop(selectedOb.jenis);
updateData();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function updateData():void{
selectedOb.checkForUpgrade(2);
if (selectedOb.canDestroy){
btn_destroy.alpha = 1;
btn_destroy.mouseEnabled = true;
} else {
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
if (selectedOb.canUpgrade){
btn_upgrade.alpha = 1;
btn_upgrade.mouseEnabled = true;
} else {
btn_upgrade.alpha = 0.35;
btn_upgrade.mouseEnabled = false;
};
level_t.text = ("LEVEL. " + selectedOb.level_);
area_t.text = ((selectedOb.areaRangeX + " x ") + selectedOb.areaRangeY);
janitor_t.text = ((("JANITOR(S) : " + selectedOb.myJanitor.length) + "/") + selectedOb.level_);
var _local1 = "";
h = 1;
while (h < 4) {
clip = this[("star" + h)];
clip.visible = ((h)<=selectedOb.level_) ? true : false;
h++;
};
clip = null;
desc_t.text = "";
if (selectedOb.level_ < 3){
_local1 = "Expand this room area and get more available janitor(s) by upgrade this room.";
upgrade_t.text = ("Price:$" + selectedOb.up_price);
upgrade_t.visible = true;
} else {
_local1 = "Upgrade is MAX.";
upgrade_t.visible = false;
};
desc_t.appendText(_local1);
showData();
}
public function positioning():void{
if (posingx == 0){
this.x = (600 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function acceptUpgrade():void{
if (selectedOb != null){
if (selectedOb.upgrade()){
updateData();
};
};
}
public function acceptDestroy():void{
if (selectedOb != null){
selectedOb.destroy(true);
};
}
public function showData():void{
if (hideList){
btn_show.visible = true;
_down.visible = true;
btn_hide.visible = false;
isi(false);
positioning();
} else {
btn_show.visible = false;
_down.visible = false;
btn_hide.visible = true;
isi();
positioning();
};
}
public function callShowList():void{
hideList = false;
showData();
}
public function callHideList():void{
hideList = true;
showData();
}
public function isi(_arg1:Boolean=true):void{
var _local2:*;
var _local3:uint;
var _local6:Number;
var _local4:uint = selectedOb.myJanitor.length;
var _local5:Number = jan1.x;
p = 0;
_local3 = 0;
while (_local3 < 3) {
clip = (getChildByName(("jan" + (_local3 + 1))) as MovieClip);
_local2 = (getChildByName(("addJan" + (_local3 + 1))) as MovieClip);
if (_arg1){
if (_local3 == 0){
jan1.y = 205;
_local6 = jan1.y;
};
if (_local3 < selectedOb.level_){
if (_local3 < _local4){
clip.x = _local5;
if (_local3 == 0){
clip.y = _local6;
} else {
clip.y = (_local6 + (_local3 * jan1.height));
};
clip.isi(selectedOb.myJanitor[_local3], _local3);
_local2.x = _local5;
_local2.y = _local6;
_local2.hiding();
} else {
clip.x = _local5;
clip.y = _local6;
clip.hiding();
_local2.x = _local5;
if (_local3 == 0){
_local2.y = _local6;
} else {
_local2.y = (_local6 + (_local3 * jan1.height));
};
_local2.isi(_local3, _local4);
};
} else {
clip.x = _local5;
clip.y = _local6;
_local2.x = _local5;
_local2.y = _local6;
clip.hiding();
_local2.hiding();
};
} else {
if (_local3 == 0){
jan1.y = 0;
};
clip.x = _local5;
clip.y = _local6;
_local2.x = _local5;
_local2.y = _local6;
clip.hiding();
_local2.hiding();
};
_local3++;
};
if (_arg1){
part1.height = (selectedOb.level_ * jan1.height);
part2.y = (part1.y + (part1.height - 1));
} else {
part1.height = 1;
part2.y = (part1.y + (part1.height - 1));
};
}
public function hiding():void{
this.visible = false;
}
public function addJanitor(){
if (selectedOb.addJanitorExt(true)){
updateData();
};
}
public function acceptFire(_arg1){
if (((!((selectedOb == null))) && (!((_arg1 == null))))){
_arg1.objek.destroy();
updateData();
};
}
public function acceptPromote(_arg1){
if (((!((selectedOb == null))) && (!((_arg1 == null))))){
if (_arg1.objek.promote()){
_arg1.updateData();
};
};
}
public function acceptRotate(){
if (selectedOb != null){
selectedOb.acceptRotate();
};
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:*;
es = _arg1.target.name;
if (es == "btn_close"){
PlaySound("click3");
this["parent"].DB_object5_active(false);
} else {
if (es == "btn_destroy"){
PlaySound("destroy1");
acceptDestroy();
} else {
if (es == "btn_upgrade"){
acceptUpgrade();
} else {
if (es == "btn_rotate"){
PlaySound("click2");
acceptRotate();
} else {
if (es == "btn_show"){
PlaySound("click2");
callShowList();
} else {
if (es == "btn_hide"){
PlaySound("click2");
callHideList();
} else {
if (es == "btn_janitor"){
addJanitor();
} else {
if (es == "btn_fire"){
PlaySound("fired");
acceptFire(_arg1.target.parent);
} else {
if (es == "btn_promote"){
_local2 = _arg1.target.parent;
acceptPromote(_local2);
if (_local2["objek"].canUpgrade){
if (this["parent"].balonD.visible){
this["parent"].balonD.isi(("$" + _local2["objek"].up_price));
};
} else {
this["parent"].balonD.hiding();
};
_local2 = null;
};
};
};
};
};
};
};
};
};
}
public function PlaySound(_arg1:String):void{
this["parent"].PlaySound(_arg1);
}
public function overThis(_arg1:MouseEvent):void{
var _local3:String;
var _local2:* = _arg1.target;
es = _local2.name;
if (es == "btn_promote"){
this["parent"].balonD.isi(("$" + _local2.parent["objek"]["up_price"]));
} else {
if (es == "pic"){
_local3 = _local2.parent["descOn"];
this["parent"].balonD.isi(_local3);
} else {
this["parent"].balonD.hiding();
};
};
_local2 = null;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 195
//DB_object6_598 (ResortEmpire_fla.DB_object6_598)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class DB_object6_598 extends MovieClip {
public var btn_close:SimpleButton;
public var icon_booth:MovieClip;
public var title_t:TextField;
public var desc_t:TextField;
public var used_t:TextField;
public var btn_destroy:SimpleButton;
public var opened_t:TextField;
public var btn_rotate:SimpleButton;
public var select:Boolean;
public var double:Boolean;
public var es:String;
public var selectedOb;
public var posingx:Number;
public var posingy:Number;
public var _jenis:String;
public var level_:uint;
public function DB_object6_598(){
addFrameScript(0, frame1);
}
public function init():void{
opened_t.mouseEnabled = false;
title_t.mouseEnabled = false;
used_t.mouseEnabled = false;
desc_t.mouseEnabled = false;
icon_booth.mouseEnabled = false;
select = false;
double = false;
selectedOb = null;
posingx = 0;
posingy = 0;
this.visible = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.addEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
title_t.text = selectedOb.nama_tampil;
updateData();
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function updateData():void{
_jenis = selectedOb.jenis;
level_ = selectedOb.level_;
icon_booth.gotoAndStop(_jenis);
opened_t.text = selectedOb._ampm;
used_t.text = String(selectedOb.used);
desc_t.text = "";
if (selectedOb.REF.sumStaff > 0){
desc_t.appendText((("Staff's salary: $" + selectedOb.REF["salary"][(level_ - 1)]) + "/day.\n"));
};
es = ((_jenis)=="Icecream") ? "an ice cream" : ((_jenis)=="Hotdog") ? "a hotdog" : ((_jenis)=="Taco") ? "a taco" : "various gifts";
desc_t.appendText((("This booth is selling " + es) + " with price $"));
es = ((selectedOb["booked_price"] + " to $") + selectedOb["max_price"]);
desc_t.appendText(es);
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (380 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
double = false;
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function acceptDestroy():void{
if (selectedOb != null){
selectedOb.destroy(true);
};
}
public function acceptRotate():void{
if (selectedOb != null){
selectedOb.acceptRotate();
};
}
public function clickThis(_arg1:MouseEvent):void{
es = _arg1.target.name;
if (es == "btn_close"){
this["parent"].PlaySound("click3");
this["parent"].DB_object6_active(false);
} else {
if (es == "btn_destroy"){
this["parent"].PlaySound("destroy1");
acceptDestroy();
} else {
if (es == "btn_rotate"){
this["parent"].PlaySound("click2");
acceptRotate();
};
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 196
//dialog_extraUpgrade_663 (ResortEmpire_fla.dialog_extraUpgrade_663)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_extraUpgrade_663 extends MovieClip {
public var btn_close:SimpleButton;
public var page_t:TextField;
public var btn_bg:MovieClip;
public var btn_prev:SimpleButton;
public var new_note_5:MovieClip;
public var new_note_4:MovieClip;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var new_note_6:MovieClip;
public var note_2:MovieClip;
public var new_note_1:MovieClip;
public var new_prev:MovieClip;
public var note_3:MovieClip;
public var note_4:MovieClip;
public var new_note_3:MovieClip;
public var note_5:MovieClip;
public var new_note_2:MovieClip;
public var note_6:MovieClip;
public var new_next:MovieClip;
public var main;
public var _page:uint;
public var _max_file:uint;
public var _file:uint;
public var max_data:uint;
public var k:uint;
public var maxPage:uint;
public var str:String;
public var _reference:Object;
public var _ref:Array;
public function dialog_extraUpgrade_663(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
maxPage = 3;
new_next.mouseEnabled = false;
new_prev.mouseEnabled = false;
btn_bg.buttonMode = true;
closed();
}
public function closed():void{
this.visible = false;
removeListeners();
main.navigator2._selectOnDefault(true);
_ref = null;
_reference = null;
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickFunction);
this.removeEventListener(MouseEvent.MOUSE_OVER, overFunction);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
removeListeners();
main = null;
_ref = null;
_reference = null;
}
public function closing():void{
}
public function opened():void{
main.blackD.visible = true;
_reference = serbi.Extra_Upgrade;
_ref = serbi.Extra_Upgrade.listing;
max_data = _ref.length;
_page = 1;
new_next.visible = false;
new_prev.visible = false;
main.CallAutoPaused();
prevNextData();
TweenMax.killTweensOf(this, true);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overFunction, false, 0, true);
}
public function overFunction(_arg1:MouseEvent):void{
var _local3:Object;
var _local4:String;
var _local5:Boolean;
var _local2:Object = _arg1.target;
if (_local2.name == "btn_purchase"){
_local3 = _local2.parent;
_local4 = _local3["_data"].unlocked;
_local5 = ((_local3.num % 2) == 0);
main.balonD.isi(("TO UNLOCKED: " + serbi.dataOb.Booth[_local4].nama), _local5);
} else {
main.balonD.visible = false;
};
_local2 = null;
_local3 = null;
}
public function clickFunction(_arg1:MouseEvent):void{
var _local3:MovieClip;
var _local4:uint;
var _local2:String = _arg1.target.name;
if (_local2 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local2 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if (_local2 == "btn_purchase"){
_local3 = _arg1.target.parent;
str = _local3.temp_str;
_local4 = _reference[str].price;
if (main.CheckMoney("", _local4)){
main.updateRealTime("money", -(_local4));
main.updateOtherExpend("Extra", _local4);
main.game.EXTRA[str] = true;
main.game.UNLOCKED_new[str] = false;
acceptNewUnlocked(_local3.name, false);
main.acceptPurchaseToGame(str);
_local3.purchase();
main.PlaySound("coin1");
if ((((str == "leaf")) || ((((str == "sauce")) || ((str == "wallpaper")))))){
main.navigator2.settingPrice("Scenery");
};
};
_local3 = null;
} else {
if ((((_local2 == "btn_close")) || ((_local2 == "btn_bg")))){
main.PlaySound("click3");
k = 0;
while (k < max_data) {
str = _ref[k];
if (main.game.UNLOCKED_new[str]){
main.game.UNLOCKED_new[str] = false;
};
k++;
};
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
acceptNewUnlocked(str, false);
k++;
};
closed();
main.blackD.visible = false;
main.RemoveAutoPaused();
};
};
};
};
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local5:uint;
var _local6:uint;
var _local7:*;
var _local8:Boolean;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < maxPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
TweenMax.killTweensOf(this, true);
this.alpha = 0.75;
TweenMax.to(this, 0.5, {alpha:1});
};
if (_page > 1){
btn_prev.visible = true;
} else {
btn_prev.visible = false;
};
if (_page < maxPage){
btn_next.visible = true;
} else {
btn_next.visible = false;
};
page_t.text = ((_page + "/") + String(maxPage));
_max_file = (_page * 6);
_file = (_max_file - 6);
if (_max_file > max_data){
_max_file = max_data;
};
var _local3:MovieClip;
var _local4:* = main.game.EXTRA;
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
_local3 = (this.getChildByName(str) as MovieClip);
_local6 = (_max_file % 6);
if ((((_local6 == 0)) || ((k < _local6)))){
_local5 = (_file + k);
str = _ref[_local5];
_local3.isi(main, _local5, str, _reference[str], _local4[str]);
acceptNewUnlocked(_local3.name, main.game.UNLOCKED_new[str]);
} else {
_local3.hiding();
acceptNewUnlocked(_local3.name, false);
};
k++;
};
_local8 = false;
_local7 = _local8;
k = 0;
while (k < _file) {
str = _ref[k];
if (main.game.UNLOCKED_new[str]){
_local8 = true;
break;
};
k++;
};
k = _max_file;
while (k < max_data) {
str = _ref[k];
if (main.game.UNLOCKED_new[str]){
_local7 = true;
break;
};
k++;
};
new_prev.visible = _local8;
new_next.visible = _local7;
_local4 = null;
_local3 = null;
}
public function acceptNewUnlocked(_arg1:String, _arg2:Boolean=false):void{
var _local3:MovieClip;
_local3 = (this.getChildByName(("new_" + _arg1)) as MovieClip);
if (_arg2){
_local3.visible = true;
} else {
_local3.visible = false;
};
}
function frame1(){
_reference = null;
_ref = null;
}
}
}//package ResortEmpire_fla
Section 197
//dialog_facility_518 (ResortEmpire_fla.dialog_facility_518)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_facility_518 extends MovieClip {
public const PX:Number = 42;
public const PY:Number = 85;
public const SX:Number = -50;
public var locked_Pool:MovieClip;
public var btn_Pool:SimpleButton;
public var locked_Sauna:MovieClip;
public var btn_Minimarket:SimpleButton;
public var new_Golf:MovieClip;
public var new_Hotdog:MovieClip;
public var new_JapanResto:MovieClip;
public var BaratResto_sum:MovieClip;
public var btn_IndiaResto:SimpleButton;
public var Icecream_sum:MovieClip;
public var Golf_sum:MovieClip;
public var Spa_sum:MovieClip;
public var Minimarket_sum:MovieClip;
public var locked_Arcade:MovieClip;
public var new_Giftshop:MovieClip;
public var Pool_sum:MovieClip;
public var locked_Jacuzi:MovieClip;
public var locked_Gym:MovieClip;
public var btn_Giftshop:SimpleButton;
public var btn_Taco:SimpleButton;
public var btn_JapanResto:SimpleButton;
public var JapanResto_sum:MovieClip;
public var locked_Giftshop:MovieClip;
public var locked_JapanResto:MovieClip;
public var btn_Hotdog:SimpleButton;
public var new_Pool:MovieClip;
public var new_Arcade:MovieClip;
public var new_Gym:MovieClip;
public var locked_Taco:MovieClip;
public var btn_BaratResto:SimpleButton;
public var btn_Medical:SimpleButton;
public var Bar_sum:MovieClip;
public var btn_Icecream:SimpleButton;
public var btn_Sauna:SimpleButton;
public var new_Spa:MovieClip;
public var new_Bar:MovieClip;
public var Sauna_sum:MovieClip;
public var locked_Minimarket:MovieClip;
public var locked_Icecream:MovieClip;
public var new_IndiaResto:MovieClip;
public var locked_Medical:MovieClip;
public var btn_Arcade:SimpleButton;
public var new_Taco:MovieClip;
public var Taco_sum:MovieClip;
public var locked_Hotdog:MovieClip;
public var locked_Bar:MovieClip;
public var btn_Golf:SimpleButton;
public var btn_Gym:SimpleButton;
public var new_Minimarket:MovieClip;
public var Hotdog_sum:MovieClip;
public var Jacuzi_sum:MovieClip;
public var Gym_sum:MovieClip;
public var new_Medical:MovieClip;
public var new_Icecream:MovieClip;
public var Arcade_sum:MovieClip;
public var locked_Golf:MovieClip;
public var locked_Spa:MovieClip;
public var btn_Bar:SimpleButton;
public var btn_Jacuzi:SimpleButton;
public var btn_Spa:SimpleButton;
public var new_Jacuzi:MovieClip;
public var Medical_sum:MovieClip;
public var locked_BaratResto:MovieClip;
public var IndiaResto_sum:MovieClip;
public var Giftshop_sum:MovieClip;
public var locked_IndiaResto:MovieClip;
public var new_BaratResto:MovieClip;
public var new_Sauna:MovieClip;
public var pjg_list:uint;
public var m:uint;
public var str:String;
public var unlocked:Boolean;
public var clip;
public function dialog_facility_518(){
addFrameScript(0, frame1);
}
public function init():void{
callDefault();
pjg_list = serbi.dataOb.listing.length;
m = 0;
while (m < pjg_list) {
str = serbi.dataOb.listing[m];
clip = (this[("new_" + str)] as MovieClip);
clip.mouseEnabled = false;
unlocked = this.parent["game"].UNLOCKED_new[str];
clip.visible = unlocked;
clip = (this[(str + "_sum")] as MovieClip);
clip.mouseEnabled = false;
m++;
};
clip = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
m = 0;
while (m < pjg_list) {
str = serbi.dataOb.listing[m];
unlocked = this.parent["game"].UNLOCKED[str];
clip = this[("btn_" + str)];
if (unlocked){
clip.visible = true;
clip.mouseEnabled = true;
} else {
clip.visible = false;
clip.mouseEnabled = false;
};
clip = (this[("locked_" + str)] as MovieClip);
clip.visible = !(unlocked);
m++;
};
clip = null;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:PX, alpha:1, ease:Cubic.easeInOut});
}
public function acceptNewUnlocked(_arg1:String):void{
trace("->acceptNewUnlocked", _arg1);
clip = (this[("new_" + _arg1)] as MovieClip);
clip.visible = true;
}
public function closing():void{
TweenMax.killTweensOf(this, true);
m = 0;
while (m < pjg_list) {
str = serbi.dataOb.listing[m];
clip = (this[("new_" + str)] as MovieClip);
unlocked = this.parent["game"].UNLOCKED_new.Facility;
if (unlocked){
clip.visible = true;
} else {
clip.visible = false;
};
m++;
};
clip = null;
TweenMax.to(this, 0.25, {x:SX, alpha:1, ease:Cubic.easeInOut, onComplete:checkTweenClosed});
}
public function callDefault():void{
this.visible = false;
this.x = SX;
this.y = PY;
this.alpha = 0.25;
}
public function checkTweenClosed():void{
this.visible = false;
}
function frame1(){
clip = null;
}
}
}//package ResortEmpire_fla
Section 198
//dialog_jum_text_519 (ResortEmpire_fla.dialog_jum_text_519)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class dialog_jum_text_519 extends MovieClip {
public var isi_t:TextField;
public function dialog_jum_text_519(){
addFrameScript(0, frame1);
}
public function isi(_arg1:String){
isi_t.text = _arg1;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 199
//dialog_room_560 (ResortEmpire_fla.dialog_room_560)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_room_560 extends MovieClip {
public const PX:Number = 42;
public const PY:Number = 137;
public const SX:Number = -30;
public var locked_Lodge:MovieClip;
public var Cottage_sum:MovieClip;
public var locked_Cottage:MovieClip;
public var btn_Lodge:SimpleButton;
public var Lodge_sum:MovieClip;
public var new_Lodge:MovieClip;
public var new_Cottage:MovieClip;
public var btn_Cottage:SimpleButton;
public var unlocked:Boolean;
public var clip;
public function dialog_room_560(){
addFrameScript(0, frame1);
}
public function opened():void{
updateClip("Cottage");
updateClip("Lodge");
TweenMax.killTweensOf(this, true);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:PX, alpha:1, ease:Cubic.easeInOut});
}
public function updateClip(_arg1:String):void{
unlocked = this.parent["game"].UNLOCKED[_arg1];
clip = this[("btn_" + _arg1)];
if (unlocked){
clip.visible = (clip.mouseEnabled = true);
} else {
clip.visible = (clip.mouseEnabled = false);
};
clip = (this[("locked_" + _arg1)] as MovieClip);
clip.visible = !(unlocked);
clip = null;
}
public function closeClip(_arg1:String, _arg2:Boolean=false):void{
clip = (this[("new_" + _arg1)] as MovieClip);
unlocked = this.parent["game"].UNLOCKED_new["Room"];
if (unlocked){
clip.visible = true;
} else {
clip.visible = false;
};
if (_arg2){
clip.mouseEnabled = false;
clip = (this[(_arg1 + "_sum")] as MovieClip);
clip.mouseEnabled = false;
};
clip = null;
}
public function acceptNewUnlocked(_arg1:String):void{
clip = (this[("new_" + _arg1)] as MovieClip);
clip.visible = true;
clip = null;
}
public function closing():void{
closeClip("Cottage");
closeClip("Lodge");
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.25, {x:SX, alpha:1, ease:Cubic.easeInOut, onComplete:checkTweenClosed});
}
public function init():void{
this.visible = false;
this.x = SX;
this.y = PY;
this.alpha = 0.5;
closeClip("Cottage", true);
closeClip("Lodge", true);
}
public function checkTweenClosed():void{
this.visible = false;
}
function frame1(){
clip = null;
}
}
}//package ResortEmpire_fla
Section 200
//dialog_scenery_563 (ResortEmpire_fla.dialog_scenery_563)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_scenery_563 extends MovieClip {
public const PX:Number = 42;
public const PY:Number = 150;
public const SX:Number = -30;
public var locked_PLANT_6:MovieClip;
public var new_PLANT_2:MovieClip;
public var new_PLANT_3:MovieClip;
public var locked_PLANT_8:MovieClip;
public var btn_PLANT_8:SimpleButton;
public var new_PLANT_1:MovieClip;
public var new_PLANT_6:MovieClip;
public var new_PLANT_7:MovieClip;
public var new_PLANT_4:MovieClip;
public var new_PLANT_5:MovieClip;
public var btn_PLANT_3:SimpleButton;
public var btn_PLANT_2:SimpleButton;
public var locked_PLANT_1:MovieClip;
public var btn_PLANT_1:SimpleButton;
public var new_PLANT_8:MovieClip;
public var locked_PLANT_3:MovieClip;
public var btn_PLANT_7:SimpleButton;
public var locked_PLANT_2:MovieClip;
public var btn_PLANT_6:SimpleButton;
public var locked_PLANT_5:MovieClip;
public var btn_PLANT_5:SimpleButton;
public var locked_PLANT_4:MovieClip;
public var btn_PLANT_4:SimpleButton;
public var locked_PLANT_7:MovieClip;
public var _dataScenery:Object;
public var _listing:Array;
public var str:String;
public var unlocked:Boolean;
public var clip;
public var strings:String;
public var pricing:Array;
public var discount:Array;
public var m:uint;
public var pjg_list:uint;
public function dialog_scenery_563(){
addFrameScript(0, frame1);
}
public function opened():void{
TweenMax.killTweensOf(this, true);
m = 0;
while (m < pjg_list) {
str = _listing[m];
unlocked = this.parent["game"].UNLOCKED[str];
clip = this[("btn_" + str)];
if (unlocked){
clip.visible = true;
clip.mouseEnabled = true;
} else {
clip.visible = false;
clip.mouseEnabled = false;
};
clip = (this[("locked_" + str)] as MovieClip);
clip.visible = !(unlocked);
m++;
};
clip = null;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:PX, alpha:1, ease:Cubic.easeInOut});
}
public function closing():void{
TweenMax.killTweensOf(this, true);
m = 0;
while (m < pjg_list) {
str = _listing[m];
clip = (this[("new_" + str)] as MovieClip);
unlocked = this.parent["game"].UNLOCKED_new.Scenery;
if (unlocked){
clip.visible = true;
} else {
clip.visible = false;
};
m++;
};
TweenMax.to(this, 0.25, {x:SX, alpha:1, ease:Cubic.easeInOut, onComplete:checkTweenClosed});
}
public function callDefault():void{
this.visible = false;
this.x = SX;
this.y = PY;
this.alpha = 0.5;
}
public function removingAll():void{
TweenMax.killTweensOf(this);
_dataScenery = null;
_listing = null;
pricing = null;
clip = null;
discount = null;
}
public function init():void{
callDefault();
pricing = [];
discount = [];
_dataScenery = serbi.dataOb.Scenery;
_listing = _dataScenery.listing;
pjg_list = _listing.length;
m = 0;
while (m < pjg_list) {
str = _listing[m];
pricing[str] = 0;
discount[str] = 0;
clip = (this[("new_" + str)] as MovieClip);
clip.mouseEnabled = false;
unlocked = this.parent["game"].UNLOCKED_new[str];
if (!this.parent["game"].UNLOCKED_new.Scenery){
unlocked = false;
};
clip.visible = unlocked;
m++;
};
clip = null;
}
public function checkTweenClosed():void{
this.visible = false;
}
public function acceptNewUnlocked(_arg1:String):void{
clip = (this[("new_" + _arg1)] as MovieClip);
clip.visible = true;
}
function frame1(){
strings = "";
}
}
}//package ResortEmpire_fla
Section 201
//dialog_tile_540 (ResortEmpire_fla.dialog_tile_540)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_tile_540 extends MovieClip {
public const PX:Number = 42;
public const PY:Number = 140;
public const SX:Number = -30;
public var btn_TILE_2:SimpleButton;
public var btn_TILE_3:SimpleButton;
public var btn_TILE_1:SimpleButton;
public var btn_TILE_13:SimpleButton;
public var btn_TILE_6:SimpleButton;
public var btn_TILE_12:SimpleButton;
public var btn_TILE_7:SimpleButton;
public var btn_TILE_11:SimpleButton;
public var btn_TILE_4:SimpleButton;
public var btn_TILE_10:SimpleButton;
public var btn_TILE_5:SimpleButton;
public var btn_TILE_8:SimpleButton;
public var btn_TILE_9:SimpleButton;
public var i:uint;
public function dialog_tile_540(){
addFrameScript(0, frame1);
}
public function opened():void{
TweenMax.killTweensOf(this, true);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:PX, alpha:1, ease:Cubic.easeInOut});
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.25, {x:SX, alpha:1, ease:Cubic.easeInOut, onComplete:checkTweenClosed});
}
public function init():void{
this.visible = false;
this.x = SX;
this.y = PY;
this.alpha = 0.5;
}
public function tempLocked():void{
var _local1:*;
i = 5;
while (i < 14) {
_local1 = this[("btn_TILE_" + i)];
_local1.alpha = 0.75;
_local1.mouseEnabled = false;
i++;
};
_local1 = null;
}
public function openTempLocked():void{
var _local1:*;
i = 5;
while (i < 14) {
_local1 = this[("btn_TILE_" + i)];
_local1.alpha = 1;
_local1.mouseEnabled = true;
i++;
};
_local1 = null;
}
public function checkTweenClosed():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 202
//dialog_tips_554 (ResortEmpire_fla.dialog_tips_554)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class dialog_tips_554 extends MovieClip {
public const PX:Number = 42;
public const PY:Number = 67;
public const SX:Number = -85;
public var btn_close:SimpleButton;
public var page_t:TextField;
public var markClip:MovieClip;
public var desc_t:TextField;
public var btn_prev:SimpleButton;
public var btn_next:SimpleButton;
public var new_Tips:MovieClip;
public var new_prev:MovieClip;
public var new_next:MovieClip;
public var main;
public var tempNewTips:Array;
public var dataTipsFix:Object;
public var listTips:Object;
public var _page:uint;
public var _totalPage:uint;
public var k:uint;
public var jenisTips:String;
public function dialog_tips_554(){
addFrameScript(0, frame1);
}
public function opened():void{
TweenMax.killTweensOf(this, true);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:PX, alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
catchData();
}
public function removingAll():void{
TweenMax.killTweensOf(this);
this.removeEventListener(MouseEvent.CLICK, clickFunction);
main = null;
tempNewTips = null;
dataTipsFix = null;
listTips = null;
}
public function clickFunction(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if (_local2 == "btn_close"){
this["parent"].PlaySound("click3");
main.navigator2._selectOnDefault(true);
closing();
} else {
if (_local2 == "btn_next"){
TweenMax.killTweensOf(this, true);
main.PlaySound("click2");
prevNextData(false, true);
} else {
if (_local2 == "btn_prev"){
TweenMax.killTweensOf(this, true);
main.PlaySound("click2");
prevNextData(true);
};
};
};
}
public function catchData():void{
new_next.visible = false;
new_prev.visible = false;
dataTipsFix = serbi.Tips;
listTips = main.game.Tips.listing;
tempNewTips = main.game.Tips.NewOnList;
_totalPage = dataTipsFix.listing.length;
if (tempNewTips.length > 0){
jenisTips = tempNewTips[0];
_page = listTips[jenisTips]._page;
} else {
_page = 1;
};
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:Boolean;
var _local4:Boolean;
var _local5:uint;
var _local6:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
this.alpha = 0.75;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
};
btn_prev.visible = ((_page)>1) ? true : false;
btn_next.visible = ((_page)<_totalPage) ? true : false;
jenisTips = dataTipsFix.listing[(_page - 1)];
page_t.text = ((_page + "/") + String(_totalPage));
_local3 = false;
_local4 = false;
if (_totalPage > 0){
main.updateTampilanTips(jenisTips);
_local6 = tempNewTips.length;
k = 0;
for (;k < _local6;k++) {
_local5 = listTips[tempNewTips[k]]._page;
if (_local5 < _page){
if (_local4){
continue;
} else {
_local4 = true;
continue;
};
} else {
if (_local5 > _page){
_local3 = true;
break;
};
};
};
} else {
hideDescription();
};
new_next.visible = _local3;
new_prev.visible = _local4;
}
public function showDescription(_arg1:Boolean=false):void{
new_Tips.visible = _arg1;
desc_t.text = dataTipsFix[jenisTips];
desc_t.visible = true;
markClip.visible = false;
}
public function hideDescription():void{
new_Tips.visible = false;
desc_t.visible = false;
markClip.visible = true;
}
public function closing():void{
TweenMax.killTweensOf(this, true);
this.removeEventListener(MouseEvent.CLICK, clickFunction);
TweenMax.to(this, 0.25, {x:SX, alpha:1, ease:Cubic.easeInOut, onComplete:checkTweenClosed});
}
public function init(_arg1):void{
main = _arg1;
new_prev.mouseEnabled = false;
new_next.mouseEnabled = false;
this.visible = false;
this.x = SX;
this.y = PY;
this.alpha = 0.25;
}
public function checkTweenClosed():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 203
//dyn_638 (ResortEmpire_fla.dyn_638)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class dyn_638 extends MovieClip {
public var countdum_t:TextField;
public var isi_t:TextField;
public var dum_t:TextField;
public var count_t:TextField;
public var _counting:String;
public var teks:String;
public var width_couunting:Number;
public var _lebar:Number;
public var syarat:Boolean;
public var _batas:int;
public function dyn_638(){
addFrameScript(0, frame1);
}
public function init():void{
countdum_t.visible = false;
dum_t.visible = false;
dum_t.autoSize = TextFieldAutoSize.LEFT;
countdum_t.autoSize = TextFieldAutoSize.LEFT;
}
public function isi(_arg1:String, _arg2:int=0, _arg3:uint=0):Number{
teks = _arg1;
isi_t.text = teks;
syarat = ((_arg3)>0) ? true : false;
_batas = _arg3;
counting(_arg2);
_lebar = dum_t.width;
if (syarat){
width_couunting = (_lebar - countdum_t.width);
count_t.x = width_couunting;
};
this.visible = true;
return (_lebar);
}
public function counting(_arg1:int=0):void{
dum_t.text = teks;
if (syarat){
_counting = (((("(" + _arg1) + "/") + _batas) + ")");
dum_t.appendText(_counting);
count_t.text = _counting;
countdum_t.text = _counting;
count_t.visible = true;
} else {
count_t.visible = false;
};
}
public function posisiCount(_arg1:Number):void{
count_t.x = _arg1;
}
public function lebar():Number{
var _local1:Number = (this.x + dum_t.width);
return (_local1);
}
public function showing():void{
this.visible = true;
}
public function closing():void{
}
public function hiding():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 204
//emp_guide_848 (ResortEmpire_fla.emp_guide_848)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class emp_guide_848 extends MovieClip {
public function emp_guide_848(){
addFrameScript(0, frame1, 15, frame16, 32, frame33, 49, frame50, 64, frame65, 79, frame80, 96, frame97);
}
function frame1(){
stop();
}
function frame16(){
stop();
}
function frame33(){
stop();
}
function frame50(){
stop();
}
function frame65(){
stop();
}
function frame80(){
stop();
}
function frame97(){
stop();
}
}
}//package ResortEmpire_fla
Section 205
//emp_IndiaResto_284 (ResortEmpire_fla.emp_IndiaResto_284)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class emp_IndiaResto_284 extends MovieClip {
public function emp_IndiaResto_284(){
addFrameScript(0, frame1, 114, frame115);
}
public function hiding():void{
gotoAndStop("stand");
this.visible = false;
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
gotoAndStop("stand");
this.visible = true;
}
function frame1(){
stop();
}
function frame115(){
stop();
gotoAndPlay("anim");
}
}
}//package ResortEmpire_fla
Section 206
//emp_JapanResto_291 (ResortEmpire_fla.emp_JapanResto_291)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class emp_JapanResto_291 extends MovieClip {
public function emp_JapanResto_291(){
addFrameScript(0, frame1, 114, frame115);
}
public function hiding():void{
gotoAndStop("stand");
this.visible = false;
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
gotoAndStop("stand");
this.visible = true;
}
function frame1(){
stop();
}
function frame115(){
stop();
gotoAndPlay("anim");
}
}
}//package ResortEmpire_fla
Section 207
//emp_medical_335 (ResortEmpire_fla.emp_medical_335)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class emp_medical_335 extends MovieClip {
public function emp_medical_335(){
addFrameScript(0, frame1, 159, frame160, 173, frame174);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
this.visible = true;
this.gotoAndPlay("anim2");
}
function frame1(){
stop();
}
function frame160(){
stop();
gotoAndPlay("anim");
}
function frame174(){
stop();
gotoAndStop("stand");
}
}
}//package ResortEmpire_fla
Section 208
//emp_Minimarket_331 (ResortEmpire_fla.emp_Minimarket_331)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class emp_Minimarket_331 extends MovieClip {
public function emp_Minimarket_331(){
addFrameScript(0, frame1, 114, frame115);
}
public function hiding():void{
gotoAndStop("stand");
this.visible = false;
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
gotoAndStop("stand");
this.visible = true;
}
function frame1(){
stop();
}
function frame115(){
stop();
gotoAndPlay("anim");
}
}
}//package ResortEmpire_fla
Section 209
//EmpBar_302 (ResortEmpire_fla.EmpBar_302)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class EmpBar_302 extends MovieClip {
public function EmpBar_302(){
addFrameScript(0, frame1, 114, frame115);
}
public function hiding():void{
gotoAndStop("stand");
this.visible = false;
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
gotoAndStop("stand");
this.visible = true;
}
function frame1(){
stop();
}
function frame115(){
stop();
gotoAndPlay("anim");
}
}
}//package ResortEmpire_fla
Section 210
//employeeGiftshop_309 (ResortEmpire_fla.employeeGiftshop_309)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class employeeGiftshop_309 extends MovieClip {
public function employeeGiftshop_309(){
addFrameScript(0, frame1, 5, frame6, 11, frame12);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
this.visible = true;
this.gotoAndPlay("anim2");
}
function frame1(){
stop();
}
function frame6(){
stop();
}
function frame12(){
stop();
gotoAndStop("stand");
}
}
}//package ResortEmpire_fla
Section 211
//EmployeeSpa_352 (ResortEmpire_fla.EmployeeSpa_352)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class EmployeeSpa_352 extends MovieClip {
public function EmployeeSpa_352(){
addFrameScript(0, frame1, 15, frame16, 28, frame29);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anim():void{
this.visible = true;
this.gotoAndPlay("anim");
}
public function anim2():void{
this.visible = true;
this.gotoAndPlay("anim2");
}
function frame1(){
stop();
}
function frame16(){
stop();
}
function frame29(){
stop();
gotoAndStop("stand");
}
}
}//package ResortEmpire_fla
Section 212
//ExpandBox_673 (ResortEmpire_fla.ExpandBox_673)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class ExpandBox_673 extends MovieClip {
public var checklist:MovieClip;
public var btn_purchase:SimpleButton;
public var area_t:TextField;
public var price_t:TextField;
public var btn_locked:SimpleButton;
public var level_t:TextField;
public var n_expand:uint;
public function ExpandBox_673(){
addFrameScript(0, frame1);
}
public function isi(_arg1:uint, _arg2:Object, _arg3:uint, _arg4){
n_expand = _arg1;
level_t.text = ("LEVEL " + (n_expand + 1));
area_t.text = (((("LARGER AREA" + "\n") + _arg2.ROWS) + " x ") + _arg2.COLS);
price_t.text = ("$" + _arg3);
checkIt(_arg3, _arg4);
}
public function checkIt(_arg1:uint, _arg2){
if (n_expand <= _arg2.game.EXPAND){
purchase();
} else {
price_t.visible = true;
checklist.visible = false;
if (((_arg2.game.UNLOCKED[("Expand" + n_expand)]) && ((_arg2.game.EXPAND == (n_expand - 1))))){
btn_locked.visible = false;
btn_purchase.visible = true;
if (_arg1 > _arg2.money){
btn_purchase.mouseEnabled = false;
btn_purchase.alpha = 0.5;
} else {
btn_purchase.mouseEnabled = true;
btn_purchase.alpha = 1;
};
} else {
btn_locked.visible = true;
btn_purchase.visible = false;
};
};
}
public function purchase(){
btn_purchase.visible = (price_t.visible = (btn_locked.visible = false));
checklist.visible = true;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 213
//expandD_672 (ResortEmpire_fla.expandD_672)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class expandD_672 extends MovieClip {
public var btn_close:SimpleButton;
public var new_Expand2:MovieClip;
public var note_expand1:MovieClip;
public var note_expand2:MovieClip;
public var new_Expand1:MovieClip;
public var now_t:TextField;
public var main;
public function expandD_672(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
closeClip("Expand1", true);
closeClip("Expand2", true);
hiding();
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:onCompleteClosed});
}
public function hiding():void{
this.visible = false;
this.x = -500;
removeListeners();
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickFunction);
this.removeEventListener(MouseEvent.MOUSE_OVER, onMouseOver);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
removeListeners();
main = null;
}
public function opened():void{
main.CallAutoPaused();
updateData();
TweenMax.killTweensOf(this, true);
this.visible = true;
this.scaleX = 0;
this.scaleY = 0;
this.x = 320;
this.y = 210;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut, onComplete:onCompleteOpen});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, onMouseOver, false, 0, true);
}
public function acceptNewUnlocked(_arg1:String):void{
var _local2:MovieClip = (this[("new_" + _arg1)] as MovieClip);
_local2.visible = true;
}
public function closeClip(_arg1:String, _arg2:Boolean=false):void{
var _local3:MovieClip = (this[("new_" + _arg1)] as MovieClip);
var _local4:Boolean = this.parent["game"].UNLOCKED_new[_arg1];
if (((_local4) && (_arg2))){
_local3.visible = true;
} else {
_local3.visible = false;
if (!_arg2){
this.parent["game"].UNLOCKED_new[_arg1] = false;
};
};
_local3 = null;
}
public function closingAuto():void{
main.RemoveAutoPaused();
closing();
}
public function onMouseOver(_arg1:Event):void{
var _local2:Object = _arg1.target;
if (_local2.name == "btn_locked"){
if (_local2.parent.name == "note_expand2"){
main.balonD.isi("Need 6 star player");
} else {
main.balonD.visible = false;
};
} else {
main.balonD.visible = false;
};
_local2 = null;
}
public function clickFunction(_arg1:Event):void{
var _local3:MovieClip;
var _local2:String = _arg1.target.name;
if (_local2 == "btn_close"){
main.PlaySound("click3");
if (main["game"]["UNLOCKED_new"]["Expand1"]){
closeClip("Expand1");
} else {
if (main["game"]["UNLOCKED"]["Expand1"]){
if (main["game"]["UNLOCKED_new"]["Expand2"]){
closeClip("Expand2");
};
};
};
main.navigator2._selectOnDefault(true);
closingAuto();
} else {
if (_local2 == "btn_purchase"){
_local3 = _arg1.target.parent;
closing();
closeClip("Expand1");
closeClip("Expand2");
main.acceptPurchaseExpand(_local3);
main.khususUnlockedExpand2();
_local3 = null;
};
};
}
public function onCompleteOpen():void{
}
public function onCompleteClosed():void{
hiding();
}
public function updateData():void{
var _local1:uint = main.game.EXPAND;
if (_local1 == 2){
now_t.text = ((("MAXIMUM RESORT AREA : " + String(main.ROWS)) + " x ") + String(main.COLS));
} else {
now_t.text = ((((("RESORT AREA NOW (LEVEL " + (_local1 + 1)) + ") :") + String(main.ROWS)) + " x ") + String(main.COLS));
};
note_expand1.isi(1, serbi.EXPAND[1], serbi.EXPAND["price"][1], main);
note_expand2.isi(2, serbi.EXPAND[2], serbi.EXPAND["price"][2], main);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 214
//failedD_749 (ResortEmpire_fla.failedD_749)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class failedD_749 extends MovieClip {
public var btn_ok:SimpleButton;
public function failedD_749(){
addFrameScript(0, frame1);
}
public function showing(_arg1:Boolean=true):void{
this.visible = _arg1;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 215
//FollowD_742 (ResortEmpire_fla.FollowD_742)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class FollowD_742 extends MovieClip {
public var likeSponsor:MovieClip;
public var btn_close:SimpleButton;
public var btn_bg:MovieClip;
public var btn_likeLG:SimpleButton;
public var btn_likeSponsor:SimpleButton;
public var followLG:MovieClip;
public var likeLG:MovieClip;
public var followSponsor:MovieClip;
public var failedD:MovieClip;
public var main;
public function FollowD_742(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
btn_bg.buttonMode = true;
failedD.showing(false);
closed();
}
public function closed():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
TweenMax.killTweensOf(this, true);
this.removeEventListener(MouseEvent.CLICK, clickFunction);
main = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
setLikeSponsor();
setLikeLG();
main.CallAutoPaused();
main.blackD.visible = true;
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function clickFunction(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
var _local3:Boolean;
if (_local2 == "btn_likeSponsor"){
_local3 = main.addOtherBonus("likeSponsor");
} else {
if (_local2 == "btn_likeLG"){
_local3 = main.addOtherBonus("likeDeveloper");
} else {
if ((((_local2 == "btn_close")) || ((_local2 == "btn_bg")))){
TweenMax.killTweensOf(this, true);
main.PlaySound("click3");
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
main.blackD.visible = false;
main.RemoveAutoPaused();
main.IfSedangGuide(false);
main.CallFadeInOutMusic(true, false, main.fadeChangeMusic);
} else {
if (_local2 == "btn_ok"){
_local3 = true;
main.PlaySound("click3");
};
};
};
};
trace(_local2, "berhasil connect?", _local3);
if (_local3){
failedD.showing(false);
} else {
failedD.showing();
};
}
public function onCompleteClosed():void{
closed();
}
public function setLikeSponsor():void{
if (main.game.likeSponsor){
followSponsor.visible = true;
btn_likeSponsor.visible = false;
likeSponsor.gotoAndStop(2);
} else {
followSponsor.visible = false;
btn_likeSponsor.visible = true;
likeSponsor.gotoAndStop(1);
};
}
public function setLikeLG():void{
if (main.game.likeLG){
followLG.visible = true;
btn_likeLG.visible = false;
likeLG.gotoAndStop(2);
} else {
followLG.visible = false;
btn_likeLG.visible = true;
likeLG.gotoAndStop(1);
};
}
public function acceptLike(_arg1:String):void{
main.game[_arg1] = true;
if (_arg1 == "likeSponsor"){
setLikeSponsor();
} else {
setLikeLG();
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 216
//gamesfre_pre_dragon_animation_406 (ResortEmpire_fla.gamesfre_pre_dragon_animation_406)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class gamesfre_pre_dragon_animation_406 extends MovieClip {
public function gamesfre_pre_dragon_animation_406(){
addFrameScript(86, frame87);
}
function frame87(){
stop();
this["parent"].removeThis();
}
}
}//package ResortEmpire_fla
Section 217
//gamesfre_pre_mendengus_414 (ResortEmpire_fla.gamesfre_pre_mendengus_414)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class gamesfre_pre_mendengus_414 extends MovieClip {
public function gamesfre_pre_mendengus_414(){
addFrameScript(5, frame6);
}
function frame6(){
stop();
}
}
}//package ResortEmpire_fla
Section 218
//gamesfre_pre_preloader_gamesfree_405 (ResortEmpire_fla.gamesfre_pre_preloader_gamesfree_405)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class gamesfre_pre_preloader_gamesfree_405 extends MovieClip {
public var dragonIcon:MovieClip;
public var main;
public function gamesfre_pre_preloader_gamesfree_405(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removeThis():void{
main.gotoAndStop("splash_lg");
this.removeEventListener(MouseEvent.CLICK, clickThis);
main = null;
}
public function clickThis(_arg1:MouseEvent):void{
main.gotoSponsorWebsite();
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 219
//ground1x1_34 (ResortEmpire_fla.ground1x1_34)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground1x1_34 extends MovieClip {
public var BORDER:MovieClip;
public function ground1x1_34(){
addFrameScript(0, frame1);
}
public function setting(){
this.gotoAndStop("over");
hiding();
}
public function hiding(){
this.visible = false;
}
public function showing(){
this.visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 220
//ground2x2_174 (ResortEmpire_fla.ground2x2_174)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground2x2_174 extends MovieClip {
public var BORDER:MovieClip;
public function ground2x2_174(){
addFrameScript(0, frame1, 1, frame2);
}
public function hiding(){
this.visible = false;
this.gotoAndStop("none");
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 221
//ground2x3_172 (ResortEmpire_fla.ground2x3_172)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground2x3_172 extends MovieClip {
public function ground2x3_172(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
this.gotoAndStop("none");
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 222
//ground3x3_170 (ResortEmpire_fla.ground3x3_170)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground3x3_170 extends MovieClip {
public var BORDER:MovieClip;
public function ground3x3_170(){
addFrameScript(0, frame1, 1, frame2);
}
public function hiding(){
this.visible = false;
this.gotoAndStop("none");
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 223
//ground3x4_168 (ResortEmpire_fla.ground3x4_168)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground3x4_168 extends MovieClip {
public var BORDER:MovieClip;
public function ground3x4_168(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
this.gotoAndStop("none");
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 224
//ground4x4_166 (ResortEmpire_fla.ground4x4_166)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class ground4x4_166 extends MovieClip {
public var BORDER:MovieClip;
public function ground4x4_166(){
addFrameScript(0, frame1, 1, frame2);
}
public function hiding(){
this.visible = false;
this.gotoAndStop("none");
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package ResortEmpire_fla
Section 225
//GuideD_box_846 (ResortEmpire_fla.GuideD_box_846)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class GuideD_box_846 extends MovieClip {
public var contoh:MovieClip;
public var btn_next:SimpleButton;
public var isi_t:TextField;
public var marco:MovieClip;
public var ada:Boolean;
public var centerP:Point;
public function GuideD_box_846(){
addFrameScript(0, frame1);
}
public function showing(_arg1:String, _arg2:Boolean=false):void{
isi_t.text = _arg1;
if (ada){
if (_arg2){
moveToCenter(true);
} else {
isi_t.scaleX = 0;
isi_t.scaleY = 0;
this.visible = true;
TweenMax.to(isi_t, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
};
} else {
ada = true;
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
};
}
public function moveToCenter(_arg1:Boolean=false):void{
this.visible = true;
if (_arg1){
TweenMax.to(this, 0.5, {x:centerP.x, y:centerP.y, scaleX:1, scaleY:1, ease:Elastic.easeIn});
} else {
TweenMax.to(this, 1, {x:centerP.x, y:centerP.y, ease:Elastic.easeIn});
};
}
public function moveToRight(_arg1:Boolean=false):void{
this.visible = true;
if (_arg1){
} else {
TweenMax.to(this, 0.5, {x:510, y:centerP.y, ease:Elastic.easeIn});
};
}
public function defaultCenter():void{
x = centerP.x;
y = centerP.y;
}
public function init():void{
isi_t.mouseEnabled = false;
centerP = new Point(310, 180);
marcoAnime("stand", true);
hiding();
contoh.hiding();
}
public function hiding():void{
ada = false;
this.visible = false;
defaultCenter();
}
public function marcoAnime(_arg1:String, _arg2:Boolean=false):void{
if (_arg2){
marco.gotoAndStop(_arg1);
} else {
marco.gotoAndPlay(_arg1);
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 226
//icon_booth_581 (ResortEmpire_fla.icon_booth_581)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class icon_booth_581 extends MovieClip {
public function icon_booth_581(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 227
//icon_clip_852 (ResortEmpire_fla.icon_clip_852)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class icon_clip_852 extends MovieClip {
public var mini_clip:MovieClip;
public function icon_clip_852(){
addFrameScript(0, frame1, 8, frame9, 17, frame18, 26, frame27, 35, frame36, 44, frame45, 53, frame54, 62, frame63, 71, frame72, 80, frame81);
}
public function hiding():void{
gotoAndStop("stand");
visible = false;
}
public function showing(_arg1:Number, _arg2:Number, _arg3:String):void{
visible = true;
x = _arg1;
y = _arg2;
gotoAndPlay(_arg3);
}
function frame1(){
stop();
}
function frame9(){
stop();
gotoAndPlay("drag");
}
function frame18(){
stop();
gotoAndPlay("tips");
}
function frame27(){
stop();
gotoAndPlay("room");
}
function frame36(){
stop();
gotoAndPlay("tile");
}
function frame45(){
stop();
gotoAndPlay("facility");
}
function frame54(){
stop();
gotoAndPlay("destroy");
}
function frame63(){
stop();
gotoAndPlay("janitor");
}
function frame72(){
stop();
gotoAndPlay("extra");
}
function frame81(){
stop();
gotoAndPlay("expand");
}
}
}//package ResortEmpire_fla
Section 228
//icon_extra_666 (ResortEmpire_fla.icon_extra_666)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class icon_extra_666 extends MovieClip {
public var locked_icon:MovieClip;
public function icon_extra_666(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 229
//IntroLittleGiant_423 (ResortEmpire_fla.IntroLittleGiant_423)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class IntroLittleGiant_423 extends MovieClip {
public var main;
public function IntroLittleGiant_423(){
addFrameScript(0, frame1, 1, frame2, 67, frame68);
}
public function init(_arg1):void{
main = _arg1;
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removeThis():void{
main.gotoAndPlay("pre_app");
this.removeEventListener(MouseEvent.CLICK, clickThis);
main = null;
}
public function clickThis(_arg1:MouseEvent):void{
main.gotoDeveloperWebsite();
}
function frame1(){
}
function frame2(){
}
function frame68(){
stop();
removeThis();
}
}
}//package ResortEmpire_fla
Section 230
//janitor_prop_593 (ResortEmpire_fla.janitor_prop_593)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class janitor_prop_593 extends MovieClip {
public var star1:MovieClip;
public var star2:MovieClip;
public var star3:MovieClip;
public var pic:MovieClip;
public var bar_stamina:MovieClip;
public var btn_fire:SimpleButton;
public var btn_promote:SimpleButton;
public var nom:uint;
public var descOn:String;
public var objek:Object;
public function janitor_prop_593(){
addFrameScript(0, frame1);
}
public function init():void{
nom = 0;
objek = null;
descOn = "";
this.mouseEnabled = false;
bar_stamina.mouseEnabled = false;
star1.mouseEnabled = false;
star2.mouseEnabled = false;
star3.mouseEnabled = false;
}
public function isi(_arg1, _arg2:uint):void{
nom = _arg2;
objek = _arg1;
updateData();
this.visible = true;
}
public function removingAll():void{
objek = null;
}
public function hiding():void{
this.visible = false;
}
public function updateData():void{
var _local3:uint;
if (objek.canDestroy){
btn_fire.alpha = 1;
btn_fire.mouseEnabled = true;
} else {
btn_fire.alpha = 0.35;
btn_fire.mouseEnabled = false;
};
if (objek.canUpgrade){
btn_promote.alpha = 1;
btn_promote.mouseEnabled = true;
} else {
btn_promote.alpha = 0.35;
btn_promote.mouseEnabled = false;
};
var _local1:Number = (objek.moodPersen * 0.01);
var _local2:Number = Math.min(50, (_local1 * 50));
bar_stamina.width = _local2;
descOn = (((("stamina " + objek.moodPersen_fix) + "% (") + objek.smiley) + ")");
_local3 = 1;
while (_local3 < 4) {
if (_local3 <= objek.level_){
this[("star" + _local3)].visible = true;
} else {
this[("star" + _local3)].visible = false;
};
_local3++;
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 231
//layarBuildWorld_512 (ResortEmpire_fla.layarBuildWorld_512)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class layarBuildWorld_512 extends MovieClip {
public var desc:TextField;
public function layarBuildWorld_512(){
addFrameScript(0, frame1);
}
public function showing():void{
desc.visible = false;
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
public function showing2(_arg1:String):void{
desc.text = _arg1;
desc.visible = true;
this.visible = true;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 232
//legend_1_707 (ResortEmpire_fla.legend_1_707)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class legend_1_707 extends MovieClip {
public function legend_1_707(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 233
//legend_ann_706 (ResortEmpire_fla.legend_ann_706)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class legend_ann_706 extends MovieClip {
public function legend_ann_706(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 234
//legend_special_705 (ResortEmpire_fla.legend_special_705)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class legend_special_705 extends MovieClip {
public var Visitor27_t:TextField;
public var Visitor26_t:TextField;
public var Visitor25:MovieClip;
public var Visitor26:MovieClip;
public var Visitor27:MovieClip;
public var Visitor28:MovieClip;
public var Visitor29:MovieClip;
public var Visitor29_t:TextField;
public var Visitor28_t:TextField;
public var Visitor25_t:TextField;
public function legend_special_705(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:uint;
var _local3:String;
var _local4:String;
_local2 = 25;
while (_local2 < 30) {
_local3 = ("Visitor" + _local2);
if (_arg1["game"]["specialVisitor"][_local3]["pernah"]){
this[_local3].gotoAndStop((_local3 + "_on"));
_local4 = ("#" + _arg1.namaSpecial(_local3));
} else {
this[_local3].gotoAndStop((_local3 + "_off"));
_local4 = ("#Special Guest " + (_local2 - 24));
};
this[(_local3 + "_t")].text = _local4;
_local2++;
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 235
//legendD_704 (ResortEmpire_fla.legendD_704)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class legendD_704 extends MovieClip {
public var btn_close:SimpleButton;
public var page_t:TextField;
public var btn_bg:MovieClip;
public var btn_prev:SimpleButton;
public var btn_next:SimpleButton;
public var legend:MovieClip;
public var legend_special:MovieClip;
public var main;
public var _page:uint;
public function legendD_704(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
btn_bg.buttonMode = true;
closed();
}
public function closed():void{
this.visible = false;
callDefault();
removeListeners();
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
main = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
main.CallAutoPaused();
main.blackD.visible = true;
defaultData();
updateData();
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function defaultData():void{
_page = 1;
page_t.text = (_page + "/5");
btn_next.visible = true;
btn_prev.visible = false;
legend_special.init(main);
}
public function callDefault():void{
_page = 1;
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if ((((_local2 == "btn_close")) || ((_local2 == "btn_bg")))){
TweenMax.killTweensOf(this, true);
main.PlaySound("click3");
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
main.blackD.visible = false;
main.RemoveAutoPaused();
main.IfSedangGuide(false);
main.CallFadeInOutMusic(true, false, main.fadeChangeMusic);
} else {
if (_local2 == "btn_next"){
TweenMax.killTweensOf(this, true);
main.PlaySound("glick");
this.alpha = 0.5;
TweenMax.to(this, 0.25, {alpha:1});
_page++;
updateData();
if (_page >= 5){
btn_next.visible = false;
};
if (_page == 1){
btn_prev.visible = false;
} else {
btn_prev.visible = true;
};
} else {
if (_local2 == "btn_prev"){
TweenMax.killTweensOf(this, true);
main.PlaySound("glick");
this.alpha = 0.5;
TweenMax.to(this, 0.25, {alpha:1});
_page--;
updateData();
if (_page == 1){
defaultData();
} else {
btn_next.visible = true;
};
};
};
};
}
public function updateData():void{
legend.gotoAndStop(_page);
if (_page != 5){
legend_special.visible = false;
} else {
legend_special.visible = true;
};
page_t.text = (_page + "/5");
}
public function onCompleteClosed():void{
closed();
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 236
//like_sponsor_747 (ResortEmpire_fla.like_sponsor_747)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class like_sponsor_747 extends MovieClip {
public function like_sponsor_747(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 237
//likeLG_745 (ResortEmpire_fla.likeLG_745)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class likeLG_745 extends MovieClip {
public function likeLG_745(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 238
//LogoResort_mcPreloader_9 (ResortEmpire_fla.LogoResort_mcPreloader_9)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class LogoResort_mcPreloader_9 extends MovieClip {
public function LogoResort_mcPreloader_9(){
addFrameScript(329, frame330);
}
function frame330(){
stop();
}
}
}//package ResortEmpire_fla
Section 239
//lokasi_43 (ResortEmpire_fla.lokasi_43)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class lokasi_43 extends MovieClip {
public function lokasi_43(){
addFrameScript(0, frame1);
}
public function showing(_arg1:Boolean=true):void{
this.visible = _arg1;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 240
//mainMenuD_470 (ResortEmpire_fla.mainMenuD_470)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class mainMenuD_470 extends MovieClip {
public var btn_sponsor:SimpleButton;
public var version_t:TextField;
public var btn_developer:SimpleButton;
public var btn_option:SimpleButton;
public var btn_load:SimpleButton;
public var btn_back:SimpleButton;
public var btn_more:SimpleButton;
public var btn_playGame:SimpleButton;
public var btn_credit:SimpleButton;
public var btn_newGame:SimpleButton;
public function mainMenuD_470(){
addFrameScript(0, frame1, 26, frame27, 27, frame28, 37, frame38, 38, frame39, 48, frame49);
}
function frame1(){
btn_playGame.visible = false;
btn_option.visible = false;
btn_credit.visible = false;
btn_more.visible = false;
btn_newGame.visible = false;
btn_load.visible = false;
btn_back.visible = false;
btn_sponsor.visible = false;
btn_developer.visible = false;
gotoAndPlay("anime");
}
function frame27(){
stop();
btn_playGame.visible = true;
btn_option.visible = true;
btn_credit.visible = true;
btn_more.visible = true;
btn_sponsor.visible = true;
btn_developer.visible = true;
}
function frame28(){
btn_playGame.visible = false;
btn_option.visible = false;
btn_credit.visible = false;
btn_more.visible = false;
}
function frame38(){
stop();
btn_newGame.visible = true;
btn_load.visible = true;
btn_back.visible = true;
}
function frame39(){
btn_newGame.visible = false;
btn_load.visible = false;
btn_back.visible = false;
btn_playGame.visible = false;
btn_option.visible = false;
btn_credit.visible = false;
btn_more.visible = false;
}
function frame49(){
stop();
}
}
}//package ResortEmpire_fla
Section 241
//menuDclip_727 (ResortEmpire_fla.menuDclip_727)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class menuDclip_727 extends MovieClip {
public var btn_close:SimpleButton;
public var btn_option:SimpleButton;
public var btn_bg:MovieClip;
public var btn_resume:SimpleButton;
public var btn_credit:SimpleButton;
public var btn_exit:SimpleButton;
public var main;
public function menuDclip_727(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
btn_bg.buttonMode = true;
closed();
}
public function closed():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickThis);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
closed();
main = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
main.CallAutoPaused();
main.blackD.visible = true;
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.25, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if (_local2 == "btn_option"){
main.PlaySound("click1");
this.visible = false;
main.optionD.opened();
} else {
if (_local2 == "btn_exit"){
main.PlaySound("click3");
this.visible = false;
main.warningExitD.opened();
} else {
if (_local2 == "btn_credit"){
main.PlaySound("click2");
this.visible = false;
main.creditD.opened();
} else {
if ((((((_local2 == "btn_close")) || ((_local2 == "btn_resume")))) || ((_local2 == "btn_bg")))){
main.PlaySound("click3");
closed();
main.blackD.visible = false;
main.RemoveAutoPaused();
main.IfSedangGuide(false);
};
};
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 242
//moneyD_756 (ResortEmpire_fla.moneyD_756)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class moneyD_756 extends MovieClip {
public var btn_ok:SimpleButton;
public var money_t:TextField;
public var bonus_t:TextField;
public var bonus:Boolean;
public var bangkrut:Boolean;
public function moneyD_756(){
addFrameScript(0, frame1);
}
public function init():void{
money_t.mouseEnabled = false;
hiding();
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:onCompleteClosed});
}
public function hiding():void{
this.visible = false;
btn_ok.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
btn_ok.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function showing(_arg1:int=0, _arg2:Boolean=false, _arg3:Boolean=false):void{
this["parent"].CallAutoPaused();
TweenMax.killTweensOf(this, true);
bonus = _arg2;
bangkrut = _arg3;
if (!bonus){
if (!bangkrut){
this.gotoAndStop("_defisit");
} else {
this.gotoAndStop("_bangkrut");
};
bonus_t.visible = false;
money_t.visible = true;
_arg1 = (_arg1 * -1);
money_t.text = ("-$" + _arg1);
this["parent"].PlaySound("seat");
} else {
this.gotoAndStop("_bonus");
bonus_t.visible = true;
money_t.visible = false;
bonus_t.text = ("$" + _arg1);
this["parent"].PlaySound("cling");
};
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
btn_ok.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function clickFunction(_arg1:Event):void{
this["parent"].PlaySound("click2");
closing();
}
public function onCompleteClosed():void{
hiding();
this["parent"].RemoveAutoPaused_in();
this["parent"].effectAfterMoneyNotice(bonus, bangkrut);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 243
//mood_icon_574 (ResortEmpire_fla.mood_icon_574)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class mood_icon_574 extends MovieClip {
public function mood_icon_574(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 244
//MouseClip_771 (ResortEmpire_fla.MouseClip_771)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class MouseClip_771 extends MovieClip {
public var onfocus:MovieClip;
public function MouseClip_771(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 245
//MSlider_740 (ResortEmpire_fla.MSlider_740)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class MSlider_740 extends MovieClip {
public var slider:MovieClip;
public function MSlider_740(){
addFrameScript(0, frame1);
}
function frame1(){
slider.buttonMode = true;
this.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 246
//music_dragbar_650 (ResortEmpire_fla.music_dragbar_650)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class music_dragbar_650 extends MovieClip {
public var dragger:MovieClip;
public var bar:MovieClip;
public var box:MovieClip;
public var main;
public var W:Number;
public var htg:Number;
public function music_dragbar_650(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
dragger.buttonMode = true;
W = 60;
main = _arg1;
added();
}
public function added():void{
dragger.y = 4;
dragger.x = (main.musicVol * W);
if (main.musicVol == 0){
box.width = 0;
} else {
box.width = (dragger.x + 2);
};
}
public function settingDragBar():void{
dragger.y = 4;
if (dragger.x < 0){
dragger.x = 0;
} else {
if (dragger.x > W){
dragger.x = W;
};
};
box.width = (dragger.x + 2);
htg = (dragger.x / W);
if (htg > 0){
main.isMuteAll = false;
};
main.SettingMusic(RoundDecNumber(htg, 2));
}
public function RoundDecNumber(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.pow(10, _arg2);
return ((Math.round((_arg1 * _local3)) / _local3));
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 247
//nav1_btn_employee_618 (ResortEmpire_fla.nav1_btn_employee_618)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nav1_btn_employee_618 extends MovieClip {
public var btn:SimpleButton;
public var employee_t:TextField;
public function nav1_btn_employee_618(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
employee_t.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 248
//nav1_btn_facility_625 (ResortEmpire_fla.nav1_btn_facility_625)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nav1_btn_facility_625 extends MovieClip {
public var notif:SimpleButton;
public var btn:SimpleButton;
public var facility_t:TextField;
public function nav1_btn_facility_625(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
facility_t.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 249
//nav1_btn_room_622 (ResortEmpire_fla.nav1_btn_room_622)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nav1_btn_room_622 extends MovieClip {
public var notif:SimpleButton;
public var room_t:TextField;
public var btn:SimpleButton;
public function nav1_btn_room_622(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
room_t.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 250
//nav1_btn_scenery_624 (ResortEmpire_fla.nav1_btn_scenery_624)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nav1_btn_scenery_624 extends MovieClip {
public var scenery_t:TextField;
public var btn:SimpleButton;
public function nav1_btn_scenery_624(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
scenery_t.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 251
//nav1_btn_visitor_621 (ResortEmpire_fla.nav1_btn_visitor_621)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class nav1_btn_visitor_621 extends MovieClip {
public var visitor_t:TextField;
public var btn:SimpleButton;
public function nav1_btn_visitor_621(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
visitor_t.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 252
//navigator1_617 (ResortEmpire_fla.navigator1_617)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class navigator1_617 extends MovieClip {
public var btn_room:MovieClip;
public var star_t:TextField;
public var rp_t:TextField;
public var btn_sponsor:SimpleButton;
public var title_t:TextField;
public var btn_visitor:MovieClip;
public var btn_scenery:MovieClip;
public var sponsor_teks:MovieClip;
public var bg:MovieClip;
public var researchPoint_t:TextField;
public var btn_alpha:MovieClip;
public var rp_bar:MovieClip;
public var btn_facility:MovieClip;
public var btn_employee:MovieClip;
public var main;
public var _select:Object;
public var k:uint;
public var pjg:uint;
public var str:String;
public function navigator1_617(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
btn_employee.buttonMode = true;
btn_visitor.buttonMode = true;
btn_room.buttonMode = true;
btn_scenery.buttonMode = true;
btn_facility.buttonMode = true;
title_t.text = main.playerName;
this.y = -75;
callDefault();
this.addEventListener(MouseEvent.CLICK, clickNavigator1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overNavigator1, false, 0, true);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
this.removeEventListener(MouseEvent.CLICK, clickNavigator1);
this.removeEventListener(MouseEvent.MOUSE_OVER, overNavigator1);
main = null;
_select = null;
}
public function opening():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {y:0});
}
public function checkMoreUpgrade(_arg1:String):void{
var _local2:String;
if (_arg1 == "Facility"){
_local2 = "Facility";
} else {
_local2 = "Cottage";
};
var _local3:Boolean = IfAdaUpgrade(_local2);
if (_arg1 == "Room"){
if (!_local3){
_local2 = "Lodge";
_local3 = IfAdaUpgrade(_local2);
};
};
_arg1 = _arg1.toLowerCase();
setNotif(_arg1, _local3);
}
public function IfAdaUpgrade(_arg1:String):Boolean{
var _local2:Array = main.game.objects[_arg1];
pjg = _local2.length;
var _local3:Boolean;
if (_arg1 == "Room"){
k = 0;
while (k < pjg) {
if (_local2[k]["ob"].canUpgrade){
_local3 = true;
break;
};
k++;
};
} else {
k = 0;
while (k < pjg) {
if (!_local2[k]["ob"].minibooth){
if (_local2[k]["ob"].canUpgrade){
_local3 = true;
break;
};
};
k++;
};
};
_local2 = null;
return (_local3);
}
public function setNotif(_arg1:String, _arg2:Boolean=false):void{
this[("btn_" + _arg1)]["notif"].visible = _arg2;
}
public function updateRP(_arg1:Number=0, _arg2:Number=0):void{
rp_bar.width = _arg1;
rp_t.text = (("RP (" + _arg2) + "%)");
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
var _local3:* = null;
str = _arg1.name;
if (str == "btn_employee"){
_local3 = main.d_employee;
} else {
if (str == "btn_visitor"){
_local3 = main.d_visitor;
} else {
if (str == "btn_room"){
_local3 = main.d_room;
} else {
if (str == "btn_scenery"){
_local3 = main.d_scenery;
} else {
if (str == "btn_facility"){
_local3 = main.d_facility;
};
};
};
};
};
buttonOnSelect(_arg1, _arg2);
if (_arg2){
main.IfSedangGuide();
_local3.opened();
} else {
main.IfSedangGuide(false);
main.blackD2.visible = false;
_local3.closing();
};
_local3 = null;
}
public function buttonOnSelect(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
} else {
_arg1.gotoAndStop(1);
};
}
public function callDefault():void{
bg.visible = false;
_select = null;
onDefault(btn_employee);
onDefault(btn_visitor);
onDefault(btn_room);
onDefault(btn_scenery);
onDefault(btn_facility);
btn_alpha.init();
sponsor_teks.hiding();
setNotif("facility");
setNotif("room");
}
public function onDefault(_arg1):void{
var _local2:* = null;
str = _arg1.name;
if (str == "btn_employee"){
_local2 = main.d_employee;
} else {
if (str == "btn_visitor"){
_local2 = main.d_visitor;
} else {
if (str == "btn_room"){
_local2 = main.d_room;
} else {
if (str == "btn_scenery"){
_local2 = main.d_scenery;
} else {
if (str == "btn_facility"){
_local2 = main.d_facility;
};
};
};
};
};
_arg1.gotoAndStop(1);
_local2.init(main);
_local2 = null;
}
public function _selectOnDefault(_arg1:Boolean=false):void{
if (_arg1){
if (_select != null){
buttonOnSelect(_select, false);
};
} else {
onSelected(_select, false);
};
bg.visible = false;
_select = null;
main.RemoveAutoPaused();
}
public function clickHideObject():void{
btn_alpha.onClick();
main.ClickHideObject();
}
public function clickNavigator1(_arg1:MouseEvent):void{
main.CancelOrDoneTempObject();
var _local2:* = _arg1.target.parent;
var _local3:String = _local2.name;
if (_local3 == "btn_alpha"){
clickHideObject();
} else {
if ((((_local3 == "btn_employee")) || ((((((((_local3 == "btn_visitor")) || ((_local3 == "btn_room")))) || ((_local3 == "btn_scenery")))) || ((_local3 == "btn_facility")))))){
if (_select == _local2){
_selectOnDefault();
main.PlaySound("click3");
} else {
if (_select == null){
_select = _local2;
onSelected(_select);
} else {
onSelected(_select, false);
_select = _local2;
onSelected(_select);
};
main.PlaySound("click1");
main.CloseAll_DB_objects();
main.navigator2._selectOnDefault();
main.CallAutoPaused();
bg.visible = true;
main.TampilkanNewTips("clickNavigator1", true);
};
} else {
if (_arg1.target.name == "btn_sponsor"){
main.PlaySound("click1");
main.gotoSponsorWebsite();
};
};
};
_local2 = null;
}
public function overNavigator1(_arg1:MouseEvent):void{
main.show_mouse();
if (_arg1.target.name == "btn_sponsor"){
sponsor_teks.anime();
} else {
sponsor_teks.hiding();
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 253
//navigator2_604 (ResortEmpire_fla.navigator2_604)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import pack.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class navigator2_604 extends MovieClip {
public var new_Extra:MovieClip;
public var btn_tile:MovieClip;
public var btn_arrowMouse:MovieClip;
public var btn_room:MovieClip;
public var new_Scenery:MovieClip;
public var new_Facility:MovieClip;
public var btn_tips:MovieClip;
public var btn_dragMouse:MovieClip;
public var btn_destroy:MovieClip;
public var btn_scenery:MovieClip;
public var btn_janitorRoom:MovieClip;
public var new_Room:MovieClip;
public var btn_extra:MovieClip;
public var new_Expand:MovieClip;
public var new_Tips:MovieClip;
public var btn_expand:MovieClip;
public var btn_facility:MovieClip;
public var main;
public var clip;
public var _select:Object;
public var _trig:Object;
public var _dialog:MovieClip;
public var str:String;
public var i:uint;
public var strings:String;
public function navigator2_604(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
this.x = -50;
callDefault();
checkNewOpen();
this.addEventListener(MouseEvent.CLICK, clickNavigator2, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overNavigator2, false, 0, true);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
this.removeEventListener(MouseEvent.CLICK, clickNavigator2);
this.removeEventListener(MouseEvent.MOUSE_OVER, overNavigator2);
_select = null;
_trig = null;
clip = null;
_dialog = null;
main = null;
}
public function opening():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {x:0});
}
public function checkNewOpen():void{
openExpand();
setNewUnlocked("Room");
setNewUnlocked("Facility");
setNewUnlocked("Scenery");
setNewUnlocked("Extra");
setNewUnlocked("Expand");
}
public function setNewUnlocked(_arg1:String):void{
clip = this[("new_" + _arg1)];
if (main.game.UNLOCKED_new[_arg1]){
clip.visible = true;
} else {
clip.visible = false;
};
clip = null;
}
public function openExpand():void{
if (main.game.UNLOCKED.Expand1){
btn_expand._locked.visible = false;
} else {
btn_expand._locked.visible = true;
};
}
public function matikanNewIcon(_arg1:String):void{
main.game.UNLOCKED_new[_arg1] = false;
clip = this[("new_" + _arg1)];
clip.visible = false;
clip = null;
}
public function tampilkanNewIcon(_arg1:String, _arg2:String=""):void{
main.game.UNLOCKED_new[_arg1] = true;
clip = this[("new_" + _arg1)];
clip.visible = true;
if (_arg1 == "Expand"){
openExpand();
main.expandD.acceptNewUnlocked(_arg2);
} else {
_dialog = null;
if (_arg1 == "Extra"){
_dialog = main.dialog_extra;
} else {
if (_arg1 == "Facility"){
_dialog = main.dialog_facility;
} else {
if (_arg1 == "Room"){
_dialog = main.dialog_room;
} else {
if (_arg1 == "Scenery"){
_dialog = main.dialog_scenery;
};
};
};
if (_dialog != null){
_dialog.acceptNewUnlocked(_arg2);
};
};
};
clip = null;
_dialog = null;
}
public function introduction1():void{
btn_tips.visible = false;
btn_room.visible = false;
btn_facility.visible = false;
btn_scenery.visible = false;
btn_tile.visible = false;
btn_janitorRoom.visible = false;
btn_destroy.visible = false;
btn_extra.visible = false;
btn_expand.visible = false;
main.dialog_tile.tempLocked();
}
public function openIntroduction(_arg1:String):void{
clip = this[("btn_" + _arg1)];
clip.visible = true;
clip._locked.visible = false;
clip.mouseEnabled = true;
clip = null;
}
public function tempLocked(_arg1:String, _arg2:Boolean=true):void{
clip = this[("btn_" + _arg1)];
clip.mouseEnabled = !(_arg2);
clip._locked.visible = _arg2;
clip = null;
}
public function openIntroduction_all():void{
openIntroduction("tips");
openIntroduction("dragMouse");
openIntroduction("room");
openIntroduction("scenery");
openIntroduction("tile");
openIntroduction("facility");
openIntroduction("janitorRoom");
openIntroduction("destroy");
openIntroduction("extra");
openIntroduction("expand");
openTempLocked();
}
public function openTempLocked():void{
tempLocked("tips", false);
tempLocked("dragMouse", false);
tempLocked("room", false);
tempLocked("facility", false);
tempLocked("tile", false);
tempLocked("scenery", false);
tempLocked("janitorRoom", false);
tempLocked("destroy", false);
tempLocked("extra", false);
tempLocked("expand", false);
main.dialog_tile.openTempLocked();
openExpand();
}
public function callDefault():void{
_select = null;
onDefault(btn_tips);
onDefault(btn_room);
onDefault(btn_facility);
onDefault(btn_scenery);
onDefault(btn_tile);
onDefault(btn_janitorRoom);
onDefault(btn_destroy);
onDefault(btn_extra);
new_Tips.visible = false;
new_Tips.mouseEnabled = false;
new_Room.mouseEnabled = false;
new_Facility.mouseEnabled = false;
new_Expand.mouseEnabled = false;
new_Extra.mouseEnabled = false;
new_Scenery.mouseEnabled = false;
}
public function onDefault(_arg1):void{
_dialog = null;
if (_arg1 == btn_tips){
_dialog = main.dialog_tips;
} else {
if (_arg1 == btn_room){
_dialog = main.dialog_room;
} else {
if (_arg1 == btn_facility){
_dialog = main.dialog_facility;
} else {
if (_arg1 == btn_scenery){
_dialog = main.dialog_scenery;
} else {
if (_arg1 == btn_tile){
_dialog = main.dialog_tile;
} else {
if (_arg1 == btn_extra){
_dialog = main.dialog_extra;
};
};
};
};
};
};
_arg1.gotoAndStop(1);
_arg1._locked.mouseEnabled = false;
_arg1._locked.visible = false;
if (_dialog != null){
if ((((_arg1 == btn_extra)) || ((_arg1 == btn_tips)))){
_dialog.init(main);
} else {
_dialog.init();
};
if (_arg1 == btn_scenery){
settingPrice("Scenery", _dialog);
};
_dialog = null;
};
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
_dialog = null;
if (_arg1 == btn_tips){
_dialog = main.dialog_tips;
} else {
if (_arg1 == btn_room){
_dialog = main.dialog_room;
} else {
if (_arg1 == btn_facility){
_dialog = main.dialog_facility;
} else {
if (_arg1 == btn_scenery){
_dialog = main.dialog_scenery;
} else {
if (_arg1 == btn_tile){
_dialog = main.dialog_tile;
} else {
if (_arg1 == btn_expand){
_dialog = main.expandD;
} else {
if (_arg1 == btn_extra){
_dialog = main.dialog_extra;
};
};
};
};
};
};
};
main.CancelOrDoneTempObject();
if (_arg2){
_arg1.gotoAndStop(2);
if (_dialog != null){
main.RemoveAutoPaused();
_dialog.opened();
if (_arg1 == btn_extra){
main.balonD.visible = false;
} else {
if (_arg1 == btn_room){
matikanNewIcon("Room");
} else {
if (_arg1 == btn_facility){
matikanNewIcon("Facility");
} else {
if (_arg1 == btn_scenery){
matikanNewIcon("Scenery");
};
};
};
_dialog.addEventListener(MouseEvent.MOUSE_OVER, overOnNavigator2Dialog, false, 0, true);
_dialog.addEventListener(MouseEvent.CLICK, clickOnNavigator2Dialog, false, 0, true);
};
};
if (_arg1 == btn_dragMouse){
main.ChangeCursor("drag");
} else {
if (_arg1 == btn_destroy){
main.CloseAll_DB_objects();
main.ChangeCursor("destroy");
main.TampilkanNewTips("icon_destroy", true);
} else {
main.ChangeCursor("none");
};
};
if (_arg1 == btn_janitorRoom){
main.CloseAll_DB_objects();
if (main.CheckMoney("JanitorRoom")){
_trig = serbi.dataOb.Booth.JanitorRoom;
main.PlaySound("click2");
main.CreateTemporary("Booth", _trig, "JanitorRoom");
};
};
} else {
_arg1.gotoAndStop(1);
if (((!((_dialog == null))) && (!((_arg1 == btn_extra))))){
main.checkingGuide(_arg1.name, false);
if (_arg1 == btn_expand){
_dialog.closingAuto();
} else {
_dialog.closing();
};
_dialog.removeEventListener(MouseEvent.MOUSE_OVER, overOnNavigator2Dialog);
_dialog.removeEventListener(MouseEvent.CLICK, clickOnNavigator2Dialog);
};
};
_dialog = null;
}
public function overNavigator2(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
if (_local2 == btn_tips){
main.balonD.isi("Show tips");
} else {
if (_local2 == btn_arrowMouse){
main.balonD.isi("Select arrow (Shortcut 'V')");
} else {
if (_local2 == btn_dragMouse){
main.balonD.isi("Drag screen with mouse (Shortcut 'H')");
} else {
if (_local2 == btn_room){
main.balonD.isi("Build Room");
} else {
if (_local2 == btn_facility){
main.balonD.isi("Build Facility");
} else {
if (_local2 == btn_scenery){
main.balonD.isi("Create Plant");
} else {
if (_local2 == btn_tile){
main.balonD.isi("Create Tile");
} else {
if (_local2 == btn_janitorRoom){
main.balonD.isi((("Create Janitor's Room ($" + serbi.dataOb.Booth.JanitorRoom.price[0]) + ")"));
} else {
if (_local2 == btn_destroy){
main.balonD.isi("Quick Destroy");
} else {
if (_local2 == btn_extra){
main.balonD.isi("Resort Upgrade");
} else {
if (_local2 == btn_expand){
if (main.game.UNLOCKED.Expand1){
main.balonD.isi("Expand the Resort");
} else {
main.balonD.isi("Expand the Resort (LOCKED): Need <font color = '#FF0000'>'5 Resort's Stars'");
};
} else {
main.balonD.visible = false;
};
};
};
};
};
};
};
};
};
};
};
main.show_mouse(false);
main.mousing.visible = false;
_local2 = null;
}
public function clickNavigator2(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
var _local3:String = _local2.name;
if (_local3 == "btn_expand"){
if (main.game.UNLOCKED.Expand1){
selectNavigator(_local2);
};
} else {
if ((((_local3 == "btn_room")) || ((((((((((((((((((_local3 == "btn_facility")) || ((_local3 == "btn_scenery")))) || ((_local3 == "btn_tile")))) || ((_local3 == "btn_janitorRoom")))) || ((_local3 == "btn_destroy")))) || ((_local3 == "btn_extra")))) || ((_local3 == "btn_tips")))) || ((_local3 == "btn_arrowMouse")))) || ((_local3 == "btn_dragMouse")))))){
selectNavigator(_local2);
};
};
_local2 = null;
}
public function selectNavigatorShortcut(_arg1:String):void{
clip = (this[("btn_" + _arg1)] as MovieClip);
selectNavigator(clip);
clip = null;
}
public function selectNavigator(_arg1):void{
var _local2:String;
if (_select == _arg1){
if (!(((((_select == btn_dragMouse)) || ((_select == btn_arrowMouse)))) || ((_select == btn_extra)))){
main.PlaySound("click3");
};
_selectOnDefault(true);
} else {
if (_select == null){
_select = _arg1;
onSelected(_select);
} else {
onSelected(_select, false);
if (_select == btn_destroy){
main.ChangeCursor("none");
if (_arg1 != btn_janitorRoom){
main.ShowGridAndAlpha(false);
};
main.checkDariNavigator2(true);
};
_select = _arg1;
onSelected(_select);
};
_local2 = _select.name;
if (_local2 == "btn_destroy"){
main.PlaySound("click2");
if (((main.DB_object0.visible) || (((((((((((main.DB_object1.visible) || (main.DB_object2.visible))) || (main.DB_object3.visible))) || (main.DB_object4.visible))) || (main.DB_object5.visible))) || (main.DB_object6.visible))))){
} else {
main.CallAutoPaused();
};
main.ShowGridAndAlpha(true);
} else {
if (_local2 == "btn_dragMouse"){
main.PlaySound("click3");
if (((main.DB_object0.visible) || (((((((((((main.DB_object1.visible) || (main.DB_object2.visible))) || (main.DB_object3.visible))) || (main.DB_object4.visible))) || (main.DB_object5.visible))) || (main.DB_object6.visible))))){
} else {
main.RemoveAutoPaused();
};
main.TampilkanNewTips("shortcut", true);
} else {
if (_local2 == "btn_arrowMouse"){
main.PlaySound("click3");
if (((main.DB_object0.visible) || (((((((((((main.DB_object1.visible) || (main.DB_object2.visible))) || (main.DB_object3.visible))) || (main.DB_object4.visible))) || (main.DB_object5.visible))) || (main.DB_object6.visible))))){
} else {
main.RemoveAutoPaused();
};
} else {
if (_local2 == "btn_extra"){
matikanNewIcon("Extra");
main.PlaySound("pause");
if (main.game.RP_khusus.click_extraUpgrade == 0){
main.game.RP_khusus.click_extraUpgrade = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
} else {
if (_local2 == "btn_expand"){
if (main.game.UNLOCKED.Expand1){
matikanNewIcon("Expand");
main.PlaySound("pause");
};
} else {
main.PlaySound("click2");
if (_local2 == "btn_tips"){
if (main.game.RP_khusus.click_tips == 0){
main.game.RP_khusus.click_tips = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
} else {
main.checkingGuide(_select.name, true);
};
};
};
};
};
};
};
}
public function _selectOnDefault(_arg1:Boolean=false):void{
var _local2:*;
if (_select != btn_dragMouse){
_local2 = _select;
if (_select != null){
onSelected(_select, false);
_select = null;
};
_select = btn_arrowMouse;
onSelected(_select);
if (_local2 == btn_destroy){
main.ShowGridAndAlpha(false);
main.checkDariNavigator2(true);
};
};
}
public function removeOnMouseDestroy():void{
main.checkDariNavigator2(true);
if (_select != null){
onSelected(_select, false);
_select = null;
};
_select = btn_arrowMouse;
onSelected(_select);
main.ShowGridAndAlpha(false);
}
public function _cekOnDefault():void{
if (_select != btn_dragMouse){
if (_select != null){
btn_janitorRoom.gotoAndStop(1);
};
_select = btn_arrowMouse;
_select.gotoAndStop(2);
};
}
public function overOnNavigator2Dialog(_arg1:MouseEvent):void{
var _local6:Object;
var _local7:String;
var _local8:uint;
var _local9:uint;
var _local2:Object = _arg1.target;
var _local3:Object = _local2.parent;
var _local4:String = _local2.name;
var _local5:String = _local3.name;
if (_local5 == "dialog_room"){
if ((((_local4.substring(0, 4) == "btn_")) || ((_local4.substring(0, 7) == "locked_")))){
str = _local4.replace("btn_", "");
str = str.replace("locked_", "");
_trig = serbi.dataOb.Booth[str];
if (main.game.UNLOCKED[str]){
main.balonD.isi((((_trig.nama + " ($") + _trig.price[0]) + ")"));
} else {
main.balonD.isi((_trig.nama + " (LOCKED)\nNeed: <font color = '#FF0000'>5 Resort's Stars"));
};
} else {
main.balonD.visible = false;
};
} else {
if (_local5 == "dialog_facility"){
if (_local4.substring(0, 4) == "btn_"){
str = _local4.replace("btn_", "");
_trig = serbi.dataOb.Booth[str];
main.balonD.isi((((_trig.nama + " ($") + _trig.price[0]) + ")"));
} else {
if (_local4.substring(0, 7) == "locked_"){
str = _local4.replace("locked_", "");
_trig = serbi.dataOb.Booth[str];
if (_trig.extraUpgrade == null){
main.balonD.isi((((_trig.nama + " ($") + _trig.price[0]) + ")"));
} else {
_local6 = serbi.Extra_Upgrade[_trig.extraUpgrade];
_local7 = _local6["name"];
strings = (" (LOCKED)\nNeed Resort Upgrade: <font color = '#FF0000'>" + _local7);
main.balonD.isi((_trig.nama + strings));
_local6 = null;
};
} else {
main.balonD.visible = false;
};
};
} else {
if (_local5 == "dialog_scenery"){
if (_local4.substring(0, 4) == "btn_"){
str = _local4.replace("btn_", "");
_local8 = _local3.discount[str];
_local9 = _local3.pricing[str];
_trig = serbi.dataOb.Scenery[str];
if (_local8 == 0){
main.balonD.isi((((_trig.nama + " ($") + _trig.price) + ")"));
} else {
strings = ((((("($" + _trig.price) + ")\nAfter discount(") + String(_local8)) + "%) = <font color = '#FF0000'>$") + _local9);
main.balonD.isi(((_trig.nama + " ") + strings));
};
} else {
if (_local4.substring(0, 7) == "locked_"){
str = _local4.replace("locked_", "");
_trig = serbi.dataOb.Scenery[str];
if (_trig.unlocked_persen > 0){
strings = ((((" (LOCKED)\nNeed: '" + _trig.unlocked_level) + " Resort's Stars ' <font color = '#FF0000'>(reach ") + _trig.unlocked_persen) + "%)");
} else {
strings = ((" (LOCKED)\nNeed: <font color = '#FF0000'>'" + _trig.unlocked_level) + " Resort's Stars'");
};
main.balonD.isi((_trig.nama + strings));
} else {
main.balonD.visible = false;
};
};
} else {
if (_local5 == "dialog_tile"){
if (_local4.substring(0, 8) == "btn_TILE"){
_trig = serbi.dataOb.Tile[_local4.replace("btn_", "")];
if (_trig.walkable){
main.balonD.isi((((("Create " + _trig.nama) + " ($") + _trig.price) + ")\n<font color = '#FF0000'>WALKABLE"));
} else {
main.balonD.isi((((("Create " + _trig.nama) + " ($") + _trig.price) + ")\n<font color = '#FF0000'>UNWALKABLE"));
};
} else {
main.balonD.visible = false;
};
} else {
main.balonD.visible = false;
};
};
};
};
_trig = null;
_local2 = null;
_local3 = null;
}
public function settingPrice(_arg1:String, _arg2=null):void{
var _local3:String;
var _local4:Boolean;
var _local5:uint;
var _local6:uint;
var _local7:uint;
if (_arg1 == "Scenery"){
_arg2 = main.dialog_scenery;
_local4 = false;
_local7 = _arg2.pjg_list;
i = 0;
while (i < _local7) {
str = _arg2._listing[i];
_trig = _arg2._dataScenery[str];
_local3 = _trig["lbl"].replace("_plant_", "");
_local4 = false;
if ((((_local3 == "cedar1")) || ((_local3 == "cedar2")))){
_local4 = main.game.EXTRA.leaf;
_local5 = serbi.Extra_Upgrade.leaf.val;
} else {
if (_local3 == "palm"){
_local4 = main.game.EXTRA["wallpaper"];
_local5 = serbi.Extra_Upgrade["wallpaper"].val;
} else {
if (_local3 == "bamboo"){
_local4 = main.game.EXTRA["sauce"];
_local5 = serbi.Extra_Upgrade["sauce"].val;
};
};
};
if (_local4){
_local6 = (_trig["price"] - ((_local5 * 0.01) * _trig["price"]));
} else {
_local5 = 0;
_local6 = _trig["price"];
};
_arg2.pricing[str] = _local6;
_arg2.discount[str] = _local5;
i++;
};
_trig = null;
_arg2 = null;
};
}
public function clickOnNavigator2Dialog(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
var _local3:Object = _local2.parent;
var _local4:String = _local2.name;
var _local5:String = _local3.name;
if (_local5 == "dialog_room"){
if (_local4 == "btn_Cottage"){
if (main.CheckMoney("Cottage")){
_trig = serbi.dataOb.Booth.Cottage;
main.PlaySound("click2");
_selectOnDefault();
main.CreateTemporary("Booth", _trig, "Cottage");
};
} else {
if (_local4 == "btn_Lodge"){
if (main.CheckMoney("Lodge")){
_trig = serbi.dataOb.Booth.Lodge;
main.PlaySound("click2");
_selectOnDefault();
main.CreateTemporary("Booth", _trig, "Lodge");
};
};
};
} else {
if (_local5 == "dialog_facility"){
if (_local4.substring(0, 4) == "btn_"){
str = _local4.replace("btn_", "");
if (main.CheckMoney(str)){
_trig = serbi.dataOb.Booth[str];
main.PlaySound("click2");
_selectOnDefault();
main.CreateTemporary("Booth", _trig, str);
};
};
} else {
if (_local5 == "dialog_scenery"){
if (_local4.substring(0, 9) == "btn_PLANT"){
str = _local4.replace("btn_", "");
_trig = serbi.dataOb.Scenery[str];
if (main.CheckMoney("Scenery", main.dialog_scenery.pricing[str], str)){
main.PlaySound("click2");
_selectOnDefault();
main.CreateTemporary("Scenery", _trig, _trig.jenis);
};
};
} else {
if (_local5 == "dialog_tile"){
if (_local4.substring(0, 8) == "btn_TILE"){
str = _local4.replace("btn_", "");
_trig = serbi.dataOb.Tile[str];
if (main.CheckMoney("Tile", 0, str)){
main.PlaySound("click2");
_selectOnDefault();
main.CreateTemporary("Tile", _trig, _trig.jenis);
};
};
};
};
};
};
_trig = null;
_local2 = null;
_local3 = null;
}
public function updateData(_arg1:String, _arg2:int, _arg3:String=null):void{
if (_arg1 == "Room"){
main.dialog_room[(_arg3 + "_sum")].isi(_arg2);
} else {
if (_arg1 == "Facility"){
main.dialog_facility[(_arg3 + "_sum")].isi(_arg2);
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 254
//navigator3_637 (ResortEmpire_fla.navigator3_637)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class navigator3_637 extends MovieClip {
public var btn_speed3:SimpleButton;
public var btn_pause:SimpleButton;
public var btn_follow:SimpleButton;
public var btn_speed1:SimpleButton;
public var btn_stat:SimpleButton;
public var btn_legend:SimpleButton;
public var music_volbar:MovieClip;
public var btn_play:SimpleButton;
public var btn_acv:SimpleButton;
public var pop_t:TextField;
public var dollar:TextField;
public var money_t:TextField;
public var jam:MovieClip;
public var cawang:MovieClip;
public var sound_volbar:MovieClip;
public var dyn:MovieClip;
public var day_t:TextField;
public var bonus_t:TextField;
public var btn_menu:SimpleButton;
public var btn_speed2:SimpleButton;
public var main;
public var tempDrag:Object;
public var adaFlowTeks:Boolean;
public var centerFlow:Boolean;
public var jenis_flow:String;
public var flowTiming:uint;
public var kanan:Number;
public var tengah:Number;
public var kiri:Number;
public var txt_width:Number;
public function navigator3_637(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
this.y = 560;
callDefault();
this.addEventListener(MouseEvent.CLICK, clickNavigator3, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overNavigator3, false, 0, true);
removeDragger();
initDragger();
dyn.init();
jenis_flow = "";
}
public function removingAll():void{
TweenMax.killTweensOf(this);
TweenMax.killTweensOf(dyn);
removeDragger();
this.removeEventListener(MouseEvent.CLICK, clickNavigator3);
this.removeEventListener(MouseEvent.MOUSE_OVER, overNavigator3);
main = null;
}
public function opening():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {y:479.85});
}
public function removeDragger():void{
tempDrag = null;
this.removeEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1);
this.removeEventListener(MouseEvent.MOUSE_UP, stageMouseUp1);
this.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1);
}
public function initDragger():void{
setSoundMusic();
this.addEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, stageMouseUp1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1, false, 0, true);
}
public function callDefault():void{
tempDrag = null;
main.autoPausedClip.hiding();
dyn.hiding();
bonus_t.mouseEnabled = false;
dyn.mouseEnabled = false;
dyn.mouseChildren = false;
bonus_t.visible = false;
settingSpeed();
setDay();
adaFlowTeks = false;
centerFlow = false;
flowTiming = 0;
cawang.init();
}
public function setBonusTeks(_arg1:String):void{
bonus_t.text = _arg1;
bonus_t.visible = true;
}
public function setSoundMusic():void{
music_volbar.init(main);
sound_volbar.init(main);
}
public function settingSpeed():void{
var _local1:uint;
var _local2:uint = main.speed;
_local1 = 0;
while (_local1 < 3) {
if ((_local1 + 1) == _local2){
this[("btn_speed" + (_local1 + 1))].visible = false;
} else {
this[("btn_speed" + (_local1 + 1))].visible = true;
};
_local1++;
};
}
public function setDay():void{
day_t.text = ("DAY " + String(main.day));
}
public function overNavigator3(_arg1:MouseEvent):void{
main.show_mouse();
var _local2:String = _arg1.target.name;
if (_local2 == "btn_stat"){
main.balonD.isi("View Statistic");
} else {
if (_local2 == "btn_legend"){
main.balonD.isi("View Legend, Informations");
} else {
if (_local2 == "btn_acv"){
main.balonD.isi("View Achievements");
} else {
if (_local2 == "btn_menu"){
main.balonD.isi("Settings");
} else {
if (_local2 == "btn_menu"){
main.balonD.isi("Follow Us!");
} else {
main.balonD.hiding();
};
};
};
};
};
}
public function statEndDay(_arg1:Boolean=false):void{
main.statD.opened(_arg1);
}
public function clickNavigator3(_arg1:MouseEvent):void{
var _local2:Boolean;
var _local3:* = _arg1.target;
var _local4:String = _arg1.target.name;
main.balonD.hiding();
main.CancelOrDoneTempObject();
if (((main.DB_object1.visible) || (main.DB_object2.visible))){
main.CloseAll_DB_objects();
};
main.navigator2._selectOnDefault();
if (_local4 == "btn_play"){
main.PlaySound("click1");
main.PlaySound("pause");
main.SettingPauseD();
main.CallFadeInOutMusic(true, false, main.fadeChangeMusic);
main.IfSedangGuide(false);
} else {
if (_local4 == "btn_pause"){
main.PlaySound("click1");
main.PlaySound("pause");
main.SettingPauseD(true);
main.CallFadeInOutMusic(false, true, main.fadeChangeMusic);
_local2 = true;
} else {
if (_local4 == "btn_speed1"){
main.PlaySound("click1");
main.SettingSpeed(1);
} else {
if (_local4 == "btn_speed2"){
main.PlaySound("click1");
main.SettingSpeed(2);
} else {
if (_local4 == "btn_speed3"){
main.PlaySound("click1");
main.SettingSpeed(3);
} else {
if (_local4 == "btn_legend"){
_local2 = true;
main.PlaySound("click1");
main.legendD.opened();
if (main.game.RP_khusus.click_legend == 0){
main.game.RP_khusus.click_legend = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
main.CallFadeInOutMusic(false, true, main.fadeChangeMusic);
} else {
if (_local4 == "btn_menu"){
_local2 = true;
main.PlaySound("click1");
main.menuD.opened();
} else {
if (_local4 == "btn_acv"){
_local2 = true;
main.PlaySound("click1");
main.acvD.opened();
main.CallFadeInOutMusic(false, true, main.fadeChangeMusic);
} else {
if (_local4 == "btn_stat"){
_local2 = true;
main.PlaySound("click1");
main.statD.opened(false, false);
main.CallFadeInOutMusic(false, true, main.fadeChangeMusic);
} else {
if (_local4 == "btn_follow"){
_local2 = true;
main.PlaySound("click1");
main.followD.opened();
main.CallFadeInOutMusic(false, true, main.fadeChangeMusic);
};
};
};
};
};
};
};
};
};
};
if (_local2){
main.IfSedangGuide();
};
}
public function stageMouseDown1(_arg1:Event):void{
var _local2:Object = _arg1.target.parent;
var _local3:String = _local2.name;
var _local4:String = _local2.parent.name;
if (_local3 == "dragger"){
if (((!((tempDrag == null))) && (((!((tempDrag == music_volbar.dragger))) && (!((tempDrag == sound_volbar.dragger))))))){
removeTempDrag();
};
if (_local4 == "music_volbar"){
tempDrag = music_volbar.dragger;
} else {
tempDrag = sound_volbar.dragger;
};
tempDrag.startDrag();
};
}
public function mouseMainMoving1(_arg1:Event):void{
var _local2:String;
if (tempDrag != null){
_local2 = _arg1.target.parent.parent.name;
if (((!((_local2 == "music_volbar"))) && (!((_local2 == "sound_volbar"))))){
removeTempDrag();
};
boundTempDragPos();
};
}
public function stageMouseUp1(_arg1:Event):void{
if (tempDrag != null){
removeTempDrag();
};
}
public function removeTempDrag():void{
tempDrag.stopDrag();
boundTempDragPos();
}
public function boundTempDragPos():void{
if (tempDrag != null){
tempDrag.parent.settingDragBar();
};
}
public function isiFlowTeks(_arg1:String, _arg2:String, _arg3:uint=0, _arg4:uint=0):void{
TweenMax.killTweensOf(dyn, true);
txt_width = (dyn.isi(_arg2, _arg3, _arg4) - 7);
jenis_flow = _arg1;
adaFlowTeks = true;
kanan = (txt_width * 0.5);
dyn.x = 550;
tengah = (300 - kanan);
TweenMax.to(dyn, 8, {x:tengah, onComplete:completeTengahFlow});
}
public function countMissionUpdate(_arg1:int=0):void{
dyn.counting(_arg1);
}
public function completeTengahFlow():void{
centerFlow = true;
flowTiming = 5;
cawang.setx();
if (main){
main.CheckMissions();
};
}
public function counterCenterFlow():void{
if (centerFlow){
flowTiming--;
if (flowTiming <= 0){
closingFlowTeks();
};
};
}
public function closingFlowTeks():void{
TweenMax.killTweensOf(dyn, true);
bonus_t.visible = false;
centerFlow = false;
kiri = (75 - txt_width);
TweenMax.to(dyn, 1, {x:kiri, onComplete:completeLeftFlow});
}
public function completeLeftFlow():void{
flowTiming = 0;
jenis_flow = "";
adaFlowTeks = false;
dyn.hiding();
if (main){
main.setNextMissions();
};
}
public function acceptFlow():void{
cawang.showing();
}
public function setMoney(_arg1:int=0):void{
money_t.text = String(_arg1);
if (_arg1 == 0){
dollar.textColor = 0;
money_t.textColor = 0;
} else {
if (_arg1 < 0){
dollar.textColor = 0xFF0000;
money_t.textColor = 0xFF0000;
} else {
dollar.textColor = 0x6600;
money_t.textColor = 0x6600;
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 255
//Note_booth_683 (ResortEmpire_fla.Note_booth_683)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Note_booth_683 extends MovieClip {
public var visitor:SimpleButton;
public var star1:MovieClip;
public var star2:MovieClip;
public var star3:MovieClip;
public var onbutt:SimpleButton;
public var tag_t:TextField;
public var bg_upgrade:MovieClip;
public var pic:MovieClip;
public var star_back:MovieClip;
public var gelip:MovieClip;
public var onbuild:MovieClip;
public var btn_destroy:SimpleButton;
public var todayIncome_t:TextField;
public var name_t:TextField;
public var bar_exp:MovieClip;
public var btn_upgrade:SimpleButton;
public var lastDayIncome_t:TextField;
public var bg_exp:MovieClip;
public var dataOb;
public var kecuali:Boolean;
public var onFocus:Boolean;
public function Note_booth_683(){
addFrameScript(0, frame1);
}
public function init():void{
dataOb = null;
kecuali = false;
onFocus = false;
pic.buttonMode = true;
tag_t.mouseEnabled = false;
onbuild.mouseEnabled = false;
}
public function isi(_arg1):void{
dataOb = _arg1;
gelip.hiding();
var _local2:String = dataOb.jenis;
pic.gotoAndStop(_local2);
if (dataOb.minibooth){
kecuali = true;
} else {
kecuali = false;
};
tag_t.text = dataOb.REF.nama;
name_t.text = dataOb.nama_tampil;
defaultOnEdit();
updateData();
this.visible = true;
}
public function hiding():void{
dataOb = null;
this.visible = false;
}
public function updateData():void{
var _local1:Number;
var _local2:uint;
if (dataOb.builded){
onbuild.visible = false;
btn_destroy.visible = true;
btn_upgrade.visible = true;
if (kecuali){
btn_upgrade.visible = false;
btn_destroy.mouseEnabled = true;
btn_destroy.alpha = 1;
bg_upgrade.visible = false;
visitor.visible = false;
} else {
if (dataOb.canDestroy){
btn_destroy.mouseEnabled = true;
btn_destroy.alpha = 1;
visitor.visible = false;
} else {
btn_destroy.mouseEnabled = false;
btn_destroy.alpha = 0.35;
visitor.visible = true;
};
dataOb.checkForUpgrade();
if (dataOb.canUpgrade){
btn_upgrade.mouseEnabled = true;
btn_upgrade.alpha = 1;
bg_upgrade.visible = true;
} else {
btn_upgrade.mouseEnabled = false;
btn_upgrade.alpha = 0.35;
bg_upgrade.visible = false;
};
};
} else {
btn_destroy.visible = false;
btn_upgrade.visible = false;
visitor.visible = false;
onbuild.visible = true;
};
lastDayIncome_t.text = ("$" + String(dataOb.lastDay_income));
todayIncome_t.text = ("$" + String(dataOb.today_income));
star_back.visible = (kecuali) ? false : true;
if (dataOb.minibooth){
_local1 = 0;
bar_exp.visible = false;
} else {
_local1 = Math.min(25, ((dataOb.expPoint / dataOb.expMax) * 25));
bar_exp.visible = true;
};
bar_exp.width = _local1;
_local2 = 1;
while (_local2 < 4) {
if (kecuali){
this[("star" + _local2)].visible = false;
} else {
if (_local2 <= dataOb.level_){
this[("star" + _local2)].visible = true;
} else {
this[("star" + _local2)].visible = false;
};
};
_local2++;
};
}
public function onEdit():void{
name_t.type = TextFieldType.INPUT;
name_t.restrict = "A-Z 0-9";
name_t.maxChars = 15;
stage.focus = name_t;
name_t.setSelection(0, name_t.maxChars);
name_t.alwaysShowSelection = true;
name_t.textColor = 0;
name_t.background = true;
name_t.addEventListener(KeyboardEvent.KEY_DOWN, pressKey, false, 0, true);
}
public function defaultOnEdit():void{
name_t.type = TextFieldType.DYNAMIC;
var _local1:String = dataOb.nama_tampil;
if (name_t.text == ""){
name_t.text = _local1;
} else {
dataOb.changeName(name_t.text);
if (_local1 != name_t.text){
addRP_khususGantiNama(dataOb.jenis);
};
};
name_t.alwaysShowSelection = false;
name_t.textColor = 0xFFFFFF;
name_t.background = false;
name_t.removeEventListener(KeyboardEvent.KEY_DOWN, pressKey);
this["parent"].onfocus = null;
stage.focus = null;
}
public function pressKey(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
defaultOnEdit();
};
}
public function addRP_khususGantiNama(_arg1:String):void{
var _local2:Object = dataOb.main.game.RP_khusus;
if (_arg1 == "Cottage"){
if (_local2.change_cottage_name == 0){
_local2.change_cottage_name = 1;
dataOb.main.game.totalRP.Khusus++;
dataOb.main.hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "Lodge"){
if (_local2.change_lodge_name == 0){
_local2.change_lodge_name = 1;
dataOb.main.game.totalRP.Khusus++;
dataOb.main.hitungTotalRP(false, 1);
};
} else {
if (_local2.change_facility_name == 0){
_local2.change_facility_name = 1;
dataOb.main.game.totalRP.Khusus++;
dataOb.main.hitungTotalRP(false, 1);
};
};
};
_local2 = null;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 256
//note_employee_697 (ResortEmpire_fla.note_employee_697)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class note_employee_697 extends MovieClip {
public var star1:MovieClip;
public var act:MovieClip;
public var star2:MovieClip;
public var star3:MovieClip;
public var pic:MovieClip;
public var gelip:MovieClip;
public var promote_t:TextField;
public var btn_fire:SimpleButton;
public var bar_stamina:MovieClip;
public var nama_t:TextField;
public var btn_promote:SimpleButton;
public var mood:MovieClip;
public var dataOb:Object;
public var smiley:String;
public var rest:Boolean;
public var tired:Boolean;
public function note_employee_697(){
addFrameScript(0, frame1);
}
public function init():void{
this.buttonMode = true;
nama_t.mouseEnabled = false;
promote_t.mouseEnabled = false;
bar_stamina.mouseEnabled = false;
dataOb = null;
}
public function isi(_arg1):void{
dataOb = _arg1;
gelip.hiding();
updateData();
this.visible = true;
}
public function hiding():void{
dataOb = null;
this.visible = false;
}
public function updateData():void{
var _local2:uint;
rest = false;
tired = false;
if (dataOb.insideRoom){
rest = true;
} else {
if (((dataOb.bubu) || (dataOb.istirahat))){
tired = true;
};
};
if (rest){
act.gotoAndStop("sleepy");
act.visible = true;
mood.gotoAndStop(dataOb.smiley_fix);
smiley = dataOb.REF.smiley[dataOb.smiley_fix].nama;
} else {
if (tired){
act.gotoAndStop("sleepy");
act.visible = true;
mood.gotoAndStop(dataOb.smiley_fix);
smiley = dataOb.REF.smiley[dataOb.smiley_fix].nama;
} else {
act.visible = false;
mood.gotoAndStop(dataOb.smiley);
smiley = dataOb.REF.smiley[dataOb.smiley].nama;
};
};
var _local1:Number = Math.min(50, (dataOb.moodPersen * 0.5));
bar_stamina.width = _local1;
nama_t.text = dataOb.nama_tampil;
if (dataOb.canDestroy){
btn_fire.alpha = 1;
btn_fire.mouseEnabled = true;
} else {
btn_fire.alpha = 0.35;
btn_fire.mouseEnabled = false;
};
if (dataOb.canUpgrade){
btn_promote.alpha = 1;
btn_promote.mouseEnabled = true;
if (dataOb.level_ < 3){
promote_t.text = ("Promote: $" + dataOb.up_price);
promote_t.visible = true;
};
} else {
btn_promote.alpha = 0.35;
btn_promote.mouseEnabled = false;
promote_t.visible = false;
};
_local2 = 1;
while (_local2 < 4) {
if (_local2 <= dataOb.level_){
this[("star" + _local2)].visible = true;
} else {
this[("star" + _local2)].visible = false;
};
_local2++;
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 257
//note_janitorRoom_698 (ResortEmpire_fla.note_janitorRoom_698)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class note_janitorRoom_698 extends MovieClip {
public var star1:MovieClip;
public var star2:MovieClip;
public var star3:MovieClip;
public var clip_emp:MovieClip;
public var pic:MovieClip;
public var gelip:MovieClip;
public var emp_t:TextField;
public var btn_destroy:SimpleButton;
public var btn_upgrade:SimpleButton;
public var nama_t:TextField;
public var dataOb:Object;
public var desc_up:String;
public function note_janitorRoom_698(){
addFrameScript(0, frame1);
}
public function init():void{
this.buttonMode = true;
nama_t.mouseEnabled = false;
dataOb = null;
desc_up = "";
}
public function isi(_arg1):void{
dataOb = _arg1;
nama_t.text = dataOb.nama_tampil;
gelip.hiding();
updateData();
this.visible = true;
}
public function hiding():void{
dataOb = null;
this.visible = false;
}
public function updateData():void{
var _local1:uint;
if (dataOb.canDestroy){
btn_destroy.alpha = 1;
btn_destroy.mouseEnabled = true;
} else {
btn_destroy.alpha = 0.35;
btn_destroy.mouseEnabled = false;
};
if (dataOb.canUpgrade){
btn_upgrade.alpha = 1;
btn_upgrade.mouseEnabled = true;
} else {
btn_upgrade.alpha = 0.35;
btn_upgrade.mouseEnabled = false;
};
pic.gotoAndStop(("level_" + dataOb.level_));
_local1 = 1;
while (_local1 < 4) {
if (_local1 <= dataOb.level_){
this[("star" + _local1)].visible = true;
} else {
this[("star" + _local1)].visible = false;
};
_local1++;
};
emp_t.text = ((dataOb.myJanitor.length + "/") + dataOb.level_);
if (dataOb.level_ == 3){
desc_up = "Max Upgrade";
} else {
desc_up = (((((((("$" + dataOb.up_price) + " = Upgrade area (") + dataOb.areaRangeX) + "x") + dataOb.areaRangeY) + "), Max hire (") + (dataOb.level_ + 1)) + ")");
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 258
//note_scenery_677 (ResortEmpire_fla.note_scenery_677)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class note_scenery_677 extends MovieClip {
public var pic:MovieClip;
public var btn_destroy:SimpleButton;
public var jenis_c:MovieClip;
public var objek;
public function note_scenery_677(){
addFrameScript(0, frame1);
}
public function showing(_arg1):void{
objek = _arg1;
var _local2:String = objek.REF.lbl;
pic.gotoAndStop(_local2);
jenis_c.gotoAndStop(_local2);
this.visible = true;
}
public function hiding():void{
objek = null;
this.visible = false;
}
function frame1(){
pic.mouseEnabled = false;
jenis_c.mouseEnabled = false;
}
}
}//package ResortEmpire_fla
Section 259
//note_visitor_703 (ResortEmpire_fla.note_visitor_703)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class note_visitor_703 extends MovieClip {
public var act:MovieClip;
public var pic:MovieClip;
public var balon:MovieClip;
public var booth2_pic:MovieClip;
public var money_t:TextField;
public var booth1_pic:MovieClip;
public var nama_t:TextField;
public var mood:MovieClip;
public var dataOb:Object;
public var booth1:Object;
public var booth2:Object;
public function note_visitor_703(){
addFrameScript(0, frame1);
}
public function init():void{
this.buttonMode = true;
nama_t.mouseEnabled = false;
dataOb = null;
booth1 = null;
booth2 = null;
}
public function isi(_arg1):void{
dataOb = _arg1;
pic.gotoAndStop(dataOb.jenis);
mood.gotoAndStop(dataOb.smiley);
nama_t.text = dataOb.nama_tampil;
money_t.text = ("$" + dataOb.visual_money);
if (((dataOb.bubu) || (dataOb.istirahat))){
act.gotoAndStop("sleepy");
act.visible = true;
} else {
act.visible = false;
};
if (dataOb.bookedRoom == null){
if (dataOb.memasuki){
booth1 = dataOb.destination;
showing_sub("booth1");
} else {
if (((!((dataOb.myob == null))) && (!(dataOb.myob.akuLobby)))){
booth1 = dataOb.myob;
showing_sub("booth1");
} else {
hiding_sub("booth1");
};
};
hiding_sub("booth2");
} else {
booth1 = dataOb.bookedRoom;
showing_sub("booth1");
if (dataOb.myob == null){
if (((((dataOb.memasuki) && (!((dataOb.destination == booth1))))) && (!(dataOb.destination.akuLobby)))){
booth2 = dataOb.destination;
showing_sub("booth2");
} else {
hiding_sub("booth2");
};
} else {
if (((!((dataOb.myob == booth1))) && (!(dataOb.myob.akuLobby)))){
booth2 = dataOb.myob;
showing_sub("booth2");
} else {
hiding_sub("booth2");
};
};
};
balon.showingKhusus(dataOb);
this.visible = true;
}
public function showing_sub(_arg1:String):void{
this[(_arg1 + "_pic")].showing(this[_arg1].jenis);
}
public function hiding_sub(_arg1:String):void{
this[_arg1] = null;
this[(_arg1 + "_pic")].hiding();
}
public function hiding():void{
dataOb = null;
booth1 = null;
booth2 = null;
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 260
//notif_icon_866 (ResortEmpire_fla.notif_icon_866)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class notif_icon_866 extends MovieClip {
public function notif_icon_866(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 261
//notif_lg_865 (ResortEmpire_fla.notif_lg_865)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class notif_lg_865 extends MovieClip {
public var part9:MovieClip;
public var iconic:MovieClip;
public var part1:MovieClip;
public var part2:MovieClip;
public var isi_t:TextField;
public var part3:MovieClip;
public var part4:MovieClip;
public var part5:MovieClip;
public var part6:MovieClip;
public var part7:MovieClip;
public var part8:MovieClip;
public function notif_lg_865(){
addFrameScript(0, frame1);
}
public function init(){
isi_t.autoSize = TextFieldAutoSize.LEFT;
isi_t.text = "";
}
public function isi(_arg1:String):void{
isi_t.text = _arg1;
ind(isi_t.width, isi_t.height);
this.visible = true;
}
public function ind(_arg1:Number, _arg2:Number):void{
part1.width = (part3.width = (part2.width = _arg1));
part6.height = (part3.height = (part9.height = (_arg2 - 5)));
part7.x = ((part1.x + part1.width) - 1);
part8.x = ((part3.x + part3.width) - 1);
part9.x = ((part2.x + part2.width) - 1);
part5.y = (part6.y + part6.height);
part2.y = (part3.y + part3.height);
part8.y = (part9.y + part9.height);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 262
//notif_lobby_193 (ResortEmpire_fla.notif_lobby_193)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class notif_lobby_193 extends MovieClip {
public function notif_lobby_193(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 263
//option_music_492 (ResortEmpire_fla.option_music_492)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class option_music_492 extends MovieClip {
public var dragger:MovieClip;
public var box:MovieClip;
public var main;
public var W:Number;
public var htg:Number;
public var jenis:String;
public function option_music_492(){
addFrameScript(0, frame1);
}
public function init(_arg1, _arg2:String):void{
dragger.buttonMode = true;
W = 74;
main = _arg1;
jenis = _arg2;
addedBar();
}
public function addedBar():void{
dragger.y = 0;
if (jenis == "music"){
dragger.x = (main.musicVol * W);
if (main.musicVol == 0){
box.width = 0;
} else {
box.width = dragger.x;
};
} else {
dragger.x = (main.sfxVol * W);
if (main.sfxVol == 0){
box.width = 0;
} else {
box.width = dragger.x;
};
};
}
public function settingDragBar():void{
dragger.y = 0;
if (dragger.x < 0){
dragger.x = 0;
} else {
if (dragger.x > W){
dragger.x = W;
};
};
box.width = dragger.x;
htg = (dragger.x / W);
if (htg > 0){
main.isMuteAll = false;
};
var _local1:Number = RoundDecNumber(htg, 2);
if (jenis == "music"){
main.SettingMusic(_local1);
} else {
main.SettingSound(_local1);
};
}
public function RoundDecNumber(_arg1:Number, _arg2:Number):Number{
var _local3:Number = Math.pow(10, _arg2);
return ((Math.round((_arg1 * _local3)) / _local3));
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 264
//optionD_733 (ResortEmpire_fla.optionD_733)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class optionD_733 extends MovieClip {
public var teks_high:MovieClip;
public var btn_close:SimpleButton;
public var teks_medium:MovieClip;
public var btn_bg:MovieClip;
public var btn_medium:SimpleButton;
public var teks_low:MovieClip;
public var music_volbar:MovieClip;
public var btn_low:SimpleButton;
public var btn_high:SimpleButton;
public var sound_volbar:MovieClip;
public var btn_default:SimpleButton;
public var main;
public var tempDrag;
public function optionD_733(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
teks_low.mouseEnabled = false;
teks_medium.mouseEnabled = false;
teks_high.mouseEnabled = false;
btn_bg.buttonMode = true;
main = _arg1;
closed();
}
public function closed():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickThis);
removeDragger();
}
public function removingAll():void{
TweenMax.killTweensOf(this);
closed();
main = null;
}
public function removeDragger():void{
tempDrag = null;
this.removeEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1);
this.removeEventListener(MouseEvent.MOUSE_UP, stageMouseUp1);
this.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1);
}
public function initDragger():void{
setSoundMusic();
this.addEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, stageMouseUp1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1, false, 0, true);
}
public function setSoundMusic():void{
music_volbar.init(main, "music");
sound_volbar.init(main, "sound");
}
public function opened():void{
TweenMax.killTweensOf(this, true);
settingQuality(main.isQuality);
initDragger();
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.25, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis);
}
public function onCompleteClosed():void{
closed();
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target.name;
if (_local2 == "btn_default"){
TweenMax.killTweensOf(this, true);
this.alpha = 0.75;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
main.PlaySound("click3");
settingQuality("high");
main.isMuteAll = false;
main.musicVol = 1;
music_volbar.addedBar();
main.SettingMusic(1);
main.sfxVol = 1;
sound_volbar.addedBar();
main.SettingSound(1);
} else {
if (_local2 == "btn_low"){
main.PlaySound("click3");
settingQuality("low");
} else {
if (_local2 == "btn_medium"){
main.PlaySound("click3");
settingQuality("medium");
} else {
if (_local2 == "btn_high"){
main.PlaySound("click3");
settingQuality("high");
} else {
if ((((_local2 == "btn_close")) || ((_local2 == "btn_bg")))){
TweenMax.killTweensOf(this, true);
main.PlaySound("click1");
TweenMax.to(this, 0.25, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
main.menuD.visible = true;
main.navigator3.setSoundMusic();
};
};
};
};
};
}
public function settingQuality(_arg1:String):void{
if (main.isQuality != _arg1){
main.isQuality = _arg1;
main.SettingQuality();
};
if (main.isQuality == "low"){
acceptQuality(true, false, false);
} else {
if (main.isQuality == "medium"){
acceptQuality(false, true, false);
} else {
if (main.isQuality == "high"){
acceptQuality(false, false, true);
};
};
};
}
public function acceptQuality(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):void{
if (_arg1){
btn_low.visible = false;
teks_low.visible = true;
btn_medium.visible = true;
btn_high.visible = true;
teks_medium.visible = false;
teks_high.visible = false;
} else {
if (_arg2){
btn_medium.visible = false;
teks_medium.visible = true;
btn_low.visible = true;
btn_high.visible = true;
teks_low.visible = false;
teks_high.visible = false;
} else {
if (_arg3){
btn_high.visible = false;
teks_high.visible = true;
btn_medium.visible = true;
btn_low.visible = true;
teks_medium.visible = false;
teks_low.visible = false;
};
};
};
}
public function stageMouseDown1(_arg1:Event):void{
var _local2:Object = _arg1.target.parent;
var _local3:String = _local2.name;
var _local4:String = _local2.parent.name;
if (_local3 == "dragger"){
if (tempDrag != null){
if (((!((tempDrag == music_volbar.dragger))) && (!((tempDrag == sound_volbar.dragger))))){
removeTempDrag();
};
};
if (_local4 == "music_volbar"){
tempDrag = music_volbar.dragger;
} else {
tempDrag = sound_volbar.dragger;
};
tempDrag.startDrag();
};
_local2 = null;
}
public function mouseMainMoving1(_arg1:Event):void{
var _local2:String;
if (tempDrag != null){
_local2 = _arg1.target.parent.parent.name;
if (((!((_local2 == "music_volbar"))) && (!((_local2 == "sound_volbar"))))){
removeTempDrag();
};
boundTempDragPos();
};
}
public function stageMouseUp1(_arg1:Event):void{
if (tempDrag != null){
removeTempDrag();
};
}
public function removeTempDrag():void{
tempDrag.stopDrag();
boundTempDragPos();
}
public function boundTempDragPos():void{
if (tempDrag != null){
tempDrag.parent.settingDragBar();
};
}
function frame1(){
tempDrag = null;
}
}
}//package ResortEmpire_fla
Section 265
//optionD_mini_486 (ResortEmpire_fla.optionD_mini_486)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class optionD_mini_486 extends MovieClip {
public var teks_high:MovieClip;
public var btn_close:SimpleButton;
public var teks_medium:MovieClip;
public var btn_medium:SimpleButton;
public var teks_low:MovieClip;
public var music_volbar:MovieClip;
public var btn_low:SimpleButton;
public var layar:MovieClip;
public var btn_high:SimpleButton;
public var sound_volbar:MovieClip;
public var btn_default:SimpleButton;
public var main;
public var tempDrag;
public function optionD_mini_486(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
tempDrag = null;
teks_low.mouseEnabled = false;
teks_medium.mouseEnabled = false;
teks_high.mouseEnabled = false;
closed();
}
public function closed():void{
this.visible = false;
callDefault();
removingListeners();
}
public function removingListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
removeDragger();
}
public function removingAll():void{
removingListeners();
main = null;
}
public function callDefault():void{
layar.hiding();
}
public function removeDragger():void{
tempDrag = null;
this.removeEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1);
this.removeEventListener(MouseEvent.MOUSE_UP, stageMouseUp1);
this.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1);
}
public function initDragger():void{
setSoundMusic();
this.addEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, stageMouseUp1, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving1, false, 0, true);
}
public function setSoundMusic():void{
music_volbar.init(main, "music");
sound_volbar.init(main, "sound");
}
public function opened(_arg1:Boolean=false):void{
this.visible = true;
layar.showing();
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
SettingQuality(main.isQuality);
initDragger();
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if (_local2 == "btn_close"){
main.PlaySound("click1");
closed();
main.mainMenuD.gotoAndStop("stand");
} else {
if (_local2 == "btn_default"){
main.PlaySound("click3");
SettingQuality("high");
main.musicVol = 1;
music_volbar.addedBar();
main.sfxVol = 1;
sound_volbar.addedBar();
} else {
if (_local2 == "btn_low"){
main.PlaySound("click3");
SettingQuality("low");
} else {
if (_local2 == "btn_medium"){
main.PlaySound("click3");
SettingQuality("medium");
} else {
if (_local2 == "btn_high"){
main.PlaySound("click3");
SettingQuality("high");
};
};
};
};
};
}
public function SettingQuality(_arg1:String):void{
if (main.isQuality != _arg1){
main.isQuality = _arg1;
main.SettingQuality();
};
if (main.isQuality == "low"){
acceptQuality(true, false, false);
} else {
if (main.isQuality == "medium"){
acceptQuality(false, true, false);
} else {
if (main.isQuality == "high"){
acceptQuality(false, false, true);
};
};
};
}
public function acceptQuality(_arg1:Boolean, _arg2:Boolean, _arg3:Boolean):void{
if (_arg1){
btn_low.visible = false;
teks_low.visible = true;
btn_medium.visible = true;
btn_high.visible = true;
teks_medium.visible = false;
teks_high.visible = false;
} else {
if (_arg2){
btn_medium.visible = false;
teks_medium.visible = true;
btn_low.visible = true;
btn_high.visible = true;
teks_low.visible = false;
teks_high.visible = false;
} else {
if (_arg3){
btn_high.visible = false;
teks_high.visible = true;
btn_medium.visible = true;
btn_low.visible = true;
teks_medium.visible = false;
teks_low.visible = false;
};
};
};
}
public function stageMouseDown1(_arg1:Event):void{
var _local2:Object = _arg1.target.parent;
if (_local2.name == "dragger"){
if (((!((tempDrag == null))) && (((!((tempDrag == music_volbar.dragger))) && (!((tempDrag == sound_volbar.dragger))))))){
removeTempDrag();
};
if (_local2.parent.name == "music_volbar"){
tempDrag = music_volbar.dragger;
} else {
tempDrag = sound_volbar.dragger;
};
tempDrag.startDrag();
};
}
public function mouseMainMoving1(_arg1:Event):void{
var _local2:String;
if (tempDrag != null){
_local2 = _arg1.target.parent.parent.name;
if (((!((_local2 == "music_volbar"))) && (!((_local2 == "sound_volbar"))))){
removeTempDrag();
};
boundTempDragPos();
};
}
public function stageMouseUp1(_arg1:Event):void{
if (tempDrag != null){
removeTempDrag();
};
}
public function removeTempDrag():void{
tempDrag.stopDrag();
boundTempDragPos();
}
public function boundTempDragPos():void{
if (tempDrag != null){
tempDrag.parent.settingDragBar();
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 266
//panah_guide_841 (ResortEmpire_fla.panah_guide_841)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class panah_guide_841 extends MovieClip {
public var panah:MovieClip;
public function panah_guide_841(){
addFrameScript(0, frame1);
}
public function hiding():void{
visible = false;
}
public function showing(_arg1:Number, _arg2:Number, _arg3:String):void{
x = _arg1;
y = _arg2;
gotoAndStop(_arg3);
visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 267
//panah_over_37 (ResortEmpire_fla.panah_over_37)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class panah_over_37 extends MovieClip {
public function panah_over_37(){
addFrameScript(0, frame1);
}
public function setting(_arg1:String=null):void{
if (_arg1 == null){
this.gotoAndStop(1);
} else {
this.gotoAndStop(_arg1);
};
hiding();
}
public function showing():void{
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 268
//panah_over_move_38 (ResortEmpire_fla.panah_over_move_38)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class panah_over_move_38 extends MovieClip {
public function panah_over_move_38(){
addFrameScript(0, frame1);
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 269
//parte_764 (ResortEmpire_fla.parte_764)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class parte_764 extends MovieClip {
public var part1:MovieClip;
public var part2:MovieClip;
public var part3:MovieClip;
public function parte_764(){
addFrameScript(0, frame1);
}
public function ind(_arg1:Boolean):void{
part3.x = (part2.x + (part2.width - 1));
if (_arg1){
this.scaleX = 1;
this.x = 1.25;
} else {
this.scaleX = -1;
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 270
//pic_588 (ResortEmpire_fla.pic_588)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class pic_588 extends MovieClip {
public var clip:MovieClip;
public function pic_588(){
addFrameScript(0, frame1);
}
function frame1(){
this.mouseChildren = false;
stop();
}
}
}//package ResortEmpire_fla
Section 271
//pic_head_134 (ResortEmpire_fla.pic_head_134)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class pic_head_134 extends MovieClip {
public function pic_head_134(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 272
//pic_jenis_678 (ResortEmpire_fla.pic_jenis_678)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class pic_jenis_678 extends MovieClip {
public function pic_jenis_678(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 273
//pic_nav1_687 (ResortEmpire_fla.pic_nav1_687)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class pic_nav1_687 extends MovieClip {
public var btn:SimpleButton;
public function pic_nav1_687(){
addFrameScript(0, frame1);
}
public function hiding(){
this.visible = false;
}
public function showing(_arg1:String){
this.gotoAndStop(_arg1);
this.visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 274
//pic_scenery_586 (ResortEmpire_fla.pic_scenery_586)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class pic_scenery_586 extends MovieClip {
public function pic_scenery_586(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 275
//preloadnumber_24 (ResortEmpire_fla.preloadnumber_24)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class preloadnumber_24 extends MovieClip {
public function preloadnumber_24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 276
//property_pic_633 (ResortEmpire_fla.property_pic_633)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class property_pic_633 extends MovieClip {
public var employee:MovieClip;
public function property_pic_633(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 277
//propertyD_632 (ResortEmpire_fla.propertyD_632)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
import com.greensock.*;
import com.greensock.easing.*;
public dynamic class propertyD_632 extends MovieClip {
public var price_t:TextField;
public var desc_t:TextField;
public var title_t:TextField;
public var pic:MovieClip;
public var btn_back:SimpleButton;
public function propertyD_632(){
addFrameScript(0, frame1);
}
public function callDefault():void{
this.visible = false;
}
public function callOpen():void{
TweenMax.killTweensOf(this, true);
this.x = 700;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {x:565, y:335, alpha:1, ease:Cubic.easeInOut});
}
public function checkTweenClosed():void{
callDefault();
}
public function callClose():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {x:700, y:335, alpha:0, onComplete:checkTweenClosed});
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 278
//quickdestroy_notif_750 (ResortEmpire_fla.quickdestroy_notif_750)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class quickdestroy_notif_750 extends MovieClip {
public function quickdestroy_notif_750(){
addFrameScript(0, frame1);
}
public function hiding():void{
this.visible = false;
}
public function showing():void{
this.visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 279
//Redground1x1_271 (ResortEmpire_fla.Redground1x1_271)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class Redground1x1_271 extends MovieClip {
public function Redground1x1_271(){
addFrameScript(0, frame1);
}
public function showing(){
this.visible = true;
}
public function hiding(){
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 280
//scenery_tabD_674 (ResortEmpire_fla.scenery_tabD_674)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class scenery_tabD_674 extends MovieClip {
public var btn_close:SimpleButton;
public var note_8:MovieClip;
public var note_9:MovieClip;
public var page_t:TextField;
public var btn_bg:MovieClip;
public var gelip:MovieClip;
public var btn_prev:SimpleButton;
public var note_10:MovieClip;
public var note_11:MovieClip;
public var note_12:MovieClip;
public var tab_scenery:MovieClip;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var note_2:MovieClip;
public var box_over:MovieClip;
public var note_3:MovieClip;
public var note_4:MovieClip;
public var note_5:MovieClip;
public var note_6:MovieClip;
public var note_7:MovieClip;
public var main;
public var _reference:Array;
public var note:Array;
public var _select:Object;
public var _jenis:String;
public var k:uint;
public var _file:uint;
public var jumlah_ref:uint;
public var _max_file:uint;
public var _page:uint;
public var _totalPage:uint;
public var clip:MovieClip;
public function scenery_tabD_674(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:String;
main = _arg1;
tab_scenery.buttonMode = true;
btn_bg.buttonMode = true;
gelip.hiding();
note = [];
k = 1;
while (k < 13) {
_local2 = ("note_" + String(k));
note[_local2] = true;
clip = (this.getChildByName(_local2) as MovieClip);
clip.buttonMode = true;
k++;
};
_file = 0;
_max_file = 0;
_page = 0;
_totalPage = 0;
closing();
}
public function callDefault():void{
box_over.hiding();
_page = 1;
selectJenis();
onSelected(tab_scenery, false);
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
catchData();
} else {
_arg1.gotoAndStop(1);
};
}
public function catchData():void{
_reference = main.game.objects[_jenis];
jumlah_ref = _reference.length;
_totalPage = Math.ceil((jumlah_ref / 12));
_page = ((_totalPage)==0) ? 0 : 1;
prevNextData();
}
public function catchData_update():void{
jumlah_ref = _reference.length;
_totalPage = Math.ceil((jumlah_ref / 12));
_page = ((_totalPage)==0) ? 0 : (((_page - 1))==_totalPage) ? _totalPage : _page;
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:String;
var _local4:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
gelip.showing();
};
btn_prev.visible = ((_page)>1) ? true : false;
btn_next.visible = ((_page)<_totalPage) ? true : false;
page_t.text = ((_page + "/") + String(_totalPage));
if (_totalPage > 0){
_max_file = (_page * 12);
_file = (_max_file - 12);
if (_max_file > jumlah_ref){
_max_file = jumlah_ref;
};
k = 0;
while (k < 12) {
_local3 = ("note_" + String((k + 1)));
clip = (this[_local3] as MovieClip);
_local4 = (_max_file % 12);
if ((((_local4 == 0)) || ((k < _local4)))){
clip.showing(_reference[(_file + k)].ob);
} else {
clip.hiding();
};
k++;
};
} else {
k = 1;
while (k < 13) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
};
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
if (_local3 == "tab_scenery"){
if (_select == _local2){
} else {
if (_select == null){
selectJenis(_local2);
onSelected(_select);
} else {
onSelected(_select, false);
selectJenis(_local2);
onSelected(_select);
};
};
} else {
if (_local3 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local3 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if (_local3 == "btn_destroy"){
main.PlaySound("destroy2");
destroyTarget(_local2.parent);
} else {
if ((((_local3 == "btn_close")) || ((_local3 == "btn_bg")))){
main.IfSedangGuide(false);
main.PlaySound("click3");
main.blackD2.visible = false;
closing();
} else {
if (note[_local3]){
main.PlaySound("zip");
gotoTarget(_local2);
};
};
};
};
};
};
_local2 = null;
}
public function overThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
if (note[_local3]){
box_over.showing(_local2);
main.balonD.isi("Click to go to target");
} else {
box_over.hiding();
main.balonD.hiding();
};
_local2 = null;
}
public function gotoTarget(_arg1):void{
var _local2:* = _arg1.objek;
if (_local2 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_local2);
_local2.acceptGoToTarget();
};
_local2 = null;
}
public function destroyTarget(_arg1):void{
if (_arg1.objek != null){
_arg1.objek.destroy();
catchData_update();
};
}
public function selectJenis(_arg1:Object=null):void{
if (_arg1 == null){
_select = null;
_jenis = "";
} else {
_select = _arg1;
switch (_select){
case tab_scenery:
_jenis = "Scenery";
break;
default:
trace("Out of range");
break;
};
};
}
public function closing():void{
this.visible = false;
callDefault();
removeListeners();
main.navigator1._selectOnDefault(true);
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
k = 1;
while (k < 13) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
main = null;
_select = null;
clip = null;
_reference = null;
note = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
selectJenis(tab_scenery);
onSelected(_select);
main.blackD2.visible = true;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 281
//selectD_people_858 (ResortEmpire_fla.selectD_people_858)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class selectD_people_858 extends MovieClip {
public function selectD_people_858(){
addFrameScript(0, frame1);
}
public function init(){
this.mouseEnabled = false;
hiding();
}
public function showing(_arg1):void{
this.x = _arg1.x;
this.y = _arg1.y;
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 282
//selectf_860 (ResortEmpire_fla.selectf_860)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class selectf_860 extends MovieClip {
public function selectf_860(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
hiding();
}
public function showing(_arg1, _arg2:String):void{
this.gotoAndStop(_arg2);
this.x = _arg1.x;
this.y = _arg1.y;
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 283
//soundClip_403 (ResortEmpire_fla.soundClip_403)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class soundClip_403 extends MovieClip {
public function soundClip_403(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 284
//sponsor_teks_opening_630 (ResortEmpire_fla.sponsor_teks_opening_630)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class sponsor_teks_opening_630 extends MovieClip {
public function sponsor_teks_opening_630(){
addFrameScript(0, frame1, 8, frame9);
}
public function anime():void{
this.visible = true;
this.gotoAndPlay("anime");
}
public function hiding():void{
this.visible = false;
}
function frame1(){
stop();
}
function frame9(){
stop();
stop();
}
}
}//package ResortEmpire_fla
Section 285
//stageAutoPaused_752 (ResortEmpire_fla.stageAutoPaused_752)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class stageAutoPaused_752 extends MovieClip {
public function stageAutoPaused_752(){
addFrameScript(0, frame1);
}
public function hiding():void{
this.visible = false;
}
public function showing():void{
this.visible = true;
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 286
//star_unlock_669 (ResortEmpire_fla.star_unlock_669)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class star_unlock_669 extends MovieClip {
public var star1:MovieClip;
public var star_t:TextField;
public function star_unlock_669(){
addFrameScript(0, frame1);
}
public function isi(_arg1:uint=0){
star_t.text = (_arg1 + " to unlock");
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 287
//stat_737 (ResortEmpire_fla.stat_737)
package ResortEmpire_fla {
import flash.display.*;
import flash.text.*;
public dynamic class stat_737 extends MovieClip {
public var visitor_t:TextField;
public var desc_t:TextField;
public var expend_t:TextField;
public var income_t:TextField;
public var gainloss_t:TextField;
public function stat_737(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
desc_t.mouseEnabled = false;
visitor_t.mouseEnabled = false;
income_t.mouseEnabled = false;
expend_t.mouseEnabled = false;
gainloss_t.mouseEnabled = false;
desc_t.autoSize = TextFieldAutoSize.LEFT;
visitor_t.autoSize = TextFieldAutoSize.CENTER;
income_t.autoSize = TextFieldAutoSize.RIGHT;
expend_t.autoSize = TextFieldAutoSize.RIGHT;
gainloss_t.autoSize = TextFieldAutoSize.RIGHT;
}
public function isi_data(_arg1:String, _arg2:String, _arg3:String, _arg4:String, _arg5:String):void{
desc_t.htmlText = _arg1;
visitor_t.text = _arg2;
income_t.htmlText = _arg3;
expend_t.htmlText = _arg4;
gainloss_t.htmlText = _arg5;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 288
//statD_734 (ResortEmpire_fla.statD_734)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class statD_734 extends MovieClip {
public var btn_close:SimpleButton;
public var visitor_t:TextField;
public var balance_t:TextField;
public var statIsi:MovieClip;
public var btn_bg:MovieClip;
public var btn_prev:SimpleButton;
public var cek_alwaysReport:MovieClip;
public var btn_today:SimpleButton;
public var dollar:TextField;
public var earning_t:TextField;
public var MSlide:MovieClip;
public var dollar2:TextField;
public var btn_alwaysReport:SimpleButton;
public var day_t:TextField;
public var main;
public var tempDrag;
public var H:Number;
public var HT:Number;
public var hit:Number;
public var day:uint;
public var day_report:uint;
public var onEndDay:Boolean;
public var balance:int;
public var _saved:Boolean;
public var _nextDay:Boolean;
public function statD_734(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
tempDrag = null;
_saved = false;
_nextDay = false;
cek_alwaysReport.mouseEnabled = false;
btn_bg.buttonMode = true;
statIsi.init(_arg1);
closed();
}
public function closed():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickFunction);
this.removeEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown);
this.removeEventListener(MouseEvent.MOUSE_UP, stageMouseUp);
this.removeEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
closed();
statIsi.removingAll();
main = null;
tempDrag = null;
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
}
public function onCompleteClosed():void{
closed();
}
public function opened(_arg1:Boolean=false, _arg2:Boolean=true):void{
onEndDay = main["onEndDay"];
_saved = _arg1;
_nextDay = _arg2;
trace("\n>>Stat onEndDay>>", onEndDay, main.day, "_saved?", _saved);
main.balonD.hiding();
main.PlaySound("pause");
TweenMax.killTweensOf(this, true);
main.CallAutoPaused();
main.blackD.visible = true;
statIsi.y = HT;
MSlide.slider.y = 0;
day = main["day"];
day_report = day;
prevNextReport();
setAlwaysShow();
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_DOWN, stageMouseDown, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_UP, stageMouseUp, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_MOVE, mouseMainMoving, false, 0, true);
}
public function temporaryStat():void{
statIsi.y = HT;
MSlide.slider.y = 0;
day = main["day"];
onEndDay = main["onEndDay"];
day_report = day;
prevNextReport();
}
public function setAlwaysShow():void{
cek_alwaysReport.visible = main.alwaysShowReport;
}
public function prevNextReport():void{
if (day == day_report){
btn_today.visible = false;
if (main["onEndDay"]){
btn_prev.visible = false;
} else {
if (day > 1){
btn_prev.visible = true;
} else {
btn_prev.visible = false;
};
};
statIsi.updateData();
balance = main.money;
} else {
btn_today.visible = true;
btn_prev.visible = false;
statIsi.updateData(false);
balance = main.gameRecord["money"];
};
day_t.text = ("DAY - " + String(day_report));
earning_t.text = String(statIsi.gainloss);
visitor_t.text = "";
if (statIsi.gainloss == 0){
dollar.textColor = 0;
earning_t.textColor = 0;
} else {
if (statIsi.gainloss < 0){
dollar.textColor = 0xFF0000;
earning_t.textColor = 0xFF0000;
} else {
dollar.textColor = 0xFF;
earning_t.textColor = 0xFF;
};
};
balance_t.text = String(balance);
if (balance == 0){
dollar2.textColor = 0;
balance_t.textColor = 0;
} else {
if (balance < 0){
dollar2.textColor = 0xFF0000;
balance_t.textColor = 0xFF0000;
} else {
dollar2.textColor = 0xFF;
balance_t.textColor = 0xFF;
};
};
if (onEndDay){
main.checkProfit(statIsi.gainloss);
};
}
public function checkCompleteOpen():void{
}
public function clickFunction(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if ((((_local2 == "btn_close")) || ((_local2 == "btn_bg")))){
main.PlaySound("click3");
closing();
main.blackD.visible = false;
main.closingStatFunction(onEndDay, _saved, _nextDay);
main.CallFadeInOutMusic(true, false, main.fadeChangeMusic);
} else {
if (_local2 == "btn_prev"){
main.PlaySound("click2");
TweenMax.killTweensOf(this, true);
day_report = (day_report - 1);
scaleX = 0.9;
scaleY = 0.9;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
prevNextReport();
} else {
if (_local2 == "btn_today"){
main.PlaySound("click2");
TweenMax.killTweensOf(this, true);
day_report = (day_report + 1);
scaleX = 0.9;
scaleY = 0.9;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
prevNextReport();
} else {
if (_local2 == "btn_alwaysReport"){
if (main.alwaysShowReport){
main.PlaySound("click3");
} else {
main.PlaySound("click2");
};
main.alwaysShowReport = !(main.alwaysShowReport);
setAlwaysShow();
};
};
};
};
}
public function stageMouseDown(_arg1:Event):void{
var _local2:String;
if (MSlide.visible){
_local2 = _arg1.target.name;
if (_local2 == "btn_slide"){
if (((!((tempDrag == null))) && (!((tempDrag == MSlide.slider))))){
removeTempDrag();
};
tempDrag = MSlide.slider;
tempDrag.startDrag();
} else {
if (_local2 == "backStat"){
if (((!((tempDrag == null))) && (!((tempDrag == statIsi))))){
removeTempDrag();
};
tempDrag = statIsi;
tempDrag.startDrag();
};
};
};
}
public function mouseMainMoving(_arg1:Event):void{
var _local2:String;
var _local3:String;
if (tempDrag != null){
_local2 = _arg1.target.name;
_local3 = tempDrag.name;
if ((((_local3 == "slider")) && (!((_local2 == "btn_slide"))))){
removeTempDrag();
} else {
if ((((_local3 == "statIsi")) && (!((_local2 == "backStat"))))){
removeTempDrag();
};
};
boundTempDragPos();
};
}
public function stageMouseUp(_arg1:Event):void{
if (tempDrag != null){
removeTempDrag();
};
}
public function removeTempDrag():void{
tempDrag.stopDrag();
boundTempDragPos();
}
public function boundTempDragPos():void{
var _local1:String;
var _local2:Number;
var _local3:Number;
if (tempDrag != null){
_local1 = tempDrag.name;
_local2 = statIsi.height;
if (_local1 == "slider"){
MSlide.slider.x = 0;
if (MSlide.slider.y < 0){
MSlide.slider.y = 0;
} else {
if (MSlide.slider.y > 145){
MSlide.slider.y = 145;
};
};
hit = (((-(MSlide.slider.y) / 145) * (_local2 - 150)) + HT);
statIsi.y = hit;
} else {
if (_local1 == "statIsi"){
statIsi.x = -208.4;
if (statIsi.y > HT){
statIsi.y = HT;
} else {
_local3 = (150 - _local2);
if ((statIsi.y - HT) < _local3){
statIsi.y = (_local3 + HT);
};
};
hit = (-((statIsi.y - HT)) * (145 / (_local2 - 150)));
MSlide.slider.y = hit;
};
};
};
}
function frame1(){
H = 160;
HT = -68.65;
}
}
}//package ResortEmpire_fla
Section 289
//StatIsi_735 (ResortEmpire_fla.StatIsi_735)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class StatIsi_735 extends MovieClip {
public var stat_lobby:MovieClip;
public var stat_misc:MovieClip;
public var stat_facility:MovieClip;
public var stat_scenery:MovieClip;
public var backStat:MovieClip;
public var stat_bonus:MovieClip;
public var stat_janitor:MovieClip;
public var stat_room:MovieClip;
public var stat_extra:MovieClip;
public var stat_expand:MovieClip;
public var stat_tiles:MovieClip;
public var main;
public var s:uint;
public var i:uint;
public var j:uint;
public var pjg_stat:uint;
public var gameData:Object;
public var clip:MovieClip;
public var gainloss:int;
public var expend:int;
public var income:int;
public var isToday:Boolean;
public var descT:String;
public var visitorT:String;
public var incomeT:String;
public var expendT:String;
public var gainT:String;
public var subtot_expend:int;
public var _gainloss:int;
public var _income:int;
public var _expend:int;
public var _used:uint;
public var tot_gainloss:int;
public var tot_income:int;
public var tot_expend:int;
public var stat:Array;
public function StatIsi_735(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:Number;
stat = ["stat_lobby", "stat_room", "stat_facility", "stat_scenery", "stat_tiles", "stat_janitor", "stat_bonus", "stat_misc"];
main = _arg1;
this.mouseEnabled = false;
_local2 = stat_lobby.x;
pjg_stat = stat.length;
s = 0;
while (s < pjg_stat) {
clip = (this[stat[s]] as MovieClip);
clip.init();
clip.x = _local2;
s++;
};
backStat.y = stat_lobby.y;
backStat.height = 10;
clip = null;
}
public function removingAll():void{
gameData = null;
main = null;
}
public function updateData(_arg1:Boolean=true):void{
isToday = _arg1;
if (_arg1){
gameData = main.game;
} else {
gameData = main.gameRecord;
};
gainloss = 0;
expend = 0;
income = 0;
InsertData_Lobby(stat_lobby, gameData["objects"].Lobby, "Lobby");
InsertData_Room(stat_room, gameData["objects"], "Room");
InsertData_Facility(stat_facility, gameData["objects"].Facility, "Facility");
InsertData_JanitorRoom(stat_janitor, gameData["objects"].JanitorRoom, "Janitor");
InsertData_Scenery(stat_scenery, "Scenery");
InsertData_Tile(stat_tiles, "Tile");
InsertData_Misc(stat_misc, "Miscellaneous");
InsertData_Bonus(stat_bonus, "Bonus");
InsertData_Extra(stat_extra);
InsertData_Expand(stat_expand);
stat_room.y = ((stat_lobby.y + stat_lobby.height) + 5);
stat_facility.y = ((stat_room.y + stat_room.height) + 5);
stat_scenery.y = ((stat_facility.y + stat_facility.height) + 5);
stat_tiles.y = ((stat_scenery.y + stat_scenery.height) + 5);
stat_janitor.y = ((stat_tiles.y + stat_tiles.height) + 5);
stat_misc.y = ((stat_janitor.y + stat_janitor.height) + 5);
stat_bonus.y = ((stat_misc.y + stat_misc.height) + 5);
stat_extra.y = ((stat_bonus.y + stat_bonus.height) + 5);
stat_expand.y = ((stat_extra.y + stat_extra.height) + 5);
backStat.height = this.height;
if (this.height > parent["H"]){
this.buttonMode = true;
parent["MSlide"].visible = true;
} else {
this.buttonMode = false;
parent["MSlide"].visible = false;
};
gameData = null;
}
public function updateGainloss(_arg1:int=0, _arg2:int=0, _arg3:int=0):void{
income = (income + _arg1);
expend = (expend + _arg2);
gainloss = (gainloss + _arg3);
}
public function InsertData_Scenery(_arg1:MovieClip, _arg2:String):void{
subtot_expend = ambilDataGame("MISC", (_arg2 + "_Expend"));
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
descT = (descT + "SCENERIES");
visitorT = (visitorT + "-");
incomeT = (incomeT + "-");
expendT = (expendT + toCek(subtot_expend, true));
_gainloss = (0 - subtot_expend);
gainT = (gainT + toCek(_gainloss));
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
updateGainloss(0, subtot_expend, _gainloss);
}
public function InsertData_Tile(_arg1:MovieClip, _arg2:String):void{
subtot_expend = ambilDataGame("MISC", (_arg2 + "_Expend"));
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
descT = (descT + "TILES");
visitorT = (visitorT + "-");
incomeT = (incomeT + "-");
expendT = (expendT + toCek(subtot_expend, true));
_gainloss = (0 - subtot_expend);
gainT = (gainT + toCek(_gainloss));
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
updateGainloss(0, subtot_expend, _gainloss);
}
public function InsertData_Misc(_arg1:MovieClip, _arg2:String):void{
subtot_expend = ambilDataGame("MISC", "Expend");
var _local3:uint = ambilDataGame("MISC", "StaffSalary");
var _local4:uint = ambilDataGame("MISC", "JanitorSalary");
_income = ambilDataGame("MISC", "Income");
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
descT = (descT + "MISCELLANEOUS");
visitorT = (visitorT + "-");
_income = (_income - income);
if (((main.onEndDay) || (!(isToday)))){
_expend = ((subtot_expend + _local3) + _local4);
} else {
_expend = subtot_expend;
};
_expend = (_expend - expend);
incomeT = (incomeT + toCek(_income));
expendT = (expendT + toCek(_expend, true));
_gainloss = (_income - _expend);
gainT = (gainT + toCek(_gainloss));
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
updateGainloss(0, 0, _gainloss);
}
public function InsertData_Lobby(_arg1:MovieClip, _arg2:Object, _arg3:String):void{
if (isToday){
_arg2 = _arg2.ob;
} else {
};
_income = _arg2.today_income;
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
descT = (descT + _arg2.nama_tampil);
visitorT = (visitorT + "-");
incomeT = (incomeT + toCek(_income));
_expend = _arg2.today_expend;
if (((main.onEndDay) || (!(isToday)))){
_expend = (_expend + _arg2.daily_gaji);
};
expendT = (expendT + toCek(_expend, true));
_gainloss = (_income - _expend);
gainT = (gainT + toCek(_gainloss));
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
updateGainloss(_income, _expend, _gainloss);
}
public function InsertData_Room(_arg1:MovieClip, _arg2:Object, _arg3:String):void{
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
var _local4:Object = _arg2.Cottage;
var _local5:Object = _arg2.Lodge;
var _local6:Object;
var _local7:uint = _local4.length;
var _local8:uint = _local5.length;
descT = (descT + (("ROOMS(" + String((_local7 + _local8))) + ")"));
if (_local7 > 0){
tot_gainloss = 0;
tot_expend = 0;
tot_income = 0;
descT = (descT + (("\n#Cottages(" + String(_local7)) + ")"));
visitorT = (visitorT + "\n");
incomeT = (incomeT + "\n");
expendT = (expendT + "\n");
gainT = (gainT + "\n");
_local4.sortOn("nama_tampil");
i = 0;
while (i < _local7) {
if (isToday){
_local6 = _local4[i].ob;
} else {
_local6 = _local4[i];
};
_used = _local6.today_used;
_income = _local6.today_income;
_expend = _local6.today_expend;
_gainloss = (_income - _expend);
updateGainloss(_income, _expend, _gainloss);
tot_gainloss = (tot_gainloss + _gainloss);
tot_expend = (tot_expend + _expend);
tot_income = (tot_income + _income);
i++;
};
visitorT = (visitorT + "-");
incomeT = (incomeT + toCek(tot_income));
expendT = (expendT + toCek(tot_expend, true));
gainT = (gainT + toCek(tot_gainloss));
};
if (_local8 > 0){
tot_gainloss = 0;
tot_expend = 0;
tot_income = 0;
descT = (descT + (("\n#Lodges(" + String(_local8)) + ")"));
visitorT = (visitorT + "\n");
incomeT = (incomeT + "\n");
expendT = (expendT + "\n");
gainT = (gainT + "\n");
_local5.sortOn("nama_tampil");
i = 0;
while (i < _local8) {
if (isToday){
_local6 = _local5[i].ob;
} else {
_local6 = _local5[i];
};
_used = _local6.today_used;
_income = _local6.today_income;
_expend = _local6.today_expend;
_gainloss = (_income - _expend);
updateGainloss(_income, _expend, _gainloss);
tot_gainloss = (tot_gainloss + _gainloss);
tot_expend = (tot_expend + _expend);
tot_income = (tot_income + _income);
i++;
};
visitorT = (visitorT + "-");
incomeT = (incomeT + toCek(tot_income));
expendT = (expendT + toCek(tot_expend, true));
gainT = (gainT + toCek(tot_gainloss));
};
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
_local6 = null;
_local4 = null;
_local5 = null;
}
public function InsertData_Facility(_arg1:MovieClip, _arg2:Object, _arg3:String):void{
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
var _local4:uint = _arg2.length;
var _local5:Object;
descT = (descT + (("FACILITIES(" + String(_local4)) + ")"));
_arg2.sortOn("nama_tampil");
i = 0;
while (i < _local4) {
if (isToday){
_local5 = _arg2[i].ob;
} else {
_local5 = _arg2[i];
};
_used = _local5.today_used;
_income = _local5.today_income;
descT = (descT + ("\n -" + _local5.nama_tampil));
visitorT = (visitorT + ("\n" + _used));
incomeT = (incomeT + ("\n" + toCek(_income)));
_expend = _local5.today_expend;
if (((main.onEndDay) || (!(isToday)))){
_expend = (_expend + _local5.daily_gaji);
};
expendT = (expendT + ("\n" + toCek(_expend, true)));
_gainloss = (_income - _expend);
gainT = (gainT + ("\n" + toCek(_gainloss)));
updateGainloss(_income, _expend, _gainloss);
i++;
};
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
_local5 = null;
}
public function InsertData_JanitorRoom(_arg1:MovieClip, _arg2:Object, _arg3:String):void{
var _local7:uint;
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
var _local4:uint = _arg2.length;
var _local5:Object;
var _local6:Object;
descT = (descT + (("JANITOR'S ROOMS(" + String(_local4)) + ")"));
_expend = 0;
_gainloss = 0;
i = 0;
while (i < _local4) {
if (isToday){
_local5 = _arg2[i].ob;
} else {
_local5 = _arg2[i];
};
descT = (descT + ("\n>" + _local5.nama_tampil));
visitorT = (visitorT + "\n-");
incomeT = (incomeT + "\n-");
_expend = _local5.today_expend;
expendT = (expendT + ("\n" + toCek(_expend, true)));
_gainloss = (0 - _expend);
gainT = (gainT + ("\n" + toCek(_gainloss)));
updateGainloss(0, _expend, _gainloss);
_local7 = _local5.myJanitor.length;
j = 0;
while (j < _local7) {
_local6 = _local5.myJanitor[j];
descT = (descT + ("\n -" + _local6.nama_tampil));
visitorT = (visitorT + "\n-");
incomeT = (incomeT + "\n-");
_expend = _local6.today_expend;
if (((main.onEndDay) || ((isToday == false)))){
_expend = (_expend + _local6.daily_gaji);
};
expendT = (expendT + ("\n" + toCek(_expend, true)));
_gainloss = (0 - _expend);
gainT = (gainT + ("\n" + toCek(_gainloss)));
updateGainloss(0, _expend, _gainloss);
j++;
};
i++;
};
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
_local5 = null;
_local6 = null;
}
public function InsertData_Bonus(_arg1:MovieClip, _arg2:String):void{
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
_income = ambilDataGame("MISC", "Bonus");
_gainloss = _income;
descT = (descT + "BONUS");
visitorT = (visitorT + "-");
incomeT = (incomeT + toCek(_income));
expendT = (expendT + "-");
gainT = (gainT + toCek(_gainloss));
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
updateGainloss(_income, 0, _gainloss);
}
public function InsertData_Extra(_arg1:MovieClip):void{
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
_expend = ambilDataGame("MISC", "Extra");
_gainloss = (0 - _expend);
descT = (descT + "RESORT UPGRADE");
visitorT = (visitorT + "-");
incomeT = (incomeT + "-");
expendT = (expendT + toCek(_expend, true));
gainT = (gainT + toCek(_gainloss));
updateGainloss(0, _expend, _gainloss);
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
}
public function InsertData_Expand(_arg1:MovieClip):void{
descT = "";
visitorT = "";
incomeT = "";
expendT = "";
gainT = "";
_expend = ambilDataGame("MISC", "Expand");
_gainloss = (0 - _expend);
descT = (descT + "EXPAND AREA");
visitorT = (visitorT + "-");
incomeT = (incomeT + "-");
expendT = (expendT + toCek(_expend, true));
gainT = (gainT + toCek(_gainloss));
updateGainloss(0, _expend, _gainloss);
_arg1.isi_data(descT, visitorT, incomeT, expendT, gainT);
}
public function ambilDataGame(_arg1:String, _arg2:String){
return (gameData[_arg1][_arg2]);
}
public function ambilDataGameRecord(_arg1:String, _arg2:String){
return (main.gameRecord[_arg1][_arg2]);
}
public function toCek(_arg1:int, _arg2:Boolean=false):String{
var _local3:String;
var _local4:String;
_local3 = "";
_local4 = "</font>";
if (_arg1 == 0){
_local3 = "<font color = '#000000'>$";
} else {
if (_arg2){
if (_arg1 == 0){
_local3 = "<font color = '#000000'>$";
} else {
_local3 = "<font color = '#FF0000'>$";
};
} else {
if (_arg1 < 0){
_local3 = "<font color = '#FF0000'>-$";
} else {
_local3 = "<font color = '#0000FF'>$";
};
};
};
_local3 = (_local3 + (Math.abs(_arg1) + _local4));
return (_local3);
}
public function changeColor(_arg1:String, _arg2:String="0x000000"):String{
var _local3:String;
var _local4:String;
_local3 = "";
_local4 = "</font>";
if (_arg1 == ""){
} else {
_local3 = "<font color = '0x006600'>";
};
_local3 = (_local3 + (_arg1 + _local4));
return (_local3);
}
public function toBold(_arg1:String):String{
_arg1 = (("<b>" + _arg1) + "</b>");
return (_arg1);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 290
//tab_cottage_692 (ResortEmpire_fla.tab_cottage_692)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_cottage_692 extends MovieClip {
public function tab_cottage_692(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 291
//tab_facility_682 (ResortEmpire_fla.tab_facility_682)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_facility_682 extends MovieClip {
public function tab_facility_682(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 292
//tab_janitor_695 (ResortEmpire_fla.tab_janitor_695)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_janitor_695 extends MovieClip {
public function tab_janitor_695(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 293
//tab_janitorRoom_696 (ResortEmpire_fla.tab_janitorRoom_696)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_janitorRoom_696 extends MovieClip {
public function tab_janitorRoom_696(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 294
//tab_lodge_693 (ResortEmpire_fla.tab_lodge_693)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_lodge_693 extends MovieClip {
public function tab_lodge_693(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 295
//tab_scenery_675 (ResortEmpire_fla.tab_scenery_675)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_scenery_675 extends MovieClip {
public function tab_scenery_675(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 296
//tab_visitor_701 (ResortEmpire_fla.tab_visitor_701)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_visitor_701 extends MovieClip {
public function tab_visitor_701(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 297
//tab_visitorSpecial_702 (ResortEmpire_fla.tab_visitorSpecial_702)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tab_visitorSpecial_702 extends MovieClip {
public function tab_visitorSpecial_702(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 298
//tabD_employee_694 (ResortEmpire_fla.tabD_employee_694)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class tabD_employee_694 extends MovieClip {
public var btn_close:SimpleButton;
public var note_room_5:MovieClip;
public var note_8:MovieClip;
public var note_room_4:MovieClip;
public var note_room_7:MovieClip;
public var tab_janitor:MovieClip;
public var page_t:TextField;
public var note_room_6:MovieClip;
public var note_room_1:MovieClip;
public var btn_bg:MovieClip;
public var gelip:MovieClip;
public var btn_prev:SimpleButton;
public var note_room_3:MovieClip;
public var note_room_2:MovieClip;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var note_2:MovieClip;
public var box_over:MovieClip;
public var note_3:MovieClip;
public var tab_janitorRoom:MovieClip;
public var note_4:MovieClip;
public var note_room_8:MovieClip;
public var note_5:MovieClip;
public var note_6:MovieClip;
public var note_7:MovieClip;
public var main;
public var _data;
public var _select:Object;
public var note:Array;
public var _jenis:String;
public var k:uint;
public var _file:uint;
public var _max_file:uint;
public var _page:uint;
public var _totalPage:uint;
public var clip:MovieClip;
public var _hide;
public var _open:String;
public function tabD_employee_694(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:String;
main = _arg1;
tab_janitorRoom.buttonMode = true;
tab_janitor.buttonMode = true;
btn_bg.buttonMode = true;
_file = 0;
_max_file = 0;
_page = 0;
_totalPage = 0;
note = [];
gelip.hiding();
k = 0;
while (k < 8) {
_local2 = ("note_" + String((k + 1)));
note[_local2] = true;
clip = (this[_local2] as MovieClip);
clip.init();
clip = (this[("note_room_" + String((k + 1)))] as MovieClip);
clip.init();
k++;
};
clip = null;
closing();
}
public function callDefault():void{
box_over.hiding();
_page = 1;
selectJenis();
onSelected(tab_janitor, false);
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
catchData();
} else {
_arg1.gotoAndStop(1);
};
}
public function catchData():void{
_totalPage = Math.ceil((_data.length / 8));
if (_totalPage == 0){
_page = 0;
} else {
_page = 1;
};
prevNextData();
}
public function catchData_update():void{
_totalPage = Math.ceil((_data.length / 8));
if (_totalPage == 0){
_page = 0;
} else {
if ((_page - 1) == _totalPage){
_page = _totalPage;
};
};
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:String;
var _local4:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
gelip.showing();
};
if (_page > 1){
btn_prev.visible = true;
} else {
btn_prev.visible = false;
};
if (_page < _totalPage){
btn_next.visible = true;
} else {
btn_next.visible = false;
};
page_t.text = ((_page + "/") + String(_totalPage));
if (_jenis == "JanitorRoom"){
_hide = "note_";
_open = "note_room_";
} else {
_hide = "note_room_";
_open = "note_";
};
k = 0;
while (k < 8) {
_local3 = (_hide + String((k + 1)));
clip = (this.getChildByName(_local3) as MovieClip);
clip.hiding();
k++;
};
if (_totalPage > 0){
_max_file = (_page * 8);
_file = (_max_file - 8);
if (_max_file > _data.length){
_max_file = _data.length;
};
k = 0;
while (k < 8) {
_local3 = (_open + String((k + 1)));
clip = (this.getChildByName(_local3) as MovieClip);
_local4 = (_max_file % 8);
if ((((_local4 == 0)) || ((k < _local4)))){
clip.isi(_data[(_file + k)].ob);
} else {
clip.hiding();
};
k++;
};
} else {
k = 0;
while (k < 8) {
_local3 = (_open + String((k + 1)));
clip = (this.getChildByName(_local3) as MovieClip);
clip.hiding();
k++;
};
};
clip = null;
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
var _local3:String = _local2.name;
var _local4:Object = _local2.parent;
if ((((_local3 == "tab_janitor")) || ((_local3 == "tab_janitorRoom")))){
if (_select == _local2){
} else {
if (_select == null){
selectJenis(_local2);
onSelected(_select);
} else {
onSelected(_select, false);
selectJenis(_local2);
onSelected(_select);
};
TweenMax.killTweensOf(this, true);
this.alpha = 0.5;
TweenMax.to(this, 0.5, {alpha:1});
main.PlaySound("glick");
};
} else {
if (_local3 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local3 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if (_local3 == "btn_upgrade"){
upgradeTarget(_local4);
_local4.gelip.showing();
} else {
if (_local3 == "btn_destroy"){
main.PlaySound("destroy1");
destroyTarget(_local4);
} else {
if (_local3 == "btn_promote"){
promoteTarget(_local4);
_local4.gelip.showing();
} else {
if (_local3 == "btn_fire"){
main.PlaySound("fired");
destroyTarget(_local4);
} else {
if ((((_local3 == "btn_close")) || ((_local3 == "btn_bg")))){
main.IfSedangGuide(false);
main.PlaySound("click3");
main.blackD2.visible = false;
closing();
} else {
if ((((_local3 == "pic")) || ((_local3 == "mood")))){
main.PlaySound("zip");
gotoTarget(_local4);
} else {
if (note[_local3]){
main.PlaySound("zip");
gotoTarget(_local2);
};
};
};
};
};
};
};
};
};
};
_local2 = null;
_local4 = null;
}
public function gotoTarget(_arg1):void{
var _local2:* = _arg1.dataOb;
if (_local2 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_local2);
_local2.acceptGoToTarget();
};
_local2 = null;
}
public function upgradeTarget(_arg1):void{
if (((!((_arg1.dataOb == null))) && (_arg1.dataOb.upgrade()))){
main.PlaySound("upgrade");
_arg1.updateData();
};
}
public function destroyTarget(_arg1):void{
if (_arg1.dataOb != null){
_arg1.dataOb.destroy();
catchData();
};
}
public function promoteTarget(_arg1):void{
if (((!((_arg1.dataOb == null))) && (_arg1.dataOb.promote()))){
_arg1.updateData();
};
}
public function overThis(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
var _local3:Object = _local2.parent;
var _local4:String = _local2.name;
if (_local4 == "mood"){
main.balonD.isi(_local3.smiley);
box_over.showing(_local3);
} else {
if (_local4 == "pic"){
box_over.showing(_local3);
main.balonD.isi("Click to go to target");
} else {
if (_local4 == "act"){
box_over.showing(_local3);
if (_local3.rest){
main.balonD.isi("sleeping/rest");
} else {
main.balonD.isi("sleepy/tired");
};
} else {
if (_local4 == "clip_emp"){
box_over.showing(_local3);
main.balonD.isi("Total employee in this booth");
} else {
if (_local4 == "btn_destroy"){
main.balonD.isi("It also fire all janitor in this booth");
} else {
if (_local4 == "btn_upgrade"){
main.balonD.isi(_local3.desc_up);
} else {
if (note[_local4]){
box_over.showing(_local2);
main.balonD.isi("Click to go to target");
} else {
box_over.hiding();
main.balonD.hiding();
};
};
};
};
};
};
};
_local3 = null;
_local2 = null;
}
public function selectJenis(_arg1:Object=null):void{
if (_arg1 == null){
_select = null;
_jenis = "";
} else {
_select = _arg1;
switch (_select){
case tab_janitorRoom:
_jenis = "JanitorRoom";
_data = main.game.objects.JanitorRoom;
break;
case tab_janitor:
_jenis = "janitors";
_data = main.game.janitors;
break;
default:
trace("Out of range");
break;
};
};
}
public function closing():void{
this.visible = false;
callDefault();
removeListeners();
main.navigator1._selectOnDefault(true);
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
k = 1;
while (k < 9) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
clip = (this[("note_room_" + k)] as MovieClip);
clip.hiding();
k++;
};
main = null;
_select = null;
clip = null;
_data = null;
note = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
main.blackD2.visible = true;
selectJenis(tab_janitorRoom);
onSelected(_select);
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 299
//tabD_facility_681 (ResortEmpire_fla.tabD_facility_681)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class tabD_facility_681 extends MovieClip {
public var btn_close:SimpleButton;
public var page_t:TextField;
public var btn_bg:MovieClip;
public var gelip:MovieClip;
public var btn_prev:SimpleButton;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var note_2:MovieClip;
public var box_over:MovieClip;
public var note_3:MovieClip;
public var tab_facility:MovieClip;
public var note_4:MovieClip;
public var note_5:MovieClip;
public var note_6:MovieClip;
public var main;
public var _reference:Array;
public var _select:Object;
public var _jenis:String;
public var k:uint;
public var _file:uint;
public var _max_file:uint;
public var _page:uint;
public var _totalPage:uint;
public var clip:MovieClip;
public var onfocus:MovieClip;
public function tabD_facility_681(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:String;
main = _arg1;
tab_facility.buttonMode = true;
btn_bg.buttonMode = true;
onfocus = null;
gelip.hiding();
_file = 0;
_max_file = 0;
_page = 0;
_totalPage = 0;
k = 0;
while (k < 6) {
_local2 = ("note_" + String((k + 1)));
clip = (this[_local2] as MovieClip);
clip.init();
k++;
};
closing();
}
public function callDefault():void{
if (onfocus != null){
onfocus.defaultOnEdit();
};
box_over.hiding();
_page = 1;
selectJenis();
onSelected(tab_facility, false);
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
catchData();
} else {
_arg1.gotoAndStop(1);
};
}
public function catchData():void{
_reference = main.game.objects[_jenis];
_totalPage = Math.ceil((_reference.length / 6));
if (_totalPage == 0){
_page = 0;
} else {
_page = 1;
};
prevNextData();
}
public function catchData_update():void{
_totalPage = Math.ceil((_reference.length / 6));
if (_totalPage == 0){
_page = 0;
} else {
if ((_page - 1) == _totalPage){
_page = _totalPage;
};
};
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:String;
var _local4:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
gelip.showing();
};
if (_page > 1){
btn_prev.visible = true;
} else {
btn_prev.visible = false;
};
if (_page < _totalPage){
btn_next.visible = true;
} else {
btn_next.visible = false;
};
page_t.text = ((_page + "/") + String(_totalPage));
if (_totalPage > 0){
_max_file = (_page * 6);
_file = (_max_file - 6);
if (_max_file > _reference.length){
_max_file = _reference.length;
};
k = 0;
while (k < 6) {
_local3 = ("note_" + String((k + 1)));
clip = (this[_local3] as MovieClip);
_local4 = (_max_file % 6);
if ((((_local4 == 0)) || ((k < _local4)))){
clip.isi(_reference[(_file + k)].ob);
} else {
clip.hiding();
};
k++;
};
} else {
k = 1;
while (k < 7) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
};
clip = null;
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
var _local4:* = _local2.parent;
if (_local3 == "name_t"){
if (onfocus != _local4){
if (onfocus != null){
onfocus.defaultOnEdit();
};
onfocus = _local4;
onfocus.onEdit();
};
} else {
if (onfocus != null){
onfocus.defaultOnEdit();
};
if (_local3 == "tab_facility"){
if (_select == _local2){
} else {
if (_select == null){
selectJenis(_local2);
onSelected(_select);
} else {
onSelected(_select, false);
selectJenis(_local2);
onSelected(_select);
};
main.PlaySound("glick");
};
} else {
if (_local3 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local3 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if (_local3 == "btn_upgrade"){
upgradeTarget(_local4);
_local4.gelip.showing();
} else {
if (_local3 == "btn_destroy"){
main.PlaySound("destroy1");
destroyTarget(_local4);
} else {
if ((((_local3 == "btn_close")) || ((_local3 == "btn_bg")))){
main.IfSedangGuide(false);
main.PlaySound("click3");
main.blackD2.visible = false;
closing();
} else {
if ((((((_local3 == "pic")) || ((_local3 == "onbutt")))) || ((_local4.name == "pic")))){
main.PlaySound("zip");
if (_local2.name == "btn"){
gotoTarget(_local4.parent);
} else {
gotoTarget(_local4);
};
};
};
};
};
};
};
};
};
_local2 = null;
_local4 = null;
}
public function overThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:* = _local2.parent;
var _local4:String = _local2.name;
if ((((_local4 == "bar_exp")) || ((_local4 == "bg_exp")))){
if (_local3.bar_exp.visible){
main.balonD.isi("Experience");
} else {
main.balonD.isi("Don't have experience");
};
} else {
if ((((_local4 == "pic")) || ((((_local4 == "onbutt")) || ((_local3.name == "pic")))))){
if (_local4 == "btn"){
box_over.showing(_local3.parent, 2);
} else {
box_over.showing(_local3, 2);
};
main.balonD.isi("Click to go to target");
} else {
box_over.hiding();
if (_local4 == "visitor"){
main.balonD.isi("On used");
} else {
if (_local4 == "name_t"){
main.balonD.isi("Click to change name");
} else {
if (_local4 == "btn_upgrade"){
main.balonD.isi(("Upgrade: $" + _local3["dataOb"].up_price));
} else {
main.balonD.visible = false;
};
};
};
};
};
_local2 = null;
_local3 = null;
}
public function gotoTarget(_arg1):void{
var _local2:* = _arg1.dataOb;
if (_local2 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_local2);
_local2.acceptGoToTarget();
};
_local2 = null;
}
public function upgradeTarget(_arg1):void{
if (_arg1.dataOb != null){
if (_arg1.dataOb.upgrade()){
_arg1.updateData();
main.navigator1.checkMoreUpgrade("Facility");
};
};
}
public function destroyTarget(_arg1):void{
if (_arg1.dataOb != null){
if (_arg1.dataOb.canUpgrade){
main.navigator1.checkMoreUpgrade("Facility");
};
_arg1.dataOb.destroy();
catchData_update();
};
}
public function selectJenis(_arg1:Object=null):void{
if (_arg1 == null){
_select = null;
_jenis = "";
} else {
_select = _arg1;
switch (_select){
case tab_facility:
_jenis = "Facility";
break;
default:
trace("Out of range");
break;
};
};
}
public function closing():void{
this.visible = false;
callDefault();
removeListeners();
main.navigator1._selectOnDefault(true);
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
k = 1;
while (k < 7) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
main = null;
_select = null;
clip = null;
onfocus = null;
_reference = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
selectJenis(tab_facility);
onSelected(_select);
main.blackD2.visible = true;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 300
//tabD_room_691 (ResortEmpire_fla.tabD_room_691)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class tabD_room_691 extends MovieClip {
public var btn_close:SimpleButton;
public var page_t:TextField;
public var tab_cottage:MovieClip;
public var btn_bg:MovieClip;
public var gelip:MovieClip;
public var btn_prev:SimpleButton;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var note_2:MovieClip;
public var box_over:MovieClip;
public var note_3:MovieClip;
public var tab_lodge:MovieClip;
public var note_4:MovieClip;
public var note_5:MovieClip;
public var note_6:MovieClip;
public var main;
public var _reference:Array;
public var _select:Object;
public var _jenis:String;
public var str:String;
public var k:uint;
public var _file:uint;
public var _max_file:uint;
public var _page:uint;
public var _totalPage:uint;
public var clip:MovieClip;
public var onfocus:MovieClip;
public function tabD_room_691(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
tab_cottage.buttonMode = true;
tab_lodge.buttonMode = true;
btn_bg.buttonMode = true;
onfocus = null;
gelip.hiding();
_file = 0;
_max_file = 0;
_page = 0;
_totalPage = 0;
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
clip = (this[str] as MovieClip);
clip.init();
k++;
};
clip = null;
closing();
}
public function callDefault():void{
if (onfocus != null){
onfocus.defaultOnEdit();
};
box_over.hiding();
_page = 1;
selectJenis();
onSelected(tab_lodge, false);
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
catchData();
} else {
_arg1.gotoAndStop(1);
};
}
public function catchData():void{
_reference = main.game.objects[_jenis];
_totalPage = Math.ceil((_reference.length / 6));
if (_totalPage == 0){
_page = 0;
} else {
_page = 1;
};
prevNextData();
}
public function catchData_update():void{
_totalPage = Math.ceil((_reference.length / 6));
_page = ((_totalPage)==0) ? 0 : (((_page - 1))==_totalPage) ? _totalPage : _page;
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
gelip.showing();
};
btn_prev.visible = ((_page)>1) ? true : false;
btn_next.visible = ((_page)<_totalPage) ? true : false;
page_t.text = ((_page + "/") + String(_totalPage));
if (_totalPage > 0){
_max_file = (_page * 6);
_file = (_max_file - 6);
if (_max_file > _reference.length){
_max_file = _reference.length;
};
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
clip = (this.getChildByName(str) as MovieClip);
_local3 = (_max_file % 6);
if ((((_local3 == 0)) || ((k < _local3)))){
clip.isi(_reference[(_file + k)].ob);
} else {
clip.hiding();
};
k++;
};
} else {
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
clip = (this.getChildByName(str) as MovieClip);
clip.hiding();
k++;
};
};
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
var _local4:* = _local2.parent;
if (_local3 == "name_t"){
if (onfocus != _local4){
if (onfocus != null){
onfocus.defaultOnEdit();
};
onfocus = _local4;
onfocus.onEdit();
};
} else {
if (onfocus != null){
onfocus.defaultOnEdit();
};
if ((((_local2 == tab_cottage)) || ((_local2 == tab_lodge)))){
if (_select == _local2){
} else {
if (_select == null){
selectJenis(_local2);
onSelected(_select);
} else {
onSelected(_select, false);
selectJenis(_local2);
onSelected(_select);
};
main.PlaySound("glick");
TweenMax.killTweensOf(this, true);
this.alpha = 0.75;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
};
} else {
if (_local3 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local3 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if ((((_local3 == "btn_close")) || ((_local3 == "btn_bg")))){
main.IfSedangGuide(false);
main.PlaySound("click3");
main.blackD2.visible = false;
closing();
} else {
if (_local3 == "btn_upgrade"){
upgradeTarget(_local4);
_local4.gelip.showing();
} else {
if (_local3 == "btn_destroy"){
main.PlaySound("destroy1");
destroyTarget(_local4);
} else {
if ((((_local3 == "pic")) || ((((_local3 == "onbutt")) || ((_local4.name == "pic")))))){
main.PlaySound("zip");
if (_local3 == "btn"){
gotoTarget(_local4.parent);
} else {
gotoTarget(_local4);
};
};
};
};
};
};
};
};
};
_local2 = null;
_local4 = null;
}
public function overThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if ((((_local2 == "bar_exp")) || ((_local2 == "exp")))){
main.balonD.isi("Experience");
} else {
if ((((_local2 == "pic")) || ((((_local2 == "onbutt")) || ((_arg1.target.parent.name == "pic")))))){
if (_local2 == "btn"){
box_over.showing(_arg1.target.parent.parent, 2);
} else {
box_over.showing(_arg1.target.parent, 2);
};
main.balonD.isi("Click to go to target");
} else {
box_over.hiding();
if (_local2 == "visitor"){
main.balonD.isi("On used");
} else {
if (_local2 == "name_t"){
main.balonD.isi("Click to change name");
} else {
if (_local2 == "btn_upgrade"){
main.balonD.isi(("Upgrade: $" + _arg1.target.parent["dataOb"].up_price));
} else {
main.balonD.visible = false;
};
};
};
};
};
}
public function gotoTarget(_arg1):void{
var _local2:* = _arg1.dataOb;
if (_local2 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_local2);
_local2.acceptGoToTarget();
};
_local2 = null;
}
public function upgradeTarget(_arg1):void{
if (_arg1.dataOb != null){
if (_arg1.dataOb.upgrade()){
_arg1.updateData();
main.navigator1.checkMoreUpgrade("Room");
};
};
}
public function destroyTarget(_arg1):void{
if (_arg1.dataOb != null){
if (_arg1.dataOb.canUpgrade){
main.navigator1.checkMoreUpgrade("Room");
};
_arg1.dataOb.destroy();
catchData_update();
};
}
public function selectJenis(_arg1:Object=null):void{
if (_arg1 == null){
_select = null;
_jenis = "";
} else {
_select = _arg1;
switch (_select){
case tab_cottage:
_jenis = "Cottage";
break;
case tab_lodge:
_jenis = "Lodge";
break;
default:
trace("Out of range");
break;
};
};
}
public function closing():void{
this.visible = false;
callDefault();
removeListeners();
main.navigator1._selectOnDefault(true);
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function opened():void{
selectJenis(tab_cottage);
onSelected(_select);
main.blackD2.visible = true;
TweenMax.killTweensOf(this, true);
this.alpha = 0;
this.visible = true;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.MOUSE_OVER, overThis);
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
k = 0;
while (k < 6) {
str = ("note_" + String((k + 1)));
clip = (this.getChildByName(str) as MovieClip);
clip.hiding();
k++;
};
main = null;
_select = null;
clip = null;
onfocus = null;
_reference = null;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 301
//tabD_visitor_700 (ResortEmpire_fla.tabD_visitor_700)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class tabD_visitor_700 extends MovieClip {
public var btn_close:SimpleButton;
public var note_8:MovieClip;
public var page_t:TextField;
public var btn_bg:MovieClip;
public var gelip:MovieClip;
public var btn_prev:SimpleButton;
public var tab_visitorSpecial:MovieClip;
public var btn_next:SimpleButton;
public var note_1:MovieClip;
public var note_2:MovieClip;
public var box_over:MovieClip;
public var note_3:MovieClip;
public var note_4:MovieClip;
public var note_5:MovieClip;
public var note_6:MovieClip;
public var tab_visitor:MovieClip;
public var note_7:MovieClip;
public var main;
public var _select:Object;
public var _dataOb:Object;
public var note:Array;
public var _jenis:String;
public var k:uint;
public var _file:uint;
public var _max_file:uint;
public var _page:uint;
public var _totalPage:uint;
public var _sum_subfile:uint;
public var clip:MovieClip;
public var tmp:MovieClip;
public function tabD_visitor_700(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
var _local2:String;
main = _arg1;
tab_visitor.buttonMode = true;
tab_visitorSpecial.buttonMode = true;
btn_bg.buttonMode = true;
gelip.hiding();
note = [];
k = 1;
while (k < 9) {
_local2 = ("note_" + k);
note[_local2] = true;
clip = (this.getChildByName(_local2) as MovieClip);
clip.init();
k++;
};
clip = null;
closing();
}
public function callDefault():void{
_file = 0;
_max_file = 0;
_page = 0;
_totalPage = 0;
_sum_subfile = 0;
clip = null;
tmp = null;
_dataOb = null;
_select = null;
box_over.hiding();
_page = 1;
selectJenis();
onSelected(tab_visitorSpecial, false);
}
public function onSelected(_arg1, _arg2:Boolean=true):void{
if (_arg2){
_arg1.gotoAndStop(2);
catchData();
} else {
_arg1.gotoAndStop(1);
};
}
public function catchData():void{
if (_jenis == "visitors"){
_dataOb = main.game.visitors_insideResort;
} else {
_dataOb = main.game.visitorsSpecial_insideResort;
};
_sum_subfile = _dataOb.length;
_totalPage = Math.ceil((_sum_subfile / 8));
if (_totalPage == 0){
_page = 0;
} else {
_page = 1;
};
prevNextData();
}
public function prevNextData(_arg1:Boolean=false, _arg2:Boolean=false):void{
var _local3:uint;
if (_arg1){
if (_page > 1){
_page--;
};
} else {
if (_arg2){
if (_page < _totalPage){
_page++;
};
};
};
if (((_arg1) || (_arg2))){
gelip.showing();
};
if (_page > 1){
btn_prev.visible = true;
} else {
btn_prev.visible = false;
};
if (_page < _totalPage){
btn_next.visible = true;
} else {
btn_next.visible = false;
};
page_t.text = ((_page + "/") + String(_totalPage));
if (_totalPage > 0){
_max_file = (_page * 8);
_file = (_max_file - 8);
if (_max_file > _sum_subfile){
_max_file = _sum_subfile;
};
k = 0;
while (k < 8) {
clip = (this[("note_" + (k + 1))] as MovieClip);
_local3 = (_max_file % 8);
if ((((_local3 == 0)) || ((k < _local3)))){
clip.isi(_dataOb[(_file + k)]);
} else {
clip.hiding();
};
k++;
};
} else {
k = 1;
while (k < 9) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
};
clip = null;
}
public function forceClose():void{
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
if ((((_local3 == "tab_visitor")) || ((_local3 == "tab_visitorSpecial")))){
if (_select == _local2){
} else {
if (_select == null){
selectJenis(_local2);
onSelected(_select);
} else {
onSelected(_select, false);
selectJenis(_local2);
onSelected(_select);
};
TweenMax.killTweensOf(this, true);
this.alpha = 0.5;
TweenMax.to(this, 0.5, {alpha:1});
main.PlaySound("glick");
};
} else {
if (_local3 == "btn_prev"){
main.PlaySound("glick");
prevNextData(true);
} else {
if (_local3 == "btn_next"){
main.PlaySound("glick");
prevNextData(false, true);
} else {
if ((((_local3 == "btn_close")) || ((_local3 == "btn_bg")))){
main.IfSedangGuide(false);
main.PlaySound("click3");
main.blackD2.visible = false;
closing();
} else {
if (_local3 == "btn"){
tmp = (_local2.parent as MovieClip);
main.PlaySound("zip");
gotoPlace(tmp.parent[tmp.name.replace("_pic", "")]);
} else {
if ((((_local3 == "pic")) || ((((_local3 == "mood")) || ((_local3 == "money_t")))))){
main.PlaySound("zip");
gotoTarget(_local2.parent);
} else {
if (note[_local3]){
main.PlaySound("zip");
gotoTarget(_local2);
};
};
};
};
};
};
};
_local2 = null;
}
public function gotoPlace(_arg1):void{
if (_arg1 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_arg1);
if (_arg1.akuRoom){
if (main.game.RP_khusus.goto_visitor_room == 0){
main.game.RP_khusus.goto_visitor_room = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
} else {
if (main.game.RP_khusus.goto_visitor_facility == 0){
main.game.RP_khusus.goto_visitor_facility = 1;
main.game.totalRP.Khusus++;
main.hitungTotalRP(false, 1);
};
};
};
}
public function gotoTarget(_arg1):void{
var _local2:* = _arg1.dataOb;
if (_local2 != null){
closing();
main.blackD2.visible = false;
main.gotoTarget(_local2);
_local2.acceptGoToTarget();
};
_local2 = null;
}
public function overThis(_arg1:MouseEvent):void{
var _local2:* = _arg1.target;
var _local3:String = _local2.name;
if (_local3 == "mood"){
tmp = (_local2.parent as MovieClip);
main.balonD.isi(tmp.dataOb.REF.smiley[tmp.dataOb.smiley].nama);
box_over.showing(tmp, 5, 6);
} else {
if (_local3 == "money_t"){
tmp = (_local2 as MovieClip);
box_over.showing(_local2.parent, 5, 6);
main.balonD.isi((_local2.parent["dataOb"].gender + " money"));
} else {
if (_local3 == "pic"){
tmp = (_local2.parent as MovieClip);
main.balonD.isi(tmp.dataOb.nama_tampil);
box_over.showing(tmp, 5, 6);
} else {
if (_local3 == "act"){
tmp = (_local2.parent as MovieClip);
main.balonD.isi("sleeping/rest");
box_over.showing(tmp, 5, 6);
} else {
if (_local3 == "btn"){
box_over.hiding();
tmp = (_local2.parent as MovieClip);
main.balonD.isi(((("Click to go to " + tmp.parent["dataOb"].gender) + " ") + tmp.parent[tmp.name.replace("_pic", "")].jenis));
} else {
if (note[_local3]){
box_over.showing(_arg1.target, 5, 6);
main.balonD.isi("Click to go to visitor");
} else {
box_over.hiding();
main.balonD.hiding();
};
};
};
};
};
};
_local2 = null;
tmp = null;
}
public function selectJenis(_arg1:Object=null):void{
if (_arg1 == null){
_select = null;
_jenis = "";
} else {
_select = _arg1;
switch (_select){
case tab_visitor:
_jenis = "visitors";
break;
case tab_visitorSpecial:
_jenis = "visitorsSpecial";
break;
default:
trace("Out of range");
break;
};
};
}
public function closing():void{
this.visible = false;
callDefault();
removeListeners();
main.navigator1._selectOnDefault(true);
}
public function removeListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
this.removeEventListener(MouseEvent.MOUSE_OVER, overThis);
}
public function removingAll():void{
removeListeners();
TweenMax.killTweensOf(this);
k = 1;
while (k < 9) {
clip = (this[("note_" + k)] as MovieClip);
clip.hiding();
k++;
};
main = null;
_select = null;
clip = null;
tmp = null;
_dataOb = null;
note = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
selectJenis(tab_visitor);
onSelected(_select);
main.blackD2.visible = true;
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.5, {alpha:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.MOUSE_OVER, overThis, false, 0, true);
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 302
//tutup_498 (ResortEmpire_fla.tutup_498)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class tutup_498 extends MovieClip {
public function tutup_498(){
addFrameScript(0, frame1, 12, frame13, 24, frame25, 36, frame37, 48, frame49);
}
public function hiding():void{
this.visible = false;
gotoAndStop("stand");
}
public function showing():void{
this.visible = true;
gotoAndPlay("anim");
}
public function showing2(_arg1:String):void{
this.visible = true;
gotoAndPlay(_arg1);
}
function frame1(){
stop();
}
function frame13(){
stop();
hiding();
}
function frame25(){
stop();
}
function frame37(){
stop();
}
function frame49(){
stop();
}
}
}//package ResortEmpire_fla
Section 303
//UI_WarningDestroy_desc_603 (ResortEmpire_fla.UI_WarningDestroy_desc_603)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class UI_WarningDestroy_desc_603 extends MovieClip {
public var icon_booth:MovieClip;
public var desc_t:TextField;
public function UI_WarningDestroy_desc_603(){
addFrameScript(0, frame1);
}
public function isi(_arg1=null):void{
icon_booth.gotoAndStop(_arg1.jenis);
var _local2:String = (((((((("Name : " + _arg1.nama_tampil) + "\nType : ") + _arg1.REF.mainJenis) + "(") + _arg1.jenis) + ")") + "\nLevel : ") + _arg1.level_);
desc_t.text = _local2;
this.visible = true;
}
public function hiding():void{
this.visible = false;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 304
//UpdateVersionD_467 (ResortEmpire_fla.UpdateVersionD_467)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class UpdateVersionD_467 extends MovieClip {
public var update_t:TextField;
public var btn_ok:SimpleButton;
public var old_t:TextField;
public var blackD:MovieClip;
public var main;
public function UpdateVersionD_467(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
update_t.mouseEnabled = false;
old_t.mouseEnabled = false;
main = _arg1;
hiding();
}
public function hiding():void{
visible = false;
removingListeners();
}
public function showing(_arg1:String, _arg2:String):void{
update_t.text = ("UPDATE VERSION " + _arg1);
old_t.text = ("Your version is " + _arg2);
TweenMax.killTweensOf(this, true);
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Cubic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function clickFunction(_arg1:MouseEvent):void{
main.updateVersion();
hiding();
}
public function removingListeners():void{
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
removingListeners();
main = null;
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 305
//uplevelD_794 (ResortEmpire_fla.uplevelD_794)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class uplevelD_794 extends MovieClip {
public var btn_ok:SimpleButton;
public var level_t:TextField;
public var maxt:MovieClip;
public var bonus_t:TextField;
public var main;
public var bonusLevel:uint;
public var bonusRP:uint;
public function uplevelD_794(){
addFrameScript(0, frame1);
}
public function init():void{
bonus_t.mouseEnabled = false;
level_t.mouseEnabled = false;
hiding();
}
public function closing():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:onCompleteClosed});
}
public function hiding():void{
this.visible = false;
this.x = -110;
btn_ok.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
TweenMax.killTweensOf(this, true);
btn_ok.removeEventListener(MouseEvent.CLICK, clickFunction);
main = null;
}
public function showing(_arg1:uint, _arg2=null, _arg3:uint=0, _arg4:uint=0):void{
level_t.text = String(_arg1);
if (main == null){
main = _arg2;
};
bonusLevel = _arg3;
bonusRP = _arg4;
bonus_t.text = ((("RP +" + bonusRP) + "\n+ $") + bonusLevel);
if (_arg1 == 11){
maxt.visible = true;
} else {
maxt.visible = false;
};
TweenMax.killTweensOf(this, true);
main.PlaySound("cling");
scaleX = 0;
scaleY = 0;
x = 110;
this.visible = true;
TweenMax.to(this, 0.5, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
btn_ok.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function clickFunction(_arg1:Event):void{
main.PlaySound("click2");
closing();
}
public function onCompleteOpen():void{
}
public function onCompleteClosed():void{
hiding();
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 306
//warningDestroy_599 (ResortEmpire_fla.warningDestroy_599)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class warningDestroy_599 extends MovieClip {
public var btn_ok:SimpleButton;
public var desc:MovieClip;
public var btn_no:SimpleButton;
public var btn_yes:SimpleButton;
public var select:Boolean;
public var selectedOb;
public var posingx:Number;
public var posingy:Number;
public function warningDestroy_599(){
addFrameScript(0, frame1);
}
public function init():void{
select = false;
selectedOb = null;
posingx = 0;
posingy = 0;
this.visible = false;
desc.mouseEnabled = false;
desc.mouseChildren = false;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function removingAll():void{
this.removeEventListener(MouseEvent.CLICK, clickThis);
TweenMax.killTweensOf(this);
selectedOb = null;
}
public function selecting(_arg1):void{
TweenMax.killTweensOf(this, true);
selectedOb = _arg1;
selectedOb.selecting(true);
select = true;
if (((selectedOb.REF.standbooth) && (!((selectedOb.jenis == "JanitorRoom"))))){
callCanDestroy();
} else {
if (selectedOb.canDestroy){
callCanDestroy();
} else {
callCannotDestroy();
};
};
positioning();
this.visible = true;
this.alpha = 0;
TweenMax.to(this, 0.25, {alpha:1, ease:Cubic.easeInOut});
}
public function callCanDestroy():void{
desc.isi(selectedOb);
this.gotoAndStop("_booth");
btn_yes.visible = true;
btn_no.visible = true;
btn_ok.visible = false;
}
public function callCannotDestroy():void{
desc.isi(selectedOb);
if (selectedOb.idefault){
this.gotoAndStop("_default");
} else {
if (!selectedOb.builded){
this.gotoAndStop("_build");
} else {
this.gotoAndStop("_used");
};
};
btn_yes.visible = (btn_no.visible = false);
btn_ok.visible = true;
}
public function positioning():void{
if (posingx == 0){
this.x = (625 - this.width);
posingx = this.x;
};
if (posingy == 0){
this.y = (400 - this.height);
posingy = this.y;
};
this["parent"].cekDB_objectPos(this);
}
public function reg_positioning():void{
if (select){
positioning();
};
}
public function closing():void{
removeSelectObject();
this.visible = false;
}
public function removeSelectObject():void{
select = false;
if (selectedOb != null){
selectedOb.selecting(false);
selectedOb.removeColorSelected();
};
selectedOb = null;
}
public function acceptDestroy():void{
if (selectedOb != null){
selectedOb.destroy(false, true);
};
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if ((((_local2 == "btn_no")) || ((_local2 == "btn_ok")))){
this["parent"].PlaySound("click3");
this["parent"].warningDestroy_active(false);
} else {
if (_local2 == "btn_yes"){
this["parent"].PlaySound("destroy1");
acceptDestroy();
};
};
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 307
//warningExit_732 (ResortEmpire_fla.warningExit_732)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class warningExit_732 extends MovieClip {
public var btn_no:SimpleButton;
public var btn_yes:SimpleButton;
public var main;
public function warningExit_732(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
closed();
}
public function closed():void{
this.visible = false;
this.removeEventListener(MouseEvent.CLICK, clickThis);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
closed();
main = null;
}
public function opened():void{
TweenMax.killTweensOf(this, true);
scaleX = 0;
scaleY = 0;
this.visible = true;
TweenMax.to(this, 0.25, {scaleX:1, scaleY:1, ease:Elastic.easeInOut});
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
public function onCompleteClosed():void{
closed();
}
public function clickThis(_arg1:MouseEvent):void{
var _local2:String = _arg1.target.name;
if (_local2 == "btn_no"){
TweenMax.killTweensOf(this, true);
main.PlaySound("click3");
TweenMax.to(this, 0.25, {scaleX:0, scaleY:0, ease:Cubic.easeInOut, onComplete:onCompleteClosed});
main.menuD.visible = true;
} else {
if (_local2 == "btn_yes"){
main.PlaySound("click1");
main.menuD.closed();
closed();
main.blackD.visible = false;
main.RemoveAutoPaused();
main.BackToCover();
};
};
}
function frame1(){
}
}
}//package ResortEmpire_fla
Section 308
//vcustomer_bolaGolf_147 (ResortEmpire_fla.vcustomer_bolaGolf_147)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class vcustomer_bolaGolf_147 extends MovieClip {
public function vcustomer_bolaGolf_147(){
addFrameScript(0, frame1, 1, frame2, 97, frame98, 194, frame195, 311, frame312);
}
public function init():void{
hiding();
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime():void{
if (this.currentLabel != ("anim" + this.parent.parent.parent["level_"])){
animeAgain();
};
}
public function animeAgain(){
this.gotoAndPlay(("anim" + this.parent.parent.parent["level_"]));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame98(){
stop();
animeAgain();
}
function frame195(){
stop();
animeAgain();
}
function frame312(){
stop();
animeAgain();
}
}
}//package ResortEmpire_fla
Section 309
//vcustomer1_arcade_277 (ResortEmpire_fla.vcustomer1_arcade_277)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_arcade_277 extends MovieClip {
public var jenis:uint;
public function vcustomer1_arcade_277(){
addFrameScript(0, frame1, 1, frame2, 14, frame15, 28, frame29, 42, frame43, 56, frame57, 70, frame71, 84, frame85, 98, frame99, 112, frame113, 126, frame127, 140, frame141, 154, frame155, 168, frame169, 182, frame183, 196, frame197, 210, frame211, 224, frame225, 238, frame239, 252, frame253, 266, frame267, 280, frame281, 294, frame295, 308, frame309, 322, frame323, 336, frame337, 350, frame351, 364, frame365, 378, frame379, 392, frame393, 406, frame407, 420, frame421, 434, frame435, 448, frame449, 462, frame463, 476, frame477, 490, frame491, 504, frame505, 518, frame519, 532, frame533, 546, frame547, 560, frame561, 574, frame575, 588, frame589);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame29(){
stop();
}
function frame43(){
stop();
}
function frame57(){
stop();
}
function frame71(){
stop();
}
function frame85(){
stop();
}
function frame99(){
stop();
}
function frame113(){
stop();
}
function frame127(){
stop();
}
function frame141(){
stop();
}
function frame155(){
stop();
}
function frame169(){
stop();
}
function frame183(){
stop();
}
function frame197(){
stop();
}
function frame211(){
stop();
}
function frame225(){
stop();
}
function frame239(){
stop();
}
function frame253(){
stop();
}
function frame267(){
stop();
}
function frame281(){
stop();
}
function frame295(){
stop();
}
function frame309(){
stop();
}
function frame323(){
stop();
}
function frame337(){
stop();
}
function frame351(){
stop();
}
function frame365(){
stop();
}
function frame379(){
stop();
}
function frame393(){
stop();
}
function frame407(){
stop();
}
function frame421(){
stop();
}
function frame435(){
stop();
}
function frame449(){
stop();
}
function frame463(){
stop();
}
function frame477(){
stop();
}
function frame491(){
stop();
}
function frame505(){
stop();
}
function frame519(){
stop();
}
function frame533(){
stop();
}
function frame547(){
stop();
}
function frame561(){
stop();
}
function frame575(){
stop();
}
function frame589(){
stop();
}
}
}//package ResortEmpire_fla
Section 310
//vcustomer1_cottage_139 (ResortEmpire_fla.vcustomer1_cottage_139)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class vcustomer1_cottage_139 extends MovieClip {
public var jenis:uint;
public function vcustomer1_cottage_139(){
addFrameScript(0, frame1, 1, frame2, 14, frame15, 22, frame23, 32, frame33, 33, frame34, 45, frame46, 56, frame57, 70, frame71, 78, frame79, 88, frame89, 89, frame90, 101, frame102, 112, frame113, 126, frame127, 138, frame139, 148, frame149, 149, frame150, 161, frame162, 181, frame182, 195, frame196, 208, frame209, 218, frame219, 219, frame220, 231, frame232, 251, frame252, 265, frame266, 278, frame279, 288, frame289, 289, frame290, 301, frame302, 321, frame322, 335, frame336, 348, frame349, 358, frame359, 359, frame360, 371, frame372, 391, frame392, 405, frame406, 418, frame419, 428, frame429, 429, frame430, 441, frame442, 461, frame462, 475, frame476, 488, frame489, 498, frame499, 499, frame500, 511, frame512, 531, frame532, 545, frame546, 558, frame559, 568, frame569, 569, frame570, 581, frame582, 601, frame602, 615, frame616, 628, frame629, 638, frame639, 639, frame640, 651, frame652, 671, frame672, 685, frame686, 698, frame699, 708, frame709, 709, frame710, 721, frame722, 741, frame742, 755, frame756, 0x0300, frame769, 778, frame779, 779, frame780, 791, frame792, 811, frame812, 825, frame826, 838, frame839, 848, frame849, 849, frame850, 861, frame862, 881, frame882, 895, frame896, 908, frame909, 918, frame919, 919, frame920, 931, frame932, 951, frame952, 965, frame966, 978, frame979, 988, frame989, 989, frame990, 1001, frame1002, 1021, frame1022, 1035, frame1036, 1048, frame1049, 1058, frame1059, 1059, frame1060, 1071, frame1072, 1092, frame1093, 1106, frame1107, 1119, frame1120, 1129, frame1130, 1130, frame1131, 1142, frame1143, 1163, frame1164, 1177, frame1178, 1190, frame1191, 1200, frame1201, 1201, frame1202, 1213, frame1214, 1234, frame1235, 1248, frame1249, 1261, frame1262, 1271, frame1272, 1272, frame1273, 1284, frame1285, 1305, frame1306, 1319, frame1320, 1332, frame1333, 1342, frame1343, 1343, frame1344, 1355, frame1356, 1376, frame1377, 1390, frame1391, 1403, frame1404, 1413, frame1414, 1414, frame1415, 1426, frame1427, 1447, frame1448);
}
public function init():void{
hiding();
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function anime2(_arg1:String):void{
this.gotoAndStop(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function bukaSelimut():void{
this.parent["parent"].bukaSelimut();
}
public function pakaiSelimut():void{
this.parent["parent"].pakaiSelimut();
}
public function standby():void{
this.gotoAndStop("none");
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame23(){
stop();
}
function frame33(){
stop();
pakaiSelimut();
}
function frame34(){
bukaSelimut();
}
function frame46(){
stop();
}
function frame57(){
stop();
pakaiSelimut();
}
function frame71(){
stop();
}
function frame79(){
stop();
}
function frame89(){
stop();
pakaiSelimut();
}
function frame90(){
bukaSelimut();
}
function frame102(){
stop();
}
function frame113(){
stop();
pakaiSelimut();
}
function frame127(){
stop();
}
function frame139(){
stop();
}
function frame149(){
stop();
pakaiSelimut();
}
function frame150(){
bukaSelimut();
}
function frame162(){
stop();
}
function frame182(){
stop();
pakaiSelimut();
}
function frame196(){
stop();
}
function frame209(){
stop();
}
function frame219(){
stop();
pakaiSelimut();
}
function frame220(){
bukaSelimut();
}
function frame232(){
stop();
}
function frame252(){
stop();
pakaiSelimut();
}
function frame266(){
stop();
}
function frame279(){
stop();
}
function frame289(){
stop();
pakaiSelimut();
}
function frame290(){
bukaSelimut();
}
function frame302(){
stop();
}
function frame322(){
stop();
pakaiSelimut();
}
function frame336(){
stop();
}
function frame349(){
stop();
}
function frame359(){
stop();
pakaiSelimut();
}
function frame360(){
bukaSelimut();
}
function frame372(){
stop();
}
function frame392(){
stop();
pakaiSelimut();
}
function frame406(){
stop();
}
function frame419(){
stop();
}
function frame429(){
stop();
pakaiSelimut();
}
function frame430(){
bukaSelimut();
}
function frame442(){
stop();
}
function frame462(){
stop();
pakaiSelimut();
}
function frame476(){
stop();
}
function frame489(){
stop();
}
function frame499(){
stop();
pakaiSelimut();
}
function frame500(){
bukaSelimut();
}
function frame512(){
stop();
}
function frame532(){
stop();
pakaiSelimut();
}
function frame546(){
stop();
}
function frame559(){
stop();
}
function frame569(){
stop();
pakaiSelimut();
}
function frame570(){
bukaSelimut();
}
function frame582(){
stop();
}
function frame602(){
stop();
pakaiSelimut();
}
function frame616(){
stop();
}
function frame629(){
stop();
}
function frame639(){
stop();
pakaiSelimut();
}
function frame640(){
bukaSelimut();
}
function frame652(){
stop();
}
function frame672(){
stop();
pakaiSelimut();
}
function frame686(){
stop();
}
function frame699(){
stop();
}
function frame709(){
stop();
pakaiSelimut();
}
function frame710(){
bukaSelimut();
}
function frame722(){
stop();
}
function frame742(){
stop();
pakaiSelimut();
}
function frame756(){
stop();
}
function frame769(){
stop();
}
function frame779(){
stop();
pakaiSelimut();
}
function frame780(){
bukaSelimut();
}
function frame792(){
stop();
}
function frame812(){
stop();
pakaiSelimut();
}
function frame826(){
stop();
}
function frame839(){
stop();
}
function frame849(){
stop();
pakaiSelimut();
}
function frame850(){
bukaSelimut();
}
function frame862(){
stop();
}
function frame882(){
stop();
pakaiSelimut();
}
function frame896(){
stop();
}
function frame909(){
stop();
}
function frame919(){
stop();
pakaiSelimut();
}
function frame920(){
bukaSelimut();
}
function frame932(){
stop();
}
function frame952(){
stop();
pakaiSelimut();
}
function frame966(){
stop();
}
function frame979(){
stop();
}
function frame989(){
stop();
pakaiSelimut();
}
function frame990(){
bukaSelimut();
}
function frame1002(){
stop();
}
function frame1022(){
stop();
pakaiSelimut();
}
function frame1036(){
stop();
}
function frame1049(){
stop();
}
function frame1059(){
stop();
pakaiSelimut();
}
function frame1060(){
bukaSelimut();
}
function frame1072(){
stop();
}
function frame1093(){
stop();
pakaiSelimut();
}
function frame1107(){
stop();
}
function frame1120(){
stop();
}
function frame1130(){
stop();
pakaiSelimut();
}
function frame1131(){
bukaSelimut();
}
function frame1143(){
stop();
}
function frame1164(){
stop();
pakaiSelimut();
}
function frame1178(){
stop();
}
function frame1191(){
stop();
}
function frame1201(){
stop();
pakaiSelimut();
}
function frame1202(){
bukaSelimut();
}
function frame1214(){
stop();
}
function frame1235(){
stop();
pakaiSelimut();
}
function frame1249(){
stop();
}
function frame1262(){
stop();
}
function frame1272(){
stop();
pakaiSelimut();
}
function frame1273(){
bukaSelimut();
}
function frame1285(){
stop();
}
function frame1306(){
stop();
pakaiSelimut();
}
function frame1320(){
stop();
}
function frame1333(){
stop();
}
function frame1343(){
stop();
pakaiSelimut();
}
function frame1344(){
bukaSelimut();
}
function frame1356(){
stop();
}
function frame1377(){
stop();
pakaiSelimut();
}
function frame1391(){
stop();
}
function frame1404(){
stop();
}
function frame1414(){
stop();
pakaiSelimut();
}
function frame1415(){
bukaSelimut();
}
function frame1427(){
stop();
}
function frame1448(){
stop();
pakaiSelimut();
}
}
}//package ResortEmpire_fla
Section 311
//vcustomer1_golf_146 (ResortEmpire_fla.vcustomer1_golf_146)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class vcustomer1_golf_146 extends MovieClip {
public var bola:MovieClip;
public var jenis:uint;
public function vcustomer1_golf_146(){
addFrameScript(0, frame1, 1, frame2, 21, frame22, 33, frame34, 54, frame55, 66, frame67, 87, frame88, 99, frame100, 120, frame121, 132, frame133, 153, frame154, 165, frame166, 186, frame187, 198, frame199, 219, frame220, 231, frame232, 252, frame253, 264, frame265, 285, frame286, 297, frame298, 318, frame319, 330, frame331, 351, frame352, 363, frame364, 384, frame385, 396, frame397, 417, frame418, 429, frame430, 450, frame451, 462, frame463, 483, frame484, 495, frame496, 516, frame517, 528, frame529, 549, frame550, 561, frame562, 582, frame583, 594, frame595, 615, frame616, 627, frame628, 648, frame649, 660, frame661, 681, frame682, 693, frame694);
}
public function init():void{
bola.init();
hiding();
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
bola.hiding();
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame22(){
stop();
bola.anime();
}
function frame34(){
stop();
}
function frame55(){
stop();
bola.anime();
}
function frame67(){
stop();
}
function frame88(){
stop();
bola.anime();
}
function frame100(){
stop();
}
function frame121(){
stop();
bola.anime();
}
function frame133(){
stop();
}
function frame154(){
stop();
bola.anime();
}
function frame166(){
stop();
}
function frame187(){
stop();
bola.anime();
}
function frame199(){
stop();
}
function frame220(){
stop();
bola.anime();
}
function frame232(){
stop();
}
function frame253(){
stop();
bola.anime();
}
function frame265(){
stop();
}
function frame286(){
stop();
bola.anime();
}
function frame298(){
stop();
}
function frame319(){
stop();
bola.anime();
}
function frame331(){
stop();
}
function frame352(){
stop();
bola.anime();
}
function frame364(){
stop();
}
function frame385(){
stop();
bola.anime();
}
function frame397(){
stop();
}
function frame418(){
stop();
bola.anime();
}
function frame430(){
stop();
}
function frame451(){
stop();
bola.anime();
}
function frame463(){
stop();
}
function frame484(){
stop();
bola.anime();
}
function frame496(){
stop();
}
function frame517(){
stop();
bola.anime();
}
function frame529(){
stop();
}
function frame550(){
stop();
bola.anime();
}
function frame562(){
stop();
}
function frame583(){
stop();
bola.anime();
}
function frame595(){
stop();
}
function frame616(){
stop();
bola.anime();
}
function frame628(){
stop();
}
function frame649(){
stop();
bola.anime();
}
function frame661(){
stop();
}
function frame682(){
stop();
bola.anime();
}
function frame694(){
stop();
}
}
}//package ResortEmpire_fla
Section 312
//vcustomer1_gym_365 (ResortEmpire_fla.vcustomer1_gym_365)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_gym_365 extends MovieClip {
public var jenis:uint;
public function vcustomer1_gym_365(){
addFrameScript(0, frame1, 1, frame2, 49, frame50, 63, frame64, 112, frame113, 126, frame127, 175, frame176, 189, frame190, 238, frame239, 252, frame253, 301, frame302, 315, frame316, 364, frame365, 378, frame379, 427, frame428, 441, frame442, 490, frame491, 504, frame505, 553, frame554, 567, frame568, 616, frame617, 630, frame631, 679, frame680, 693, frame694, 742, frame743, 756, frame757, 805, frame806, 819, frame820, 868, frame869, 882, frame883, 931, frame932, 945, frame946, 994, frame995, 1008, frame1009, 1057, frame1058, 1071, frame1072, 1120, frame1121, 1134, frame1135, 1183, frame1184, 1197, frame1198, 1246, frame1247, 1260, frame1261, 1309, frame1310, 1323, frame1324);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame50(){
stop();
}
function frame64(){
stop();
}
function frame113(){
stop();
}
function frame127(){
stop();
}
function frame176(){
stop();
}
function frame190(){
stop();
}
function frame239(){
stop();
}
function frame253(){
stop();
}
function frame302(){
stop();
}
function frame316(){
stop();
}
function frame365(){
stop();
}
function frame379(){
stop();
}
function frame428(){
stop();
}
function frame442(){
stop();
}
function frame491(){
stop();
}
function frame505(){
stop();
}
function frame554(){
stop();
}
function frame568(){
stop();
}
function frame617(){
stop();
}
function frame631(){
stop();
}
function frame680(){
stop();
}
function frame694(){
stop();
}
function frame743(){
stop();
}
function frame757(){
stop();
}
function frame806(){
stop();
}
function frame820(){
stop();
}
function frame869(){
stop();
}
function frame883(){
stop();
}
function frame932(){
stop();
}
function frame946(){
stop();
}
function frame995(){
stop();
}
function frame1009(){
stop();
}
function frame1058(){
stop();
}
function frame1072(){
stop();
}
function frame1121(){
stop();
}
function frame1135(){
stop();
}
function frame1184(){
stop();
}
function frame1198(){
stop();
}
function frame1247(){
stop();
}
function frame1261(){
stop();
}
function frame1310(){
stop();
}
function frame1324(){
stop();
}
}
}//package ResortEmpire_fla
Section 313
//vcustomer1_IndiaResto_283 (ResortEmpire_fla.vcustomer1_IndiaResto_283)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_IndiaResto_283 extends MovieClip {
public var jenis:uint;
public function vcustomer1_IndiaResto_283(){
addFrameScript(0, frame1);
}
public function hiding():void{
this.visible = false;
}
public function anime():void{
this.gotoAndStop(jenis);
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
}
}//package ResortEmpire_fla
Section 314
//vcustomer1_jacuzi_324 (ResortEmpire_fla.vcustomer1_jacuzi_324)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_jacuzi_324 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer1_jacuzi_324(){
addFrameScript(0, frame1, 1, frame2, 65, frame66, 72, frame73, 137, frame138, 144, frame145, 209, frame210, 216, frame217, 281, frame282, 288, frame289, 353, frame354, 360, frame361, 425, frame426, 432, frame433, 497, frame498, 504, frame505, 569, frame570, 576, frame577, 641, frame642, 648, frame649, 713, frame714, 720, frame721, 785, frame786, 792, frame793, 857, frame858, 864, frame865, 929, frame930, 936, frame937, 1001, frame1002, 1008, frame1009, 1073, frame1074, 1080, frame1081, 1145, frame1146, 1152, frame1153, 1220, frame1221, 1227, frame1228, 1295, frame1296, 1302, frame1303, 1370, frame1371, 1377, frame1378, 1445, frame1446, 1452, frame1453, 1520, frame1521, 1527, frame1528);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame66(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame73(){
stop();
}
function frame138(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame145(){
stop();
}
function frame210(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame217(){
stop();
}
function frame282(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame289(){
stop();
}
function frame354(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame361(){
stop();
}
function frame426(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame433(){
stop();
}
function frame498(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame505(){
stop();
}
function frame570(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame577(){
stop();
}
function frame642(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame649(){
stop();
}
function frame714(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame721(){
stop();
}
function frame786(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame793(){
stop();
}
function frame858(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame865(){
stop();
}
function frame930(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame937(){
stop();
}
function frame1002(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1009(){
stop();
}
function frame1074(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1081(){
stop();
}
function frame1146(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1153(){
stop();
}
function frame1221(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1228(){
stop();
}
function frame1296(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1303(){
stop();
}
function frame1371(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1378(){
stop();
}
function frame1446(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1453(){
stop();
}
function frame1521(){
stop();
this.gotoAndPlay((("v" + String(jenis)) + "_anim"));
}
function frame1528(){
stop();
}
}
}//package ResortEmpire_fla
Section 315
//vcustomer1_lodge_45 (ResortEmpire_fla.vcustomer1_lodge_45)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class vcustomer1_lodge_45 extends MovieClip {
public var visitor_duduk:MovieClip;
public var jenis:uint;
public function vcustomer1_lodge_45(){
addFrameScript(0, frame1, 1, frame2, 20, frame21, 33, frame34, 45, frame46, 46, frame47, 58, frame59, 71, frame72, 91, frame92, 104, frame105, 116, frame117, 117, frame118, 129, frame130, 142, frame143, 162, frame163, 175, frame176, 187, frame188, 188, frame189, 200, frame201, 213, frame214, 233, frame234, 246, frame247, 258, frame259, 259, frame260, 271, frame272, 284, frame285, 304, frame305, 317, frame318, 329, frame330, 330, frame331, 342, frame343, 355, frame356, 375, frame376, 388, frame389, 400, frame401, 401, frame402, 413, frame414, 426, frame427, 446, frame447, 459, frame460, 471, frame472, 472, frame473, 484, frame485, 497, frame498, 517, frame518, 530, frame531, 542, frame543, 543, frame544, 555, frame556, 568, frame569, 588, frame589, 601, frame602, 613, frame614, 614, frame615, 626, frame627, 639, frame640, 659, frame660, 672, frame673, 684, frame685, 685, frame686, 697, frame698, 710, frame711, 730, frame731, 743, frame744, 755, frame756, 756, frame757, 0x0300, frame769, 781, frame782, 801, frame802, 814, frame815, 826, frame827, 827, frame828, 839, frame840, 852, frame853, 872, frame873, 885, frame886, 897, frame898, 898, frame899, 910, frame911, 923, frame924, 943, frame944, 956, frame957, 968, frame969, 969, frame970, 981, frame982, 994, frame995, 1014, frame1015, 1027, frame1028, 1039, frame1040, 1040, frame1041, 1052, frame1053, 1065, frame1066, 1085, frame1086, 1098, frame1099, 1110, frame1111, 1111, frame1112, 1123, frame1124, 1136, frame1137, 1156, frame1157, 1169, frame1170, 1181, frame1182, 1182, frame1183, 1194, frame1195, 1207, frame1208, 1227, frame1228, 1240, frame1241, 1252, frame1253, 1253, frame1254, 1265, frame1266, 1278, frame1279, 1298, frame1299, 1311, frame1312, 1323, frame1324, 1324, frame1325, 1336, frame1337, 1349, frame1350, 1369, frame1370, 1382, frame1383, 1394, frame1395, 1395, frame1396, 1407, frame1408, 1420, frame1421, 1440, frame1441, 1453, frame1454, 1465, frame1466, 1466, frame1467, 1478, frame1479, 1491, frame1492);
}
public function init():void{
hiding();
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function anime2(_arg1:String):void{
this.gotoAndStop(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function standby():void{
this.gotoAndStop("none");
}
public function bukaSelimut():void{
this.parent["parent"].bukaSelimut();
}
public function pakaiSelimut():void{
this.parent["parent"].pakaiSelimut();
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame21(){
stop();
}
function frame34(){
stop();
}
function frame46(){
stop();
pakaiSelimut();
}
function frame47(){
bukaSelimut();
}
function frame59(){
stop();
}
function frame72(){
stop();
pakaiSelimut();
}
function frame92(){
stop();
}
function frame105(){
stop();
}
function frame117(){
stop();
pakaiSelimut();
}
function frame118(){
bukaSelimut();
}
function frame130(){
stop();
}
function frame143(){
stop();
pakaiSelimut();
}
function frame163(){
stop();
}
function frame176(){
stop();
}
function frame188(){
stop();
pakaiSelimut();
}
function frame189(){
bukaSelimut();
}
function frame201(){
stop();
}
function frame214(){
stop();
pakaiSelimut();
}
function frame234(){
stop();
}
function frame247(){
stop();
}
function frame259(){
stop();
pakaiSelimut();
}
function frame260(){
bukaSelimut();
}
function frame272(){
stop();
}
function frame285(){
stop();
pakaiSelimut();
}
function frame305(){
stop();
}
function frame318(){
stop();
}
function frame330(){
stop();
pakaiSelimut();
}
function frame331(){
bukaSelimut();
}
function frame343(){
stop();
}
function frame356(){
stop();
pakaiSelimut();
}
function frame376(){
stop();
}
function frame389(){
stop();
}
function frame401(){
stop();
pakaiSelimut();
}
function frame402(){
bukaSelimut();
}
function frame414(){
stop();
}
function frame427(){
stop();
pakaiSelimut();
}
function frame447(){
stop();
}
function frame460(){
stop();
}
function frame472(){
stop();
pakaiSelimut();
}
function frame473(){
bukaSelimut();
}
function frame485(){
stop();
}
function frame498(){
stop();
pakaiSelimut();
}
function frame518(){
stop();
}
function frame531(){
stop();
}
function frame543(){
stop();
pakaiSelimut();
}
function frame544(){
bukaSelimut();
}
function frame556(){
stop();
}
function frame569(){
stop();
pakaiSelimut();
}
function frame589(){
stop();
}
function frame602(){
stop();
}
function frame614(){
stop();
pakaiSelimut();
}
function frame615(){
bukaSelimut();
}
function frame627(){
stop();
}
function frame640(){
stop();
pakaiSelimut();
}
function frame660(){
stop();
}
function frame673(){
stop();
}
function frame685(){
stop();
pakaiSelimut();
}
function frame686(){
bukaSelimut();
}
function frame698(){
stop();
}
function frame711(){
stop();
pakaiSelimut();
}
function frame731(){
stop();
}
function frame744(){
stop();
}
function frame756(){
stop();
pakaiSelimut();
}
function frame757(){
bukaSelimut();
}
function frame769(){
stop();
}
function frame782(){
stop();
pakaiSelimut();
}
function frame802(){
stop();
}
function frame815(){
stop();
}
function frame827(){
stop();
pakaiSelimut();
}
function frame828(){
bukaSelimut();
}
function frame840(){
stop();
}
function frame853(){
stop();
pakaiSelimut();
}
function frame873(){
stop();
}
function frame886(){
stop();
}
function frame898(){
stop();
pakaiSelimut();
}
function frame899(){
bukaSelimut();
}
function frame911(){
stop();
}
function frame924(){
stop();
pakaiSelimut();
}
function frame944(){
stop();
}
function frame957(){
stop();
}
function frame969(){
stop();
pakaiSelimut();
}
function frame970(){
bukaSelimut();
}
function frame982(){
stop();
}
function frame995(){
stop();
pakaiSelimut();
}
function frame1015(){
stop();
}
function frame1028(){
stop();
}
function frame1040(){
stop();
pakaiSelimut();
}
function frame1041(){
bukaSelimut();
}
function frame1053(){
stop();
}
function frame1066(){
stop();
pakaiSelimut();
}
function frame1086(){
stop();
}
function frame1099(){
stop();
}
function frame1111(){
stop();
pakaiSelimut();
}
function frame1112(){
bukaSelimut();
}
function frame1124(){
stop();
}
function frame1137(){
stop();
pakaiSelimut();
}
function frame1157(){
stop();
}
function frame1170(){
stop();
}
function frame1182(){
stop();
pakaiSelimut();
}
function frame1183(){
bukaSelimut();
}
function frame1195(){
stop();
}
function frame1208(){
stop();
pakaiSelimut();
}
function frame1228(){
stop();
}
function frame1241(){
stop();
}
function frame1253(){
stop();
pakaiSelimut();
}
function frame1254(){
bukaSelimut();
}
function frame1266(){
stop();
}
function frame1279(){
stop();
pakaiSelimut();
}
function frame1299(){
stop();
}
function frame1312(){
stop();
}
function frame1324(){
stop();
pakaiSelimut();
}
function frame1325(){
bukaSelimut();
}
function frame1337(){
stop();
}
function frame1350(){
stop();
pakaiSelimut();
}
function frame1370(){
stop();
}
function frame1383(){
stop();
}
function frame1395(){
stop();
pakaiSelimut();
}
function frame1396(){
bukaSelimut();
}
function frame1408(){
stop();
}
function frame1421(){
stop();
pakaiSelimut();
}
function frame1441(){
stop();
}
function frame1454(){
stop();
}
function frame1466(){
stop();
pakaiSelimut();
}
function frame1467(){
bukaSelimut();
}
function frame1479(){
stop();
}
function frame1492(){
stop();
pakaiSelimut();
}
}
}//package ResortEmpire_fla
Section 316
//vcustomer1_medical_342 (ResortEmpire_fla.vcustomer1_medical_342)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_medical_342 extends MovieClip {
public var jenis:uint;
public function vcustomer1_medical_342(){
addFrameScript(0, frame1, 118, frame119, 128, frame129, 247, frame248, 0x0101, frame258, 376, frame377, 386, frame387, 505, frame506, 515, frame516, 634, frame635, 644, frame645, 763, frame764, 773, frame774, 892, frame893, 902, frame903, 1021, frame1022, 1031, frame1032, 1150, frame1151, 1160, frame1161, 1279, frame1280, 1289, frame1290, 1408, frame1409, 1418, frame1419, 1537, frame1538, 1547, frame1548, 1666, frame1667, 1676, frame1677, 1795, frame1796, 1805, frame1806, 1924, frame1925, 1934, frame1935, 2053, frame2054, 2063, frame2064, 2182, frame2183, 2192, frame2193, 2311, frame2312, 2321, frame2322, 2440, frame2441, 2450, frame2451, 2569, frame2570, 2579, frame2580, 2698, frame2699, 2708, frame2709);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame119(){
stop();
}
function frame129(){
stop();
}
function frame248(){
stop();
}
function frame258(){
stop();
}
function frame377(){
stop();
}
function frame387(){
stop();
}
function frame506(){
stop();
}
function frame516(){
stop();
}
function frame635(){
stop();
}
function frame645(){
stop();
}
function frame764(){
stop();
}
function frame774(){
stop();
}
function frame893(){
stop();
}
function frame903(){
stop();
}
function frame1022(){
stop();
}
function frame1032(){
stop();
}
function frame1151(){
stop();
}
function frame1161(){
stop();
}
function frame1280(){
stop();
}
function frame1290(){
stop();
}
function frame1409(){
stop();
}
function frame1419(){
stop();
}
function frame1538(){
stop();
}
function frame1548(){
stop();
}
function frame1667(){
stop();
}
function frame1677(){
stop();
}
function frame1796(){
stop();
}
function frame1806(){
stop();
}
function frame1925(){
stop();
}
function frame1935(){
stop();
}
function frame2054(){
stop();
}
function frame2064(){
stop();
}
function frame2183(){
stop();
}
function frame2193(){
stop();
}
function frame2312(){
stop();
}
function frame2322(){
stop();
}
function frame2441(){
stop();
}
function frame2451(){
stop();
}
function frame2570(){
stop();
}
function frame2580(){
stop();
}
function frame2699(){
stop();
}
function frame2709(){
stop();
}
}
}//package ResortEmpire_fla
Section 317
//vcustomer1_Minimarket_330 (ResortEmpire_fla.vcustomer1_Minimarket_330)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_Minimarket_330 extends MovieClip {
public var jenis:uint;
public function vcustomer1_Minimarket_330(){
addFrameScript(0, frame1, 100, frame101, 131, frame132, 232, frame233, 263, frame264, 364, frame365, 395, frame396, 496, frame497, 527, frame528, 628, frame629, 659, frame660, 760, frame761, 791, frame792, 892, frame893, 923, frame924, 0x0400, frame1025, 1055, frame1056, 1156, frame1157, 1187, frame1188, 1288, frame1289, 1319, frame1320, 1420, frame1421, 1451, frame1452, 1552, frame1553, 1583, frame1584, 1684, frame1685, 1715, frame1716, 1816, frame1817, 1847, frame1848, 1948, frame1949, 1979, frame1980, 2080, frame2081, 2111, frame2112, 2212, frame2213, 2243, frame2244, 2344, frame2345, 2375, frame2376, 2476, frame2477, 2507, frame2508, 2608, frame2609, 2639, frame2640, 2740, frame2741, 2771, frame2772);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame101(){
stop();
}
function frame132(){
stop();
}
function frame233(){
stop();
}
function frame264(){
stop();
}
function frame365(){
stop();
}
function frame396(){
stop();
}
function frame497(){
stop();
}
function frame528(){
stop();
}
function frame629(){
stop();
}
function frame660(){
stop();
}
function frame761(){
stop();
}
function frame792(){
stop();
}
function frame893(){
stop();
}
function frame924(){
stop();
}
function frame1025(){
stop();
}
function frame1056(){
stop();
}
function frame1157(){
stop();
}
function frame1188(){
stop();
}
function frame1289(){
stop();
}
function frame1320(){
stop();
}
function frame1421(){
stop();
}
function frame1452(){
stop();
}
function frame1553(){
stop();
}
function frame1584(){
stop();
}
function frame1685(){
stop();
}
function frame1716(){
stop();
}
function frame1817(){
stop();
}
function frame1848(){
stop();
}
function frame1949(){
stop();
}
function frame1980(){
stop();
}
function frame2081(){
stop();
}
function frame2112(){
stop();
}
function frame2213(){
stop();
}
function frame2244(){
stop();
}
function frame2345(){
stop();
}
function frame2376(){
stop();
}
function frame2477(){
stop();
}
function frame2508(){
stop();
}
function frame2609(){
stop();
}
function frame2640(){
stop();
}
function frame2741(){
stop();
}
function frame2772(){
stop();
}
}
}//package ResortEmpire_fla
Section 318
//vcustomer1_poo_204 (ResortEmpire_fla.vcustomer1_poo_204)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_poo_204 extends MovieClip {
public var jenis:uint;
public function vcustomer1_poo_204(){
addFrameScript(0, frame1, 1, frame2, 21, frame22, 145, frame146, 152, frame153, 297, frame298, 304, frame305, 325, frame326, 449, frame450, 456, frame457, 477, frame478, 601, frame602, 608, frame609, 629, frame630, 753, frame754, 760, frame761, 781, frame782, 905, frame906, 912, frame913, 933, frame934, 1057, frame1058, 1064, frame1065, 1085, frame1086, 1209, frame1210, 1216, frame1217, 1237, frame1238, 1361, frame1362, 1368, frame1369, 1389, frame1390, 1513, frame1514, 1520, frame1521, 1541, frame1542, 1665, frame1666, 1672, frame1673, 1693, frame1694, 1817, frame1818, 1824, frame1825, 1845, frame1846, 1969, frame1970, 1976, frame1977, 1997, frame1998, 2121, frame2122, 2128, frame2129, 2149, frame2150, 2273, frame2274, 2280, frame2281, 2301, frame2302, 2425, frame2426, 2432, frame2433, 2453, frame2454, 2577, frame2578, 2584, frame2585, 2605, frame2606, 2729, frame2730, 2736, frame2737, 2757, frame2758, 2881, frame2882, 2888, frame2889, 2909, frame2910, 3033, frame3034, 3040, frame3041, 3061, frame3062, 3185, frame3186, 3192, frame3193);
}
public function init():void{
hiding();
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame22(){
stop();
anime("anim");
}
function frame146(){
stop();
anime("anim");
}
function frame153(){
stop();
}
function frame298(){
stop();
anime("anim");
}
function frame305(){
stop();
}
function frame326(){
stop();
anime("anim");
}
function frame450(){
stop();
anime("anim");
}
function frame457(){
stop();
}
function frame478(){
stop();
anime("anim");
}
function frame602(){
stop();
anime("anim");
}
function frame609(){
stop();
}
function frame630(){
stop();
anime("anim");
}
function frame754(){
stop();
anime("anim");
}
function frame761(){
stop();
}
function frame782(){
stop();
anime("anim");
}
function frame906(){
stop();
anime("anim");
}
function frame913(){
stop();
}
function frame934(){
stop();
anime("anim");
}
function frame1058(){
stop();
anime("anim");
}
function frame1065(){
stop();
}
function frame1086(){
stop();
anime("anim");
}
function frame1210(){
stop();
anime("anim");
}
function frame1217(){
stop();
}
function frame1238(){
stop();
anime("anim");
}
function frame1362(){
stop();
anime("anim");
}
function frame1369(){
stop();
}
function frame1390(){
stop();
anime("anim");
}
function frame1514(){
stop();
anime("anim");
}
function frame1521(){
stop();
}
function frame1542(){
stop();
anime("anim");
}
function frame1666(){
stop();
anime("anim");
}
function frame1673(){
stop();
}
function frame1694(){
stop();
anime("anim");
}
function frame1818(){
stop();
anime("anim");
}
function frame1825(){
stop();
}
function frame1846(){
stop();
anime("anim");
}
function frame1970(){
stop();
anime("anim");
}
function frame1977(){
stop();
}
function frame1998(){
stop();
anime("anim");
}
function frame2122(){
stop();
anime("anim");
}
function frame2129(){
stop();
}
function frame2150(){
stop();
anime("anim");
}
function frame2274(){
stop();
anime("anim");
}
function frame2281(){
stop();
}
function frame2302(){
stop();
anime("anim");
}
function frame2426(){
stop();
anime("anim");
}
function frame2433(){
stop();
}
function frame2454(){
stop();
anime("anim");
}
function frame2578(){
stop();
anime("anim");
}
function frame2585(){
stop();
}
function frame2606(){
stop();
anime("anim");
}
function frame2730(){
stop();
anime("anim");
}
function frame2737(){
stop();
}
function frame2758(){
stop();
anime("anim");
}
function frame2882(){
stop();
anime("anim");
}
function frame2889(){
stop();
}
function frame2910(){
stop();
anime("anim");
}
function frame3034(){
stop();
anime("anim");
}
function frame3041(){
stop();
}
function frame3062(){
stop();
anime("anim");
}
function frame3186(){
stop();
anime("anim");
}
function frame3193(){
stop();
}
}
}//package ResortEmpire_fla
Section 319
//vcustomer1_sauna_347 (ResortEmpire_fla.vcustomer1_sauna_347)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer1_sauna_347 extends MovieClip {
public var jenis:uint;
public function vcustomer1_sauna_347(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 21, frame22, 32, frame33, 42, frame43, 53, frame54, 63, frame64, 74, frame75, 84, frame85, 95, frame96, 105, frame106, 116, frame117, 126, frame127, 137, frame138, 147, frame148, 158, frame159, 168, frame169, 179, frame180, 189, frame190, 200, frame201, 210, frame211, 221, frame222, 231, frame232, 242, frame243, 252, frame253, 263, frame264, 273, frame274, 284, frame285, 294, frame295, 305, frame306, 315, frame316, 326, frame327, 336, frame337, 347, frame348, 357, frame358, 368, frame369, 378, frame379, 389, frame390, 399, frame400, 410, frame411, 420, frame421, 431, frame432, 441, frame442);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame12(){
stop();
}
function frame22(){
stop();
}
function frame33(){
stop();
}
function frame43(){
stop();
}
function frame54(){
stop();
}
function frame64(){
stop();
}
function frame75(){
stop();
}
function frame85(){
stop();
}
function frame96(){
stop();
}
function frame106(){
stop();
}
function frame117(){
stop();
}
function frame127(){
stop();
}
function frame138(){
stop();
}
function frame148(){
stop();
}
function frame159(){
stop();
}
function frame169(){
stop();
}
function frame180(){
stop();
}
function frame190(){
stop();
}
function frame201(){
stop();
}
function frame211(){
stop();
}
function frame222(){
stop();
}
function frame232(){
stop();
}
function frame243(){
stop();
}
function frame253(){
stop();
}
function frame264(){
stop();
}
function frame274(){
stop();
}
function frame285(){
stop();
}
function frame295(){
stop();
}
function frame306(){
stop();
}
function frame316(){
stop();
}
function frame327(){
stop();
}
function frame337(){
stop();
}
function frame348(){
stop();
}
function frame358(){
stop();
}
function frame369(){
stop();
}
function frame379(){
stop();
}
function frame390(){
stop();
}
function frame400(){
stop();
}
function frame411(){
stop();
}
function frame421(){
stop();
}
function frame432(){
stop();
}
function frame442(){
stop();
}
}
}//package ResortEmpire_fla
Section 320
//vcustomer1_spa_357 (ResortEmpire_fla.vcustomer1_spa_357)
package ResortEmpire_fla {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class vcustomer1_spa_357 extends MovieClip {
public var jenis:uint;
public function vcustomer1_spa_357(){
addFrameScript(0, frame1, 1, frame2, 10, frame11, 11, frame12, 12, frame13, 21, frame22, 31, frame32, 32, frame33, 33, frame34, 42, frame43, 52, frame53, 53, frame54, 54, frame55, 63, frame64, 73, frame74, 74, frame75, 75, frame76, 84, frame85, 94, frame95, 95, frame96, 96, frame97, 105, frame106, 115, frame116, 116, frame117, 117, frame118, 126, frame127, 136, frame137, 137, frame138, 138, frame139, 147, frame148, 157, frame158, 158, frame159, 159, frame160, 168, frame169, 178, frame179, 179, frame180, 180, frame181, 189, frame190, 199, frame200, 200, frame201, 201, frame202, 210, frame211, 220, frame221, 221, frame222, 222, frame223, 231, frame232, 241, frame242, 242, frame243, 243, frame244, 252, frame253, 262, frame263, 263, frame264, 264, frame265, 273, frame274, 283, frame284, 284, frame285, 285, frame286, 294, frame295, 304, frame305, 305, frame306, 306, frame307, 315, frame316, 325, frame326, 326, frame327, 327, frame328, 336, frame337, 346, frame347, 347, frame348, 348, frame349, 357, frame358, 367, frame368, 368, frame369, 369, frame370, 378, frame379, 388, frame389, 389, frame390, 390, frame391, 399, frame400, 409, frame410, 410, frame411, 411, frame412, 420, frame421, 430, frame431, 431, frame432, 432, frame433, 441, frame442);
}
public function hiding():void{
this.visible = false;
hidingSelimut();
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function animePlace():void{
gotoAndStop(((("v" + jenis) + "_place") + this.parent["level_"]));
}
public function hidingSelimut():void{
this.parent["selimut"].hiding();
}
public function showingSelimut():void{
this.parent["selimut"].showing(this.parent["level_"]);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame11(){
animePlace();
}
function frame12(){
stop();
showingSelimut();
}
function frame13(){
hidingSelimut();
}
function frame22(){
stop();
}
function frame32(){
animePlace();
}
function frame33(){
stop();
showingSelimut();
}
function frame34(){
hidingSelimut();
}
function frame43(){
stop();
}
function frame53(){
animePlace();
}
function frame54(){
stop();
showingSelimut();
}
function frame55(){
hidingSelimut();
}
function frame64(){
stop();
}
function frame74(){
animePlace();
}
function frame75(){
stop();
showingSelimut();
}
function frame76(){
hidingSelimut();
}
function frame85(){
stop();
}
function frame95(){
animePlace();
}
function frame96(){
stop();
showingSelimut();
}
function frame97(){
hidingSelimut();
}
function frame106(){
stop();
}
function frame116(){
animePlace();
}
function frame117(){
stop();
showingSelimut();
}
function frame118(){
hidingSelimut();
}
function frame127(){
stop();
}
function frame137(){
animePlace();
}
function frame138(){
stop();
showingSelimut();
}
function frame139(){
hidingSelimut();
}
function frame148(){
stop();
}
function frame158(){
animePlace();
}
function frame159(){
stop();
showingSelimut();
}
function frame160(){
hidingSelimut();
}
function frame169(){
stop();
}
function frame179(){
animePlace();
}
function frame180(){
stop();
showingSelimut();
}
function frame181(){
hidingSelimut();
}
function frame190(){
stop();
}
function frame200(){
animePlace();
}
function frame201(){
stop();
showingSelimut();
}
function frame202(){
hidingSelimut();
}
function frame211(){
stop();
}
function frame221(){
animePlace();
}
function frame222(){
stop();
showingSelimut();
}
function frame223(){
hidingSelimut();
}
function frame232(){
stop();
}
function frame242(){
animePlace();
}
function frame243(){
stop();
showingSelimut();
}
function frame244(){
hidingSelimut();
}
function frame253(){
stop();
}
function frame263(){
animePlace();
}
function frame264(){
stop();
showingSelimut();
}
function frame265(){
hidingSelimut();
}
function frame274(){
stop();
}
function frame284(){
animePlace();
}
function frame285(){
stop();
showingSelimut();
}
function frame286(){
hidingSelimut();
}
function frame295(){
stop();
}
function frame305(){
animePlace();
}
function frame306(){
stop();
showingSelimut();
}
function frame307(){
hidingSelimut();
}
function frame316(){
stop();
}
function frame326(){
animePlace();
}
function frame327(){
stop();
showingSelimut();
}
function frame328(){
hidingSelimut();
}
function frame337(){
stop();
}
function frame347(){
animePlace();
}
function frame348(){
stop();
showingSelimut();
}
function frame349(){
hidingSelimut();
}
function frame358(){
stop();
}
function frame368(){
animePlace();
}
function frame369(){
stop();
showingSelimut();
}
function frame370(){
hidingSelimut();
}
function frame379(){
stop();
}
function frame389(){
animePlace();
}
function frame390(){
stop();
showingSelimut();
}
function frame391(){
hidingSelimut();
}
function frame400(){
stop();
}
function frame410(){
animePlace();
}
function frame411(){
stop();
showingSelimut();
}
function frame412(){
hidingSelimut();
}
function frame421(){
stop();
}
function frame431(){
animePlace();
}
function frame432(){
stop();
showingSelimut();
}
function frame433(){
hidingSelimut();
}
function frame442(){
stop();
}
}
}//package ResortEmpire_fla
Section 321
//vcustomer2_Arcade_276 (ResortEmpire_fla.vcustomer2_Arcade_276)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Arcade_276 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer2_Arcade_276(){
addFrameScript(0, frame1, 11, frame12, 23, frame24, 35, frame36, 47, frame48, 59, frame60, 71, frame72, 83, frame84, 95, frame96, 107, frame108, 119, frame120, 131, frame132, 143, frame144, 155, frame156, 167, frame168, 179, frame180, 191, frame192);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame12(){
stop();
}
function frame24(){
stop();
}
function frame36(){
stop();
}
function frame48(){
stop();
}
function frame60(){
stop();
}
function frame72(){
stop();
}
function frame84(){
stop();
}
function frame96(){
stop();
}
function frame108(){
stop();
}
function frame120(){
stop();
}
function frame132(){
stop();
}
function frame144(){
stop();
}
function frame156(){
stop();
}
function frame168(){
stop();
}
function frame180(){
stop();
}
function frame192(){
stop();
}
}
}//package ResortEmpire_fla
Section 322
//vcustomer2_cottage_137 (ResortEmpire_fla.vcustomer2_cottage_137)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_cottage_137 extends MovieClip {
public var visitor_duduk:MovieClip;
public var jenis:uint;
public function vcustomer2_cottage_137(){
addFrameScript(0, frame1, 12, frame13, 23, frame24, 32, frame33, 43, frame44, 46, frame47, 59, frame60, 70, frame71, 79, frame80, 90, frame91, 93, frame94, 106, frame107, 117, frame118, 126, frame127, 137, frame138, 140, frame141, 153, frame154, 164, frame165, 173, frame174, 184, frame185, 187, frame188, 200, frame201, 211, frame212, 220, frame221, 231, frame232, 234, frame235, 247, frame248, 258, frame259, 267, frame268, 278, frame279, 281, frame282, 294, frame295, 305, frame306, 314, frame315, 325, frame326, 328, frame329, 341, frame342, 352, frame353, 361, frame362, 372, frame373, 375, frame376);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function anime2(_arg1:String):void{
this.gotoAndStop(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame13(){
stop();
}
function frame24(){
stop();
}
function frame33(){
stop();
}
function frame44(){
stop();
}
function frame47(){
stop();
}
function frame60(){
stop();
}
function frame71(){
stop();
}
function frame80(){
stop();
}
function frame91(){
stop();
}
function frame94(){
stop();
}
function frame107(){
stop();
}
function frame118(){
stop();
}
function frame127(){
stop();
}
function frame138(){
stop();
}
function frame141(){
stop();
}
function frame154(){
stop();
}
function frame165(){
stop();
}
function frame174(){
stop();
}
function frame185(){
stop();
}
function frame188(){
stop();
}
function frame201(){
stop();
}
function frame212(){
stop();
}
function frame221(){
stop();
}
function frame232(){
stop();
}
function frame235(){
stop();
}
function frame248(){
stop();
}
function frame259(){
stop();
}
function frame268(){
stop();
}
function frame279(){
stop();
}
function frame282(){
stop();
}
function frame295(){
stop();
}
function frame306(){
stop();
}
function frame315(){
stop();
}
function frame326(){
stop();
}
function frame329(){
stop();
}
function frame342(){
stop();
}
function frame353(){
stop();
}
function frame362(){
stop();
}
function frame373(){
stop();
}
function frame376(){
stop();
}
}
}//package ResortEmpire_fla
Section 323
//vcustomer2_golf_163 (ResortEmpire_fla.vcustomer2_golf_163)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_golf_163 extends MovieClip {
public var jenis:uint;
public function vcustomer2_golf_163(){
addFrameScript(0, frame1, 18, frame19, 30, frame31, 49, frame50, 61, frame62, 80, frame81, 92, frame93, 111, frame112, 123, frame124, 142, frame143, 154, frame155, 173, frame174, 185, frame186, 204, frame205, 216, frame217, 235, frame236, 247, frame248);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame31(){
stop();
}
function frame50(){
stop();
}
function frame62(){
stop();
}
function frame81(){
stop();
}
function frame93(){
stop();
}
function frame112(){
stop();
}
function frame124(){
stop();
}
function frame143(){
stop();
}
function frame155(){
stop();
}
function frame174(){
stop();
}
function frame186(){
stop();
}
function frame205(){
stop();
}
function frame217(){
stop();
}
function frame236(){
stop();
}
function frame248(){
stop();
}
}
}//package ResortEmpire_fla
Section 324
//vcustomer2_gym_364 (ResortEmpire_fla.vcustomer2_gym_364)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_gym_364 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer2_gym_364(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 22, frame23, 33, frame34, 44, frame45, 55, frame56, 66, frame67, 77, frame78, 88, frame89, 99, frame100, 110, frame111, 121, frame122, 132, frame133, 143, frame144, 154, frame155, 165, frame166, 176, frame177);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame12(){
stop();
}
function frame23(){
stop();
}
function frame34(){
stop();
}
function frame45(){
stop();
}
function frame56(){
stop();
}
function frame67(){
stop();
}
function frame78(){
stop();
}
function frame89(){
stop();
}
function frame100(){
stop();
}
function frame111(){
stop();
}
function frame122(){
stop();
}
function frame133(){
stop();
}
function frame144(){
stop();
}
function frame155(){
stop();
}
function frame166(){
stop();
}
function frame177(){
stop();
}
}
}//package ResortEmpire_fla
Section 325
//vcustomer2_IndiaResto_288 (ResortEmpire_fla.vcustomer2_IndiaResto_288)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_IndiaResto_288 extends MovieClip {
public var jenis:uint;
public function vcustomer2_IndiaResto_288(){
addFrameScript(0, frame1);
}
public function hiding():void{
this.visible = false;
}
public function anime():void{
this.gotoAndStop(jenis);
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
}
}//package ResortEmpire_fla
Section 326
//vcustomer2_Jacuzi_325 (ResortEmpire_fla.vcustomer2_Jacuzi_325)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Jacuzi_325 extends MovieClip {
public var jenis:uint;
public function vcustomer2_Jacuzi_325(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 18, frame19, 29, frame30, 36, frame37, 47, frame48, 54, frame55, 65, frame66, 72, frame73, 83, frame84, 90, frame91, 101, frame102, 108, frame109, 119, frame120, 126, frame127, 137, frame138, 144, frame145);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame12(){
stop();
}
function frame19(){
stop();
}
function frame30(){
stop();
}
function frame37(){
stop();
}
function frame48(){
stop();
}
function frame55(){
stop();
}
function frame66(){
stop();
}
function frame73(){
stop();
}
function frame84(){
stop();
}
function frame91(){
stop();
}
function frame102(){
stop();
}
function frame109(){
stop();
}
function frame120(){
stop();
}
function frame127(){
stop();
}
function frame138(){
stop();
}
function frame145(){
stop();
}
}
}//package ResortEmpire_fla
Section 327
//vcustomer2_Lodge_130 (ResortEmpire_fla.vcustomer2_Lodge_130)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Lodge_130 extends MovieClip {
public var jenis:uint;
public function vcustomer2_Lodge_130(){
addFrameScript(0, frame1, 1, frame2, 13, frame14, 24, frame25, 37, frame38, 50, frame51, 55, frame56, 68, frame69, 79, frame80, 92, frame93, 104, frame105, 109, frame110, 122, frame123, 133, frame134, 146, frame147, 158, frame159, 163, frame164, 176, frame177, 187, frame188, 200, frame201, 212, frame213, 217, frame218, 230, frame231, 241, frame242, 254, frame255, 266, frame267, 271, frame272, 284, frame285, 295, frame296, 308, frame309, 320, frame321, 325, frame326, 338, frame339, 349, frame350, 362, frame363, 374, frame375, 379, frame380, 392, frame393, 403, frame404, 416, frame417, 428, frame429, 433, frame434);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
public function anime2(_arg1:String):void{
this.gotoAndStop(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame14(){
stop();
}
function frame25(){
stop();
}
function frame38(){
stop();
}
function frame51(){
stop();
}
function frame56(){
stop();
}
function frame69(){
stop();
}
function frame80(){
stop();
}
function frame93(){
stop();
}
function frame105(){
stop();
}
function frame110(){
stop();
}
function frame123(){
stop();
}
function frame134(){
stop();
}
function frame147(){
stop();
}
function frame159(){
stop();
}
function frame164(){
stop();
}
function frame177(){
stop();
}
function frame188(){
stop();
}
function frame201(){
stop();
}
function frame213(){
stop();
}
function frame218(){
stop();
}
function frame231(){
stop();
}
function frame242(){
stop();
}
function frame255(){
stop();
}
function frame267(){
stop();
}
function frame272(){
stop();
}
function frame285(){
stop();
}
function frame296(){
stop();
}
function frame309(){
stop();
}
function frame321(){
stop();
}
function frame326(){
stop();
}
function frame339(){
stop();
}
function frame350(){
stop();
}
function frame363(){
stop();
}
function frame375(){
stop();
}
function frame380(){
stop();
}
function frame393(){
stop();
}
function frame404(){
stop();
}
function frame417(){
stop();
}
function frame429(){
stop();
}
function frame434(){
stop();
}
}
}//package ResortEmpire_fla
Section 328
//vcustomer2_Medical_334 (ResortEmpire_fla.vcustomer2_Medical_334)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Medical_334 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer2_Medical_334(){
addFrameScript(0, frame1, 31, frame32, 41, frame42, 73, frame74, 83, frame84, 115, frame116, 125, frame126, 157, frame158, 167, frame168, 199, frame200, 209, frame210, 241, frame242, 251, frame252, 283, frame284, 293, frame294, 325, frame326, 335, frame336);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame32(){
stop();
}
function frame42(){
stop();
}
function frame74(){
stop();
}
function frame84(){
stop();
}
function frame116(){
stop();
}
function frame126(){
stop();
}
function frame158(){
stop();
}
function frame168(){
stop();
}
function frame200(){
stop();
}
function frame210(){
stop();
}
function frame242(){
stop();
}
function frame252(){
stop();
}
function frame284(){
stop();
}
function frame294(){
stop();
}
function frame326(){
stop();
}
function frame336(){
stop();
}
}
}//package ResortEmpire_fla
Section 329
//vcustomer2_Minimarket_329 (ResortEmpire_fla.vcustomer2_Minimarket_329)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Minimarket_329 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer2_Minimarket_329(){
addFrameScript(0, frame1, 101, frame102, 116, frame117, 218, frame219, 233, frame234, 335, frame336, 350, frame351, 452, frame453, 467, frame468, 569, frame570, 584, frame585, 686, frame687, 701, frame702, 803, frame804, 818, frame819, 920, frame921, 935, frame936);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame102(){
stop();
anime("center_to_place");
}
function frame117(){
stop();
}
function frame219(){
stop();
anime("center_to_place");
}
function frame234(){
stop();
}
function frame336(){
stop();
anime("center_to_place");
}
function frame351(){
stop();
}
function frame453(){
stop();
anime("center_to_place");
}
function frame468(){
stop();
}
function frame570(){
stop();
anime("center_to_place");
}
function frame585(){
stop();
}
function frame687(){
stop();
anime("center_to_place");
}
function frame702(){
stop();
}
function frame804(){
stop();
anime("center_to_place");
}
function frame819(){
stop();
}
function frame921(){
stop();
anime("center_to_place");
}
function frame936(){
stop();
}
}
}//package ResortEmpire_fla
Section 330
//vcustomer2_Pool_268 (ResortEmpire_fla.vcustomer2_Pool_268)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Pool_268 extends MovieClip {
public var par;
public var jenis:uint;
public function vcustomer2_Pool_268(){
addFrameScript(0, frame1, 1, frame2, 14, frame15, 25, frame26, 39, frame40, 50, frame51, 64, frame65, 75, frame76, 89, frame90, 100, frame101, 114, frame115, 125, frame126, 139, frame140, 150, frame151, 164, frame165, 175, frame176, 189, frame190, 200, frame201);
}
public function hiding():void{
par = this.parent;
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame15(){
stop();
}
function frame26(){
stop();
}
function frame40(){
stop();
}
function frame51(){
stop();
}
function frame65(){
stop();
}
function frame76(){
stop();
}
function frame90(){
stop();
}
function frame101(){
stop();
}
function frame115(){
stop();
}
function frame126(){
stop();
}
function frame140(){
stop();
}
function frame151(){
stop();
}
function frame165(){
stop();
}
function frame176(){
stop();
}
function frame190(){
stop();
}
function frame201(){
stop();
}
}
}//package ResortEmpire_fla
Section 331
//vcustomer2_Sauna_346 (ResortEmpire_fla.vcustomer2_Sauna_346)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_Sauna_346 extends MovieClip {
public var jenis:uint;
public function vcustomer2_Sauna_346(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 21, frame22, 32, frame33, 42, frame43, 53, frame54, 63, frame64, 74, frame75, 84, frame85, 95, frame96, 105, frame106, 116, frame117, 126, frame127, 137, frame138, 147, frame148, 158, frame159, 168, frame169);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
jenis = 0;
}
function frame2(){
stop();
}
function frame12(){
stop();
}
function frame22(){
stop();
}
function frame33(){
stop();
}
function frame43(){
stop();
}
function frame54(){
stop();
}
function frame64(){
stop();
}
function frame75(){
stop();
}
function frame85(){
stop();
}
function frame96(){
stop();
}
function frame106(){
stop();
}
function frame117(){
stop();
}
function frame127(){
stop();
}
function frame138(){
stop();
}
function frame148(){
stop();
}
function frame159(){
stop();
}
function frame169(){
stop();
}
}
}//package ResortEmpire_fla
Section 332
//vcustomer2_spa_356 (ResortEmpire_fla.vcustomer2_spa_356)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class vcustomer2_spa_356 extends MovieClip {
public var jenis:uint;
public function vcustomer2_spa_356(){
addFrameScript(0, frame1, 1, frame2, 11, frame12, 21, frame22, 32, frame33, 42, frame43, 53, frame54, 63, frame64, 74, frame75, 84, frame85, 95, frame96, 105, frame106, 116, frame117, 126, frame127, 137, frame138, 147, frame148, 158, frame159, 168, frame169);
}
public function hiding():void{
this.visible = false;
this.gotoAndStop("stand");
}
public function anime(_arg1:String):void{
this.gotoAndPlay(((("v" + String(jenis)) + "_") + _arg1));
this.visible = true;
}
function frame1(){
stop();
}
function frame2(){
stop();
}
function frame12(){
stop();
}
function frame22(){
stop();
}
function frame33(){
stop();
}
function frame43(){
stop();
}
function frame54(){
stop();
}
function frame64(){
stop();
}
function frame75(){
stop();
}
function frame85(){
stop();
}
function frame96(){
stop();
}
function frame106(){
stop();
}
function frame117(){
stop();
}
function frame127(){
stop();
}
function frame138(){
stop();
}
function frame148(){
stop();
}
function frame159(){
stop();
}
function frame169(){
stop();
}
}
}//package ResortEmpire_fla
Section 333
//z_32 (ResortEmpire_fla.z_32)
package ResortEmpire_fla {
import flash.display.*;
public dynamic class z_32 extends MovieClip {
public var area:Area;
public var tempObject:TemporaryObject;
public function z_32(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package ResortEmpire_fla
Section 334
//z_772 (ResortEmpire_fla.z_772)
package ResortEmpire_fla {
import fl.controls.*;
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import flash.events.*;
import flash.filters.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class z_772 extends MovieClip {
public var size_t:TextField;
public var visitor_t:TextField;
public var see2_t:TextField;
public var btn_saveMap:SimpleButton;
public var posBtn:SimpleButton;
public var temp2_t:TextField;
public var sampahBtn:SimpleButton;
public var btn_clear:SimpleButton;
public var btn_visitor:SimpleButton;
public var focus_t:TextField;
public var jenisv_t:TextField;
public var mouse_t:TextField;
public var see_t:TextField;
public var btn_draw:Button;
public var btn_trotoar:SimpleButton;
public var timeTextBox:TextField;
public var v_t:TextField;
public var pos1_t:TextField;
public var btn_forceSleep:SimpleButton;
public var bg:MovieClip;
public var btn_del:SimpleButton;
public var btn_force:SimpleButton;
public var randv_t:TextField;
public var btn_dummy:SimpleButton;
public var pos2_t:TextField;
public var vdepth_t:TextField;
public var createMapBtn:SimpleButton;
public var btn_save:SimpleButton;
public var mapsprite_t:TextField;
public var visitorpop_t:TextField;
public var btn_checkout:SimpleButton;
public var btn_aspal:SimpleButton;
public var ptile_t:TextField;
public var btn_expand:SimpleButton;
public var exp_t:TextField;
public var temp_t:TextField;
public var findPathButton:SimpleButton;
public function z_772(){
__setProp_btn_draw_z();
}
function __setProp_btn_draw_z(){
try {
btn_draw["componentInspectorSetting"] = true;
} catch(e:Error) {
};
btn_draw.emphasized = false;
btn_draw.enabled = true;
btn_draw.label = "draw";
btn_draw.labelPlacement = "right";
btn_draw.selected = false;
btn_draw.toggle = false;
btn_draw.visible = true;
try {
btn_draw["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package ResortEmpire_fla
Section 335
//Achievement (Achievement)
package {
import pack.Instance.*;
public dynamic class Achievement extends Achievement {
public function Achievement(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 336
//Adding (Adding)
package {
import flash.media.*;
public dynamic class Adding extends Sound {
}
}//package
Section 337
//Application (Application)
package {
import fl.controls.*;
import flash.display.*;
import flash.geom.*;
import com.greensock.*;
import flash.events.*;
import pack.*;
import pack.bitmap.*;
import flash.utils.*;
import com.greensock.plugins.*;
import flash.media.*;
import pack.Instance.*;
import pack.Instance.Booths.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
public class Application extends MovieClip {
public const SIZE_:Number = 24;
private const shortcut:Object;
public var blackD2:MovieClip;
public var navigator1:MovieClip;
public var DB_object5:MovieClip;
public var dialog_tips:MovieClip;
public var dialog_tile:MovieClip;
public var DB_object4:MovieClip;
public var UpdateVersionD:MovieClip;
public var balonD:MovieClip;
public var optionD:MovieClip;
public var navigator3:MovieClip;
public var DB_object3:MovieClip;
public var navigator2:MovieClip;
public var DB_object2:MovieClip;
public var d_employee:MovieClip;
public var DB_object1:MovieClip;
public var tutupD:MovieClip;
public var autoPausedClip:MovieClip;
public var statD:MovieClip;
public var acvD:MovieClip;
public var d_room:MovieClip;
public var DB_object0:MovieClip;
public var btn_mute:SimpleButton;
public var moneyD:MovieClip;
public var d_facility:MovieClip;
public var dialog_facility:MovieClip;
public var mouseCursor:Mouse1;
public var quickdestroyNotif:MovieClip;
public var dialog_scenery:MovieClip;
public var mousing:MovieClip;
public var stageAutoPaused:MovieClip;
public var propertyD:MovieClip;
public var btn_test:Button;
public var expandD:MovieClip;
public var warningDestroy:MovieClip;
public var BoxInputName:MovieClip;
public var mainMenuD:MovieClip;
public var dialog_room:MovieClip;
public var btn_music:SimpleButton;
public var uplevelD:MovieClip;
public var followD:MovieClip;
public var legendD:MovieClip;
public var d_visitor:MovieClip;
public var d_scenery:MovieClip;
public var waitLayar:MovieClip;
public var autoSavedClip:MovieClip;
public var tutup:MovieClip;
public var warningExitD:MovieClip;
public var dialog_extra:MovieClip;
public var pauseD:MovieClip;
public var creditD:MovieClip;
public var BoxLoadGame:MovieClip;
public var optionD1:MovieClip;
public var betaD:MovieClip;
public var menuD:MovieClip;
public var dayAnime:MovieClip;
public var navigatorX:MovieClip;
public var blackD:MovieClip;
public var tempObject:TemporaryObject;
public var DB_object6:MovieClip;
public var __setPropDict:Dictionary;
private var game_version:String;// = "1.1"
public var game:Object;
public var gameRecord:Object;
public var focusing;
public var tempDrag;
public var MapSprite:MapContainer;// = null
public var GuideD:GuideDialog;
public var GuideIn:GuideInGame;
public var FR:uint;
public var k:uint;
public var ROWS:uint;
public var COLS:uint;
public var ROWS_MAX:uint;
public var COLS_MAX:uint;
public var count_upgrade_booth:uint;
public var BOBOT_MAX:Number;
public var playerName:String;
public var RenderTile:MovieClip;
public var RenderBoothTile:MovieClip;
public var RenderPlant:MovieClip;
public var RenderGroundSelect:MovieClip;
public var RenderWall:MovieClip;
public var plantedGround:BitmapData;
public var myCookies:SharedObject;
public var afterRender:Boolean;
public var fadeInMusic:Boolean;
public var firstCall:Boolean;
public var onEndDay:Boolean;
public var isMuteAll:Boolean;
public var fadeOutMusic:Boolean;
public var fadeChangeMusic:Boolean;
public var cheatPlus:uint;// = 0
public var adaSave:Boolean;
public var firstLoad:Boolean;
public var isPreEnterGame:Boolean;
public var isInitObjectRecord:Boolean;
public var canStartPan:Boolean;
public var sedangGuide:Boolean;
public var animeDay:Boolean;
public var ismainloop:Boolean;
public var endrecording:Boolean;
public var day:uint;
public var counter:uint;
public var q:uint;
public var s:uint;
public var ganti_music:uint;
public var isQuality:String;// = "high"
public var jenisMusic:uint;// = 2
public var music:Sound;// = null
public var sfx:Sound;// = null
public var musicChannel:SoundChannel;// = null
public var sfxChannel:SoundChannel;// = null
public var musicTransform:SoundTransform;
public var sfxTransform:SoundTransform;
public var total_booth:uint;
public var total_minibooth:uint;
public var batas_visitor:uint;
public var maxVisitor:uint;
public var musicVol:Number;// = 1
public var minuteDay:uint;
public var minute:Number;
public var hour:Number;
public var hourDay:Number;
public var popularity:Number;
public var popularity_fix:Number;
public var sfxVol:Number;// = 1
public var money:int;
public var money_startday:int;
public var money_tampil:int;
public var money_spend:int;
public var RP_persenFix:Number;
public var max_counter_sec:uint;// = 0
public var max_sec:uint;// = 9
public var max_minute:uint;// = 60
public var star:uint;// = 0
public var sec:uint;
public var tick:uint;
public var jumlah_cottage:uint;
public var jumlah_lodge:uint;
public var janitorBubu:Boolean;
public var autoGeser:Boolean;
public var onPaused:Boolean;
public var autoPaused:Boolean;
public var isLeft:Boolean;
public var isRight:Boolean;
public var isUp:Boolean;
public var isDown:Boolean;
public var pausedAnimation:Boolean;
public var onMouseDestroy:Boolean;
public var onMouseDrag:Boolean;
public var lemparPath:Boolean;
public var adaPathBaru:Boolean;
public var afterDB2_path:Boolean;
public var onGeneralAlpha:Boolean;
public var onAlphaTransparant:Boolean;
public var alwaysShowReport:Boolean;
public var adaBusSpecial:Boolean;
public var jeda_enter:uint;
public var jeda_visitor:uint;
public var maxjeda_visitor:uint;
public var batasRP:uint;
public var RP:uint;
public var RP_real:uint;
public var misi_complete:uint;
public var acv_complete:uint;
public var bus_dummy:uint;
public var bus_bonus:uint;
public var bus_jeda_dummy:uint;
public var bus_jeda_bonus:uint;
public var bus_counter_dummy:uint;
public var bus_counter_bonus:uint;
public var acc:Number;// = 0.5
public var maxspeed:Number;// = 10
public var xspeed:Number;
public var yspeed:Number;
public var speed_effect:uint;
public var speed:uint;// = 1
public var mouseTile:Point;
public var CPOINT:Point;
public var dragPt:Point;
public var globalPoint:Point;
public var dragx:Number;
public var dragy:Number;
public var rand:Number;
public var autoTarget:Object;
public var total_visitorInside:uint;
public var Notif_Temp:Array;
public var TempList_Pop:Array;
public var Mission_Temp:Array;
public var boothing:Boolean;
public var RP_specialVisitorDayMobil:Boolean;
public var RP_visitorDayMobil:Boolean;
private var tileName:String;
private var _memoryUsage:Number;
private var useTileTutorial:Boolean;
private var rday:uint;// = 0
private var temp_sec:uint;
private var opening_anime:Boolean;
private var opening_ending:Boolean;
private var tutorial:Object;
public var endTutorial:Boolean;
public var day_defisit:uint;// = 0
public var isDefisit:Boolean;// = false
public var kali_defisit:uint;// = 0
public var bonus_subsidi:uint;
var initWithGame:Array;
var DBO:Object;
var soundBook:Object;
var opening:MovieClip;
var myClass:Class;
var teruskan:Boolean;
var isMaxVisitor:Boolean;
var bantuRand:Number;
private var couples:uint;
private var belum_event:Boolean;// = false
public function Application():void{
__setPropDict = new Dictionary(true);
myCookies = SharedObject.getLocal("dataq");
musicTransform = new SoundTransform();
sfxTransform = new SoundTransform();
mouseTile = new Point();
CPOINT = new Point();
dragPt = new Point();
initWithGame = ["uplevelD", "followD", "statD", "optionD", "warningExitD", "menuD", "acvD", "legendD", "d_visitor", "d_employee", "d_room", "d_facility", "d_scenery", "expandD", "dialog_extra", "dayAnime", "navigator1", "navigator3", "navigator2", "dialog_scenery", "dialog_tips", "warningDestroy", "DB_object0", "DB_object1", "DB_object3", "DB_object4", "DB_object5", "DB_object6"];
DBO = {DB_object0:true, DB_object1:true, DB_object2:true, DB_object3:true, DB_object4:true, DB_object5:true, DB_object6:true, warningDestroy:true};
soundBook = {click1:"ClickSound1", click2:"ClickSound2", click3:"ClickSound3", build:"BuildSound", adding:"Adding", seat:"Seat", glick:"Glick", zip:"Zip", destroy1:"Destroy1", destroy2:"Destroy2", coin1:"Coin1", bonus1:"BonusCoin1", pop1:"Pop1", upgrade:"Upgrade", fired:"Fired", pause:"PauseSound", notif:"NotifSound", deskbell:"Deskbell", cling:"Cling", blub:"Blub", blub2:"Blub2", tick:"Ticking", car1:"TrukSound", car2:"Car2", klakson:"Klakson", cengkling:"Cengkling", puh:"Puh"};
shortcut = {Escape:{Key_27:true, Key_77:true}, Hide:{Key_81:true}, MoveLeft:{Key_37:true, Key_65:true}, MoveRight:{Key_39:true, Key_68:true}, MoveUp:{Key_38:true, Key_87:true}, MoveDown:{Key_40:true, Key_83:true}, ArrowMouse:{Key_86:true}, DragMouse:{Key_72:true}};
super();
addFrameScript(2, frame3, 3, frame4, 10, frame11);
trace("\n# constructor Application..#default initialization ver", game_version);
showMemoryUsage();
FR = stage.frameRate;
RenderMovieClipAsBitmap();
showMemoryUsage();
CreateNewVariables();
gameRecord = {};
showMemoryUsage();
}
public function showMemoryUsage(_arg1:Boolean=false):void{
var _freeMem = _arg1;
if (_freeMem){
try {
new LocalConnection().connect("foo");
new LocalConnection().connect("foo");
} catch(e) {
};
};
}
function get memoryUsage():Number{
_memoryUsage = ((System.totalMemory / 0x0400) / 0x0400);
return (_memoryUsage);
}
function set memoryUsage(_arg1:Number):void{
_memoryUsage = _arg1;
}
private function CheckLocalData():void{
trace("# Checking cookies...size", myCookies.size);
DefaultUsedVars();
trace(" Usage Memory after DefaultUsedVars");
showMemoryUsage();
if (myCookies.size == 0){
adaSave = false;
trace(" empty record");
} else {
gameRecord = myCookies.data.gameRecord;
adaSave = true;
playerName = gameRecord.playerName;
day = gameRecord["day"];
setMoney(gameRecord.money);
trace(" adaSave", adaSave, "playerName", playerName, "day", (day + 1), "money", money);
};
}
private function setMoney(_arg1:int=0):void{
money = _arg1;
money_tampil = money;
}
private function RenderMovieClipAsBitmap():void{
if (plantedGround){
plantedGround.dispose();
plantedGround = null;
};
if (RenderTile){
RenderTile.removingAll();
RenderTile = null;
};
if (RenderPlant){
RenderPlant.removingAll();
RenderTile = null;
};
if (RenderBoothTile){
RenderBoothTile.removingAll();
RenderTile = null;
};
if (RenderWall){
RenderWall.removingAll();
RenderTile = null;
};
var _local1:MovieClip = new TileClip();
RenderTile = new BlittingSingle(_local1, 50, 26, true);
plantedGround = RenderTile.captureArray[(serbi.dataOb.Tile.TILE_15.fr - 1)];
_local1 = new Scenery();
RenderPlant = new BlittingSingle(_local1, 70, 50, true, 0, 50);
_local1 = new BoothTile();
_local1.ground.hiding();
RenderBoothTile = new BlittingSingle(_local1, 240, 136, true, 25, 84);
_local1 = new Wall();
RenderWall = new BlittingSingle(_local1, 240, 136, true, 25, 84);
_local1 = null;
}
private function CreateNewVariables():void{
trace("# createNewVariables...");
alwaysShowReport = true;
game = {};
game.map = {};
game.objects = {};
game.tabs = [];
game.objects.outers = {};
game.objects.booths = {};
game.objects.Lobby = {};
game.objects.Cottage = [];
game.objects.Lodge = [];
game.objects.Scenery = [];
game.objects.Scenery.Sum = [0, 0, 0, 0, 0, 0, 0, 0];
game.objects.Scenery.Sub_Pop = [0, 0, 0, 0, 0, 0, 0, 0];
game.objects.TileSum = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
game.objects.TileSum.Sub_Pop = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
game.objects.Facility = [];
game.objects.JanitorRoom = [];
game.objects.Mobil = [];
game.visitors = [];
game.janitors = [];
game.sampah = [];
game.notif = [];
game.achievements = [];
game.visitors_insideResort = [];
game.visitorsSpecial_insideResort = [];
game.visitors["enter"] = [];
game.destinationList = [];
game.tiles = [];
game.tilesDat = [];
game.TempData = {};
game.TempData.ListName = {Male:[], Female:[], Couple:[], Staff:[]};
TempList_Pop = [];
TempList_Pop["Facility"] = [];
var _local1:uint = serbi.dataOb.listing.length;
q = 0;
while (q < _local1) {
TempList_Pop["Facility"][serbi.dataOb.listing[q]] = [];
q++;
};
TempList_Pop["JanitorRoom"] = [];
TempList_Pop["Room"] = [];
TempList_Pop["Room"]["Cottage"] = [];
TempList_Pop["Room"]["Lodge"] = [];
SettingSpeed(1, true);
}
private function DefaultUsedVars():void{
trace(" DefaultUsedVars...selalu used in new/load");
isMuteAll = false;
fadeInMusic = false;
fadeOutMusic = false;
fadeChangeMusic = false;
canStartPan = true;
afterRender = false;
autoGeser = false;
onPaused = false;
autoPaused = false;
onAlphaTransparant = false;
adaBusSpecial = false;
isLeft = false;
isRight = false;
isUp = false;
isDown = false;
lemparPath = false;
adaPathBaru = false;
afterDB2_path = false;
onGeneralAlpha = false;
pausedAnimation = false;
jeda_enter = 0;
xspeed = 0;
yspeed = 0;
onMouseDestroy = false;
onMouseDrag = false;
focusing = null;
tempDrag = null;
autoTarget = null;
Notif_Temp = [];
Notif_Temp["belum"] = [];
Notif_Temp["tampil"] = [];
Mission_Temp = [];
jeda_visitor = 0;
maxjeda_visitor = 1;
bus_dummy = 0;
bus_bonus = 0;
bus_counter_dummy = 0;
bus_counter_bonus = 0;
bus_jeda_dummy = 5;
bus_jeda_bonus = 7;
}
public function initMainMenu():void{
trace("# initMainMenu...", (UpdateVersionD == null));
showMemoryUsage(true);
cheatPlus = 0;
mainMenuD.version_t.text = ("ver." + game_version);
UpdateVersionD.visible = false;
tutup.showing();
creditD.init(this);
optionD1.init(this);
BoxInputName.init();
BoxLoadGame.init();
CheckLocalData();
trace("cek*mainmenu*1");
fadeInMusic = true;
firstCall = false;
onEndDay = false;
isPreEnterGame = false;
isInitObjectRecord = false;
MenuIfAdaSave();
mainMenuD.gotoAndStop("stand");
RemoveAllMainMenuListeners();
this.mouseEnabled = false;
this.addEventListener(MouseEvent.CLICK, ClickMainMenu, false, 0, true);
SetSoundMusicMenu();
if (jenisMusic != 1){
BuangMusic(1);
jenisMusic = 1;
PlayMusic();
};
this.addEventListener(Event.ENTER_FRAME, LoopOnMenu, false, 0, true);
}
private function achievementsData():void{
if (adaSave){
game.ACV = (co.cloning(gameRecord.ACV) as Object);
} else {
gameAchievementsNew();
};
}
private function gameAchievementsNew():void{
if (game.ACV == null){
game.ACV = {acv_credit:false, acv_goodResort:false, acv_loveBeingHere:false, acv_goodResearch:false, acv_growingResort:false, acv_rookieResort:false, acv_famousResort:false, acv_marvelousResort:false, acv_grandResort:false, acv_awesomeContractor:false, acv_expertContractor:false, acv_superDev:false, acv_masterDev:false, acv_greenBucks:false, acv_bagOfGold:false, completed:false};
gameRecord.ACV = (co.cloning(game.ACV) as Object);
};
}
private function gameRecordAchievementsNew():void{
gameRecord.ACV = {acv_credit:false, acv_goodResort:false, acv_loveBeingHere:false, acv_goodResearch:false, acv_growingResort:false, acv_rookieResort:false, acv_famousResort:false, acv_marvelousResort:false, acv_grandResort:false, acv_awesomeContractor:false, acv_expertContractor:false, acv_superDev:false, acv_masterDev:false, acv_greenBucks:false, acv_bagOfGold:false, completed:false};
game.ACV = (co.cloning(gameRecord.ACV) as Object);
}
public function updateVersion():void{
var _local4:Boolean;
var _local5:Object;
var _local6:uint;
var _local7:String;
var _local1:String = gameRecord.game_version;
var _local2 = !((_local1 == game_version));
var _local3:Boolean;
if (_local1 == null){
_local1 = "0";
};
trace(" old vers", _local1, ">>new vers", game_version, "before update version, size>>", myCookies.size);
trace(" changeVersion :)", _local2);
if (_local2){
if (Number(_local1) < 1){
if (gameRecord.tutorial){
_local4 = gameRecord.tutorial.endGuide;
delete gameRecord.tutorial;
} else {
_local4 = gameRecord["endGuide"];
};
gameRecord["endGuide"] = _local4;
_local5 = (gameRecord.notif as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.tiles as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.objects.Scenery as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = gameRecord.objects.Lobby;
game.objects.booths[((_local5.jenis + "_") + _local5["id"])] = null;
_local5.boothSort = null;
_local5.ob = null;
_local5 = (gameRecord.objects.Facility as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
game.objects.booths[((_local5[q].jenis + "_") + _local5[q]["id"])] = null;
_local5[q].boothSort = null;
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.objects.Cottage as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
game.objects.booths[((_local5[q].jenis + "_") + _local5[q]["id"])] = null;
_local5[q].boothSort = null;
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.objects.Lodge as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
game.objects.booths[((_local5[q].jenis + "_") + _local5[q]["id"])] = null;
_local5[q].boothSort = null;
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.objects.Mobil as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.objects.JanitorRoom as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
game.objects.booths[((_local5[q].jenis + "_") + _local5[q]["id"])] = null;
_local5[q].boothSort = null;
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.janitors as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.sampah as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = (gameRecord.visitors as Array);
_local6 = _local5.length;
q = 0;
while (q < _local6) {
_local5[q].ob = null;
q++;
};
_local5 = null;
_local3 = true;
};
if (Number(_local1) < 1.1){
} else {
if (Number(_local1) < 1.11){
for (_local7 in gameRecord.Missions) {
if (_local7 == "x_earn"){
delete gameRecord.Missions.x_earn;
gameRecord.Missions.x_money = false;
break;
};
};
myCookies.data.gameRecord.Missions = gameRecord.Missions;
};
};
if (_local3){
gameRecord.game_version = game_version;
myCookies.data.gameRecord = gameRecord;
} else {
gameRecord.game_version = game_version;
myCookies.data.gameRecord.game_version = game_version;
};
};
trace(" after update version, size>>", myCookies.size);
}
private function RemoveAllMainMenuListeners():void{
this.removeEventListener(MouseEvent.CLICK, ClickMainMenu);
}
private function MenuIfAdaSave():void{
if (adaSave){
co.changeTint(mainMenuD.btn_load, false);
mainMenuD.btn_load.mouseEnabled = true;
} else {
co.changeTint(mainMenuD.btn_load);
mainMenuD.btn_load.mouseEnabled = false;
};
}
private function randomPlayerName():void{
var _local1:Array = serbi.resortName;
s = co.randomRangeR(_local1.length);
playerName = _local1[s];
_local1 = null;
}
private function ClickMainMenu(_arg1:MouseEvent):void{
var _local2:Object = _arg1.target;
var _local3:String = _local2.name;
if (_local3 == "btn_playGame"){
PlaySound("click1");
mainMenuD.gotoAndPlay("init_load");
} else {
if (_local3 == "btn_back"){
PlaySound("click1");
mainMenuD.gotoAndStop("stand");
} else {
if (_local3 == "btn_newGame"){
CallFadeInOutMusic(false, true, false);
PlaySound("click1");
mainMenuD.gotoAndPlay("standby1");
randomPlayerName();
BoxInputName.showing(playerName);
} else {
if ((((_local3 == "btn_cancel")) && ((_local2.parent == BoxInputName)))){
CallFadeInOutMusic(true, false, false);
PlaySound("click1");
mainMenuD.gotoAndPlay("init_load");
BoxInputName.hiding();
} else {
if ((((_local3 == "btn_ok")) && ((_local2.parent == BoxInputName)))){
CallFadeInOutMusic(false, true, false);
PlaySound("click1");
ClearData();
MenuIfAdaSave();
loadDataGame(false);
playerName = BoxInputName.input_t.text;
BoxInputName.hiding();
RemoveAllMainMenuListeners();
tutup.showing();
GoToGame0();
} else {
if (_local3 == "btn_load"){
CallFadeInOutMusic(false, true, false);
PlaySound("click1");
mainMenuD.gotoAndPlay("standby1");
playerName = gameRecord.playerName;
BoxLoadGame.isi(playerName, (day + 1));
BoxLoadGame.showing();
} else {
if ((((_local3 == "btn_cancel")) && ((_local2.parent == BoxLoadGame)))){
CallFadeInOutMusic(true, false, false);
PlaySound("click1");
mainMenuD.gotoAndPlay("init_load");
BoxLoadGame.hiding();
} else {
if ((((_local3 == "btn_ok")) && ((_local2.parent == BoxLoadGame)))){
PlaySound("click1");
BoxLoadGame.hiding();
RemoveAllMainMenuListeners();
loadDataGame(true);
GoToGame0();
} else {
if (_local3 == "btn_music"){
isMuteAll = true;
CallFadeInOutMusic(false, false, false);
PlaySound("click1");
SettingSound(0);
SettingMusic(0);
SetSoundMusicMenu();
} else {
if (_local3 == "btn_mute"){
isMuteAll = false;
CallFadeInOutMusic(true, false, false);
PlaySound("click1");
SettingSound(1);
SettingMusic(1);
SetSoundMusicMenu();
} else {
if (_local3 == "btn_option"){
PlaySound("click1");
optionD1.opened();
mainMenuD.gotoAndPlay("standby1");
} else {
if (_local3 == "btn_credit"){
PlaySound("click1");
creditD.opened();
} else {
if (_local3 == "btn_back"){
PlaySound("click1");
} else {
if (_local3 == "btn_more"){
PlaySound("click1");
gotoSponsorWebsite();
} else {
if (_local3 == "btn_sponsor"){
PlaySound("click1");
gotoSponsorWebsite();
} else {
if (_local3 == "btn_developer"){
PlaySound("click1");
gotoDeveloperWebsite();
} else {
if (_local3 == "btn_cheat"){
cheatPlus = (cheatPlus + 10000);
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
_local2 = null;
}
private function initializatinAreaMap(_arg1):void{
COLS = serbi.EXPAND[_arg1].COLS;
ROWS = serbi.EXPAND[_arg1].ROWS;
}
private function DefaultGameVars():void{
var _local2:String;
trace("# defaultGameVars awal...tiap new game");
game.Cottage_booked = 0;
game.Lodge_booked = 0;
day = 0;
setMoney(10000);
randomPlayerName();
star = 0;
RP = 0;
game.EXPAND = 0;
game.likeSponsor = false;
game.likeLG = false;
game.RP_createData = [];
game.RP_createData["Cottage"] = [0, 0, 0];
game.RP_createData["Lodge"] = [0, 0, 0];
game.RP_createData["JanitorRoom"] = [0, 0, 0];
game.RP_createData["Medical"] = 0;
game.RP_createData["Golf"] = 0;
game.RP_createData["Pool"] = 0;
game.RP_createData["Minimarket"] = 0;
game.ID = {Lobby:1, Visitor:1, Janitor:1, Cottage:1, Lodge:1, Sauna:1, Gym:1, Jacuzi:1, Arcade:1, Spa:1, Pool:1, Golf:1, Medical:1, Bar:1, Minimarket:1, JapanResto:1, BaratResto:1, IndiaResto:1, Icecream:1, Hotdog:1, Taco:1, Giftshop:1, JanitorRoom:1, Notif:1, Sampah:1, Mobil:1, Achievement:1};
game.SUM = {Sauna:0, Gym:0, Jacuzi:0, Arcade:0, Spa:0, Pool:0, Golf:0, Medical:0, Bar:0, Minimarket:0, JapanResto:0, BaratResto:0, IndiaResto:0, Icecream:0, Hotdog:0, Taco:0, Giftshop:0, Tile:0};
game.popularity = {Scenery:0, Tile:0, Booth:0, JanitorRoom:0, Visitor:0, Lobby:0, Room:0, Facility:0, Cottage:0, Lodge:0, Lain:0, Sauna:0, Gym:0, Jacuzi:0, Arcade:0, Spa:0, Pool:0, Golf:0, Medical:0, Bar:0, Minimarket:0, JapanResto:0, BaratResto:0, IndiaResto:0, Icecream:0, Hotdog:0, Taco:0, Giftshop:0};
game.MISC = {Income:0, Expend:0, LastIncome:0, LastExpend:0, Scenery_Expend:0, Tile_Expend:0, StaffSalary:0, JanitorSalary:0, SampahDay:0, OutResort:0, ValueOutResort:0, ValueUser:0, RateOutResort:0, Visitor25:0, Visitor26:0, Visitor27:0, Visitor28:0, Visitor29:0, Bonus:0, Expand:0, Extra:0};
game.UNLOCKED = {Cottage:true, Lodge:false, Sauna:true, Gym:false, Jacuzi:false, Arcade:false, Spa:false, Pool:false, Golf:false, Medical:false, Bar:false, Minimarket:false, JapanResto:false, BaratResto:false, IndiaResto:false, Icecream:true, Hotdog:false, Taco:false, Giftshop:false, Expand1:false, Expand2:false, PLANT_1:true, PLANT_2:true, PLANT_3:true, PLANT_4:false, PLANT_5:false, PLANT_6:false, PLANT_7:false, PLANT_8:false};
game.UNLOCKED_new = {Tips:false, Room:false, Facility:false, Expand1:false, Expand2:false, Extra:false, heater:false, wifi:false, irrigation:false, treadmill:false, aid:false, wine:false, gardening:false, towel:false, uniform:false, bamboo:false, palm:false, leaf:false, sauce:false, wallpaper:false, meat:false, Scenery:false};
game.EXTRA = {heater:false, wifi:false, irrigation:false, treadmill:false, aid:false, wine:false, gardening:false, towel:false, uniform:false, bamboo:false, palm:false, leaf:false, sauce:false, wallpaper:false, meat:false};
game.ACV = {acv_credit:false, acv_goodResort:false, acv_loveBeingHere:false, acv_goodResearch:false, acv_growingResort:false, acv_rookieResort:false, acv_famousResort:false, acv_marvelousResort:false, acv_grandResort:false, acv_awesomeContractor:false, acv_expertContractor:false, acv_superDev:false, acv_masterDev:false, acv_greenBucks:false, acv_bagOfGold:false, completed:false};
game.specialVisitor = {Visitor25:{ada:false, pernah:false, last_mood:0, last_visit:0, add_day:0}, Visitor26:{ada:false, pernah:false, last_mood:0, last_visit:0, add_day:0}, Visitor27:{ada:false, pernah:false, last_mood:0, last_visit:0, add_day:0}, Visitor28:{ada:false, pernah:false, last_mood:0, last_visit:0, add_day:0}, Visitor29:{ada:false, pernah:false, last_mood:0, last_visit:0, add_day:0}};
game.totalRP = {Scenery:0, Tile:0, Khusus:0, Facility:0, Room:0, Lobby:0, JanitorRoom:0, Janitor:0, Mobil:0};
game.RP_khusus = {destroy_scenery:0, all_scenery:0, goto_scenery:0, destroy_tile_walkable:0, destroy_tile_unwalkable:0, all_tile:0, goto_visitor:0, goto_visitor_room:0, goto_visitor_facility:0, goto_janitor:0, goto_janitorRoom:0, fire_a_janitor:0, rotate_a_booth:0, goto_facility:0, goto_cottage:0, goto_lodge:0, click_legend:0, click_extraUpgrade:0, click_tips:0, click_hideBuildings:0, destroy_a_room:0, destroy_a_facility:0, destroy_a_standbooth:0, change_cottage_name:0, change_lodge_name:0, change_facility_name:0, click_a_janitor:0, click_a_visitor:0, click_a_scenery:0, click_a_tile:0, click_lobby:0, click_a_booth:0};
var _local1:uint = serbi.Mission.listing.length;
game.Missions = [];
q = 0;
while (q < _local1) {
_local2 = serbi.Mission.listing[q];
game.Missions.push({initial:_local2, cleared:false, onsort:0});
q++;
};
_local1 = serbi.Tips.listing.length;
game.Tips = {};
game.Tips.listing = {};
q = 0;
while (q < _local1) {
_local2 = serbi.Tips.listing[q];
game.Tips.listing[_local2] = {showed:false, new_tips:false, _page:(q + 1)};
q++;
};
game.Tips.NewOnList = [];
isDefisit = false;
day_defisit = 0;
kali_defisit = 0;
CreateTempData_baruBuat();
counter = CounterHour(8);
}
public function namaSpecial(_arg1:String):String{
var _local2:String = serbi.dataOb.Visitor[_arg1]["nick"];
return (_local2);
}
private function FromDataRecord():void{
var _local1:Array;
var _local2:Array;
var _local3:*;
var _local4:Object;
var _local6:*;
var _local8:*;
var _local9:String;
trace("#FromDataRecord...", (game.objects == null));
game.EXPAND = gameRecord.EXPAND;
hour = (day * 24);
counter = CounterHour(hour);
star = gameRecord.star;
game.Cottage_booked = gameRecord.Cottage_booked;
game.Lodge_booked = gameRecord.Lodge_booked;
game.RP_createData = (co.cloning(gameRecord.RP_createData) as Array);
game.MISC = (co.cloning(gameRecord.MISC) as Object);
game.ID = (co.cloning(gameRecord.ID) as Object);
game.SUM = (co.cloning(gameRecord.SUM) as Object);
game.popularity = (co.cloning(gameRecord.popularity) as Object);
game.totalRP = (co.cloning(gameRecord.totalRP) as Object);
game.RP_khusus = (co.cloning(gameRecord.RP_khusus) as Object);
game.UNLOCKED = (co.cloning(gameRecord.UNLOCKED) as Object);
game.UNLOCKED_new = (co.cloning(gameRecord.UNLOCKED_new) as Object);
if (star == 11){
if (game.UNLOCKED_new.Extra){
game.UNLOCKED_new.Extra = false;
};
};
game.EXTRA = (co.cloning(gameRecord.EXTRA) as Object);
game.ACV = (co.cloning(gameRecord.ACV) as Object);
game.specialVisitor = (co.cloning(gameRecord.specialVisitor) as Object);
game.objects.Lobby = (co.cloning(gameRecord.objects.Lobby) as Object);
game.objects.Scenery = (co.cloning(gameRecord.objects.Scenery) as Array);
game.objects.Facility = (co.cloning(gameRecord.objects.Facility) as Array);
game.objects.Cottage = (co.cloning(gameRecord.objects.Cottage) as Array);
game.objects.Lodge = (co.cloning(gameRecord.objects.Lodge) as Array);
game.objects.Mobil = (co.cloning(gameRecord.objects.Mobil) as Array);
game.objects.JanitorRoom = (co.cloning(gameRecord.objects.JanitorRoom) as Array);
game.visitors = (co.cloning(gameRecord.visitors) as Array);
_local1 = gameRecord.Missions;
_local2 = serbi.Mission.listing;
var _local5:uint = _local2.length;
var _local7:uint = _local1.length;
q = 0;
for (;q < _local5;q++) {
_local8 = _local2[q];
_local3 = _local1[q];
_local9 = _local3.initial;
if (_local8 == _local9){
continue;
} else {
_local4 = _local3;
_local6 = 0;
while (_local6 < _local7) {
_local3 = _local1[_local6];
_local9 = _local3.initial;
if (_local9 == _local8){
_local1[q] = _local3;
_local1[_local6] = _local4;
_local4 = null;
_local3 = null;
break;
};
_local6++;
};
};
};
_local1 = null;
_local2 = null;
_local3 = null;
_local4 = null;
game.Missions = (co.cloning(gameRecord.Missions) as Array);
game.Tips = (co.cloning(gameRecord.Tips) as Object);
game.janitors = (co.cloning(gameRecord.janitors) as Array);
game.sampah = (co.cloning(gameRecord.sampah) as Array);
game.notif = (co.cloning(gameRecord.notif) as Array);
game.tiles = (co.cloning(gameRecord.tiles) as Array);
isDefisit = gameRecord.isDefisit;
day_defisit = gameRecord.day_defisit;
kali_defisit = gameRecord.kali_defisit;
if (gameRecord.TempData){
game.TempData = (co.cloning(gameRecord.TempData) as Object);
} else {
CreateTempData_baruBuat();
};
}
private function NeedToGameRecord():void{
trace("NeedToGameRecord: DAY ", day);
gameRecord.game_version = game_version;
gameRecord.playerName = playerName;
gameRecord.EXPAND = game.EXPAND;
gameRecord["day"] = day;
gameRecord.money = money;
gameRecord.star = star;
gameRecord.Cottage_booked = game.Cottage_booked;
gameRecord.Lodge_booked = game.Lodge_booked;
gameRecord.RP_createData = (co.cloning(game.RP_createData) as Array);
gameRecord.ID = (co.cloning(game.ID) as Object);
gameRecord.SUM = (co.cloning(game.SUM) as Object);
gameRecord.MISC = (co.cloning(game.MISC) as Object);
gameRecord.popularity = (co.cloning(game.popularity) as Object);
gameRecord.UNLOCKED = (co.cloning(game.UNLOCKED) as Object);
gameRecord.UNLOCKED_new = (co.cloning(game.UNLOCKED_new) as Object);
gameRecord.EXTRA = (co.cloning(game.EXTRA) as Object);
gameRecord.ACV = (co.cloning(game.ACV) as Object);
gameRecord.totalRP = (co.cloning(game.totalRP) as Object);
gameRecord.RP_khusus = (co.cloning(game.RP_khusus) as Object);
gameRecord.specialVisitor = (co.cloning(game.specialVisitor) as Object);
gameRecord.notif = (co.cloning(game.notif) as Array);
gameRecord.tiles = (co.cloning(game.tiles) as Array);
if (gameRecord.objects == null){
gameRecord.objects = new Object();
};
gameRecord.objects.Scenery = (co.cloningRecord(game.objects.Scenery) as Array);
gameRecord.objects.Lobby = (co.cloning(game.objects.Lobby) as Object);
gameRecord.objects.Facility = (co.cloning(game.objects.Facility) as Array);
gameRecord.objects.Cottage = (co.cloning(game.objects.Cottage) as Array);
gameRecord.objects.Lodge = (co.cloning(game.objects.Lodge) as Array);
gameRecord.objects.Mobil = (co.cloning(game.objects.Mobil) as Array);
gameRecord.objects.JanitorRoom = (co.cloning(game.objects.JanitorRoom) as Array);
gameRecord.janitors = (co.cloning(game.janitors) as Array);
gameRecord.sampah = (co.cloning(game.sampah) as Array);
gameRecord.TempData = (co.cloning(game.TempData) as Object);
gameRecord.visitors = (co.cloning(game.visitors) as Array);
gameRecord.Missions = (co.cloning(game.Missions) as Array);
gameRecord.Tips = (co.cloning(game.Tips) as Object);
gameRecord.isDefisit = isDefisit;
gameRecord.day_defisit = day_defisit;
gameRecord.kali_defisit = kali_defisit;
}
private function showWhatRecording(_arg1:Boolean=true):void{
}
public function ClearData():void{
trace("# CLEAR DATA");
myCookies.clear();
trace(" cleared: ", adaSave, myCookies.size, myCookies.data.gameRecord);
trace(" gameRecord == null?", (gameRecord == null));
if (navigatorX){
navigatorX.size_t.text = (myCookies.size + " byte");
};
CreateNewVariables();
gameRecord = {};
adaSave = false;
}
public function SaveData():void{
trace("#################################################SAVE DATA");
autoSaved();
}
public function autoSaved():void{
trace("DAY::", day, "AUTOSAVED! size before", myCookies.size);
endrecording = false;
if (!alwaysShowReport){
CallAutoPaused();
};
autoSavedClip.isi((("DAY " + String(day)) + " AUTOSAVED"));
dispatchEvent(new Eventku(Eventku.AUTO_SAVED));
NeedToGameRecord();
dispatchEvent(new Eventku(Eventku.END_SAVED));
myCookies.data.gameRecord = gameRecord;
myCookies.flush(myCookies.size);
trace("after record->size::", myCookies.size);
navigatorX.size_t.text = (myCookies.size + " byte");
endrecording = true;
trace("GOOD..continue anim save");
}
public function BackToCover():void{
var _local1:String;
trace("# BackToCover");
RemoveAllMainListeners();
onFocus(null, false);
if (GuideD != null){
GuideD.removingAll();
GuideD = null;
};
if (GuideIn != null){
GuideIn.removingAll();
};
removeNotif_AllOnReplay();
removeSampahGarbages_All();
tempObject.removingAll();
s = initWithGame.length;
q = 0;
while (q < s) {
_local1 = initWithGame[q];
this[_local1].removingAll();
q++;
};
TempList_Pop = null;
Mission_Temp = null;
dispatchEvent(new Eventku(Eventku.REMOVING_ALL));
dispatchEvent(new Eventku(Eventku.REMOVING_TILE));
MapSprite.removingAll();
MapSprite = null;
RemoveAllMainListeners(false);
game = null;
CreateNewVariables();
showMemoryUsage(true);
this.gotoAndStop("menu");
}
private function loadDataGame(_arg1:Boolean=true):void{
trace("loadDataGame>>from sharedObj?", _arg1);
if (_arg1){
FromDataRecord();
} else {
DefaultGameVars();
};
countTotalAcv();
hitungPopularity(true);
CalculateHour();
initializatinAreaMap(game.EXPAND);
COLS_MAX = serbi.EXPAND[2].COLS;
ROWS_MAX = serbi.EXPAND[2].ROWS;
BOBOT_MAX = ((COLS_MAX * ROWS_MAX) - 1);
batas_visitor = calculateBatasVisitor();
}
public function GoToGame0():void{
trace("== go to game ==");
optionD1.removingAll();
creditD.removingAll();
UpdateVersionD.removingAll();
gotoAndPlay("pre_load");
}
public function PreLoad():void{
trace("#Memory on PreLoad...");
waitLayar.showing2("build map");
}
public function PreGame():void{
}
public function CallProgram():void{
trace(">>>CallProgram main game....", adaSave, day);
showMemoryUsage(true);
navigatorX.size_t.text = (myCookies.size + " byte");
betaD.hiding();
firstLoad = true;
endTutorial = ((day)==0) ? false : true;
opening_anime = !(endTutorial);
opening_ending = endTutorial;
sedangGuide = false;
animeDay = false;
ismainloop = false;
endrecording = false;
useTileTutorial = false;
belum_event = false;
setMoney((money + cheatPlus));
mouseCursor.init(this);
tempObject.init(this);
autoSavedClip.init();
dayAnime.init(this);
mousing.y = -50;
mousing.x = -50;
mousing.mouseEnabled = false;
mousing.mouseChildren = false;
onFocus(null, false);
balonD.init();
RemoveTempObject();
stageAutoPaused.hiding();
quickdestroyNotif.hiding();
dataForAchievement();
dataForMission();
dataForTips();
DB_object0.init();
DB_object1.init();
DB_object2.init();
DB_object3.init();
DB_object4.init();
DB_object5.init();
DB_object6.init();
warningDestroy.init();
moneyD.init();
propertyD.callDefault();
uplevelD.init();
expandD.init(this);
dataGrid();
navigator2.init(this);
navigator1.init(this);
navigator3.init(this);
optionD.init(this);
legendD.init(this);
menuD.init(this);
statD.init(this);
followD.init(this);
acvD.init(this, true);
warningExitD.init(this);
creditD.init(this, true);
navigator3.jam.jalanJam(hourDay);
blackD.visible = false;
blackD2.visible = false;
navigator3.setMoney(money);
countTotalBooth();
countMinibooth();
realTimeResort("popularity");
navigator1.btn_visitor.visitor_t.text = 0;
realTimeResort("employee");
realTimeResort("scenery");
updateRealTime("Room", 0, "Cottage");
updateRealTime("Room", 0, "Lodge");
updateRealTime("JanitorRoom", 0, "JanitorRoom");
updateRealTime("Facility", 0, "Sauna");
updateRealTime("Facility", 0, "Gym");
updateRealTime("Facility", 0, "Jacuzi");
updateRealTime("Facility", 0, "Arcade");
updateRealTime("Facility", 0, "Spa");
updateRealTime("Facility", 0, "Pool");
updateRealTime("Facility", 0, "Golf");
updateRealTime("Facility", 0, "Medical");
updateRealTime("Facility", 0, "Bar");
updateRealTime("Facility", 0, "Minimarket");
updateRealTime("Facility", 0, "JapanResto");
updateRealTime("Facility", 0, "BaratResto");
updateRealTime("Facility", 0, "IndiaResto");
updateRealTime("Facility", 0, "Icecream");
updateRealTime("Facility", 0, "Hotdog");
updateRealTime("Facility", 0, "Taco");
updateRealTime("Facility", 0, "Giftshop");
hitungTotalRP(true);
SettingPauseD();
isPreEnterGame = false;
isInitObjectRecord = false;
tutup.showing();
trace("#Memory before CatchMap...");
CatchMapSprite();
MapSprite.initObject();
trace("#After CreateMap...");
this.addEventListener(Event.ENTER_FRAME, JedaToCreateGamePlay, false, 0, true);
}
private function dataForAchievement():void{
count_upgrade_booth = 0;
money_spend = 0;
}
private function dataForMission():void{
var _local1:Array = game.Missions;
var _local2:uint = _local1.length;
misi_complete = 0;
q = 0;
while (q < _local2) {
if (_local1[q].cleared){
misi_complete++;
} else {
Mission_Temp.push(_local1[q]);
};
q++;
};
_local1 = null;
}
private function dataForTips():void{
}
public function JedaToMainGame(_arg1:Event):void{
if (tutup.currentLabel == "end_to_white"){
tutup.hiding();
this.removeEventListener(Event.ENTER_FRAME, LoopOnMenu);
this.removeEventListener(Event.ENTER_FRAME, JedaToMainGame);
trace("== go to game ==");
gotoAndStop("game");
};
}
private function CatchMapSprite():void{
var _local3:uint;
var _local4:uint;
trace("before add MapSprite nc=", MapContainer, this.numChildren, (MapSprite == null));
MapSprite = new MapContainer();
MapSprite.name = "MapSprite";
MapSprite.x = 80;
MapSprite.y = 240;
this.addChild(MapSprite);
this.setChildIndex(MapSprite, 0);
var _local1:uint = game.tiles.length;
var _local2 = "";
k = 0;
while (k < _local1) {
_local3 = game.tiles[k].ptile.x;
_local4 = game.tiles[k].ptile.y;
_local2 = ((("tile_" + _local3) + "_") + _local4);
game.tilesDat[_local2] = k;
k++;
};
if (!opening_ending){
opening = new Opening();
_local1 = this.getChildIndex(waitLayar);
opening.init(this, _local1);
};
MapSprite.CatchClipI(this);
}
private function showCon():void{
var _local3:int;
var _local4:*;
trace("Show Big Child");
var _local1:uint = this.numChildren;
var _local2:uint;
var _local5:Array = [];
k = 0;
while (k < _local1) {
_local4 = this.getChildAt(k);
trace("child=", _local4, _local4.name);
if ((_local4 is MapContainer)){
_local2++;
} else {
_local3 = cariInArray(_local5, _local4);
if (_local3 == -1){
_local5.push({ob:_local4, nama:_local4.name, jumlah:1});
} else {
_local5[_local3].jumlah++;
};
};
k++;
};
trace("jumlah MapContainer = ", _local2);
}
private function cariInArray(_arg1:Array, _arg2):int{
var _local3:uint;
var _local4 = -1;
var _local5:uint = _arg1.length;
_local3 = 0;
while (_local3 < _local5) {
if ((((_arg1[_local3].ob == _arg2)) && ((_arg1[_local3].nama == _arg2.name)))){
_local4 = _local3;
break;
};
_local3++;
};
return (_local4);
}
public function JedaToCreateGamePlay(_arg1:Event):void{
if (isPreEnterGame){
jeda_enter++;
if (counterToTick(jeda_enter) > 0){
trace("----YA PRE-ENTER ----", jeda_enter, opening_anime);
jeda_enter = 0;
removeTempMainloop();
this.removeEventListener(Event.ENTER_FRAME, JedaToCreateGamePlay);
waitLayar.hiding();
tutupD.showing();
if (opening_ending){
removeOpening();
} else {
opening.anime();
};
};
} else {
if (!isInitObjectRecord){
trace("# READY TO CREATE GAME");
waitLayar.showing2("initialize objects");
CallFadeInOutMusic(false, false, true);
createObjectRecord();
realTimeResort("visitor");
isInitObjectRecord = true;
isPreEnterGame = true;
};
};
}
public function removeOpening():void{
trace("ready to removeOpening...");
navigator1.opening();
navigator2.opening();
navigator3.opening();
opening_anime = false;
opening_ending = true;
createListenersAfterOpening();
}
private function createListenersAfterOpening():void{
navigatorX.addEventListener(MouseEvent.CLICK, clickNavigatorX, false, 0, true);
navigatorX.addEventListener(MouseEvent.MOUSE_OVER, overNavigatorX, false, 0, true);
MapSprite.addEventListener(MouseEvent.MOUSE_DOWN, ClickContainer, false, 0, true);
MapSprite.addEventListener(MouseEvent.MOUSE_OVER, OverContainer, false, 0, true);
MapSprite.addEventListener(MouseEvent.MOUSE_MOVE, OnDrawTile, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_MOVE, MouseMainMoving, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_DOWN, PressKey, false, 0, true);
stage.addEventListener(KeyboardEvent.KEY_UP, ReleaseKey, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_DOWN, StageMouseDown, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, StageMouseUp, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_OVER, StageMouseOver, false, 0, true);
canStartPan = true;
if (endTutorial){
navigator2.openIntroduction("dragMouse");
ShowFirstReport();
} else {
CreateTutorial();
};
}
private function CreateTutorial():void{
GuideD = new GuideDialog();
this.addChild(GuideD);
GuideD.init(this);
useTileTutorial = true;
endTutorial = false;
MapSprite.ObjectForTutorial();
stage.addEventListener(Event.ENTER_FRAME, Temp_MainLoop, false, 0, true);
ShowGuide("introduction");
}
public function createGuideInGame():void{
GuideIn = new GuideInGame();
GuideIn.init(this);
CallAutoPaused();
}
public function removeGuideInGame():void{
GuideIn = null;
RemoveAutoPaused();
}
private function removeTempMainloop():void{
stage.removeEventListener(Event.ENTER_FRAME, Temp_MainLoop);
}
public function tambahEvent(_arg1:Boolean=false):void{
if (!belum_event){
trace("tambahEvent");
boothing = false;
addEventListener(Eventku.AFTER_TICK, DoSomethingAfterTick);
addEventListener(Eventku.AFTER_RECLOAD, Boothing);
belum_event = true;
};
}
private function GameStartFunction(_arg1:Eventku):void{
trace("GameStartFunction");
}
public function counterToTick(_arg1:uint=0):uint{
return ((_arg1 / FR));
}
public function MainLoop(_arg1:Event):void{
if (!onPaused){
if (animeDay){
} else {
if (endTutorial){
TimerFunction();
};
};
} else {
if (lemparPath){
if (!DB_object2.visible){
if (((!(propertyD.visible)) || ((tempObject.sub == "JanitorRoom")))){
MapSprite.updateFindingPath2();
};
};
};
};
MusicLoopEffects();
notificationFunction();
if (autoGeser){
MoveAuto();
} else {
if (autoPaused){
MoveWithPress();
} else {
if (!onPaused){
MoveWithPress();
};
};
};
if (endrecording){
if (autoSavedClip.currentLabel == "stopwhile"){
autoSavedClip.continueAnim();
if (!alwaysShowReport){
if (((autoPaused) && (!(statD.visible)))){
RemoveAutoPaused();
};
};
endrecording = false;
};
};
}
public function Temp_MainLoop(_arg1:Event):void{
notificationFunction();
if (autoGeser){
MoveAuto();
} else {
if (autoPaused){
MoveWithPress();
} else {
if (!onPaused){
MoveWithPress();
};
};
};
}
public function After_FPS_Tick(_arg1:Eventku):void{
}
public function DoSomethingAfterTick(_arg1:Eventku):void{
var _local2:uint;
removeSampahGarbages();
removeNotifGarbages();
if ((((hourDay >= 6)) && ((hourDay <= 18)))){
janitorBubu = false;
navigator3.jam.toSiang();
dispatchEvent(new Eventku(Eventku.SIANG));
if (!lemparPath){
visitorSpecialFunction();
visitorFunction();
mobilFunction();
};
} else {
navigator3.jam.toMalam();
dispatchEvent(new Eventku(Eventku.MALAM));
if (!lemparPath){
if ((((hourDay > 5)) && ((hourDay < 22)))){
visitorSpecialFunction();
};
visitorFunction(false);
mobilFunction(false);
};
};
if (day < HitungHari()){
boothing = false;
_local2 = (day + 1);
if (_local2 > 1){
reportEndDay();
onEndDay = true;
if (alwaysShowReport){
navigator3.statEndDay(true);
} else {
closingStatFunction(true, true);
};
};
};
}
public function closingStatFunction(_arg1:Boolean=false, _arg2:Boolean=false, _arg3:Boolean=true):void{
CheckOnFirstStat();
statD.temporaryStat();
adaPathBaru = false;
RemoveAutoPaused();
IfSedangGuide(false);
if (((_arg1) && (_arg2))){
autoSavedDataCalling();
};
firstCall = false;
if (_arg3){
continueDayGame();
anime_startNewDay();
CheckAchievements_spc("unlocked_booth");
};
_arg1 = false;
onEndDay = false;
if (day > 4){
if (this["parent"].url_hack){
betaD.showing();
} else {
betaD.hiding();
};
} else {
betaD.hiding();
};
}
public function checkProfit(_arg1:int=0):void{
CheckMissions("x_profit", 0, _arg1);
CheckMissions("x_profit2", 0, _arg1);
showMemoryUsage(true);
}
public function autoSavedDataCalling():void{
autoSaved();
showMemoryUsage(true);
}
public function continueDayGame():void{
day++;
rday = (day % 2);
navigator3.setDay();
reloadDayRecord();
waitLayar.hiding();
}
private function ShowFirstReport():void{
trace("# ShowFirstReport", adaSave);
if (adaSave){
CalculateHour();
navigator3.jam.jalanJam(hourDay);
navigator3.jam.toMalam();
firstCall = true;
onEndDay = true;
if (alwaysShowReport){
navigator3.statEndDay();
} else {
closingStatFunction();
};
navigator3.setDay();
} else {
navigator3.jam.toSiang();
FirstCallNextDay();
tambahEvent();
if (endTutorial){
anime_startNewDay();
setNextMissions();
};
};
}
private function newGuide():void{
tutorial = {};
tutorial.urutan = ["introduction", "introduction2", "intro_area", "intro_room", "open_room", "navi_room", "intro_tiles", "intro_tiles2", "open_tiles", "navi_tiles", "intro_scenery", "open_scenery", "navi_scenery", "intro_extra", "intro_tips", "intro_drag", "navi_all", "guide_bye", "to_top", "endGuide"];
var _local1:Array = tutorial.urutan;
var _local2:uint = _local1.length;
q = 0;
while (q < _local2) {
tutorial[_local1[q]] = false;
q++;
};
_local1 = null;
}
private function ShowGuide(_arg1:String):void{
if (_arg1 == "introduction"){
navigator3.jam.toSiang();
FirstCallNextDay();
tambahEvent(true);
newGuide();
navigator2.introduction1();
};
GuideD.showing(_arg1);
}
public function ShowedGuide(_arg1:String):void{
var _local3:String;
tutorial[_arg1] = true;
tutorial.urutan.shift();
var _local2:uint = tutorial.urutan.length;
if (_local2 <= 1){
forcingEndTutorial();
} else {
_local3 = tutorial.urutan[0];
ShowGuide(_local3);
if (_local3 == "intro_room"){
setNextMissions();
} else {
if (_local3 == "open_room"){
MapSprite.setBorderGuide("room");
} else {
if (_local3 == "intro_tiles"){
MapSprite.setBorderGuide("");
} else {
if (_local3 == "open_tiles"){
MapSprite.setBorderGuide("tiles");
} else {
if (_local3 == "intro_scenery"){
MapSprite.setBorderGuide("");
useTileTutorial = false;
};
};
};
};
};
};
}
public function forcingEndTutorial():void{
PlaySound("zip");
sedangGuide = false;
endTutorial = true;
useTileTutorial = false;
MapSprite.setBorderGuide("");
animeDay = true;
navigator2.openIntroduction_all();
tutorial.urutan = null;
GuideD.removingAll();
GuideD = null;
anime_startNewDay();
money_startday = money;
setNextMissions();
if (misi_complete > 5){
TampilkanNewTips("clearedMission", true);
};
}
public function checkingGuide(_arg1:String, _arg2:Boolean=true, _arg3:Point=null):void{
var _local4:String;
var _local5:uint;
var _local6:uint;
if (((GuideD) && (!(endTutorial)))){
_local4 = GuideD.spesifikasi;
_local5 = 0;
_local6 = 0;
if (_local4 == "open_tiles"){
ShowedGuide(_local4);
} else {
if (_local4 == "navi_tiles"){
if (!tutorial["navi_tiles"]){
if (tempObject.ada){
if (tempObject.jenis == "Tile"){
GuideD.panah.hiding();
if (_arg3 != null){
_local5 = game.SUM.Tile;
};
if (_local5 >= 2){
ShowedGuide(_local4);
CancelOrDoneTempObject();
ShowGuide(tutorial.urutan[0]);
};
} else {
GuideD.panahNav("tile");
};
} else {
if (_arg1 == "btn_tile"){
GuideD.panahNav("tile", _arg2);
} else {
GuideD.panahNav("tile");
};
};
};
} else {
if (_local4 == "open_room"){
ShowedGuide(_local4);
} else {
if (_local4 == "navi_room"){
if (!tutorial["navi_room"]){
if (tempObject.ada){
if (((!((tempObject.sub == "Cottage"))) && (!((tempObject.sub == "Lodge"))))){
GuideD.panahNav("tile");
} else {
_local5 = game.objects.Cottage.length;
GuideD.panah.hiding();
if (_local5 > 0){
ShowedGuide(_local4);
CancelOrDoneTempObject();
ShowGuide(tutorial.urutan[0]);
};
};
} else {
if (_arg1 == "btn_room"){
GuideD.panahNav("room", _arg2);
} else {
GuideD.panahNav("room");
};
};
};
} else {
if (_local4 == "intro_scenery"){
ShowedGuide(_local4);
} else {
if (_local4 == "open_scenery"){
ShowedGuide(_local4);
} else {
if (_local4 == "navi_scenery"){
if (!tutorial["navi_scenery"]){
if (tempObject.ada){
if (tempObject.jenis == "Scenery"){
if (_arg3 != null){
_local5 = checkTotalScenery();
};
GuideD.panah.hiding();
if (_local5 > 0){
ShowedGuide(_local4);
CancelOrDoneTempObject();
ShowGuide(tutorial.urutan[0]);
};
} else {
GuideD.panahNav("scenery");
};
} else {
if (_arg1 == "btn_scenery"){
GuideD.panahNav("scenery", _arg2);
} else {
GuideD.panahNav("scenery");
};
};
};
};
};
};
};
};
};
};
};
}
public function IfSedangGuide(_arg1:Boolean=true):void{
if (!endTutorial){
if (GuideD){
GuideD.hideSementara(!(_arg1));
};
};
}
public function IfSedangGuideS(_arg1:Boolean=true):void{
if (!endTutorial){
if (GuideD){
GuideD.hideSementara2(!(_arg1));
};
};
}
public function Boothing(_arg1:Eventku):void{
trace("Boothing MainProgram !");
}
public function reloadDayRecord():void{
trace(":reloadDayRecord:");
RP_specialVisitorDayMobil = false;
RP_visitorDayMobil = false;
game.MISC.Income = 0;
game.MISC.Expend = 0;
game.MISC.Tile_Expend = 0;
game.MISC.Scenery_Expend = 0;
game.MISC.SampahDay = 0;
game.MISC.Bonus = 0;
game.MISC.Expand = 0;
game.MISC.Extra = 0;
money_spend = 0;
janitorBubu = false;
dispatchEvent(new Eventku(Eventku.AFTER_RECLOAD));
CheckMissions();
}
public function reportEndDay():void{
trace("--reportEndDay:", game.MISC.StaffSalary, game.MISC.JanitorSalary);
updateRealTime("money", -((game.MISC.StaffSalary + game.MISC.JanitorSalary)));
}
public function CheckOnFirstStat():void{
if (firstCall){
if (endTutorial){
setNextMissions();
};
};
firstCall = false;
tambahEvent();
}
public function FirstCallNextDay():void{
if (day < HitungHari()){
trace(" FIRST CALL NEXT DAY!");
day++;
navigator3.setDay();
reloadDayRecord();
};
}
private function anime_startNewDay():void{
trace("anime_startNewDay.......");
animeDay = true;
PlaySound("tick");
dayAnime.isiBerita(("DAY " + day));
navigator3.jam.showBlinking();
TampilkanNewTips("moveStage", true);
TampilkanNewTips("clickOnObject", true);
checkAfterMoney();
}
public function startNewDay():void{
if (animeDay){
trace("\nSTART NEW DAY !", ismainloop, "money?", money);
navigator3.jam.showBlinking(false);
animeDay = false;
if (!ismainloop){
removeTempMainloop();
stage.addEventListener(Event.ENTER_FRAME, MainLoop, false, 0, true);
ismainloop = true;
trace("create mainloop", animeDay, sedangGuide, endTutorial);
};
};
}
private function checkAfterMoney():void{
if (money < 0){
if (isDefisit){
day_defisit++;
} else {
isDefisit = true;
if (kali_defisit == 0){
day_defisit = 0;
} else {
day_defisit = 1;
};
kali_defisit++;
};
if (kali_defisit > 3){
moneyD.showing(money, false, true);
} else {
moneyD.showing(money);
};
} else {
if (isDefisit){
isDefisit = false;
day_defisit = 0;
};
};
}
public function effectAfterMoneyNotice(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (_arg1){
if (kali_defisit > 3){
createNotif(103, false, null, String(bonus_subsidi));
} else {
createNotif(102, false, null, String(bonus_subsidi));
};
updateRealTime("money", bonus_subsidi, "bonus");
} else {
createNotif(101);
if (_arg2){
createNotif(104);
} else {
if (kali_defisit < 4){
if (day_defisit >= (kali_defisit * 2)){
if (kali_defisit == 1){
bonus_subsidi = 3000;
} else {
bonus_subsidi = 5000;
};
moneyD.showing(bonus_subsidi, true);
isDefisit = false;
day_defisit = 0;
};
};
};
};
}
public function HitungHari():uint{
var _local1:Number = (hour / 24);
return (((_local1 | 0) + 1));
}
public function RemoveAllMainListeners(_arg1:Boolean=true):void{
removeTempMainloop();
stage.removeEventListener(Event.ENTER_FRAME, MainLoop);
stage.removeEventListener(Event.ENTER_FRAME, JedaToCreateGamePlay);
stage.removeEventListener(MouseEvent.MOUSE_MOVE, MouseMainMoving);
stage.removeEventListener(KeyboardEvent.KEY_DOWN, PressKey);
stage.removeEventListener(KeyboardEvent.KEY_UP, ReleaseKey);
stage.removeEventListener(MouseEvent.MOUSE_DOWN, StageMouseDown);
stage.removeEventListener(MouseEvent.MOUSE_UP, StageMouseUp);
stage.removeEventListener(MouseEvent.MOUSE_OVER, StageMouseOver);
removeEventListener(Eventku.FPS_TICK, After_FPS_Tick);
removeEventListener(Eventku.AFTER_TICK, DoSomethingAfterTick);
removeEventListener(Eventku.AFTER_RECLOAD, Boothing);
RemovePanMapContainer();
if (_arg1){
MapSprite.removeEventListener(MouseEvent.MOUSE_DOWN, StartPan);
navigatorX.removeEventListener(MouseEvent.CLICK, clickNavigatorX);
navigatorX.removeEventListener(MouseEvent.MOUSE_OVER, overNavigatorX);
MapSprite.removeEventListener(MouseEvent.MOUSE_DOWN, ClickContainer);
MapSprite.removeEventListener(MouseEvent.MOUSE_OVER, OverContainer);
MapSprite.removeEventListener(MouseEvent.MOUSE_MOVE, OnDrawTile);
MapSprite.removeJedaUpdateResort();
};
trace("remove all main list...");
}
public function RemoveAllObjectsListeners():void{
}
private function removeSampahGarbages():void{
var _local1:uint = game.sampah.length;
var _local2:Object;
q = 0;
while (q < _local1) {
_local2 = game.sampah[q].ob;
if (_local2.garbage){
_local2.isRemovedAndCleaned();
break;
};
q++;
};
_local2 = null;
}
private function removeSampahGarbages_All():void{
var _local2:Object;
var _local1:uint = game.sampah.length;
q = 0;
while (q < _local1) {
_local2 = game.sampah[q].ob;
_local2.isRemovedWithListeners();
_local2 = null;
q++;
};
_local2 = null;
game.sampah = null;
}
public function moveCursor():void{
mouseCursor.x = mouseX;
mouseCursor.y = mouseY;
balonD.x = mouseX;
balonD.y = mouseY;
}
private function MouseMainMoving(_arg1:MouseEvent=null):void{
var _local2:Object = _arg1.target;
var _local3:Object = _local2.parent;
if (_local3 == null){
if (onMouseDrag){
RemovePanMapContainer();
};
if (((_arg1.buttonDown) && (!((tempDrag == null))))){
RemoveTempDrag();
};
return;
};
moveCursor();
if ((((_local2 == MapSprite)) || ((((_local3 == MapSprite)) || ((_local3.parent == MapSprite)))))){
MouseOnMap();
} else {
mousing.y = -50;
mousing.x = -50;
};
if (tempObject.visible){
if (((!((tempObject.REF == null))) && (((tempObject.ada) || (tempObject.isDestroy))))){
if (useTileTutorial){
CheckTempObjectVal_Guide(_local2, _local3, _local3.parent);
} else {
CheckTempObjectVal(_local2, _local3, _local3.parent);
};
};
} else {
if (((_arg1.buttonDown) && (!((tempDrag == null))))){
BoundTempDragPos();
if (DBO[_local2.name] == null){
RemoveTempDrag();
};
};
};
_arg1.updateAfterEvent();
}
public function MouseOnMap():void{
mouseTile = rumus.findTile(MapSprite.mouseY, MapSprite.mouseX, SIZE_);
mousing.x = (rumus.findTileCoord(mouseTile, "x", SIZE_, true) + MapSprite.x);
mousing.y = (rumus.findTileCoord(mouseTile, "y", SIZE_, true) + MapSprite.y);
navigatorX.mouse_t.text = String(mouseTile);
MouseOnObject();
}
public function MouseOnObject():void{
var _local1:int;
var _local2:int;
var _local3:Object;
if (!onMouseDrag){
_local1 = mouseTile.x;
_local2 = mouseTile.y;
if (((!(tempObject.ada)) && (((((!(tempObject.isDestroy)) && ((((_local1 >= 0)) && ((_local1 < ROWS)))))) && ((((_local2 >= 0)) && ((_local2 < COLS)))))))){
_local3 = game["map"].area[_local1][_local2];
if (CheckIfJanitorVisitor()){
} else {
if (_local3.idefault){
onFocus(null, false);
mousing.gotoAndStop("default");
} else {
if (_local3.isi){
if (mousing.visible){
onFocus(_local3.isi_apa);
if ((focusing is Tile)){
mousing.gotoAndStop("tile");
} else {
mousing.gotoAndStop("none");
};
} else {
onFocus(null, false);
};
} else {
onFocus(null, false);
mousing.gotoAndStop("true");
};
};
};
_local3 = null;
};
};
}
public function onFocus(_arg1=null, _arg2:Boolean=true):void{
if (_arg2){
if (_arg1){
if (((!((focusing == null))) && (!((focusing == _arg1))))){
focusing.hidingFocus();
};
focusing = _arg1;
focusing.settingFocus();
};
} else {
if (focusing != null){
focusing.hidingFocus();
};
focusing = null;
};
}
public function CheckIfJanitorVisitor():Boolean{
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:Boolean;
var _local6:Object;
var _local7:* = null;
_local4 = game.janitors.length;
_local3 = 0;
while (_local3 < _local4) {
_local7 = game.janitors[_local3].ob;
if (((!((_local7 == null))) && (!(_local7.garbage)))){
if (((!(_local7.insideRoom)) && (co.isSamePoint(_local7.vtile, mouseTile)))){
_local2 = MapSprite.objContainer.getChildIndex(_local7);
if (_local6 == null){
_local6 = _local7;
_local1 = _local2;
} else {
if (_local1 < _local2){
_local6 = _local7;
_local1 = _local2;
};
};
_local5 = true;
};
};
_local3++;
};
_local4 = game.visitors.length;
_local3 = 0;
while (_local3 < _local4) {
_local7 = game.visitors[_local3].ob;
if (((!((_local7 == null))) && (!(_local7.garbage)))){
if (co.isSamePoint(_local7.vtile, mouseTile)){
if (((!(_local7.memasuki)) && (((!(_local7.insideBooth)) && (!(_local7.insideRoom)))))){
_local2 = MapSprite.objContainer.getChildIndex(_local7);
if (_local6 == null){
_local6 = _local7;
_local1 = _local2;
} else {
if (_local1 < _local2){
_local6 = _local7;
_local1 = _local2;
};
};
_local5 = true;
};
};
};
_local3++;
};
if (_local5){
onFocus(_local6);
mousing.gotoAndStop("none");
};
_local6 = null;
_local7 = null;
return (_local5);
}
public function addRP_khususClickOnStage(_arg1:String):void{
if (_arg1 == "Janitor"){
if (game.RP_khusus.click_a_janitor == 0){
game.RP_khusus.click_a_janitor = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "Visitor"){
if (game.RP_khusus.click_a_visitor == 0){
game.RP_khusus.click_a_visitor = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "Scenery"){
if (game.RP_khusus.click_a_scenery == 0){
game.RP_khusus.click_a_scenery = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "Tile"){
if (game.RP_khusus.click_a_tile == 0){
game.RP_khusus.click_a_tile = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "Lobby"){
if (game.RP_khusus.click_lobby == 0){
game.RP_khusus.click_lobby = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (_arg1 == "hideBuildings"){
if (game.RP_khusus.click_hideBuildings == 0){
game.RP_khusus.click_hideBuildings = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
} else {
if (game.RP_khusus.click_a_booth == 0){
game.RP_khusus.click_a_booth = 1;
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
};
};
};
};
};
};
}
private function CheckTempObjectVal_Guide(_arg1:Object=null, _arg2:Object=null, _arg3:Object=null):void{
var _local4:Boolean;
var _local5:Boolean;
var _local6:Object;
var _local7:Object;
var _local8:Object;
var _local9:Object;
var _local10:int;
var _local11:int;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
if ((((_arg1 == MapSprite)) || ((((_arg2 == MapSprite)) || ((_arg3 == MapSprite)))))){
CPOINT.x = (mouseTile.x - tempObject.CPOINT.x);
CPOINT.y = (mouseTile.y - tempObject.CPOINT.y);
tempObject.mtile = CPOINT;
tempObject.x = mousing.x;
tempObject.y = mousing.y;
tileName = ((("tile_" + CPOINT.x) + "_") + CPOINT.y);
_local4 = (((CPOINT.x >= 0)) && ((CPOINT.x < ROWS)));
_local5 = (((CPOINT.y >= 0)) && ((CPOINT.y < COLS)));
_local6 = game["map"].area;
_local7 = game["map"].tiles;
if (((_local4) && (_local5))){
_local8 = _local6[CPOINT.x][CPOINT.y];
if (_local8.lahan){
if (tempObject.single){
if (tempObject.isDestroy){
} else {
if (((!(_local8.isi)) && (_local7[tileName].tile_tutorial))){
tempObject.truePos = true;
} else {
tempObject.ontileDefault();
};
};
} else {
if (!_local8.isi){
tempObject.truePos = true;
_local14 = tempObject.REF.COLS;
_local15 = tempObject.REF.ROWS;
_local12 = 0;
while (_local12 < _local15) {
_local13 = 0;
while (_local13 < _local14) {
_local10 = (CPOINT.x - _local12);
_local11 = (CPOINT.y + _local13);
if ((((_local10 >= 0)) && ((_local11 >= 0)))){
tileName = ((("tile_" + _local10) + "_") + _local11);
if (_local7[tileName].tile_tutorial){
} else {
tempObject.truePos = false;
break;
};
} else {
tempObject.truePos = false;
break;
};
_local13++;
};
_local12++;
};
};
};
} else {
tempObject_falsePosition();
};
_local8 = null;
} else {
tempObject_falsePosition();
};
} else {
tempObject_falsePosition();
};
if (tempObject.truePos){
tempObject.groundAnim();
} else {
tempObject.groundAnim(false);
};
_local6 = null;
_local7 = null;
}
private function CheckTempObjectVal(_arg1:Object=null, _arg2:Object=null, _arg3:Object=null):void{
var _local4:Boolean;
var _local5:Boolean;
var _local6:Object;
var _local7:Object;
var _local8:Object;
var _local9:Object;
var _local10:int;
var _local11:int;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:uint;
if ((((_arg1 == MapSprite)) || ((((_arg2 == MapSprite)) || ((_arg3 == MapSprite)))))){
CPOINT.x = (mouseTile.x - tempObject.CPOINT.x);
CPOINT.y = (mouseTile.y - tempObject.CPOINT.y);
tempObject.mtile = CPOINT;
tempObject.x = mousing.x;
tempObject.y = mousing.y;
tileName = ((("tile_" + CPOINT.x) + "_") + CPOINT.y);
_local4 = (((CPOINT.x >= 0)) && ((CPOINT.x < ROWS)));
_local5 = (((CPOINT.y >= 0)) && ((CPOINT.y < COLS)));
_local6 = game["map"].area;
_local7 = game["map"].tiles;
if (((_local4) && (_local5))){
_local8 = _local6[CPOINT.x][CPOINT.y];
if (_local8.lahan){
if (tempObject.single){
if (tempObject.isDestroy){
} else {
if (((!(_local8.idefault)) && (((!(_local8.isi)) || ((((tempObject.jenis == "Scenery")) && (((_local7[tileName].plenty) && (!(_local7[tileName].planted)))))))))){
tempObject.truePos = true;
} else {
tempObject.ontileDefault();
};
};
} else {
if (!_local8.isi){
tempObject.truePos = true;
_local14 = tempObject.REF.COLS;
_local15 = tempObject.REF.ROWS;
_local12 = 0;
while (_local12 < _local15) {
_local13 = 0;
while (_local13 < _local14) {
_local10 = (CPOINT.x - _local12);
_local11 = (CPOINT.y + _local13);
if ((((_local10 >= 0)) && ((_local11 >= 0)))){
_local9 = _local6[_local10][_local11];
if (((_local9.idefault) || (((!(_local9.lahan)) || (_local9.isi))))){
tempObject.truePos = false;
break;
};
_local9 = null;
} else {
tempObject.truePos = false;
break;
};
_local13++;
};
_local12++;
};
} else {
tempObject_falsePosition();
};
};
} else {
tempObject_falsePosition();
};
_local8 = null;
} else {
tempObject_falsePosition();
};
} else {
tempObject_falsePosition();
};
if (tempObject.truePos){
tempObject.groundAnim();
} else {
tempObject.groundAnim(false);
};
_local6 = null;
_local7 = null;
}
private function tempObject_falsePosition():void{
tempObject.x = mouseX;
tempObject.y = mouseY;
tempObject.truePos = false;
}
private function OnDrawTile(_arg1:MouseEvent):void{
if (((!(_arg1.buttonDown)) || (!(((((tempObject.ada) && (tempObject.truePos))) && ((tempObject.jenis == "Tile"))))))){
return;
};
if (money < tempObject.REF.price){
return;
};
MapSprite.CreateNewObject(tempObject);
if (tempObject.jenis == "Tile"){
checkingGuide("newObject", false, tempObject.mtile);
};
}
private function OverContainer(_arg1:MouseEvent):void{
show_mouse(false);
navigator1["sponsor_teks"].hiding();
if (!onMouseDrag){
if (!tempObject.ada){
mousing.visible = true;
};
};
balonD.hiding();
}
private function ClickContainer(_arg1:MouseEvent):void{
var _local2:Object;
var _local3:Object;
var _local4:String;
var _local5:uint;
if (tempObject.ada){
if (tempObject.truePos){
_local2 = _arg1.target;
_local3 = _local2.parent;
_local4 = tempObject.jenis;
_local5 = tempObject.price;
if (_local4 == "Tile"){
if (CheckMoney("Tile", _local5, ("TILE_" + tempObject.sub))){
MapSprite.CreateNewObject(tempObject);
CheckTempObjectVal(_local2, _local3, _local3.parent);
checkingGuide("newObject", false, tempObject.mtile);
};
} else {
if (_local4 == "Scenery"){
if (CheckMoney("Scenery", _local5, ("PLANT_" + tempObject.sub))){
MapSprite.CreateNewObject(tempObject);
CheckTempObjectVal(_local2, _local3, _local3.parent);
checkingGuide("newObject", false, tempObject.mtile);
};
} else {
if (CheckMoney(tempObject.sub, _local5)){
MapSprite.CreateNewObject(tempObject);
CheckTempObjectVal(_local2, _local3, _local3.parent);
checkingGuide("newObject", false, tempObject.mtile);
};
};
};
_local2 = null;
_local3 = null;
};
} else {
if (focusing == null){
RemoveAutoPaused();
if (!onMouseDestroy){
navigator2._selectOnDefault();
};
} else {
if (!onMouseDrag){
if (!onMouseDestroy){
PlaySound("glick");
};
clickDB_object(onMouseDestroy);
};
};
StartPan();
};
}
private function createObjectRecord():void{
var _local1:uint;
if (adaSave){
trace("OBJECT REC CREATED");
_local1 = game.objects.Scenery.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord("Scenery", game.objects.Scenery[k]);
k++;
};
_local1 = game.objects.Cottage.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_booth(game.objects.Cottage[k]);
k++;
};
_local1 = game.objects.Lodge.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_booth(game.objects.Lodge[k]);
k++;
};
_local1 = game.objects.Facility.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_booth(game.objects.Facility[k]);
k++;
};
_local1 = game.sampah.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_sampah(game.sampah[k]);
k++;
};
_local1 = game.objects.JanitorRoom.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_booth(game.objects.JanitorRoom[k]);
k++;
};
MapSprite.detectPath();
_local1 = game.objects.Mobil.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_Mobil(game.objects.Mobil[k]);
k++;
};
_local1 = game.visitors.length;
k = 0;
while (k < _local1) {
MapSprite.createObjectRecord_visitor(game.visitors[k]);
k++;
};
MapSprite.AppliedNewTabs();
_local1 = game.notif.length;
k = 0;
while (k < _local1) {
createObjectRecord_Notif(game.notif[k]);
k++;
};
} else {
MapSprite.detectPath();
};
}
private function adaFacilityJumlah(_arg1:Object, _arg2:uint):Boolean{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Boolean;
_local4 = _arg1.length;
_local6 = false;
_local5 = 0;
_local3 = 0;
while (_local3 < _local4) {
if (game.SUM[_arg1[_local3]] > 0){
++_local5;
if (_local5 >= _arg2){
_local6 = true;
break;
};
};
_local3++;
};
return (_local6);
}
public function visitorSpecialFunction():void{
var _local1:String;
var _local2:int;
var _local3:uint;
var _local4:Boolean;
var _local5:Boolean;
if (popularity_fix >= 10){
if (star > 4){
if (jumlah_lodge > 0){
chanceSpecialVisitor(25);
};
};
if (popularity_fix >= 25){
if (game.SUM.Medical > 0){
chanceSpecialVisitor(26, 0);
};
if (popularity_fix >= 40){
if (jumlah_lodge > 1){
chanceSpecialVisitor(27, 0);
};
if (popularity_fix >= 50){
if (star > 5){
if (game.SUM.Minimarket > 0){
_local5 = (ifAdaLodgeLevel(2) > 0);
if (_local5){
chanceSpecialVisitor(28, 0);
};
};
};
if (popularity_fix >= 60){
if (star > 5){
if ((((game.SUM.Pool > 0)) && ((jumlah_lodge > 2)))){
_local5 = (ifAdaLodgeLevel(3) > 0);
if (_local5){
chanceSpecialVisitor(29, 0);
};
};
};
};
};
};
};
};
}
private function ifAdaRoomLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint = ifAdaCottageLevel(_arg1, _arg2);
if (_local3 >= _arg2){
} else {
_local3 = (_local3 + ifAdaLodgeLevel(_arg1, _arg2));
};
return (_local3);
}
private function ifAdaLodgeLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array = game.objects.Lodge;
_local4 = _local6.length;
_local3 = 0;
while (_local3 < _local4) {
if (_local6[_local3].ob.level_ >= _arg1){
++_local5;
if (_local5 >= _arg2){
break;
};
};
_local3++;
};
_local6 = null;
return (_local5);
}
private function ifAdaCottageLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array = game.objects.Cottage;
_local4 = _local6.length;
_local3 = 0;
while (_local3 < _local4) {
if (_local6[_local3].ob.level_ >= _arg1){
++_local5;
if (_local5 >= _arg2){
break;
};
};
_local3++;
};
_local6 = null;
return (_local5);
}
private function ifAdaFacilityLevel(_arg1:String, _arg2:uint, _arg3:uint=1):uint{
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Boolean;
var _local8:Array;
var _local9:*;
if (game.SUM[_arg1] > 0){
_local6 = 0;
_local8 = game.objects.Facility;
_local5 = _local8.length;
_local4 = 0;
while (_local4 < _local5) {
_local9 = _local8[_local4].ob;
_local7 = _local9[("aku" + _arg1)];
if (_local7){
if (_local9.level_ >= _arg2){
++_local6;
if (_local6 >= _arg3){
break;
};
};
};
_local4++;
};
_local8 = null;
_local9 = null;
};
return (_local6);
}
private function countSubTotalUsed(_arg1:String="", _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local7:Array;
var _local8:*;
var _local5:uint;
var _local6:Boolean;
if (game.SUM[_arg1] > 0){
_local7 = game.objects.Facility;
_local4 = _local7.length;
_local3 = 0;
while (_local3 < _local4) {
_local8 = _local7[_local3].ob;
if (_local8["jenis"] == _arg1){
_local5 = (_local5 + _local8.used);
if (_local5 >= _arg2){
_local6 = true;
break;
};
};
_local3++;
};
_local7 = null;
_local8 = null;
};
return (_local5);
}
private function chanceSpecialVisitor(_arg1:uint, _arg2:uint=0):void{
var _local3:Object;
var _local4:Object;
var _local5:Array;
var _local6:Number;
var _local9:uint;
var _local7:Boolean;
var _local8:Boolean;
if (_arg1 == 25){
_local8 = true;
};
_local3 = game.specialVisitor[("Visitor" + _arg1)];
if (!_local3.ada){
_local9 = (_local3.last_visit + _local3.add_day);
if (_local9 < day){
_local4 = serbi.dataOb.Visitor[("Visitor" + _arg1)];
_local6 = _local4["MAX_MOOD"];
if (_local3.last_mood >= _local6){
if (_arg1 == 25){
_local7 = true;
} else {
_local5 = _local4.likes.Facility;
_local7 = ((_arg2)<1) ? true : adaFacilityJumlah(_local5[0], _arg2);
};
} else {
_local3.last_mood = (_local3.last_mood + (1 / (_local6 * 50)));
};
if (_local7){
MapSprite.newVisitorSpecial(_arg1);
bus_counter_bonus = 0;
_local3.ada = true;
};
};
};
_local3 = null;
_local4 = null;
_local5 = null;
}
public function visitorFunction(_arg1:Boolean=true):void{
var _local2:Array;
var _local3:Number;
jeda_visitor = (jeda_visitor + 1);
isMaxVisitor = (game.visitors.length >= maxVisitor);
if (isMaxVisitor){
bantuRand = (Math.random() * 100);
teruskan = ((popularity_fix)>60) ? false : ((popularity_fix)<3) ? false : ((bantuRand)<2) ? true : false;
} else {
teruskan = true;
};
if (teruskan){
if (jeda_visitor > maxjeda_visitor){
_local2 = serbi.dataOb.Visitor["PROB_RANGE"];
rand = (Math.random() * 100);
if (_arg1){
_local3 = ((((hourDay >= 6)) && ((hourDay < 9)))) ? _local2[3] : ((hourDay)<15) ? _local2[0] : ((hourDay)<=18) ? _local2[1] : 0;
} else {
_local3 = ((((hourDay >= 18)) && ((hourDay < 21)))) ? _local2[2] : ((hourDay)<22) ? _local2[4] : _local2[5];
};
if (rand <= (_local3 + (popularity * 0.5))){
bantuRand = co.randomRangeDec(0.7, 0.85, 3);
if (rand <= (bantuRand * _local3)){
if (!isMaxVisitor){
if ((((hourDay >= 1)) && ((hourDay < 5)))){
bantuRand = (Math.random() * 100);
if (bantuRand <= 25){
MapSprite.newVisitor(false, false, _arg1);
};
} else {
MapSprite.newVisitor(false, false, _arg1);
};
};
} else {
MapSprite.newVisitor(true, false, _arg1);
};
maxjeda_visitor = reloadMaxJedaVisitor();
} else {
maxjeda_visitor = reloadMaxJedaVisitor(-1);
};
jeda_visitor = 0;
_local2 = null;
};
};
}
private function reloadMaxJedaVisitor(_arg1:int=0):uint{
var _local2:uint;
if (popularity_fix < 3){
maxjeda_visitor = co.randomRange(7, (20 + _arg1));
} else {
if (popularity_fix < 7){
maxjeda_visitor = co.randomRange(8, (18 + _arg1));
} else {
if (popularity_fix < 15){
maxjeda_visitor = co.randomRange(10, (17 + _arg1));
} else {
if (popularity_fix < 23){
maxjeda_visitor = co.randomRange(10, (16 + _arg1));
} else {
if (popularity_fix < 30){
maxjeda_visitor = co.randomRange(10, (15 + _arg1));
} else {
if (popularity_fix < 45){
maxjeda_visitor = co.randomRange(10, (14 + _arg1));
} else {
if (popularity_fix < 50){
maxjeda_visitor = co.randomRange(10, (15 + _arg1));
} else {
if (popularity_fix < 65){
maxjeda_visitor = co.randomRange(10, (14 + _arg1));
} else {
if (popularity_fix < 75){
maxjeda_visitor = co.randomRange(10, (13 + _arg1));
} else {
if (popularity_fix < 85){
maxjeda_visitor = co.randomRange(10, (12 + _arg1));
} else {
if (popularity_fix < 92){
maxjeda_visitor = co.randomRange(10, (8 + _arg1));
} else {
maxjeda_visitor = co.randomRange(10, (7 + _arg1));
};
};
};
};
};
};
};
};
};
};
};
return (_local2);
}
private function mobilFunction(_arg1:Boolean=true):void{
var _local2:Number;
var _local3:Number;
var _local4:Boolean;
_local3 = 0;
if (bus_dummy < 3){
bus_counter_dummy++;
if (bus_counter_dummy > bus_jeda_dummy){
if (_arg1){
_local2 = (popularity * 0.5);
if ((((hourDay >= 6)) && ((hourDay < 9)))){
_local3 = (10 + (popularity * 0.15));
bus_jeda_dummy = co.randomRange(5, 10);
} else {
if (hourDay < 15){
_local3 = (12 + (popularity * 0.2));
bus_jeda_dummy = co.randomRange(7, 12);
} else {
if (hourDay <= 18){
_local3 = (9 + (popularity * 0.2));
bus_jeda_dummy = co.randomRange(8, 13);
};
};
};
} else {
if ((((hourDay >= 18)) && ((hourDay < 21)))){
_local2 = (popularity * 0.25);
_local3 = (7 + (popularity * 0.15));
bus_jeda_dummy = co.randomRange(9, 15);
} else {
if (hourDay < 22){
_local2 = (popularity * 0.2);
_local3 = (5 + (popularity * 0.1));
bus_jeda_dummy = co.randomRange(11, 18);
} else {
_local2 = (popularity * 0.1);
_local3 = (2 + (popularity * 0.05));
bus_jeda_dummy = co.randomRange(12, 19);
};
};
};
_local2 = (_local2 + _local3);
rand = (Math.random() * 100);
if (rand < _local2){
MapSprite.newMobil();
};
bus_counter_dummy = 0;
};
};
if (bus_bonus < 2){
bus_counter_bonus++;
if (bus_counter_bonus > bus_jeda_bonus){
if ((((hourDay > 6)) && ((hourDay <= 15)))){
_local2 = (15 + (popularity * 0.2));
bus_jeda_bonus = co.randomRange(12, 18);
} else {
if ((((hourDay > 15)) && ((hourDay < 22)))){
_local2 = (10 + (popularity * 0.1));
bus_jeda_bonus = co.randomRange(15, 20);
} else {
_local2 = (5 + (popularity * 0.05));
bus_jeda_bonus = co.randomRange(22, 30);
};
};
rand = (Math.random() * 100);
if (rand < _local2){
MapSprite.newMobil(false);
};
bus_counter_bonus = 0;
};
};
}
private function CreateTempData_baruBuat():void{
trace("CreateTempData_baruBuat:", (game.TempData == null));
var _local1:Boolean;
if (game.TempData == null){
_local1 = true;
game.TempData = {};
} else {
if (game.TempData["ListName"] == null){
_local1 = true;
};
};
if (_local1){
game.TempData.ListName = {Male:[], Female:[], Couple:[], Staff:[]};
raiseMaleName();
raiseFemaleName();
raiseCoupleName();
raiseStaffName();
};
}
public function raiseMaleName():void{
game.TempData.ListName["Male"] = raiseName("Male");
}
public function raiseFemaleName():void{
game.TempData.ListName["Female"] = raiseName("Female");
}
public function raiseCoupleName():void{
game.TempData.ListName["Couple"] = raiseName("Couple");
}
public function raiseStaffName():void{
game.TempData.ListName["Staff"] = raiseName("Staff");
}
private function raiseName(_arg1:String):Array{
var _local4:uint;
var _local5:Array;
var _local6:uint;
var _local2:Array = [];
var _local3:Array;
if (_arg1 == "Couple"){
_local3 = serbi.dataOb.Visitor.COUPLE_NAME;
_local4 = _local3.length;
k = 0;
while (k < _local4) {
_local2.push(_local3[k]);
k++;
};
} else {
_local5 = null;
if (_arg1 == "Male"){
_local3 = serbi.dataOb.Visitor.FIRSTNAME_MALE;
_local5 = serbi.dataOb.Visitor.SECONDNAME_MALE;
} else {
if (_arg1 == "Female"){
_local3 = serbi.dataOb.Visitor.FIRSTNAME_FEMALE;
_local5 = serbi.dataOb.Visitor.SECONDNAME_FEMALE;
} else {
_local3 = serbi.dataOb.Employee.FIRSTNAME;
_local5 = serbi.dataOb.Employee.SECONDNAME;
};
};
_local4 = _local3.length;
_local6 = _local5.length;
k = 0;
while (k < _local4) {
q = 0;
while (q < _local6) {
_local2.push(((_local3[k] + " ") + _local5[q]));
q++;
};
k++;
};
_local5 = null;
};
_local3 = null;
return (_local2);
}
public function TimerFunction():void{
counter = (counter + speed_effect);
temp_sec = sec;
CalculateHour();
navigator3.jam.jalanJam(hourDay);
if (temp_sec != sec){
dispatchEvent(new Eventku(Eventku.AFTER_TICK));
};
}
public function CounterHour(_arg1:uint):uint{
var _local2:uint = (max_sec * (max_minute * _arg1));
return (_local2);
}
public function CalculateHour():void{
sec = (counter / FR);
minute = (counter / max_sec);
hour = (minute / max_minute);
hourDay = (hour % 24);
minuteDay = (minute % 60);
tick = counter;
}
public function CollectsVisitorValues():void{
var _local1:Number;
var _local2:Number;
_local1 = popularityVisitor();
game.popularity.Visitor = (game.MISC.ValueUser + game.MISC.RateOutResort);
_local2 = popularityVisitor();
popularity = (popularity + (_local2 - _local1));
hitungPopularity();
realTimeResort("popularity");
navigatorX.visitorpop_t.text = (game.popularity.Visitor + "%");
}
public function CollectsOutResortValues(_arg1:int, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
game.MISC.OutResort = (game.MISC.OutResort + _arg1);
game.MISC.ValueOutResort = (game.MISC.ValueOutResort + _arg2);
game.MISC.RateOutResort = ((game.MISC.ValueOutResort / game.MISC.OutResort) * (pengaliValueUser() * 10));
_local3 = popularityVisitor();
game.popularity.Visitor = (game.MISC.ValueUser + game.MISC.RateOutResort);
_local4 = popularityVisitor();
popularity = (popularity + (_local4 - _local3));
hitungPopularity();
realTimeResort("popularity");
navigatorX.visitorpop_t.text = (game.popularity.Visitor + "%");
}
public function pengaliValueUser():Number{
var _local2:Number;
var _local1:Number = ((popularity * 0.005) - 0.05);
_local2 = ((_local1)>0) ? (_local1 * 0.02) : ((0.051 + _local1) * 0.02);
return (_local2);
}
private function calculateBatasVisitor():uint{
return (0);
}
public function TampilkanNewTips(_arg1:String, _arg2:Boolean=false):void{
var _local4:Boolean;
var _local5:Boolean;
var _local3:Boolean;
if (_arg2){
if (!endTutorial){
_local3 = false;
};
};
if (_local3){
_local4 = !(game.Tips.listing[_arg1].showed);
_local5 = !(game.Tips.listing[_arg1].new_tips);
if (((_local4) && (_local5))){
game.Tips.NewOnList.push(_arg1);
game.Tips.listing[_arg1].new_tips = true;
labelNewTips();
};
};
}
public function labelNewTips():void{
var _local1:uint = game.Tips.NewOnList.length;
if (_local1 > 0){
navigator2.new_Tips.visible = true;
} else {
navigator2.new_Tips.visible = false;
};
}
public function updateTampilanTips(_arg1:String):void{
var _local3:uint;
var _local4:uint;
var _local2:Boolean = game.Tips.listing[_arg1].showed;
if (_local2){
dialog_tips.showDescription();
} else {
if (game.Tips.listing[_arg1].new_tips){
dialog_tips.showDescription(true);
game.Tips.listing[_arg1].showed = true;
_local3 = game.Tips.NewOnList.length;
_local4 = 0;
while (_local4 < _local3) {
if (game.Tips.NewOnList[_local4] == _arg1){
game.Tips.NewOnList.splice(_local4, 1);
break;
};
_local4++;
};
labelNewTips();
} else {
dialog_tips.hideDescription();
};
};
}
public function firstClickOnTips(_arg1:String):void{
var _local2:uint = game.Tips.NewOnList.length;
if (_local2 > 0){
updateTampilanTips(game.Tips.NewOnList[0]);
};
}
public function gantiTeksMoney():void{
navigator3.setMoney(money_tampil);
}
public function ubahNominal(_arg1:Number):void{
TweenPlugin.activate([RoundPropsPlugin]);
TweenMax.to(this, 0.8, {money_tampil:_arg1, onUpdate:gantiTeksMoney, roundProps:["money_tampil"]});
}
public function realTimeResort(_arg1:String):void{
var _local2:uint;
if (_arg1 == "money"){
} else {
if (_arg1 == "popularity"){
navigator3.pop_t.text = (String(popularity_fix) + "%");
} else {
if (_arg1 == "EXP"){
navigatorX.exp_t.text = ("EXP: " + game.EXP);
} else {
if ((((_arg1 == "employee")) || ((_arg1 == "JanitorRoom")))){
_local2 = game.objects.JanitorRoom.length;
navigator1.btn_employee.employee_t.text = (((_local2 + "(") + game.janitors.length) + ")");
CheckMissions("one_janitor");
CheckMissions("x_janitor");
_local2 = (_local2 + (checkTotalFacility() + checkTotalRooms()));
CheckMissions("x_booths", _local2);
CheckMissions("x_booths2", _local2);
} else {
if (_arg1 == "visitor"){
_local2 = countVisitorInsideResort();
total_visitorInside = _local2;
navigator1.btn_visitor.visitor_t.text = _local2;
CheckMissions("first_spcVisitor");
CheckMissions("x_visitors", _local2);
CheckMissions("x_visitors2", _local2);
CheckMissions("x_visitors3", _local2);
CheckMissions("x_couples", couples);
CheckMissions("anne_hataway");
CheckMissions("mr_rock");
CheckMissions("naomi_volts");
CheckMissions("robert");
CheckMissions("jason");
CheckMissions("x_spcVisitor");
CheckMissions("x_spcVisitor2");
CheckAchievements("acv_rookieResort", _local2);
} else {
if (_arg1 == "Room"){
jumlah_cottage = game.objects.Cottage.length;
jumlah_lodge = game.objects.Lodge.length;
_local2 = checkTotalRooms();
navigator1.btn_room.room_t.text = _local2;
CheckMissions("build_room", _local2);
CheckMissions("x_room", _local2);
CheckMissions("xx_room", _local2);
CheckMissions("one_lodge", jumlah_lodge);
CheckMissions("x_lodge", jumlah_lodge);
CheckMissions("xx_lodge", jumlah_lodge);
_local2 = (_local2 + game.objects.Facility.length);
CheckMissions("x_facilityRoom", _local2);
_local2 = (_local2 + checkTotalJanitorRoom());
CheckMissions("x_booths", _local2);
CheckMissions("x_booths2", _local2);
} else {
if (_arg1 == "scenery"){
_local2 = checkTotalScenery();
navigator1.btn_scenery.scenery_t.text = _local2;
CheckMissions("put_scenery", _local2);
CheckMissions("scenery_grass");
CheckMissions("x_maple");
CheckMissions("x_tree", _local2);
CheckMissions("xx_tree", _local2);
CheckMissions("xx_tree2", _local2);
CheckMissions("xx_tree3", _local2);
CheckMissions("xx_tree4", _local2);
CheckMissions("xx_tree5", _local2);
} else {
if (_arg1 == "Facility"){
_local2 = game.objects.Facility.length;
navigator1.btn_facility.facility_t.text = _local2;
CheckMissions("build_facility", _local2);
_local2 = (_local2 + checkTotalRooms());
CheckMissions("x_facilityRoom", _local2);
_local2 = (_local2 + checkTotalJanitorRoom());
CheckMissions("x_booths", _local2);
CheckMissions("x_booths2", _local2);
_local2 = countMinibooth(true);
CheckMissions("x_minibooth", _local2);
};
};
};
};
};
};
};
};
}
public function updateRealTime(_arg1:String, _arg2:Number=0, _arg3:String=null, _arg4=null):void{
var _local5:Number;
if (_arg1 == "money"){
money = (money + _arg2);
if (_arg3 == "bonus"){
game.MISC.Bonus = (game.MISC.Bonus + _arg2);
};
ubahNominal(money);
CheckAchievements("acv_greenBucks");
CheckAchievements("acv_bagOfGold");
CheckMissions("x_money");
CheckMissions("x_money2");
if (_arg2 < 0){
money_spend = (money_spend + Math.abs(_arg2));
CheckMissions("spend_1");
};
} else {
if (_arg1 == "popularity"){
if (_arg4 == null){
_local5 = _arg2;
game.popularity[_arg3] = (game.popularity[_arg3] + _arg2);
if (game.popularity[_arg3] < 0){
game.popularity[_arg3] = 0;
};
};
hitungPopularity();
} else {
if (_arg1 == "EXP"){
game.EXP = (game.EXP + _arg2);
} else {
if (_arg1 == "Room"){
navigator2.updateData(_arg1, game.objects[_arg3].length, _arg3);
CheckMissions("connect_tiles");
CheckMissions("all_booth");
} else {
if (_arg1 == "Facility"){
game.SUM[_arg3] = (game.SUM[_arg3] + _arg2);
navigator2.updateData(_arg1, game.SUM[_arg3], _arg3);
CheckMissions("x_facility");
if (_arg3 == "Giftshop"){
CheckMissions("x_giftshop");
} else {
if (_arg3 == "Medical"){
CheckMissions("x_medical");
} else {
if (_arg3 == "Minimarket"){
CheckMissions("x_minimarket");
} else {
if (_arg3 == "BaratResto"){
CheckMissions("x_baratResto");
} else {
if ((((_arg3 == "Pool")) || ((_arg3 == "Golf")))){
CheckMissions("x_PoolGolf");
};
};
};
};
};
CheckMissions("xx_facility");
CheckMissions("xxx_facility");
CheckMissions("all_booth");
} else {
if (_arg1 == "JanitorRoom"){
navigator2.updateData(_arg1, game.objects[_arg3].length, _arg3);
CheckMissions("all_booth");
};
};
};
};
};
};
realTimeResort(_arg1);
}
private function hitungPopularity(_arg1:Boolean=false):void{
var _local2:uint;
var _local3:uint;
if (_arg1){
popularity = countPopularity();
};
popularity_fix = ((popularity)<100) ? co.RoundDecNumber(popularity, 1) : 100;
if (!_arg1){
CheckAchievements_spc("mood_visitor");
CheckAchievements("acv_masterDev");
};
if (popularity_fix < 1){
_local2 = 2;
_local3 = 2;
} else {
if (popularity_fix < 2){
_local2 = 3;
_local3 = 5;
} else {
if (popularity_fix < 6){
_local2 = 4;
_local3 = 6;
} else {
if (popularity_fix < 8){
_local2 = 4;
_local3 = 7;
} else {
if (popularity_fix < 10){
_local2 = 5;
_local3 = 8;
} else {
if (popularity_fix < 13){
_local2 = 6;
_local3 = 9;
} else {
if (popularity_fix < 17){
_local2 = 5;
_local3 = (popularity_fix * 0.15);
} else {
if (popularity_fix < 20){
_local2 = 8;
_local3 = (popularity_fix * 0.25);
} else {
if (popularity_fix < 25){
_local2 = 9;
_local3 = (popularity_fix * 0.35);
} else {
if (popularity_fix < 35){
_local2 = 11;
_local3 = (popularity_fix * 0.45);
} else {
if (popularity_fix < 45){
_local2 = 14;
_local3 = (popularity_fix * 0.65);
} else {
if (popularity_fix < 51){
_local2 = 17;
_local3 = (popularity_fix * 0.75);
} else {
if (popularity_fix < 60){
_local2 = 19;
_local3 = (popularity_fix * 0.8);
} else {
if (popularity_fix < 75){
_local2 = 20;
_local3 = (popularity_fix * 0.85);
} else {
if (popularity_fix < 85){
_local2 = 20;
_local3 = (popularity_fix * 0.9);
} else {
if (popularity_fix < 90){
_local2 = 20;
_local3 = (popularity_fix * 0.95);
} else {
if (popularity_fix < 95){
_local2 = 20;
_local3 = popularity_fix;
} else {
if (popularity_fix < 98){
_local2 = 20;
_local3 = 95;
} else {
if (popularity_fix < 100){
_local2 = 20;
_local3 = 98;
} else {
_local2 = 25;
_local3 = 101;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (popularity_fix < 10){
_local3 = ((jumlah_cottage)>_local3) ? (_local3 + 2) : _local3;
};
_local3 = ((_local3)<_local2) ? (_local2 + 2) : _local3;
maxVisitor = co.randomRange(_local2, _local3);
}
public function countPopularity():Number{
var _local1:Number = (popularitySceneryEtc() + (((popularityBooth() + popularityJanitorKumulatif()) + popularityVisitor()) + popularityLain()));
if (_local1 < 0){
_local1 = 0;
} else {
if (_local1 > 100){
_local1 = 100;
};
};
return (_local1);
}
public function popularityLain():Number{
var _local2:Number;
var _local1:Number = game.popularity.Lain;
_local2 = ((game.EXPAND)==0) ? 4 : ((game.EXPAND)==1) ? 7 : 10;
if (_local1 > _local2){
_local1 = _local2;
};
return (_local1);
}
public function popularitySceneryEtc():Number{
var _local1:Number = ((game.popularity.Scenery + game.popularity.Tile) * 0.15);
var _local2:Number = (game.EXTRA.gardening) ? 15 : 10;
if (_local1 > _local2){
_local1 = _local2;
};
return (_local1);
}
public function popularityJanitorKumulatif():Number{
var _local1:Number = (game.popularity.JanitorRoom * 0.1);
if (_local1 > 10){
_local1 = 10;
};
return (_local1);
}
public function popularityVisitor():Number{
var _local1:Number = game.popularity.Visitor;
if (_local1 > 20){
_local1 = 20;
};
return (_local1);
}
public function popularityBooth():Number{
var _local1:Number = (game.popularity.Booth * 0.6);
if (_local1 > 60){
_local1 = 60;
};
return (_local1);
}
public function updateSubLain_Popularity(_arg1:Number=0):void{
game.popularity.Lain = (game.popularity.Lain + _arg1);
var _local2:Number = popularityLain();
popularity = (popularity + _local2);
hitungPopularity();
realTimeResort("popularity");
}
public function updateTilePopularity_onAdd(_arg1:uint=0, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:Number;
var _local5:Number;
var _local6:Number;
var _local7:uint;
if (game.EXTRA.gardening){
_local4 = 15;
_local6 = 0.1;
} else {
_local4 = 10;
_local6 = 0;
};
_local5 = (game.popularity.Scenery + game.popularity.Tile);
updateSubTile_popularity(_arg1, _local5, _local4, _local6, _arg3);
if (_arg2){
hitungPopularity();
realTimeResort("popularity");
};
}
public function updateSubTile_popularity(_arg1:uint, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Boolean=false):void{
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:uint;
var _local12:uint;
var _local13:uint;
var _local14:String = ("TILE_" + _arg1);
_local10 = serbi.dataOb.Tile[_local14]["pop"];
_local12 = game.objects.TileSum[(_arg1 - 1)];
_local10 = (_local10 + _arg4);
_local6 = ((_local10 + _arg4) * _local12);
if (_arg5){
game.objects.TileSum.Sub_Pop[(_arg1 - 1)] = _local6;
game.popularity.Tile = (game.popularity.Tile + _local6);
} else {
_local9 = Math.min(_arg3, (_arg2 * 0.15));
_local7 = game.objects.TileSum.Sub_Pop[(_arg1 - 1)];
game.objects.TileSum.Sub_Pop[(_arg1 - 1)] = _local6;
game.popularity.Tile = (game.popularity.Tile + (_local6 - _local7));
if (game.popularity.Tile < 0){
game.popularity.Tile = 0;
};
_local8 = ((game.popularity.Scenery + game.popularity.Tile) * 0.15);
_local8 = Math.min(_arg3, _local8);
if (_local8 < 0){
_local8 = 0;
};
popularity = (popularity + (_local8 - _local9));
};
}
public function updateSceneryPopularity_onAdd(_arg1:uint=0, _arg2:Boolean=true, _arg3:Boolean=false):void{
var _local4:uint;
var _local5:Number;
var _local6:Number;
var _local7:Number = (game.EXTRA.gardening) ? 15 : 10;
_local4 = (10 + (25 * game.EXPAND));
_local5 = (game.popularity.Scenery + game.popularity.Tile);
if (game.EXTRA.gardening){
_local6 = 0.1;
} else {
_local6 = 0;
};
updateSubScenery_popularity(_arg1, _local5, _local7, _local4, _local6, _arg3);
if (_arg2){
hitungPopularity();
realTimeResort("popularity");
};
}
public function updateSubScenery_popularity(_arg1:uint, _arg2:Number, _arg3:Number, _arg4:uint, _arg5:Number, _arg6:Boolean):void{
var _local7:Number;
var _local8:Number;
var _local9:Number;
var _local10:Number;
var _local11:Number;
var _local12:uint;
var _local13:uint;
var _local14:uint;
var _local15:String = ("PLANT_" + _arg1);
_local11 = serbi.dataOb.Scenery[_local15]["pop"];
_local13 = game.objects.Scenery["Sum"][(_arg1 - 1)];
_local11 = (_local11 + _arg5);
_local14 = Math.min(_arg4, _local13);
_local7 = 0;
_local12 = 0;
while (_local12 < _local14) {
_local7 = (_local7 + _local11);
_local12++;
};
if (_local14 < _local13){
_local7 = (_local7 + ((_local11 * (_local13 - _local14)) * 0.75));
};
if (_arg6){
game.objects.Scenery["Sub_Pop"][(_arg1 - 1)] = _local7;
game.popularity.Scenery = (game.popularity.Scenery + _local7);
} else {
_local10 = Math.min(_arg3, (_arg2 * 0.15));
_local8 = game.objects.Scenery["Sub_Pop"][(_arg1 - 1)];
game.objects.Scenery["Sub_Pop"][(_arg1 - 1)] = _local7;
game.popularity.Scenery = (game.popularity.Scenery + (_local7 - _local8));
_local9 = ((game.popularity.Scenery + game.popularity.Tile) * 0.15);
_local9 = Math.min(_arg3, _local9);
if (_local9 < 0){
_local9 = 0;
};
popularity = (popularity + (_local9 - _local10));
};
}
public function updateBooth_TotalPopularity(_arg1:String, _arg2:Number=0):void{
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local3 = (game.popularity[_arg1] - _arg2);
_local4 = (game.popularity.Booth * 0.6);
game.popularity.Booth = (game.popularity.Booth + _local3);
_local5 = (game.popularity.Booth * 0.6);
if (_local5 > 60){
_local5 = 60;
};
if ((((_local5 >= 60)) && ((_local4 >= 60)))){
} else {
popularity = (popularity + (_local5 - _local4));
if (popularity < 0){
popularity = 0;
};
};
}
public function updateJanitorRoom_TotalPopularity(_arg1:Number=0):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
_local2 = (game.popularity.JanitorRoom - _arg1);
_local3 = (_arg1 * 0.1);
_local4 = (game.popularity.JanitorRoom * 0.1);
if (_local4 > 10){
_local4 = 10;
};
if ((((_local4 >= 10)) && ((_local3 >= 10)))){
} else {
_local5 = (_local4 - _local3);
popularity = (popularity + _local5);
if (popularity < 0){
popularity = 0;
};
};
}
public function updatePopularityLobby():void{
var _local1:Number;
_local1 = game.popularity.Lobby;
game.popularity.Lobby = game.objects.Lobby.ob.popularity;
updateBooth_TotalPopularity("Lobby", _local1);
hitungPopularity();
realTimeResort("popularity");
}
public function updatePopularityBooth_onAdd(_arg1:String, _arg2:String, _arg3:Boolean=true):void{
var _local4:Number = 0;
if (_arg1 == "JanitorRoom"){
sortOnSubBooth_popularity(_arg1, _arg2);
_local4 = game.popularity[_arg1];
updateSubBooth_popularity(_arg1, _arg2, true);
updateJanitorRoom_TotalPopularity(_local4);
} else {
sortOnSubBooth_popularity(_arg1, _arg2);
_local4 = game.popularity[_arg1];
updateSubBooth_popularity(_arg1, _arg2);
updateBooth_TotalPopularity(_arg1, _local4);
};
hitungPopularity();
realTimeResort("popularity");
}
public function sortOnSubBooth_popularity(_arg1:String, _arg2:String):void{
var _local3:Array;
if (_arg1 == "JanitorRoom"){
_local3 = TempList_Pop[_arg1];
} else {
_local3 = TempList_Pop[_arg1][_arg2];
};
var _local4:uint = _local3.length;
_local3.sortOn("popularity", (Array.DESCENDING | Array.NUMERIC));
_local3 = null;
}
public function updateSubBooth_popularity(_arg1:String, _arg2:String, _arg3:Boolean=false):void{
var _local4:Array;
var _local5:uint;
var _local6:uint;
var _local7:uint;
var _local8:Number;
var _local9:Number;
var _local12:Number;
_arg3 = false;
if (_arg1 == "JanitorRoom"){
_arg3 = true;
_local4 = TempList_Pop[_arg1];
} else {
_local4 = TempList_Pop[_arg1][_arg2];
};
var _local10:Boolean = ((serbi.dataOb.Booth[_arg2].standbooth) && (!(_arg3)));
_local7 = (serbi.dataOb.Booth[_arg2].drainpop + game.EXPAND);
_local9 = serbi.dataOb.Booth[_arg2].pop[3];
_local5 = _local4.length;
var _local11:* = null;
_local8 = 0;
_local6 = _local8;
k = 0;
while (k < _local5) {
_local11 = _local4[k];
if (_local11.ob != null){
if (_arg3){
_local8 = (_local8 + _local11.popularity);
} else {
if (_local6 < _local7){
_local8 = (_local8 + _local11.popularity);
} else {
if (_local10){
_local8 = (_local8 + (_local11.popularity * 0.1));
} else {
_local8 = (_local8 + ((_local11.popularity * _local11.ob.level_) * 0.1));
};
};
};
_local6++;
};
k++;
};
_local4 = null;
_local11 = null;
if (_arg1 == "JanitorRoom"){
_local12 = (_local8 - game.popularity[_arg1]);
} else {
_local12 = (_local8 - game.popularity[_arg2]);
game.popularity[_arg2] = _local8;
};
game.popularity[_arg1] = (game.popularity[_arg1] + _local12);
}
public function Janitor_addRPTiapCleanSampah(_arg1:uint=1):void{
game.totalRP.Janitor = (game.totalRP.Janitor + _arg1);
hitungTotalRP(false, _arg1);
game.MISC.SampahDay++;
CheckMissions("x_trash");
CheckMissions("x_trash2");
}
public function hitungTotalRP(_arg1:Boolean=false, _arg2:uint=0):void{
if (_arg1){
RP = (game.totalRP.Scenery + (((((((game.totalRP.Tile + game.totalRP.Khusus) + game.totalRP.Facility) + game.totalRP.Room) + game.totalRP.Lobby) + game.totalRP.JanitorRoom) + game.totalRP.Janitor) + game.totalRP.Mobil));
updateStars(_arg1);
} else {
RP = (RP + _arg2);
updateStars();
};
}
public function updateStars(_arg1:Boolean=false):void{
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Boolean;
var _local8:String;
var _local9:String;
var _local10:uint;
var _local11:uint;
var _local12:*;
var _local13:Boolean;
var _local14:Boolean;
var _local15:uint;
var _local16:Boolean;
var _local17:*;
_local2 = serbi.ResearchPoint.level_.length;
_local5 = star;
_local6 = 0;
_local7 = false;
_local3 = 0;
while (_local3 < _local2) {
_local4 = serbi.ResearchPoint.level_[_local3];
_local6 = (_local3 + 1);
if (RP >= _local4){
star = _local6;
} else {
star = _local3;
break;
};
_local3++;
};
if (((!((_local5 == star))) || (_arg1))){
_local6 = star;
if (star >= _local2){
_local6 = (star - 1);
};
batasRP = uint(serbi.ResearchPoint.level_[_local6]);
updateRP();
navigator1.star_t.text = String(star);
if (_local5 != star){
if (star < 11){
_local12 = serbi.Unlocked[("level_" + _local6)];
_local13 = false;
_local14 = false;
if (_local12 != null){
_local2 = _local12.length;
q = 0;
while (q < _local2) {
_local9 = _local12[q];
_local13 = game.UNLOCKED[_local9];
_local14 = false;
if (!_local13){
if (serbi.dataOb.Booth[_local9]){
_local14 = true;
game.UNLOCKED[_local9] = true;
_local8 = serbi.dataOb.Booth[_local9].mainJenis;
if (_local14){
game.UNLOCKED_new[_local9] = true;
navigator2.tampilkanNewIcon(_local8, _local9);
createNotif(2, false, null, _local8, _local9);
_local15 = countUnlockedBooth();
CheckMissions("x_unlocked", _local15);
CheckAchievements_spc("unlocked_booth", _local15);
};
} else {
_local14 = false;
if (_local9 == "Expand1"){
_local14 = true;
} else {
if (_local9 == "Expand2"){
if (game.EXPAND < 1){
_local14 = false;
} else {
_local14 = true;
};
};
};
if (_local14){
game.UNLOCKED[_local9] = true;
_local8 = "Expand";
TampilkanNewTips("expandResort", true);
game.UNLOCKED_new[_local9] = true;
navigator2.tampilkanNewIcon(_local8, _local9);
createNotif(2, false, null, _local8, _local9);
};
};
};
q++;
};
};
_local16 = false;
_local17 = serbi.Extra_Upgrade[("level_" + _local6)];
if (_local17){
_local2 = _local17.length;
q = 0;
while (q < _local2) {
_local9 = _local17[q];
_local13 = game.UNLOCKED[_local9];
if (!_local13){
game.UNLOCKED_new["Extra"] = true;
navigator2.tampilkanNewIcon("Extra");
game.UNLOCKED_new[_local9] = true;
if (!_local16){
createNotif(3, false, null, _local9);
_local16 = true;
TampilkanNewTips("extraUpgrade", true);
};
};
q++;
};
};
};
_local17 = null;
_local7 = true;
_local10 = serbi.ResearchPoint["bonusLevel"][(star - 1)];
_local11 = serbi.ResearchPoint["bonusRP"][(star - 1)];
uplevelD.showing(star, this, _local10, _local11);
};
_local12 = null;
};
updateRP();
unlockedPlant("PLANT_4");
unlockedPlant("PLANT_5");
unlockedPlant("PLANT_6");
unlockedPlant("PLANT_7");
unlockedPlant("PLANT_8");
CheckMissions("stars_5");
if (_local7){
updateRealTime("money", uplevelD["bonusLevel"], "bonus");
game.totalRP.Khusus = (game.totalRP.Khusus + uplevelD["bonusRP"]);
hitungTotalRP(false, uplevelD["bonusRP"]);
};
}
private function checkRP():void{
}
private function unlockedPlant(_arg1:String):void{
var _local2:Number;
if (!game.UNLOCKED[_arg1]){
if (star >= serbi.dataOb.Scenery[_arg1].unlocked_level){
_local2 = serbi.dataOb.Scenery[_arg1].unlocked_persen;
if (RP_persenFix >= _local2){
game.UNLOCKED[_arg1] = true;
game.UNLOCKED_new[_arg1] = true;
navigator2.tampilkanNewIcon("Scenery", _arg1);
createNotif(2, false, null, "Scenery", _arg1);
game.totalRP.Khusus = (game.totalRP.Khusus + 1);
hitungTotalRP(false, 1);
};
};
};
}
public function updateRP():void{
var _local1:Number;
var _local2:Number;
_local1 = (RP / batasRP);
_local2 = (_local1 * 70);
if (_local2 > 70){
_local2 = 70;
};
RP_persenFix = co.RoundDecNumber((_local1 * 100), 1, true);
if (RP_persenFix > 100){
RP_persenFix = 100;
};
navigator1.researchPoint_t.text = ((String(RP) + "/") + String(batasRP));
navigator1.updateRP(_local2, RP_persenFix);
}
public function updateOtherExpend(_arg1:String, _arg2:int=0):void{
game.MISC[_arg1] = (game.MISC[_arg1] + _arg2);
}
public function acceptPurchaseToGame(_arg1:String):void{
var _local2:String;
var _local3:String;
var _local4:Boolean;
var _local5:*;
var _local6:*;
var _local7:uint;
var _local8:*;
var _local9:uint;
trace(">>>acceptPurchaseToGame>>>", _arg1);
_local5 = serbi.Extra_Upgrade[_arg1];
_local6 = serbi.dataOb.Booth;
_local7 = _local6.length;
_local2 = _local5.unlocked;
_local4 = game.UNLOCKED[_local2];
if (!_local4){
game.UNLOCKED[_local2] = true;
_local3 = _local6[_local2].mainJenis;
game.UNLOCKED_new[_local3] = true;
navigator2.tampilkanNewIcon(_local3, _local2);
createNotif(2, false, null, _local3, _local2);
_local9 = countUnlockedBooth();
CheckMissions("x_unlocked", _local9);
CheckAchievements_spc("unlocked_booth", _local9);
};
CheckMissions("all_extraUpgrade");
_local5 = null;
_local6 = null;
_local8 = null;
if (_arg1 == "heater"){
updateSubLain_Popularity(0.75);
} else {
if (_arg1 == "wifi"){
updateSubLain_Popularity(1);
} else {
if (_arg1 == "aid"){
updateSubLain_Popularity(0.5);
} else {
if (_arg1 == "towel"){
updateSubLain_Popularity(0.75);
} else {
if (_arg1 == "gardening"){
effectExtraExpandTo_SceneryTile(_arg1);
} else {
if (_arg1 == "uniform"){
_local8 = game.objects.Lobby.ob;
_local8.acceptPurchaseUniform();
_local7 = game.janitors.length;
q = 0;
while (q < _local7) {
_local8 = game.janitors[q].ob;
_local8.acceptPurchaseUniform();
q++;
};
_local7 = game.objects.Facility.length;
q = 0;
while (q < _local7) {
_local8 = game.objects.Facility[q].ob;
_local8.acceptPurchaseUniform();
q++;
};
} else {
if (_arg1 == "treadmill"){
_local8 = game.objects.Lobby.ob;
_local8.acceptPurchaseTreadmill();
_local7 = game.janitors.length;
q = 0;
while (q < _local7) {
_local8 = game.janitors[q].ob;
_local8.acceptPurchaseTreadmill();
q++;
};
_local7 = game.objects.Facility.length;
q = 0;
while (q < _local7) {
_local8 = game.objects.Facility[q].ob;
q++;
};
};
};
};
};
};
};
};
_local8 = null;
}
public function khususUnlockedExpand2():void{
if (((game.UNLOCKED.Expand2) && ((game.EXPAND == 1)))){
if (game.UNLOCKED.Expand1){
game.UNLOCKED_new.Expand2 = true;
navigator2.tampilkanNewIcon("Expand", "Expand2");
};
};
}
public function effectExtraExpandTo_Booth(_arg1:String):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
_local2 = (game.popularity.Scenery + game.popularity.Tile);
_local3 = 10;
_local5 = false;
if (_arg1 == "gardening"){
_local4 = (_local2 * 0.15);
_local4 = ((_local3)<_local4) ? _local3 : _local4;
popularity = (popularity - _local4);
_local5 = true;
} else {
_local3 = (game.EXTRA.gardening) ? 15 : 10;
_local4 = (_local2 * 0.15);
_local4 = ((_local3)<_local4) ? _local3 : _local4;
popularity = (popularity - _local4);
};
game.popularity.Scenery = 0;
if (_local5){
game.popularity.Tile = 0;
q = 5;
while (q < 14) {
updateTilePopularity_onAdd(q, false, true);
q++;
};
};
q = 1;
while (q < 9) {
updateSceneryPopularity_onAdd(q, false, true);
q++;
};
popularity = (popularity + popularitySceneryEtc());
hitungPopularity();
realTimeResort("popularity");
}
public function effectExtraExpandTo_SceneryTile(_arg1:String):void{
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Boolean;
_local2 = (game.popularity.Scenery + game.popularity.Tile);
_local3 = 10;
_local5 = false;
if (_arg1 == "gardening"){
_local4 = (_local2 * 0.15);
_local4 = ((_local3)<_local4) ? _local3 : _local4;
popularity = (popularity - _local4);
_local5 = true;
} else {
_local3 = (game.EXTRA.gardening) ? 15 : 10;
_local4 = (_local2 * 0.15);
_local4 = ((_local3)<_local4) ? _local3 : _local4;
popularity = (popularity - _local4);
};
game.popularity.Scenery = 0;
if (_local5){
game.popularity.Tile = 0;
q = 5;
while (q < 14) {
updateTilePopularity_onAdd(q, false, true);
q++;
};
};
q = 1;
while (q < 9) {
updateSceneryPopularity_onAdd(q, false, true);
q++;
};
popularity = (popularity + popularitySceneryEtc());
hitungPopularity();
realTimeResort("popularity");
}
public function acceptPurchaseExpand(_arg1):void{
var _local2:uint;
var _local3:uint;
var _local4:String;
var _local5:uint;
_local2 = serbi.EXPAND["price"][(game.EXPAND + 1)];
trace("->acceptPurchaseExpand", _arg1.name, _arg1.n_expand, "_price?", _local2);
if (money >= _local2){
updateRealTime("money", -(_local2));
updateOtherExpend("Expand", _local2);
PlaySound("coin1");
CallAutoPaused();
game.EXPAND++;
_local3 = game.EXPAND;
COLS = serbi.EXPAND[_local3].COLS;
ROWS = serbi.EXPAND[_local3].ROWS;
_local4 = (((((("Expanding Resort To Level " + _local3) + "\nArea (") + String(ROWS)) + " x ") + String(COLS)) + ")");
waitLayar.showing2(_local4);
trace("\n---EXPAND @", _local3, "COLS:", COLS, "ROWS:", ROWS, "---UPDATING POPULARITY");
_local5 = serbi.ResearchPoint.addPoint[("Expand" + _local3)];
game.totalRP.Khusus = (game.totalRP.Khusus + _local5);
hitungTotalRP(false, _local5);
if (_local3 == 1){
updateSubLain_Popularity(1);
} else {
if (_local3 == 2){
updateSubLain_Popularity(1);
};
};
effectExtraExpandTo_SceneryTile("expand");
batas_visitor = calculateBatasVisitor();
MapSprite.acceptExpanding(_local3);
CheckAchievements("acv_awesomeContractor");
CheckAchievements("acv_expertContractor");
CheckAchievements("acv_masterDev");
CheckMissions("expand1");
CheckMissions("expand2");
} else {
createNotif(1);
};
}
public function setNextMissions(_arg1:String="", _arg2:uint=0, _arg3:Number=0):void{
var _local4:Array;
var _local5:String;
var _local6:Object;
var _local7:int;
if (navigator3.adaFlowTeks){
CheckMissions_sub(_arg1, _arg2, _arg3);
} else {
_local4 = Mission_Temp;
if (_local4.length > 0){
createNotif(4);
_local5 = _local4[0].initial;
_local6 = serbi.Mission[_local5];
_local7 = CheckMissions_sub(_local5, 0, 0, true);
navigator3.isiFlowTeks(_local5, _local6.desc, _local7, _local6.batas);
navigator3.setBonusTeks(("$ " + _local6.bonus));
_local6 = null;
_local5 = null;
};
_local4 = null;
};
}
public function CheckMissions(_arg1:String="", _arg2:int=0, _arg3:Number=0):void{
if (navigator3.adaFlowTeks){
if (_arg1 == ""){
CheckMissions_sub(_arg1, _arg2, _arg3);
} else {
if (_arg1 == navigator3.jenis_flow){
CheckMissions_sub(_arg1, _arg2, _arg3, false, true);
};
};
};
}
public function CheckMissions_sub(_arg1:String="", _arg2:int=0, _arg3:Number=0, _arg4:Boolean=false, _arg5:Boolean=false){
var _local6:Array;
var _local7:Object;
var _local8:Boolean;
var _local9:String;
var _local10:Boolean;
var _local11:uint;
var _local12:uint;
var _local13:Number;
var _local14:String;
var _local15:Boolean;
var _local16:int;
if (_arg5){
_arg4 = (navigator3.centerFlow == false);
};
if (((navigator3.centerFlow) || (_arg4))){
_local6 = Mission_Temp;
if (_local6.length > 0){
_local7 = _local6[0];
_local8 = _local7.cleared;
if (!_local8){
_local9 = _local7.initial;
_local10 = ((_arg4) || ((_arg1 == "")));
if (_arg4){
if (serbi.Mission[_local9].batas < 1){
_local10 = false;
};
};
if (((_local10) || ((_local9 == _arg1)))){
_local15 = false;
_local12 = 0;
if (_local9 == "build_room"){
_local12 = (_local10) ? checkTotalRooms() : _arg2;
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_room"){
_local12 = (_local10) ? checkTotalRooms() : _arg2;
if (_local12 >= 12){
_local15 = true;
};
} else {
if (_local9 == "xx_room"){
_local12 = (_local10) ? checkTotalRooms() : _arg2;
if (_local12 >= 20){
_local15 = true;
};
} else {
if (_local9 == "one_lodge"){
_local12 = (_local10) ? jumlah_lodge : _arg2;
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_lodge"){
_local12 = (_local10) ? jumlah_lodge : _arg2;
if (_local12 >= 4){
_local15 = true;
};
} else {
if (_local9 == "xx_lodge"){
_local12 = (_local10) ? jumlah_lodge : _arg2;
if (_local12 >= 15){
_local15 = true;
};
} else {
if (_local9 == "put_scenery"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "connect_tiles"){
_local15 = CheckRoomWithPath();
} else {
if (_local9 == "build_facility"){
_local12 = (_local10) ? checkTotalFacility() : _arg2;
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "scenery_grass"){
_local12 = hitungSceneryOnGrass(1);
if (_local12 >= 1){
TampilkanNewTips("scenery1", true);
_local15 = true;
};
} else {
if (_local9 == "x_tree"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 12){
_local15 = true;
};
} else {
if (_local9 == "xx_tree"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 20){
_local15 = true;
};
} else {
if (_local9 == "xx_tree2"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 40){
_local15 = true;
};
} else {
if (_local9 == "xx_tree3"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 70){
_local15 = true;
};
} else {
if (_local9 == "xx_tree4"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 90){
_local15 = true;
};
} else {
if (_local9 == "xx_tree5"){
_local12 = (_local10) ? checkTotalScenery() : _arg2;
if (_local12 >= 120){
_local15 = true;
};
} else {
if (_local9 == "x_maple"){
_local12 = countSubTotalScenery(8, 10);
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "one_stayed"){
_local12 = hitungBookedRoom(1);
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_stayed"){
_local12 = hitungBookedRoom(8);
if (_local12 >= 8){
_local15 = true;
};
} else {
if (_local9 == "xx_stayed"){
_local12 = hitungBookedRoom(15);
if (_local12 >= 15){
_local15 = true;
};
} else {
if (_local9 == "one_janitor"){
_local12 = game.janitors.length;
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_janitor"){
_local12 = game.janitors.length;
if (_local12 >= 4){
_local15 = true;
};
} else {
if (_local9 == "x_profit"){
_local12 = _arg3;
if (_arg3 >= 1000){
_local15 = true;
};
} else {
if (_local9 == "x_profit2"){
_local12 = _arg3;
if (_arg3 >= 2500){
_local15 = true;
};
} else {
if (_local9 == "first_meal"){
_local12 = checkOnMeal(1);
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_money"){
if (money >= 2500){
_local15 = true;
};
_local12 = money;
} else {
if (_local9 == "x_money2"){
if (money >= 75000){
_local15 = true;
};
_local12 = money;
} else {
if (_local9 == "x_facilityRoom"){
_local12 = (_local10) ? (checkTotalRooms() + checkTotalFacility()) : _arg2;
if (_local12 >= 8){
_local15 = true;
};
} else {
if (_local9 == "x_minibooth"){
_local12 = (_local10) ? countMinibooth(true) : _arg2;
if (_local12 >= 4){
_local15 = true;
};
} else {
if (_local9 == "x_booths"){
_local12 = (_local10) ? ((checkTotalRooms() + checkTotalFacility()) + checkTotalJanitorRoom()) : _arg2;
if (_local12 >= 35){
_local15 = true;
};
} else {
if (_local9 == "x_booths2"){
_local12 = (_local10) ? ((checkTotalRooms() + checkTotalFacility()) + checkTotalJanitorRoom()) : _arg2;
if (_local12 >= 60){
_local15 = true;
};
} else {
if (_local9 == "x_customer"){
_local12 = countTotalCustomer_facility(25);
if (_local12 >= 25){
_local15 = true;
};
} else {
if (_local9 == "x_customer2"){
_local12 = countTotalCustomer_facility(80);
if (_local12 >= 80){
_local15 = true;
};
} else {
if (_local9 == "x_customer3"){
_local12 = countTotalCustomer_facility(110);
if (_local12 >= 110){
_local15 = true;
};
} else {
if (_local9 == "x_customer4"){
_local12 = countTotalCustomer_facility(200);
if (_local12 >= 200){
_local15 = true;
};
} else {
if (_local9 == "x_facility"){
for (_local14 in game["SUM"]) {
if (_local14 != "Tile"){
if (game["SUM"][_local14] > 0){
++_local12;
if (_local12 >= 5){
_local15 = true;
break;
};
};
};
};
} else {
if (_local9 == "xx_facility"){
_local12 = checkTotalFacility();
if (_local12 >= 15){
_local15 = true;
};
} else {
if (_local9 == "xxx_facility"){
for (_local14 in game["SUM"]) {
if (_local14 != "Tile"){
if (game["SUM"][_local14] > 0){
++_local12;
if (_local12 >= 15){
_local15 = true;
break;
};
};
};
};
} else {
if (_local9 == "x_promote"){
_local12 = ifAdaJanitorLevel(3, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_promote2"){
_local12 = ifAdaJanitorLevel(3, 20);
if (_local12 >= 20){
_local15 = true;
};
} else {
if (_local9 == "x_trash"){
_local12 = game.MISC.SampahDay;
if (_local12 >= 5){
_local15 = true;
};
} else {
if (_local9 == "x_trash2"){
_local12 = game.MISC.SampahDay;
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "x_visitors"){
_local12 = (_local10) ? countVisitorInsideResort() : _arg2;
if (_local12 >= 25){
_local15 = true;
};
} else {
if (_local9 == "x_visitors2"){
_local12 = (_local10) ? countVisitorInsideResort() : _arg2;
if (_local12 >= 50){
_local15 = true;
};
} else {
if (_local9 == "x_visitors3"){
_local12 = (_local10) ? countVisitorInsideResort() : _arg2;
if (_local12 >= 75){
_local15 = true;
};
} else {
if (_local9 == "x_couples"){
_local12 = (_local10) ? countVisitorInsideResort(true) : _arg2;
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "first_spcVisitor"){
_local12 = game.visitorsSpecial_insideResort.length;
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "anne_hataway"){
if (game.specialVisitor["Visitor25"].ada){
_local15 = true;
_local12 = 1;
};
} else {
if (_local9 == "mr_rock"){
if (game.specialVisitor["Visitor26"].ada){
_local15 = true;
_local12 = 1;
};
} else {
if (_local9 == "naomi_volts"){
if (game.specialVisitor["Visitor27"].ada){
_local15 = true;
_local12 = 1;
};
} else {
if (_local9 == "robert"){
if (game.specialVisitor["Visitor28"].ada){
_local15 = true;
_local12 = 1;
};
} else {
if (_local9 == "jason"){
if (game.specialVisitor["Visitor29"].ada){
_local15 = true;
_local12 = 1;
};
} else {
if (_local9 == "janitorRoom_upgrade"){
_local12 = ifAdaJanitorRoomLevel(3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_janitorRoom"){
_local12 = ifAdaJanitorRoomLevel(3, 4);
if (_local12 >= 4){
_local15 = true;
};
} else {
if (_local9 == "x_giftshop"){
_local12 = game["SUM"]["Giftshop"];
if (_local12 >= 2){
_local15 = true;
};
} else {
if (_local9 == "x_medical"){
_local12 = game["SUM"]["Medical"];
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_minimarket"){
_local12 = game["SUM"]["Minimarket"];
if (_local12 >= 2){
_local15 = true;
};
} else {
if (_local9 == "x_baratResto"){
_local12 = game["SUM"]["BaratResto"];
if (_local12 >= 1){
_local15 = true;
};
} else {
if (_local9 == "x_medicine"){
_local12 = countSubTotalUsed("Medical", 11);
if (_local12 >= 11){
_local15 = true;
};
} else {
if (_local9 == "x_medicine2"){
_local12 = countSubTotalUsed("Medical", 55);
if (_local12 >= 55){
_local15 = true;
};
} else {
if (_local9 == "x_buyers"){
_local12 = countSubTotalUsed("Minimarket", 100);
if (_local12 >= 100){
_local15 = true;
};
} else {
if (_local9 == "x_buyers2"){
_local12 = countSubTotalUsed("Minimarket", 250);
if (_local12 >= 250){
_local15 = true;
};
} else {
if (_local9 == "x_lobbyUsed"){
_local12 = game.objects.Lobby.ob.used;
if (_local12 >= 750){
_local15 = true;
};
} else {
if (_local9 == "spend_1"){
_local12 = money_spend;
if (money_spend >= 15000){
_local15 = true;
};
} else {
if (_local9 == "expand1"){
if (game.EXPAND >= 1){
_local15 = true;
};
} else {
if (_local9 == "expand2"){
if (game.EXPAND >= 2){
_local15 = true;
};
} else {
if (_local9 == "one_facilityUpgrade"){
_local12 = countAdaFacilityLevel(2, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_facilityUpgrade"){
_local12 = countAdaFacilityLevel(2, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_facilityUpgrade2"){
_local12 = countAdaFacilityLevel(3, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_facilityUpgrade3"){
_local12 = countAdaFacilityLevel(3, 7);
if (_local12 >= 7){
_local15 = true;
};
} else {
if (_local9 == "x_facilityStar"){
_local12 = countAdaFacilityLevel(2, 10);
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "x_roomStar"){
_local12 = ifAdaRoomLevel(2, 12);
if (_local12 >= 12){
_local15 = true;
};
} else {
if (_local9 == "x_medicalUpgrade"){
_local12 = ifAdaFacilityLevel("Medical", 2, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_medicalUpgrade2"){
_local12 = ifAdaFacilityLevel("Medical", 3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_roomUpgrade"){
_local12 = ifAdaRoomLevel(3, 10);
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "x_cottageUpgrade"){
_local12 = ifAdaCottageLevel(2, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_cottageFullUpgrade"){
_local12 = ifAdaCottageLevel(3, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_lodgeUpgrade"){
_local12 = ifAdaLodgeLevel(2, 3);
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_lodgeFullUpgrade"){
_local12 = ifAdaLodgeLevel(3);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "lobby_upgrade"){
_local12 = game.objects.Lobby.ob.level_;
if (_local12 >= 2){
_local15 = true;
};
} else {
if (_local9 == "stars_5"){
_local12 = star;
if (_local12 >= 5){
_local15 = true;
};
} else {
if (_local9 == "x_PoolGolf"){
if ((((game.SUM["Pool"] > 0)) && ((game.SUM["Golf"] > 0)))){
_local15 = true;
_local12 = 2;
} else {
_local12 = 1;
};
} else {
if (_local9 == "lobby_upgrade2"){
_local12 = game.objects.Lobby.ob.level_;
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_jacuziFullUpgrade"){
_local12 = ifAdaFacilityLevel("Jacuzi", 3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_barFullUpgrade"){
_local12 = ifAdaFacilityLevel("Bar", 3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_poolFullUpgrade"){
_local12 = ifAdaFacilityLevel("Pool", 3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "x_golfFullUpgrade"){
_local12 = ifAdaFacilityLevel("Golf", 3, 1);
if (_local12 > 0){
_local15 = true;
};
} else {
if (_local9 == "all_booth"){
if (jumlah_cottage > 0){
_local12++;
};
if (jumlah_lodge > 0){
_local12++;
};
if (checkTotalJanitorRoom() > 0){
_local12++;
};
for (_local14 in game.SUM) {
if (_local14 != "Tile"){
if (game.SUM[_local14] > 0){
_local12++;
};
};
};
if (_local12 >= 20){
_local15 = true;
};
} else {
if (_local9 == "x_spcVisitor"){
_local12 = game.visitorsSpecial_insideResort.length;
if (_local12 >= 2){
_local15 = true;
};
} else {
if (_local9 == "x_spcVisitor2"){
_local12 = game.visitorsSpecial_insideResort.length;
if (_local12 >= 3){
_local15 = true;
};
} else {
if (_local9 == "x_unlocked"){
_local12 = (_local10) ? countUnlockedBooth() : _arg2;
if (_local12 >= 10){
_local15 = true;
};
} else {
if (_local9 == "all_extraUpgrade"){
_local12 = jumlahExtraUpgrade();
if (_local12 >= 15){
_local15 = true;
};
} else {
if (_local9 == "x_acv"){
countTotalAcv();
_local12 = acv_complete;
if (_local12 >= 12){
_local15 = true;
};
} else {
if (_local9 == "complete_acv"){
countTotalAcv();
_local12 = acv_complete;
if (game.ACV.completed){
_local15 = true;
};
} else {
if (_local9 == "complete_mission"){
_local12 = misi_complete;
if (_local12 >= 93){
_local15 = true;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_arg4){
_local7 = null;
_local6 = null;
if (_arg5){
navigator3.countMissionUpdate(_local12);
};
return (_local12);
} else {
navigator3.countMissionUpdate(_local12);
if (_local15){
_local11 = serbi.Mission[_local9].bonus;
_local7.cleared = true;
navigator3.acceptFlow();
PlaySound("bonus1");
updateRealTime("money", _local11, "bonus");
misi_complete++;
trace("## ClearedMissions :: ", misi_complete);
CheckMissions("complete_mission");
Mission_Temp.shift();
if (misi_complete > 4){
TampilkanNewTips("clearedMission", true);
};
if (endTutorial){
game.totalRP.Khusus++;
hitungTotalRP(false, 1);
};
};
};
};
};
_local7 = null;
};
_local6 = null;
};
}
private function countTotalAcv():void{
var _local1:String;
acv_complete = 0;
for (_local1 in game.ACV) {
if (((game.ACV[_local1]) && (!((_local1 == "completed"))))){
acv_complete++;
};
};
game.ACV.completed = (acv_complete >= 14);
}
private function countAdaFacilityLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array;
_local6 = game.objects.Facility;
_local4 = _local6.length;
_local5 = 0;
_local3 = 0;
while (_local3 < _local4) {
if (_local6[_local3].ob.level_ >= _arg1){
++_local5;
if (_local5 >= _arg2){
break;
};
};
_local3++;
};
_local6 = null;
return (_local5);
}
private function ifAdaJanitorLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array;
_local5 = 0;
_local6 = game.janitors;
_local4 = _local6.length;
_local3 = 0;
while (_local3 < _local4) {
if (!_local6[_local3]["ob"]["garbage"]){
if (_local6[_local3]["ob"]["level_"] >= _arg1){
++_local5;
if (_local5 >= _arg2){
break;
};
};
};
_local3++;
};
_local6 = null;
return (_local5);
}
private function ifAdaJanitorRoomLevel(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Array;
_local5 = 0;
_local6 = game.objects.JanitorRoom;
_local4 = _local6.length;
_local3 = 0;
while (_local3 < _local4) {
if (_local6[_local3]["ob"]["level_"] >= _arg1){
++_local5;
if (_local5 >= _arg2){
break;
};
};
_local3++;
};
_local6 = null;
return (_local5);
}
private function CheckRoomWithPath():Boolean{
var _local1:uint;
var _local2:uint;
var _local3:uint;
var _local4:uint;
var _local5:uint;
var _local6:Boolean;
var _local7:Array;
var _local8:*;
var _local9:String;
_local6 = false;
_local7 = game.objects.Cottage;
_local3 = _local7.length;
_local9 = "12_20";
_local1 = 0;
while (_local1 < _local3) {
_local8 = _local7[_local1].ob;
_local4 = _local8.tpointAr.length;
_local2 = 0;
while (_local2 < _local4) {
_local5 = _local8.tpointAr[_local2];
if (_local8.pathsGo[_local5]){
if (_local8.pathsGo[_local5][_local9]){
_local6 = true;
break;
};
};
_local2++;
};
if (_local6){
break;
};
_local1++;
};
_local8 = null;
_local7 = null;
return (_local6);
}
private function checkOnMeal(_arg1:uint=0):uint{
var _local2:Array;
var _local3:Object;
var _local4:uint;
var _local5:uint;
var _local7:uint;
_local2 = game.objects.Facility;
_local3 = null;
var _local6:Boolean;
_local7 = _local2.length;
_local4 = 0;
_local5 = 0;
while (_local5 < _local7) {
_local3 = _local2[_local5].ob;
if (_local3.restobooth){
if (_local3.booked){
++_local4;
if (_local4 >= _arg1){
break;
};
};
};
_local5++;
};
_local2 = null;
_local3 = null;
return (_local4);
}
private function countTotalCustomer_facility(_arg1:uint=0):uint{
var _local2:Array;
var _local3:Object;
var _local4:uint;
var _local5:uint;
var _local6:uint;
_local2 = game.objects.Facility;
_local3 = null;
_local4 = _local2.length;
_local6 = 0;
if (_local4 > 0){
_local5 = 0;
while (_local5 < _local4) {
_local3 = _local2[_local5].ob;
_local6 = (_local6 + _local3["today_used"]);
if (_local6 >= _arg1){
break;
};
_local5++;
};
};
_local2 = null;
_local3 = null;
return (_local6);
}
private function hitungBookedRoom(_arg1:uint=0):uint{
var _local2:Array;
var _local3:Object;
var _local4:uint;
var _local5:uint;
var _local6:uint;
var _local7:Boolean;
_local2 = game.objects.Cottage;
_local3 = null;
_local4 = _local2.length;
_local7 = false;
_local6 = 0;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _local2[_local5].ob;
if (_local3.booked){
++_local6;
if (_local6 >= _arg1){
_local7 = true;
break;
};
};
_local5++;
};
if (!_local7){
_local2 = game.objects.Lodge;
_local4 = _local2.length;
_local7 = false;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _local2[_local5].ob;
if (_local3.booked){
++_local6;
if (_local6 >= _arg1){
break;
};
};
_local5++;
};
};
_local2 = null;
_local3 = null;
return (_local6);
}
private function jumlahExtraUpgrade():uint{
var _local1:Object;
var _local3:String;
var _local4:uint;
_local1 = game.EXTRA;
var _local2:uint = _local1.length;
_local4 = 0;
for (_local3 in _local1) {
if (_local1[_local3] == true){
_local4++;
};
};
_local1 = null;
return (_local4);
}
private function hitungSceneryOnGrass(_arg1:uint=0):uint{
var _local2:Array;
var _local3:Object;
var _local4:uint;
var _local5:uint;
var _local6:uint;
_local2 = game.objects.Scenery;
_local3 = null;
_local4 = _local2.length;
_local6 = 0;
_local5 = 0;
while (_local5 < _local4) {
_local3 = _local2[_local5].ob;
if (_local3.onGrass){
++_local6;
if (_local6 >= _arg1){
break;
};
};
_local5++;
};
_local2 = null;
_local3 = null;
return (_local6);
}
public function CheckAchievements(_arg1:String, _arg2:uint=0, _arg3:Number=0):void{
var _local4:Boolean;
var _local5:Boolean;
var _local6:uint;
var _local7:uint;
var _local8:Number;
var _local9:String;
var _local10:int;
var _local11:uint;
_local4 = game.ACV[_arg1];
_local5 = false;
_local10 = 0;
if (!_local4){
if (_arg1 == "acv_credit"){
_local5 = true;
} else {
if (_arg1 == "acv_goodResort"){
if (popularity_fix >= 17){
if (_arg3 >= 50){
_local5 = true;
};
};
} else {
if (_arg1 == "acv_loveBeingHere"){
if (popularity_fix >= 50){
if (_arg3 >= 75){
_local5 = true;
};
};
} else {
if (_arg1 == "acv_goodResearch"){
if (count_upgrade_booth >= 10){
_local5 = true;
};
} else {
if (_arg1 == "acv_growingResort"){
if (_arg2 >= 10){
_local5 = true;
};
} else {
if (_arg1 == "acv_rookieResort"){
if (_arg2 >= 10){
_local5 = true;
};
} else {
if (_arg1 == "acv_famousResort"){
_local11 = 25;
while (_local11 <= 29) {
if (game.specialVisitor[("Visitor" + _local11)].pernah){
_local10++;
};
_local11++;
};
if (_local10 >= 5){
_local5 = true;
};
} else {
if (_arg1 == "acv_marvelousResort"){
if (_arg2 >= 19){
_local5 = true;
};
} else {
if (_arg1 == "acv_grandResort"){
if (total_booth >= 25){
_local5 = true;
};
trace("total_booth", total_booth);
} else {
if (_arg1 == "acv_awesomeContractor"){
if (game.EXPAND >= 1){
_local5 = true;
};
} else {
if (_arg1 == "acv_expertContractor"){
if (game.EXPAND >= 2){
_local5 = true;
};
} else {
if (_arg1 == "acv_superDev"){
if (popularity_fix >= 70){
_local10 = 0;
if (jumlah_cottage > 0){
_local10++;
};
if (jumlah_lodge > 0){
_local10++;
};
for (_local9 in game.SUM) {
if (_local9 != "Tile"){
if (game.SUM[_local9] > 0){
_local10++;
};
};
};
if (_local10 >= 19){
_local5 = true;
};
};
} else {
if (_arg1 == "acv_masterDev"){
if (((game.ACV["acv_expertContractor"]) && ((popularity_fix >= 100)))){
_local5 = true;
};
} else {
if (_arg1 == "acv_greenBucks"){
if (money >= 250000){
_local5 = true;
};
} else {
if (_arg1 == "acv_bagOfGold"){
if (money >= 500000){
_local5 = true;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
if (_local5){
game.ACV[_arg1] = true;
countTotalAcv();
_local6 = serbi.Achievements[_arg1].bonus;
_local7 = serbi.Achievements[_arg1].RP;
updateRealTime("money", _local6, "bonus");
createAchievement(_arg1);
if (endTutorial){
if (_local7 > 0){
game.totalRP.Khusus = (game.totalRP.Khusus + _local7);
hitungTotalRP(false, _local7);
};
};
CheckMissions("x_acv");
if (acv_complete >= 14){
game.ACV.completed = true;
if (endTutorial){
if (_local7 > 0){
game.totalRP.Khusus = (game.totalRP.Khusus + _local7);
hitungTotalRP(false, _local7);
};
CheckMissions("complete_acv");
};
};
};
};
}
public function CheckAchievements_spc(_arg1:String, _arg2:int=-1):void{
var _local3:Boolean;
var _local4:uint;
var _local5:*;
var _local6:uint;
var _local7:Number;
var _local8:Array;
var _local9:String;
if (!game.ACV.completed){
_local3 = false;
_local4 = 0;
if (_arg1 == "unlocked_booth"){
_local3 = (((game.ACV["acv_growingResort"] == false)) || ((game.ACV["acv_marvelousResort"] == false)));
if (_local3){
_local4 = ((_arg2)==-1) ? countUnlockedBooth() : _arg2;
CheckAchievements("acv_growingResort", _local4);
CheckAchievements("acv_marvelousResort", _local4);
};
} else {
if (_arg1 == "mood_visitor"){
_local3 = (((game.ACV["acv_goodResort"] == false)) || ((game.ACV["acv_loveBeingHere"] == false)));
if (_local3){
_local8 = game.visitors_insideResort;
_local7 = 0;
_local4 = _local7;
_local5 = _local8.length;
_local6 = 0;
while (_local6 < _local5) {
_local9 = _local8[_local6].smiley;
if ((((_local9 == "verry_happy")) || ((_local9 == "happy")))){
_local4++;
};
_local6++;
};
_local8 = null;
_local8 = game.visitorsSpecial_insideResort;
_local5 = _local8.length;
_local6 = 0;
while (_local6 < _local5) {
_local9 = _local8[_local6].smiley;
if ((((_local9 == "verry_happy")) || ((_local9 == "happy")))){
_local4++;
};
_local6++;
};
if (_local4 > 0){
_local7 = ((_local4 / _local5) * 100);
};
CheckAchievements("acv_goodResort", 0, _local7);
CheckAchievements("acv_loveBeingHere", 0, _local7);
};
};
};
};
}
private function countUnlockedBooth():uint{
var _local1:uint;
var _local2:Object;
var _local3:uint;
var _local4:uint;
_local1 = 0;
_local2 = serbi.dataOb.listing;
_local4 = _local2.length;
if (game.UNLOCKED["Cottage"]){
_local1++;
};
if (game.UNLOCKED["Lodge"]){
_local1++;
};
_local3 = 0;
while (_local3 < _local4) {
if (game["UNLOCKED"][_local2[_local3]]){
_local1++;
};
_local3++;
};
_local2 = null;
return (_local1);
}
private function createAchievement(_arg1:String, _arg2:Object=null):void{
var _local3:MovieClip;
trace(" createAchievement", _arg1);
_local3 = new Achievement();
_local3.creating(this, _arg2, _arg1);
_local3 = null;
}
public function countSubTotalScenery(_arg1:uint, _arg2:uint=1):uint{
var _local3:uint;
var _local4:uint;
_local3 = 0;
_local4 = game.objects.Scenery.length;
q = 0;
while (q < _local4) {
if (game.objects.Scenery[q]["ob"]["jenis"] == _arg1){
_local3++;
if (_local3 >= _arg2){
break;
};
};
q++;
};
return (_local3);
}
public function checkIfSceneryOnGrass():Boolean{
var _local1:String;
var _local2:Point;
var _local3:uint;
var _local4:Boolean;
var _local5:uint;
_local4 = false;
_local5 = game.objects.Scenery.length;
q = 0;
while (q < _local5) {
_local2 = game.objects.Scenery[q].ptile;
_local1 = ((("tile_" + _local2.x) + "_") + _local2.y);
_local3 = game["map"]["tiles"][_local1].jenis;
if ((((_local3 >= 5)) && ((_local3 <= 13)))){
_local4 = true;
break;
};
q++;
};
return (_local4);
}
public function checkIfIceCream():Boolean{
var _local1:Boolean;
var _local2:uint;
_local1 = false;
_local2 = game.objects.Facility.length;
q = 0;
while (q < _local2) {
if (game.objects.Facility[q].jenis == "Icecream"){
_local1 = true;
break;
};
q++;
};
return (_local1);
}
public function checkReservedRoom(_arg1:uint):Boolean{
var _local2:uint;
var _local3:Boolean;
var _local4:Object;
_local2 = 0;
_local3 = false;
q = 0;
while (q < jumlah_cottage) {
_local4 = game.objects.Cottage[q].ob.customer;
if (_local4 != null){
_local2++;
if (_local2 == _arg1){
_local3 = true;
break;
};
};
q++;
};
if (!_local3){
q = 0;
while (q < jumlah_lodge) {
_local4 = game.objects.Lodge[q].ob.customer;
if (_local4 != null){
_local2++;
if (_local2 == _arg1){
_local3 = true;
break;
};
};
q++;
};
};
_local4 = null;
return (_local3);
}
public function checkConnectedTiles(_arg1:Point):uint{
var _local2:uint;
var _local3:String;
var _local5:uint;
var _local6:uint;
_local2 = 0;
var _local4:Point = _arg1;
_local5 = MapSprite.tilesPath.length;
_local6 = MapSprite.defaultTiles.length;
s = 0;
while (s < _local5) {
if (!MapSprite.tilesPath[s].idefault){
q = 0;
while (q < _local6) {
_local3 = ((MapSprite.defaultTiles[q].ptile.x + "_") + MapSprite.defaultTiles[q].ptile.y);
if (MapSprite.tilesPath[s].pathsGo[0][_local3]){
_local2++;
break;
};
q++;
};
};
s++;
};
return (_local2);
}
private function countVisitorInsideResort(_arg1:Boolean=false):uint{
var _local2:int;
var _local3:int;
var _local4:uint;
var _local5:Object;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Array;
var _local9:Array;
var _local10:uint;
_local5 = null;
_local6 = false;
_local8 = game.visitors_insideResort;
_local9 = game.visitorsSpecial_insideResort;
_local3 = game.visitors.length;
couples = 0;
_local4 = 0;
while (_local4 < _local3) {
_local5 = game.visitors[_local4].ob;
if (_local5 != null){
_local6 = _local5.special;
_local7 = _local5.insideResort;
if (_local6){
if (_local7){
_local2 = rumus.searchCompareIndex(_local9, game.visitors, _local4, "id");
if (_local2 == -1){
_local9.push(_local5);
};
} else {
_local2 = rumus.searchCompareIndex(_local9, game.visitors, _local4, "id");
if (_local2 != -1){
_local9.splice(_local2, 1);
};
};
} else {
if (_local7){
if (!_local5.single){
couples++;
};
_local2 = rumus.searchCompareIndex(_local8, game.visitors, _local4, "id");
if (_local2 == -1){
_local8.push(_local5);
};
} else {
_local2 = rumus.searchCompareIndex(_local8, game.visitors, _local4, "id");
if (_local2 != -1){
_local8.splice(_local2, 1);
};
};
};
};
_local4++;
};
_local10 = (_local8.length + _local9.length);
_local5 = null;
_local8 = null;
_local9 = null;
if (_arg1){
return (couples);
};
return (_local10);
}
public function countMinibooth(_arg1:Boolean=false){
var _local2:uint;
total_minibooth = (game.SUM.Icecream + ((game.SUM.Hotdog + game.SUM.Taco) + game.SUM.Giftshop));
if (_arg1){
_local2 = 0;
if (game.SUM.Icecream > 0){
_local2++;
};
if (game.SUM.Hotdog > 0){
_local2++;
};
if (game.SUM.Taco > 0){
_local2++;
};
if (game.SUM.Giftshop > 0){
_local2++;
};
return (_local2);
};
}
public function countTotalBooth():void{
total_booth = checkTotalBooths();
CheckAchievements("acv_grandResort");
CheckAchievements("acv_superDev");
}
public function checkTotalJanitorRoom():uint{
var _local1:uint;
_local1 = game.objects.JanitorRoom.length;
return (_local1);
}
public function checkTotalRooms():uint{
var _local1:uint;
_local1 = (jumlah_cottage + jumlah_lodge);
return (_local1);
}
public function checkTotalFacility():uint{
var _local1:uint;
_local1 = game.objects.Facility.length;
return (_local1);
}
public function checkTotalBooths():uint{
var _local1:uint;
_local1 = (checkTotalRooms() + game.objects.Facility.length);
return (_local1);
}
public function checkTotalLodge():uint{
return (jumlah_lodge);
}
public function checkTotalCottage():uint{
return (jumlah_cottage);
}
public function checkTotalScenery():uint{
var _local1:uint;
_local1 = game.objects.Scenery.length;
return (_local1);
}
public function CallAutoPaused():void{
if (!autoPaused){
autoPaused = true;
autoPausedClip.callPlay();
SettingPauseD(autoPaused);
};
}
public function RemoveAutoPaused():void{
if (!adaPathBaru){
RemoveAutoPaused_in();
CloseAll_DB_objects();
Close_warningDestroy();
};
}
public function RemoveAutoPaused_in():void{
if (autoPaused){
if (GuideIn == null){
autoPaused = false;
autoPausedClip.closed();
SettingPauseD(autoPaused);
};
};
}
public function SettingPauseD(_arg1:Boolean=false):void{
onPaused = _arg1;
if (onPaused){
navigator3.btn_pause.visible = false;
navigator3.btn_play.visible = true;
} else {
navigator3.btn_pause.visible = true;
navigator3.btn_play.visible = false;
RemoveAutoPaused();
};
if (!autoPaused){
pauseD.visible = onPaused;
};
}
public function tidakPaused():Boolean{
if (((((onPaused) || (autoPaused))) || (pausedAnimation))){
return (false);
};
return (true);
}
public function warningDestroy_active(_arg1:Boolean=true):void{
if (_arg1){
warningDestroy.selecting(focusing);
onFocus(null, false);
} else {
warningDestroy.closing();
};
}
public function Close_warningDestroy():void{
warningDestroy.closing();
}
public function CloseAll_DB_objects():void{
DB_object0.closing();
DB_object1.closing();
DB_object2.closing();
DB_object3.closing();
DB_object4.closing();
DB_object5.closing();
DB_object6.closing();
}
public function clickDB_object(_arg1:Boolean=false, _arg2:Boolean=false):void{
if (_arg1){
if (warningDestroy.select){
warningDestroy_active(false);
};
if ((focusing is Plant)){
PlaySound("destroy2");
focusing.destroy();
focusing = null;
} else {
if ((focusing is Tile)){
focusing.checkIfCanDestroy();
if (focusing.canDestroy){
PlaySound("pop1");
focusing.destroy();
focusing = null;
} else {
createNotif(6);
};
} else {
if ((focusing is Booth)){
PlaySound("glick");
warningDestroy_active();
};
};
};
} else {
if (_arg2){
TampilkanNewTips("exploreObject", true);
};
if ((focusing is Visitor)){
DB_object0_active(false);
DB_object1_active(false);
DB_object2_active(false);
DB_object3_active(false);
DB_object5_active(false);
if (DB_object4.select){
DB_object4_active(false);
};
DB_object4_active(true, focusing);
if (!_arg2){
addRP_khususClickOnStage("Visitor");
TampilkanNewTips("clickVisitor", true);
};
} else {
if ((focusing is JanitorRoom)){
DB_object0_active(false);
DB_object1_active(false);
DB_object2_active(false);
DB_object3_active(false);
DB_object4_active(false);
if (DB_object5.select){
DB_object5_active(false);
};
if (DB_object0.select){
DB_object0_active(false);
};
if (focusing.builded){
DB_object5_active(true, focusing);
} else {
DB_object0_active(true, focusing);
};
if (!_arg2){
addRP_khususClickOnStage("Booth");
};
} else {
if ((focusing is Janitor)){
DB_object0_active(false);
DB_object1_active(false);
DB_object2_active(false);
DB_object4_active(false);
DB_object5_active(false);
if (DB_object3.select){
DB_object3_active(false);
};
DB_object3_active();
if (!_arg2){
addRP_khususClickOnStage("Janitor");
TampilkanNewTips("janitor1", true);
};
} else {
if ((((focusing is Plant)) || ((focusing is Tile)))){
DB_object0_active(false);
DB_object1_active(false);
DB_object3_active(false);
DB_object4_active(false);
DB_object5_active(false);
if (DB_object2.select){
DB_object2_active(false);
};
DB_object2_active();
if (!_arg2){
if ((focusing is Plant)){
addRP_khususClickOnStage("Scenery");
} else {
addRP_khususClickOnStage("Tile");
};
};
} else {
DB_object2_active(false);
DB_object3_active(false);
DB_object4_active(false);
DB_object5_active(false);
if (focusing.REF["standbooth"]){
DB_object1_active(false);
if (DB_object6.select){
DB_object6_active(false);
};
if (DB_object0.select){
DB_object0_active(false);
};
if (focusing.builded){
DB_object6_active(true, focusing);
} else {
DB_object0_active(true, focusing);
};
} else {
DB_object6_active(false);
if (DB_object1.select){
DB_object1_active(false);
};
if (DB_object0.select){
DB_object0_active(false);
};
if (focusing.builded){
DB_object1_active(true, focusing);
} else {
DB_object0_active(true, focusing);
};
};
IfSedangGuideS();
if (!_arg2){
if ((focusing is Lobby)){
addRP_khususClickOnStage("Lobby");
} else {
addRP_khususClickOnStage("Booth");
};
};
};
};
};
};
};
}
public function cekDB_objectPos(_arg1):void{
var _local2:Number;
var _local3:Number;
_local2 = (625 - _arg1.width);
_local3 = (400 - _arg1.height);
if (_arg1.x < 45){
_arg1.x = 45;
} else {
if (_arg1.x > _local2){
_arg1.x = _local2;
};
};
if (_arg1.y < 50){
_arg1.y = 50;
} else {
if (_arg1.y > _local3){
_arg1.y = _local3;
};
};
}
public function DB_object0_active(_arg1:Boolean=true, _arg2:Object=null):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
DB_object0.selecting(_arg2);
onFocus(null, false);
} else {
RemoveAutoPaused_in();
DB_object0.closing();
};
}
public function DB_object1_active(_arg1:Boolean=true, _arg2:Object=null):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
DB_object1.selecting(_arg2);
onFocus(null, false);
if (DB_object1.selectedOb.customer == null){
DB_object1.double = false;
DB_object4.double = false;
} else {
DB_object1.double = true;
DB_object4.double = true;
if (DB_object4.select){
DB_object4_active(false);
};
DB_object4_active(true, DB_object1.selectedOb.customer, true);
};
} else {
if (!DB_object4.double){
RemoveAutoPaused_in();
};
DB_object1.closing();
};
}
public function DB_object2_active(_arg1:Boolean=true):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
if ((focusing is Tile)){
focusing.checkIfCanDestroy();
};
DB_object2.selecting(focusing);
onFocus(null, false);
} else {
if (!afterDB2_path){
RemoveAutoPaused_in();
};
DB_object2.closing();
};
}
public function DB_object3_active(_arg1:Boolean=true):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
DB_object3.selecting(focusing);
onFocus(null, false);
} else {
RemoveAutoPaused_in();
DB_object3.closing();
};
}
public function DB_object4_active(_arg1:Boolean=true, _arg2:Object=null, _arg3:Boolean=false):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
DB_object4.selecting(_arg2, _arg3);
onFocus(null, false);
} else {
if (!DB_object1.double){
RemoveAutoPaused_in();
};
DB_object4.closing();
};
}
public function DB_object5_active(_arg1:Boolean=true, _arg2:Object=null):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
DB_object5.selecting(_arg2);
onFocus(null, false);
} else {
RemoveAutoPaused_in();
DB_object5.closing();
};
}
public function DB_object6_active(_arg1:Boolean=true, _arg2:Object=null):void{
if (_arg1){
navigator2._selectOnDefault();
CallAutoPaused();
if (_arg2 == null){
_arg2 = focusing;
};
DB_object6.selecting(_arg2);
onFocus(null, false);
} else {
RemoveAutoPaused_in();
DB_object6.closing();
};
}
public function CekDB_objectPos(_arg1):void{
var _local2:Number;
var _local3:Number;
_local2 = (625 - _arg1.width);
_local3 = (400 - _arg1.height);
if (_arg1.x < 45){
_arg1.x = 45;
} else {
if (_arg1.x > _local2){
_arg1.x = _local2;
};
};
if (_arg1.y < 50){
_arg1.y = 50;
} else {
if (_arg1.y > _local3){
_arg1.y = _local3;
};
};
}
public function lemparPath_DB_TilesSceneries():void{
if (adaPathBaru){
afterDB2_path = true;
waitLayar.showing2("Updating Path");
lemparPath = true;
trace("HHHHHHH::", adaPathBaru, lemparPath, "afterDB2_path", afterDB2_path);
};
DB_object2_active(false);
if (lemparPath){
acceptLemparPathOnGuide();
};
}
public function doLemparAfterPath():void{
trace("doLemparAfterPath:", afterDB2_path, onMouseDestroy, "to.sub", tempObject.sub);
lemparPath = (adaPathBaru = false);
if (afterDB2_path){
afterDB2_path = false;
if (!onMouseDestroy){
RemoveAutoPaused_in();
};
} else {
if (!onMouseDestroy){
if (tempObject.sub != "JanitorRoom"){
RemoveAutoPaused();
};
};
};
waitLayar.hiding();
}
public function checkDariNavigator2(_arg1:Boolean=false):void{
if (_arg1){
if (adaPathBaru){
waitLayar.showing2("Updating Path");
lemparPath = true;
} else {
RemoveAutoPaused();
};
} else {
if (adaPathBaru){
waitLayar.showing2("Updating Path");
lemparPath = true;
} else {
RemoveAutoPaused();
};
};
trace(",.,.,.checkDariNavigator2:", _arg1, "adaPathBaru", adaPathBaru, "lemparPath", lemparPath, propertyD.visible, DB_object2.visible);
}
private function acceptLemparPathOnGuide():void{
if (!endTutorial){
trace("acceptLemparPathOnGuide...", DB_object2.visible, propertyD.visible);
if (!DB_object2.visible){
MapSprite.updateFindingPath2();
};
RemoveAutoPaused();
};
}
public function CreateTemporary(_arg1:String, _arg2, _arg3:String):void{
tempObject.CathTemp(_arg2, _arg1, _arg3);
tempObject.x = mouseX;
tempObject.y = mouseY;
MousingHide();
ShowPropertyTemp();
CallAutoPaused();
checkingGuide(("temp " + _arg1), false);
}
public function ShowPropertyTemp():void{
var _local1:String;
_local1 = tempObject.jenis;
if ((((_local1 == "Tile")) || ((_local1 == "Scenery")))){
InsideProp(tempObject);
} else {
InsideProp(tempObject, false);
};
propertyD.callOpen();
propertyD.btn_back.addEventListener(MouseEvent.CLICK, ClosePropertyTemp, false, 0, true);
ShowGridAndAlpha();
}
private function InsideProp(_arg1, _arg2:Boolean=true):void{
propertyD.title_t.text = _arg1.REF.nama;
if (_arg2){
propertyD.pic.gotoAndStop(_arg1.REF.lbl);
propertyD.price_t.text = ("$" + _arg1.REF.price);
if (_arg1.jenis == "Tile"){
if (_arg1.REF.mainJenis == 1){
propertyD.desc_t.text = "CAN PLANTED\nUNWALKABLE";
} else {
if (_arg1.REF.walkable){
propertyD.desc_t.text = "\nWALKABLE";
} else {
propertyD.desc_t.text = "\nUNWALKABLE";
};
};
} else {
propertyD.desc_t.text = "";
};
} else {
propertyD.pic.gotoAndStop(_arg1.sub);
propertyD.price_t.text = ("$" + _arg1.REF.price[0]);
propertyD.desc_t.text = "";
};
}
private function ClosePropertyTemp(_arg1:MouseEvent):void{
PlaySound("glick");
CancelOrDoneTempObject();
}
public function RemoveTempObject(){
tempObject.empty();
mousing.gotoAndStop("none");
mousing.visible = true;
checkingGuide("temp", false);
}
public function CancelOrDoneTempObject():void{
if (tempObject.ada){
if (tempObject.sub == "JanitorRoom"){
navigator2._cekOnDefault();
};
RemovePropertyTemp();
RemoveTempObject();
ShowGridAndAlpha(false);
};
}
public function RemovePropertyTemp():void{
if (tempObject.jenis == "Tile"){
if (tempObject.REF.walkable){
trace("UPDATE PATH FOR TILES", adaPathBaru);
if (adaPathBaru){
waitLayar.showing2("Updating Path");
};
propertyD.callClose();
propertyD.btn_back.removeEventListener(MouseEvent.CLICK, ClosePropertyTemp);
lemparPath = true;
acceptLemparPathOnGuide();
} else {
RemoveAutoPaused();
propertyD.callClose();
propertyD.btn_back.removeEventListener(MouseEvent.CLICK, ClosePropertyTemp);
};
} else {
if (tempObject.jenis == "Scenery"){
RemoveAutoPaused();
propertyD.callClose();
propertyD.btn_back.removeEventListener(MouseEvent.CLICK, ClosePropertyTemp);
} else {
if (adaPathBaru){
waitLayar.showing2("Updating Path");
lemparPath = true;
acceptLemparPathOnGuide();
} else {
RemoveAutoPaused();
};
propertyD.callClose();
propertyD.btn_back.removeEventListener(MouseEvent.CLICK, ClosePropertyTemp);
};
};
}
public function show_mouse(_arg1:Boolean=true, _arg2:Boolean=false, _arg3:Boolean=false):void{
if (_arg1){
mouseCursor.showing(false);
Mouse.show();
} else {
if (_arg2){
Mouse.hide();
mouseCursor.ChangeMouse("drag");
mouseCursor.showing();
} else {
if (onMouseDestroy){
mouseCursor.ChangeMouse("destroy");
mouseCursor.showing();
Mouse.hide();
} else {
if (onMouseDrag){
mouseCursor.ChangeMouse("drag");
mouseCursor.showing();
Mouse.hide();
} else {
if (_arg3){
onMouseDrag = false;
onMouseDestroy = false;
quickdestroyNotif.hiding();
Mouse.hide();
mouseCursor.ChangeMouse("drag");
mouseCursor.showing();
} else {
mouseCursor.ChangeMouse("none");
Mouse.show();
};
};
};
};
};
}
public function ChangeCursor(_arg1:String):void{
if (_arg1 == "none"){
onMouseDestroy = false;
onMouseDrag = false;
quickdestroyNotif.hiding();
mouseCursor.showing(false);
Mouse.show();
} else {
if (_arg1 == "destroy"){
onMouseDestroy = true;
quickdestroyNotif.showing();
onMouseDrag = false;
Mouse.hide();
mouseCursor.showing();
} else {
onMouseDrag = true;
onMouseDestroy = false;
quickdestroyNotif.hiding();
Mouse.hide();
mouseCursor.showing();
};
};
mouseCursor.ChangeMouse(_arg1);
}
public function MousingHide():void{
mousing.visible = false;
mousing.x = 0;
mousing.y = 0;
}
public function GeneralAlphaCalled(_arg1:Boolean):void{
if (_arg1){
PlaySound("click1");
createNotif(100);
addRP_khususClickOnStage("hideBuildings");
} else {
PlaySound("click3");
};
onGeneralAlpha = _arg1;
AllObjectsAlpha(onGeneralAlpha);
}
public function ShowGridAndAlpha(_arg1:Boolean=true):void{
AllObjectsAlpha(_arg1);
MapSprite.ShowGrid(_arg1);
}
public function AllObjectsAlpha(_arg1:Boolean=true):void{
var _local2:Boolean;
var _local3:uint;
_local2 = true;
if (onAlphaTransparant){
if (_arg1){
if (onGeneralAlpha){
_local2 = false;
};
} else {
if (onGeneralAlpha){
_local2 = false;
} else {
onAlphaTransparant = false;
};
};
} else {
if (_arg1){
if (onGeneralAlpha){
onAlphaTransparant = true;
};
};
};
if (_local2){
MapSprite.alphaObjectDefault(_arg1);
game.objects.Lobby.ob.alphaObject(_arg1);
_local3 = game.objects.Scenery.length;
q = 0;
while (q < _local3) {
game.objects.Scenery[q].ob.alphaObject(_arg1);
q++;
};
_local3 = game.objects.JanitorRoom.length;
q = 0;
while (q < _local3) {
game.objects.JanitorRoom[q].ob.alphaObject(_arg1);
q++;
};
q = 0;
while (q < jumlah_cottage) {
game.objects.Cottage[q].ob.alphaObject(_arg1);
q++;
};
q = 0;
while (q < jumlah_lodge) {
game.objects.Lodge[q].ob.alphaObject(_arg1);
q++;
};
_local3 = game.objects.Facility.length;
q = 0;
while (q < _local3) {
game.objects.Facility[q].ob.alphaObject(_arg1);
q++;
};
};
}
private function createObjectRecord_Notif(_arg1:Object=null):void{
createNotif(0, true, _arg1);
}
public function createNotif(_arg1:uint, _arg2:Boolean=false, _arg3:Object=null, _arg4:String="", _arg5:String=""):void{
var _local6:MovieClip;
_local6 = new Notif();
_local6.creating(this, _arg1, _arg2, _arg3, _arg4, _arg5);
}
private function notificationFunction():void{
var _local1:uint;
var _local2:MovieClip;
var _local3:Array;
var _local4:int;
_local1 = Notif_Temp["tampil"].length;
if (Notif_Temp["belum"].length > 0){
if (_local1 < 9){
_local3 = Notif_Temp["belum"];
_local2 = _local3[0];
_local4 = _local3.indexOf(_local2);
Notif_Temp["tampil"].push(_local2);
_local3.splice(_local4, 1);
_local2 = null;
_local3 = null;
};
};
k = 0;
while (k < _local1) {
_local2 = Notif_Temp["tampil"][k];
if (_local2.tampilkan){
if (_local2.ending){
_local2.isRemoved();
Notif_Temp["tampil"].splice(k, 1);
break;
} else {
_local2.checkUrutan(k);
};
} else {
this.addChild(_local2);
_local2.callPlay(k);
};
_local2 = null;
k++;
};
}
private function removeNotifGarbages():void{
var _local1:uint;
var _local2:Object;
_local1 = game.notif.length;
_local2 = null;
q = 0;
while (q < _local1) {
_local2 = game.notif[q].ob;
if (_local2.garbage){
_local2.buangREF(q);
break;
};
q++;
};
_local2 = null;
}
private function removeNotif_AllOnReplay():void{
var _local1:uint;
var _local2:MovieClip;
Notif_Temp = null;
_local1 = game.notif.length;
q = 0;
while (q < _local1) {
_local2 = game.notif[q].ob;
_local2.isRemovedWithListeners();
_local2 = null;
q++;
};
_local2 = null;
game.notif = null;
}
public function CheckMoney(_arg1:String="", _arg2:Number=0, _arg3:String=""):Boolean{
var _local4:Boolean;
_local4 = true;
if (_arg2 == 0){
if (_arg1 == "Tile"){
if (money < serbi.dataOb.Tile[_arg3].price){
_local4 = false;
};
};
} else {
if (money < _arg2){
_local4 = false;
};
};
if (!_local4){
createNotif(1);
};
return (_local4);
}
public function insertMoneyClip(_arg1:String, _arg2=null, _arg3:Boolean=false):void{
var _local4:MoneyClip;
_local4 = new MoneyClip();
_local4.init(_arg2, this, _arg1, _arg3);
_local4 = null;
}
private function PressKey(_arg1:KeyboardEvent):void{
var _local2:uint;
var _local3:String;
_local2 = _arg1.keyCode;
_local3 = ("Key_" + _local2);
if (shortcut["MoveLeft"][_local3]){
if (IsTabClosed()){
isLeft = true;
};
} else {
if (shortcut["MoveRight"][_local3]){
if (IsTabClosed()){
isRight = true;
};
} else {
if (shortcut["MoveUp"][_local3]){
if (IsTabClosed()){
isUp = true;
};
} else {
if (shortcut["MoveDown"][_local3]){
if (IsTabClosed()){
isDown = true;
};
} else {
if (shortcut["ArrowMouse"][_local3]){
navigator2.selectNavigatorShortcut("arrowMouse");
} else {
if (shortcut["DragMouse"][_local3]){
navigator2.selectNavigatorShortcut("dragMouse");
} else {
if (shortcut["Escape"][_local3]){
if (tempObject.ada){
PlaySound("glick");
CancelOrDoneTempObject();
} else {
if (onMouseDestroy){
PlaySound("glick");
navigator2.removeOnMouseDestroy();
};
};
} else {
if (shortcut["Hide"][_local3]){
navigator1.clickHideObject();
};
};
};
};
};
};
};
};
}
private function IsTabClosed():Boolean{
if (((!(d_visitor.visible)) && (((((((!(d_employee.visible)) && (!(d_room.visible)))) && (!(d_facility.visible)))) && (!(d_scenery.visible)))))){
return (true);
};
return (false);
}
public function ClickHideObject():void{
GeneralAlphaCalled(!(onGeneralAlpha));
TampilkanNewTips("clickAlphaButton", true);
}
private function ReleaseKey(_arg1:KeyboardEvent):void{
var _local2:String;
var _local3:uint;
_local2 = String.fromCharCode(_arg1.charCode);
_local3 = _arg1.keyCode;
if ((((_local3 == 37)) || ((((_local2 == "a")) || ((_local2 == "A")))))){
isLeft = false;
} else {
if ((((_local3 == 39)) || ((((_local2 == "d")) || ((_local2 == "D")))))){
isRight = false;
} else {
if ((((_local3 == 38)) || ((((_local2 == "w")) || ((_local2 == "W")))))){
isUp = false;
} else {
if ((((_local3 == 40)) || ((((_local2 == "s")) || ((_local2 == "S")))))){
isDown = false;
};
};
};
};
}
private function MoveWithPress():void{
SpeedAcceleration();
MovePan(xspeed, yspeed);
if ((((xspeed == 0)) && ((yspeed == 0)))){
if (canStartPan){
pausedAnimation = false;
stageAutoPaused.hiding();
};
} else {
pausedAnimation = true;
stageAutoPaused.showing();
};
}
private function SpeedAcceleration(_arg1:Boolean=true):void{
var _local2:Number;
if (_arg1){
if (((isRight) && ((xspeed < maxspeed)))){
xspeed = (xspeed + 2);
};
if (((isLeft) && ((xspeed > -(maxspeed))))){
xspeed = (xspeed - 2);
};
if (((isDown) && ((yspeed < maxspeed)))){
yspeed = (yspeed + 4);
};
if (((isUp) && ((yspeed > -(maxspeed))))){
yspeed = (yspeed - 4);
};
} else {
_local2 = (maxspeed + 5);
if (((isRight) && ((xspeed < _local2)))){
xspeed = (xspeed + 4);
};
if (((isLeft) && ((xspeed > -(_local2))))){
xspeed = (xspeed - 4);
};
if (((isDown) && ((yspeed < _local2)))){
yspeed = (yspeed + 4);
};
if (((isUp) && ((yspeed > -(_local2))))){
yspeed = (yspeed - 4);
};
};
if (xspeed > 0){
xspeed = (xspeed - acc);
};
if (xspeed < 0){
xspeed = (xspeed + acc);
};
if (yspeed > 0){
yspeed = (yspeed - acc);
};
if (yspeed < 0){
yspeed = (yspeed + acc);
};
}
public function MovePan(_arg1:Number, _arg2:Number):void{
var _local3:Number;
var _local4:Number;
if (_arg1 != 0){
_local3 = MapSprite.boundHorz.x;
_local4 = MapSprite.boundHorz.y;
MapSprite.x = (MapSprite.x - _arg1);
if (MapSprite.x > _local3){
MapSprite.x = _local3;
} else {
if (MapSprite.x < _local4){
MapSprite.x = _local4;
};
};
MapSprite.x = Math.ceil(MapSprite.x);
};
if (_arg2 != 0){
_local3 = MapSprite.boundVert.x;
_local4 = MapSprite.boundVert.y;
MapSprite.y = (MapSprite.y - _arg2);
if (MapSprite.y < _local3){
MapSprite.y = _local3;
} else {
if (MapSprite.y > _local4){
MapSprite.y = _local4;
};
};
MapSprite.y = Math.ceil(MapSprite.y);
};
navigatorX.mapsprite_t.text = ((MapSprite.x + ",") + MapSprite.y);
}
private function StageMouseOver(_arg1:Event):void{
var _local2:*;
var _local3:*;
var _local4:String;
var _local5:String;
_local2 = _arg1.target;
_local3 = _local2.parent;
_local4 = _local2.name;
_local5 = _local3.name;
if ((((_local2 == DB_object5)) || ((((_local3 == DB_object5)) || ((_local3.parent == DB_object5)))))){
if ((((_local4 == "btn_promote")) || ((_local4 == "pic")))){
show_mouse();
} else {
if ((((_local4 == "btn_fire")) || ((((((((((((((_local4 == "btn_janitor")) || ((_local4 == "btn_destroy")))) || ((_local4 == "btn_upgrade")))) || ((_local4 == "btn_close")))) || ((_local4 == "btn_show")))) || ((_local4 == "btn_hide")))) || ((_local4 == "btn_rotate")))))){
balonD.hiding();
show_mouse();
} else {
show_mouse(false, true);
};
};
} else {
if (((DBO[_local4]) || (DBO[_local5]))){
balonD.hiding();
onFocus(null, false);
if ((((_local4 == "btn_destroy")) || ((((((((((((_local4 == "btn_upgrade")) || ((_local4 == "btn_close")))) || ((_local4 == "btn_fire")))) || ((_local4 == "btn_promote")))) || ((_local4 == "btn_ok")))) || ((_local4 == "btn_rotate")))))){
show_mouse();
} else {
show_mouse(false, true);
};
} else {
if (_local4 == "backStat"){
show_mouse(false, false, true);
} else {
if ((((_local2 == statD)) || ((_local3 == statD)))){
show_mouse();
};
};
};
};
_local2 = null;
_local3 = null;
}
private function StageMouseDown(_arg1:Event):void{
var _local2:*;
_local2 = _arg1.target;
if (DBO[_local2.name]){
tempDrag = _local2;
tempDrag.startDrag();
};
_local2 = null;
}
private function StageMouseUp(_arg1:Event):void{
RemoveTempDrag();
}
private function RemoveTempDrag():void{
if (tempDrag != null){
tempDrag.stopDrag();
BoundTempDragPos();
tempDrag = null;
};
}
private function BoundTempDragPos():void{
var _local1:Number;
var _local2:Number;
_local1 = (625 - tempDrag.width);
_local2 = (400 - tempDrag.height);
if (tempDrag.x < 45){
tempDrag.x = 45;
} else {
if (tempDrag.x > _local1){
tempDrag.x = _local1;
};
};
if (tempDrag.y < 50){
tempDrag.y = 50;
} else {
if (tempDrag.y > _local2){
tempDrag.y = _local2;
};
};
}
private function StartPan():void{
if (!autoGeser){
if (onMouseDrag){
dragPt.x = MapSprite.mouseX;
dragPt.y = MapSprite.mouseY;
stage.addEventListener(MouseEvent.MOUSE_MOVE, DoPan, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, StopPan, false, 0, true);
canStartPan = false;
pausedAnimation = true;
stageAutoPaused.showing();
};
};
}
private function StartPan2(_arg1:MouseEvent):void{
if (!autoGeser){
if (onMouseDrag){
dragPt.x = MapSprite.mouseX;
dragPt.y = MapSprite.mouseY;
stage.addEventListener(MouseEvent.MOUSE_MOVE, DoPan, false, 0, true);
stage.addEventListener(MouseEvent.MOUSE_UP, StopPan, false, 0, true);
MapSprite.removeEventListener(MouseEvent.MOUSE_DOWN, StartPan);
};
};
}
function DoPan(_arg1:MouseEvent):void{
dragx = (dragPt.x - MapSprite.mouseX);
dragy = (dragPt.y - MapSprite.mouseY);
MovePan(dragx, dragy);
}
public function StopPan(_arg1:MouseEvent):void{
RemovePanMapContainer();
}
public function RemovePanMapContainer():void{
stage.removeEventListener(MouseEvent.MOUSE_MOVE, DoPan);
stage.removeEventListener(MouseEvent.MOUSE_UP, StopPan);
canStartPan = true;
pausedAnimation = false;
stageAutoPaused.hiding();
}
public function SettingSpeed(_arg1:uint, _arg2:Boolean=false):void{
speed = _arg1;
speed_effect = ((speed)==2) ? 3 : ((speed)==3) ? 5 : 1;
if (!_arg2){
navigator3.settingSpeed();
};
}
public function MoveAuto():void{
SpeedAcceleration(false);
BoundAutoGeser();
}
private function BoundAutoGeser():void{
var _local1:Boolean;
_local1 = false;
if (isLeft){
globalPoint = new Point((autoTarget.x - xspeed), autoTarget.y);
globalPoint = MapSprite.localToGlobal(globalPoint);
if (MapSprite.x > MapSprite.boundHorz.x){
MapSprite.x = MapSprite.boundHorz.x;
isLeft = false;
} else {
if (globalPoint.x < 200){
MapSprite.x = (MapSprite.x - xspeed);
_local1 = true;
};
};
MapSprite.x = Math.ceil(MapSprite.x);
} else {
if (isRight){
globalPoint = new Point((autoTarget.x - xspeed), autoTarget.y);
globalPoint = MapSprite.localToGlobal(globalPoint);
if (MapSprite.x < MapSprite.boundHorz.y){
MapSprite.x = MapSprite.boundHorz.y;
isRight = false;
} else {
if (globalPoint.x > 200){
MapSprite.x = (MapSprite.x - xspeed);
_local1 = true;
};
};
MapSprite.x = Math.ceil(MapSprite.x);
};
};
if (isUp){
globalPoint = new Point(autoTarget.x, (autoTarget.y - yspeed));
globalPoint = MapSprite.localToGlobal(globalPoint);
if (MapSprite.y > MapSprite.boundVert.y){
MapSprite.y = MapSprite.boundVert.y;
isUp = false;
} else {
if (globalPoint.y < 330){
MapSprite.y = (MapSprite.y - yspeed);
_local1 = true;
};
};
MapSprite.y = Math.ceil(MapSprite.y);
} else {
if (isDown){
globalPoint = new Point(autoTarget.x, (autoTarget.y - yspeed));
globalPoint = MapSprite.localToGlobal(globalPoint);
if (MapSprite.y < MapSprite.boundVert.x){
MapSprite.y = MapSprite.boundVert.x;
isUp = false;
} else {
if (globalPoint.y > 330){
MapSprite.y = (MapSprite.y - yspeed);
_local1 = true;
};
};
};
};
if (!_local1){
xspeed = 0;
yspeed = 0;
autoTarget = null;
isLeft = false;
isRight = false;
isUp = false;
isDown = false;
autoGeser = false;
};
}
public function gotoTarget(_arg1):void{
var _local2:Number;
var _local3:Number;
xspeed = 0;
yspeed = 0;
autoTarget = _arg1;
globalPoint = new Point(autoTarget.x, autoTarget.y);
globalPoint = MapSprite.localToGlobal(globalPoint);
onFocus(autoTarget);
clickDB_object(false, true);
_local2 = globalPoint.x;
_local3 = globalPoint.y;
if (_local2 < 200){
isLeft = true;
} else {
if (_local2 > 200){
isRight = true;
};
};
if (_local3 < 330){
isUp = true;
} else {
if (_local3 > 330){
isDown = true;
};
};
if (((isLeft) || (((((isRight) || (isUp))) || (isDown))))){
autoGeser = true;
};
}
public function SettingQuality():void{
stage.quality = isQuality;
}
private function SetSoundMusicMenu():void{
if (isMuteAll){
btn_mute.visible = true;
btn_music.visible = false;
} else {
btn_mute.visible = false;
btn_music.visible = true;
};
}
public function LoopOnMenu(_arg1:Event):void{
MusicLoopEffects();
}
public function MusicLoopEffects():void{
var _local1:String;
ganti_music = jenisMusic;
_local1 = this.currentLabel;
if (_local1 == "game"){
if (firstLoad){
if (opening_ending){
if (!endTutorial){
if (jenisMusic != 5){
fadeChangeMusic = true;
ganti_music = 5;
};
sedangGuide = true;
} else {
if (jenisMusic == 2){
firstLoad = false;
} else {
fadeChangeMusic = true;
ganti_music = 2;
};
};
} else {
if (jenisMusic != 6){
fadeChangeMusic = true;
ganti_music = 6;
};
opening_anime = true;
};
} else {
if ((((hourDay >= 6)) && ((hourDay < 18)))){
if (rday == 0){
if (jenisMusic != 2){
fadeChangeMusic = true;
ganti_music = 2;
};
} else {
if (jenisMusic != 4){
fadeChangeMusic = true;
ganti_music = 4;
};
};
} else {
if (jenisMusic != 3){
fadeChangeMusic = true;
ganti_music = 3;
};
};
};
};
if (musicChannel != null){
if (fadeChangeMusic){
if ((((musicTransform.volume > 0.05)) || ((((musicVol < 0.05)) && ((musicTransform.volume > musicVol)))))){
musicTransform.volume = (musicTransform.volume - 0.02);
if (musicTransform.volume < 0.05){
if (musicVol < 0.05){
musicTransform.volume = musicVol;
} else {
musicTransform.volume = 0.05;
};
};
musicChannel.soundTransform = musicTransform;
} else {
if ((((musicTransform.volume > 0.05)) && ((musicVol < 0.05)))){
musicTransform.volume = musicVol;
} else {
musicTransform.volume = 0.05;
};
musicChannel.soundTransform = musicTransform;
if (_local1 == "game"){
if (jenisMusic != ganti_music){
BuangMusic(1);
if (musicVol < 0.05){
musicTransform.volume = musicVol;
} else {
musicTransform.volume = 0.05;
};
jenisMusic = ganti_music;
PlayMusic();
};
CallFadeInOutMusic(true, false, false);
};
};
} else {
if (fadeOutMusic){
if (musicTransform.volume > (musicVol * 0.35)){
if (musicTransform.volume > 0.75){
musicTransform.volume = 0.75;
} else {
musicTransform.volume = (musicTransform.volume - 0.01);
};
if (musicTransform.volume < (musicVol * 0.35)){
musicTransform.volume = (musicVol * 0.35);
};
musicChannel.soundTransform = musicTransform;
} else {
fadeOutMusic = false;
musicTransform.volume = (musicVol * 0.35);
musicChannel.soundTransform = musicTransform;
};
} else {
if (fadeInMusic){
if (musicTransform.volume < musicVol){
if ((((musicTransform.volume < 0.12)) && ((musicVol >= 0.1)))){
musicTransform.volume = 0.12;
} else {
musicTransform.volume = (musicTransform.volume + 0.005);
};
if (musicTransform.volume > musicVol){
musicTransform.volume = musicVol;
};
musicChannel.soundTransform = musicTransform;
} else {
fadeInMusic = false;
musicTransform.volume = musicVol;
musicChannel.soundTransform = musicTransform;
};
};
};
};
};
}
public function CallFadeInOutMusic(_arg1:Boolean, _arg2:Boolean=false, _arg3:Boolean=false):void{
fadeInMusic = _arg1;
fadeOutMusic = _arg2;
fadeChangeMusic = _arg3;
}
private function LoopMusic(_arg1:Event):void{
BuangMusic(0);
}
public function BuangMusic(_arg1:uint):void{
if (musicChannel != null){
musicChannel.stop();
musicChannel.removeEventListener(Event.SOUND_COMPLETE, LoopMusic);
musicChannel = null;
if (_arg1 == 0){
PlayMusic();
};
};
}
public function SettingSound(_arg1:Number=1):void{
if (isMuteAll){
sfxVol = 0;
sfxTransform.volume = sfxVol;
if (sfxChannel != null){
sfxChannel.soundTransform = sfxTransform;
};
} else {
sfxVol = _arg1;
sfxTransform.volume = sfxVol;
if (sfxChannel != null){
sfxChannel.soundTransform = sfxTransform;
};
};
}
public function SettingMusic(_arg1:Number=1):void{
if (isMuteAll){
musicVol = 0;
musicTransform.volume = musicVol;
if (musicChannel != null){
musicChannel.soundTransform = musicTransform;
};
} else {
musicVol = _arg1;
if (((!(fadeOutMusic)) && (!(fadeInMusic)))){
musicTransform.volume = musicVol;
if (musicChannel != null){
musicChannel.soundTransform = musicTransform;
};
};
};
}
public function PlayMusic():void{
if (musicChannel == null){
if (!isMuteAll){
if (((fadeInMusic) && ((musicTransform.volume > (musicVol * 0.1))))){
musicTransform.volume = (musicVol * 0.1);
};
} else {
musicTransform.volume = 0;
};
if (jenisMusic == 1){
music = new BGMusic1();
} else {
if (jenisMusic == 2){
if (((sedangGuide) || (opening_anime))){
fadeChangeMusic = true;
} else {
if ((((hourDay >= 18)) || ((hourDay < 6)))){
fadeChangeMusic = true;
} else {
music = new BGMusic2();
};
};
} else {
if (jenisMusic == 3){
if (((sedangGuide) || (opening_anime))){
fadeChangeMusic = true;
} else {
if ((((hourDay >= 6)) && ((hourDay < 18)))){
fadeChangeMusic = true;
} else {
music = new BGMusic3();
};
};
} else {
if (jenisMusic == 4){
if (((sedangGuide) || (opening_anime))){
fadeChangeMusic = true;
} else {
if ((((hourDay >= 18)) || ((hourDay < 6)))){
fadeChangeMusic = true;
} else {
music = new BGMusic4();
};
};
} else {
if (jenisMusic == 6){
if (opening_anime){
music = new BGMusic4();
} else {
if (sedangGuide){
fadeChangeMusic = true;
} else {
if ((((hourDay >= 18)) || ((hourDay < 6)))){
fadeChangeMusic = true;
} else {
fadeChangeMusic = true;
};
};
};
} else {
if (sedangGuide){
music = new BGMusic5();
} else {
if (opening_anime){
fadeChangeMusic = true;
} else {
if ((((hourDay >= 6)) && ((hourDay < 18)))){
fadeChangeMusic = true;
} else {
fadeChangeMusic = true;
};
};
};
};
};
};
};
};
if (music){
musicChannel = music.play();
musicChannel.soundTransform = musicTransform;
musicChannel.addEventListener(Event.SOUND_COMPLETE, LoopMusic);
};
};
}
public function PlaySound(_arg1:String):void{
if (!isMuteAll){
myClass = (getDefinitionByName(soundBook[_arg1]) as Class);
sfx = new myClass();
myClass = null;
sfxChannel = sfx.play();
};
if (sfxChannel != null){
sfxChannel.soundTransform = sfxTransform;
};
}
public function drawOnCanvas():void{
var _local1:Bitmap;
var _local2:Point;
_local1 = BitmapUtility.Canvas(240, 136, false, 0, 0, true);
_local1.x = 250;
_local1.y = 250;
addChild(_local1);
_local2 = new Point();
_local1.bitmapData.copyPixels(RenderBoothTile.captureArray[0], RenderBoothTile.areaRectangle, _local2, null, null, true);
_local1.bitmapData.copyPixels(RenderWall.captureArray[0], RenderWall.areaRectangle, _local2, null, null, true);
}
public function addOtherBonus(_arg1:String):Boolean{
var _local2:Boolean;
_local2 = false;
if (_arg1 == "likeSponsor"){
_local2 = gotoSponsorFB(true);
} else {
if (_arg1 == "likeDeveloper"){
_local2 = gotoDeveloperFB(true);
};
};
if (_local2){
PlaySound("coin1");
} else {
PlaySound("seat");
};
return (_local2);
}
public function gotoSponsorFB(_arg1:Boolean=false){
var req:URLRequest;
var _bonus = _arg1;
req = new URLRequest("http://www.facebook.com/pages/Games-Free/112783725420705/");
try {
navigateToURL(req, "_BLANK");
if (_bonus){
followD.acceptLike("likeSponsor");
updateRealTime("money", 5000, "bonus");
game.totalRP.Khusus = (game.totalRP.Khusus + 10);
hitungTotalRP(false, 10);
return (true);
};
} catch(e:Error) {
if (_bonus){
return (false);
};
};
}
public function gotoSponsorWebsite():void{
var req:URLRequest;
req = new URLRequest("http://www.gamesfree.com/");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
public function gotoDeveloperFB(_arg1:Boolean=false){
var req:URLRequest;
var _bonus = _arg1;
req = new URLRequest("http://facebook.com/Littlegiantworld/");
try {
navigateToURL(req, "_BLANK");
if (_bonus){
followD.acceptLike("likeLG");
updateRealTime("money", 5000, "bonus");
game.totalRP.Khusus = (game.totalRP.Khusus + 10);
hitungTotalRP(false, 10);
return (true);
};
} catch(e:Error) {
if (_bonus){
return (false);
};
};
}
public function gotoDeveloperWebsite():void{
var req:URLRequest;
req = new URLRequest("http://www.littlegiantworld.com/");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
public function gotoDeveloperYoutube():void{
var req:URLRequest;
req = new URLRequest("http://www.youtube.com/user/LittleGiantWorld");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
private function clickNavigatorX(_arg1:MouseEvent):void{
var _local2:String;
var _local3:uint;
_local2 = _arg1.target.name;
if (_local2 == "btn_aspal"){
CreateTemporary("Tile", serbi.dataOb.Tile.TILE_83, "83");
} else {
if (_local2 == "btn_trotoar"){
CreateTemporary("Tile", serbi.dataOb.Tile.TILE_82, "82");
} else {
if (_local2 == "btn_save"){
SaveData();
} else {
if (_local2 == "btn_clear"){
ClearData();
} else {
if (_local2 == "btn_draw"){
} else {
if (_local2 == "btn_checkout"){
_local3 = game.visitors.length;
k = 0;
while (k < _local3) {
game.visitors[k].ob.goCheckOut();
k++;
};
} else {
if (_local2 == "sampahBtn"){
MapSprite.createSampah();
} else {
if (_local2 == "btn_test"){
trace("\ntest greenshock !");
};
};
};
};
};
};
};
};
}
private function overNavigatorX(_arg1:MouseEvent):void{
balonD.hiding();
MousingHide();
}
public function dataGrid():void{
}
function __setProp_btn_test_Application_NavigationX_10(){
if ((((__setPropDict[btn_test] == undefined)) || (!((int(__setPropDict[btn_test]) == 11))))){
__setPropDict[btn_test] = 11;
try {
btn_test["componentInspectorSetting"] = true;
} catch(e:Error) {
};
btn_test.emphasized = false;
btn_test.enabled = true;
btn_test.label = "draw";
btn_test.labelPlacement = "right";
btn_test.selected = false;
btn_test.toggle = false;
btn_test.visible = true;
try {
btn_test["componentInspectorSetting"] = false;
} catch(e:Error) {
};
};
}
function frame3(){
stop();
creditD.visible = false;
initMainMenu();
}
function frame4(){
PreLoad();
}
function frame11(){
__setProp_btn_test_Application_NavigationX_10();
stop();
CallProgram();
}
}
}//package
Section 338
//Arcade (Arcade)
package {
import pack.Instance.Booths.*;
public dynamic class Arcade extends Arcade {
}
}//package
Section 339
//Area (Area)
package {
import flash.display.*;
public dynamic class Area extends MovieClip {
public function Area(){
addFrameScript(0, frame1);
}
public function init():void{
this.mouseEnabled = false;
hiding();
}
public function hiding():void{
this.visible = false;
}
public function showing(_arg1:uint=1):void{
this.gotoAndStop(_arg1);
this.visible = true;
}
function frame1(){
stop();
}
}
}//package
Section 340
//Bar (Bar)
package {
import pack.Instance.Booths.*;
public dynamic class Bar extends Bar {
}
}//package
Section 341
//BaratResto (BaratResto)
package {
import pack.Instance.Booths.*;
public dynamic class BaratResto extends BaratResto {
}
}//package
Section 342
//BGMusic1 (BGMusic1)
package {
import flash.media.*;
public dynamic class BGMusic1 extends Sound {
}
}//package
Section 343
//BGMusic2 (BGMusic2)
package {
import flash.media.*;
public dynamic class BGMusic2 extends Sound {
}
}//package
Section 344
//BGMusic3 (BGMusic3)
package {
import flash.media.*;
public dynamic class BGMusic3 extends Sound {
}
}//package
Section 345
//BGMusic4 (BGMusic4)
package {
import flash.media.*;
public dynamic class BGMusic4 extends Sound {
}
}//package
Section 346
//BGMusic5 (BGMusic5)
package {
import flash.media.*;
public dynamic class BGMusic5 extends Sound {
}
}//package
Section 347
//Blub (Blub)
package {
import flash.media.*;
public dynamic class Blub extends Sound {
}
}//package
Section 348
//Blub2 (Blub2)
package {
import flash.media.*;
public dynamic class Blub2 extends Sound {
}
}//package
Section 349
//BonusCoin1 (BonusCoin1)
package {
import flash.media.*;
public dynamic class BonusCoin1 extends Sound {
}
}//package
Section 350
//BoothTile (BoothTile)
package {
import flash.display.*;
public dynamic class BoothTile extends MovieClip {
public var ground:MovieClip;
}
}//package
Section 351
//BuildProgress1 (BuildProgress1)
package {
import flash.display.*;
public dynamic class BuildProgress1 extends MovieClip {
public var build1:MovieClip;
public var build2:MovieClip;
public var build3:MovieClip;
}
}//package
Section 352
//BuildProgress2 (BuildProgress2)
package {
import flash.display.*;
public dynamic class BuildProgress2 extends MovieClip {
public var build1:MovieClip;
public var build2:MovieClip;
public var build3:MovieClip;
public var build4:MovieClip;
public var build5:MovieClip;
public function BuildProgress2(){
addFrameScript(0, frame1);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (build1.currentFrame == build1.totalFrames){
_local1 = true;
this.visible = false;
};
return (_local1);
}
function frame1(){
}
}
}//package
Section 353
//BuildProgress3 (BuildProgress3)
package {
import flash.display.*;
public dynamic class BuildProgress3 extends MovieClip {
public var build1:MovieClip;
public var build2:MovieClip;
public var build3:MovieClip;
public var build4:MovieClip;
public var build5:MovieClip;
public function BuildProgress3(){
addFrameScript(0, frame1);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (build1.currentFrame == build1.totalFrames){
_local1 = true;
this.visible = false;
};
return (_local1);
}
function frame1(){
}
}
}//package
Section 354
//BuildProgress4 (BuildProgress4)
package {
import flash.display.*;
public dynamic class BuildProgress4 extends MovieClip {
public var build1:MovieClip;
public var asap:MovieClip;
public function BuildProgress4(){
addFrameScript(0, frame1);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (build1.currentFrame == build1.totalFrames){
_local1 = true;
this.visible = false;
};
return (_local1);
}
function frame1(){
}
}
}//package
Section 355
//BuildProgress5 (BuildProgress5)
package {
import flash.display.*;
public dynamic class BuildProgress5 extends MovieClip {
public var build1:MovieClip;
public var build2:MovieClip;
public var build3:MovieClip;
public var build4:MovieClip;
public var build5:MovieClip;
public function BuildProgress5(){
addFrameScript(0, frame1);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (build1.currentFrame == build1.totalFrames){
_local1 = true;
this.visible = false;
};
return (_local1);
}
function frame1(){
}
}
}//package
Section 356
//BuildProgress6 (BuildProgress6)
package {
import flash.display.*;
public dynamic class BuildProgress6 extends MovieClip {
public var build1:MovieClip;
public var build2:MovieClip;
public var build3:MovieClip;
public var build4:MovieClip;
public var build5:MovieClip;
public function BuildProgress6(){
addFrameScript(0, frame1);
}
public function cekFinish():Boolean{
var _local1:Boolean;
if (build1.currentFrame == build1.totalFrames){
_local1 = true;
this.visible = false;
};
return (_local1);
}
function frame1(){
}
}
}//package
Section 357
//BuildSound (BuildSound)
package {
import flash.media.*;
public dynamic class BuildSound extends Sound {
}
}//package
Section 358
//Button_disabledSkin (Button_disabledSkin)
package {
import flash.display.*;
public dynamic class Button_disabledSkin extends MovieClip {
}
}//package
Section 359
//Button_downSkin (Button_downSkin)
package {
import flash.display.*;
public dynamic class Button_downSkin extends MovieClip {
}
}//package
Section 360
//Button_emphasizedSkin (Button_emphasizedSkin)
package {
import flash.display.*;
public dynamic class Button_emphasizedSkin extends MovieClip {
}
}//package
Section 361
//Button_overSkin (Button_overSkin)
package {
import flash.display.*;
public dynamic class Button_overSkin extends MovieClip {
}
}//package
Section 362
//Button_selectedDisabledSkin (Button_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDisabledSkin extends MovieClip {
}
}//package
Section 363
//Button_selectedDownSkin (Button_selectedDownSkin)
package {
import flash.display.*;
public dynamic class Button_selectedDownSkin extends MovieClip {
}
}//package
Section 364
//Button_selectedOverSkin (Button_selectedOverSkin)
package {
import flash.display.*;
public dynamic class Button_selectedOverSkin extends MovieClip {
}
}//package
Section 365
//Button_selectedUpSkin (Button_selectedUpSkin)
package {
import flash.display.*;
public dynamic class Button_selectedUpSkin extends MovieClip {
}
}//package
Section 366
//Button_upSkin (Button_upSkin)
package {
import flash.display.*;
public dynamic class Button_upSkin extends MovieClip {
}
}//package
Section 367
//Car2 (Car2)
package {
import flash.media.*;
public dynamic class Car2 extends Sound {
}
}//package
Section 368
//CellRenderer_disabledSkin (CellRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_disabledSkin extends MovieClip {
}
}//package
Section 369
//CellRenderer_downSkin (CellRenderer_downSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_downSkin extends MovieClip {
}
}//package
Section 370
//CellRenderer_overSkin (CellRenderer_overSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_overSkin extends MovieClip {
}
}//package
Section 371
//CellRenderer_selectedDisabledSkin (CellRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 372
//CellRenderer_selectedDownSkin (CellRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 373
//CellRenderer_selectedOverSkin (CellRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 374
//CellRenderer_selectedUpSkin (CellRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 375
//CellRenderer_upSkin (CellRenderer_upSkin)
package {
import flash.display.*;
public dynamic class CellRenderer_upSkin extends MovieClip {
}
}//package
Section 376
//Cengkling (Cengkling)
package {
import flash.media.*;
public dynamic class Cengkling extends Sound {
}
}//package
Section 377
//ClickSound1 (ClickSound1)
package {
import flash.media.*;
public dynamic class ClickSound1 extends Sound {
}
}//package
Section 378
//ClickSound2 (ClickSound2)
package {
import flash.media.*;
public dynamic class ClickSound2 extends Sound {
}
}//package
Section 379
//ClickSound3 (ClickSound3)
package {
import flash.media.*;
public dynamic class ClickSound3 extends Sound {
}
}//package
Section 380
//Cling (Cling)
package {
import flash.media.*;
public dynamic class Cling extends Sound {
}
}//package
Section 381
//Coin1 (Coin1)
package {
import flash.media.*;
public dynamic class Coin1 extends Sound {
}
}//package
Section 382
//ColumnStretch_cursor (ColumnStretch_cursor)
package {
import flash.display.*;
public dynamic class ColumnStretch_cursor extends MovieClip {
}
}//package
Section 383
//Cottage (Cottage)
package {
import pack.Instance.Booths.*;
public dynamic class Cottage extends Cottage {
}
}//package
Section 384
//DataGrid_skin (DataGrid_skin)
package {
import flash.display.*;
public dynamic class DataGrid_skin extends MovieClip {
}
}//package
Section 385
//DataGridCellEditor_skin (DataGridCellEditor_skin)
package {
import flash.display.*;
public dynamic class DataGridCellEditor_skin extends MovieClip {
}
}//package
Section 386
//Deskbell (Deskbell)
package {
import flash.media.*;
public dynamic class Deskbell extends Sound {
}
}//package
Section 387
//Destroy1 (Destroy1)
package {
import flash.media.*;
public dynamic class Destroy1 extends Sound {
}
}//package
Section 388
//Destroy2 (Destroy2)
package {
import flash.media.*;
public dynamic class Destroy2 extends Sound {
}
}//package
Section 389
//Fired (Fired)
package {
import flash.media.*;
public dynamic class Fired extends Sound {
}
}//package
Section 390
//focusRectSkin (focusRectSkin)
package {
import flash.display.*;
public dynamic class focusRectSkin extends MovieClip {
}
}//package
Section 391
//Giftshop (Giftshop)
package {
import pack.Instance.Booths.*;
public dynamic class Giftshop extends Giftshop {
}
}//package
Section 392
//Glick (Glick)
package {
import flash.media.*;
public dynamic class Glick extends Sound {
}
}//package
Section 393
//Golf (Golf)
package {
import pack.Instance.Booths.*;
public dynamic class Golf extends Golf {
}
}//package
Section 394
//GroundSelect (GroundSelect)
package {
import flash.display.*;
public dynamic class GroundSelect extends MovieClip {
}
}//package
Section 395
//GuideDialog (GuideDialog)
package {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class GuideDialog extends MovieClip {
public var asap2:MovieClip;
public var asap3:MovieClip;
public var icon_clip2:MovieClip;
public var icon_clip:MovieClip;
public var panah:MovieClip;
public var asap4:MovieClip;
public var icon_clip3:MovieClip;
public var asap5:MovieClip;
public var icon_clip4:MovieClip;
public var icon_clip5:MovieClip;
public var mission:MovieClip;
public var btn_skip:SimpleButton;
public var Guide:MovieClip;
public var asap:MovieClip;
public var blackD:MovieClip;
public var spesifikasi:String;
public var canClick:Boolean;
public var tmpHide:Boolean;
public var main;
public function GuideDialog(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
panah.mouseEnabled = false;
panah.mouseChildren = false;
mission.mouseEnabled = false;
mission.mouseChildren = false;
mission.visible = false;
btn_skip.visible = true;
hiding();
cannotClick(false);
tmpHide = false;
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
}
public function showing(_arg1:String):void{
visible = true;
var _local2:Boolean;
var _local3:Boolean;
var _local4 = "";
if (_arg1 == "introduction"){
main.navigator2.tempLocked("dragMouse");
main.PlaySound("pause");
_local4 = (("Hi, " + main.playerName) + ".\n\nWelcome to the Resort Empire Assosiation.\nYou're here to build up your business and make your own Empire.");
} else {
if (_arg1 == "introduction2"){
_local4 = "-TUTORIAL-\n\nI'll guide you to the next few steps :)";
Guide.marcoAnime("walk_center");
} else {
if (_arg1 == "intro_area"){
_local4 = "You can build your resort at sand tiles inside the hedges.";
Guide.contoh.showing("area");
} else {
if (_arg1 == "intro_room"){
Guide.moveToRight();
_local4 = "To earn income\nyou should build rooms for the visitors to stay.";
icon_clip.showing(21, 175, "room");
mission.visible = true;
} else {
if (_arg1 == "open_room"){
Guide.marcoAnime("bush_left");
_local4 = "\n\nOw! Why don't we try building one room?";
icon_clip.hiding();
asap.showing(21, 175);
main.PlaySound("blub");
main.navigator2.openIntroduction("room");
panahNav("room");
cannotClick();
} else {
if (_arg1 == "navi_room"){
Guide.marcoAnime("walk_center");
panahNav("room", true);
temporaryHide();
_local2 = true;
} else {
if (_arg1 == "intro_tiles"){
temporaryHide(false);
main.navigator2.tempLocked("room");
Guide.contoh.showing("walk_unwalk");
_local4 = "We have two type of tiles : walkable and unwalkable.";
Guide.marcoAnime("walk_tile");
icon_clip.showing(21, 262, "tile");
cannotClick(false);
} else {
if (_arg1 == "intro_tiles2"){
_local4 = "Grass tiles are the only tiles that can carry a tree or plant on it.";
Guide.marcoAnime("walk_left");
Guide.contoh.showing("intro_grass");
} else {
if (_arg1 == "open_tiles"){
cannotClick();
Guide.contoh.showing("tile_blok");
_local4 = "Create two walkable tiles to connect the new room.";
Guide.marcoAnime("walk_center");
icon_clip.hiding();
asap.showing(21, 262);
main.PlaySound("blub");
main.navigator2.openIntroduction("tile");
panahNav("tile");
} else {
if (_arg1 == "navi_tiles"){
temporaryHide();
panahNav("tile", true);
Guide.marcoAnime("walk_left");
_local2 = true;
} else {
if (_arg1 == "intro_scenery"){
temporaryHide(false);
main.navigator2.tempLocked("tile");
Guide.contoh.hiding();
Guide.marcoAnime("walk_center");
_local4 = "\nNext...\nLet's try to put some plants to the resort area.";
asap.showing(21, 235);
main.PlaySound("blub");
main.navigator2.openIntroduction("scenery");
panahNav("scenery");
} else {
if (_arg1 == "open_scenery"){
_local2 = true;
panahNav("scenery");
} else {
if (_arg1 == "navi_scenery"){
temporaryHide();
_local2 = true;
panahNav("scenery", true);
} else {
if (_arg1 == "intro_extra"){
temporaryHide(false);
main.navigator2.tempLocked("scenery");
_local4 = "\nPurchase RESORT UPGRADE to unlock new building.";
icon_clip.showing(21, 385, "extra");
cannotClick(false);
Guide.marcoAnime("walk_left");
} else {
if (_arg1 == "intro_tips"){
asap4.showing(21, 385);
main.PlaySound("blub");
main.navigator2.openIntroduction("extra");
main.navigator2.tempLocked("extra");
_local4 = "If you ever need some advice from me, just click on the TIPS button.";
icon_clip.showing(21, 80, "tips");
Guide.marcoAnime("walk_center");
cannotClick(false);
} else {
if (_arg1 == "intro_drag"){
main.navigator2.openIntroduction("tips");
main.navigator2.tempLocked("tips");
icon_clip.hiding();
asap.showing(21, 80);
main.PlaySound("blub");
Guide.marcoAnime("walk_left");
_local4 = "Use drag (mouse) to move the screen.\nOr use button A-S-W-D (Left-Down-Up-Right) on keyboard.";
icon_clip.showing(21, 135, "drag");
} else {
if (_arg1 == "navi_all"){
asap.showing(21, 135);
_local4 = "Very good!\nExplore the other menus some time and build even more things for your resort!";
Guide.marcoAnime("walk_center");
icon_clip.showing(21, 205, "facility");
icon_clip2.showing(21, 290, "janitor");
icon_clip3.showing(21, 320, "destroy");
icon_clip5.showing(21, 355, "expand");
_local3 = true;
} else {
if (_arg1 == "guide_bye"){
btn_skip.visible = false;
showBlack();
main.PlaySound("blub");
Guide.marcoAnime("bye");
_local4 = "Now you're ready to build your own resort.\nComplete all your missions and make your resort the greatest in the world :)";
openingAll();
} else {
if (_arg1 == "to_top"){
mission.visible = false;
main.PlaySound("zip");
hiding2();
hideBlack();
main.navigator2.openTempLocked();
_local2 = true;
} else {
_local2 = true;
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
};
spesifikasi = _arg1;
if (!_local2){
Guide.showing(_local4, _local3);
};
}
public function temporaryHide(_arg1:Boolean=true):void{
Guide.visible = !(_arg1);
tmpHide = _arg1;
}
public function openingAll():void{
icon_clip.hiding();
icon_clip2.hiding();
icon_clip3.hiding();
icon_clip4.hiding();
icon_clip5.hiding();
asap.showing(21, 205);
asap2.showing(21, 290);
asap3.showing(21, 320);
asap5.showing(21, 355);
main.navigator2.openIntroduction_all();
}
public function panahNav(_arg1:String, _arg2:Boolean=false):void{
if (_arg1 == "tile"){
if (_arg2){
panah.showing(140, 220, "left");
} else {
panah.showing(49, 262, "left");
};
} else {
if (_arg1 == "room"){
if (_arg2){
panah.showing(80, 125, "top");
} else {
panah.showing(49, 175, "left");
};
} else {
if (_arg1 == "scenery"){
if (_arg2){
panah.showing(140, 250, "left");
} else {
panah.showing(53, 240, "left");
};
};
};
};
}
public function clickFunction(_arg1:MouseEvent):void{
if (_arg1.target.name == "btn_skip"){
main.PlaySound("click2");
hiding3();
hideBlack();
openingAll();
} else {
if (canClick){
main.PlaySound("click2");
main.ShowedGuide(spesifikasi);
};
};
}
public function cannotClick(_arg1:Boolean=true):void{
_arg1 = !(_arg1);
canClick = _arg1;
Guide.btn_next.visible = _arg1;
this.buttonMode = _arg1;
}
public function closing():void{
}
public function hiding():void{
this.visible = false;
asap.hiding();
asap2.hiding();
asap3.hiding();
asap4.hiding();
asap5.hiding();
icon_clip.hiding();
icon_clip2.hiding();
icon_clip3.hiding();
icon_clip4.hiding();
icon_clip5.hiding();
panah.hiding();
hideBlack();
Guide.init();
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function showBlack():void{
blackD.visible = true;
}
public function hideBlack():void{
blackD.visible = false;
}
public function hiding3():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(Guide, 1, {x:580, y:60, scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:hidingGuide3});
}
public function hidingGuide3():void{
visible = false;
main.forcingEndTutorial();
}
public function hiding2():void{
TweenMax.killTweensOf(this, true);
TweenMax.to(Guide, 1, {x:580, y:60, scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:hidingGuide});
}
public function hidingGuide():void{
visible = false;
if (main){
main.ShowedGuide(spesifikasi);
};
}
public function hideSementara(_arg1:Boolean=false):void{
visible = _arg1;
hideSementara2(_arg1);
}
public function hideSementara2(_arg1:Boolean=false):void{
if (tmpHide){
} else {
Guide.visible = _arg1;
};
}
public function removingAll():void{
TweenMax.killTweensOf(this);
if (main != null){
this.removeEventListener(MouseEvent.CLICK, clickFunction);
main.removeChild(this);
main = null;
};
}
function frame1(){
}
}
}//package
Section 396
//GuideInGame (GuideInGame)
package {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class GuideInGame extends MovieClip {
public var btn_bg:MovieClip;
public var clickAny:MovieClip;
public var Guide:MovieClip;
public var main;
public function GuideInGame(){
addFrameScript(0, frame1);
}
public function init(_arg1):void{
main = _arg1;
main.addChild(this);
main.PlaySound("pause");
main.CancelOrDoneTempObject();
this.addEventListener(MouseEvent.CLICK, clickFunction, false, 0, true);
TweenMax.killTweensOf(this, true);
clickAny.visible = false;
Guide.scaleX = 0;
Guide.scaleY = 0;
TweenMax.to(Guide, 1, {scaleX:1, scaleY:1, ease:Elastic.easeInOut, onComplete:completeShow});
}
public function clickFunction(_arg1:MouseEvent):void{
clickAny.visible = false;
main.PlaySound("click2");
TweenMax.killTweensOf(this, true);
TweenMax.to(Guide, 0.5, {scaleX:0, scaleY:0, ease:Elastic.easeInOut, onComplete:completeEnd});
this.removeEventListener(MouseEvent.CLICK, clickFunction);
}
public function removingAll():void{
TweenMax.killTweensOf(this);
this.removeEventListener(MouseEvent.CLICK, clickFunction);
if (main != null){
main.removeChild(this);
main.removeGuideInGame();
main = null;
};
}
public function completeShow():void{
clickAny.visible = true;
}
public function completeEnd():void{
removingAll();
}
function frame1(){
}
}
}//package
Section 397
//Gym (Gym)
package {
import pack.Instance.Booths.*;
public dynamic class Gym extends Gym {
}
}//package
Section 398
//HeaderRenderer_disabledSkin (HeaderRenderer_disabledSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_disabledSkin extends MovieClip {
}
}//package
Section 399
//HeaderRenderer_downSkin (HeaderRenderer_downSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_downSkin extends MovieClip {
}
}//package
Section 400
//HeaderRenderer_overSkin (HeaderRenderer_overSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_overSkin extends MovieClip {
}
}//package
Section 401
//HeaderRenderer_selectedDisabledSkin (HeaderRenderer_selectedDisabledSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_selectedDisabledSkin extends MovieClip {
}
}//package
Section 402
//HeaderRenderer_selectedDownSkin (HeaderRenderer_selectedDownSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_selectedDownSkin extends MovieClip {
}
}//package
Section 403
//HeaderRenderer_selectedOverSkin (HeaderRenderer_selectedOverSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_selectedOverSkin extends MovieClip {
}
}//package
Section 404
//HeaderRenderer_selectedUpSkin (HeaderRenderer_selectedUpSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_selectedUpSkin extends MovieClip {
}
}//package
Section 405
//HeaderRenderer_upSkin (HeaderRenderer_upSkin)
package {
import flash.display.*;
public dynamic class HeaderRenderer_upSkin extends MovieClip {
}
}//package
Section 406
//HeaderSortArrow_ascIcon (HeaderSortArrow_ascIcon)
package {
import flash.display.*;
public dynamic class HeaderSortArrow_ascIcon extends MovieClip {
}
}//package
Section 407
//HeaderSortArrow_descIcon (HeaderSortArrow_descIcon)
package {
import flash.display.*;
public dynamic class HeaderSortArrow_descIcon extends MovieClip {
}
}//package
Section 408
//Hotdog (Hotdog)
package {
import pack.Instance.Booths.*;
public dynamic class Hotdog extends Hotdog {
}
}//package
Section 409
//Icecream (Icecream)
package {
import pack.Instance.Booths.*;
public dynamic class Icecream extends Icecream {
}
}//package
Section 410
//IndiaResto (IndiaResto)
package {
import pack.Instance.Booths.*;
public dynamic class IndiaResto extends IndiaResto {
}
}//package
Section 411
//Jacuzi (Jacuzi)
package {
import pack.Instance.Booths.*;
public dynamic class Jacuzi extends Jacuzi {
}
}//package
Section 412
//Janitor (Janitor)
package {
import pack.Instance.*;
public dynamic class Janitor extends Janitor {
}
}//package
Section 413
//JanitorRoom (JanitorRoom)
package {
import pack.Instance.Booths.*;
public dynamic class JanitorRoom extends JanitorRoom {
}
}//package
Section 414
//JapanResto (JapanResto)
package {
import pack.Instance.Booths.*;
public dynamic class JapanResto extends JapanResto {
}
}//package
Section 415
//Klakson (Klakson)
package {
import flash.media.*;
public dynamic class Klakson extends Sound {
}
}//package
Section 416
//Lobby (Lobby)
package {
import pack.Instance.Booths.*;
public dynamic class Lobby extends Lobby {
}
}//package
Section 417
//Lodge (Lodge)
package {
import pack.Instance.Booths.*;
public dynamic class Lodge extends Lodge {
}
}//package
Section 418
//Main (Main)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
public class Main extends MovieClip {
public var lockedSite:MovieClip;
public var splash_sponsor:MovieClip;
public var splash_lg:MovieClip;
public var preloader:Preloader;
public var variables2:URLVariables;
public var request2:URLRequest;
public var loader2:URLLoader;
public var customContextMenu:ContextMenu;
public var contextmenu;
var urls_allowed:Array;
public var url_hack:Boolean;// = false
var url_string:String;
var url_real:String;
public function Main():void{
urls_allowed = ["game.gamesfree.com"];
super();
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 12, frame13);
url_string = loaderInfo.url;
var _local1:Array = url_string.split("://");
var _local2:Array = _local1[1].split("/");
while (_local2[0] == "") {
_local1[1] = _local1[1].substr(1, _local1[1].length);
_local2 = _local1[1].split("/");
};
url_real = _local2[0];
adaTulisanHack(url_real.toLowerCase());
trace("Call Main! check sitelock...", url_string, url_real, url_hack);
lockedSite.visible = false;
preloader.addEventListener(Event.COMPLETE, onPreloaderComplete);
preloader.setLoaderInfo(loaderInfo);
}
public function clikLGKanan(_arg1:ContextMenuEvent):void{
gotoDeveloperWebsite();
}
private function adaTulisanHack(_arg1:String):void{
if (_arg1.search("hack") == -1){
url_hack = false;
} else {
url_hack = true;
};
}
private function sitelock(_arg1:Array, _arg2:String):void{
var _local4:String;
var _local3:Boolean;
for (_local4 in urls_allowed) {
if (urls_allowed[_local4] == _arg2){
_local3 = false;
break;
};
};
if (_local3){
lockedSite.visible = true;
} else {
removeLockedSite();
lockedSite.visible = false;
preloader.addEventListener(Event.COMPLETE, onPreloaderComplete);
preloader.setLoaderInfo(loaderInfo);
};
}
private function removeLockedSite():void{
lockedSite.removeEventListener(MouseEvent.CLICK, clickLockedSite);
}
private function clickLockedSite(_arg1:MouseEvent):void{
gotoSponsorWebsite();
}
private function onPreloaderComplete(_arg1:Event):void{
preloader.removeEventListener(Event.COMPLETE, onPreloaderComplete);
gotoAndStop(3);
}
public function gotoDeveloperWebsite():void{
var req:URLRequest = new URLRequest("http://www.littlegiantworld.com/");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
public function gotoSponsorWebsite():void{
var req:URLRequest = new URLRequest("http://www.gamesfree.com/");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
public function initSplashSponsor():void{
splash_sponsor.init(this);
}
public function initSplashLG():void{
splash_lg.init(this);
}
function frame1(){
stop();
if (loaderInfo.url.substring(0, 4) != "file"){
Security.allowDomain("*");
Security.loadPolicyFile("http://track.g-bot.net/crossdomain.xml");
variables2 = new URLVariables();
variables2.id = "resortempire";
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);
};
customContextMenu = new ContextMenu();
customContextMenu.hideBuiltInItems();
contextmenu = new ContextMenuItem("Little Giant World");
contextmenu.addEventListener(ContextMenuEvent.MENU_ITEM_SELECT, clikLGKanan, false, 0, true);
customContextMenu.customItems.push(contextmenu);
contextMenu = customContextMenu;
}
function frame2(){
stop();
}
function frame3(){
stop();
}
function frame4(){
stop();
initSplashSponsor();
}
function frame5(){
stop();
initSplashLG();
}
function frame13(){
stop();
}
}
}//package
Section 419
//MapContainer (MapContainer)
package {
import pack.*;
public dynamic class MapContainer extends MapContainer {
}
}//package
Section 420
//Medical (Medical)
package {
import pack.Instance.Booths.*;
public dynamic class Medical extends Medical {
}
}//package
Section 421
//Minimarket (Minimarket)
package {
import pack.Instance.Booths.*;
public dynamic class Minimarket extends Minimarket {
}
}//package
Section 422
//Mobil (Mobil)
package {
import pack.Instance.*;
public dynamic class Mobil extends Mobil {
public function Mobil(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 423
//MoneyClip (MoneyClip)
package {
import pack.Instance.*;
public dynamic class MoneyClip extends MoneyClip {
}
}//package
Section 424
//Mouse1 (Mouse1)
package {
import pack.*;
public dynamic class Mouse1 extends Mouse1 {
public function Mouse1(){
addFrameScript(2, frame3);
}
function frame3(){
stop();
}
}
}//package
Section 425
//NotifSound (NotifSound)
package {
import flash.media.*;
public dynamic class NotifSound extends Sound {
}
}//package
Section 426
//Opening (Opening)
package {
import flash.display.*;
import flash.geom.*;
import flash.text.*;
import com.greensock.*;
import flash.events.*;
import flash.filters.*;
import com.greensock.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.net.*;
import flash.ui.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.xml.*;
public dynamic class Opening extends MovieClip {
public var btn_sponsor:SimpleButton;
public var sponsor_teks:MovieClip;
public var main;
public function Opening(){
addFrameScript(0, frame1, 1, frame2, 20, frame21, 71, frame72, 135, frame136, 175, frame176);
}
public function init(_arg1, _arg2:uint):void{
main = _arg1;
main.addChildAt(this, (_arg2 - 1));
sponsor_teks.hiding();
btn_sponsor.visible = false;
btn_sponsor.addEventListener(MouseEvent.CLICK, ClickSponsor, false, 0, true);
btn_sponsor.addEventListener(MouseEvent.MOUSE_OVER, OverSponsor, false, 0, true);
btn_sponsor.addEventListener(MouseEvent.MOUSE_OUT, OutSponsor, false, 0, true);
}
public function anime():void{
this.visible = true;
this.gotoAndPlay("anime");
}
public function ending():void{
btn_sponsor.removeEventListener(MouseEvent.CLICK, ClickSponsor);
btn_sponsor.removeEventListener(MouseEvent.MOUSE_OVER, OverSponsor);
btn_sponsor.removeEventListener(MouseEvent.MOUSE_OUT, OutSponsor);
TweenMax.killTweensOf(this, true);
TweenMax.to(this, 0.25, {alpha:0.5, ease:Cubic.easeInOut, onComplete:endingComplete});
}
public function endingComplete():void{
this.visible = false;
main.removeOpening();
main.removeChild(this);
main = null;
}
public function buildSound():void{
main.PlaySound("build");
}
public function afterbuildSound():void{
main.PlaySound("cengkling");
}
public function soundTraktor():void{
main.PlaySound("car1");
}
public function ClickSponsor(_arg1:MouseEvent):void{
main.PlaySound("click3");
main.gotoSponsorWebsite();
}
public function OverSponsor(_arg1:MouseEvent):void{
sponsor_teks.anime();
}
public function OutSponsor(_arg1:MouseEvent):void{
sponsor_teks.hiding();
}
function frame1(){
stop();
}
function frame2(){
soundTraktor();
}
function frame21(){
btn_sponsor.visible = true;
}
function frame72(){
buildSound();
}
function frame136(){
afterbuildSound();
}
function frame176(){
stop();
ending();
}
}
}//package
Section 427
//PauseSound (PauseSound)
package {
import flash.media.*;
public dynamic class PauseSound extends Sound {
}
}//package
Section 428
//Pool (Pool)
package {
import pack.Instance.Booths.*;
public dynamic class Pool extends Pool {
}
}//package
Section 429
//Pop1 (Pop1)
package {
import flash.media.*;
public dynamic class Pop1 extends Sound {
}
}//package
Section 430
//Preloader (Preloader)
package {
import flash.events.*;
import flash.display.*;
import flash.net.*;
public class Preloader extends MovieClip {
public var persen1:MovieClip;
public var bayang_persen:MovieClip;
public var persen2:MovieClip;
public var persen3:MovieClip;
public var persen4:MovieClip;
var percent:int;
var tmp_percent:int;
var muncul_persen:Boolean;// = false
var strings:String;
var pjg:uint;
var i:uint;
var clip:MovieClip;
public function Preloader():void{
}
public function setLoaderInfo(_arg1:LoaderInfo):void{
_arg1.addEventListener(ProgressEvent.PROGRESS, onProgress, false, 0, true);
_arg1.addEventListener(Event.COMPLETE, onComplete, false, 0, true);
this.buttonMode = true;
this.addEventListener(MouseEvent.CLICK, clickThis, false, 0, true);
}
private function onProgress(_arg1:ProgressEvent):void{
percent = Math.round(((_arg1.bytesLoaded / _arg1.bytesTotal) * 100));
if (tmp_percent != percent){
strings = (percent + "%");
pjg = strings.length;
bayang_persen.gotoAndStop(pjg);
i = 0;
while (i < 4) {
clip = (this[("persen" + (i + 1))] as MovieClip);
if (i < pjg){
clip.gotoAndStop(("no_" + strings.charAt(i)));
clip.visible = true;
} else {
clip.visible = false;
};
clip = null;
i++;
};
tmp_percent = percent;
};
}
private function clickThis(_arg1:MouseEvent):void{
gotoSponsorWebsite();
}
private function gotoSponsorWebsite():void{
var req:URLRequest = new URLRequest("http://www.gamesfree.com/");
try {
navigateToURL(req, "_BLANK");
} catch(e:Error) {
};
}
private function onComplete(_arg1:Event):void{
dispatchEvent(_arg1);
}
}
}//package
Section 431
//PreloaderCatcher (PreloaderCatcher)
package {
import flash.display.*;
import com.greensock.*;
import flash.events.*;
public class PreloaderCatcher extends Sprite {
public function PreloaderCatcher():void{
addEventListener(Event.ADDED_TO_STAGE, onAdded);
}
private function onAdded(_arg1:Event):void{
var e = _arg1;
removeEventListener(Event.ADDED_TO_STAGE, onAdded);
var preloader:Sprite = (Sprite(parent).getChildByName("preloader") as Sprite);
TweenLite.to(preloader, 0.5, {alpha:0, onComplete:function ():void{
MovieClip(parent).gotoAndStop("splash_sponsor");
}});
}
}
}//package
Section 432
//ProgressBar_barSkin (ProgressBar_barSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_barSkin extends MovieClip {
}
}//package
Section 433
//ProgressBar_indeterminateSkin (ProgressBar_indeterminateSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_indeterminateSkin extends MovieClip {
}
}//package
Section 434
//ProgressBar_trackSkin (ProgressBar_trackSkin)
package {
import flash.display.*;
public dynamic class ProgressBar_trackSkin extends MovieClip {
}
}//package
Section 435
//Puh (Puh)
package {
import flash.media.*;
public dynamic class Puh extends Sound {
}
}//package
Section 436
//Sampah (Sampah)
package {
import pack.Instance.*;
public dynamic class Sampah extends Sampah {
public function Sampah(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 437
//SandTile (SandTile)
package {
import flash.display.*;
public dynamic class SandTile extends BitmapData {
public function SandTile(_arg1:int=50, _arg2:int=27){
super(_arg1, _arg2);
}
}
}//package
Section 438
//Sauna (Sauna)
package {
import pack.Instance.Booths.*;
public dynamic class Sauna extends Sauna {
}
}//package
Section 439
//Scenery (Scenery)
package {
import flash.display.*;
public dynamic class Scenery extends MovieClip {
}
}//package
Section 440
//ScrollArrowDown_disabledSkin (ScrollArrowDown_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_disabledSkin extends MovieClip {
}
}//package
Section 441
//ScrollArrowDown_downSkin (ScrollArrowDown_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_downSkin extends MovieClip {
}
}//package
Section 442
//ScrollArrowDown_overSkin (ScrollArrowDown_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_overSkin extends MovieClip {
}
}//package
Section 443
//ScrollArrowDown_upSkin (ScrollArrowDown_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowDown_upSkin extends MovieClip {
}
}//package
Section 444
//ScrollArrowUp_disabledSkin (ScrollArrowUp_disabledSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_disabledSkin extends MovieClip {
}
}//package
Section 445
//ScrollArrowUp_downSkin (ScrollArrowUp_downSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_downSkin extends MovieClip {
}
}//package
Section 446
//ScrollArrowUp_overSkin (ScrollArrowUp_overSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_overSkin extends MovieClip {
}
}//package
Section 447
//ScrollArrowUp_upSkin (ScrollArrowUp_upSkin)
package {
import flash.display.*;
public dynamic class ScrollArrowUp_upSkin extends MovieClip {
}
}//package
Section 448
//ScrollBar_thumbIcon (ScrollBar_thumbIcon)
package {
import flash.display.*;
public dynamic class ScrollBar_thumbIcon extends MovieClip {
}
}//package
Section 449
//ScrollThumb_downSkin (ScrollThumb_downSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_downSkin extends MovieClip {
}
}//package
Section 450
//ScrollThumb_overSkin (ScrollThumb_overSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_overSkin extends MovieClip {
}
}//package
Section 451
//ScrollThumb_upSkin (ScrollThumb_upSkin)
package {
import flash.display.*;
public dynamic class ScrollThumb_upSkin extends MovieClip {
}
}//package
Section 452
//ScrollTrack_skin (ScrollTrack_skin)
package {
import flash.display.*;
public dynamic class ScrollTrack_skin extends MovieClip {
}
}//package
Section 453
//SE_Intro_Explode (SE_Intro_Explode)
package {
import flash.media.*;
public dynamic class SE_Intro_Explode extends Sound {
}
}//package
Section 454
//Seat (Seat)
package {
import flash.media.*;
public dynamic class Seat extends Sound {
}
}//package
Section 455
//SoundGling1 (SoundGling1)
package {
import flash.media.*;
public dynamic class SoundGling1 extends Sound {
}
}//package
Section 456
//Spa (Spa)
package {
import pack.Instance.Booths.*;
public dynamic class Spa extends Spa {
}
}//package
Section 457
//Taco (Taco)
package {
import pack.Instance.Booths.*;
public dynamic class Taco extends Taco {
}
}//package
Section 458
//TemporaryObject (TemporaryObject)
package {
import pack.Instance.*;
public dynamic class TemporaryObject extends TemporaryObject {
}
}//package
Section 459
//Ticking (Ticking)
package {
import flash.media.*;
public dynamic class Ticking extends Sound {
}
}//package
Section 460
//TileClip (TileClip)
package {
import flash.display.*;
public dynamic class TileClip extends MovieClip {
public var ground:MovieClip;
public function TileClip(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 461
//Titik (Titik)
package {
import flash.display.*;
public dynamic class Titik extends MovieClip {
}
}//package
Section 462
//Titik2 (Titik2)
package {
import flash.display.*;
public dynamic class Titik2 extends MovieClip {
}
}//package
Section 463
//TrukSound (TrukSound)
package {
import flash.media.*;
public dynamic class TrukSound extends Sound {
}
}//package
Section 464
//Upgrade (Upgrade)
package {
import flash.media.*;
public dynamic class Upgrade extends Sound {
}
}//package
Section 465
//Wall (Wall)
package {
import flash.display.*;
public dynamic class Wall extends MovieClip {
public function Wall(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 466
//Visitor (Visitor)
package {
import pack.Instance.*;
public dynamic class Visitor extends Visitor {
}
}//package
Section 467
//Visitor1 (Visitor1)
package {
import flash.display.*;
public dynamic class Visitor1 extends MovieClip {
public function Visitor1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 468
//Visitor10 (Visitor10)
package {
import flash.display.*;
public dynamic class Visitor10 extends MovieClip {
public function Visitor10(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 469
//Visitor11 (Visitor11)
package {
import flash.display.*;
public dynamic class Visitor11 extends MovieClip {
public function Visitor11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 470
//Visitor12 (Visitor12)
package {
import flash.display.*;
public dynamic class Visitor12 extends MovieClip {
public function Visitor12(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 471
//Visitor13 (Visitor13)
package {
import flash.display.*;
public dynamic class Visitor13 extends MovieClip {
public function Visitor13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 472
//Visitor14 (Visitor14)
package {
import flash.display.*;
public dynamic class Visitor14 extends MovieClip {
public function Visitor14(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 473
//Visitor15 (Visitor15)
package {
import flash.display.*;
public dynamic class Visitor15 extends MovieClip {
public function Visitor15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 474
//Visitor16 (Visitor16)
package {
import flash.display.*;
public dynamic class Visitor16 extends MovieClip {
public function Visitor16(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 475
//Visitor17 (Visitor17)
package {
import flash.display.*;
public dynamic class Visitor17 extends MovieClip {
public function Visitor17(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 476
//Visitor18 (Visitor18)
package {
import flash.display.*;
public dynamic class Visitor18 extends MovieClip {
public function Visitor18(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 477
//Visitor19 (Visitor19)
package {
import flash.display.*;
public dynamic class Visitor19 extends MovieClip {
public function Visitor19(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 478
//Visitor2 (Visitor2)
package {
import flash.display.*;
public dynamic class Visitor2 extends MovieClip {
public function Visitor2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 479
//Visitor20 (Visitor20)
package {
import flash.display.*;
public dynamic class Visitor20 extends MovieClip {
public function Visitor20(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 480
//Visitor21 (Visitor21)
package {
import flash.display.*;
public dynamic class Visitor21 extends MovieClip {
public function Visitor21(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 481
//Visitor22 (Visitor22)
package {
import flash.display.*;
public dynamic class Visitor22 extends MovieClip {
public function Visitor22(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 482
//Visitor23 (Visitor23)
package {
import flash.display.*;
public dynamic class Visitor23 extends MovieClip {
public function Visitor23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 483
//Visitor24 (Visitor24)
package {
import flash.display.*;
public dynamic class Visitor24 extends MovieClip {
public function Visitor24(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 484
//Visitor25 (Visitor25)
package {
import flash.display.*;
public dynamic class Visitor25 extends MovieClip {
public var kelip:MovieClip;
public function Visitor25(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 485
//Visitor26 (Visitor26)
package {
import flash.display.*;
public dynamic class Visitor26 extends MovieClip {
public var kelip:MovieClip;
public function Visitor26(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 486
//Visitor27 (Visitor27)
package {
import flash.display.*;
public dynamic class Visitor27 extends MovieClip {
public var kelip:MovieClip;
public function Visitor27(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 487
//Visitor28 (Visitor28)
package {
import flash.display.*;
public dynamic class Visitor28 extends MovieClip {
public var kelip:MovieClip;
public function Visitor28(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 488
//Visitor29 (Visitor29)
package {
import flash.display.*;
public dynamic class Visitor29 extends MovieClip {
public var kelip:MovieClip;
public function Visitor29(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 489
//Visitor3 (Visitor3)
package {
import flash.display.*;
public dynamic class Visitor3 extends MovieClip {
public function Visitor3(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 490
//Visitor4 (Visitor4)
package {
import flash.display.*;
public dynamic class Visitor4 extends MovieClip {
public function Visitor4(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 491
//Visitor5 (Visitor5)
package {
import flash.display.*;
public dynamic class Visitor5 extends MovieClip {
public function Visitor5(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 492
//Visitor6 (Visitor6)
package {
import flash.display.*;
public dynamic class Visitor6 extends MovieClip {
public function Visitor6(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 493
//Visitor7 (Visitor7)
package {
import flash.display.*;
public dynamic class Visitor7 extends MovieClip {
public function Visitor7(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 494
//Visitor8 (Visitor8)
package {
import flash.display.*;
public dynamic class Visitor8 extends MovieClip {
public function Visitor8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 495
//Visitor9 (Visitor9)
package {
import flash.display.*;
public dynamic class Visitor9 extends MovieClip {
public function Visitor9(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 496
//Zip (Zip)
package {
import flash.media.*;
public dynamic class Zip extends Sound {
}
}//package