Section 1
//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 2
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
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 3
//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 4
//bun_top_47 (ordersUp_fla.bun_top_47)
package ordersUp_fla {
import flash.display.*;
public dynamic class bun_top_47 extends MovieClip {
public function bun_top_47(){
addFrameScript(0, frame1, 9, frame10, 19, frame20);
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame20(){
stop();
}
}
}//package ordersUp_fla
Section 5
//bun_top_holder_46 (ordersUp_fla.bun_top_holder_46)
package ordersUp_fla {
import flash.display.*;
public dynamic class bun_top_holder_46 extends MovieClip {
public var bun_top_mc:MovieClip;
}
}//package ordersUp_fla
Section 6
//burgerbuilder_cheese_70 (ordersUp_fla.burgerbuilder_cheese_70)
package ordersUp_fla {
import flash.display.*;
public dynamic class burgerbuilder_cheese_70 extends MovieClip {
public var art_mc:MovieClip;
}
}//package ordersUp_fla
Section 7
//burgerbuilder_lettuce_64 (ordersUp_fla.burgerbuilder_lettuce_64)
package ordersUp_fla {
import flash.display.*;
public dynamic class burgerbuilder_lettuce_64 extends MovieClip {
public var art_mc:MovieClip;
}
}//package ordersUp_fla
Section 8
//burgerbuilder_onion_66 (ordersUp_fla.burgerbuilder_onion_66)
package ordersUp_fla {
import flash.display.*;
public dynamic class burgerbuilder_onion_66 extends MovieClip {
public var art_mc:MovieClip;
}
}//package ordersUp_fla
Section 9
//burgerbuilder_pickles_68 (ordersUp_fla.burgerbuilder_pickles_68)
package ordersUp_fla {
import flash.display.*;
public dynamic class burgerbuilder_pickles_68 extends MovieClip {
public var art_mc:MovieClip;
}
}//package ordersUp_fla
Section 10
//burgerbuilder_tomato_62 (ordersUp_fla.burgerbuilder_tomato_62)
package ordersUp_fla {
import flash.display.*;
public dynamic class burgerbuilder_tomato_62 extends MovieClip {
public var art_mc:MovieClip;
}
}//package ordersUp_fla
Section 11
//customer1_31 (ordersUp_fla.customer1_31)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer1_31 extends MovieClip {
public function customer1_31(){
addFrameScript(0, frame1, 9, frame10, 100, frame101, 116, frame117, 123, frame124, 157, frame158, 184, frame185, 199, frame200, 228, frame229);
}
function frame158(){
play();
}
function frame200(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame185(){
stop();
}
function frame229(){
stop();
}
function frame101(){
stop();
}
function frame117(){
play();
}
function frame124(){
stop();
}
}
}//package ordersUp_fla
Section 12
//customer1scoreboard_83 (ordersUp_fla.customer1scoreboard_83)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer1scoreboard_83 extends MovieClip {
public var icon:MovieClip;
public function customer1scoreboard_83(){
addFrameScript(0, frame1, 9, frame10, 17, frame18);
}
function frame10(){
play();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package ordersUp_fla
Section 13
//customer2_25 (ordersUp_fla.customer2_25)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer2_25 extends MovieClip {
public function customer2_25(){
addFrameScript(0, frame1, 9, frame10, 100, frame101, 116, frame117, 123, frame124, 157, frame158, 184, frame185, 199, frame200, 228, frame229);
}
function frame158(){
play();
}
function frame200(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame185(){
stop();
}
function frame229(){
stop();
}
function frame101(){
stop();
}
function frame117(){
play();
}
function frame124(){
stop();
}
}
}//package ordersUp_fla
Section 14
//customer2scoreboard_85 (ordersUp_fla.customer2scoreboard_85)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer2scoreboard_85 extends MovieClip {
public var icon:MovieClip;
public function customer2scoreboard_85(){
addFrameScript(0, frame1, 9, frame10, 17, frame18);
}
function frame10(){
play();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package ordersUp_fla
Section 15
//customer3_20 (ordersUp_fla.customer3_20)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer3_20 extends MovieClip {
public function customer3_20(){
addFrameScript(0, frame1, 9, frame10, 100, frame101, 116, frame117, 123, frame124, 157, frame158, 184, frame185, 199, frame200, 228, frame229);
}
function frame158(){
play();
}
function frame200(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame185(){
stop();
}
function frame229(){
stop();
}
function frame101(){
stop();
}
function frame117(){
play();
}
function frame124(){
stop();
}
}
}//package ordersUp_fla
Section 16
//customer3scoreboard_87 (ordersUp_fla.customer3scoreboard_87)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer3scoreboard_87 extends MovieClip {
public var icon:MovieClip;
public function customer3scoreboard_87(){
addFrameScript(0, frame1, 9, frame10, 17, frame18);
}
function frame10(){
play();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package ordersUp_fla
Section 17
//customer4_15 (ordersUp_fla.customer4_15)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer4_15 extends MovieClip {
public function customer4_15(){
addFrameScript(0, frame1, 9, frame10, 100, frame101, 116, frame117, 123, frame124, 157, frame158, 184, frame185, 199, frame200, 228, frame229);
}
function frame158(){
play();
}
function frame200(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame185(){
stop();
}
function frame229(){
stop();
}
function frame101(){
stop();
}
function frame117(){
play();
}
function frame124(){
stop();
}
}
}//package ordersUp_fla
Section 18
//customer4scoreboard_89 (ordersUp_fla.customer4scoreboard_89)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer4scoreboard_89 extends MovieClip {
public var icon:MovieClip;
public function customer4scoreboard_89(){
addFrameScript(0, frame1, 9, frame10, 17, frame18);
}
function frame10(){
play();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package ordersUp_fla
Section 19
//customer5_10 (ordersUp_fla.customer5_10)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer5_10 extends MovieClip {
public function customer5_10(){
addFrameScript(0, frame1, 9, frame10, 100, frame101, 116, frame117, 123, frame124, 157, frame158, 184, frame185, 199, frame200, 228, frame229);
}
function frame158(){
play();
}
function frame200(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame185(){
stop();
}
function frame229(){
stop();
}
function frame101(){
stop();
}
function frame117(){
play();
}
function frame124(){
stop();
}
}
}//package ordersUp_fla
Section 20
//customer5scoreboard_92 (ordersUp_fla.customer5scoreboard_92)
package ordersUp_fla {
import flash.display.*;
public dynamic class customer5scoreboard_92 extends MovieClip {
public var icon:MovieClip;
public function customer5scoreboard_92(){
addFrameScript(0, frame1, 9, frame10, 17, frame18);
}
function frame10(){
play();
}
function frame18(){
stop();
}
function frame1(){
stop();
}
}
}//package ordersUp_fla
Section 21
//instruct_Pizza_103 (ordersUp_fla.instruct_Pizza_103)
package ordersUp_fla {
import flash.events.*;
import flash.display.*;
public dynamic class instruct_Pizza_103 extends MovieClip {
public function instruct_Pizza_103(){
addFrameScript(122, frame123);
}
function frame123(){
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package ordersUp_fla
Section 22
//menubutton_holder_77 (ordersUp_fla.menubutton_holder_77)
package ordersUp_fla {
import flash.display.*;
public dynamic class menubutton_holder_77 extends MovieClip {
public var button_mc:MenuButton;
}
}//package ordersUp_fla
Section 23
//order_filling_102 (ordersUp_fla.order_filling_102)
package ordersUp_fla {
import flash.display.*;
public dynamic class order_filling_102 extends MovieClip {
public var demo:MovieClip;
}
}//package ordersUp_fla
Section 24
//tempintro_100 (ordersUp_fla.tempintro_100)
package ordersUp_fla {
import flash.events.*;
import flash.display.*;
public dynamic class tempintro_100 extends MovieClip {
public function tempintro_100(){
addFrameScript(0, frame1, 9, frame10, 44, frame45);
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame45(){
stop();
dispatchEvent(new Event(Event.COMPLETE));
}
}
}//package ordersUp_fla
Section 25
//victory_96 (ordersUp_fla.victory_96)
package ordersUp_fla {
import flash.events.*;
import flash.display.*;
public dynamic class victory_96 extends MovieClip {
public function victory_96(){
addFrameScript(0, frame1, 9, frame10, 207, frame208, 227, frame228);
}
function frame208(){
dispatchEvent(new Event(Event.COMPLETE));
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame228(){
stop();
}
}
}//package ordersUp_fla
Section 26
//SelectionEvent (selectiongame.SelectionEvent)
package selectiongame {
import flash.events.*;
public class SelectionEvent extends Event {
private var _selection;
public static const SELECT:String = "select";
public function SelectionEvent(_arg1=null):void{
selection = _arg1;
super(SELECT);
}
public function set selection(_arg1):void{
_selection = _arg1;
}
public function get selection(){
return (_selection);
}
override public function clone():Event{
return (new SelectionEvent(selection));
}
}
}//package selectiongame
Section 27
//SelectionGameActivity (selectiongame.SelectionGameActivity)
package selectiongame {
import flash.events.*;
public class SelectionGameActivity extends AbstractIntegratedActivity {
protected var _mainView:SelectionGameMainView;
protected var _gameController:SelectionGameController;
public function SelectionGameActivity():void{
trace("SelectionGameActivity()");
super(GameType.SCORING);
addEventListener(Event.REMOVED_FROM_STAGE, deconstruct, false, 0, true);
}
protected function set mainView(_arg1:SelectionGameMainView):void{
_mainView = _arg1;
_mainView.addEventListener(PlaymateEvent.PLAY, handleCharacterEvent, true, 0, true);
}
protected function handleCharacterEvent(_arg1:PlaymateEvent):void{
trace(((("SelectionGameActivity - handleCharacterEvent() - playmateEvent.instruction == " + _arg1.instruction) + " - playmateEvent.animationCompleteCallBack == ") + _arg1.animationCompleteCallBack));
playmatePlay(_arg1.instruction, _arg1.animationCompleteCallBack);
}
protected function set gameController(_arg1:SelectionGameController):void{
_gameController = _arg1;
_gameController.addEventListener(PlaymateEvent.PLAY, handleCharacterEvent, false, 0, true);
_gameController.addEventListener(SelectionGameController.GAME_FINISHED, gameComplete, false, 0, true);
}
protected function gameComplete(_arg1:Event):void{
trace("OrdersUp - gameComplete()");
_gameController.start();
}
protected function deconstruct():void{
addEventListener(Event.REMOVED_FROM_STAGE, deconstruct, false);
_mainView.removeEventListener(PlaymateEvent.PLAY, handleCharacterEvent, true);
_gameController.removeEventListener(PlaymateEvent.PLAY, handleCharacterEvent, true);
_gameController.removeEventListener(SelectionGameController.GAME_FINISHED, gameComplete, false);
removeEventListener(Event.REMOVED_FROM_STAGE, deconstruct, false);
if (_gameController){
if (((_gameController.hasOwnProperty("deconstruct")) && ((_gameController.deconstruct is Function)))){
_gameController.deconstruct();
};
};
if (_mainView){
if (((_mainView.hasOwnProperty("deconstruct")) && ((_mainView.deconstruct is Function)))){
_mainView.deconstruct();
};
};
}
}
}//package selectiongame
Section 28
//SelectionGameController (selectiongame.SelectionGameController)
package selectiongame {
import flash.events.*;
import flash.display.*;
public class SelectionGameController extends MovieClip {
protected var _currentRoundModel:SelectionGameRoundModel;
protected var _roundObjectives:Array;
protected var _roundInProgress:Boolean;// = false
protected var _currentRound:uint;
protected var _lastUserSelectionSuccessful:Boolean;// = false
protected var _view:SelectionGameMainView;
public static const GAME_FINISHED:String = "gameFinished";
public function SelectionGameController(){
_roundInProgress = false;
_lastUserSelectionSuccessful = false;
super();
trace("SelectionGameController()");
}
protected function transitionViewToInstructions(_arg1:Event=null):void{
_view.addEventListener(SelectionGameMainView.INSTRUCTIONS_COMPLETE, transitionViewToIntro, false, 0, true);
_view.playInstructions();
}
protected function playmateWin():void{
dispatchEvent(new PlaymateEvent("gameCompletedWon"));
}
protected function viewSuccessComplete(_arg1:Event):void{
_view.removeEventListener(SelectionGameMainView.SUCCESS_COMPLETE, viewSuccessComplete, false);
if (_roundInProgress){
_view.waitForSelection();
_view.menuEnabled = true;
} else {
endRound();
};
}
public function init():void{
_view.init();
}
protected function getRoundModel(_arg1):SelectionGameRoundModel{
return (null);
}
protected function victoryResolved(_arg1:Event):void{
playmateWin();
}
protected function transitionViewToGame(_arg1:Event=null):void{
_view.addEventListener(SelectionGameMainView.GAME_READY, gameReady, false, 0, true);
_view.transitionToGame();
}
public function start():void{
transitionViewToInstructions();
}
protected function endGame(_arg1:Event):void{
transitionViewToGame();
}
public function deconstruct():void{
_view.removeEventListener(SelectionEvent.SELECT, onMenuSelect, true);
_view.deconstruct();
_view = null;
if (_view.parent){
_view.parent.removeChild(_view);
};
}
public function set view(_arg1:SelectionGameMainView):void{
_view = _arg1;
_view.addEventListener(SelectionEvent.SELECT, onMenuSelect, true, 0, true);
}
override public function set enabled(_arg1:Boolean):void{
super.enabled = _arg1;
}
protected function beginRound(_arg1:int=-1):void{
if (_arg1 != -1){
_currentRound = _arg1;
};
_view.addEventListener(SelectionGameMainView.ROUND_READY, roundReady, false, 0, true);
_view.setupRound();
}
protected function endRound():void{
_view.addEventListener(SelectionGameMainView.END_OF_ROUND_COMPLETE, viewEndOfRoundComplete, false, 0, true);
_view.endRound();
}
protected function onMenuSelect(_arg1:SelectionEvent):void{
var _local2:String;
if (!_roundInProgress){
return;
};
_local2 = _arg1.selection;
_view.discontinueOrderDisplay();
_view.menuEnabled = false;
if (_currentRoundModel.attemptChooseItem(_local2)){
_view.lastItemPlaced = _local2;
_lastUserSelectionSuccessful = true;
_view.addEventListener(SelectionGameMainView.SUCCESS_COMPLETE, viewSuccessComplete, false, 0, true);
_view.showSuccess(_local2);
playmateScoreSuccess();
if (_currentRoundModel.isComplete){
_roundInProgress = false;
};
} else {
_lastUserSelectionSuccessful = false;
_view.addEventListener(SelectionGameMainView.FAILURE_COMPLETE, viewFailureComplete, false, 0, true);
_view.showFailure();
playmateEncouragement();
};
_view.menuEnabled = false;
}
protected function viewOrdering(_arg1:Event):void{
_view.menuEnabled = true;
if (!_lastUserSelectionSuccessful){
_view.displayOrder(_currentRoundModel.requiredItemsList);
};
}
protected function endPlay():void{
_view.addEventListener(SelectionGameMainView.VICTORY_COMPLETE, endGame, false, 0, true);
_view.addEventListener(SelectionGameMainView.VICTORY_RESOLVED, victoryResolved, false, 0, true);
_view.playVictory();
}
protected function viewEndOfRoundComplete(_arg1:Event):void{
_view.removeEventListener(SelectionGameMainView.END_OF_ROUND_COMPLETE, viewEndOfRoundComplete, false);
roundComplete();
}
protected function roundReady(_arg1:Event):void{
if ((_currentRoundModel is SelectionGameRoundModel)){
_currentRoundModel.deconstruct();
_currentRoundModel = null;
};
_currentRoundModel = getRoundModel(_roundObjectives[_currentRound]);
_view.addEventListener(SelectionGameMainView.ORDERING, viewOrdering, false, 0, true);
_view.prepareToOrder();
_roundInProgress = true;
_lastUserSelectionSuccessful = false;
}
protected function transitionViewToIntro(_arg1:Event=null):void{
_view.addEventListener(SelectionGameMainView.INTRO_COMPLETE, transitionViewToGame, false, 0, true);
_view.playIntro();
}
protected function newGame():void{
_currentRound = 0;
beginRound();
}
protected function playmateEncouragement():void{
dispatchEvent(new PlaymateEvent("missFailure"));
}
protected function gameReady(_arg1:Event):void{
_view.removeEventListener(SelectionGameMainView.GAME_READY, gameReady, false);
newGame();
}
protected function viewFailureComplete(_arg1:Event):void{
_view.removeEventListener(SelectionGameMainView.FAILURE_COMPLETE, viewFailureComplete, false);
_view.reIterateOrder();
}
protected function roundComplete():void{
_currentRound++;
if (_currentRound == _roundObjectives.length){
endPlay();
} else {
beginRound();
};
}
protected function playmateScoreSuccess():void{
dispatchEvent(new PlaymateEvent("scoreSuccess"));
}
}
}//package selectiongame
Section 29
//SelectionGameMainView (selectiongame.SelectionGameMainView)
package selectiongame {
import flash.events.*;
import flash.display.*;
public class SelectionGameMainView extends MovieClip {
public static const VICTORY_RESOLVED:String = "victory_resolved";
public static const VICTORY_COMPLETE:String = "victory_complete";
public static const END_OF_ROUND_COMPLETE:String = "end_of_round_complete";
public static const ROUND_READY:String = "round_ready";
public static const INSTRUCTIONS_COMPLETE:String = "instructions_complete";
public static const ORDERING:String = "ordering";
public static const SUCCESS_COMPLETE:String = "success_complete";
public static const GAME_READY:String = "game_ready";
public static const INTRO_COMPLETE:String = "intro_complete";
public static const FAILURE_COMPLETE:String = "failure_complete";
public function SelectionGameMainView():void{
trace("SelectionGameMainView()");
}
public function waitForSelection():void{
}
public function init():void{
}
public function setupRound():void{
dispatchEvent(new Event(SelectionGameMainView.ROUND_READY));
}
public function playVictory():void{
dispatchEvent(new Event(VICTORY_COMPLETE));
}
public function discontinueOrderDisplay():void{
}
public function deconstruct():void{
}
public function showSuccess(_arg1=null):void{
dispatchEvent(new Event(SelectionGameMainView.SUCCESS_COMPLETE));
}
public function endRound():void{
dispatchEvent(new Event(SelectionGameMainView.END_OF_ROUND_COMPLETE));
}
public function playIntro():void{
dispatchEvent(new Event(SelectionGameMainView.INTRO_COMPLETE));
}
public function displayOrder(_arg1:Array):void{
}
public function prepareToOrder():void{
dispatchEvent(new Event(SelectionGameMainView.ORDERING));
}
public function transitionToGame():void{
dispatchEvent(new Event(SelectionGameMainView.GAME_READY));
}
public function set lastItemPlaced(_arg1):void{
}
public function showFailure(_arg1=null):void{
dispatchEvent(new Event(SelectionGameMainView.FAILURE_COMPLETE));
}
public function reIterateOrder():void{
}
public function set menuEnabled(_arg1:Boolean):void{
}
public function playInstructions():void{
dispatchEvent(new Event(SelectionGameMainView.INSTRUCTIONS_COMPLETE));
}
}
}//package selectiongame
Section 30
//SelectionGameRoundModel (selectiongame.SelectionGameRoundModel)
package selectiongame {
public class SelectionGameRoundModel {
protected var _requiredItemsList:Array;
protected var _placedItemsList:Array;
public function SelectionGameRoundModel(_arg1:uint){
trace(("SelecitonGameRoundModel() - numberOfItems == " + _arg1));
init();
}
public function get isComplete():Boolean{
return ((_placedItemsList.length == _requiredItemsList.length));
}
protected function init():void{
_placedItemsList = new Array();
}
public function deconstruct():void{
var _local1:uint;
_local1 = 0;
while (_local1 < _requiredItemsList.length) {
if (((_requiredItemsList[_local1].hasOwnProperty("deconstruct")) && ((_requiredItemsList[_local1].deconstruct is Function)))){
_requiredItemsList[_local1].deconstruct();
};
_requiredItemsList[_local1] = null;
_local1++;
};
_requiredItemsList = null;
_local1 = 0;
while (_local1 < _placedItemsList.length) {
if (((_placedItemsList[_local1].hasOwnProperty("deconstruct")) && ((_placedItemsList[_local1].deconstruct is Function)))){
_placedItemsList[_local1].deconstruct();
};
_placedItemsList[_local1] = null;
_local1++;
};
_placedItemsList = null;
}
public function attemptChooseItem(_arg1):Boolean{
var _local2:*;
var _local3:*;
for each (_local2 in _placedItemsList) {
if (_local2 == _arg1){
return (false);
};
};
for each (_local3 in _requiredItemsList) {
if (_local3 == _arg1){
_placedItemsList.push(_arg1);
return (true);
};
};
return (false);
}
public function get requiredItemsList():Array{
return (_requiredItemsList);
}
}
}//package selectiongame
Section 31
//playSound (utils.sound.playSound)
package utils.sound {
import flash.media.*;
import flash.utils.*;
public function playSound(_arg1:String, _arg2:Number=0, _arg3:int=0, _arg4:SoundTransform=null):SoundChannel{
var className = _arg1;
var startTime = _arg2;
var loops = _arg3;
var sndTransform = _arg4;
try {
return (new (getDefinitionByName(className)).play(startTime, loops, sndTransform));
} catch(error:Error) {
trace("-----------PLAY SOUND ERROR--------\n", error);
};
return (new SoundChannel());
}
}//package utils.sound
Section 32
//trackEvent (utils.tracking.trackEvent)
package utils.tracking {
import flash.external.*;
public class trackEvent {
public static var debugMode:Boolean = false;
public function as3event(_arg1:String, _arg2:Object){
var returnVal:*;
var property:String;
var event = _arg1;
var track = _arg2;
if (ExternalInterface.available){
try {
returnVal = ExternalInterface.call("trackEvent.event", event, track);
if (debugMode){
trace(("trackEvent.as3event: trackEvent.event call return value = " + returnVal));
};
if (debugMode){
trace("trackEvent.as3event: \ntrack { ");
for (property in track) {
trace(((("\t" + property) + ": ") + track[property]));
};
trace("}");
ExternalInterface.call("testTrackAlert", track);
};
} catch(error:Error) {
if (debugMode){
trace(("trackEvent.as3event: trackEvent.event call failed. Error = " + error.getStackTrace()));
};
};
};
}
}
}//package utils.tracking
Section 33
//AbstractIntegratedActivity (AbstractIntegratedActivity)
package {
import flash.events.*;
import flash.display.*;
public class AbstractIntegratedActivity extends MovieClip {
public var ready_fn:Function;
private var _standaloneFramesWaited:uint;// = 0
public var standalone:Boolean;// = false
protected var _standaloneWaitFrames:uint;// = 24
private var _availability:Boolean;// = false
public var playmatePlay_fn:Function;
protected var _gameType:String;
protected var _loaderParameters:Object;
protected var onAnimationComplete_fn:Function;
public function AbstractIntegratedActivity(_arg1="default"){
standalone = false;
_availability = false;
_standaloneFramesWaited = 0;
_standaloneWaitFrames = 24;
super();
_gameType = _arg1;
announceAvailability();
checkLoadStatus();
}
protected function playmatePlay(_arg1:String, _arg2:Function=null):void{
var instruction = _arg1;
var animationCompleteCallBack = _arg2;
if (animationCompleteCallBack != null){
onAnimationComplete_fn = animationCompleteCallBack;
};
try {
playmatePlay_fn(instruction);
} catch(error:Error) {
handleAnimationComplete();
};
}
public function handleIrisOpeningEnd():void{
}
public function handleIrisOpeningBegin():void{
}
private function runStandalone():void{
announceAvailability();
loaderParameters = loaderInfo.parameters;
standalone = true;
handleIrisOpeningBegin();
handleIrisOpeningEnd();
}
public function get gameType():String{
return (_gameType);
}
public function get availability():Boolean{
return (_availability);
}
protected function onLoaderParameters():void{
}
private function announceAvailability():void{
_availability = true;
dispatchEvent(new Event(Event.COMPLETE));
}
public function handleAnimationComplete():void{
try {
onAnimationComplete_fn();
onAnimationComplete_fn = null;
} catch(error:Error) {
};
}
private function checkLoadStatus():void{
if ((((loaderInfo.bytesLoaded == loaderInfo.bytesTotal)) && ((loaderInfo.bytesLoaded > 10)))){
onLoadComplete();
} else {
loaderInfo.addEventListener(Event.COMPLETE, onLoadComplete, false, int.MAX_VALUE);
};
}
protected function onLoadComplete(_arg1:Event=null):void{
var event = _arg1;
announceAvailability();
loaderInfo.removeEventListener(Event.COMPLETE, onLoadComplete);
try {
ready_fn();
} catch(error:Error) {
addEventListener(Event.ENTER_FRAME, standaloneCheck);
};
}
public function set loaderParameters(_arg1:Object):void{
_loaderParameters = _arg1;
onLoaderParameters();
}
private function standaloneCheck(_arg1:Event):void{
var event = _arg1;
_standaloneFramesWaited++;
try {
ready_fn();
removeEventListener(Event.ENTER_FRAME, standaloneCheck);
return;
} catch(error:Error) {
if (_standaloneFramesWaited > _standaloneWaitFrames){
removeEventListener(Event.ENTER_FRAME, standaloneCheck);
runStandalone();
};
};
}
}
}//package
Section 34
//BurgerBuilder (BurgerBuilder)
package {
import flash.events.*;
import flash.display.*;
public class BurgerBuilder extends MovieClip {
private const TOPPING_IN_MOTION:String = "topping_in_motion";
private const LETTUCE:String = "lettuce";
private const TOMATO:String = "tomato";
private const TOPPING_Y_SHIFT_FRANES:uint = 12;
private const COMPLETE:String = "complete";
private const PICKLES:String = "pickles";
private const FRIES:String = "fries";
private const CURLY_FRIES_INSERT_FRAME:String = "curly_fries_insertion_complete";
private const CURLY_FRIES:String = "curly_fries";
private const WAIT:String = "wait";
private const CHIPS:String = "chips";
private const ONION:String = "onion";
private const Y_PIXELS_PER_TOPPING_POSITION:Number = -12.5;
private const FRIES_INSERT_FRAME:String = "fries_insertion_complete";
private const CHEESE:String = "cheese";
private const TOPPING_IN_PLACE:String = "topping_in_place";
private const CHIPS_INSERT_FRAME:String = "chips_insertion_complete";
public var side_box:BurgerSide;
private var _toppingInMotion:Boolean;
private var _destinationToppingYOffest:Number;
private var _sideInserted:Boolean;
public var topping_mc:MovieClip;
private var _toppingShiftFramesElapsed:uint;
private var _toppingsOnBurger:uint;
public function BurgerBuilder():void{
addFrameScript(0, frame1, 8, frame9, 9, frame10, 42, frame43, 43, frame44, 76, frame77, 77, frame78, 110, frame111, 111, frame112, 147, frame148, 148, frame149, 185, frame186, 186, frame187, 228, frame229, 229, frame230, 271, frame272, 272, frame273, 326, frame327);
}
function frame272(){
stop();
}
function frame149(){
play();
}
public function init():void{
trace("BurgerBuilder - init()");
_toppingsOnBurger = 0;
}
function frame273(){
play();
}
function frame77(){
stop();
}
function frame327(){
stop();
}
function frame78(){
play();
}
private function animation_ef(_arg1:Event):void{
var _local2:Number;
switch (currentLabel){
case TOPPING_IN_PLACE:
case TOPPING_IN_MOTION:
if (!_toppingInMotion){
_toppingShiftFramesElapsed = 0;
_toppingInMotion = true;
} else {
_toppingShiftFramesElapsed++;
_local2 = (_toppingShiftFramesElapsed / TOPPING_Y_SHIFT_FRANES);
if (_local2 < 0){
_local2 = 0;
};
if (_local2 > 1){
_local2 = 1;
};
topping_mc.art_mc.y = ((_destinationToppingYOffest * _local2) / topping_mc.scaleY);
};
break;
case FRIES_INSERT_FRAME:
if (!_sideInserted){
side_box.item = Item.FRIES;
};
_sideInserted = true;
break;
case CURLY_FRIES_INSERT_FRAME:
if (!_sideInserted){
side_box.item = Item.CURLY_FRIES;
};
_sideInserted = true;
break;
case CHIPS_INSERT_FRAME:
if (!_sideInserted){
side_box.item = Item.CHIPS;
};
_sideInserted = true;
break;
case COMPLETE:
this.gotoAndStop(WAIT);
dispatchEvent(new Event(Event.COMPLETE));
removeEventListener(Event.ENTER_FRAME, animation_ef, false);
};
}
function frame10(){
play();
}
public function launchItem(_arg1:String):void{
side_box.item = Item.NONE;
_destinationToppingYOffest = (_toppingsOnBurger * Y_PIXELS_PER_TOPPING_POSITION);
switch (_arg1){
case Item.CHEESE:
_toppingsOnBurger++;
gotoAndPlay(CHEESE);
break;
case Item.LETTUCE:
_toppingsOnBurger++;
gotoAndPlay(LETTUCE);
break;
case Item.TOMATO:
_toppingsOnBurger++;
gotoAndPlay(TOMATO);
break;
case Item.ONION:
_toppingsOnBurger++;
gotoAndPlay(ONION);
break;
case Item.PICKLES:
_toppingsOnBurger++;
gotoAndPlay(PICKLES);
break;
case Item.FRIES:
gotoAndPlay(FRIES);
break;
case Item.CURLY_FRIES:
gotoAndPlay(CURLY_FRIES);
break;
case Item.CHIPS:
gotoAndPlay(CHIPS);
break;
};
_sideInserted = false;
addEventListener(Event.ENTER_FRAME, animation_ef, false, 0, true);
}
function frame186(){
stop();
}
function frame9(){
stop();
}
function frame1(){
stop();
}
function frame111(){
stop();
}
function frame230(){
play();
}
public function deconstruct():void{
removeEventListener(Event.ENTER_FRAME, animation_ef, false);
}
function frame229(){
stop();
}
function frame112(){
play();
}
function frame43(){
stop();
}
function frame44(){
play();
}
function frame148(){
stop();
}
function frame187(){
play();
}
}
}//package
Section 35
//BurgerSide (BurgerSide)
package {
import flash.display.*;
public class BurgerSide extends MovieClip {
public var curly_fries_mc:MovieClip;
public var chips_mc:MovieClip;
public var fries_mc:MovieClip;
public function BurgerSide():void{
trace("BurgerSide()");
}
public function set item(_arg1:String):void{
fries_mc.visible = (_arg1 == Item.FRIES);
curly_fries_mc.visible = (_arg1 == Item.CURLY_FRIES);
chips_mc.visible = (_arg1 == Item.CHIPS);
}
}
}//package
Section 36
//BurgerTopping (BurgerTopping)
package {
import flash.display.*;
public class BurgerTopping extends MovieClip {
public var cheese_mc:MovieClip;
public var tomato_mc:MovieClip;
public var pickles_mc:MovieClip;
public var lettuce_mc:MovieClip;
public var onion_mc:MovieClip;
public function BurgerTopping():void{
}
public function set item(_arg1:String):void{
tomato_mc.visible = (_arg1 == Item.TOMATO);
lettuce_mc.visible = (_arg1 == Item.LETTUCE);
onion_mc.visible = (_arg1 == Item.ONION);
pickles_mc.visible = (_arg1 == Item.PICKLES);
cheese_mc.visible = (_arg1 == Item.CHEESE);
}
}
}//package
Section 37
//BurgerTray (BurgerTray)
package {
import flash.media.*;
import flash.events.*;
import fl.transitions.easing.*;
import fl.transitions.*;
import flash.display.*;
import utils.sound.*;
public class BurgerTray extends MovieClip {
private const BUN_TOP_Y_SHIFT_FRAMES:uint = 10;
private const BUN_ART_WAIT_FRAME:String = "wait";
private const _trayTargetPos:uint = 13;
private const _toppingClips:uint = 6;
private const BUN_ART_ANIMATE_FRAME:String = "animate";
private const Y_PIXELS_PER_TOPPING_POSITION:Number = -12.5;
public var burger_base_mc:MovieClip;
public var bun_top_mc:MovieClip;
public var topping_5_mc:BurgerTopping;
public var topping_3_mc:BurgerTopping;
public var tray_mc:MovieClip;
private var _bunTopYShiftFramesElapsed:uint;
public var side_1_mc:BurgerSide;
public var topping_1_mc:BurgerTopping;
private var _currentToppings:uint;
public var tray_front_mc:MovieClip;
private var _trayTween:EventDispatcher;
public var topping_4_mc:BurgerTopping;
public var bun_side_mc:MovieClip;
public var topping_2_mc:BurgerTopping;
public var side_2_mc:BurgerSide;
public var bun_top_holder_mc:MovieClip;
private var _currentSides:uint;
public var side_0_mc:BurgerSide;
public var topping_0_mc:BurgerTopping;
public static const EXITED:String = "exited";
public function BurgerTray():void{
this.x = (0 - this.width);
}
private function applyBun_ef(_arg1:Event):void{
var _local2:Number;
_bunTopYShiftFramesElapsed++;
trace(("BurgerTray - applyBun_ef() - _bunTopYShiftFramesElapsed == " + _bunTopYShiftFramesElapsed));
_local2 = (_bunTopYShiftFramesElapsed / BUN_TOP_Y_SHIFT_FRAMES);
if (_local2 > 1){
_local2 = 1;
};
if (_local2 < 0){
_local2 = 0;
};
bun_top_holder_mc.bun_top_mc.y = (_local2 * (Y_PIXELS_PER_TOPPING_POSITION * _currentToppings));
if (_local2 == 1){
removeEventListener(Event.ENTER_FRAME, applyBun_ef, false);
};
}
public function init():void{
var _local1:uint;
_currentToppings = 0;
_local1 = 0;
while (_local1 < _toppingClips) {
this[(("topping_" + _local1.toString()) + "_mc")].visible = false;
_local1++;
};
_currentSides = 0;
_local1 = 0;
while (_local1 < 3) {
this[(("side_" + _local1.toString()) + "_mc")].visible = false;
_local1++;
};
bun_top_holder_mc.bun_top_mc.y = 0;
bun_top_holder_mc.bun_top_mc.gotoAndStop(BUN_ART_WAIT_FRAME);
}
public function onExitComplete(_arg1:Event=null):void{
_trayTween.removeEventListener("motionFinish", onExitComplete, false);
dispatchEvent(new Event(BurgerTray.EXITED));
}
public function applyBun():void{
trace("BurgerTray - applyBun()");
bun_top_holder_mc.bun_top_mc.y = 0;
bun_top_holder_mc.bun_top_mc.gotoAndPlay(BUN_ART_ANIMATE_FRAME);
_bunTopYShiftFramesElapsed = 0;
addEventListener(Event.ENTER_FRAME, applyBun_ef, false, 0, true);
}
public function addItem(_arg1:String):void{
trace(("BurgerTray - addItem() - item == " + _arg1));
if (Item.itemIsTopping(_arg1)){
addTopping(_arg1);
} else {
if (Item.itemIsSide(_arg1)){
addSide(_arg1);
};
};
}
private function addTopping(_arg1:String):void{
var _local2:BurgerTopping;
trace(("BurgerTray - addSide() - item == " + _arg1));
_local2 = BurgerTopping(this[(("topping_" + _currentToppings.toString()) + "_mc")]);
_local2.item = _arg1;
_local2.visible = true;
_currentToppings++;
}
private function addSide(_arg1:String):void{
var _local2:BurgerSide;
trace(("BurgerTray - addSide() - item == " + _arg1));
_local2 = BurgerSide(this[(("side_" + _currentSides.toString()) + "_mc")]);
_local2.item = _arg1;
_local2.visible = true;
_currentSides++;
}
public function animateOut():void{
trace(">>>>>> BurgerTray - animateOut()");
_trayTween = new Tween(this, "x", Strong.easeOut, _trayTargetPos, 750, 1.5, true);
_trayTween.addEventListener("motionFinish", onExitComplete, false, 0, true);
playSound("OrderTrayInSound", 0, 1, new SoundTransform(0.5, 0));
}
public function deconstruct():void{
removeEventListener(Event.ENTER_FRAME, applyBun_ef, false);
_trayTween.removeEventListener("motionFinish", onExitComplete, false);
}
public function optimize():void{
}
public function animateIn():void{
trace(">>>>>> BurgerTray - animateIn()");
new Tween(this, "x", Strong.easeOut, (0 - this.width), _trayTargetPos, 1, true);
playSound("OrderTrayInSound", 0, 1, new SoundTransform(0.5, 0));
}
}
}//package
Section 38
//Customer (Customer)
package {
import flash.events.*;
import flash.display.*;
public class Customer extends MovieClip {
private const SHOW_SUCCESS_COMPLETE:String = "success_complete";
private const EXIT:String = "exit";
private const WAITING:String = "wait for choices HOLD";
private const OUT:String = "out";
private const SHOW_FAILURE_COMPLETE:String = "failure_complete";
private const SHOW_FAILURE:String = "failure - back to place order";
private const BACK_COMPLETE:String = "back_complete";
private const EXIT_COMPLETE:String = "exit_complete";
private const SHOW_SUCCESS:String = "success";
private const APPROACH_AND_ORDER:String = "approach counter";
private const PLACE_ORDER:String = "place order";
private const BACK:String = "back";
public var customer_3_mc:MovieClip;
public var customer_1_mc:MovieClip;
private var _customerClip:MovieClip;
public var customer_2_mc:MovieClip;
private var _totalCustomers:uint;// = 5
public var customer_4_mc:MovieClip;
public var customer_0_mc:MovieClip;
public static const ORDERING:String = "customer ordering";
public static const EXITED:String = "customer exited";
public function Customer():void{
_totalCustomers = 5;
super();
}
public function init(_arg1:int=-1):void{
trace(("Customer - init() - customer == " + _arg1));
if (_arg1 == -1){
this.customerNumber = Math.floor((Math.random() * 5));
} else {
this.customerNumber = _arg1;
};
out();
}
public function exit():void{
trace("Customer - exit()");
addEventListener(Event.ENTER_FRAME, exit_ef, false, 0, true);
_customerClip.gotoAndPlay(EXIT);
}
private function out():void{
trace("Customer - out()");
gotoAndStop(OUT);
}
public function order():void{
trace("Customer - order()");
_customerClip.gotoAndPlay(PLACE_ORDER);
dispatchEvent(new Event(ORDERING));
}
private function showFailure_ef(_arg1:Event):void{
if (_customerClip.currentLabel == SHOW_FAILURE_COMPLETE){
removeEventListener(Event.ENTER_FRAME, showFailure_ef, false);
dispatchEvent(new Event(Event.COMPLETE));
};
}
private function exit_ef(_arg1:Event):void{
if (_customerClip.currentLabel == EXIT_COMPLETE){
dispatchEvent(new Event(EXITED));
removeEventListener(Event.ENTER_FRAME, exit_ef, false);
};
}
public function wait():void{
trace("Customer - wait()");
_customerClip.gotoAndPlay(WAITING);
}
public function deconstruct():void{
removeEventListener(Event.ENTER_FRAME, approachAndOrder_ef, false);
removeEventListener(Event.ENTER_FRAME, showSuccess_ef, false);
removeEventListener(Event.ENTER_FRAME, showFailure_ef, false);
removeEventListener(Event.ENTER_FRAME, back_ef, false);
removeEventListener(Event.ENTER_FRAME, exit_ef, false);
}
public function approachAndOrder():void{
trace("Customer - approachAndOrder()");
addEventListener(Event.ENTER_FRAME, approachAndOrder_ef, false, 0, true);
_customerClip.gotoAndPlay(APPROACH_AND_ORDER);
}
private function set customerNumber(_arg1:uint):void{
var _local2:uint;
var _local3:MovieClip;
_local2 = 0;
while (_local2 < _totalCustomers) {
_local3 = this[(("customer_" + _local2) + "_mc")];
if (_local2 == _arg1){
if ((_local3 is MovieClip)){
_local3.visible = true;
_customerClip = _local3;
};
} else {
_local3.visible = false;
};
_local2++;
};
}
private function approachAndOrder_ef(_arg1:Event):void{
if (_customerClip.currentLabel == PLACE_ORDER){
dispatchEvent(new Event(ORDERING));
};
if (_customerClip.currentLabel == WAITING){
removeEventListener(Event.ENTER_FRAME, approachAndOrder_ef, false);
};
}
public function showSuccess():void{
trace("Customer - showSuccess()");
addEventListener(Event.ENTER_FRAME, showSuccess_ef, false, 0, true);
_customerClip.gotoAndPlay(SHOW_SUCCESS);
}
private function showSuccess_ef(_arg1:Event):void{
if (_customerClip.currentLabel == SHOW_SUCCESS_COMPLETE){
removeEventListener(Event.ENTER_FRAME, showSuccess_ef, false);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function showFailure():void{
trace("Customer - showFailure()");
addEventListener(Event.ENTER_FRAME, showFailure_ef, false, 0, true);
_customerClip.gotoAndPlay(SHOW_FAILURE);
}
private function back_ef(_arg1:Event):void{
if (_customerClip.currentLabel == BACK_COMPLETE){
dispatchEvent(new Event(ORDERING));
_customerClip.gotoAndStop(WAITING);
removeEventListener(Event.ENTER_FRAME, back_ef, false);
};
}
public function back():void{
trace("Customer - back()");
addEventListener(Event.ENTER_FRAME, back_ef, false, 0, true);
_customerClip.gotoAndPlay(BACK);
}
}
}//package
Section 39
//GameController (GameController)
package {
import flash.media.*;
import selectiongame.*;
import utils.sound.*;
public class GameController extends SelectionGameController {
public function GameController(){
trace("GameController()");
_roundObjectives = [2, 3, 4, 5, 6];
super();
}
override protected function getRoundModel(_arg1):SelectionGameRoundModel{
return (new RoundModel(_arg1));
}
override protected function beginRound(_arg1:int=-1):void{
trace(("GameController - beginRound() - roundNumber == " + _arg1));
if (_arg1 != -1){
MainView(_view).roundNumber = int(_arg1);
} else {
MainView(_view).roundNumber = _currentRound;
};
super.beginRound(_arg1);
}
override protected function playmateEncouragement():void{
super.playmateEncouragement();
playSound("OrdersIncorrectChoiceSound", 0, 1, new SoundTransform(0.5, 0));
}
override protected function playmateScoreSuccess():void{
super.playmateScoreSuccess();
playSound("OrdersCorrectChoiceSound", 0, 1, new SoundTransform(0.5, 0));
}
}
}//package
Section 40
//GameType (GameType)
package {
public class GameType {
public static const CREATIVE:String = "game_type_creative";
public static const SCORING:String = "game_type_scoring";
}
}//package
Section 41
//Item (Item)
package {
public class Item {
public static const CURLY_FRIES:String = "curly_fries";
public static const CHIPS:String = "chips";
public static const ONION:String = "onion";
public static const TOMATO:String = "tomato";
public static const FRIES:String = "fries";
public static const CHEESE:String = "cheese";
public static const NONE:String = "no_item";
public static const PICKLES:String = "pickles";
public static const LETTUCE:String = "lettuce";
public static function getAllItems():Array{
return ([Item.TOMATO, Item.LETTUCE, Item.ONION, Item.PICKLES, Item.CHEESE, Item.FRIES, Item.CURLY_FRIES, Item.CHIPS]);
}
public static function getUniqueRandomIntegers(_arg1:uint, _arg2:uint):Array{
var _local3:Array;
var _local4:uint;
var _local5:Boolean;
var _local6:uint;
_local3 = new Array();
while (_local3.length < _arg1) {
_local4 = Math.floor((Math.random() * _arg2));
_local5 = false;
_local6 = 0;
while (_local6 < _local3.length) {
if (_local3[_local6] == _local4){
_local5 = true;
};
_local6++;
};
if (!_local5){
_local3.push(_local4);
};
};
return (_local3);
}
public static function itemIsTopping(_arg1:String):Boolean{
return (!(([Item.TOMATO, Item.LETTUCE, Item.ONION, Item.PICKLES, Item.CHEESE].indexOf(_arg1) == -1)));
}
public static function itemIsSide(_arg1:String):Boolean{
return (!(([Item.FRIES, Item.CURLY_FRIES, Item.CHIPS].indexOf(_arg1) == -1)));
}
public static function getUniqueRandomItems(_arg1:int=-1):Array{
var _local2:Array;
var _local3:Array;
var _local4:Array;
var _local5:uint;
_local2 = Item.getAllItems();
if ((((_arg1 > _local2.length)) || ((_arg1 == -1)))){
_arg1 = _local2.length;
};
_local3 = Item.getUniqueRandomIntegers(_arg1, _local2.length);
_local4 = new Array();
_local5 = 0;
while (_local5 < _local3.length) {
_local4.push(_local2[_local3[_local5]]);
_local5++;
};
return (_local4);
}
}
}//package
Section 42
//MainView (MainView)
package {
import flash.media.*;
import flash.events.*;
import selectiongame.*;
import utils.tracking.*;
import flash.utils.*;
import flash.display.*;
import utils.sound.*;
public class MainView extends SelectionGameMainView {
protected const ORDER_OF_CUSTOMERS:Array;
private const INSTRUCTIONS_START_FRAME:String = "animate";
private var _soundOnTransform:SoundTransform;
public var scoreboard_mc:ScoreBoard;
public var intro_mc:MovieClip;
public var background_mc:MovieClip;
private var _victoryWaitStartTime:int;
public var instructions_mc:MovieClip;
private var _victoryWaitSeconds:Number;// = 2
private var _lastItemPlaced:String;
public var menu_mc:Menu;
private var _mainSoundLoop:SoundChannel;
public var counter_mc:MovieClip;
private var _myTrackEvent:trackEvent;
public var burger_builder_mc:BurgerBuilder;
public var victory_mc:MovieClip;
private var _soundOffTransform:SoundTransform;
public var speech_bubble_mc:SpeechBubble;
public var supplies_mc:MovieClip;
public var burger_tray_mc:BurgerTray;
protected var _currentRound:uint;
public var customer_mc:Customer;
protected var _menuSpotlightCueGiven:Boolean;
public function MainView():void{
_victoryWaitSeconds = 2;
ORDER_OF_CUSTOMERS = [0, 1, 2, 3, 4];
_soundOnTransform = new SoundTransform(0.5, 0);
_soundOffTransform = new SoundTransform(0, 0);
super();
_myTrackEvent = new trackEvent();
}
private function victoryResolved(_arg1:Event):void{
this.victory_mc.removeEventListener(Event.COMPLETE, victoryResolved, false);
dispatchEvent(new Event(SelectionGameMainView.VICTORY_RESOLVED));
_victoryWaitStartTime = getTimer();
this.addEventListener(Event.ENTER_FRAME, victoryResolved_ef, false, 0, true);
}
override public function playVictory():void{
var _local1:Object;
_local1 = new Object();
_local1.activity = "completed";
_myTrackEvent.as3event("event.view", _local1);
this.victory_mc.addEventListener(Event.COMPLETE, victoryResolved, false, 0, true);
this.victory_mc.visible = true;
this.victory_mc.gotoAndPlay("animate");
}
override public function showSuccess(_arg1=null):void{
customer_mc.showSuccess();
burger_builder_mc.addEventListener(Event.COMPLETE, successComplete, false, 0, true);
burger_builder_mc.launchItem(_arg1.toString());
}
public function announceCustomerOrdering(_arg1:Event):void{
dispatchEvent(new Event(SelectionGameMainView.ORDERING));
}
private function successComplete(_arg1:Event):void{
trace(("MainView - successComplete() - _lastItemPlaced==" + _lastItemPlaced));
burger_builder_mc.removeEventListener(Event.COMPLETE, successComplete, false);
burger_tray_mc.addItem(_lastItemPlaced);
dispatchEvent(new Event(SelectionGameMainView.SUCCESS_COMPLETE));
}
override public function deconstruct():void{
instructions_mc.demo.removeEventListener(Event.COMPLETE, instructionsComplete, false);
menu_mc.removeEventListener(Event.COMPLETE, menuTransitionComplete, false);
burger_builder_mc.removeEventListener(Event.COMPLETE, successComplete, false);
customer_mc.removeEventListener(Customer.ORDERING, announceCustomerOrdering, false);
customer_mc.removeEventListener(Event.COMPLETE, failureComplete, false);
customer_mc.removeEventListener(Customer.EXITED, customerExited, false);
victory_mc.removeEventListener(Event.COMPLETE, victoryResolved, false);
removeEventListener(Event.ENTER_FRAME, victoryResolved_ef, false);
customer_mc.deconstruct();
speech_bubble_mc.deconstruct();
burger_builder_mc.deconstruct();
menu_mc.deconstruct();
burger_tray_mc.deconstruct();
}
override public function prepareToOrder():void{
customer_mc.addEventListener(Customer.ORDERING, announceCustomerOrdering, false, 0, true);
customer_mc.approachAndOrder();
burger_tray_mc.animateIn();
}
override public function transitionToGame():void{
victory_mc.visible = false;
instructions_mc.visible = false;
intro_mc.visible = false;
background_mc.visible = true;
counter_mc.visible = true;
supplies_mc.visible = true;
burger_builder_mc.visible = true;
customer_mc.visible = true;
speech_bubble_mc.init();
speech_bubble_mc.visible = true;
_menuSpotlightCueGiven = false;
scoreboard_mc.init();
dispatchEvent(new Event(SelectionGameMainView.GAME_READY));
}
override public function reIterateOrder():void{
customer_mc.order();
}
override public function set lastItemPlaced(_arg1):void{
_lastItemPlaced = _arg1.toString();
}
private function victoryResolved_ef(_arg1:Event):void{
var _local2:Object;
if (((getTimer() - _victoryWaitStartTime) / 1000) > _victoryWaitSeconds){
this.removeEventListener(Event.ENTER_FRAME, victoryResolved_ef, false);
dispatchEvent(new Event(SelectionGameMainView.VICTORY_COMPLETE));
_local2 = new Object();
_local2.activity = "plays";
_myTrackEvent.as3event("event.view", _local2);
};
}
override public function waitForSelection():void{
customer_mc.wait();
}
protected function optimize():void{
counter_mc.cacheAsBitmap = true;
background_mc.cacheAsBitmap = true;
supplies_mc.cacheAsBitmap = true;
}
private function failureComplete(_arg1:Event):void{
customer_mc.removeEventListener(Event.COMPLETE, failureComplete, false);
dispatchEvent(new Event(SelectionGameMainView.FAILURE_COMPLETE));
}
public function set roundNumber(_arg1:uint):void{
trace(("MainView - set roundNumber() - value == " + _arg1));
_currentRound = int(_arg1);
}
override public function playInstructions():void{
instructions_mc.visible = true;
instructions_mc.demo.addEventListener(Event.COMPLETE, instructionsComplete, false, 0, true);
instructions_mc.demo.gotoAndPlay(INSTRUCTIONS_START_FRAME);
}
override public function init():void{
optimize();
instructions_mc.visible = false;
customer_mc.visible = false;
background_mc.visible = false;
speech_bubble_mc.visible = false;
counter_mc.visible = false;
burger_tray_mc.visible = false;
supplies_mc.visible = false;
menu_mc.visible = false;
burger_builder_mc.visible = false;
scoreboard_mc.init();
}
override public function setupRound():void{
trace(("MainView - setupRound() - ORDER_OF_CUSTOMERS[_currentRound] == " + ORDER_OF_CUSTOMERS[_currentRound]));
menu_mc.visible = true;
menu_mc.init();
menu_mc.addEventListener(Event.COMPLETE, menuTransitionComplete, false, 0, true);
menu_mc.transitionIn();
burger_tray_mc.visible = true;
burger_tray_mc.init();
burger_builder_mc.init();
customer_mc.init(ORDER_OF_CUSTOMERS[_currentRound]);
}
private function trayExited(_arg1:Event):void{
dispatchEvent(new Event(SelectionGameMainView.END_OF_ROUND_COMPLETE));
}
override public function discontinueOrderDisplay():void{
if (speech_bubble_mc.isOpen){
speech_bubble_mc.close();
};
}
private function menuTransitionComplete(_arg1:Event):void{
menuEnabled = true;
dispatchEvent(new Event(SelectionGameMainView.ROUND_READY));
}
override public function endRound():void{
var _local1:int;
var _local2:Object;
_local1 = _currentRound;
_local1++;
_local2 = new Object();
_local2.activity = ("level " + _local1);
_myTrackEvent.as3event("event.view", _local2);
scoreboard_mc.incrementScore();
customer_mc.addEventListener(Customer.EXITED, customerExited, false, 0, true);
customer_mc.exit();
burger_tray_mc.applyBun();
menuEnabled = false;
menu_mc.transitionOut();
}
override public function displayOrder(_arg1:Array):void{
trace(("MainView - override public function displayOrder() - itemsToOrder == " + _arg1));
speech_bubble_mc.orderItems(_arg1);
if (!_menuSpotlightCueGiven){
_menuSpotlightCueGiven = true;
menu_mc.spotlightItems(_arg1.concat());
};
}
private function customerExited(_arg1:Event):void{
customer_mc.removeEventListener(Customer.EXITED, customerExited, false);
burger_tray_mc.addEventListener(BurgerTray.EXITED, trayExited, false, 0, true);
burger_tray_mc.animateOut();
}
override public function showFailure(_arg1=null):void{
customer_mc.addEventListener(Event.COMPLETE, failureComplete, false, 0, true);
customer_mc.showFailure();
}
override public function set menuEnabled(_arg1:Boolean):void{
menu_mc.active = _arg1;
}
public function instructionsComplete(_arg1:Event):void{
var _local2:Object;
instructions_mc.demo.removeEventListener(Event.COMPLETE, instructionsComplete, false);
dispatchEvent(new Event(SelectionGameMainView.INSTRUCTIONS_COMPLETE));
_local2 = new Object();
_local2.activity = "plays";
_myTrackEvent.as3event("event.view", _local2);
_mainSoundLoop = playSound("OrdersMainLoopSound", 0, int.MAX_VALUE, new SoundTransform(0.35));
}
}
}//package
Section 43
//Menu (Menu)
package {
import flash.events.*;
import selectiongame.*;
import flash.utils.*;
import flash.display.*;
public class Menu extends MovieClip {
private const OPEN_MENU:String = "open menu";
private const MENU_IS_OPEN:String = "menu_complete";
private const CLOSE_MENU:String = "out";
protected const SPOTLIGHT_DELAY_INITIAL_SECONDS:Number = 0.5;
protected const SPOTLIGHT_DELAY_ITEM_SECONDS:Number = 0.75;
public var option_4_mc:MovieClip;
protected var _nextItemSpotlightTime:uint;
private var _itemCount:uint;// = 8
public var option_5_mc:MovieClip;
public var option_7_mc:MovieClip;
protected var _itemsToSpotlight:Array;
public var option_2_mc:MovieClip;
public var option_0_mc:MovieClip;
public var option_3_mc:MovieClip;
public var option_6_mc:MovieClip;
public var option_1_mc:MovieClip;
public function Menu():void{
_itemCount = 8;
super();
addFrameScript(0, frame1, 9, frame10, 38, frame39, 47, frame48);
}
public function init():void{
var _local1:Array;
var _local2:uint;
var _local3:MenuButton;
_local1 = Item.getUniqueRandomItems(_itemCount);
_local2 = 0;
while (_local2 < _itemCount) {
_local3 = MenuButton(this[(("option_" + _local2.toString()) + "_mc")].button_mc);
_local3.item = _local1[_local2];
_local3.mouseEnabled = true;
_local3.mouseChildren = false;
_local3.addEventListener(MouseEvent.MOUSE_OVER, buttonOver, false, 0, true);
_local3.addEventListener(MouseEvent.MOUSE_OUT, buttonOut, false, 0, true);
_local3.addEventListener(MouseEvent.CLICK, buttonClick, false, 0, true);
_local2++;
};
}
public function set active(_arg1:Boolean):void{
var _local2:uint;
var _local3:MenuButton;
_local2 = 0;
while (_local2 < _itemCount) {
_local3 = MenuButton(this[(("option_" + _local2.toString()) + "_mc")].button_mc);
_local3.mouseEnabled = _arg1;
_local2++;
};
}
private function buttonOver(_arg1:Event):void{
MenuButton(_arg1.target).over();
}
protected function spotlightItems_ef(_arg1:Event):void{
var _local2:String;
var _local3:uint;
var _local4:MenuButton;
if (getTimer() > _nextItemSpotlightTime){
_local2 = _itemsToSpotlight.shift();
_local3 = 0;
while (_local3 < _itemCount) {
_local4 = MenuButton(this[(("option_" + _local3.toString()) + "_mc")].button_mc);
if (_local4.item == _local2){
_local4.spotlight();
};
_local3++;
};
if (_itemsToSpotlight.length > 0){
_nextItemSpotlightTime = (getTimer() + (SPOTLIGHT_DELAY_ITEM_SECONDS * 1000));
} else {
removeEventListener(Event.ENTER_FRAME, spotlightItems_ef, false);
};
};
}
function frame10(){
play();
}
public function transitionIn():void{
addEventListener(Event.ENTER_FRAME, transitionIn_ef, false, 0, true);
gotoAndPlay(OPEN_MENU);
}
function frame1(){
stop();
}
private function buttonClick(_arg1:Event):void{
var _local2:MenuButton;
_local2 = MenuButton(_arg1.target);
_local2.click();
_local2.mouseEnabled = false;
dispatchEvent(new SelectionEvent(_local2.item));
}
private function transitionIn_ef(_arg1:Event):void{
if (currentLabel == MENU_IS_OPEN){
removeEventListener(Event.ENTER_FRAME, transitionIn_ef, false);
dispatchEvent(new Event(Event.COMPLETE));
};
}
public function deconstruct():void{
var _local1:uint;
var _local2:MenuButton;
_local1 = 0;
while (_local1 < _itemCount) {
_local2 = MenuButton(this[(("option_" + _local1.toString()) + "_mc")].button_mc);
_local2.deconstruct();
_local2.removeEventListener(MouseEvent.MOUSE_OVER, buttonOver, false);
_local2.removeEventListener(MouseEvent.MOUSE_OUT, buttonOut, false);
_local2.removeEventListener(MouseEvent.CLICK, buttonClick, false);
_local1++;
};
removeEventListener(Event.ENTER_FRAME, transitionIn_ef, false);
removeEventListener(Event.ENTER_FRAME, spotlightItems_ef, false);
}
function frame48(){
gotoAndStop("wait");
}
function frame39(){
stop();
}
public function transitionOut():void{
gotoAndPlay(CLOSE_MENU);
}
private function buttonOut(_arg1:Event):void{
MenuButton(_arg1.target).out();
}
public function spotlightItems(_arg1:Array):void{
trace(("Menu - spotlightItems - order == " + _arg1));
_itemsToSpotlight = _arg1;
_nextItemSpotlightTime = (getTimer() + (SPOTLIGHT_DELAY_INITIAL_SECONDS * 1000));
addEventListener(Event.ENTER_FRAME, spotlightItems_ef, false, 0, true);
}
}
}//package
Section 44
//MenuButton (MenuButton)
package {
import flash.display.*;
public class MenuButton extends MovieClip {
private const OUT:String = "off";
private const SPOTLIGHT:String = "spotlight";
private const CLICK:String = "click";
private const DISABLED_ALPHA:Number = 0.5;
private const OVER:String = "over";
private var _enabled:Boolean;// = false
public var item_mc:MenuItem;
private var _item:String;
public function MenuButton():void{
_enabled = false;
super();
addFrameScript(0, frame1, 9, frame10, 19, frame20, 29, frame30, 44, frame45);
}
public function get item():String{
return (_item);
}
public function set item(_arg1:String):void{
_item = _arg1;
item_mc.item = _item;
_enabled = true;
out();
}
function frame10(){
stop();
}
public function spotlight():void{
trace("MenuButton - spotlight()");
if (_enabled){
this.gotoAndPlay(SPOTLIGHT);
};
}
public function out():void{
if (_enabled){
this.gotoAndStop(OUT);
};
this.alpha = 1;
}
function frame1(){
stop();
}
function frame20(){
stop();
}
function frame30(){
play();
}
public function click():void{
_enabled = false;
this.gotoAndStop(CLICK);
this.alpha = DISABLED_ALPHA;
}
public function deconstruct():void{
_item = null;
}
function frame45(){
gotoAndStop("off");
}
public function over():void{
if (_enabled){
this.gotoAndStop(OVER);
};
}
}
}//package
Section 45
//MenuItem (MenuItem)
package {
import flash.display.*;
public class MenuItem extends MovieClip {
public var cheese_mc:MovieClip;
public var tomato_mc:MovieClip;
public var curly_fries_mc:MovieClip;
public var chips_mc:MovieClip;
public var pickles_mc:MovieClip;
public var lettuce_mc:MovieClip;
public var fries_mc:MovieClip;
public var onion_mc:MovieClip;
public function MenuItem():void{
}
public function set item(_arg1:String):void{
tomato_mc.visible = (_arg1 == Item.TOMATO);
lettuce_mc.visible = (_arg1 == Item.LETTUCE);
onion_mc.visible = (_arg1 == Item.ONION);
pickles_mc.visible = (_arg1 == Item.PICKLES);
cheese_mc.visible = (_arg1 == Item.CHEESE);
fries_mc.visible = (_arg1 == Item.FRIES);
curly_fries_mc.visible = (_arg1 == Item.CURLY_FRIES);
chips_mc.visible = (_arg1 == Item.CHIPS);
}
}
}//package
Section 46
//OrdersCorrectChoiceSound (OrdersCorrectChoiceSound)
package {
import flash.media.*;
public dynamic class OrdersCorrectChoiceSound extends Sound {
}
}//package
Section 47
//OrdersIncorrectChoiceSound (OrdersIncorrectChoiceSound)
package {
import flash.media.*;
public dynamic class OrdersIncorrectChoiceSound extends Sound {
}
}//package
Section 48
//OrdersMainLoopSound (OrdersMainLoopSound)
package {
import flash.media.*;
public dynamic class OrdersMainLoopSound extends Sound {
}
}//package
Section 49
//OrdersScoreboardSuccessMomentSound (OrdersScoreboardSuccessMomentSound)
package {
import flash.media.*;
public dynamic class OrdersScoreboardSuccessMomentSound extends Sound {
}
}//package
Section 50
//OrdersUp (OrdersUp)
package {
import selectiongame.*;
public class OrdersUp extends SelectionGameActivity {
public function OrdersUp():void{
trace("OrdersUp()");
}
override public function handleIrisOpeningEnd():void{
_gameController.start();
}
override public function handleIrisOpeningBegin():void{
mainView = new MainView();
addChildAt(_mainView, 0);
playmatePlay("gameStart");
gameController = new GameController();
_gameController.view = _mainView;
_gameController.init();
}
public function assignAnimationCompleteHandler(_arg1:Function):void{
onAnimationComplete_fn = _arg1;
}
}
}//package
Section 51
//OrderTrayInSound (OrderTrayInSound)
package {
import flash.media.*;
public dynamic class OrderTrayInSound extends Sound {
}
}//package
Section 52
//PlaymateEvent (PlaymateEvent)
package {
import flash.events.*;
public class PlaymateEvent extends Event {
private var _instruction:String;
private var _animationCompleteCallBack:Function;
public static const PLAY:String = "playmate_play";
public function PlaymateEvent(_arg1:String, _arg2:Function=null):void{
trace("PlaymateEvent()");
instruction = _arg1;
animationCompleteCallBack = _arg2;
super(PLAY);
}
public function set animationCompleteCallBack(_arg1:Function):void{
_animationCompleteCallBack = _arg1;
}
public function get instruction():String{
return (_instruction);
}
public function set instruction(_arg1:String):void{
_instruction = _arg1;
}
override public function clone():Event{
return (new PlaymateEvent(instruction, animationCompleteCallBack));
}
public function get animationCompleteCallBack():Function{
return (_animationCompleteCallBack);
}
}
}//package
Section 53
//RoundModel (RoundModel)
package {
import selectiongame.*;
public class RoundModel extends SelectionGameRoundModel {
public function RoundModel(_arg1:uint){
trace(("RoundModel() - numberOfItems == " + _arg1));
_requiredItemsList = Item.getUniqueRandomItems(_arg1);
super(_arg1);
}
}
}//package
Section 54
//ScoreBoard (ScoreBoard)
package {
import flash.media.*;
import flash.display.*;
import utils.sound.*;
public class ScoreBoard extends MovieClip {
protected const OFF_FRAME:String = "off";
protected const MAX_SCORE:uint = 5;
protected const ON_FRAME:String = "completed";
public var customer5:MovieClip;
public var customer1:MovieClip;
public var customer2:MovieClip;
public var customer3:MovieClip;
public var customer4:MovieClip;
protected var _currentScore:uint;
public function ScoreBoard():void{
trace("ScoreBoard()");
}
public function init():void{
var _local1:uint;
_currentScore = 0;
_local1 = 0;
while (_local1 < MAX_SCORE) {
this[("customer" + (_local1 + 1).toString())].gotoAndStop(OFF_FRAME);
_local1++;
};
}
public function incrementScore():void{
_currentScore++;
playSound("OrdersScoreboardSuccessMomentSound", 0, 1, new SoundTransform(0.5, 0));
this[("customer" + _currentScore.toString())].gotoAndPlay(ON_FRAME);
}
}
}//package
Section 55
//SpeechBubble (SpeechBubble)
package {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
public class SpeechBubble extends MovieClip {
private const SECONDS_PER_ITEM:Number = 0.75;
private const CLOSE:String = "close_bubble";
private const OFF:String = "off";
public var item_1_mc:MovieClip;
private var _openStartTime:int;
public var item_4_mc:MovieClip;
private var _holdOpenSeconds:Number;// = 3
public var item_2_mc:MovieClip;
public var item_0_mc:MovieClip;
private var _isOpen:Boolean;
private var _itemList:Array;
public var item_5_mc:MovieClip;
public var item_3_mc:MovieClip;
public function SpeechBubble():void{
_holdOpenSeconds = 3;
super();
addFrameScript(0, frame1, 9, frame10, 39, frame40, 40, frame41, 88, frame89, 89, frame90, 155, frame156, 156, frame157, 227, frame228, 228, frame229, 321, frame322, 322, frame323, 330, frame331);
}
function frame157(){
play();
}
public function orderItems(_arg1:Array):void{
var _local2:uint;
trace(("SpeechBubble - orderItems() - itemList == " + _arg1));
_itemList = _arg1;
_local2 = 0;
while (_local2 < _itemList.length) {
MenuItem(this[(("item_" + _local2) + "_mc")]).item = _itemList[_local2];
_local2++;
};
_isOpen = true;
_openStartTime = (getTimer() + ((SECONDS_PER_ITEM * _arg1.length) * 1000));
addEventListener(Event.ENTER_FRAME, open_ef, false, 0, true);
gotoAndPlay((_itemList.length.toString() + "_items"));
}
public function init():void{
gotoAndStop("OFF");
_isOpen = false;
}
function frame89(){
stop();
}
function frame156(){
stop();
}
function frame322(){
stop();
}
function frame323(){
play();
}
function frame90(){
play();
}
function frame10(){
play();
}
function frame1(){
stop();
}
function frame229(){
play();
}
function frame228(){
stop();
}
function frame331(){
gotoAndStop("off");
}
public function deconstruct():void{
removeEventListener(Event.ENTER_FRAME, open_ef, false);
}
function frame40(){
stop();
}
public function get isOpen():Boolean{
return (_isOpen);
}
private function open_ef(_arg1:Event):void{
if (((getTimer() - _openStartTime) / 1000) > _holdOpenSeconds){
close();
removeEventListener(Event.ENTER_FRAME, open_ef, false);
};
}
function frame41(){
play();
}
public function close():void{
_isOpen = false;
removeEventListener(Event.ENTER_FRAME, open_ef, false);
gotoAndPlay(CLOSE);
}
}
}//package