Frame 1
MovieClip.prototype.backward = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe - 1;
} else {
var _local2 = this._currentframe - this.spd;
}
if (_local2 < 1) {
var _local2 = 1;
}
this.gotoAndStop(_local2);
if (this._currentframe == 1) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.forward = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe + 1;
} else {
var _local2 = this._currentframe + this.spd;
}
if (_local2 > this._totalframes) {
var _local2 = this._totalframes;
}
this.gotoAndStop(_local2);
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.playTo = function (frNum, obj) {
this.frNum = frNum;
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
if (frNum == this._currentframe) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
if (frNum) {
if (this._currentframe < frNum) {
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe + 1;
} else {
var _local2 = this._currentframe + this.spd;
}
if (_local2 > this.frNum) {
var _local2 = this.frNum;
}
this.gotoAndStop(_local2);
if (this._currentframe == this.frNum) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
}
if (this._currentframe > frNum) {
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe - 1;
} else {
var _local2 = this._currentframe - this.spd;
}
if (_local2 < this.frNum) {
var _local2 = this.frNum;
}
this.gotoAndStop(_local2);
if (this._currentframe == this.frNum) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
}
}
};
MovieClip.prototype.fadeOut = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
if (obj.myAlpha != undefined) {
this.myAlpha = obj.myAlpha;
} else {
this.myAlpha = 0;
}
this.onEnterFrame = function () {
var _local2 = this._alpha - this.spd;
if (_local2 < this.myAlpha) {
_local2 = this.myAlpha;
}
this._alpha = _local2;
if (this._alpha <= this.myAlpha) {
if (this._alpha <= 0) {
this._visible = false;
}
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.fadeIn = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if (obj.myAlpha != undefined) {
this.myAlpha = obj.myAlpha;
} else {
this.myAlpha = 100;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this._visible = true;
this.onEnterFrame = function () {
var _local2 = this._alpha + this.spd;
if (_local2 > this.myAlpha) {
_local2 = this.myAlpha;
}
this._alpha = _local2;
if (this._alpha >= this.myAlpha) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.killMotion = function () {
delete this.onEnterFrame;
delete this.myClass;
delete this.myFunc;
delete this.myAlpha;
delete this.spd;
};
var JRV_preloader = (new com.jrvisuals.util.JRV_preloader(preloader_mc, _root, {isPlayAnimation:true}));
stop();
Frame 2
MovieClip.prototype.backward = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe - 1;
} else {
var _local2 = this._currentframe - this.spd;
}
if (_local2 < 1) {
var _local2 = 1;
}
this.gotoAndStop(_local2);
if (this._currentframe == 1) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.forward = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe + 1;
} else {
var _local2 = this._currentframe + this.spd;
}
if (_local2 > this._totalframes) {
var _local2 = this._totalframes;
}
this.gotoAndStop(_local2);
if (this._currentframe == this._totalframes) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.playTo = function (frNum, obj) {
this.frNum = frNum;
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
if (frNum == this._currentframe) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
if (frNum) {
if (this._currentframe < frNum) {
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe + 1;
} else {
var _local2 = this._currentframe + this.spd;
}
if (_local2 > this.frNum) {
var _local2 = this.frNum;
}
this.gotoAndStop(_local2);
if (this._currentframe == this.frNum) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
}
if (this._currentframe > frNum) {
this.onEnterFrame = function () {
if (this.spd == undefined) {
var _local2 = this._currentframe - 1;
} else {
var _local2 = this._currentframe - this.spd;
}
if (_local2 < this.frNum) {
var _local2 = this.frNum;
}
this.gotoAndStop(_local2);
if (this._currentframe == this.frNum) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
}
}
};
MovieClip.prototype.fadeOut = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
if (obj.myAlpha != undefined) {
this.myAlpha = obj.myAlpha;
} else {
this.myAlpha = 0;
}
this.onEnterFrame = function () {
var _local2 = this._alpha - this.spd;
if (_local2 < this.myAlpha) {
_local2 = this.myAlpha;
}
this._alpha = _local2;
if (this._alpha <= this.myAlpha) {
if (this._alpha <= 0) {
this._visible = false;
}
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.fadeIn = function (obj) {
if (obj.mySpeed != undefined) {
this.spd = obj.mySpeed;
} else {
this.spd = 1;
}
if (obj.myAlpha != undefined) {
this.myAlpha = obj.myAlpha;
} else {
this.myAlpha = 100;
}
if ((obj.myClass != undefined) && (obj.myFunc != undefined)) {
this.myClass = obj.myClass;
this.myFunc = String(obj.myFunc);
} else {
this.myClass = undefined;
this.myFunc = undefined;
}
this._visible = true;
this.onEnterFrame = function () {
var _local2 = this._alpha + this.spd;
if (_local2 > this.myAlpha) {
_local2 = this.myAlpha;
}
this._alpha = _local2;
if (this._alpha >= this.myAlpha) {
delete this.onEnterFrame;
if ((this.myClass != undefined) && (this.myFunc != undefined)) {
this.myClass[this.myFunc]();
}
}
};
};
MovieClip.prototype.killMotion = function () {
delete this.onEnterFrame;
delete this.myClass;
delete this.myFunc;
delete this.myAlpha;
delete this.spd;
};
var s = (new com.ms3.pepcid.shell.Shell(this, "HURDLES JUMPED", true, 60, 0));
stop();
Symbol 11 MovieClip Frame 1
stop();
Symbol 38 MovieClip Frame 1
stop();
Symbol 39 MovieClip Frame 5
stop();
Symbol 39 MovieClip Frame 10
stop();
Symbol 345 MovieClip [__Packages.com.jrvisuals.util.JRV_preloader] Frame 0
class com.jrvisuals.util.JRV_preloader
{
var ROOT, pre, txt, logo, bar, targetArray, preTarget, infoText, inLoadTime, pTarget, timeInterval;
function JRV_preloader (p, tg, playTarget) {
ROOT = p;
pre = p.LB;
txt = pre.info_txt;
logo = pre.icon_mc;
bar = pre.progbar_mc;
targetArray = [];
if (playTarget.initLoad != false) {
targetArray.push(tg);
var _local2 = 0;
while (_local2 < playTarget.otherMovies.length) {
targetArray.push(playTarget.otherMovies[_local2]);
_local2++;
}
preTarget = tg;
if (!playTarget.doNotStop) {
preTarget.stop();
}
intSpeed = 20;
infoText = "Content Loading";
setupPreloader(targetArray, playTarget);
}
}
function setupPreloader(tg, pT) {
function counter(obj) {
obj.updatePreloader();
}
function watchEnd(obj) {
obj.waitForEnd();
}
die();
ROOT.play();
inLoadTime = 0;
targetArray = [];
if (tg.length == 1) {
preTarget = tg[0];
}
pTarget = {};
pTarget = pT;
var _local4 = 0;
var _local5 = 0;
var _local2 = 0;
while (_local2 < tg.length) {
_local4++;
targetArray.push(tg[_local2]);
if ((tg[_local2].getBytesTotal() == tg[_local2].getBytesLoaded()) && (tg[_local2].getBytesTotal() > 4)) {
_local5++;
}
_local2++;
}
if ((_local5 >= _local4) && (_local4 > 4)) {
if (!pTarget.isPlayAnimation) {
ROOT._alpha = 0;
killPreloader();
} else {
ROOT.gotoAndPlay("done");
die();
if (pTarget.subaction != undefined) {
pTarget.classRef[pTarget.subaction]();
}
timeInterval = setInterval(watchEnd, intSpeed, this);
}
} else if (pT.playToEnd) {
timeInterval = setInterval(counter, intSpeed, this);
} else {
timeInterval = setInterval(counter, intSpeed, this);
}
}
function updatePreloader() {
function watchEnd(obj) {
obj.waitForEnd();
}
var _local5 = true;
var _local3 = 0;
var _local4 = 0;
var _local2 = 0;
while (_local2 < targetArray.length) {
if (targetArray[_local2].getBytesTotal() == 0) {
_local5 = false;
}
_local4 = _local4 + targetArray[_local2].getBytesLoaded();
if (targetArray[_local2].getBytesTotal() > 4) {
_local3 = _local3 + targetArray[_local2].getBytesTotal();
} else {
_local3 = _local3 + (_local3 * 2);
}
_local2++;
}
var _local6 = Math.ceil(_local4 / 1000);
var _local8 = Math.ceil(_local3 / 1000);
var _local10 = _local8 / 100;
var _local7 = Math.floor(_local6 / _local10);
var _local9 = _local7;
pre.percent_txt.text = _local7 + "%";
pre.KBloaded_txt.text = _local6 + " K";
pre.KBtotal_txt.text = _local8 + " K";
txt.text = infoText;
logo._visible = true;
bar._visible = true;
inLoadTime++;
if (((_local3 == -1) && (_local4 == 0)) && (inLoadTime > 30)) {
pTarget.classRef.loadError();
die();
}
if (((_local4 >= _local3) && (_local3 > 4)) && (_local5)) {
pre.gotoAndStop(100);
pre.percent_txt.text = "100%";
die();
if (((pre._alpha > 0) || (pre._currentframe < 3)) || (pTarget.isPlayAnimation)) {
ROOT.play();
if (pTarget.subaction != undefined) {
pTarget.classRef[pTarget.subaction]();
}
timeInterval = setInterval(watchEnd, intSpeed, this);
} else {
ROOT.stop();
killPreloader();
}
} else if (_local9 > pre._currentframe) {
pre.gotoAndStop(_local9);
}
}
function waitForEnd() {
if (ROOT._currentframe == ROOT._totalframes) {
ROOT.gotoAndStop(1);
killPreloader();
} else {
ROOT.play();
}
}
function killPreloader() {
die();
if ((pTarget.action == undefined) || (pTarget.action == false)) {
preTarget.play();
} else if (typeof(pTarget.action) == "movieclip") {
pTarget.action.play();
} else if (typeof(pTarget.action) == "string") {
pTarget.classRef[pTarget.action]();
}
}
function die() {
clearInterval(timeInterval);
}
var intSpeed = 50;
}
Symbol 346 MovieClip [__Packages.com.ms3.pepcid.shell.Shell] Frame 0
class com.ms3.pepcid.shell.Shell
{
static var ROOT, hudString, tint_mc, hudtint_mc, hud_mc, soundBtn_mc, hudleft_mc, title, counter, hudright_mc, time_txt, gameover_mc, replayBtn_mc, first_mc, second_mc, third_mc, metal_txt, finaltime_txt, menu_mc, playBtn_mc;
function Shell (_approot, _hudText, _hasTime, _time, _baseNumber) {
ROOT = _approot;
if (_hasTime) {
isUsingTimer = _hasTime;
}
hudString = _hudText;
baseNumber = _baseNumber;
new com.jrvisuals.game.JRV_sound({useMultipleLoops:false, musicLoop:["gamemusic", "victory"], playLoop:false});
initShell();
com.jrvisuals.game.JRV_sound.musicON(0, undefined, 45);
var _local2 = ROOT.hud_mc.soundBtn_mc;
_local2._btn.onRollOver = (_local2._btn.onDragOver = function () {
this._parent.music_mc._mc.forward();
});
_local2._btn.onRollOut = (_local2._btn.onDragOut = function () {
this._parent.music_mc._mc.backward();
});
_local2._btn.onPress = function () {
if ((com.jrvisuals.game.JRV_sound.soundState == null) || (com.jrvisuals.game.JRV_sound.soundState == true)) {
this._parent.music_mc.gotoAndStop("off");
com.jrvisuals.game.JRV_sound.musicOff(true);
} else {
com.jrvisuals.game.JRV_sound.soundState = true;
com.jrvisuals.game.JRV_sound.musicState = true;
this._parent.music_mc.gotoAndStop("on");
com.jrvisuals.game.JRV_sound.musicON(com.jrvisuals.game.JRV_sound.musicRef);
}
};
}
static function initShell() {
tint_mc = ROOT.tint_mc;
hudtint_mc = ROOT.hudtint_mc;
hud_mc = ROOT.hud_mc;
soundBtn_mc = hud_mc.soundBtn_mc;
hudleft_mc = hud_mc.hudleft_mc;
title = hudleft_mc.title_txt;
counter = hudleft_mc._txt;
hudright_mc = hud_mc.hudright_mc;
time_txt = hudright_mc._txt;
gameover_mc = ROOT.gameover_mc;
replayBtn_mc = gameover_mc.replayBtn_mc;
first_mc = gameover_mc.first_mc;
second_mc = gameover_mc.second_mc;
third_mc = gameover_mc.third_mc;
metal_txt = gameover_mc.metal_txt;
finaltime_txt = gameover_mc._txt;
hudtint_mc._visible = false;
hudtint_mc._alpha = 0;
gameover_mc._visible = false;
gameover_mc._alpha = 0;
if (!isUsingTimer) {
hudright_mc._visible = false;
}
menu_mc = hud_mc.menu_mc;
playBtn_mc = menu_mc.playBtn_mc;
registerMenu(menu_mc, [playBtn_mc], "main");
registerMenu(gameover_mc, [replayBtn_mc], "over");
setTitle(hudString);
resetCounter(baseNumber);
resetTime();
}
static function prepareGame() {
fadeOutHud();
fadeOutTint();
}
static function startGame() {
ROOT.nextFrame();
menu_mc._visible = false;
new com.ms3.pepcid.game.Game(ROOT, baseNumber);
com.ms3.pepcid.game.Game.prepareGame();
com.jrvisuals.game.JRV_sound.musChan1.setVolume(25);
com.jrvisuals.game.JRV_sound.musVol = 25;
}
static function prepareResetGame() {
com.jrvisuals.game.JRV_sound.musicON(0, undefined, 45);
com.ms3.pepcid.game.Game.reset();
}
static function resetGame() {
resetCounter(baseNumber);
resetTime();
com.ms3.pepcid.game.Game.prepareGame();
}
static function gameOver(_num) {
com.jrvisuals.game.JRV_sound.musicON(1, undefined, 45);
var _local1 = [];
var _local4;
var _local3;
var _local2 = "";
var _local5 = Math.floor(Math.random() * 100);
if (_local5 < 50) {
_local4 = 2;
_local3 = 3;
} else {
_local4 = 3;
_local3 = 2;
}
switch (_num) {
case 1 :
_local1.push(1);
_local1.push(_local4);
_local1.push(_local3);
_local2 = "Gold";
break;
case 2 :
_local1.push(_local4);
_local1.push(1);
_local1.push(_local3);
_local2 = "Silver";
break;
case 3 :
_local1.push(_local4);
_local1.push(_local3);
_local1.push(1);
_local2 = "Bronze";
}
first_mc.gotoAndStop(_local1[0]);
first_mc._mc.gotoAndStop(1);
second_mc.gotoAndStop(_local1[1]);
second_mc._mc.gotoAndStop(2);
third_mc.gotoAndStop(_local1[2]);
third_mc._mc.gotoAndStop(3);
metal_txt.text = _local2;
finaltime_txt.text = getTime();
if (Number(getTime()) < bestTime) {
bestTime = Number(getTime());
}
fadeInGameOver();
fadeInHudTint();
}
static function setTitle(_txt) {
title.text = _txt;
}
static function setTime(_time) {
time_txt.text = _time;
}
static function getTime() {
return(time_txt.text);
}
static function resetTime() {
setTime("00");
}
static function setCounter(_num) {
var _local1;
if (_num < 10) {
_local1 = "0" + _num;
} else {
_local1 = String(_num);
}
counter.text = _local1;
}
static function resetCounter(_num) {
if (baseNumber == undefined) {
setCounter(0);
} else {
setCounter(baseNumber);
}
}
static function fadeOutHud() {
menu_mc.fadeOut({mySpeed:15, myClass:com.ms3.pepcid.shell.Shell, myFunc:"startGame"});
}
static function fadeOutHudTint() {
hudtint_mc.fadeOut({mySpeed:15});
}
static function fadeInHudTint() {
hudtint_mc._visible = true;
hudtint_mc.fadeIn({mySpeed:15});
}
static function fadeOutTint() {
tint_mc.fadeOut({mySpeed:15});
}
static function fadeInTint() {
tint_mc._visible = true;
tint_mc.fadeIn({mySpeed:15});
}
static function fadeInGameOver() {
gameover_mc._visible = true;
gameover_mc.fadeIn({mySpeed:15});
}
static function fadeOutGameOver() {
gameover_mc.fadeOut({mySpeed:15, myFunc:"resetGame", myClass:com.ms3.pepcid.shell.Shell});
}
static function registerMenu(_clipRoot, _menuItems, _menuType) {
var _local4 = _menuType;
var _local3 = _menuItems;
for (var _local5 in _local3) {
var _local2 = _local3[_local5]._btn;
_local2.ID = _local4 + String(_local5);
_local2.onRollOver = function () {
this._parent._mc.forward();
};
_local2.onRollOut = (_local2.onDragOut = function () {
this._parent._mc.backward();
});
_local2.onRelease = (_local2.onDragOver = function () {
com.ms3.pepcid.shell.Shell.handleMenuClick(this.ID);
});
}
}
static function handleMenuClick(_buttonID) {
var _local1 = _buttonID;
switch (_local1) {
case "main0" :
prepareGame();
break;
case "over0" :
prepareResetGame();
}
}
static var isUsingTimer = false;
static var baseNumber = 0;
static var bestTime = 99;
}
Symbol 347 MovieClip [__Packages.com.ms3.pepcid.game.Game] Frame 0
class com.ms3.pepcid.game.Game
{
static var MC, player, title_mc, bg, start, planeRandom, pepcidRandom, time, myInt, bale;
function Game (_mc) {
MC = _mc;
initGame();
}
static function initGame() {
player = new com.ms3.pepcid.game.Player(MC.player_mc);
title_mc = MC.title_mc;
bg = new com.jrvisuals.game.JRV_backgroundScroller(MC, ["grass", "crowd", "bg"], [1, 0.75, 0.1], [0.8, 0.85, 0.3]);
start = new com.ms3.pepcid.game.Start(MC.start_mc);
MC.grass1_mc.start_mc._visible = false;
}
static function randomItemPlacement() {
planeRandom = Math.floor(Math.random() * Math.round(hurdleTotal / 2)) + Math.round(hurdleTotal / 4);
pepcidRandom = Math.floor(Math.random() * Math.round(hurdleTotal / 4)) + Math.round(hurdleTotal / 4);
}
static function prepareGame() {
delete time;
time = new com.ms3.pepcid.game.PepcidTimer(undefined, undefined, undefined, undefined);
randomItemPlacement();
title_mc.gotoAndStop(1);
title_mc.playTo(52, {myClass:com.ms3.pepcid.game.Game, myFunc:"startGame"});
}
static function startGame() {
title_mc.gotoAndStop(1);
myInt = setInterval(update, 30);
time.startTimer();
player.startReady();
bg.addItem(start, "start", 0);
var _local2 = distance;
var _local1 = 0;
while (_local1 <= hurdleTotal) {
_local2 = _local2 + distance;
if (_local1 < hurdleTotal) {
bg.addItem(new com.ms3.pepcid.game.Hurdle(MC.items_mc, _local1, _local2), "hurdle" + _local1, 0);
} else {
bg.addItem(new com.ms3.pepcid.game.FinishLine(MC.items_mc, _local2), "finishline", 0);
}
_local1++;
}
bale = new com.ms3.pepcid.game.Bale(MC.bale_mc);
bg.addItem(bale, "bale", 0);
}
static function update() {
var _local1 = {};
_local1 = player.update();
if (_local1.speedX != undefined) {
if (((totalmovement >= 0) && (_local1.speedX < 0)) || (_local1.speedX > 0)) {
movement = movement + _local1.speedX;
totalmovement = totalmovement + _local1.speedX;
}
}
if (movement > distance) {
movement = 0;
hurdleId++;
if (hurdleId == planeRandom) {
bg.addItem(new com.ms3.pepcid.game.Plane(MC.bg_mc), "plane", 2);
}
if (hurdleId == pepcidRandom) {
bg.addItem(new com.ms3.pepcid.game.Pepcid(MC), "pepcid", 0);
}
}
bg.updateItem("plane", 2);
if ((_local1.speedX < 0) && (totalmovement < 0)) {
bg.move(0, _local1.speedY, _local1.v);
} else {
bg.move(_local1.speedX, _local1.speedY, _local1.v);
}
}
static function createWin() {
clearInterval(myInt);
myInt = setInterval(win, 30);
player.update = player.win;
}
static function win() {
var _local1 = player.update();
bg.updateItem("finishline", 0);
if (_local1) {
clearInterval(myInt);
myInt = setInterval(prepareGameOver, 1000);
player.finishRun();
}
}
static function finishRace() {
time.stopTimer();
com.jrvisuals.game.JRV_sound.sfxPlay({linkage:"cheer", vol:40});
}
static function getPlacement() {
if (hurdleJumpedTotal <= Math.floor(hurdleId * 0.75)) {
return(3);
}
if (hurdleJumpedTotal < hurdleId) {
return(2);
}
return(1);
}
static function prepareGameOver() {
clearInterval(myInt);
bg.killItems();
com.ms3.pepcid.shell.Shell.gameOver(getPlacement());
}
static function reset() {
hurdleHitTotal = 0;
hurdleJumpedTotal = 0;
hurdleId = 0;
totalmovement = 0;
movement = 0;
player.reset();
bg.reset();
bale.reset();
clearInterval(myInt);
MC.grass0_mc.start_mc._visible = true;
com.ms3.pepcid.shell.Shell.fadeOutGameOver();
com.ms3.pepcid.shell.Shell.fadeOutHudTint();
}
static function die() {
}
static function pepcidPower() {
player.powerUp();
}
static function hurdleJumped() {
hurdleJumpedTotal++;
com.ms3.pepcid.shell.Shell.setCounter(hurdleJumpedTotal);
}
static function hurdleHit() {
com.jrvisuals.game.JRV_sound.sfxPlay({linkage:"horse", vol:60});
com.jrvisuals.game.JRV_sound.sfxPlay({linkage:"hurdlefall", vol:20});
player.stumble();
}
static var movement = 0;
static var totalmovement = 0;
static var hurdleId = 0;
static var hurdleTotal = 15;
static var hurdleJumpedTotal = 0;
static var hurdleHitTotal = 0;
static var distance = 600;
}
Symbol 348 MovieClip [__Packages.com.ms3.pepcid.game.Player] Frame 0
class com.ms3.pepcid.game.Player
{
var mc, baseScale, x, y, update;
function Player (_mc) {
mc = _mc;
baseScale = mc._xscale;
x = mc._x;
y = mc._y;
update = intro;
intro();
}
function intro() {
mc.gotoAndStop("STAND");
}
function startReady() {
update = ready;
}
function ready() {
var _local2 = new flash.geom.Point(0, 0);
_local2 = pollKeys(_local2);
if (_local2.x > 0) {
mc._mc.play();
update = move;
}
}
function move() {
var _local2 = new flash.geom.Point(0, 0);
_local2 = pollKeys(_local2);
if (_local2.x > 0) {
if (speedX < 0) {
speedX = speedX * -1;
}
speedX = speedX + accel;
} else if (_local2.x < 0) {
if (speedX > 0) {
speedX = speedX * -1;
}
speedX = speedX - accel;
} else if (speedX > 0) {
speedX = speedX - 1;
if (speedX < 1) {
speedX = 0;
}
} else if (speedX < 0) {
speedX = speedX + 1;
if (Math.abs(speedX) < 1) {
speedX = 0;
}
}
if (speedX != 0) {
mc.gotoAndStop("RUN");
} else {
mc.gotoAndStop("STAND");
}
if (speedX > maxSpeed) {
speedX = maxSpeed;
} else if (speedX < (maxSpeed * -1)) {
speedX = maxSpeed * -1;
}
if (_local2.y != -1) {
return({speedX:speedX, speedY:speedY, v:_local2});
}
mc.gotoAndStop("JUMP");
update = jump;
speedY = jumpSpeed;
isJumping = true;
landPoint = mc._y;
return({speedX:speedX, speedY:speedY, v:_local2});
}
function jump() {
var _local2 = new flash.geom.Point(0, 0);
_local2 = pollKeys(_local2);
if (_local2.x > 0) {
speedX = speedX + accel;
} else if (_local2.x < 0) {
speedX = speedX - accel;
} else if (speedX > 0) {
speedX = speedX - accel;
if (speedX < 1) {
speedX = 0;
}
} else if (speedX < 0) {
speedX = speedX + accel;
if (Math.abs(speedX) < 1) {
speedX = 0;
}
}
if (speedX > maxSpeed) {
speedX = maxSpeed;
} else if (speedX < (maxSpeed * -1)) {
speedX = maxSpeed * -1;
}
mc._y = mc._y + speedY;
speedY = speedY + 2.3;
if (speedY >= 0) {
mc._mc.gotoAndStop("landing");
mc._mc.forward();
}
if (mc._y > landPoint) {
mc._y = landPoint;
land();
}
return({speedX:speedX, speedY:speedY, v:_local2});
}
function land() {
isJumping = false;
update = move;
}
function pollKeys(_v) {
if (Key.isDown(37)) {
_v.x = -1;
mc._xscale = baseScale * -1;
} else if (Key.isDown(39)) {
_v.x = 1;
mc._xscale = baseScale;
}
if ((Key.isDown(32) || (Key.isDown(38))) && (!isJumping)) {
_v.y = -1;
}
return(_v);
}
function stumble() {
if (!isJumping) {
speedX = 0;
speedY = 0;
mc.gotoAndStop("STUMBLE");
update = landStumble;
} else {
mc.gotoAndStop("AIRSTUMBLE");
update = airStumble;
}
}
function landStumble() {
if (mc._mc._currentframe >= mc._mc._totalframes) {
update = move;
}
}
function airStumble() {
if (isJumping) {
mc._y = mc._y + speedY;
speedY = speedY + 2.3;
if (mc._y > landPoint) {
speedX = 0;
speedY = 0;
mc._y = landPoint;
mc._mc.gotoAndPlay(2);
isJumping = false;
update = landStumble;
}
com.ms3.pepcid.game.Game.bg.move(speedX, speedY, new flash.geom.Point(0, 0));
}
}
function powerUp() {
com.jrvisuals.game.JRV_sound.sfxPlay({linkage:"powerup", vol:60});
jumpSpeed = powerJumpSpeed;
}
function win() {
if (speedX <= 0) {
speedX = speedX * -1;
}
if (isJumping) {
mc._y = mc._y + speedY;
speedY = speedY + 2.3;
if (mc._y >= landPoint) {
mc._y = landPoint;
speedY = 0;
isJumping = false;
mc.gotoAndStop("RUN");
}
}
com.ms3.pepcid.game.Game.bg.move(0, speedY, new flash.geom.Point(0, 0));
mc._x = mc._x + speedX;
if (mc._x > 700) {
return(true);
}
return(false);
}
function finishRun() {
update = undefined;
mc.gotoAndStop("STAND");
}
function reset() {
update = intro;
intro();
mc._x = x;
mc._xscale = baseScale;
jumpSpeed = defaultJumpSpeed;
isJumping = false;
isPoweredUp = false;
}
var isMovingGuy = false;
var speedX = 0;
var speedY = 0;
var accel = 1;
var maxSpeed = 15;
var lastdirection = 0;
var jumpSpeed = -11;
var landPoint = 0;
var powerJumpSpeed = -15;
var defaultJumpSpeed = -11;
var defaultPowerJumpSpeed = -15;
var isJumping = false;
var isPoweredUp = false;
}
Symbol 349 MovieClip [__Packages.com.jrvisuals.game.JRV_sound] Frame 0
class com.jrvisuals.game.JRV_sound
{
static var maxChannel, musicLoopObj, useMultipleMusicLoops, playLoopOnInit, panWidth, musicState, soundState, currChannel, musId, musVol, sfxChannels, chanVolume, masterClassRef, musChan1, musChan2, fadeIn, fadeOut;
function JRV_sound (obj) {
var _local2 = obj.musicLoop;
var _local4 = obj.playLoop;
var _local3 = obj.maxChan;
var _local5 = obj.useMultipleLoops;
var _local6 = obj.panW;
var _local7 = obj.masterClassRef;
if (_local3 == undefined) {
maxChannel = 6;
} else {
maxChannel = _local3;
}
if (_local2 == undefined) {
musicLoopObj = ["bgmusic"];
} else {
musicLoopObj = _local2;
}
if (_local5 == undefined) {
useMultipleMusicLoops = false;
} else {
useMultipleMusicLoops = _local5;
}
if (_local4 == undefined) {
playLoopOnInit = true;
} else {
playLoopOnInit = _local4;
}
if (_local6 != undefined) {
panWidth = Math.round(_local6 / 2);
}
musicState = true;
soundState = true;
currChannel = 0;
musicRef = 0;
musId = 1;
musVol = 100;
sfxChannels = [];
chanVolume = [];
makeSoundChannels(_local7);
if (playLoopOnInit) {
musicON();
}
}
static function makeSoundChannels(_mc) {
masterClassRef = _mc;
if (masterClassRef == undefined) {
_root.snd.removeMovieClip();
masterClassRef = _root.createEmptyMovieClip("snd", _root.getNextHighestDepth());
} else {
masterClassRef.snd.removeMovieClip();
masterClassRef = masterClassRef.createEmptyMovieClip("snd", masterClassRef.getNextHighestDepth());
}
sfxChannels = [];
var _local2 = 0;
while (_local2 <= (maxChannel + 6)) {
var _local3 = ("sfxChan" + _local2) + "_mc";
var _local5 = masterClassRef.createEmptyMovieClip(_local3, masterClassRef.getNextHighestDepth());
var _local4 = new Sound(_local5);
sfxChannels.push(_local4);
chanVolume.push(0);
_local2++;
}
var _local6 = masterClassRef.createEmptyMovieClip("sfxMusObj_mc", 100);
musChan1 = new Sound(_local6);
_local6 = masterClassRef.createEmptyMovieClip("sfxMusObj2_mc", 101);
musChan2 = new Sound(_local6);
}
static function sfxPlay(obj) {
var _local3 = obj.channelRef;
var _local7 = obj.linkage;
var _local6 = obj.vol;
var _local5 = obj.loops;
var _local8 = obj.playWhenDone;
var timelineToPlay = obj.timelineToPlay;
var _local9 = obj.xPos;
if (soundState || ((!soundState) && (_local5 == 99))) {
if (_local3 == undefined) {
currChannel++;
if (currChannel > maxChannel) {
currChannel = 0;
}
_local3 = currChannel;
}
var _local2 = sfxChannels[_local3];
_local2.stop();
_local2.setVolume(_local6);
chanVolume[_local3] = _local6;
if ((_local5 == 99) && (!soundState)) {
_local2.setVolume(0);
}
if (panWidth != undefined) {
panning(_local9, _local2);
}
_local2.attachSound(_local7);
_local2.start(0, _local5);
if (_local8) {
_local2.timelineToPlay = timelineToPlay;
_local2.onSoundComplete = function () {
this.timelineToPlay.play();
};
}
}
}
static function musPlay(channelRef, linkage, vol, loops) {
channelRef.stop();
if ((musicState && (soundState)) && (linkage != undefined)) {
channelRef.setVolume(vol);
channelRef.attachSound(linkage);
channelRef.start(0, loops);
}
}
static function sfxStop(chan) {
if (chan == undefined) {
sfxStopAll();
} else {
sfxChannels[chan].stop();
sfxChannels[chan].setVolume(0);
}
}
static function sfxStopAll() {
var _local1 = -1;
var _local2 = sfxChannels.length;
while (_local1 < _local2) {
_local1++;
sfxChannels[_local1].setVolume(0);
}
}
static function sfxStartAll() {
var _local2 = -1;
var _local3 = sfxChannels.length;
while (_local2 < _local3) {
_local2++;
var _local1 = chanVolume[_local2];
if (_local1 == undefined) {
_local1 = 0;
}
sfxChannels[_local2].setVolume(_local1);
}
}
static function musicOff(bl) {
if (bl) {
soundState = false;
}
musicState = false;
musChan1.stop();
musChan2.stop();
sfxStopAll();
}
static function musicON(ref, crossfade, vol) {
if (ref == undefined) {
ref = musicRef;
}
musicRef = ref;
if (musicState && (soundState)) {
if (!crossfade) {
musChan1.stop();
musChan2.stop();
if (musicRef == 0) {
var _local3 = musChan1;
} else {
var _local3 = musChan1;
}
if (vol != undefined) {
musVol = vol;
}
} else {
musId++;
if (musId > 2) {
musId = 1;
var _local3 = musChan1;
} else {
var _local3 = musChan2;
}
var _local4 = musId;
_local4++;
if (_local4 > 2) {
_local4 = 1;
var _local5 = musChan1;
} else {
var _local5 = musChan2;
}
if (vol != undefined) {
musVol = vol;
}
vol = 0;
}
if (vol == undefined) {
vol = musVol;
}
if (ref == undefined) {
ref = 0;
}
musPlay(_local3, musicLoopObj[ref], vol, 999);
if (crossfade) {
fadeInMusic(_local3);
fadeOutMusic(_local5);
}
sfxStartAll();
}
}
static function replaceMusicTrack(_linkage, _vol) {
if (_vol == undefined) {
_vol = 100;
}
musChan1.stop();
musChan2.stop();
if (_linkage != undefined) {
musicLoopObj[0] = _linkage;
musPlay(musChan1, _linkage, _vol, 999);
} else {
musicLoopObj = [];
}
}
static function fadeInMusic(ref) {
function fadeMeIn(ref) {
var _local1 = ref.getVolume() + 1;
if (_local1 > com.jrvisuals.game.JRV_sound.musVol) {
_local1 == com.jrvisuals.game.JRV_sound.musVol;
}
ref.setVolume(_local1);
if (ref.getVolume() == com.jrvisuals.game.JRV_sound.musVol) {
clearInterval(com.jrvisuals.game.JRV_sound.fadeIn);
}
}
if (ref == undefined) {
if (musId == 1) {
ref = musChan1;
} else {
ref = musChan2;
}
}
clearInterval(fadeIn);
fadeIn = setInterval(fadeMeIn, 30, ref);
}
static function fadeOutMusic(ref) {
function fadeMeOut(ref, snd) {
var _local1 = ref.getVolume() - 1;
if (_local1 < 0) {
_local1 == 0;
}
ref.setVolume(_local1);
if (ref.getVolume() == 0) {
ref.stop();
clearInterval(com.jrvisuals.game.JRV_sound.fadeOut);
}
}
if (ref == undefined) {
if (musId == 1) {
ref = musChan1;
} else {
ref = musChan2;
}
}
clearInterval(fadeOut);
fadeOut = setInterval(fadeMeOut, 30, ref);
}
static function musicONcheck() {
musChan1.stop();
if (musicState && (soundState)) {
musPlay(musChan1, musicLoopObj[0], musVol, 999);
}
}
static function updatePanning(X, ref, wid) {
panning(X, sfxChannels[ref], wid);
}
static function panning(X, ref, wid) {
var _local2;
var _local1;
var _local4;
if (wid != undefined) {
_local4 = wid;
} else {
_local4 = panWidth;
}
if (X < panWidth) {
_local1 = X / panWidth;
_local2 = (100 - (_local1 * 100)) * -1;
} else if (X > panWidth) {
_local1 = (X - panWidth) / panWidth;
_local2 = _local1 * 100;
} else if (X == panWidth) {
_local2 = 0;
}
ref.setPan(_local2);
}
static var musicRef = 0;
}
Symbol 350 MovieClip [__Packages.com.ms3.pepcid.game.Hurdle] Frame 0
class com.ms3.pepcid.game.Hurdle
{
var mc;
function Hurdle (_mc, _idx, _pos) {
mc = _mc.attachMovie("hurdle", "hurdle" + _idx, _mc.getNextHighestDepth());
name = "hurdle" + _idx;
mc._x = _pos;
mc._y = ground;
mc._xscale = (mc._yscale = 25);
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground + 79;
if (!isFalling) {
if ((mc._x > 0) && (mc._x < 700)) {
checkHit();
if (!isHurdleJumped) {
var _local2 = com.ms3.pepcid.game.Game.player.mc._x - mc._x;
if (_local2 > 70) {
com.ms3.pepcid.game.Game.hurdleJumped();
isHurdleJumped = true;
}
}
}
} else {
fall();
}
}
function checkHit() {
if (mc.hitbox_mc.hitTest(com.ms3.pepcid.game.Game.player.mc.hitbox_mc)) {
com.ms3.pepcid.game.Game.hurdleHit();
isFalling = true;
}
}
function fall() {
if (mc._rotation != 90) {
mc._rotation = mc._rotation + 10;
}
}
function die() {
mc.die = function () {
this.removeMovieClip();
};
mc.fadeOut({mySpeed:15, myClass:mc, myFunc:"die"});
}
var startRotation = 0;
var endRotation = 90;
var attachName = "hurdle";
var ground = 216;
var isFalling = false;
var name = "";
var isHurdleJumped = false;
}
Symbol 351 MovieClip [__Packages.com.ms3.pepcid.game.Bale] Frame 0
class com.ms3.pepcid.game.Bale
{
var mc, x;
function Bale (_mc) {
mc = _mc;
name = "bale";
x = mc._x;
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground + ground;
if (mc._x < -100) {
mc._x = 700;
} else if (mc._x > 700) {
mc._x = -100;
}
}
function reset() {
mc._x = x;
}
var attachName = "bale";
var ground = 93;
var name = "";
}
Symbol 352 MovieClip [__Packages.com.jrvisuals.game.JRV_backgroundScroller] Frame 0
class com.jrvisuals.game.JRV_backgroundScroller
{
var MC, movieClipArray, distanceArray, edgeArray, speedXArray, speedYArray, startXArray, startYArray, indexArray, objectDepthArray;
function JRV_backgroundScroller (_mc, _movieClipArray, _xSpeedArray, _ySpeedArray) {
MC = _mc;
init(_movieClipArray, _xSpeedArray, _ySpeedArray);
}
function init(_mcA, _xS, _yS) {
movieClipArray = [];
distanceArray = [];
edgeArray = [];
speedXArray = [];
speedYArray = [];
startXArray = [];
startYArray = [];
indexArray = [];
objectDepthArray = [];
var _local3 = 0;
while (_local3 < _mcA.length) {
var _local2 = MC[_mcA[_local3] + "0_mc"];
var _local4 = MC[_mcA[_local3] + "1_mc"];
objectDepthArray.push({});
movieClipArray.push(_mcA[_local3]);
if (_local2._x < 0) {
var _local6 = (_local4._x + (_local2._x * -1)) - _local2._x;
}
distanceArray.push(_local4._x - _local2._x);
edgeArray.push(distanceArray[_local3] * -1);
speedXArray.push(_xS[_local3]);
speedYArray.push(_yS[_local3]);
startYArray.push(_local2._y);
_local2.startX = _local2._x;
startXArray.push(_local2._x);
_local2.startY = _local2._y;
_local4.startX = _local4._x;
_local4.startY = _local4._y;
indexArray.push(0);
_local3++;
}
}
function addItem(_object, _iname, _depth) {
objectDepthArray[_depth][_iname] = _object;
}
function updateItem(_iname, _depth) {
objectDepthArray[_depth][_iname].update();
}
function killItems(_iname, _depth) {
if (_iname == undefined) {
for (var _local3 in objectDepthArray) {
for (var _local2 in objectDepthArray[_local3]) {
objectDepthArray[_local3][_local2].die();
delete objectDepthArray[_local3][_local2];
}
}
} else {
objectDepthArray[_depth][_iname].die();
delete objectDepthArray[_depth][_iname];
}
}
function move(_speedX, _speedY, _v) {
var _local7 = 0;
while (_local7 < movieClipArray.length) {
var _local2 = MC[movieClipArray[_local7] + "0_mc"];
var _local3 = MC[movieClipArray[_local7] + "1_mc"];
_local2._x = _local2._x - (_speedX * speedXArray[_local7]);
_local3._x = _local3._x - (_speedX * speedXArray[_local7]);
var _local5 = MC[(movieClipArray[_local7] + indexArray[_local7]) + "_mc"];
if (_local5._x < edgeArray[_local7]) {
if (indexArray[_local7] == 0) {
_local2._x = _local3._x + distanceArray[_local7];
indexArray[_local7] = 1;
} else {
_local3._x = _local2._x + distanceArray[_local7];
indexArray[_local7] = 0;
}
} else if (_local5._x > 0) {
if (indexArray[_local7] == 0) {
_local3._x = _local2._x - distanceArray[_local7];
indexArray[_local7] = 1;
} else {
_local2._x = _local3._x - distanceArray[_local7];
indexArray[_local7] = 0;
}
}
_local2._y = _local2._y - (_speedY * speedYArray[_local7]);
_local3._y = _local3._y - (_speedY * speedYArray[_local7]);
if (_local2._y < startYArray[_local7]) {
_local2._y = startYArray[_local7];
_local3._y = startYArray[_local7];
}
_local7++;
}
for (var _local8 in objectDepthArray) {
for (_local7 in objectDepthArray[_local8]) {
objectDepthArray[_local8][_local7].move(_speedX * speedXArray[0], MC[movieClipArray[0] + "0_mc"]._y);
}
}
}
function reset() {
var _local4 = 0;
while (_local4 < movieClipArray.length) {
var _local3 = MC[movieClipArray[_local4] + "0_mc"];
var _local2 = MC[movieClipArray[_local4] + "1_mc"];
_local3._x = _local3.startX;
_local3._y = _local3.startY;
_local2._x = _local2.startX;
_local2._y = _local2.startY;
_local4++;
}
}
var cIndex = 0;
var gIndex = 0;
}
Symbol 353 MovieClip [__Packages.com.jrvisuals.game.JRV_timer] Frame 0
class com.jrvisuals.game.JRV_timer
{
var G, textRef, barRef, baseTime, timeArray, startTime, timerBaseSec, timerBaseMil, timerBaseRemaining, pausedTime, unpausedTime, currentTime, elapsedTime, isPaused, timeInt;
function JRV_timer (txtRef, brRef, bTime, g, timeA) {
goTimeout = false;
G = g;
if (txtRef == undefined) {
textRef = txtRef;
} else {
textRef = txtRef;
}
if (brRef == undefined) {
barRef = undefined;
} else {
barRef = brRef;
}
if (bTime == undefined) {
baseTime = 0;
countUp = true;
} else {
baseTime = bTime;
}
timeArray = [];
if (timeA == undefined) {
timeArray = [0, 1, 1, 0];
} else {
timeArray = timeA.split(":");
}
die();
startTime = getTimer();
timerBaseSec = baseTime;
timerBaseMil = timerBaseSec * 1000;
timerBaseRemaining = startTime + timerBaseMil;
pausedTime = 0;
unpausedTime = 0;
updateTimeDisplay();
}
function addTime(sec) {
timerBaseRemaining = timerBaseRemaining + (sec * 1000);
}
function getTime() {
return([currentTime, elapsedTime]);
}
function startTimer() {
isPaused = false;
startTime = getTimer();
timerBaseRemaining = startTime + timerBaseMil;
die();
activateTime();
}
function stopTimer() {
die();
}
function pauseTimer() {
if (isPaused == false) {
isPaused = true;
die();
}
}
function unpauseTimer() {
if (isPaused == true) {
isPaused = false;
pausedTime = (getTimer() - startTime) - elapsedTime;
activateTime();
}
}
function updateTimeDisplay(passedTime) {
var _local5;
var _local8;
var _local7;
var _local6;
var _local3 = [];
if (countUp) {
elapsedTime = (getTimer() - startTime) - pausedTime;
} else {
elapsedTime = (timerBaseRemaining - ((getTimer() - startTime) - (unpausedTime - pausedTime))) - startTime;
if (elapsedTime <= 0) {
goTimeout = true;
elapsedTime = 0;
G.timeOver();
}
}
if (passedTime != undefined) {
elapsedTime = passedTime;
}
_local5 = Math.floor(elapsedTime / 3600000);
_local6 = elapsedTime - (_local5 * 3600000);
_local8 = Math.floor(_local6 / 60000);
_local6 = _local6 - (_local8 * 60000);
_local7 = Math.floor(_local6 / 1000);
_local6 = _local6 - (_local7 * 1000);
_local5 = Math.floor(_local6 / 100);
if (_local5 < 10) {
_local3.push("0" + _local5.toString());
} else {
_local3.push(_local5.toString());
}
if (_local8 < 10) {
_local3.push("0" + _local8.toString());
} else {
_local3.push(_local8.toString());
}
if (_local7 < 10) {
_local3.push("0" + _local7.toString());
} else {
_local3.push(_local7.toString());
}
if (_local5 < 10) {
_local3.push(_local5.toString());
} else {
_local3.push(_local5.toString());
}
var _local4 = "";
var _local2 = 0;
while (_local2 < _local3.length) {
if (Number(timeArray[_local2]) == 1) {
if (_local2 == (_local3.length - 1)) {
_local4 = _local4 + ".";
} else if (Number(timeArray[_local2 - 1]) == 1) {
_local4 = _local4 + ":";
}
_local4 = _local4 + _local3[_local2];
}
currentTime = _local4;
_local2++;
}
if (textRef != false) {
textRef.text = currentTime;
textRef._parent.shad_txt.text = currentTime;
}
if (barRef != undefined) {
elapsedTime = (getTimer() - startTime) - (unpausedTime - pausedTime);
}
var _local9 = [currentTime, elapsedTime];
return(_local9);
}
function die() {
clearInterval(timeInt);
}
function activateTime() {
timeInt = setInterval(this, "updateTimeDisplay", 100);
}
function bonusTime() {
die();
timeInt = setInterval(this, "bonusTimeDisplay", 100);
}
function bonusTimeDisplay() {
var _local5;
var _local9;
var _local8;
var _local6;
var _local3 = [];
var _local7 = elapsedTime - 10000;
var _local10 = 1000;
if (_local7 < 0) {
_local10 = 1000 - Math.ceil((Math.abs(_local7) / 10000) * 1000);
_local7 = 0;
die();
}
G.playTimeBonus();
elapsedTime = _local7;
G.score.incScore(_local10);
_local5 = Math.floor(elapsedTime / 3600000);
_local6 = elapsedTime - (_local5 * 3600000);
_local9 = Math.floor(_local6 / 60000);
_local6 = _local6 - (_local9 * 60000);
_local8 = Math.floor(_local6 / 1000);
_local6 = _local6 - (_local8 * 1000);
_local5 = Math.floor(_local6 / 100);
if (_local5 < 10) {
_local3.push("0" + _local5.toString());
} else {
_local3.push(_local5.toString());
}
if (_local9 < 10) {
_local3.push("0" + _local9.toString());
} else {
_local3.push(_local9.toString());
}
if (_local8 < 10) {
_local3.push("0" + _local8.toString());
} else {
_local3.push(_local8.toString());
}
if (_local5 < 10) {
_local3.push("0" + _local5.toString());
} else {
_local3.push(_local5.toString());
}
var _local4 = "";
var _local2 = 0;
while (_local2 < _local3.length) {
if (Number(timeArray[_local2]) == 1) {
if (_local2 == (_local3.length - 1)) {
_local4 = _local4 + ".";
} else if (Number(timeArray[_local2 - 1]) == 1) {
_local4 = _local4 + ":";
}
_local4 = _local4 + _local3[_local2];
}
textRef.text = _local4;
_local2++;
}
if (_local7 == 0) {
die();
G.updateHighScore();
}
}
var goTimeout = false;
var countUp = true;
}
Symbol 354 MovieClip [__Packages.com.ms3.pepcid.game.PepcidTimer] Frame 0
class com.ms3.pepcid.game.PepcidTimer extends com.jrvisuals.game.JRV_timer
{
var elapsedTime, pausedTime, startTime;
function PepcidTimer (txtRef, brRef, bTime, g) {
super(txtRef, brRef, bTime, g);
}
function updateTimeDisplay(passedTime) {
var _local5;
var _local6;
var _local2;
var _local4;
var _local3;
elapsedTime = (getTimer() - startTime) - pausedTime;
_local2 = Math.floor(elapsedTime / 1000);
_local4 = _local4 - (_local2 * 1000);
if (_local2 < 10) {
_local3 = "0" + _local2;
} else if (_local2 > 99) {
_local3 = "99";
} else {
_local3 = String(_local2);
}
com.ms3.pepcid.shell.Shell.setTime(_local3);
}
}
Symbol 355 MovieClip [__Packages.com.ms3.pepcid.game.Pepcid] Frame 0
class com.ms3.pepcid.game.Pepcid
{
var mc;
function Pepcid (_mc) {
mc = _mc.attachMovie("pepcid", "pepcid", _mc.getNextHighestDepth());
name = "pepcid";
mc._x = 700 + Math.floor(Math.random() * 300);
mc._y = ground;
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground - 50;
if (!isGotten) {
if ((mc._x > 0) && (mc._x < 700)) {
checkHit();
}
} else if (mc._mc._currentframe == mc._mc._totalframes) {
com.ms3.pepcid.game.Game.bg.killItems("pepcid", 0);
}
if (mc._x < -100) {
com.ms3.pepcid.game.Game.bg.killItems("pepcid", 0);
}
}
function checkHit() {
if (mc.hitTest(com.ms3.pepcid.game.Game.player.mc.hitbox_mc)) {
com.ms3.pepcid.game.Game.pepcidPower();
mc.gotoAndStop("GOT");
isGotten = true;
}
}
function die() {
mc.die = function () {
this.removeMovieClip();
};
mc.fadeOut({mySpeed:15, myClass:mc, myFunc:"die"});
}
var attachName = "pepcid";
var ground = 90;
var isGotten = false;
var name = "";
}
Symbol 356 MovieClip [__Packages.com.ms3.pepcid.game.Start] Frame 0
class com.ms3.pepcid.game.Start
{
var mc, start;
function Start (_mc) {
mc = _mc;
name = "start";
start = mc._x;
mc._y = ground;
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground + 74;
}
function die() {
mc._x = start;
}
var attachName = "pepcid";
var ground = 214;
var isGotten = false;
var name = "";
}
Symbol 357 MovieClip [__Packages.com.ms3.pepcid.game.FinishLine] Frame 0
class com.ms3.pepcid.game.FinishLine
{
var mc, update;
function FinishLine (_mc, _pos) {
mc = _mc.attachMovie("finishline", "finishline", _mc.getNextHighestDepth());
name = "finishline";
mc.stop();
mc._x = _pos;
mc._y = 135;
mc._xscale = (mc._yscale = 36);
update = move;
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground - 4;
if (mc._x < 547) {
com.ms3.pepcid.game.Game.createWin();
update = checkHit;
}
}
function checkHit() {
if (mc.hitbox_mc.hitTest(com.ms3.pepcid.game.Game.player.mc.hitbox_mc) && (mc._currentframe == 1)) {
mc.play();
com.ms3.pepcid.game.Game.finishRace();
update = undefined;
}
}
function die() {
mc.die = function () {
this.removeMovieClip();
};
mc.fadeOut({mySpeed:15, myClass:mc, myFunc:"die"});
}
var startRotation = 0;
var endRotation = 90;
var attachName = "finishline";
var ground = 216;
var isFalling = false;
var name = "";
}
Symbol 358 MovieClip [__Packages.com.ms3.pepcid.game.Plane] Frame 0
class com.ms3.pepcid.game.Plane
{
var mc, update;
function Plane (_mc) {
mc = _mc.attachMovie(attachName, attachName, _mc.getNextHighestDepth());
name = attachName;
mc.stop();
mc._x = 700;
mc._y = 20;
mc._xscale = (mc._yscale = 20);
update = planeMove;
}
function move(_speedX, _ground) {
mc._x = mc._x - _speedX;
mc._y = _ground - 150;
planeMove();
}
function planeMove() {
mc._x = mc._x - 0.25;
if (mc._x < -150) {
com.ms3.pepcid.game.Game.bg.killItems("plane", 2);
}
}
function die() {
mc.die = function () {
this.removeMovieClip();
};
mc.fadeOut({mySpeed:15, myClass:mc, myFunc:"die"});
}
var startRotation = 0;
var endRotation = 90;
var attachName = "plane";
var isFalling = false;
var name = "";
}
Symbol 94 MovieClip Frame 1
stop();
Symbol 104 MovieClip Frame 1
stop();
Symbol 106 MovieClip Frame 1
stop();
Symbol 107 MovieClip Frame 1
stop();
Instance of Symbol 107 MovieClip "music_mc" in Symbol 108 MovieClip Frame 1
/* no clip actions */
Symbol 168 MovieClip Frame 1
stop();
Symbol 192 MovieClip Frame 1
stop();
Symbol 202 MovieClip Frame 1
stop();
Symbol 203 MovieClip Frame 1
stop();
Symbol 211 MovieClip Frame 1
stop();
Symbol 236 MovieClip [finishline] Frame 15
stop();
Symbol 258 MovieClip Frame 1
stop();
Symbol 258 MovieClip Frame 11
stop();
Instance of Symbol 258 MovieClip in Symbol 259 MovieClip Frame 1
onClipEvent (enterFrame) {
if (this.hitTest(_root.moveLayer.hero) and (!hit)) {
_root.score = _root.score - 10;
play();
hit = true;
go = true;
}
if (go) {
endX = _root.mela._x;
endY = _root.mela._y;
_x = (_x + ((endX - _x) / speed));
_y = (_y + ((endY - _y) / speed));
}
}
Symbol 260 MovieClip [pepcid] Frame 1
stop();
Symbol 271 MovieClip Frame 1
stop();
Symbol 330 MovieClip Frame 8
com.jrvisuals.game.JRV_sound.sfxPlay({linkage:"horserun", vol:35});
Symbol 331 MovieClip Frame 13
stop();
Symbol 337 MovieClip Frame 1
stop();