Section 1
//Back (fl.transitions.easing.Back)
package fl.transitions.easing {
public class Back {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = ((_arg1 / _arg4) - 1);
return (((_arg3 * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 1)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / _arg4);
return (((((_arg3 * _arg1) * _arg1) * (((_arg5 + 1) * _arg1) - _arg5)) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0):Number{
if (!_arg5){
_arg5 = 1.70158;
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 < 1){
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * ((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) - _arg5))) + _arg2));
};
_arg1 = (_arg1 - 2);
_arg5 = (_arg5 * 1.525);
return ((((_arg3 / 2) * (((_arg1 * _arg1) * (((_arg5 + 1) * _arg1) + _arg5)) + 2)) + _arg2));
}
}
}//package fl.transitions.easing
Section 2
//Elastic (fl.transitions.easing.Elastic)
package fl.transitions.easing {
public class Elastic {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
return (((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) + _arg3) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / _arg4);
if (_arg1 == 1){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * 0.3);
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
--_arg1;
return ((-(((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number, _arg5:Number=0, _arg6:Number=0):Number{
var _local7:Number;
if (_arg1 == 0){
return (_arg2);
};
_arg1 = (_arg1 / (_arg4 / 2));
if (_arg1 == 2){
return ((_arg2 + _arg3));
};
if (!_arg6){
_arg6 = (_arg4 * (0.3 * 1.5));
};
if (((!(_arg5)) || ((_arg5 < Math.abs(_arg3))))){
_arg5 = _arg3;
_local7 = (_arg6 / 4);
} else {
_local7 = ((_arg6 / (2 * Math.PI)) * Math.asin((_arg3 / _arg5)));
};
if (_arg1 < 1){
--_arg1;
return (((-0.5 * ((_arg5 * Math.pow(2, (10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6)))) + _arg2));
};
--_arg1;
return ((((((_arg5 * Math.pow(2, (-10 * _arg1))) * Math.sin(((((_arg1 * _arg4) - _local7) * (2 * Math.PI)) / _arg6))) * 0.5) + _arg3) + _arg2));
}
}
}//package fl.transitions.easing
Section 3
//None (fl.transitions.easing.None)
package fl.transitions.easing {
public class None {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeInOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
public static function easeNone(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
}
}
}//package fl.transitions.easing
Section 4
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeOut(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((-(_arg3) * _arg1) * (_arg1 - 2)) + _arg2));
}
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _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) + _arg2));
};
--_arg1;
return ((((-(_arg3) / 2) * ((_arg1 * (_arg1 - 2)) - 1)) + _arg2));
}
}
}//package fl.transitions.easing
Section 5
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.display.*;
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 6
//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 7
//arrowClear_bt_27 (photoboxland_fla.arrowClear_bt_27)
package photoboxland_fla {
import flash.display.*;
public dynamic class arrowClear_bt_27 extends MovieClip {
public function arrowClear_bt_27(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package photoboxland_fla
Section 8
//arrowSelect_bt_28 (photoboxland_fla.arrowSelect_bt_28)
package photoboxland_fla {
import flash.display.*;
public dynamic class arrowSelect_bt_28 extends MovieClip {
public function arrowSelect_bt_28(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package photoboxland_fla
Section 9
//gui_mc_121 (photoboxland_fla.gui_mc_121)
package photoboxland_fla {
import flash.display.*;
import flash.text.*;
public dynamic class gui_mc_121 extends MovieClip {
public var bonusDisplayH:TextField;
public var bonusDisplayU:TextField;
public var bonusDisplayT:TextField;
public var clockMaskRight:MovieClip;
public var clockFaceLeft:MovieClip;
public var bonusDisplayTTH:TextField;
public var clockMaskLeft:MovieClip;
public var bonusDisplayTH:TextField;
public var countdownDisplay:TextField;
public var quitButton:SimpleButton;
}
}//package photoboxland_fla
Section 10
//levelButtonHolder_mc_115 (photoboxland_fla.levelButtonHolder_mc_115)
package photoboxland_fla {
import flash.display.*;
public dynamic class levelButtonHolder_mc_115 extends MovieClip {
public var level1:levelThumb;
public var level2:levelThumb;
public var level4:levelThumb;
public var level5:levelThumb;
public var level6:levelThumb;
public var level7:levelThumb;
public var level9:levelThumb;
public var level3:levelThumb;
public var level8:levelThumb;
public var level13:levelThumb;
public var level14:levelThumb;
public var level15:levelThumb;
public var level16:levelThumb;
public var level19:levelThumb;
public var level17:levelThumb;
public var level11:levelThumb;
public var level18:levelThumb;
public var level10:levelThumb;
public var level12:levelThumb;
public var level20:levelThumb;
}
}//package photoboxland_fla
Section 11
//MainTimeline (photoboxland_fla.MainTimeline)
package photoboxland_fla {
import flash.events.*;
import flash.display.*;
import fl.transitions.*;
import flash.geom.*;
import flash.net.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.media.*;
import flash.text.*;
import flash.system.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.printing.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var buttonDistToTarget:Number;
public var bonus:uint;
public var stageAssets:MovieClip;
public var musicLoopSound:musicLoop;
public var bonusSound:rollover;
public var photoGig:photoGig_mc;
public var buttonSpeed:Number;
public var marker:marker_mc;
public var highscores:highscores_mc;
public var menuTween:Tween;
public var stadiumIconPos;
public var levelTime:Array;
public var u:uint;
public var preloader:preloader_mc;
public var v:uint;
public var finished:Boolean;
public var numberOfLevels:int;
public var borderCanvas:MovieClip;
public var dummy:dummy_mc;
public var countdownStart:Number;
public var cameFromMenu:Boolean;
public var submitSuccess:Boolean;
public var backgroundImage:backgroundImage_mc;
public var numberOfNPCs:int;
public var fpsCounter:Number;
public var blurb:blurb_mc;
public var bonusCounter:uint;
public var fps:Number;
public var cameraSound:camera;
public var hsLoader:URLLoader;
public var windowFrameTween:Tween;
public var preventArrow:Boolean;
public var photoIcecream:photoIcecream_mc;
public var square:square_mc;
public var confirmQuit:confirmQuit_mc;
public var levelUp:levelUp_mc;
public var highestLevel:uint;
public var levelTween:Tween;
public var fadeTween:Tween;
public var partyIconPos;
public var levelContainer:levelContainer_mc;
public var menu:menu_mc;
public var selectorMouseIsOut:Boolean;
public var photoStadium:photoStadium_mc;
public var gameRunning:Boolean;
public var destinationBlue:Array;
public var currentLevel:uint;
public var lastButtonPressed:String;
public var musicVolume:SoundTransform;
public var levelSelect:levelSelect_mc;
public var instructions:instructions_mc;
public var destinationRed:Array;
public var fpsElapsedTime:Number;
public var showLevelSelectTween:Tween;
public var gridX:uint;
public var gridY:uint;
public var cameFromLevelUp:Boolean;
public var npcSpeed:int;
public var mouseIsDown:Boolean;
public var adjusting:Boolean;
public var motherCanvas:MovieClip;
public var alwaysUnlocked:int;
public var hsname:String;
public var fractionRemaining:Number;
public var soundIcon:soundIcon_mc;
public var destinationYellow:Array;
public var buttonAmount:Number;
public var levelButtonStart:Number;
public var bubblePos:Array;
public var swearList:Array;
public var icecreamIconPos;
public var backToMenu:Boolean;
public var photoAng:Array;
public var debug:debug_mc;
public var countdownRunning:Boolean;
public var startTime:Number;
public var objectArray:Array;
public var themeparkIconPos;
public var tween:Tween;
public var score:int;
public var selectorMouseIsUp:Boolean;
public var destinationPink:Array;
public var destinationTurquoise:Array;
public var scoresArray:Array;
public var lidCanvas:MovieClip;
public var photoWedding:photoWedding_mc;
public var npcStartSpeed:int;
public var gameBackground:gameBackground_mc;
public var photoPos:Array;
public var hotspot:hotspot_bt;
public var blankScreen:blankScreen_mc;
public var arrowLeftDownFlag:Boolean;
public var gameEndSound:gameEnd;
public var arrowPlacedSound:arrowPlaced;
public var sceneryCanvas:MovieClip;
public var countdownSeconds:Number;
public var targetReachedSound:targetReached;
public var musicChannel:SoundChannel;
public var photoThemepark:photoThemepark_mc;
public var weddingIconPos;
public var startMusicAtBeginning:Boolean;
public var globalSound:SoundTransform;
public var gameWon:Boolean;
public var selectorClicked:Boolean;
public var clickCounter:uint;
public var windowFrame:windowFrame_mc;
public var fpsNewTime:Number;
public var fpsStartTime:Number;
public var gameBackgroundTween:Tween;
public var tempCounter:int;
public var destinationGreen:Array;
public var npcCanvas:MovieClip;
public var gigIconPos;
public var windowFrameAdded:Boolean;
public var levelBlurb:Array;
public var instructionsTween:Tween;
public var photoParty:photoParty_mc;
public var selector:selector_mc;
public var arrowRightDownFlag:Boolean;
public var highscoresTween:Tween;
public var gameCanvas:MovieClip;
public var gameOverScreen:gameOverScreen_mc;
public var countdownNewStart:Number;
public var npcArray:Array;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2, 2, frame3);
}
public function soundIconOut(_arg1:MouseEvent):void{
soundIcon.gotoAndStop(1);
}
public function loader(_arg1:Event){
var _local2:*;
var _local3:*;
var _local4:*;
_local2 = stage.loaderInfo.bytesTotal;
_local3 = stage.loaderInfo.bytesLoaded;
_local4 = Math.round(((_local3 * 100) / _local2));
preloader.loadingBar.width = (4 * _local4);
preloader.loadingText.text = (String(_local4) + "%");
if ((((_local3 >= _local2)) && ((finished == false)))){
preloader.loadingText.text = "100%";
setTimeout(endPreload, 2000);
finished = true;
};
}
public function submit(_arg1:String, _arg2:Number):URLLoader{
var _local3:URLVariables;
var _local4:URLRequest;
var _local5:URLLoader;
_local3 = new URLVariables();
_local3.hsname = hsname;
_local3.score = String(_arg2);
_local4 = new URLRequest("http://www.photoboxland.co.uk/photobox_insert_score.php");
_local4.data = _local3;
_local4.method = URLRequestMethod.POST;
_local5 = new URLLoader();
_local5.dataFormat = URLLoaderDataFormat.TEXT;
_local5.load(_local4);
return (_local5);
}
public function removeLevelUp(_arg1:MouseEvent):void{
levelUp.continueButton.removeEventListener(MouseEvent.MOUSE_UP, removeLevelUp);
gameBackground.viewport.removeChild(levelUp);
currentLevel++;
if (currentLevel > highestLevel){
highestLevel = currentLevel;
};
writeCookie(highestLevel);
if (currentLevel > numberOfLevels){
gameWon = true;
currentLevel = numberOfLevels;
highestLevel = currentLevel;
gameOver();
} else {
motherCanvas.removeChild(gameBackground);
if (windowFrameAdded == true){
motherCanvas.removeChild(windowFrame);
windowFrameAdded = false;
};
cameFromLevelUp = true;
showBlurb();
};
}
public function showWindowFrame(_arg1:TweenEvent):void{
gameBackgroundTween.removeEventListener(TweenEvent.MOTION_FINISH, showWindowFrame);
windowFrame = new windowFrame_mc();
motherCanvas.addChild(windowFrame);
windowFrame.mouseEnabled = false;
windowFrameAdded = true;
}
public function objectCollisions():void{
var _local1:String;
var _local2:Number;
var _local3:Number;
var _local4:MovieClip;
_local2 = 0;
_local3 = npcArray.length;
_local2 = 0;
while (_local2 < _local3) {
_local4 = npcArray[_local2];
gridY = 0;
while (gridY <= 15) {
gridX = 0;
while (gridX <= 15) {
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "wall"){
if (_local4.hitTestObject(objectArray[gridX][gridY].hitZone) == true){
if (_local4.dir == "down"){
_local4.y = (_local4.y - 2);
_local1 = "left";
};
if (_local4.dir == "left"){
_local4.x = (_local4.x + 2);
_local1 = "up";
};
if (_local4.dir == "up"){
_local4.y = (_local4.y + 2);
_local1 = "right";
};
if (_local4.dir == "right"){
_local4.x = (_local4.x - 2);
_local1 = "down";
};
_local4.dir = _local1;
_local4.gotoAndPlay(_local4.dir);
};
};
if (_local4.visible == true){
if (objectArray[gridX][gridY].id == "homeZone"){
if (_local4.hitTestObject(objectArray[gridX][gridY]) == true){
if (objectArray[gridX][gridY].variety == _local4.destination){
_local4.visible = false;
targetReachedSound.play();
numberOfNPCs--;
bonus = (bonus + 100);
};
if (objectArray[gridX][gridY].variety != _local4.destination){
if (_local4.dir == "up"){
_local4.y = (_local4.y + 2);
_local4.dir = "down";
_local4.gotoAndPlay("down");
};
};
};
};
};
};
gridX++;
};
gridY++;
};
_local2++;
};
}
public function placeArrowClear(_arg1:MouseEvent):void{
arrowPlacedSound.play();
gridX = int((selector.x / 24));
gridY = int((selector.y / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "arrow"){
gameCanvas.removeChild(objectArray[gridX][gridY]);
objectArray[gridX][gridY] = 0;
};
};
restoreSelector();
}
public function removeInstructions(_arg1:TweenEvent):void{
instructionsTween.removeEventListener(TweenEvent.MOTION_FINISH, removeInstructions);
motherCanvas.removeChild(instructions);
}
public function removePreloader(_arg1:TweenEvent):void{
tween.removeEventListener(TweenEvent.MOTION_FINISH, removePreloader);
stage.removeChild(preloader);
}
public function fillLevelArrays():void{
levelBlurb[1] = "It's party time! Place arrows to get everyone to the party!";
levelBlurb[2] = "Can anyone remember the way to the ice cream store?";
levelBlurb[3] = "The bells are ringing! Get everyone to the wedding on time.";
levelBlurb[4] = "Come on you Reds! Find the way to the footy match.";
levelBlurb[5] = "Round everyone up for the rock concert!";
levelBlurb[6] = "Two places to get to this time!";
levelBlurb[7] = "Get everyone to the theme park early to avoid the queues!";
levelBlurb[8] = "Blue guys to the footy match, red guys to the gig!";
levelBlurb[9] = "Three different places this time!";
levelBlurb[10] = "Now things are getting tricky!";
levelBlurb[11] = "The ice creams here are a-MAZE-ing!";
levelBlurb[12] = "There's a party somewhere around here!";
levelBlurb[13] = "Nice day for a long walk! Tip: Keep the yellow and blue people separated from the start.";
levelBlurb[14] = "Four places to get to now!";
levelBlurb[15] = "Follow, follow, follow, follow ... Follow the wiggly road!";
levelBlurb[16] = "Help get these guys on the right path!";
levelBlurb[17] = "This is getting tricky! Five places this time!";
levelBlurb[18] = "Quick - there's not much time before the concert starts!";
levelBlurb[19] = "Decision time ... To the wedding, or to the football? That is the question!";
levelBlurb[20] = "You're rather good at this game! Last level - can you get everyone to these six places? Good luck!";
levelTime[1] = 30;
levelTime[2] = 25;
levelTime[3] = 30;
levelTime[4] = 25;
levelTime[5] = 25;
levelTime[6] = 40;
levelTime[7] = 25;
levelTime[8] = 35;
levelTime[9] = 50;
levelTime[10] = 35;
levelTime[11] = 40;
levelTime[12] = 45;
levelTime[13] = 50;
levelTime[14] = 70;
levelTime[15] = 95;
levelTime[16] = 35;
levelTime[17] = 75;
levelTime[18] = 25;
levelTime[19] = 20;
levelTime[20] = 60;
destinationGreen[1] = "partyHouse";
destinationYellow[2] = "icecreamShop";
destinationPink[3] = "wedding";
destinationRed[4] = "stadium";
destinationBlue[5] = "gig";
destinationYellow[6] = "partyHouse";
destinationTurquoise[6] = "icecreamShop";
destinationBlue[7] = "themepark";
destinationBlue[8] = "stadium";
destinationRed[8] = "gig";
destinationBlue[9] = "wedding";
destinationGreen[9] = "themepark";
destinationPink[9] = "icecreamShop";
destinationRed[10] = "wedding";
destinationTurquoise[10] = "gig";
destinationYellow[10] = "stadium";
destinationTurquoise[11] = "icecreamShop";
destinationRed[12] = "partyHouse";
destinationBlue[13] = "themepark";
destinationYellow[13] = "wedding";
destinationBlue[14] = "gig";
destinationRed[14] = "stadium";
destinationTurquoise[14] = "themepark";
destinationYellow[14] = "wedding";
destinationYellow[15] = "partyHouse";
destinationPink[15] = "icecreamShop";
destinationTurquoise[16] = "partyHouse";
destinationYellow[16] = "gig";
destinationPink[16] = "icecreamShop";
destinationBlue[17] = "gig";
destinationRed[17] = "partyHouse";
destinationGreen[17] = "icecreamShop";
destinationPink[17] = "wedding";
destinationYellow[17] = "themepark";
destinationYellow[18] = "gig";
destinationGreen[19] = "wedding";
destinationPink[19] = "stadium";
destinationBlue[20] = "gig";
destinationRed[20] = "partyHouse";
destinationGreen[20] = "icecreamShop";
destinationPink[20] = "wedding";
destinationYellow[20] = "themepark";
destinationTurquoise[20] = "stadium";
}
function frame1(){
stop();
MochiBot.track(this, "bb1c8363");
finished = false;
preloader = new preloader_mc();
stage.addChild(preloader);
stage.addEventListener(Event.ENTER_FRAME, loader);
}
function frame2(){
stageAssets.visible = false;
}
function frame3(){
stop();
alwaysUnlocked = 3;
numberOfLevels = 20;
currentLevel = 1;
highestLevel = currentLevel;
npcStartSpeed = 2;
npcSpeed = npcStartSpeed;
startTime = 0;
countdownStart = 0;
countdownNewStart = 0;
countdownSeconds = 0;
score = 0;
gridX = 0;
gridY = 0;
u = 0;
v = 0;
numberOfNPCs = 0;
clickCounter = 0;
levelButtonStart = 0;
fractionRemaining = 0;
bonusCounter = 0;
lastButtonPressed = "none";
buttonSpeed = 0;
buttonAmount = 0;
buttonDistToTarget = 0;
fps = 0;
fpsStartTime = 0;
fpsNewTime = 0;
fpsElapsedTime = 0;
fpsCounter = 0;
startMusicAtBeginning = false;
countdownRunning = false;
gameRunning = false;
gameWon = false;
submitSuccess = false;
mouseIsDown = false;
preventArrow = false;
cameFromMenu = false;
backToMenu = false;
cameFromLevelUp = false;
selectorClicked = false;
selectorMouseIsUp = false;
selectorMouseIsOut = false;
windowFrameAdded = true;
arrowLeftDownFlag = false;
arrowRightDownFlag = false;
adjusting = false;
levelBlurb = new Array();
levelTime = new Array();
scoresArray = new Array();
objectArray = new Array();
npcArray = new Array();
destinationBlue = new Array();
destinationGreen = new Array();
destinationRed = new Array();
destinationPink = new Array();
destinationTurquoise = new Array();
destinationYellow = new Array();
swearList = new Array("FUK", "FUC", "COK", "C0K", "KOK", "K0K", "DIK", "D1K", "DIC", "D1C", "DYK", "JEW", "J3W", "WOG", "W0G", "YID", "Y1D", "CNT", "TIT", "T1T", "GAY", "G4Y", "DYK", "POO", "P00", "MUF", "CUM", "BUM", "ASS", "FAG", "HOE", "PIS", "P1S", "SOD", "S0D", "BNP", "NIG", "N1G", "NOG", "N0G", "NIP", "N1P", "JAP", "NOB", "N0B");
gridX = 0;
while (gridX <= 15) {
objectArray[gridX] = new Array();
gridX++;
};
photoPos = new Array();
photoPos[1] = new Point(180, 180);
photoPos[2] = new Point(292, 222);
photoPos[3] = new Point(96, 96);
photoPos[4] = new Point(265, 96);
photoPos[5] = new Point(70, 216);
photoPos[6] = new Point(177, 295);
photoAng = new Array();
photoAng[1] = 15;
photoAng[2] = -15;
photoAng[3] = 15;
photoAng[4] = -15;
photoAng[5] = 15;
photoAng[6] = -15;
bubblePos = new Array();
bubblePos[1] = new Point(10, 176);
bubblePos[2] = new Point(57, 176);
bubblePos[3] = new Point(10, 232);
bubblePos[4] = new Point(57, 232);
bubblePos[5] = new Point(10, 288);
bubblePos[6] = new Point(57, 288);
weddingIconPos = new Point(14, 4);
partyIconPos = new Point(18, 1);
themeparkIconPos = new Point(16, 1);
gigIconPos = new Point(20, 6);
stadiumIconPos = new Point(19, 6);
icecreamIconPos = new Point(13, 3);
bonusSound = new rollover();
arrowPlacedSound = new arrowPlaced();
cameraSound = new camera();
gameEndSound = new gameEnd();
musicLoopSound = new musicLoop();
targetReachedSound = new targetReached();
musicChannel = new SoundChannel();
musicVolume = new SoundTransform(0.65, 0);
globalSound = SoundMixer.soundTransform;
initialise();
}
public function adjustingComplete(_arg1:TweenEvent):void{
adjusting = false;
}
public function gotoLevel1(_arg1:MouseEvent):void{
currentLevel = 1;
levelSelect.levelButtonHolder.level1.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel1);
slideLevelSelect();
}
public function gotoLevel4(_arg1:MouseEvent):void{
currentLevel = 4;
levelSelect.levelButtonHolder.level4.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel4);
slideLevelSelect();
}
public function gotoLevel8(_arg1:MouseEvent):void{
currentLevel = 8;
levelSelect.levelButtonHolder.level8.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel8);
slideLevelSelect();
}
public function gotoLevel5(_arg1:MouseEvent):void{
currentLevel = 5;
levelSelect.levelButtonHolder.level5.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel5);
slideLevelSelect();
}
public function gotoLevel6(_arg1:MouseEvent):void{
currentLevel = 6;
levelSelect.levelButtonHolder.level6.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel6);
slideLevelSelect();
}
public function gotoLevel9(_arg1:MouseEvent):void{
currentLevel = 9;
levelSelect.levelButtonHolder.level9.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel9);
slideLevelSelect();
}
public function gotoLevel2(_arg1:MouseEvent):void{
currentLevel = 2;
levelSelect.levelButtonHolder.level2.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel2);
slideLevelSelect();
}
public function arrowCollisions(){
var _local1:Number;
var _local2:Number;
var _local3:Number;
var _local4:Number;
var _local5:MovieClip;
var _local6:Number;
var _local7:Number;
var _local8:Number;
var _local9:Boolean;
var _local10:*;
var _local11:*;
_local3 = 0;
_local4 = npcArray.length;
_local3 = 0;
while (_local3 < _local4) {
_local5 = npcArray[_local3];
if (_local5.visible == true){
if (_local5.dir == "down"){
_local1 = _local5.x;
_local2 = _local5.y;
} else {
if (_local5.dir == "right"){
_local1 = _local5.x;
_local2 = _local5.y;
} else {
if (_local5.dir == "up"){
_local1 = _local5.x;
_local2 = (_local5.y + 24);
} else {
if (_local5.dir == "left"){
_local1 = (_local5.x + 24);
_local2 = _local5.y;
};
};
};
};
_local6 = Math.floor((_local1 / 24));
_local7 = Math.floor((_local2 / 24));
if ((((((((_local7 <= 0)) || ((_local6 <= 0)))) || ((_local6 >= (15 - 1))))) || ((_local7 >= (15 - 1))))){
_local9 = true;
} else {
_local9 = false;
};
_local10 = _local6;
_local11 = _local7;
if (objectArray[_local10][_local11] != 0){
if (objectArray[_local10][_local11].id == "arrow"){
if (objectArray[_local10][_local11].dir == "up"){
if (_local5.dir != "up"){
_local5.x = (_local10 * 24);
_local5.y = (_local11 * 24);
_local5.dir = "up";
_local5.gotoAndPlay("up");
};
} else {
if (objectArray[_local10][_local11].dir == "down"){
if (_local5.dir != "down"){
_local5.x = (_local10 * 24);
_local5.y = (_local11 * 24);
_local5.dir = "down";
_local5.gotoAndPlay("down");
};
} else {
if (objectArray[_local10][_local11].dir == "left"){
if (_local5.dir != "left"){
_local5.x = (_local10 * 24);
_local5.y = (_local11 * 24);
_local5.dir = "left";
_local5.gotoAndPlay("left");
};
} else {
if (objectArray[_local10][_local11].dir == "right"){
if (_local5.dir != "right"){
_local5.x = (_local10 * 24);
_local5.y = (_local11 * 24);
_local5.dir = "right";
_local5.gotoAndPlay("right");
};
};
};
};
};
};
};
};
_local3++;
};
}
public function gotoLevel7(_arg1:MouseEvent):void{
currentLevel = 7;
levelSelect.levelButtonHolder.level7.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel7);
slideLevelSelect();
}
public function swearFilter(_arg1:String):Boolean{
var _local2:Boolean;
var _local3:int;
_local2 = false;
_local3 = 0;
while (_local3 < swearList.length) {
if (_arg1.toUpperCase() == swearList[_local3].toUpperCase()){
_local2 = true;
};
_local3++;
};
return (_local2);
}
public function arrowLeftDown(_arg1:MouseEvent):void{
arrowLeftDownFlag = true;
lastButtonPressed = "left";
}
public function submitCompleteHandler(_arg1:Event):void{
submitSuccess = true;
gameOverScreen.message3.text = "Score submitted!";
hsLoader.removeEventListener(Event.COMPLETE, submitCompleteHandler);
}
public function gotoLevel3(_arg1:MouseEvent):void{
currentLevel = 3;
levelSelect.levelButtonHolder.level3.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel3);
slideLevelSelect();
}
public function endPreload():void{
stage.removeEventListener(Event.ENTER_FRAME, loader);
gotoAndPlay(2);
}
public function restoreSelector():void{
selector.arrowUp.removeEventListener(MouseEvent.MOUSE_UP, placeArrowUp);
selector.arrowDown.removeEventListener(MouseEvent.MOUSE_UP, placeArrowDown);
selector.arrowLeft.removeEventListener(MouseEvent.MOUSE_UP, placeArrowLeft);
selector.arrowRight.removeEventListener(MouseEvent.MOUSE_UP, placeArrowRight);
selector.arrowClear.removeEventListener(MouseEvent.MOUSE_UP, placeArrowClear);
selector.arrowUp.removeEventListener(MouseEvent.MOUSE_OUT, restoreArrowUp);
selector.arrowUp.removeEventListener(MouseEvent.MOUSE_OVER, highlightArrowUp);
selector.arrowDown.removeEventListener(MouseEvent.MOUSE_OUT, restoreArrowDown);
selector.arrowDown.removeEventListener(MouseEvent.MOUSE_OVER, highlightArrowDown);
selector.arrowLeft.removeEventListener(MouseEvent.MOUSE_OUT, restoreArrowLeft);
selector.arrowLeft.removeEventListener(MouseEvent.MOUSE_OVER, highlightArrowLeft);
selector.arrowRight.removeEventListener(MouseEvent.MOUSE_OUT, restoreArrowRight);
selector.arrowRight.removeEventListener(MouseEvent.MOUSE_OVER, highlightArrowRight);
selector.arrowClear.removeEventListener(MouseEvent.MOUSE_OUT, restoreArrowClear);
selector.arrowClear.removeEventListener(MouseEvent.MOUSE_OVER, highlightArrowClear);
selectorClicked = false;
selector.alpha = 0.5;
selector.hotspot.mouseEnabled = true;
clickCounter = 0;
}
public function checkLevelComplete():void{
if (numberOfNPCs <= 0){
countdownRunning = false;
gameRunning = false;
showLevelUp();
};
}
public function slideButtonsLeft(_arg1:Event):void{
if (arrowRightDownFlag == true){
if (levelSelect.levelButtonHolder.x > (levelButtonStart - (levelSelect.levelButtonHolder.width - 350))){
levelSelect.levelButtonHolder.x = (levelSelect.levelButtonHolder.x - 8);
};
};
}
public function slideLevelSelectOnClick(_arg1:MouseEvent):void{
backToMenu = true;
slideLevelSelect();
}
public function initialiseMenu():void{
menu = new menu_mc();
motherCanvas.addChild(menu);
menuTween = new Tween(menu, "x", Back.easeOut, -(menu.width), 0, 1, true);
menuTween.addEventListener(TweenEvent.MOTION_FINISH, activateMenu);
}
public function iconInstructions(_arg1:MouseEvent):void{
menu.iconGuy.y = ((menu.instructionsButton.y + (menu.instructionsButton.height / 2)) - (menu.iconGuy.height / 2));
}
public function restoreArrowRight(_arg1:MouseEvent):void{
selector.arrowRight.gotoAndStop(1);
}
public function restoreArrowLeft(_arg1:MouseEvent):void{
selector.arrowLeft.gotoAndStop(1);
}
public function displayFPS():void{
var _local1:Date;
_local1 = new Date();
fpsNewTime = _local1.getTime();
fpsElapsedTime = (fpsNewTime - fpsStartTime);
fpsCounter++;
if (fpsCounter == 99){
fpsCounter = 0;
fps = int((100 / (fpsElapsedTime / 1000)));
fpsStartTime = fpsNewTime;
};
debug.txt.text = ("desired fps: " + String(stage.frameRate));
debug.txt.appendText(("\nactual fps: " + String(fps)));
}
public function makePathT2(_arg1:Number, _arg2:Number):void{
var _local3:pathT2_template;
_local3 = new pathT2_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function slideHighscores(_arg1:MouseEvent):void{
highscores.menuButton.removeEventListener(MouseEvent.MOUSE_DOWN, removeHighscores);
highscoresTween = new Tween(highscores, "x", Back.easeOut, 0, highscores.width, 1, true);
highscoresTween.addEventListener(TweenEvent.MOTION_FINISH, removeHighscores);
initialiseMenu();
}
public function makeWall(_arg1:Number, _arg2:Number):void{
var _local3:wall_mc;
_local3 = new wall_mc();
gridX = Math.round((_arg1 / 24));
gridY = Math.round((_arg2 / 24));
objectArray[gridX][gridY] = _local3;
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
objectArray[gridX][gridY].id = "wall";
gameCanvas.addChild(objectArray[gridX][gridY]);
}
public function submitHighscore(_arg1:MouseEvent):void{
gameOverScreen.submitButton.removeEventListener(MouseEvent.MOUSE_DOWN, submitHighscore);
gameOverScreen.message3.text = "Connecting: Please wait ...";
hsname = gameOverScreen.playerName.text;
hsLoader = submit(hsname, score);
hsLoader.addEventListener(Event.COMPLETE, submitCompleteHandler);
setTimeout(submitFail, 15000);
}
public function removeClips(_arg1:TweenEvent):void{
fadeTween.removeEventListener(TweenEvent.MOTION_FINISH, removeClips);
gameBackground.viewport.removeChild(blankScreen);
}
public function activateMenu(_arg1:TweenEvent):void{
menu.playButton.addEventListener(MouseEvent.MOUSE_DOWN, showLevelSelect);
menu.instructionsButton.addEventListener(MouseEvent.MOUSE_DOWN, showInstructions);
menu.highscoresButton.addEventListener(MouseEvent.MOUSE_DOWN, showHighscoresOnClick);
menu.playButton.addEventListener(MouseEvent.MOUSE_OVER, iconPlay);
menu.instructionsButton.addEventListener(MouseEvent.MOUSE_OVER, iconInstructions);
menu.highscoresButton.addEventListener(MouseEvent.MOUSE_OVER, iconHighscores);
}
public function showPhotoStadium(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoStadium = new photoStadium_mc();
blankScreen.addChild(photoStadium);
photoStadium.x = _arg1.x;
photoStadium.y = _arg1.y;
_local3 = new Tween(photoStadium, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoStadium, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoStadium, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoStadium.filters = [_local6];
}
public function adjustButtons(_arg1:Event):void{
if ((((((arrowRightDownFlag == false)) && ((arrowLeftDownFlag == false)))) && (!((lastButtonPressed == "none"))))){
adjusting = true;
levelSelect.levelButtonHolder.x = (levelSelect.levelButtonHolder.x + buttonSpeed);
if (lastButtonPressed == "left"){
buttonDistToTarget = ((Math.floor(((levelSelect.levelButtonHolder.x + 75) / 75)) * 75) - levelSelect.levelButtonHolder.x);
};
if (lastButtonPressed == "right"){
buttonDistToTarget = ((Math.ceil(((levelSelect.levelButtonHolder.x - 75) / 75)) * 75) - levelSelect.levelButtonHolder.x);
};
if (lastButtonPressed == "left"){
buttonSpeed = (1 + ((7 * buttonDistToTarget) / 75));
};
if (lastButtonPressed == "right"){
buttonSpeed = (-1 + ((7 * buttonDistToTarget) / 75));
};
if (Math.abs(buttonDistToTarget) < 3){
levelSelect.levelButtonHolder.x = (Math.round((levelSelect.levelButtonHolder.x / 75)) * 75);
lastButtonPressed = "none";
adjusting = false;
};
if (levelSelect.levelButtonHolder.x < (levelButtonStart - (levelSelect.levelButtonHolder.width - 350))){
levelSelect.levelButtonHolder.x = (levelButtonStart - (levelSelect.levelButtonHolder.width - 350));
};
if (levelSelect.levelButtonHolder.x > levelButtonStart){
levelSelect.levelButtonHolder.x = levelButtonStart;
};
};
}
public function mouseUpHandler(_arg1:MouseEvent):void{
mouseIsDown = false;
}
public function makeTarget(_arg1:Number, _arg2:Number, _arg3:String):void{
var _local4:MovieClip;
var _local5:MovieClip;
var _local6:int;
var _local7:int;
var _local8:int;
var _local9:int;
var _local10:uint;
var _local11:MovieClip;
var _local12:DropShadowFilter;
var _local13:*;
var _local14:DisplayObject;
gridX = Math.round((_arg1 / 24));
gridY = Math.round((_arg2 / 24));
if (_arg3 == "partyHouse"){
_local4 = new partyHouse_mc();
_local5 = new partyHouseLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
if (_arg3 == "icecreamShop"){
_local4 = new icecreamShop_mc();
_local5 = new icecreamShopLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
if (_arg3 == "gig"){
_local4 = new gig_mc();
_local5 = new gigLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
if (_arg3 == "stadium"){
_local4 = new stadium_mc();
_local5 = new stadiumLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
if (_arg3 == "themepark"){
_local4 = new themepark_mc();
_local5 = new themeparkLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
if (_arg3 == "wedding"){
_local4 = new wedding_mc();
_local5 = new weddingLid_mc();
_local5.x = (gridX * 24);
_local5.y = (gridY * 24);
lidCanvas.addChild(_local5);
};
_local4.x = (gridX * 24);
_local4.y = (gridY * 24);
_local6 = Math.ceil((_local4.width / 24));
_local7 = Math.ceil((_local4.height / 24));
u = 0;
while (u < _local6) {
v = 0;
while (v < _local7) {
dummy = new dummy_mc();
objectArray[(gridX + u)][(gridY + v)] = dummy;
objectArray[(gridX + u)][(gridY + v)].id = "wall";
_local13 = 0;
while (_local13 < _local4.numChildren) {
_local14 = _local4.getChildAt(_local13);
_local8 = (Math.round((_local14.x / 24)) + gridX);
_local9 = (Math.round((_local14.y / 24)) + gridY);
if (((((gridX + u) == _local8)) && (((gridY + v) == _local9)))){
if ((_local14 is homeZone_mc)){
objectArray[(gridX + u)][(gridY + v)].id = "homeZone";
objectArray[(gridX + u)][(gridY + v)].variety = _arg3;
};
if ((_local14 is path_mc)){
objectArray[(gridX + u)][(gridY + v)].id = "entrance";
};
};
_local13++;
};
objectArray[(gridX + u)][(gridY + v)].alpha = 0.01;
objectArray[(gridX + u)][(gridY + v)].x = ((gridX + u) * 24);
objectArray[(gridX + u)][(gridY + v)].y = ((gridY + v) * 24);
gameCanvas.addChild(objectArray[(gridX + u)][(gridY + v)]);
v++;
};
u++;
};
if (destinationRed[currentLevel] == _arg3){
_local10 = 0xFF0000;
};
if (destinationGreen[currentLevel] == _arg3){
_local10 = 0xFF00;
};
if (destinationBlue[currentLevel] == _arg3){
_local10 = 0xFF;
};
if (destinationPink[currentLevel] == _arg3){
_local10 = 0xFF00FF;
};
if (destinationTurquoise[currentLevel] == _arg3){
_local10 = 0xFFFF;
};
if (destinationYellow[currentLevel] == _arg3){
_local10 = 0xFFFF00;
};
_local11 = new MovieClip();
_local11.graphics.beginFill(_local10);
_local11.graphics.drawRoundRect(0, 0, (_local4.width + 10), (_local4.height + 5), 10);
_local11.graphics.endFill();
_local11.x = (_local4.x - 5);
_local11.y = (_local4.y - 5);
borderCanvas.addChild(_local11);
_local12 = new DropShadowFilter();
_local12.distance = 0;
_local12.angle = 0;
_local12.strength = 0.4;
_local12.blurX = 8;
_local12.blurY = 8;
_local11.filters = [_local12];
_local11.alpha = 0.4;
gameCanvas.addChild(_local4);
}
public function moveNPCs():void{
var _local1:Number;
var _local2:int;
var _local3:MovieClip;
_local1 = npcArray.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = npcArray[_local2];
if ((((_local3.y > (360 - 24))) && ((_local3.dir == "down")))){
_local3.dir = "left";
_local3.gotoAndPlay("left");
_local3.y = (360 - 24);
};
if ((((_local3.y < 0)) && ((_local3.dir == "up")))){
_local3.y = 0;
_local3.gotoAndPlay("right");
_local3.dir = "right";
};
if ((((_local3.x < 0)) && ((_local3.dir == "left")))){
_local3.x = 0;
_local3.gotoAndPlay("up");
_local3.dir = "up";
};
if ((((_local3.x > (360 - 24))) && ((_local3.dir == "right")))){
_local3.dir = "down";
_local3.gotoAndPlay("down");
_local3.x = (360 - 24);
};
_local3.lastx = _local3.x;
_local3.lasty = _local3.y;
if (_local3.dir == "down"){
_local3.y = (_local3.y + npcSpeed);
} else {
if (_local3.dir == "right"){
_local3.x = (_local3.x + npcSpeed);
} else {
if (_local3.dir == "up"){
_local3.y = (_local3.y - npcSpeed);
} else {
if (_local3.dir == "left"){
_local3.x = (_local3.x - npcSpeed);
};
};
};
};
_local2++;
};
}
public function restoreArrowClear(_arg1:MouseEvent):void{
selector.arrowClear.gotoAndStop(1);
}
public function highlightArrowUp(_arg1:MouseEvent):void{
selector.arrowUp.gotoAndStop(2);
}
public function showPhotoIcecream(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoIcecream = new photoIcecream_mc();
blankScreen.addChild(photoIcecream);
photoIcecream.x = _arg1.x;
photoIcecream.y = _arg1.y;
_local3 = new Tween(photoIcecream, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoIcecream, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoIcecream, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoIcecream.filters = [_local6];
}
public function zSort(_arg1:MovieClip){
var _local2:Array;
var _local3:Number;
var _local4:uint;
var _local5:Number;
var _local6:int;
_local2 = new Array();
_local3 = _arg1.numChildren;
_local4 = 0;
while (_local4 < _local3) {
_local2[_local4] = _arg1.getChildAt(_local4);
_local4++;
};
_local5 = 0;
_local2.sortOn("y", Array.NUMERIC);
_local6 = _local2.length;
while (_local6--) {
if (_arg1.getChildAt(_local6) != _local2[_local6]){
_arg1.setChildIndex(_local2[_local6], _local6);
};
};
}
public function addBonuses(_arg1:Event):void{
var _local2:int;
bonusCounter++;
_local2 = (10 - (countdownSeconds / 2));
if (_local2 < 4){
_local2 = 4;
};
if (bonusCounter >= _local2){
bonusCounter = 0;
};
if ((((countdownSeconds > 0)) && ((bonusCounter == 0)))){
bonusSound.play();
countdownSeconds = (countdownSeconds - 1);
fractionRemaining = (fractionRemaining - (1 / levelTime[currentLevel]));
bonus = (bonus + 100);
updateClockDisplays();
updateBonusDisplay();
};
if (countdownSeconds <= 0){
bonusCounter = 0;
gameBackground.gui.clockMaskRight.rotation = 360;
motherCanvas.removeEventListener(Event.ENTER_FRAME, addBonuses);
showTotal();
};
}
public function showInstructions(_arg1:MouseEvent):void{
menu.instructionsButton.removeEventListener(MouseEvent.MOUSE_DOWN, showInstructions);
menuTween = new Tween(menu, "x", Back.easeOut, 0, menu.width, 1, true);
instructions = new instructions_mc();
motherCanvas.addChild(instructions);
instructionsTween = new Tween(instructions, "x", Back.easeOut, -(instructions.width), 0, 1, true);
instructionsTween.addEventListener(TweenEvent.MOTION_FINISH, activateInstructions);
}
public function slideGame():void{
if (windowFrameAdded == true){
motherCanvas.removeChild(windowFrame);
windowFrameAdded = false;
};
gameBackgroundTween = new Tween(gameBackground, "x", Back.easeOut, 0, gameBackground.width, 1, true);
gameBackgroundTween.addEventListener(TweenEvent.MOTION_FINISH, removeGame);
}
public function highlightArrowLeft(_arg1:MouseEvent):void{
selector.arrowLeft.gotoAndStop(2);
}
public function restoreArrowDown(_arg1:MouseEvent):void{
selector.arrowDown.gotoAndStop(1);
}
public function selectorMouseOut(_arg1:MouseEvent):void{
selectorMouseIsOut = true;
}
public function placeArrowUp(_arg1:MouseEvent):void{
var _local2:arrow_mc;
arrowPlacedSound.play();
gridX = int((selector.x / 24));
gridY = int((selector.y / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "arrow"){
gameCanvas.removeChild(objectArray[gridX][gridY]);
};
};
_local2 = new arrow_mc();
objectArray[gridX][gridY] = _local2;
objectArray[gridX][gridY].id = "arrow";
objectArray[gridX][gridY].dir = "up";
gameCanvas.addChild(objectArray[gridX][gridY]);
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
zSort(gameCanvas);
restoreSelector();
}
public function arrowRightUp(_arg1:MouseEvent):void{
arrowRightDownFlag = false;
}
public function adjustPositions():void{
var _local1:Number;
var _local2:int;
var _local3:MovieClip;
var _local4:int;
var _local5:MovieClip;
_local1 = npcArray.length;
_local2 = 0;
while (_local2 < _local1) {
_local3 = npcArray[_local2];
_local4 = 0;
while (_local4 < _local1) {
_local5 = npcArray[_local4];
if ((((((((_local3.hitTestObject(_local5) == true)) && (!((_local3 == _local5))))) && ((_local3.visible == true)))) && ((_local5.visible == true)))){
if ((((((((_local3.dir == "up")) && ((_local5.dir == "up")))) && ((_local3.y >= _local5.y)))) && ((int((_local3.x / 24)) == int((_local5.x / 24)))))){
_local3.y = _local3.lasty;
tempCounter++;
};
if ((((((((_local3.dir == "down")) && ((_local5.dir == "down")))) && ((_local3.y <= _local5.y)))) && ((int((_local3.x / 24)) == int((_local5.x / 24)))))){
_local3.y = _local3.lasty;
tempCounter++;
};
if ((((((((_local3.dir == "left")) && ((_local5.dir == "left")))) && ((_local3.x >= _local5.x)))) && ((int((_local3.y / 24)) == int((_local5.y / 24)))))){
_local3.x = _local3.lastx;
tempCounter++;
};
if ((((((((_local3.dir == "right")) && ((_local5.dir == "right")))) && ((_local3.x <= _local5.x)))) && ((int((_local3.y / 24)) == int((_local5.y / 24)))))){
_local3.x = _local3.lastx;
tempCounter++;
};
};
_local4++;
};
_local2++;
};
}
public function activateHighscores(_arg1:TweenEvent):void{
highscoresTween.removeEventListener(TweenEvent.MOTION_FINISH, activateHighscores);
highscores.menuButton.addEventListener(MouseEvent.MOUSE_DOWN, slideHighscores);
if (cameFromMenu == true){
cameFromMenu = false;
motherCanvas.removeChild(menu);
};
}
public function downloadHandler(_arg1:Event):void{
var _local2:String;
var _local3:String;
var _local4:XML;
var _local5:String;
var _local6:int;
hsLoader.removeEventListener(Event.COMPLETE, downloadHandler);
_local4 = XML(hsLoader.data);
scoresArray.length = 0;
for (_local5 in _local4.name) {
_local2 = _local4.name[_local5];
if (swearFilter(_local2) == true){
_local2 = "XxX";
};
_local3 = _local4.name.@score[_local5];
scoresArray.push({name:_local2, score:_local3});
};
scoresArray.sortOn("score", Array.NUMERIC);
scoresArray.reverse();
highscores.connectingDisplay.text = "";
highscores.rankDisplay.text = "";
highscores.nameDisplay.text = "";
highscores.scoreDisplay.text = "";
_local6 = 0;
while (_local6 < 10) {
highscores.rankDisplay.appendText((String((_local6 + 1)) + ".\n"));
highscores.nameDisplay.appendText((scoresArray[_local6].name + "\n"));
highscores.scoreDisplay.appendText((scoresArray[_local6].score + "\n"));
_local6++;
};
}
public function completeWritingCookie(_arg1:Event):void{
if (_arg1.target.data != ""){
highestLevel = uint(_arg1.target.data);
};
}
public function removeGameOverScreen(_arg1:MouseEvent):void{
submitSuccess = false;
gameOverScreen.submitButton.removeEventListener(MouseEvent.MOUSE_DOWN, submitHighscore);
gameOverScreen.continueButton.removeEventListener(MouseEvent.MOUSE_DOWN, removeGameOverScreen);
gameOverScreen.banner.removeEventListener(MouseEvent.MOUSE_DOWN, followLink);
gameBackground.viewport.removeChild(gameOverScreen);
slideGame();
showHighscores();
}
public function iconHighscores(_arg1:MouseEvent):void{
menu.iconGuy.y = ((menu.highscoresButton.y + (menu.highscoresButton.height / 2)) - (menu.iconGuy.height / 2));
}
public function gameLoop(_arg1:Event):void{
if (gameRunning == true){
updateCountdown();
updateSelector();
objectCollisions();
moveNPCs();
arrowCollisions();
adjustPositions();
updateBonusDisplay();
checkLevelComplete();
};
}
public function gotoLevel11(_arg1:MouseEvent):void{
currentLevel = 11;
levelSelect.levelButtonHolder.level11.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel11);
slideLevelSelect();
}
public function gotoLevel12(_arg1:MouseEvent):void{
currentLevel = 12;
levelSelect.levelButtonHolder.level12.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel12);
slideLevelSelect();
}
public function gotoLevel13(_arg1:MouseEvent):void{
currentLevel = 13;
levelSelect.levelButtonHolder.level13.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel13);
slideLevelSelect();
}
public function gotoLevel15(_arg1:MouseEvent):void{
currentLevel = 15;
levelSelect.levelButtonHolder.level15.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel15);
slideLevelSelect();
}
public function gotoLevel19(_arg1:MouseEvent):void{
currentLevel = 19;
levelSelect.levelButtonHolder.level19.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel19);
slideLevelSelect();
}
public function gotoLevel16(_arg1:MouseEvent):void{
currentLevel = 16;
levelSelect.levelButtonHolder.level16.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel16);
slideLevelSelect();
}
public function gotoLevel17(_arg1:MouseEvent):void{
currentLevel = 17;
levelSelect.levelButtonHolder.level17.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel17);
slideLevelSelect();
}
public function gotoLevel10(_arg1:MouseEvent):void{
currentLevel = 10;
levelSelect.levelButtonHolder.level10.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel10);
slideLevelSelect();
}
public function gotoLevel18(_arg1:MouseEvent):void{
currentLevel = 18;
levelSelect.levelButtonHolder.level18.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel18);
slideLevelSelect();
}
public function resumeGame(_arg1:MouseEvent):void{
var _local2:Date;
gameBackground.viewport.removeChild(confirmQuit);
confirmQuit.yesButton.removeEventListener(MouseEvent.MOUSE_DOWN, quitGame);
confirmQuit.noButton.removeEventListener(MouseEvent.MOUSE_DOWN, resumeGame);
gameBackground.gui.quitButton.addEventListener(MouseEvent.MOUSE_DOWN, showConfirmQuit);
if (startMusicAtBeginning == false){
musicChannel = musicLoopSound.play(0, 100, musicVolume);
};
selectorClicked = false;
selector.arrowUp.gotoAndStop(1);
selector.arrowDown.gotoAndStop(1);
selector.arrowRight.gotoAndStop(1);
selector.arrowLeft.gotoAndStop(1);
selector.arrowClear.gotoAndStop(1);
clickCounter = 0;
npcSpeed = npcStartSpeed;
countdownRunning = true;
_local2 = new Date();
startTime = _local2.getTime();
countdownNewStart = countdownSeconds;
}
public function gotoLevel20(_arg1:MouseEvent):void{
currentLevel = 20;
levelSelect.levelButtonHolder.level20.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel20);
slideLevelSelect();
}
public function showConfirmQuit(_arg1:MouseEvent):void{
if (startMusicAtBeginning == false){
musicChannel.stop();
};
npcSpeed = 0;
countdownRunning = false;
gameBackground.gui.quitButton.removeEventListener(MouseEvent.MOUSE_DOWN, showConfirmQuit);
confirmQuit = new confirmQuit_mc();
gameBackground.viewport.addChild(confirmQuit);
confirmQuit.yesButton.addEventListener(MouseEvent.MOUSE_DOWN, quitGame);
confirmQuit.noButton.addEventListener(MouseEvent.MOUSE_DOWN, resumeGame);
}
public function slideInstructions(_arg1:MouseEvent):void{
instructions.menuButton.removeEventListener(MouseEvent.MOUSE_DOWN, removeInstructions);
instructionsTween = new Tween(instructions, "x", Back.easeOut, 0, instructions.width, 1, true);
instructionsTween.addEventListener(TweenEvent.MOTION_FINISH, removeInstructions);
initialiseMenu();
}
public function highlightArrowDown(_arg1:MouseEvent):void{
selector.arrowDown.gotoAndStop(2);
}
public function gotoLevel14(_arg1:MouseEvent):void{
currentLevel = 14;
levelSelect.levelButtonHolder.level14.removeEventListener(MouseEvent.MOUSE_DOWN, gotoLevel14);
slideLevelSelect();
}
public function fadeClips():void{
fadeTween = new Tween(blankScreen, "alpha", Regular.easeInOut, 1, 0, 1, true);
fadeTween.addEventListener(TweenEvent.MOTION_FINISH, removeClips);
}
public function makeNPC(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:String){
var _local5:MovieClip;
numberOfNPCs++;
if (_arg4 == "blueB"){
_local5 = new npcBlueB_mc();
_local5.chapType = "blueB";
_local5.destination = destinationBlue[currentLevel];
};
if (_arg4 == "blueW"){
_local5 = new npcBlueW_mc();
_local5.chapType = "blueW";
_local5.destination = destinationBlue[currentLevel];
};
if (_arg4 == "greenB"){
_local5 = new npcGreenB_mc();
_local5.chapType = "greenB";
_local5.destination = destinationGreen[currentLevel];
};
if (_arg4 == "greenW"){
_local5 = new npcGreenW_mc();
_local5.chapType = "greenW";
_local5.destination = destinationGreen[currentLevel];
};
if (_arg4 == "pinkB"){
_local5 = new npcPinkB_mc();
_local5.chapType = "pinkB";
_local5.destination = destinationPink[currentLevel];
};
if (_arg4 == "pinkW"){
_local5 = new npcPinkW_mc();
_local5.chapType = "pinkW";
_local5.destination = destinationPink[currentLevel];
};
if (_arg4 == "redB"){
_local5 = new npcRedB_mc();
_local5.chapType = "redB";
_local5.destination = destinationRed[currentLevel];
};
if (_arg4 == "redW"){
_local5 = new npcRedW_mc();
_local5.chapType = "redW";
_local5.destination = destinationRed[currentLevel];
};
if (_arg4 == "turquoiseB"){
_local5 = new npcTurquoiseB_mc();
_local5.chapType = "turquoiseB";
_local5.destination = destinationTurquoise[currentLevel];
};
if (_arg4 == "turquoiseW"){
_local5 = new npcTurquoiseW_mc();
_local5.chapType = "turquoiseW";
_local5.destination = destinationTurquoise[currentLevel];
};
if (_arg4 == "yellowB"){
_local5 = new npcYellowB_mc();
_local5.chapType = "yellowB";
_local5.destination = destinationYellow[currentLevel];
};
if (_arg4 == "yellowW"){
_local5 = new npcYellowW_mc();
_local5.chapType = "yellowW";
_local5.destination = destinationYellow[currentLevel];
};
npcCanvas.addChild(_local5);
_local5.x = (Math.round((_arg1 / 24)) * 24);
_local5.y = (Math.round((_arg2 / 24)) * 24);
if (_arg3 == 0){
_local5.dir = "up";
};
if (_arg3 == 90){
_local5.dir = "right";
};
if (_arg3 == 180){
_local5.dir = "down";
};
if (_arg3 == -90){
_local5.dir = "left";
};
npcArray.push(_local5);
_local5.gotoAndPlay(_local5.dir);
}
public function restoreArrowUp(_arg1:MouseEvent):void{
selector.arrowUp.gotoAndStop(1);
}
public function toggleSound(_arg1:MouseEvent):void{
var _local2:Boolean;
_local2 = false;
if (soundIcon.cross.visible == false){
soundIcon.cross.visible = true;
globalSound.volume = 0;
SoundMixer.soundTransform = globalSound;
_local2 = true;
};
if ((((soundIcon.cross.visible == true)) && ((_local2 == false)))){
soundIcon.cross.visible = false;
globalSound.volume = 1;
SoundMixer.soundTransform = globalSound;
};
}
public function activateInstructions(_arg1:TweenEvent):void{
instructionsTween.removeEventListener(TweenEvent.MOTION_FINISH, activateInstructions);
instructions.menuButton.addEventListener(MouseEvent.MOUSE_DOWN, slideInstructions);
motherCanvas.removeChild(menu);
}
public function showPhotoGig(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoGig = new photoGig_mc();
blankScreen.addChild(photoGig);
photoGig.x = _arg1.x;
photoGig.y = _arg1.y;
_local3 = new Tween(photoGig, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoGig, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoGig, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoGig.filters = [_local6];
}
public function showPhotoWedding(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoWedding = new photoWedding_mc();
blankScreen.addChild(photoWedding);
photoWedding.x = _arg1.x;
photoWedding.y = _arg1.y;
_local3 = new Tween(photoWedding, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoWedding, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoWedding, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoWedding.filters = [_local6];
}
public function showLevelSelect(_arg1:MouseEvent):void{
var _local2:int;
var _local3:int;
var _local4:String;
var _local5:*;
var _local6:DisplayObject;
var _local7:padlock_mc;
var _local8:DropShadowFilter;
menu.playButton.removeEventListener(MouseEvent.MOUSE_DOWN, showLevelSelect);
menuTween = new Tween(menu, "x", Back.easeOut, 0, menu.width, 1, true);
levelSelect = new levelSelect_mc();
motherCanvas.addChild(levelSelect);
levelButtonStart = levelSelect.levelButtonHolder.x;
_local2 = highestLevel;
if (_local2 < 3){
_local2 = 3;
};
if (_local2 > 18){
_local2 = 18;
};
levelSelect.levelButtonHolder.x = (levelSelect.levelButtonHolder.x - ((_local2 - 3) * 75));
showLevelSelectTween = new Tween(levelSelect, "x", Back.easeOut, -500, 0, 1, true);
showLevelSelectTween.addEventListener(TweenEvent.MOTION_FINISH, activateLevelSelect);
_local3 = 0;
_local5 = 0;
while (_local5 < levelSelect.levelButtonHolder.numChildren) {
_local6 = levelSelect.levelButtonHolder.getChildAt(_local5);
if ((_local6 is levelThumb)){
_local3++;
if ((((((_local3 > alwaysUnlocked)) && ((_local3 > highestLevel)))) && ((_local6.visible == true)))){
_local7 = new padlock_mc();
levelSelect.levelButtonHolder.addChild(_local7);
_local8 = new DropShadowFilter();
_local8.distance = 5;
_local8.angle = 45;
_local8.strength = 0.5;
_local7.filters = [_local8];
_local7.mouseEnabled = false;
_local7.x = _local6.x;
_local7.y = _local6.y;
};
};
_local5++;
};
}
public function placeArrowLeft(_arg1:MouseEvent):void{
var _local2:arrow_mc;
arrowPlacedSound.play();
gridX = int((selector.x / 24));
gridY = int((selector.y / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "arrow"){
gameCanvas.removeChild(objectArray[gridX][gridY]);
};
};
_local2 = new arrow_mc();
objectArray[gridX][gridY] = _local2;
objectArray[gridX][gridY].id = "arrow";
objectArray[gridX][gridY].dir = "left";
objectArray[gridX][gridY].gotoAndStop("left");
gameCanvas.addChild(objectArray[gridX][gridY]);
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
zSort(gameCanvas);
restoreSelector();
}
public function mouseDownHandler(_arg1:MouseEvent):void{
mouseIsDown = true;
}
public function arrowLeftUp(_arg1:MouseEvent):void{
arrowLeftDownFlag = false;
}
public function showTotal():void{
score = (score + bonus);
levelUp.message1.text = ((((("Level " + String(currentLevel)) + " complete!\n\nBonus: ") + String(bonus)) + "\nScore: ") + String(score));
bonus = 0;
levelUp.continueButton.visible = true;
levelUp.continueButton.addEventListener(MouseEvent.MOUSE_UP, removeLevelUp);
}
public function removeLevelSelect(_arg1:TweenEvent):void{
showLevelSelectTween.removeEventListener(TweenEvent.MOTION_FINISH, removeLevelSelect);
motherCanvas.removeChild(levelSelect);
}
public function removeGame(_arg1:TweenEvent):void{
score = 0;
bonus = 0;
motherCanvas.removeChild(gameBackground);
}
public function makeTree(_arg1:Number, _arg2:Number):void{
var _local3:tree_mc;
_local3 = new tree_mc();
gridX = Math.round((_arg1 / 24));
gridY = Math.round((_arg2 / 24));
objectArray[gridX][gridY] = _local3;
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
objectArray[gridX][gridY].id = "wall";
gameCanvas.addChild(objectArray[gridX][gridY]);
}
public function activateLevelSelect(_arg1:TweenEvent):void{
showLevelSelectTween.removeEventListener(TweenEvent.MOTION_FINISH, activateLevelSelect);
motherCanvas.removeChild(menu);
levelSelect.menuButton.addEventListener(MouseEvent.MOUSE_DOWN, slideLevelSelectOnClick);
levelSelect.addEventListener(Event.ENTER_FRAME, slideButtonsLeft);
levelSelect.addEventListener(Event.ENTER_FRAME, slideButtonsRight);
levelSelect.addEventListener(Event.ENTER_FRAME, adjustButtons);
levelSelect.arrowLeft.addEventListener(MouseEvent.MOUSE_DOWN, arrowLeftDown);
levelSelect.arrowRight.addEventListener(MouseEvent.MOUSE_DOWN, arrowRightDown);
levelSelect.arrowLeft.addEventListener(MouseEvent.MOUSE_UP, arrowLeftUp);
levelSelect.arrowRight.addEventListener(MouseEvent.MOUSE_UP, arrowRightUp);
levelSelect.arrowLeft.addEventListener(MouseEvent.MOUSE_OUT, arrowLeftUp);
levelSelect.arrowRight.addEventListener(MouseEvent.MOUSE_OUT, arrowRightUp);
if (highestLevel < alwaysUnlocked){
highestLevel = alwaysUnlocked;
};
if (highestLevel >= 1){
levelSelect.levelButtonHolder.level1.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel1);
};
if (highestLevel >= 2){
levelSelect.levelButtonHolder.level2.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel2);
};
if (highestLevel >= 3){
levelSelect.levelButtonHolder.level3.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel3);
};
if (highestLevel >= 4){
levelSelect.levelButtonHolder.level4.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel4);
};
if (highestLevel >= 5){
levelSelect.levelButtonHolder.level5.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel5);
};
if (highestLevel >= 6){
levelSelect.levelButtonHolder.level6.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel6);
};
if (highestLevel >= 7){
levelSelect.levelButtonHolder.level7.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel7);
};
if (highestLevel >= 8){
levelSelect.levelButtonHolder.level8.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel8);
};
if (highestLevel >= 9){
levelSelect.levelButtonHolder.level9.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel9);
};
if (highestLevel >= 10){
levelSelect.levelButtonHolder.level10.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel10);
};
if (highestLevel >= 11){
levelSelect.levelButtonHolder.level11.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel11);
};
if (highestLevel >= 12){
levelSelect.levelButtonHolder.level12.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel12);
};
if (highestLevel >= 13){
levelSelect.levelButtonHolder.level13.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel13);
};
if (highestLevel >= 14){
levelSelect.levelButtonHolder.level14.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel14);
};
if (highestLevel >= 15){
levelSelect.levelButtonHolder.level15.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel15);
};
if (highestLevel >= 16){
levelSelect.levelButtonHolder.level16.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel16);
};
if (highestLevel >= 17){
levelSelect.levelButtonHolder.level17.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel17);
};
if (highestLevel >= 18){
levelSelect.levelButtonHolder.level18.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel18);
};
if (highestLevel >= 19){
levelSelect.levelButtonHolder.level19.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel19);
};
if (highestLevel >= 20){
levelSelect.levelButtonHolder.level20.addEventListener(MouseEvent.MOUSE_DOWN, gotoLevel20);
};
}
public function showPhotoParty(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoParty = new photoParty_mc();
blankScreen.addChild(photoParty);
photoParty.x = 180;
photoParty.y = 180;
_local3 = new Tween(photoParty, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoParty, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoParty, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoParty.filters = [_local6];
}
public function initialise():void{
debug = new debug_mc();
stage.addChild(debug);
debug.visible = false;
if (startMusicAtBeginning == true){
musicChannel = musicLoopSound.play(0, 100, musicVolume);
};
fillLevelArrays();
tween = new Tween(preloader, "x", Back.easeOut, 0, preloader.width, 1, true);
tween.addEventListener(TweenEvent.MOTION_FINISH, removePreloader);
readCookie();
motherCanvas = new MovieClip();
stage.addChild(motherCanvas);
soundIcon = new soundIcon_mc();
stage.addChild(soundIcon);
soundIcon.y = 346;
soundIcon.x = 466;
soundIcon.cross.visible = false;
soundIcon.addEventListener(MouseEvent.MOUSE_DOWN, toggleSound);
soundIcon.addEventListener(MouseEvent.MOUSE_OVER, soundIconOver);
soundIcon.addEventListener(MouseEvent.MOUSE_OUT, soundIconOut);
hotspot = new hotspot_bt();
stage.addChild(hotspot);
hotspot.x = 387;
hotspot.y = 7;
hotspot.addEventListener(MouseEvent.MOUSE_DOWN, followLink);
initialiseMenu();
}
public function arrowRightDown(_arg1:MouseEvent):void{
arrowRightDownFlag = true;
lastButtonPressed = "right";
}
public function quitGame(_arg1:MouseEvent):void{
gameBackground.viewport.removeChild(confirmQuit);
confirmQuit.yesButton.removeEventListener(MouseEvent.MOUSE_DOWN, quitGame);
confirmQuit.noButton.removeEventListener(MouseEvent.MOUSE_DOWN, resumeGame);
stopGame();
slideGame();
initialiseMenu();
}
public function showPhotoClips(_arg1:uint){
var _local2:int;
var _local3:int;
var _local4:String;
_local2 = 0;
_local3 = 1;
_local4 = "partyHouse";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoParty, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local4 = "icecreamShop";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoIcecream, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local4 = "gig";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoGig, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local4 = "stadium";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoStadium, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local4 = "themepark";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoThemepark, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local4 = "wedding";
if ((((((((((((destinationGreen[_arg1] == _local4)) || ((destinationBlue[_arg1] == _local4)))) || ((destinationRed[_arg1] == _local4)))) || ((destinationYellow[_arg1] == _local4)))) || ((destinationPink[_arg1] == _local4)))) || ((destinationTurquoise[_arg1] == _local4)))){
setTimeout(showPhotoWedding, _local2, photoPos[_local3], photoAng[_local3]);
_local2 = (_local2 + 1500);
_local3++;
};
_local2 = (_local2 + 1000);
setTimeout(fadeClips, _local2);
}
public function placeArrowDown(_arg1:MouseEvent):void{
var _local2:arrow_mc;
arrowPlacedSound.play();
gridX = int((selector.x / 24));
gridY = int((selector.y / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "arrow"){
gameCanvas.removeChild(objectArray[gridX][gridY]);
};
};
_local2 = new arrow_mc();
objectArray[gridX][gridY] = _local2;
objectArray[gridX][gridY].id = "arrow";
objectArray[gridX][gridY].dir = "down";
objectArray[gridX][gridY].gotoAndStop("down");
gameCanvas.addChild(objectArray[gridX][gridY]);
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
zSort(gameCanvas);
restoreSelector();
}
public function updateBonusDisplay():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
_local1 = 0;
_local2 = 0;
_local3 = 0;
_local4 = 0;
_local5 = 0;
_local1 = int((bonus / 10000));
_local2 = int(((bonus - (_local1 * 10000)) / 1000));
_local3 = int((((bonus - (_local1 * 10000)) - (_local2 * 1000)) / 100));
_local4 = int(((((bonus - (_local1 * 10000)) - (_local2 * 1000)) - (_local3 * 100)) / 10));
_local5 = int(((((bonus - (_local1 * 10000)) - (_local2 * 1000)) - (_local3 * 100)) - (_local4 * 10)));
gameBackground.gui.bonusDisplayTTH.text = _local1;
gameBackground.gui.bonusDisplayTH.text = _local2;
gameBackground.gui.bonusDisplayH.text = _local3;
gameBackground.gui.bonusDisplayT.text = _local4;
gameBackground.gui.bonusDisplayU.text = _local5;
}
public function stopGame():void{
gameBackground.viewport.removeEventListener(MouseEvent.MOUSE_UP, placeArrow);
motherCanvas.removeEventListener(Event.ENTER_FRAME, gameLoop);
gameRunning = false;
}
public function soundIconOver(_arg1:MouseEvent):void{
soundIcon.gotoAndStop(2);
}
public function showHighscores(){
var _local1:String;
var _local2:URLRequest;
_local1 = ("http://www.photoboxland.co.uk/photobox_read_scores.php?" + String(Math.random()));
_local2 = new URLRequest(_local1);
hsLoader = new URLLoader(_local2);
hsLoader.addEventListener(Event.COMPLETE, downloadHandler);
if (cameFromMenu == true){
menuTween = new Tween(menu, "x", Back.easeOut, 0, menu.width, 1, true);
};
highscores = new highscores_mc();
motherCanvas.addChild(highscores);
highscores.connectingDisplay.text = "Connecting ...";
highscores.rankDisplay.text = "";
highscores.nameDisplay.text = "";
highscores.scoreDisplay.text = "";
highscoresTween = new Tween(highscores, "x", Back.easeOut, -(highscores.width), 0, 1, true);
highscoresTween.addEventListener(TweenEvent.MOTION_FINISH, activateHighscores);
}
public function writeCookie(_arg1:int):void{
var _local2:URLVariables;
var _local3:URLRequest;
var _local4:URLLoader;
_local2 = new URLVariables();
_local2.levelsCompleted = String(_arg1);
_local3 = new URLRequest("http://www.photoboxland.co.uk/write_cookie.php");
_local3.data = _local2;
_local3.method = URLRequestMethod.POST;
_local4 = new URLLoader();
_local4.dataFormat = URLLoaderDataFormat.TEXT;
_local4.load(_local3);
}
public function slideLevelSelect():void{
levelSelect.menuButton.removeEventListener(MouseEvent.MOUSE_DOWN, slideLevelSelectOnClick);
levelSelect.removeEventListener(Event.ENTER_FRAME, slideButtonsLeft);
levelSelect.removeEventListener(Event.ENTER_FRAME, slideButtonsRight);
levelSelect.removeEventListener(Event.ENTER_FRAME, adjustButtons);
levelSelect.arrowLeft.removeEventListener(MouseEvent.MOUSE_DOWN, arrowLeftDown);
levelSelect.arrowRight.removeEventListener(MouseEvent.MOUSE_DOWN, arrowRightDown);
levelSelect.arrowLeft.removeEventListener(MouseEvent.MOUSE_UP, arrowLeftUp);
levelSelect.arrowRight.removeEventListener(MouseEvent.MOUSE_UP, arrowRightUp);
levelSelect.arrowLeft.removeEventListener(MouseEvent.MOUSE_OUT, arrowLeftUp);
levelSelect.arrowRight.removeEventListener(MouseEvent.MOUSE_OUT, arrowRightUp);
showLevelSelectTween = new Tween(levelSelect, "x", Back.easeOut, 0, 500, 1, true);
showLevelSelectTween.addEventListener(TweenEvent.MOTION_FINISH, removeLevelSelect);
if (backToMenu == true){
backToMenu = false;
initialiseMenu();
} else {
showBlurb();
};
}
public function placeArrow(_arg1:MouseEvent):void{
selectorMouseIsOut = false;
selectorClicked = true;
selector.alpha = 1;
selector.hotspot.mouseEnabled = false;
if (selector.arrowUp.visible == true){
selector.arrowUp.addEventListener(MouseEvent.MOUSE_UP, placeArrowUp);
selector.arrowUp.addEventListener(MouseEvent.MOUSE_OUT, restoreArrowUp);
selector.arrowUp.addEventListener(MouseEvent.MOUSE_OVER, highlightArrowUp);
};
if (selector.arrowDown.visible == true){
selector.arrowDown.addEventListener(MouseEvent.MOUSE_UP, placeArrowDown);
selector.arrowDown.addEventListener(MouseEvent.MOUSE_OUT, restoreArrowDown);
selector.arrowDown.addEventListener(MouseEvent.MOUSE_OVER, highlightArrowDown);
};
if (selector.arrowLeft.visible == true){
selector.arrowLeft.addEventListener(MouseEvent.MOUSE_UP, placeArrowLeft);
selector.arrowLeft.addEventListener(MouseEvent.MOUSE_OUT, restoreArrowLeft);
selector.arrowLeft.addEventListener(MouseEvent.MOUSE_OVER, highlightArrowLeft);
};
if (selector.arrowRight.visible == true){
selector.arrowRight.addEventListener(MouseEvent.MOUSE_UP, placeArrowRight);
selector.arrowRight.addEventListener(MouseEvent.MOUSE_OUT, restoreArrowRight);
selector.arrowRight.addEventListener(MouseEvent.MOUSE_OVER, highlightArrowRight);
};
selector.arrowClear.addEventListener(MouseEvent.MOUSE_UP, placeArrowClear);
selector.arrowClear.addEventListener(MouseEvent.MOUSE_OUT, restoreArrowClear);
selector.arrowClear.addEventListener(MouseEvent.MOUSE_OVER, highlightArrowClear);
}
public function initialiseGame(_arg1:MouseEvent):void{
var _local2:Date;
blurb.startButton.removeEventListener(MouseEvent.MOUSE_UP, initialiseGame);
gameBackground.viewport.removeChild(blurb);
motherCanvas.addEventListener(Event.ENTER_FRAME, gameLoop);
gameWon = false;
gameRunning = true;
numberOfNPCs = 0;
npcSpeed = npcStartSpeed;
selectorClicked = false;
createLevel(currentLevel);
zSort(gameCanvas);
motherCanvas.addEventListener(MouseEvent.MOUSE_UP, mouseUpHandler);
motherCanvas.addEventListener(MouseEvent.MOUSE_DOWN, mouseDownHandler);
gameBackground.gui.quitButton.addEventListener(MouseEvent.MOUSE_DOWN, showConfirmQuit);
preventArrow = true;
clickCounter = 0;
if (startMusicAtBeginning == false){
musicChannel = musicLoopSound.play(0, 100, musicVolume);
};
_local2 = new Date();
fpsStartTime = _local2.getTime();
startTime = _local2.getTime();
countdownRunning = true;
countdownNewStart = countdownStart;
}
public function followLink(_arg1:MouseEvent):void{
var _local2:String;
var _local3:URLRequest;
_local2 = "http://www.photobox.co.uk/register?channel=1143&cid=tawe01";
_local3 = new URLRequest(_local2);
navigateToURL(_local3);
}
public function submitFail():void{
if (submitSuccess == false){
gameOverScreen.message3.text = "Sorry, could not connect. Try submitting again.";
hsLoader.removeEventListener(Event.COMPLETE, submitCompleteHandler);
gameOverScreen.submitButton.addEventListener(MouseEvent.MOUSE_DOWN, submitHighscore);
};
}
public function makePath1(_arg1:Number, _arg2:Number):void{
var _local3:path1_template;
_local3 = new path1_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function makePath3(_arg1:Number, _arg2:Number):void{
var _local3:path3_template;
_local3 = new path3_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function iconPlay(_arg1:MouseEvent):void{
menu.iconGuy.y = ((menu.playButton.y + (menu.playButton.height / 2)) - (menu.iconGuy.height / 2));
}
public function highlightArrowRight(_arg1:MouseEvent):void{
selector.arrowRight.gotoAndStop(2);
}
public function updateCountdown():void{
var _local1:Date;
if (countdownRunning == true){
_local1 = new Date();
countdownSeconds = (countdownNewStart - int(((_local1.getTime() - startTime) / 1000)));
fractionRemaining = ((countdownNewStart - ((_local1.getTime() - startTime) / 1000)) / countdownStart);
if (fractionRemaining < 0){
fractionRemaining = 0;
};
};
if ((((countdownSeconds <= 0)) && ((countdownRunning == true)))){
gameBackground.gui.clockMaskRight.rotation = 360;
gameWon = false;
gameOver();
};
updateClockDisplays();
}
public function makePath7(_arg1:Number, _arg2:Number):void{
var _local3:path7_template;
_local3 = new path7_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function makePath9(_arg1:Number, _arg2:Number):void{
var _local3:path9_template;
_local3 = new path9_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function slideButtonsRight(_arg1:Event):void{
if (arrowLeftDownFlag == true){
if (levelSelect.levelButtonHolder.x < levelButtonStart){
levelSelect.levelButtonHolder.x = (levelSelect.levelButtonHolder.x + 8);
};
};
}
public function makePathH(_arg1:Number, _arg2:Number):void{
var _local3:pathH_template;
_local3 = new pathH_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function makePathT(_arg1:Number, _arg2:Number):void{
var _local3:pathT_template;
_local3 = new pathT_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function showLevelUp():void{
if (startMusicAtBeginning == false){
musicChannel.stop();
};
gameBackground.viewport.removeChild(selector);
levelUp = new levelUp_mc();
gameBackground.viewport.addChild(levelUp);
levelUp.continueButton.visible = false;
levelUp.message1.text = (("Level " + String(currentLevel)) + " complete!");
blankScreen = new blankScreen_mc();
gameBackground.viewport.addChild(blankScreen);
showPhotoClips(currentLevel);
motherCanvas.addEventListener(Event.ENTER_FRAME, addBonuses);
}
public function makePathV(_arg1:Number, _arg2:Number):void{
var _local3:pathV_template;
_local3 = new pathV_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function makePathX(_arg1:Number, _arg2:Number):void{
var _local3:pathX_template;
_local3 = new pathX_template();
_local3.x = (Math.round((_arg1 / 24)) * 24);
_local3.y = (Math.round((_arg2 / 24)) * 24);
sceneryCanvas.addChild(_local3);
}
public function showPhotoThemepark(_arg1:Point, _arg2:Number):void{
var _local3:Tween;
var _local4:Tween;
var _local5:Tween;
var _local6:DropShadowFilter;
cameraSound.play();
photoThemepark = new photoThemepark_mc();
blankScreen.addChild(photoThemepark);
photoThemepark.x = _arg1.x;
photoThemepark.y = _arg1.y;
_local3 = new Tween(photoThemepark, "scaleX", Elastic.easeOut, 0, 1, 1, true);
_local4 = new Tween(photoThemepark, "scaleY", Elastic.easeOut, 0, 1, 1, true);
_local5 = new Tween(photoThemepark, "rotation", None.easeNone, 0, _arg2, 0.5, true);
_local6 = new DropShadowFilter();
_local6.distance = 0;
_local6.angle = 0;
_local6.strength = 0.4;
_local6.blurX = 8;
_local6.blurY = 8;
photoThemepark.filters = [_local6];
}
public function highlightArrowClear(_arg1:MouseEvent):void{
selector.arrowClear.gotoAndStop(2);
}
public function readCookie():void{
var _local1:URLRequest;
var _local2:URLLoader;
_local1 = new URLRequest(("http://www.photoboxland.co.uk/read_cookie.php?" + String(Math.random())));
_local2 = new URLLoader();
_local2.load(_local1);
_local2.addEventListener(Event.COMPLETE, completeWritingCookie);
}
public function showHighscoresOnClick(_arg1:MouseEvent):void{
menu.highscoresButton.removeEventListener(MouseEvent.MOUSE_DOWN, showHighscoresOnClick);
cameFromMenu = true;
showHighscores();
}
public function calculateFPS(_arg1:Event):void{
displayFPS();
}
public function updateSelector():void{
selector.addEventListener(MouseEvent.MOUSE_OUT, selectorMouseOut);
if ((((mouseIsDown == false)) && ((selectorMouseIsOut == true)))){
restoreSelector();
};
if (selectorClicked == false){
selector.arrowUp.gotoAndStop(1);
selector.arrowDown.gotoAndStop(1);
selector.arrowRight.gotoAndStop(1);
selector.arrowLeft.gotoAndStop(1);
selector.arrowClear.gotoAndStop(1);
selector.visible = true;
selector.arrowUp.visible = true;
selector.arrowDown.visible = true;
selector.arrowLeft.visible = true;
selector.arrowRight.visible = true;
if ((((((((gameCanvas.mouseX < 0)) || ((gameCanvas.mouseX >= 360)))) || ((gameCanvas.mouseY < 0)))) || ((gameCanvas.mouseY >= 360)))){
selector.visible = false;
};
if (selector.visible == true){
gridX = int((gameCanvas.mouseX / 24));
gridY = int((gameCanvas.mouseY / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id != "arrow"){
selector.visible = false;
};
};
};
if (selector.visible == true){
selector.x = (gridX * 24);
selector.y = (gridY * 24);
if (gridY == 0){
selector.arrowUp.visible = false;
};
if (gridY > 0){
if (objectArray[gridX][(gridY - 1)] != 0){
if (objectArray[gridX][(gridY - 1)].id == "wall"){
selector.arrowUp.visible = false;
};
};
};
if (gridY == 14){
selector.arrowDown.visible = false;
};
if (gridY < 14){
if (objectArray[gridX][(gridY + 1)] != 0){
if (objectArray[gridX][(gridY + 1)].id == "wall"){
selector.arrowDown.visible = false;
};
};
};
if (gridX == 0){
selector.arrowLeft.visible = false;
};
if (gridX > 0){
if (objectArray[(gridX - 1)][gridY] != 0){
if (objectArray[(gridX - 1)][gridY].id == "wall"){
selector.arrowLeft.visible = false;
};
};
};
if (gridX == 14){
selector.arrowRight.visible = false;
};
if (gridX < 14){
if (objectArray[(gridX + 1)][gridY] != 0){
if (objectArray[(gridX + 1)][gridY].id == "wall"){
selector.arrowRight.visible = false;
};
};
};
};
};
}
public function updateClockDisplays():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
_local1 = int((countdownSeconds / 60));
_local2 = (countdownSeconds - (_local1 * 60));
_local3 = int((_local2 / 10));
_local4 = (_local2 - (_local3 * 10));
gameBackground.gui.countdownDisplay.text = (((String(_local1) + ":") + String(_local3)) + String(_local4));
if (fractionRemaining >= 0.5){
gameBackground.gui.clockMaskRight.visible = false;
gameBackground.gui.clockMaskLeft.rotation = (360 - (360 * fractionRemaining));
} else {
gameBackground.gui.clockMaskLeft.rotation = 180;
gameBackground.gui.clockMaskRight.visible = true;
gameBackground.gui.clockMaskRight.rotation = (360 - (360 * fractionRemaining));
};
}
public function replayLevel(_arg1:MouseEvent):void{
gameOverScreen.replayButton.removeEventListener(MouseEvent.MOUSE_DOWN, replayLevel);
motherCanvas.removeChild(gameBackground);
if (windowFrameAdded == true){
motherCanvas.removeChild(windowFrame);
windowFrameAdded = false;
};
cameFromLevelUp = true;
score = 0;
showBlurb();
}
public function showBlurb():void{
var _local1:int;
var _local2:int;
var _local3:int;
var _local4:int;
var _local5:int;
var _local6:bubbleBlue_mc;
var _local7:partyIcon_mc;
var _local8:icecreamIcon_mc;
var _local9:gigIcon_mc;
var _local10:stadiumIcon_mc;
var _local11:themeparkIcon_mc;
var _local12:weddingIcon_mc;
var _local13:bubbleGreen_mc;
var _local14:partyIcon_mc;
var _local15:icecreamIcon_mc;
var _local16:gigIcon_mc;
var _local17:stadiumIcon_mc;
var _local18:themeparkIcon_mc;
var _local19:weddingIcon_mc;
var _local20:bubbleRed_mc;
var _local21:partyIcon_mc;
var _local22:icecreamIcon_mc;
var _local23:gigIcon_mc;
var _local24:stadiumIcon_mc;
var _local25:themeparkIcon_mc;
var _local26:weddingIcon_mc;
var _local27:bubbleTurquoise_mc;
var _local28:partyIcon_mc;
var _local29:icecreamIcon_mc;
var _local30:gigIcon_mc;
var _local31:stadiumIcon_mc;
var _local32:themeparkIcon_mc;
var _local33:weddingIcon_mc;
var _local34:bubblePink_mc;
var _local35:partyIcon_mc;
var _local36:icecreamIcon_mc;
var _local37:gigIcon_mc;
var _local38:stadiumIcon_mc;
var _local39:themeparkIcon_mc;
var _local40:weddingIcon_mc;
var _local41:bubbleYellow_mc;
var _local42:partyIcon_mc;
var _local43:icecreamIcon_mc;
var _local44:gigIcon_mc;
var _local45:stadiumIcon_mc;
var _local46:themeparkIcon_mc;
var _local47:weddingIcon_mc;
gameBackground = new gameBackground_mc();
motherCanvas.addChild(gameBackground);
if (cameFromLevelUp == false){
gameBackgroundTween = new Tween(gameBackground, "x", Back.easeOut, -(gameBackground.width), 0, 1, true);
gameBackgroundTween.addEventListener(TweenEvent.MOTION_FINISH, showWindowFrame);
} else {
windowFrame = new windowFrame_mc();
motherCanvas.addChild(windowFrame);
windowFrame.mouseEnabled = false;
windowFrameAdded = true;
cameFromLevelUp = false;
};
_local1 = 0;
if (destinationBlue[currentLevel] != undefined){
_local1++;
_local6 = new bubbleBlue_mc();
gameBackground.gui.addChild(_local6);
_local6.x = bubblePos[_local1].x;
_local6.y = bubblePos[_local1].y;
if (destinationBlue[currentLevel] == "partyHouse"){
_local7 = new partyIcon_mc();
_local6.addChild(_local7);
_local7.x = partyIconPos.x;
_local7.y = partyIconPos.y;
};
if (destinationBlue[currentLevel] == "icecreamShop"){
_local8 = new icecreamIcon_mc();
_local6.addChild(_local8);
_local8.x = icecreamIconPos.x;
_local8.y = icecreamIconPos.y;
};
if (destinationBlue[currentLevel] == "gig"){
_local9 = new gigIcon_mc();
_local6.addChild(_local9);
_local9.x = gigIconPos.x;
_local9.y = gigIconPos.y;
};
if (destinationBlue[currentLevel] == "stadium"){
_local10 = new stadiumIcon_mc();
_local6.addChild(_local10);
_local10.x = stadiumIconPos.x;
_local10.y = stadiumIconPos.y;
};
if (destinationBlue[currentLevel] == "themepark"){
_local11 = new themeparkIcon_mc();
_local6.addChild(_local11);
_local11.x = themeparkIconPos.x;
_local11.y = themeparkIconPos.y;
};
if (destinationBlue[currentLevel] == "wedding"){
_local12 = new weddingIcon_mc();
_local6.addChild(_local12);
_local12.x = weddingIconPos.x;
_local12.y = weddingIconPos.y;
};
};
if (destinationGreen[currentLevel] != undefined){
_local1++;
_local13 = new bubbleGreen_mc();
gameBackground.gui.addChild(_local13);
_local13.x = bubblePos[_local1].x;
_local13.y = bubblePos[_local1].y;
if (destinationGreen[currentLevel] == "partyHouse"){
_local14 = new partyIcon_mc();
_local13.addChild(_local14);
_local14.x = partyIconPos.x;
_local14.y = partyIconPos.y;
};
if (destinationGreen[currentLevel] == "icecreamShop"){
_local15 = new icecreamIcon_mc();
_local13.addChild(_local15);
_local15.x = icecreamIconPos.x;
_local15.y = icecreamIconPos.y;
};
if (destinationGreen[currentLevel] == "gig"){
_local16 = new gigIcon_mc();
_local13.addChild(_local16);
_local16.x = gigIconPos.x;
_local16.y = gigIconPos.y;
};
if (destinationGreen[currentLevel] == "stadium"){
_local17 = new stadiumIcon_mc();
_local13.addChild(_local17);
_local17.x = stadiumIconPos.x;
_local17.y = stadiumIconPos.y;
};
if (destinationGreen[currentLevel] == "themepark"){
_local18 = new themeparkIcon_mc();
_local13.addChild(_local18);
_local18.x = themeparkIconPos.x;
_local18.y = themeparkIconPos.y;
};
if (destinationGreen[currentLevel] == "wedding"){
_local19 = new weddingIcon_mc();
_local13.addChild(_local19);
_local19.x = weddingIconPos.x;
_local19.y = weddingIconPos.y;
};
};
if (destinationRed[currentLevel] != undefined){
_local1++;
_local20 = new bubbleRed_mc();
gameBackground.gui.addChild(_local20);
_local20.x = bubblePos[_local1].x;
_local20.y = bubblePos[_local1].y;
if (destinationRed[currentLevel] == "partyHouse"){
_local21 = new partyIcon_mc();
_local20.addChild(_local21);
_local21.x = partyIconPos.x;
_local21.y = partyIconPos.y;
};
if (destinationRed[currentLevel] == "icecreamShop"){
_local22 = new icecreamIcon_mc();
_local20.addChild(_local22);
_local22.x = icecreamIconPos.x;
_local22.y = icecreamIconPos.y;
};
if (destinationRed[currentLevel] == "gig"){
_local23 = new gigIcon_mc();
_local20.addChild(_local23);
_local23.x = gigIconPos.x;
_local23.y = gigIconPos.y;
};
if (destinationRed[currentLevel] == "stadium"){
_local24 = new stadiumIcon_mc();
_local20.addChild(_local24);
_local24.x = stadiumIconPos.x;
_local24.y = stadiumIconPos.y;
};
if (destinationRed[currentLevel] == "themepark"){
_local25 = new themeparkIcon_mc();
_local20.addChild(_local25);
_local25.x = themeparkIconPos.x;
_local25.y = themeparkIconPos.y;
};
if (destinationRed[currentLevel] == "wedding"){
_local26 = new weddingIcon_mc();
_local20.addChild(_local26);
_local26.x = weddingIconPos.x;
_local26.y = weddingIconPos.y;
};
};
if (destinationTurquoise[currentLevel] != undefined){
_local1++;
_local27 = new bubbleTurquoise_mc();
gameBackground.gui.addChild(_local27);
_local27.x = bubblePos[_local1].x;
_local27.y = bubblePos[_local1].y;
if (destinationTurquoise[currentLevel] == "partyHouse"){
_local28 = new partyIcon_mc();
_local27.addChild(_local28);
_local28.x = partyIconPos.x;
_local28.y = partyIconPos.y;
};
if (destinationTurquoise[currentLevel] == "icecreamShop"){
_local29 = new icecreamIcon_mc();
_local27.addChild(_local29);
_local29.x = icecreamIconPos.x;
_local29.y = icecreamIconPos.y;
};
if (destinationTurquoise[currentLevel] == "gig"){
_local30 = new gigIcon_mc();
_local27.addChild(_local30);
_local30.x = gigIconPos.x;
_local30.y = gigIconPos.y;
};
if (destinationTurquoise[currentLevel] == "stadium"){
_local31 = new stadiumIcon_mc();
_local27.addChild(_local31);
_local31.x = stadiumIconPos.x;
_local31.y = stadiumIconPos.y;
};
if (destinationTurquoise[currentLevel] == "themepark"){
_local32 = new themeparkIcon_mc();
_local27.addChild(_local32);
_local32.x = themeparkIconPos.x;
_local32.y = themeparkIconPos.y;
};
if (destinationTurquoise[currentLevel] == "wedding"){
_local33 = new weddingIcon_mc();
_local27.addChild(_local33);
_local33.x = weddingIconPos.x;
_local33.y = weddingIconPos.y;
};
};
if (destinationPink[currentLevel] != undefined){
_local1++;
_local34 = new bubblePink_mc();
gameBackground.gui.addChild(_local34);
_local34.x = bubblePos[_local1].x;
_local34.y = bubblePos[_local1].y;
if (destinationPink[currentLevel] == "partyHouse"){
_local35 = new partyIcon_mc();
_local34.addChild(_local35);
_local35.x = partyIconPos.x;
_local35.y = partyIconPos.y;
};
if (destinationPink[currentLevel] == "icecreamShop"){
_local36 = new icecreamIcon_mc();
_local34.addChild(_local36);
_local36.x = icecreamIconPos.x;
_local36.y = icecreamIconPos.y;
};
if (destinationPink[currentLevel] == "gig"){
_local37 = new gigIcon_mc();
_local34.addChild(_local37);
_local37.x = gigIconPos.x;
_local37.y = gigIconPos.y;
};
if (destinationPink[currentLevel] == "stadium"){
_local38 = new stadiumIcon_mc();
_local34.addChild(_local38);
_local38.x = stadiumIconPos.x;
_local38.y = stadiumIconPos.y;
};
if (destinationPink[currentLevel] == "themepark"){
_local39 = new themeparkIcon_mc();
_local34.addChild(_local39);
_local39.x = themeparkIconPos.x;
_local39.y = themeparkIconPos.y;
};
if (destinationPink[currentLevel] == "wedding"){
_local40 = new weddingIcon_mc();
_local34.addChild(_local40);
_local40.x = weddingIconPos.x;
_local40.y = weddingIconPos.y;
};
};
if (destinationYellow[currentLevel] != undefined){
_local1++;
_local41 = new bubbleYellow_mc();
gameBackground.gui.addChild(_local41);
_local41.x = bubblePos[_local1].x;
_local41.y = bubblePos[_local1].y;
if (destinationYellow[currentLevel] == "partyHouse"){
_local42 = new partyIcon_mc();
_local41.addChild(_local42);
_local42.x = partyIconPos.x;
_local42.y = partyIconPos.y;
};
if (destinationYellow[currentLevel] == "icecreamShop"){
_local43 = new icecreamIcon_mc();
_local41.addChild(_local43);
_local43.x = icecreamIconPos.x;
_local43.y = icecreamIconPos.y;
};
if (destinationYellow[currentLevel] == "gig"){
_local44 = new gigIcon_mc();
_local41.addChild(_local44);
_local44.x = gigIconPos.x;
_local44.y = gigIconPos.y;
};
if (destinationYellow[currentLevel] == "stadium"){
_local45 = new stadiumIcon_mc();
_local41.addChild(_local45);
_local45.x = stadiumIconPos.x;
_local45.y = stadiumIconPos.y;
};
if (destinationYellow[currentLevel] == "themepark"){
_local46 = new themeparkIcon_mc();
_local41.addChild(_local46);
_local46.x = themeparkIconPos.x;
_local46.y = themeparkIconPos.y;
};
if (destinationYellow[currentLevel] == "wedding"){
_local47 = new weddingIcon_mc();
_local41.addChild(_local47);
_local47.x = weddingIconPos.x;
_local47.y = weddingIconPos.y;
};
};
gameBackground.gui.clockMaskRight.visible = false;
blurb = new blurb_mc();
gameBackground.viewport.addChild(blurb);
blurb.level.text = (("Level " + String(currentLevel)) + " ");
blurb.blurbContent.text = levelBlurb[currentLevel];
countdownStart = levelTime[currentLevel];
_local2 = int((countdownStart / 60));
_local3 = (countdownStart - (_local2 * 60));
_local4 = int((_local3 / 10));
_local5 = (_local3 - (_local4 * 10));
gameBackground.gui.countdownDisplay.text = (((String(_local2) + ":") + String(_local4)) + String(_local5));
bonus = 0;
updateBonusDisplay();
blurb.startButton.addEventListener(MouseEvent.MOUSE_UP, initialiseGame);
}
public function removeHighscores(_arg1:TweenEvent):void{
highscoresTween.removeEventListener(TweenEvent.MOTION_FINISH, removeHighscores);
motherCanvas.removeChild(highscores);
}
public function createLevel(_arg1:uint):void{
var _local2:levelContainer_mc;
var _local3:*;
var _local4:*;
var _local5:DisplayObject;
gridX = 0;
while (gridX <= 15) {
gridY = 0;
while (gridY <= 15) {
objectArray[gridX][gridY] = 0;
gridY++;
};
gridX++;
};
npcArray = new Array();
sceneryCanvas = new MovieClip();
gameBackground.viewport.addChild(sceneryCanvas);
backgroundImage = new backgroundImage_mc();
sceneryCanvas.addChild(backgroundImage);
gameCanvas = new MovieClip();
gameBackground.viewport.addChild(gameCanvas);
borderCanvas = new MovieClip();
gameBackground.viewport.addChild(borderCanvas);
npcCanvas = new MovieClip();
gameBackground.viewport.addChild(npcCanvas);
lidCanvas = new MovieClip();
gameBackground.viewport.addChild(lidCanvas);
selector = new selector_mc();
gameBackground.viewport.addChild(selector);
selector.hotspot.addEventListener(MouseEvent.MOUSE_DOWN, placeArrow);
selector.alpha = 0.5;
selector.arrowUp.gotoAndStop(1);
selector.arrowDown.gotoAndStop(1);
selector.arrowRight.gotoAndStop(1);
selector.arrowLeft.gotoAndStop(1);
selector.arrowClear.gotoAndStop(1);
_local2 = new levelContainer_mc();
_local3 = _local2.getChildAt((_arg1 - 1));
_local4 = 0;
while (_local4 < _local3.numChildren) {
_local5 = _local3.getChildAt(_local4);
if ((_local5 is wall_template)){
makeWall(_local5.x, _local5.y);
};
if ((_local5 is tree_template)){
makeTree(_local5.x, _local5.y);
};
if ((_local5 is path1_template)){
makePath1(_local5.x, _local5.y);
};
if ((_local5 is path3_template)){
makePath3(_local5.x, _local5.y);
};
if ((_local5 is path7_template)){
makePath7(_local5.x, _local5.y);
};
if ((_local5 is path9_template)){
makePath9(_local5.x, _local5.y);
};
if ((_local5 is pathH_template)){
makePathH(_local5.x, _local5.y);
};
if ((_local5 is pathV_template)){
makePathV(_local5.x, _local5.y);
};
if ((_local5 is pathT_template)){
makePathT(_local5.x, _local5.y);
};
if ((_local5 is pathT2_template)){
makePathT2(_local5.x, _local5.y);
};
if ((_local5 is pathX_template)){
makePathX(_local5.x, _local5.y);
};
if ((_local5 is npcBlueB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "blueB");
};
if ((_local5 is npcBlueW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "blueW");
};
if ((_local5 is npcGreenB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "greenB");
};
if ((_local5 is npcGreenW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "greenW");
};
if ((_local5 is npcPinkB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "pinkB");
};
if ((_local5 is npcPinkW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "pinkW");
};
if ((_local5 is npcRedB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "redB");
};
if ((_local5 is npcRedW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "redW");
};
if ((_local5 is npcTurquoiseB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "turquoiseB");
};
if ((_local5 is npcTurquoiseW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "turquoiseW");
};
if ((_local5 is npcYellowB_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "yellowB");
};
if ((_local5 is npcYellowW_template)){
makeNPC(_local5.x, _local5.y, _local5.rotation, "yellowW");
};
if ((_local5 is partyHouse_template)){
makeTarget(_local5.x, _local5.y, "partyHouse");
};
if ((_local5 is icecreamShop_template)){
makeTarget(_local5.x, _local5.y, "icecreamShop");
};
if ((_local5 is gig_template)){
makeTarget(_local5.x, _local5.y, "gig");
};
if ((_local5 is stadium_template)){
makeTarget(_local5.x, _local5.y, "stadium");
};
if ((_local5 is themepark_template)){
makeTarget(_local5.x, _local5.y, "themepark");
};
if ((_local5 is wedding_template)){
makeTarget(_local5.x, _local5.y, "wedding");
};
_local4++;
};
}
public function placeArrowRight(_arg1:MouseEvent):void{
var _local2:arrow_mc;
arrowPlacedSound.play();
gridX = int((selector.x / 24));
gridY = int((selector.y / 24));
if (objectArray[gridX][gridY] != 0){
if (objectArray[gridX][gridY].id == "arrow"){
gameCanvas.removeChild(objectArray[gridX][gridY]);
};
};
_local2 = new arrow_mc();
objectArray[gridX][gridY] = _local2;
objectArray[gridX][gridY].id = "arrow";
objectArray[gridX][gridY].dir = "right";
objectArray[gridX][gridY].gotoAndStop("right");
gameCanvas.addChild(objectArray[gridX][gridY]);
objectArray[gridX][gridY].x = (gridX * 24);
objectArray[gridX][gridY].y = (gridY * 24);
zSort(gameCanvas);
restoreSelector();
}
public function gameOver():void{
countdownRunning = false;
gameRunning = false;
if (startMusicAtBeginning == false){
musicChannel.stop();
};
stopGame();
gameOverScreen = new gameOverScreen_mc();
gameBackground.viewport.addChild(gameOverScreen);
gameOverScreen.playerName.stage.focus;
if (gameWon == false){
gameOverScreen.message1.text = "Time's Up!";
gameEndSound.play();
} else {
gameOverScreen.message1.text = "Congratulations";
};
if (gameWon == false){
gameOverScreen.message2.text = ("You scored " + String(score));
} else {
gameOverScreen.message2.text = (("You cleared all levels and scored " + String(score)) + ". You're brilliant!");
};
gameOverScreen.message3.text = "Enter your name into the Hi Score table!";
gameOverScreen.continueButton.addEventListener(MouseEvent.MOUSE_DOWN, removeGameOverScreen);
gameOverScreen.submitButton.addEventListener(MouseEvent.MOUSE_DOWN, submitHighscore);
gameOverScreen.playerName.stage.focus = gameOverScreen.playerName;
gameOverScreen.replayButton.addEventListener(MouseEvent.MOUSE_DOWN, replayLevel);
gameOverScreen.banner.addEventListener(MouseEvent.MOUSE_DOWN, followLink);
}
}
}//package photoboxland_fla
Section 12
//arrow_mc (arrow_mc)
package {
import flash.display.*;
public dynamic class arrow_mc extends MovieClip {
public function arrow_mc(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package
Section 13
//arrowPlaced (arrowPlaced)
package {
import flash.media.*;
public dynamic class arrowPlaced extends Sound {
}
}//package
Section 14
//backgroundImage_mc (backgroundImage_mc)
package {
import flash.display.*;
public dynamic class backgroundImage_mc extends MovieClip {
}
}//package
Section 15
//blankScreen_mc (blankScreen_mc)
package {
import flash.display.*;
public dynamic class blankScreen_mc extends MovieClip {
}
}//package
Section 16
//blurb_mc (blurb_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class blurb_mc extends MovieClip {
public var blurbContent:TextField;
public var startButton:SimpleButton;
public var level:TextField;
}
}//package
Section 17
//bubbleBlue_mc (bubbleBlue_mc)
package {
import flash.display.*;
public dynamic class bubbleBlue_mc extends MovieClip {
public var blueGuy:npcBlueW_template;
public var blueBubble:MovieClip;
}
}//package
Section 18
//bubbleGreen_mc (bubbleGreen_mc)
package {
import flash.display.*;
public dynamic class bubbleGreen_mc extends MovieClip {
public var blueBubble:MovieClip;
}
}//package
Section 19
//bubblePink_mc (bubblePink_mc)
package {
import flash.display.*;
public dynamic class bubblePink_mc extends MovieClip {
public var blueBubble:MovieClip;
}
}//package
Section 20
//bubbleRed_mc (bubbleRed_mc)
package {
import flash.display.*;
public dynamic class bubbleRed_mc extends MovieClip {
public var blueBubble:MovieClip;
}
}//package
Section 21
//bubbleTurquoise_mc (bubbleTurquoise_mc)
package {
import flash.display.*;
public dynamic class bubbleTurquoise_mc extends MovieClip {
public var blueBubble:MovieClip;
}
}//package
Section 22
//bubbleYellow_mc (bubbleYellow_mc)
package {
import flash.display.*;
public dynamic class bubbleYellow_mc extends MovieClip {
public var blueBubble:MovieClip;
}
}//package
Section 23
//camera (camera)
package {
import flash.media.*;
public dynamic class camera extends Sound {
}
}//package
Section 24
//confirmQuit_mc (confirmQuit_mc)
package {
import flash.display.*;
public dynamic class confirmQuit_mc extends MovieClip {
public var noButton:SimpleButton;
public var yesButton:SimpleButton;
}
}//package
Section 25
//cross_mc (cross_mc)
package {
import flash.display.*;
public dynamic class cross_mc extends MovieClip {
}
}//package
Section 26
//debug_mc (debug_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class debug_mc extends MovieClip {
public var txt:TextField;
}
}//package
Section 27
//dummy_mc (dummy_mc)
package {
import flash.display.*;
public dynamic class dummy_mc extends MovieClip {
public var hitZone:hitZone_mc;
}
}//package
Section 28
//gameBackground_mc (gameBackground_mc)
package {
import flash.display.*;
public dynamic class gameBackground_mc extends MovieClip {
public var gui:MovieClip;
public var viewport:MovieClip;
}
}//package
Section 29
//gameEnd (gameEnd)
package {
import flash.media.*;
public dynamic class gameEnd extends Sound {
}
}//package
Section 30
//gameOverScreen_mc (gameOverScreen_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class gameOverScreen_mc extends MovieClip {
public var message2:TextField;
public var message3:TextField;
public var message1:TextField;
public var banner:SimpleButton;
public var playerName:TextField;
public var submitButton:SimpleButton;
public var continueButton:SimpleButton;
public var replayButton:SimpleButton;
}
}//package
Section 31
//gig_mc (gig_mc)
package {
import flash.display.*;
public dynamic class gig_mc extends MovieClip {
}
}//package
Section 32
//gig_template (gig_template)
package {
import flash.display.*;
public dynamic class gig_template extends MovieClip {
}
}//package
Section 33
//gigIcon_mc (gigIcon_mc)
package {
import flash.display.*;
public dynamic class gigIcon_mc extends MovieClip {
}
}//package
Section 34
//gigLid_mc (gigLid_mc)
package {
import flash.display.*;
public dynamic class gigLid_mc extends MovieClip {
}
}//package
Section 35
//highscores_mc (highscores_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class highscores_mc extends MovieClip {
public var menuButton:SimpleButton;
public var nameDisplay:TextField;
public var scoreDisplay:TextField;
public var connectingDisplay:TextField;
public var rankDisplay:TextField;
}
}//package
Section 36
//hitZone_mc (hitZone_mc)
package {
import flash.display.*;
public dynamic class hitZone_mc extends MovieClip {
}
}//package
Section 37
//homeZone_mc (homeZone_mc)
package {
import flash.display.*;
public dynamic class homeZone_mc extends MovieClip {
}
}//package
Section 38
//hotspot_bt (hotspot_bt)
package {
import flash.display.*;
public dynamic class hotspot_bt extends SimpleButton {
}
}//package
Section 39
//icecreamIcon_mc (icecreamIcon_mc)
package {
import flash.display.*;
public dynamic class icecreamIcon_mc extends MovieClip {
}
}//package
Section 40
//icecreamShop_mc (icecreamShop_mc)
package {
import flash.display.*;
public dynamic class icecreamShop_mc extends MovieClip {
}
}//package
Section 41
//icecreamShop_template (icecreamShop_template)
package {
import flash.display.*;
public dynamic class icecreamShop_template extends MovieClip {
}
}//package
Section 42
//icecreamShopLid_mc (icecreamShopLid_mc)
package {
import flash.display.*;
public dynamic class icecreamShopLid_mc extends MovieClip {
}
}//package
Section 43
//instructions_mc (instructions_mc)
package {
import flash.display.*;
public dynamic class instructions_mc extends MovieClip {
public var menuButton:SimpleButton;
}
}//package
Section 44
//levelContainer_mc (levelContainer_mc)
package {
import flash.display.*;
public dynamic class levelContainer_mc extends MovieClip {
}
}//package
Section 45
//levelSelect_mc (levelSelect_mc)
package {
import flash.display.*;
public dynamic class levelSelect_mc extends MovieClip {
public var levelButtonHolder:MovieClip;
public var menuButton:SimpleButton;
public var arrowRight:SimpleButton;
public var arrowLeft:SimpleButton;
}
}//package
Section 46
//levelThumb (levelThumb)
package {
import flash.display.*;
public dynamic class levelThumb extends SimpleButton {
}
}//package
Section 47
//levelUp_mc (levelUp_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class levelUp_mc extends MovieClip {
public var message1:TextField;
public var continueButton:SimpleButton;
}
}//package
Section 48
//marker_mc (marker_mc)
package {
import flash.display.*;
public dynamic class marker_mc extends MovieClip {
}
}//package
Section 49
//menu_mc (menu_mc)
package {
import flash.display.*;
public dynamic class menu_mc extends MovieClip {
public var iconGuy:npcGreenW_template;
public var instructionsButton:SimpleButton;
public var highscoresButton:SimpleButton;
public var playButton:SimpleButton;
}
}//package
Section 50
//MochiBot (MochiBot)
package {
import flash.display.*;
import flash.net.*;
import flash.system.*;
public dynamic class MochiBot extends Sprite {
public static function track(_arg1:Sprite, _arg2:String):MochiBot{
var _local3:MochiBot;
var _local4:String;
var _local5:URLVariables;
var _local6:String;
var _local7:URLRequest;
var _local8:Loader;
if (Security.sandboxType == "localWithFile"){
return (null);
};
_local3 = new (MochiBot);
_arg1.addChild(_local3);
Security.allowDomain("*");
Security.allowInsecureDomain("*");
_local4 = "http://core.mochibot.com/my/core.swf";
_local5 = new URLVariables();
_local5["sb"] = Security.sandboxType;
_local5["v"] = Capabilities.version;
_local5["swfid"] = _arg2;
_local5["mv"] = "8";
_local5["fv"] = "9";
_local6 = _local3.root.loaderInfo.loaderURL;
if (_local6.indexOf("http") == 0){
_local5["url"] = _local6;
} else {
_local5["url"] = "local";
};
_local7 = new URLRequest(_local4);
_local7.contentType = "application/x-www-form-urlencoded";
_local7.method = URLRequestMethod.POST;
_local7.data = _local5;
_local8 = new Loader();
_local3.addChild(_local8);
_local8.load(_local7);
return (_local3);
}
}
}//package
Section 51
//musicLoop (musicLoop)
package {
import flash.media.*;
public dynamic class musicLoop extends Sound {
}
}//package
Section 52
//npcBlueB_mc (npcBlueB_mc)
package {
import flash.display.*;
public dynamic class npcBlueB_mc extends MovieClip {
public function npcBlueB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 53
//npcBlueB_template (npcBlueB_template)
package {
import flash.display.*;
public dynamic class npcBlueB_template extends MovieClip {
}
}//package
Section 54
//npcBlueW_mc (npcBlueW_mc)
package {
import flash.display.*;
public dynamic class npcBlueW_mc extends MovieClip {
public function npcBlueW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 55
//npcBlueW_template (npcBlueW_template)
package {
import flash.display.*;
public dynamic class npcBlueW_template extends MovieClip {
}
}//package
Section 56
//npcGreenB_mc (npcGreenB_mc)
package {
import flash.display.*;
public dynamic class npcGreenB_mc extends MovieClip {
public function npcGreenB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 57
//npcGreenB_template (npcGreenB_template)
package {
import flash.display.*;
public dynamic class npcGreenB_template extends MovieClip {
}
}//package
Section 58
//npcGreenW_mc (npcGreenW_mc)
package {
import flash.display.*;
public dynamic class npcGreenW_mc extends MovieClip {
public function npcGreenW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 59
//npcGreenW_template (npcGreenW_template)
package {
import flash.display.*;
public dynamic class npcGreenW_template extends MovieClip {
}
}//package
Section 60
//npcPinkB_mc (npcPinkB_mc)
package {
import flash.display.*;
public dynamic class npcPinkB_mc extends MovieClip {
public function npcPinkB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 61
//npcPinkB_template (npcPinkB_template)
package {
import flash.display.*;
public dynamic class npcPinkB_template extends MovieClip {
}
}//package
Section 62
//npcPinkW_mc (npcPinkW_mc)
package {
import flash.display.*;
public dynamic class npcPinkW_mc extends MovieClip {
public function npcPinkW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 63
//npcPinkW_template (npcPinkW_template)
package {
import flash.display.*;
public dynamic class npcPinkW_template extends MovieClip {
}
}//package
Section 64
//npcRedB_mc (npcRedB_mc)
package {
import flash.display.*;
public dynamic class npcRedB_mc extends MovieClip {
public function npcRedB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 65
//npcRedB_template (npcRedB_template)
package {
import flash.display.*;
public dynamic class npcRedB_template extends MovieClip {
}
}//package
Section 66
//npcRedW_mc (npcRedW_mc)
package {
import flash.display.*;
public dynamic class npcRedW_mc extends MovieClip {
public function npcRedW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 67
//npcRedW_template (npcRedW_template)
package {
import flash.display.*;
public dynamic class npcRedW_template extends MovieClip {
}
}//package
Section 68
//npcTurquoiseB_mc (npcTurquoiseB_mc)
package {
import flash.display.*;
public dynamic class npcTurquoiseB_mc extends MovieClip {
public function npcTurquoiseB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 69
//npcTurquoiseB_template (npcTurquoiseB_template)
package {
import flash.display.*;
public dynamic class npcTurquoiseB_template extends MovieClip {
}
}//package
Section 70
//npcTurquoiseW_mc (npcTurquoiseW_mc)
package {
import flash.display.*;
public dynamic class npcTurquoiseW_mc extends MovieClip {
public function npcTurquoiseW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 71
//npcTurquoiseW_template (npcTurquoiseW_template)
package {
import flash.display.*;
public dynamic class npcTurquoiseW_template extends MovieClip {
}
}//package
Section 72
//npcYellowB_mc (npcYellowB_mc)
package {
import flash.display.*;
public dynamic class npcYellowB_mc extends MovieClip {
public function npcYellowB_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 73
//npcYellowB_template (npcYellowB_template)
package {
import flash.display.*;
public dynamic class npcYellowB_template extends MovieClip {
}
}//package
Section 74
//npcYellowW_mc (npcYellowW_mc)
package {
import flash.display.*;
public dynamic class npcYellowW_mc extends MovieClip {
public function npcYellowW_mc(){
addFrameScript(11, frame12, 23, frame24, 35, frame36, 47, frame48);
}
function frame12(){
gotoAndPlay("up");
}
function frame24(){
gotoAndPlay("down");
}
function frame36(){
gotoAndPlay("left");
}
function frame48(){
gotoAndPlay("right");
}
}
}//package
Section 75
//npcYellowW_template (npcYellowW_template)
package {
import flash.display.*;
public dynamic class npcYellowW_template extends MovieClip {
}
}//package
Section 76
//padlock_mc (padlock_mc)
package {
import flash.display.*;
public dynamic class padlock_mc extends MovieClip {
}
}//package
Section 77
//partyHouse_mc (partyHouse_mc)
package {
import flash.display.*;
public dynamic class partyHouse_mc extends MovieClip {
}
}//package
Section 78
//partyHouse_template (partyHouse_template)
package {
import flash.display.*;
public dynamic class partyHouse_template extends MovieClip {
}
}//package
Section 79
//partyHouseLid_mc (partyHouseLid_mc)
package {
import flash.display.*;
public dynamic class partyHouseLid_mc extends MovieClip {
}
}//package
Section 80
//partyIcon_mc (partyIcon_mc)
package {
import flash.display.*;
public dynamic class partyIcon_mc extends MovieClip {
}
}//package
Section 81
//path_mc (path_mc)
package {
import flash.display.*;
public dynamic class path_mc extends MovieClip {
}
}//package
Section 82
//path1_template (path1_template)
package {
import flash.display.*;
public dynamic class path1_template extends MovieClip {
}
}//package
Section 83
//path3_template (path3_template)
package {
import flash.display.*;
public dynamic class path3_template extends MovieClip {
}
}//package
Section 84
//path7_template (path7_template)
package {
import flash.display.*;
public dynamic class path7_template extends MovieClip {
}
}//package
Section 85
//path9_template (path9_template)
package {
import flash.display.*;
public dynamic class path9_template extends MovieClip {
}
}//package
Section 86
//pathH_template (pathH_template)
package {
import flash.display.*;
public dynamic class pathH_template extends MovieClip {
}
}//package
Section 87
//pathT_template (pathT_template)
package {
import flash.display.*;
public dynamic class pathT_template extends MovieClip {
}
}//package
Section 88
//pathT2_template (pathT2_template)
package {
import flash.display.*;
public dynamic class pathT2_template extends MovieClip {
}
}//package
Section 89
//pathV_template (pathV_template)
package {
import flash.display.*;
public dynamic class pathV_template extends MovieClip {
}
}//package
Section 90
//pathX_template (pathX_template)
package {
import flash.display.*;
public dynamic class pathX_template extends MovieClip {
}
}//package
Section 91
//photoGig_mc (photoGig_mc)
package {
import flash.display.*;
public dynamic class photoGig_mc extends MovieClip {
}
}//package
Section 92
//photoIcecream_mc (photoIcecream_mc)
package {
import flash.display.*;
public dynamic class photoIcecream_mc extends MovieClip {
}
}//package
Section 93
//photoParty_mc (photoParty_mc)
package {
import flash.display.*;
public dynamic class photoParty_mc extends MovieClip {
}
}//package
Section 94
//photoStadium_mc (photoStadium_mc)
package {
import flash.display.*;
public dynamic class photoStadium_mc extends MovieClip {
}
}//package
Section 95
//photoThemepark_mc (photoThemepark_mc)
package {
import flash.display.*;
public dynamic class photoThemepark_mc extends MovieClip {
}
}//package
Section 96
//photoWedding_mc (photoWedding_mc)
package {
import flash.display.*;
public dynamic class photoWedding_mc extends MovieClip {
}
}//package
Section 97
//preloader_mc (preloader_mc)
package {
import flash.display.*;
import flash.text.*;
public dynamic class preloader_mc extends MovieClip {
public var loadingBar:MovieClip;
public var loadingText:TextField;
}
}//package
Section 98
//rollover (rollover)
package {
import flash.media.*;
public dynamic class rollover extends Sound {
}
}//package
Section 99
//selector_mc (selector_mc)
package {
import flash.display.*;
public dynamic class selector_mc extends MovieClip {
public var arrowDown:MovieClip;
public var arrowUp:MovieClip;
public var arrowRight:MovieClip;
public var arrowLeft:MovieClip;
public var hotspot:MovieClip;
public var arrowClear:MovieClip;
}
}//package
Section 100
//soundIcon_mc (soundIcon_mc)
package {
import flash.display.*;
public dynamic class soundIcon_mc extends MovieClip {
public var cross:cross_mc;
public function soundIcon_mc(){
addFrameScript(0, frame1, 1, frame2);
}
function frame1(){
stop();
}
function frame2(){
stop();
}
}
}//package
Section 101
//square_mc (square_mc)
package {
import flash.display.*;
public dynamic class square_mc extends MovieClip {
}
}//package
Section 102
//stadium_mc (stadium_mc)
package {
import flash.display.*;
public dynamic class stadium_mc extends MovieClip {
}
}//package
Section 103
//stadium_template (stadium_template)
package {
import flash.display.*;
public dynamic class stadium_template extends MovieClip {
}
}//package
Section 104
//stadiumIcon_mc (stadiumIcon_mc)
package {
import flash.display.*;
public dynamic class stadiumIcon_mc extends MovieClip {
}
}//package
Section 105
//stadiumLid_mc (stadiumLid_mc)
package {
import flash.display.*;
public dynamic class stadiumLid_mc extends MovieClip {
}
}//package
Section 106
//targetReached (targetReached)
package {
import flash.media.*;
public dynamic class targetReached extends Sound {
}
}//package
Section 107
//themepark_mc (themepark_mc)
package {
import flash.display.*;
public dynamic class themepark_mc extends MovieClip {
}
}//package
Section 108
//themepark_template (themepark_template)
package {
import flash.display.*;
public dynamic class themepark_template extends MovieClip {
}
}//package
Section 109
//themeparkIcon_mc (themeparkIcon_mc)
package {
import flash.display.*;
public dynamic class themeparkIcon_mc extends MovieClip {
}
}//package
Section 110
//themeparkLid_mc (themeparkLid_mc)
package {
import flash.display.*;
public dynamic class themeparkLid_mc extends MovieClip {
}
}//package
Section 111
//tree_mc (tree_mc)
package {
import flash.display.*;
public dynamic class tree_mc extends MovieClip {
public var hitZone:hitZone_mc;
}
}//package
Section 112
//tree_template (tree_template)
package {
import flash.display.*;
public dynamic class tree_template extends MovieClip {
}
}//package
Section 113
//wall_mc (wall_mc)
package {
import flash.display.*;
public dynamic class wall_mc extends MovieClip {
public var hitZone:hitZone_mc;
}
}//package
Section 114
//wall_template (wall_template)
package {
import flash.display.*;
public dynamic class wall_template extends MovieClip {
}
}//package
Section 115
//wedding_mc (wedding_mc)
package {
import flash.display.*;
public dynamic class wedding_mc extends MovieClip {
}
}//package
Section 116
//wedding_template (wedding_template)
package {
import flash.display.*;
public dynamic class wedding_template extends MovieClip {
}
}//package
Section 117
//weddingIcon_mc (weddingIcon_mc)
package {
import flash.display.*;
public dynamic class weddingIcon_mc extends MovieClip {
}
}//package
Section 118
//weddingLid_mc (weddingLid_mc)
package {
import flash.display.*;
public dynamic class weddingLid_mc extends MovieClip {
}
}//package
Section 119
//windowFrame_mc (windowFrame_mc)
package {
import flash.display.*;
public dynamic class windowFrame_mc extends MovieClip {
}
}//package