Section 1
//all_mc_13 (BoxOffice8_fla.all_mc_13)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class all_mc_13 extends MovieClip {
public function all_mc_13(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 2
//btn_View_mc_262 (BoxOffice8_fla.btn_View_mc_262)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class btn_View_mc_262 extends MovieClip {
public var btn_view:SimpleButton;
public function btn_View_mc_262(){
addFrameScript(0, frame1);
}
function frame1(){
btn_view.addEventListener(MouseEvent.CLICK, click);
}
public function click(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com/score/index.asp?game=boxoffice"), "_blank");
}
}
}//package BoxOffice8_fla
Section 3
//Confirm_Mc_143 (BoxOffice8_fla.Confirm_Mc_143)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Confirm_Mc_143 extends MovieClip {
public function Confirm_Mc_143(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 4
//Cream_Mahcine_114 (BoxOffice8_fla.Cream_Mahcine_114)
package BoxOffice8_fla {
import flash.display.*;
public dynamic class Cream_Mahcine_114 extends MovieClip {
public var _mc:MovieClip;
public var Chose_mc:MovieClip;
public var Price_mc:MovieClip;
}
}//package BoxOffice8_fla
Section 5
//Drink_Machine_113 (BoxOffice8_fla.Drink_Machine_113)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Drink_Machine_113 extends MovieClip {
public var Chose_mc:MovieClip;
public var Price_mc:MovieClip;
public function Drink_Machine_113(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 6
//Films_mc_91 (BoxOffice8_fla.Films_mc_91)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Films_mc_91 extends MovieClip {
public var Chose_mc:MovieClip;
public var Price_mc:MovieClip;
public var New_mc:MovieClip;
public function Films_mc_91(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 7
//GameOverHead_243 (BoxOffice8_fla.GameOverHead_243)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class GameOverHead_243 extends MovieClip {
public function GameOverHead_243(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 8
//loading_11 (BoxOffice8_fla.loading_11)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class loading_11 extends MovieClip {
public function loading_11(){
addFrameScript(133, frame134);
}
function frame134(){
stop();
(root as MovieClip).play();
}
}
}//package BoxOffice8_fla
Section 9
//loading_3 (BoxOffice8_fla.loading_3)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import loading.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class loading_3 extends MovieClip {
public var txt:LoadingTxt;
public var loading_text_mc:MovieClip;
public function loading_3(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 38, frame39);
}
function frame3(){
this.visible = true;
}
function frame1(){
this.visible = false;
}
function frame2(){
(this.parent as PrevLoader).checkGoNext();
}
function frame39(){
stop();
txt.onLoadComplete = (parent as PrevLoader).goNext;
loading_text_mc.txt.text = "Loading...";
loading_text_mc.txt.autoSize = "center";
}
}
}//package BoxOffice8_fla
Section 10
//loading_8 (BoxOffice8_fla.loading_8)
package BoxOffice8_fla {
import flash.display.*;
public dynamic class loading_8 extends MovieClip {
public var txt:Txt1;
}
}//package BoxOffice8_fla
Section 11
//sfx_mc_259 (BoxOffice8_fla.sfx_mc_259)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class sfx_mc_259 extends MovieClip {
public function sfx_mc_259(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 12
//Timeline_115 (BoxOffice8_fla.Timeline_115)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_115 extends MovieClip {
public function Timeline_115(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 13
//Timeline_118 (BoxOffice8_fla.Timeline_118)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_118 extends MovieClip {
public function Timeline_118(){
addFrameScript(9, frame10);
}
function frame10(){
stop();
}
}
}//package BoxOffice8_fla
Section 14
//Timeline_122 (BoxOffice8_fla.Timeline_122)
package BoxOffice8_fla {
import flash.display.*;
public dynamic class Timeline_122 extends MovieClip {
public var Drink_btn:SimpleButton;
public var Chose2_mc:MovieClip;
public var Pop_btn:SimpleButton;
public var Chose3_mc:MovieClip;
public var Ticket_btn:SimpleButton;
public var Chose1_mc:MovieClip;
}
}//package BoxOffice8_fla
Section 15
//Timeline_132 (BoxOffice8_fla.Timeline_132)
package BoxOffice8_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_132 extends MovieClip {
public var _txt:TextField;
}
}//package BoxOffice8_fla
Section 16
//Timeline_135 (BoxOffice8_fla.Timeline_135)
package BoxOffice8_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_135 extends MovieClip {
public var _txt:TextField;
}
}//package BoxOffice8_fla
Section 17
//Timeline_155 (BoxOffice8_fla.Timeline_155)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_155 extends MovieClip {
public var Chose_mc:MovieClip;
public var New_mc:MovieClip;
public function Timeline_155(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 18
//Timeline_198 (BoxOffice8_fla.Timeline_198)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_198 extends MovieClip {
public function Timeline_198(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 19
//Timeline_233 (BoxOffice8_fla.Timeline_233)
package BoxOffice8_fla {
import flash.display.*;
public dynamic class Timeline_233 extends MovieClip {
public var Ticket_mc:MovieClip;
}
}//package BoxOffice8_fla
Section 20
//Timeline_234 (BoxOffice8_fla.Timeline_234)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_234 extends MovieClip {
public function Timeline_234(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 21
//Timeline_250 (BoxOffice8_fla.Timeline_250)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_250 extends MovieClip {
public function Timeline_250(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package BoxOffice8_fla
Section 22
//Timeline_260 (BoxOffice8_fla.Timeline_260)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_260 extends MovieClip {
public function Timeline_260(){
addFrameScript(21, frame22);
}
function frame22(){
stop();
}
}
}//package BoxOffice8_fla
Section 23
//Timeline_90 (BoxOffice8_fla.Timeline_90)
package BoxOffice8_fla {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Timeline_90 extends MovieClip {
public var Drink1_mc:MovieClip;
public var Film1_mc:MovieClip;
public var Cream2_mc:MovieClip;
public var Film4_mc:MovieClip;
public var Drink2_mc:MovieClip;
public var Film2_mc:MovieClip;
public var Cream3_mc:MovieClip;
public var Drink3_mc:MovieClip;
public var Film3_mc:MovieClip;
public var Cream1_mc:MovieClip;
public function Timeline_90(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package BoxOffice8_fla
Section 24
//Timeline_99 (BoxOffice8_fla.Timeline_99)
package BoxOffice8_fla {
import flash.display.*;
import flash.text.*;
public dynamic class Timeline_99 extends MovieClip {
public var _txt:TextField;
}
}//package BoxOffice8_fla
Section 25
//YESORNO_139 (BoxOffice8_fla.YESORNO_139)
package BoxOffice8_fla {
import flash.display.*;
public dynamic class YESORNO_139 extends MovieClip {
public var yes_btn:SimpleButton;
public var confirm_mc:MovieClip;
public var ok_btn:SimpleButton;
public var no_btn:SimpleButton;
}
}//package BoxOffice8_fla
Section 26
//Strong (fl.transitions.easing.Strong)
package fl.transitions.easing {
public class Strong {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return (((((((_arg3 * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
return ((((((((_arg3 / 2) * _arg1) * _arg1) * _arg1) * _arg1) * _arg1) + _arg2));
};
_arg1 = (_arg1 - 2);
return ((((_arg3 / 2) * (((((_arg1 * _arg1) * _arg1) * _arg1) * _arg1) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 27
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Tween extends EventDispatcher {
private var _position:Number;// = NAN
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var isPlaying:Boolean;// = false
public var begin:Number;// = NAN
private var _fps:Number;// = NAN
private var _time:Number;// = NAN
public var change:Number;// = NAN
private var _finish:Number;// = NAN
public var looping:Boolean;// = false
private var _intervalID:uint;// = 0
public var func:Function;
private var _timer:Timer;// = null
private var _startTime:Number;// = NAN
public var prop:String;// = ""
private var _duration:Number;// = NAN
public var obj:Object;// = null
public var useSeconds:Boolean;// = false
protected static var _mc:MovieClip = new MovieClip();
public function Tween(_arg1:Object, _arg2:String, _arg3:Function, _arg4:Number, _arg5:Number, _arg6:Number, _arg7:Boolean=false){
isPlaying = false;
obj = null;
prop = "";
func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
begin = NaN;
change = NaN;
useSeconds = false;
prevTime = NaN;
prevPos = NaN;
looping = false;
_duration = NaN;
_time = NaN;
_fps = NaN;
_position = NaN;
_startTime = NaN;
_intervalID = 0;
_finish = NaN;
_timer = null;
super();
if (!arguments.length){
return;
};
this.obj = _arg1;
this.prop = _arg2;
this.begin = _arg4;
this.position = _arg4;
this.duration = _arg6;
this.useSeconds = _arg7;
if ((_arg3 is Function)){
this.func = _arg3;
};
this.finish = _arg5;
this._timer = new Timer(100);
this.start();
}
public function continueTo(_arg1:Number, _arg2:Number):void{
this.begin = this.position;
this.finish = _arg1;
if (!isNaN(_arg2)){
this.duration = _arg2;
};
this.start();
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, this._time, this._position));
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean;
_local2 = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get finish():Number{
return ((this.begin + this.change));
}
public function get duration():Number{
return (this._duration);
}
protected function startEnterFrame():void{
var _local1:Number;
if (isNaN(this._fps)){
_mc.addEventListener(Event.ENTER_FRAME, this.onEnterFrame, false, 0, true);
} else {
_local1 = (1000 / this._fps);
this._timer.delay = _local1;
this._timer.addEventListener(TimerEvent.TIMER, this.timerHandler, false, 0, true);
this._timer.start();
};
this.isPlaying = true;
}
public function set time(_arg1:Number):void{
this.prevTime = this._time;
if (_arg1 > this.duration){
if (this.looping){
this.rewind((_arg1 - this._duration));
this.update();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_LOOP, this._time, this._position));
} else {
if (this.useSeconds){
this._time = this._duration;
this.update();
};
this.stop();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_FINISH, this._time, this._position));
};
} else {
if (_arg1 < 0){
this.rewind();
this.update();
} else {
this._time = _arg1;
this.update();
};
};
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function getPosition(_arg1:Number=NaN):Number{
if (isNaN(_arg1)){
_arg1 = this._time;
};
return (this.func(_arg1, this.begin, this.change, this._duration));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function setPosition(_arg1:Number):void{
this.prevPos = this._position;
if (this.prop.length){
this.obj[this.prop] = (this._position = _arg1);
};
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_CHANGE, this._time, this._position));
}
public function resume():void{
this.fixTime();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_RESUME, this._time, this._position));
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function yoyo():void{
this.continueTo(this.begin, this.time);
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function get FPS():Number{
return (this._fps);
}
public function rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
public function get time():Number{
return (this._time);
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
}
}//package fl.transitions
Section 28
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_LOOP:String = "motionLoop";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_RESUME:String = "motionResume";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
time = NaN;
position = NaN;
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 29
//_Logo (framework._Logo)
package framework {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
public class _Logo extends Sprite {
public function _Logo(){
this.addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event):void{
this.buttonMode = true;
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
this.addEventListener(MouseEvent.MOUSE_UP, release);
}
private function release(_arg1:MouseEvent):void{
navigateToURL(new URLRequest("http://www.freeworldgroup.com"), "_blank");
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
this.removeEventListener(MouseEvent.MOUSE_UP, release);
}
}
}//package framework
Section 30
//Logo (framework.Logo)
package framework {
public dynamic class Logo extends _Logo {
}
}//package framework
Section 31
//_LoadingTxt (loading._LoadingTxt)
package loading {
import flash.display.*;
import flash.events.*;
import ui.*;
import flash.utils.*;
public class _LoadingTxt extends Sprite {
private var txt:Txt;
public var onLoadComplete:Function;
public function _LoadingTxt(){
onLoadComplete = function ():void{
};
super();
this.addEventListener(Event.ADDED_TO_STAGE, added);
}
private function added(_arg1:Event):void{
txt = (this.getChildAt(0) as Txt);
txt.autoSize = "center";
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
txt.text = "100%";
}
private function onProgress(_arg1:ProgressEvent):void{
var _local2:int;
_local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
txt.text = (_local2 + "%");
if (_local2 == 100){
if (onLoadComplete == null){
} else {
onLoadComplete();
};
};
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, onProgress);
txt = null;
onLoadComplete = null;
}
}
}//package loading
Section 32
//_PrevLoader (loading._PrevLoader)
package loading {
import flash.display.*;
import flash.events.*;
import ui.*;
import mochi.as3.*;
import flash.utils.*;
public class _PrevLoader extends MovieClip {
public var mochi_code:String;
public var protection:Boolean;// = true
public var maskRect;
public function _PrevLoader(){
protection = true;
super();
stage.showDefaultContextMenu = false;
mochi_code = "1fe3cf6b6d654cfb";
(root as MovieClip).stop();
}
public function set skip(_arg1:Boolean):void{
if (_arg1){
this.stop();
stopAll(this);
(root as MovieClip).play();
this.visible = false;
};
}
private function isInUrlFront(_arg1:String):Boolean{
var _local2:String;
_local2 = this.loaderInfo.url;
_local2.toLowerCase();
_arg1.toLowerCase();
return ((_local2.indexOf(_arg1) == 0));
}
public function init():void{
stop();
_MaskRect.setPos((this.getChildByName("maskRect") as _MaskRect), setPos);
}
public function checkGoNext():void{
if (this.loaderInfo.bytesLoaded == this.loaderInfo.bytesTotal){
goNext();
};
}
public function goNext():void{
}
public function goNext2():void{
var mochi_container:Sprite;
mochi_container = (this.getChildByName("mochi_container") as Sprite);
try {
MochiAd.unload(mochi_container);
} catch(e) {
};
this.gotoAndStop(4);
}
private function setPos(_arg1:int, _arg2:int):void{
var _local3:Sprite;
this.x = (_arg1 / 2);
this.y = (_arg2 / 2);
_local3 = (this.getChildByName("mochi_container") as Sprite);
_local3.x = (-(_arg1) / 2);
_local3.y = (-(_arg2) / 2);
if (mochi_code){
MochiAd.showPreGameAd({clip:_local3, ad_failed:goNext2, ad_skipped:goNext2, ad_finished:goNext2, id:mochi_code, res:((_arg1 + "x") + _arg2)});
};
}
private function isIn(_arg1:String):Boolean{
return (((((((isInUrlFront(_arg1)) || (isInUrlFront(("http://" + _arg1))))) || (isInUrlFront(("http://www." + _arg1))))) || (isInUrlFront(("www." + _arg1)))));
}
public static function stopAll(_arg1:DisplayObject){
var _local2:DisplayObjectContainer;
var _local3:int;
if ((_arg1 is DisplayObjectContainer)){
_local2 = (_arg1 as DisplayObjectContainer);
_local3 = _local2.numChildren;
while (--_local3 >= 0) {
stopAll(_local2.getChildAt(_local3));
};
if ((_arg1 is MovieClip)){
(_arg1 as MovieClip).stop();
};
};
}
}
}//package loading
Section 33
//LoadingTxt (loading.LoadingTxt)
package loading {
public dynamic class LoadingTxt extends _LoadingTxt {
}
}//package loading
Section 34
//PrevLoader (loading.PrevLoader)
package loading {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class PrevLoader extends _PrevLoader {
public function PrevLoader(){
addFrameScript(1, frame2);
__setProp_maskRect_loading_1();
}
function frame2(){
init();
}
function __setProp_maskRect_loading_1(){
try {
maskRect["componentInspectorSetting"] = true;
} catch(e:Error) {
};
maskRect.align = "center-middle";
try {
maskRect["componentInspectorSetting"] = false;
} catch(e:Error) {
};
}
}
}//package loading
Section 35
//MochiAd (mochi.as3.MochiAd)
package mochi.as3 {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.net.*;
import flash.system.*;
public class MochiAd {
public static function getVersion():String{
return ("3.02 as3");
}
public static function showClickAwayAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_timeout:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var sendHostProgress:Boolean;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, regpt:"o", method:"showClickAwayAd", res:"300x250", no_bg:true, ad_started:function ():void{
}, ad_finished:function ():void{
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
sendHostProgress = false;
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
_local3 = true;
chk.started = getTimer();
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (this.root == null){
_local3 = true;
};
if (_local3){
delete this.onEnterFrame;
};
};
doOnEnterFrame(chk);
}
public static function _isNetworkAvailable():Boolean{
return (!((Security.sandboxType == "localWithFile")));
}
public static function _allowDomains(_arg1:String):String{
var _local2:String;
_local2 = _arg1.split("/")[2].split(":")[0];
if (Security.sandboxType == "application"){
return (_local2);
};
Security.allowDomain("*");
Security.allowDomain(_local2);
Security.allowInsecureDomain("*");
Security.allowInsecureDomain(_local2);
return (_local2);
}
public static function unload(_arg1:Object):Boolean{
if (((_arg1.clip) && (_arg1.clip._mochiad))){
_arg1 = _arg1.clip;
};
if (_arg1.origFrameRate != undefined){
_arg1.stage.frameRate = _arg1.origFrameRate;
};
if (!_arg1._mochiad){
return (false);
};
if (_arg1._mochiad._containerLCName != undefined){
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "notify", {id:"unload"});
};
if (_arg1._mochiad.onUnload){
_arg1._mochiad.onUnload();
};
delete _arg1._mochiad_loaded;
delete _arg1._mochiad;
return (true);
}
public static function showInterLevelAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:2000, fadeout_time:250, regpt:"o", method:"showTimedAd", ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showInterLevelAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
MochiAd._cleanup(mc);
options.ad_finished();
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
mc.unloadAd = function ():void{
MochiAd.unload(clip);
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = (_arg1 - 250);
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Number;
var _local3:Boolean;
var _local4:Number;
if (!this.parent){
delete this.onEnterFrame;
delete this.fadeFunction;
return;
};
_local1 = this.parent._mochiad_ctr;
_local2 = (getTimer() - this.started);
_local3 = false;
if (!chk.showing){
_local4 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local4 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if (_local2 > chk.ad_timeout){
options.ad_failed();
_local3 = true;
};
};
};
if (_local2 > chk.ad_msec){
_local3 = true;
};
if (_local3){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = this.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function _parseOptions(_arg1:Object, _arg2:Object):Object{
var _local3:Object;
var _local4:String;
var _local5:Array;
var _local6:Number;
var _local7:Array;
_local3 = {};
for (_local4 in _arg2) {
_local3[_local4] = _arg2[_local4];
};
if (_arg1){
for (_local4 in _arg1) {
_local3[_local4] = _arg1[_local4];
};
};
if (_local3.clip == undefined){
throw (new Error("MochiAd is missing the 'clip' parameter. This should be a MovieClip, Sprite or an instance of a class that extends MovieClip or Sprite."));
};
_arg1 = _local3.clip.loaderInfo.parameters.mochiad_options;
if (_arg1){
_local5 = _arg1.split("&");
_local6 = 0;
while (_local6 < _local5.length) {
_local7 = _local5[_local6].split("=");
_local3[unescape(_local7[0])] = unescape(_local7[1]);
_local6++;
};
};
if (_local3.id == "test"){
trace("[MochiAd] WARNING: Using the MochiAds test identifier, make sure to use the code from your dashboard, not this example!");
};
return (_local3);
}
public static function _cleanup(_arg1:Object):void{
var idx:Number;
var k:String;
var lc:LocalConnection;
var f:Function;
var mc = _arg1;
if (("lc" in mc)){
lc = mc.lc;
f = function ():void{
try {
lc.client = null;
lc.close();
} catch(e:Error) {
};
};
setTimeout(f, 0);
};
idx = DisplayObjectContainer(mc).numChildren;
while (idx > 0) {
idx = (idx - 1);
DisplayObjectContainer(mc).removeChildAt(idx);
};
for (k in mc) {
delete mc[k];
};
}
public static function load(_arg1:Object):MovieClip{
var DEFAULTS:Object;
var clip:Object;
var depth:Number;
var mc:MovieClip;
var wh:Array;
var lv:URLVariables;
var k:String;
var server:String;
var hostname:String;
var lc:LocalConnection;
var name:String;
var loader:Loader;
var g:Function;
var req:URLRequest;
var v:Object;
var options = _arg1;
DEFAULTS = {server:"http://x.mochiads.com/srv/1/", method:"load", depth:10333, id:"_UNKNOWN_"};
options = MochiAd._parseOptions(options, DEFAULTS);
options.swfv = 9;
options.mav = MochiAd.getVersion();
clip = options.clip;
if (!MochiAd._isNetworkAvailable()){
return (null);
};
try {
if (clip._mochiad_loaded){
return (null);
};
} catch(e:Error) {
throw (new Error("MochiAd requires a clip that is an instance of a dynamic class. If your class extends Sprite or MovieClip, you must make it dynamic."));
};
depth = options.depth;
delete options.depth;
mc = createEmptyMovieClip(clip, "_mochiad", depth);
wh = MochiAd._getRes(options, clip);
options.res = ((wh[0] + "x") + wh[1]);
options.server = (options.server + options.id);
delete options.id;
clip._mochiad_loaded = true;
if (clip.loaderInfo.loaderURL.indexOf("http") == 0){
options.as3_swf = clip.loaderInfo.loaderURL;
} else {
trace("[MochiAd] NOTE: Security Sandbox Violation errors below are normal");
};
lv = new URLVariables();
for (k in options) {
v = options[k];
if (!(v is Function)){
lv[k] = v;
};
};
server = lv.server;
delete lv.server;
hostname = _allowDomains(server);
lc = new LocalConnection();
lc.client = mc;
name = ["", Math.floor(new Date().getTime()), Math.floor((Math.random() * 999999))].join("_");
lc.allowDomain("*", "localhost");
lc.allowInsecureDomain("*", "localhost");
lc.connect(name);
mc.lc = lc;
mc.lcName = name;
lv.lc = name;
lv.st = getTimer();
loader = new Loader();
g = function (_arg1:Object):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
MochiAd.unload(clip);
};
loader.contentLoaderInfo.addEventListener(Event.UNLOAD, g);
req = new URLRequest(((server + ".swf?cacheBust=") + new Date().getTime()));
req.contentType = "application/x-www-form-urlencoded";
req.method = URLRequestMethod.POST;
req.data = lv;
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function (_arg1:IOErrorEvent):void{
trace("[MochiAds] Blocked URL");
});
loader.load(req);
mc.addChild(loader);
mc._mochiad_ctr = loader;
return (mc);
}
public static function runMethod(_arg1:Object, _arg2:String, _arg3:Array):Object{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
if (typeof(_arg1[_local4[_local5]]) == "function"){
return (_arg1[_local4[_local5]].apply(_arg1, _arg3));
};
return (undefined);
}
public static function createEmptyMovieClip(_arg1:Object, _arg2:String, _arg3:Number):MovieClip{
var _local4:MovieClip;
_local4 = new MovieClip();
if (((false) && (_arg3))){
_arg1.addChildAt(_local4, _arg3);
} else {
_arg1.addChild(_local4);
};
_arg1[_arg2] = _local4;
_local4["_name"] = _arg2;
return (_local4);
}
public static function _getRes(_arg1:Object, _arg2:Object):Array{
var _local3:Object;
var _local4:Number;
var _local5:Number;
var _local6:Array;
_local3 = _arg2.getBounds(_arg2.root);
_local4 = 0;
_local5 = 0;
if (typeof(_arg1.res) != "undefined"){
_local6 = _arg1.res.split("x");
_local4 = parseFloat(_local6[0]);
_local5 = parseFloat(_local6[1]);
} else {
_local4 = (_local3.xMax - _local3.xMin);
_local5 = (_local3.yMax - _local3.yMin);
};
if ((((_local4 == 0)) || ((_local5 == 0)))){
_local4 = _arg2.stage.stageWidth;
_local5 = _arg2.stage.stageHeight;
};
return ([_local4, _local5]);
}
public static function adShowing(_arg1:Object):void{
_arg1.origFrameRate = _arg1.stage.frameRate;
_arg1.stage.frameRate = 30;
}
public static function getValue(_arg1:Object, _arg2:String):Object{
var _local3:Array;
var _local4:Number;
_local3 = _arg2.split(".");
_local4 = 0;
while (_local4 < (_local3.length - 1)) {
if ((((_arg1[_local3[_local4]] == undefined)) || ((_arg1[_local3[_local4]] == null)))){
return (undefined);
};
_arg1 = _arg1[_local3[_local4]];
_local4++;
};
return (_arg1[_local3[_local4]]);
}
public static function rpc(_arg1:Object, _arg2:Number, _arg3:Object):void{
var _local4:Object;
var _local5:Object;
switch (_arg3.id){
case "setValue":
MochiAd.setValue(_arg1, _arg3.objectName, _arg3.value);
break;
case "getValue":
_local4 = MochiAd.getValue(_arg1, _arg3.objectName);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local4);
break;
case "runMethod":
_local5 = MochiAd.runMethod(_arg1, _arg3.method, _arg3.args);
_arg1._mochiad.lc.send(_arg1._mochiad._containerLCName, "rpcResult", _arg2, _local5);
break;
default:
trace(("[mochiads rpc] unknown rpc id: " + _arg3.id));
};
}
public static function setValue(_arg1:Object, _arg2:String, _arg3:Object):void{
var _local4:Array;
var _local5:Number;
_local4 = _arg2.split(".");
_local5 = 0;
while (_local5 < (_local4.length - 1)) {
if ((((_arg1[_local4[_local5]] == undefined)) || ((_arg1[_local4[_local5]] == null)))){
return;
};
_arg1 = _arg1[_local4[_local5]];
_local5++;
};
_arg1[_local4[_local5]] = _arg3;
}
public static function showPreGameAd(_arg1:Object):void{
var DEFAULTS:Object;
var clip:Object;
var ad_msec:Number;
var ad_timeout:Number;
var fadeout_time:Number;
var mc:MovieClip;
var wh:Array;
var w:Number;
var h:Number;
var chk:MovieClip;
var bar:MovieClip;
var bar_color:Number;
var bar_background:Number;
var bar_outline:Number;
var backing_mc:MovieClip;
var backing:Object;
var inside_mc:MovieClip;
var inside:Object;
var outline_mc:MovieClip;
var outline:Object;
var complete:Boolean;
var unloaded:Boolean;
var f:Function;
var sendHostProgress:Boolean;
var fn:Function;
var r:MovieClip;
var options = _arg1;
DEFAULTS = {ad_timeout:3000, fadeout_time:250, regpt:"o", method:"showPreloaderAd", color:0xFF8A00, background:16777161, outline:13994812, no_progress_bar:false, ad_started:function ():void{
if ((this.clip is MovieClip)){
this.clip.stop();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_finished:function ():void{
if ((this.clip is MovieClip)){
this.clip.play();
} else {
throw (new Error("MochiAd.showPreGameAd requires a clip that is a MovieClip or is an instance of a class that extends MovieClip. If your clip is a Sprite, then you must provide custom ad_started and ad_finished handlers."));
};
}, ad_loaded:function (_arg1:Number, _arg2:Number):void{
}, ad_failed:function ():void{
trace("[MochiAd] Couldn't load an ad, make sure your game's local security sandbox is configured for Access Network Only and that you are not using ad blocking software");
}, ad_skipped:function ():void{
}, ad_progress:function (_arg1:Number):void{
}};
options = MochiAd._parseOptions(options, DEFAULTS);
if ("c862232051e0a94e1c3609b3916ddb17".substr(0) == "dfeada81ac97cde83665f81c12da7def"){
options.ad_started();
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
return;
};
clip = options.clip;
ad_msec = 11000;
ad_timeout = options.ad_timeout;
delete options.ad_timeout;
fadeout_time = options.fadeout_time;
delete options.fadeout_time;
if (!MochiAd.load(options)){
options.ad_failed();
options.ad_finished();
return;
};
options.ad_started();
mc = clip._mochiad;
mc["onUnload"] = function ():void{
var fn:Function;
MochiAd._cleanup(mc);
fn = function ():void{
options.ad_finished();
};
setTimeout(fn, 100);
};
wh = MochiAd._getRes(options, clip);
w = wh[0];
h = wh[1];
mc.x = (w * 0.5);
mc.y = (h * 0.5);
chk = createEmptyMovieClip(mc, "_mochiad_wait", 3);
chk.x = (w * -0.5);
chk.y = (h * -0.5);
bar = createEmptyMovieClip(chk, "_mochiad_bar", 4);
if (options.no_progress_bar){
bar.visible = false;
delete options.no_progress_bar;
} else {
bar.x = 10;
bar.y = (h - 20);
};
bar_color = options.color;
delete options.color;
bar_background = options.background;
delete options.background;
bar_outline = options.outline;
delete options.outline;
backing_mc = createEmptyMovieClip(bar, "_outline", 1);
backing = backing_mc.graphics;
backing.beginFill(bar_background);
backing.moveTo(0, 0);
backing.lineTo((w - 20), 0);
backing.lineTo((w - 20), 10);
backing.lineTo(0, 10);
backing.lineTo(0, 0);
backing.endFill();
inside_mc = createEmptyMovieClip(bar, "_inside", 2);
inside = inside_mc.graphics;
inside.beginFill(bar_color);
inside.moveTo(0, 0);
inside.lineTo((w - 20), 0);
inside.lineTo((w - 20), 10);
inside.lineTo(0, 10);
inside.lineTo(0, 0);
inside.endFill();
inside_mc.scaleX = 0;
outline_mc = createEmptyMovieClip(bar, "_outline", 3);
outline = outline_mc.graphics;
outline.lineStyle(0, bar_outline, 100);
outline.moveTo(0, 0);
outline.lineTo((w - 20), 0);
outline.lineTo((w - 20), 10);
outline.lineTo(0, 10);
outline.lineTo(0, 0);
chk.ad_msec = ad_msec;
chk.ad_timeout = ad_timeout;
chk.started = getTimer();
chk.showing = false;
chk.last_pcnt = 0;
chk.fadeout_time = fadeout_time;
chk.fadeFunction = function ():void{
var _local1:Number;
_local1 = (100 * (1 - ((getTimer() - this.fadeout_start) / this.fadeout_time)));
if (_local1 > 0){
this.parent.alpha = (_local1 * 0.01);
} else {
MochiAd.unload(clip);
delete this["onEnterFrame"];
};
};
complete = false;
unloaded = false;
f = function (_arg1:Event):void{
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
complete = true;
if (unloaded){
MochiAd.unload(clip);
};
};
if (clip.loaderInfo.bytesLoaded == clip.loaderInfo.bytesTotal){
complete = true;
} else {
if ((clip.root is MovieClip)){
r = (clip.root as MovieClip);
if (r.framesLoaded >= r.totalFrames){
complete = true;
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
} else {
clip.loaderInfo.addEventListener(Event.COMPLETE, f);
};
};
mc.unloadAd = function ():void{
unloaded = true;
if (complete){
MochiAd.unload(clip);
};
};
mc.adLoaded = options.ad_loaded;
mc.adSkipped = options.ad_skipped;
mc.adjustProgress = function (_arg1:Number):void{
var _local2:Object;
_local2 = mc._mochiad_wait;
_local2.server_control = true;
_local2.showing = true;
_local2.started = getTimer();
_local2.ad_msec = _arg1;
};
mc.rpc = function (_arg1:Number, _arg2:Object):void{
MochiAd.rpc(clip, _arg1, _arg2);
};
mc.rpcTestFn = function (_arg1:String):Object{
trace(("[MOCHIAD rpcTestFn] " + _arg1));
return (_arg1);
};
mc.regContLC = function (_arg1:String):void{
mc._containerLCName = _arg1;
};
sendHostProgress = false;
mc.sendHostLoadProgress = function (_arg1:String):void{
sendHostProgress = true;
};
chk["onEnterFrame"] = function ():void{
var _local1:Object;
var _local2:Object;
var _local3:Number;
var _local4:Boolean;
var _local5:Number;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Object;
var _local10:Number;
var _local11:Number;
if (((!(this.parent)) || (!(this.parent.parent)))){
delete this["onEnterFrame"];
return;
};
_local1 = this.parent.parent.root;
_local2 = this.parent._mochiad_ctr;
_local3 = (getTimer() - this.started);
_local4 = false;
_local5 = _local1.loaderInfo.bytesTotal;
_local6 = _local1.loaderInfo.bytesLoaded;
if (complete){
_local6 = Math.max(1, _local6);
_local5 = _local6;
};
_local7 = ((100 * _local6) / _local5);
_local8 = ((100 * _local3) / chk.ad_msec);
_local9 = this._mochiad_bar._inside;
_local10 = Math.min(100, Math.min(((_local7) || (0)), _local8));
_local10 = Math.max(this.last_pcnt, _local10);
this.last_pcnt = _local10;
_local9.scaleX = (_local10 * 0.01);
options.ad_progress(_local10);
if (sendHostProgress){
clip._mochiad.lc.send(clip._mochiad._containerLCName, "notify", {id:"hostLoadPcnt", pcnt:_local7});
if (_local7 == 100){
sendHostProgress = false;
};
};
if (!chk.showing){
_local11 = this.parent._mochiad_ctr.contentLoaderInfo.bytesTotal;
if (_local11 > 0){
chk.showing = true;
chk.started = getTimer();
MochiAd.adShowing(clip);
} else {
if ((((_local3 > chk.ad_timeout)) && ((_local7 == 100)))){
options.ad_failed();
_local4 = true;
};
};
};
if (_local3 > chk.ad_msec){
_local4 = true;
};
if (((complete) && (_local4))){
if (this.server_control){
delete this.onEnterFrame;
} else {
this.fadeout_start = getTimer();
this.onEnterFrame = chk.fadeFunction;
};
};
};
doOnEnterFrame(chk);
}
public static function showPreloaderAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showPreloaderAd was renamed to showPreGameAd in 2.0");
MochiAd.showPreGameAd(_arg1);
}
public static function showTimedAd(_arg1:Object):void{
trace("[MochiAd] DEPRECATED: showTimedAd was renamed to showInterLevelAd in 2.0");
MochiAd.showInterLevelAd(_arg1);
}
public static function doOnEnterFrame(_arg1:MovieClip):void{
var f:Function;
var mc = _arg1;
f = function (_arg1:Object):void{
if (((("onEnterFrame" in mc)) && (mc.onEnterFrame))){
mc.onEnterFrame();
} else {
_arg1.target.removeEventListener(_arg1.type, arguments.callee);
};
};
mc.addEventListener(Event.ENTER_FRAME, f);
}
}
}//package mochi.as3
Section 36
//_MaskRect (ui._MaskRect)
package ui {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class _MaskRect extends Sprite {
public var onSetWH:Function;
private var __align:String;// = "left-top"
public static var wid:int = 0;
public static var hei0:int;
public static var hei:int = 0;
public static var wid0:int;
public function _MaskRect(){
__align = "left-top";
super();
if ((((wid > 0)) && ((hei > 0)))){
setWH();
} else {
this.addEventListener(Event.ADDED_TO_STAGE, added);
};
}
private function added(_arg1:Event):void{
var event = _arg1;
this.removeEventListener(Event.ADDED_TO_STAGE, added);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
try {
getStageWH();
} catch(e:Error) {
this.loaderInfo.addEventListener(Event.INIT, loadInit);
};
}
private function getStageWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
wid0 = _local1.width;
hei0 = _local1.height;
wid = this.loaderInfo.width;
hei = this.loaderInfo.height;
setWH();
}
public function set align(_arg1:String):void{
var _local2:*;
var _local3:Rectangle;
__align = _arg1;
if ((((wid > 0)) && ((hei > 0)))){
_local2 = this.getChildAt(0);
_local3 = _local2.getBounds(this);
switch (__align.charAt(0).toLowerCase()){
case "c":
case "m":
_local2.x = (_local2.x + (((wid0 - wid) / 2) - _local3.x));
_local2.y = (_local2.y + (((hei0 - hei) / 2) - _local3.y));
break;
case "r":
case "b":
_local2.x = (_local2.x + ((wid0 - wid) - _local3.x));
_local2.y = (_local2.y + ((hei0 - hei) - _local3.y));
break;
default:
_local2.x = (_local2.x + -(_local3.x));
_local2.y = (_local2.y + -(_local3.y));
break;
};
};
}
private function loadInit(_arg1:Event):void{
this.loaderInfo.removeEventListener(Event.INIT, loadInit);
getStageWH();
}
private function removed(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
onSetWH = null;
}
private function setWH():void{
var _local1:*;
_local1 = this.getChildAt(0);
_local1.width = wid;
_local1.height = hei;
if (onSetWH != null){
onSetWH(wid, hei);
};
if (__align){
align = __align;
};
}
public static function setPos(_arg1:_MaskRect, _arg2:Function):void{
if ((((wid > 0)) && ((hei > 0)))){
_arg2(wid, hei);
} else {
_arg1.onSetWH = _arg2;
};
}
}
}//package ui
Section 37
//MaskRect (ui.MaskRect)
package ui {
public dynamic class MaskRect extends _MaskRect {
}
}//package ui
Section 38
//Txt (ui.Txt)
package ui {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
public class Txt extends Sprite {
private var __text:String;
private var _txt;
public function Txt(){
_txt = this.getChildByName("txt");
__text = "";
autoSize = "left";
}
public function get text(){
if (_txt.selectable){
__text = _txt.text;
};
return (__text);
}
public function get type():String{
return (_txt.type);
}
public function get autoSize():String{
return (_txt.autoSize);
}
public function get selectable():Boolean{
return (Boolean(_txt.selectable));
}
public function set text(_arg1):void{
_txt.text = (__text = _arg1);
}
public function set type(_arg1:String):void{
_txt.type = _arg1;
}
public function set autoSize(_arg1:String):void{
_txt.autoSize = _arg1;
}
public function set selectable(_arg1:Boolean):void{
_txt.selectable = _arg1;
}
public function set maxChars(_arg1:int):void{
_txt.maxChars = _arg1;
}
public function get maxChars():int{
return (_txt.maxChars);
}
}
}//package ui
Section 39
//VersionControl (utils.VersionControl)
package utils {
import flash.display.*;
import flash.text.*;
public dynamic class VersionControl extends MovieClip {
public var buildversion_txt:TextField;
}
}//package utils
Section 40
//BackgroundMusic (BackgroundMusic)
package {
import flash.media.*;
public dynamic class BackgroundMusic extends Sound {
}
}//package
Section 41
//BoxOffice (BoxOffice)
package {
import flash.display.*;
public class BoxOffice extends MovieClip {
public var cream_cup;
public var drink_cup;
public var pop_cup;
private var _myBoxOffice:BoxOfficeDescription;
public var ticket_mc:Game_Tickets;
public function BoxOffice(){
var _local1:Array;
var _local2:*;
_myBoxOffice = BoxOfficeOwner(this.parent).giveBoxOfficeDescription(this);
super();
new smartGuard(this.loaderInfo.url);
addFrameScript(0, frame1);
this.stop();
this._myBoxOffice = BoxOfficeOwner(this.parent).giveBoxOfficeDescription(this);
_local1 = ["Popcorn_cup_s", "Popcorn_cup_b", "Drink_cup_s", "Drink_cup_b", "Cream_cup"];
if (_myBoxOffice.popcorn_shape == "Popcorn_cup_s"){
pop_cup = new Pop_cup_s();
pop_cup.x = -4.9;
pop_cup.y = -7.2;
addChild(pop_cup);
pop_cup.init();
} else {
if (_myBoxOffice.popcorn_shape == "Popcorn_cup_b"){
pop_cup = new Pop_cup_b();
pop_cup.x = -11.3;
pop_cup.y = -17;
addChild(pop_cup);
pop_cup.init();
};
};
if (_myBoxOffice.drink_shape == "Drink_cup_s"){
drink_cup = new Pop_drink_s();
drink_cup.x = 27.3;
drink_cup.y = -14.3;
addChild(drink_cup);
drink_cup.init();
} else {
if (_myBoxOffice.drink_shape == "Drink_cup_b"){
drink_cup = new Pop_drink_b();
drink_cup.x = 27.3;
drink_cup.y = -14.3;
addChild(drink_cup);
drink_cup.init();
};
};
if (_myBoxOffice.cream_shape == "Cream_cup"){
cream_cup = new Cream_cup();
cream_cup.x = 21.9;
cream_cup.y = 13.6;
addChild(cream_cup);
cream_cup.init();
};
if (_myBoxOffice.ticket_shape != ""){
ticket_mc = new Game_Tickets();
ticket_mc.addTicket(_myBoxOffice.ticket_shape);
ticket_mc.x = 47.5;
ticket_mc.y = 25.9;
ticket_mc.tickets_num = _myBoxOffice.ticket_num;
addChild(ticket_mc);
};
}
public function get myBoxOffice():BoxOfficeDescription{
return (_myBoxOffice);
}
function frame1(){
stop();
}
public function reset():void{
this.gotoAndStop(1);
}
}
}//package
Section 42
//BoxOfficeCandy (BoxOfficeCandy)
package {
import flash.events.*;
public class BoxOfficeCandy extends BoxOfficeTopping {
private var myBoxOffice:BoxOfficeDescription;
public function BoxOfficeCandy(){
this.visible = false;
if ((this.parent.parent is PlaneMachine)){
myBoxOffice = BoxOfficeShape(this.parent).myBoxOffice;
} else {
myBoxOffice = this.parent.parent.myBoxOffice;
};
if (myBoxOffice.candy){
BoxOfficeShape(this.parent).gotoAndStop("Candy&Cookie");
if (myBoxOffice.candyON){
visible = true;
} else {
myBoxOffice.addEventListener("addCandy", addCandy);
};
};
}
private function addCandy(_arg1:Event):void{
myBoxOffice.removeEventListener("addCandy", addCandy);
this.visible = true;
myBoxOffice.candyON = true;
}
override protected function destroy(_arg1:Event):void{
super.destroy(_arg1);
myBoxOffice.removeEventListener("addCandy", addCandy);
}
}
}//package
Section 43
//boxOfficecandy04 (boxOfficecandy04)
package {
import flash.media.*;
public dynamic class boxOfficecandy04 extends Sound {
}
}//package
Section 44
//BoxOfficeCream (BoxOfficeCream)
package {
import flash.events.*;
public class BoxOfficeCream extends BoxOfficeTopping {
public function BoxOfficeCream(){
stop();
this.visible = false;
if ((this.parent.parent is BoxOffice)){
boxOffice = BoxOffice(this.parent.parent);
if (boxOffice.myBoxOffice.cream_shape != ""){
if ((this.parent is Cream_cup)){
Cream_cup(this.parent).gotoAndStop("Cream");
};
if (boxOffice.myBoxOffice.creamON){
this.visible = true;
this.gotoAndStop((boxOffice.myBoxOffice.cream + "ON"));
} else {
boxOffice.myBoxOffice.addEventListener("addCream", addCream);
};
};
};
}
private function addCream(_arg1:Event):void{
boxOffice.myBoxOffice.creamON = true;
boxOffice.myBoxOffice.removeEventListener("addCream", addCream);
this.visible = true;
this.play();
}
override protected function destroy(_arg1:Event):void{
super.destroy(_arg1);
boxOffice.myBoxOffice.removeEventListener("addCream", addCream);
}
}
}//package
Section 45
//BoxOfficeDescription (BoxOfficeDescription)
package {
import flash.events.*;
public class BoxOfficeDescription extends EventDispatcher {
public var cream:String;// = ""
public var candyON:Boolean;
public var souceFST:String;
public var souceSNDon:Boolean;
public var souceCREAM:String;// = ""
public var cream_shape:String;// = ""
public var souceCREAMon:Boolean;
public var ticket_shape:String;// = ""
public var burned:Boolean;
public var drink_shape:String;// = ""
public var souceSND:String;// = ""
public var cookieON:Boolean;
public var film_num:Number;// = 0
public var ticket_num:Number;// = 0
public var popcorn_shape:String;// = ""
public var creamON:Boolean;
public var cookie:Boolean;
public var candy:Boolean;
public var souceFSTon:Boolean;
public function BoxOfficeDescription(_arg1:String="", _arg2:String="", _arg3:String=""){
cream = "";
souceCREAM = "";
popcorn_shape = "";
drink_shape = "";
cream_shape = "";
ticket_shape = "";
ticket_num = 0;
film_num = 0;
souceSND = "";
super();
popcorn_shape = _arg1;
drink_shape = _arg2;
cream_shape = _arg3;
}
public function clearOrder():void{
var _local1:BoxOfficeDescription;
_local1 = BoxOfficeManager.getInstance().cook.myWafle;
if (((((!((this.ticket_shape == ""))) && ((this.film_num == _local1.film_num)))) && ((_local1.ticket_num >= this.ticket_num)))){
_local1.ticket_num = (_local1.ticket_num - this.ticket_num);
if (_local1.ticket_num <= 0){
BoxOfficeManager.getInstance().cook.myWafle.ticket_shape = "";
};
};
if (((!((this.popcorn_shape == ""))) && ((this.popcorn_shape == _local1.popcorn_shape)))){
_local1.popcorn_shape = "";
BoxOfficeManager.getInstance().cook.popWafle = false;
};
if (((!((this.drink_shape == ""))) && ((this.drink_shape == _local1.drink_shape)))){
_local1.drink_shape = "";
BoxOfficeManager.getInstance().cook.drinkWafle = false;
};
if (((!((this.cream_shape == ""))) && ((this.cream_shape == _local1.cream_shape)))){
_local1.cream_shape = "";
BoxOfficeManager.getInstance().cook.creamWafle = false;
};
if (((!((this.souceCREAM == ""))) && ((this.souceCREAM == _local1.souceCREAM)))){
_local1.souceCREAM = "";
};
if (((!((this.souceCREAMon == false))) && ((this.souceCREAMon == _local1.souceCREAMon)))){
_local1.souceCREAMon = false;
};
if (((!((this.cream == ""))) && ((this.cream == _local1.cream)))){
_local1.cream = "";
};
if (((!((this.creamON == false))) && ((this.creamON == _local1.creamON)))){
_local1.creamON = false;
};
if (((!((this.candy == false))) && ((this.candy == _local1.candy)))){
_local1.candy = false;
};
if (((!((this.candyON == false))) && ((this.candyON == _local1.candyON)))){
_local1.candyON = false;
};
}
public function addCookie():void{
dispatchEvent(new Event("addCookie"));
}
public function addSouce():void{
dispatchEvent(new Event("addSouce3"));
}
public function givePrice():int{
var _local1:int;
if (popcorn_shape == "Popcorn_cup_s"){
_local1 = (_local1 + LevelDescription.price_pop_s);
};
if (popcorn_shape == "Popcorn_cup_b"){
_local1 = (_local1 + LevelDescription.price_pop_b);
};
if (drink_shape == "Drink_cup_s"){
_local1 = (_local1 + LevelDescription.Drink_cup_s);
};
if (drink_shape == "Drink_cup_b"){
_local1 = (_local1 + LevelDescription.Drink_cup_b);
};
if (cream_shape == "Cream_cup"){
_local1 = (_local1 + LevelDescription.price_cream_cup);
};
if (souceCREAMon){
if (souceCREAM == "Cherry"){
_local1 = (_local1 + LevelDescription._priceSouce_1);
} else {
if (souceCREAM == "Orange"){
_local1 = (_local1 + LevelDescription._priceSouce_2);
} else {
_local1 = (_local1 + LevelDescription._priceSouce_3);
};
};
};
if (creamON){
if (cream == "Cherry"){
_local1 = (_local1 + LevelDescription._priceCream_1);
} else {
if (cream == "Orange"){
_local1 = (_local1 + LevelDescription._priceCream_2);
} else {
_local1 = (_local1 + LevelDescription._priceCream_3);
};
};
};
if (candyON){
_local1 = (_local1 + LevelDescription.priceCandy);
};
if (ticket_shape == "normal"){
_local1 = (_local1 + (getFilmPrice() * ticket_num));
};
if (ticket_shape == "vip"){
_local1 = (_local1 + (Math.round((getFilmPrice() * LevelDescription.price_ticket_vip)) * ticket_num));
};
return (_local1);
}
public function addCandy():void{
dispatchEvent(new Event("addCandy"));
}
public function addCream():void{
dispatchEvent(new Event("addCream"));
}
override public function toString():String{
return ((((((((((((((((((((((((" film_num " + film_num) + " ticket_shape ") + ticket_shape) + " ticket_num ") + ticket_num) + " popcorn_shape ") + popcorn_shape) + " drink_shape ") + drink_shape) + " cream_shape ") + cream_shape) + " souceCREAM ") + souceCREAM) + " souceCREAMon ") + souceCREAMon) + " cream ") + cream) + " creamON ") + creamON) + " candy ") + candy) + " candyON ") + candyON));
}
private function getFilmPrice():int{
var _local1:int;
switch (film_num){
case 0:
_local1 = LevelDescription.price_ticket_normal_1;
break;
case 1:
_local1 = LevelDescription.price_ticket_normal_2;
break;
case 2:
_local1 = LevelDescription.price_ticket_normal_3;
break;
case 3:
_local1 = LevelDescription.price_ticket_normal_4;
break;
case 4:
_local1 = LevelDescription.price_ticket_normal_5;
break;
case 5:
_local1 = LevelDescription.price_ticket_normal_6;
break;
};
return (_local1);
}
public function compare(_arg1:BoxOfficeDescription):Boolean{
if (((!((this.ticket_shape == ""))) && (((((!((this.ticket_shape == _arg1.ticket_shape))) || ((this.ticket_num > _arg1.ticket_num)))) || (!((this.film_num == _arg1.film_num))))))){
return (false);
};
if (((!((this.popcorn_shape == ""))) && (!((this.popcorn_shape == _arg1.popcorn_shape))))){
return (false);
};
if (((!((this.drink_shape == ""))) && (!((this.drink_shape == _arg1.drink_shape))))){
return (false);
};
if (((!((this.cream_shape == ""))) && (!((this.cream_shape == _arg1.cream_shape))))){
return (false);
};
if (((!((this.souceCREAM == ""))) && (!((this.souceCREAM == _arg1.souceCREAM))))){
return (false);
};
if (((!((this.souceCREAMon == false))) && (!((this.souceCREAMon == _arg1.souceCREAMon))))){
return (false);
};
if (((!((this.cream == ""))) && (!((this.cream == _arg1.cream))))){
return (false);
};
if (((!((this.creamON == false))) && (!((this.creamON == _arg1.creamON))))){
return (false);
};
if (((!((this.candy == false))) && (!((this.candy == _arg1.candy))))){
return (false);
};
if (((!((this.candyON == false))) && (!((this.candyON == _arg1.candyON))))){
return (false);
};
return (true);
}
}
}//package
Section 46
//BoxOfficeMachine (BoxOfficeMachine)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class BoxOfficeMachine extends ServingObject implements BoxOfficeOwner {
private var _boxOfficeID:int;
private var myBoxOffice:BoxOfficeDescription;
private var timeoutID:uint;
private var boxOfficeMC:BoxOffice;
private var pipeID:int;
private var names:Array;
private var multi:String;// = ""
public var alert:MovieClip;
public var mkr:Marker;
private var _id:String;
private var ready:Boolean;// = false
public function BoxOfficeMachine(){
var _local1:Array;
multi = "";
ready = false;
super();
names = ["square", "square", "round", "heart"];
ready = false;
multi = "";
_local1 = this.name.split("_");
_id = _local1[1];
_boxOfficeID = int(_id.charAt((_id.length - 1)));
pipeID = _boxOfficeID;
_boxOfficeID = LevelDescription.aviableBoxOfficeMachines[(_boxOfficeID - 1)];
if (_boxOfficeID >= 0){
if (_boxOfficeID == 4){
_boxOfficeID = 1;
multi = "_mult";
};
this.gotoAndStop(((_boxOfficeID.toString() + "_static_Idle") + multi));
myBoxOffice = new BoxOfficeDescription(names[_boxOfficeID]);
} else {
stop();
visible = false;
};
this.mouseChildren = true;
}
override public function serve():void{
var _local1:Array;
_local1 = this.currentLabel.split("_");
switch (_local1[2]){
case "Idle":
doOn();
break;
case "BoxOfficePick":
doOn();
break;
case "On":
BoxOfficeManager.getInstance().cook.nextStep();
break;
case "Off":
doPick();
break;
default:
break;
};
}
private function doOff():void{
if (ready){
goto("Off");
SoundManager.giveBoxOfficeMachineOFF();
ready = false;
};
}
private function doPick():void{
if (BoxOfficeManager.getInstance().cook.withWafle == ""){
goto("BoxOfficePick");
SoundManager.giveBoxOfficeMachinePick();
BoxOfficeManager.getInstance().cook.graphic.boxOfficeMachinePick();
BoxOfficeManager.getInstance().cook.withWafle = true;
BoxOfficeManager.getInstance().cook.myWafle = myBoxOffice;
myBoxOffice = new BoxOfficeDescription(names[_boxOfficeID]);
clearTimeout(timeoutID);
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
private function goto(_arg1:String):void{
this.gotoAndPlay((((_boxOfficeID.toString() + "_Animation_") + _arg1) + multi));
}
public function set boxOfficeID(_arg1:int):void{
_boxOfficeID = _arg1;
}
private function isBurned():void{
SoundManager.giveBoxOfficeMachineBurned();
myBoxOffice.burned = true;
boxOfficeMC.reset();
}
public function get id():String{
return (_id);
}
private function isReady():void{
ready = true;
doOff();
}
public function switchBoxOffice(_arg1:MouseEvent):void{
var _local2:Array;
_local2 = this.currentLabel.split("_");
if (_local2[2] == "Idle"){
SoundManager.boxOfficeMachineSwitchSound();
_boxOfficeID++;
if (_boxOfficeID > 3){
_boxOfficeID = 1;
};
this.gotoAndStop(((_boxOfficeID.toString() + "_static_Idle") + multi));
myBoxOffice = new BoxOfficeDescription(names[_boxOfficeID]);
_arg1.stopImmediatePropagation();
};
}
public function get boxOfficeID():int{
return (_boxOfficeID);
}
private function doOn():void{
if (BoxOfficeManager.getInstance().mixMachine.mixDown(pipeID)){
goto("On");
SoundManager.giveBoxOfficeMachineON();
BoxOfficeManager.getInstance().cook.graphic.boxOfficeMachineOpenClose();
timeoutID = setTimeout(isReady, LevelDescription.cookingTime);
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
boxOfficeMC = BoxOffice(_arg1);
return (this.myBoxOffice);
}
protected function toIdle():void{
this.gotoAndStop(((_boxOfficeID.toString() + "_static_Idle") + multi));
}
}
}//package
Section 47
//BoxOfficeMachineKnob (BoxOfficeMachineKnob)
package {
import flash.display.*;
import flash.events.*;
public class BoxOfficeMachineKnob extends MovieClip {
public function BoxOfficeMachineKnob(){
buttonMode = true;
this.addEventListener(MouseEvent.CLICK, switchMachine);
}
private function switchMachine(_arg1:MouseEvent):void{
BoxOfficeMachine(this.parent).switchBoxOffice(_arg1);
}
}
}//package
Section 48
//boxOfficemachineON02 (boxOfficemachineON02)
package {
import flash.media.*;
public dynamic class boxOfficemachineON02 extends Sound {
}
}//package
Section 49
//boxOfficeMachineSwitchSounds (boxOfficeMachineSwitchSounds)
package {
import flash.media.*;
public dynamic class boxOfficeMachineSwitchSounds extends Sound {
}
}//package
Section 50
//BoxOfficeManager (BoxOfficeManager)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
import flash.text.*;
import flash.filters.*;
public class BoxOfficeManager extends MovieClip {
public var Head0_mc:MovieClip;
public var currentStr:String;// = ""
private var blinkTarget:MovieClip;
private var TUTORIALpopup:Popup;
public var _mix_2:Game_Dispenser_Mix;
public var customer1:Marker;
private var levelFinished:Boolean;
public var customer2:Marker;
public var customer3:Marker;
public var lvl:TextField;
private var _cook:Cook;
public var _Stxt:TextField;
public var c1:MovieClip;
public var c3:MovieClip;
public var c2:MovieClip;
private var blinkON:Boolean;// = false
public var cup:Marker;
public var mix:Marker;
public var cookie:Marker;
public var cup_2:Marker;
public var Head1_mc:MovieClip;
public var candy:Marker;
public var _cream_1:Game_Dispenser_Cream;
public var _cookie_4:Game_Dispenser_Cookie;
public var tt:Button_Game_SkipTutorial;
public var menuBTN:Button_Game_Menu;
public var pauseBTN:Button_Game_Pause;
private var saved:Boolean;
public var level_customer_num:int;
public var cream:Marker;
public var Number_txt:TextField;
public var _sauce6_3:Game_Dispenser_Sauce_BlueBerry;
public var boxOffice2:Marker;
public var boxOffice3:Marker;
public var boxOffice1:Marker;
private var popup:Popup;
public var Head2_mc:MovieClip;
public var sauce2:Marker;
public var sauce4:Marker;
public var sauce5:Marker;
public var sauce6:Marker;
public var _customer3_2:TableCash;
public var sauce3:Marker;
public var sauce1:Marker;
public var qualityBTN:Button_Game_Quality;
private var customersSlots:Array;
public var _cup5_2:Game_DisCream_Cup;
public var _sauce5_3:Game_Dispenser_Sauce_Vanilla;
private var _mixPipe:MixPipe;
public var _customer2_2:TableCash;
public var _cup4_2:Game_Drink_Cup_B;
public var _sauce4_3:Game_Dispenser_Sauce_Apple;
public var clk:Clock;
public var character:CharacterGraphic;
private var freeSlots:Array;
public var Head3_mc:MovieClip;
public var trash:Marker;
public var _poster_4:Game_Poster;
public var _boxOffice3_2:Game_Dispenser_BoxOffice;
private var blinkTimer:Timer;
public var _customer1_2:TableCash;
public var _sauce3_3:Game_Dispenser_Sauce_Orange;
private var currentBlink:int;// = 0
public var _cup3_2:Game_Drink_Cup_S;
private var _levelCash:int;
public var _cup_2:Game_Dispenser_Cup;
public var _boxOffice2_2:Game_Dispenser_BoxOffice;
public var Head4_mc:MovieClip;
public var muteBtn:Button_Sound;
public var _cup2_2:Game_Dispenser_Cup;
public var _sauce2_3:Game_Dispenser_Sauce_Cherry;
private var _toMenu:Boolean;
public var _candy_3:Game_Dispenser_Candy;
public var Arrow_mc:MovieClip;
public var mix_pipe:Game_Dispenser_BoxOfficePipe;
private var customer_num:int;
public var _trash_4:Game_Dispenser_Trash;
public var _boxOffice1_2:Game_Dispenser_BoxOffice;
private var customersQueue:int;
public var _cup1_2:Game_Den_Cup_S;
public var _plane_4:Game_Plane;
public var _sauce1_3:Game_Dispenser_Sauce_Chocolate;
private var _mixMachine:Mix;
public var musicBtn:Button_Sound_2;
public var csh:TextField;
private var custommerTimer:Timer;
private static var instance:BoxOfficeManager;
public function BoxOfficeManager(){
var _local1:Popup;
var _local2:int;
blinkON = false;
currentBlink = 0;
currentStr = "";
super();
Number_txt.text = LevelDescription.customer_num;
level_customer_num = LevelDescription.customer_num;
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
stage.addEventListener(KeyboardEvent.KEY_UP, keyUpList);
freeSlots = [true, true, true];
customersSlots = new Array();
currentBlink = 0;
blinkON = false;
blinkTimer = new Timer(700);
blinkTimer.addEventListener(TimerEvent.TIMER, blinkChange);
customersSlots.push(this.getChildByName("c1"));
customersSlots.push(this.getChildByName("c2"));
customersSlots.push(this.getChildByName("c3"));
instance = this;
GenericButton(menuBTN).addEventListener(MouseEvent.CLICK, buttonMenu);
GenericButton(pauseBTN).addEventListener(MouseEvent.CLICK, buttonMenu);
GenericButton(qualityBTN).addEventListener(MouseEvent.CLICK, buttonMenu);
_cook = new Cook(CharacterGraphic(this.getChildByName("character")));
_plane_4 = Game_Plane(this.getChildByName("_plane_4"));
_poster_4 = Game_Poster(this.getChildByName("_poster_4"));
_mixMachine = Mix(this.getChildByName("_mix_2"));
_mixPipe = MixPipe(this.getChildByName("mix_pipe"));
TableCash(_customer1_2).setPauseListeners();
TableCash(_customer2_2).setPauseListeners();
TableCash(_customer3_2).setPauseListeners();
custommerTimer = new Timer((LevelDescription.customerTime * 1000));
custommerTimer.addEventListener(TimerEvent.TIMER, newCustomer);
if (LevelDescription.currentLevel > 0){
TextField(lvl).text = ("Level " + LevelDescription.currentLevel.toString());
} else {
TextField(lvl).text = "Tutorial";
};
GenericButton(tt).visible = false;
levelCash = LevelDescription.restMoney;
_local2 = 0;
while (_local2 < 3) {
MovieClip(this.getChildByName((("_cream" + (_local2 + 1)) + "_1")))._mc1.gotoAndStop((_local2 + 1));
MovieClip(this.getChildByName((("_cream" + (_local2 + 1)) + "_1")))._mc2.gotoAndStop((_local2 + 1));
_local2++;
};
if (LevelDescription.tutorialElementsLevels){
TUTORIALpopup = new Popup(LevelDescription.tutorialElements);
customerHeadsFunc(false);
if (LevelDescription.tutorialLevel){
GenericButton(tt).visible = true;
GenericButton(tt).addEventListener(MouseEvent.CLICK, skipTutorial);
MovieClip(this.getChildByName("_cup1_2")).mouseEnabled = false;
MovieClip(this.getChildByName("_cup2_2")).mouseEnabled = false;
MovieClip(this.getChildByName("_cup3_2")).mouseEnabled = false;
MovieClip(this.getChildByName("_cup4_2")).mouseEnabled = false;
MovieClip(this.getChildByName("_cup5_2")).mouseEnabled = false;
blinkTarget = MovieClip(this.getChildByName("_cup1_2"));
TUTORIALpopup.addEventListener(Popup.ADD_CUSTOMER, popupTutorialLevelStart);
} else {
TUTORIALpopup.addEventListener(Popup.POPUP_DESTROY, startLevel);
};
} else {
TUTORIALpopup = new Popup("LevelStart");
customerHeadsFunc(true);
TUTORIALpopup.addEventListener(Popup.POPUP_DESTROY, startLevel);
};
customer_num = LevelDescription.customer_num;
customerLeaveFunc();
this.addChild(TUTORIALpopup);
}
private function afterMenuPopup(_arg1:Event):void{
Popup(_arg1.currentTarget).removeEventListener(Popup.POPUP_DESTROY, gotoMenu);
_Stxt.text = _toMenu;
if (_toMenu){
_toMenu = false;
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
_Stxt.text = "toMenu";
LevelDescription.tutorialLevel = false;
parent.gotoAndPlay(481);
LevelDescription.reset();
} else {
if (!LevelDescription.tutorialLevel){
custommerTimer.start();
};
this.dispatchEvent(new Event("resume"));
};
}
public function get mixPipe():MixPipe{
return (_mixPipe);
}
public function get mixMachine():Mix{
return (_mixMachine);
}
private function startLevel(_arg1:Event):void{
Popup(_arg1.currentTarget).removeEventListener(Popup.POPUP_DESTROY, startLevel);
custommerTimer.start();
newCustomer(null);
}
private function levelOver(_arg1:TimerEvent):void{
timeEnd();
}
public function nextTutorialBlink(_arg1:int):void{
var _local2:Array;
var _local3:String;
if (LevelDescription.currentLevel != 0){
return;
};
MovieClip(this.getChildByName("_cup1_2")).mouseEnabled = true;
Arrow_mc.x = 282.9;
Arrow_mc.y = 265.6;
Arrow_mc.rotation = 16;
MovieClip(this.getChildByName("_candy_3")).mouseEnabled = false;
MovieClip(this.getChildByName("_sauce4_3")).mouseEnabled = false;
MovieClip(this.getChildByName("_cup3_2")).mouseEnabled = false;
MovieClip(this.getChildByName("c2")).mouseEnabled = false;
MovieClip(this.getChildByName("_poster1_4")).mouseEnabled = false;
MovieClip(this.getChildByName("_poster1_4")).mouseEnabled = false;
MovieClip(this.getChildByName("_poster1_4")).mouseChildren = false;
MovieClip(this.getChildByName("_customer2_2")).mouseEnabled = false;
if (blinkTarget != null){
removeBlink();
};
blinkTimer.stop();
currentBlink = _arg1;
_local2 = ["_cup1_2", "_cup3_2", "_sauce4_3", "_candy_3", "_poster1_4", "c2", "_customer2_2", "END"];
_local3 = String(_local2[_arg1]);
currentStr = String(_local2[_arg1]);
switch (currentStr){
case "_cup3_2":
MovieClip(this.getChildByName("_cup3_2")).mouseEnabled = true;
blinkTarget = MovieClip(this.getChildByName(_local3));
Arrow_mc.x = 350;
Arrow_mc.y = 273.3;
Arrow_mc.rotation = 16;
break;
case "_sauce4_3":
MovieClip(this.getChildByName("_sauce4_3")).mouseEnabled = true;
blinkTarget = MovieClip(this.getChildByName(_local3));
Arrow_mc.x = 103.5;
Arrow_mc.y = 60.8;
Arrow_mc.rotation = -41;
break;
case "_candy_3":
MovieClip(this.getChildByName("_candy_3")).mouseEnabled = true;
blinkTarget = MovieClip(this.getChildByName(_local3));
Arrow_mc.x = -8.6;
Arrow_mc.y = 117.2;
Arrow_mc.rotation = -41;
break;
case "_poster1_4":
MovieClip(this.getChildByName("_poster1_4")).mouseChildren = true;
MovieClip(this.getChildByName("_poster1_4")).mouseEnabled = true;
blinkTarget = MovieClip(this.getChildByName(_local3));
Arrow_mc.x = 367.1;
Arrow_mc.y = -10.2;
Arrow_mc.rotation = 64;
TUTORIALpopup.play();
break;
case "c2":
blinkTarget = MovieClip(this.getChildByName(_local3));
MovieClip(this.getChildByName("c2")).mouseEnabled = true;
TUTORIALpopup.play();
Arrow_mc.x = 20000;
Arrow_mc.y = -10.2;
Arrow_mc.rotation = 64;
break;
case "_customer2_2":
MovieClip(this.getChildByName("_customer2_2")).mouseEnabled = true;
blinkTarget = MovieClip(this.getChildByName(_local3));
TUTORIALpopup.play();
Arrow_mc.x = 20000;
Arrow_mc.y = -10.2;
Arrow_mc.rotation = 64;
break;
case "END":
blinkTarget = MovieClip(this.getChildByName(_local3));
TUTORIALpopup.play();
Arrow_mc.x = 20000;
Arrow_mc.y = -10.2;
Arrow_mc.rotation = 64;
break;
};
if (currentStr != "END"){
blinkTimer.start();
};
}
private function blinkChange(_arg1:Event):void{
if (blinkON){
removeBlink();
} else {
addBlink();
};
blinkON = !(blinkON);
}
public function removeCustomer(_arg1:int):void{
LevelDescription.customer_num--;
Number_txt.text = LevelDescription.customer_num;
freeSlots[_arg1] = true;
if (!levelFinished){
if (customersQueue > 0){
customersQueue--;
newCustomer(null);
};
};
if ((((LevelDescription.customer_num == 0)) && (!(LevelDescription.tutorialLevel)))){
endLevel();
};
}
public function timeEnd():void{
levelFinished = true;
custommerTimer.stop();
endLevel();
}
public function get levelCash():int{
return (_levelCash);
}
private function popupLevelStart(_arg1:Event):void{
var _local2:Popup;
Popup(_arg1.currentTarget).removeEventListener(Popup.POPUP_DESTROY, popupLevelStart);
_local2 = new Popup("LevelStart");
_local2.addEventListener(Popup.POPUP_DESTROY, startLevel);
this.addChild(_local2);
}
private function popupTutorialLevelStart(_arg1:Event):void{
Popup(_arg1.currentTarget).removeEventListener(Popup.ADD_CUSTOMER, popupTutorialLevelStart);
addCustomer(1);
freeSlots[1] = false;
}
public function keyUpList(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 80:
pauseFunc();
break;
};
}
private function addBlink():void{
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:Number;
var _local6:Boolean;
var _local7:Boolean;
var _local8:Number;
var _local9:GlowFilter;
var _local10:Array;
_local1 = 0xFFFFFF;
_local2 = 1;
_local3 = 3;
_local4 = 3;
_local5 = 1000;
_local6 = false;
_local7 = false;
_local8 = BitmapFilterQuality.HIGH;
_local9 = new GlowFilter(_local1, _local2, _local3, _local4, _local5, _local8, _local6, _local7);
_local10 = new Array();
_local10.push(_local9);
blinkTarget.filters = _local10;
}
public function set toMenu(_arg1:Boolean):void{
_toMenu = _arg1;
}
public function get cook():Cook{
return (_cook);
}
private function removeBlink():void{
blinkTarget.filters = new Array();
}
private function gotoMenu(_arg1:Event):void{
Popup(_arg1.currentTarget).removeEventListener(Popup.POPUP_DESTROY, gotoMenu);
if (_toMenu){
if (!saved){
};
GameManager.getInstance().gotoAndPlay("toMenu");
LevelDescription.reset();
} else {
GameManager.getInstance().gotoAndPlay("toGame");
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
if (levelCash >= LevelDescription.finalCashTarget){
LevelDescription.nextLevel();
};
};
}
private function endLevel():void{
var _local1:Popup;
this.dispatchEvent(new Event("pause"));
_cook.clearQueue();
if ((((levelCash >= LevelDescription.finalCashTarget)) && (!((LevelDescription.leave_num == 5))))){
SoundManager.win();
if (LevelDescription.tutorialLevel){
LevelDescription.tutorialLevel = false;
TUTORIALpopup.play();
return;
};
saved = true;
GameManager.getInstance().gamePoints = (levelCash + LevelDescription.shoppingPoints);
if (LevelDescription.currentLevel == LevelDescription.levelNum){
_toMenu = true;
LevelDescription.level_status = "game_win";
GameManager.getInstance().gotoAndPlay("toGame");
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
return;
};
_local1 = new Popup("LevelComplete");
_local1.addEventListener(Popup.POPUP_DESTROY, gotoMenu);
LevelDescription.level_status = "level_win";
this.addChild(_local1);
} else {
GameManager.getInstance().gamePoints = (levelCash + LevelDescription.shoppingPoints);
SoundManager.loos();
LevelDescription.level_status = "game_lose";
GameManager.getInstance().gotoAndPlay("toGame");
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
};
}
private function addCustomer(_arg1:int):void{
MovieClip(this.customersSlots[_arg1]).addChild(new Customer(_arg1));
}
private function newCustomer(_arg1:TimerEvent):void{
var _local2:int;
if (customer_num <= 0){
custommerTimer.removeEventListener(TimerEvent.TIMER, newCustomer);
return;
};
_local2 = 0;
while (_local2 < 3) {
if (freeSlots[_local2]){
addCustomer(_local2);
customer_num--;
freeSlots[_local2] = false;
return;
};
_local2++;
};
customersQueue++;
}
public function customerHeadsFunc(_arg1:Boolean):void{
var _local2:int;
_local2 = 0;
while (_local2 < 5) {
this[(("Head" + _local2) + "_mc")].visible = _arg1;
_local2++;
};
}
public function set levelCash(_arg1:int):void{
_levelCash = _arg1;
TextField(csh).text = (((("$" + _levelCash.toString()) + "/") + "$") + LevelDescription.finalCashTarget);
}
private function buttonMenu(_arg1:MouseEvent):void{
if (GameManager.getInstance().AreButtonsEnabled){
switch (_arg1.currentTarget){
case menuBTN:
_loc_2 = new Popup("Menu", null, "Menu");
_loc_2.addEventListener(Popup.POPUP_DESTROY, afterMenuPopup);
this.addChild(_loc_2);
custommerTimer.stop();
this.dispatchEvent(new Event("pause"));
_cook.clearQueue();
break;
case qualityBTN:
_loc_2 = new Popup("Menu", null, "Quality");
_loc_2.addEventListener(Popup.POPUP_DESTROY, afterMenuPopup);
this.addChild(_loc_2);
custommerTimer.stop();
this.dispatchEvent(new Event("pause"));
_cook.clearQueue();
break;
case pauseBTN:
pauseFunc();
break;
};
};
}
private function destroyList(_arg1:Event):void{
skipTutorial(null);
}
private function customClickList(_arg1:Event):void{
switch (currentStr){
case "c2":
MovieClip(this.getChildByName("c2")).mouseEnabled = true;
break;
case "_customer2_2":
MovieClip(this.getChildByName("_customer2_2")).mouseEnabled = true;
break;
};
}
public function customerOver():void{
levelFinished = true;
custommerTimer.stop();
endLevel();
}
private function pauseFunc():void{
if (LevelDescription.pause_flag){
if (popup){
popup.gotoAndPlay("Resume");
};
} else {
LevelDescription.pause_flag = true;
popup = new Popup("Menu", null, "Pause");
popup.addEventListener(Popup.POPUP_DESTROY, afterMenuPopup);
this.addChild(popup);
custommerTimer.stop();
this.dispatchEvent(new Event("pause"));
_cook.clearQueue();
};
}
public function customerLeaveFunc():void{
var _local1:int;
var _local2:int;
_local1 = LevelDescription.leave_num;
_local2 = 0;
while (_local2 < _local1) {
this[(("Head" + _local2) + "_mc")].gotoAndStop(2);
_local2++;
};
if (_local1 >= 5){
endLevel();
};
}
private function skipTutorial(_arg1:MouseEvent):void{
GenericButton(tt).removeEventListener(MouseEvent.CLICK, skipTutorial);
LevelDescription.skipTutorial();
LevelDescription.nextLevel();
GameManager.getInstance().gotoAndPlay("toGame");
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
}
public static function getInstance():BoxOfficeManager{
if (instance == null){
};
return (instance);
}
}
}//package
Section 51
//BoxOfficeOwner (BoxOfficeOwner)
package {
public interface BoxOfficeOwner {
function giveBoxOfficeDescription(_arg1):BoxOfficeDescription;
}
}//package
Section 52
//boxOfficeready01 (boxOfficeready01)
package {
import flash.media.*;
public dynamic class boxOfficeready01 extends Sound {
}
}//package
Section 53
//BoxOfficeShape (BoxOfficeShape)
package {
import flash.display.*;
public class BoxOfficeShape extends MovieClip {
public var myBoxOffice:BoxOfficeDescription;
public var num:Number;
public function BoxOfficeShape(){
stop();
myBoxOffice = new BoxOfficeDescription();
}
public function init(_arg1:Number=-1, _arg2:String=""):void{
this.num = _arg1;
if ((this.parent is BoxOffice)){
myBoxOffice = BoxOffice(this.parent).myBoxOffice;
setBoxOffice(myBoxOffice);
} else {
if ((this.parent is PlaneMachine)){
if (_arg2 == "drink"){
myBoxOffice.drink_shape = PlaneMachine(this.parent).myBoxOffice[_arg1][0];
myBoxOffice.souceCREAM = PlaneMachine(this.parent).myBoxOffice[_arg1][1];
myBoxOffice.souceCREAMon = PlaneMachine(this.parent).myBoxOffice[_arg1][2];
} else {
if (_arg2 == "pop"){
myBoxOffice.popcorn_shape = PlaneMachine(this.parent).myBoxOffice[_arg1][0];
myBoxOffice.candy = PlaneMachine(this.parent).myBoxOffice[_arg1][1];
myBoxOffice.candyON = PlaneMachine(this.parent).myBoxOffice[_arg1][2];
};
};
setBoxOffice(myBoxOffice);
};
};
}
public function setBoxOffice(_arg1:BoxOfficeDescription):void{
if (_arg1.cream_shape == "Cream_cup"){
stop();
this.gotoAndStop("Cream");
};
if ((((_arg1.drink_shape == "Drink_cup_s")) || ((_arg1.drink_shape == "Drink_cup_b")))){
stop();
this.gotoAndStop("souceCREAM");
};
if ((((_arg1.popcorn_shape == "Popcorn_cup_s")) || ((_arg1.popcorn_shape == "Popcorn_cup_b")))){
stop();
this.gotoAndStop("Candy&Cookie");
};
}
}
}//package
Section 54
//BoxOfficeSouceCream (BoxOfficeSouceCream)
package {
import flash.events.*;
public class BoxOfficeSouceCream extends BoxOfficeTopping {
public var myBoxOffice:BoxOfficeDescription;
public function BoxOfficeSouceCream(){
this.visible = false;
this.stop();
if ((this.parent.parent is BoxOffice)){
boxOffice = (this.parent.parent as BoxOffice);
BoxOfficeManager.getInstance()._Stxt.text = ("souceCREAM: " + boxOffice.myBoxOffice.souceCREAM);
if (boxOffice.myBoxOffice.souceCREAM){
BoxOfficeShape(this.parent).gotoAndStop("souceCREAM");
if (boxOffice.myBoxOffice.souceCREAMon){
this.visible = true;
this.gotoAndStop((boxOffice.myBoxOffice.souceCREAM + "ON"));
} else {
boxOffice.myBoxOffice.addEventListener("addSouce3", addSouce);
};
};
} else {
if ((this.parent.parent is PlaneMachine)){
myBoxOffice = BoxOfficeShape(this.parent).myBoxOffice;
if (myBoxOffice.souceCREAM){
BoxOfficeShape(this.parent).gotoAndStop("souceCREAM");
if (myBoxOffice.souceCREAMon){
this.visible = true;
this.gotoAndStop((myBoxOffice.souceCREAM + "ON"));
};
};
};
};
}
private function addSouce(_arg1:Event):void{
boxOffice.myBoxOffice.removeEventListener("addSouce3", addSouce);
this.gotoAndStop(boxOffice.myBoxOffice.souceCREAM);
boxOffice.myBoxOffice.souceCREAMon = true;
}
override protected function destroy(_arg1:Event):void{
super.destroy(_arg1);
if ((this.parent.parent is BoxOffice)){
if (!boxOffice.myBoxOffice.souceCREAMon){
boxOffice.myBoxOffice.removeEventListener("addSouce3", addSouce);
};
};
}
}
}//package
Section 55
//BoxOfficeTopping (BoxOfficeTopping)
package {
import flash.display.*;
import flash.events.*;
public class BoxOfficeTopping extends MovieClip {
protected var boxOffice:BoxOffice;
public function BoxOfficeTopping(){
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
protected function destroy(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
}
}//package
Section 56
//Button_Game_Menu (Button_Game_Menu)
package {
public dynamic class Button_Game_Menu extends GenericButton {
public function Button_Game_Menu(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 57
//Button_Game_No (Button_Game_No)
package {
public dynamic class Button_Game_No extends GenericButton {
public function Button_Game_No(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 58
//Button_Game_Pause (Button_Game_Pause)
package {
public dynamic class Button_Game_Pause extends GenericButton {
public function Button_Game_Pause(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 59
//Button_Game_Quality (Button_Game_Quality)
package {
public dynamic class Button_Game_Quality extends GenericButton {
public function Button_Game_Quality(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 60
//Button_Game_Retry (Button_Game_Retry)
package {
public dynamic class Button_Game_Retry extends GenericButton {
public function Button_Game_Retry(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 61
//Button_Game_SkipTutorial (Button_Game_SkipTutorial)
package {
public dynamic class Button_Game_SkipTutorial extends GenericButton {
public function Button_Game_SkipTutorial(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 62
//Button_Game_SubmitScore (Button_Game_SubmitScore)
package {
public dynamic class Button_Game_SubmitScore extends GenericButton {
public function Button_Game_SubmitScore(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 63
//Button_Game_Yes (Button_Game_Yes)
package {
public dynamic class Button_Game_Yes extends GenericButton {
public function Button_Game_Yes(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 64
//Button_Highscores (Button_Highscores)
package {
public dynamic class Button_Highscores extends GoToButton {
public function Button_Highscores(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 65
//Button_Sound (Button_Sound)
package {
public dynamic class Button_Sound extends ButtonMute {
public function Button_Sound(){
if (SoundManager.mute){
this.gotoAndStop(4);
};
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 66
//Button_Sound_2 (Button_Sound_2)
package {
public dynamic class Button_Sound_2 extends ButtonMute {
public function Button_Sound_2(){
if (!SoundManager.musicFlag){
this.gotoAndStop(4);
};
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4, 4, frame5, 5, frame6);
}
function frame3(){
stop();
}
function frame6(){
stop();
}
function frame1(){
stop();
}
function frame4(){
stop();
}
function frame5(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 67
//Button_Start (Button_Start)
package {
import flash.net.*;
public dynamic class Button_Start extends GoToButton {
public var url:String;
public var request:URLRequest;
public function Button_Start(){
addFrameScript(0, frame1, 1, frame2, 2, frame3, 3, frame4);
}
function frame3(){
gotoAndPlay("off");
}
function frame1(){
stop();
unlockButton();
}
function frame4(){
stop();
unlockButton();
url = "http://www.cctv.com";
request = new URLRequest(url);
sendToURL(request);
}
function frame2(){
stop();
unlockButton();
}
}
}//package
Section 68
//ButtonMute (ButtonMute)
package {
import flash.events.*;
public class ButtonMute extends MultistateButton {
override protected function onClick(_arg1:MouseEvent):void{
var _local2:String;
var _local3:*;
var _local4:String;
super.onClick(_arg1);
_local2 = currentLabel;
_local3 = currentLabel.split("_");
_local4 = _arg1.currentTarget.name;
switch (_local4){
case "muteBtn":
if (GameManager.getInstance().getParameter(_local3[0]) == "off"){
SoundManager.muteMusic2();
} else {
SoundManager.unMuteMusic2();
};
break;
case "musicBtn":
if (GameManager.getInstance().getParameter(_local3[0]) == "off"){
SoundManager.pauseMusic();
} else {
SoundManager.playMusic();
};
break;
};
}
}
}//package
Section 69
//ButtonsEvents (ButtonsEvents)
package {
import flash.events.*;
public class ButtonsEvents extends EventDispatcher {
public static const BUTTONS_UNLOCKED:String = "ButtonsUnlocked";
public function ButtonsEvents(_arg1:IEventDispatcher=null){
super(_arg1);
}
private function onButtonsUnlocked():void{
dispatchEvent(new Event(ButtonsEvents.BUTTONS_UNLOCKED));
}
public function unlockButtons():void{
this.onButtonsUnlocked();
}
}
}//package
Section 70
//Candy (Candy)
package {
public class Candy extends ServingObject {
public var mkr:Marker;
public function Candy(){
if (!LevelDescription.aviableCandy){
visible = false;
};
}
override public function serve():void{
if ((((((BoxOfficeManager.getInstance().cook.myWafle.popcorn_shape == "Popcorn_cup_s")) || ((BoxOfficeManager.getInstance().cook.myWafle.popcorn_shape == "Popcorn_cup_b")))) && (!(BoxOfficeManager.getInstance().cook.myWafle.candyON)))){
BoxOfficeManager.getInstance().nextTutorialBlink(4);
SoundManager.giveBoxOfficeCandy();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.myWafle.candy = true;
BoxOfficeManager.getInstance().cook.graphic.giveCandy();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
protected function giveCandy():void{
BoxOfficeManager.getInstance().cook.myWafle.addCandy();
}
}
}//package
Section 71
//ch01 (ch01)
package {
import flash.media.*;
public dynamic class ch01 extends Sound {
}
}//package
Section 72
//ch02 (ch02)
package {
import flash.media.*;
public dynamic class ch02 extends Sound {
}
}//package
Section 73
//ch03 (ch03)
package {
import flash.media.*;
public dynamic class ch03 extends Sound {
}
}//package
Section 74
//Character (Character)
package {
import flash.events.*;
public class Character extends Queue {
private var markersOnStage:Array;
protected var _graphic:CharacterGraphic;
public function Character(_arg1:CharacterGraphic){
markersOnStage = new Array();
this._graphic = _arg1;
_arg1.owner = this;
this._graphic.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
public function set graphic(_arg1:CharacterGraphic):void{
_graphic = _arg1;
}
protected function addExtraStep2Marker(_arg1:QueueMarker, _arg2:QueueStep):void{
_arg2.addEventListener(QueueStep.DESTROY_STEP, clearMarker);
_arg2.addEventListener(QueueStep.DESTROY_STEP, updateMarkers);
_arg1.id.push(_arg2.id);
}
private function kill(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
if (QueueMarker(_arg1.currentTarget).id.length > 0){
_local2 = QueueMarker(_arg1.currentTarget).id.length;
_local3 = 0;
while (_local3 < _local2) {
this.removeStep(QueueMarker(_arg1.currentTarget).id[_local3]);
_local3++;
};
};
_arg1.stopPropagation();
}
private function clearMarker(_arg1:Event):void{
var _local2:int;
var _local3:int;
QueueStep(_arg1.currentTarget).removeEventListener(QueueStep.DESTROY_STEP, clearMarker);
QueueStep(_arg1.currentTarget).removeEventListener(QueueStep.DESTROY_STEP, updateMarkers);
_local2 = 0;
while (_local2 < markersOnStage.length) {
_local3 = 0;
while (_local3 < QueueMarker(markersOnStage[_local2]).id.length) {
if (QueueStep(_arg1.currentTarget).id == QueueMarker(markersOnStage[_local2]).id[_local3]){
QueueMarker(markersOnStage[_local2]).id.splice(_local3, 1);
if (QueueMarker(markersOnStage[_local2]).id.length == 0){
QueueMarker(markersOnStage[_local2]).parent.removeChild(QueueMarker(markersOnStage[_local2]));
QueueMarker(markersOnStage[_local2]).removeEventListener(MouseEvent.CLICK, kill);
markersOnStage.splice(_local2, 1);
break;
};
};
_local3++;
};
_local2++;
};
}
public function get graphic():CharacterGraphic{
return (_graphic);
}
private function updateMarkers(_arg1:Event):void{
var _local2:int;
_local2 = 0;
while (_local2 < markersOnStage.length) {
QueueMarker(markersOnStage[_local2]).setNumber((_local2 + 1));
_local2++;
};
}
protected function destroy(_arg1:Event):void{
this._graphic.removeEventListener(Event.REMOVED_FROM_STAGE, destroy);
clearQueue();
}
protected function addMarker(_arg1:QueueStep, _arg2=null, _arg3=null):QueueMarker{
var _local4:QueueMarker;
_arg1.addEventListener(QueueStep.DESTROY_STEP, clearMarker);
_arg1.addEventListener(QueueStep.DESTROY_STEP, updateMarkers);
_local4 = new QueueMarker([_arg1.id]);
if ((((_arg2 == null)) || ((_arg3 == null)))){
_local4.x = this._graphic.parent.mouseX;
_local4.y = this._graphic.parent.mouseY;
} else {
_local4.x = _arg2;
_local4.y = _arg3;
};
BoxOfficeManager.getInstance().addChild(_local4);
_local4.addEventListener(MouseEvent.CLICK, kill);
markersOnStage.push(_local4);
_local4.setNumber(markersOnStage.length);
return (_local4);
}
}
}//package
Section 75
//CharacterGraphic (CharacterGraphic)
package {
import flash.display.*;
public class CharacterGraphic extends MovieClip implements BoxOfficeOwner {
private var currentRotation:int;// = 1
private var rotationStep:int;
public var boxOffice:BoxOffice;
private var rotationDestination:int;
private var _owner:Character;
public function CharacterGraphic(){
currentRotation = 1;
super();
currentRotation = 1;
addFrameScript(0, frame1, 12, frame13, 25, frame26, 30, frame31, 35, frame36, 48, frame49, 61, frame62, 66, frame67, 71, frame72, 84, frame85, 97, frame98, 102, frame103, 107, frame108, 118, frame119, 129, frame130, 134, frame135, 139, frame140, 144, frame145, 149, frame150, 154, frame155, 159, frame160, 164, frame165, 169, frame170, 174, frame175, 179, frame180, 208, frame209, 237, frame238, 260, frame261, 283, frame284, 315, frame316, 347, frame348, 379, frame380, 412, frame413, 434, frame435, 453, frame454, 485, frame486, 513, frame514, 542, frame543, 571, frame572, 591, frame592, 599, frame600, 611, frame612);
mouseEnabled = false;
mouseChildren = false;
}
function frame348(){
toIdle();
}
protected function idle():void{
if (Cook(owner).popWafle != false){
this.gotoAndPlay(((currentRotation.toString() + "_Idle") + "_BoxOffice"));
} else {
if (Cook(owner).drinkWafle != false){
this.gotoAndPlay(((currentRotation.toString() + "_Idle") + "_BoxOffice"));
} else {
if (Cook(owner).creamWafle != false){
this.gotoAndPlay(((currentRotation.toString() + "_Idle") + "_BoxOffice"));
} else {
if (Cook(owner).myWafle.ticket_shape != ""){
this.gotoAndPlay((("1" + "_Idle") + "_BoxOffice"));
} else {
this.gotoAndPlay((currentRotation.toString() + "_Idle"));
};
};
};
};
if (currentRotation.toString() != "4"){
this.gotoAndPlay((("1" + "_Idle") + "_BoxOffice"));
} else {
if (LevelDescription.pos_customer){
LevelDescription.pos_customer = false;
this.gotoAndPlay((("1" + "_Idle") + "_BoxOffice"));
};
};
}
function frame155(){
nextRotation();
}
function frame67(){
nextRotation();
}
function frame72(){
nextRotation();
}
function frame435(){
this.gotoAndPlay("1_Idle_BoxOffice");
_owner.nextStep();
}
function frame316(){
toIdle();
}
public function giveSauce(_arg1:int):void{
if (_arg1 < 5){
this.gotoAndPlay("3_Sauce_1to4");
} else {
if (_arg1 == 5){
this.gotoAndPlay("3_Sauce_5");
} else {
this.gotoAndPlay("3_Sauce_6");
};
};
}
protected function toIdle():void{
idle();
_owner.nextStep();
}
function frame160(){
nextRotation();
}
function frame165(){
nextRotation();
}
function frame600():void{
toIdle();
}
public function boxOfficeMachinePick():void{
this.gotoAndPlay("2_PickBoxOffice");
}
function frame85(){
gotoAndPlay(this.currentLabel);
}
function frame209(){
toIdle();
}
public function trash():void{
this.gotoAndPlay("4_Trash");
}
function frame284(){
toIdle();
}
function frame170(){
nextRotation();
}
function frame98(){
gotoAndPlay(this.currentLabel);
}
public function rotate(_arg1:int):void{
if (_arg1 == currentRotation){
return;
};
rotationDestination = _arg1;
_loc_2 = _arg1;
if ((((currentRotation == 1)) && ((_arg1 == 4)))){
_loc_2 = 0;
};
if ((((currentRotation == 4)) && ((_arg1 == 1)))){
_loc_2 = 3;
};
if (Math.abs((currentRotation - _loc_2)) == 1){
gotoRotate(currentRotation, _arg1);
rotationStep = _arg1;
} else {
if (_arg1 > 2){
var _temp1 = _arg1;
_arg1 = (_arg1 - 1);
gotoRotate(currentRotation, _temp1);
var _temp2 = _arg1;
_arg1 = (_arg1 - 1);
rotationStep = _temp2;
} else {
gotoRotate(currentRotation, (_arg1 + 1));
rotationStep = (_arg1 + 1);
};
};
gotoRotate(currentRotation, _arg1);
}
function frame180(){
nextRotation();
}
public function set owner(_arg1:Character):void{
_owner = _arg1;
}
public function takeCash():void{
this.gotoAndPlay("1_CoinPickup");
}
function frame1():void{
stop();
}
function frame572(){
toIdle();
}
function frame13(){
gotoAndPlay(this.currentLabel);
}
function frame108(){
nextRotation();
}
function frame103(){
nextRotation();
}
function frame612(){
toIdle();
}
function frame238(){
toIdle();
}
function frame36(){
nextRotation();
}
public function addMix():void{
this.gotoAndPlay(("2_Mix" + "BoxOffice"));
}
public function cupPick():void{
this.gotoAndPlay("2_PickBoxOffice");
}
protected function nextRotation():void{
if (rotationStep == rotationDestination){
currentRotation = rotationDestination;
idle();
} else {
currentRotation = rotationStep;
rotate(rotationDestination);
};
}
function frame31(){
nextRotation();
}
function frame454(){
this.gotoAndPlay("1_Idle_BoxOffice");
_owner.nextStep();
}
function frame486(){
toIdle();
}
private function gotoRotate(_arg1:int, _arg2:int):void{
this.gotoAndPlay((((("Rotate_" + _arg1.toString()) + "_") + _arg2.toString()) + "_BoxOffice"));
}
public function get owner():Character{
return (_owner);
}
function frame175(){
nextRotation();
}
function frame26(){
gotoAndPlay(this.currentLabel);
}
function frame49(){
gotoAndPlay(this.currentLabel);
}
function frame592(){
toIdle();
}
public function giveOrder():void{
this.gotoAndPlay("1_Customer");
}
protected function clearToIdle():void{
idle();
_owner.nextStep();
}
function frame130(){
gotoAndPlay(this.currentLabel);
}
function frame119(){
gotoAndPlay(this.currentLabel);
}
function frame413(){
toIdle();
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
return (Cook(_owner).myWafle);
}
function frame514(){
clearToIdle();
}
public function giveCandy():void{
this.gotoAndPlay("4_Candy");
}
public function boxOfficeMachineOpenClose():void{
this.gotoAndPlay(("2_Close_BoxOfficemaker" + "BoxOffice"));
}
function frame135(){
nextRotation();
}
function frame261(){
toIdle();
}
function frame380(){
toIdle();
}
function frame62(){
gotoAndPlay(this.currentLabel);
}
public function giveCookie():void{
this.gotoAndPlay("4_Cookie");
}
function frame543(){
toIdle();
}
function frame140(){
nextRotation();
}
public function giveCream():void{
this.gotoAndPlay("4_Cream");
}
function frame145(){
nextRotation();
}
function frame150(){
nextRotation();
}
}
}//package
Section 76
//click (click)
package {
import flash.media.*;
public dynamic class click extends Sound {
}
}//package
Section 77
//Clock (Clock)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Clock extends MovieClip {
private var time:Timer;
public function Clock(){
var _local1:int;
super();
this.stop();
_local1 = (LevelDescription.levelTime * 60);
time = new Timer(((1000 * _local1) / 360), 360);
time.addEventListener(TimerEvent.TIMER, update);
time.addEventListener(TimerEvent.TIMER_COMPLETE, gameOver);
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
}
private function destroy(_arg1:Event):void{
this.removeEventListener(Event.REMOVED_FROM_STAGE, destroy);
if (time.running){
time.stop();
};
}
public function resume():void{
time.start();
}
public function startLvel():void{
time.start();
}
public function blinkOff():void{
this.gotoAndStop(1);
}
private function update(_arg1:TimerEvent):void{
this.gotoAndStop(int(time.currentCount));
}
private function gameOver(_arg1:TimerEvent):void{
}
public function pause():void{
time.stop();
}
}
}//package
Section 78
//clocktimesup03 (clocktimesup03)
package {
import flash.media.*;
public dynamic class clocktimesup03 extends Sound {
}
}//package
Section 79
//Cook (Cook)
package {
import fl.transitions.*;
import fl.transitions.easing.*;
public class Cook extends Character {
private var tw:Tween;
private var _creamWafle:String;// = ""
private var tw2:Tween;
private var halfTime:Number;
private var rotationDone:Boolean;
private var _withWafle:String;// = ""
private var rotationTarget:int;
private var _drinkWafle:String;// = ""
private var _myWafle:BoxOfficeDescription;
private var _popWafle:String;// = ""
public function Cook(_arg1:CharacterGraphic){
_withWafle = "";
_popWafle = "";
_drinkWafle = "";
_creamWafle = "";
_myWafle = new BoxOfficeDescription();
super(_arg1);
}
public function set popWafle(_arg1):void{
if (_arg1){
_popWafle = "_popWafle";
} else {
_popWafle = "";
};
}
public function get myWafle():BoxOfficeDescription{
return (_myWafle);
}
public function get popWafle():String{
return (_popWafle);
}
public function set myWafle(_arg1:BoxOfficeDescription):void{
_myWafle = _arg1;
}
public function get drinkWafle():String{
return (_drinkWafle);
}
public function get withWafle():String{
return (_withWafle);
}
public function gotoAndServe_Poster(_arg1:PosterMachine):QueueStep{
var _local2:QueueStep;
var _local3:QueueMarker;
_local2 = this.addStep(goto, _arg1.marker.x, _arg1.marker.y, _arg1.rotationTarget);
_local3 = addMarker(_local2, _arg1.positionMarker.x, _arg1.positionMarker.y);
_local2.nextStep = this.addStep(_arg1.serve);
addExtraStep2Marker(_local3, _local2.nextStep);
startExecution();
return (_local2);
}
public function set drinkWafle(_arg1):void{
if (_arg1){
_drinkWafle = "_drinkWafle";
} else {
_drinkWafle = "";
};
}
private function mover(_arg1:TweenEvent):void{
if (((!(rotationDone)) && ((_arg1.time >= halfTime)))){
rotationDone = true;
this.graphic.rotate(rotationTarget);
};
}
private function stopper(_arg1:TweenEvent):void{
tw.removeEventListener(TweenEvent.MOTION_CHANGE, mover);
tw.removeEventListener(TweenEvent.MOTION_FINISH, stopper);
nextStep();
}
public function set withWafle(_arg1):void{
if (_arg1){
_withWafle = "_BoxOffice";
} else {
_withWafle = "";
};
}
public function set creamWafle(_arg1):void{
if (_arg1){
_creamWafle = "_creamWafle";
} else {
_creamWafle = "";
};
}
private function goto(_arg1=0, _arg2=0, _arg3:int=1):void{
var _local4:int;
var _local5:Number;
_local4 = 250;
rotationTarget = _arg3;
_local5 = Math.sqrt((((graphic.x - _arg1) * (graphic.x - _arg1)) + ((graphic.y - _arg2) * (graphic.y - _arg2))));
if (((((graphic.x - _arg1) == 0)) && (((graphic.y - _arg2) == 0)))){
nextStep();
return;
};
tw = new Tween(graphic, "x", Strong.easeInOut, graphic.x, _arg1, (_local5 / _local4), true);
tw2 = new Tween(graphic, "y", Strong.easeInOut, graphic.y, _arg2, (_local5 / _local4), true);
halfTime = (_local5 / (_local4 * 3));
rotationDone = false;
tw.addEventListener(TweenEvent.MOTION_CHANGE, mover);
tw.addEventListener(TweenEvent.MOTION_FINISH, stopper);
}
public function get creamWafle():String{
return (_creamWafle);
}
public function gotoAndServe(_arg1:ServingObject):QueueStep{
var _local2:QueueStep;
var _local3:QueueMarker;
PlaneObject.machine_name = _arg1.name;
_local2 = this.addStep(goto, _arg1.marker.x, _arg1.marker.y, _arg1.rotationTarget);
_local3 = addMarker(_local2, _arg1.positionMarker.x, _arg1.positionMarker.y);
_local2.nextStep = this.addStep(_arg1.serve);
addExtraStep2Marker(_local3, _local2.nextStep);
startExecution();
return (_local2);
}
public function gotoAndServe_Plane(_arg1:PlaneMachine):QueueStep{
var _local2:QueueStep;
var _local3:QueueMarker;
_local2 = this.addStep(goto, _arg1.marker.x, _arg1.marker.y, _arg1.rotationTarget);
_local3 = addMarker(_local2, _arg1.positionMarker.x, _arg1.positionMarker.y);
_local2.nextStep = this.addStep(_arg1.serve);
addExtraStep2Marker(_local3, _local2.nextStep);
startExecution();
return (_local2);
}
}
}//package
Section 80
//Cookie (Cookie)
package {
public class Cookie extends ServingObject {
public var mkr:Marker;
public function Cookie(){
if (!LevelDescription.aviableCookie){
visible = false;
};
}
override public function serve():void{
if (((!((BoxOfficeManager.getInstance().cook.myWafle.shape == "cup"))) || (((((((BoxOfficeManager.getInstance().cook.myWafle.creamON) && ((!(BoxOfficeManager.getInstance().cook.withWafle) == "")))) && (!(BoxOfficeManager.getInstance().cook.myWafle.cookie)))) && (!(BoxOfficeManager.getInstance().cook.myWafle.burned)))))){
SoundManager.giveCookie();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.myWafle.cookie = true;
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
protected function giveCookie():void{
BoxOfficeManager.getInstance().cook.myWafle.addCookie();
}
}
}//package
Section 81
//Cream (Cream)
package {
public class Cream extends ServingObject {
private var id:int;
private var creamId:String;
private var names:Array;
public var mkr:Marker;
public function Cream(){
var _local1:Array;
super();
names = ["Strawberry", "Orange", "Grape"];
_local1 = this.name.split("_");
creamId = _local1[1];
id = int(creamId.charAt((creamId.length - 1)));
if (LevelDescription.aviableCream.indexOf(names[(id - 1)]) < 0){
visible = false;
};
}
override public function serve():void{
var _local1:BoxOfficeDescription;
_local1 = BoxOfficeManager.getInstance().cook.myWafle;
if ((((BoxOfficeManager.getInstance().cook.myWafle.cream_shape == "Cream_cup")) && (!(BoxOfficeManager.getInstance().cook.myWafle.creamON)))){
BoxOfficeManager.getInstance().nextTutorialBlink(2);
SoundManager.giveCream();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.myWafle.cream = names[(id - 1)];
BoxOfficeManager.getInstance().cook.graphic.giveCream();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
protected function giveCream():void{
BoxOfficeManager.getInstance().cook.myWafle.addCream();
}
}
}//package
Section 82
//Cream_cup (Cream_cup)
package {
public dynamic class Cream_cup extends BoxOfficeShape {
}
}//package
Section 83
//cream03 (cream03)
package {
import flash.media.*;
public dynamic class cream03 extends Sound {
}
}//package
Section 84
//cuh (cuh)
package {
import flash.media.*;
public dynamic class cuh extends Sound {
}
}//package
Section 85
//CupMachine (CupMachine)
package {
public class CupMachine extends ServingObject implements BoxOfficeOwner {
private var myBoxOffice:BoxOfficeDescription;
private var id:int;
private var names:Array;
public var mkr:Marker;
private var cupId:String;
public function CupMachine(){
var _local1:Array;
var _local2:String;
super();
names = ["Popcorn_cup_s", "Popcorn_cup_b", "Drink_cup_s", "Drink_cup_b", "Cream_cup"];
_local1 = this.name.split("_");
cupId = _local1[1];
id = int(cupId.charAt((cupId.length - 1)));
if (LevelDescription.aviableCup.indexOf(names[(id - 1)]) < 0){
visible = false;
};
_local2 = names[(id - 1)];
myBoxOffice = new BoxOfficeDescription();
switch (_local2){
case "Popcorn_cup_s":
myBoxOffice.popcorn_shape = _local2;
break;
case "Popcorn_cup_b":
myBoxOffice.popcorn_shape = _local2;
break;
case "Drink_cup_s":
myBoxOffice.drink_shape = _local2;
break;
case "Drink_cup_b":
myBoxOffice.drink_shape = _local2;
break;
case "Cream_cup":
myBoxOffice.cream_shape = _local2;
break;
};
}
override public function serve():void{
if (myBoxOffice.popcorn_shape != ""){
if (BoxOfficeManager.getInstance().cook.popWafle == ""){
BoxOfficeManager.getInstance().nextTutorialBlink(1);
SoundManager.giveCupSound();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.graphic.cupPick();
BoxOfficeManager.getInstance().cook.myWafle.popcorn_shape = myBoxOffice.popcorn_shape;
BoxOfficeManager.getInstance().cook.popWafle = true;
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
if (myBoxOffice.drink_shape != ""){
if (BoxOfficeManager.getInstance().cook.drinkWafle == ""){
BoxOfficeManager.getInstance().nextTutorialBlink(2);
SoundManager.giveCupSound();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.graphic.cupPick();
BoxOfficeManager.getInstance().cook.myWafle.drink_shape = myBoxOffice.drink_shape;
BoxOfficeManager.getInstance().cook.drinkWafle = true;
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
if (myBoxOffice.cream_shape != ""){
if (BoxOfficeManager.getInstance().cook.creamWafle == ""){
BoxOfficeManager.getInstance().nextTutorialBlink(1);
SoundManager.giveCupSound();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.graphic.cupPick();
BoxOfficeManager.getInstance().cook.myWafle.cream_shape = myBoxOffice.cream_shape;
BoxOfficeManager.getInstance().cook.creamWafle = true;
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
};
};
};
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
return (this.myBoxOffice);
}
}
}//package
Section 86
//Customer (Customer)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class Customer extends ServingObject implements BoxOfficeOwner {
private var slot:int;
private var speedy:Number;// = 2
private var speedx:Number;// = 3.5
private var paused:Boolean;
private var cashSet:Boolean;// = false
private var timeoutID:uint;
public var order:Game_Order;
private var _myBoxOffice:BoxOfficeDescription;
public var boxOffice:BoxOffice;
private var _color:int;
private var bouble:OrderBouble;
private var isAngry:Boolean;
public var mkr:Marker;
private var stopx:int;
public var head:Game_Customer_Head;
private var leavingTimer:Timer;
private var leaves:Boolean;// = false
public function Customer(_arg1:int){
var _local2:Array;
speedx = 3.5;
cashSet = false;
speedy = 2;
leaves = false;
super();
_myBoxOffice = new BoxOfficeDescription();
speedx = (60 / 30);
speedy = (60 / 30);
cashSet = false;
leaves = false;
addFrameScript(30, frame31, 79, frame80, 156, frame157, 195, frame205, 223, frame224);
if (LevelDescription.tutorialLevel){
_color = 1;
} else {
_color = (Math.floor((Math.random() * 4)) + 1);
};
_marker = PositionMarker(BoxOfficeManager.getInstance().getChildByName(("customer" + (_arg1 + 1).toString())));
_rotationTarget = 1;
slot = _arg1;
_local2 = [new Point(-14.7, 290.2), new Point(65.9, 333.9), new Point(144.9, 373.9)];
this.addEventListener(Event.ENTER_FRAME, move);
stopx = _local2[_arg1].x;
this.x = (stopx - 60);
this.y = (_local2[_arg1].y + 60);
mouseEnabled = false;
this.gotoAndPlay("walk");
this.leavingTimer = new Timer(((LevelDescription.timeToAgry + LevelDescription.timeToLeave) / 100), 100);
leavingTimer.addEventListener(TimerEvent.TIMER, angry);
leavingTimer.addEventListener(TimerEvent.TIMER_COMPLETE, leave);
BoxOfficeManager.getInstance().addEventListener("pause", pause);
BoxOfficeManager.getInstance().addEventListener("resume", resume);
}
function frame157(){
removeMe();
}
private function move(_arg1:Event):void{
if (Math.abs((this.x - stopx)) < (speedx * 1.1)){
startGame();
} else {
this.x = (this.x + speedx);
this.y = (this.y - speedy);
};
}
public function get myBoxOffice():BoxOfficeDescription{
return (_myBoxOffice);
}
override public function serve():void{
var _local1:Boolean;
_local1 = true;
if ((((((BoxOfficeManager.getInstance().cook.popWafle == "")) && ((BoxOfficeManager.getInstance().cook.drinkWafle == "")))) && ((BoxOfficeManager.getInstance().cook.creamWafle == "")))){
_local1 = false;
};
if (((((!(leaves)) && (_local1))) && (_myBoxOffice.compare(BoxOfficeManager.getInstance().cook.myWafle)))){
this.mouseChildren = false;
this.mouseEnabled = false;
BoxOfficeManager.getInstance().nextTutorialBlink(6);
SoundManager.custommerHappy();
BoxOfficeManager.getInstance().cook.graphic.giveOrder();
this.gotoAndPlay("Gets");
leavingTimer.stop();
_myBoxOffice.clearOrder();
} else {
SoundManager.custommerUnHappy();
BoxOfficeManager.getInstance().cook.nextStep();
};
}
function frame80(){
gotoAndPlay("Thunders");
}
private function resume(_arg1:Event):void{
if (bouble){
leavingTimer.start();
} else {
this.addEventListener(Event.ENTER_FRAME, move);
this.gotoAndPlay("walk");
};
paused = false;
}
function frame205(){
giveCash();
}
protected function removeMe():void{
this.stop();
BoxOfficeManager.getInstance().removeEventListener("pause", pause);
BoxOfficeManager.getInstance().removeEventListener("resume", resume);
if (parent){
this.parent.removeChild(this);
};
if (!cashSet){
if (LevelDescription.customer_num <= 0){
BoxOfficeManager.getInstance().customerOver();
};
BoxOfficeManager.getInstance().removeCustomer(slot);
};
}
public function set myBoxOffice(_arg1:BoxOfficeDescription):void{
_myBoxOffice = _arg1;
}
protected function giveCash():void{
var _local1:int;
order.visible = false;
cashSet = true;
_local1 = _myBoxOffice.givePrice();
if (!isAngry){
_local1 = (_local1 + LevelDescription.tip);
};
TableCash(BoxOfficeManager.getInstance().getChildByName((("_customer" + (slot + 1).toString()) + "_2"))).setCash(_local1, slot);
}
public function get color():int{
return (_color);
}
private function startGame():void{
if (!paused){
leavingTimer.start();
};
order = new Game_Order();
addChild(order);
order.x = -2.8;
order.y = 81.3;
order.init();
bouble = (order as OrderBouble);
bouble.visible = false;
bouble.stop();
this.gotoAndStop("Idle");
this._positionMarker = new Point((MovieClip(this.getChildByName("mkr")).x + this.x), (MovieClip(this.getChildByName("mkr")).y + this.y));
this.removeEventListener(Event.ENTER_FRAME, move);
this.mouseEnabled = true;
this.bouble.visible = true;
SoundManager.giveCustomerNew();
this.bouble.play();
BoxOfficeManager.getInstance().nextTutorialBlink(0);
}
private function angry(_arg1:TimerEvent):void{
if (LevelDescription.tutorialLevel){
return;
};
if (bouble.boubleClock != null){
bouble.boubleClock.gotoAndStop(leavingTimer.currentCount);
};
if (((!(isAngry)) && ((leavingTimer.currentCount >= (LevelDescription.timeToAgry / leavingTimer.delay))))){
isAngry = true;
SoundManager.giveCustomerAngry();
this.gotoAndPlay("Impatient");
};
}
function frame224(){
removeMe();
}
private function leave(_arg1:TimerEvent):void{
if (LevelDescription.tutorialLevel){
return;
};
SoundManager.giveCustomerLeaving();
LevelDescription.leave_num++;
BoxOfficeManager.getInstance().customerLeaveFunc();
bouble.visible = false;
leaves = true;
this.gotoAndPlay("Leaves");
this.mouseEnabled = false;
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
return (this.myBoxOffice);
}
function frame31(){
this.gotoAndPlay("Walk");
}
private function pause(_arg1:Event):void{
leavingTimer.stop();
if (!bouble){
this.removeEventListener(Event.ENTER_FRAME, move);
this.gotoAndStop("Idle");
};
paused = true;
}
}
}//package
Section 87
//CustomerGraphicElement (CustomerGraphicElement)
package {
import flash.display.*;
public class CustomerGraphicElement extends MovieClip {
public function CustomerGraphicElement(){
this.gotoAndStop(Customer(this.parent).color);
}
}
}//package
Section 88
//Customernew02 (Customernew02)
package {
import flash.media.*;
public dynamic class Customernew02 extends Sound {
}
}//package
Section 89
//Drink_Apple (Drink_Apple)
package {
public dynamic class Drink_Apple extends BoxOfficeSouceCream {
public function Drink_Apple(){
addFrameScript(0, frame1, 6, frame7, 12, frame13, 18, frame19, 24, frame25, 30, frame31, 36, frame37);
}
function frame7(){
stop();
}
function frame1(){
stop();
}
function frame19(){
stop();
}
function frame25(){
stop();
}
function frame13(){
stop();
}
function frame37(){
stop();
}
function frame31(){
stop();
}
}
}//package
Section 90
//FG_Preloader (FG_Preloader)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class FG_Preloader extends MovieClip {
private var _percents:TextField;
private var _elements:Array;
private var _weight:TextField;
private var _progresBar:ProgresBar;
public function FG_Preloader(){
this._elements = new Array();
this._percents = TextField(this.getChildByName("percent"));
if (this._percents != null){
this._elements[0] = true;
};
this._weight = TextField(this.getChildByName("weight_txt"));
if (this._weight != null){
this._elements[1] = true;
};
this._progresBar = ProgresBar(this.getChildByName("_progresBarTimeline"));
if (this._progresBar != null){
this._elements[2] = true;
};
}
private function progressListener(_arg1:ProgressEvent):void{
var _local2:Number;
var _local3:int;
_local2 = (_arg1.bytesLoaded / _arg1.bytesTotal);
_local3 = (_local2 * 100);
if (this._elements[0]){
this._percents.text = String(_local3);
};
if (this._elements[1]){
this._weight.text = String((int((_arg1.bytesTotal / 0x0400)) + " kB"));
};
if (this._elements[2]){
this._progresBar.setProgres(_local3);
};
}
private function completeListener(_arg1:Event):void{
this.loaderInfo.removeEventListener(ProgressEvent.PROGRESS, progressListener);
this.loaderInfo.removeEventListener(Event.COMPLETE, completeListener);
this.finishLoading();
}
private function finishLoading():void{
if (this._elements[0]){
this._percents.text = String((100 + "%"));
};
if (this._elements[1]){
this._weight.text = String((int((this.loaderInfo.bytesTotal / 0x0400)) + " kB"));
};
if (this._elements[2]){
this._progresBar.setProgres(100);
};
GameDispatcher.preloaderDispatcher.loadingComplete();
}
public function startLoad():void{
if (this.loaderInfo.bytesLoaded >= this.loaderInfo.bytesTotal){
this.finishLoading();
} else {
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressListener);
this.loaderInfo.addEventListener(Event.COMPLETE, completeListener);
};
}
}
}//package
Section 91
//Game_BoxOfficeManager (Game_BoxOfficeManager)
package {
public dynamic class Game_BoxOfficeManager extends BoxOfficeManager {
}
}//package
Section 92
//Game_Customer_Arm_2 (Game_Customer_Arm_2)
package {
public dynamic class Game_Customer_Arm_2 extends CustomerGraphicElement {
public function Game_Customer_Arm_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 93
//Game_Customer_Arm_Left (Game_Customer_Arm_Left)
package {
public dynamic class Game_Customer_Arm_Left extends CustomerGraphicElement {
public function Game_Customer_Arm_Left(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 94
//Game_Customer_Arm_Left_bent (Game_Customer_Arm_Left_bent)
package {
public dynamic class Game_Customer_Arm_Left_bent extends CustomerGraphicElement {
public function Game_Customer_Arm_Left_bent(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 95
//Game_Customer_Body (Game_Customer_Body)
package {
public dynamic class Game_Customer_Body extends CustomerGraphicElement {
public function Game_Customer_Body(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 96
//Game_Customer_Body_2 (Game_Customer_Body_2)
package {
public dynamic class Game_Customer_Body_2 extends CustomerGraphicElement {
public function Game_Customer_Body_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 97
//Game_Customer_Head (Game_Customer_Head)
package {
public dynamic class Game_Customer_Head extends CustomerGraphicElement {
public function Game_Customer_Head(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 98
//Game_Customer_Head_2 (Game_Customer_Head_2)
package {
public dynamic class Game_Customer_Head_2 extends CustomerGraphicElement {
public function Game_Customer_Head_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 99
//Game_Customer_Leg_2 (Game_Customer_Leg_2)
package {
public dynamic class Game_Customer_Leg_2 extends CustomerGraphicElement {
public function Game_Customer_Leg_2(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 100
//Game_Customer_Leg_Left1 (Game_Customer_Leg_Left1)
package {
import flash.display.*;
public dynamic class Game_Customer_Leg_Left1 extends MovieClip {
public function Game_Customer_Leg_Left1(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 101
//Game_Customer_Leg_Left1_Trousers (Game_Customer_Leg_Left1_Trousers)
package {
public dynamic class Game_Customer_Leg_Left1_Trousers extends CustomerGraphicElement {
}
}//package
Section 102
//Game_Customer_Leg_Left2 (Game_Customer_Leg_Left2)
package {
public dynamic class Game_Customer_Leg_Left2 extends CustomerGraphicElement {
}
}//package
Section 103
//Game_Customer_Leg_Left3 (Game_Customer_Leg_Left3)
package {
public dynamic class Game_Customer_Leg_Left3 extends CustomerGraphicElement {
}
}//package
Section 104
//Game_Customer_Leg_Right (Game_Customer_Leg_Right)
package {
public dynamic class Game_Customer_Leg_Right extends CustomerGraphicElement {
public function Game_Customer_Leg_Right(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 105
//Game_Customer_Leg_Right_Trousers (Game_Customer_Leg_Right_Trousers)
package {
public dynamic class Game_Customer_Leg_Right_Trousers extends CustomerGraphicElement {
}
}//package
Section 106
//Game_Customer_Leg_Right2 (Game_Customer_Leg_Right2)
package {
public dynamic class Game_Customer_Leg_Right2 extends CustomerGraphicElement {
}
}//package
Section 107
//Game_Den_Cup_S (Game_Den_Cup_S)
package {
public dynamic class Game_Den_Cup_S extends CupMachine {
public function Game_Den_Cup_S(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 108
//Game_DisCream_Cup (Game_DisCream_Cup)
package {
public dynamic class Game_DisCream_Cup extends CupMachine {
public function Game_DisCream_Cup(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 109
//Game_Dispenser_BoxOffice (Game_Dispenser_BoxOffice)
package {
public dynamic class Game_Dispenser_BoxOffice extends BoxOfficeMachine {
public function Game_Dispenser_BoxOffice(){
addFrameScript(29, frame30, 58, frame59, 87, frame88, 117, frame118, 146, frame147, 175, frame176, 205, frame206, 234, frame235, 263, frame264, 293, frame294, 322, frame323, 351, frame352, 381, frame382, 410, frame411, 439, frame440, 469, frame470, 498, frame499, 527, frame528, 557, frame558, 586, frame587, 615, frame616);
}
function frame411(){
stop();
}
function frame264(){
stop();
}
function frame558(){
stop();
}
function frame440(){
toIdle();
}
function frame206(){
stop();
}
function frame88(){
toIdle();
}
function frame323(){
stop();
}
function frame176(){
toIdle();
}
function frame294(){
stop();
}
function frame616(){
toIdle();
}
function frame587(){
stop();
}
function frame352(){
toIdle();
}
function frame235(){
stop();
}
function frame30(){
stop();
}
function frame470(){
stop();
}
function frame118(){
stop();
}
function frame528(){
toIdle();
}
function frame59(){
stop();
}
function frame499(){
stop();
}
function frame382(){
stop();
}
function frame147(){
stop();
}
}
}//package
Section 110
//Game_Dispenser_BoxOffice_Knob (Game_Dispenser_BoxOffice_Knob)
package {
public dynamic class Game_Dispenser_BoxOffice_Knob extends BoxOfficeMachineKnob {
}
}//package
Section 111
//Game_Dispenser_BoxOfficePipe (Game_Dispenser_BoxOfficePipe)
package {
public dynamic class Game_Dispenser_BoxOfficePipe extends MixPipe {
public function Game_Dispenser_BoxOfficePipe(){
addFrameScript(30, frame31, 61, frame62, 90, frame91, 122, frame123, 154, frame155, 184, frame185);
}
function frame155(){
this.gotoAndStop(machnes);
}
function frame91(){
this.gotoAndStop(machnes);
}
function frame185(){
this.gotoAndStop(machnes);
}
function frame123(){
this.gotoAndStop(machnes);
}
function frame31(){
this.gotoAndStop(machnes);
}
function frame62(){
this.gotoAndStop(machnes);
}
}
}//package
Section 112
//Game_Dispenser_Candy (Game_Dispenser_Candy)
package {
public dynamic class Game_Dispenser_Candy extends Candy {
public function Game_Dispenser_Candy(){
addFrameScript(0, frame1, 17, frame18);
}
function frame18(){
giveCandy();
}
function frame1(){
stop();
}
}
}//package
Section 113
//Game_Dispenser_Cookie (Game_Dispenser_Cookie)
package {
public dynamic class Game_Dispenser_Cookie extends Cookie {
public function Game_Dispenser_Cookie(){
addFrameScript(0, frame1, 18, frame19);
}
function frame1(){
stop();
}
function frame19(){
giveCookie();
}
}
}//package
Section 114
//Game_Dispenser_Cream (Game_Dispenser_Cream)
package {
public dynamic class Game_Dispenser_Cream extends Cream {
public function Game_Dispenser_Cream(){
addFrameScript(0, frame1, 23, frame24);
}
function frame1(){
stop();
}
function frame24(){
giveCream();
}
}
}//package
Section 115
//Game_Dispenser_Cup (Game_Dispenser_Cup)
package {
public dynamic class Game_Dispenser_Cup extends CupMachine {
public function Game_Dispenser_Cup(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 116
//Game_Dispenser_Mix (Game_Dispenser_Mix)
package {
public dynamic class Game_Dispenser_Mix extends Mix {
public function Game_Dispenser_Mix(){
addFrameScript(11, frame12, 22, frame23, 33, frame34, 44, frame45, 55, frame56, 66, frame67, 77, frame78, 88, frame89, 98, frame99, 132, frame133, 155, frame156, 178, frame179, 201, frame202, 224, frame225, 247, frame248, 270, frame271, 293, frame294, 316, frame317, 339, frame340, 362, frame363);
}
function frame156(){
stop();
}
function frame78(){
stop();
}
function frame317(){
stop();
}
function frame89(){
stop();
}
function frame202(){
stop();
}
function frame294(){
stop();
}
function frame12(){
stop();
}
function frame340(){
stop();
}
function frame23(){
stop();
}
function frame225(){
stop();
}
function frame179(){
stop();
}
function frame34(){
stop();
}
function frame99(){
stop();
}
function frame248(){
stop();
}
function frame45(){
stop();
}
function frame363(){
stop();
}
function frame56(){
stop();
}
function frame133(){
stop();
}
function frame67(){
stop();
}
function frame271(){
stop();
}
}
}//package
Section 117
//Game_Dispenser_Money_Price (Game_Dispenser_Money_Price)
package {
public dynamic class Game_Dispenser_Money_Price extends TableCashText {
}
}//package
Section 118
//Game_Dispenser_Sauce_Apple (Game_Dispenser_Sauce_Apple)
package {
public dynamic class Game_Dispenser_Sauce_Apple extends Sauce {
public function Game_Dispenser_Sauce_Apple(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 119
//Game_Dispenser_Sauce_BlueBerry (Game_Dispenser_Sauce_BlueBerry)
package {
public dynamic class Game_Dispenser_Sauce_BlueBerry extends Sauce {
public function Game_Dispenser_Sauce_BlueBerry(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 120
//Game_Dispenser_Sauce_Cherry (Game_Dispenser_Sauce_Cherry)
package {
public dynamic class Game_Dispenser_Sauce_Cherry extends Sauce {
public function Game_Dispenser_Sauce_Cherry(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 121
//Game_Dispenser_Sauce_Chocolate (Game_Dispenser_Sauce_Chocolate)
package {
public dynamic class Game_Dispenser_Sauce_Chocolate extends Sauce {
public function Game_Dispenser_Sauce_Chocolate(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 122
//Game_Dispenser_Sauce_Orange (Game_Dispenser_Sauce_Orange)
package {
public dynamic class Game_Dispenser_Sauce_Orange extends Sauce {
public function Game_Dispenser_Sauce_Orange(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 123
//Game_Dispenser_Sauce_Vanilla (Game_Dispenser_Sauce_Vanilla)
package {
public dynamic class Game_Dispenser_Sauce_Vanilla extends Sauce {
public function Game_Dispenser_Sauce_Vanilla(){
addFrameScript(0, frame1, 21, frame22);
}
function frame1(){
stop();
}
function frame22(){
giveSouce();
}
}
}//package
Section 124
//Game_Dispenser_Trash (Game_Dispenser_Trash)
package {
public dynamic class Game_Dispenser_Trash extends Trash {
public function Game_Dispenser_Trash(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 125
//Game_Drink_Cup_B (Game_Drink_Cup_B)
package {
public dynamic class Game_Drink_Cup_B extends CupMachine {
public function Game_Drink_Cup_B(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 126
//Game_Drink_Cup_S (Game_Drink_Cup_S)
package {
public dynamic class Game_Drink_Cup_S extends CupMachine {
public function Game_Drink_Cup_S(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 127
//Game_Interface_Popups_Menu (Game_Interface_Popups_Menu)
package {
public dynamic class Game_Interface_Popups_Menu extends Menu {
}
}//package
Section 128
//Game_Order (Game_Order)
package {
public dynamic class Game_Order extends OrderBouble {
public function Game_Order(){
addFrameScript(8, frame9);
}
function frame9(){
stop();
}
}
}//package
Section 129
//Game_Plane (Game_Plane)
package {
public dynamic class Game_Plane extends PlaneMachine {
public function Game_Plane(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 130
//Game_Poster (Game_Poster)
package {
public dynamic class Game_Poster extends PosterMachine {
public function Game_Poster(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 131
//Game_Tickets (Game_Tickets)
package {
import flash.display.*;
import flash.text.*;
public class Game_Tickets extends MovieClip {
private var _tickets_num:Number;// = 0
public var Ticket_mc:Ticket;
public var _txt:TextField;
public function Game_Tickets():void{
_tickets_num = 0;
super();
Ticket_mc.visible = false;
}
public function addTicket(_arg1:String):void{
Ticket_mc.visible = true;
Ticket_mc.gotoTicket(_arg1);
}
public function get tickets_num():Number{
return (this._tickets_num);
}
public function set tickets_num(_arg1:Number):void{
this._tickets_num = _arg1;
_txt.text = ("x" + String(_tickets_num));
}
public function removeTicket(_arg1:String):void{
tickets_num--;
if (tickets_num <= 0){
tickets_num = 0;
};
Ticket_mc.visible = false;
}
}
}//package
Section 132
//GameDispatcher (GameDispatcher)
package {
public class GameDispatcher {
public static var highscoreDispatcher:HighscoreLoaded = new HighscoreLoaded();
public static var buttonsDispatcher:ButtonsEvents = new ButtonsEvents();
public static var mouseDispatcher:MouseEventDispatcher = new MouseEventDispatcher();
public static var preloaderDispatcher:LoadingComplete = new LoadingComplete();
}
}//package
Section 133
//GameManager (GameManager)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
import flash.ui.*;
public class GameManager extends MovieClip {
private var _highscoreArray:Array;
public var btn_add:SimpleButton;
public var money_txt:TextField;
public var copy_btn:SimpleButton;
public var ins_txt:TextField;
public var btn_down:SimpleButton;
public var btn_view:SimpleButton;
public var btn_2Highscores:Button_Highscores;
public var cusNum_txt:TextField;
public var SubmitBox_mc:SubmitBox;
public var back_btn:SimpleButton;
private var _gamePoints:int;
public var earnT_txt:TextField;
public var credits_btn:SimpleButton;
public var btn_more:SimpleButton;
public var btn_submit:SimpleButton;
public var earnedM_txt:TextField;
private var _fg:FG_Preloader;
private var gameParameters:Array;
public var muteBtn:Button_Sound;
private var delayedWaypoint:String;
public var btn_ins:SimpleButton;
private var _preloaderStart:Boolean;
public var btn_again:SimpleButton;
public var logo_btn:SimpleButton;
public var btn_HighScore:Button_Highscores;
public var submitMc:SubmitBox;
public var btn_Title2Game:SimpleButton;
public var btn_GameLabel:Button_Start;
private static var areButtonsEnabled:Boolean;
private static var instance:GameManager;
public function GameManager(){
addFrameScript(0, frame1, 1, frame2, 4, frame5, 119, frame120, 163, frame164, 193, frame194, 223, frame224, 269, frame270, 365, frame366, 408, frame409, 421, frame422, 422, frame423, 479, frame480, 480, frame481, 499, frame500, 509, frame510, 511, frame512, 0x0200, frame513, 513, frame514);
this.tabEnabled = false;
this.tabChildren = false;
if (instance == null){
LevelDescription.aviableFilm = [LevelDescription.getStartFilm()];
LevelDescription.levelFilms = LevelDescription.aviableFilm;
this.contextMenu = new ContextMenu();
this.contextMenu.hideBuiltInItems();
instance = this;
areButtonsEnabled = true;
gameParameters = new Array();
delayedWaypoint = null;
this.loaderInfo.addEventListener(Event.COMPLETE, completeList);
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, progressList);
this.addEventListener(Event.ENTER_FRAME, GMonEnterFrame);
GameDispatcher.preloaderDispatcher.addEventListener(LoadingComplete.LOADING_COMPLETE, startMenu);
this.addEventListener(Event.ADDED_TO_STAGE, onAdded);
};
}
function frame164(){
SoundManager.whooshi();
}
private function clickList(_arg1:MouseEvent):void{
var _local2:String;
switch (_arg1.currentTarget){
case btn_submit:
SubmitBox_mc.setName("boxoffice");
SubmitBox_mc.setScore(gamePoints);
SubmitBox_mc.visible = true;
break;
case btn_more:
_local2 = "http://www.freeworldgroup.com/games6/gameindex/evolution.htm";
getURLFunc(_local2);
break;
case btn_add:
_local2 = "http://www.freeworldgroup.com/koalafiles.htm";
getURLFunc(_local2);
break;
case btn_again:
gotoAndStop("Title2Game");
LevelDescription.reset();
SubmitBox_mc.visible = false;
break;
};
}
private function handleInvalidDomain(_arg1:Event):void{
stop();
}
function frame2(){
_frame2();
SoundManager.playBackgroundMusic();
gotoAndPlay("Title");
}
private function onAdded(_arg1:Event):void{
}
private function progressList(_arg1:ProgressEvent):void{
var _local2:Number;
_local2 = ((_arg1.bytesLoaded / _arg1.bytesTotal) * 100);
}
function frame5(){
}
function frame1(){
stop();
}
function frame500(){
gotoAndStop("Title2Game");
}
function frame194(){
SoundManager.toButtons();
}
function frame510(){
stop();
if (LevelDescription.level_flag){
LevelDescription.level_flag = false;
LevelDescription.customer_num = 12;
gotoAndPlay("Game");
} else {
switch (LevelDescription.level_status){
case "level_win":
gotoAndStop("Store");
break;
case "game_win":
gotoAndStop("winGame");
break;
case "game_lose":
gotoAndStop("loseGame");
break;
};
};
}
private function frame513():void{
SubmitBox_mc.visible = false;
TextField(money_txt).text = gamePoints.toString();
earnedM_txt.text = ("$" + BoxOfficeManager.getInstance().levelCash.toString());
cusNum_txt.text = BoxOfficeManager.getInstance().level_customer_num.toString();
earnT_txt.text = ("$" + LevelDescription.finalCashTarget.toString());
if (LevelDescription.leave_num >= 5){
ins_txt.text = "Too many unhappy customers!\nYOU FAIL !";
} else {
ins_txt.text = "Movie started 15 minutes ago. No more customers coming. You didn’t earn enough. ";
};
SimpleButton(btn_submit).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_more).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_again).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_add).addEventListener(MouseEvent.CLICK, clickList);
}
private function frame512():void{
back_btn.addEventListener(MouseEvent.CLICK, btnClickList);
}
private function handleValidDomain(_arg1:Event):void{
play();
}
private function frame514():void{
SubmitBox_mc.visible = false;
TextField(money_txt).text = gamePoints.toString();
SimpleButton(btn_submit).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_more).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_again).addEventListener(MouseEvent.CLICK, clickList);
SimpleButton(btn_add).addEventListener(MouseEvent.CLICK, clickList);
}
private function getURLFunc(_arg1:String):void{
var _local2:URLRequest;
_local2 = new URLRequest(_arg1);
navigateToURL(_local2, "_blank");
}
private function GMonEnterFrame(_arg1:Event):void{
if ((((this.currentLabel == "Preloader_Start")) && (!(this._preloaderStart)))){
this.initPreloader();
this._preloaderStart = true;
};
}
private function mousePress(_arg1:MouseEvent){
GameDispatcher.mouseDispatcher.buttonPressed(_arg1.target);
}
function frame409(){
SoundManager.toButtons();
}
public function delayedGoToAndStop():void{
if (this.delayedWaypoint != null){
gotoAndStop(this.delayedWaypoint);
this.delayedWaypoint = null;
};
}
public function setDelayedWaypoint(_arg1:String):void{
this.delayedWaypoint = _arg1;
}
private function startMenu(_arg1:Event):void{
this.gotoAndPlay("Preloader_Outro");
}
function frame422(){
}
private function frame423():void{
btn_ins.addEventListener(MouseEvent.CLICK, btnClickList);
btn_more.addEventListener(MouseEvent.CLICK, btnClickList);
btn_Title2Game.addEventListener(MouseEvent.CLICK, btnClickList);
btn_add.addEventListener(MouseEvent.CLICK, btnClickList);
logo_btn.addEventListener(MouseEvent.CLICK, btnClickList);
credits_btn.addEventListener(MouseEvent.CLICK, btnClickList);
}
public function set gamePoints(_arg1:int):void{
_gamePoints = _arg1;
}
public function getParameter(_arg1:String):String{
return (gameParameters[_arg1]);
}
public function buttonsOn():void{
GameDispatcher.buttonsDispatcher.unlockButtons();
areButtonsEnabled = true;
}
private function initPreloader():void{
this._fg = FG_Preloader(GameManager.getInstance().getChildByName("preloader_elements"));
if (this._fg != null){
this._fg.startLoad();
};
}
public function get gamePoints():int{
return (_gamePoints);
}
function frame224(){
frame423();
}
private function completeList(_arg1:Event):void{
_frame2();
}
public function setParameter(_arg1:String, _arg2:String):void{
gameParameters[_arg1] = _arg2;
}
function _frame2(){
var _local1:Number;
_local1 = 1;
this.scaleY = _local1;
this.scaleX = _local1;
}
function frame480(){
stop();
buttonsOn();
}
function frame481(){
}
function frame120(){
SoundManager.whooshi();
}
function frame366(){
SoundManager.whooshi();
}
private function btnClickList(_arg1:MouseEvent):void{
var _local2:String;
switch (_arg1.currentTarget){
case btn_Title2Game:
gotoAndPlay("playGame");
break;
case btn_ins:
LevelDescription.reset();
LevelDescription.leave_num = 0;
LevelDescription.level_flag = true;
LevelDescription.currentLevel = 0;
LevelDescription.tutorialElementsLevels = true;
LevelDescription.tutorialLevel = true;
gotoAndPlay("playGame");
break;
case btn_more:
_local2 = "http://www.freeworldgroup.com/games6/gameindex/evolution.htm";
getURLFunc(_local2);
break;
case btn_add:
_local2 = "http://www.freeworldgroup.com/koalafiles.htm";
getURLFunc(_local2);
break;
case logo_btn:
_local2 = "http://www.freeworldgroup.com";
getURLFunc(_local2);
break;
case credits_btn:
gotoAndStop("credits");
break;
case back_btn:
gotoAndStop("Title2Game");
break;
};
}
public function get AreButtonsEnabled():Boolean{
return (areButtonsEnabled);
}
public function lockButtons():void{
areButtonsEnabled = true;
}
public function delayedGoToAndPlay():void{
if (this.delayedWaypoint != null){
gotoAndPlay(this.delayedWaypoint);
this.delayedWaypoint = null;
};
}
public function handleCloseHSB(_arg1:Event){
play();
}
function frame270(){
stop();
buttonsOn();
}
public static function getInstance():GameManager{
if (instance == null){
};
return (instance);
}
}
}//package
Section 134
//GenericButton (GenericButton)
package {
import flash.display.*;
import flash.events.*;
public class GenericButton extends MovieClip {
private var locked:Boolean;
private var clicked:Boolean;
private var over:Boolean;
public function GenericButton(){
this.buttonMode = true;
clicked = false;
over = false;
locked = false;
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.ROLL_OVER, onRollingOver);
addEventListener(MouseEvent.ROLL_OUT, onRollingOut);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseIsDown);
addEventListener(MouseEvent.MOUSE_UP, onMouseIsUp);
addEventListener(Event.REMOVED_FROM_STAGE, cleanUp);
GameDispatcher.buttonsDispatcher.addEventListener(ButtonsEvents.BUTTONS_UNLOCKED, refreshButton);
GameDispatcher.mouseDispatcher.addEventListener(MouseEventDispatcher.BUTTON_PRESSED, unclickButton);
goToLabel("off");
}
private function onRollingOut(_arg1:MouseEvent):void{
over = false;
if (((GameManager.getInstance().AreButtonsEnabled) && (!(locked)))){
if (currentLabel != "out"){
goToLabel("out");
locked = true;
};
};
}
private function goToLabel(_arg1:String):void{
var doesLabelExist:Boolean;
var i:Number;
var e:Error;
var destinationLabel:*;
var param1 = _arg1;
destinationLabel = param1;
try {
while (i < currentLabels.length) {
if (currentLabels[i].name == destinationLabel){
};
i = (i + 1);
i = i;
};
if (doesLabelExist){
gotoAndPlay(destinationLabel);
} else {
e = new Error((((("there is no label with the name >" + destinationLabel) + "< in the button with instance name >") + this.name) + "<"));
throw (e);
};
} catch(e:Error) {
};
}
private function onRollingOver(_arg1:MouseEvent):void{
over = true;
if (GameManager.getInstance().AreButtonsEnabled){
SoundManager.mouseOver();
if (((clicked) && (_arg1.buttonDown))){
goToLabel("click");
} else {
if (((!(clicked)) && (!(locked)))){
clicked = false;
goToLabel("on");
locked = true;
};
};
};
}
private function onMouseIsDown(_arg1:MouseEvent):void{
if (GameManager.getInstance().AreButtonsEnabled){
clicked = true;
GameDispatcher.mouseDispatcher.buttonPressed(this);
goToLabel("click");
};
}
private function onMouseIsUp(_arg1:MouseEvent):void{
if (((GameManager.getInstance().AreButtonsEnabled) && (clicked))){
clicked = false;
goToLabel("off");
};
GameDispatcher.mouseDispatcher.buttonPressed(this);
}
public function unlockButton():void{
locked = false;
refreshButton(new Event(""));
}
private function unclickButton(_arg1:MyMouseEvent){
if (_arg1.callerObject != this){
this.clicked = false;
};
}
private function cleanUp(_arg1:Event){
removeEventListener(MouseEvent.CLICK, onClick);
removeEventListener(MouseEvent.ROLL_OVER, onRollingOver);
removeEventListener(MouseEvent.ROLL_OUT, onRollingOut);
removeEventListener(MouseEvent.MOUSE_DOWN, onMouseIsDown);
removeEventListener(MouseEvent.MOUSE_UP, onMouseIsUp);
removeEventListener(Event.REMOVED_FROM_STAGE, cleanUp);
GameDispatcher.buttonsDispatcher.removeEventListener(ButtonsEvents.BUTTONS_UNLOCKED, refreshButton);
GameDispatcher.mouseDispatcher.removeEventListener(MouseEventDispatcher.BUTTON_PRESSED, unclickButton);
}
protected function onClick(_arg1:MouseEvent):void{
if (GameManager.getInstance().AreButtonsEnabled){
SoundManager.mouseClick();
};
}
private function refreshButton(_arg1:Event):void{
if (((((over) && (!((this.currentLabel == "on"))))) && (!(clicked)))){
goToLabel("on");
locked = true;
};
if (((((!(over)) && (!((this.currentLabel == "off"))))) && (!(clicked)))){
goToLabel("out");
locked = true;
};
}
}
}//package
Section 135
//GoToButton (GoToButton)
package {
import flash.events.*;
public class GoToButton extends GenericButton {
override protected function onClick(_arg1:MouseEvent):void{
var destLabel:String;
var Split:Array;
var i:Number;
var e:*;
var param1 = _arg1;
e = param1;
super.onClick(e);
if (GameManager.getInstance().AreButtonsEnabled){
destLabel = this.name;
Split = destLabel.split("_");
try {
GameManager.getInstance().gotoAndPlay(Split[1]);
GameManager.getInstance().lockButtons();
} catch(e:Error) {
while (i < Split.length) {
i = (i + 1);
i = i;
};
};
};
}
}
}//package
Section 136
//happy (happy)
package {
import flash.media.*;
public dynamic class happy extends Sound {
}
}//package
Section 137
//HighscoreEvent (HighscoreEvent)
package {
import flash.events.*;
public class HighscoreEvent extends Event {
private var highscoreArray:Array;
public function HighscoreEvent(_arg1:String, _arg2:Array){
super(_arg1);
highscoreArray = _arg2;
}
public function get HighscoreArray():Array{
return (highscoreArray);
}
}
}//package
Section 138
//HighscoreLoaded (HighscoreLoaded)
package {
import flash.events.*;
public class HighscoreLoaded extends EventDispatcher {
public static const HIGHSCORE_LOADED:String = "HighscoreLoaded";
public function HighscoreLoaded(_arg1:IEventDispatcher=null){
super(_arg1);
}
public function highscoreLoaded(_arg1:Array):void{
this.onHighscoreLoaded(_arg1);
}
private function onHighscoreLoaded(_arg1:Array):void{
dispatchEvent(new HighscoreEvent(HighscoreLoaded.HIGHSCORE_LOADED, _arg1));
}
}
}//package
Section 139
//IceCream_1 (IceCream_1)
package {
public dynamic class IceCream_1 extends BoxOfficeCream {
public function IceCream_1(){
addFrameScript(0, frame1, 5, frame6);
}
function frame6(){
stop();
}
function frame1(){
stop();
}
}
}//package
Section 140
//kasa04 (kasa04)
package {
import flash.media.*;
public dynamic class kasa04 extends Sound {
}
}//package
Section 141
//LevelComplete (LevelComplete)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class LevelComplete extends PopupElement {
public var okk:SimpleButton;
public var moneyEarned:TextField;
public var moneyNeeded:TextField;
public function LevelComplete(){
TextField(moneyEarned).text = ("$" + BoxOfficeManager.getInstance().levelCash.toString());
TextField(moneyNeeded).text = ("$" + LevelDescription.finalCashTarget.toString());
okk.addEventListener(MouseEvent.CLICK, popup.justGo);
}
}
}//package
Section 142
//LevelDescription (LevelDescription)
package {
public class LevelDescription {
public static var _priceSouce_1:int = 25;
public static var _priceSouce_2:int = 20;
public static var _priceSouce_3:int = 15;
public static var _priceCream_2:int = 12;
public static var _priceCream_3:int = 7;
public static var level_status:String = "level_win";
private static var aviableShape:Array = ["cup"];
public static var pause_flag:Boolean = false;
public static var _priceCream_1:int = 17;
public static var price_ticket_vip:Number = 1.65;
private static var levelWhenCandy:int = 2;
private static var _aviableCookie:Boolean = false;
private static var _priceCandy:int = 20;
public static var level_rate_money:Number = 1;
private static var _priceBoxOffice:int = 25;
private static var _hideCoinTime:int = 10000;
private static var _cashTarget:Array = [0, 300, 550, 650, 700, 800, 850, 900, 950, 1000, 1050];
public static var level_flag:Boolean = true;
public static var levelFilms:Array = [5];
public static var restMoney:Number = 0;
private static var _priceCookie:int = 15;
private static var tutorial:Boolean = true;
private static var _burningTime:int = 7000;
private static var _tutorialElementsLevels:Array = [true, false, false, false, false, false, false, false, false, false, false, false];
private static var cookie:Object = 0.5;
private static var candy:Object = 0.5;
public static var pos_customer:Boolean = false;
private static var _currentLevel:int = 0;
public static var shoppingPoints:int = 0;
private static var _aviableBoxOfficeMachines:Array = [-1, -1, -1];
private static var cream:Object = 0.5;
public static var price_drink_b:int = 15;
private static var souceCREAM:Object = 0.2;
public static var price_cream_cup:int = 0;
private static var souceFST:Object = 0.7;
public static var price_pop_b:int = 12;
public static var price_pop_s:int = 0;
private static var _priceCup:int = 0;
public static var price_drink_s:int = 0;
public static var levelCups:Array = ["Popcorn_cup_s", "Drink_cup_s"];
private static var wafelOrCup:Array = [0.5, 0.5, 0.5, 0.5, 0.5, 0.3, 0.3, 0.25, 0.2, 0.2, 0.1, 0.1, 0.1, 0.1, 0.1];
public static var customer_num:int = 1;
private static var _customerTime:Array = [7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7];
private static var souceSND:Object = 0.3;
private static var _timeToLeave:int = 15000;
public static var price_ticket_normal_1:int = 15;
public static var price_ticket_normal_2:int = 15;
public static var price_ticket_normal_3:int = 10;
public static var price_ticket_normal_4:int = 10;
public static var price_ticket_normal_5:int = 5;
public static var price_ticket_normal_6:int = 5;
private static var _aviableCandy:Boolean = true;
private static var levelMachines:Array = [[-1, -1, -1], [-1, -1, -1], [-1, -1, -1], [-1, -1, 0], [-1, -1, 0], [-1, 0, 0], [-1, 2, 1], [3, 2, 1], [3, 2, 1], [3, 2, 1], [3, 2, 1]];
public static var levelSouces:Array = ["Apple"];
private static var _tutorialLevel:Boolean = true;
private static var _cookingTime:int = 2000;
private static var _levelNum:int = 10;
private static var _aviableCream:Array = [];
public static var levelCreams:Array = [];
public static var aviableFilm:Array = [5];
private static var __finalCashTarget:int;
public static var levelTickets:Array = ["normal"];
private static var _tip:int = 5;
private static var _aviableCup:Array = ["Popcorn_cup_s", "Drink_cup_s"];
private static var _aviableSauce:Array = ["Apple"];
private static var _aviableTicket:Array = ["normal"];
private static var _timeToAgry:int = 35000;
private static var levelWhenCookie:int = 4;
private static var _tutorialElements:Array = ["Tutorial_Cups"];
private static var _levelTime:Array = [2, 2, 2.3, 3, 3, 4, 4.5, 5, 5, 5.2, 5.6, 6];
public static var leave_num:int = 0;
public static function get aviableTicket():Array{
return (_aviableTicket);
}
public static function set aviableCup(_arg1:Array):void{
_aviableCup = _arg1;
}
public static function get priceCookie():int{
return (_priceCookie);
}
public static function get priceBoxOffice():int{
return (_priceBoxOffice);
}
public static function set currentLevel(_arg1:int):void{
_currentLevel = _arg1;
}
public static function get burningTime():int{
return (_burningTime);
}
public static function get timeToAgry():int{
return (_timeToAgry);
}
public static function skipTutorial():void{
var _local1:*;
for (_local1 in _tutorialElementsLevels) {
_tutorialElementsLevels[_local1] = false;
};
tutorial = false;
tutorialLevel = false;
}
public static function set aviableBoxOfficeMachines(_arg1:Array):void{
_aviableBoxOfficeMachines = _arg1;
}
public static function get aviableCookie():Boolean{
return (_aviableCookie);
}
public static function get aviableBoxOfficeMachines():Array{
return (_aviableBoxOfficeMachines);
}
public static function get priceCup():int{
return (_priceCup);
}
public static function get aviableCup():Array{
return (_aviableCup);
}
public static function reset():void{
LevelDescription.level_rate_money = 1;
LevelDescription.leave_num = 0;
levelSouces = ["Apple"];
levelCreams = [];
levelCups = ["Popcorn_cup_s", "Drink_cup_s"];
levelTickets = ["normal"];
levelFilms = [getStartFilm()];
_currentLevel = 1;
restMoney = 0;
__finalCashTarget = _cashTarget[1];
aviableSauce = ["Apple"];
aviableCream = [];
aviableCup = ["Popcorn_cup_s", "Drink_cup_s"];
aviableTicket = ["normal"];
aviableFilm = levelFilms;
aviableCandy = true;
LevelDescription.customer_num = 12;
}
public static function getStartFilm():Number{
return ((3 + Math.floor((Math.random() * 4))));
}
public static function nextLevel():void{
_currentLevel++;
if (_currentLevel > _levelNum){
reset();
return;
};
aviableCandy = true;
aviableBoxOfficeMachines = levelMachines[_currentLevel];
aviableSauce = levelSouces;
aviableCream = levelCreams;
aviableCup = levelCups;
aviableTicket = levelTickets;
aviableFilm = levelFilms;
}
public static function get tutorialElementsLevels():Boolean{
return (_tutorialElementsLevels[_currentLevel]);
}
public static function get levelNum():int{
return (_levelNum);
}
public static function get timeToLeave():int{
return (_timeToLeave);
}
public static function get levelTime():int{
return (_levelTime[_currentLevel]);
}
public static function get tutorialElements():String{
return (_tutorialElements[0]);
}
public static function set tutorialElementsLevels(_arg1:Boolean):void{
_tutorialElementsLevels[0] = _arg1;
}
public static function set aviableCookie(_arg1:Boolean):void{
_aviableCookie = _arg1;
}
public static function get currentLevel():int{
return (_currentLevel);
}
public static function set tutorialLevel(_arg1:Boolean):void{
_tutorialLevel = _arg1;
}
public static function get tip():int{
return (_tip);
}
public static function get priceCandy():int{
return (_priceCandy);
}
public static function get cookingTime():int{
return (_cookingTime);
}
public static function get cashTarget():int{
return (_cashTarget[_currentLevel]);
}
public static function set aviableCandy(_arg1:Boolean):void{
_aviableCandy = _arg1;
}
public static function updateFinalCashTarget():void{
__finalCashTarget = (restMoney + _cashTarget[_currentLevel]);
trace(("finalCashTarget=" + finalCashTarget));
}
public static function get finalCashTarget():int{
if (__finalCashTarget > 0){
} else {
__finalCashTarget = _cashTarget[1];
};
return (__finalCashTarget);
}
public static function get customerTime():int{
return (_customerTime[_currentLevel]);
}
public static function get tutorialLevel():Boolean{
return (_tutorialLevel);
}
public static function get aviableCandy():Boolean{
return (_aviableCandy);
}
private static function setShapeAviable():Array{
var _local1:Array;
_local1 = ["cup"];
if (aviableBoxOfficeMachines.indexOf(0) >= 0){
_local1.push("square");
};
if (aviableBoxOfficeMachines.indexOf(1) >= 0){
_local1.push("square");
};
if (aviableBoxOfficeMachines.indexOf(2) >= 0){
_local1.push("round");
};
if (aviableBoxOfficeMachines.indexOf(3) >= 0){
_local1.push("heart");
};
if (aviableBoxOfficeMachines.indexOf(4) >= 0){
_local1 = ["cup", "square", "round", "heart"];
};
return (_local1);
}
public static function set aviableCream(_arg1:Array):void{
_aviableCream = _arg1;
}
public static function set aviableTicket(_arg1:Array):void{
_aviableTicket = _arg1;
}
public static function newOrder():BoxOfficeDescription{
var _local1:BoxOfficeDescription;
var _local2:int;
_local1 = new BoxOfficeDescription();
if (tutorialLevel){
_local1.popcorn_shape = "Popcorn_cup_s";
_local1.drink_shape = "Drink_cup_s";
_local1.souceCREAM = "Apple";
_local1.souceCREAMon = true;
_local1.candy = true;
_local1.candyON = true;
_local1.ticket_shape = "normal";
_local1.ticket_num = 1;
_local1.film_num = 0;
return (_local1);
};
_local2 = 0;
while (_local2 < aviableCup.length) {
if (aviableCup[_local2] == "Cream_cup"){
_local1.cream_shape = ((Math.random() > 0.5)) ? "" : "Cream_cup";
};
if (aviableCup[_local2] == "Popcorn_cup_s"){
_local1.popcorn_shape = ((Math.random() > 0.5)) ? "" : "Popcorn_cup_s";
};
if ((((_local1.popcorn_shape == "Popcorn_cup_s")) && ((aviableCup[_local2] == "Popcorn_cup_b")))){
_local1.popcorn_shape = ((Math.random() > 0.5)) ? "Popcorn_cup_s" : "Popcorn_cup_b";
};
if (aviableCup[_local2] == "Drink_cup_s"){
_local1.drink_shape = ((Math.random() > 0.5)) ? "" : "Drink_cup_s";
};
if ((((_local1.drink_shape == "Drink_cup_s")) && ((aviableCup[_local2] == "Drink_cup_b")))){
_local1.drink_shape = ((Math.random() > 0.3)) ? "Drink_cup_s" : "Drink_cup_b";
};
_local2++;
};
_local2 = 0;
while (_local2 < aviableTicket.length) {
if (aviableTicket[_local2] == "normal"){
_local1.ticket_shape = ((Math.random() > 0.8)) ? "" : "normal";
};
if (((!((_local1.ticket_shape == ""))) && ((aviableTicket[_local2] == "vip")))){
_local1.ticket_shape = ((Math.random() > 0.5)) ? "normal" : "vip";
};
_local2++;
};
if (_local1.ticket_shape != ""){
_local1.film_num = Math.floor((Math.random() * aviableFilm.length));
_local1.ticket_num = (Math.floor((Math.random() * 3)) + 1);
};
if (_local1.cream_shape == "Cream_cup"){
_local1.cream = aviableCream[Math.floor((Math.random() * aviableCream.length))];
_local1.creamON = true;
};
if ((((_local1.drink_shape == "Drink_cup_s")) || ((_local1.drink_shape == "Drink_cup_b")))){
_local1.souceCREAM = aviableSauce[Math.floor((Math.random() * aviableSauce.length))];
_local1.souceCREAMon = true;
};
if ((((_local1.popcorn_shape == "Popcorn_cup_s")) || ((_local1.popcorn_shape == "Popcorn_cup_b")))){
_local1.candy = true;
_local1.candyON = true;
};
if ((((((_local1.cream_shape == "")) && ((_local1.drink_shape == "")))) && ((_local1.popcorn_shape == "")))){
_local1.popcorn_shape = "Popcorn_cup_s";
_local1.candy = true;
_local1.candyON = true;
};
return (_local1);
}
public static function get aviableCream():Array{
return (_aviableCream);
}
public static function get hideCoinTime():int{
return (_hideCoinTime);
}
public static function get priceSouce():int{
return (_priceSouce);
}
public static function get aviableSauce():Array{
return (_aviableSauce);
}
public static function set aviableSauce(_arg1:Array):void{
_aviableSauce = _arg1;
}
}
}//package
Section 143
//LevelLost (LevelLost)
package {
import flash.events.*;
import flash.text.*;
public class LevelLost extends PopupElement {
public var okk:Button_Game_Retry;
public var moneyEarned:TextField;
public var bck:Button_Game_SubmitScore;
public var moneyNeeded:TextField;
public function LevelLost(){
TextField(moneyEarned).text = ("$" + BoxOfficeManager.getInstance().levelCash.toString());
TextField(moneyNeeded).text = ("$" + LevelDescription.finalCashTarget.toString());
GenericButton(okk).addEventListener(MouseEvent.CLICK, popup.justGo);
GenericButton(bck).addEventListener(MouseEvent.CLICK, toMenu);
GenericButton(bck).addEventListener(MouseEvent.CLICK, popup.justGo);
}
private function toMenu(_arg1:MouseEvent):void{
if (GameManager.getInstance().AreButtonsEnabled){
BoxOfficeManager.getInstance().toMenu = true;
};
}
}
}//package
Section 144
//levellost01 (levellost01)
package {
import flash.media.*;
public dynamic class levellost01 extends Sound {
}
}//package
Section 145
//LevelStart (LevelStart)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class LevelStart extends PopupElement {
public var okk:SimpleButton;
public var lvl:TextField;
public var csh:TextField;
public function LevelStart(){
GameManager.getInstance().buttonsOn();
GameManager.getInstance().AreButtonsEnabled;
TextField(lvl).text = ((LevelDescription.currentLevel.toString() + "/") + LevelDescription.levelNum);
TextField(csh).text = (("You need to earn $" + LevelDescription.finalCashTarget.toString()) + " to complete this level.");
okk.addEventListener(MouseEvent.CLICK, popup.levelStartGo);
}
}
}//package
Section 146
//levelwin03 (levelwin03)
package {
import flash.media.*;
public dynamic class levelwin03 extends Sound {
}
}//package
Section 147
//LoadingComplete (LoadingComplete)
package {
import flash.events.*;
public class LoadingComplete extends EventDispatcher {
public static const LOADING_COMPLETE:String = "LoadingComplete";
public function LoadingComplete(_arg1:IEventDispatcher=null){
super(_arg1);
}
public function loadingComplete():void{
this.onLoadingComplete();
}
private function onLoadingComplete():void{
dispatchEvent(new Event(LoadingComplete.LOADING_COMPLETE));
}
}
}//package
Section 148
//Marker (Marker)
package {
public dynamic class Marker extends PositionMarker {
}
}//package
Section 149
//Menu (Menu)
package {
import flash.display.*;
import flash.events.*;
public class Menu extends PopupElement {
public var back_btn:SimpleButton;
public var okk:Button_Game_No;
public var high_btn:SimpleButton;
public var bck:Button_Game_Yes;
public var best_btn:SimpleButton;
public var medium_btn:SimpleButton;
public var low_btn:SimpleButton;
public function Menu(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
private function keyUpList(_arg1:KeyboardEvent):void{
switch (_arg1.keyCode){
case 80:
this.parent.play();
stage.removeEventListener(KeyboardEvent.KEY_UP, keyUpList);
break;
};
}
private function frame3():void{
best_btn.addEventListener(MouseEvent.CLICK, clickList);
high_btn.addEventListener(MouseEvent.CLICK, clickList);
medium_btn.addEventListener(MouseEvent.CLICK, clickList);
low_btn.addEventListener(MouseEvent.CLICK, clickList);
back_btn.addEventListener(MouseEvent.CLICK, popup.menuGo);
}
private function frame1():void{
GenericButton(okk).addEventListener(MouseEvent.CLICK, popup.menuGo);
GenericButton(bck).addEventListener(MouseEvent.CLICK, toMenu);
GenericButton(bck).addEventListener(MouseEvent.CLICK, popup.menuGo);
stop();
}
private function clickList(_arg1:MouseEvent):void{
switch (_arg1.currentTarget){
case best_btn:
stage.quality = StageQuality.BEST;
break;
case high_btn:
stage.quality = StageQuality.HIGH;
break;
case medium_btn:
stage.quality = StageQuality.MEDIUM;
break;
case low_btn:
stage.quality = StageQuality.LOW;
break;
};
}
private function frame2():void{
}
private function toMenu(_arg1:MouseEvent):void{
BoxOfficeManager.getInstance().toMenu = true;
}
}
}//package
Section 150
//Mix (Mix)
package {
import flash.display.*;
public class Mix extends ServingObject {
public var alert:MovieClip;
private var currentState:int;// = 10
public var mkr:Marker;
public function Mix(){
currentState = 10;
super();
currentState = 10;
if (LevelDescription.aviableBoxOfficeMachines[2] < 0){
this.visible = false;
};
}
private function mixUp():Boolean{
if (currentState < 10){
SoundManager.giveMixUp();
this.gotoAndPlay(((currentState.toString() + "_to_") + (currentState + 1).toString()));
currentState++;
return (true);
};
return (false);
}
override public function serve():void{
if (mixUp()){
BoxOfficeManager.getInstance().cook.graphic.addMix();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
public function mixDown(_arg1:int):Boolean{
if (currentState > 0){
SoundManager.giveBoxOfficeMixDonw();
this.gotoAndPlay(((currentState.toString() + "_to_") + currentState--.toString()));
currentState--;
BoxOfficeManager.getInstance().mixPipe.giveMix(_arg1);
return (true);
};
MovieClip(alert).play();
return (false);
}
}
}//package
Section 151
//MixPipe (MixPipe)
package {
import flash.display.*;
public class MixPipe extends MovieClip {
protected var machnes:String;
public function MixPipe(){
if (LevelDescription.aviableBoxOfficeMachines[2] < 0){
this.visible = false;
return;
};
if (LevelDescription.aviableBoxOfficeMachines[2] >= 0){
machnes = "one";
};
if (LevelDescription.aviableBoxOfficeMachines[1] >= 0){
machnes = "two";
};
if (LevelDescription.aviableBoxOfficeMachines[0] >= 0){
machnes = "three";
};
this.gotoAndStop(machnes);
}
public function giveMix(_arg1:int):void{
this.gotoAndPlay(((machnes + "_") + _arg1.toString()));
}
}
}//package
Section 152
//MouseEventDispatcher (MouseEventDispatcher)
package {
import flash.events.*;
public class MouseEventDispatcher extends EventDispatcher {
public static const BUTTON_PRESSED:String = "ButtonReleased";
public function MouseEventDispatcher(_arg1:IEventDispatcher=null){
super(_arg1);
}
public function buttonPressed(_arg1:Object):void{
this.onButtonPressed(_arg1);
}
private function onButtonPressed(_arg1:Object):void{
dispatchEvent(new MyMouseEvent(MouseEventDispatcher.BUTTON_PRESSED, _arg1));
}
}
}//package
Section 153
//MultistateButton (MultistateButton)
package {
import flash.display.*;
import flash.events.*;
public class MultistateButton extends MovieClip {
private var clicked:Boolean;
private var currentState:Number;
private var over:Boolean;
public function MultistateButton(){
var _local1:String;
var _local2:Array;
var _local3:String;
var _local4:*;
super();
this.buttonMode = true;
clicked = false;
over = false;
currentState = 0;
_local1 = currentLabel;
_local2 = currentLabel.split("_");
_local3 = GameManager.getInstance().getParameter(_local2[0]);
if (_local3 == null){
GameManager.getInstance().setParameter(_local2[0], _local2[1]);
} else {
_local4 = (((_local2[0] + "_") + _local3) + "_off");
goToLabel(_local4);
currentState = Math.floor((currentFrame / 3));
};
addEventListener(MouseEvent.CLICK, onClick);
addEventListener(MouseEvent.ROLL_OVER, onRollingOver);
addEventListener(MouseEvent.ROLL_OUT, onRollingOut);
addEventListener(MouseEvent.MOUSE_DOWN, onMouseIsDown);
addEventListener(MouseEvent.MOUSE_UP, onMouseIsUp);
addEventListener(Event.REMOVED_FROM_STAGE, cleanUp);
GameDispatcher.buttonsDispatcher.addEventListener(ButtonsEvents.BUTTONS_UNLOCKED, refreshButton);
GameDispatcher.mouseDispatcher.addEventListener(MouseEventDispatcher.BUTTON_PRESSED, unclickButton);
}
private function onRollingOut(_arg1:MouseEvent):void{
over = false;
}
public function goToLabel(_arg1:String):void{
var doesLabelExist:Boolean;
var i:Number;
var e:Error;
var destinationLabel:*;
var param1 = _arg1;
destinationLabel = param1;
try {
while (i < currentLabels.length) {
if (currentLabels[i].name == destinationLabel){
};
i = (i + 1);
i = i;
};
if (doesLabelExist){
gotoAndPlay(destinationLabel);
} else {
e = new Error((((("there is no label with the name >" + destinationLabel) + "< in the button with instance name >") + this.name) + "<"));
throw (e);
};
} catch(e:Error) {
};
}
private function onRollingOver(_arg1:MouseEvent):void{
over = true;
SoundManager.mouseOver();
}
private function onMouseIsDown(_arg1:MouseEvent):void{
clicked = true;
GameDispatcher.mouseDispatcher.buttonPressed(this);
}
private function onMouseIsUp(_arg1:MouseEvent):void{
if (clicked){
clicked = false;
};
}
private function unclickButton(_arg1:MyMouseEvent){
if (_arg1.callerObject != this){
this.clicked = false;
};
}
private function cleanUp(_arg1:Event){
removeEventListener(MouseEvent.CLICK, onClick);
removeEventListener(MouseEvent.ROLL_OVER, onRollingOver);
removeEventListener(MouseEvent.ROLL_OUT, onRollingOut);
removeEventListener(MouseEvent.MOUSE_DOWN, onMouseIsDown);
removeEventListener(MouseEvent.MOUSE_UP, onMouseIsUp);
removeEventListener(Event.REMOVED_FROM_STAGE, cleanUp);
GameDispatcher.buttonsDispatcher.removeEventListener(ButtonsEvents.BUTTONS_UNLOCKED, refreshButton);
GameDispatcher.mouseDispatcher.removeEventListener(MouseEventDispatcher.BUTTON_PRESSED, unclickButton);
}
protected function onClick(_arg1:MouseEvent):void{
var _local2:String;
var _local3:*;
SoundManager.mouseClick();
if (((currentState * 3) + 4) > this.totalFrames){
currentState = 0;
} else {
currentState++;
};
this.gotoAndPlay((2 + (currentState * 3)));
_local2 = currentLabel;
_local3 = currentLabel.split("_");
GameManager.getInstance().setParameter(_local3[0], _local3[1]);
}
private function refreshButton(_arg1:Event):void{
if (over){
gotoAndPlay((2 + (currentState * 3)));
};
}
}
}//package
Section 154
//MyMouseEvent (MyMouseEvent)
package {
import flash.events.*;
public class MyMouseEvent extends Event {
public var callerObject:Object;
public function MyMouseEvent(_arg1:String, _arg2:Object){
super(_arg1);
this.callerObject = _arg2;
}
}
}//package
Section 155
//OrderBouble (OrderBouble)
package {
import flash.display.*;
public class OrderBouble extends MovieClip implements BoxOfficeOwner {
private var myBoxOffice:BoxOfficeDescription;
public var boxOffice:BoxOffice;
private var _boubleClock:OrderClock;
public var Ticket_mc:MovieClip;
public function init():void{
var _local1:Number;
myBoxOffice = LevelDescription.newOrder();
Customer(this.parent).myBoxOffice = myBoxOffice;
if (myBoxOffice.ticket_shape == ""){
Ticket_mc.visible = false;
} else {
_local1 = LevelDescription.aviableFilm[myBoxOffice.film_num];
Ticket_mc.Ticket_mc.gotoAndStop(_local1);
};
}
public function get boubleClock():OrderClock{
return (_boubleClock);
}
public function set boubleClock(_arg1:OrderClock):void{
_boubleClock = _arg1;
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
return (this.myBoxOffice);
}
}
}//package
Section 156
//OrderClock (OrderClock)
package {
import flash.display.*;
public class OrderClock extends MovieClip {
public function OrderClock(){
OrderBouble(this.parent).boubleClock = this;
stop();
}
}
}//package
Section 157
//over (over)
package {
import flash.media.*;
public dynamic class over extends Sound {
}
}//package
Section 158
//panelS (panelS)
package {
import flash.media.*;
public dynamic class panelS extends Sound {
}
}//package
Section 159
//PlaneMachine (PlaneMachine)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
public class PlaneMachine extends MovieClip implements BoxOfficeOwner {
private var Length:Number;// = 4
public var drink_cup;
public var Full_mc:MovieClip;
private var cupArr:Array;
public var pop_cup;
private var _myBoxOffice:Array;
public var plane_mc:MovieClip;
protected var _marker:PositionMarker;
private var num:Number;// = -1
public var mkr:Marker;
private var pickup_flag:Boolean;// = false
protected var _rotationTarget:int;
protected var _positionMarker:Point;
public function PlaneMachine(){
var _local1:Array;
Length = 4;
pickup_flag = false;
num = -1;
super();
_myBoxOffice = new Array(Length);
cupArr = new Array(Length);
stop();
_local1 = this.name.split("_");
if (_local1.length > 2){
_marker = PositionMarker(this.parent.getChildByName(_local1[1]));
_rotationTarget = int(_local1[2]);
};
this.plane_mc.addEventListener(MouseEvent.CLICK, callService);
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
_positionMarker = new Point((MovieClip(this.getChildByName("mkr")).x + this.x), (MovieClip(this.getChildByName("mkr")).y + this.y));
}
protected function destroy(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, destroy);
this.plane_mc.removeEventListener(MouseEvent.CLICK, callService);
}
private function getNum_2():int{
var _local1:int;
_local1 = 0;
while (_local1 < cupArr.length) {
if (cupArr[_local1] == null){
return (_local1);
};
_local1++;
};
return (Length);
}
public function serve():void{
var _local1:BoxOfficeDescription;
if (PlaneObject.machine_name == this.name){
if (this.num != -1){
pickUp();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
PlaneObject.machine_name = this.name;
if ((((!(BoxOfficeManager.getInstance().cook.popWafle) == "")) || ((!(BoxOfficeManager.getInstance().cook.drinkWafle) == "")))){
_local1 = BoxOfficeManager.getInstance().cook.myWafle;
if (_local1.drink_shape != ""){
if (getNum() < Length){
myBoxOffice[getNum()] = new Array(_local1.drink_shape, _local1.souceCREAM, _local1.souceCREAMon);
_local1.drink_shape = "";
_local1.souceCREAM = "";
_local1.souceCREAMon = false;
planeOrder();
BoxOfficeManager.getInstance().cook.drinkWafle = "";
} else {
Full_mc.visible = true;
Full_mc.play();
};
};
if (_local1.popcorn_shape != ""){
if (getNum() < Length){
myBoxOffice[getNum()] = new Array(_local1.popcorn_shape, _local1.candy, _local1.candyON);
_local1.popcorn_shape = "";
_local1.candy = false;
_local1.candyON = false;
BoxOfficeManager.getInstance().cook.popWafle = "";
planeOrder();
} else {
Full_mc.visible = true;
Full_mc.play();
};
};
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
};
}
public function get myBoxOffice():Array{
return (_myBoxOffice);
}
public function set myBoxOffice(_arg1:Array):void{
_myBoxOffice = _arg1;
}
private function getNum():int{
var _local1:int;
_local1 = 0;
while (_local1 < _myBoxOffice.length) {
if (_myBoxOffice[_local1] == null){
return (_local1);
};
_local1++;
};
return (Length);
}
private function planeOrder():void{
var _local1:Array;
var _local2:*;
var _local3:int;
_local1 = ["Popcorn_cup_s", "Popcorn_cup_b", "Drink_cup_s", "Drink_cup_b", "Cream_cup"];
_local3 = getNum_2();
switch (_myBoxOffice[_local3][0]){
case "Popcorn_cup_s":
_local2 = new Pop_cup_s();
addChild(_local2);
_local2.init(_local3, "pop");
break;
case "Popcorn_cup_b":
_local2 = new Pop_cup_b();
addChild(_local2);
_local2.init(_local3, "pop");
break;
case "Drink_cup_s":
_local2 = new Pop_drink_s();
addChild(_local2);
_local2.init(_local3, "drink");
break;
case "Drink_cup_b":
_local2 = new Pop_drink_b();
addChild(_local2);
_local2.init(_local3, "drink");
break;
};
_local2.addEventListener(MouseEvent.CLICK, clickList);
cupArr[_local3] = _local2;
setPos();
}
private function callService(_arg1:MouseEvent):void{
BoxOfficeManager.getInstance().cook.gotoAndServe_Plane(this);
}
private function clickList(_arg1:MouseEvent):void{
this.num = _arg1.currentTarget.num;
callService(null);
}
private function setPos():void{
var _local1:int;
_local1 = 0;
while (_local1 < cupArr.length) {
if (cupArr[_local1] == null){
} else {
cupArr[_local1].x = (10 + (35 * _local1));
cupArr[_local1].y = (0 + (10 * _local1));
};
_local1++;
};
}
public function get marker():PositionMarker{
return (_marker);
}
public function get rotationTarget():int{
return (_rotationTarget);
}
public function get positionMarker():Point{
return (_positionMarker);
}
private function pickUp():void{
var _local1:BoxOfficeDescription;
var _local2:Number;
_local1 = BoxOfficeManager.getInstance().cook.myWafle;
_local2 = this.num;
this.num = -1;
if ((((_local1.drink_shape == "")) && (_myBoxOffice[_local2][0]))){
if ((((_myBoxOffice[_local2][0] == "Drink_cup_s")) || ((_myBoxOffice[_local2][0] == "Drink_cup_b")))){
_local1.drink_shape = _myBoxOffice[_local2][0];
_local1.souceCREAM = _myBoxOffice[_local2][1];
_local1.souceCREAMon = _myBoxOffice[_local2][2];
BoxOfficeManager.getInstance().cook.drinkWafle = true;
removeChild(cupArr[_local2]);
cupArr[_local2].removeEventListener(MouseEvent.CLICK, clickList);
cupArr[_local2] = null;
_myBoxOffice[_local2] = null;
setPos();
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
};
};
if ((((_local1.popcorn_shape == "")) && (_myBoxOffice[_local2][0]))){
if ((((_myBoxOffice[_local2][0] == "Popcorn_cup_s")) || ((_myBoxOffice[_local2][0] == "Popcorn_cup_b")))){
_local1.popcorn_shape = _myBoxOffice[_local2][0];
_local1.candy = _myBoxOffice[_local2][1];
_local1.candyON = _myBoxOffice[_local2][2];
BoxOfficeManager.getInstance().cook.popWafle = true;
removeChild(cupArr[_local2]);
cupArr[_local2].removeEventListener(MouseEvent.CLICK, clickList);
cupArr[_local2] = null;
_myBoxOffice[_local2] = null;
setPos();
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
};
};
BoxOfficeManager.getInstance().cook.nextStep();
}
public function giveBoxOfficeDescription(_arg1):BoxOfficeDescription{
return (this.myBoxOffice);
}
}
}//package
Section 160
//PlaneObject (PlaneObject)
package {
public class PlaneObject {
public static var machine_name:String = "";
public function PlaneObject():void{
}
}
}//package
Section 161
//Pop_cup_b (Pop_cup_b)
package {
public dynamic class Pop_cup_b extends BoxOfficeShape {
override public function setBoxOffice(_arg1:BoxOfficeDescription):void{
if ((((_arg1.popcorn_shape == "Popcorn_cup_s")) || ((_arg1.popcorn_shape == "Popcorn_cup_b")))){
stop();
if (_arg1.candy){
this.gotoAndStop("Candy&Cookie");
};
};
}
}
}//package
Section 162
//Pop_cup_s (Pop_cup_s)
package {
public dynamic class Pop_cup_s extends BoxOfficeShape {
override public function setBoxOffice(_arg1:BoxOfficeDescription):void{
if ((((_arg1.popcorn_shape == "Popcorn_cup_s")) || ((_arg1.popcorn_shape == "Popcorn_cup_b")))){
stop();
if (_arg1.candy){
this.gotoAndStop("Candy&Cookie");
};
};
}
}
}//package
Section 163
//Pop_drink_b (Pop_drink_b)
package {
public dynamic class Pop_drink_b extends BoxOfficeShape {
override public function setBoxOffice(_arg1:BoxOfficeDescription):void{
if ((((_arg1.drink_shape == "Drink_cup_s")) || ((_arg1.drink_shape == "Drink_cup_b")))){
stop();
if (_arg1.souceCREAM){
this.gotoAndStop("souceCREAM");
};
};
}
}
}//package
Section 164
//Pop_drink_s (Pop_drink_s)
package {
public dynamic class Pop_drink_s extends BoxOfficeShape {
override public function setBoxOffice(_arg1:BoxOfficeDescription):void{
if ((((_arg1.drink_shape == "Drink_cup_s")) || ((_arg1.drink_shape == "Drink_cup_b")))){
stop();
if (_arg1.souceCREAM){
this.gotoAndStop("souceCREAM");
};
};
}
}
}//package
Section 165
//PopCorn (PopCorn)
package {
public dynamic class PopCorn extends BoxOfficeCandy {
}
}//package
Section 166
//Popup (Popup)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class Popup extends MovieClip {
private var _nextTarget:String;
public var _mix_2:MovieClip;
public var Menu_mc:Game_Interface_Popups_Menu;
private var _tutorial:String;
public var continue_btn:SimpleButton;
public var next_btn:SimpleButton;
private var timer:Timer;
public var alert:MovieClip;
private var _str:String;
public var _boxOffice1_2:MovieClip;
public static var ADD_CUSTOMER:String = "add_customer";
public static var POPUP_DESTROY:String = "popup_desroy";
public function Popup(_arg1:String, _arg2:String=null, _arg3:String=null){
addFrameScript(15, frame16, 30, frame31, 46, frame47, 61, frame62, 77, frame78, 92, frame93, 93, fram94, 108, frame109, 123, frame124, 180, frame181, 228, frame229, 237, frame238, 238, frame239, 239, frame240, 240, frame241, 241, frame242, 242, frame243, 243, frame244, 244, frame245, 245, frame246, 246, frame247, 247, frame248, 274, frame275, 286, frame287, 295, frame296, 297, frame298, 299, frame300, 301, frame302, 350, frame351, 411, frame412, 475, frame476, 539, frame540);
_tutorial = _arg2;
_str = _arg3;
SoundManager.panelSound();
this.gotoAndPlay(_arg1);
_nextTarget = "destroy";
}
function frame393(){
stop();
}
private function frame275():void{
}
private function frame287():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clic287kList);
}
private function frame298():void{
stop();
}
private function frame296():void{
stop();
}
function frame16(){
GameManager.getInstance().buttonsOn();
stop();
}
function frame181(){
}
private function clicNextkList(_arg1:MouseEvent):void{
play();
SoundManager.panelSound();
}
function frame31(){
stop();
nextAction();
}
public function menuGo(_arg1:MouseEvent):void{
this.gotoAndPlay("Resume");
}
function frame47(){
GameManager.getInstance().buttonsOn();
stop();
}
public function levelStartGo(_arg1:MouseEvent):void{
this.gotoAndPlay("startFlag");
}
function frame534(){
stop();
nextAction();
}
function frame415(){
stop();
}
private function frame412():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clicNextkList);
}
private function frame300():void{
stop();
}
private function frame302():void{
stop();
}
function frame62(){
stop();
nextAction();
}
private function frame304():void{
}
function frame305(){
}
private function frame540():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clicOverList);
}
public function justGo(_arg1:MouseEvent):void{
this.play();
}
protected function nextAction():void{
if (_nextTarget == "destroy"){
destroy();
} else {
gotoAndPlay(_nextTarget);
};
}
function frame437(){
stop();
}
function frame78(){
}
function fram94():void{
Menu_mc.gotoAndStop(_str);
}
function frame327(){
stop();
}
function frame93(){
stop();
if (this.parent){
this.parent.removeChild(this);
};
GameManager.getInstance().gotoAndPlay("toGame");
}
function frame349(){
stop();
}
function frame109(){
GameManager.getInstance().buttonsOn();
stop();
}
private function frame346():void{
}
private function frame229():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clicNextkList);
}
private function frame351():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clicNextkList);
}
function frame238(){
stop();
_nextTarget = "Tutorial_Begin";
nextAction();
}
function frame239(){
}
private function frame476():void{
stop();
next_btn.addEventListener(MouseEvent.CLICK, clicNextkList);
}
function frame240(){
}
function frame241(){
}
function frame243(){
}
function frame124(){
LevelDescription.pause_flag = false;
stop();
nextAction();
}
function frame246(){
}
function frame247(){
}
function frame248(){
}
function frame249(){
stop();
GameManager.getInstance().buttonsOn();
continue_btn.addEventListener(MouseEvent.CLICK, continueList);
}
function frame244(){
}
function frame245(){
}
function frame242(){
}
function frame250():void{
stop();
continue_btn.addEventListener(MouseEvent.CLICK, continueList);
GameManager.getInstance().buttonsOn();
}
function frame251():void{
stop();
continue_btn.addEventListener(MouseEvent.CLICK, continueList);
GameManager.getInstance().buttonsOn();
}
function frame252():void{
stop();
nextAction();
}
function frame253():void{
stop();
}
function frame371(){
stop();
}
private function clic287kList(_arg1:MouseEvent):void{
dispatchEvent(new Event(ADD_CUSTOMER));
play();
SoundManager.panelSound();
}
private function continueList(_arg1:TimerEvent):void{
play();
}
private function clicOverList(_arg1:MouseEvent):void{
LevelDescription.skipTutorial();
LevelDescription.nextLevel();
GameManager.getInstance().gotoAndPlay("toGame");
}
private function destroy():void{
dispatchEvent(new Event(POPUP_DESTROY));
if (this.parent){
this.parent.removeChild(this);
};
GameManager.getInstance().buttonsOn();
}
}
}//package
Section 167
//Popup_Full (Popup_Full)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.net.*;
import flash.system.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.filters.*;
import flash.ui.*;
public dynamic class Popup_Full extends MovieClip {
public function Popup_Full(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 168
//PopupElement (PopupElement)
package {
import flash.display.*;
public class PopupElement extends MovieClip {
protected var popup:Popup;
public function PopupElement(){
popup = Popup(this.parent);
}
}
}//package
Section 169
//PositionMarker (PositionMarker)
package {
import flash.display.*;
public class PositionMarker extends MovieClip {
public function PositionMarker(){
this.visible = false;
}
}
}//package
Section 170
//PosterMachine (PosterMachine)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class PosterMachine extends MovieClip {
public var film2_mc:MovieClip;
public var vip1_btn:SimpleButton;
public var vip3_btn:SimpleButton;
private var film_num:Number;
protected var _marker:PositionMarker;
public var can3_btn:SimpleButton;
public var film0_mc:MovieClip;
public var film3_mc:MovieClip;
private var ticket_shape:String;// = ""
public var can1_btn:SimpleButton;
private var click_flag:String;// = ""
protected var _rotationTarget:int;
public var vip0_btn:SimpleButton;
public var vip2_btn:SimpleButton;
public var film1_mc:MovieClip;
protected var _positionMarker:Point;
public var can0_btn:SimpleButton;
public var can2_btn:SimpleButton;
public function PosterMachine(){
var _local1:Array;
var _local2:int;
ticket_shape = "";
click_flag = "";
super();
stop();
setVipBtn(false);
_local2 = 0;
while (_local2 < LevelDescription.levelFilms.length) {
this[(("film" + _local2) + "_mc")].visible = true;
this[(("can" + _local2) + "_btn")].visible = true;
this[(("film" + _local2) + "_mc")].gotoAndStop(LevelDescription.levelFilms[_local2]);
if (LevelDescription.levelTickets[1] == "vip"){
this[(("vip" + _local2) + "_btn")].visible = true;
};
_local2++;
};
_local1 = this.name.split("_");
if (_local1.length > 2){
_marker = PositionMarker(this.parent.getChildByName(_local1[1]));
_rotationTarget = int(_local1[2]);
};
this.addEventListener(MouseEvent.CLICK, callService);
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
_positionMarker = new Point((MovieClip(this.getChildByName("mkr")).x + this.x), (MovieClip(this.getChildByName("mkr")).y + this.y));
_local1 = LevelDescription.aviableTicket;
}
private function choseFilmFunc(_arg1:Number):void{
var _local2:int;
_local2 = 0;
while (_local2 < 4) {
this[(("film" + _local2) + "_mc")].Chose_mc.visible = false;
_local2++;
};
this[(("film" + _arg1) + "_mc")].Chose_mc.visible = true;
film_num = _arg1;
}
protected function setVipBtn(_arg1:Boolean):void{
var _local2:int;
_local2 = 0;
while (_local2 < 4) {
this[(("vip" + _local2) + "_btn")].visible = _arg1;
this[(("film" + _local2) + "_mc")].visible = _arg1;
this[(("film" + _local2) + "_mc")].mouseChildren = false;
this[(("film" + _local2) + "_mc")].New_mc.visible = _arg1;
this[(("film" + _local2) + "_mc")].Chose_mc.visible = _arg1;
this[(("can" + _local2) + "_btn")].visible = _arg1;
_local2++;
};
}
protected function destroy(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, destroy);
this.removeEventListener(MouseEvent.CLICK, callService);
}
public function serve():void{
clickList(null);
}
public function get marker():PositionMarker{
return (_marker);
}
private function callService(_arg1:MouseEvent):void{
switch (_arg1.target){
case vip0_btn:
choseFilmFunc(0);
click_flag = "vip";
break;
case can0_btn:
choseFilmFunc(0);
click_flag = "cancel";
break;
case film0_mc:
choseFilmFunc(0);
click_flag = "normal";
break;
case vip1_btn:
choseFilmFunc(1);
click_flag = "vip";
break;
case can1_btn:
choseFilmFunc(1);
click_flag = "cancel";
break;
case film1_mc:
choseFilmFunc(1);
click_flag = "normal";
break;
case vip2_btn:
choseFilmFunc(2);
click_flag = "vip";
break;
case can2_btn:
choseFilmFunc(2);
click_flag = "cancel";
break;
case film2_mc:
choseFilmFunc(2);
click_flag = "normal";
break;
case vip3_btn:
choseFilmFunc(3);
click_flag = "vip";
break;
case can3_btn:
choseFilmFunc(3);
click_flag = "cancel";
break;
case film3_mc:
choseFilmFunc(3);
click_flag = "normal";
break;
};
_marker = PositionMarker(this.parent.getChildByName("poster1"));
BoxOfficeManager.getInstance().cook.gotoAndServe_Poster(this);
}
private function clickList(_arg1:MouseEvent):void{
var _local2:BoxOfficeDescription;
_local2 = BoxOfficeManager.getInstance().cook.myWafle;
if (click_flag == "cancel"){
if (_local2.ticket_num > 0){
_local2.ticket_num--;
if (_local2.ticket_num == 0){
_local2.ticket_shape = "";
ticket_shape = "";
};
SoundManager.giveCupSound();
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
if (click_flag == "vip"){
if ((((_local2.ticket_shape == "")) || ((_local2.ticket_shape == "vip")))){
_local2.film_num = film_num;
_local2.ticket_shape = "vip";
_local2.ticket_num++;
SoundManager.giveCupSound();
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
if (click_flag == "normal"){
if ((((_local2.ticket_shape == "")) || ((_local2.ticket_shape == "normal")))){
BoxOfficeManager.getInstance().nextTutorialBlink(5);
_local2.film_num = film_num;
_local2.ticket_shape = "normal";
_local2.ticket_num++;
SoundManager.giveCupSound();
BoxOfficeManager.getInstance().cook.graphic.giveCookie();
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
};
};
}
public function get rotationTarget():int{
return (_rotationTarget);
}
public function get positionMarker():Point{
return (_positionMarker);
}
}
}//package
Section 171
//ProgresBar (ProgresBar)
package {
import flash.display.*;
public class ProgresBar extends MovieClip {
private var _progres:Number;
public function setProgres(_arg1:Number):void{
this._progres = _arg1;
this.gotoAndStop(this._progres);
}
public function getProgres():Number{
return (this._progres);
}
}
}//package
Section 172
//Queue (Queue)
package {
public class Queue {
protected var lastStep:QueueStep;
private var nextID:uint;
private var isRunning:Boolean;// = false
protected var executingQueue:Array;
public function Queue(){
isRunning = false;
super();
executingQueue = new Array();
isRunning = false;
clearQueue();
}
public function nextStep():uint{
var _local1:QueueStep;
if (executingQueue.length > 0){
_local1 = executingQueue.shift();
if (lastStep != null){
lastStep.destroy();
};
lastStep = _local1;
isRunning = true;
_local1.stepFunction.apply(null, _local1.args);
return (_local1.id);
//unresolved jump
};
if (lastStep != null){
lastStep.destroy();
};
clearQueue();
endQueue();
return (null);
}
public function clearQueue():void{
var _local1:int;
var _local2:int;
if (executingQueue.length > 0){
_local1 = (executingQueue.length - 1);
_local2 = 0;
while (_local2 < executingQueue.length) {
QueueStep(executingQueue[_local2]).destroy();
_local2++;
};
};
if (lastStep != null){
lastStep.destroy();
};
lastStep = null;
executingQueue = new Array();
isRunning = false;
nextID = 0;
}
protected function addStep(_arg1:Function, ... _args):QueueStep{
var _local3:QueueStep;
_local3 = new QueueStep();
_local3.id = nextID++;
_local3.stepFunction = _arg1;
_local3.args = _args;
executingQueue.push(_local3);
return (_local3);
}
public function removeStep(_arg1:uint):Boolean{
var _local2:*;
var _local3:int;
_local2 = (executingQueue.length - 1);
_local3 = 0;
return (false);
}
protected function endQueue():void{
}
public function startExecution():void{
if (!isRunning){
nextStep();
};
}
}
}//package
Section 173
//QueueMarker (QueueMarker)
package {
import flash.display.*;
import flash.text.*;
public class QueueMarker extends MovieClip {
public var id:Array;
public var txt:TextField;
private var texter:TextField;
public function QueueMarker(_arg1:Array){
this.id = _arg1;
texter = TextField(this.getChildByName("txt"));
texter.mouseEnabled = false;
}
public function setNumber(_arg1:int):void{
texter.text = _arg1.toString();
}
}
}//package
Section 174
//QueueStep (QueueStep)
package {
import flash.events.*;
public class QueueStep extends EventDispatcher {
public var id:uint;
public var stepFunction:Function;
public var args:Array;
public var nextStep:QueueStep;
public static var DESTROY_STEP:String = "destroy_step";
public function destroy():void{
this.dispatchEvent(new Event(DESTROY_STEP));
}
}
}//package
Section 175
//Sauce (Sauce)
package {
public class Sauce extends ServingObject {
private var id:int;
private var names:Array;
private var sauceId:String;
public var mkr:Marker;
public function Sauce(){
var _local1:Array;
super();
names = ["Chocolate", "Cherry", "Orange", "Apple", "Vanilla", "BlueBerry"];
_local1 = this.name.split("_");
sauceId = _local1[1];
id = int(sauceId.charAt((sauceId.length - 1)));
if (LevelDescription.aviableSauce.indexOf(names[(id - 1)]) < 0){
visible = false;
};
}
override public function serve():void{
var _local1:BoxOfficeDescription;
var _local2:Boolean;
_local1 = BoxOfficeManager.getInstance().cook.myWafle;
_local2 = false;
if ((((((BoxOfficeManager.getInstance().cook.myWafle.drink_shape == "Drink_cup_s")) || ((BoxOfficeManager.getInstance().cook.myWafle.drink_shape == "Drink_cup_b")))) && (!(BoxOfficeManager.getInstance().cook.myWafle.souceCREAMon)))){
BoxOfficeManager.getInstance().cook.myWafle.souceCREAM = names[(id - 1)];
BoxOfficeManager.getInstance().nextTutorialBlink(3);
SoundManager.giveBoxOfficeSouce();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.graphic.giveSauce(id);
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
protected function giveSouce():void{
BoxOfficeManager.getInstance().cook.myWafle.addSouce();
}
}
}//package
Section 176
//ServingObject (ServingObject)
package {
import flash.display.*;
import flash.events.*;
import flash.geom.*;
public class ServingObject extends MovieClip {
protected var _marker:PositionMarker;
protected var _rotationTarget:int;
protected var _positionMarker:Point;
public function ServingObject(){
var _local1:Array;
super();
stop();
this.mouseChildren = false;
_local1 = this.name.split("_");
if (_local1.length > 2){
_marker = PositionMarker(this.parent.getChildByName(_local1[1]));
_rotationTarget = int(_local1[2]);
};
this.addEventListener(MouseEvent.CLICK, callService);
this.addEventListener(Event.REMOVED_FROM_STAGE, destroy);
_positionMarker = new Point((MovieClip(this.getChildByName("mkr")).x + this.x), (MovieClip(this.getChildByName("mkr")).y + this.y));
}
protected function destroy(_arg1:Event):void{
this.removeEventListener(Event.ADDED_TO_STAGE, destroy);
this.removeEventListener(MouseEvent.CLICK, callService);
}
public function serve():void{
BoxOfficeManager.getInstance().cook.nextStep();
}
private function callService(_arg1:MouseEvent):void{
BoxOfficeManager.getInstance().cook.gotoAndServe(this);
}
public function get marker():PositionMarker{
return (_marker);
}
public function get rotationTarget():int{
return (_rotationTarget);
}
public function get positionMarker():Point{
return (_positionMarker);
}
}
}//package
Section 177
//smartGuard (smartGuard)
package {
import flash.display.*;
import flash.events.*;
import flash.net.*;
import flash.errors.*;
public class smartGuard extends MovieClip {
private var loader:URLLoader;
private var selfURL:String;
public function smartGuard(_arg1:String):void{
var url = _arg1;
super();
stop();
selfURL = url;
if (selfURL.substr(0, 7) != "file://"){
try {
loader = new URLLoader();
loader.load(new URLRequest("http://www.freeworldgroup.com/sites.xml"));
loader.addEventListener(Event.COMPLETE, loading);
loader.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
} catch(e:IOError) {
trace(e);
} catch(e:SecurityError) {
trace(e);
};
} else {
play();
};
}
function loading(_arg1:Event):void{
var _local2:Boolean;
var _local3:XML;
var _local4:String;
_local2 = false;
_local3 = new XML();
_local3.ignoreWhite = true;
_local3 = XML(loader.data);
for (_local4 in _local3.url) {
if (isIn(_local3.url[_local4].toString()) == true){
go2HomePage();
_local2 = true;
break;
};
};
if (_local2 == false){
play();
};
}
private function getRequest(){
var _local1:String;
var _local2:URLRequest;
var _local3:URLVariables;
_local1 = "http://www.freeworldgroup.com";
_local2 = new URLRequest(_local1);
_local3 = new URLVariables();
_local3.url = selfURL;
_local2.data = _local3;
return (_local2);
}
private function ioErrorHandler(_arg1:IOErrorEvent):void{
trace(("ioErrorHandler: " + _arg1));
}
private function go2HomePage():void{
try {
navigateToURL(getRequest(), "_self");
} catch(e:SecurityError) {
navigateToURL(getRequest(), "_blank");
} catch(e:IOError) {
trace(e);
};
}
private function isIn(_arg1:String):Boolean{
var _local2:Boolean;
var _local3:uint;
_local2 = false;
_local3 = 0;
while (_local3 < (selfURL.length - _arg1.length)) {
if (selfURL.substr(_local3, _arg1.length) == _arg1){
_local2 = true;
};
_local3++;
};
return (_local2);
}
}
}//package
Section 178
//smietnik01 (smietnik01)
package {
import flash.media.*;
public dynamic class smietnik01 extends Sound {
}
}//package
Section 179
//sos01 (sos01)
package {
import flash.media.*;
public dynamic class sos01 extends Sound {
}
}//package
Section 180
//SoundManager (SoundManager)
package {
import flash.media.*;
public class SoundManager {
private static var yawChannel:SoundChannel;
private static var instance:SoundManager;
private static var backgroundMusic:Sound;
public static var mute:Boolean = false;
private static var backgroundMusicPosition:Number = 0;
public static var backgroundChannel:SoundChannel;
public static var musicFlag:Boolean = true;
public function SoundManager(){
instance = this;
}
public static function giveBoxOfficeMachineOFF():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function playBackgroundMusic():void{
var _local1:SoundTransform;
backgroundMusic = new BackgroundMusic();
_local1 = new SoundTransform(0.2);
backgroundChannel = backgroundMusic.play(0, 9999, _local1);
}
public static function giveClockTimesUp():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new clocktimesup03();
_local1.play();
}
public static function giveBoxOfficeSouce():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new sos01();
_local1.play();
}
public static function toButtons():void{
var _local1:Sound;
if (mute){
return;
};
}
public static function muteMusic2():void{
mute = true;
}
public static function giveCream():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new cream03();
_local1.play();
}
public static function getInstance():SoundManager{
if (instance == null){
return (new (SoundManager));
};
return (instance);
}
public static function giveMixUp():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function pauseMusic(){
if (backgroundChannel != null){
backgroundMusicPosition = backgroundChannel.position;
backgroundChannel.stop();
musicFlag = false;
};
}
public static function whooshi():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new whoosh14x();
_local1.play();
}
public static function playMusic(){
var _local1:SoundTransform;
if (backgroundMusic != null){
_local1 = new SoundTransform(0.2);
backgroundChannel = backgroundMusic.play(0, 9999, _local1);
} else {
playBackgroundMusic();
};
musicFlag = true;
}
public static function giveBoxOfficeMachinePick():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function giveCustomerNew():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new Customernew02();
}
public static function giveBoxOfficeMixDonw():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function giveCookie():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function custommerHappy():void{
var _local1:Sound;
if (mute){
return;
};
if (Math.random() < 0.5){
_local1 = new ch01();
} else {
_local1 = new ch03();
};
_local1.play();
}
public static function giveBoxOfficeMachineBurned():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function giveCustomerAngry():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function mouseClick():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new click();
_local1.play();
}
public static function giveCash():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new kasa04();
_local1.play();
}
public static function giveCustomerLeaving():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function unMuteMusic2():void{
mute = false;
}
public static function giveTrash():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new smietnik01();
_local1.play();
}
public static function win():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new levelwin03();
_local1.play();
}
public static function mouseOver():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
_local1.play();
}
public static function giveBoxOfficeCandy():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new boxOfficecandy04();
_local1.play();
}
public static function giveBoxOfficeMachineON():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new boxOfficemachineON02();
_local1.play();
}
public static function giveCustomerHappy():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new happy();
}
public static function giveBoxOfficeMachineReady():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new boxOfficeready01();
_local1.play();
}
public static function loos():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new levellost01();
_local1.play();
}
public static function giveCupSound():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new over();
}
public static function boxOfficeMachineSwitchSound():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new boxOfficeMachineSwitchSounds();
_local1.play();
}
public static function stopBackgroundMusic():void{
backgroundChannel.stop();
}
public static function custommerUnHappy():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new cuh();
_local1.play();
}
public static function panelSound():void{
var _local1:Sound;
if (mute){
return;
};
_local1 = new panelS();
_local1.play();
}
}
}//package
Section 181
//StoreMc (StoreMc)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
public class StoreMc extends MovieClip {
private var cream_grape_flag:Boolean;// = true
private var film_0:Boolean;// = true
private var film_1:Boolean;// = true
private var film_2:Boolean;// = true
private var film_3:Boolean;// = true
private var _filmNew:Number;
private var film_num:Number;// = 4
private var cherry_flag:Boolean;// = true
private var ticket_price:Number;
public var Check_mc:MovieClip;
private var drink_machine_num;// = 2
private var vip_num:Number;// = 3
public var ins_txt:TextField;
private var cream_strawberry_flag:Boolean;// = true
public var Price0_mc:MovieClip;
private var cream_orange_flag:Boolean;// = true
public var List_mc:MovieClip;
private var big_dirnk_cup_num:Number;// = 2
private var aviableFilm:Array;
private var aviableTicket:Array;
private var orange_flag:Boolean;// = true
public var Count_mc:MovieClip;
private var drink_price:Number;
private var aviableSauce:Array;
public var Cream_btn:SimpleButton;
private var aviableCream:Array;
public var back_btn:MovieClip;
private var Length:Number;// = 4
public var Price1_mc:MovieClip;
private var _creamPriceArr:Array;
private var _drinkPriceArr:Array;
private var aviableCup:Array;
private var apple_flag:Boolean;// = true
public var Goods_mc:MovieClip;
public var Film_btn:SimpleButton;
private var big_pop_cup_num:Number;// = 2
private var cream_machine_num;// = 2
private var _currentMc;
public var Price2_mc:MovieClip;
private var _newFilmPriceArr:Array;
private var _NewFilePrice:Number;// = 200
private var textFormat:TextFormat;
private var Customer_Num:Number;// = 12
private var _filmArray:Array;
private var _restMoney:Number;
public var Price3_mc:MovieClip;
private var _paidMoney:Number;
private var pop_price:Number;
private var _filmPriceArr:Array;
public var DrinkM_btn:SimpleButton;
public function StoreMc(){
_NewFilePrice = 200;
Length = 4;
Customer_Num = 12;
big_dirnk_cup_num = 2;
big_pop_cup_num = 2;
vip_num = 3;
drink_machine_num = 2;
cream_machine_num = 2;
film_num = 4;
apple_flag = true;
orange_flag = true;
cherry_flag = true;
cream_strawberry_flag = true;
cream_orange_flag = true;
cream_grape_flag = true;
film_0 = true;
film_1 = true;
film_2 = true;
film_3 = true;
super();
if (LevelDescription.currentLevel == 1){
LevelDescription.restMoney = 100;
};
textFormat = new TextFormat();
textFormat.letterSpacing = 10;
back_btn.buttonMode = true;
back_btn.addEventListener(MouseEvent.CLICK, backToGame);
aviableSauce = LevelDescription.levelSouces;
aviableCream = LevelDescription.levelCreams;
aviableCup = LevelDescription.levelCups;
aviableTicket = LevelDescription.levelTickets;
aviableFilm = LevelDescription.levelFilms;
init();
displayGoodsFunc();
setFilm();
setDrink();
setCream();
setupList();
}
private function clickList(_arg1:MouseEvent):void{
switch (_arg1.currentTarget){
case DrinkM_btn:
List_mc.gotoAndStop("Drink");
setListMc("Drink");
break;
case Film_btn:
List_mc.gotoAndStop("Film");
setListMc("Film");
break;
case Cream_btn:
List_mc.gotoAndStop("Cream");
setListMc("Cream");
break;
};
List_mc.visible = true;
}
private function displayGoodsFunc():void{
var _local1:int;
var _local2:String;
var _local3:int;
_local1 = 0;
while (_local1 < _filmArray.length) {
_local3 = 0;
while (_local3 < LevelDescription.levelFilms.length) {
if (_filmArray[_local1] == LevelDescription.levelFilms[_local3]){
this[("film_" + _local1)] = false;
};
_local3++;
};
_local1++;
};
_local1 = 0;
while (_local1 < aviableSauce.length) {
_local2 = aviableSauce[_local1];
if (_local2 == "Apple"){
apple_flag = false;
} else {
if (_local2 == "Orange"){
orange_flag = false;
} else {
cherry_flag = false;
};
};
_local1++;
};
_local1 = 0;
while (_local1 < aviableCream.length) {
_local2 = aviableCream[_local1];
if (_local2 == "Strawberry"){
cream_strawberry_flag = false;
} else {
if (_local2 == "Orange"){
cream_orange_flag = false;
} else {
cream_grape_flag = false;
};
};
_local1++;
};
_local1 = 0;
while (_local1 < aviableCup.length) {
_local2 = aviableCup[_local1];
if (_local2 == "Popcorn_cup_b"){
Goods_mc.Pop_btn.visible = false;
Price1_mc.visible = false;
} else {
if (_local2 == "Drink_cup_b"){
Goods_mc.Drink_btn.visible = false;
Price2_mc.visible = false;
};
};
_local1++;
};
_local1 = 0;
while (_local1 < aviableTicket.length) {
_local2 = aviableTicket[_local1];
if (_local2 == "vip"){
Goods_mc.Ticket_btn.visible = false;
Price3_mc.visible = false;
};
_local1++;
};
}
private function setupList():void{
DrinkM_btn.addEventListener(MouseEvent.CLICK, clickList);
Film_btn.addEventListener(MouseEvent.CLICK, clickList);
Cream_btn.addEventListener(MouseEvent.CLICK, clickList);
Goods_mc.Pop_btn.addEventListener(MouseEvent.CLICK, checkList);
Goods_mc.Drink_btn.addEventListener(MouseEvent.CLICK, checkList);
Goods_mc.Ticket_btn.addEventListener(MouseEvent.CLICK, checkList);
Check_mc.yes_btn.addEventListener(MouseEvent.CLICK, confirmList);
Check_mc.no_btn.addEventListener(MouseEvent.CLICK, confirmList);
Check_mc.ok_btn.addEventListener(MouseEvent.CLICK, confirmList);
DrinkM_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
Film_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
Cream_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
Goods_mc.Pop_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
Goods_mc.Drink_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
Goods_mc.Ticket_btn.addEventListener(MouseEvent.ROLL_OVER, rollBtnList);
DrinkM_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
Film_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
Cream_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
Goods_mc.Pop_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
Goods_mc.Drink_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
Goods_mc.Ticket_btn.addEventListener(MouseEvent.ROLL_OUT, rollBtnList);
List_mc.Film1_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Film1_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Film2_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Film2_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Film3_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Film3_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Film4_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Film4_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Drink1_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Drink1_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Drink3_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Drink3_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Drink2_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Drink2_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Cream1_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Cream1_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Cream2_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Cream2_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
List_mc.Cream3_mc.addEventListener(MouseEvent.ROLL_OVER, rollListList);
List_mc.Cream3_mc.addEventListener(MouseEvent.ROLL_OUT, rollListList);
}
private function setCheckBtn(_arg1:Boolean):void{
Check_mc.ok_btn.visible = _arg1;
Check_mc.yes_btn.visible = !(_arg1);
Check_mc.no_btn.visible = !(_arg1);
}
private function backToGame(_arg1:MouseEvent):void{
LevelDescription.levelSouces = aviableSauce;
LevelDescription.levelCreams = aviableCream;
LevelDescription.levelCups = aviableCup;
LevelDescription.levelTickets = aviableTicket;
LevelDescription.levelFilms = aviableFilm;
GameManager.getInstance().gotoAndPlay("Game");
LevelDescription.shoppingPoints = (LevelDescription.shoppingPoints + (LevelDescription.restMoney - _restMoney));
LevelDescription.restMoney = _restMoney;
LevelDescription.updateFinalCashTarget();
LevelDescription.level_rate_money = (LevelDescription.level_rate_money + ((aviableSauce.length * LevelDescription.currentLevel) / 30));
LevelDescription.level_rate_money = (LevelDescription.level_rate_money + ((aviableCream.length * LevelDescription.currentLevel) / 30));
LevelDescription.level_rate_money = (LevelDescription.level_rate_money + ((aviableCup.length * LevelDescription.currentLevel) / 50));
LevelDescription.level_rate_money = (LevelDescription.level_rate_money + ((aviableFilm.length * LevelDescription.currentLevel) / 40));
LevelDescription.level_rate_money = Math.floor(LevelDescription.level_rate_money);
LevelDescription.customer_num = Customer_Num;
}
private function init():void{
var _local1:Number;
var _local2:Number;
_filmArray = new Array(1, 2, 3, 4, 5, 6);
_local1 = (50 * LevelDescription.currentLevel);
pop_price = (200 + _local1);
drink_price = (150 + _local1);
ticket_price = (400 + _local1);
_filmPriceArr = new Array((250 + _local1), (250 + _local1), (200 + _local1), (200 + _local1), (150 + _local1), 150);
_drinkPriceArr = new Array((400 + _local1), (350 + _local1), (300 + _local1));
_creamPriceArr = new Array((350 + _local1), (300 + _local1), (250 + _local1));
while (_filmArray.length > Length) {
_local2 = ((Math.random() * _filmArray.length) << 0);
_filmPriceArr.splice(_local2, 1);
_filmArray.splice(_local2, 1);
};
_filmNew = Math.floor((Math.random() * Length));
_filmPriceArr[_filmNew] = (_filmPriceArr[_filmNew] + _NewFilePrice);
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Popup");
List_mc.gotoAndStop("Film");
setListMc("Film");
Price0_mc.visible = false;
_restMoney = LevelDescription.restMoney;
_paidMoney = 0;
Count_mc._txt.text = String(_restMoney);
Goods_mc.Chose1_mc.visible = false;
Goods_mc.Chose2_mc.visible = false;
Goods_mc.Chose3_mc.visible = false;
Price1_mc._txt.defaultTextFormat = textFormat;
Price2_mc._txt.defaultTextFormat = textFormat;
Price3_mc._txt.defaultTextFormat = textFormat;
Price1_mc._txt.text = String(pop_price);
Price2_mc._txt.text = String(drink_price);
Price3_mc._txt.text = String(ticket_price);
}
private function goodsList(_arg1:MouseEvent):void{
switch (_currentMc){
case Goods_mc.Pop_btn:
_restMoney = (_restMoney - pop_price);
aviableCup.push("Popcorn_cup_b");
Goods_mc.Chose1_mc.visible = true;
break;
case Goods_mc.Drink_btn:
_restMoney = (_restMoney - drink_price);
aviableCup.push("Drink_cup_b");
Customer_Num = (Customer_Num + big_dirnk_cup_num);
Goods_mc.Chose2_mc.visible = true;
break;
case Goods_mc.Ticket_btn:
_restMoney = (_restMoney - ticket_price);
aviableTicket.push("vip");
Customer_Num = (Customer_Num + vip_num);
Goods_mc.Chose3_mc.visible = true;
break;
case List_mc.Film1_mc:
_restMoney = (_restMoney - _filmPriceArr[0]);
_currentMc.Chose_mc.visible = true;
aviableFilm.unshift(_filmArray[0]);
Customer_Num = (Customer_Num + film_num);
break;
case List_mc.Film2_mc:
_restMoney = (_restMoney - _filmPriceArr[1]);
_currentMc.Chose_mc.visible = true;
aviableFilm.unshift(_filmArray[1]);
Customer_Num = (Customer_Num + film_num);
break;
case List_mc.Film3_mc:
_restMoney = (_restMoney - _filmPriceArr[2]);
_currentMc.Chose_mc.visible = true;
aviableFilm.unshift(_filmArray[2]);
Customer_Num = (Customer_Num + film_num);
break;
case List_mc.Film4_mc:
_restMoney = (_restMoney - _filmPriceArr[3]);
_currentMc.Chose_mc.visible = true;
aviableFilm.unshift(_filmArray[3]);
Customer_Num = (Customer_Num + film_num);
break;
case List_mc.Drink1_mc:
_restMoney = (_restMoney - _drinkPriceArr[0]);
_currentMc.Chose_mc.visible = true;
aviableSauce.push("Cherry");
aviableCup.push("Drink_cup_s");
Customer_Num = (Customer_Num + drink_machine_num);
break;
case List_mc.Drink2_mc:
_restMoney = (_restMoney - _drinkPriceArr[1]);
_currentMc.Chose_mc.visible = true;
aviableSauce.push("Orange");
aviableCup.push("Drink_cup_s");
Customer_Num = (Customer_Num + drink_machine_num);
break;
case List_mc.Drink3_mc:
_restMoney = (_restMoney - _drinkPriceArr[2]);
_currentMc.Chose_mc.visible = true;
aviableSauce.push("Apple");
aviableCup.push("Drink_cup_s");
break;
case List_mc.Cream1_mc:
_restMoney = (_restMoney - _creamPriceArr[0]);
_currentMc.Chose_mc.visible = true;
aviableCream.push("Strawberry");
aviableCup.push("Cream_cup");
Customer_Num = (Customer_Num + cream_machine_num);
break;
case List_mc.Cream2_mc:
_restMoney = (_restMoney - _creamPriceArr[1]);
_currentMc.Chose_mc.visible = true;
aviableCream.push("Orange");
aviableCup.push("Cream_cup");
Customer_Num = (Customer_Num + cream_machine_num);
break;
case List_mc.Cream3_mc:
_restMoney = (_restMoney - _creamPriceArr[2]);
_currentMc.Chose_mc.visible = true;
aviableCream.push("Grape");
aviableCup.push("Cream_cup");
Customer_Num = (Customer_Num + cream_machine_num);
break;
};
if (aviableFilm.length > 4){
aviableFilm.splice(4, 1);
};
Count_mc._txt.text = String(_restMoney);
_currentMc.removeEventListener(MouseEvent.CLICK, checkList);
_currentMc.removeEventListener(MouseEvent.ROLL_OVER, rollListList);
_currentMc.removeEventListener(MouseEvent.ROLL_OUT, rollListList);
_currentMc.enabled = false;
}
private function setFilm():void{
var _local1:int;
_local1 = 1;
while (_local1 < (Length + 1)) {
List_mc[(("Film" + _local1) + "_mc")].gotoAndStop(_filmArray[(_local1 - 1)]);
List_mc[(("Film" + _local1) + "_mc")].New_mc.visible = false;
List_mc[(("Film" + _local1) + "_mc")].Chose_mc.visible = false;
List_mc[(("Film" + _local1) + "_mc")].Price_mc._txt.defaultTextFormat = textFormat;
List_mc[(("Film" + _local1) + "_mc")].Price_mc._txt.text = String(_filmPriceArr[(_local1 - 1)]);
List_mc[(("Film" + _local1) + "_mc")].buttonMode = true;
List_mc[(("Film" + _local1) + "_mc")].mouseChildren = false;
List_mc[(("Film" + _local1) + "_mc")].addEventListener(MouseEvent.CLICK, checkList);
_local1++;
};
_local1 = 0;
while (_local1 < 4) {
if (this[("film_" + _local1)] == false){
List_mc[(("Film" + (_local1 + 1)) + "_mc")].visible = false;
};
_local1++;
};
}
private function drinkCheck():void{
if (aviableSauce.length > 0){
if (_restMoney < drink_price){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
} else {
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Drink");
};
}
private function setDrink():void{
var _local1:int;
_local1 = 1;
while (_local1 < Length) {
List_mc[(("Drink" + _local1) + "_mc")].gotoAndStop(_local1);
List_mc[(("Drink" + _local1) + "_mc")].Chose_mc.visible = false;
List_mc[(("Drink" + _local1) + "_mc")].Price_mc._txt.defaultTextFormat = textFormat;
List_mc[(("Drink" + _local1) + "_mc")].Price_mc._txt.text = String(_drinkPriceArr[(_local1 - 1)]);
List_mc[(("Drink" + _local1) + "_mc")].buttonMode = true;
List_mc[(("Drink" + _local1) + "_mc")].mouseChildren = false;
List_mc[(("Drink" + _local1) + "_mc")].addEventListener(MouseEvent.CLICK, checkList);
_local1++;
};
}
private function popCheck():void{
if (_restMoney < pop_price){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
}
private function ticketCheck():void{
if (aviableTicket.length > 0){
if (_restMoney < ticket_price){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
} else {
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Ticket");
};
}
private function setCream():void{
var _local1:int;
_local1 = 1;
while (_local1 < Length) {
List_mc[(("Cream" + _local1) + "_mc")]._mc.gotoAndStop(_local1);
List_mc[(("Cream" + _local1) + "_mc")].Chose_mc.visible = false;
List_mc[(("Cream" + _local1) + "_mc")].Price_mc._txt.defaultTextFormat = textFormat;
List_mc[(("Cream" + _local1) + "_mc")].Price_mc._txt.text = String(_creamPriceArr[(_local1 - 1)]);
List_mc[(("Cream" + _local1) + "_mc")].buttonMode = true;
List_mc[(("Cream" + _local1) + "_mc")].mouseChildren = false;
List_mc[(("Cream" + _local1) + "_mc")].addEventListener(MouseEvent.CLICK, checkList);
_local1++;
};
}
private function confirmList(_arg1:MouseEvent):void{
switch (_arg1.currentTarget){
case Check_mc.yes_btn:
goodsList(null);
break;
case Check_mc.no_btn:
break;
case Check_mc.ok_btn:
break;
};
Check_mc.visible = false;
}
private function setListMc(_arg1:String):void{
var _local2:int;
_local2 = 1;
while (_local2 < (Length + 1)) {
List_mc[(("Film" + _local2) + "_mc")].visible = false;
(((_arg1 == "Film")) && ((List_mc[(("Film" + _local2) + "_mc")].visible = true)));
_local2++;
};
_local2 = 1;
while (_local2 < Length) {
List_mc[(("Drink" + _local2) + "_mc")].visible = false;
List_mc[(("Cream" + _local2) + "_mc")].visible = false;
(((_arg1 == "Drink")) && ((List_mc[(("Drink" + _local2) + "_mc")].visible = true)));
(((_arg1 == "Cream")) && ((List_mc[(("Cream" + _local2) + "_mc")].visible = true)));
_local2++;
};
if (!orange_flag){
List_mc[(("Drink" + 2) + "_mc")].visible = false;
};
if (!cherry_flag){
List_mc[(("Drink" + 1) + "_mc")].visible = false;
};
if (!apple_flag){
List_mc[(("Drink" + 3) + "_mc")].visible = false;
};
if (!cream_grape_flag){
List_mc[(("Cream" + 3) + "_mc")].visible = false;
};
if (!cream_strawberry_flag){
List_mc[(("Cream" + 1) + "_mc")].visible = false;
};
if (!cream_orange_flag){
List_mc[(("Cream" + 2) + "_mc")].visible = false;
};
_local2 = 0;
while (_local2 < 4) {
if (this[("film_" + _local2)] == false){
List_mc[(("Film" + (_local2 + 1)) + "_mc")].visible = false;
};
_local2++;
};
}
private function rollBtnList(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.ROLL_OUT){
ins_txt.text = "";
} else {
if (_arg1.type == MouseEvent.ROLL_OVER){
switch (_arg1.currentTarget){
case DrinkM_btn:
ins_txt.text = "Add more drink flavors to your stock!";
break;
case Film_btn:
ins_txt.text = "Get newer and better movies here!";
break;
case Cream_btn:
ins_txt.text = "Ice cream for your customers!";
break;
case Goods_mc.Pop_btn:
ins_txt.text = "Add a new larger popcorn container size.";
break;
case Goods_mc.Drink_btn:
ins_txt.text = "Add a new larger drink container size.";
break;
case Goods_mc.Ticket_btn:
ins_txt.text = "Add a VIP ticket option for your customers.";
break;
};
};
};
}
private function checkList(_arg1:MouseEvent):void{
_currentMc = _arg1.currentTarget;
setCheckBtn(false);
Check_mc.confirm_mc.gotoAndStop("Check");
switch (_currentMc){
case Goods_mc.Pop_btn:
popCheck();
break;
case Goods_mc.Drink_btn:
drinkCheck();
break;
case Goods_mc.Ticket_btn:
ticketCheck();
break;
case List_mc.Film1_mc:
if (_restMoney < _filmPriceArr[0]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Film2_mc:
if (_restMoney < _filmPriceArr[1]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Film3_mc:
if (_restMoney < _filmPriceArr[2]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Film4_mc:
if (_restMoney < _filmPriceArr[3]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Drink1_mc:
if (_restMoney < _drinkPriceArr[0]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Drink2_mc:
if (_restMoney < _drinkPriceArr[1]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Drink3_mc:
if (_restMoney < _drinkPriceArr[2]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Cream1_mc:
if (_restMoney < _creamPriceArr[0]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Cream2_mc:
if (_restMoney < _creamPriceArr[1]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
case List_mc.Cream3_mc:
if (_restMoney < _creamPriceArr[2]){
setCheckBtn(true);
Check_mc.confirm_mc.gotoAndStop("Alert");
};
break;
};
Check_mc.visible = true;
}
private function rollListList(_arg1:MouseEvent):void{
if (_arg1.type == MouseEvent.ROLL_OUT){
_arg1.currentTarget.scaleX = (_arg1.currentTarget.scaleY = 1);
} else {
_arg1.currentTarget.scaleX = (_arg1.currentTarget.scaleY = 1.2);
};
}
}
}//package
Section 182
//SubmitBox (SubmitBox)
package {
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.net.*;
public class SubmitBox extends MovieClip {
public var enterNameBoxMc:MovieClip;
public var userNameMc:TextField;
private var submit:SimpleButton;
private var enterNameBox:MovieClip;
public var viewScoreMc:SimpleButton;
private var score:TextField;
private var gameName:String;
public var closeMc:MovieClip;
private var send:URLLoader;
public var submitMc:SimpleButton;
public var scoreMc:TextField;
private var viewScore:SimpleButton;
private var userName:TextField;
private var close:MovieClip;
public static const SEND_FINISH:String = " send finish.";
public function SubmitBox(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
super();
this.init();
this.addEventListener(Event.ADDED, added);
}
private function added(_arg1:Event):void{
if (_arg1.target == _arg1.currentTarget){
this.submit.addEventListener(MouseEvent.CLICK, submitEvent);
this.close.addEventListener(MouseEvent.CLICK, closeEvent);
this.viewScore.addEventListener(MouseEvent.CLICK, viewEvent);
this.hideViewScore();
this.hideEnterNameBox();
this.send.addEventListener(Event.COMPLETE, sendEvent);
this.addEventListener(Event.REMOVED_FROM_STAGE, removed);
};
}
public function hideSubmit():void{
this.submit.visible = false;
}
private function viewEvent(_arg1:MouseEvent):void{
var _local2:URLRequest;
_local2 = new URLRequest("http://www.freeworldgroup.com/score/index.asp");
_local2.data = ("game=" + this.gameName);
navigateToURL(_local2, "_blank");
}
private function init():void{
this.submit = this.submitMc;
this.viewScore = this.viewScoreMc;
this.enterNameBox = this.enterNameBoxMc;
this.close = this.closeMc;
this.userName = this.userNameMc;
this.score = this.scoreMc;
this.send = new URLLoader();
}
public function setName(_arg1:String):void{
this.gameName = _arg1;
}
public function show():void{
this.visible = true;
}
public function setScore(_arg1:int):void{
this.score.text = _arg1.toString();
}
function frame3(){
stop();
}
private function submitEvent(_arg1:MouseEvent):void{
this.submitScore();
}
function frame1(){
stop();
}
public function showViewScore():void{
this.viewScore.visible = true;
}
public function showSubmit():void{
this.submit.visible = true;
}
public function hide():void{
this.visible = false;
}
public function submitScore():void{
var _local1:URLRequest;
var _local2:URLVariables;
if (this.userName.text != ""){
_local1 = new URLRequest("http://www.freeworldgroup.com/score/score.asp");
_local2 = new URLVariables();
_local2.game = this.gameName;
_local2.score = this.score.text;
_local2.name = this.userName.text;
_local1.method = URLRequestMethod.POST;
_local1.data = _local2;
this.send.load(_local1);
this.gotoAndStop(2);
this.hideSubmit();
} else {
this.showEnterNameBox();
};
}
function frame2(){
stop();
}
private function closeEvent(_arg1:MouseEvent):void{
this.hide();
}
private function removed(_arg1:Event):void{
if (_arg1.target == _arg1.currentTarget){
this.submit.removeEventListener(MouseEvent.CLICK, submitEvent);
this.close.removeEventListener(MouseEvent.CLICK, closeEvent);
this.viewScore.removeEventListener(MouseEvent.CLICK, viewEvent);
this.send.removeEventListener(Event.COMPLETE, sendEvent);
this.removeEventListener(Event.REMOVED_FROM_STAGE, removed);
};
}
public function hideEnterNameBox():void{
this.enterNameBox.visible = false;
}
public function hideViewScore():void{
this.viewScore.visible = false;
}
public function showEnterNameBox():void{
this.enterNameBox.visible = true;
}
private function sendEvent(_arg1:Event):void{
this.gotoAndStop(3);
this.showViewScore();
this.dispatchEvent(new Event(SubmitBox.SEND_FINISH));
}
}
}//package
Section 183
//TableCash (TableCash)
package {
import flash.display.*;
import flash.events.*;
import flash.utils.*;
public class TableCash extends ServingObject {
private var slot:int;
private var hideCoinTimer:Timer;
private var _cashValue:int;
public var mkr:Marker;
private var visibleCoins:int;// = 3
public var coin2:MovieClip;
public var coin3:MovieClip;
public var coin1:MovieClip;
public function TableCash(){
visibleCoins = 3;
super();
visibleCoins = 3;
hideCoinTimer = new Timer(LevelDescription.hideCoinTime);
addFrameScript(0, frame1);
this.stop();
this.visible = false;
hideCoinTimer.addEventListener(TimerEvent.TIMER, hideCoin);
addFrameScript(29, frame30);
}
override public function serve():void{
hideCoinTimer.stop();
if (this.mouseEnabled){
BoxOfficeManager.getInstance().nextTutorialBlink(7);
SoundManager.giveCash();
BoxOfficeManager.getInstance().levelCash = (BoxOfficeManager.getInstance().levelCash + cashValue);
if (!LevelDescription.tutorialLevel){
LevelDescription.restMoney = BoxOfficeManager.getInstance().levelCash;
};
BoxOfficeManager.getInstance().cook.graphic.takeCash();
this.gotoAndPlay("Animation");
this.mouseEnabled = false;
BoxOfficeManager.getInstance().removeCustomer(slot);
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
private function hideCoin(_arg1:TimerEvent):void{
var _local2:int;
_local2 = (4 - visibleCoins);
visibleCoins--;
MovieClip(this.getChildByName(("coin" + _local2.toString()))).visible = false;
if ((((_local2 == 3)) && (this.parent))){
this.mouseEnabled = false;
BoxOfficeManager.getInstance().removeCustomer(slot);
this.visible = false;
hideCoinTimer.stop();
};
}
public function get cashValue():int{
return (int(((_cashValue * visibleCoins) / 3)));
}
private function resetCoins():void{
var _local1:int;
visibleCoins = 3;
_local1 = 1;
while (_local1 < 4) {
MovieClip(this.getChildByName(("coin" + _local1.toString()))).visible = true;
_local1++;
};
}
private function resume(_arg1:Event):void{
if (this.visible){
hideCoinTimer.start();
};
}
public function setPauseListeners():void{
BoxOfficeManager.getInstance().addEventListener("pause", pause);
BoxOfficeManager.getInstance().addEventListener("resume", resume);
}
function frame1(){
stop();
this.visible = false;
}
private function frame30():void{
if (LevelDescription.customer_num <= 0){
};
}
public function setCash(_arg1:int, _arg2:int):void{
resetCoins();
this.mouseEnabled = true;
_cashValue = _arg1;
this.visible = true;
slot = _arg2;
if (!LevelDescription.tutorialLevel){
hideCoinTimer.reset();
hideCoinTimer.start();
};
}
override protected function destroy(_arg1:Event):void{
super.destroy(_arg1);
if (hideCoinTimer.running){
hideCoinTimer.stop();
};
BoxOfficeManager.getInstance().removeEventListener("pause", pause);
BoxOfficeManager.getInstance().removeEventListener("resume", resume);
}
private function pause(_arg1:Event):void{
if (this.mouseEnabled){
if (hideCoinTimer.running){
hideCoinTimer.stop();
};
};
}
}
}//package
Section 184
//TableCashText (TableCashText)
package {
import flash.display.*;
import flash.text.*;
public class TableCashText extends MovieClip {
public var txt:TextField;
public function TableCashText(){
TextField(txt).text = ("$" + TableCash(this.parent).cashValue.toString());
}
}
}//package
Section 185
//Ticket (Ticket)
package {
import flash.display.*;
public class Ticket extends MovieClip {
public function Ticket(_arg1:String="normal"):void{
switch (_arg1){
case "normal":
gotoAndStop(_arg1);
break;
case "vip":
gotoAndStop(_arg1);
break;
};
}
public function gotoTicket(_arg1:String):void{
gotoAndStop(_arg1);
}
}
}//package
Section 186
//toButtonsx (toButtonsx)
package {
import flash.media.*;
public dynamic class toButtonsx extends Sound {
}
}//package
Section 187
//Trash (Trash)
package {
public class Trash extends ServingObject {
public var mkr:Marker;
override public function serve():void{
var _local1:String;
var _local2:Number;
var _local3:Number;
if ((((((!(BoxOfficeManager.getInstance().cook.popWafle) == "")) || ((!(BoxOfficeManager.getInstance().cook.drinkWafle) == "")))) || ((!(BoxOfficeManager.getInstance().cook.creamWafle) == "")))){
SoundManager.giveTrash();
this.gotoAndPlay("Animation");
BoxOfficeManager.getInstance().cook.graphic.trash();
BoxOfficeManager.getInstance().cook.popWafle = false;
BoxOfficeManager.getInstance().cook.drinkWafle = false;
BoxOfficeManager.getInstance().cook.creamWafle = false;
_local1 = BoxOfficeManager.getInstance().cook.myWafle.ticket_shape;
_local2 = BoxOfficeManager.getInstance().cook.myWafle.ticket_num;
_local3 = BoxOfficeManager.getInstance().cook.myWafle.film_num;
BoxOfficeManager.getInstance().cook.myWafle = new BoxOfficeDescription();
BoxOfficeManager.getInstance().cook.myWafle.ticket_shape = _local1;
BoxOfficeManager.getInstance().cook.myWafle.ticket_num = _local2;
BoxOfficeManager.getInstance().cook.myWafle.film_num = _local3;
} else {
BoxOfficeManager.getInstance().cook.nextStep();
};
}
}
}//package
Section 188
//Txt1 (Txt1)
package {
import ui.*;
public dynamic class Txt1 extends Txt {
}
}//package
Section 189
//whoosh14x (whoosh14x)
package {
import flash.media.*;
public dynamic class whoosh14x extends Sound {
}
}//package