Section 1
//PropTween (com.greensock.core.PropTween)
package com.greensock.core {
public class PropTween {
public var priority:int;
public var start:Number;
public var prevNode:PropTween;
public var change:Number;
public var target:Object;
public var name:String;
public var property:String;
public var nextNode:PropTween;
public var isPlugin:Boolean;
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 {
public var autoRemoveChildren:Boolean;
protected var _lastChild:TweenCore;
protected var _firstChild:TweenCore;
public function SimpleTimeline(_arg1:Object=null){
super(0, _arg1);
}
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 addChild(_arg1:TweenCore):void{
if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
if (_firstChild){
_firstChild.prevNode = _arg1;
};
_arg1.nextNode = _firstChild;
_firstChild = _arg1;
_arg1.prevNode = null;
_arg1.cachedOrphan = false;
}
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;
}
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 {
public var initted:Boolean;
protected var _hasUpdate:Boolean;
public var active:Boolean;
protected var _delay:Number;
public var cachedTime:Number;
public var cachedReversed:Boolean;
public var nextNode:TweenCore;
protected var _rawPrevTime:Number;// = -1
public var vars:Object;
public var cachedTotalTime:Number;
public var data;
public var timeline:SimpleTimeline;
public var cachedOrphan:Boolean;
public var cachedStartTime:Number;
public var prevNode:TweenCore;
public var cachedDuration:Number;
public var gc:Boolean;
protected var _pauseTime:Number;
public var cacheIsDirty:Boolean;
public var cachedPaused:Boolean;
public var cachedTimeScale:Number;
public var cachedTotalDuration:Number;
public static const version:Number = 1.382;
protected static var _classInitted:Boolean;
public function TweenCore(_arg1:Number=0, _arg2:Object=null){
this.vars = ((_arg2)!=null) ? _arg2 : {};
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;
this.cachedStartTime = (_local3.cachedTotalTime + _delay);
_local3.addChild(this);
if (this.vars.reversed){
this.cachedReversed = true;
};
if (this.vars.paused){
this.paused = true;
};
}
public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
}
public function get delay():Number{
return (_delay);
}
public function restart(_arg1:Boolean=false, _arg2:Boolean=true):void{
this.reversed = false;
this.paused = false;
this.setTotalTime((_arg1) ? -(_delay) : 0, _arg2);
}
public function get duration():Number{
return (this.cachedDuration);
}
public function set reversed(_arg1:Boolean):void{
if (_arg1 != this.cachedReversed){
this.cachedReversed = _arg1;
setTotalTime(this.cachedTotalTime, true);
};
}
public function set startTime(_arg1:Number):void{
var _local2:Boolean = Boolean(((!((this.timeline == null))) && (((!((_arg1 == this.cachedStartTime))) || (this.gc)))));
this.cachedStartTime = _arg1;
if (_local2){
this.timeline.addChild(this);
};
}
public function set delay(_arg1:Number):void{
this.startTime = (this.startTime + (_arg1 - _delay));
_delay = _arg1;
}
public function resume():void{
this.paused = false;
}
public function get paused():Boolean{
return (this.cachedPaused);
}
public function play():void{
this.reversed = false;
this.paused = false;
}
public function set duration(_arg1:Number):void{
this.cachedDuration = (this.cachedTotalDuration = _arg1);
setDirtyCache(false);
}
public function invalidate():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 get reversed():Boolean{
return (this.cachedReversed);
}
public function get totalTime():Number{
return (this.cachedTotalTime);
}
public function get startTime():Number{
return (this.cachedStartTime);
}
public function set currentTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
protected function setDirtyCache(_arg1:Boolean=true):void{
var _local2:TweenCore = (_arg1) ? this : this.timeline;
while (_local2) {
_local2.cacheIsDirty = true;
_local2 = _local2.timeline;
};
}
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 set paused(_arg1:Boolean):void{
if (((!((_arg1 == this.cachedPaused))) && (this.timeline))){
if (_arg1){
_pauseTime = this.timeline.rawTime;
} else {
this.cachedStartTime = (this.cachedStartTime + (this.timeline.rawTime - _pauseTime));
_pauseTime = 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);
};
}
public function kill():void{
setEnabled(false, false);
}
public function set totalTime(_arg1:Number):void{
setTotalTime(_arg1, false);
}
public function get currentTime():Number{
return (this.cachedTime);
}
protected function setTotalTime(_arg1:Number, _arg2:Boolean=false):void{
var _local3:Number;
var _local4:Number;
if (this.timeline){
_local3 = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : 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 pause():void{
this.paused = true;
}
public function set totalDuration(_arg1:Number):void{
this.duration = _arg1;
}
public function get totalDuration():Number{
return (this.cachedTotalDuration);
}
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.addChild(this);
};
} else {
this.active = false;
if (((!(_arg2)) && (!(this.cachedOrphan)))){
this.timeline.remove(this, true);
};
};
return (false);
}
}
}//package com.greensock.core
Section 4
//Expo (com.greensock.easing.Expo)
package com.greensock.easing {
public class Expo {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==_arg4) ? (_arg2 + _arg3) : ((_arg3 * (-(Math.pow(2, ((-10 * _arg1) / _arg4))) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (((_arg1)==0) ? _arg2 : (((_arg3 * Math.pow(2, (10 * ((_arg1 / _arg4) - 1)))) + _arg2) - (_arg3 * 0.001)));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
if (_arg1 == 0){
return (_arg2);
};
if (_arg1 == _arg4){
return ((_arg2 + _arg3));
};
_arg1 = (_arg1 / (_arg4 * 0.5));
if (_arg1 < 1){
return ((((_arg3 * 0.5) * Math.pow(2, (10 * (_arg1 - 1)))) + _arg2));
};
--_arg1;
return ((((_arg3 * 0.5) * (-(Math.pow(2, (-10 * _arg1))) + 2)) + _arg2));
}
}
}//package com.greensock.easing
Section 5
//TweenEvent (com.greensock.events.TweenEvent)
package com.greensock.events {
import flash.events.*;
public class TweenEvent extends Event {
public static const COMPLETE:String = "complete";
public static const START:String = "start";
public static const UPDATE:String = "change";
public static const REVERSE_COMPLETE:String = "reverseComplete";
public static const INIT:String = "init";
public static const VERSION:Number = 1.1;
public static const REPEAT:String = "repeat";
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 6
//AutoAlphaPlugin (com.greensock.plugins.AutoAlphaPlugin)
package com.greensock.plugins {
import flash.display.*;
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 killProps(_arg1:Object):void{
super.killProps(_arg1);
_ignoreVisible = Boolean(("visible" in _arg1));
}
override public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
_target = _arg1;
addTween(_arg1, "alpha", _arg1.alpha, _arg2, "alpha");
return (true);
}
override public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
if (!_ignoreVisible){
_target.visible = Boolean(!((_target.alpha == 0)));
};
}
}
}//package com.greensock.plugins
Section 7
//BevelFilterPlugin (com.greensock.plugins.BevelFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
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 8
//BezierPlugin (com.greensock.plugins.BezierPlugin)
package com.greensock.plugins {
import com.greensock.*;
public class BezierPlugin extends TweenPlugin {
protected var _future:Object;
protected var _orient:Boolean;
protected var _orientData:Array;
protected var _target: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 killProps(_arg1:Object):void{
var _local2:String;
for (_local2 in _beziers) {
if ((_local2 in _arg1)){
delete _beziers[_local2];
};
};
super.killProps(_arg1);
}
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++;
};
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 onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (!(_arg2 is Array)){
return (false);
};
init(_arg3, (_arg2 as Array), false);
return (true);
}
override public function set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:String;
var _local4:Object;
var _local5:Number;
var _local6:uint;
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 = int((_local6 * _arg1));
};
};
_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])))));
_target[_local3] = ((_local7)>0) ? int((_local7 + 0.5)) : int((_local7 - 0.5));
} 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++;
};
} 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++;
};
_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 9
//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 10
//BlurFilterPlugin (com.greensock.plugins.BlurFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
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 11
//ColorMatrixFilterPlugin (com.greensock.plugins.ColorMatrixFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
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 _lumG:Number = 0.71516;
protected static var _lumR:Number = 0.212671;
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 _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 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 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 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++;
};
_local4 = (_local4 + 5);
_local6++;
};
return (_local3);
}
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 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 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));
}
}
}//package com.greensock.plugins
Section 12
//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 13
//DropShadowFilterPlugin (com.greensock.plugins.DropShadowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
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 14
//EndArrayPlugin (com.greensock.plugins.EndArrayPlugin)
package com.greensock.plugins {
import flash.display.*;
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"];
}
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 onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
if (((!((_arg1 is Array))) || (!((_arg2 is Array))))){
return (false);
};
init((_arg1 as Array), _arg2);
return (true);
}
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));
_a[_local3.index] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _info[_local2];
_a[_local3.index] = (_local3.start + (_local3.change * _arg1));
};
};
}
}
}//package com.greensock.plugins
class ArrayTweenInfo {
public var change:Number;
public var start:Number;
public var index:uint;
private function ArrayTweenInfo(_arg1:uint, _arg2:Number, _arg3:Number){
this.index = _arg1;
this.start = _arg2;
this.change = _arg3;
}
}
Section 15
//FilterPlugin (com.greensock.plugins.FilterPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
import com.greensock.core.*;
import flash.filters.*;
public class FilterPlugin extends TweenPlugin {
protected var _remove:Boolean;
protected var _target:Object;
protected var _index:int;
protected var _filter:BitmapFilter;
protected var _type:Class;
public static const VERSION:Number = 2.03;
public static const API:Number = 1;
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;
};
}
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);
};
};
};
};
}
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 16
//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 17
//FramePlugin (com.greensock.plugins.FramePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class FramePlugin extends TweenPlugin {
protected var _target:MovieClip;
public var frame:int;
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 18
//GlowFilterPlugin (com.greensock.plugins.GlowFilterPlugin)
package com.greensock.plugins {
import flash.display.*;
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 19
//HexColorsPlugin (com.greensock.plugins.HexColorsPlugin)
package com.greensock.plugins {
import flash.display.*;
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 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);
}
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 set changeFactor(_arg1:Number):void{
var _local2:int;
var _local3:Array;
_local2 = (_colors.length - 1);
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])));
_local2--;
};
}
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);
}
}
}//package com.greensock.plugins
Section 20
//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 21
//RoundPropsPlugin (com.greensock.plugins.RoundPropsPlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class RoundPropsPlugin extends TweenPlugin {
public static const API:Number = 1;
public function RoundPropsPlugin(){
this.propName = "roundProps";
this.overwriteProps = [];
this.round = true;
}
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 22
//ShortRotationPlugin (com.greensock.plugins.ShortRotationPlugin)
package com.greensock.plugins {
import flash.display.*;
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 23
//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 _ct:ColorTransform;
protected var _transform:Transform;
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);
}
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;
}
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);
};
};
}
}
}//package com.greensock.plugins
Section 24
//TweenPlugin (com.greensock.plugins.TweenPlugin)
package com.greensock.plugins {
import com.greensock.*;
import com.greensock.core.*;
public class TweenPlugin {
public var activeDisable:Boolean;
protected var _changeFactor:Number;// = 0
protected var _tweens:Array;
public var onDisable:Function;
public var propName:String;
public var round:Boolean;
public var onEnable:Function;
public var priority:int;// = 0
public var overwriteProps:Array;
public var onComplete:Function;
public static const VERSION:Number = 1.31;
public static const API:Number = 1;
public function TweenPlugin(){
_tweens = [];
super();
}
protected function updateTweens(_arg1:Number):void{
var _local3:PropTween;
var _local4:Number;
var _local2:int = _tweens.length;
if (this.round){
while (_local2--) {
_local3 = _tweens[_local2];
_local4 = (_local3.start + (_local3.change * _arg1));
_local3.target[_local3.property] = ((_local4)>0) ? int((_local4 + 0.5)) : int((_local4 - 0.5));
};
} else {
while (_local2--) {
_local3 = _tweens[_local2];
_local3.target[_local3.property] = (_local3.start + (_local3.change * _arg1));
};
};
}
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);
};
};
}
public function get changeFactor():Number{
return (_changeFactor);
}
public function onInitTween(_arg1:Object, _arg2, _arg3:TweenLite):Boolean{
addTween(_arg1, this.propName, _arg1[this.propName], _arg2, this.propName);
return (true);
}
public function killProps(_arg1:Object):void{
var _local2:int = this.overwriteProps.length;
while (_local2--) {
if ((this.overwriteProps[_local2] in _arg1)){
this.overwriteProps.splice(_local2, 1);
};
};
_local2 = _tweens.length;
while (_local2--) {
if ((PropTween(_tweens[_local2]).name in _arg1)){
_tweens.splice(_local2, 1);
};
};
}
public function set changeFactor(_arg1:Number):void{
updateTweens(_arg1);
_changeFactor = _arg1;
}
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);
}
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 == "onInit"){
_local5 = [];
while (_local3) {
_local5[_local5.length] = _local3;
_local3 = _local3.nextNode;
};
_local5.sortOn("priority", (Array.NUMERIC | Array.DESCENDING));
_local6 = _local5.length;
while (_local6--) {
PropTween(_local5[_local6]).nextNode = _local5[(_local6 + 1)];
PropTween(_local5[_local6]).prevNode = _local5[(_local6 - 1)];
};
_arg2.cachedPT1 = _local5[0];
} else {
while (_local3) {
if (((_local3.isPlugin) && (_local3.target[_arg1]))){
if (_local3.target.activeDisable){
_local4 = true;
};
var _local7 = _local3.target;
_local7[_arg1]();
};
_local3 = _local3.nextNode;
};
};
return (_local4);
}
}
}//package com.greensock.plugins
Section 25
//VisiblePlugin (com.greensock.plugins.VisiblePlugin)
package com.greensock.plugins {
import flash.display.*;
import com.greensock.*;
public class VisiblePlugin extends TweenPlugin {
protected var _target:Object;
protected var _initVal:Boolean;
protected var _visible:Boolean;
protected var _tween:TweenLite;
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 26
//VolumePlugin (com.greensock.plugins.VolumePlugin)
package com.greensock.plugins {
import flash.media.*;
import flash.display.*;
import com.greensock.*;
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("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 27
//OverwriteManager (com.greensock.OverwriteManager)
package com.greensock {
import com.greensock.core.*;
public class OverwriteManager {
public static const ALL_ONSTART:int = 4;
public static const CONCURRENT:int = 3;
public static const ALL_IMMEDIATE:int = 1;
public static const PREEXISTING:int = 5;
public static const AUTO:int = 2;
public static const version:Number = 6.03;
public static const NONE:int = 0;
public static var enabled:Boolean;
public static var mode:int;
public static function getGlobalPaused(_arg1:TweenCore):Boolean{
var _local2:Boolean;
while (_arg1) {
if (_arg1.cachedPaused){
_local2 = true;
break;
};
_arg1 = _arg1.timeline;
};
return (_local2);
}
public static function init(_arg1:int=2):int{
if (TweenLite.version < 11.1){
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:uint):Boolean{
var _local5:int;
var _local6:Boolean;
var _local7:TweenLite;
var _local13:uint;
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:uint;
var _local12:uint;
_local5 = _arg3.length;
while (--_local5 > -1) {
_local7 = _arg3[_local5];
if ((((_local7 == _arg1)) || (_local7.gc))){
} 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)))) && (!(getGlobalPaused(_local7))))){
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);
}
}
}//package com.greensock
Section 28
//TimelineLite (com.greensock.TimelineLite)
package com.greensock {
import com.greensock.core.*;
import flash.utils.*;
public class TimelineLite extends SimpleTimeline {
protected var _endCaps:Array;
protected var _labels:Object;
public static const version:Number = 1.382;
private static var _overwriteMode:int = (OverwriteManager.enabled) ? OverwriteManager.mode : OverwriteManager.init(2);
;
public function TimelineLite(_arg1:Object=null){
super(_arg1);
_endCaps = [null, null];
_labels = {};
this.autoRemoveChildren = Boolean((this.vars.autoRemoveChildren == true));
_hasUpdate = Boolean((typeof(this.vars.onUpdate) == "function"));
if ((this.vars.tweens is Array)){
this.insertMultiple(this.vars.tweens, 0, ((this.vars.align)!=null) ? this.vars.align : "normal", (this.vars.stagger) ? Number(this.vars.stagger) : 0);
};
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
public function stop():void{
this.paused = true;
}
override public function renderTime(_arg1:Number, _arg2:Boolean=false, _arg3:Boolean=false):void{
var _local8:TweenCore;
var _local9:Boolean;
var _local10:Boolean;
var _local11:TweenCore;
var _local12:Number;
if (this.gc){
this.setEnabled(true, false);
} else {
if (((!(this.active)) && (!(this.cachedPaused)))){
this.active = true;
};
};
var _local4:Number = (this.cacheIsDirty) ? this.totalDuration : this.cachedTotalDuration;
var _local5:Number = this.cachedTime;
var _local6:Number = this.cachedStartTime;
var _local7:Number = this.cachedTimeScale;
var _local13:Boolean = this.cachedPaused;
if (_arg1 >= _local4){
if ((((_rawPrevTime <= _local4)) && (!((_rawPrevTime == _arg1))))){
this.cachedTotalTime = (this.cachedTime = _local4);
forceChildrenToEnd(_local4, _arg2);
_local9 = !(this.hasPausedChild());
_local10 = true;
if ((((((this.cachedDuration == 0)) && (_local9))) && ((((_arg1 == 0)) || ((_rawPrevTime < 0)))))){
_arg3 = true;
};
};
} else {
if (_arg1 <= 0){
if (_arg1 < 0){
this.active = false;
if ((((this.cachedDuration == 0)) && ((_rawPrevTime > 0)))){
_arg3 = true;
_local9 = true;
};
};
if ((((_rawPrevTime >= 0)) && (!((_rawPrevTime == _arg1))))){
forceChildrenToBeginning(0, _arg2);
this.cachedTotalTime = 0;
this.cachedTime = 0;
_local10 = true;
if (this.cachedReversed){
_local9 = true;
};
};
} else {
this.cachedTotalTime = (this.cachedTime = _arg1);
};
};
_rawPrevTime = _arg1;
if ((((this.cachedTime == _local5)) && (!(_arg3)))){
return;
};
if (!this.initted){
this.initted = true;
};
if ((((((((_local5 == 0)) && (this.vars.onStart))) && (!((this.cachedTime == 0))))) && (!(_arg2)))){
this.vars.onStart.apply(null, this.vars.onStartParams);
};
if (_local10){
} else {
if ((this.cachedTime - _local5) > 0){
_local8 = _firstChild;
while (_local8) {
_local11 = _local8.nextNode;
if (((this.cachedPaused) && (!(_local13)))){
break;
} else {
if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= this.cachedTime)))) && (!(_local8.gc)))))){
if (!_local8.cachedReversed){
_local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration;
_local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false);
};
};
};
_local8 = _local11;
};
} else {
_local8 = _lastChild;
while (_local8) {
_local11 = _local8.prevNode;
if (((this.cachedPaused) && (!(_local13)))){
break;
} else {
if (((_local8.active) || (((((!(_local8.cachedPaused)) && ((_local8.cachedStartTime <= _local5)))) && (!(_local8.gc)))))){
if (!_local8.cachedReversed){
_local8.renderTime(((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale), _arg2, false);
} else {
_local12 = (_local8.cacheIsDirty) ? _local8.totalDuration : _local8.cachedTotalDuration;
_local8.renderTime((_local12 - ((this.cachedTime - _local8.cachedStartTime) * _local8.cachedTimeScale)), _arg2, false);
};
};
};
_local8 = _local11;
};
};
};
if (((_hasUpdate) && (!(_arg2)))){
this.vars.onUpdate.apply(null, this.vars.onUpdateParams);
};
if (((((_local9) && ((((_local6 == this.cachedStartTime)) || (!((_local7 == this.cachedTimeScale))))))) && ((((_local4 >= this.totalDuration)) || ((this.cachedTime == 0)))))){
complete(true, _arg2);
};
}
override public function remove(_arg1:TweenCore, _arg2:Boolean=false):void{
if (_arg1.cachedOrphan){
return;
};
if (!_arg2){
_arg1.setEnabled(false, true);
};
var _local3:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
var _local4:TweenCore = (this.gc) ? _endCaps[1] : _lastChild;
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
} else {
if (_local4 == _arg1){
_local4 = _arg1.prevNode;
};
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (_local3 == _arg1){
_local3 = _arg1.nextNode;
};
};
if (this.gc){
_endCaps[0] = _local3;
_endCaps[1] = _local4;
} else {
_firstChild = _local3;
_lastChild = _local4;
};
_arg1.cachedOrphan = true;
setDirtyCache(true);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
override public function get totalDuration():Number{
var _local1:Number;
var _local2:Number;
var _local3:TweenCore;
var _local4:Number;
var _local5:TweenCore;
if (this.cacheIsDirty){
_local1 = 0;
_local3 = (this.gc) ? _endCaps[0] : _firstChild;
_local4 = -(Infinity);
while (_local3) {
_local5 = _local3.nextNode;
if (_local3.cachedStartTime < _local4){
this.addChild(_local3);
_local4 = _local3.prevNode.cachedStartTime;
} else {
_local4 = _local3.cachedStartTime;
};
if (_local3.cachedStartTime < 0){
_local1 = (_local1 - _local3.cachedStartTime);
this.shiftChildren(-(_local3.cachedStartTime), false, -9999999999);
};
_local2 = (_local3.cachedStartTime + (_local3.totalDuration / _local3.cachedTimeScale));
if (_local2 > _local1){
_local1 = _local2;
};
_local3 = _local5;
};
this.cachedDuration = (this.cachedTotalDuration = _local1);
this.cacheIsDirty = false;
};
return (this.cachedTotalDuration);
}
public function gotoAndPlay(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
play();
}
public function appendMultiple(_arg1:Array, _arg2:Number=0, _arg3:String="normal", _arg4:Number=0):void{
insertMultiple(_arg1, (this.duration + _arg2), _arg3, _arg4);
}
public function set currentProgress(_arg1:Number):void{
setTotalTime((this.duration * _arg1), false);
}
public function clear(_arg1:Array=null):void{
if (_arg1 == null){
_arg1 = getChildren(false, true, true);
};
var _local2:int = _arg1.length;
while (--_local2 > -1) {
TweenCore(_arg1[_local2]).setEnabled(false, false);
};
}
public function prepend(_arg1:TweenCore, _arg2:Boolean=false):void{
shiftChildren(((_arg1.totalDuration / _arg1.cachedTimeScale) + _arg1.delay), _arg2, 0);
insert(_arg1, 0);
}
public function removeLabel(_arg1:String):Number{
var _local2:Number = _labels[_arg1];
delete _labels[_arg1];
return (_local2);
}
protected function parseTimeOrLabel(_arg1):Number{
if (typeof(_arg1) == "string"){
if (!(_arg1 in _labels)){
throw (new Error((("TimelineLite error: the " + _arg1) + " label was not found.")));
};
return (getLabelTime(String(_arg1)));
};
return (Number(_arg1));
}
public function addLabel(_arg1:String, _arg2:Number):void{
_labels[_arg1] = _arg2;
}
public function hasPausedChild():Boolean{
var _local1:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local1) {
if (((_local1.cachedPaused) || ((((_local1 is TimelineLite)) && ((_local1 as TimelineLite).hasPausedChild()))))){
return (true);
};
_local1 = _local1.nextNode;
};
return (false);
}
public function getTweensOf(_arg1:Object, _arg2:Boolean=true):Array{
var _local5:int;
var _local3:Array = getChildren(_arg2, true, false);
var _local4:Array = [];
var _local6:uint = _local3.length;
var _local7:uint;
_local5 = 0;
while (_local5 < _local6) {
if (TweenLite(_local3[_local5]).target == _arg1){
var _temp1 = _local7;
_local7 = (_local7 + 1);
var _local8 = _temp1;
_local4[_local8] = _local3[_local5];
};
_local5++;
};
return (_local4);
}
public function gotoAndStop(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
this.paused = true;
}
public function append(_arg1:TweenCore, _arg2:Number=0):void{
insert(_arg1, (this.duration + _arg2));
}
override public function get duration():Number{
var _local1:Number;
if (this.cacheIsDirty){
_local1 = this.totalDuration;
};
return (this.cachedDuration);
}
public function get useFrames():Boolean{
var _local1:SimpleTimeline = this.timeline;
while (_local1.timeline) {
_local1 = _local1.timeline;
};
return (Boolean((_local1 == TweenLite.rootFramesTimeline)));
}
public function shiftChildren(_arg1:Number, _arg2:Boolean=false, _arg3:Number=0):void{
var _local5:String;
var _local4:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local4) {
if (_local4.cachedStartTime >= _arg3){
_local4.cachedStartTime = (_local4.cachedStartTime + _arg1);
};
_local4 = _local4.nextNode;
};
if (_arg2){
for (_local5 in _labels) {
if (_labels[_local5] >= _arg3){
_labels[_local5] = (_labels[_local5] + _arg1);
};
};
};
this.setDirtyCache(true);
}
public function goto(_arg1, _arg2:Boolean=true):void{
setTotalTime(parseTimeOrLabel(_arg1), _arg2);
}
public function killTweensOf(_arg1:Object, _arg2:Boolean=true, _arg3:Object=null):Boolean{
var _local6:TweenLite;
var _local4:Array = getTweensOf(_arg1, _arg2);
var _local5:int = _local4.length;
while (--_local5 > -1) {
_local6 = _local4[_local5];
if (_arg3 != null){
_local6.killVars(_arg3);
};
if ((((_arg3 == null)) || ((((_local6.cachedPT1 == null)) && (_local6.initted))))){
_local6.setEnabled(false, false);
};
};
return (Boolean((_local4.length > 0)));
}
override public function invalidate():void{
var _local1:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local1) {
_local1.invalidate();
_local1 = _local1.nextNode;
};
}
public function insertMultiple(_arg1:Array, _arg2=0, _arg3:String="normal", _arg4:Number=0):void{
var _local5:int;
var _local6:TweenCore;
var _local7:Number = ((Number(_arg2)) || (0));
var _local8:uint = _arg1.length;
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_local7 = _labels[_arg2];
};
_local5 = 0;
while (_local5 < _local8) {
_local6 = (_arg1[_local5] as TweenCore);
insert(_local6, _local7);
if (_arg3 == "sequence"){
_local7 = (_local6.cachedStartTime + (_local6.totalDuration / _local6.cachedTimeScale));
} else {
if (_arg3 == "start"){
_local6.cachedStartTime = (_local6.cachedStartTime - _local6.delay);
};
};
_local7 = (_local7 + _arg4);
_local5++;
};
}
public function getLabelTime(_arg1:String):Number{
return (((_arg1 in _labels)) ? Number(_labels[_arg1]) : -1);
}
override public function get rawTime():Number{
if (((!((this.cachedTotalTime == 0))) && (!((this.cachedTotalTime == this.cachedTotalDuration))))){
return (this.cachedTotalTime);
};
return (((this.timeline.rawTime - this.cachedStartTime) * this.cachedTimeScale));
}
override public function set duration(_arg1:Number):void{
if (((!((this.duration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.duration / _arg1);
};
}
override public function set totalDuration(_arg1:Number):void{
if (((!((this.totalDuration == 0))) && (!((_arg1 == 0))))){
this.timeScale = (this.totalDuration / _arg1);
};
}
public function getChildren(_arg1:Boolean=true, _arg2:Boolean=true, _arg3:Boolean=true, _arg4:Number=-9999999999):Array{
var _local5:Array = [];
var _local6:uint;
var _local7:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
while (_local7) {
if (_local7.cachedStartTime < _arg4){
} else {
if ((_local7 is TweenLite)){
if (_arg2){
var _temp1 = _local6;
_local6 = (_local6 + 1);
var _local8 = _temp1;
_local5[_local8] = _local7;
};
} else {
if (_arg3){
var _temp2 = _local6;
_local6 = (_local6 + 1);
_local8 = _temp2;
_local5[_local8] = _local7;
};
if (_arg1){
_local5 = _local5.concat(TimelineLite(_local7).getChildren(true, _arg2, _arg3));
};
};
};
_local7 = _local7.nextNode;
};
return (_local5);
}
protected function forceChildrenToEnd(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _firstChild;
var _local6:Boolean = this.cachedPaused;
while (_local3) {
_local4 = _local3.nextNode;
if (((this.cachedPaused) && (!(_local6)))){
break;
} else {
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == _local3.cachedTotalDuration))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == this.cachedDuration)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == this.cachedDuration)))))){
_local3.renderTime((_local3.cachedReversed) ? 0 : _local3.cachedTotalDuration, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
};
_local3 = _local4;
};
return (_arg1);
}
protected function forceChildrenToBeginning(_arg1:Number, _arg2:Boolean=false):Number{
var _local4:TweenCore;
var _local5:Number;
var _local3:TweenCore = _lastChild;
var _local6:Boolean = this.cachedPaused;
while (_local3) {
_local4 = _local3.prevNode;
if (((this.cachedPaused) && (!(_local6)))){
break;
} else {
if (((_local3.active) || (((((!(_local3.cachedPaused)) && (!(_local3.gc)))) && (((!((_local3.cachedTotalTime == 0))) || ((_local3.cachedDuration == 0)))))))){
if ((((_arg1 == 0)) && (((!((_local3.cachedDuration == 0))) || ((_local3.cachedStartTime == 0)))))){
_local3.renderTime((_local3.cachedReversed) ? _local3.cachedTotalDuration : 0, _arg2, false);
} else {
if (!_local3.cachedReversed){
_local3.renderTime(((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale), _arg2, false);
} else {
_local5 = (_local3.cacheIsDirty) ? _local3.totalDuration : _local3.cachedTotalDuration;
_local3.renderTime((_local5 - ((_arg1 - _local3.cachedStartTime) * _local3.cachedTimeScale)), _arg2, false);
};
};
};
};
_local3 = _local4;
};
return (_arg1);
}
public function insert(_arg1:TweenCore, _arg2=0):void{
if (typeof(_arg2) == "string"){
if (!(_arg2 in _labels)){
addLabel(_arg2, this.duration);
};
_arg2 = Number(_labels[_arg2]);
};
_arg1.cachedStartTime = (Number(_arg2) + _arg1.delay);
addChild(_arg1);
}
override public function addChild(_arg1:TweenCore):void{
var _local4:TweenCore;
var _local5:Number;
if (((!(_arg1.cachedOrphan)) && (_arg1.timeline))){
_arg1.timeline.remove(_arg1, true);
};
_arg1.timeline = this;
if (_arg1.gc){
_arg1.setEnabled(true, true);
};
setDirtyCache(true);
var _local2:TweenCore = (this.gc) ? _endCaps[0] : _firstChild;
var _local3:TweenCore = (this.gc) ? _endCaps[1] : _lastChild;
if (_local3 == null){
_local3 = _arg1;
_local2 = _local3;
_arg1.nextNode = (_arg1.prevNode = null);
} else {
_local4 = _local3;
_local5 = _arg1.cachedStartTime;
while (((!((_local4 == null))) && ((_local5 <= _local4.cachedStartTime)))) {
_local4 = _local4.prevNode;
};
if (_local4 == null){
_local2.prevNode = _arg1;
_arg1.nextNode = _local2;
_arg1.prevNode = null;
_local2 = _arg1;
} else {
if (_local4.nextNode){
_local4.nextNode.prevNode = _arg1;
} else {
if (_local4 == _local3){
_local3 = _arg1;
};
};
_arg1.prevNode = _local4;
_arg1.nextNode = _local4.nextNode;
_local4.nextNode = _arg1;
};
};
_arg1.cachedOrphan = false;
if (this.gc){
_endCaps[0] = _local2;
_endCaps[1] = _local3;
} else {
_firstChild = _local2;
_lastChild = _local3;
};
}
public function get timeScale():Number{
return (this.cachedTimeScale);
}
public function prependMultiple(_arg1:Array, _arg2:String="normal", _arg3:Number=0, _arg4:Boolean=false):void{
var _local5:TimelineLite = new TimelineLite({tweens:_arg1, align:_arg2, stagger:_arg3});
shiftChildren(_local5.duration, _arg4, 0);
insertMultiple(_arg1, 0, _arg2, _arg3);
_local5.kill();
}
override public function setEnabled(_arg1:Boolean, _arg2:Boolean=false):Boolean{
var _local3:TweenCore;
var _local4:TweenCore;
if (_arg1 == this.gc){
if (_arg1){
_local3 = _endCaps[0];
_firstChild = _local3;
_lastChild = _endCaps[1];
_endCaps = [null, null];
} else {
_local3 = _firstChild;
_endCaps = [_firstChild, _lastChild];
_firstChild = (_lastChild = null);
};
while (_local3) {
_local3.setEnabled(_arg1, true);
_local3 = _local3.nextNode;
};
};
return (super.setEnabled(_arg1, _arg2));
}
}
}//package com.greensock
Section 29
//TweenLite (com.greensock.TweenLite)
package com.greensock {
import flash.events.*;
import flash.display.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
public class TweenLite extends TweenCore {
protected var _hasPlugins:Boolean;
public var propTweenLookup:Object;
public var cachedPT1:PropTween;
protected var _overwrite:uint;
protected var _ease:Function;
public var target:Object;
public var ratio:Number;// = 0
protected var _overwrittenProps:Object;
protected var _notifyPluginsOfEnabled:Boolean;
public static const version:Number = 11.36;
public static var rootTimeline:SimpleTimeline;
public static var fastEaseLookup:Dictionary = new Dictionary(false);
public static var onPluginEvent:Function;
public static var rootFramesTimeline:SimpleTimeline;
public static var defaultEase:Function = TweenLite.easeOut;
public static var plugins:Object = {};
public static var masterList:Dictionary = new Dictionary(false);
public static var overwriteManager:Object;
public static var rootFrame:Number;
public static var killDelayedCallsTo:Function = TweenLite.killTweensOf;
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, roundProps: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);
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 easeProxy(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (this.vars.proxiedEase.apply(null, arguments.concat(this.vars.easeParams)));
}
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))))) && (!(_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){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
};
}
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 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("onInit", 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;
}
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 (_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 = {};
}
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 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];
};
};
}
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));
}
protected static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (1 - (_arg1 / _arg4));
return ((1 - (_arg1 * _arg1)));
}
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++;
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 to(_arg1:Object, _arg2:Number, _arg3:Object):TweenLite{
return (new TweenLite(_arg1, _arg2, _arg3));
}
}
}//package com.greensock
Section 30
//TweenMax (com.greensock.TweenMax)
package com.greensock {
import flash.events.*;
import flash.display.*;
import com.greensock.core.*;
import flash.utils.*;
import com.greensock.plugins.*;
import com.greensock.events.*;
public class TweenMax extends TweenLite implements IEventDispatcher {
protected var _cyclesComplete:uint;// = 0
protected var _dispatcher:EventDispatcher;
protected var _hasUpdateListener:Boolean;
protected var _easeType:uint;
protected var _repeatDelay:Number;// = 0
public var yoyo:Boolean;
protected var _easePower:uint;
protected var _repeat:int;// = 0
public static const version:Number = 11.37;
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 = (this.vars.repeat) ? int(this.vars.repeat) : 0;
_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;
};
}
public function dispatchEvent(_arg1:Event):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.dispatchEvent(_arg1));
}
public function set timeScale(_arg1:Number):void{
if (_arg1 == 0){
_arg1 = 0.0001;
};
var _local2:Number = (((_pauseTime) || ((_pauseTime == 0)))) ? _pauseTime : this.timeline.cachedTotalTime;
this.cachedStartTime = (_local2 - (((_local2 - this.cachedStartTime) * this.cachedTimeScale) / _arg1));
this.cachedTimeScale = _arg1;
setDirtyCache(false);
}
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.cachedTime;
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;
};
};
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);
if (_local6){
if (((this.yoyo) && ((_repeat % 2)))){
this.cachedTime = (this.ratio = 0);
};
} else {
if (_arg1 > 0){
_local11 = _cyclesComplete;
_cyclesComplete = int((this.cachedTotalTime / _local10));
if (_cyclesComplete == (this.cachedTotalTime / _local10)){
_cyclesComplete--;
};
if (_local11 != _cyclesComplete){
_local7 = true;
};
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;
};
};
};
};
if ((((_local5 == this.cachedTime)) && (!(_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))))) && (!(_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 (_local6){
if (((_hasPlugins) && (this.cachedPT1))){
onPluginEvent("onComplete", this);
};
complete(true, _arg2);
} else {
if (((_local7) && (!(_arg2)))){
if (this.vars.onRepeat){
this.vars.onRepeat.apply(null, this.vars.onRepeatParams);
};
if (_dispatcher){
_dispatcher.dispatchEvent(new TweenEvent(TweenEvent.REPEAT));
};
};
};
}
override public function set totalDuration(_arg1:Number):void{
if (_repeat == -1){
return;
};
this.duration = ((_arg1 - (_repeat * _repeatDelay)) / (_repeat + 1));
}
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);
}
protected function insertPropTween(_arg1:Object, _arg2:String, _arg3:Number, _arg4, _arg5:String, _arg6:Boolean, _arg7:PropTween):PropTween{
var _local9:Array;
var _local10:int;
var _local8:PropTween = new PropTween(_arg1, _arg2, _arg3, ((typeof(_arg4))=="number") ? (_arg4 - _arg3) : Number(_arg4), _arg5, _arg6, _arg7);
if (((_arg6) && ((_arg5 == "_MULTIPLE_")))){
_local9 = _arg1.overwriteProps;
_local10 = _local9.length;
while (--_local10 > -1) {
this.propTweenLookup[_local9[_local10]] = _local8;
};
} else {
this.propTweenLookup[_arg5] = _local8;
};
return (_local8);
}
override protected function init():void{
var _local1:TweenMax;
var _local2:int;
var _local3:String;
var _local4:String;
var _local5:Array;
var _local6:Object;
var _local7:PropTween;
var _local8:PropTween;
var _local9:int;
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];
};
if (((!((this.vars.roundProps == null))) && (("roundProps" in TweenLite.plugins)))){
_local5 = this.vars.roundProps;
_local9 = _local5.length;
while (--_local9 > -1) {
_local3 = _local5[_local9];
_local8 = this.cachedPT1;
while (_local8) {
if (_local8.name == _local3){
if (_local8.isPlugin){
_local8.target.round = true;
} else {
if (_local6 == null){
_local6 = new TweenLite.plugins.roundProps();
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
_hasPlugins = true;
_local7 = insertPropTween(_local6, "changeFactor", 0, 1, "_MULTIPLE_", true, this.cachedPT1);
this.cachedPT1 = _local7;
} else {
_local6.add(_local8.target, _local3, _local8.start, _local8.change);
};
this.removePropTween(_local8);
this.propTweenLookup[_local3] = _local7;
};
} else {
if (((((_local8.isPlugin) && ((_local8.name == "_MULTIPLE_")))) && (!(_local8.target.round)))){
_local4 = ((" " + _local8.target.overwriteProps.join(" ")) + " ");
if (_local4.indexOf(((" " + _local3) + " ")) != -1){
_local8.target.round = true;
};
};
};
_local8 = _local8.nextNode;
};
};
};
}
public function removeEventListener(_arg1:String, _arg2:Function, _arg3:Boolean=false):void{
if (_dispatcher){
_dispatcher.removeEventListener(_arg1, _arg2, _arg3);
};
}
public function setDestination(_arg1:String, _arg2, _arg3:Boolean=true):void{
var _local4:Object = {};
_local4[_arg1] = _arg2;
updateTo(_local4, !(_arg3));
}
public function willTrigger(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.willTrigger(_arg1));
}
public function hasEventListener(_arg1:String):Boolean{
return (((_dispatcher)==null) ? false : _dispatcher.hasEventListener(_arg1));
}
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 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);
}
protected function removePropTween(_arg1:PropTween):Boolean{
if (_arg1.nextNode){
_arg1.nextNode.prevNode = _arg1.prevNode;
};
if (_arg1.prevNode){
_arg1.prevNode.nextNode = _arg1.nextNode;
} else {
if (this.cachedPT1 == _arg1){
this.cachedPT1 = _arg1.nextNode;
};
};
if (((_arg1.isPlugin) && (_arg1.target.onDisable))){
_arg1.target.onDisable();
if (_arg1.target.activeDisable){
return (true);
};
};
return (false);
}
public function get currentProgress():Number{
return ((this.cachedTime / this.duration));
}
public function get repeat():int{
return (_repeat);
}
public function updateTo(_arg1:Object, _arg2:Boolean=false):void{
var _local4:String;
var _local5:Number;
var _local6:PropTween;
var _local7: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.addChild(this);
};
};
for (_local4 in _arg1) {
this.vars[_local4] = _arg1[_local4];
};
if (this.initted){
this.initted = false;
if (!_arg2){
init();
if (((((!(_arg2)) && ((this.cachedTime > 0)))) && ((this.cachedTime < this.cachedDuration)))){
_local5 = (1 / (1 - _local3));
_local6 = this.cachedPT1;
while (_local6) {
_local7 = (_local6.start + _local6.change);
_local6.change = (_local6.change * _local5);
_local6.start = (_local7 - _local6.change);
_local6 = _local6.nextNode;
};
};
};
};
}
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);
}
public function get repeatDelay():Number{
return (_repeatDelay);
}
public function killProperties(_arg1:Array):void{
var _local2:Object = {};
var _local3:int = _arg1.length;
while (--_local3 > -1) {
_local2[_arg1[_local3]] = true;
};
killVars(_local2);
}
public function set repeatDelay(_arg1:Number):void{
_repeatDelay = _arg1;
setDirtyCache(true);
}
public function set repeat(_arg1:int):void{
_repeat = _arg1;
setDirtyCache(true);
}
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));
};
};
};
}
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 get timeScale():Number{
return (this.cachedTimeScale);
}
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);
}
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);
}
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 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 pauseAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(true, _arg1, _arg2);
}
public static function getTweensOf(_arg1:Object):Array{
var _local4:int;
var _local5:uint;
var _local2:Array = masterList[_arg1];
var _local3:Array = [];
if (_local2){
_local4 = _local2.length;
_local5 = 0;
while (--_local4 > -1) {
if (!_local2[_local4].gc){
var _temp1 = _local5;
_local5 = (_local5 + 1);
var _local6 = _temp1;
_local3[_local6] = _local2[_local4];
};
};
};
return (_local3);
}
public static function get globalTimeScale():Number{
return (((TweenLite.rootTimeline)==null) ? 1 : TweenLite.rootTimeline.cachedTimeScale);
}
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 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 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 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);
};
};
};
}
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 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 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 getAllTweens():Array{
var _local4:Array;
var _local5:int;
var _local1:Dictionary = masterList;
var _local2:uint;
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 resumeAll(_arg1:Boolean=true, _arg2:Boolean=true):void{
changePause(false, _arg1, _arg2);
}
public static function to(_arg1:Object, _arg2:Number, _arg3:Object):TweenMax{
return (new TweenMax(_arg1, _arg2, _arg3));
}
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:uint = targets.length;
var a:Array = [];
var curDelay:Number = (("delay" in vars)) ? Number(vars.delay) : 0;
onCompleteProxy = vars.onComplete;
onCompleteParamsProxy = vars.onCompleteParams;
var lastIndex:int = ((stagger)<=0) ? 0 : (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[a.length] = new TweenMax(targets[i], duration, varsDup);
curDelay = (curDelay + stagger);
i = (i + 1);
};
return (a);
}
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 31
//CommonEffect (lj.src.efx.CommonEffect)
package lj.src.efx {
import flash.events.*;
import flash.display.*;
import lj.src.util.*;
public class CommonEffect {
protected const loaderName:String = "effect";
protected var bDissapear:Boolean;
protected var _func:Function;
public var mcEffect:MovieClip;
protected var _args:Array;
public function remove():void{
mcEffect.removeEventListener(Event.ENTER_FRAME, onMcEnterFrame);
mcEffect.parent.removeChild(mcEffect);
}
private function onMcEnterFrame(_arg1:Event):void{
if (mcEffect.currentFrame == mcEffect.totalFrames){
if (bDissapear){
remove();
if (_func != null){
_func.apply(this, _args);
};
};
};
}
public function addCallBack(_arg1:Function, ... _args):void{
_func = _arg1;
_args = _args;
}
public function setEffect(_arg1:String, _arg2:DisplayObjectContainer, _arg3:int, _arg4:int, _arg5:Boolean=true):void{
var _local6:Class = GameUtil.getClass(loaderName, _arg1);
if (_local6){
mcEffect = new (_local6);
mcEffect.mouseEnabled = false;
mcEffect.x = _arg3;
mcEffect.y = _arg4;
_arg2.addChild(mcEffect);
bDissapear = _arg5;
mcEffect.addEventListener(Event.ENTER_FRAME, onMcEnterFrame);
};
}
}
}//package lj.src.efx
Section 32
//IKeyboardEvent (lj.src.interfaces.IKeyboardEvent)
package lj.src.interfaces {
import flash.events.*;
public interface IKeyboardEvent {
function handleKeyDown(_arg1:KeyboardEvent):void;
function handleKeyUp(_arg1:KeyboardEvent):void;
}
}//package lj.src.interfaces
Section 33
//IMouseEvent (lj.src.interfaces.IMouseEvent)
package lj.src.interfaces {
import flash.events.*;
public interface IMouseEvent {
function handleMouseEvent(_arg1:MouseEvent):void;
}
}//package lj.src.interfaces
Section 34
//IUpdate (lj.src.interfaces.IUpdate)
package lj.src.interfaces {
public interface IUpdate {
function updateEvents():void;
function remove():void;
function pause():void;
function replay():void;
}
}//package lj.src.interfaces
Section 35
//Array2D (lj.src.structure.Array2D)
package lj.src.structure {
public dynamic class Array2D extends Array {
public var col:int;
public var row:int;
public function Array2D(_arg1:int=0, _arg2:int=0, _arg3:Array=null){
var _local5:int;
super(_arg1);
var _local4:int;
while (_local4 < _arg1) {
this[_local4] = new Array();
_local5 = 0;
while (_local5 < _arg2) {
this[_local4].push(0);
_local5++;
};
_local4++;
};
col = _arg1;
row = _arg2;
this.data = _arg3;
}
public function set data(_arg1:Array):void{
var _local2:int;
var _local3:int;
if (_arg1){
_local2 = 0;
while (_local2 < _arg1.length) {
this[_local2] = _arg1[_local2];
_local3 = 0;
while (_local3 < _arg1[_local2].length) {
this[_local2][_local3] = _arg1[_local2][_local3];
_local3++;
};
_local2++;
};
};
}
public function toString():String{
var _local3:int;
var _local1 = "[ \n";
var _local2:int;
while (_local2 < length) {
_local1 = (_local1 + "[ ");
_local3 = 0;
while (_local3 < this[_local2].length) {
_local1 = (_local1 + (this[_local2][_local3] + ","));
_local3++;
};
_local1 = (_local1 + " ], \n");
_local2++;
};
_local1 = (_local1 + " ]");
return (_local1);
}
}
}//package lj.src.structure
Section 36
//GameControl (lj.src.sys.GameControl)
package lj.src.sys {
import flash.events.*;
import flash.display.*;
import lj.src.interfaces.*;
import lj.src.util.*;
public class GameControl {
protected var mouseHDArr:Array;
private var _stage:Stage;
protected var keyboardHDArr:Array;
public static const MOUSE:String = "mouse";
public static const KEYBOARD:String = "keyboard";
public function GameControl(){
_stage = Global.stage;
mouseHDArr = new Array();
keyboardHDArr = new Array();
_stage.addEventListener(KeyboardEvent.KEY_DOWN, keyDownHD);
_stage.addEventListener(KeyboardEvent.KEY_UP, keyUpHD);
_stage.addEventListener(MouseEvent.MOUSE_DOWN, onMyMouseDown);
_stage.addEventListener(MouseEvent.MOUSE_UP, onMyMouseUp);
_stage.addEventListener(MouseEvent.MOUSE_MOVE, onMyMouseMove);
_stage.addEventListener(MouseEvent.MOUSE_OVER, onMyMouseOver);
_stage.addEventListener(MouseEvent.MOUSE_OUT, onMyMouseOut);
_stage.addEventListener(MouseEvent.MOUSE_WHEEL, onMyMouseWheel);
_stage.addEventListener(MouseEvent.CLICK, onMyMouseClick);
}
protected function onMyMouseWheel(_arg1:MouseEvent):void{
doMouseEvent("Wheel", _arg1);
}
public function remove():void{
mouseHDArr.splice(0);
mouseHDArr = null;
keyboardHDArr.splice(0);
keyboardHDArr = null;
_stage.removeEventListener(KeyboardEvent.KEY_DOWN, keyDownHD);
_stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpHD);
_stage.removeEventListener(MouseEvent.MOUSE_DOWN, onMyMouseDown);
_stage.removeEventListener(MouseEvent.MOUSE_UP, onMyMouseUp);
_stage.removeEventListener(MouseEvent.MOUSE_MOVE, onMyMouseMove);
_stage.removeEventListener(MouseEvent.MOUSE_WHEEL, onMyMouseWheel);
_stage.removeEventListener(MouseEvent.CLICK, onMyMouseClick);
_stage = null;
}
protected function doKeyboardEvent(_arg1:String, _arg2:KeyboardEvent):void{
var _local3:int;
while (_local3 < keyboardHDArr.length) {
var _local4 = keyboardHDArr[_local3];
_local4[("handleKey" + _arg1)](_arg2);
_local3++;
};
}
protected function onMyMouseDown(_arg1:MouseEvent):void{
doMouseEvent("Down", _arg1);
}
private function keyDownHD(_arg1:KeyboardEvent):void{
var _local2:int = _arg1.keyCode;
doKeyboardEvent("Down", _arg1);
}
protected function onMyMouseUp(_arg1:MouseEvent):void{
doMouseEvent("Up", _arg1);
}
protected function onMyMouseClick(_arg1:MouseEvent):void{
doMouseEvent("Click", _arg1);
}
protected function doMouseEvent(_arg1:String, _arg2:MouseEvent):void{
var _local3:int;
while (_local3 < mouseHDArr.length) {
mouseHDArr[_local3].handleMouseEvent(_arg2);
_local3++;
};
}
protected function onMyMouseMove(_arg1:MouseEvent):void{
doMouseEvent("Move", _arg1);
}
protected function onMyMouseOut(_arg1:MouseEvent):void{
doMouseEvent("Out", _arg1);
}
public function removeMouseListener(_arg1:IMouseEvent):void{
GameUtil.removeObjInArr(mouseHDArr, _arg1);
}
private function keyUpHD(_arg1:KeyboardEvent):void{
var _local2:int = _arg1.keyCode;
doKeyboardEvent("Up", _arg1);
}
public function addMouseListener(_arg1:IMouseEvent):void{
mouseHDArr.push(_arg1);
}
public function addKeyboardListener(_arg1:IKeyboardEvent):void{
keyboardHDArr.push(_arg1);
}
protected function onMyMouseOver(_arg1:MouseEvent):void{
doMouseEvent("Over", _arg1);
}
public function removeKeyBoardListener(_arg1:IKeyboardEvent):void{
GameUtil.removeObjInArr(keyboardHDArr, _arg1);
}
}
}//package lj.src.sys
Section 37
//Global (lj.src.sys.Global)
package lj.src.sys {
import flash.display.*;
import lj.src.util.*;
public class Global {
public static var control:GameControl;
public static var updateArr:Array;
public static var xmlLoader:XMLLoader;
public static var scene:DisplayObjectContainer;
public static var canControl:Boolean = true;
public static var myKeySet:Object;
public static var loader:DynamicLoader;
public static var removeArr:Array;
public static var pause:Boolean = true;
public static var docSprite:Sprite;
public static var stage:Stage;
public static var language:String = "english";
}
}//package lj.src.sys
Section 38
//GV (lj.src.sys.GV)
package lj.src.sys {
public class GV {
public static const keyArr:Array = [[32, "SPACE"], [17, "CTRL"], [16, "SHIFT"], [20, "CAPS"], [27, "ESC"], [8, "BACK"], [112, "F1"], [113, "F2"], [114, "F3"], [115, "F4"], [116, "F5"], [117, "F6"], [118, "F7"], [119, "F8"], [120, "F9"], [121, "F10"], [122, "F11"], [123, "F12"], [19, "SCRLK"], [45, "INSERT"], [36, "HOME"], [33, "PAGEUP"], [34, "PAGEDN"], [46, "DEL"], [35, "END"], [38, "↑"], [40, "↓"], [37, "←"], [39, "→"], [13, "ENTER"], [144, "NUMLOCK"]];
public static const KeySpaceCode:int = 32;
public static const KeyAcode:int = 65;
public static const KeyCcode:int = 67;
public static const KeyDcode:int = 68;
public static const KeyGcode:int = 71;
public static const KeyHcode:int = 72;
public static const KeyIcode:int = 73;
public static const KeyJcode:int = 74;
public static const KeyKcode:int = 75;
public static const KeyLcode:int = 76;
public static const KeyMcode:int = 77;
public static const KeyNcode:int = 78;
public static const KeyPcode:int = 80;
public static const KeyQcode:int = 81;
public static const Key2Code:int = 50;
public static const KeyScode:int = 83;
public static const Key4Code:int = 52;
public static const Key5Code:int = 53;
public static const Key6Code:int = 54;
public static const KeyWcode:int = 87;
public static const KeyXcode:int = 88;
public static const Key9Code:int = 57;
public static const KeyZcode:int = 90;
public static const Key7Code:int = 55;
public static const Key8Code:int = 56;
public static const Key1Code:int = 49;
public static const Key3Code:int = 51;
public static const Key0Code:int = 48;
}
}//package lj.src.sys
Section 39
//Main (lj.src.sys.Main)
package lj.src.sys {
import flash.events.*;
import flash.display.*;
import lj.src.util.*;
public class Main {
private static var _startFunc:Function;
public static var _loaderName:Array = ["assets"];
public static function initOptions(_arg1:String="high", _arg2:Number=1, _arg3:Number=1):void{
if (SaveMgr.loadData("quality") == undefined){
SaveMgr.saveData("quality", _arg1);
};
Global.stage.quality = SaveMgr.loadData("quality");
if (SaveMgr.loadData("soundVolume") == undefined){
SaveMgr.saveData("soundVolume", _arg2);
};
SoundObject.soundvolume(SaveMgr.loadData("soundVolume"));
if (SaveMgr.loadData("musicVolume") == undefined){
SaveMgr.saveData("musicVolume", _arg3);
};
SoundObject.musicvolume(SaveMgr.loadData("musicVolume"));
}
public static function setQuality(_arg1:String):void{
SaveMgr.saveData("quality", _arg1);
Global.stage.quality = _arg1;
}
private static function load():void{
var _local1:Array = _loaderName;
var _local2:DynamicLoader = new DynamicLoader();
_local2.load(GameUtil.clone(_local1), null);
_local2.addEventListener(Event.COMPLETE, onLoaderComplete);
Global.loader = _local2;
}
public static function loadInit(_arg1:Stage, _arg2:Sprite, _arg3:Function, _arg4:Array=null):void{
_arg1.scaleMode = StageScaleMode.NO_SCALE;
Global.stage = _arg1;
Global.docSprite = _arg2;
_startFunc = _arg3;
if (((_arg4) && (_arg4.length))){
_loaderName = _arg4;
load();
trace("Load!");
} else {
_startFunc.call(null);
};
}
private static function onLoaderComplete(_arg1:Event):void{
_arg1.target.removeEventListener(Event.COMPLETE, onLoaderComplete);
_startFunc.call(null);
}
public static function setVolume(_arg1:Number, _arg2:String):void{
SaveMgr.saveData((_arg2 + "Volume"), _arg1);
var _local3 = SoundObject;
_local3[(_arg2 + "volume")](_arg1);
}
public static function initKeyShareObj(_arg1:Object):void{
if (!SaveMgr.loadData("keyset")){
SaveMgr.saveData("keyset", _arg1);
};
Global.myKeySet = SaveMgr.loadData("keyset");
}
}
}//package lj.src.sys
Section 40
//SaveMgr (lj.src.sys.SaveMgr)
package lj.src.sys {
import flash.net.*;
public class SaveMgr {
protected static const minDiskSpace:int = 2000;
protected static var localInfo:SharedObject;
public static function init(_arg1:String):void{
var _local2:Object;
localInfo = SharedObject.getLocal(_arg1);
if (!localInfo.data.saveObj){
_local2 = new Object();
localInfo.data.saveObj = _local2;
};
localInfo.flush(minDiskSpace);
}
public static function flush():void{
localInfo.flush(minDiskSpace);
}
public static function saveData(_arg1:String, _arg2):void{
localInfo.data.saveObj[_arg1] = _arg2;
}
public static function clear():void{
delete localInfo.data.saveObj;
}
public static function loadData(_arg1:String){
return (localInfo.data.saveObj[_arg1]);
}
}
}//package lj.src.sys
Section 41
//DynamicLoader (lj.src.util.DynamicLoader)
package lj.src.util {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import lj.src.sys.*;
import flash.net.*;
public class DynamicLoader extends EventDispatcher {
protected const PATH:String = "res/";
public var loaderArr:Array;
private var _loadPercentTxt:TextField;
protected var totalNum:int;
protected var nextLoadArr:Array;
private var _loadNumTxt:TextField;
protected var curLoadArr:Array;
protected var _completeFunc:Function;
public function DynamicLoader(){
loaderArr = new Array();
curLoadArr = new Array();
nextLoadArr = new Array();
createText();
}
protected function allComplete():void{
_loadNumTxt.parent.removeChild(_loadNumTxt);
_loadPercentTxt.parent.removeChild(_loadPercentTxt);
trace("全部读取完毕!");
dispatchEvent(new Event(Event.COMPLETE));
}
protected function checkLoader(_arg1:String):Boolean{
return (GameUtil.checkInArr(loaderArr, _arg1, "name"));
}
protected function createText():void{
_loadNumTxt = new TextField();
Global.stage.addChild(_loadNumTxt);
_loadNumTxt.x = 200;
_loadNumTxt.y = 250;
_loadNumTxt.textColor = 0xFFFFFF;
_loadPercentTxt = new TextField();
Global.stage.addChild(_loadPercentTxt);
_loadPercentTxt.x = 350;
_loadPercentTxt.y = 250;
_loadPercentTxt.textColor = 0xFFFFFF;
}
public function remove():void{
loaderArr.splice(0);
}
protected function loadSingle():void{
var _local1:String;
var _local2:String;
var _local3:Loader;
if (curLoadArr.length){
_local1 = curLoadArr[0];
if (!checkLoader(_local1)){
_loadNumTxt.text = ((((totalNum - curLoadArr.length) + 1) + "/") + totalNum);
_local2 = ((PATH + _local1) + ".swf");
_local3 = new Loader();
_local3.name = _local1;
_local3.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, loadProgress);
_local3.contentLoaderInfo.addEventListener(Event.COMPLETE, singleComplete);
_local3.load(new URLRequest(_local2));
} else {
loadComplete();
};
} else {
allComplete();
};
}
protected function singleComplete(_arg1:Event):void{
var _local2:LoaderInfo = (_arg1.target as LoaderInfo);
_local2.removeEventListener(Event.COMPLETE, singleComplete);
loaderArr.push(_local2.loader);
loadComplete();
}
public function load(_arg1:Array, _arg2:Function):void{
_completeFunc = _arg2;
if (!curLoadArr.length){
curLoadArr = _arg1;
totalNum = _arg1.length;
loadSingle();
} else {
nextLoadArr = _arg1;
totalNum = (_arg1.length + 1);
curLoadArr.splice(1);
};
}
private function loadProgress(_arg1:ProgressEvent):void{
var _local2:LoaderInfo = (_arg1.target as LoaderInfo);
var _local3:Number = (Math.floor(((_local2.bytesLoaded / _local2.bytesTotal) * 10000)) / 100);
_loadPercentTxt.text = (_local3.toString() + "% Loaded");
}
protected function loadComplete():void{
curLoadArr.shift();
if (nextLoadArr.length){
curLoadArr = nextLoadArr;
} else {
if (curLoadArr.length > 0){
};
};
loadSingle();
if (_completeFunc != null){
_completeFunc();
};
}
}
}//package lj.src.util
Section 42
//FPSShow (lj.src.util.FPSShow)
package lj.src.util {
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.utils.*;
public class FPSShow extends Sprite {
private var txt:TextField;
private var _timer:uint;
private var _totalCount:uint;
private var count:int;// = 0
public function FPSShow(){
mouseChildren = false;
mouseEnabled = false;
init();
}
private function timerHandler(_arg1:TimerEvent):void{
txt.text = ("FPS:" + count.toString());
count = 0;
}
private function init():void{
var _local1:uint;
txt = new TextField();
txt.textColor = 0xFFFFFF;
txt.background = true;
txt.backgroundColor = 0;
txt.autoSize = TextFieldAutoSize.LEFT;
addChild(txt);
var _local2:Timer = new Timer(1000);
_local2.addEventListener("timer", timerHandler);
_local2.start();
addEventListener("enterFrame", countHandler);
}
private function countHandler(_arg1:Event):void{
count++;
_totalCount++;
}
}
}//package lj.src.util
Section 43
//GameUtil (lj.src.util.GameUtil)
package lj.src.util {
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.filters.*;
import flash.utils.*;
import lj.src.sys.*;
public class GameUtil {
public static var nonTrans:ColorTransform = new ColorTransform(1, 1, 1, 1, 0, 0, 0, 0);
public static var whiteTrans:ColorTransform = new ColorTransform(0.6, 0.6, 0.6, 1, 100, 100, 100, 0);
public static function StrDiscardNum(_arg1:String):String{
var _local4:int;
var _local2 = "";
var _local3:int;
while (_local3 < _arg1.length) {
_local4 = _arg1.charCodeAt(_local3);
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
} else {
_local2 = _local2.concat(_arg1.charAt(_local3));
};
_local3++;
};
return (_local2);
}
public static function getClass(_arg1:String, _arg2:String):Class{
var tempClass:Class;
var i:int;
var loader:Loader;
var loaderName = _arg1;
var className = _arg2;
try {
tempClass = (getDefinitionByName(className) as Class);
} catch(e:Error) {
i = 0;
while (i < Global.loader.loaderArr.length) {
try {
loader = Global.loader.loaderArr[i];
tempClass = (loader.contentLoaderInfo.applicationDomain.getDefinition(className) as Class);
} catch(e:Error) {
};
i = (i + 1);
};
};
return (tempClass);
}
public static function addSprite(_arg1:String, _arg2:String, _arg3:DisplayObjectContainer, _arg4:int, _arg5:int):Sprite{
var _local6:Class = (getDefinitionByName(((_arg2 + ".") + _arg1)) as Class);
var _local7:Sprite = new (_local6);
_local7.x = _arg4;
_local7.y = _arg5;
_arg3.addChild(_local7);
return (_local7);
}
public static function getColorBy2Muti2(_arg1:Sprite, _arg2:Number, _arg3:Number):uint{
var _local4:int = getTimer();
var _local5:BitmapData = new BitmapData(2, 2, true, 4294967295);
var _local6:Matrix = new Matrix();
_local6.tx = -(_arg2);
_local6.ty = -(_arg3);
_local5.draw(_arg1, _local6);
var _local7:uint = _local5.getPixel(1, 1);
_local5.dispose();
var _local8:int = getTimer();
return (_local7);
}
public static function createMask(_arg1:Sprite, _arg2:Number, _arg3:Number):void{
var _local4:Shape = new Shape();
_local4.graphics.beginFill(0);
_local4.graphics.drawRect(0, 0, _arg2, _arg3);
_local4.graphics.endFill();
_arg1.mask = _local4;
_arg1.addChild(_local4);
}
public static function addChild(_arg1:DisplayObject, _arg2:DisplayObjectContainer, _arg3:Number, _arg4:Number):void{
_arg1.x = _arg3;
_arg1.y = _arg4;
_arg2.addChild(_arg1);
}
public static function setDrawStyle():void{
}
public static function randomBetween(_arg1:Number, _arg2:Number):Number{
return (((_arg1 < _arg2)) ? ((Math.random() * (_arg2 - _arg1)) + _arg1) : 0);
}
public static function setGrayColor(_arg1:DisplayObject):void{
var _local2:Array = [0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0.3086, 0.6094, 0.082, 0, 0, 0, 0, 0, 1, 0];
applyColorFilter(_arg1, _local2);
}
public static function deleteMask(_arg1:Sprite):void{
if (_arg1.mask != null){
_arg1.removeChild(_arg1.mask);
_arg1.mask = null;
};
}
public static function getMirrorXAngle(_arg1:Number):Number{
var _local2:Number;
if (_arg1 > 360){
_arg1 = (_arg1 - 360);
} else {
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
};
_local2 = (360 - _arg1);
return (_local2);
}
public static function checkNumBetween(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Boolean;
if ((((_arg1 < _arg2)) && ((_arg1 > _arg3)))){
_local4 = true;
};
return (_local4);
}
public static function setColorTransform(_arg1:DisplayObject, _arg2:ColorTransform):void{
_arg1.transform.colorTransform = _arg2;
}
public static function checkInArr(_arg1:Array, _arg2:Object, _arg3=""):Boolean{
var _local5:*;
var _local4:Boolean;
if (((!((_arg3 is int))) && ((_arg3 == "")))){
if (_arg1.indexOf(_arg2) != -1){
_local4 = true;
};
} else {
for each (_local5 in _arg1) {
if (_local5[_arg3] == _arg2){
_local4 = true;
break;
};
};
};
return (_local4);
}
public static function setScoreNum(_arg1:int, _arg2:int, _arg3:MovieClip=null):Array{
var _local4:Array = new Array();
var _local5:int = _arg1;
var _local6:uint;
while (_local6 < _arg2) {
_local4.push((_local5 % 10));
_local5 = int((_local5 / 10));
if (_arg3 != null){
(_arg3.getChildAt(_local6) as MovieClip).gotoAndStop((_local4[_local6] + 1));
};
_local6++;
};
return (_local4);
}
public static function getDir(_arg1:Number):int{
return (((_arg1 == 0)) ? 1 : (Math.abs(_arg1) / _arg1));
}
public static function addColorTransform(_arg1:Sprite, _arg2:ColorTransform):void{
_arg1.transform.colorTransform = _arg2;
}
public static function removeFilter(_arg1:DisplayObject):void{
var _local2:Array = new Array();
_arg1.filters = _local2;
}
public static function to360StdDegree(_arg1:Number):Number{
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
return (_arg1);
}
public static function numToStr(_arg1:int, _arg2:int):String{
var _local5:int;
var _local3 = "";
var _local4:int = _arg2;
while (_local4 > 0) {
_local5 = (_arg1 / Math.pow(10, (_local4 - 1)));
_local3 = _local3.concat(_local5.toString());
_local4--;
};
return (_local3);
}
public static function ToTime(_arg1:int):Object{
var _local2:int = (_arg1 / 3600);
var _local3:int = ((_arg1 - (3600 * _local2)) / 60);
_arg1 = ((_arg1 - (3600 * _local2)) - (60 * _local3));
return ({h:_local2, m:_local3, s:_arg1});
}
public static function depthManager3D(_arg1:DisplayObjectContainer, _arg2:Array):void{
var _local3:int;
if (_arg2){
_arg2.sortOn(["my_y", "my_x", "my_z"], [Array.NUMERIC, Array.NUMERIC, (Array.NUMERIC | Array.DESCENDING)]);
_local3 = 0;
while (_local3 < _arg2.length) {
if (_arg2[_local3].mc){
_arg1.setChildIndex(_arg2[_local3].mc, _local3);
} else {
trace("Warning!!!!!! 深度数组的MC不存在!!!!!");
};
_local3++;
};
};
}
public static function depthManager(_arg1:DisplayObjectContainer, _arg2:Object):void{
var _local3:Array = new Array();
var _local4:int = _arg1.numChildren;
var _local5:int;
while (_local5 < _local4) {
_local3.push(_arg1.getChildAt(_local5));
_local5++;
};
_local3.sortOn(_arg2, Array.NUMERIC);
_local4 = _local3.length;
_local5 = 0;
while (_local5 < _local4) {
_arg1.setChildIndex((_local3[_local5] as DisplayObject), _local5);
_local5++;
};
}
public static function clone(_arg1:Object){
var _local2:ByteArray = new ByteArray();
_local2.writeObject(_arg1);
_local2.position = 0;
return (_local2.readObject());
}
public static function toDegree(_arg1:Number):Number{
return (((_arg1 * 180) / Math.PI));
}
public static function removeObjInArr(_arg1:Array, _arg2:Object, _arg3=""):Boolean{
var _local6:int;
var _local7:*;
var _local4:Boolean;
var _local5:Object = _arg2;
if (_arg1){
if (_arg3 != ""){
for each (_local7 in _arg1) {
if (_local7[_arg3] == _arg2){
_local5 = _local7;
break;
};
};
};
_local6 = _arg1.indexOf(_local5);
if (_local6 != -1){
_arg1.splice(_local6, 1);
_local4 = true;
};
};
return (_local4);
}
public static function setMCEnable(_arg1:MovieClip, _arg2:Boolean):void{
_arg1.enabled = _arg2;
_arg1.mouseEnabled = _arg2;
_arg1.mouseChildren = false;
_arg1.buttonMode = _arg2;
if (_arg2){
removeFilter(_arg1);
} else {
setGrayColor(_arg1);
};
}
public static function getDistance(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return (Math.sqrt((Math.pow((_arg3 - _arg1), 2) + Math.pow((_arg4 - _arg2), 2))));
}
public static function checkPointInCircle(_arg1:Point, _arg2:Point, _arg3:Number):Boolean{
var _local4:Boolean;
if ((Math.pow((_arg1.x - _arg2.x), 2) + Math.pow((_arg1.y - _arg2.y), 2)) <= (_arg3 * _arg3)){
_local4 = true;
};
return (_local4);
}
public static function applyColorFilter(_arg1:DisplayObject, _arg2:Array):void{
var _local3:ColorMatrixFilter;
var _local4:Array;
if (_arg1){
_local3 = new ColorMatrixFilter(_arg2);
_local4 = new Array();
_local4.push(_local3);
_arg1.filters = _local4;
};
}
public static function addText(_arg1:DisplayObjectContainer, _arg2:uint, _arg3:Boolean, _arg4:uint, _arg5:String="left"):TextField{
var _local6:TextField = new TextField();
_local6.textColor = _arg2;
_local6.background = _arg3;
_local6.backgroundColor = _arg4;
_local6.autoSize = _arg5;
_arg1.addChild(_local6);
return (_local6);
}
public static function getMirrorYAngle(_arg1:Number):Number{
var _local2:Number;
if (_arg1 > 360){
_arg1 = (_arg1 - 360);
} else {
if (_arg1 < 0){
_arg1 = (_arg1 + 360);
};
};
if ((((_arg1 > 0)) && ((_arg1 <= 180)))){
_local2 = (180 - _arg1);
} else {
if ((((_arg1 > 180)) && ((_arg1 <= 360)))){
_local2 = (540 - _arg1);
};
};
return (_local2);
}
public static function getRadiansBy2Point(_arg1:Point, _arg2:Point):Number{
var _local3:Number;
var _local4:Number = (_arg2.x - _arg1.x);
var _local5:Number = (_arg2.y - _arg1.y);
if (!_local4){
_local3 = (((Math.PI / 2) * Math.abs(_local5)) / _local5);
} else {
_local3 = Math.atan2(_local5, _local4);
};
return (_local3);
}
public static function checkHit(_arg1:Point, _arg2:DisplayObject, _arg3:DisplayObjectContainer):Boolean{
var _local4:Boolean;
var _local5:Point = _arg3.localToGlobal(_arg1);
if (_arg2.hitTestPoint(_local5.x, _local5.y, true)){
_local4 = true;
};
return (_local4);
}
public static function applyGlowFilter(_arg1:DisplayObject, _arg2:uint=0xFF0000, _arg3:Number=1, _arg4:Number=6, _arg5:Number=6, _arg6:Number=2, _arg7:int=1, _arg8:Boolean=false, _arg9:Boolean=false):void{
var _local10:GlowFilter = new GlowFilter(_arg2, _arg3, _arg4, _arg5, _arg6, _arg7, _arg8, _arg9);
var _local11:Array = new Array();
_local11.push(_local10);
_arg1.filters = _local11;
}
public static function getArrNextIndex(_arg1:int, _arg2:int, _arg3:int):int{
_arg2 = (_arg2 + _arg3);
if (_arg2 >= _arg1){
_arg2 = (_arg2 - _arg1);
} else {
if (_arg2 < 0){
_arg2 = (_arg2 + _arg1);
};
};
return (_arg2);
}
public static function getColorByBMD(_arg1:BitmapData, _arg2:Number, _arg3:Number):uint{
var _local4:int = getTimer();
var _local5:uint = _arg1.getPixel(_arg2, _arg3);
var _local6:int = getTimer();
return (_local5);
}
public static function getDegreeBy2Point(_arg1:Point, _arg2:Point):Number{
var _local3:int;
var _local4:Number = (_arg2.x - _arg1.x);
var _local5:Number = (_arg2.y - _arg1.y);
_local3 = (Math.atan2(_local5, _local4) / 0.0174);
return (_local3);
}
public static function createTextField(_arg1:DisplayObjectContainer, _arg2:Number, _arg3:Number):TextField{
var _local4:TextField = new TextField();
_local4.x = _arg2;
_local4.y = _arg3;
_local4.autoSize = TextFieldAutoSize.CENTER;
_local4.selectable = false;
_local4.border = true;
_local4.background = true;
_local4.backgroundColor = 0xFFFFFF;
_local4.textColor = 0xFF0000;
_arg1.addChild(_local4);
return (_local4);
}
public static function randomArrObj(_arg1:Array):Array{
var _local5:int;
var _local2:int = _arg1.length;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < _local2) {
_local5 = (Math.random() * _arg1.length);
_local3.push(_arg1[_local5]);
_arg1.splice(_local5, 1);
_local4++;
};
return (_local3);
}
public static function getSign(_arg1:Number):int{
return (((_arg1 == 0)) ? 0 : (Math.abs(_arg1) / _arg1));
}
public static function getObjInArr(_arg1:Array, _arg2:Object, _arg3):Object{
var _local5:*;
var _local4:Object;
if (_arg1){
for each (_local5 in _arg1) {
if (_local5[_arg3] == _arg2){
_local4 = _local5;
break;
};
};
};
return (_local4);
}
public static function setBtnEnable(_arg1:SimpleButton, _arg2:Boolean):void{
_arg1.enabled = _arg2;
_arg1.mouseEnabled = _arg2;
if (_arg2){
removeFilter(_arg1);
} else {
setGrayColor(_arg1);
};
}
public static function toRadians(_arg1:Number):Number{
return (((_arg1 * Math.PI) / 180));
}
}
}//package lj.src.util
Section 44
//SoundObject (lj.src.util.SoundObject)
package lj.src.util {
import flash.media.*;
import flash.events.*;
public class SoundObject {
private static var actionSound:Sound;
private static var musicChannelStopData:Array = [];
private static var sound:Array;
private static var musicChannel:Array;
private static var music_total:int = 1;
private static var sound_total:int = 10;
private static var soundClass:Array = [];
private static var sound_index:int = 0;
private static var music:Array;
private static var music_index:int = 0;
private static var actionSoundChannel:SoundChannel;
private static var sound_volume:SoundTransform = new SoundTransform();
private static var soundChannelStopData:Array = [];
private static var sound_holds:int = 2;
public static var finished:Boolean = true;
private static var soundChannel:Array;
private static var music_volume:SoundTransform = new SoundTransform();
public function SoundObject():void{
}
private static function setSoundIndex():void{
sound_index = (sound_index + 1);
if (sound_index >= sound_total){
sound_index = 0;
};
}
private static function creatSound():void{
soundChannel = [];
sound = [];
var _local1:int;
while (_local1 < sound_total) {
soundChannel.push([null, null, null]);
sound.push(null);
_local1++;
};
}
private static function soundvalume_change():Boolean{
var _local2:int;
if (!soundChannel){
creatSound();
return (false);
};
var _local1:int;
while (_local1 < soundChannel.length) {
_local2 = 1;
while (_local2 <= sound_holds) {
if ((soundChannel[_local1][_local2] is SoundChannel)){
soundChannel[_local1][_local2].soundTransform = sound_volume;
};
_local2++;
};
_local1++;
};
return (true);
}
public static function pushSound(_arg1:String, _arg2:Class, _arg3:Boolean=true):void{
soundClass.push([_arg1, _arg2]);
if (_arg3){
SoundObject.playSound(_arg1);
};
}
private static function creatMusic():void{
musicChannel = [];
music = [];
var _local1:int;
while (_local1 < music_total) {
musicChannel.push([null, null]);
musicChannelStopData.push([null, null]);
music.push(null);
_local1++;
};
}
public static function isMusic(_arg1:String):Boolean{
if (SoundObject.index_result(musicChannel, _arg1, 0) >= 0){
return (true);
};
return (false);
}
private static function creatSoundStop():void{
soundChannelStopData = [];
var _local1:int;
while (_local1 < sound_total) {
soundChannelStopData.push([null, null, null]);
_local1++;
};
}
public static function stopSound():Boolean{
var _local2:int;
creatSoundStop();
if (!soundChannel){
return (false);
};
var _local1:int;
_local1 = 0;
while (_local1 < soundChannel.length) {
_local2 = 1;
while (_local2 <= sound_holds) {
if ((((soundChannel[_local1][_local2] is SoundChannel)) && (!((soundChannel[_local1][_local2].position == 0))))){
soundChannelStopData[_local1][0] = soundChannel[_local1][0];
soundChannelStopData[_local1][_local2] = soundChannel[_local1][_local2].position;
soundChannel[_local1][_local2].stop();
};
soundChannel[_local1][_local2] = null;
_local2++;
};
soundChannel[_local1][0] = null;
_local1++;
};
SoundMixer.stopAll();
return (true);
}
public static function get sound_volume_val():Number{
return (sound_volume.volume);
}
private static function index_result(_arg1:Array, _arg2:String, ... _args):int{
var _local4:Array;
var _local5:int;
var _local6:int;
if (!each_type(_args, "number")){
return (-2);
};
_local5 = 0;
while (_local5 < _arg1.length) {
_local4 = _arg1[_local5];
_local6 = 0;
while (_local6 < _args.length) {
if (_local6 == (_args.length - 1)){
if (_local4[_args[_local6]] == _arg2){
return (_local5);
};
} else {
if ((_local4 is Array)){
_local4 = _local4[_args[_local6]];
} else {
return (-3);
};
};
//unresolved jump
_local6++;
};
if (_arg1[_local5] == _arg2){
return (_local5);
};
_local5++;
};
return (-1);
}
public static function playSound(_arg1:String, _arg2:int=0, _arg3:Number=0, _arg4:Boolean=false):Boolean{
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
if (!soundChannel){
creatSound();
};
var _local5:int = SoundObject.index_result(soundChannel, _arg1, 0);
if (_local5 < 0){
_local5 = SoundObject.index_result(soundClass, _arg1, 0);
if (_local5 >= 0){
_local6 = 1;
for (;_local6 <= sound_holds;(soundChannel[sound_index][_local6] = null), _local6++) {
if (soundChannel[sound_index][_local6]){
soundChannel[sound_index][_local6].stop();
continue;
};
};
sound[sound_index] = new (soundClass[_local5][1]);
if ((Math.round((sound[sound_index].length * 100)) / 100) != (Math.round((_arg3 * 100)) / 100)){
soundChannel[sound_index][0] = soundClass[_local5][0];
soundChannel[sound_index][1] = sound[sound_index].play(_arg3, _arg2);
if (soundChannel[sound_index][1]){
soundChannel[sound_index][1].soundTransform = sound_volume;
//unresolved jump
};
setSoundIndex();
return (true);
} else {
soundChannel[sound_index][0] = null;
sound[sound_index] = null;
return (false);
};
};
} else {
_local7 = 0;
_local8 = 1;
_local9 = 0;
_local7 = SoundObject.index_result(soundClass, _arg1, 0);
sound[_local5] = new (soundClass[_local7][1]);
if ((Math.round((sound[_local5].length * 100)) / 100) >= (Math.round((_arg3 * 100)) / 100)){
_local6 = 1;
for (;_local6 <= sound_holds;return (true), continue, if (_local9 < soundChannel[_local5][_local6].position){
_local9 = soundChannel[_local5][_local6].position;
_local8 = _local6;
}, _local6++) {
//unresolved if
soundChannel[_local5][_local6] = sound[_local5].play(_arg3, _arg2);
if (soundChannel[_local5][_local6]){
soundChannel[_local5][_local6].soundTransform = sound_volume;
continue;
};
};
soundChannel[_local5][_local8].stop();
soundChannel[_local5][_local8] = sound[_local5].play(_arg3, _arg2);
if (soundChannel[_local5][_local8]){
soundChannel[_local5][_local8].soundTransform = sound_volume;
//unresolved jump
};
return (true);
} else {
_local6 = 0;
while (_local6 <= sound_holds) {
soundChannel[_local5][_local6] = null;
_local6++;
};
sound[_local5] = null;
};
};
return (false);
}
public static function get sound_transform():SoundTransform{
return (sound_volume);
}
private static function musicvalume_change():Boolean{
if (!musicChannel){
creatMusic();
return (false);
};
var _local1:int;
while (_local1 < musicChannel.length) {
if ((musicChannel[_local1][1] is SoundChannel)){
musicChannel[_local1][1].soundTransform = music_volume;
};
_local1++;
};
return (true);
}
private static function each_type(_arg1:Array, _arg2:String):Boolean{
var _local3:int;
while (_local3 < _arg1.lengt) {
if (typeof(_arg1[_local3]) != _arg2){
return (false);
};
_local3++;
};
return (Boolean(_arg1.length));
}
private static function setMusicIndex():void{
music_index = (music_index + 1);
if (music_index >= music_total){
music_index = 0;
};
}
private static function soundEvent(_arg1:Event):void{
var _local3:int;
_arg1.target.removeEventListener(Event.SOUND_COMPLETE, soundEvent);
var _local2:int;
while (_local2 < soundChannel.length) {
_local3 = 1;
while (_local3 <= sound_holds) {
if (musicChannel[_local2][_local3] == _arg1.target){
playMusic(musicChannel[_local2][_local3]);
};
_local3++;
};
_local2++;
};
}
public static function get music_volume_val():Number{
return (music_volume.volume);
}
public static function playMusic(_arg1:String, _arg2:Number=0, _arg3:Boolean=false):Boolean{
if (!musicChannel){
creatMusic();
};
var _local4:int = SoundObject.index_result(musicChannel, _arg1, 0);
if (_local4 < 0){
_local4 = SoundObject.index_result(soundClass, _arg1, 0);
if (_local4 >= 0){
music[music_index] = new (soundClass[_local4][1]);
if (musicChannel[music_index][1]){
musicChannel[music_index][1].stop();
//unresolved jump
};
musicChannel[music_index][0] = soundClass[_local4][0];
musicChannel[music_index][1] = music[music_index].play(_arg2);
if (musicChannel[music_index][1]){
musicChannel[music_index][1].soundTransform = music_volume;
//unresolved jump
};
musicChannel[music_index][1].addEventListener(Event.SOUND_COMPLETE, musicEvent);
setMusicIndex();
return (true);
};
} else {
musicChannel[_local4][1].stop();
musicChannel[_local4][1] = music[_local4].play(_arg2);
if (musicChannel[_local4][1]){
musicChannel[_local4][1].soundTransform = music_volume;
//unresolved jump
};
musicChannel[_local4][1].addEventListener(Event.SOUND_COMPLETE, musicEvent);
return (true);
};
return (false);
}
public static function stopMusic():Boolean{
if (!musicChannel){
return (false);
};
var _local1:int;
_local1 = 0;
while (_local1 < musicChannel.length) {
if ((((musicChannel[_local1][1] is SoundChannel)) && (!((musicChannel[_local1][1].position == 0))))){
musicChannelStopData[_local1][0] = musicChannel[_local1][0];
musicChannelStopData[_local1][1] = musicChannel[_local1][1].position;
musicChannel[_local1][1].removeEventListener(Event.SOUND_COMPLETE, musicEvent);
musicChannel[_local1][1].stop();
};
_local1++;
};
return (true);
}
public static function completeSound(_arg1:Class):Boolean{
stopSound();
stopMusic();
finished = false;
actionSound = new (_arg1);
actionSoundChannel = actionSound.play();
actionSoundChannel.addEventListener(Event.SOUND_COMPLETE, completeHD);
return (true);
}
public static function get music_transform():SoundTransform{
return (music_volume);
}
public static function resumeSound():Boolean{
var _local2:int;
if (!soundChannel){
return (false);
};
var _local1:int;
_local1 = 0;
while (_local1 < soundChannelStopData.length) {
_local2 = 1;
while (_local2 <= sound_holds) {
if (soundChannelStopData[_local1][_local2] != null){
playSound(soundChannelStopData[_local1][0], (soundChannelStopData[_local1][_local2] + 200));
soundChannelStopData[_local1][_local2] = null;
};
_local2++;
};
soundChannelStopData[_local1][0] = null;
_local1++;
};
return (true);
}
public static function soundvolume(_arg1:Number=1, _arg2:Number=0):Boolean{
if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){
sound_volume = new SoundTransform(_arg1, _arg2);
soundvalume_change();
return (true);
};
return (false);
}
private static function musicEvent(_arg1:Event):void{
_arg1.target.removeEventListener(Event.SOUND_COMPLETE, musicEvent);
var _local2:int;
while (_local2 < musicChannel.length) {
if (musicChannel[_local2][1] == _arg1.target){
playMusic(musicChannel[_local2][0]);
};
_local2++;
};
}
public static function resumeMusic():Boolean{
if (!musicChannel){
return (false);
};
var _local1:int;
_local1 = 0;
while (_local1 < musicChannelStopData.length) {
if (musicChannelStopData[_local1][1] != null){
SoundObject.playMusic(musicChannelStopData[_local1][0], musicChannelStopData[_local1][1]);
musicChannelStopData[_local1][1] = null;
musicChannelStopData[_local1][0] = null;
};
_local1++;
};
return (true);
}
private static function completeHD(_arg1:Event):void{
actionSoundChannel.removeEventListener(Event.SOUND_COMPLETE, completeHD);
finished = true;
}
public static function pushSounds(... _args):void{
var _local2:int;
while (_local2 < _args.length) {
pushSound(_args[_local2][0], _args[_local2][1], false);
_local2++;
};
}
public static function musicvolume(_arg1:Number=1, _arg2:Number=0):Boolean{
if ((((_arg1 <= 1)) && ((_arg1 >= 0)))){
music_volume = new SoundTransform(_arg1, _arg2);
musicvalume_change();
return (true);
};
return (false);
}
}
}//package lj.src.util
Section 45
//XMLLoader (lj.src.util.XMLLoader)
package lj.src.util {
import flash.events.*;
import flash.net.*;
public class XMLLoader extends EventDispatcher {
protected var myXML:XML;
protected function onMyComplete(_arg1:Event):void{
myXML = new XML(_arg1.target.data);
_arg1.target.removeEventListener(Event.COMPLETE, onMyComplete);
dispatchEvent(new Event(Event.COMPLETE));
}
public function load(_arg1:String):void{
var _local2:URLLoader = new URLLoader(new URLRequest(_arg1));
_local2.addEventListener(Event.COMPLETE, onMyComplete);
}
public function get xml():XML{
return (myXML);
}
}
}//package lj.src.util
Section 46
//DocumentClass (lj.src.DocumentClass)
package lj.src {
import flash.events.*;
import flash.display.*;
import src.data.*;
import lj.src.sys.*;
public class DocumentClass extends Sprite {
public function DocumentClass(){
if (stage){
init();
trace("stage init!! ");
} else {
addEventListener(Event.ADDED_TO_STAGE, onMyAddToStage);
trace("add to stage!! ");
};
}
private function init():void{
Main.loadInit(stage, this, start, Data.loaderName);
trace("Init !");
stage.scaleMode = StageScaleMode.SHOW_ALL;
}
protected function start():void{
}
private function onMyAddToStage(_arg1:Event):void{
removeEventListener(Event.ADDED_TO_STAGE, onMyAddToStage);
init();
}
}
}//package lj.src
Section 47
//LOGOTitter_572 (main_fla.LOGOTitter_572)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LOGOTitter_572 extends MovieClip {
public var Goto:Number;
public var Type:String;
public var Logo:MovieClip;
public function LOGOTitter_572(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
Logo.buttonMode = true;
Logo.mouseChildren = false;
Logo.addEventListener(MouseEvent.CLICK, NewLogo);
Logo.addEventListener(MouseEvent.MOUSE_OVER, Over);
Logo.addEventListener(MouseEvent.MOUSE_OUT, Out);
}
public function NewLogo(_arg1){
MovieClip(root).LogoMoreGame(Type);
gotoAndStop(3);
}
public function Over(_arg1){
gotoAndStop(2);
}
public function Out(_arg1){
gotoAndStop(1);
}
}
}//package main_fla
Section 48
//LOGOTitter_573 (main_fla.LOGOTitter_573)
package main_fla {
import flash.display.*;
public dynamic class LOGOTitter_573 extends MovieClip {
public var LogoColor:MovieClip;
public var Logo:MovieClip;
public function LOGOTitter_573(){
addFrameScript(1, frame2);
}
function frame2(){
LogoColor.gotoAndStop(MoreGameURLOK.Goto);
gotoAndStop(MoreGameURLOK.Goto);
}
}
}//package main_fla
Section 49
//MainTimeline (main_fla.MainTimeline)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var Goto:String;
public var domain:String;
public var ServerFps;
public var TitterIntro:MovieClip;
public var portal:String;
public var Url:String;
public var main;
public var loader:URLLoader;
public var GameName:String;
public var MochiBotKey:String;
public var utm_content:String;
public var sender:LocalConnection;
public var url:String;
public var IntroOK:Boolean;
public var continueButton:Number;
public var branding:String;
public function MainTimeline(){
addFrameScript(0, frame1, 4, frame5);
}
public function CuntryType(_arg1:String){
var _local2:String;
switch (_arg1){
case "mary.com":
_local2 = "MaryCOM";
break;
case "titter.com":
_local2 = "TitterCOM";
break;
case "titter.fr":
_local2 = "TitterFR";
break;
case "titter.es":
_local2 = "TitterES";
break;
case "titter.pt":
_local2 = "TitterPT";
break;
case "titter.nl":
_local2 = "TitterNL";
break;
case "titter.it":
_local2 = "TitterIT";
break;
case "warda.com":
_local2 = "WardaCOM";
break;
case "titter.com.cn":
_local2 = "TitterCOMCN";
break;
case "titter.co.id":
_local2 = "TitterCOID";
break;
case "tessaspiele.de":
_local2 = "TessaspieleDE";
break;
case "tessagames.co.uk":
_local2 = "TessagamesCOUK";
break;
case "titter.pl":
_local2 = "TitterPL";
break;
case "titter.no":
_local2 = "TitterNO";
break;
case "titter.se":
_local2 = "TitterSE";
break;
case "titter.dk":
_local2 = "TitterDK";
break;
case "titter.hu":
_local2 = "TitterHU";
break;
case "titter.gr":
_local2 = "TitterGR";
break;
case "titter.tw":
_local2 = "TitterTW";
break;
case "titter.fi":
_local2 = "TitterFI";
break;
case "irgytessy.ru":
_local2 = "IrgytessyRU";
break;
case "kikirti.com":
_local2 = "KikirtiCOM";
break;
};
Url = ("http://www." + _arg1);
Goto = _local2;
MoreGameURLOK.MoreGameURLOK = LogoMoreGame;
MoreGameURLOK.Goto = Goto;
}
public function com(_arg1){
var _local2:String;
_local2 = _arg1.target.data.toLowerCase();
trace(_local2);
CuntryType(_local2);
TitterIntro.titterBtn.Logo.gotoAndStop(Goto);
TitterIntro.Loading.gotoAndStop(Goto);
NewLoadingReady();
}
public function ingameOK(_arg1){
utm_content = "ingame";
MoreGameURL(true);
}
public function preloader(_arg1){
utm_content = "preloader";
MoreGameURL(true);
}
public function gameover(_arg1){
utm_content = "gameover";
MoreGameURL(true);
}
public function LogoMoreGame(_arg1:String){
utm_content = _arg1;
MoreGameURL(true);
}
public function youwin(_arg1){
utm_content = "youwin";
MoreGameURL(true);
}
public function GameUrl(){
var _local1:String = ((((((("?utm_campaign=" + GameName) + "&utm_content=") + utm_content) + "&utm_medium=") + branding) + "&utm_source=") + url);
var _local2:String = ("http://www.mary.com/tessa-s-wedding.html" + _local1);
var _local3:URLRequest = new URLRequest(_local2);
navigateToURL(_local3);
}
function frame5(){
main = new HamsterMain();
addChild(main);
stop();
}
function frame1(){
MochiBotKey = "d1ff4724";
GameName = "hamster blue lagoon";
branding = "original";
continueButton = 1;
ServerFps = stage.frameRate;
stage.frameRate = 30;
stop();
MochiBot.track(this, MochiBotKey);
sender = new LocalConnection();
url = root.loaderInfo.url;
domain = sender.domain;
utm_content = "intro";
TitterIntro.GameURL.addEventListener(MouseEvent.CLICK, BGUrl);
Url = "http://www.mary.com";
Goto = "MaryCOM";
MoreGameURLOK.MoreGameURLOK = LogoMoreGame;
trace(MoreGameURLOK.MoreGameURLOK);
MoreGameURLOK.Goto = Goto;
trace(MoreGameURLOK.Goto);
if (domain != "localhost"){
loader = new URLLoader(new URLRequest("http://api.jaludo.com/geoip/index.php?return=domain&type=gameshell&portal=mary"));
loader.addEventListener(Event.COMPLETE, com);
} else {
NewLoadingReady();
};
}
public function menu(_arg1){
utm_content = "menu";
MoreGameURL(true);
}
public function NewLoadingReady(){
var onEnterFramee:Function;
onEnterFramee = function (_arg1:Event){
var _local2:Number;
var _local3:Number;
if (framesLoaded == totalFrames){
trace("Loading.......(100%)");
TitterIntro.gotoAndStop(2);
TitterIntro.removeEventListener(Event.ENTER_FRAME, onEnterFramee);
} else {
_local2 = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
_local3 = Math.round((_local2 * 100));
TitterIntro.LoadingPic.gotoAndStop(_local3);
TitterIntro.loadTxt.text = (_local3 + "%");
};
};
TitterIntro.addEventListener(Event.ENTER_FRAME, onEnterFramee);
}
public function MoreGameURL(_arg1){
var _local2:String = ((((((("?utm_campaign=" + GameName) + "&utm_content=") + utm_content) + "&utm_medium=") + branding) + "&utm_source=") + url);
var _local3:String = (Url + _local2);
var _local4:URLRequest = new URLRequest(_local3);
navigateToURL(_local4);
}
public function LoadGamePlay(){
SoundMixer.stopAll();
stage.frameRate = ServerFps;
gotoAndStop(5);
trace("动画播放完毕,您的游戏跳到第5帧!");
}
public function BGUrl(_arg1){
if (IntroOK){
LogoMoreGame("intro");
} else {
LogoMoreGame("preloader");
};
}
public function intro(_arg1){
utm_content = "intro";
MoreGameURL(true);
}
}
}//package main_fla
Section 50
//SonwGIF_549 (main_fla.SonwGIF_549)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SonwGIF_549 extends MovieClip {
public var SonwNum:int;
public var Speed:Number;
public var Winds:Number;
public var Heat:MovieClip;
public var SonwTime:int;
public var SonwMax:int;
public function SonwGIF_549(){
addFrameScript(0, frame1);
}
public function SonwReady(_arg1){
var i:*;
var Action:Function;
var Mc:MovieClip;
var event = _arg1;
var T:int = (Math.random() * SonwTime);
if (T == 1){
Winds = ((Math.random() * 3) - 1);
};
if (T < SonwMax){
var SownInit:Function = function (_arg1:MovieClip){
_arg1.Speed = int(((Math.random() * Speed) + 2));
_arg1.x = ((Math.random() * 800) - 100);
var _local2:int = ((Math.random() * 4) + 1);
var _local3:Number = ((Math.random() * 1) + 0.2);
var _local4:Number = ((Math.random() * 1) + 0.2);
var _local5:int = (Math.random() * 10);
if (_local5 < 2){
_arg1.gotoAndStop(_local2);
} else {
_arg1.gotoAndStop(1);
};
_arg1.rotation = (Math.random() * 360);
_arg1.scaleX = _local3;
_arg1.scaleY = _local3;
};
Action = function (_arg1){
var _local2:* = _arg1.target;
if (!_local2.Load){
_local2.y = (_local2.y + _local2.Speed);
_local2.x = (_local2.x + Winds);
_local2.rotation = (_local2.rotation + 5);
};
if (_local2.y > 400){
_local2.alpha = (_local2.alpha - 0.05);
};
if ((((_local2.y > 500)) || ((_local2.alpha < 0)))){
removeChild(_local2);
_local2.removeEventListener(Event.ENTER_FRAME, Action);
};
if (Heat.hitTestPoint(_local2.x, _local2.y, true)){
if (_local2.Speed > 0){
_local2.Speed--;
};
_local2.Load = true;
_local2.alpha = (_local2.alpha - 0.02);
};
};
i = 0;
while (i < SonwNum) {
Mc = new Sonw();
addChild(Mc);
SownInit(Mc);
Mc.addEventListener(Event.ENTER_FRAME, Action);
i = (i + 1);
};
};
}
function frame1(){
SonwNum = 4;
SonwMax = 20;
SonwTime = 100;
Speed = 5;
Winds = 2;
addEventListener(Event.ENTER_FRAME, SonwReady);
}
}
}//package main_fla
Section 51
//SonwGIF_582 (main_fla.SonwGIF_582)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class SonwGIF_582 extends MovieClip {
public var SonwNum:int;
public var Speed:Number;
public var Winds:Number;
public var Heat:MovieClip;
public var SonwTime:int;
public var SonwMax:int;
public function SonwGIF_582(){
addFrameScript(0, frame1);
}
public function SonwReady(_arg1){
var i:*;
var Action:Function;
var Mc:MovieClip;
var event = _arg1;
var T:int = (Math.random() * SonwTime);
if (T == 1){
Winds = ((Math.random() * 3) - 1);
};
if (T < SonwMax){
var SownInit:Function = function (_arg1:MovieClip){
_arg1.Speed = int(((Math.random() * Speed) + 2));
_arg1.x = ((Math.random() * 800) - 100);
var _local2:int = ((Math.random() * 4) + 1);
var _local3:Number = ((Math.random() * 1) + 0.2);
var _local4:Number = ((Math.random() * 1) + 0.2);
var _local5:int = (Math.random() * 10);
if (_local5 < 2){
_arg1.gotoAndStop(_local2);
} else {
_arg1.gotoAndStop(1);
};
_arg1.rotation = (Math.random() * 360);
_arg1.scaleX = _local3;
_arg1.scaleY = _local3;
};
Action = function (_arg1){
var _local2:* = _arg1.target;
if (!_local2.Load){
_local2.y = (_local2.y + _local2.Speed);
_local2.x = (_local2.x + Winds);
_local2.rotation = (_local2.rotation + 5);
};
if (_local2.y > 400){
_local2.alpha = (_local2.alpha - 0.05);
};
if ((((_local2.y > 500)) || ((_local2.alpha < 0)))){
removeChild(_local2);
_local2.removeEventListener(Event.ENTER_FRAME, Action);
};
if (Heat.hitTestPoint(_local2.x, _local2.y, true)){
if (_local2.Speed > 0){
_local2.Speed--;
};
_local2.Load = true;
_local2.alpha = (_local2.alpha - 0.02);
};
};
i = 0;
while (i < SonwNum) {
Mc = new Sonw();
addChild(Mc);
SownInit(Mc);
Mc.addEventListener(Event.ENTER_FRAME, Action);
i = (i + 1);
};
};
}
function frame1(){
SonwNum = 4;
SonwMax = 20;
SonwTime = 100;
Speed = 5;
Winds = 2;
addEventListener(Event.ENTER_FRAME, SonwReady);
}
}
}//package main_fla
Section 52
//YDK_1 (main_fla.YDK_1)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class YDK_1 extends MovieClip {
public var Loading:MovieClip;
public var Gif:MovieClip;
public var Loaded:MovieClip;
public var Continue:MovieClip;
public var loadTxt:TextField;
public var LoadingPic:MovieClip;
public var titterBtn:MovieClip;
public var GameURL:SimpleButton;
public function YDK_1(){
addFrameScript(0, frame1, 1, frame2, 150, frame151);
}
function frame151(){
MovieClip(root).LoadGamePlay();
stop();
}
public function run(_arg1){
var _local2:* = root;
var _local3:* = parent;
if (MovieClip(_local2).LoadingGif){
MovieClip(_local2).LoadGamePlay();
} else {
MovieClip(_local2).IntroOK = true;
SoundMixer.stopAll();
play();
};
}
function frame2(){
stop();
Continue.Continue.mouseChildren = false;
Continue.Continue.buttonMode = true;
Continue.Continue.addEventListener(MouseEvent.MOUSE_OVER, run);
}
function frame1(){
stop();
}
}
}//package main_fla
Section 53
//YDK_11 (main_fla.YDK_11)
package main_fla {
import flash.display.*;
public dynamic class YDK_11 extends MovieClip {
public function YDK_11(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_fla
Section 54
//YDK_2 (main_fla.YDK_2)
package main_fla {
import flash.events.*;
import flash.display.*;
public dynamic class YDK_2 extends MovieClip {
public var role2_mc:MovieClip;
public var Frame:Number;
public function YDK_2(){
addFrameScript(0, frame1, 15, frame16, 24, frame25, 32, frame33, 40, frame41, 127, frame128);
}
function frame1(){
Frame = 20;
}
function frame128(){
stop();
}
public function run(_arg1){
Loading(Frame);
}
function frame33(){
Frame = 60;
addEventListener(Event.ENTER_FRAME, run);
}
function frame25(){
Frame = 40;
addEventListener(Event.ENTER_FRAME, run);
}
function frame41(){
Frame = 80;
addEventListener(Event.ENTER_FRAME, run);
}
function frame16(){
Frame = 20;
addEventListener(Event.ENTER_FRAME, run);
}
public function Loading(_arg1){
var _local2:Number = (root.loaderInfo.bytesLoaded / root.loaderInfo.bytesTotal);
var _local3:Number = Math.round((_local2 * 100));
if (_local3 < _arg1){
stop();
} else {
removeEventListener(Event.ENTER_FRAME, run);
play();
};
}
}
}//package main_fla
Section 55
//YDK_21 (main_fla.YDK_21)
package main_fla {
import flash.display.*;
public dynamic class YDK_21 extends MovieClip {
public var glowMc:MovieClip;
public var Logo:MovieClip;
public function YDK_21(){
addFrameScript(0, frame1, 5, frame6, 9, frame10);
}
function frame1(){
stop();
}
function frame6(){
stop();
}
function frame10(){
gotoAndPlay(1);
}
}
}//package main_fla
Section 56
//YDK_22 (main_fla.YDK_22)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class YDK_22 extends MovieClip {
public function YDK_22(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
stop();
}
}
}//package main_fla
Section 57
//YDK_8 (main_fla.YDK_8)
package main_fla {
import flash.display.*;
public dynamic class YDK_8 extends MovieClip {
public function YDK_8(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_fla
Section 58
//YDK_90 (main_fla.YDK_90)
package main_fla {
import flash.display.*;
public dynamic class YDK_90 extends MovieClip {
public function YDK_90(){
addFrameScript(49, frame50);
}
function frame50(){
stop();
}
}
}//package main_fla
Section 59
//YDK_94 (main_fla.YDK_94)
package main_fla {
import flash.display.*;
public dynamic class YDK_94 extends MovieClip {
public function YDK_94(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package main_fla
Section 60
//YDK_95 (main_fla.YDK_95)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class YDK_95 extends MovieClip {
public function YDK_95(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
stop();
}
}
}//package main_fla
Section 61
//YDK_98 (main_fla.YDK_98)
package main_fla {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class YDK_98 extends MovieClip {
public function YDK_98(){
addFrameScript(0, frame1);
}
function frame1(){
gotoAndStop(MovieClip(root).Goto);
}
}
}//package main_fla
Section 62
//ByteArrayAsset (mx.core.ByteArrayAsset)
package mx.core {
import flash.utils.*;
public class ByteArrayAsset extends ByteArray implements IFlexAsset {
mx_internal static const VERSION:String = "4.0.0.14159";
}
}//package mx.core
Section 63
//EdgeMetrics (mx.core.EdgeMetrics)
package mx.core {
public class EdgeMetrics {
public var bottom:Number;
public var left:Number;
public var right:Number;
public var top:Number;
mx_internal static const VERSION:String = "4.0.0.14159";
public static const EMPTY:EdgeMetrics = new EdgeMetrics(0, 0, 0, 0);
;
public function EdgeMetrics(_arg1:Number=0, _arg2:Number=0, _arg3:Number=0, _arg4:Number=0){
this.left = _arg1;
this.top = _arg2;
this.right = _arg3;
this.bottom = _arg4;
}
public function clone():EdgeMetrics{
return (new EdgeMetrics(this.left, this.top, this.right, this.bottom));
}
}
}//package mx.core
Section 64
//FlexMovieClip (mx.core.FlexMovieClip)
package mx.core {
import flash.display.*;
import mx.utils.*;
public class FlexMovieClip extends MovieClip {
mx_internal static const VERSION:String = "4.0.0.14159";
public function FlexMovieClip(){
super();
try {
name = NameUtil.createUniqueName(this);
} catch(e:Error) {
};
}
override public function toString():String{
return (NameUtil.displayObjectToString(this));
}
}
}//package mx.core
Section 65
//IBorder (mx.core.IBorder)
package mx.core {
public interface IBorder {
function get borderMetrics():EdgeMetrics;
}
}//package mx.core
Section 66
//IFlexAsset (mx.core.IFlexAsset)
package mx.core {
public interface IFlexAsset {
}
}//package mx.core
Section 67
//IFlexDisplayObject (mx.core.IFlexDisplayObject)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.geom.*;
import flash.accessibility.*;
public interface IFlexDisplayObject extends IBitmapDrawable, IEventDispatcher {
function get root():DisplayObject;
function get stage():Stage;
function get name():String;
function set name(_arg1:String):void;
function get parent():DisplayObjectContainer;
function get mask():DisplayObject;
function set mask(_arg1:DisplayObject):void;
function get visible():Boolean;
function set visible(_arg1:Boolean):void;
function get x():Number;
function set x(_arg1:Number):void;
function get y():Number;
function set y(_arg1:Number):void;
function get scaleX():Number;
function set scaleX(_arg1:Number):void;
function get scaleY():Number;
function set scaleY(_arg1:Number):void;
function get mouseX():Number;
function get mouseY():Number;
function get rotation():Number;
function set rotation(_arg1:Number):void;
function get alpha():Number;
function set alpha(_arg1:Number):void;
function get width():Number;
function set width(_arg1:Number):void;
function get height():Number;
function set height(_arg1:Number):void;
function get cacheAsBitmap():Boolean;
function set cacheAsBitmap(_arg1:Boolean):void;
function get opaqueBackground():Object;
function set opaqueBackground(_arg1:Object):void;
function get scrollRect():Rectangle;
function set scrollRect(_arg1:Rectangle):void;
function get filters():Array;
function set filters(_arg1:Array):void;
function get blendMode():String;
function set blendMode(_arg1:String):void;
function get transform():Transform;
function set transform(_arg1:Transform):void;
function get scale9Grid():Rectangle;
function set scale9Grid(_arg1:Rectangle):void;
function globalToLocal(_arg1:Point):Point;
function localToGlobal(_arg1:Point):Point;
function getBounds(_arg1:DisplayObject):Rectangle;
function getRect(_arg1:DisplayObject):Rectangle;
function get loaderInfo():LoaderInfo;
function hitTestObject(_arg1:DisplayObject):Boolean;
function hitTestPoint(_arg1:Number, _arg2:Number, _arg3:Boolean=false):Boolean;
function get accessibilityProperties():AccessibilityProperties;
function set accessibilityProperties(_arg1:AccessibilityProperties):void;
function get measuredHeight():Number;
function get measuredWidth():Number;
function move(_arg1:Number, _arg2:Number):void;
function setActualSize(_arg1:Number, _arg2:Number):void;
}
}//package mx.core
Section 68
//IRepeaterClient (mx.core.IRepeaterClient)
package mx.core {
public interface IRepeaterClient {
function get instanceIndices():Array;
function set instanceIndices(_arg1:Array):void;
function get isDocument():Boolean;
function get repeaterIndices():Array;
function set repeaterIndices(_arg1:Array):void;
function get repeaters():Array;
function set repeaters(_arg1:Array):void;
function initializeRepeaterArrays(_arg1:IRepeaterClient):void;
}
}//package mx.core
Section 69
//MovieClipAsset (mx.core.MovieClipAsset)
package mx.core {
public class MovieClipAsset extends FlexMovieClip implements IFlexAsset, IFlexDisplayObject, IBorder {
private var _measuredHeight:Number;
private var _measuredWidth:Number;
mx_internal static const VERSION:String = "4.0.0.14159";
public function MovieClipAsset(){
this._measuredWidth = width;
this._measuredHeight = height;
}
public function get measuredHeight():Number{
return (this._measuredHeight);
}
public function get measuredWidth():Number{
return (this._measuredWidth);
}
public function get borderMetrics():EdgeMetrics{
if (scale9Grid == null){
return (EdgeMetrics.EMPTY);
};
return (new EdgeMetrics(scale9Grid.left, scale9Grid.top, Math.ceil((this.measuredWidth - scale9Grid.right)), Math.ceil((this.measuredHeight - scale9Grid.bottom))));
}
public function move(_arg1:Number, _arg2:Number):void{
this.x = _arg1;
this.y = _arg2;
}
public function setActualSize(_arg1:Number, _arg2:Number):void{
width = _arg1;
height = _arg2;
}
}
}//package mx.core
Section 70
//MovieClipLoaderAsset (mx.core.MovieClipLoaderAsset)
package mx.core {
import flash.events.*;
import flash.display.*;
import flash.utils.*;
import flash.system.*;
public class MovieClipLoaderAsset extends MovieClipAsset implements IFlexAsset, IFlexDisplayObject {
private var loader:Loader;// = null
private var initialized:Boolean;// = false
private var requestedWidth:Number;
private var requestedHeight:Number;
protected var initialWidth:Number;// = 0
protected var initialHeight:Number;// = 0
mx_internal static const VERSION:String = "4.0.0.14159";
public function MovieClipLoaderAsset(){
var _local1:LoaderContext = new LoaderContext();
_local1.applicationDomain = new ApplicationDomain(ApplicationDomain.currentDomain);
if (("allowLoadBytesCodeExecution" in _local1)){
_local1["allowLoadBytesCodeExecution"] = true;
};
this.loader = new Loader();
this.loader.contentLoaderInfo.addEventListener(Event.COMPLETE, this.completeHandler);
this.loader.loadBytes(this.movieClipData, _local1);
addChild(this.loader);
}
override public function get height():Number{
if (!this.initialized){
return (this.initialHeight);
};
return (super.height);
}
override public function set height(_arg1:Number):void{
if (!this.initialized){
this.requestedHeight = _arg1;
} else {
this.loader.height = _arg1;
};
}
override public function get measuredHeight():Number{
return (this.initialHeight);
}
override public function get measuredWidth():Number{
return (this.initialWidth);
}
override public function get width():Number{
if (!this.initialized){
return (this.initialWidth);
};
return (super.width);
}
override public function set width(_arg1:Number):void{
if (!this.initialized){
this.requestedWidth = _arg1;
} else {
this.loader.width = _arg1;
};
}
public function get movieClipData():ByteArray{
return (null);
}
private function completeHandler(_arg1:Event):void{
this.initialized = true;
this.initialWidth = this.loader.contentLoaderInfo.width;
this.initialHeight = this.loader.contentLoaderInfo.height;
if (!isNaN(this.requestedWidth)){
this.loader.width = this.requestedWidth;
};
if (!isNaN(this.requestedHeight)){
this.loader.height = this.requestedHeight;
};
dispatchEvent(_arg1);
}
}
}//package mx.core
Section 71
//mx_internal (mx.core.mx_internal)
package mx.core {
public namespace mx_internal = "http://www.adobe.com/2006/flex/mx/internal";
}//package mx.core
Section 72
//NameUtil (mx.utils.NameUtil)
package mx.utils {
import flash.display.*;
import mx.core.*;
import flash.utils.*;
public class NameUtil {
mx_internal static const VERSION:String = "4.0.0.14159";
private static var counter:int = 0;
public static function createUniqueName(_arg1:Object):String{
if (!_arg1){
return (null);
};
var _local2:String = getQualifiedClassName(_arg1);
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
var _local4:int = _local2.charCodeAt((_local2.length - 1));
if ((((_local4 >= 48)) && ((_local4 <= 57)))){
_local2 = (_local2 + "_");
};
return ((_local2 + counter++));
}
public static function displayObjectToString(_arg1:DisplayObject):String{
var result:String;
var o:DisplayObject;
var s:String;
var indices:Array;
var displayObject = _arg1;
try {
o = displayObject;
while (o != null) {
if (((((o.parent) && (o.stage))) && ((o.parent == o.stage)))){
break;
};
s = (((("id" in o)) && (o["id"]))) ? o["id"] : o.name;
if ((o is IRepeaterClient)){
indices = IRepeaterClient(o).instanceIndices;
if (indices){
s = (s + (("[" + indices.join("][")) + "]"));
};
};
result = ((result == null)) ? s : ((s + ".") + result);
o = o.parent;
};
} catch(e:SecurityError) {
};
return (result);
}
public static function getUnqualifiedClassName(_arg1:Object):String{
var _local2:String;
if ((_arg1 is String)){
_local2 = (_arg1 as String);
} else {
_local2 = getQualifiedClassName(_arg1);
};
var _local3:int = _local2.indexOf("::");
if (_local3 != -1){
_local2 = _local2.substr((_local3 + 2));
};
return (_local2);
}
}
}//package mx.utils
Section 73
//Data (src.data.Data)
package src.data {
public class Data {
public static const Serve_Order:int = 0;
public static const Serve_Offset:int = 44;
public static const MUSIC:Number = 1;
public static const Serve_Drink:int = 2;
public static const Serve_Time:Array = [60, 0, 0, 160, 0, 120];
public static const Serve_Mud:int = 4;
public static const Shop_Data:Array = [["Type", "Price", "Str1", "Str2"], ["bath", 200], ["pool", 1000], ["flower", 900], ["table_1", 900], ["door_1", 1000], ["door_2", 2500], ["road_1", 700], ["road_2", 1400], ["light_1", 800], ["light_2", 1400], ["role", 1000], ["carpet_1", 1000], ["carpet_2", 2000], ["tree_1", 1000], ["tree_2", 2000]];
public static const Serve_Bath:int = 3;
public static const keyArr:Array = [[32, "SPACE"], [17, "CTRL"], [16, "SHIFT"], [20, "CAPS"], [27, "ESC"], [8, "BACK"], [112, "F1"], [113, "F2"], [114, "F3"], [115, "F4"], [116, "F5"], [117, "F6"], [118, "F7"], [119, "F8"], [120, "F9"], [121, "F10"], [122, "F11"], [123, "F12"], [19, "SCRLK"], [45, "INSERT"], [36, "HOME"], [33, "PAGEUP"], [34, "PAGEDN"], [46, "DEL"], [35, "END"], [38, "↑"], [40, "↓"], [37, "←"], [39, "→"], [13, "ENTER"], [144, "NUMLOCK"]];
public static const Serve_Towel:int = 5;
public static const QUALITY:String = "high";
public static const defKeySet:Object = {};
public static const SOUND:Number = 1;
public static const Serve_Eat:int = 1;
public static var Line_3:Array = [2, 5];
public static var roadData:Array = [[1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 1], [1, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1], [1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 1, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 1], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]];
public static var Bath_Pos:Array = [[155, 181, 95, 1, 3, 0], [276, 182, 358, 2, 3, 2], [143, 240, 83, 1, 4, 0], [270, 242, 359, 2, 4, 2], [135, 305, 69, 1, 5, 0], [273, 311, 361, 2, 5, 2], [117, 373, 55, 1, 6, 0], [271, 375, 363, 2, 6, 2], [107, 447, 40, 1, 7, 0], [268, 450, 364, 2, 7, 2], [424, 185, 358, 2, 3, 2], [528, 184, 627, 3, 2, 4], [426, 247, 359, 2, 4, 2], [545, 245, 641, 3, 4, 4], [441, 312, 361, 2, 5, 2], [555, 313, 657, 3, 5, 4], [444, 376, 363, 2, 6, 2], [570, 375, 672, 3, 6, 4], [437, 452, 364, 2, 7, 2], [589, 450, 689, 3, 7, 4]];
public static var waiter_frame:Object = {upset:[[16], ["animOver"], []], get:[[[1, 17], 17], ["stillSpeed", "animOver"], []], send:[[20], ["animOver"], []], mud:[[107, 135, 142], ["cycleFrame", "clearMud", "animOver"], []], sk_upset:[[16], ["animOver"], []], sk_sway:[[29], ["animOver"], []], sk_get:[[[1, 17], 17], ["stillSpeed", "animOver"], []], sk_send:[[20], ["animOver"], []]};
public static var MapPtArr:Array = [[null, null, [342, 86], null, null], [[87, 115], [218, 117], [343, 118], [468, 116], [592, 114]], [[81, 165], null, [344, 153], null, [605, 169]], [[74, 198], null, [345, 178], null, [609, 197]], [[63, 254], null, [347, 231], null, [616, 225]], [[57, 285], null, [349, 292], null, [631, 287]], [[47, 350], null, [353, 357], null, [647, 353]], [[34, 431], null, [354, 428], null, [666, 430]], [[26, 479], [187, 482], [357, 481], [538, 481], [678, 481]]];
public static var SFX_WAIT:String = "Sfx_Wait";
public static var Worker_Pos:Array = [[440, 90], [522, 90], [570, 90], [622, 90]];
public static var SFX_DONE:String = "Sfx_Done";
public static var SFX_LIGHT_UP:String = "Sfx_light_up";
public static var custom_frame:Object = {mud:[[135, 157], ["stopFrame", "animOver"], []], drink:[[59, 60], ["delayFrame", "animOver"], []]};
public static var AllSounds:Array = [SFX_Button, SFX_Win, SFX_Fail, SFX_Pass, SFX_Button2, SFX_GOAL, SFX_ORDER1, SFX_ORDER2, SFX_ORDER3, SFX_ORDER4, SFX_EAT, SFX_LIGHT_UP, SFX_GET, SFX_GRRR1, SFX_GRRR2, SFX_HELLO, SFX_ROAD, SFX_ANGRY1, SFX_ANGRY2, SFX_ANGRY3, SFX_ANGRY4, SFX_POOR, SFX_DONE, SFX_DOOR, SFX_LIGHT, SFX_SMOKE, SFX_RUN, SFX_CASH, SFX_HAMMER, SFX_WAIT, SFX_WATER, SFX_DRINK, SFX_SKATING];
public static var Dish_Pos:Array = [[682, 156, 621, 3, 3, 4], [673, 120, 612, 3, 2, 4], [28, 149, 83, 1, 3, 0], [35, 118, 82, 1, 2, 0], [17, 211, 69, 1, 4, 0]];
public static var LevelInfo:Array = [["Goal", "Time", "Freq", "Customer", "BaseCost", "ServeNum", "ServeType"], [200, 60, 10, 12, 40, [1, 0], 5], [250, 60, 10, 12, 40, [1, 0], 5], [300, 60, 10, 12, 40, [1, 0], 5], [350, 60, 10, 12, 40, [1, 1], 5], [400, 60, 10, 12, 40, [1, 1], 5], [600, 60, 9, 12, 50, [1, 1], 5], [650, 60, 9, 12, 50, [1, 1], 5], [700, 60, 9, 12, 50, [1, 1], 5], [750, 60, 9, 12, 50, [1, 1], 5], [800, 60, 9, 12, 50, [1, 1], 5], [850, 60, 8, 12, 50, [1, 1], 5], [900, 60, 8, 12, 50, [1, 1], 5], [1000, 60, 8, 12, 50, [1, 1], 5], [1100, 60, 8, 12, 50, [1, 1], 5], [1200, 60, 8, 12, 50, [1, 1], 5], [1300, 60, 7, 12, 50, [1, 1], 5], [1500, 60, 7, 12, 50, [1, 1], 5], [1700, 60, 7, 12, 50, [1, 1], 5], [1900, 60, 6, 12, 50, [1, 1], 5], [2100, 60, 6, 12, 50, [1, 1], 5]];
public static var SFX_DRINK:String = "Sfx_Drink";
public static var Bath_Num:int = 20;
public static var loaderName:Array;
public static var worker_1_frame:Object = {order:[[107], ["animOver"], []]};
public static var SFX_CoverBG:String = "Sfx_CoverBG";
public static var SFX_Button2:String = "Sfx_Button2";
public static var SFX_DOOR:String = "Sfx_door";
public static var IF_Sound:Boolean = false;
public static var MapRoadData:Array = [[1, 1, 0, 1, 1], [0, 0, 0, 0, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 1, 0, 1, 0], [0, 0, 0, 0, 0]];
public static var SFX_HELLO:String = "Sfx_Hello";
public static var SFX_GET:String = "Sfx_get";
public static var SFX_EAT:String = "Sfx_eat";
public static var worker_2_frame:Object = {order:[[75], ["animOver"], []]};
public static var SFX_GameBG1:String = "Sfx_GameBG1";
public static var SFX_GameBG2:String = "Sfx_GameBG2";
public static var SFX_GameBG3:String = "Sfx_GameBG3";
public static var stageWidth:int = 700;
public static var SFX_Button:String = "Sfx_Button1";
public static var SFX_SKATING:String = "Sfx_Skating";
public static var SAVENAME:String = ("LJ_Hamster_SAVESLOT" + VERSION);
public static var IF_DEBUG:Boolean = false;
public static var Wait_Pos:Array = [[370, 75], [405, 76], [440, 77]];
public static var SFX_LIGHT:String = "Sfx_light";
public static var SFX_WATER:String = "Sfx_Water";
public static var SFX_NIGHT:String = "Sfx_Night";
public static var SFX_RUN:String = "Sfx_run";
public static var SFX_GOAL:String = "Sfx_Goal";
public static var worker_3_frame:Object = {order:[[85], ["animOver"], []]};
public static var SFX_Shop:String = "Sfx_Shop";
public static var VERSION:String = "1.1.000";
public static var SFX_POOR:String = "Sfx_Poor";
public static var SFX_ROAD:String = "Sfx_road";
public static var stageHeight:int = 500;
public static var Max_level:int = 20;
public static var SFX_GRRR1:String = "Sfx_grrr_1";
public static var SFX_GRRR2:String = "Sfx_grrr_2";
public static var Line_2:Array = [1, 4];
public static var WaiterInitPos:Array = [[2, 0, 6, 4], [4, 0, 7, 4], [4, 4, 6, 0], [5, 4, 7, 0]];
public static var SFX_Pass:String = "Sfx_Pass";
public static var SFX_CASH:String = "Sfx_Cash";
public static var Line_1:Array = [0, 3];
public static var Bath_Init:Array = [4, 6, 8, 13, 15];
public static var SFX_ORDER1:String = "Sfx_order_1";
public static var SFX_HAMMER:String = "Sfx_Hammer";
public static var SFX_Win:String = "Sfx_Win";
public static var SFX_ORDER4:String = "Sfx_order_4";
public static var SFX_ANGRY1:String = "Sfx_angry_1";
public static var SFX_ANGRY2:String = "Sfx_angry_2";
public static var SFX_ANGRY3:String = "Sfx_angry_3";
public static var SFX_ANGRY4:String = "Sfx_angry_4";
public static var SFX_ORDER3:String = "Sfx_order_3";
public static var SFX_Fail:String = "Sfx_Fail";
public static var Custom_tip:Number = 0.1;
public static var SFX_SMOKE:String = "Sfx_smoke";
public static var SFX_ORDER2:String = "Sfx_order_2";
public static var AddServeCost:Number = 0.7;
public static var tileSize:int = 20;
}
}//package src.data
Section 74
//Road (src.model.AStar.Road)
package src.model.AStar {
import lj.src.structure.*;
public class Road {
protected const LINE_VALUE:int = 10;
protected const BIAS_VALUE:int = 14;
protected var targetIX:int;
public var HEIGHT_NUMBER:int;
public var WIDTH_NUMBER:int;
protected var targetIY:int;
protected var lockList:Object;
protected var unlockList:Array;
protected var map:Array2D;
public function Road(_arg1:Array2D){
this.map = _arg1;
WIDTH_NUMBER = _arg1.length;
HEIGHT_NUMBER = _arg1[0].length;
}
protected function addUnlockList(_arg1:Sign):void{
if (_arg1){
unlockList.push(_arg1);
unlockList[((_arg1.ix + "_") + _arg1.iy)] = _arg1;
};
}
protected function isBlock(_arg1:int, _arg2:int):Boolean{
var _local3:Boolean;
if (map[_arg1][_arg2]){
_local3 = true;
};
return (_local3);
}
private function createSign(_arg1:int, _arg2:int, _arg3:Boolean, _arg4:Sign):Sign{
if ((((((((_arg1 < 0)) || ((_arg2 < 0)))) || ((_arg1 >= WIDTH_NUMBER)))) || ((_arg2 >= HEIGHT_NUMBER)))){
return (null);
};
if (isBlock(_arg1, _arg2)){
return (null);
};
if (lockList[((_arg1 + "_") + _arg2)]){
return (null);
};
if (unlockList[((_arg1 + "_") + _arg2)]){
return (null);
};
if (_arg3){
if (((isBlock(_arg4.ix, _arg2)) || (isBlock(_arg1, _arg4.iy)))){
return (null);
};
};
var _local5:Number = Math.abs((targetIX - _arg1));
var _local6:Number = Math.abs((targetIY - _arg2));
return (new Sign(_arg1, _arg2, (_arg3) ? BIAS_VALUE : LINE_VALUE, ((_local5 + _local6) * 10), _arg4));
}
public function seekRoad(_arg1:int, _arg2:int, _arg3:int, _arg4:int):Array{
if (!map){
return (null);
};
if (isBlock(_arg3, _arg4)){
return (null);
};
var _local5:int = _arg1;
var _local6:int = _arg2;
targetIX = _arg3;
targetIY = _arg4;
var _local7:Array = new Array();
unlockList = new Array();
lockList = new Object();
var _local8:Sign = new Sign(_arg1, _arg2, 0, 0, null);
lockList[((_arg1 + "_") + _arg2)] = _local8;
while (true) {
addUnlockList(createSign((_local5 + 1), _local6, false, _local8));
addUnlockList(createSign(_local5, (_local6 + 1), false, _local8));
addUnlockList(createSign((_local5 - 1), _local6, false, _local8));
addUnlockList(createSign(_local5, (_local6 - 1), false, _local8));
if (unlockList.length == 0){
break;
};
unlockList.sortOn("s", Array.NUMERIC);
_local8 = unlockList.shift();
lockList[((_local8.ix + "_") + _local8.iy)] = _local8;
_local5 = _local8.ix;
_local6 = _local8.iy;
if ((((_local5 == targetIX)) && ((_local6 == targetIY)))){
while (_local8 != null) {
_local7.push(_local8.getSign());
_local8 = _local8.p;
};
break;
};
};
_local8 = null;
return (_local7.reverse());
}
}
}//package src.model.AStar
Section 75
//Sign (src.model.AStar.Sign)
package src.model.AStar {
public class Sign {
private var _c:int;// = 0
private var _h:int;// = 0
private var _ix:Number;
private var _p:Sign;
private var _s:int;// = 0
private var _iy:Number;
public function Sign(_arg1:Number, _arg2:Number, _arg3:int, _arg4:int, _arg5:Sign=null){
this._ix = _arg1;
this._iy = _arg2;
this._p = _arg5;
if (_arg5){
_c = (_arg5.c + _arg3);
_h = _arg4;
_s = (_c + _h);
};
}
public function get h():int{
return (_h);
}
public function get c():int{
return (_c);
}
public function get ix():int{
return (_ix);
}
public function get s():int{
return (_s);
}
public function toString():String{
return (((ix + ",") + iy));
}
public function get iy():int{
return (_iy);
}
public function get p():Sign{
return (_p);
}
public function getSign():Object{
return ({x:_ix, y:_iy});
}
}
}//package src.model.AStar
Section 76
//Map (src.model.Map)
package src.model {
import flash.display.*;
import flash.geom.*;
import src.model.AStar.*;
import lj.src.structure.*;
import src.sys.obj.*;
import src.data.*;
public class Map {
protected var mapArr:Array2D;
protected var hitBmd:BitmapData;
protected var _road:Road;
public function Map(_arg1:Array){
mapArr = new Array2D(_arg1.length, _arg1[0].length, _arg1);
init();
}
public function get road():Road{
return (_road);
}
protected function initHit():void{
var _local1:ViewMC = new ViewMC("BathHit");
hitBmd = new BitmapData(Data.stageWidth, Data.stageHeight, true, 0);
hitBmd.draw(_local1);
}
public function set road(_arg1:Road):void{
_road = _arg1;
}
public function checkHit(_arg1:Number, _arg2:Number):int{
var _local3:int;
var _local4:uint = hitBmd.getPixel(_arg1, _arg2);
_local4 = (0xFF & _local4);
_local3 = int(_local4.toString(16));
if ((((_local3 < 0)) || ((_local3 > Data.Bath_Num)))){
_local3 = 0;
};
return (_local3);
}
protected function init():void{
road = new Road(mapArr);
initHit();
}
public function posToTile(_arg1:Number, _arg2:Number):Point{
var _local3:Point = new Point(int((_arg2 / Data.tileSize)), int((_arg1 / Data.tileSize)));
return (_local3);
}
}
}//package src.model
Section 77
//RoomInfo (src.model.RoomInfo)
package src.model {
import src.sys.*;
import src.sys.scene.*;
import flash.display.*;
import src.vo.*;
import src.view.*;
import lj.src.util.*;
import src.data.*;
public class RoomInfo {
protected var bathStatus:Array;
protected var leftArr:Array;
public var depthArr:Array;
protected var delayCustoms:int;
protected var custom_types:int;
protected var waiterArr:Array;
protected var customArr:Array;
public var roomVo:RoomVO;
public function RoomInfo(_arg1:int){
if (_arg1){
initRole(_arg1);
};
}
public function checkAvailServe(_arg1:int):Boolean{
var _local5:int;
var _local6:int;
var _local2:Boolean;
var _local3:int;
var _local4:int;
while (_local4 < customArr.length) {
if (customArr[_local4].curNeed == _arg1){
_local3++;
};
_local4++;
};
if (!_local3){
_local2 = false;
};
if (_local2){
_local5 = 0;
_local6 = 0;
while (_local6 < waiterArr.length) {
if (waiterArr[_local6].curServe == _arg1){
_local5++;
};
_local6++;
};
if (_local5){
if (_local5 >= _local3){
_local2 = false;
if (_local5 > _local3){
trace("Error!!!! Waiter拿多了盘子!!!", _local3, _local5);
};
};
};
};
return (_local2);
}
public function unfreezeCustomMode(_arg1:int):void{
var _local2:int;
while (_local2 < customArr.length) {
if (customArr[_local2].curNeed == _arg1){
customArr[_local2].freezeMode(-1);
};
_local2++;
};
}
public function createCustom(_arg1:int, _arg2:DisplayObjectContainer):void{
var _local3:Customer = new Customer(("Custom" + _arg1));
_local3.setData({id:_arg1, customArr:customArr, room:this, depthArr:depthArr});
_local3.addToStage(_arg2, (Data.stageWidth + 50), Data.Wait_Pos[0][1]);
leftArr.push(_local3);
var _local4:int = (leftArr.length - 1);
_local3.walkIn(Data.Wait_Pos[_local4][0], Data.Wait_Pos[_local4][1]);
}
public function get table():Object{
return (roomVo.table);
}
protected function randomCustomId():int{
var _local1:int = ((Math.random() * custom_types) + 1);
return (_local1);
}
public function init(_arg1:RoomVO):void{
if (!_arg1){
roomVo = new RoomVO();
roomVo.road = {level:1};
roomVo.pool = {level:1, ices:[], flowers:[]};
roomVo.table = {level:1};
roomVo.light = null;
roomVo.door = {level:1};
roomVo.carpet = {level:1};
roomVo.tree = {level:1};
} else {
roomVo = _arg1;
};
bathStatus = new Array(Data.Bath_Num);
var _local2:int;
while (_local2 < Data.Bath_Num) {
if (((GameUtil.checkInArr(Data.Bath_Init, (_local2 + 1))) || (GameUtil.checkInArr(roomVo.pool.ices, (_local2 + 1))))){
bathStatus[_local2] = 0;
} else {
bathStatus[_local2] = 1;
};
_local2++;
};
depthArr = new Array();
}
public function isCustomEmpty():Boolean{
return ((customArr.length) ? false : true);
}
public function checkBathAvail(_arg1:int):Boolean{
var _local2:Boolean;
if (bathStatus[(_arg1 - 1)]){
_local2 = false;
};
return (_local2);
}
public function get pool():Object{
return (roomVo.pool);
}
public function get light():Object{
return (roomVo.light);
}
public function addWaiter(_arg1:DisplayObjectContainer):void{
var _local3:Waiter;
var _local4:Boolean;
var _local5:Number;
waiterArr = new Array();
var _local2:int;
while (_local2 < roomVo.waiterNum) {
_local3 = new Waiter(("Waiter" + (_local2 + 1)));
_local4 = false;
_local5 = 6;
if (roomVo.road.level == 2){
_local5 = 8;
} else {
if (roomVo.road.level == 3){
_local5 = 10;
_local4 = true;
};
};
_local3.setData({id:(_local2 + 1), speed:_local5, skate:_local4, room:this, depthArr:depthArr});
_local3.addToStage(_arg1, 0, 0);
_local3.setTilePos(Data.WaiterInitPos[_local2][0], Data.WaiterInitPos[_local2][1]);
waiterArr.push(_local3);
_local2++;
};
}
public function checkWaiterTogether(_arg1:int, _arg2:int, _arg3:int):void{
var _local4:int;
while (_local4 < waiterArr.length) {
if ((_local4 + 1) != _arg1){
if ((((waiterArr[_local4].myCol == _arg2)) && ((waiterArr[_local4].myRow == _arg3)))){
waiterArr[_local4].returnToStartPos();
};
};
_local4++;
};
}
public function get tree():Object{
return (roomVo.tree);
}
protected function initRole(_arg1:int):void{
custom_types = LevelControl.getData(_arg1, "Customer");
customArr = new Array();
leftArr = new Array();
}
public function get road():Object{
return (roomVo.road);
}
public function checkTakeDish(_arg1:int):Boolean{
var _local5:int;
var _local2:Boolean;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < waiterArr.length) {
if (waiterArr[_local4].checkCanServe(0)){
_local5 = waiterArr[_local4].findRoad(Data.Dish_Pos[(_arg1 - 1)][4], Data.Dish_Pos[(_arg1 - 1)][5]).length;
_local3.push({waiter:waiterArr[_local4], length:_local5});
};
_local4++;
};
if (_local3.length){
_local3.sortOn("length", Array.NUMERIC);
_local3[0].waiter.takeDish(_arg1);
_local2 = true;
};
if (!_local2){
};
return (_local2);
}
public function get carpet():Object{
return (roomVo.carpet);
}
public function checkWalk(_arg1:int, _arg2:int, _arg3:int):Boolean{
var _local4:Boolean;
var _local5:int;
while (_local5 < waiterArr.length) {
if ((_local5 + 1) != _arg1){
if (((((!(waiterArr[_local5].waitOther)) && (((waiterArr[_local5].myXspeed) || (waiterArr[_local5].myYspeed))))) && ((waiterArr[_local5].phase == Waiter.PHASE_WALK)))){
if ((((waiterArr[_local5].myCol == _arg2)) && ((waiterArr[_local5].myRow == _arg3)))){
_local4 = true;
break;
};
};
};
_local5++;
};
return (_local4);
}
public function checkEnterRoom():Boolean{
var _local1:Boolean;
var _local2:int;
while (_local2 < leftArr.length) {
if (leftArr[_local2].isWalking()){
_local1 = true;
break;
};
_local2++;
};
return (_local1);
}
public function get door():Object{
return (roomVo.door);
}
public function randomCreateCustom(_arg1:DisplayObjectContainer):void{
var _local2:int;
if (leftArr.length >= Data.Wait_Pos.length){
delayCustoms++;
} else {
_local2 = randomCustomId();
createCustom(_local2, _arg1);
};
}
public function putCustomInBath(_arg1:Customer, _arg2:int):void{
var _local4:Customer;
GameUtil.removeObjInArr(leftArr, _arg1);
var _local3:int;
while (_local3 < leftArr.length) {
_local4 = leftArr[_local3];
if (_local4.phase == Customer.PHASE_COME){
_local4.walkIn(Data.Wait_Pos[_local3][0], Data.Wait_Pos[_local3][1]);
} else {
if (_local4.phase == Customer.PHASE_DOOR){
if (_local4.draging){
_local4.myX = Data.Wait_Pos[_local3][0];
_local4.myY = Data.Wait_Pos[_local3][1];
} else {
_local4.setPos(Data.Wait_Pos[_local3][0], Data.Wait_Pos[_local3][1]);
};
};
};
_local3++;
};
if (delayCustoms){
(SceneMgr.scene as GameScene).checkDelayCustom();
delayCustoms = 0;
};
if (_arg2){
bathStatus[(_arg2 - 1)] = _arg1;
if (GameUtil.checkInArr(roomVo.pool.flowers, int(((_arg2 + 1) / 2)))){
_arg1.BathMultiple = 1.7;
};
};
}
public function removeCustomFromBath(_arg1:Customer, _arg2:int):void{
bathStatus[(_arg2 - 1)] = 0;
}
public function freezeCustomMode(_arg1:int):void{
var _local2:int;
while (_local2 < customArr.length) {
if (customArr[_local2].curNeed == _arg1){
customArr[_local2].freezeMode(1);
};
_local2++;
};
}
public function checkServeCustom(_arg1:Customer, _arg2:int):void{
var _local5:int;
var _local3:Array = new Array();
var _local4:int;
while (_local4 < waiterArr.length) {
if (waiterArr[_local4].checkCanServe(_arg2)){
if (_arg1){
_local5 = waiterArr[_local4].findRoad(Data.Bath_Pos[(_arg1.bathId - 1)][4], Data.Bath_Pos[(_arg1.bathId - 1)][5]).length;
_local3.push({waiter:waiterArr[_local4], length:_local5});
};
};
_local4++;
};
if (_local3.length){
_local3.sortOn("length", Array.NUMERIC);
_local3[0].waiter.doServe(_arg1);
};
}
}
}//package src.model
Section 78
//AStarObj (src.sys.obj.AStarObj)
package src.sys.obj {
import src.sys.scene.*;
import lj.src.util.*;
import src.data.*;
import src.model.*;
public class AStarObj extends MovingObj {
protected var myLine:int;
public var myRow:int;
protected var tileArr:Array;
protected var myNode:int;
protected var routeArr:Array;
protected var _rMap:Map;
protected var _tileSize:int;
public var myCol:int;
public function AStarObj(_arg1:String){
super(_arg1);
if ((SceneMgr.scene is GameScene)){
_rMap = (SceneMgr.scene as GameScene).map;
};
}
override public function updateEvents():void{
super.updateEvents();
}
public function setTilePos(_arg1:int, _arg2:int):void{
myCol = _arg1;
myRow = _arg2;
myX = Data.MapPtArr[_arg1][_arg2][0];
myY = Data.MapPtArr[_arg1][_arg2][1];
convertXYAction();
}
protected function posRouteMove():void{
var _local1:Number;
if (((routeArr) && (routeArr.length))){
if (((!(myXspeed)) && (!(myYspeed)))){
_local1 = Math.atan2((routeArr[0].y - myY), (routeArr[0].x - myX));
myXspeed = (Math.cos(_local1) * mySpeed);
myYspeed = (Math.sin(_local1) * mySpeed);
} else {
myX = (myX + myXspeed);
myY = (myY + myYspeed);
if ((((((myX + myXspeed) * GameUtil.getDir(myXspeed)) >= (routeArr[0].x * GameUtil.getDir(myXspeed)))) && ((((myY + myYspeed) * GameUtil.getDir(myYspeed)) >= (routeArr[0].y * GameUtil.getDir(myYspeed)))))){
myX = routeArr[0].x;
myY = routeArr[0].y;
myCol = routeArr[0].col;
myRow = routeArr[0].row;
routeArr.shift();
myXspeed = (myYspeed = 0);
if (!routeArr.length){
arrival();
};
};
};
};
}
public function moveToPos(_arg1:Number, _arg2:Number):void{
routeArr = new Array();
routeArr.push({x:_arg1, y:_arg2});
var _local3:Number = Math.atan2((_arg2 - myY), (_arg1 - myX));
myXspeed = (Math.cos(_local3) * mySpeed);
myYspeed = (Math.sin(_local3) * mySpeed);
}
public function findRoad(_arg1:int, _arg2:int):Array{
var _local3:Array = _rMap.road.seekRoad(myCol, myRow, _arg1, _arg2);
return (_local3);
}
override protected function moveAction():void{
posRouteMove();
}
override public function setData(_arg1:Object):void{
_tileSize = Data.tileSize;
super.setData(_arg1);
}
protected function arrival():void{
myXspeed = 0;
myYspeed = 0;
if (((tileArr) && (tileArr.length))){
myCol = tileArr[(tileArr.length - 1)].x;
myRow = tileArr[(tileArr.length - 1)].y;
};
}
public function moveToTile(_arg1:int, _arg2:int):Array{
var _local3:int;
var _local4:int;
var _local5:int;
tileArr = _rMap.road.seekRoad(myCol, myRow, _arg1, _arg2);
if (((tileArr) && (tileArr.length))){
routeArr = new Array();
_local3 = 1;
while (_local3 < tileArr.length) {
_local4 = tileArr[_local3].x;
_local5 = tileArr[_local3].y;
routeArr.push({x:Data.MapPtArr[_local4][_local5][0], y:Data.MapPtArr[_local4][_local5][1], col:_local4, row:_local5});
_local3++;
};
};
return (tileArr);
}
protected function tileRouteMove():void{
if (((routeArr) && ((routeArr.length > 1)))){
myXspeed = ((routeArr[1].y - routeArr[0].y) * mySpeed);
myYspeed = ((routeArr[1].x - routeArr[0].x) * mySpeed);
if (((myXspeed) && (myYspeed))){
myXspeed = (myXspeed * 0.7);
myYspeed = (myYspeed * 0.7);
};
myX = (myX + myXspeed);
myY = (myY + myYspeed);
trace("speed: ", myXspeed, myYspeed);
if ((((Math.abs((myX - ((routeArr[1].y + 0.5) * _tileSize))) <= Math.abs(myXspeed))) && ((Math.abs((myY - ((routeArr[1].x + 0.5) * _tileSize))) <= Math.abs(myYspeed))))){
myX = ((routeArr[1].y + 0.5) * _tileSize);
myY = ((routeArr[1].x + 0.5) * _tileSize);
routeArr.shift();
myCol = routeArr[0].x;
myRow = routeArr[0].y;
trace("Shift!!");
if (routeArr.length == 1){
arrival();
};
};
};
}
}
}//package src.sys.obj
Section 79
//MovingObj (src.sys.obj.MovingObj)
package src.sys.obj {
import flash.display.*;
import flash.geom.*;
import lj.src.interfaces.*;
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
public class MovingObj extends ViewMC implements IUpdate {
protected var left:int;// = 0
public var myXspeed:Number;// = 0
protected var right:int;
protected var bottom:int;
public var myY:Number;// = 0
protected var curDir:int;// = 1
protected var myPause:int;
public var myX:Number;// = 0
public var myYspeed:Number;// = 0
protected var top:int;// = 0
protected var myPushXspeed:Number;// = 0
protected var floatCycle:int;// = 10
protected var myPushYspeed:Number;// = 0
protected var mySpeed:Number;// = 3
protected var animCount:int;
public function MovingObj(_arg1:String){
right = Data.stageWidth;
bottom = Data.stageHeight;
super(_arg1);
init();
}
protected function scaleMe(_arg1:Number):void{
_mc.scaleX = _arg1;
}
override public function remove():void{
super.remove();
if (!GameUtil.checkInArr(Global.removeArr, this)){
Global.removeArr.push(this);
} else {
trace("Warning!!!! removeArr中已经存在我 ", mcName);
};
}
protected function setValidBounds(_arg1:Rectangle):void{
if (_arg1){
left = _arg1.left;
right = _arg1.right;
top = _arg1.top;
bottom = _arg1.bottom;
};
}
protected function init():void{
Global.updateArr.push(this);
}
public function hitMe(_arg1:MovingObj):void{
}
protected function checkHitByPoint(_arg1:MovingObj):Boolean{
var _local3:Point;
var _local4:Rectangle;
var _local2:Boolean;
if (_arg1){
_local3 = _arg1.mc.globalToLocal(new Point(myX, myY));
_local4 = _arg1.getBounds(_arg1.mc);
_local2 = _local4.containsPoint(_local3);
};
return (_local2);
}
public function initSpeed():void{
myXspeed = (myYspeed = (myPushXspeed = (myPushYspeed = 0)));
}
override public function setPos(_arg1:Number, _arg2:Number):void{
myX = _arg1;
myY = _arg2;
convertXYAction();
}
public function set pushXspeed(_arg1:Number):void{
myPushXspeed = _arg1;
}
public function set ySpeed(_arg1:Number):void{
myYspeed = _arg1;
}
protected function checkHitByRect(_arg1:MovingObj):Boolean{
var _local2:Boolean;
if (_arg1){
_local2 = getBounds(_arg1.mc).intersects(_arg1.getBounds(_arg1.mc));
};
return (_local2);
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
}
public function get xSpeed():Number{
return (myXspeed);
}
protected function lightWhite(_arg1:int):void{
if ((_arg1 % 4) == 0){
_mc.transform.colorTransform = GameUtil.nonTrans;
} else {
_mc.transform.colorTransform = GameUtil.whiteTrans;
};
}
public function setY(_arg1:Number):void{
myY = _arg1;
}
public function setX(_arg1:Number):void{
myX = _arg1;
}
public function updateEvents():void{
updateStill();
if (myPause){
return;
};
moveAction();
convertXYAction();
}
protected function convertXYAction():void{
if (_mc){
x = Math.round(myX);
y = Math.round(myY);
};
}
public function checkDist(_arg1:Number, _arg2:Number, _arg3:Number):Boolean{
var _local4:Boolean;
if ((((x - _arg1) * (x - _arg1)) + ((y - _arg2) * (y - _arg2))) > (((width / 2) - _arg3) * ((width / 2) - _arg3))){
_local4 = true;
};
return (_local4);
}
public function set pushYspeed(_arg1:Number):void{
myPushYspeed = _arg1;
}
public function get ySpeed():Number{
return (myYspeed);
}
public function set xSpeed(_arg1:Number):void{
myXspeed = _arg1;
}
protected function updateStill():void{
if (myPause){
myPause--;
};
}
override public function addToStage(_arg1:DisplayObjectContainer, _arg2:Number=0, _arg3:Number=0):void{
super.addToStage(_arg1, _arg2, _arg3);
}
protected function float():void{
animCount++;
var _local1:Number = Math.sin((animCount / floatCycle));
myPushYspeed = _local1;
}
protected function checkDir():void{
if ((((myXspeed > 0)) || ((myPushXspeed > 0)))){
curDir = 1;
} else {
if ((((myXspeed < 0)) || ((myPushXspeed < 0)))){
curDir = -1;
};
};
scaleMe(curDir);
}
protected function moveAction():void{
myX = (myX + (myXspeed + myPushXspeed));
myY = (myY + (myYspeed + myPushYspeed));
}
public function replay():void{
if ((_mc.getChildAt(0) as MovieClip)){
(_mc.getChildAt(0) as MovieClip).play();
};
}
public function pause():void{
if ((_mc.getChildAt(0) as MovieClip)){
(_mc.getChildAt(0) as MovieClip).stop();
};
}
}
}//package src.sys.obj
Section 80
//RoleV (src.sys.obj.RoleV)
package src.sys.obj {
import flash.display.*;
import lj.src.util.*;
import src.data.*;
public class RoleV extends AStarObj {
protected var myCurrentFrame:int;
protected var myCurrentLabel:String;
protected var bStopFrame:Boolean;
protected var myActionFinished:Boolean;// = true
protected var innerLayer:int;// = 0
protected var frameEvent:Array;
protected var myFrameInfo:Object;
public function RoleV(_arg1:String){
super(_arg1);
}
protected function commonAction():void{
}
override public function updateEvents():void{
super.updateEvents();
checkDir();
updateFrameEvent();
}
public function animOver():void{
if (myCurrentLabel.search("get") != -1){
};
myActionFinished = true;
commonAction();
}
protected function gotoFrame(_arg1:String):void{
_mc.gotoAndStop(_arg1);
}
public function get innerMc():MovieClip{
return ((_mc.getChildAt(innerLayer) as MovieClip));
}
override protected function init():void{
super.init();
}
protected function updateFrameEvent():void{
var _local1:String;
var _local2:int;
var _local3:int;
if (((frameEvent) && (frameEvent.length))){
for (_local1 in frameEvent[0]) {
if ((frameEvent[0][_local1] is int)){
if (myCurrentFrame == Number(frameEvent[0][_local1])){
this[frameEvent[1][_local1]].apply(this, frameEvent[2][_local1]);
continue;
};
} else {
if ((frameEvent[0][_local1] is Array)){
_local2 = int(frameEvent[0][_local1][0]);
_local3 = int(frameEvent[0][_local1][1]);
if ((((myCurrentFrame >= _local2)) && ((myCurrentFrame <= _local3)))){
this[frameEvent[1][_local1]].apply(this, frameEvent[2][_local1]);
continue;
};
};
};
};
if (!bStopFrame){
myCurrentFrame++;
};
};
}
override public function setMc(_arg1:String):void{
super.setMc(_arg1);
setFrameInfo(_arg1);
}
public function win():void{
}
public function changeFrame(_arg1:String):void{
if (myCurrentLabel != _arg1){
myCurrentFrame = 1;
myCurrentLabel = _arg1;
gotoFrame(_arg1);
if (myFrameInfo){
frameEvent = myFrameInfo[_arg1];
if (((frameEvent) && (frameEvent.length))){
myActionFinished = false;
};
};
};
}
public function fail():void{
}
protected function innerMcJump(_arg1:int, _arg2:Boolean):void{
var _local3:MovieClip;
if (_mc){
_local3 = innerMc;
if (_local3){
if (_arg2){
_local3.gotoAndStop(_arg1);
} else {
_local3.gotoAndPlay((_arg1 + 1));
};
};
};
if (_arg2){
bStopFrame = true;
} else {
bStopFrame = false;
};
myCurrentFrame = _arg1;
}
override public function replay():void{
super.replay();
innerMcJump(myCurrentFrame, false);
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
}
protected function setFrameInfo(_arg1:String):void{
myFrameInfo = Data[(GameUtil.StrDiscardNum(_arg1).toLowerCase() + "_frame")];
}
override public function pause():void{
super.pause();
innerMcJump(myCurrentFrame, true);
}
}
}//package src.sys.obj
Section 81
//ViewMC (src.sys.obj.ViewMC)
package src.sys.obj {
import flash.display.*;
import lj.src.util.*;
public dynamic class ViewMC extends Sprite {
protected var _mcName:String;
public var depthLevel:int;
protected var _mc:MovieClip;
protected var _depthArr:Array;
public function ViewMC(_arg1:String){
if (_arg1){
setMc(_arg1);
};
}
public function remove():void{
if (parent){
parent.removeChild(this);
} else {
trace("Warning: parent已删除!!!!");
};
if (_depthArr){
GameUtil.removeObjInArr(_depthArr, this);
};
}
public function get mcName():String{
return (_mcName);
}
public function addToStage(_arg1:DisplayObjectContainer, _arg2:Number=0, _arg3:Number=0):void{
if (_arg1){
_arg1.addChild(this);
};
setPos(_arg2, _arg3);
}
public function setData(_arg1:Object):void{
if (_arg1.depthArr){
_depthArr = _arg1.depthArr;
_depthArr.push(this);
};
}
public function setPos(_arg1:Number, _arg2:Number):void{
x = _arg1;
y = _arg2;
}
public function get mc():MovieClip{
return (_mc);
}
public function setMc(_arg1:String):void{
_mcName = _arg1;
var _local2:Class = (GameUtil.getClass("assets", _arg1) as Class);
_mc = new (_local2);
addChild(_mc);
}
public function removeCurMc():void{
if (_mc){
if (_mc.parent){
_mc.parent.removeChild(_mc);
};
_mc = null;
};
}
}
}//package src.sys.obj
Section 82
//GameScene (src.sys.scene.GameScene)
package src.sys.scene {
import src.sys.*;
import src.ui.*;
import flash.display.*;
import src.vo.*;
import src.view.*;
import src.sys.obj.*;
import flash.utils.*;
import lj.src.util.*;
import src.data.*;
import src.ui.pop.*;
import lj.src.sys.*;
import src.model.*;
public class GameScene extends SuperScene {
public var level:int;
protected var custom_freq:int;
public var gameEnd:int;// = 0
protected var addTime:int;
protected var myControl:MyControl;
protected var goal:int;
protected var roomInfo:RoomInfo;
protected var curTime:int;
protected var totalTime:int;
protected var curScore:int;
public var fg:LevelFG;
protected var bg:LevelBG;
protected var bNight:int;// = 0
public var map:Map;
public var closed:Boolean;// = false
protected function drawDebugLine(_arg1:Graphics):void{
_arg1.lineStyle(1, 0xCCCCCC);
var _local2:int = (Data.stageHeight / Data.tileSize);
var _local3:int = (Data.stageWidth / Data.tileSize);
var _local4:int;
while (_local4 < _local2) {
_arg1.moveTo(0, (Data.tileSize * (_local4 + 1)));
_arg1.lineTo(Data.stageWidth, (Data.tileSize * (_local4 + 1)));
_local4++;
};
var _local5:int;
while (_local5 < _local3) {
_arg1.moveTo((Data.tileSize * (_local5 + 1)), 0);
_arg1.lineTo((Data.tileSize * (_local5 + 1)), Data.stageHeight);
_local5++;
};
}
override public function remove():void{
super.remove();
myControl.remove();
SoundObject.stopMusic();
SoundObject.stopSound();
}
public function start1():void{
}
public function start2():void{
Global.pause = false;
GameMain.getInstance().actionPause(false);
myControl = new MyControl();
myControl.init(this);
}
public function click(_arg1:Number, _arg2:Number):void{
}
public function checkCustom():void{
if (!gameEnd){
if (((closed) && (roomInfo.isCustomEmpty()))){
checkScore();
};
};
}
public function doAddTime():void{
curTime = (curTime + (addTime * Global.stage.frameRate));
curTime = Math.max(0, curTime);
curTime = Math.min(curTime, (totalTime * Global.stage.frameRate));
}
override public function handlePause(_arg1:Boolean):void{
super.handlePause(_arg1);
ui_hud.setBtnEnable(!(_arg1));
}
protected function updateTime():void{
if (!closed){
curTime--;
setTime();
if (curTime == int((totalTime / 4))){
if (bNight){
bg.inNight();
SoundObject.playSound(Data.SFX_LIGHT_UP);
GameMain.getInstance().playMusic(Data.SFX_NIGHT);
} else {
closed = true;
};
};
if ((((curTime > 0)) && ((curTime <= int((totalTime / 8)))))){
if (bNight == 1){
closed = true;
};
} else {
if (curTime <= 0){
if (bNight == 2){
closed = true;
};
};
};
if (closed){
if (!roomInfo.checkEnterRoom()){
this.closeDoor();
};
} else {
if (((totalTime - curTime) % custom_freq) == 0){
roomInfo.randomCreateCustom(mapCtn);
};
};
};
}
public function checkDelayCustom():void{
if (!closed){
roomInfo.randomCreateCustom(mapCtn);
trace("Add Delay Custom!!!!!!!!");
};
}
public function checkPutCustom(_arg1:Number, _arg2:Number):int{
var _local3:int;
var _local4:int;
while (_local4 < 3) {
_local3 = map.checkHit(_arg1, (_arg2 - (30 * _local4)));
if (!roomInfo.checkBathAvail(_local3)){
_local3 = 0;
};
if (_local3){
break;
};
_local4++;
};
return (_local3);
}
public function depthManagerByArr(_arg1:DisplayObjectContainer, _arg2:Object, _arg3:Array):void{
var _local4:int;
if (_arg3){
_arg3.sortOn(_arg2, Array.NUMERIC);
_local4 = 0;
while (_local4 < _arg3.length) {
if (_arg3[_local4]){
_arg1.setChildIndex(_arg3[_local4], _local4);
} else {
trace("Warning!!!!!! 深度数组的MC不存在!!!!!");
};
_local4++;
};
};
}
public function clickDish(_arg1:int):void{
if (fg.getDishFlag(_arg1)){
if (roomInfo.checkTakeDish(_arg1)){
takeDishFlag(_arg1, -1);
};
};
}
protected function initGoal():void{
Global.pause = true;
GameMain.getInstance().actionPause(true);
var _local1:UI_Goal = new UI_Goal();
GameUtil.addChild(_local1, uiCtn, (Data.stageWidth / 2), (-(_local1.height) / 2));
_local1.setStart(goal, start2);
SoundObject.playSound(Data.SFX_GOAL);
}
public function closeDoor():void{
fg.setDoorClosed(true);
}
protected function initHUD():void{
ui_hud = new UI_HUD();
GameUtil.addChild(ui_hud, midCtn, 0, 0);
ui_hud.setLevel(level);
ui_hud.setGoal(goal);
}
public function leftDish(_arg1:int):void{
fg.leftDish(_arg1);
}
override public function update():void{
super.update();
updateTime();
GameUtil.depthManager(upperCtn, "y");
}
public function takeDishFlag(_arg1:int, _arg2:int):void{
fg.setDishFlag(_arg1, _arg2);
}
protected function setTime():void{
if (ui_hud){
ui_hud.setTime((totalTime - curTime), totalTime);
};
}
protected function initLevel():void{
map = new Map(Data.MapRoadData);
roomInfo.addWaiter(upperCtn);
}
protected function initBG():void{
bg = new LevelBG("Level_BG");
bg.addToStage(mapCtn, 0, 0);
bg.setData(roomInfo);
}
public function addDish(_arg1:int):void{
fg.addPlate(_arg1);
}
public function gameOver(_arg1:int):void{
endLevel();
if (_arg1 > 0){
remove();
if (level >= Data.Max_level){
GameMain.getInstance().changeCover("UI_Congratulation", 0, 0);
SoundObject.playSound(Data.SFX_Pass);
} else {
GameMain.getInstance().changeCover("UI_Win", 0, 0);
SoundObject.playSound(Data.SFX_Win);
};
} else {
if (_arg1 < 0){
remove();
GameMain.getInstance().changeCover("UI_Lose", 0, 0);
SoundObject.playSound(Data.SFX_Fail);
};
};
var _local2:Boolean = ((_arg1 > 0)) ? true : false;
LevelControl.saveLevelEnd(LevelControl.curUser, _local2, level, curScore);
}
protected function endLevel():void{
ui_hud.setBtnEnable(false);
GameMain.getInstance().actionPause(true);
myControl.remove();
}
protected function checkScore():void{
if (curScore >= goal){
gameEnd = 1;
} else {
gameEnd = -1;
};
endLevel();
gameOver(gameEnd);
}
protected function setRoomChange(_arg1:RoomVO):void{
if (_arg1.light){
if (_arg1.light.level == 1){
bNight = 1;
} else {
if (_arg1.light.level == 2){
bNight = 2;
};
};
};
if (_arg1.door.level == 2){
custom_freq = (custom_freq - (2 * Global.stage.frameRate));
} else {
if (_arg1.door.level == 3){
custom_freq = (custom_freq - (4 * Global.stage.frameRate));
};
};
var _local2:Number = 0.1;
_local2 = (_local2 + (0.05 * (_arg1.tree.level - 1)));
_local2 = (_local2 + (0.05 * (_arg1.carpet.level - 1)));
Data.Custom_tip = _local2;
}
public function addScore(_arg1:Number):void{
curScore = (curScore + _arg1);
ui_hud.setScore(curScore);
ui_hud.addCash();
}
protected function initFront():void{
fg = new LevelFG("LevelBGup");
fg.addToStage(midCtn, 0, 0);
fg.setData(roomInfo);
}
override public function create(_arg1):void{
super.create(_arg1);
level = _arg1;
LevelControl.curLevel = level;
var _local2:RoomVO = (LevelControl.getPlayerInfo(LevelControl.curUser).room as RoomVO);
totalTime = (curTime = (LevelControl.getData(level, "Time") * Global.stage.frameRate));
goal = LevelControl.getData(level, "Goal");
custom_freq = (LevelControl.getData(level, "Freq") * Global.stage.frameRate);
roomInfo = new RoomInfo(level);
roomInfo.init(_local2);
setRoomChange(roomInfo.roomVo);
initBG();
initFront();
initHUD();
initLevel();
roomInfo.randomCreateCustom(mapCtn);
Global.pause = false;
setTimeout(initGoal, 200);
SoundObject.stopMusic();
GameMain.getInstance().playMusic(Data.SFX_GameBG1);
var _local3:ViewMC = new ViewMC("LogoMary");
uiCtn.addChild(_local3);
}
}
}//package src.sys.scene
Section 83
//SceneMgr (src.sys.scene.SceneMgr)
package src.sys.scene {
import flash.utils.*;
public class SceneMgr {
private var clsArr:Array;
private static var _scene:SuperScene;
public function SceneMgr(){
clsArr = [GameScene, ShopScene];
super();
}
public static function createScene(_arg1:String, ... _args):void{
var _local3:Class = (getDefinitionByName(("src.sys.scene::" + _arg1)) as Class);
_scene = new (_local3);
_scene.create.apply(_scene, _args);
}
public static function removeScene():void{
_scene.remove();
_scene = null;
}
public static function get scene():SuperScene{
return (_scene);
}
}
}//package src.sys.scene
Section 84
//ShopScene (src.sys.scene.ShopScene)
package src.sys.scene {
import flash.events.*;
import src.sys.*;
import flash.display.*;
import src.vo.*;
import src.view.*;
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
import src.model.*;
import lj.src.efx.*;
public class ShopScene extends SuperScene {
public const MANUAL_ITEMS:Array;
public var fg:LevelFG;
protected var workerArr:Array;
protected var level:int;
protected var bg:LevelBG;
public var shopUI:Shop;
protected var doorWorker:Worker;
public var roomInfo:RoomInfo;
protected var lightWorker:Worker;
protected var roadWorker:Worker;
public function ShopScene(){
MANUAL_ITEMS = ["door", "road", "light"];
super();
}
protected function initHUD():void{
}
override public function update():void{
super.update();
if (bg){
bg.updateFrame();
};
}
override public function remove():void{
super.remove();
SoundObject.stopMusic();
SoundObject.stopSound();
workerArr.splice(0);
Global.stage.removeEventListener(MouseEvent.CLICK, onClickScene);
}
protected function initBG():void{
bg = new LevelBG("Level_BG");
bg.addToStage(mapCtn, 0, 0);
bg.setData(roomInfo);
}
public function buyAction(_arg1:String, _arg2:int):void{
var _local3:int;
var _local4:CommonEffect;
if (_arg1 == "bath"){
roomInfo.roomVo.pool.ices.push(_arg2);
bg.playIceBreak(_arg2);
} else {
if (_arg1 == "flower"){
bg.playAddFlower(_arg2);
roomInfo.roomVo.pool.flowers.push(_arg2);
} else {
if (MANUAL_ITEMS.indexOf(_arg1) != -1){
_local3 = MANUAL_ITEMS.indexOf(_arg1);
workerArr[_local3].doingJob(_arg1);
if (roomInfo.roomVo[_arg1]){
roomInfo.roomVo[_arg1].level++;
} else {
roomInfo.roomVo[_arg1] = {level:1};
};
} else {
if (_arg1 == "role"){
_local4 = new CommonEffect();
_local4.setEffect("Smoke", gameCtn, workerArr[3].x, workerArr[3].y);
_local4.addCallBack(roleEfxEnd);
workerArr[3].visible = false;
roomInfo.roomVo.waiterNum++;
SoundObject.playSound(Data.SFX_SMOKE);
} else {
if (_arg1 == "table"){
roomInfo.roomVo[_arg1].level++;
fg.updateTable();
} else {
if (_arg1 == "pool"){
roomInfo.roomVo[_arg1].level++;
bg.playPoolUpdate();
} else {
if (_arg1 == "tree"){
roomInfo.roomVo[_arg1].level++;
fg.playTreeUpdate();
} else {
if (_arg1 == "carpet"){
roomInfo.roomVo[_arg1].level++;
bg.playDoorUpdate(_arg1);
};
};
};
};
};
};
};
};
}
public function workerDone(_arg1:String):void{
bg.setItemState(_arg1, roomInfo.roomVo[_arg1].level);
fg.setItemState(_arg1, roomInfo.roomVo[_arg1].level);
endJob();
switch (_arg1){
case "door":
if (roomInfo.door.level == 3){
workerArr[0].visible = false;
shopUI.setEnable("door", false);
};
break;
case "road":
if (roomInfo.road.level == 3){
workerArr[1].visible = false;
shopUI.setEnable("road", false);
};
break;
case "light":
if (roomInfo.light.level == 2){
workerArr[2].visible = false;
shopUI.setEnable("light", false);
};
break;
};
}
public function walkComplete():void{
shopUI.visible = true;
}
protected function onClickScene(_arg1:MouseEvent):void{
var _local3:int;
var _local4:Array;
if (!shopUI.visible){
return;
};
var _local2:String = _arg1.target.name;
if ((_arg1.target is Worker)){
shopUI.buySth(_local2);
} else {
if (bg.contains((_arg1.target as DisplayObject))){
if (_local2.search("i_") != -1){
_local3 = int(_local2.replace("i_", ""));
shopUI.buySth(("bath_" + _local3));
} else {
if (_local2 == "carpet"){
shopUI.buySth(_local2);
};
};
} else {
if (fg.contains((_arg1.target as DisplayObject))){
_local4 = ["table", "tree"];
if (_local4.indexOf(_local2) != -1){
shopUI.buySth(_local2);
};
};
};
};
trace("Click: ", _arg1.target.name);
}
protected function initWorker():void{
var _local1:Worker;
var _local3:String;
var _local4:String;
var _local5:Worker;
workerArr = new Array();
var _local2:int;
while (_local2 < 4) {
_local3 = ("Worker_" + (_local2 + 1));
_local4 = "";
if ((_local2 + 1) == 1){
_local4 = "door";
if (roomInfo.door.level == 3){
_local3 = "";
shopUI.setEnable("door", false);
};
} else {
if ((_local2 + 1) == 2){
_local4 = "road";
if (roomInfo.road.level == 3){
_local3 = "";
shopUI.setEnable("road", false);
};
} else {
if ((_local2 + 1) == 3){
_local4 = "light";
if (((roomInfo.light) && ((roomInfo.light.level == 2)))){
_local3 = "";
shopUI.setEnable("light", false);
};
} else {
if ((_local2 + 1) == 4){
_local4 = "role";
if (roomInfo.roomVo.waiterNum == 2){
_local3 = "Waiter3";
} else {
if (roomInfo.roomVo.waiterNum == 3){
_local3 = "Waiter4";
} else {
if (roomInfo.roomVo.waiterNum == 4){
_local3 = "";
shopUI.setEnable("role", false);
};
};
};
};
};
};
};
if (_local3 != ""){
_local5 = new Worker(_local3);
_local5.addToStage(midCtn, Data.stageWidth, Data.Worker_Pos[_local2][1]);
_local5.moveToPos(Data.Worker_Pos[_local2][0], Data.Worker_Pos[_local2][1]);
workerArr.push(_local5);
_local5.name = _local4;
if (!_local1){
_local1 = _local5;
};
} else {
workerArr.push(0);
};
_local2++;
};
if (_local1){
_local1.setComplete();
} else {
walkComplete();
};
}
public function endJob():void{
shopUI.endAction();
}
protected function initFront():void{
fg = new LevelFG("LevelBGup");
fg.addToStage(midCtn, 0, 0);
fg.setData(roomInfo);
shopUI = new Shop("ShopArrows");
GameUtil.addChild(shopUI, upperCtn, 0, 0);
shopUI.setData({roomVo:roomInfo.roomVo});
shopUI.visible = false;
}
protected function roleEfxEnd():void{
var _local2:String;
var _local3:Worker;
var _local1:int = (roomInfo.roomVo.waiterNum - 1);
workerArr[3].visible = true;
workerArr[3].setTilePos(Data.WaiterInitPos[_local1][0], Data.WaiterInitPos[_local1][1]);
endJob();
if (roomInfo.roomVo.waiterNum == 3){
_local2 = "Waiter4";
workerArr[3].visible = true;
_local3 = new Worker(_local2);
_local3.name = "role";
_local3.addToStage(midCtn, Data.Worker_Pos[3][0], Data.Worker_Pos[3][1]);
_local3.stand();
workerArr[3] = _local3;
} else {
if (roomInfo.roomVo.waiterNum == 4){
shopUI.setEnable("role", false);
};
};
}
override public function create(_arg1):void{
super.create(_arg1);
roomInfo = new RoomInfo(0);
roomInfo.init((LevelControl.getPlayerInfo(LevelControl.curUser).room as RoomVO));
initBG();
initFront();
initWorker();
Global.pause = false;
GameMain.getInstance().playMusic(Data.SFX_Shop);
Global.stage.addEventListener(MouseEvent.CLICK, onClickScene);
}
}
}//package src.sys.scene
Section 85
//SuperScene (src.sys.scene.SuperScene)
package src.sys.scene {
import src.ui.*;
import flash.display.*;
import lj.src.util.*;
import lj.src.sys.*;
public class SuperScene {
protected var mapCtn:Sprite;
public var uiCtn:Sprite;
protected var gameCtn:Sprite;
public var ui_hud:UI_HUD;
protected var midCtn:Sprite;
protected var updateArr:Array;
protected var _upperCtn:Sprite;
protected var removeArr:Array;
public function SuperScene(){
initCtn();
initArr();
}
public function create(_arg1):void{
}
public function remove():void{
var _local1:int;
while (_local1 < removeArr.length) {
GameUtil.removeObjInArr(updateArr, removeArr[_local1]);
_local1++;
};
removeArr.splice(0);
var _local2:int;
while (_local2 < updateArr.length) {
updateArr[_local2].remove();
_local2++;
};
updateArr.splice(0);
removeArr.splice(0);
gameCtn.parent.removeChild(gameCtn);
if (ui_hud){
ui_hud.remove();
ui_hud = null;
};
}
protected function initCtn():void{
gameCtn = new Sprite();
Global.scene.addChildAt(gameCtn, 0);
mapCtn = new Sprite();
GameUtil.addChild(mapCtn, gameCtn, 0, 0);
midCtn = new Sprite();
GameUtil.addChild(midCtn, gameCtn, 0, 0);
_upperCtn = new Sprite();
GameUtil.addChild(_upperCtn, gameCtn, 0, 0);
uiCtn = new Sprite();
GameUtil.addChild(uiCtn, gameCtn, 0, 0);
}
public function handlePause(_arg1:Boolean):void{
var _local2:int;
Global.pause = _arg1;
if (_arg1){
_local2 = 0;
while (_local2 < updateArr.length) {
updateArr[_local2].pause();
_local2++;
};
} else {
_local2 = 0;
while (_local2 < updateArr.length) {
updateArr[_local2].replay();
_local2++;
};
};
}
public function update():void{
var _local1:int;
var _local2:int;
if (!Global.pause){
_local1 = updateArr.length;
while (_local1 > 0) {
updateArr[(_local1 - 1)].updateEvents();
_local1--;
};
_local2 = 0;
while (_local2 < removeArr.length) {
GameUtil.removeObjInArr(updateArr, removeArr[_local2]);
_local2++;
};
removeArr.splice(0);
};
}
protected function initArr():void{
updateArr = new Array();
Global.updateArr = updateArr;
removeArr = new Array();
Global.removeArr = removeArr;
}
public function get upperCtn():Sprite{
return (_upperCtn);
}
}
}//package src.sys.scene
Section 86
//GameMain (src.sys.GameMain)
package src.sys {
import flash.events.*;
import src.ui.*;
import src.sys.scene.*;
import flash.display.*;
import src.vo.*;
import flash.utils.*;
import lj.src.util.*;
import src.data.*;
import src.ui.pop.*;
import lj.src.sys.*;
import flash.net.*;
import src.ui.load.*;
public class GameMain {
private var scene:Sprite;
public var soundOn:Boolean;// = true
private var ui_pause:UI_Pause;
private var preClass:Array;
private var sp;
private var SWF:Class;
private static var _instance:GameMain;
public function GameMain(){
SWF = GameMain_SWF;
preClass = [UI_Title, UI_Congratulation, UI_Select, UI_Input, UI_Load, UI_Warn, UI_Sure, UI_Win, UI_Lose, UI_Help];
super();
_instance = this;
}
protected function onEF(_arg1:Event):void{
if (sp.getChildAt(0).content.flag == 3){
sp.removeEventListener(Event.ENTER_FRAME, onEF);
onSpComplete(null);
};
}
protected function onMyEnterFrame(_arg1:Event):void{
if (SceneMgr.scene){
if (!Global.pause){
SceneMgr.scene.update();
};
};
}
public function remove():void{
GameUtil.deleteMask(scene);
Global.stage.removeChild(scene);
scene = null;
Global.stage.removeEventListener(Event.ENTER_FRAME, onMyEnterFrame);
Global.control.remove();
}
protected function onInit(_arg1:Event):void{
sp.addEventListener(Event.ENTER_FRAME, onEF);
Loader(sp.getChildAt(0)).contentLoaderInfo.removeEventListener(Event.INIT, onInit);
}
public function init():void{
var _local1:GameControl = new GameControl();
Global.control = _local1;
registerClassAlias("src.vo.RoomVO", RoomVO);
SaveMgr.init(Data.SAVENAME);
Global.stage.addEventListener(Event.ENTER_FRAME, onMyEnterFrame);
scene = new Sprite();
Global.stage.addChild(scene);
Global.scene = scene;
Main.initOptions(Data.QUALITY, Data.SOUND, Data.MUSIC);
Main.initKeyShareObj(Data.defKeySet);
LevelControl.loadLevel();
GameUtil.createMask(scene, Data.stageWidth, Data.stageHeight);
initUI();
pushSounds();
}
public function playMusic(_arg1:String):void{
var _local2:Class;
if (!SoundObject.playMusic(_arg1, 0, true)){
_local2 = GameUtil.getClass("assets", _arg1);
SoundObject.pushSound(_arg1, _local2, false);
SoundObject.playMusic(_arg1);
};
}
public function initScene(_arg1:int):void{
var _local2:Loader;
if (_arg1 == 1){
sp = new SWF();
scene.addChild(sp);
Loader(sp.getChildAt(0)).contentLoaderInfo.addEventListener(Event.INIT, onInit);
_local2 = (sp.getChildAt(0) as Loader);
} else {
LevelControl.curLevel = _arg1;
SceneMgr.createScene("ShopScene", null);
};
}
public function actionPause(_arg1:Boolean):void{
Global.pause = _arg1;
SceneMgr.scene.handlePause(_arg1);
Global.stage.focus = null;
}
public function initUI():void{
changeCover("UI_Title", 0, 0);
}
public function setVolumn():void{
if (soundOn){
SoundObject.soundvolume(0);
SoundObject.musicvolume(0);
SoundObject.stopMusic();
} else {
SoundObject.soundvolume(1);
SoundObject.musicvolume(1);
SoundObject.resumeMusic();
};
soundOn = !(soundOn);
}
public function changeCover(_arg1:String, _arg2:Number=0, _arg3:Number=0):Cover{
var _local4:Class = (getDefinitionByName(("src.ui." + _arg1)) as Class);
var _local5:Cover = new (_local4);
_local5.x = _arg2;
_local5.y = _arg3;
scene.addChild(_local5);
scene.setChildIndex(_local5, (scene.numChildren - 1));
return (_local5);
}
public function removeScene():void{
SceneMgr.removeScene();
}
public function handlePause(_arg1:Boolean):void{
if (Global.canControl){
if (!_arg1){
ui_pause.remove();
ui_pause = null;
SoundObject.resumeMusic();
} else {
ui_pause = (changeCover("pop.UI_Pause", (Data.stageWidth / 2), (Data.stageHeight / 2)) as UI_Pause);
SoundObject.stopMusic();
};
actionPause(_arg1);
};
}
private function onSpComplete(_arg1:Event):void{
if (sp){
trace("My Complete!!!!");
SceneMgr.createScene("GameScene", 1);
scene.removeChild(sp);
sp = null;
};
}
protected function pushSounds():void{
var _local3:Class;
var _local1:Array = Data.AllSounds;
var _local2:int;
while (_local2 < _local1.length) {
_local3 = GameUtil.getClass("assets", _local1[_local2]);
SoundObject.pushSound(_local1[_local2], _local3, false);
_local2++;
};
}
public static function getInstance():GameMain{
return (_instance);
}
}
}//package src.sys
Section 87
//GameMain_SWF (src.sys.GameMain_SWF)
package src.sys {
import mx.core.*;
import flash.utils.*;
public class GameMain_SWF extends MovieClipLoaderAsset {
public var dataClass:Class;
private static var bytes:ByteArray = null;
public function GameMain_SWF(){
dataClass = GameMain_SWF_dataClass;
super();
initialWidth = (14000 / 20);
initialHeight = (10000 / 20);
}
override public function get movieClipData():ByteArray{
if (bytes == null){
bytes = ByteArray(new dataClass());
};
return (bytes);
}
}
}//package src.sys
Section 88
//GameMain_SWF_dataClass (src.sys.GameMain_SWF_dataClass)
package src.sys {
import mx.core.*;
public class GameMain_SWF_dataClass extends ByteArrayAsset {
}
}//package src.sys
Section 89
//LevelControl (src.sys.LevelControl)
package src.sys {
import src.vo.*;
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
public class LevelControl {
protected static var saveArr:Array;
public static var curLevel:int = 1;
private static var Str_OpenLevel:String = "openLevel";
public static var curUser:String;
public static function getData(_arg1:int, _arg2:String){
var _local3:* = null;
var _local4:int = Data.LevelInfo[0].indexOf(_arg2);
if (_local4 != -1){
_local3 = Data.LevelInfo[_arg1][_local4];
};
return (_local3);
}
public static function saveShopInfo(_arg1:String, _arg2:RoomVO, _arg3:int):void{
var _local5:int;
var _local4:Object = GameUtil.getObjInArr(saveArr, _arg1, "name");
if (_local4){
_local5 = saveArr.indexOf(_local4);
saveArr[_local5].score = (saveArr[_local5].score - _arg3);
saveArr[_local5].room = _arg2;
SaveMgr.saveData("saveArr", saveArr);
SaveMgr.flush();
};
}
public static function getPlayerInfo(_arg1:String):Object{
return (GameUtil.getObjInArr(saveArr, _arg1, "name"));
}
public static function saveLevelByName(_arg1:String, _arg2:int):void{
var _local4:int;
var _local3:Object = GameUtil.getObjInArr(saveArr, _arg1, "name");
if (_local3){
_local4 = saveArr.indexOf(_local3);
saveArr[_local4].level = _arg2;
SaveMgr.saveData("saveArr", saveArr);
};
}
public static function getSaveArr():Array{
return (saveArr);
}
public static function loadName(_arg1:String):void{
var _local2:Object = GameUtil.getObjInArr(saveArr, _arg1, "name");
curUser = _arg1;
}
public static function checkName(_arg1:String):Boolean{
var _local2:Boolean = GameUtil.checkInArr(saveArr, _arg1, "name");
return (_local2);
}
public static function saveLevelEnd(_arg1:String, _arg2:Boolean, _arg3:int, _arg4:int):void{
var _local5:Object;
var _local6:int;
if (_arg2){
_local5 = GameUtil.getObjInArr(saveArr, _arg1, "name");
if (_local5){
if (_arg3 >= _local5.level){
if (_arg3 < Data.Max_level){
_local5.level = (_arg3 + 1);
};
};
_local5.score = (_local5.score + _arg4);
_local6 = getPlayerIndex(_arg1);
saveArr[_local6] = _local5;
SaveMgr.saveData("saveArr", saveArr);
};
};
}
public static function saveName(_arg1:String, _arg2:int):void{
var _local3:int = (Data.IF_DEBUG) ? 10000 : 0;
var _local4:Object = {name:_arg1, level:_arg2, score:_local3};
saveArr.push(_local4);
SaveMgr.saveData("saveArr", saveArr);
curUser = _arg1;
}
public static function getPlayerIndex(_arg1:String):int{
var _local2:Object = GameUtil.getObjInArr(saveArr, _arg1, "name");
return (saveArr.indexOf(_local2));
}
public static function deleteName(_arg1:String):void{
GameUtil.removeObjInArr(saveArr, _arg1, "name");
SaveMgr.saveData("saveArr", saveArr);
}
public static function loadLevel():void{
var _local1:Array;
if (!SaveMgr.loadData("saveArr")){
_local1 = new Array();
SaveMgr.saveData("saveArr", _local1);
};
saveArr = SaveMgr.loadData("saveArr");
}
}
}//package src.sys
Section 90
//MyControl (src.sys.MyControl)
package src.sys {
import flash.events.*;
import src.sys.scene.*;
import lj.src.interfaces.*;
import src.view.*;
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
public class MyControl implements IMouseEvent, IKeyboardEvent {
protected var dragObj:Customer;
protected var _scene:GameScene;
public function handleKeyDown(_arg1:KeyboardEvent):void{
if (Data.IF_DEBUG){
if (_arg1.keyCode == GV.KeyXcode){
(SceneMgr.scene as GameScene).gameOver(1);
} else {
if (_arg1.keyCode == GV.KeyCcode){
(SceneMgr.scene as GameScene).gameOver(-1);
};
};
};
}
public function remove():void{
_scene = null;
Global.control.removeMouseListener(this);
if (Data.IF_DEBUG){
Global.control.removeKeyBoardListener(this);
};
}
public function handleMouseEvent(_arg1:MouseEvent):void{
var _local2:int;
if (_arg1.type == MouseEvent.CLICK){
_scene.click(_arg1.stageX, _arg1.stageY);
if ((_arg1.target is Customer)){
_arg1.target.clickMe();
} else {
checkClickDish(_arg1);
};
} else {
if (_arg1.type == MouseEvent.MOUSE_OVER){
} else {
if (_arg1.type == MouseEvent.MOUSE_UP){
if (dragObj){
dragObj.stopDragAction();
_local2 = _scene.checkPutCustom(_arg1.stageX, _arg1.stageY);
if (_local2){
dragObj.putInBath(_local2);
};
dragObj = null;
};
} else {
if (_arg1.type == MouseEvent.MOUSE_DOWN){
if ((_arg1.target is Customer)){
if (_arg1.target.dragAction()){
dragObj = (_arg1.target as Customer);
dragObj.x = _arg1.stageX;
dragObj.y = _arg1.stageY;
};
};
} else {
if (_arg1.type == MouseEvent.MOUSE_OUT){
} else {
if (_arg1.type == MouseEvent.MOUSE_MOVE){
if (dragObj){
dragObj.x = _arg1.stageX;
dragObj.y = _arg1.stageY;
_local2 = _scene.checkPutCustom(_arg1.stageX, _arg1.stageY);
if (_local2){
GameUtil.applyGlowFilter(dragObj);
} else {
GameUtil.removeFilter(dragObj);
};
dragObj.parent.setChildIndex(dragObj, (dragObj.parent.numChildren - 1));
};
};
};
};
};
};
};
}
public function init(_arg1:GameScene):void{
_scene = _arg1;
Global.control.addMouseListener(this);
if (Data.IF_DEBUG){
Global.control.addKeyboardListener(this);
};
}
public function handleKeyUp(_arg1:KeyboardEvent):void{
}
protected function checkClickDish(_arg1:MouseEvent):void{
var _local2:int;
if (_arg1.target.name){
if (_arg1.target.name.search("type") != -1){
_local2 = int(_arg1.target.name.replace("type", ""));
_scene.clickDish(_local2);
};
};
}
}
}//package src.sys
Section 91
//UI_Input (src.ui.load.UI_Input)
package src.ui.load {
import flash.events.*;
import src.sys.*;
import src.data.*;
import src.ui.pop.*;
import lj.src.sys.*;
import flash.ui.*;
public class UI_Input extends UI_Pop {
override protected function init():void{
super.init();
mc_content.txt_name.text = "";
mc_content.txt_name.addEventListener(Event.CHANGE, onTextChange);
Global.stage.focus = mc_content.txt_name;
Global.stage.addEventListener(KeyboardEvent.KEY_DOWN, onMyKeyDown);
}
override public function remove():void{
super.remove();
mc_content.txt_name.removeEventListener(Event.CHANGE, onTextChange);
Global.stage.removeEventListener(KeyboardEvent.KEY_DOWN, onMyKeyDown);
}
protected function warn_callback(_arg1:Boolean):void{
var _local2:String;
if (_arg1){
remove();
_local2 = mc_content.txt_name.text;
LevelControl.deleteName(_local2);
saveNameSlot(_local2);
_func.call(this, true);
} else {
Global.stage.focus = mc_content.txt_name;
setBtnEnable(true);
};
}
protected function onMyKeyDown(_arg1:KeyboardEvent):void{
if (_arg1.keyCode == Keyboard.ENTER){
btn_ok_Func();
};
}
protected function checkName(_arg1:String):Boolean{
var _local2:Boolean = LevelControl.checkName(_arg1);
return (_local2);
}
public function btn_ok_Func():void{
var _local2:UI_Warn;
var _local1:String = mc_content.txt_name.text;
if (_local1 != ""){
if (!checkName(_local1)){
saveNameSlot(_local1);
remove();
_func.call(this, true);
} else {
setBtnEnable(false);
_local2 = (GameMain.getInstance().changeCover("load.UI_Warn", (Data.stageWidth / 2), (Data.stageHeight / 2)) as UI_Warn);
_local2.setCallback(warn_callback);
};
};
}
protected function onTextChange(_arg1:Event):void{
var _local2:String;
if (_arg1.target.text.length > 15){
_local2 = _arg1.target.text.substr(0, (_arg1.target.text.length - 1));
_arg1.target.text = _local2;
};
}
protected function saveNameSlot(_arg1:String):void{
LevelControl.saveName(_arg1, 1);
}
public function btn_close_Func():void{
remove();
_func.call(this, false);
}
}
}//package src.ui.load
Section 92
//UI_Load (src.ui.load.UI_Load)
package src.ui.load {
import flash.events.*;
import src.sys.*;
import src.ui.*;
public class UI_Load extends Cover {
protected var saveArr:Array;
protected var curPage:int;// = 1
protected var OnePageNum:int;// = 5
override public function btn_back_Func():void{
remove();
GameMain.getInstance().changeCover("UI_Title", 0, 0);
}
protected function onClickMe(_arg1:MouseEvent):void{
var _local3:String;
trace("click: ", _arg1.target.name, _arg1.target.parent.name);
var _local2:String = _arg1.target.parent.name;
if (_arg1.target.name == "btn_delete"){
_local3 = _arg1.target.parent.textMc.txt_name.text;
LevelControl.deleteName(_local3);
refreshPage();
} else {
if (_arg1.target.name == "textMc"){
_local3 = _arg1.target.parent.textMc.txt_name.text;
if (_local3){
enterGame(_local3);
};
};
};
}
protected function enterGame(_arg1:String):void{
LevelControl.loadName(_arg1);
remove();
GameMain.getInstance().changeCover("UI_Select", 0, 0);
}
override public function remove():void{
super.remove();
mc_content.removeEventListener(MouseEvent.CLICK, onClickMe);
}
override protected function init():void{
super.init();
initName();
mc_content.addEventListener(MouseEvent.CLICK, onClickMe);
saveArr = LevelControl.getSaveArr();
refreshPage();
}
public function btn_pageDown_Func():void{
var _local1:int = (curPage + 1);
var _local2:int = (((_local1 - 1) * OnePageNum) + 1);
if (saveArr.length < _local2){
return;
};
curPage++;
refreshPage();
}
protected function refreshPage():Boolean{
var _local5:Object;
var _local1:Boolean;
var _local2:Array = saveArr;
var _local3:int = (((curPage - 1) * OnePageNum) + 1);
var _local4:int;
while (_local4 < OnePageNum) {
_local5 = _local2[((_local3 + _local4) - 1)];
if (_local5){
mc_content[("slot" + (_local4 + 1))].txt_id.text = (_local3 + _local4);
mc_content[("slot" + (_local4 + 1))].textMc.txt_name.text = _local5.name;
} else {
mc_content[("slot" + (_local4 + 1))].txt_id.text = "";
mc_content[("slot" + (_local4 + 1))].textMc.txt_name.text = "";
};
_local4++;
};
return (_local1);
}
protected function initName():void{
var _local1:int;
while (_local1 < 5) {
mc_content[("slot" + (_local1 + 1))].textMc.mouseChildren = false;
mc_content[("slot" + (_local1 + 1))].textMc.buttonMode = true;
mc_content[("slot" + (_local1 + 1))].textMc.txt_time.text = "";
_local1++;
};
}
public function btn_pageUp_Func():void{
var _local1:int = (curPage - 1);
if (_local1 <= 0){
return;
};
curPage--;
curPage = Math.max(0, curPage);
refreshPage();
}
}
}//package src.ui.load
Section 93
//UI_Warn (src.ui.load.UI_Warn)
package src.ui.load {
import src.ui.*;
public class UI_Warn extends Cover {
protected var _func:Function;
public function btn_yes_Func():void{
remove();
_func.call(this, true);
}
public function btn_no_Func():void{
remove();
_func.call(this, false);
}
public function setCallback(_arg1:Function):void{
_func = _arg1;
}
}
}//package src.ui.load
Section 94
//UI_Buy (src.ui.pop.UI_Buy)
package src.ui.pop {
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
public class UI_Buy extends UI_Pop {
protected var curCoins:int;
protected var price:int;
protected var buyItem:String;
public function UI_Buy(){
animStyle = 1;
super();
}
public function btn_no_Func():void{
remove();
_func.call(this, false);
}
protected function getInfo(_arg1:String, _arg2:Object){
var _local3:int = Data.Shop_Data[0].indexOf(_arg1);
return (_arg2[_local3]);
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
curCoins = _arg1.coins;
GameUtil.setScoreNum(curCoins, 5, mc_content.num_coin);
}
override protected function init():void{
super.init();
}
protected function noMoneyCallback():void{
btn_no_Func();
}
public function setType(_arg1:String, _arg2:int):void{
var _local3:String = (buyItem = (_arg2) ? ((_arg1 + "_") + _arg2) : _arg1);
gotoAndStop(_local3);
var _local4:Object = GameUtil.getObjInArr(Data.Shop_Data, _local3, 0);
price = getInfo("Price", _local4);
GameUtil.setScoreNum(price, 5, mc_content.num_price);
}
public function btn_yes_Func():void{
var _local1:UI_NoMoney;
if (curCoins >= price){
remove();
_func.call(this, true, price);
} else {
_local1 = new UI_NoMoney();
GameUtil.addChild(_local1, Global.scene, (Data.stageWidth / 2), (Data.stageHeight / 2));
_local1.setCallback(noMoneyCallback);
SoundObject.playSound(Data.SFX_POOR);
};
}
}
}//package src.ui.pop
Section 95
//UI_Goal (src.ui.pop.UI_Goal)
package src.ui.pop {
import src.ui.*;
import flash.display.*;
import com.greensock.*;
import lj.src.util.*;
import src.data.*;
import com.greensock.easing.*;
public class UI_Goal extends Cover {
private var _func:Function;
public var mc_goal:MovieClip;
public function setStart(_arg1:int, _arg2:Function):void{
_func = _arg2;
GameUtil.setScoreNum(_arg1, 5, mc_goal);
var _local3:TimelineLite = new TimelineLite();
_local3.append(new TweenLite(this, 0.5, {y:(Data.stageHeight / 2), ease:Expo.easeOut}));
_local3.append(new TweenLite(this, 1, {}));
_local3.append(new TweenLite(this, 0.5, {y:((-(height) / 2) - 50), onComplete:animFinish, ease:Expo.easeOut}));
}
protected function animFinish():void{
remove();
_func.call();
}
}
}//package src.ui.pop
Section 96
//UI_NoMoney (src.ui.pop.UI_NoMoney)
package src.ui.pop {
public class UI_NoMoney extends UI_Pop {
public function btn_ok_Func():void{
remove();
_func.call();
}
}
}//package src.ui.pop
Section 97
//UI_Pause (src.ui.pop.UI_Pause)
package src.ui.pop {
import src.sys.*;
import src.ui.*;
import src.data.*;
public class UI_Pause extends Cover {
override protected function init():void{
super.init();
graphics.beginFill(0, 0.8);
graphics.drawRect((-(Data.stageWidth) / 2), (-(Data.stageHeight) / 2), Data.stageWidth, Data.stageHeight);
}
public function btn_continue_Func():void{
GameMain.getInstance().handlePause(false);
}
}
}//package src.ui.pop
Section 98
//UI_Pop (src.ui.pop.UI_Pop)
package src.ui.pop {
import src.ui.*;
import com.greensock.*;
import src.data.*;
import com.greensock.easing.*;
public class UI_Pop extends Cover {
protected var _func:Function;
protected var animStyle:int;
protected var _args:Array;
protected function dissapear():void{
TweenLite.to(this, 0.3, {y:(-(width) / 2), ease:Expo.easeIn, onComplete:easeInComplete});
}
override public function remove():void{
super.remove();
}
protected function easeInComplete():void{
remove();
}
public function setCallback(_arg1:Function, ... _args):void{
_func = _arg1;
_args = _args;
}
override protected function init():void{
super.init();
if (!animStyle){
y = (-(width) / 2);
TweenLite.to(this, 0.3, {y:(Data.stageHeight / 2), ease:Expo.easeOut, onComplete:easeOutComplete});
};
}
protected function applyFunc():void{
_func.apply(this, _args);
}
protected function easeOutComplete():void{
}
}
}//package src.ui.pop
Section 99
//UI_Sure (src.ui.pop.UI_Sure)
package src.ui.pop {
public class UI_Sure extends UI_Pop {
public function UI_Sure(){
animStyle = 1;
super();
}
public function btn_no_Func():void{
remove();
_func.call(this, false);
}
public function btn_yes_Func():void{
remove();
_func.call(this, true);
}
}
}//package src.ui.pop
Section 100
//Cover (src.ui.Cover)
package src.ui {
import flash.events.*;
import src.sys.*;
import flash.display.*;
import lj.src.util.*;
import src.data.*;
public class Cover extends MovieClip {
public var mybtns:MovieClip;
public var mc_content:MovieClip;
public function Cover(){
stop();
anim_in(0);
}
public function remove():void{
parent.removeChild(this);
removeBtns(mybtns);
}
protected function initBtns(_arg1:MovieClip):void{
if (_arg1){
_arg1.addEventListener(MouseEvent.CLICK, onBtnsClick);
_arg1.addEventListener(MouseEvent.MOUSE_OVER, onBtnsOver);
};
}
public function btn_back_Func():void{
}
protected function doEfx_dark(_arg1:Function, ... _args):void{
}
protected function onBtnsOver(_arg1:MouseEvent):void{
if (_arg1.target.name.search("btn_") != -1){
if (Data.SFX_Button){
SoundObject.playSound(Data.SFX_Button);
};
};
}
public function setData(_arg1:Object):void{
}
public function enterUI(... _args):void{
remove();
GameMain.getInstance().changeCover(_args[0], (Data.stageWidth / 2), (Data.stageHeight / 2));
}
public function mybtns_Func():void{
}
protected function onBtnsClick(_arg1:MouseEvent):void{
this[(_arg1.target.name + "_Func")].call();
SoundObject.playSound(Data.SFX_Button2);
}
public function anim_in(_arg1:int):void{
init();
}
public function setBtnEnable(_arg1:Boolean):void{
mouseEnabled = _arg1;
mouseChildren = _arg1;
}
protected function initPauseBtn():void{
mybtns.btn_pause.gotoAndStop(1);
mybtns.btn_pause.buttonMode = true;
mybtns.btn_pause.mouseChildren = false;
}
protected function init():void{
initBtns(mybtns);
}
protected function setMusicBtn():void{
if (mybtns.btn_sound){
if (GameMain.getInstance().soundOn){
mybtns.btn_sound.gotoAndStop(1);
} else {
mybtns.btn_sound.gotoAndStop(3);
};
};
}
protected function removeBtns(_arg1:MovieClip):void{
if (_arg1){
_arg1.removeEventListener(MouseEvent.CLICK, onBtnsClick);
_arg1.removeEventListener(MouseEvent.MOUSE_OVER, onBtnsOver);
};
}
protected function initSoundBtn():void{
mybtns.btn_sound.gotoAndStop(1);
mybtns.btn_sound.buttonMode = true;
mybtns.btn_sound.mouseChildren = false;
}
public function btn_sound_Func():void{
GameMain.getInstance().setVolumn();
setMusicBtn();
}
}
}//package src.ui
Section 101
//UI_Congratulation (src.ui.UI_Congratulation)
package src.ui {
import src.sys.*;
import flash.display.*;
public class UI_Congratulation extends Cover {
public var __id1_:MovieClip;
public function UI_Congratulation(){
__setProp___id1__UI_Congratulation_();
}
function __setProp___id1__UI_Congratulation_(){
try {
__id1_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id1_.Type = "logo-donepage";
__id1_.Goto = 1;
try {
__id1_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function restartLevel():void{
remove();
GameMain.getInstance().changeCover("UI_Title", 0, 0);
}
public function btn_playAgain_Func():void{
restartLevel();
setBtnEnable(false);
}
public function btn_more_Func():void{
MoreGameURLOK.MoreGameURLOK("moregames-donepage");
}
}
}//package src.ui
Section 102
//UI_Help (src.ui.UI_Help)
package src.ui {
import src.sys.*;
public class UI_Help extends Cover {
override public function btn_back_Func():void{
remove();
GameMain.getInstance().changeCover("UI_Title", 0, 0);
}
}
}//package src.ui
Section 103
//UI_HUD (src.ui.UI_HUD)
package src.ui {
import flash.events.*;
import src.sys.*;
import src.sys.scene.*;
import lj.src.util.*;
import src.data.*;
import src.ui.pop.*;
public class UI_HUD extends Cover {
protected var time_pos_x:Number;
protected function back_title():void{
(SceneMgr.scene as GameScene).gameEnd = 2;
GameMain.getInstance().removeScene();
GameMain.getInstance().changeCover("UI_Title", 0, 0);
}
public function setLevel(_arg1:int):void{
mc_content.level.gotoAndStop(_arg1);
}
protected function help_callback():void{
setBtnEnable(true);
GameMain.getInstance().handlePause(false);
}
public function btn_help_Func():void{
btn_pause_Func();
}
protected function onMyEF(_arg1:Event):void{
var e = _arg1;
var _local3 = mc_content;
with (_local3) {
if (money.currentFrame == money.totalFrames){
money.stop();
};
};
}
public function setTime(_arg1:Number, _arg2:Number):void{
mc_content.clock.hand.rotation = ((_arg1 / _arg2) * 360);
}
override protected function init():void{
super.init();
mc_content.money.stop();
initSoundBtn();
setMusicBtn();
setLevel(1);
setScore(0);
setGoal(0);
addEventListener(Event.ENTER_FRAME, onMyEF);
}
public function addCash():void{
mc_content.money.gotoAndPlay(1);
}
public function setGoal(_arg1:int):void{
GameUtil.setScoreNum(_arg1, 5, mc_content.num_goal);
}
public function setScore(_arg1:int):void{
GameUtil.setScoreNum(_arg1, 5, mc_content.num_coin);
}
override public function btn_back_Func():void{
setBtnEnable(false);
var _local1:UI_Pop = (GameMain.getInstance().changeCover("pop.UI_Sure", (Data.stageWidth / 2), (Data.stageHeight / 2)) as UI_Pop);
_local1.setCallback(sure_callback);
GameMain.getInstance().actionPause(true);
}
protected function sure_callback(_arg1:Boolean):void{
if (_arg1){
back_title();
} else {
setBtnEnable(true);
GameMain.getInstance().actionPause(false);
};
}
public function btn_pause_Func():void{
GameMain.getInstance().handlePause(true);
}
}
}//package src.ui
Section 104
//UI_Lose (src.ui.UI_Lose)
package src.ui {
import src.sys.*;
import flash.display.*;
public class UI_Lose extends Cover {
public var __id4_:MovieClip;
public function UI_Lose(){
__setProp___id4__UI_Lose_();
}
public function btn_tryagain_Func():void{
remove();
restartLevel();
}
public function restartLevel():void{
GameMain.getInstance().changeCover("UI_Title", 0, 0);
}
public function btn_more_Func():void{
MoreGameURLOK.MoreGameURLOK("moregames-donepage");
}
function __setProp___id4__UI_Lose_(){
try {
__id4_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id4_.Type = "logo-donepage";
__id4_.Goto = 1;
try {
__id4_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package src.ui
Section 105
//UI_Select (src.ui.UI_Select)
package src.ui {
import flash.events.*;
import flash.display.*;
import src.data.*;
public class UI_Select extends UI_SelectSuper {
public var __id2_:MovieClip;
public function UI_Select(){
__setProp___id2__UI_Select_();
}
override protected function init():void{
super.init();
}
override protected function setLevel():void{
var _local1:int;
while (_local1 < Data.Max_level) {
if ((_local1 + 1) > openLevel){
mc_content[(Str_Level + (_local1 + 1))].mouseEnabled = false;
};
_local1++;
};
}
override protected function initLevel():void{
super.initLevel();
mc_content.nums.gotoAndStop(openLevel);
mc_content.nums.mouseEnabled = false;
mc_content.pane.stop();
setPane(openLevel);
}
function __setProp___id2__UI_Select_(){
try {
__id2_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id2_.Type = "logo-menu";
__id2_.Goto = 1;
try {
__id2_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
protected function setPane(_arg1:int):void{
mc_content.pane.x = mc_content[(Str_Level + _arg1)].x;
mc_content.pane.y = mc_content[(Str_Level + _arg1)].y;
}
override protected function onMyMouseOut(_arg1:MouseEvent):void{
var _local2:int = getLevelId(_arg1.target.name);
if (_local2){
};
}
override protected function onMyMouseOver(_arg1:MouseEvent):void{
var _local2:int = getLevelId(_arg1.target.name);
if (_local2){
setPane(_local2);
};
}
}
}//package src.ui
Section 106
//UI_SelectSuper (src.ui.UI_SelectSuper)
package src.ui {
import flash.events.*;
import src.sys.*;
import flash.display.*;
import lj.src.util.*;
import src.data.*;
public class UI_SelectSuper extends Cover {
protected const Str_Level:String = "s_";
protected var curLevel:int;
protected var openLevel:int;
public function UI_SelectSuper(){
openLevel = (curLevel = LevelControl.getPlayerInfo(LevelControl.curUser).level);
super();
}
protected function removeLevel():void{
mc_content.removeEventListener(MouseEvent.CLICK, onClickLevel);
mc_content.removeEventListener(MouseEvent.MOUSE_OVER, onMyMouseOver);
mc_content.removeEventListener(MouseEvent.MOUSE_OUT, onMyMouseOut);
}
protected function setLevel():void{
var _local1:int;
while (_local1 < Data.Max_level) {
if ((_local1 + 1) > openLevel){
GameUtil.setMCEnable(mc_content[(Str_Level + (_local1 + 1))], false);
} else {
GameUtil.setMCEnable(mc_content[(Str_Level + (_local1 + 1))], true);
};
_local1++;
};
}
protected function onMyMouseOut(_arg1:MouseEvent):void{
var _local2:int = getLevelId(_arg1.target.name);
if (_local2){
GameUtil.removeFilter((_arg1.target as DisplayObjectContainer));
};
}
protected function getLevelId(_arg1:String):int{
var _local2:int;
if (_arg1.search(Str_Level) != -1){
_local2 = int(_arg1.replace(Str_Level, ""));
};
return (_local2);
}
protected function onClickLevel(_arg1:MouseEvent):void{
var _local3:int;
var _local2:String = _arg1.target.name;
if (_local2.search(Str_Level) != -1){
_local3 = int(_local2.replace(Str_Level, ""));
level_select(_local3);
};
}
override public function remove():void{
super.remove();
removeLevel();
}
protected function onMyMouseOver(_arg1:MouseEvent):void{
var _local2:int = getLevelId(_arg1.target.name);
if (_local2){
GameUtil.applyGlowFilter((_arg1.target as DisplayObjectContainer), 0xFFFF00, 1, 10, 10);
SoundObject.playSound(Data.SFX_Button2);
};
}
override protected function init():void{
super.init();
initLevel();
}
override protected function onBtnsClick(_arg1:MouseEvent):void{
super.onBtnsClick(_arg1);
}
protected function initLevel():void{
setLevel();
mc_content.addEventListener(MouseEvent.CLICK, onClickLevel);
mc_content.addEventListener(MouseEvent.MOUSE_OVER, onMyMouseOver);
mc_content.addEventListener(MouseEvent.MOUSE_OUT, onMyMouseOut);
}
protected function level_select(_arg1:int):void{
curLevel = _arg1;
btn_play_Func();
}
public function btn_play_Func():void{
remove();
GameMain.getInstance().initScene(curLevel);
}
}
}//package src.ui
Section 107
//UI_Title (src.ui.UI_Title)
package src.ui {
import src.sys.*;
import flash.display.*;
import com.greensock.*;
import src.data.*;
import src.ui.pop.*;
import com.greensock.plugins.*;
public class UI_Title extends Cover {
public var __id3_:MovieClip;
public function UI_Title(){
__setProp___id3__UI_Title_();
}
override protected function init():void{
super.init();
if (Data.IF_Sound){
GameMain.getInstance().playMusic(Data.SFX_CoverBG);
};
}
public function btn_load_Func():void{
remove();
GameMain.getInstance().changeCover("load.UI_Load", 0, 0);
}
override public function anim_in(_arg1:int):void{
if (!LevelControl.getSaveArr().length){
mybtns.btn_load.visible = false;
};
TweenPlugin.activate([TintPlugin, RemoveTintPlugin]);
if (_arg1 == 0){
TweenLite.to(this, 0, {tint:0});
TweenLite.to(this, 1, {removeTint:true, onComplete:init});
};
}
protected function input_cb(_arg1:Boolean):void{
if (_arg1){
remove();
GameMain.getInstance().changeCover("UI_Select", 0, 0);
} else {
setBtnEnable(true);
};
}
function __setProp___id3__UI_Title_(){
try {
__id3_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id3_.Type = "logo-ingame";
__id3_.Goto = 1;
try {
__id3_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
public function btn_more_Func():void{
MovieClip(root).LogoMoreGame("moregames-menu");
trace("more");
}
public function btn_play_Func():void{
setBtnEnable(false);
var _local1:UI_Pop = (GameMain.getInstance().changeCover("load.UI_Input", (Data.stageWidth / 2), 0) as UI_Pop);
_local1.setCallback(input_cb);
}
public function btn_help_Func():void{
remove();
GameMain.getInstance().changeCover("UI_Help", 0, 0);
}
}
}//package src.ui
Section 108
//UI_Win (src.ui.UI_Win)
package src.ui {
import flash.events.*;
import src.sys.*;
import src.sys.scene.*;
import flash.display.*;
public class UI_Win extends Cover {
public var animMc:MovieClip;
public function UI_Win(){
animMc.addEventListener(Event.ENTER_FRAME, onMyEF);
mybtns = animMc.mybtns;
LevelControl.curLevel++;
}
public function nextLevel():void{
remove();
SceneMgr.createScene("ShopScene", null);
}
override public function remove():void{
super.remove();
this.removeBtns(animMc.mybtns);
}
public function enterCongratulation():void{
remove();
GameMain.getInstance().changeCover("UI_Congratulation", 0, 0);
}
public function backSelect():void{
}
public function btn_more_Func():void{
MoreGameURLOK.MoreGameURLOK("moregames-donepage");
}
protected function onMyEF(_arg1:Event):void{
if (animMc.currentFrame == animMc.totalFrames){
animMc.stop();
initBtns(animMc.mybtns);
animMc.removeEventListener(Event.ENTER_FRAME, onMyEF);
};
}
public function btn_next_Func():void{
nextLevel();
}
}
}//package src.ui
Section 109
//Customer (src.view.Customer)
package src.view {
import src.sys.*;
import src.sys.scene.*;
import com.greensock.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
import lj.src.sys.*;
import src.model.*;
import flash.ui.*;
public class Customer extends RoleV {
private const init_mode:int = 6;
private const womenArr:Array;
private const mode_total:int;
private const doorMode_total:int;
private const STAY_TIME:int = 20;
protected var curMode:int;
protected var curPhase:int;
protected var curServeTime:int;
protected var id:int;
protected var modeCount:int;
public var draging:Boolean;// = false
protected var complete:Boolean;
protected var stayCount:int;
private var baseCost:int;
protected var serveCount:int;
public var BathMultiple:Number;// = 1
protected var serveError:Boolean;// = false
protected var bStayFrame:Boolean;// = true
protected var curServeIndex:int;
protected var tween:TweenMax;
protected var errorServes:Array;
protected var needSequence:Array;
protected var _level:int;
protected var _bathId:int;
protected var foodMc:ViewMC;
private var serveTypes:Array;
protected var _customArr:Array;
protected var _room:RoomInfo;
protected var _curServeId:int;
protected var needMc:ViewMC;
protected var bFreezeMode:int;// = 0
protected var _bFlag:Boolean;// = false
public static const PHASE_DOOR:int = 7;
public static const PHASE_COME:int = 4;
public static const PHASE_ACCEPT:int = 2;
public static const PHASE_LEAVE:int = 6;
public static const PHASE_END:int = 3;
public static const PHASE_WAIT:int = 1;
public static const PHASE_STAY:int = 5;
public function Customer(_arg1:String){
womenArr = [5, 6, 7, 8, 9];
mode_total = ((12 * 8) * Global.stage.frameRate);
doorMode_total = ((3 * 8) * Global.stage.frameRate);
_level = (SceneMgr.scene as GameScene).level;
super(_arg1);
name = _arg1;
buttonMode = true;
}
protected function randomNeed():void{
var _local4:int;
var _local1:Array = LevelControl.getData(_level, "ServeNum");
var _local2:int = (Math.round((Math.random() * _local1[1])) + _local1[0]);
needSequence = new Array();
var _local3:int;
while (_local3 < _local2) {
_local4 = (Math.random() * serveTypes.length);
needSequence.push(serveTypes[_local4]);
serveTypes.splice(_local4, 1);
_local3++;
};
needSequence.splice(0, 0, Data.Serve_Order);
curServeIndex = 0;
}
override protected function commonAction():void{
if (bathId){
changeFrame("wait");
} else {
changeFrame("stand");
};
}
public function serveMe():void{
if (curPhase == PHASE_WAIT){
onServeStart(curServeId);
};
}
override protected function init():void{
super.init();
curPhase = PHASE_COME;
changeFrame("stand");
initNeedMc();
}
public function get curServeId():int{
return (_curServeId);
}
protected function updatePhase():void{
var _local1:int;
var _local2:int;
if (curPhase == PHASE_WAIT){
if (modeCount){
if (!bFreezeMode){
modeCount--;
_local1 = Math.ceil(((modeCount / mode_total) * 8));
if (curMode != _local1){
curMode = _local1;
_local2 = 0;
if (curMode == 4){
changeFrame("upset1");
if (GameUtil.checkInArr(womenArr, id)){
_local2 = 2;
} else {
_local2 = 1;
};
} else {
if (curMode == 2){
changeFrame("upset2");
if (GameUtil.checkInArr(womenArr, id)){
_local2 = 4;
} else {
_local2 = 3;
};
};
};
if (_local2){
SoundObject.playSound(Data[("SFX_ANGRY" + _local2)]);
};
};
if (!modeCount){
if (curNeed){
(SceneMgr.scene as GameScene).leftDish(curNeed);
};
curPhase = PHASE_END;
needMc.visible = false;
leave();
};
};
};
} else {
if (curPhase == PHASE_ACCEPT){
serveCount++;
if (serveCount == curServeTime){
onServeComplete(curServeId);
};
} else {
if (curPhase == PHASE_STAY){
stayCount++;
if (stayCount > STAY_TIME){
waitServe();
};
} else {
if (curPhase == PHASE_DOOR){
if (modeCount){
if (!draging){
modeCount--;
if (!modeCount){
walkOut();
};
};
};
};
};
};
};
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
id = _arg1.id;
_customArr = _arg1.customArr;
_customArr.push(this);
_room = _arg1.room;
}
protected function removeFoodMc():void{
if (foodMc){
foodMc.remove();
foodMc = null;
};
}
protected function dissapear():void{
mouseEnabled = false;
mouseChildren = false;
TweenLite.to(this, 1, {alpha:0, onComplete:remove});
}
public function stopDragAction():void{
Mouse.show();
backPos();
GameUtil.removeFilter(this);
draging = false;
}
public function resumeFrame():void{
bStayFrame = false;
}
override public function updateEvents():void{
if (draging){
return;
};
super.updateEvents();
updatePhase();
walkAction();
updateFoodMc();
}
override protected function convertXYAction():void{
super.convertXYAction();
}
public function clickMe():void{
if (!_bFlag){
switch (curPhase){
case PHASE_WAIT:
_room.checkServeCustom(this, curServeId);
break;
};
};
}
protected function walkAction():void{
if (((myXspeed) || (myYspeed))){
if (Math.abs(myXspeed) > Math.abs(myYspeed)){
changeFrame("walk_x");
} else {
if (myYspeed < 0){
changeFrame("walk_up");
};
};
SoundObject.playSound(Data.SFX_RUN);
};
}
override protected function checkDir():void{
if (bathId){
return;
};
super.checkDir();
}
protected function isLastOne():Boolean{
return ((curServeIndex == (needSequence.length - 1)));
}
public function get bathId():int{
return (_bathId);
}
public function isServeOver():Boolean{
return (((isLastOne()) && ((curPhase == PHASE_END))));
}
public function get phase():int{
return (curPhase);
}
override protected function scaleMe(_arg1:Number):void{
scaleX = _arg1;
}
override public function remove():void{
super.remove();
if (_customArr){
GameUtil.removeObjInArr(_customArr, this);
(SceneMgr.scene as GameScene).checkCustom();
};
if (complete){
};
}
override public function animOver():void{
if (myCurrentLabel == "mud"){
onServeComplete(curServeId);
} else {
if (myCurrentLabel == "drink"){
onServeComplete(curServeId);
};
};
super.animOver();
}
public function dragAction():Boolean{
var _local1:Boolean;
if (curPhase == PHASE_DOOR){
Mouse.hide();
draging = true;
curDir = 1;
scaleMe(curDir);
changeFrame("catch");
_local1 = true;
};
return (_local1);
}
protected function setFoodMc(_arg1:String):void{
if (!foodMc){
foodMc = new ViewMC(_arg1);
foodMc.addToStage(this, 40, 3.5);
foodMc.scaleX = (foodMc.scaleY = 0.85);
foodMc.mc.stop();
};
}
override public function setPos(_arg1:Number, _arg2:Number):void{
super.setPos(_arg1, _arg2);
}
protected function waitServe():void{
var _local1:int = (_curServeId = needSequence[curServeIndex]);
curPhase = PHASE_WAIT;
if (_local1 == Data.Serve_Order){
changeFrame("wave");
SoundObject.playSound(Data.SFX_HELLO);
} else {
commonAction();
needMc.visible = true;
needMc.mc.type.gotoAndStop(_local1);
(SceneMgr.scene as GameScene).addDish(_local1);
};
}
protected function ready():void{
baseCost = LevelControl.getData(_level, "BaseCost");
var _local1:int = LevelControl.getData(_level, "ServeType");
serveTypes = new Array();
var _local2:int;
while (_local2 < _local1) {
serveTypes.push((_local2 + 1));
_local2++;
};
curMode = init_mode;
modeCount = ((mode_total * init_mode) / 8);
randomNeed();
}
public function putInBath(_arg1:int):void{
_bathId = _arg1;
_room.putCustomInBath(this, _arg1);
changeFrame("wait");
if ((_arg1 % 2) == 0){
curDir = -1;
scaleMe(curDir);
};
setPos(Data.Bath_Pos[(_arg1 - 1)][0], Data.Bath_Pos[(_arg1 - 1)][1]);
curPhase = PHASE_STAY;
ready();
SoundObject.playSound(Data.SFX_WATER);
}
public function stopFrame():void{
if (bStayFrame){
innerMcJump(myCurrentFrame, true);
} else {
innerMcJump((myCurrentFrame + 1), false);
};
}
protected function moveForward():void{
var _local1:int = (((bathId % 2) == 1)) ? Data.Serve_Offset : -(Data.Serve_Offset);
setPos((myX + _local1), myY);
}
protected function leave():void{
mySpeed = (mySpeed * 4);
_room.removeCustomFromBath(this, bathId);
this.setTilePos(Data.Bath_Pos[(_bathId - 1)][4], Data.Bath_Pos[(_bathId - 1)][5]);
_bathId = 0;
this.moveToTile(0, 2);
}
public function delayFrame():void{
stayCount++;
if (stayCount > STAY_TIME){
innerMcJump((myCurrentFrame + 1), false);
} else {
innerMcJump(myCurrentFrame, true);
};
}
protected function updateFoodMc():void{
if (foodMc){
if (foodMc.mcName == "DrinkMc"){
if (foodMc.mc.currentFrame == foodMc.mc.totalFrames){
foodMc.mc.stop();
stayCount++;
if (stayCount > STAY_TIME){
onServeComplete(curServeId);
};
};
} else {
if (foodMc.mcName == "EatFoodMc"){
stayCount++;
foodMc.mc.stop();
if ((stayCount % STAY_TIME) == (STAY_TIME - 1)){
foodMc.mc.nextFrame();
foodMc.mc.nextFrame();
if (foodMc.mc.currentFrame < 7){
SoundObject.playSound(Data.SFX_EAT);
};
};
if (foodMc.mc.currentFrame == foodMc.mc.totalFrames){
onServeComplete(curServeId);
};
};
};
};
}
public function walkOut():void{
curPhase = PHASE_LEAVE;
moveToPos(myX, (myY - 50));
}
public function walkIn(_arg1:Number, _arg2:Number):void{
mouseEnabled = false;
moveToPos(_arg1, _arg2);
}
public function onServeComplete(_arg1:int):void{
var _local2:int;
curPhase = PHASE_END;
serveCount = 0;
modeCount = (modeCount + (mode_total / 8));
commonAction();
removeFoodMc();
switch (_arg1){
case Data.Serve_Bath:
case Data.Serve_Mud:
moveBackward();
break;
};
if (curServeIndex == 0){
if (GameUtil.checkInArr(womenArr, id)){
_local2 = ((Math.random() > 0.5)) ? 3 : 4;
} else {
_local2 = ((Math.random() > 0.5)) ? 1 : 2;
};
SoundObject.playSound(Data[("SFX_ORDER" + _local2)]);
};
this.curServeIndex++;
if (curServeIndex >= needSequence.length){
complete = true;
leave();
} else {
waitServe();
};
}
protected function onServeStart(_arg1:int):void{
curPhase = PHASE_ACCEPT;
curServeTime = Data.Serve_Time[_arg1];
needMc.visible = false;
switch (_arg1){
case Data.Serve_Eat:
setFoodMc("EatFoodMc");
changeFrame("eat");
break;
case Data.Serve_Drink:
changeFrame("drink");
SoundObject.playSound(Data.SFX_DRINK);
break;
case Data.Serve_Bath:
moveForward();
changeFrame("bath");
break;
case Data.Serve_Mud:
stayCount = 70;
moveForward();
changeFrame("mud");
break;
case Data.Serve_Towel:
changeFrame("towel");
break;
case Data.Serve_Order:
changeFrame("look");
break;
};
}
protected function moveBackward():void{
var _local1:int = (((bathId % 2) == 1)) ? -(Data.Serve_Offset) : Data.Serve_Offset;
setPos((myX + _local1), myY);
}
public function freezeMode(_arg1:int):void{
bFreezeMode = (bFreezeMode + _arg1);
bFreezeMode = Math.max(0, bFreezeMode);
}
public function set bFlag(_arg1:Boolean):void{
_bFlag = _arg1;
}
protected function addMode(_arg1:int):void{
modeCount = (modeCount + _arg1);
}
public function resumePos():void{
setPos(myX, myY);
}
public function giveCash():int{
var _local1:int = (((baseCost * BathMultiple) + (((curMode - 1) * Data.Custom_tip) * baseCost)) + (((needSequence.length - 2) * Data.AddServeCost) * baseCost));
(SceneMgr.scene as GameScene).addScore(_local1);
SoundObject.playSound(Data.SFX_CASH);
return (_local1);
}
public function backPos():void{
stopDrag();
Mouse.show();
resumePos();
commonAction();
}
public function get bFlag():Boolean{
return (_bFlag);
}
override protected function arrival():void{
super.arrival();
switch (curPhase){
case PHASE_COME:
mouseEnabled = true;
mouseChildren = false;
(SceneMgr.scene as GameScene).upperCtn.addChild(this);
commonAction();
if ((SceneMgr.scene as GameScene).closed){
(SceneMgr.scene as GameScene).closeDoor();
};
curPhase = PHASE_DOOR;
modeCount = doorMode_total;
break;
case PHASE_END:
if (complete){
giveCash();
};
dissapear();
break;
case PHASE_LEAVE:
dissapear();
_room.putCustomInBath(this, 0);
break;
};
}
protected function initNeedMc():void{
needMc = new ViewMC("NeedMc");
needMc.visible = false;
needMc.scaleX = (needMc.scaleY = 0.72);
needMc.mc.type.stop();
needMc.addToStage(this, 10, -45);
}
public function get curNeed():int{
var _local1:int;
if (curPhase == PHASE_WAIT){
if (needSequence){
_local1 = needSequence[curServeIndex];
};
};
return (_local1);
}
public function isWalking():Boolean{
var _local1:Boolean;
if (myCurrentLabel.search("walk") != -1){
_local1 = true;
};
return (_local1);
}
}
}//package src.view
Section 110
//LevelBG (src.view.LevelBG)
package src.view {
import src.sys.scene.*;
import flash.display.*;
import flash.geom.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
import lj.src.efx.*;
public class LevelBG extends ViewMC {
protected var FLOWER_NUM:int;// = 10
protected var lightLevel:int;
protected var doorLevel:int;
public function LevelBG(_arg1:String){
super(_arg1);
}
public function updateSth(_arg1:String, _arg2:int):void{
if (_arg1 == "pool"){
playPoolUpdate();
} else {
if (_arg1 == "carpet"){
playDoorUpdate(_arg1);
} else {
if (_arg1 == "tree"){
playDoorUpdate(_arg1);
};
};
};
}
public function updateFrame():void{
var _local2:MovieClip;
var _local1:int;
while (_local1 < Data.Bath_Num) {
_local2 = _mc.pool.ices[("i_" + (_local1 + 1))];
if (_local2){
if (_local2.currentFrame == _local2.totalFrames){
_local2.stop();
};
};
_local1++;
};
}
public function playIceBreak(_arg1:int):void{
_mc.pool.ices[("i_" + _arg1)].gotoAndPlay(1);
(SceneMgr.scene as ShopScene).endJob();
SoundObject.playSound(Data.SFX_HAMMER);
}
public function setItemState(_arg1:String, _arg2:int):void{
if (_mc[_arg1]){
if (_arg1 != "light"){
_mc[_arg1].gotoAndStop(_arg2);
} else {
_mc[_arg1].gotoAndStop(1);
_mc[_arg1].visible = true;
setLight(_arg2, true);
};
};
(SceneMgr.scene as ShopScene).endJob();
}
public function playDoorUpdate(_arg1:String):void{
var _local2:CommonEffect = new CommonEffect();
var _local3:Point = _mc.door[_arg1].parent.localToGlobal(new Point(_mc.door[_arg1].x, _mc.door[_arg1].y));
_local2.setEffect("Smoke", this, _local3.x, _local3.y);
_local2.addCallBack(onCarpetEfxEnd);
(SceneMgr.scene as ShopScene).endJob();
SoundObject.playSound(Data.SFX_SMOKE);
}
public function playAddFlower(_arg1:int):void{
var _local2:CommonEffect = new CommonEffect();
var _local3:Point = _mc.pool.flowers[("f_" + _arg1)].parent.localToGlobal(new Point(_mc.pool.flowers[("f_" + _arg1)].x, _mc.pool.flowers[("f_" + _arg1)].y));
_local2.setEffect("Smoke", this, _local3.x, _local3.y);
_local2.addCallBack(onFlowerEfxEnd, _arg1);
SoundObject.playSound(Data.SFX_SMOKE);
}
public function inNight():void{
_mc.light.gotoAndStop(2);
_mc.light.visible = true;
setLight(lightLevel, true);
}
public function setLight(_arg1:int, _arg2:Boolean):void{
var _local4:MovieClip;
var _local3:int;
while (_local3 < 4) {
_local4 = _mc.light[("d" + (_local3 + 1))];
_local4.gotoAndStop((_arg1 * 2));
if (_arg2){
_local4.prevFrame();
};
_local3++;
};
}
protected function onCarpetEfxEnd():void{
_mc.door.carpet.nextFrame();
}
public function playPoolUpdate():void{
var _local1:CommonEffect = new CommonEffect();
_local1.setEffect("Smoke", this, _mc.pool.x, _mc.pool.y);
_local1.addCallBack(onPoolEfxEnd);
SoundObject.playSound(Data.SFX_SMOKE);
}
override public function setData(_arg1:Object):void{
var _local2:int;
while (_local2 < 2) {
_mc[("smoke" + (_local2 + 1))].mouseEnabled = false;
_local2++;
};
_mc.road.gotoAndStop(_arg1.road.level);
_mc.pool.gotoAndStop(("l" + _arg1.pool.level));
if (_arg1.light){
_mc.light.gotoAndStop(1);
lightLevel = _arg1.light.level;
setLight(lightLevel, false);
} else {
_mc.light.visible = false;
};
_local2 = 0;
while (_local2 < Data.Bath_Num) {
if (!GameUtil.checkInArr(Data.Bath_Init, (_local2 + 1))){
if (GameUtil.checkInArr(_arg1.pool.ices, (_local2 + 1))){
_mc.pool.ices[("i_" + (_local2 + 1))].visible = false;
_mc.pool.ices[("i_" + (_local2 + 1))].stop();
_mc.pool.ices[("i_" + (_local2 + 1))].parent.removeChild(_mc.pool.ices[("i_" + (_local2 + 1))]);
} else {
_mc.pool.ices[("i_" + (_local2 + 1))].stop();
_mc.pool.ices[("i_" + (_local2 + 1))].mouseChildren = false;
_mc.pool.ices[("i_" + (_local2 + 1))].buttonMode = true;
};
};
_local2++;
};
_local2 = 0;
while (_local2 < FLOWER_NUM) {
if (GameUtil.checkInArr(_arg1.pool.flowers, (_local2 + 1))){
_mc.pool.flowers[("f_" + (_local2 + 1))].visible = true;
} else {
_mc.pool.flowers[("f_" + (_local2 + 1))].visible = false;
_mc.pool.flowers[("f_" + (_local2 + 1))].stop();
};
_local2++;
};
doorLevel = _arg1.door.level;
_mc.door.gotoAndStop(_arg1.door.level);
_mc.door.carpet.gotoAndStop(_arg1.carpet.level);
_mc.door.carpet.buttonMode = true;
setDoorClosed(false);
}
public function setDoorClosed(_arg1:Boolean):void{
}
protected function onFlowerEfxEnd(_arg1:int):void{
_mc.pool.flowers[("f_" + _arg1)].visible = true;
(SceneMgr.scene as ShopScene).endJob();
}
protected function onPoolEfxEnd():void{
_mc.pool.gotoAndStop("l2");
(SceneMgr.scene as ShopScene).endJob();
}
}
}//package src.view
Section 111
//LevelFG (src.view.LevelFG)
package src.view {
import flash.events.*;
import src.sys.scene.*;
import flash.geom.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
import lj.src.efx.*;
public class LevelFG extends ViewMC {
protected const TOTAL:int = 5;
protected var dishNum:Array;
protected var animOn:Array;
protected var dishFlagArr:Array;
protected var oldPos:Array;
protected var WaitCount:int;// = 10
protected var mySpeed:Number;// = 3
public function LevelFG(_arg1:String){
super(_arg1);
}
protected function onMyEnterFrame(_arg1:Event):void{
var _local2:int;
while (_local2 < TOTAL) {
if (animOn[_local2].on){
if (animOn[_local2].count > 0){
animOn[_local2].count--;
} else {
if (Math.abs((_mc[("anim" + (_local2 + 1))].x - _mc[("type" + (_local2 + 1))].x)) <= mySpeed){
_mc[("anim" + (_local2 + 1))].x = oldPos[_local2].x;
_mc[("anim" + (_local2 + 1))].y = oldPos[_local2].y;
takeDish((_local2 + 1), animOn[_local2].num);
animOn[_local2].on = false;
SoundObject.playSound(Data.SFX_DONE);
} else {
_mc[("anim" + (_local2 + 1))].x = (_mc[("anim" + (_local2 + 1))].x + (mySpeed * animOn[_local2].dir));
};
};
};
_local2++;
};
}
public function leftDish(_arg1:int):void{
animOn[(_arg1 - 1)].left++;
trace("left Dish:", animOn[(_arg1 - 1)].left);
}
protected function onTableEfxEnd():void{
_mc.table.gotoAndStop(2);
(SceneMgr.scene as ShopScene).endJob();
(SceneMgr.scene as ShopScene).shopUI.setEnable("table", false);
}
public function setItemState(_arg1:String, _arg2:int):void{
if (_mc[_arg1]){
_mc[_arg1].gotoAndStop(_arg2);
};
}
public function updateTable():void{
var _local1:CommonEffect = new CommonEffect();
_local1.setEffect("Smoke", this, _mc.table.x, _mc.table.y);
_local1.addCallBack(onTableEfxEnd);
SoundObject.playSound(Data.SFX_SMOKE);
}
public function takeDish(_arg1:int, _arg2:int):void{
dishNum[(_arg1 - 1)] = (dishNum[(_arg1 - 1)] + _arg2);
if (dishNum[(_arg1 - 1)] <= 0){
dishNum[(_arg1 - 1)] = 0;
_mc[("type" + _arg1)].visible = false;
} else {
_mc[("type" + _arg1)].visible = true;
GameUtil.setScoreNum(dishNum[(_arg1 - 1)], 1, _mc[("type" + _arg1)].num);
};
}
public function getDishFlag(_arg1:int):int{
return (dishFlagArr[(_arg1 - 1)]);
}
protected function onTreeEfxEnd():void{
_mc.tree.nextFrame();
}
public function playTreeUpdate():void{
var _local1:CommonEffect = new CommonEffect();
_local1.setEffect("Smoke", this, _mc.tree.x, _mc.tree.y);
_local1.addCallBack(onTreeEfxEnd);
(SceneMgr.scene as ShopScene).endJob();
SoundObject.playSound(Data.SFX_SMOKE);
}
protected function initPlate():void{
oldPos = new Array();
dishNum = new Array();
animOn = new Array();
dishFlagArr = new Array();
var _local1:int;
while (_local1 < TOTAL) {
_mc[("type" + (_local1 + 1))].gotoAndStop((_local1 + 1));
_mc[("type" + (_local1 + 1))].visible = false;
_mc[("type" + (_local1 + 1))].buttonMode = true;
_mc[("type" + (_local1 + 1))].mouseChildren = false;
_mc[("anim" + (_local1 + 1))].gotoAndStop((_local1 + 1));
oldPos[_local1] = new Point(_mc[("anim" + (_local1 + 1))].x, _mc[("anim" + (_local1 + 1))].y);
dishNum.push(0);
animOn.push({count:0, on:false, num:0, dir:GameUtil.getSign((_mc[("type" + (_local1 + 1))].x - _mc[("anim" + (_local1 + 1))].x)), left:0});
dishFlagArr.push(0);
_local1++;
};
}
public function setDishFlag(_arg1:int, _arg2:int):void{
dishFlagArr[(_arg1 - 1)] = (dishFlagArr[(_arg1 - 1)] + _arg2);
}
override public function setData(_arg1:Object):void{
_mc.table.gotoAndStop(_arg1.table.level);
_mc.table.buttonMode = true;
_mc.door.gotoAndStop(_arg1.door.level);
_mc.tree.gotoAndStop(_arg1.tree.level);
_mc.tree.mouseChildren = false;
_mc.tree.buttonMode = true;
initPlate();
addEventListener(Event.ENTER_FRAME, onMyEnterFrame);
if (_arg1.table.level == 2){
WaitCount = 5;
};
setDoorClosed(false);
}
public function addPlate(_arg1:int):void{
if (animOn[(_arg1 - 1)].left > 0){
animOn[(_arg1 - 1)].left--;
trace("已经有一份菜!!", _arg1, animOn[(_arg1 - 1)].left);
} else {
if (animOn[(_arg1 - 1)].on){
animOn[(_arg1 - 1)].num = 2;
} else {
animOn[(_arg1 - 1)].num = 1;
};
animOn[(_arg1 - 1)].count = WaitCount;
animOn[(_arg1 - 1)].on = true;
setDishFlag(_arg1, 1);
};
}
public function setDoorClosed(_arg1:Boolean):void{
if (_arg1){
_mc.closed.visible = true;
} else {
_mc.closed.visible = false;
};
}
}
}//package src.view
Section 112
//Shop (src.view.Shop)
package src.view {
import flash.events.*;
import src.sys.*;
import src.sys.scene.*;
import src.vo.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
import src.ui.pop.*;
public class Shop extends ViewMC {
public const LEVEL_ITEMS:Array;
protected var _scene:ShopScene;
protected var buyObj:Object;
protected var _roomVo:RoomVO;
protected var ui_buy:UI_Buy;
protected var curCoins:int;
protected var totalCost:int;
public function Shop(_arg1:String){
LEVEL_ITEMS = ["road", "door", "table", "light", "tree", "carpet"];
super(_arg1);
buttonMode = true;
init();
_scene = (SceneMgr.scene as ShopScene);
}
public function buySth(_arg1:String):void{
var _local4:int;
if (!mc[_arg1].visible){
return;
};
if (ui_buy){
return;
};
ui_buy = new UI_Buy();
GameUtil.addChild(ui_buy, _scene.uiCtn, (Data.stageWidth / 2), (Data.stageHeight / 2));
ui_buy.setData({coins:curCoins});
ui_buy.setCallback(buy_callback);
setBtnEnable(false);
var _local2:String = _arg1;
var _local3:int;
if (_arg1.search("bath") != -1){
_local2 = "bath";
_local3 = int(_arg1.replace((_local2 + "_"), ""));
ui_buy.setType("bath", 0);
} else {
if (_arg1.search("flower") != -1){
_local2 = "flower";
_local3 = int(_arg1.replace((_local2 + "_"), ""));
ui_buy.setType("flower", 0);
} else {
if (LEVEL_ITEMS.indexOf(_arg1) != -1){
if (_arg1 == "light"){
_local4 = (_roomVo[_arg1]) ? (_roomVo[_arg1].level + 1) : 1;
} else {
_local4 = _roomVo[_arg1].level;
};
ui_buy.setType(_arg1, _local4);
} else {
ui_buy.setType(_arg1, 0);
};
};
};
buyObj = {type:_local2, id:_local3};
}
override public function remove():void{
super.remove();
removeEventListener(MouseEvent.CLICK, onMyMouseClick);
}
public function setArrows():void{
if (_roomVo.table.level == 2){
_mc.table.visible = false;
};
_mc.carpet.mouseChildren = false;
if (_roomVo.carpet.level == 3){
_mc.carpet.visible = false;
};
if (_roomVo.tree.level == 3){
_mc.tree.visible = false;
};
var _local1:int;
while (_local1 < Data.Bath_Num) {
if (_mc[("bath_" + (_local1 + 1))]){
if ((((_roomVo.pool.level == 1)) && (!(GameUtil.checkInArr(_roomVo.pool.ices, (_local1 + 1)))))){
_mc[("bath_" + (_local1 + 1))].visible = true;
} else {
_mc[("bath_" + (_local1 + 1))].visible = false;
};
_mc[("bath_" + (_local1 + 1))].mouseChildren = false;
};
_local1++;
};
var _local2:int;
while (_local2 < (Data.Bath_Num / 2)) {
if ((((_roomVo.pool.level == 2)) && (!(GameUtil.checkInArr(_roomVo.pool.flowers, (_local2 + 1)))))){
_mc[("flower_" + (_local2 + 1))].visible = true;
} else {
_mc[("flower_" + (_local2 + 1))].visible = false;
};
_local2++;
};
if ((((_roomVo.pool.level == 1)) && ((_roomVo.pool.ices.length >= 15)))){
_mc.pool.visible = true;
} else {
_mc.pool.visible = false;
};
}
protected function init():void{
_mc.mc_coin.mouseChildren = false;
_mc.mc_coin.buttonMode = false;
addEventListener(MouseEvent.CLICK, onMyMouseClick);
curCoins = LevelControl.getPlayerInfo(LevelControl.curUser).score;
setCoin(curCoins);
}
public function setEnable(_arg1:String, _arg2:Boolean):void{
_mc[_arg1].visible = _arg2;
}
protected function buy_callback(_arg1:Boolean, _arg2:int=0):void{
ui_buy = null;
setBtnEnable(true);
if (_arg1){
curCoins = (curCoins - _arg2);
totalCost = (totalCost + _arg2);
checkBuySth();
buyObj = null;
};
}
public function setCoin(_arg1:int):void{
GameUtil.setScoreNum(_arg1, 5, _mc.mc_coin.num_coin);
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
_roomVo = _arg1.roomVo;
setArrows();
}
protected function btn_next_func():void{
LevelControl.saveShopInfo(LevelControl.curUser, _scene.roomInfo.roomVo, totalCost);
SceneMgr.removeScene();
SceneMgr.createScene("GameScene", LevelControl.curLevel);
}
public function onMyMouseClick(_arg1:Event):void{
var str:String;
var e = _arg1;
if (_mc.mc_coin.contains(e.target)){
return;
};
try {
str = e.target.name;
if (str.search("btn_") != -1){
var _local3 = this;
_local3[(str + "_func")]();
} else {
buySth(str);
};
} catch(e:Error) {
trace("Error:", e);
};
}
protected function checkBuySth():void{
var _local1:String = buyObj.type;
var _local2:int = buyObj.id;
setCoin(curCoins);
setBtnEnable(false);
_scene.buyAction(_local1, _local2);
}
public function endAction():void{
setArrows();
setBtnEnable(true);
}
protected function setBtnEnable(_arg1:Boolean):void{
mouseEnabled = _arg1;
mouseChildren = _arg1;
}
}
}//package src.view
Section 113
//Waiter (src.view.Waiter)
package src.view {
import src.sys.scene.*;
import flash.display.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
import src.model.*;
public class Waiter extends RoleV {
protected const womenArr:Array;
protected var stopCycle:Boolean;// = false
public var waitOther:Boolean;// = false
protected var skate_pre:String;// = ""
protected var id:int;
protected var desCustom:Customer;
protected var handDish:int;// = 0
protected var _room:RoomInfo;
protected var myActArr:Array;
protected var serveCount:int;// = 0
protected var walkCount:int;// = 0
protected var readyDish:int;// = 0
protected var checkCount:int;// = 0
public var phase:int;// = 2
public static const PHASE_SERVE:int = 3;
public static const PHASE_WALK:int = 1;
public static const PHASE_REACH:int = 2;
public function Waiter(_arg1:String){
womenArr = [2, 3];
super(_arg1);
}
override protected function commonAction():void{
if (!myActionFinished){
return;
};
changeFrame("stand");
}
override public function animOver():void{
if (myCurrentLabel.search("send") != -1){
desCustom.serveMe();
endServe();
} else {
if (myCurrentLabel == "mud"){
endServe();
} else {
if (myCurrentLabel == "sk_sway"){
myActionFinished = true;
commonAction();
this.arrivalAction();
return;
};
if (((!((myCurrentLabel.search("get") == -1))) || ((myCurrentLabel == "upset")))){
_room.checkWaiterTogether(id, myCol, myRow);
};
};
};
super.animOver();
}
override public function remove():void{
super.remove();
}
override public function pause():void{
if ((_mc.getChildAt(0) as MovieClip)){
(_mc.getChildAt(0) as MovieClip).stop();
if (innerMc.dish){
innerMc.dish.stop();
};
};
}
protected function arrivalAction():void{
var _local1:int;
var _local2:int;
if (desCustom){
_local1 = desCustom.bathId;
curDir = GameUtil.getDir((Data.Bath_Pos[(_local1 - 1)][0] - myX));
scaleMe(curDir);
startServe(desCustom.curServeId, _local1);
} else {
if (readyDish){
if (_room.checkAvailServe(readyDish)){
_room.freezeCustomMode(readyDish);
handDish = readyDish;
readyDish = 0;
changeFrame("get");
(SceneMgr.scene as GameScene).fg.takeDish(handDish, -1);
curDir = GameUtil.getDir((Data.Dish_Pos[(handDish - 1)][0] - myX));
scaleMe(curDir);
SoundObject.playSound(Data.SFX_GET);
} else {
(SceneMgr.scene as GameScene).takeDishFlag(readyDish, 1);
changeFrame("upset");
readyDish = 0;
_local2 = 1;
if (GameUtil.checkInArr(womenArr, id)){
_local2 = 2;
};
SoundObject.playSound(Data[("SFX_GRRR" + _local2)]);
};
} else {
commonAction();
if (myActionFinished){
_room.checkWaiterTogether(id, myCol, myRow);
};
};
};
}
override protected function init():void{
super.init();
curDir = 1;
}
public function returnToStartPos():Boolean{
var _local2:int;
var _local3:int;
var _local1:Boolean;
if ((((phase == PHASE_REACH)) && (myActionFinished))){
_local2 = 0;
_local3 = 0;
if (((!((myRow == Data.WaiterInitPos[(id - 1)][1]))) && (!((myRow == 2))))){
_local3 = 1;
} else {
if ((((myCol == Data.WaiterInitPos[(id - 1)][0])) && ((myRow == Data.WaiterInitPos[(id - 1)][1])))){
if (myCol == 2){
_local2 = -1;
} else {
_local2 = 1;
};
};
};
move((Data.WaiterInitPos[(id - 1)][((_local3 * 2) + 0)] + _local2), Data.WaiterInitPos[(id - 1)][((_local3 * 2) + 1)]);
} else {
trace("Return Wrong! ", phase, myActionFinished);
};
return (_local1);
}
public function endServe():void{
phase = PHASE_REACH;
handDish = 0;
commonAction();
setTilePos(myCol, myRow);
myY = (myY + (id - 2));
desCustom.bFlag = false;
desCustom = null;
_room.checkWaiterTogether(id, myCol, myRow);
}
override public function changeFrame(_arg1:String):void{
if (((!((_arg1 == "bath"))) && (!((_arg1 == "mud"))))){
_arg1 = (skate_pre + _arg1);
};
if (myCurrentLabel != _arg1){
checkCount = 2;
};
super.changeFrame(_arg1);
}
protected function setBathPos(_arg1:int):void{
setPos(Data.Bath_Pos[(_arg1 - 1)][0], (Data.Bath_Pos[(_arg1 - 1)][1] + 1));
curDir = (((_arg1 % 2) == 1)) ? 1 : -1;
scaleMe(curDir);
}
public function cycleFrame():void{
if (!stopCycle){
innerMcJump(1, false);
};
}
override public function setData(_arg1:Object):void{
super.setData(_arg1);
id = _arg1.id;
skate_pre = (_arg1.skate) ? "sk_" : "";
mySpeed = (_arg1.speed) ? _arg1.speed : 6;
myActArr = new Array();
_room = _arg1.room;
commonAction();
}
public function clearMud():void{
desCustom.resumeFrame();
}
public function get curServe():int{
return (handDish);
}
public function takeDish(_arg1:int):void{
if (phase == PHASE_REACH){
if (!handDish){
readyDish = _arg1;
move(Data.Dish_Pos[(_arg1 - 1)][4], Data.Dish_Pos[(_arg1 - 1)][5]);
};
};
}
override public function updateEvents():void{
super.updateEvents();
updateServe();
if (checkCount){
checkCount--;
checkDishMc();
};
walkAction();
}
public function doServe(_arg1:Customer):void{
var _local2:int;
if (phase == PHASE_REACH){
desCustom = _arg1;
_arg1.bFlag = true;
_local2 = _arg1.bathId;
move(Data.Bath_Pos[(_local2 - 1)][4], Data.Bath_Pos[(_local2 - 1)][5]);
};
}
public function checkCanServe(_arg1:int):Boolean{
var _local2:Boolean;
if (((myActionFinished) && ((phase == PHASE_REACH)))){
if (handDish == _arg1){
_local2 = true;
};
};
return (_local2);
}
override protected function convertXYAction():void{
if ((((myCurrentLabel == "bath")) || ((myCurrentLabel == "mud")))){
return;
};
super.convertXYAction();
}
protected function move(_arg1:int, _arg2:int):void{
var _local3:Array = moveToTile(_arg1, _arg2);
if (((_local3) && (_local3.length))){
phase = PHASE_WALK;
} else {
arrival();
};
}
public function startServe(_arg1:int, _arg2:int):void{
phase = PHASE_SERVE;
switch (_arg1){
case Data.Serve_Order:
changeFrame("order");
serveCount = Data.Serve_Time[_arg1];
handDish = 0;
desCustom.serveMe();
break;
case Data.Serve_Drink:
case Data.Serve_Eat:
case Data.Serve_Towel:
_room.unfreezeCustomMode(handDish);
changeFrame("send");
break;
case Data.Serve_Mud:
setBathPos(_arg2);
changeFrame("mud");
handDish = 0;
serveCount = 200;
desCustom.serveMe();
break;
case Data.Serve_Bath:
setBathPos(_arg2);
serveCount = Data.Serve_Time[_arg1];
changeFrame("bath");
handDish = 0;
desCustom.serveMe();
break;
};
}
override protected function posRouteMove():void{
if (this.phase == PHASE_WALK){
if (((routeArr) && ((routeArr.length > 0)))){
if (_room.checkWalk(id, myCol, myRow)){
waitOther = true;
trace("Wait!");
} else {
if (waitOther){
waitOther = false;
trace("Resume!");
};
};
};
};
if (!waitOther){
super.posRouteMove();
};
}
override protected function updateFrameEvent():void{
super.updateFrameEvent();
}
public function updateServe():void{
if (phase == PHASE_SERVE){
if (serveCount){
serveCount--;
if (!serveCount){
if (myCurrentLabel == "mud"){
stopCycle = true;
} else {
endServe();
};
};
};
};
}
protected function walkAction():void{
if (!myActionFinished){
return;
};
if (((myXspeed) || (myYspeed))){
if (Math.abs(myXspeed) >= Math.abs(myYspeed)){
changeFrame("walk_x");
} else {
if (myYspeed > 0){
changeFrame("walk_down");
} else {
changeFrame("walk_up");
};
};
if (skate_pre != ""){
};
};
}
override public function replay():void{
if ((_mc.getChildAt(0) as MovieClip)){
(_mc.getChildAt(0) as MovieClip).play();
};
}
protected function checkDishMc():void{
if (innerMc){
if (innerMc.dish){
innerMc.dish.gotoAndStop((handDish + 1));
};
};
}
override protected function arrival():void{
super.arrival();
phase = PHASE_REACH;
if (skate_pre != ""){
if (Math.random() < 0.1){
changeFrame("sway");
adjustDir();
return;
};
};
arrivalAction();
}
override public function moveToTile(_arg1:int, _arg2:int):Array{
var _local3:int;
tileArr = super.moveToTile(_arg1, _arg2);
if (((tileArr) && (tileArr.length))){
_local3 = 0;
while (_local3 < routeArr.length) {
routeArr[_local3].y = (routeArr[_local3].y + (id - 2));
_local3++;
};
};
return (tileArr);
}
protected function adjustDir():void{
var _local1:int;
if (desCustom){
_local1 = desCustom.bathId;
curDir = GameUtil.getDir((Data.Bath_Pos[(_local1 - 1)][0] - myX));
} else {
if (readyDish){
curDir = GameUtil.getDir((Data.Dish_Pos[(readyDish - 1)][0] - myX));
};
};
scaleMe(curDir);
}
public function stillSpeed():void{
myXspeed = 0;
myYspeed = 0;
}
}
}//package src.view
Section 114
//Worker (src.view.Worker)
package src.view {
import src.sys.scene.*;
import src.sys.obj.*;
import lj.src.util.*;
import src.data.*;
public class Worker extends RoleV {
protected var bComplete:Boolean;// = false
protected var myPos:Array;
protected var jobType:String;
public function Worker(_arg1:String){
super(_arg1);
mouseChildren = false;
buttonMode = true;
}
override protected function setFrameInfo(_arg1:String):void{
myFrameInfo = Data[(_arg1.toLowerCase() + "_frame")];
}
override protected function commonAction():void{
changeFrame("stand2");
}
override public function animOver():void{
if (myCurrentLabel == "order"){
setPos(myPos[0], myPos[1]);
(SceneMgr.scene as ShopScene).workerDone(jobType);
};
super.animOver();
}
public function doingJob(_arg1:String):void{
this.changeFrame("order");
setPos(0, 0);
jobType = _arg1;
if (_arg1 == "road"){
SoundObject.playSound(Data.SFX_ROAD, 2);
} else {
if (_arg1 == "door"){
SoundObject.playSound(Data.SFX_DOOR, 2);
} else {
if (_arg1 == "light"){
SoundObject.playSound(Data.SFX_LIGHT, 2);
};
};
};
}
override public function updateEvents():void{
super.updateEvents();
walkAction();
}
public function stand():void{
commonAction();
}
override protected function arrival():void{
super.arrival();
curDir = 1;
scaleMe(curDir);
commonAction();
if (bComplete){
(SceneMgr.scene as ShopScene).walkComplete();
};
myPos = [myX, myY];
}
public function setComplete():void{
bComplete = true;
}
protected function walkAction():void{
if (((myXspeed) || (myYspeed))){
changeFrame("walk2");
};
}
}
}//package src.view
Section 115
//RoomVO (src.vo.RoomVO)
package src.vo {
public class RoomVO {
public var road:Object;
public var waiterNum:int;// = 2
public var door:Object;
public var carpet:Object;
public var table:Object;
public var light:Object;
public var pool:Object;
public var tree:Object;
}
}//package src.vo
Section 116
//BathHit (BathHit)
package {
import flash.display.*;
public dynamic class BathHit extends MovieClip {
}
}//package
Section 117
//Custom1 (Custom1)
package {
import flash.display.*;
public dynamic class Custom1 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 118
//Custom10 (Custom10)
package {
import flash.display.*;
public dynamic class Custom10 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 119
//Custom11 (Custom11)
package {
import flash.display.*;
public dynamic class Custom11 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 120
//Custom12 (Custom12)
package {
import flash.display.*;
public dynamic class Custom12 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 121
//Custom2 (Custom2)
package {
import flash.display.*;
public dynamic class Custom2 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 122
//Custom3 (Custom3)
package {
import flash.display.*;
public dynamic class Custom3 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 123
//Custom4 (Custom4)
package {
import flash.display.*;
public dynamic class Custom4 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 124
//Custom5 (Custom5)
package {
import flash.display.*;
public dynamic class Custom5 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 125
//Custom6 (Custom6)
package {
import flash.display.*;
public dynamic class Custom6 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 126
//Custom7 (Custom7)
package {
import flash.display.*;
public dynamic class Custom7 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 127
//Custom8 (Custom8)
package {
import flash.display.*;
public dynamic class Custom8 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 128
//Custom9 (Custom9)
package {
import flash.display.*;
public dynamic class Custom9 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 129
//DrinkMc (DrinkMc)
package {
import flash.display.*;
public dynamic class DrinkMc extends MovieClip {
}
}//package
Section 130
//EatFoodMc (EatFoodMc)
package {
import flash.display.*;
public dynamic class EatFoodMc extends MovieClip {
}
}//package
Section 131
//full_1 (full_1)
package {
import flash.media.*;
public dynamic class full_1 extends Sound {
}
}//package
Section 132
//full_2 (full_2)
package {
import flash.media.*;
public dynamic class full_2 extends Sound {
}
}//package
Section 133
//full_3 (full_3)
package {
import flash.media.*;
public dynamic class full_3 extends Sound {
}
}//package
Section 134
//HamsterMain (HamsterMain)
package {
import src.sys.*;
import flash.display.*;
import lj.src.util.*;
import src.data.*;
import lj.src.*;
public class HamsterMain extends DocumentClass {
public static var a:int = 3;
override protected function start():void{
var _local2:FPSShow;
var _local1:GameMain = new GameMain();
_local1.init();
stage.scaleMode = StageScaleMode.SHOW_ALL;
if (Data.IF_DEBUG){
_local2 = new FPSShow();
stage.addChild(_local2);
};
}
}
}//package
Section 135
//IntroBG (IntroBG)
package {
import flash.media.*;
public dynamic class IntroBG extends Sound {
}
}//package
Section 136
//Level_BG (Level_BG)
package {
import flash.display.*;
public dynamic class Level_BG extends MovieClip {
public var road:MovieClip;
public var smoke1:MovieClip;
public var smoke2:MovieClip;
public var door:MovieClip;
public var light:MovieClip;
public var pool:MovieClip;
}
}//package
Section 137
//LevelBGup (LevelBGup)
package {
import flash.display.*;
public dynamic class LevelBGup extends MovieClip {
public var anim1:MovieClip;
public var anim2:MovieClip;
public var anim4:MovieClip;
public var anim3:MovieClip;
public var anim5:MovieClip;
public var table:MovieClip;
public var tree:MovieClip;
public var closed:MovieClip;
public var door:MovieClip;
public var type1:MovieClip;
public var type2:MovieClip;
public var type3:MovieClip;
public var type4:MovieClip;
public var type5:MovieClip;
}
}//package
Section 138
//LevelFG2 (LevelFG2)
package {
import flash.display.*;
public dynamic class LevelFG2 extends MovieClip {
public var light:MovieClip;
}
}//package
Section 139
//LogoMary (LogoMary)
package {
import flash.media.*;
import flash.events.*;
import flash.display.*;
import flash.text.*;
import flash.geom.*;
import flash.accessibility.*;
import flash.filters.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
import adobe.utils.*;
import flash.errors.*;
import flash.external.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class LogoMary extends MovieClip {
public var __id0_:MovieClip;
public function LogoMary(){
__setProp___id0__Logo_();
}
function __setProp___id0__Logo_(){
try {
__id0_["componentInspectorSetting"] = true;
} catch(e:Error) {
};
__id0_.Type = "logo-ingame";
__id0_.Goto = 1;
try {
__id0_["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package
Section 140
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
if (Security.sandboxType == "localWithFile"){
return (null);
};
var _local3:MochiBot = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
var _local4 = "http://core.mochibot.com/my/core.swf";
var _local5:URLVariables = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
var _local6:String = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
var _local7:URLRequest = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
var _local8:Loader = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 141
//MoreGameURLOK (MoreGameURLOK)
package {
public class MoreGameURLOK {
public static var Goto:String;
public static var MoreGameURLOK:Function;
public static function Ready(){
}
}
}//package
Section 142
//Music2 (Music2)
package {
import flash.media.*;
public dynamic class Music2 extends Sound {
}
}//package
Section 143
//NeedMc (NeedMc)
package {
import flash.display.*;
public dynamic class NeedMc extends MovieClip {
public var type:MovieClip;
}
}//package
Section 144
//open (open)
package {
import flash.media.*;
public dynamic class open extends Sound {
}
}//package
Section 145
//put (put)
package {
import flash.media.*;
public dynamic class put extends Sound {
}
}//package
Section 146
//run_1 (run_1)
package {
import flash.media.*;
public dynamic class run_1 extends Sound {
}
}//package
Section 147
//run_2 (run_2)
package {
import flash.media.*;
public dynamic class run_2 extends Sound {
}
}//package
Section 148
//Sfx_angry_1 (Sfx_angry_1)
package {
import flash.media.*;
public dynamic class Sfx_angry_1 extends Sound {
}
}//package
Section 149
//Sfx_angry_2 (Sfx_angry_2)
package {
import flash.media.*;
public dynamic class Sfx_angry_2 extends Sound {
}
}//package
Section 150
//Sfx_angry_3 (Sfx_angry_3)
package {
import flash.media.*;
public dynamic class Sfx_angry_3 extends Sound {
}
}//package
Section 151
//Sfx_angry_4 (Sfx_angry_4)
package {
import flash.media.*;
public dynamic class Sfx_angry_4 extends Sound {
}
}//package
Section 152
//Sfx_Button1 (Sfx_Button1)
package {
import flash.media.*;
public dynamic class Sfx_Button1 extends Sound {
}
}//package
Section 153
//Sfx_Button2 (Sfx_Button2)
package {
import flash.media.*;
public dynamic class Sfx_Button2 extends Sound {
}
}//package
Section 154
//Sfx_Cash (Sfx_Cash)
package {
import flash.media.*;
public dynamic class Sfx_Cash extends Sound {
}
}//package
Section 155
//Sfx_CoverBG (Sfx_CoverBG)
package {
import flash.media.*;
public dynamic class Sfx_CoverBG extends Sound {
}
}//package
Section 156
//Sfx_Done (Sfx_Done)
package {
import flash.media.*;
public dynamic class Sfx_Done extends Sound {
}
}//package
Section 157
//Sfx_door (Sfx_door)
package {
import flash.media.*;
public dynamic class Sfx_door extends Sound {
}
}//package
Section 158
//Sfx_Drink (Sfx_Drink)
package {
import flash.media.*;
public dynamic class Sfx_Drink extends Sound {
}
}//package
Section 159
//Sfx_eat (Sfx_eat)
package {
import flash.media.*;
public dynamic class Sfx_eat extends Sound {
}
}//package
Section 160
//Sfx_Fail (Sfx_Fail)
package {
import flash.media.*;
public dynamic class Sfx_Fail extends Sound {
}
}//package
Section 161
//Sfx_GameBG1 (Sfx_GameBG1)
package {
import flash.media.*;
public dynamic class Sfx_GameBG1 extends Sound {
}
}//package
Section 162
//Sfx_get (Sfx_get)
package {
import flash.media.*;
public dynamic class Sfx_get extends Sound {
}
}//package
Section 163
//Sfx_Goal (Sfx_Goal)
package {
import flash.media.*;
public dynamic class Sfx_Goal extends Sound {
}
}//package
Section 164
//Sfx_grrr_1 (Sfx_grrr_1)
package {
import flash.media.*;
public dynamic class Sfx_grrr_1 extends Sound {
}
}//package
Section 165
//Sfx_grrr_2 (Sfx_grrr_2)
package {
import flash.media.*;
public dynamic class Sfx_grrr_2 extends Sound {
}
}//package
Section 166
//Sfx_Hammer (Sfx_Hammer)
package {
import flash.media.*;
public dynamic class Sfx_Hammer extends Sound {
}
}//package
Section 167
//Sfx_Hello (Sfx_Hello)
package {
import flash.media.*;
public dynamic class Sfx_Hello extends Sound {
}
}//package
Section 168
//Sfx_light (Sfx_light)
package {
import flash.media.*;
public dynamic class Sfx_light extends Sound {
}
}//package
Section 169
//Sfx_light_up (Sfx_light_up)
package {
import flash.media.*;
public dynamic class Sfx_light_up extends Sound {
}
}//package
Section 170
//Sfx_Night (Sfx_Night)
package {
import flash.media.*;
public dynamic class Sfx_Night extends Sound {
}
}//package
Section 171
//Sfx_order_1 (Sfx_order_1)
package {
import flash.media.*;
public dynamic class Sfx_order_1 extends Sound {
}
}//package
Section 172
//Sfx_order_2 (Sfx_order_2)
package {
import flash.media.*;
public dynamic class Sfx_order_2 extends Sound {
}
}//package
Section 173
//Sfx_order_3 (Sfx_order_3)
package {
import flash.media.*;
public dynamic class Sfx_order_3 extends Sound {
}
}//package
Section 174
//Sfx_order_4 (Sfx_order_4)
package {
import flash.media.*;
public dynamic class Sfx_order_4 extends Sound {
}
}//package
Section 175
//Sfx_Pass (Sfx_Pass)
package {
import flash.media.*;
public dynamic class Sfx_Pass extends Sound {
}
}//package
Section 176
//Sfx_Poor (Sfx_Poor)
package {
import flash.media.*;
public dynamic class Sfx_Poor extends Sound {
}
}//package
Section 177
//Sfx_road (Sfx_road)
package {
import flash.media.*;
public dynamic class Sfx_road extends Sound {
}
}//package
Section 178
//Sfx_run (Sfx_run)
package {
import flash.media.*;
public dynamic class Sfx_run extends Sound {
}
}//package
Section 179
//Sfx_Shop (Sfx_Shop)
package {
import flash.media.*;
public dynamic class Sfx_Shop extends Sound {
}
}//package
Section 180
//Sfx_Skating (Sfx_Skating)
package {
import flash.media.*;
public dynamic class Sfx_Skating extends Sound {
}
}//package
Section 181
//Sfx_smoke (Sfx_smoke)
package {
import flash.media.*;
public dynamic class Sfx_smoke extends Sound {
}
}//package
Section 182
//Sfx_Wait (Sfx_Wait)
package {
import flash.media.*;
public dynamic class Sfx_Wait extends Sound {
}
}//package
Section 183
//Sfx_Water (Sfx_Water)
package {
import flash.media.*;
public dynamic class Sfx_Water extends Sound {
}
}//package
Section 184
//Sfx_Win (Sfx_Win)
package {
import flash.media.*;
public dynamic class Sfx_Win extends Sound {
}
}//package
Section 185
//ShopArrows (ShopArrows)
package {
import flash.display.*;
public dynamic class ShopArrows extends MovieClip {
public var flower_10:MovieClip;
public var bath_9:MovieClip;
public var bath_20:MovieClip;
public var pool:MovieClip;
public var light:MovieClip;
public var tree:MovieClip;
public var road:MovieClip;
public var mc_coin:MovieClip;
public var door:MovieClip;
public var carpet:MovieClip;
public var flower_1:MovieClip;
public var table:MovieClip;
public var flower_3:MovieClip;
public var flower_4:MovieClip;
public var flower_5:MovieClip;
public var flower_7:MovieClip;
public var flower_8:MovieClip;
public var flower_2:MovieClip;
public var flower_6:MovieClip;
public var flower_9:MovieClip;
public var bath_1:MovieClip;
public var bath_2:MovieClip;
public var bath_3:MovieClip;
public var bath_5:MovieClip;
public var bath_10:MovieClip;
public var bath_12:MovieClip;
public var bath_14:MovieClip;
public var bath_16:MovieClip;
public var bath_7:MovieClip;
public var bath_11:MovieClip;
public var bath_19:MovieClip;
public var role:MovieClip;
public var bath_17:MovieClip;
public var bath_18:MovieClip;
public var btn_next:SimpleButton;
}
}//package
Section 186
//smile_1 (smile_1)
package {
import flash.media.*;
public dynamic class smile_1 extends Sound {
}
}//package
Section 187
//smile_2 (smile_2)
package {
import flash.media.*;
public dynamic class smile_2 extends Sound {
}
}//package
Section 188
//Smoke (Smoke)
package {
import flash.display.*;
public dynamic class Smoke extends MovieClip {
}
}//package
Section 189
//Sonw (Sonw)
package {
import flash.display.*;
public dynamic class Sonw extends MovieClip {
}
}//package
Section 190
//take (take)
package {
import flash.media.*;
public dynamic class take extends Sound {
}
}//package
Section 191
//Waiter1 (Waiter1)
package {
import flash.display.*;
public dynamic class Waiter1 extends MovieClip {
}
}//package
Section 192
//Waiter2 (Waiter2)
package {
import flash.display.*;
public dynamic class Waiter2 extends MovieClip {
}
}//package
Section 193
//Waiter3 (Waiter3)
package {
import flash.display.*;
public dynamic class Waiter3 extends MovieClip {
}
}//package
Section 194
//Waiter4 (Waiter4)
package {
import flash.display.*;
public dynamic class Waiter4 extends MovieClip {
}
}//package
Section 195
//Worker_1 (Worker_1)
package {
import flash.display.*;
public dynamic class Worker_1 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 196
//Worker_2 (Worker_2)
package {
import flash.display.*;
public dynamic class Worker_2 extends MovieClip {
public var mc:MovieClip;
}
}//package
Section 197
//Worker_3 (Worker_3)
package {
import flash.display.*;
public dynamic class Worker_3 extends MovieClip {
public var mc:MovieClip;
}
}//package