Section 1
//Regular (fl.transitions.easing.Regular)
package fl.transitions.easing {
public class Regular {
public static function easeIn(_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
_arg1 = (_arg1 / _arg4);
return ((((_arg3 * _arg1) * _arg1) + _arg2));
}
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 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 2
//Tween (fl.transitions.Tween)
package fl.transitions {
import flash.events.*;
import flash.utils.*;
import flash.display.*;
public class Tween extends EventDispatcher {
public var isPlaying:Boolean;// = false
public var obj:Object;// = null
public var prop:String;// = ""
public var func:Function;
public var begin:Number;// = NAN
public var change:Number;// = NAN
public var useSeconds:Boolean;// = false
public var prevTime:Number;// = NAN
public var prevPos:Number;// = NAN
public var looping:Boolean;// = false
private var _duration:Number;// = NAN
private var _time:Number;// = NAN
private var _fps:Number;// = NAN
private var _position:Number;// = NAN
private var _startTime:Number;// = NAN
private var _intervalID:uint;// = 0
private var _finish:Number;// = NAN
private var _timer:Timer;// = null
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){
this.func = function (_arg1:Number, _arg2:Number, _arg3:Number, _arg4:Number):Number{
return ((((_arg3 * _arg1) / _arg4) + _arg2));
};
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 get time():Number{
return (this._time);
}
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();
};
};
}
public function get duration():Number{
return (this._duration);
}
public function set duration(_arg1:Number):void{
this._duration = ((_arg1)<=0) ? Infinity : _arg1;
}
public function get FPS():Number{
return (this._fps);
}
public function set FPS(_arg1:Number):void{
var _local2:Boolean = this.isPlaying;
this.stopEnterFrame();
this._fps = _arg1;
if (_local2){
this.startEnterFrame();
};
}
public function get position():Number{
return (this.getPosition(this._time));
}
public function set position(_arg1:Number):void{
this.setPosition(_arg1);
}
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 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 get finish():Number{
return ((this.begin + this.change));
}
public function set finish(_arg1:Number):void{
this.change = (_arg1 - this.begin);
}
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 yoyo():void{
this.continueTo(this.begin, this.time);
}
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;
}
protected function stopEnterFrame():void{
if (isNaN(this._fps)){
_mc.removeEventListener(Event.ENTER_FRAME, this.onEnterFrame);
} else {
this._timer.stop();
};
this.isPlaying = false;
}
public function start():void{
this.rewind();
this.startEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_START, this._time, this._position));
}
public function stop():void{
this.stopEnterFrame();
this.dispatchEvent(new TweenEvent(TweenEvent.MOTION_STOP, 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 rewind(_arg1:Number=0):void{
this._time = _arg1;
this.fixTime();
this.update();
}
public function fforward():void{
this.time = this._duration;
this.fixTime();
}
public function nextFrame():void{
if (this.useSeconds){
this.time = ((getTimer() - this._startTime) / 1000);
} else {
this.time = (this._time + 1);
};
}
protected function onEnterFrame(_arg1:Event):void{
this.nextFrame();
}
protected function timerHandler(_arg1:TimerEvent):void{
this.nextFrame();
_arg1.updateAfterEvent();
}
public function prevFrame():void{
if (!this.useSeconds){
this.time = (this._time - 1);
};
}
private function fixTime():void{
if (this.useSeconds){
this._startTime = (getTimer() - (this._time * 1000));
};
}
private function update():void{
this.setPosition(this.getPosition(this._time));
}
}
}//package fl.transitions
Section 3
//TweenEvent (fl.transitions.TweenEvent)
package fl.transitions {
import flash.events.*;
public class TweenEvent extends Event {
public var time:Number;// = NAN
public var position:Number;// = NAN
public static const MOTION_START:String = "motionStart";
public static const MOTION_STOP:String = "motionStop";
public static const MOTION_FINISH:String = "motionFinish";
public static const MOTION_CHANGE:String = "motionChange";
public static const MOTION_RESUME:String = "motionResume";
public static const MOTION_LOOP:String = "motionLoop";
public function TweenEvent(_arg1:String, _arg2:Number, _arg3:Number, _arg4:Boolean=false, _arg5:Boolean=false){
super(_arg1, _arg4, _arg5);
this.time = _arg2;
this.position = _arg3;
}
override public function clone():Event{
return (new TweenEvent(this.type, this.time, this.position, this.bubbles, this.cancelable));
}
}
}//package fl.transitions
Section 4
//amandaExpression_11 (Railroad57_fla.amandaExpression_11)
package Railroad57_fla {
import flash.display.*;
public dynamic class amandaExpression_11 extends MovieClip {
public function amandaExpression_11(){
addFrameScript(0, frame1, 5, frame6);
}
function frame1(){
stop();
}
function frame6(){
gotoAndPlay(2);
}
}
}//package Railroad57_fla
Section 5
//jenExpression_12 (Railroad57_fla.jenExpression_12)
package Railroad57_fla {
import flash.display.*;
public dynamic class jenExpression_12 extends MovieClip {
public function jenExpression_12(){
addFrameScript(0, frame1, 5, frame6);
}
function frame1(){
stop();
}
function frame6(){
gotoAndPlay(2);
}
}
}//package Railroad57_fla
Section 6
//kelseyExpression_10 (Railroad57_fla.kelseyExpression_10)
package Railroad57_fla {
import flash.display.*;
public dynamic class kelseyExpression_10 extends MovieClip {
public function kelseyExpression_10(){
addFrameScript(0, frame1, 5, frame6);
}
function frame1(){
stop();
}
function frame6(){
gotoAndPlay(2);
}
}
}//package Railroad57_fla
Section 7
//lebbl_25 (Railroad57_fla.lebbl_25)
package Railroad57_fla {
import flash.display.*;
public dynamic class lebbl_25 extends MovieClip {
public function lebbl_25(){
addFrameScript(17, frame18);
}
function frame18(){
gotoAndPlay(1);
}
}
}//package Railroad57_fla
Section 8
//MainTimeline (Railroad57_fla.MainTimeline)
package Railroad57_fla {
import flash.events.*;
import fl.transitions.*;
import fl.transitions.easing.*;
import flash.utils.*;
import flash.display.*;
import flash.text.*;
import adobe.utils.*;
import flash.accessibility.*;
import flash.errors.*;
import flash.external.*;
import flash.filters.*;
import flash.geom.*;
import flash.media.*;
import flash.net.*;
import flash.printing.*;
import flash.profiler.*;
import flash.sampler.*;
import flash.system.*;
import flash.ui.*;
import flash.xml.*;
public dynamic class MainTimeline extends MovieClip {
public var tile31:MovieClip;
public var tile22:MovieClip;
public var tile13:MovieClip;
public var kelL:MovieClip;
public var wagon2_3:MovieClip;
public var btnSpeed2:MovieClip;
public var tile32:MovieClip;
public var tile23:MovieClip;
public var tile14:MovieClip;
public var wagon2_2:MovieClip;
public var tile33:MovieClip;
public var tile24:MovieClip;
public var tile15:MovieClip;
public var tile1:MovieClip;
public var wagon2_1:MovieClip;
public var tile34:MovieClip;
public var tile25:MovieClip;
public var tile16:MovieClip;
public var tile2:MovieClip;
public var tile35:MovieClip;
public var tile26:MovieClip;
public var tile17:MovieClip;
public var tile3:MovieClip;
public var amL:MovieClip;
public var btnIntroStart:MovieClip;
public var restartWindow:MovieClip;
public var tile27:MovieClip;
public var tile18:MovieClip;
public var tile4:MovieClip;
public var jenR:MovieClip;
public var tile28:MovieClip;
public var tile19:MovieClip;
public var tile5:MovieClip;
public var bonusBg:MovieClip;
public var digit3b:TextField;
public var loco1:MovieClip;
public var kelR:MovieClip;
public var jenExpression:MovieClip;
public var bonusWindow:MovieClip;
public var tile29:MovieClip;
public var tile6:MovieClip;
public var digit2b:TextField;
public var loco2:MovieClip;
public var loader_mc:movie_mc;
public var loaded_txt:TextField;
public var tile7:MovieClip;
public var amandaExpression:MovieClip;
public var loco3:MovieClip;
public var tile8:MovieClip;
public var digit1:TextField;
public var loco4:MovieClip;
public var tile9:MovieClip;
public var digit2:TextField;
public var digit3:TextField;
public var milk:MovieClip;
public var btnSpeed4:MovieClip;
public var amR:MovieClip;
public var kelseyExpression:MovieClip;
public var tile10:MovieClip;
public var wagon1_3:MovieClip;
public var btnSpeed1:MovieClip;
public var tile20:MovieClip;
public var tile11:MovieClip;
public var wagon1_2:MovieClip;
public var btnSpeed0:MovieClip;
public var tile30:MovieClip;
public var tile21:MovieClip;
public var tile12:MovieClip;
public var tileTxt:TextField;
public var wagon1_1:MovieClip;
public var jenL:MovieClip;
public var btnSpeed3:MovieClip;
public var myCode:TextField;
public var bCodeUsed;
public var halfState;
public var myTween:Tween;
public var myTween2:Tween;
public var myTween3:Tween;
public var myTween4:Tween;
public var bKeyLock:Boolean;
public var tilesTurned:uint;
public var strTileNumber1:int;
public var strTileNumber2:int;
public var coolDown;
public var tmp1;
public var tmp2;
public var iPairsCollected;
public var tileArray:Array;
public var availableTiles:Array;
public var tTile;
public var myInterval:uint;
public var trainSpeed:Number;
public var bJenL:Boolean;
public var bJenR:Boolean;
public var bJenTitArm:Boolean;
public var bAmL:Boolean;
public var bAmR:Boolean;
public var bKelL:Boolean;
public var bKelR:Boolean;
public var bJenBelly:Boolean;
public var totalSeconds;
public var secondsLeft;
public var secondCounter;
public var bonusLeft;
public function MainTimeline(){
addFrameScript(0, frame1, 1, frame2);
}
public function onProgress(_arg1:ProgressEvent):void{
var _local2:Number = _arg1.target.bytesLoaded;
var _local3:Number = _arg1.target.bytesTotal;
var _local4:Number = (_local2 / _local3);
loader_mc.scaleX = _local4;
loaded_txt.text = (("Loading... " + Math.round((_local4 * 100))) + "%");
}
public function onComplete(_arg1:Event):void{
loaded_txt.text = "Finished loading.";
btnIntroStart.alpha = 1;
btnIntroStart.addEventListener(MouseEvent.CLICK, startGame);
}
public function startGame(_arg1:MouseEvent):void{
btnIntroStart.removeEventListener(MouseEvent.CLICK, startGame);
var _local2:* = "treasure";
var _local3:* = "me the ";
var _local4:* = "Give ";
var _local5:* = (((_local4 + _local3) + _local2) + "!");
if (myCode.text == _local5){
bCodeUsed = true;
};
gotoAndStop(2);
}
public function populateTileArr():void{
var _local1:* = 0;
var _local2:* = 0;
var _local3:* = 0;
var _local4:* = 0;
while (_local4 < 18) {
_local1 = availableTiles.splice(Math.floor((Math.random() * availableTiles.length)), 1);
_local2 = 0;
while (_local2 == 0) {
_local3 = Math.floor((Math.random() * tileArray.length));
if (tileArray[_local3] == 0){
tileArray[_local3] = _local1;
_local2 = 1;
};
};
_local2 = 0;
while (_local2 == 0) {
_local3 = Math.floor((Math.random() * tileArray.length));
if (tileArray[_local3] == 0){
tileArray[_local3] = _local1;
_local2 = 1;
};
};
_local4++;
};
}
public function onFinish(_arg1:TweenEvent):void{
myTween.removeEventListener(TweenEvent.MOTION_FINISH, onFinish);
}
public function onFinish2(_arg1:TweenEvent):void{
myTween2.removeEventListener(TweenEvent.MOTION_FINISH, onFinish2);
bKeyLock = false;
coolDown = 4;
}
public function onFinish3(_arg1:TweenEvent):void{
myTween3.removeEventListener(TweenEvent.MOTION_FINISH, onFinish3);
bKeyLock = false;
coolDown = 4;
}
public function onFinish4(_arg1:TweenEvent):void{
myTween4.removeEventListener(TweenEvent.MOTION_FINISH, onFinish4);
bKeyLock = false;
tTile.y = (tTile.y - 1000);
tTile.gotoAndStop(1);
tTile.scaleX = 1;
coolDown = 4;
}
public function mouseClicked(_arg1:MouseEvent):void{
var _local2:* = _arg1.target.name;
if (_local2 == "restartBtn"){
doRestart();
};
if (_local2 == "btnSpeed0"){
trainSpeed = 0;
loco1.gotoAndStop(1);
updateDial(0);
} else {
if (_local2 == "btnSpeed1"){
trainSpeed = 5;
loco1.gotoAndPlay(1);
updateDial(1);
} else {
if (_local2 == "btnSpeed2"){
trainSpeed = 10;
loco1.gotoAndPlay(1);
updateDial(2);
} else {
if (_local2 == "btnSpeed3"){
trainSpeed = 15;
loco1.gotoAndPlay(1);
updateDial(3);
} else {
if (_local2 == "btnSpeed4"){
trainSpeed = 20;
loco1.gotoAndPlay(1);
updateDial(4);
};
};
};
};
};
if (halfState != 1){
if ((((((_local2.substring(0, 4) == "tile")) && ((bKeyLock == false)))) && ((tilesTurned == 0)))){
tilesTurned++;
strTileNumber1 = (int(_local2.substring(4)) - 1);
tmp1 = _arg1.target;
_arg1.target.scaleX = 0;
_arg1.target.gotoAndStop(tileArray[strTileNumber1]);
myTween = new Tween(_arg1.target, "scaleX", Regular.easeOut, 0, 1, 1, true);
myTween.FPS = 40;
myTween.addEventListener(TweenEvent.MOTION_FINISH, onFinish);
} else {
if ((((((_local2.substring(0, 4) == "tile")) && ((bKeyLock == false)))) && ((tilesTurned == 1)))){
strTileNumber2 = (int(_local2.substring(4)) - 1);
if (strTileNumber1 != strTileNumber2){
bKeyLock = true;
tilesTurned++;
tmp2 = _arg1.target;
_arg1.target.scaleX = 0;
_arg1.target.gotoAndStop(tileArray[strTileNumber2]);
myTween2 = new Tween(_arg1.target, "scaleX", Regular.easeOut, 0, 1, 1, true);
myTween2.FPS = 40;
myTween2.addEventListener(TweenEvent.MOTION_FINISH, onFinish2);
};
};
};
} else {
if ((((((_local2.substring(0, 4) == "tile")) && ((bKeyLock == false)))) && ((tilesTurned == 0)))){
bKeyLock = true;
tilesTurned = 2;
strTileNumber1 = (int(_local2.substring(4)) - 1);
tmp1 = _arg1.target;
_arg1.target.scaleX = 0;
_arg1.target.gotoAndStop(tileArray[strTileNumber1]);
myTween3 = new Tween(_arg1.target, "scaleX", Regular.easeOut, 0, 1, 1, true);
myTween3.FPS = 40;
myTween3.addEventListener(TweenEvent.MOTION_FINISH, onFinish3);
};
};
}
public function compareTiles():void{
tilesTurned = 0;
if (halfState != 1){
if (tmp1.currentFrame == tmp2.currentFrame){
tmp1.gotoAndStop(1);
tmp2.gotoAndStop(1);
tmp1.scaleX = 1;
tmp2.scaleX = 1;
tmp1.y = (tmp1.y - 1000);
tmp2.y = (tmp2.y - 1000);
iPairsCollected++;
tileTxt.text = ("Tile pairs collected: " + iPairsCollected);
if ((((halfState == 0)) && ((iPairsCollected == 7)))){
halfState = 1;
bonusBg.alpha = 1;
bonusBg.y = 284;
bonusWindow.alpha = 1;
bonusWindow.bonusSearch.gotoAndStop(tileArray[35]);
};
if (iPairsCollected == 17){
bKeyLock = true;
};
} else {
tmp1.gotoAndStop(1);
tmp2.gotoAndStop(1);
tmp1.scaleX = 1;
tmp2.scaleX = 1;
if ((((halfState == 0)) && ((secondsLeft < (totalSeconds / 2))))){
halfState = 1;
bonusBg.alpha = 1;
bonusBg.y = 284;
bonusWindow.alpha = 1;
bonusWindow.bonusSearch.gotoAndStop(tileArray[35]);
};
};
} else {
if (tmp1.currentFrame == tileArray[35]){
tmp1.gotoAndStop(1);
tmp1.scaleX = 1;
tmp1.y = (tmp1.y - 1000);
halfState++;
bonusBg.alpha = 0;
bonusBg.y = -1000;
bonusWindow.alpha = 0;
} else {
tmp1.gotoAndStop(1);
tmp1.scaleX = 1;
};
};
bKeyLock = false;
}
public function doRestart():void{
bKeyLock = true;
btnSpeed0.alpha = 0.2;
btnSpeed1.alpha = 0.2;
btnSpeed2.alpha = 1;
btnSpeed3.alpha = 0.2;
btnSpeed4.alpha = 0.2;
bonusBg.alpha = 0;
bonusBg.y = -1000;
trainSpeed = 10;
totalSeconds = 180;
secondsLeft = 180;
if (bCodeUsed == true){
totalSeconds = 240;
secondsLeft = 240;
};
secondCounter = 10;
bonusLeft = 30;
bonusWindow.alpha = 0;
tilesTurned = 0;
strTileNumber1 = 0;
strTileNumber2 = 0;
coolDown = 0;
iPairsCollected = 0;
tileArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
availableTiles = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
populateTileArr();
if (bCodeUsed == true){
digit1.text = "4";
} else {
digit1.text = "3";
};
digit2.text = "0";
digit3.text = "0";
digit2b.text = "3";
digit3b.text = "0";
resetTileBack(tile1);
resetTileBack(tile2);
resetTileBack(tile3);
resetTileBack(tile4);
resetTileBack(tile5);
resetTileBack(tile6);
resetTileBack(tile7);
resetTileBack(tile8);
resetTileBack(tile9);
resetTileBack(tile10);
resetTileBack(tile11);
resetTileBack(tile12);
resetTileBack(tile13);
resetTileBack(tile14);
resetTileBack(tile15);
resetTileBack(tile16);
resetTileBack(tile17);
resetTileBack(tile18);
resetTileBack(tile19);
resetTileBack(tile20);
resetTileBack(tile21);
resetTileBack(tile22);
resetTileBack(tile23);
resetTileBack(tile24);
resetTileBack(tile25);
resetTileBack(tile26);
resetTileBack(tile27);
resetTileBack(tile28);
resetTileBack(tile29);
resetTileBack(tile30);
resetTileBack(tile31);
resetTileBack(tile32);
resetTileBack(tile33);
resetTileBack(tile34);
resetTileBack(tile35);
halfState = 0;
restartWindow.y = -1000;
(restartWindow.alpha == 0);
bKeyLock = false;
}
public function resetTileBack(_arg1):void{
if (_arg1.y < 0){
_arg1.y = (_arg1.y + 1000);
};
_arg1.gotoAndStop(1);
_arg1.alpha = 1;
_arg1.scaleX = 1;
}
public function myTimer():void{
var _local1:*;
var _local2:*;
var _local3:*;
var _local4:*;
var _local5:*;
loco1.x = (loco1.x + trainSpeed);
wagon1_1.x = (wagon1_1.x + trainSpeed);
wagon1_2.x = (wagon1_2.x + trainSpeed);
wagon1_3.x = (wagon1_3.x + trainSpeed);
loco2.x = (loco2.x + (trainSpeed * 0.8));
wagon2_1.x = (wagon2_1.x + (trainSpeed * 0.8));
wagon2_2.x = (wagon2_2.x + (trainSpeed * 0.8));
wagon2_3.x = (wagon2_3.x + (trainSpeed * 0.8));
if (loco3.x > -200){
loco3.x = (loco3.x - (trainSpeed * 1.2));
};
if (loco4.x > -200){
loco4.x = (loco4.x - (trainSpeed * 1.2));
};
bJenL = false;
bJenR = false;
bJenTitArm = false;
bAmL = false;
bAmR = false;
bKelL = false;
bKelR = false;
bJenBelly = false;
animWagon(wagon1_1);
animWagon(wagon1_2);
animWagon(wagon1_3);
animWagon(wagon2_1);
animWagon(wagon2_2);
animWagon(wagon2_3);
if (bJenL == true){
jenL.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
jenL.gotoAndStop(1);
};
if (bJenR == true){
jenR.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
jenR.gotoAndStop(1);
};
if (bKelL == true){
kelL.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
kelL.gotoAndStop(1);
};
if (bKelR == true){
kelR.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
kelR.gotoAndStop(1);
};
if (bAmL == true){
amL.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
amL.gotoAndStop(1);
};
if (bAmR == true){
amR.gotoAndStop(Math.ceil((Math.random() * 3)));
} else {
amR.gotoAndStop(1);
};
if (bJenTitArm == true){
milk.alpha = 0.4;
} else {
milk.alpha = 0;
};
if ((((((bJenL == true)) || ((bJenR == true)))) || ((bJenTitArm == true)))){
jenExpression.gotoAndPlay(2);
} else {
jenExpression.gotoAndStop(1);
};
if ((((bAmL == true)) || ((bAmR == true)))){
amandaExpression.gotoAndPlay(2);
} else {
amandaExpression.gotoAndStop(1);
};
if ((((bKelL == true)) || ((bKelR == true)))){
kelseyExpression.gotoAndPlay(2);
} else {
kelseyExpression.gotoAndStop(1);
};
if (loco1.x > 1092){
restartTrain(1);
};
if (loco2.x > 1021){
restartTrain(2);
};
if (coolDown > 0){
coolDown--;
if (coolDown == 1){
compareTiles();
coolDown = 0;
};
};
secondCounter--;
if (secondCounter < 1){
secondCounter = 6;
_local1 = 0;
_local2 = 0;
if (halfState != 1){
if (secondsLeft > 0){
secondsLeft--;
};
if (secondsLeft > 0){
_local3 = Math.floor((secondsLeft / 60));
_local1 = Math.floor(((secondsLeft - (60 * _local3)) / 10));
_local2 = ((secondsLeft - (60 * _local3)) - (10 * _local1));
digit1.text = _local3;
digit2.text = _local1;
digit3.text = _local2;
} else {
if (bonusLeft > 0){
digit3.text = "0";
if (bonusLeft > 0){
bonusLeft--;
};
_local1 = Math.floor((bonusLeft / 10));
_local2 = (bonusLeft - (10 * _local1));
digit2b.text = _local1;
digit3b.text = _local2;
};
};
} else {
if (halfState == 1){
if (bonusLeft > 0){
bonusLeft--;
};
if (bonusLeft > 0){
_local1 = Math.floor((bonusLeft / 10));
_local2 = (bonusLeft - (10 * _local1));
digit2b.text = _local1;
digit3b.text = _local2;
} else {
halfState = 2;
digit3b.text = "0";
bonusBg.alpha = 0;
bonusBg.y = -1000;
bonusWindow.alpha = 0;
_local4 = 0;
_local5 = -1;
while (_local4 == 0) {
_local5++;
if (tileArray[_local5] == tileArray[35]){
bKeyLock = true;
_local4 = 1;
if (_local5 == 0){
tTile = tile1;
};
if (_local5 == 1){
tTile = tile2;
};
if (_local5 == 2){
tTile = tile3;
};
if (_local5 == 3){
tTile = tile4;
};
if (_local5 == 4){
tTile = tile5;
};
if (_local5 == 5){
tTile = tile6;
};
if (_local5 == 6){
tTile = tile7;
};
if (_local5 == 7){
tTile = tile8;
};
if (_local5 == 8){
tTile = tile9;
};
if (_local5 == 9){
tTile = tile10;
};
if (_local5 == 10){
tTile = tile11;
};
if (_local5 == 11){
tTile = tile12;
};
if (_local5 == 12){
tTile = tile13;
};
if (_local5 == 13){
tTile = tile14;
};
if (_local5 == 14){
tTile = tile15;
};
if (_local5 == 15){
tTile = tile16;
};
if (_local5 == 16){
tTile = tile17;
};
if (_local5 == 17){
tTile = tile18;
};
if (_local5 == 18){
tTile = tile19;
};
if (_local5 == 19){
tTile = tile20;
};
if (_local5 == 20){
tTile = tile21;
};
if (_local5 == 21){
tTile = tile22;
};
if (_local5 == 22){
tTile = tile23;
};
if (_local5 == 23){
tTile = tile24;
};
if (_local5 == 24){
tTile = tile25;
};
if (_local5 == 25){
tTile = tile26;
};
if (_local5 == 26){
tTile = tile27;
};
if (_local5 == 27){
tTile = tile28;
};
if (_local5 == 28){
tTile = tile29;
};
if (_local5 == 29){
tTile = tile30;
};
if (_local5 == 30){
tTile = tile31;
};
if (_local5 == 31){
tTile = tile32;
};
if (_local5 == 32){
tTile = tile33;
};
if (_local5 == 33){
tTile = tile34;
};
if (_local5 == 34){
tTile = tile35;
};
tTile.gotoAndStop(tileArray[_local5]);
myTween4 = new Tween(tTile, "scaleX", Regular.easeIn, 1, 0, 1.5, true);
myTween4.FPS = 40;
myTween4.addEventListener(TweenEvent.MOTION_FINISH, onFinish4);
halfState++;
bonusBg.alpha = 0;
bonusBg.y = -1000;
bonusWindow.alpha = 0;
};
};
};
};
};
};
if (((((!((halfState == 6))) && ((secondsLeft == 0)))) && ((bonusLeft == 0)))){
halfState = 6;
bKeyLock = true;
restartWindow.y = 284;
restartWindow.alpha = 1;
digit3b.text = "0";
digit3.text = "0";
};
}
public function updateDial(_arg1){
if (_arg1 == 0){
btnSpeed0.alpha = 1;
} else {
btnSpeed0.alpha = 0.2;
};
if (_arg1 == 1){
btnSpeed1.alpha = 1;
} else {
btnSpeed1.alpha = 0.2;
};
if (_arg1 == 2){
btnSpeed2.alpha = 1;
} else {
btnSpeed2.alpha = 0.2;
};
if (_arg1 == 3){
btnSpeed3.alpha = 1;
} else {
btnSpeed3.alpha = 0.2;
};
if (_arg1 == 4){
btnSpeed4.alpha = 1;
} else {
btnSpeed4.alpha = 0.2;
};
}
public function animWagon(_arg1):void{
if ((((((((((_arg1.currentFrame == 4)) || ((_arg1.currentFrame == 6)))) || ((_arg1.currentFrame == 8)))) || ((_arg1.currentFrame == 10)))) || ((_arg1.currentFrame == 12)))){
_arg1.gotoAndStop((_arg1.currentFrame + 1));
} else {
if (_arg1.currentFrame > 3){
_arg1.gotoAndStop((_arg1.currentFrame - 1));
};
};
if ((((_arg1.y > 420)) && ((_arg1.currentFrame > 3)))){
if ((((_arg1.x > 123)) && ((_arg1.x < 231)))){
bJenL = true;
};
if ((((_arg1.x > 192)) && ((_arg1.x < 296)))){
bJenR = true;
};
if ((((_arg1.x > 410)) && ((_arg1.x < 522)))){
bKelL = true;
};
if ((((_arg1.x > 464)) && ((_arg1.x < 574)))){
bKelR = true;
};
if ((((_arg1.x > 546)) && ((_arg1.x < 650)))){
bAmR = true;
};
} else {
if (_arg1.currentFrame > 5){
if ((((_arg1.x > 167)) && ((_arg1.x < 259)))){
bAmL = true;
};
if ((((_arg1.x > 373)) && ((_arg1.x < 469)))){
bJenTitArm = true;
};
} else {
if (_arg1.currentFrame > 3){
if ((((_arg1.x > 348)) && ((_arg1.x < 427)))){
bJenBelly = true;
};
};
};
};
}
public function restartTrain(_arg1):void{
var _local2:* = Math.ceil((Math.random() * 3));
if (_arg1 == 1){
loco1.x = (-50 - (Math.random() * 100));
wagon1_1.x = (loco1.x - 125);
wagon1_2.x = (wagon1_1.x - 125);
wagon1_3.x = (wagon1_2.x - 125);
if (_local2 == 3){
wagon1_1.gotoAndStop(1);
} else {
wagon1_1.gotoAndStop(Math.ceil((Math.random() * 13)));
};
if (_local2 > 1){
wagon1_2.gotoAndStop((Math.ceil((Math.random() * 12)) + 1));
wagon1_2.alpha = 1;
} else {
wagon1_2.gotoAndStop(1);
wagon1_2.alpha = 0;
};
if (_local2 > 2){
wagon1_3.gotoAndStop((Math.ceil((Math.random() * 12)) + 1));
wagon1_3.alpha = 1;
} else {
wagon1_3.gotoAndStop(1);
wagon1_3.alpha = 0;
};
if (loco4.x < 615){
loco3.x = 710;
} else {
loco3.x = 802;
};
} else {
loco2.x = (-50 - (Math.random() * 100));
wagon2_1.x = (loco2.x - 100);
wagon2_2.x = (wagon2_1.x - 100);
wagon2_3.x = (wagon2_2.x - 100);
if (_local2 == 3){
wagon2_1.gotoAndStop(1);
} else {
wagon2_1.gotoAndStop(Math.ceil((Math.random() * 13)));
};
if (_local2 > 1){
wagon2_2.gotoAndStop((Math.ceil((Math.random() * 12)) + 1));
wagon2_2.alpha = 1;
} else {
wagon2_2.gotoAndStop(1);
wagon2_2.alpha = 0;
};
if (_local2 > 2){
wagon2_3.gotoAndStop((Math.ceil((Math.random() * 12)) + 1));
wagon2_3.alpha = 1;
} else {
wagon2_3.gotoAndStop(1);
wagon2_3.alpha = 0;
};
if (loco3.x < 615){
loco4.x = 710;
} else {
loco4.x = 802;
};
};
}
function frame1(){
stop();
bCodeUsed = false;
this.loaderInfo.addEventListener(ProgressEvent.PROGRESS, onProgress);
this.loaderInfo.addEventListener(Event.COMPLETE, onComplete);
}
function frame2(){
halfState = 0;
bKeyLock = false;
tilesTurned = 0;
strTileNumber1 = 0;
strTileNumber2 = 0;
coolDown = 0;
iPairsCollected = 0;
tileArray = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0];
availableTiles = [2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
populateTileArr();
if (bCodeUsed == true){
digit1.text = "4";
} else {
digit1.text = "3";
};
digit2.text = "0";
digit3.text = "0";
digit2b.text = "3";
digit3b.text = "0";
stop();
btnSpeed0.alpha = 0.2;
btnSpeed1.alpha = 0.2;
btnSpeed2.alpha = 1;
btnSpeed3.alpha = 0.2;
btnSpeed4.alpha = 0.2;
jenL.gotoAndStop(1);
jenR.gotoAndStop(1);
kelL.gotoAndStop(1);
kelR.gotoAndStop(1);
amL.gotoAndStop(1);
amR.gotoAndStop(1);
milk.alpha = 0;
bonusWindow.alpha = 0;
wagon1_2.gotoAndStop(8);
wagon1_3.gotoAndStop(3);
wagon2_2.gotoAndStop(5);
wagon2_3.gotoAndStop(10);
bonusBg.alpha = 0;
bonusBg.y = -1000;
restartWindow.alpha = 0;
restartWindow.y = -1000;
myInterval = setInterval(myTimer, 200);
trainSpeed = 10;
bJenL = false;
bJenR = false;
bJenTitArm = false;
bAmL = false;
bAmR = false;
bKelL = false;
bKelR = false;
bJenBelly = false;
totalSeconds = 180;
secondsLeft = 180;
if (bCodeUsed == true){
totalSeconds = 240;
secondsLeft = 240;
};
secondCounter = 10;
bonusLeft = 30;
stage.addEventListener(MouseEvent.CLICK, mouseClicked);
}
}
}//package Railroad57_fla
Section 9
//tile_23 (Railroad57_fla.tile_23)
package Railroad57_fla {
import flash.display.*;
public dynamic class tile_23 extends MovieClip {
public function tile_23(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Railroad57_fla
Section 10
//wagon_15 (Railroad57_fla.wagon_15)
package Railroad57_fla {
import flash.display.*;
public dynamic class wagon_15 extends MovieClip {
public function wagon_15(){
addFrameScript(0, frame1);
}
function frame1(){
stop();
}
}
}//package Railroad57_fla
Section 11
//movie_mc (movie_mc)
package {
import flash.display.*;
public dynamic class movie_mc extends MovieClip {
}
}//package