Frame 1
function init(pOwner, pConfig) {
gameOwner = pOwner;
gameOwner.gameLog((("Game:init: " + gameOwner) + " class: ") + com.disney.gem.games.BaseGameController);
assetPath = pConfig.game.assetPath;
gameOwner.gameLog("Game:init: assetPath: " + assetPath);
GC = new com.disney.gem.games.BaseGameController(this, pOwner);
cycleList = [];
src.Game.GC = GC;
src.Game.isDXD = true;
return(GC);
}
function fsdPlayAgain() {
src.Game.NewGame();
gotoAndStop (4);
}
function getPlayerScore() {
return(Number(src.Game.score));
}
function sendScore() {
if (!inDXD) {
gotoAndStop (7);
var _local1 = new Object();
playerScore = getPlayerScore();
_local1.onLoadInit = function (target) {
target._x = 290 - (target._width / 2);
target._y = 205 - (target._height / 2);
};
mcl = new MovieClipLoader();
mcl.addListener(_local1);
mcl.loadClip(_level0.fsd, mLoader);
} else {
fsdPlayAgain();
}
}
stop();
Stage.showMenu = false;
Stage.scaleMode = "noScale";
_focusrect = false;
var loaderX = loaderBar.mask._x;
loaderBar.onEnterFrame = function () {
if (_level0.getBytesLoaded() < _level0.getBytesTotal()) {
loaderBar.mask._x = loaderX + ((_level0.getBytesLoaded() * loaderBar.mask._width) / _level0.getBytesTotal());
} else {
gotoAndStop (4);
}
};
var inDXD = (com.disney.gem.games.BaseGameController instanceof Function);
var gameOwner;
var GC;
var assetPath = "";
var cycleList;
System.security.allowDomain("www.disney.go.com");
System.security.allowDomain("disney.go.com");
System.security.allowDomain("psc.disney.go.com");
System.security.allowDomain("apsc.disney.go.com");
System.security.allowDomain("tv.disney.go.com");
System.security.allowDomain("atv.disney.go.com");
System.security.allowDomain("scores.disney.go.com");
if (undefined == fsd) {
var fsd = "http://apsc.disney.go.com/disneychannel/global/game/scoredisplays/fsd8.swf";
}
var gameID = "jtx_spl_act_envirolympics";
var subject = "Eco-Challenge";
var playerName;
var playerScore;
Frame 2
gotoAndPlay (1);
Frame 4
Game.Init();
gotoAndStop (5);
Frame 5
stop();
Frame 6
gotoAndStop (5);
Frame 7
stop();
Symbol 6 MovieClip [ammo3] Frame 1
stop();
Symbol 6 MovieClip [ammo3] Frame 2
play();
Symbol 6 MovieClip [ammo3] Frame 7
stop();
Symbol 608 MovieClip [__Packages.src.Game] Frame 0
class src.Game
{
static var cycleList, persistence, GC, sfxObject, titleMus, clickFx;
function Game () {
}
static function Init(attach) {
cycleList = new Array();
if (bInitialized) {
return(undefined);
}
attach = _level0;
bInitialized = true;
score = 0;
persistence = SharedObject.getLocal("jtx_spl_act_envirolympics");
if (undefined == persistence.data.bMusic) {
UpdatePersistentData();
} else {
bMusic = persistence.data.bMusic;
}
}
static function UpdatePersistentData() {
persistence.data.bMusic = bMusic;
persistence.flush();
}
static function Heartbeat() {
var _local1;
for (_local1 in cycleList) {
cycleList[_local1].cycle();
}
}
static function HeartbeatStart(mc) {
cycleList.push(mc);
}
static function HeartbeatStop(mc) {
var _local1;
for (_local1 in cycleList) {
if (cycleList[_local1] == mc) {
cycleList.splice(_local1, 1);
}
}
}
static function startlevel() {
GC.startLevel(level, score);
}
static function endlevel() {
GC.endLevel(level, score);
}
static function endgame() {
GC.endGame(level, score);
}
static function AddScore(value) {
score = score + value;
if (null != scoreKeeper) {
scoreKeeper.text = String(score);
}
}
static function sfxPlay(id) {
sfxObject[id].start();
}
static function sfxLoop(id) {
sfxObject[id].start(0, 999999);
}
static function sfxStop(id) {
sfxObject[id].stop();
}
static function SetupSound(music, effects, button) {
STFU();
titleMus = new Sound(music);
titleMus.attachSound("musTitle");
clickFx = new Sound(button);
clickFx.attachSound("click.wav");
sfxObject = {};
for (var _local4 in sounds) {
var _local1 = sounds[_local4];
var _local2 = new Sound(effects);
_local2.attachSound(_local1);
sfxObject[_local1] = _local2;
}
UpdateVolume();
}
static function DoClick() {
clickFx.start();
}
static function PlayTitle() {
titleMus.stop();
UpdateVolume();
titleMus.start(0, 999999);
}
static function ShouldPlayMusic() {
return(bMusic);
}
static function ShouldPlaySFX() {
return(true);
}
static function SetSFXVolume(percent) {
sfxVolume = percent;
UpdateVolume();
}
static function SetMusicVolume(percent) {
musicVolume = percent;
UpdateVolume();
}
static function UpdateVolume() {
var _local2 = 1;
if (isPaused()) {
_local2 = 0.5;
}
for (var _local3 in sfxObject) {
var _local1 = sfxObject[_local3];
_local1.setVolume(sfxVolume * _local2);
}
if (!ShouldPlayMusic()) {
_local2 = 0;
}
titleMus.setVolume(musicVolume * _local2);
}
static function STFU() {
for (var _local2 in sfxObject) {
var _local1 = sfxObject[_local2];
_local1.stop();
}
clickFx.stop();
titleMus.stop();
}
static function NewGame() {
score = 0;
msClockPaused = 0;
msPeriod = mstime() + 1000;
StopClock();
}
static function GameOver() {
STFU();
endgame();
_root.sendScore();
}
static function mstime() {
return((msPaused ? (msPaused) : (getTimer())) - msLag);
}
static function isPaused() {
return(0 != msPaused);
}
static function Pause() {
if (0 == msPaused) {
msPaused = getTimer();
}
UpdateVolume();
}
static function Resume() {
if (0 != msPaused) {
var _local1 = getTimer();
msLag = msLag + (_local1 - msPaused);
msPaused = 0;
}
UpdateVolume();
}
static function Clock() {
return(((0 == msClockPaused) ? (msPeriod - mstime()) : (msPeriod - msClockPaused)));
}
static function StopClock() {
if (0 == msClockPaused) {
msClockPaused = mstime();
}
}
static function StartClock() {
if (0 != msClockPaused) {
msPeriod = msPeriod + (mstime() - msClockPaused);
msClockPaused = 0;
}
}
static function InitKeypress(keys) {
var _local2;
_local2 = 0;
while (_local2 < keys.length) {
var _local1 = keys[_local2];
if (Key.isDown(_local1.key)) {
_local1.bPressed = true;
} else {
_local1.bPressed = false;
}
_local2++;
}
}
static function PollKeypress(keys, cbThis) {
var _local2;
var _local4 = false;
_local2 = 0;
while (_local2 < keys.length) {
var _local1 = keys[_local2];
if (Key.isDown(_local1.key)) {
if (!_local1.bPressed) {
_local1.bPressed = true;
_local1.fcall.call(_local1.pthis);
_local4 = true;
}
} else {
_local1.bPressed = false;
}
_local2++;
}
return(_local4);
}
static var isDXD = false;
static var score = 0;
static var level = 0;
static var scoreKeeper = null;
static var bInitialized = false;
static var stageWidth = 580;
static var stageHeight = 410;
static var msLag = 0;
static var msPaused = 0;
static var msClockPaused = 0;
static var msPeriod = 0;
static var bMusic = true;
static var sfxVolume = 100;
static var musicVolume = 100;
static var sounds = ["bicycle.wav", "bicycle_boost.wav", "can.wav", "click.wav", "end_event.wav", "open_bicycle_can.wav", "paper.wav", "plastic.wav", "score_in_cycle_level.wav", "score_in_tree_level.wav", "start_event.wav", "throw_tree.wav", "timer_enters_red.wav", "tree_land_bad.wav", "vroom.wav"];
}
Symbol 609 MovieClip [__Packages.src.FSMClip] Frame 0
class src.FSMClip extends MovieClip
{
var state, stack, sleep, labelToFirstFrame, labelToLastFrame, isAnimating, frameToLabel, gotoAndStop, _currentframe, _totalframes, nextFrame, stop;
function FSMClip () {
super();
state = "Zombie";
stack = [];
sleep = 0;
labelToFirstFrame = {};
labelToLastFrame = {};
isAnimating = false;
frameToLabel = [];
}
function onLoad() {
src.Game.HeartbeatStart(this);
}
function onUnload() {
src.Game.HeartbeatStop(this);
}
function StateError() {
state = "Zombie";
}
function Zombie() {
}
function SetupFrameLabels(aFrameLabels) {
labelToFirstFrame = {};
labelToLastFrame = {};
frameToLabel = [];
var _local6 = 0;
var _local3;
var _local5 = 0;
while (_local5 < aFrameLabels.length) {
var _local4 = aFrameLabels[_local5];
gotoAndStop(_local4);
var _local2 = _local6 + 1;
while (_local2 < _currentframe) {
frameToLabel[_local2] = _local3;
_local2++;
}
if (undefined != _local3) {
labelToLastFrame[_local3] = _currentframe - 1;
}
_local3 = _local4;
labelToFirstFrame[_local3] = _currentframe;
_local6 = _currentframe;
_local3 = _local4;
frameToLabel[_local6] = _local3;
_local5++;
}
if (undefined != _local3) {
labelToLastFrame[_local3] = _totalframes;
}
var _local2 = _local6 + 1;
while (_local2 <= _totalframes) {
frameToLabel[_local2] = _local3;
_local2++;
}
gotoAndStop(1);
}
function cycle() {
if (src.Game.isPaused() && (bStopPaused)) {
return(undefined);
}
if (sleep > 0) {
sleep--;
return(undefined);
}
var _local2 = this;
var _local3 = _local2[_local2.state];
if (undefined == _local3) {
_local2.StateError();
}
_local3.call(_local2);
_local2.previousFrame = _local2._currentframe;
}
function IsAnimating() {
return(isAnimating);
}
function CurrentLabel() {
var _local2 = frameToLabel[_currentframe];
return((_local2 + "+") + (_currentframe - LabelToFirst(_local2)));
}
function LabelToFirst(label) {
return(labelToFirstFrame[label]);
}
function LabelToLast(label) {
return(labelToLastFrame[label]);
}
function FrameInLabel(label) {
return((_currentframe >= labelToFirstFrame[label]) && (_currentframe <= labelToLastFrame[label]));
}
function AnimBegin(label) {
gotoAndStop(label);
}
function AnimEnd(label) {
gotoAndStop(labelToLastFrame[label]);
}
function AnimLoop(label) {
var _local2 = _currentframe + 1;
if ((_local2 < labelToFirstFrame[label]) || (_local2 > labelToLastFrame[label])) {
gotoAndStop(label);
} else {
nextFrame();
}
return((isAnimating = true));
}
function AnimWait(label) {
if ((_currentframe < labelToFirstFrame[label]) || (_currentframe > labelToLastFrame[label])) {
gotoAndStop(label);
isAnimating = false;
return(true);
}
nextFrame();
isAnimating = true;
return(false);
}
function AnimOnce(label) {
if ((_currentframe < labelToFirstFrame[label]) || (_currentframe >= labelToLastFrame[label])) {
gotoAndStop(LabelToLast(label));
isAnimating = false;
return(true);
}
nextFrame();
isAnimating = true;
return(false);
}
function AnimStop() {
stop();
}
function AnimGoto(label) {
gotoAndStop(label);
return((isAnimating = false));
}
function AnimCurrent() {
return(_currentframe);
}
function Sleep(frameCount) {
sleep = frameCount;
}
function Wake() {
sleep = 0;
}
function ResetState() {
stack = [];
sleep = 0;
state = "Zombie";
stop();
}
function NextState(state) {
if (undefined == this[state]) {
StateError();
} else {
this.state = state;
}
sleep = 0;
}
function PushState(pushstate) {
if (undefined == this[pushstate]) {
} else {
stack.push(pushstate);
}
}
function PopState() {
var _local2 = stack.pop();
if (null == _local2) {
StateError();
} else if (undefined == this[_local2]) {
StateError();
} else {
state = _local2;
}
sleep = 0;
}
function PushCondState(IF, ELSE) {
PushState(IF);
PushState(ELSE);
}
function PopCondState(condition) {
if (2 > stack.length) {
StateError();
} else {
var _local3 = stack.pop();
var _local2 = stack.pop();
if (condition) {
state = _local2;
} else {
state = _local3;
}
}
}
function IsStackedState() {
return(0 != stack.length);
}
static function SubBegin(clip, id, mapBegin, mapEnd) {
var _local1 = mapBegin[id];
clip.gotoAndStop(_local1);
}
static function SubEnd(clip, id, mapBegin, mapEnd) {
var _local1 = mapEnd[id];
clip.gotoAndStop(_local1);
}
static function SubOnce(clip, id, mapBegin, mapEnd) {
var _local1 = clip._currentframe;
var _local2 = mapBegin[id];
var _local3 = mapEnd[id];
if ((_local1 > _local3) || (_local1 < _local2)) {
clip.gotoAndStop(_local2);
} else if (_local1 < _local3) {
clip.nextFrame();
} else {
return(true);
}
return(false);
}
static function SubLoop(clip, id, mapBegin, mapEnd) {
var _local2 = clip._currentframe;
var _local1 = mapBegin[id];
var _local4 = mapEnd[id];
if ((_local2 >= _local4) || (_local2 < _local1)) {
clip.gotoAndStop(_local1);
} else {
clip.nextFrame();
}
}
static function ClipLoop(clip) {
var _local2 = clip._currentframe;
clip.nextFrame();
if (_local2 == clip._currentframe) {
clip.gotoAndStop(1);
}
}
static function ClipOnce(clip) {
var _local2 = clip._currentframe;
clip.nextFrame();
if (_local2 == clip._currentframe) {
return(true);
}
return(false);
}
static function ClipStopRecursive(clip, label) {
for (label in clip) {
var _local1 = clip[label];
if ((_local1 != clip) && (typeof(_local1) == "movieclip")) {
if ((undefined != label) && (label == _local1._name)) {
_local1.stop();
ClipStopRecursive(_local1);
}
}
}
}
static function ClipPlayRecursive(clip, label) {
for (label in clip) {
var _local1 = clip[label];
if ((_local1 != clip) && (typeof(_local1) == "movieclip")) {
if ((undefined != label) && (label == _local1._name)) {
_local1.play();
ClipPlayRecursive(_local1);
}
}
}
}
static function Printf(fromStr) {
var _local9 = arguments.length;
var _local6 = 1;
while (_local6 < _local9) {
var _local5 = arguments[_local6++];
var _local2 = arguments[_local6++];
var _local3 = fromStr.indexOf(_local5);
if (_local3 >= 0) {
if (typeof(_local2) == "number") {
_local2 = _local2.toString(10);
} else if (typeof(_local2) != "string") {
_local2 = _local2.toString();
}
var _local7 = fromStr.slice(0, _local3);
var _local8 = fromStr.slice(_local3 + _local5.length);
fromStr = (_local7 + _local2) + _local8;
}
}
return(fromStr);
}
var bStopPaused = true;
var previousFrame = 0;
}
Symbol 610 MovieClip [__Packages.src.Course] Frame 0
class src.Course extends src.FSMClip
{
static var prizes, racer;
var timer, track, trackSegment, attachMovie, szRacer, getNextHighestDepth, NextState, globalToLocal, StateError;
function Course () {
super();
prizes = new Array();
scoreBeforeLevel = src.Game.score;
}
function onLoad() {
super.onLoad();
Begin();
timer = src.Timeline.instance.Menu.timer;
track = track;
track.cacheAsBitmap = true;
var _local4 = 0;
var _local5 = nTracks;
while (_local5--) {
var _local3 = track.attachMovie(trackSegment, "uiCurr", track.getNextHighestDepth());
_local3._x = 0;
_local3._y = _local4;
if (0 == _local4) {
_local3.swapDepths(track.finishline);
}
_local4 = _local4 + (_local3._height - 1);
}
track._y = 410 - track._height;
track._x = 0;
Scatter("iApple", nApplesTotal, 50);
Scatter("iBag", nBagsTotal, 100);
Scatter("iBanana", nBananasTotal, 150);
Scatter("iBottle", nBottlesTotal, 200);
Scatter("iCan", nCansTotal / 2, 250);
Scatter("iCan2", nCansTotal / 2, 300);
Scatter("iChips", nChipsTotal, 350);
Scatter("iPaper", nPapersTotal, 400);
Scatter("iPizzaBox", nPizzasTotal, 450);
Scatter("iYuck", nYuckTotal, 500);
racer = attachMovie(szRacer, "racer", getNextHighestDepth());
racer.gotoAndStop(1);
racer._x = src.Game.stageWidth / 2;
racer._y = src.Game.stageHeight - 80;
racer.trailer.gotoAndStop(1);
racer.bag.gotoAndStop(1);
src.FSMClip.ClipStopRecursive(racer, "wheel");
src.Timeline.ShowPower(powerLevel, 100);
}
function onUnload() {
Key.removeListener(this);
}
function Scatter(id, count, offset) {
var _local6 = track._width / 10;
var _local7 = track._height / count;
var _local3 = 410 + offset;
while ((count--) > 0) {
var _local2 = track.attachMovie(id, id + count, track.getNextHighestDepth());
_local2._x = (0.9 * (track._width * Math.random())) + _local6;
_local2._y = (_local3 + 50) - (Math.random() * 100);
_local2._rotation = 360 * Math.random();
_local3 = _local3 + _local7;
}
}
function Paused() {
src.FSMClip.ClipStopRecursive(racer, "wheel");
}
function Resumed() {
src.FSMClip.ClipPlayRecursive(racer, "wheel");
}
function Begin() {
msLastFrame = src.Game.mstime();
NextState("BeginWhistle");
}
function BeginWhistle() {
src.Game.sfxPlay("start_event.wav");
if (bRiding) {
src.Game.sfxLoop("bicycle.wav");
}
Key.addListener(this);
NextState("Racing");
}
function onKeyDown() {
if (((powerLevel >= 100) && (!bBoosting)) && (Key.getCode() == 32)) {
bBoosting = true;
if (bRiding) {
src.Game.sfxStop("bicycle.wav");
src.Game.sfxLoop("bicycle_boost.wav");
}
src.Game.sfxPlay("vroom.wav");
}
}
function Racing() {
var _local20 = src.Game.mstime();
var _local16 = (_local20 - msLastFrame) / 1000;
msLastFrame = _local20;
track._y = track._y + (trackMovePerSecond * _local16);
if (track._y > 0) {
track._y = 0;
NextState("FinishLine");
timer.gotoAndStop(1);
return(undefined);
}
var _local21 = Math.floor((100 * Math.abs(track._y)) / track._height);
if ((_local21 <= 34) && (!bWarned)) {
src.Game.sfxPlay("timer_enters_red.wav");
bWarned = true;
}
timer.gotoAndStop(100 - _local21);
var _local14 = Math.floor(0.1 + (_local16 * animFramesPerSecond));
if (bBoosting) {
powerLevel = powerLevel - (_local16 * boostPerSecond);
if (powerLevel <= 0) {
bBoosting = false;
powerLevel = 0;
if (bRiding) {
src.Game.sfxStop("bicycle_boost.wav");
src.Game.sfxLoop("bicycle.wav");
}
}
powerBoost = 3;
_local14 = _local14 * 2;
} else {
powerBoost = 1;
}
while ((_local14--) > 0) {
src.FSMClip.ClipLoop(racer);
}
src.Timeline.ShowPower(powerLevel, 100);
var _local18 = 0;
var _local17 = 0;
if (Key.isDown(37)) {
_local18--;
}
if (Key.isDown(39)) {
_local18++;
}
if (Key.isDown(38)) {
_local17--;
}
if (Key.isDown(40)) {
_local17++;
}
var _local10 = racer;
var _local19 = (baseMovePerSecond * _local16) * powerBoost;
_local10._x = _local10._x + (_local18 * _local19);
_local10._y = _local10._y + (_local17 * _local19);
var _local13 = _local10.getBounds(this);
if (_local13.xMin < 0) {
_local10._x = _local10._x - _local13.xMin;
}
if (_local13.yMin < 0) {
_local10._y = _local10._y - _local13.yMin;
}
if (_local13.xMax >= src.Game.stageWidth) {
_local10._x = _local10._x + (src.Game.stageWidth - _local13.xMax);
}
if (_local13.yMax >= src.Game.stageHeight) {
_local10._y = _local10._y + (src.Game.stageHeight - _local13.yMax);
}
if (bRiding) {
var _local15 = _local10.trailer;
if (Key.isDown(90)) {
src.FSMClip.SubOnce(_local15, "paper", trailerMapBegin, trailerMapEnd);
if (openBin != "paper") {
src.Game.sfxPlay("open_bicycle_can.wav");
}
openBin = "paper";
} else if (Key.isDown(88)) {
src.FSMClip.SubOnce(_local15, "plastic", trailerMapBegin, trailerMapEnd);
if (openBin != "plastic") {
src.Game.sfxPlay("open_bicycle_can.wav");
}
openBin = "plastic";
} else if (Key.isDown(67)) {
src.FSMClip.SubOnce(_local15, "glass", trailerMapBegin, trailerMapEnd);
if (openBin != "glass") {
src.Game.sfxPlay("open_bicycle_can.wav");
}
openBin = "glass";
} else {
src.FSMClip.SubOnce(_local15, "idle", trailerMapBegin, trailerMapEnd);
openBin = "idle";
}
} else {
src.FSMClip.ClipOnce(_local10.bag);
}
var _local7 = {xMin:_local10._x - 30, xMax:_local10._x + 30, yMin:_local10._y - 30, yMax:_local10._y + 30};
var _local9;
var _local4;
for (_local9 in prizes) {
var _local2 = prizes[_local9];
var _local6 = _local2.getBounds(this);
if (!((((_local6.yMin > _local7.yMax) || (_local6.yMax < _local7.yMin)) || (_local6.xMin > _local7.xMax)) || (_local6.xMax < _local7.xMin))) {
var _local3 = false;
if (_local2._name.substr(0, 6) == "iApple") {
nApplesCollected++;
_local3 = true;
_local4 = "paper.wav";
} else if (_local2._name.substr(0, 4) == "iBag") {
if ((!bRiding) || ("paper" == openBin)) {
nBagsCollected++;
_local3 = true;
_local4 = "paper.wav";
}
} else if (_local2._name.substr(0, 7) == "iBanana") {
nBananasCollected++;
_local3 = true;
_local4 = "paper.wav";
}
if (_local2._name.substr(0, 7) == "iBottle") {
if ((!bRiding) || ("plastic" == openBin)) {
nBottlesCollected++;
_local3 = true;
_local4 = "plastic.wav";
}
} else if ((_local2._name.substr(0, 4) == "iCan") || (_local2._name.substr(0, 4) == "iCan2")) {
if ((!bRiding) || ("glass" == openBin)) {
nCansCollected++;
_local3 = true;
_local4 = "can.wav";
}
}
if (_local2._name.substr(0, 6) == "iChips") {
if ((!bRiding) || ("plastic" == openBin)) {
nChipsCollected++;
_local3 = true;
_local4 = "paper.wav";
}
}
if (_local2._name.substr(0, 6) == "iPaper") {
if ((!bRiding) || ("paper" == openBin)) {
nPapersCollected++;
_local3 = true;
_local4 = "paper.wav";
}
}
if (_local2._name.substr(0, 9) == "iPizzaBox") {
nPizzasCollected++;
_local3 = true;
_local4 = "paper.wav";
}
if (_local2._name.substr(0, 5) == "iYuck") {
nYuckCollected++;
_local3 = true;
_local4 = "paper.wav";
}
if (_local3) {
_local2._visible = false;
prizes.splice(_local9, 1);
var _local8 = _local2.score;
src.Game.AddScore(_local8);
powerLevel = powerLevel + _local2.boost;
var _local5 = {x:_local2._x, y:_local2._y};
track.localToGlobal(_local5);
globalToLocal(_local5);
src.DecayText.Create(this, _local5.x, _local5.y, "+" + _local8, 16776992, 0);
}
}
}
if (undefined != _local4) {
_local10.bag.gotoAndStop(1);
src.Game.sfxPlay(_local4);
if (bRiding) {
src.Game.sfxPlay("score_in_cycle_level.wav");
}
}
}
function FinishLine() {
function itemString(inputText, count, score) {
return(src.FSMClip.Printf(inputText, "123", count, "456", score, "7890", count * score));
}
Key.removeListener(this);
if (bRiding) {
src.Game.sfxStop("bicycle.wav");
src.Game.sfxStop("bicycle_boost.wav");
}
src.Game.sfxPlay("end_event.wav");
racer.gotoAndStop(1);
var _local2 = src.Timeline.DoPopup("MenuCourseComplete");
var _local3 = nCansCollected;
_local2.szMetal.text = itemString(_local2.szMetal.text, nCansCollected, 100);
_local2.szPlastic.text = itemString(_local2.szPlastic.text, nBottlesCollected + nChipsCollected, 100);
_local2.szPaper.text = itemString(_local2.szPaper.text, nBagsCollected + nPapersCollected, 100);
if (bRiding) {
_local2.TrashGlob._visible = false;
_local2.szGarbage._visible = false;
} else {
_local2.szGarbage.text = itemString(_local2.szGarbage.text, ((nApplesCollected + nBananasCollected) + nPizzasCollected) + nYuckCollected, 75);
}
_local2.szTotal.text = src.FSMClip.Printf(_local2.szTotal.text, "1234567890", src.Game.score - scoreBeforeLevel);
NextState("WaitForPopup");
}
function WaitForPopup() {
src.Timeline.instance.PopState();
StateError();
}
static var baseMovePerSecond = 120;
static var trackMovePerSecond = 200;
static var animFramesPerSecond = 30;
static var boostPerSecond = 60;
static var msLastFrame = 0;
var nTracks = 1;
var bRiding = false;
var openBin = "";
var nApplesTotal = 10;
var nBagsTotal = 10;
var nBananasTotal = 10;
var nBottlesTotal = 10;
var nCansTotal = 10;
var nChipsTotal = 10;
var nPapersTotal = 10;
var nPizzasTotal = 10;
var nYuckTotal = 10;
var nApplesCollected = 0;
var nBagsCollected = 0;
var nBananasCollected = 0;
var nBottlesCollected = 0;
var nCansCollected = 0;
var nChipsCollected = 0;
var nPapersCollected = 0;
var nPizzasCollected = 0;
var nYuckCollected = 0;
var scoreBeforeLevel = 0;
var powerLevel = 0;
var powerBoost = 1;
var bBoosting = false;
var bWarned = false;
static var trailerMapBegin = {idle:1, paper:13, plastic:34, glass:55};
static var trailerMapEnd = {idle:9, paper:20, plastic:41, glass:63};
}
Symbol 611 MovieClip [__Packages.src.Timeline] Frame 0
class src.Timeline extends src.FSMClip
{
static var instance;
var NextState, bStopPaused, ShortcutKeys, SkipKeys, onEnterFrame, createEmptyMovieClip, getNextHighestDepth, attachMovie, Level, uiCurr, PushState, Menu, whichHelp;
function Timeline () {
super();
src.Game.Init(this);
NextState("Splash");
instance = this;
bStopPaused = false;
ShortcutKeys = [{key:27, fcall:onPause, pthis:this}, {key:19, fcall:onPause, pthis:this}, {key:112, fcall:onHelp, pthis:this}, {key:113, fcall:toggleMusic, pthis:this}];
SkipKeys = [{key:32, fcall:ContinueCallback, pthis:this}, {key:13, fcall:ContinueCallback, pthis:this}, {key:27, fcall:ContinueCallback, pthis:this}];
if (src.Game.isDXD) {
_root.GC.update = src.Game.Heartbeat;
_level0.isDXDOn._visible = true;
} else {
onEnterFrame = function () {
src.Game.Heartbeat();
};
_level0.isDXDOn._visible = false;
}
var _local4 = createEmptyMovieClip("fxClip", getNextHighestDepth());
var _local5 = _local4.createEmptyMovieClip("musClip", getNextHighestDepth());
src.Game.SetupSound(_local5, _local4, this);
}
function ShowMenuBar() {
HideMenuBar();
var _local2 = attachMovie("MenuBar", "Menu", getNextHighestDepth());
_local2.bPause.onPress = onPause;
_local2.bMusic.onPress = offMusic;
_local2.bMusicOff.onPress = onMusic;
_local2.bHelp.onPress = onHelp;
_local2.timer.gotoAndStop(1);
_local2.power.gotoAndStop(1);
_local2.power._visible = false;
_local2.trees._visible = false;
_local2.character.gotoAndStop(src.Game.character);
_local2.cacheAsBitmap = true;
var _local4 = Level;
src.Game.scoreKeeper = _local2.szScore;
src.Game.AddScore(0);
src.Game.InitKeypress(ShortcutKeys);
var _local3 = instance.uiCurr;
if (undefined != _local3) {
if (_local2.getDepth() < _local3.getDepth()) {
_local2.swapDepths(_local3);
}
}
UpdateMusic();
}
function HideMenuBar() {
instance.Menu.removeMovieClip();
src.Game.scoreKeeper = null;
UpdateMusic();
}
static function ShowPower(val, maxval) {
var _local3 = instance.Menu.power;
var _local2 = _local3.rainbow.mask;
_local3._visible = true;
if (val < 0) {
val = 0;
}
if (val > maxval) {
val = maxval;
}
_local2._y = _local2._height - ((_local2._height * val) / maxval);
}
static function HidePower() {
instance.Menu.power._visible = false;
}
static function ShowTrees(remain) {
var _local2 = instance.Menu;
_local2.timer._visible = false;
var _local1 = _local2.trees;
_local1._visible = true;
_local1.remain.text = remain.toString(10);
}
static function DoPopup(resid) {
instance.ClearPopup();
src.Game.Pause();
var _local1 = instance.attachMovie(resid, "uiCurr", instance.getNextHighestDepth());
var _local2 = instance.Menu;
if (_local2.getDepth() < _local1.getDepth()) {
_local2.swapDepths(_local1);
}
_local1.bnContinue.onPress = instance.onDismissPopup;
instance.Level.Paused();
return(_local1);
}
function ClearPopup() {
if (undefined != instance.uiCurr) {
instance.uiCurr.swapDepths(1000);
instance.uiCurr.removeMovieClip();
src.Game.Resume();
instance.Level.Resumed();
}
}
function onDismissPopup() {
instance.ClearPopup();
src.Game.DoClick();
}
function onPause() {
src.Game.DoClick();
if (undefined != instance.uiCurr) {
instance.ClearPopup();
} else {
src.Game.Pause();
instance.Level.Paused();
var _local1 = instance.attachMovie("MenuPause", "uiCurr", instance.getNextHighestDepth());
_local1.id = "Pause";
_local1.bnResume.onPress = instance.onDismissPopup;
_local1.bnHelp.onPress = instance.onHelp;
_local1.bnSound.onPress = instance.toggleMusic;
_local1.bnQuit.onPress = instance.onQuit;
instance.uiCurr.swapDepths(instance.Menu);
}
}
function onMusic() {
src.Game.DoClick();
src.Game.bMusic = true;
UpdateMusic();
}
function offMusic() {
src.Game.DoClick();
src.Game.bMusic = false;
UpdateMusic();
}
function toggleMusic() {
src.Game.DoClick();
src.Game.bMusic = !src.Game.bMusic;
UpdateMusic();
}
static function UpdateMusic() {
src.Game.UpdateVolume();
var _local1 = instance.Menu;
_local1.bMusic._visible = src.Game.bMusic;
_local1.bMusicOff._visible = !src.Game.bMusic;
src.Game.UpdatePersistentData();
}
static function DoHelp(whichHelp) {
var _local2 = instance.uiCurr;
if (undefined != _local2) {
if ("Help" == _local2.id) {
instance.onDismissPopup();
return(undefined);
}
instance.onDismissPopup();
}
src.Game.Pause();
instance.Level.Paused();
var _local3 = instance.Menu;
var _local1 = instance.attachMovie(whichHelp, "uiCurr", instance.getNextHighestDepth());
if (_local3.getDepth() < _local1.getDepth()) {
_local1.swapDepths(_local3);
}
_local1.id = "Help";
_local1.bnContinue.onPress = instance.onDismissPopup;
}
function onHelp() {
src.Game.DoClick();
DoHelp(instance.whichHelp);
}
function onQuit() {
src.Game.DoClick();
instance.ClearPopup();
src.Game.Pause();
instance.Level.Paused();
var _local1 = instance.attachMovie("MenuQuit", "uiCurr", instance.getNextHighestDepth());
_local1.id = "Quit";
_local1.bnQuit.onPress = instance.onReallyQuit;
_local1.bnResume.onPress = instance.onDismissPopup;
_local1.swapDepths(instance.Menu);
}
function onReallyQuit() {
instance.onDismissPopup();
instance.QuitGame();
}
function QuitGame() {
instance.onDismissPopup();
instance.Level.removeMovieClip();
instance.HideMenuBar();
instance.ResetState();
instance.NextState("Splash");
src.Game.GameOver();
}
function QuitGameNoSubmit() {
instance.onDismissPopup();
instance.Level.removeMovieClip();
instance.HideMenuBar();
instance.ResetState();
src.Game.STFU();
src.Game.NewGame();
instance.NextState("Splash");
}
function ContinueCallback() {
instance.uiCurr.removeMovieClip();
instance.PopState();
src.Game.DoClick();
}
function WaitForContinue(stateNext) {
uiCurr.bnContinue.onPress = ContinueCallback;
PushState(stateNext);
NextState("Waiting");
src.Game.InitKeypress(SkipKeys);
}
function Waiting() {
src.Game.PollKeypress(SkipKeys);
}
function Splash() {
var _local2 = attachMovie("MenuSplash", "uiCurr", 1);
_local2.bMusic.onPress = offMusic;
_local2.bMusicOff.onPress = onMusic;
src.Game.PlayTitle();
src.Game.UpdateVolume();
WaitForContinue("PickMe");
}
function PickMe() {
var _local2 = attachMovie("MenuChooser", "uiCurr", 1);
_local2.bMusic.onPress = offMusic;
_local2.bMusicOff.onPress = onMusic;
PushState("PlayLevel1");
NextState("WaitForPick");
}
function WaitForPick() {
}
function PlayLevel1() {
var _local2 = attachMovie("RunningTrack", "Level", getNextHighestDepth());
_local2.swapDepths(Menu);
PushState("Level1Complete");
DoHelp((whichHelp = "MenuHelpRunning"));
ShowMenuBar();
NextState("PlayingLevel1");
src.Game.level = 1;
src.Game.startlevel();
}
function PlayingLevel1() {
src.Game.PollKeypress(ShortcutKeys);
}
function Level1Complete() {
instance.Level.removeMovieClip();
HideMenuBar();
NextState("PlayLevel2");
src.Game.endlevel();
}
function PlayLevel2() {
var _local2 = attachMovie("TreeChucking", "Level", getNextHighestDepth());
DoHelp((whichHelp = "MenuHelpThrowing"));
ShowMenuBar();
PushState("Level2Complete");
NextState("PlayingLevel2");
src.Game.level = 2;
src.Game.startlevel();
}
function PlayingLevel2() {
src.Game.PollKeypress(ShortcutKeys);
}
function Level2Complete() {
instance.Level.removeMovieClip();
HideMenuBar();
NextState("PlayLevel3");
src.Game.endlevel();
}
function PlayLevel3() {
var _local2 = attachMovie("RidingTrack", "Level", getNextHighestDepth());
DoHelp((whichHelp = "MenuHelpRiding"));
ShowMenuBar();
PushState("Level3Complete");
NextState("PlayingLevel3");
src.Game.level = 3;
src.Game.startlevel();
}
function PlayingLevel3() {
src.Game.PollKeypress(ShortcutKeys);
}
function Level3Complete() {
src.Game.endlevel();
instance.Level.removeMovieClip();
HideMenuBar();
var _local2 = attachMovie("MenuMedal", "uiCurr", 1);
if (src.Game.score >= 4000) {
_local2.gotoAndStop(src.Game.character);
if (src.Game.score >= 10000) {
_local2.medal.gotoAndStop("gold");
_local2.lilmedal.gotoAndStop("gold");
} else if (src.Game.score >= 8000) {
_local2.medal.gotoAndStop("silver");
_local2.lilmedal.gotoAndStop("silver");
} else {
_local2.medal.gotoAndStop("bronze");
_local2.lilmedal.gotoAndStop("bronze");
}
} else {
_local2.gotoAndStop("LOSER");
}
_local2.szScore.text = src.Game.score.toString(10);
_local2.bnReplay.onPress = instance.QuitGameNoSubmit;
if (src.Game.isDXD) {
_local2.bnContinue._visible = false;
}
WaitForContinue("QuitGame");
}
}
Symbol 612 MovieClip [__Packages.src.DecayText] Frame 0
class src.DecayText extends MovieClip
{
var showup, _alpha, _y, removeMovieClip;
function DecayText () {
super();
}
static function Create(parent, x, y, msg, color, delay) {
var _local1 = parent.attachMovie("DecayText", "dk" + (idCurr++), parent.getNextHighestDepth());
_local1._x = x;
_local1._y = y;
_local1.text.text = msg;
_local1.text.textColor = color;
if (0 != ((_local1.showup = delay))) {
_local1._alpha = 0;
}
return(_local1);
}
function onEnterFrame() {
if (showup > 0) {
showup = showup - 2;
if (showup < 50) {
_alpha = 100 - (2 * showup);
}
} else if (_alpha > 0) {
_alpha = _alpha - 2;
if (_alpha < 50) {
_y--;
}
} else {
removeMovieClip();
}
}
static var idCurr = 0;
}
Symbol 613 MovieClip [__Packages.src.Biking] Frame 0
class src.Biking extends src.Course
{
var nTracks, trackSegment, nApplesTotal, nBagsTotal, nBananasTotal, nBottlesTotal, nCansTotal, nChipsTotal, nPapersTotal, nPizzasTotal, nYuckTotal, szRacer, bRiding;
function Biking () {
super();
nTracks = 5;
trackSegment = "biketrack";
nApplesTotal = 0;
nBagsTotal = 20;
nBananasTotal = 0;
nBottlesTotal = 23;
nCansTotal = 24;
nChipsTotal = 26;
nPapersTotal = 19;
nPizzasTotal = 0;
nYuckTotal = 0;
szRacer = "ride_" + src.Game.character;
bRiding = true;
src.Course.trackMovePerSecond = src.Course.trackMovePerSecond + 60;
}
}
Symbol 614 MovieClip [__Packages.src.Running] Frame 0
class src.Running extends src.Course
{
var nTracks, trackSegment, nApplesTotal, nBagsTotal, nBananasTotal, nBottlesTotal, nCansTotal, nChipsTotal, nPapersTotal, nPizzasTotal, nYuckTotal, szRacer;
function Running () {
super();
nTracks = 3;
trackSegment = "runtrack";
nApplesTotal = 5;
nBagsTotal = 10;
nBananasTotal = 13;
nBottlesTotal = 15;
nCansTotal = 18;
nChipsTotal = 11;
nPapersTotal = 13;
nPizzasTotal = 9;
nYuckTotal = 16;
szRacer = "run_" + src.Game.character;
}
}
Symbol 615 MovieClip [__Packages.src.Throwing] Frame 0
class src.Throwing extends src.FSMClip
{
var numTrees, NextState, holes, timer, thrower, attachMovie, getNextHighestDepth, grabpoint, tree, powerLevel, powerStart, distance, msThrow, msLand, globalToLocal, aStart, xStart, yStart, localToGlobal, holeCurr, outcome, StateError;
function Throwing () {
super();
numTrees = numTreesTotal;
scoreBeforeLevel = src.Game.score;
NextState("Begin");
holes = new Array();
}
function onLoad() {
super.onLoad();
var _local3;
MakeHoles(1, 5);
MakeHoles(2, 10);
MakeHoles(3, 15);
timer = src.Timeline.instance.Menu.timer;
thrower = attachMovie("throw_" + src.Game.character, "throwing", getNextHighestDepth());
thrower._x = throwX;
thrower._y = throwY;
src.FSMClip.SubBegin(thrower, "aim", throwBegin, throwEnd);
thrower._rotation = -90;
grabpoint = thrower.grabpoint;
tree = attachMovie("Tree", "theTree", getNextHighestDepth());
tree._visible = false;
tree.gotoAndStop(1);
src.Timeline.ShowTrees(numTrees);
}
function MakeHoles(size, count) {
var _local10;
var _local14 = [70, 55, 35];
var _local11 = _local14[size - 1] / 2;
while (count--) {
do {
var _local4 = 0.098174770424681;
var overlapped = false;
var _local5 = (-_local4) - (Math.random() * (Math.PI - (2 * _local4)));
var _local7 = 120 + Math.floor(Math.random() * 220);
var _local9 = throwX + (_local7 * Math.cos(_local5));
var _local8 = throwY + (_local7 * Math.sin(_local5));
var _local6;
for (_local6 in holes) {
var _local2 = holes[_local6];
var _local3 = Math.pow(_local9 - _local2._x, 2) + Math.pow(_local8 - _local2._y, 2);
if (_local3 < Math.pow(_local11 + _local2.holesize, 2)) {
overlapped = true;
break;
}
}
} while (overlapped);
_local10 = attachMovie("tree_holes", ("hole" + size) + count, getNextHighestDepth());
_local10.holesize = _local11;
_local10._x = _local9;
_local10._y = _local8;
_local10.gotoAndStop(size);
holes.push(_local10);
}
}
function Paused() {
}
function Resumed() {
}
function Begin() {
NextState("BeginWhistle");
src.FSMClip.SubBegin(thrower, "aim", throwBegin, throwEnd);
}
function BeginWhistle() {
src.Game.sfxPlay("start_event.wav");
NextState("Aiming");
}
function Aiming() {
var _local2 = thrower._rotation;
if (Key.isDown(37)) {
_local2--;
if (_local2 < -179) {
_local2 = -179;
}
}
if (Key.isDown(39)) {
_local2++;
if (_local2 >= -1) {
_local2 = -1;
}
}
thrower._rotation = _local2;
if (Key.isDown(32)) {
powerLevel = 0;
powerStart = 0;
NextState("Powerup");
src.Timeline.ShowPower(powerLevel, 1);
}
}
function Powerup() {
if (Key.isDown(32)) {
if (0 == powerStart) {
powerStart = src.Game.mstime();
}
var _local3 = src.Game.mstime() - powerStart;
var _local2 = (_local3 * Math.PI) / 2000;
powerLevel = 1 - ((Math.cos(_local2) + 1) / 2);
src.Timeline.ShowPower(powerLevel, 1);
} else {
NextState("Fling");
src.Game.sfxPlay("throw_tree.wav");
}
}
function Fling() {
if (src.FSMClip.SubOnce(thrower, "throwing", throwBegin, throwEnd)) {
distance = (powerLevel + 0.15) * throwX;
msThrow = src.Game.mstime();
msLand = msThrow + Math.floor((1000 * distance) / distancePerSecond);
var _local2 = {x:thrower.grabpoint._x, y:thrower.grabpoint._y};
thrower.localToGlobal(_local2);
globalToLocal(_local2);
aStart = (Math.PI * thrower._rotation) / 180;
xStart = _local2.x;
yStart = _local2.y;
tree._x = _local2.x;
tree._y = _local2.y;
tree._visible = true;
tree.gotoAndStop(1);
tree._rotation = thrower._rotation;
NextState("Fly");
}
}
function Fly() {
src.FSMClip.SubOnce(thrower, "launch", throwBegin, throwEnd);
var _local3 = src.Game.mstime();
var _local2;
if (_local3 >= msLand) {
_local2 = distance;
Hit();
} else {
_local2 = ((_local3 - msThrow) * distance) / (msLand - msThrow);
}
tree._x = xStart + (Math.cos(aStart) * _local2);
tree._y = yStart + (Math.sin(aStart) * _local2);
}
function Hit() {
var _local4 = {x:tree._x, y:tree._y};
localToGlobal(_local4);
var _local3;
for (_local3 in holes) {
holeCurr = holes[_local3];
src.Timeline.HidePower();
if (holeCurr.hitTest(_local4.x, _local4.y)) {
holes.splice(_local3, 1);
var _local2 = 0;
if (holeCurr._width >= 60) {
_local2 = 100;
numLarge++;
} else if (holeCurr._width >= 50) {
_local2 = 250;
numMedium++;
} else {
_local2 = 500;
numSmall++;
}
src.Game.sfxPlay("score_in_tree_level.wav");
tree._x = holeCurr._x;
tree._y = holeCurr._y;
src.FSMClip.SubBegin(tree, "hit", treeBegin, treeEnd);
NextState("HitAnim");
src.Game.AddScore(_local2);
outcome = src.DecayText.Create(this, holeCurr._x, holeCurr._y, "+" + _local2, 16776992, 0);
return(undefined);
}
}
src.Game.sfxPlay("tree_land_bad.wav");
src.FSMClip.SubBegin(tree, "miss", treeBegin, treeEnd);
NextState("MissAnim");
}
function HitAnim() {
holeCurr.nextFrame();
if (src.FSMClip.SubOnce(tree, "hit", treeBegin, treeEnd)) {
holeCurr.gotoAndStop(4);
var _local2 = attachMovie("Tree", "tree" + src.Game.score, getNextHighestDepth());
_local2._x = holeCurr._x;
_local2._y = holeCurr._y;
_local2._rotation = tree._rotation;
_local2.gotoAndStop("planted");
outcome.swapDepths(_local2);
NextState("NextThrow");
}
}
function MissAnim() {
if (src.FSMClip.SubOnce(tree, "miss", treeBegin, treeEnd)) {
NextState("NextThrow");
}
}
function NextThrow() {
tree._visible = false;
thrower.gotoAndStop("aim");
if ((--numTrees) <= 0) {
src.Game.sfxPlay("end_event.wav");
var _local2 = src.Timeline.DoPopup("MenuTreeComplete");
var _local4 = (numSmall + numMedium) + numLarge;
_local2.szHit.text = _local4.toString(10);
if (_local4 == numTreesTotal) {
_local2.szBonus._visible = true;
src.Game.AddScore(1000);
src.DecayText.Create(this, _local2.szBonus._x, _local2.szBonus._y, "+1000", 16776992, 0);
src.Game.sfxPlay("score_in_tree_level.wav");
} else {
_local2.szBonus._visible = false;
}
var _local3 = function (inputText, count, score) {
var _local1 = src.FSMClip.Printf(inputText, "123", count, "456", score, "7890", count * score);
return(_local1);
};
_local2.szSmall.text = _local3(_local2.szSmall.text, numSmall, 500);
_local2.szMedium.text = _local3(_local2.szMedium.text, numMedium, 250);
_local2.szLarge.text = _local3(_local2.szLarge.text, numLarge, 100);
_local2.szTotal.text = src.FSMClip.Printf(_local2.szTotal.text, "1234567890", src.Game.score - scoreBeforeLevel);
src.Timeline.ShowTrees((numTrees = 0));
NextState("WaitForPopup");
} else {
src.Timeline.ShowTrees(numTrees);
if (numTrees == 3) {
src.Game.sfxPlay("timer_enters_red.wav");
}
NextState("Aiming");
}
}
function WaitForPopup() {
src.Timeline.instance.PopState();
StateError();
}
static var numTreesTotal = 10;
static var treeStep = 6;
var scoreBeforeLevel = 0;
var numSmall = 0;
var numMedium = 0;
var numLarge = 0;
var throwX = src.Game.stageWidth / 2;
var throwY = src.Game.stageHeight - 64;
static var distancePerSecond = 200;
static var treeBegin = {fly:1, hit:1, planted:10, miss:16};
static var treeEnd = {fly:1, hit:9, planted:15, miss:23};
static var throwBegin = {aim:1, throwing:1, launch:5};
static var throwEnd = {aim:1, throwing:4, launch:18};
}
Symbol 616 MovieClip [__Packages.src.MenuHelp] Frame 0
class src.MenuHelp extends src.FSMClip
{
static var instance;
var NextState, bStopPaused, SetupFrameLabels, bnContinue, gotoAndStop, AnimOnce, AnimLoop;
function MenuHelp () {
super();
NextState("Begin");
bStopPaused = false;
instance = this;
}
function OnContinue() {
instance.NextState("Fadeout");
}
function Begin() {
SetupFrameLabels(aLoops);
bnContinue.onPress = OnContinue;
NextState("Fadein");
gotoAndStop("fadein");
}
function Fadein() {
if (AnimOnce("fadein")) {
NextState("Operate");
}
}
function Operate() {
AnimLoop("operate");
}
function Fadeout() {
if (AnimOnce("fadeout")) {
src.Timeline.instance.onDismissPopup();
}
}
static var aLoops = ["fadein", "operate", "fadeout"];
}
Symbol 617 MovieClip [__Packages.src.Prize] Frame 0
class src.Prize extends MovieClip
{
function Prize () {
super();
}
function onLoad() {
src.Course.prizes.push(this);
}
var score = 10;
var boost = 10;
}
Symbol 618 MovieClip [__Packages.src.Garbage] Frame 0
class src.Garbage extends src.Prize
{
var score, boost;
function Garbage () {
super();
score = 75;
boost = 20;
}
}
Symbol 619 MovieClip [__Packages.src.Recycle] Frame 0
class src.Recycle extends src.Prize
{
var score, boost;
function Recycle () {
super();
score = 100;
boost = 20;
}
}
Symbol 620 MovieClip [__Packages.src.MenuSplash] Frame 0
class src.MenuSplash extends src.FSMClip
{
var NextState, SetupFrameLabels, AnimOnce, bMusic, bMusicOff, AnimLoop;
function MenuSplash () {
super();
NextState("Begin");
}
function Begin() {
SetupFrameLabels(aLoops);
NextState("WaitForTitleLoop");
WaitForTitleLoop();
}
function WaitForTitleLoop() {
if (AnimOnce("waitfortitleloop")) {
}
NextState("LoopOnTitle");
bMusic._visible = src.Game.bMusic;
bMusicOff._visible = !src.Game.bMusic;
}
function LoopOnTitle() {
AnimLoop("looptitle");
bMusic._visible = src.Game.bMusic;
bMusicOff._visible = !src.Game.bMusic;
}
static var aLoops = ["waitfortitleloop", "titleloop"];
}
Symbol 621 MovieClip [__Packages.src.MenuChooser] Frame 0
class src.MenuChooser extends src.FSMClip
{
static var instance;
var NextState, kim, stitch, kronk, yin, bMusic, bMusicOff;
function MenuChooser () {
super();
NextState("Begin");
instance = this;
}
function choseKim() {
src.Game.character = "kim";
instance.NextState("Finished");
}
function choseStitch() {
src.Game.character = "stitch";
instance.NextState("Finished");
}
function choseKronk() {
src.Game.character = "kronk";
instance.NextState("Finished");
}
function choseYin() {
src.Game.character = "yin";
instance.NextState("Finished");
}
function Begin() {
kim.onPress = choseKim;
stitch.onPress = choseStitch;
kronk.onPress = choseKronk;
yin.onPress = choseYin;
Snooze();
NextState("Snooze");
}
function Snooze() {
bMusic._visible = src.Game.bMusic;
bMusicOff._visible = !src.Game.bMusic;
}
function Finished() {
src.Timeline.instance.PopState();
}
}
Symbol 622 MovieClip [__Packages.src.MenuPause] Frame 0
class src.MenuPause extends src.FSMClip
{
static var instance;
var NextState, bStopPaused, SetupFrameLabels, gotoAndStop, AnimOnce, bHelp, bQuit, bResume, AnimLoop;
function MenuPause () {
super();
NextState("Begin");
bStopPaused = false;
instance = this;
}
function OnHelp() {
src.Timeline.instance.onHelp();
}
function OnResume() {
instance.NextState("Fadeout");
}
function OnQuit() {
instance.NextState("OperateQuit");
}
function OnReallyQuit() {
src.Timeline.instance.onReallyQuit();
}
function Begin() {
SetupFrameLabels(aLoops);
NextState("Fadein");
gotoAndStop("fadein");
}
function Fadein() {
if (AnimOnce("fadein")) {
gotoAndStop("domain");
bHelp.onPress = OnHelp;
bQuit.onPress = OnQuit;
bResume.onPress = OnResume;
instance.bYesQuit.onPress = OnReallyQuit;
instance.bNoQuit.onPress = OnResume;
NextState("Operate");
}
}
function Operate() {
AnimLoop("domain");
}
function OperateQuit() {
AnimLoop("doquit");
}
function Fadeout() {
if (AnimOnce("fadeout")) {
src.Timeline.instance.onDismissPopup();
}
}
static var aLoops = ["fadein", "domain", "doquit", "fadeout"];
}
Symbol 47 MovieClip [MenuPause] Frame 1
#initclip 35
Object.registerClass("MenuPause", src.MenuPause);
#endinitclip
Symbol 111 MovieClip [RidingTrack] Frame 1
#initclip 16
Object.registerClass("RidingTrack", src.Biking);
#endinitclip
Symbol 114 MovieClip [RunningTrack] Frame 1
#initclip 17
Object.registerClass("RunningTrack", src.Running);
#endinitclip
Symbol 121 MovieClip [TreeChucking] Frame 1
#initclip 18
Object.registerClass("TreeChucking", src.Throwing);
#endinitclip
Symbol 153 MovieClip [MenuHelpRiding] Frame 1
#initclip 19
Object.registerClass("MenuHelpRiding", src.MenuHelp);
#endinitclip
Symbol 158 MovieClip [MenuHelpRunning] Frame 1
#initclip 20
Object.registerClass("MenuHelpRunning", src.MenuHelp);
#endinitclip
Symbol 165 MovieClip [MenuHelpThrowing] Frame 1
#initclip 21
Object.registerClass("MenuHelpThrowing", src.MenuHelp);
#endinitclip
Symbol 170 MovieClip [iApple] Frame 1
#initclip 22
Object.registerClass("iApple", src.Garbage);
#endinitclip
Symbol 173 MovieClip [iYuck] Frame 1
#initclip 23
Object.registerClass("iYuck", src.Garbage);
#endinitclip
Symbol 178 MovieClip [iPizzaBox] Frame 1
#initclip 24
Object.registerClass("iPizzaBox", src.Garbage);
#endinitclip
Symbol 181 MovieClip [iBanana] Frame 1
#initclip 25
Object.registerClass("iBanana", src.Garbage);
#endinitclip
Symbol 184 MovieClip [iPaper] Frame 1
#initclip 26
Object.registerClass("iPaper", src.Recycle);
#endinitclip
Symbol 188 MovieClip [iBag] Frame 1
#initclip 27
Object.registerClass("iBag", src.Recycle);
#endinitclip
Symbol 190 MovieClip [iBottle] Frame 1
#initclip 28
Object.registerClass("iBottle", src.Recycle);
#endinitclip
Symbol 194 MovieClip [iChips] Frame 1
#initclip 29
Object.registerClass("iChips", src.Recycle);
#endinitclip
Symbol 197 MovieClip [iCan] Frame 1
#initclip 30
Object.registerClass("iCan", src.Recycle);
#endinitclip
Symbol 200 MovieClip [iCan2] Frame 1
#initclip 31
Object.registerClass("iCan2", src.Recycle);
#endinitclip
Symbol 309 MovieClip [MenuSplash] Frame 1
#initclip 32
Object.registerClass("MenuSplash", src.MenuSplash);
#endinitclip
Symbol 330 MovieClip [MenuChooser] Frame 1
#initclip 33
Object.registerClass("MenuChooser", src.MenuChooser);
#endinitclip
Symbol 587 MovieClip [DecayText] Frame 1
#initclip 34
Object.registerClass("DecayText", src.DecayText);
#endinitclip
Symbol 605 MovieClip [Timeline] Frame 1
#initclip 36
Object.registerClass("Timeline", src.Timeline);
#endinitclip