Frame 1
_root.onEnterFrame = function () {
bl = this.getBytesLoaded();
bt = this.getBytesTotal();
percent = Math.ceil((bl / bt) * 100);
if (percent == 100) {
trace("Loaded!!");
gotoAndPlay (2);
delete onEnterFrame;
}
loading_txt.text = percent + " %";
};
stop();
Frame 2
function removeAllEm() {
_global.rootOfThisGame.car.removeMovieClip();
_global.rootOfThisGame["railroad_mc" + currRailNum].removeMovieClip();
_global.rootOfThisGame["railroad_papers_mc" + currPaperNum].removeMovieClip();
_global.rootOfThisGame.train_1_mc.removeMovieClip();
_global.rootOfThisGame.train_2_mc.removeMovieClip();
_global.rootOfThisGame.speed_meter_mc.removeMovieClip();
_global.rootOfThisGame.level_switch_mc.removeMovieClip();
_global.rootOfThisGame.bad_car_mc.removeMovieClip();
_global.rootOfThisGame.odometer_mc.removeMovieClip();
_global.rootOfThisGame.voice_mc.removeMovieClip();
_global.rootOfThisGame.sound_mc.removeMovieClip();
_global.rootOfThisGame.road_view_holder_mc.removeMovieClip();
_global.rootOfThisGame.car._visible = false;
_global.rootOfThisGame["railroad_mc" + currRailNum]._visible = false;
_global.rootOfThisGame["railroad_papers_mc" + currPaperNum]._visible = false;
_global.rootOfThisGame.train_1_mc._visible = false;
_global.rootOfThisGame.train_2_mc._visible = false;
_global.rootOfThisGame.speed_meter_mc._visible = false;
_global.rootOfThisGame.level_switch_mc._visible = false;
_global.rootOfThisGame.bad_car_mc._visible = false;
_global.rootOfThisGame.odometer_mc._visible = false;
_global.rootOfThisGame.lives_mc._visible = false;
i = 0;
while (i <= 150) {
_global.rootOfThisGame["rock" + i].removeMovieClip();
_global.rootOfThisGame["rock" + i]._visible = false;
i++;
}
_global.rootOfThisGame.lives_mc.removeMovieClip();
}
function playNormSound() {
if (!speedSoundStop) {
sound_mc.gotoAndPlay("normsp");
trace("CurrFrame is: " + sound_mc._currentframe);
}
}
function playSlowSound() {
if (!speedSoundStop) {
sound_mc.gotoAndPlay("lowsp");
trace("CurrFrame is: " + sound_mc._currentframe);
}
}
function playFastSound() {
if (!speedSoundStop) {
sound_mc.gotoAndPlay("highsp");
trace("CurrFrame is: " + sound_mc._currentframe);
}
}
removeAll();
removeAllEm();
_global.rootOfThisGame = this;
var __allSound = new Sound();
var speedSoundStop = false;
var loserText = "";
var spills;
var gotoFrameNum;
this.btn_close.onPress = function () {
getURL ("javascript:window.close();");
};
_global.SL = new com.herzogcowen.media.SoundLibrary(voice_mc);
SL.traceEvents = false;
logo_mc._visible = false;
sc_mc._visible = false;
this.start_btn.onPress = function () {
gotoAndPlay (3);
SL.stopSound("welcome");
};
stop();
Frame 3
SL.stopSound("welcome");
function timerCounter() {
frame_timer_mc.gotoAndPlay(3);
}
function timerCounter_fun() {
if (timerClock == 0) {
gameLostTimer();
} else if (!(currRailNum === nessLoops)) {
odometer_mc.map_car_mc._y = (-currRailNum) * 3;
timerClock--;
} else if (!this[("level_" + nextLevel) + "_started"]) {
stopTimer();
timerClock = 30;
level_switch_mc.gotoAndPlay("level " + nextLevel);
this[("level_" + nextLevel) + "_started"] = true;
stopRocks = true;
}
}
function stopTimer() {
stopMcTimer = false;
}
function checkSounds() {
if (!speedSoundStop) {
if (car._y > 520) {
sound_mc.gotoAndPlay("lowsp");
} else if (car._y < 520) {
sound_mc.gotoAndPlay("highsp");
} else {
sound_mc.gotoAndPlay("normsp");
}
}
}
function initGame() {
firstRock = 1;
lastRock = 0;
spills = 0;
totalRocks = 45;
timeSinceLastRock = 0;
roadSpeed = 0.1;
rockPopulation = 15;
attachMovie("car_mc", "car", 9000);
car._x = 350;
car._y = carYPos;
bad_car_mc._x = 250;
bad_car_mc._y = 850;
start_trains();
timerCounter();
}
function movecar() {
road_view_holder_mc.road_view_mc._x = car._x;
road_view_holder_mc.road_view_mc._y = car._y;
var _local1 = spills - spillsAllowed;
gotoFrameNum = Math.abs(_local1);
gotoFrameNum = gotoFrameNum + 1;
lives_mc.gotoAndStop(gotoFrameNum);
if (car._currentframe > 4) {
dx = 0;
} else {
if (Key.isDown(39)) {
dx = roadSpeed;
car.gotoAndStop("left");
} else if (Key.isDown(37)) {
dx = -roadSpeed;
car.gotoAndStop("right");
} else {
dx = 0;
car.gotoAndStop("still");
}
if (Key.isDown(38)) {
if (car._y > (carYPos - 70)) {
car._y = car._y - 2;
}
if (roadSpeed < 22) {
roadSpeed = roadSpeed + 1;
}
if (bad_car_mc._y < 850) {
bad_car_mc._y = bad_car_mc._y + 1;
}
} else if (!Key.isDown(38)) {
if (car._y < carYPos) {
car._y = car._y + 2;
}
if (roadSpeed > 15) {
roadSpeed = roadSpeed - 1;
}
if (bad_car_mc._y > 650) {
bad_car_mc._y = bad_car_mc._y - 1;
}
}
}
car._x = car._x + dx;
if (car._x < 120) {
car._x = 120;
}
if (car._x > 580) {
car._x = 580;
}
if (!Key.isDown(40)) {
if (car._y > carYPos) {
car._y = car._y - 2;
}
if (roadSpeed < 15) {
roadSpeed = roadSpeed + 0.5;
}
} else {
if (car._y < (carYPos + 70)) {
car._y = car._y + 2;
}
if (roadSpeed > 10) {
roadSpeed = roadSpeed - 1;
}
}
}
function randRange(min, max) {
var _local1 = Math.floor(Math.random() * ((max - min) + 1)) + min;
return(_local1);
}
function gameLostTimer() {
_global.rootOfThisGame.road_view_holder_mc.removeMovieClip();
_global.rootOfThisGame.loserText = "YOUR TIME IS UP!";
stopTimer();
stop_trains();
delete onEnterFrame;
gotoAndPlay ("lost");
}
function gameLost() {
_global.rootOfThisGame.road_view_holder_mc.removeMovieClip();
_global.rootOfThisGame.loserText = "BETTER LUCK NEXT TIME!";
stopTimer();
stop_trains();
delete onEnterFrame;
car.gotoAndPlay("explode");
gotoAndPlay ("lost");
}
function newRock() {
if (!stopRocks) {
if (timeSinceLastRock > rockPopulation) {
if (!(timerClock === 0)) {
lastRock++;
attachMovie("rocks", "rock" + lastRock, 2000 + lastRock);
_global.rootOfThisGame["rock" + lastRock]._x = randRange(170, 530);
_global.rootOfThisGame["rock" + lastRock]._y = -50;
f = randRange(1, 3);
_global.rootOfThisGame["rock" + lastRock].gotoAndStop(f);
timeSinceLastRock = 0;
_global.rootOfThisGame["rock" + i].hit = false;
} else {
gameLostTimer();
}
}
timeSinceLastRock++;
}
}
function start_trains() {
clearInterval(start_trains_go);
start_trains_go = setInterval(start_trains_fun, 4000);
}
function start_trains_fun() {
var _local2 = randRange(1, 2);
if (_global.rootOfThisGame[("train_" + _local2) + "_mc"].inlaunch == false) {
_global.rootOfThisGame[("train_" + _local2) + "_mc"].gotoAndPlay(3);
}
}
function stop_trains() {
clearInterval(start_trains_go);
}
function moveRocks() {
validatesound = "hit" + random(2);
if (this["railroad_mc" + currRailNum]._y > 700) {
removeMovieClip(this["railroad_mc" + currRailNum]);
currRailNum++;
attachMovie("railroad", "railroad_mc" + currRailNum, 1000, {x:0, y:0});
this["railroad_mc" + currRailNum]._y = this["railroad_mc" + currRailNum]._y + roadSpeed;
}
this["railroad_mc" + currRailNum]._y = this["railroad_mc" + currRailNum]._y + roadSpeed;
j = 1;
while (j < 3) {
if (_global.rootOfThisGame[("train_" + j) + "_mc"].train_mc.ha_mc.hitTest(car.ha_mc)) {
spills = spills + 1;
car.gotoAndPlay("spill");
SL.playSound(validatesound);
var _local5 = new mx.transitions.Tween(car, "_x", mx.transitions.easing.Strong.easeOut, car._x, 350, 13, false);
roadSpeed = 0.1;
if (spills > spillsAllowed) {
gameLost();
}
}
j++;
}
if (_global.rootOfThisGame.bad_car_mc.bc_mc.badha_mc.hitTest(car.ha_mc)) {
roadSpeed = 0.1;
spills = spills + 1;
car.gotoAndPlay("spill");
SL.playSound(validatesound);
bad_car_mc._y = 850;
if (spills > spillsAllowed) {
gameLost();
}
}
k = 1;
while (k < 3) {
if (_global.rootOfThisGame["railroad_mc" + currRailNum][("rails_" + k) + "_mc"].hitTest(car.ha_mc)) {
if (car._y < (carYPos + 70)) {
car._y = car._y + 4;
}
if (roadSpeed > 10) {
roadSpeed = roadSpeed - 1;
}
}
k++;
}
i = firstRock;
while (i <= lastRock) {
var _local4 = _global.rootOfThisGame["rock" + i]._x;
var _local3 = _global.rootOfThisGame["rock" + i]._y + roadSpeed;
if (_local3 < -50) {
removeRock(i);
} else if (((_global.rootOfThisGame["rock" + i].hit == false) and (Math.abs(_local3 - car._y) < 60)) and (Math.abs(_local4 - car._x) < 25)) {
spills = spills + 1;
_global.rootOfThisGame["rock" + i].hit = true;
car.gotoAndPlay("spill");
SL.playSound(validatesound);
roadSpeed = 0.1;
if (spills > spillsAllowed) {
SL.stopSound(validatesound);
gameLost();
}
}
_global.rootOfThisGame["rock" + i]._y = _local3;
i++;
}
}
function removeRock(n) {
_global.rootOfThisGame["rock" + n].removeMovieClip();
firstRock = n + 1;
}
function removeAll() {
i = firstRock;
while (i <= lastRock) {
_global.rootOfThisGame["rock" + i].removeMovieClip();
i++;
}
car.removeMovieClip();
}
function pauseGame($state) {
_root.isPaused = $state;
if ($state) {
pause_screen_mc._visible = true;
delete onEnterFrame;
if (audioContol_mc._currentframe == 1) {
audioContol_mc.resumeSound = true;
audioContol_mc.gotoAndStop(3);
audioContol_mc.b_btn.enabled = false;
}
gameBg_mc.stop();
stop_trains();
bad_car_mc.stop();
frame_timer_mc.stop();
train_1_mc.stop();
train_2_mc.stop();
} else {
pause_screen_mc._visible = false;
if (audioContol_mc.resumeSound == true) {
audioContol_mc.resumeSound = false;
audioContol_mc.gotoAndStop(2);
audioContol_mc.b_btn.enabled = true;
}
this.onEnterFrame = function () {
_global.rootOfThisGame.movecar();
_global.rootOfThisGame.newRock();
_global.rootOfThisGame.moveRocks();
_global.rootOfThisGame.checkSounds();
};
gameBg_mc.play();
start_trains();
bad_car_mc.play();
frame_timer_mc.play();
if (train_1_mc.inlaunch == true) {
train_1_mc.play();
}
if (train_2_mc.inlaunch == true) {
train_2_mc.play();
}
}
}
var currRailNum = 1;
var currPaperNum = 1;
var carYPos = 520;
var stopRocks = false;
var nessLoops = 19;
var evenNum;
var level_2_started = false;
var level_3_started = false;
var nextLevel = 2;
var stopMcTimer = false;
var spillsAllowed = 2;
logo_mc._visible = true;
sc_mc._visible = true;
attachMovie("railroad", "railroad_mc" + currRailNum, 1000, {_x:0, _y:0});
attachMovie("bad_car", "bad_car_mc", 5000);
attachMovie("odometer", "odometer_mc", 4000, {_x:70, _y:200});
attachMovie("train_1", "train_1_mc", 7000, {_x:56, _y:-36.9});
attachMovie("train_2", "train_2_mc", 8000, {_x:-45, _y:250});
attachMovie("speed_meter", "speed_meter_mc", 6751, {_x:120, _y:650});
attachMovie("level_switch", "level_switch_mc", 6800);
attachMovie("lives", "lives_mc", 6750, {_x:401, _y:645});
attachMovie("road_view_holder", "road_view_holder_mc", 6500, {_x:0, _y:0});
this.createEmptyMovieClip("temp_mc", this.getNextHighestDepth());
pause_screen_mc.swapDepths(temp_mc);
pause_screen_mc._visible = false;
level_switch_mc._x = 350;
level_switch_mc._y = 300;
sc_mc.swapDepths(9999);
logo_mc.swapDepths(10000);
var timerClock = 30;
this.onEnterFrame = function () {
_global.rootOfThisGame.movecar();
_global.rootOfThisGame.newRock();
_global.rootOfThisGame.moveRocks();
_global.rootOfThisGame.checkSounds();
};
_global.rootOfThisGame.initGame();
stop();
var isPaused = false;
pause_mc.onRelease = function () {
_global.rootOfThisGame.pauseGame(true);
};
var pause_lst = new Object();
pause_lst.onKeyDown = function () {
if (Key.getCode() == 80) {
_global.rootOfThisGame.pauseGame(!_root.isPaused);
}
};
Key.addListener(pause_lst);
Frame 4
validatesound = "youlost" + random(2);
SL.playSound(validatesound);
attachMovie("motion_lost", "motion_lost_mc", 6000, {_x:150.5, _y:175.8});
sound_mc.gotoAndPlay("crash");
Key.removeListener(pause_lst);
pause_screen_mc._visible = false;
isPaused = false;
pause_screen_mc.swapDepths(temp_mc);
temp_mc.removeMovieClip();
stop();
Frame 5
validatesound = "cool" + random(2);
SL.playSound(validatesound);
this.play_btn.onPress = function () {
gotoAndPlay (2);
};
Key.removeListener(pause_lst);
pause_screen_mc._visible = false;
isPaused = false;
pause_screen_mc.swapDepths(temp_mc);
temp_mc.removeMovieClip();
stop();
Frame 6
this.play_btn.onPress = function () {
gotoAndStop (1);
};
stop();
Frame 7
this.play_btn.onPress = function () {
gotoAndStop (1);
};
stop();
Symbol 105 MovieClip [car_mc] Frame 1
stop();
Symbol 105 MovieClip [car_mc] Frame 5
_parent.speedSoundStop = true;
_parent.sound_mc.gotoAndPlay("crash");
Symbol 105 MovieClip [car_mc] Frame 19
_parent.speedSoundStop = false;
Symbol 105 MovieClip [car_mc] Frame 20
gotoAndPlay (1);
Symbol 124 MovieClip [train_2] Frame 1
stop();
inlaunch = false;
Symbol 124 MovieClip [train_2] Frame 2
inlaunch = true;
Symbol 129 MovieClip [train_1] Frame 1
stop();
inlaunch = false;
Symbol 129 MovieClip [train_1] Frame 2
inlaunch = true;
Symbol 144 MovieClip [level_switch] Frame 61
stop();
Symbol 144 MovieClip [level_switch] Frame 161
_parent.firstRock = 1;
_parent.lastRock = 0;
_parent.totalRocks = 100;
_parent.rockPopulation = 12;
_parent.nextLevel = 3;
_parent.timerCounter();
_parent.nessLoops = _parent.nessLoops + 20;
_parent.stopRocks = false;
Symbol 144 MovieClip [level_switch] Frame 162
stop();
Symbol 144 MovieClip [level_switch] Frame 164
_parent.spillsAllowed++;
Symbol 144 MovieClip [level_switch] Frame 266
_parent.firstRock = 1;
_parent.lastRock = 0;
_parent.totalRocks = 150;
_parent.rockPopulation = 10;
_parent.nextLevel = 4;
_parent.timerCounter();
_parent.nessLoops = _parent.nessLoops + 22;
_parent.stopRocks = false;
Symbol 144 MovieClip [level_switch] Frame 267
stop();
Symbol 144 MovieClip [level_switch] Frame 269
_parent.firstRock = 1;
_parent.lastRock = 0;
_parent.totalRocks = 50;
_parent.rockPopulation = 12;
_parent.nextLevel = 2;
_parent.nessLoops = 18;
_parent.stopRocks = false;
_parent.level_2_started = false;
_parent.level_3_started = false;
delete _parent.onEnterFrame;
stopTimer();
stop_trains();
sound_mc.gotoAndPlay("crash");
_parent.gotoAndPlay("won");
Symbol 150 MovieClip [speed_meter] Frame 1
this.onEnterFrame = function () {
speed_arrow_mc._rotation = _parent.roadSpeed * 5;
};
Symbol 152 MovieClip [lives] Frame 1
stop();
Symbol 152 MovieClip [lives] Frame 2
stop();
Symbol 152 MovieClip [lives] Frame 3
stop();
Symbol 152 MovieClip [lives] Frame 4
stop();
Symbol 179 MovieClip [motion_lost] Frame 29
this.lost_txt.text = _global.rootOfThisGame.loserText;
Symbol 179 MovieClip [motion_lost] Frame 41
_parent.removeAllEm();
this.play_btn.onPress = function () {
_global.rootOfThisGame.loserText = "";
_parent.gotoAndPlay(1);
this._parent.removeMovieClip();
};
stop();
Symbol 267 MovieClip [__Packages.com.herzogcowen.media.SoundLibrary] Frame 0
class com.herzogcowen.media.SoundLibrary
{
var soundsMC;
function SoundLibrary (soundHolderMC) {
soundsMC = soundHolderMC;
}
function addSound(soundID) {
var _local3 = soundsMC.createEmptyMovieClip(soundID, soundsMC.getNextHighestDepth());
var _local2 = createSoundDataObj(soundID);
_local2.soundObj = new Sound(_local3);
_local2.soundObj.parent = _local2;
_local2.soundObj.attachSound(soundID);
_local2._name = soundID;
_local2.status = "stopped";
_local2.defaultVolume = 100;
traceEvent((("Sound Added : " + _local2._name) + " targeting : ") + _local3);
}
function removeSound(soundID) {
delete getSoundObj(soundID).soundObj;
delete eval (getSoundObj(soundID));
}
function playSound(soundID, repeatNum, volNum, fadeTime) {
var _local2 = getSoundObj(soundID);
if (_local2.status != "playing") {
traceEvent("now playing : " + _local2._name);
if (repeatNum == undefined) {
repeatNum = 0;
}
_local2.soundObj.setVolume(_local2.defaultVolume);
getSoundObj(soundID).soundObj.start(0, repeatNum);
getSoundObj(soundID).soundObj.onSoundComplete = function () {
this.parent.status = "stopped";
if (this.parent.onSoundComplete != undefined) {
this.parent.onSoundComplete();
}
this.traceEvent("sound has completed");
};
if (volNum != undefined) {
if (fadeTime == undefined) {
fadeTime = 1;
}
_local2.soundObj.setVolume(0);
fadeSound(soundID, volNum, fadeTime);
}
_local2.status = "playing";
if (_local2.onPlaySound != undefined) {
_local2.onPlaySound();
}
}
}
function stopSound(soundID, fadeOut, fadeTime) {
traceEvent("stopping sound");
var _local2 = getSoundObj(soundID);
if (_local2.status == "playing") {
if (fadeTime == undefined) {
fadeTime = 1;
}
if (fadeOut == undefined) {
_local2.soundObj.stop();
_local2.status = "stopped";
if (_local2.onStopSound != undefined) {
_local2.onStopSound();
}
traceEvent(("Sound :" + soundID) + " Stopped.");
} else {
fadeSound(soundID, 0, fadeTime);
}
}
}
function fadeSound(soundID, volNum, fadeTime) {
traceEvent("fading sound");
var _local2 = getSoundObj(soundID);
_local2.fadeVol = 0;
if (_local2.fadeTween != undefined) {
_local2.fadeTween.stop();
}
_local2.fadeTween = new mx.transitions.Tween(_local2, "fadeVol", mx.transitions.easing.None.easeNone, _local2.soundObj.getVolume(), volNum, fadeTime, true);
_local2.fadeTween.root = this;
_local2.fadeTween.parent = _local2;
_local2.fadeTween.onMotionChanged = function () {
this.parent.soundObj.setVolume(this.parent.fadeVol);
this.traceEvent("volume = " + this.parent.fadeVol);
};
_local2.fadeTween.onMotionFinished = function () {
this.traceEvent("fade sound complete");
if (this.finish == 0) {
this.root.stopSound(this.parent._name);
}
};
}
function getSoundStatus(soundID) {
return(getSoundObj(soundID).status);
}
function getSoundVolume(soundID) {
return(sound_array[soundID].soundObj.getVolume());
}
function setSoundVolume(soundID, volNum) {
sound_array[soundID].soundObj.setVolume(volNum);
sound_array[soundID].defaultVolume = volNum;
}
function getSoundObj(soundID) {
var _local2 = sound_array[soundID];
return(_local2);
}
function createSoundDataObj(soundID) {
var _local2 = (sound_array[soundID] = new Object());
return(_local2);
}
function addEventListener(soundID, event, eventFunction) {
var _local2 = getSoundObj(soundID);
_local2[event] = eventFunction;
traceEvent("eventFunction : " + soundID);
}
function removeEventListener(soundID, event, eventFunction) {
var _local2 = getSoundObj(soundID);
_local2[event].eventFunction = undefined;
delete _local2[event].eventFunction;
}
function traceEvent(event) {
if (traceEvents) {
trace("SoundLibrary : " + event);
}
}
function viewAPI() {
var _local1 = "******************************";
_local1 = _local1 + "SoundLibrary Class\nAuthor: Cole Reed\nVersion: 1.0\nRelease Date: 10/04/06\n";
_local1 = _local1 + "---------------------\n";
_local1 = _local1 + "to do:\nneeds more testing\n";
_local1 = _local1 + "---------------------\n";
_local1 = _local1 + "viewAPI(); traces and returns the following set of methods and events\n";
_local1 = _local1 + "---------------------\n";
_local1 = _local1 + "SongStreamer API:\n*Contructor:*\nSoundLibrary(soundHolderMC:Movieclip);\n//\n";
_local1 = _local1 + "*Public Methods:*\naddEventListener(soundID:String, event:String, eventFunction:Function);\nremoveEventListener(soundID:String);\naddSound(songID:String);\nremoveSound(songID:String);\nplaySound(soundID:String, [repeatNum:Number, volNum:Number, fadeTime:Number]);\nstopSound(soundID, [fadeOut:Boolean, fadeTime:Number]);\nfadeSound(soundID:String, volNum:Number, fadeTime:Number);\n//\n";
_local1 = _local1 + "*Getters and Setters:*setSoundVolume(soundID:String, vol:Number);\ngetSoundVolume(soundID:String):Number;\ngetSoundStatus(soundID:String):String;\n//\n";
_local1 = _local1 + "*Supported Event listener events:*\nonPlaySound - returns: Void;\nonStopSound - returns: Void;\nonSoundComplete - returns: Void;\n//\n";
_local1 = _local1 + "*Private*\ncreateSoundDataObj - returns: Object;\ngetSoundObj():Sound;\n";
_local1 = _local1 + "******************************\n";
trace(_local1);
}
var sound_array = new Array();
var traceEvents = true;
}
Symbol 268 MovieClip [__Packages.mx.transitions.OnEnterFrameBeacon] Frame 0
class mx.transitions.OnEnterFrameBeacon
{
function OnEnterFrameBeacon () {
}
static function init() {
var _local4 = _global.MovieClip;
if (!_root.__OnEnterFrameBeacon) {
mx.transitions.BroadcasterMX.initialize(_local4);
var _local3 = _root.createEmptyMovieClip("__OnEnterFrameBeacon", 9876);
_local3.onEnterFrame = function () {
_global.MovieClip.broadcastMessage("onEnterFrame");
};
}
}
static var version = "1.1.0.52";
}
Symbol 269 MovieClip [__Packages.mx.transitions.BroadcasterMX] Frame 0
class mx.transitions.BroadcasterMX
{
var _listeners;
function BroadcasterMX () {
}
static function initialize(o, dontCreateArray) {
if (o.broadcastMessage != undefined) {
delete o.broadcastMessage;
}
o.addListener = mx.transitions.BroadcasterMX.prototype.addListener;
o.removeListener = mx.transitions.BroadcasterMX.prototype.removeListener;
if (!dontCreateArray) {
o._listeners = new Array();
}
}
function addListener(o) {
removeListener(o);
if (broadcastMessage == undefined) {
broadcastMessage = mx.transitions.BroadcasterMX.prototype.broadcastMessage;
}
return(_listeners.push(o));
}
function removeListener(o) {
var _local2 = _listeners;
var _local3 = _local2.length;
while (_local3--) {
if (_local2[_local3] == o) {
_local2.splice(_local3, 1);
if (!_local2.length) {
broadcastMessage = undefined;
}
return(true);
}
}
return(false);
}
function broadcastMessage() {
var _local5 = String(arguments.shift());
var _local4 = _listeners.concat();
var _local6 = _local4.length;
var _local3 = 0;
while (_local3 < _local6) {
_local4[_local3][_local5].apply(_local4[_local3], arguments);
_local3++;
}
}
static var version = "1.1.0.52";
}
Symbol 270 MovieClip [__Packages.mx.transitions.Tween] Frame 0
class mx.transitions.Tween
{
var obj, prop, begin, useSeconds, _listeners, addListener, prevTime, _time, looping, _duration, broadcastMessage, isPlaying, _fps, prevPos, _pos, change, _intervalID, _startTime;
function Tween (obj, prop, func, begin, finish, duration, useSeconds) {
mx.transitions.OnEnterFrameBeacon.init();
if (!arguments.length) {
return;
}
this.obj = obj;
this.prop = prop;
this.begin = begin;
position = (begin);
this.duration = (duration);
this.useSeconds = useSeconds;
if (func) {
this.func = func;
}
this.finish = (finish);
_listeners = [];
addListener(this);
start();
}
function set time(t) {
prevTime = _time;
if (t > duration) {
if (looping) {
rewind(t - _duration);
update();
broadcastMessage("onMotionLooped", this);
} else {
if (useSeconds) {
_time = _duration;
update();
}
stop();
broadcastMessage("onMotionFinished", this);
}
} else if (t < 0) {
rewind();
update();
} else {
_time = t;
update();
}
//return(time);
}
function get time() {
return(_time);
}
function set duration(d) {
_duration = (((d == null) || (d <= 0)) ? (_global.Infinity) : (d));
//return(duration);
}
function get duration() {
return(_duration);
}
function set FPS(fps) {
var _local2 = isPlaying;
stopEnterFrame();
_fps = fps;
if (_local2) {
startEnterFrame();
}
//return(FPS);
}
function get FPS() {
return(_fps);
}
function set position(p) {
setPosition(p);
//return(position);
}
function setPosition(p) {
prevPos = _pos;
obj[prop] = (_pos = p);
broadcastMessage("onMotionChanged", this, _pos);
updateAfterEvent();
}
function get position() {
return(getPosition());
}
function getPosition(t) {
if (t == undefined) {
t = _time;
}
return(func(t, begin, change, _duration));
}
function set finish(f) {
change = f - begin;
//return(finish);
}
function get finish() {
return(begin + change);
}
function continueTo(finish, duration) {
begin = position;
this.finish = (finish);
if (duration != undefined) {
this.duration = (duration);
}
start();
}
function yoyo() {
continueTo(begin, time);
}
function startEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.addListener(this);
} else {
_intervalID = setInterval(this, "onEnterFrame", 1000 / _fps);
}
isPlaying = true;
}
function stopEnterFrame() {
if (_fps == undefined) {
_global.MovieClip.removeListener(this);
} else {
clearInterval(_intervalID);
}
isPlaying = false;
}
function start() {
rewind();
startEnterFrame();
broadcastMessage("onMotionStarted", this);
}
function stop() {
stopEnterFrame();
broadcastMessage("onMotionStopped", this);
}
function resume() {
fixTime();
startEnterFrame();
broadcastMessage("onMotionResumed", this);
}
function rewind(t) {
_time = ((t == undefined) ? 0 : (t));
fixTime();
update();
}
function fforward() {
time = (_duration);
fixTime();
}
function nextFrame() {
if (useSeconds) {
time = ((getTimer() - _startTime) / 1000);
} else {
time = (_time + 1);
}
}
function onEnterFrame() {
nextFrame();
}
function prevFrame() {
if (!useSeconds) {
time = (_time - 1);
}
}
function toString() {
return("[Tween]");
}
function fixTime() {
if (useSeconds) {
_startTime = getTimer() - (_time * 1000);
}
}
function update() {
position = (getPosition(_time));
}
static var version = "1.1.0.52";
static var __initBeacon = mx.transitions.OnEnterFrameBeacon.init();
static var __initBroadcaster = mx.transitions.BroadcasterMX.initialize(mx.transitions.Tween.prototype, true);
function func(t, b, c, d) {
return(((c * t) / d) + b);
}
}
Symbol 271 MovieClip [__Packages.mx.transitions.easing.None] Frame 0
class mx.transitions.easing.None
{
function None () {
}
static function easeNone(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeIn(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static function easeInOut(t, b, c, d) {
return(((c * t) / d) + b);
}
static var version = "1.1.0.52";
}
Symbol 272 MovieClip [__Packages.mx.transitions.easing.Strong] Frame 0
class mx.transitions.easing.Strong
{
function Strong () {
}
static function easeIn(t, b, c, d) {
t = t / d;
return((((((c * t) * t) * t) * t) * t) + b);
}
static function easeOut(t, b, c, d) {
t = (t / d) - 1;
return((c * (((((t * t) * t) * t) * t) + 1)) + b);
}
static function easeInOut(t, b, c, d) {
t = t / (d / 2);
if (t < 1) {
return(((((((c / 2) * t) * t) * t) * t) * t) + b);
}
t = t - 2;
return(((c / 2) * (((((t * t) * t) * t) * t) + 2)) + b);
}
static var version = "1.1.0.52";
}
Symbol 193 MovieClip Frame 1
stop();
Symbol 193 MovieClip Frame 10
stop();
Symbol 204 MovieClip Frame 1
stop();
Symbol 210 Button
on (press) {
instruct_mc.gotoAndPlay("on");
}
Symbol 220 MovieClip Frame 1
stop();
Symbol 220 MovieClip Frame 3
stop();
Symbol 220 MovieClip Frame 8
stop();
Symbol 220 MovieClip Frame 13
stop();
Symbol 220 MovieClip Frame 18
stop();
Symbol 223 MovieClip Frame 1
if (!_parent.stopMcTimer) {
play();
} else {
stop();
}
Symbol 223 MovieClip Frame 26
_parent.timerCounter_fun();
Symbol 231 MovieClip Frame 1
bg_mc.onRelease = function () {
};
bg_mc.useHandCursor = false;
resume_btn.onRelease = function () {
_global.rootOfThisGame.pauseGame(false);
};
Symbol 243 MovieClip Frame 1
stop();
_root.__allSound.setVolume(100);
b_btn.onPress = function () {
gotoAndStop (2);
};
Symbol 243 MovieClip Frame 2
stop();
_root.__allSound.setVolume(0);
b_btn.onPress = function () {
gotoAndStop (1);
};
Symbol 258 MovieClip Frame 2
_parent.car.gotoAndStop(1);
var xItem = (new mx.transitions.Tween(_parent.car, "_y", mx.transitions.easing.Strong.easeOut, _parent.car._y, -150, 118, false));
Symbol 258 MovieClip Frame 112
_parent.removeAllEm();
_parent.lives_mc.swapDepths(1);
Symbol 258 MovieClip Frame 192
_parent.motion_won_mc.gotoAndPlay(2);
stop();
Symbol 264 MovieClip Frame 1
stop();
Symbol 264 MovieClip Frame 50
this.play_btn.onPress = function () {
_parent.gotoAndPlay(1);
};
stop();